retreaverjs-rails 0.2.25 → 0.2.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/build.js +104 -0
  3. data/lib/retreaverjs/compile.rb +6 -5
  4. data/lib/retreaverjs/rails/version.rb +1 -1
  5. data/package.json +14 -27
  6. data/vendor/assets/javascripts/retreaver.js +25 -11
  7. data/vendor/assets/javascripts/retreaver.min.js +2 -2
  8. data/vendor/documentation/javascript/v1/Retreaver.Campaign.html +343 -282
  9. data/vendor/documentation/javascript/v1/Retreaver.Number.html +875 -713
  10. data/vendor/documentation/javascript/v1/Retreaver.html +161 -130
  11. data/vendor/documentation/javascript/v1/campaign.js.html +11 -87
  12. data/vendor/documentation/javascript/v1/fonts/OpenSans-Bold-webfont.eot +0 -0
  13. data/vendor/documentation/javascript/v1/fonts/OpenSans-Bold-webfont.svg +1830 -0
  14. data/vendor/documentation/javascript/v1/fonts/OpenSans-Bold-webfont.woff +0 -0
  15. data/vendor/documentation/javascript/v1/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
  16. data/vendor/documentation/javascript/v1/fonts/OpenSans-BoldItalic-webfont.svg +1830 -0
  17. data/vendor/documentation/javascript/v1/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
  18. data/vendor/documentation/javascript/v1/fonts/OpenSans-Italic-webfont.eot +0 -0
  19. data/vendor/documentation/javascript/v1/fonts/OpenSans-Italic-webfont.svg +1830 -0
  20. data/vendor/documentation/javascript/v1/fonts/OpenSans-Italic-webfont.woff +0 -0
  21. data/vendor/documentation/javascript/v1/fonts/OpenSans-Light-webfont.eot +0 -0
  22. data/vendor/documentation/javascript/v1/fonts/OpenSans-Light-webfont.svg +1831 -0
  23. data/vendor/documentation/javascript/v1/fonts/OpenSans-Light-webfont.woff +0 -0
  24. data/vendor/documentation/javascript/v1/fonts/OpenSans-LightItalic-webfont.eot +0 -0
  25. data/vendor/documentation/javascript/v1/fonts/OpenSans-LightItalic-webfont.svg +1835 -0
  26. data/vendor/documentation/javascript/v1/fonts/OpenSans-LightItalic-webfont.woff +0 -0
  27. data/vendor/documentation/javascript/v1/fonts/OpenSans-Regular-webfont.eot +0 -0
  28. data/vendor/documentation/javascript/v1/fonts/OpenSans-Regular-webfont.svg +1831 -0
  29. data/vendor/documentation/javascript/v1/fonts/OpenSans-Regular-webfont.woff +0 -0
  30. data/vendor/documentation/javascript/v1/global.html +123 -93
  31. data/vendor/documentation/javascript/v1/index.html +10 -8
  32. data/vendor/documentation/javascript/v1/number.js.html +1 -1
  33. data/vendor/documentation/javascript/v1/retreaver.js.html +8 -7
  34. data/vendor/documentation/javascript/v1/retreaver_campaign.js.html +400 -0
  35. data/vendor/documentation/javascript/v1/retreaver_number.js.html +275 -0
  36. data/vendor/documentation/javascript/v1/scripts/linenumber.js +20 -12
  37. data/vendor/documentation/javascript/v1/styles/jsdoc-default.css +201 -133
  38. data/vendor/documentation/javascript/v1/styles/prettify-tomorrow.css +1 -1
  39. data/vendor/documentation/javascript/{dev → v2}/Retreaver.Campaign.html +3 -3
  40. data/vendor/documentation/javascript/{dev → v2}/Retreaver.Number.html +1 -1
  41. data/vendor/documentation/javascript/{dev → v2}/Retreaver.html +2 -2
  42. data/vendor/documentation/javascript/{dev → v2}/campaign.js.html +39 -48
  43. data/vendor/documentation/javascript/{dev → v2}/global.html +2 -2
  44. data/vendor/documentation/javascript/{dev → v2}/index.html +1 -1
  45. data/vendor/documentation/javascript/{dev → v2}/number.js.html +1 -1
  46. data/vendor/documentation/javascript/{dev → v2}/retreaver.js.html +2 -2
  47. metadata +42 -24
  48. data/Gruntfile.js +0 -50
  49. /data/vendor/documentation/javascript/{dev → v2}/scripts/linenumber.js +0 -0
  50. /data/vendor/documentation/javascript/{dev → v2}/scripts/prettify/Apache-License-2.0.txt +0 -0
  51. /data/vendor/documentation/javascript/{dev → v2}/scripts/prettify/lang-css.js +0 -0
  52. /data/vendor/documentation/javascript/{dev → v2}/scripts/prettify/prettify.js +0 -0
  53. /data/vendor/documentation/javascript/{dev → v2}/styles/jsdoc-default.css +0 -0
  54. /data/vendor/documentation/javascript/{dev → v2}/styles/prettify-jsdoc.css +0 -0
  55. /data/vendor/documentation/javascript/{dev → v2}/styles/prettify-tomorrow.css +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aef08ca0b98be18002d8e00c5eeaad13d16771f02d939a1a894c5063976b8a11
4
- data.tar.gz: c14eb1685afd5682914f06ab1c576815c863f69f61d31d8189ee64a0a821f555
3
+ metadata.gz: 0dafe3793f0909d2fd246689143e26c5e5db8e99bde24abd1253ad4c07aa4f4d
4
+ data.tar.gz: 71ca8942073cd7e1cf905eb0e2020405b80ac75488acf94b419c7e41649cde41
5
5
  SHA512:
6
- metadata.gz: '018664e49c294c8c90d6592db11442ae250224dd01cc61d1afd12e3b95bfde61af9ee7c8bbbac361488687c62e55070edd8bd1ef26fc4c5584dd4b41b622abdc'
7
- data.tar.gz: c4149d22801010d46a9a0d5e1b1d13d26c5e9aacac952016f78ecfebfbf2dc622ce87e3ebea8c98ceb2940eef68adbcba1edfe52cd29a3fa09e6316c96020405
6
+ metadata.gz: ab056901aecc8dbcd3bb78dfd958af17c7c9caa89e7e229628879cdc8b151bbb3e1cece0e586659b035a5785f359cb9883aaba024c970d48b4dfb0863695e098
7
+ data.tar.gz: 8e180c0b21cd07d430d4481eeb3c5df8ebf9e144c6c7feb6e49bea25b53226cad36e9e870198ee09376b80a338fa00925263ebb7bc19e65ed8b1f3df2c79620a
data/build.js ADDED
@@ -0,0 +1,104 @@
1
+ import { createRequire } from 'node:module'
2
+ import { mkdir, rm, writeFile, readFile } from 'node:fs/promises'
3
+ import { resolve } from 'node:path'
4
+ import { fileURLToPath } from 'node:url'
5
+ import UglifyJS from 'uglify-js';
6
+
7
+ // # Build for development and production
8
+ // yarn build
9
+
10
+ // # Generate documentation
11
+ // yarn docs
12
+
13
+ // # Clean build artifacts
14
+ // yarn clean
15
+
16
+ // # Run the server for /examples/index.html
17
+ // yarn serve
18
+
19
+ // Resolve project root from this file's location
20
+ const __filename = fileURLToPath(import.meta.url)
21
+ const __dirname = resolve(__filename, '..')
22
+
23
+ // Input files in the same order as Gruntfile.js
24
+ const sourceFiles = [
25
+ 'src/retreaver.js',
26
+ 'src/retreaver/base/helpers.js',
27
+ 'src/retreaver/base/cookies.js',
28
+ 'src/retreaver/base/base64.js',
29
+ 'src/retreaver/base/data.js',
30
+ 'src/retreaver/base/model.js',
31
+ 'src/retreaver/base/request.js',
32
+ 'src/retreaver/base/request_number.js',
33
+ 'src/retreaver/cache.js',
34
+ 'src/retreaver/number.js',
35
+ 'src/retreaver/campaign.js',
36
+ 'src/retreaver/callpixels.js',
37
+ 'src/retreaver/vendor/find_and_replace_dom_text.js'
38
+ ].map(p => resolve(__dirname, p))
39
+
40
+ // Get the name and version from package.json
41
+ const pkg = JSON.parse(await readFile(resolve(__dirname, 'package.json'), 'utf8'))
42
+ const outputName = pkg.name // 'retreaver'
43
+ const distDir = resolve(__dirname, 'dist')
44
+
45
+ async function concatenateFilesToString(files) {
46
+ const contents = await Promise.all(files.map(p => readFile(p, 'utf8')))
47
+ return contents.join(';' + '\n') + '\n'
48
+ }
49
+
50
+ async function build() {
51
+ console.log('Building Retreaver.js...')
52
+
53
+ // Ensure dist directory exists
54
+ await mkdir(distDir, { recursive: true })
55
+
56
+ // Clean only the output files we're about to create (preserve /dist/dev and /dist/v1)
57
+ await Promise.all([
58
+ rm(resolve(distDir, `${outputName}.js`), { force: true }),
59
+ rm(resolve(distDir, `${outputName}.min.js`), { force: true })
60
+ ])
61
+
62
+ try {
63
+ // Step 1: Concatenate source files in order
64
+ const concatenated = await concatenateFilesToString(sourceFiles)
65
+
66
+ // Step 2: Create development build (unminified)
67
+ const today = new Date().toISOString().split('T')[0]
68
+ const banner = `/*! ${pkg.name} v${pkg.version} | ${today} */`
69
+ const devContent = `${banner}\n${concatenated}`
70
+ await writeFile(resolve(distDir, `${outputName}.js`), devContent)
71
+
72
+ // Step 3: Create production build (minified)
73
+ const uglifyResult = UglifyJS.minify(concatenated, {
74
+ fromString: true, // grunt used this mode
75
+ compress: {
76
+ warnings: false, // grunt default
77
+ dead_code: true,
78
+ drop_console: false,
79
+ drop_debugger: true,
80
+ keep_infinity: true,
81
+ passes: 1
82
+ },
83
+ mangle: {
84
+ toplevel: false // grunt did NOT mangle toplevel by default
85
+ },
86
+ output: {
87
+ comments: /^!|@preserve/i, // grunt's regex for keeping banners
88
+ ascii_only: true
89
+ }
90
+ })
91
+ if (uglifyResult.error) throw uglifyResult.error
92
+ await writeFile(resolve(distDir, `${outputName}.min.js`), `${banner}\n${uglifyResult.code}`)
93
+
94
+ console.log('Build complete!')
95
+ console.log(` dist/${outputName}.js`)
96
+ console.log(` dist/${outputName}.min.js`)
97
+
98
+ } catch (error) {
99
+ console.error('Build failed:', error)
100
+ process.exit(1)
101
+ }
102
+ }
103
+
104
+ await build()
@@ -4,17 +4,18 @@ module Retreaver
4
4
  class << self
5
5
  def perform
6
6
  Dir.chdir(root) do |f|
7
- run("npm install") unless Dir.exist?('./node_modules')
7
+ run("yarn install")
8
8
  # compile src
9
- run("npx --yes grunt-cli")
10
- output = 'vendor/assets/javascripts/'
9
+ run("yarn build")
10
+ output = "vendor/assets/javascripts/"
11
11
  FileUtils.rm_rf(output)
12
12
  FileUtils.mkdir_p(output)
13
13
  Dir.glob('dist/*.js') { |f| FileUtils.cp(f, output) }
14
14
  # generate jsdocs
15
- output = 'vendor/documentation/javascripts/'
15
+ output = "vendor/documentation/javascripts/"
16
16
  FileUtils.rm_rf(output)
17
- run("./node_modules/.bin/jsdoc -c config/jsdocs.json")
17
+ FileUtils.mkdir_p(output)
18
+ run("yarn docs")
18
19
  end
19
20
  end
20
21
 
@@ -1,5 +1,5 @@
1
1
  module Retreaver
2
2
  module Rails
3
- VERSION = '0.2.25'
3
+ VERSION = "0.2.26"
4
4
  end
5
5
  end
data/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "retreaver",
3
3
  "description": "Retreaver Javascript API",
4
- "version": "0.2.25",
4
+ "version": "0.2.26",
5
5
  "homepage": "https://github.com/retreaver/retreaverjs",
6
6
  "repository": {
7
7
  "type": "git",
@@ -11,24 +11,14 @@
11
11
  "url": "https://github.com/retreaver/retreaverjs/issues"
12
12
  },
13
13
  "author": {
14
- "name": "Blake Hilscher",
15
- "email": "blake@retreaver.com",
14
+ "name": "Jason Kay",
15
+ "email": "support@retreaver.com",
16
16
  "url": "http://retreaver.com/"
17
17
  },
18
18
  "contributors": [
19
- {
20
- "name": "Blake Hilscher",
21
- "email": "blake@hilscher.ca",
22
- "url": "http://blake.hilscher.ca/"
23
- },
24
19
  {
25
20
  "name": "Jason Kay",
26
- "email": "jason@retreaver.com",
27
- "url": "http://retreaver.com/"
28
- },
29
- {
30
- "name": "Ahmed El-Daly",
31
- "email": "aeldaly@gmail.com",
21
+ "email": "support@retreaver.com",
32
22
  "url": "http://retreaver.com/"
33
23
  }
34
24
  ],
@@ -38,22 +28,19 @@
38
28
  "url": "http://github.com/retreaver/retreaverjs/blob/master/LICENSE"
39
29
  }
40
30
  ],
41
- "main": "src/package.js",
31
+ "main": "dist/retreaver.js",
32
+ "type": "module",
42
33
  "engines": {
43
- "node": ">= 0.6.x"
34
+ "node": ">= 22.0.0"
35
+ },
36
+ "scripts": {
37
+ "build": "node build.js",
38
+ "docs": "jsdoc -c config/jsdocs.json",
39
+ "clean": "rm -f dist/retreaver.js dist/retreaver.min.js dist/retreaver.temp.js && rm -rf temp"
44
40
  },
45
41
  "dependencies": {},
46
42
  "devDependencies": {
47
- "catharsis": "0.9.0",
48
- "grunt": "0.4.5",
49
- "grunt-contrib-concat": "0.4.0",
50
- "grunt-contrib-jshint": "0.10.0",
51
- "grunt-contrib-nodeunit": "0.4.1",
52
- "grunt-contrib-uglify": "0.5.1",
53
- "grunt-contrib-watch": "0.6.1",
54
- "jsdoc": "3.2.2",
55
- "marked": "4.0.14",
56
- "taffydb": "2.7.3",
57
- "underscore": "1.13.2"
43
+ "jsdoc": "4.0.4",
44
+ "uglify-js": "2.8.29"
58
45
  }
59
46
  }
@@ -1,3 +1,4 @@
1
+ /*! retreaver v0.2.26 | 2025-08-23 */
1
2
  (function (context) {
2
3
  /**
3
4
  * @namespace Retreaver
@@ -31,7 +32,8 @@
31
32
  context.Retreaver = Retreaver;
32
33
 
33
34
  })(window);
34
- ;(function () {
35
+ ;
36
+ (function () {
35
37
  // ensure namespace is present
36
38
  if (typeof window.Retreaver === 'undefined') window.Retreaver = {};
37
39
  var Base = {};
@@ -85,7 +87,8 @@
85
87
  return Base._ieVersion;
86
88
  };
87
89
  Retreaver.Base = Base;
88
- })();;// https://github.com/evertton/cookiejs
90
+ })();;
91
+ // https://github.com/evertton/cookiejs
89
92
  (function (f) {
90
93
  var a = function (b, c, d) {
91
94
  return 1 === arguments.length ? a.get(b) : a.set(b, c, d)
@@ -143,7 +146,8 @@
143
146
  return a
144
147
  }) : "undefined" !== typeof exports ? ("undefined" !== typeof module && module.exports && (exports = module.exports = a), exports.Cookies = a) : a;
145
148
  Retreaver.Base.Cookies = a;
146
- })();;// http://www.webtoolkit.info/javascript-base64.html#.U-qwzYBdUwQ
149
+ })();;
150
+ // http://www.webtoolkit.info/javascript-base64.html#.U-qwzYBdUwQ
147
151
  (function () {
148
152
  var Base64 = {
149
153
  _keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
@@ -268,7 +272,8 @@
268
272
  };
269
273
  Retreaver.Base.Base64 = Base64;
270
274
  })();
271
- ;(function () {
275
+ ;
276
+ (function () {
272
277
  // Dependencies
273
278
  var Base = Retreaver.Base;
274
279
  /**
@@ -348,7 +353,8 @@
348
353
  };
349
354
  Data._store = {};
350
355
  Retreaver.Base.Data = Data;
351
- })();;(function () {
356
+ })();;
357
+ (function () {
352
358
  // Dependencies
353
359
  var Base = Retreaver.Base;
354
360
  var Data = Retreaver.Base.Data;
@@ -460,7 +466,8 @@
460
466
  return Model.primary_keys[type];
461
467
  };
462
468
  Retreaver.Base.Model = Model;
463
- })();;(function () {
469
+ })();;
470
+ (function () {
464
471
  // Dependencies
465
472
  var Base = window.Retreaver.Base;
466
473
  var Cookies = window.Retreaver.Base.Cookies;
@@ -679,7 +686,8 @@
679
686
  };
680
687
  Retreaver.Base.Request = Request;
681
688
  })();
682
- ;(function () {
689
+ ;
690
+ (function () {
683
691
  // Dependencies
684
692
  var Base = Retreaver.Base;
685
693
  var Cookies = Retreaver.Base.Cookies;
@@ -893,7 +901,9 @@
893
901
  Retreaver.Base.RequestNumber = RequestNumber;
894
902
  })();
895
903
 
896
- ;window.Retreaver.Cache = {};;(function () {
904
+ ;
905
+ window.Retreaver.Cache = {};;
906
+ (function () {
897
907
  // Dependencies
898
908
  var Base = Retreaver.Base;
899
909
  /**
@@ -1117,7 +1127,8 @@
1117
1127
  // always ping active numbers
1118
1128
  ping_active_numbers();
1119
1129
 
1120
- })();;(function() {
1130
+ })();;
1131
+ (function() {
1121
1132
  // Dependencies
1122
1133
  var RequestNumber = Retreaver.Base.RequestNumber;
1123
1134
  /**
@@ -1466,10 +1477,12 @@
1466
1477
  Campaign.prototype = new Retreaver.Base.Model();
1467
1478
  Retreaver.Campaign = Campaign;
1468
1479
  })();
1469
- ;(function (context) {
1480
+ ;
1481
+ (function (context) {
1470
1482
  context.Callpixels = window.Retreaver;
1471
1483
  })(window);
1472
- ;/**
1484
+ ;
1485
+ /**
1473
1486
  * findAndReplaceDOMText v 0.4.3
1474
1487
  * @author James Padolsey http://james.padolsey.com
1475
1488
  * @license http://unlicense.org/UNLICENSE
@@ -2096,3 +2109,4 @@ if (typeof(Retreaver.Vendor) === 'undefined') {
2096
2109
  return exposed;
2097
2110
 
2098
2111
  }));
2112
+
@@ -1,2 +1,2 @@
1
- /*! retreaver 14-10-2024 */
2
- if(function(a){var b={configure:function(a){var c={addr:a.host,http_prefix:"http",urlregex:"/\\/\\/[^\\/]*\\/(.*)/"};void 0!==a.prefix&&(c.http_prefix=a.prefix),window.Retreaver._connection=new b.Base.Request(c)}};a.Retreaver=b}(window),function(){void 0===window.Retreaver&&(window.Retreaver={});var a={};a.assert_required_keys=function(){for(var a=Array.prototype.slice.call(arguments),b=a.shift(),c=0;c<a.length;c++){var d=a[c];if(void 0===b||void 0===b[d])throw"ArgumentError: Required keys are not defined: "+a.join(", ")}return b},a.merge=function(b,c){for(var d in c)try{c[d].constructor==Object?b[d]=a.merge(b[d],c[d]):b[d]=c[d]}catch(a){b[d]=c[d]}return b},a.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)},a.ieVersion=function(){return null==a._ieVersion&&(a._ieVersion=function(){for(var a=3,b=document.createElement("div"),c=b.getElementsByTagName("i");b.innerHTML="\x3c!--[if gt IE "+ ++a+"]><i></i><![endif]--\x3e",c[0];);return a>4&&a}()),6!=a._ieVersion&&7!=a._ieVersion||null==Retreaver.easyxdm_loaded&&(Retreaver.easyxdm_loaded=!1),a._ieVersion},Retreaver.Base=a}(),function(a){var b=function(a,c,d){return 1===arguments.length?b.get(a):b.set(a,c,d)};b._document=document,b._navigator=navigator,b.defaults={path:"/"},b.get=function(a){return b._cachedDocumentCookie!==b._document.cookie&&b._renewCache(),b._cache[a]},b.set=function(a,c,d){return d=b._getExtendedOptions(d),b._document.cookie=b._generateCookieString(a,c,d),b},b._getExtendedOptions=function(c){return{path:c&&c.path||b.defaults.path,domain:c&&c.domain||b.defaults.domain,secure:c&&c.secure!==a?c.secure:b.defaults.secure}},b._isValidDate=function(a){return"[object Date]"===Object.prototype.toString.call(a)&&!isNaN(a.getTime())},b._generateCookieString=function(a,b,c){return a=encodeURIComponent(a),b=(b+"").replace(/[^!#$&-+\--:<-\[\]-~]/g,encodeURIComponent),c=c||{},a=a+"="+b+(c.path?";path="+c.path:""),a+=c.domain?";domain="+c.domain:"",a+=c.secure?";secure":""},b._getCookieObjectFromString=function(c){var d={};c=c?c.split("; "):[];for(var e=0;e<c.length;e++){var f=b._getKeyValuePairFromCookieString(c[e]);d[f.key]===a&&(d[f.key]=f.value)}return d},b._getKeyValuePairFromCookieString=function(a){var b=a.indexOf("="),b=0>b?a.length:b;return{key:decodeURIComponent(a.substr(0,b)),value:decodeURIComponent(a.substr(b+1))}},b._renewCache=function(){b._cache=b._getCookieObjectFromString(b._document.cookie),b._cachedDocumentCookie=b._document.cookie},b._areEnabled=function(){return b._navigator.cookieEnabled||"1"===b.set("cookies.js",1).get("cookies.js")},b.enabled=b._areEnabled(),"function"==typeof define&&define.amd?define(function(){return b}):"undefined"!=typeof exports&&("undefined"!=typeof module&&module.exports&&(exports=module.exports=b),exports.Cookies=b),Retreaver.Base.Cookies=b}(),function(){var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};Base64.encode=function(a){var b,c,d,e,f,g,h,i="",j=0;for(a=Base64._utf8_encode(a);j<a.length;)b=a.charCodeAt(j++),c=a.charCodeAt(j++),d=a.charCodeAt(j++),e=b>>2,f=(3&b)<<4|c>>4,g=(15&c)<<2|d>>6,h=63&d,isNaN(c)?g=h=64:isNaN(d)&&(h=64),i=i+Base64._keyStr.charAt(e)+Base64._keyStr.charAt(f)+Base64._keyStr.charAt(g)+Base64._keyStr.charAt(h);return i},Base64.decode=function(a){var b,c,d,e,f,g,h,i="",j=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");j<a.length;)e=Base64._keyStr.indexOf(a.charAt(j++)),f=Base64._keyStr.indexOf(a.charAt(j++)),g=Base64._keyStr.indexOf(a.charAt(j++)),h=Base64._keyStr.indexOf(a.charAt(j++)),b=e<<2|f>>4,c=(15&f)<<4|g>>2,d=(3&g)<<6|h,i+=String.fromCharCode(b),64!=g&&(i+=String.fromCharCode(c)),64!=h&&(i+=String.fromCharCode(d));return i=Base64._utf8_decode(i)},Base64._utf8_encode=function(string){string=string.replace(eval("/\\r\\n/g"),eval("String('\\n')"));for(var utftext="",n=0;n<string.length;n++){var c=string.charCodeAt(n);c<128?utftext+=String.fromCharCode(c):c>127&&c<2048?(utftext+=String.fromCharCode(c>>6|192),utftext+=String.fromCharCode(63&c|128)):(utftext+=String.fromCharCode(c>>12|224),utftext+=String.fromCharCode(c>>6&63|128),utftext+=String.fromCharCode(63&c|128))}return utftext},Base64._utf8_decode=function(a){for(var b="",c=0,d=0,e=0,f=0;c<a.length;)d=a.charCodeAt(c),d<128?(b+=String.fromCharCode(d),c++):d>191&&d<224?(e=a.charCodeAt(c+1),b+=String.fromCharCode((31&d)<<6|63&e),c+=2):(e=a.charCodeAt(c+1),f=a.charCodeAt(c+2),b+=String.fromCharCode((15&d)<<12|(63&e)<<6|63&f),c+=3);return b},Retreaver.Base.Base64=Base64}(),function(){var a=Retreaver.Base,b=function(b){function c(){a.assert_required_keys(b,"type","primary_key"),void 0===Retreaver.Base.Data._store[b.type]&&(Retreaver.Base.Data._store[b.type]={}),void 0===Retreaver.Base.Data._store[b.type][b.primary_key]&&(Retreaver.Base.Data._store[b.type][b.primary_key]={})}var d=this;d.get=function(){var a={};if(void 0===arguments[0])a=Retreaver.Base.Data._store[b.type][b.primary_key];else if(1===arguments.length)a=Retreaver.Base.Data._store[b.type][b.primary_key][arguments[0]];else for(var c=0;c<arguments.length;c++){var d=arguments[c];a[d]=Retreaver.Base.Data._store[b.type][b.primary_key][d]}return a},d.set=function(a,c){return Retreaver.Base.Data._store[b.type][b.primary_key][a]=c,c},d.merge=function(a){for(var c in a)Retreaver.Base.Data._store[b.type][b.primary_key][c]=a[c];return a},c()};b._store={},Retreaver.Base.Data=b}(),function(){var a=Retreaver.Base,b=Retreaver.Base.Data,c=function(){this.api_host_uri="/api/v1/",this.type="model",this.primary_key=function(a){return c.primary_key(this.type,a)},this.store=function(a){if(void 0!==a){var b=this.primary_key();if(void 0===a[b])throw"ArgumentError: Expected to receive primary_key "+b;void 0===this._store&&(this._store=new Retreaver.Base.Data({type:this.type,primary_key:a[b]})),this._store.merge(a),c.update_visitor_id(a)}return this._store},this.get_data=function(a,b){return this.connection().getJSON(this.api_host_uri+a,null,[c.update,b],this)},this.post_data=function(a,b,d){return this.connection().postJSON(this.api_host_uri+a,b,[c.update,d],this)},this.set=function(){return"function"==typeof this["set_"+arguments[0]]&&(arguments[1]=this["set_"+arguments[0]].apply(this,[arguments[1]])),this._store.set.apply(this,arguments)},this.get=function(){return this._store.get.apply(this,arguments)},this.connection=function(){return Retreaver.Base.Request.connection()}};c.inflections={number:"numbers",campaign:"campaigns"},c.update=function(d){for(var e in d){var f=e,g=d[e];if(void 0!==c.inflections[e]&&(f=c.inflections[e]),void 0!==b._store[f])if(a.isArray(g))for(var h=0;h<g.length;h++)c.update_record(f,g[h]);else c.update_record(f,g[h])}return d},c.update_record=function(a,b){if(c.update_visitor_id(b),void 0!==b.id){var d=c.primary_key(a);for(var e in b)Retreaver.Base.Data._store[a][b[d]][e]=b[e];return!0}return!1},c.update_visitor_id=function(a){void 0!==a&&void 0!==a.visitor_id&&Retreaver.Base.Cookies.set("CallPixels-vid",a.visitor_id)},c.primary_key=function(a,b){return void 0===c.primary_keys&&(c.primary_keys={}),void 0===c.primary_keys[a]&&(c.primary_keys[a]="id"),void 0!==b&&(c.primary_keys[a]=b),c.primary_keys[a]},Retreaver.Base.Model=c}(),function(){var Base=window.Retreaver.Base,Cookies=window.Retreaver.Base.Cookies,Request=function(options){function initialize(a){config=Base.assert_required_keys(a,"http_prefix","addr","urlregex")}function with_ie_scripts(a){Retreaver.easyxdm_loaded?a():self.loadScript(http_prefix+"://cdn.jsdelivr.net/easyxdm/2.4.17.1/easyXDM.min.js",function(){self.loadScript(http_prefix+"://cdn.jsdelivr.net/easyxdm/2.4.17.1/json2.js",function(){Retreaver.easyxdm_loaded=!0,a()})})}var self=this,config={};self.getJSON=function(a,b,c,d){"function"==typeof c&&(c=[c]),void 0===d&&(d=self);var e=function(){self.apiRequest(a,function(a){var b=JSON.parse(a);for(var e in c)"function"==typeof c[e]&&c[e].apply(d,[b])},b)};6==Base.ieVersion()||7==Base.ieVersion()?with_ie_scripts(e):e()},self.postJSON=function(){return self.getJSON.apply(this,arguments)},self.apiRequest=function(request_uri,callbackFunctions,payload){function ignored(){}function runCallbacks(a){for(var b in callbackFunctions)"function"==typeof callbackFunctions[b]&&callbackFunctions[b](a)}function forwardResponse(){runCallbacks(xdr.responseText)}function sendXdm(){var remote=http_prefix+"://"+addr+"/ie_provider",swf=http_prefix+"://"+addr+"/easyxdm.swf",rpc=eval('new window.easyXDM.Rpc({ remote: "'+remote+'", swf: "'+swf+'"},{remote: {request: {}}});');rpc.request({url:"/"+request_url.match(urlregex)[1],method:"POST",data:payload},function(a){runCallbacks(a.data)})}var http_prefix=config.http_prefix,addr=config.addr,urlregex=eval(config.urlregex),request_url=http_prefix+"://"+addr+request_uri;if(payload&&void 0!==Cookies.get("CallPixels-vid")&&"null"!==Cookies.get("CallPixels-vid")&&(payload.visitor_id=Cookies.get("CallPixels-vid")),"function"==typeof callbackFunctions&&(callbackFunctions=[callbackFunctions]),window.XDomainRequest){var xdr=new XDomainRequest;xdr.onload=forwardResponse,xdr.onprogress=ignored,xdr.onerror=ignored,xdr.ontimeout=ignored,xdr.timeout=3e4,payload?(xdr.open("post",request_url),xdr.send(self.buildPost(payload))):(xdr.open("get",request_url),xdr.send())}else if(6==Base.ieVersion()||7==Base.ieVersion())with_ie_scripts(sendXdm);else{var request=new XMLHttpRequest;request.onload=function(){runCallbacks(this.responseText)},payload?(request.open("POST",request_url),request.setRequestHeader("Content-Type","application/json"),request.send(JSON.stringify(payload))):(request.open("GET",request_url),request.send())}},self.buildPost=function(a){var b="";for(var c in a)b+=c+"="+a[c]+"&";return b},self.loadScript=function(a,b){var c=document.getElementsByTagName("script")[0],d=document.createElement("script");d.type="text/javascript",d.async=!1,d.src=a;var e=function(a,b){"loaded"==a.readyState||"complete"==a.readyState?b():setTimeout(function(){e(a,b)},100)};"function"==typeof b&&(void 0!==d.addEventListener?d.addEventListener("load",b,!1):d.onreadystatechange=function(){d.onreadystatechange=null,e(d,b)}),c.parentNode.insertBefore(d,c)},initialize(options),self.config=config};Request.connection=function(){if(void 0===window.Retreaver._connection){var a=window.location.protocol.replace(":","");window.Retreaver._connection=new Retreaver.Base.Request({addr:"api.rtvrapi.com",http_prefix:a,urlregex:"/\\/\\/[^\\/]*\\/(.*)/"})}return window.Retreaver._connection},Retreaver.Base.Request=Request}(),function(){function tags_to_script_tags(a){var b="";for(var c in a){b=b+"&"+c+"="+a[c]}return b}var Base=Retreaver.Base,Cookies=Retreaver.Base.Cookies,Base64=Retreaver.Base.Base64,Request=Retreaver.Base.Request,RequestNumber=function(options){function initialize(a){config=Base.assert_required_keys(a,"campaign_key")}function getParts(a){for(var b={},c=0;c<a.length;c++){var d=getUrlParts(a[c]);for(var e in d)b[e]=d[e]}return b}function getUrlParts(url){var objURL=new Object;try{url=url.match(eval("/\\?(.*)/"))[0]}catch(a){return objURL}return url.replace(new RegExp("([^?=&]+)(=([^&]*))?","g"),function(a,b,c,d){objURL[b.toLowerCase()]=d}),objURL}function getGACookies(){var a=["__utma","__utmb","__utmc","__utmz","__utmv"],b=new Object;for(var c in a){var d=extractCookie(a[c]);if(!(d||c>0))break;d&&(b[a[c]]=d)}return b}function extractCookie(a){var b=new RegExp(a+"=([^;]*)","g");try{return b.exec(document.cookie)[1]}catch(a){return!1}}function findOne(a,b){for(var c in b)for(var d in a)if(d==b[c])return a[d];return!1}var self=this,config={},resource_url="/api/v1/numbers?";self.perform=function(callback){function sendGARequest(a,b){request_ran||(request_ran=!0,body.ga=Base64.encode(a),body.c=Base64.encode(JSON.stringify(b)),Request.connection().getJSON(request_url,body,callback))}function runRequest(){request_ran||(request_ran=!0,Request.connection().getJSON(request_url,body,callback))}if("function"!=typeof callback)throw"ArgumentError: Expected to receive a callback function";var request_url=resource_url+"&campaign_key="+config.campaign_key;config.default_number_replacement&&(request_url=request_url+"&default_number="+config.default_number_replacement),config.message_replacement&&(request_url=request_url+"&message="+config.message_replacement);var body=new Object,uri=document.location.href;body.u=Base64.encode(uri),body.st=Base64.encode(tags_to_script_tags(config.number_matching_tags));var ou=Cookies.get("CallPixels-ou");getParts([document.location.href]).cpreset||!ou?Cookies.set("CallPixels-ou",body.u):body.ou=ou;var ga_acct="FAILED",request_ran=!1;window.setTimeout(runRequest,1e3);try{_gaq.push(function(){ga_acct=eval("_gat._getTrackerByName()._getAccount()"),sendGARequest(ga_acct,getGACookies())})}catch(e){try{ga(function(tracker){if(tracker&&tracker.get)try{var clientId=tracker.get("clientId"),allTrackers=eval("ga.getAll()");ga_acct=allTrackers[0].get("trackingId");var ga_cookies={};ga_cookies.__utma=clientId,ga_cookies.mp="yes",sendGARequest(ga_acct,ga_cookies)}catch(a){sendGARequest("",{})}else sendGARequest("",{})})}catch(a){runRequest()}}},initialize(options)};Retreaver.Base.RequestNumber=RequestNumber}(),window.Retreaver.Cache={},function(){function a(b){if(void 0!==Retreaver.Base.Data._store){var c=Retreaver.Base.Data._store.numbers;if(void 0!==c){var d={};for(var e in c){var f=c[e];"true"===f.is_active&&(void 0===d[f.campaign_key]&&(d[f.campaign_key]=[],d[f.campaign_key].ids=[],d[f.campaign_key].hashes=[]),d[f.campaign_key].ids.push(f.id),d[f.campaign_key].hashes.push(f.id_checksum))}for(var g in d){var h={ids:d[g].ids,hashes:d[g].hashes};Retreaver.Base.Request.connection().postJSON("/api/v1/numbers/ping",h,[Retreaver.Base.Model.update,b],this)}}}setTimeout(a,15e3)}var b=Retreaver.Base;Retreaver.Number=function(a){function c(a){g.store(a),g.set("is_active","true")}function d(a){return"string"==typeof a&&(a=Retreaver.Number.extract_tags_from_string(a)),{tag_values:a,ids:[e("id")],campaign_key:e("campaign_key")}}function e(a){return g.get(a)}function f(){if(!1===g.get("is_per_visitor"))throw"Error: Tried to add tags to non per-visitor number."}var g=this;g.type="numbers",g.add_tags=function(a,b){f(),g.post_data("numbers/tag",d(a),b)},g.replace_tags=function(a,b){f(),g.post_data("numbers/replace_tags",d(a),b)},g.remove_tags=function(a,b){f(),g.post_data("numbers/untag",d(a),b)},g.remove_tags_by_keys=function(a,b){f(),"string"==typeof a&&(a=a.split(","));var c={tag_keys:a,ids:[e("id")],campaign_key:e("campaign_key")};g.post_data("numbers/untag/keys",c,b)},g.clear_tags=function(a){f();var b={ids:[e("id")],campaign_key:e("campaign_key"),all:"true"};g.post_data("numbers/untag",b,a)},g.release=function(){g.set("is_active","false")},g.initiate_call=function(a,c,d){void 0===c&&(c={}),c.dial=a,c=b.merge(g.get("id","campaign_key"),c),g.post_data("numbers/initiate_call",c,d)},c(a)},Retreaver.Number.extract_tags_from_string=function(a){for(var b={},a=a.split(","),c=0;c<a.length;c++){var d=a[c].split(":");b[d[0]]=d[1]}return b},Retreaver.Number.prototype=new Retreaver.Base.Model,a()}(),function(){var a=Retreaver.Base.RequestNumber,b=function(b){function c(a){j.store(a)}function d(a){for(var b=0;b<a.length;b++){var c=a[b];Retreaver.Vendor.findAndReplaceDOMText(document.getElementsByTagName("body")[0],{find:c.find,replace:c.replace_with});for(var d=document.getElementsByTagName("a"),e=0;e<d.length;e++){var f=d[e],g=f.getAttribute("href");if(null!==g){var h=g.match(/^(tel:|clk[a-z]\/tel\/)(.*)/);h&&h[2]===c.find&&f.setAttribute("href",h[1]+c.replace_with)}}}}function e(a,b){const c=a.get("integrations");if("object"==typeof c){const d=c[b];if(void 0!==d)return d}}function f(a){if(googleAnalyticsConfig=e(a,"google_analytics"),"undefined"!=typeof googleAnalyticsConfig){new Promise(function(a){const b=setInterval(function(){const c=/_ga_[^=]+=([^;]*)/,d=document.cookie.match(c),e=d&&d[1],f=/_ga=([^;]*)/,g=document.cookie.match(f),h=g&&g[1];e&&h&&(a({gaSessionId:e,gaClientId:h}),clearInterval(b))},googleAnalyticsConfig.checkIntervalMs)}).then(function(b){a.replace_tags({ga_session_id:b.gaSessionId,ga_client_id:b.gaClientId})})}}function g(a){const b=e(a,"truecall.com");if(void 0!==b){document.getElementById("__tc_script")&&window.TrueCall||function(){const a=document.createElement("script");a.type="text/javascript",a.async=!0,a.defer=!0,a.dataset.campaign_uuid=b.tcCampaignUuid,a.dataset.use_set_did="1",a.id="__tc_script",a.src=b.scriptSrc,(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]).appendChild(a)}();const c=setInterval(function(){window.TrueCall&&window.TrueCall.setDID(a.get("number")).then(function(){return clearInterval(c),window.TrueCall.getIdAsync()}).then(function(c){const d={};d[b.tagName]=c,a.replace_tags(d)})},b.checkIntervalMs)}}function h(a){function b(a){const b="; "+document.cookie,c=b.split("; "+a+"=");if(2==c.length)return c.pop().split(";").shift()}const c=e(a,"red_track");if(void 0!==c){new Promise(function(a){const d=setInterval(function(){const c=b("rtkclickid-store");c&&(a(c),clearInterval(d))},c.checkIntervalMs)}).then(function(b){const d={};d[c.tagName]=b,a.replace_tags(d)})}}function i(a){const b=e(a,"click_flare");if(void 0!==b){const c=function(){if(window.clickflare&&window.clickflare.data&&window.clickflare.data.event_tokens)return window.clickflare.data.event_tokens.cv_click_id||window.clickflare.data.event_tokens.cf_click_id};new Promise(function(a){const d=setInterval(function(){const b=c();b&&(a(b),clearInterval(d))},b.checkIntervalMs)}).then(function(c){const d={};d[b.tagName]=c,a.replace_tags(d)})}}var j=this;j.type="campaigns",j.primary_key("campaign_key"),j.numbers=[],j.request_number=function(b,c,e){"function"==typeof b&&(e=c,c=b,b={}),void 0===c&&(c=function(){}),void 0===b&&(b={}),j.set("number_matching_tags",b),new a(j.get("campaign_key","number_matching_tags")).perform(function(a){if(void 0!==a&&void 0!==a.number&&""!==a.number){var b=new Retreaver.Number(a.number);try{g(b)}catch(a){console.error("Could not integrate with truecall.com, ",a)}try{h(b)}catch(a){console.error("Could not integrate with Red Track, ",a)}try{f(b)}catch(a){console.error("Could not integrate with google analytics, ",a)}try{i(b)}catch(a){console.error("Could not integrate with click flare, ",a)}void 0!==a.number.replacement_numbers&&d(a.number.replacement_numbers),c.apply(j,[b])}else"function"==typeof e&&e.apply(j,[a])})},j.auto_replace_numbers=function(a,b,c){void 0===b&&(b=function(){}),void 0===c&&(c=function(){}),j.request_number(a,b,c)},j.numbers=function(){var a=[];if(void 0!==Retreaver.Base.Data._store){var b=Retreaver.Base.Data._store.numbers;if(void 0!==b)for(var c in b){var d=b[c];j.get("campaign_key")==d.campaign_key&&a.push(new Retreaver.Number(d))}}return a},j.set_number_matching_tags=function(a){if("string"==typeof a&&(a=Retreaver.Number.extract_tags_from_string(a)),!a||"object"!=typeof a||a instanceof Array)throw"ArgumentError: Expected number_matching_tags to be an object. eg: {tag: 'value'}";return a},c(b)};b.prototype=new Retreaver.Base.Model,Retreaver.Campaign=b}(),function(a){a.Callpixels=window.Retreaver}(window),void 0===Retreaver)var Retreaver={};void 0===Retreaver.Vendor&&(Retreaver.Vendor={}),function(a,b){a.findAndReplaceDOMText=b()}(Retreaver.Vendor,function(){function a(a){return String(a).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function b(){return c.apply(null,arguments)||d.apply(null,arguments)}function c(a,c,e,f,g){if(c&&!c.nodeType&&arguments.length<=2)return!1;var h="function"==typeof e;h&&(e=function(a){return function(b,c){return a(b.text,c.startIndex)}}(e));var i=d(c,{find:a,wrap:h?null:e,replace:h?e:"$"+(f||"&"),prepMatch:function(a,b){if(!a[0])throw"findAndReplaceDOMText cannot handle zero-length matches";if(f>0){var c=a[f];a.index+=a[0].indexOf(c),a[0]=c}return a.endIndex=a.index+a[0].length,a.startIndex=a.index,a.index=b,a},filterElements:g});return b.revert=function(){return i.revert()},!0}function d(a,b){return new e(a,b)}function e(a,c){var d=c.preset&&b.PRESETS[c.preset];if(c.portionMode=c.portionMode||f,d)for(var e in d)i.call(d,e)&&!i.call(c,e)&&(c[e]=d[e]);this.node=a,this.options=c,this.prepMatch=c.prepMatch||this.prepMatch,this.reverts=[],this.matches=this.search(),this.matches.length&&this.processMatches()}var f="retain",g="first",h=document,i={}.hasOwnProperty;return b.NON_PROSE_ELEMENTS={br:1,hr:1,script:1,style:1,img:1,video:1,audio:1,canvas:1,svg:1,map:1,object:1,input:1,textarea:1,select:1,option:1,optgroup:1,button:1},b.NON_CONTIGUOUS_PROSE_ELEMENTS={address:1,article:1,aside:1,blockquote:1,dd:1,div:1,dl:1,fieldset:1,figcaption:1,figure:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,hr:1,main:1,nav:1,noscript:1,ol:1,output:1,p:1,pre:1,section:1,ul:1,br:1,li:1,summary:1,dt:1,details:1,rp:1,rt:1,rtc:1,script:1,style:1,img:1,video:1,audio:1,canvas:1,svg:1,map:1,object:1,input:1,textarea:1,select:1,option:1,optgroup:1,button:1,table:1,tbody:1,thead:1,th:1,tr:1,td:1,caption:1,col:1,tfoot:1,colgroup:1},b.NON_INLINE_PROSE=function(a){return i.call(b.NON_CONTIGUOUS_PROSE_ELEMENTS,a.nodeName.toLowerCase())},b.PRESETS={prose:{forceContext:b.NON_INLINE_PROSE,filterElements:function(a){return!i.call(b.NON_PROSE_ELEMENTS,a.nodeName.toLowerCase())}}},b.Finder=e,e.prototype={search:function(){function b(a){for(var g=0,j=a.length;g<j;++g){var k=a[g];if("string"==typeof k){if(f.global)for(;c=f.exec(k);)h.push(i.prepMatch(c,d++,e));else(c=k.match(f))&&h.push(i.prepMatch(c,0,e));e+=k.length}else b(k)}}var c,d=0,e=0,f=this.options.find,g=this.getAggregateText(),h=[],i=this;return f="string"==typeof f?RegExp(a(f),"g"):f,b(g),h},prepMatch:function(a,b,c){if(!a[0])throw new Error("findAndReplaceDOMText cannot handle zero-length matches");return a.endIndex=c+a.index+a[0].length,a.startIndex=c+a.index,a.index=b,a},getAggregateText:function(){function a(d){if(3===d.nodeType)return[d.data];if(b&&!b(d))return[];var e=[""],f=0;if(d=d.firstChild)do{if(3!==d.nodeType){var g=a(d);c&&1===d.nodeType&&(!0===c||c(d))?(e[++f]=g,e[++f]=""):("string"==typeof g[0]&&(e[f]+=g.shift()),g.length&&(e[++f]=g,e[++f]=""))}else e[f]+=d.data}while(d=d.nextSibling);return e}var b=this.options.filterElements,c=this.options.forceContext;return a(this.node)},processMatches:function(){var a,b,c,d=this.matches,e=this.node,f=this.options.filterElements,g=[],h=e,i=d.shift(),j=0,k=0,l=0,m=[e];a:for(;;){if(3===h.nodeType&&(!b&&h.length+j>=i.endIndex?b={node:h,index:l++,text:h.data.substring(i.startIndex-j,i.endIndex-j),indexInMatch:j-i.startIndex,indexInNode:i.startIndex-j,endIndexInNode:i.endIndex-j,isEnd:!0}:a&&g.push({node:h,index:l++,text:h.data,indexInMatch:j-i.startIndex,indexInNode:0}),!a&&h.length+j>i.startIndex&&(a={node:h,index:l++,indexInMatch:0,indexInNode:i.startIndex-j,endIndexInNode:i.endIndex-j,text:h.data.substring(i.startIndex-j,i.endIndex-j)}),j+=h.data.length),c=1===h.nodeType&&f&&!f(h),a&&b){if(h=this.replaceMatch(i,a,g,b),j-=b.node.data.length-b.endIndexInNode,a=null,b=null,g=[],i=d.shift(),l=0,k++,!i)break}else if(!c&&(h.firstChild||h.nextSibling)){h.firstChild?(m.push(h),h=h.firstChild):h=h.nextSibling;continue}for(;;){if(h.nextSibling){h=h.nextSibling;break}if((h=m.pop())===e)break a}}},revert:function(){for(var a=this.reverts.length;a--;)this.reverts[a]();this.reverts=[]},prepareReplacementString:function(a,b,c){var d=this.options.portionMode;return d===g&&b.indexInMatch>0?"":(a=a.replace(/\$(\d+|&|`|')/g,function(a,b){var d;switch(b){case"&":d=c[0];break;case"`":d=c.input.substring(0,c.startIndex);break;case"'":d=c.input.substring(c.endIndex);break;default:d=c[+b]}return d}),d===g?a:b.isEnd?a.substring(b.indexInMatch):a.substring(b.indexInMatch,b.indexInMatch+b.text.length))},getPortionReplacementNode:function(a,b){var c=this.options.replace||"$&",d=this.options.wrap;if(d&&d.nodeType){var e=h.createElement("div");e.innerHTML=d.outerHTML||(new XMLSerializer).serializeToString(d),d=e.firstChild}if("function"==typeof c)return c=c(a,b),c&&c.nodeType?c:h.createTextNode(String(c));var f="string"==typeof d?h.createElement(d):d;return c=h.createTextNode(this.prepareReplacementString(c,a,b)),c.data&&f?(f.appendChild(c),f):c},replaceMatch:function(a,b,c,d){var e,f,g=b.node,i=d.node;if(g===i){var j=g;b.indexInNode>0&&(e=h.createTextNode(j.data.substring(0,b.indexInNode)),j.parentNode.insertBefore(e,j));var k=this.getPortionReplacementNode(d,a);return j.parentNode.insertBefore(k,j),d.endIndexInNode<j.length&&(f=h.createTextNode(j.data.substring(d.endIndexInNode)),j.parentNode.insertBefore(f,j)),j.parentNode.removeChild(j),this.reverts.push(function(){e===k.previousSibling&&e.parentNode.removeChild(e),f===k.nextSibling&&f.parentNode.removeChild(f),k.parentNode.replaceChild(j,k)}),k}e=h.createTextNode(g.data.substring(0,b.indexInNode)),f=h.createTextNode(i.data.substring(d.endIndexInNode));for(var l=this.getPortionReplacementNode(b,a),m=[],n=0,o=c.length;n<o;++n){var p=c[n],q=this.getPortionReplacementNode(p,a);p.node.parentNode.replaceChild(q,p.node),this.reverts.push(function(a,b){return function(){b.parentNode.replaceChild(a.node,b)}}(p,q)),m.push(q)}var r=this.getPortionReplacementNode(d,a);return g.parentNode.insertBefore(e,g),g.parentNode.insertBefore(l,g),g.parentNode.removeChild(g),i.parentNode.insertBefore(r,i),i.parentNode.insertBefore(f,i),i.parentNode.removeChild(i),this.reverts.push(function(){e.parentNode.removeChild(e),l.parentNode.replaceChild(g,l),f.parentNode.removeChild(f),r.parentNode.replaceChild(i,r)}),r}},b});
1
+ /*! retreaver v0.2.26 | 2025-08-23 */
2
+ if(function(e){var t={configure:function(e){var r={addr:e.host,http_prefix:"http",urlregex:"/\\/\\/[^\\/]*\\/(.*)/"};void 0!==e.prefix&&(r.http_prefix=e.prefix),window.Retreaver._connection=new t.Base.Request(r)}};e.Retreaver=t}(window),function(){void 0===window.Retreaver&&(window.Retreaver={});var e={};e.assert_required_keys=function(){for(var e=Array.prototype.slice.call(arguments),t=e.shift(),r=0;r<e.length;r++){var n=e[r];if(void 0===t||void 0===t[n])throw"ArgumentError: Required keys are not defined: "+e.join(", ")}return t},e.merge=function(t,r){for(var n in r)try{r[n].constructor==Object?t[n]=e.merge(t[n],r[n]):t[n]=r[n]}catch(e){t[n]=r[n]}return t},e.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},e.ieVersion=function(){return null==e._ieVersion&&(e._ieVersion=function(){for(var e=3,t=document.createElement("div"),r=t.getElementsByTagName("i");t.innerHTML="\x3c!--[if gt IE "+ ++e+"]><i></i><![endif]--\x3e",r[0];);return e>4&&e}()),6!=e._ieVersion&&7!=e._ieVersion||null==Retreaver.easyxdm_loaded&&(Retreaver.easyxdm_loaded=!1),e._ieVersion},Retreaver.Base=e}(),function(e){var t=function(e,r,n){return 1===arguments.length?t.get(e):t.set(e,r,n)};t._document=document,t._navigator=navigator,t.defaults={path:"/"},t.get=function(e){return t._cachedDocumentCookie!==t._document.cookie&&t._renewCache(),t._cache[e]},t.set=function(e,r,n){return n=t._getExtendedOptions(n),t._document.cookie=t._generateCookieString(e,r,n),t},t._getExtendedOptions=function(r){return{path:r&&r.path||t.defaults.path,domain:r&&r.domain||t.defaults.domain,secure:r&&r.secure!==e?r.secure:t.defaults.secure}},t._isValidDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e.getTime())},t._generateCookieString=function(e,t,r){return e=encodeURIComponent(e),t=(t+"").replace(/[^!#$&-+\--:<-\[\]-~]/g,encodeURIComponent),r=r||{},e=e+"="+t+(r.path?";path="+r.path:""),e+=r.domain?";domain="+r.domain:"",e+=r.secure?";secure":""},t._getCookieObjectFromString=function(r){var n={};r=r?r.split("; "):[];for(var a=0;a<r.length;a++){var i=t._getKeyValuePairFromCookieString(r[a]);n[i.key]===e&&(n[i.key]=i.value)}return n},t._getKeyValuePairFromCookieString=function(e){var t=e.indexOf("="),t=0>t?e.length:t;return{key:decodeURIComponent(e.substr(0,t)),value:decodeURIComponent(e.substr(t+1))}},t._renewCache=function(){t._cache=t._getCookieObjectFromString(t._document.cookie),t._cachedDocumentCookie=t._document.cookie},t._areEnabled=function(){return t._navigator.cookieEnabled||"1"===t.set("cookies.js",1).get("cookies.js")},t.enabled=t._areEnabled(),"function"==typeof define&&define.amd?define(function(){return t}):"undefined"!=typeof exports&&("undefined"!=typeof module&&module.exports&&(exports=module.exports=t),exports.Cookies=t),Retreaver.Base.Cookies=t}(),function(){var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};Base64.encode=function(e){var t,r,n,a,i,o,s,c="",u=0;for(e=Base64._utf8_encode(e);u<e.length;)t=e.charCodeAt(u++),r=e.charCodeAt(u++),n=e.charCodeAt(u++),a=t>>2,i=(3&t)<<4|r>>4,o=(15&r)<<2|n>>6,s=63&n,isNaN(r)?o=s=64:isNaN(n)&&(s=64),c=c+Base64._keyStr.charAt(a)+Base64._keyStr.charAt(i)+Base64._keyStr.charAt(o)+Base64._keyStr.charAt(s);return c},Base64.decode=function(e){var t,r,n,a,i,o,s,c="",u=0;for(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");u<e.length;)a=Base64._keyStr.indexOf(e.charAt(u++)),i=Base64._keyStr.indexOf(e.charAt(u++)),o=Base64._keyStr.indexOf(e.charAt(u++)),s=Base64._keyStr.indexOf(e.charAt(u++)),t=a<<2|i>>4,r=(15&i)<<4|o>>2,n=(3&o)<<6|s,c+=String.fromCharCode(t),64!=o&&(c+=String.fromCharCode(r)),64!=s&&(c+=String.fromCharCode(n));return c=Base64._utf8_decode(c)},Base64._utf8_encode=function(string){string=string.replace(eval("/\\r\\n/g"),eval("String('\\n')"));for(var utftext="",n=0;n<string.length;n++){var c=string.charCodeAt(n);c<128?utftext+=String.fromCharCode(c):c>127&&c<2048?(utftext+=String.fromCharCode(c>>6|192),utftext+=String.fromCharCode(63&c|128)):(utftext+=String.fromCharCode(c>>12|224),utftext+=String.fromCharCode(c>>6&63|128),utftext+=String.fromCharCode(63&c|128))}return utftext},Base64._utf8_decode=function(e){for(var t="",r=0,n=0,a=0,i=0;r<e.length;)n=e.charCodeAt(r),n<128?(t+=String.fromCharCode(n),r++):n>191&&n<224?(a=e.charCodeAt(r+1),t+=String.fromCharCode((31&n)<<6|63&a),r+=2):(a=e.charCodeAt(r+1),i=e.charCodeAt(r+2),t+=String.fromCharCode((15&n)<<12|(63&a)<<6|63&i),r+=3);return t},Retreaver.Base.Base64=Base64}(),function(){var e=Retreaver.Base,t=function(t){var r=this;r.get=function(){var e={};if(void 0===arguments[0])e=Retreaver.Base.Data._store[t.type][t.primary_key];else if(1===arguments.length)e=Retreaver.Base.Data._store[t.type][t.primary_key][arguments[0]];else for(var r=0;r<arguments.length;r++){var n=arguments[r];e[n]=Retreaver.Base.Data._store[t.type][t.primary_key][n]}return e},r.set=function(e,r){return Retreaver.Base.Data._store[t.type][t.primary_key][e]=r,r},r.merge=function(e){for(var r in e)Retreaver.Base.Data._store[t.type][t.primary_key][r]=e[r];return e},function(){e.assert_required_keys(t,"type","primary_key"),void 0===Retreaver.Base.Data._store[t.type]&&(Retreaver.Base.Data._store[t.type]={}),void 0===Retreaver.Base.Data._store[t.type][t.primary_key]&&(Retreaver.Base.Data._store[t.type][t.primary_key]={})}()};t._store={},Retreaver.Base.Data=t}(),function(){var e=Retreaver.Base,t=Retreaver.Base.Data,r=function(){this.api_host_uri="/api/v1/",this.type="model",this.primary_key=function(e){return r.primary_key(this.type,e)},this.store=function(e){if(void 0!==e){var t=this.primary_key();if(void 0===e[t])throw"ArgumentError: Expected to receive primary_key "+t;void 0===this._store&&(this._store=new Retreaver.Base.Data({type:this.type,primary_key:e[t]})),this._store.merge(e),r.update_visitor_id(e)}return this._store},this.get_data=function(e,t){return this.connection().getJSON(this.api_host_uri+e,null,[r.update,t],this)},this.post_data=function(e,t,n){return this.connection().postJSON(this.api_host_uri+e,t,[r.update,n],this)},this.set=function(){return"function"==typeof this["set_"+arguments[0]]&&(arguments[1]=this["set_"+arguments[0]].apply(this,[arguments[1]])),this._store.set.apply(this,arguments)},this.get=function(){return this._store.get.apply(this,arguments)},this.connection=function(){return Retreaver.Base.Request.connection()}};r.inflections={number:"numbers",campaign:"campaigns"},r.update=function(n){for(var a in n){var i=a,o=n[a];if(void 0!==r.inflections[a]&&(i=r.inflections[a]),void 0!==t._store[i])if(e.isArray(o))for(var s=0;s<o.length;s++)r.update_record(i,o[s]);else r.update_record(i,o[s])}return n},r.update_record=function(e,t){if(r.update_visitor_id(t),void 0!==t.id){var n=r.primary_key(e);for(var a in t)Retreaver.Base.Data._store[e][t[n]][a]=t[a];return!0}return!1},r.update_visitor_id=function(e){void 0!==e&&void 0!==e.visitor_id&&Retreaver.Base.Cookies.set("CallPixels-vid",e.visitor_id)},r.primary_key=function(e,t){return void 0===r.primary_keys&&(r.primary_keys={}),void 0===r.primary_keys[e]&&(r.primary_keys[e]="id"),void 0!==t&&(r.primary_keys[e]=t),r.primary_keys[e]},Retreaver.Base.Model=r}(),function(){var Base=window.Retreaver.Base,Cookies=window.Retreaver.Base.Cookies,Request=function(options){function initialize(e){config=Base.assert_required_keys(e,"http_prefix","addr","urlregex")}function with_ie_scripts(e){Retreaver.easyxdm_loaded?e():self.loadScript(http_prefix+"://cdn.jsdelivr.net/easyxdm/2.4.17.1/easyXDM.min.js",function(){self.loadScript(http_prefix+"://cdn.jsdelivr.net/easyxdm/2.4.17.1/json2.js",function(){Retreaver.easyxdm_loaded=!0,e()})})}var self=this,config={};self.getJSON=function(e,t,r,n){"function"==typeof r&&(r=[r]),void 0===n&&(n=self);var a=function(){self.apiRequest(e,function(e){var t=JSON.parse(e);for(var a in r)"function"==typeof r[a]&&r[a].apply(n,[t])},t)};6==Base.ieVersion()||7==Base.ieVersion()?with_ie_scripts(a):a()},self.postJSON=function(){return self.getJSON.apply(this,arguments)},self.apiRequest=function(request_uri,callbackFunctions,payload){function ignored(){}function runCallbacks(e){for(var t in callbackFunctions)"function"==typeof callbackFunctions[t]&&callbackFunctions[t](e)}function forwardResponse(){runCallbacks(xdr.responseText)}function sendXdm(){var remote=http_prefix+"://"+addr+"/ie_provider",swf=http_prefix+"://"+addr+"/easyxdm.swf",rpc=eval('new window.easyXDM.Rpc({ remote: "'+remote+'", swf: "'+swf+'"},{remote: {request: {}}});');rpc.request({url:"/"+request_url.match(urlregex)[1],method:"POST",data:payload},function(e){runCallbacks(e.data)})}var http_prefix=config.http_prefix,addr=config.addr,urlregex=eval(config.urlregex),request_url=http_prefix+"://"+addr+request_uri;if(payload&&void 0!==Cookies.get("CallPixels-vid")&&"null"!==Cookies.get("CallPixels-vid")&&(payload.visitor_id=Cookies.get("CallPixels-vid")),"function"==typeof callbackFunctions&&(callbackFunctions=[callbackFunctions]),window.XDomainRequest){var xdr=new XDomainRequest;xdr.onload=forwardResponse,xdr.onprogress=ignored,xdr.onerror=ignored,xdr.ontimeout=ignored,xdr.timeout=3e4,payload?(xdr.open("post",request_url),xdr.send(self.buildPost(payload))):(xdr.open("get",request_url),xdr.send())}else if(6==Base.ieVersion()||7==Base.ieVersion())with_ie_scripts(sendXdm);else{var request=new XMLHttpRequest;request.onload=function(){runCallbacks(this.responseText)},payload?(request.open("POST",request_url),request.setRequestHeader("Content-Type","application/json"),request.send(JSON.stringify(payload))):(request.open("GET",request_url),request.send())}},self.buildPost=function(e){var t="";for(var r in e)t+=r+"="+e[r]+"&";return t},self.loadScript=function(e,t){var r=document.getElementsByTagName("script")[0],n=document.createElement("script");n.type="text/javascript",n.async=!1,n.src=e;var a=function(e,t){"loaded"==e.readyState||"complete"==e.readyState?t():setTimeout(function(){a(e,t)},100)};"function"==typeof t&&(void 0!==n.addEventListener?n.addEventListener("load",t,!1):n.onreadystatechange=function(){n.onreadystatechange=null,a(n,t)}),r.parentNode.insertBefore(n,r)},initialize(options),self.config=config};Request.connection=function(){if(void 0===window.Retreaver._connection){var e=window.location.protocol.replace(":","");window.Retreaver._connection=new Retreaver.Base.Request({addr:"api.rtvrapi.com",http_prefix:e,urlregex:"/\\/\\/[^\\/]*\\/(.*)/"})}return window.Retreaver._connection},Retreaver.Base.Request=Request}(),function(){function tags_to_script_tags(e){var t="";for(var r in e){t=t+"&"+r+"="+e[r]}return t}var Base=Retreaver.Base,Cookies=Retreaver.Base.Cookies,Base64=Retreaver.Base.Base64,Request=Retreaver.Base.Request,RequestNumber=function(options){function initialize(e){config=Base.assert_required_keys(e,"campaign_key")}function getParts(e){for(var t={},r=0;r<e.length;r++){var n=getUrlParts(e[r]);for(var a in n)t[a]=n[a]}return t}function getUrlParts(url){var objURL=new Object;try{url=url.match(eval("/\\?(.*)/"))[0]}catch(e){return objURL}return url.replace(new RegExp("([^?=&]+)(=([^&]*))?","g"),function(e,t,r,n){objURL[t.toLowerCase()]=n}),objURL}function getGACookies(){var e=["__utma","__utmb","__utmc","__utmz","__utmv"],t=new Object;for(var r in e){var n=extractCookie(e[r]);if(!(n||r>0))break;n&&(t[e[r]]=n)}return t}function extractCookie(e){var t=new RegExp(e+"=([^;]*)","g");try{return t.exec(document.cookie)[1]}catch(e){return!1}}function findOne(e,t){for(var r in t)for(var n in e)if(n==t[r])return e[n];return!1}var self=this,config={},resource_url="/api/v1/numbers?";self.perform=function(callback){function sendGARequest(e,t){request_ran||(request_ran=!0,body.ga=Base64.encode(e),body.c=Base64.encode(JSON.stringify(t)),Request.connection().getJSON(request_url,body,callback))}function runRequest(){request_ran||(request_ran=!0,Request.connection().getJSON(request_url,body,callback))}if("function"!=typeof callback)throw"ArgumentError: Expected to receive a callback function";var request_url=resource_url+"&campaign_key="+config.campaign_key;config.default_number_replacement&&(request_url=request_url+"&default_number="+config.default_number_replacement),config.message_replacement&&(request_url=request_url+"&message="+config.message_replacement);var body=new Object,uri=document.location.href;body.u=Base64.encode(uri),body.st=Base64.encode(tags_to_script_tags(config.number_matching_tags));var ou=Cookies.get("CallPixels-ou");getParts([document.location.href]).cpreset||!ou?Cookies.set("CallPixels-ou",body.u):body.ou=ou;var ga_acct="FAILED",request_ran=!1;window.setTimeout(runRequest,1e3);try{_gaq.push(function(){ga_acct=eval("_gat._getTrackerByName()._getAccount()"),sendGARequest(ga_acct,getGACookies())})}catch(e){try{ga(function(tracker){if(tracker&&tracker.get)try{var clientId=tracker.get("clientId"),allTrackers=eval("ga.getAll()");ga_acct=allTrackers[0].get("trackingId");var ga_cookies={};ga_cookies.__utma=clientId,ga_cookies.mp="yes",sendGARequest(ga_acct,ga_cookies)}catch(e){sendGARequest("",{})}else sendGARequest("",{})})}catch(e){runRequest()}}},initialize(options)};Retreaver.Base.RequestNumber=RequestNumber}(),window.Retreaver.Cache={},function(){function e(t){if(void 0!==Retreaver.Base.Data._store){var r=Retreaver.Base.Data._store.numbers;if(void 0!==r){var n={};for(var a in r){var i=r[a];"true"===i.is_active&&(void 0===n[i.campaign_key]&&(n[i.campaign_key]=[],n[i.campaign_key].ids=[],n[i.campaign_key].hashes=[]),n[i.campaign_key].ids.push(i.id),n[i.campaign_key].hashes.push(i.id_checksum))}for(var o in n){var s={ids:n[o].ids,hashes:n[o].hashes};Retreaver.Base.Request.connection().postJSON("/api/v1/numbers/ping",s,[Retreaver.Base.Model.update,t],this)}}}setTimeout(e,15e3)}var t=Retreaver.Base;Retreaver.Number=function(e){function r(e){return"string"==typeof e&&(e=Retreaver.Number.extract_tags_from_string(e)),{tag_values:e,ids:[n("id")],campaign_key:n("campaign_key")}}function n(e){return i.get(e)}function a(){if(!1===i.get("is_per_visitor"))throw"Error: Tried to add tags to non per-visitor number."}var i=this;i.type="numbers",i.add_tags=function(e,t){a(),i.post_data("numbers/tag",r(e),t)},i.replace_tags=function(e,t){a(),i.post_data("numbers/replace_tags",r(e),t)},i.remove_tags=function(e,t){a(),i.post_data("numbers/untag",r(e),t)},i.remove_tags_by_keys=function(e,t){a(),"string"==typeof e&&(e=e.split(","));var r={tag_keys:e,ids:[n("id")],campaign_key:n("campaign_key")};i.post_data("numbers/untag/keys",r,t)},i.clear_tags=function(e){a();var t={ids:[n("id")],campaign_key:n("campaign_key"),all:"true"};i.post_data("numbers/untag",t,e)},i.release=function(){i.set("is_active","false")},i.initiate_call=function(e,r,n){void 0===r&&(r={}),r.dial=e,r=t.merge(i.get("id","campaign_key"),r),i.post_data("numbers/initiate_call",r,n)},function(e){i.store(e),i.set("is_active","true")}(e)},Retreaver.Number.extract_tags_from_string=function(e){for(var t={},e=e.split(","),r=0;r<e.length;r++){var n=e[r].split(":");t[n[0]]=n[1]}return t},Retreaver.Number.prototype=new Retreaver.Base.Model,e()}(),function(){var e=Retreaver.Base.RequestNumber,t=function(t){function r(e){for(var t=0;t<e.length;t++){var r=e[t];Retreaver.Vendor.findAndReplaceDOMText(document.getElementsByTagName("body")[0],{find:r.find,replace:r.replace_with});for(var n=document.getElementsByTagName("a"),a=0;a<n.length;a++){var i=n[a],o=i.getAttribute("href");if(null!==o){var s=o.match(/^(tel:|clk[a-z]\/tel\/)(.*)/);s&&s[2]===r.find&&i.setAttribute("href",s[1]+r.replace_with)}}}}function n(e,t){const r=e.get("integrations");if("object"==typeof r){const n=r[t];if(void 0!==n)return n}}function a(e){if(googleAnalyticsConfig=n(e,"google_analytics"),"undefined"!=typeof googleAnalyticsConfig){new Promise(function(e){const t=setInterval(function(){const r=/_ga_[^=]+=([^;]*)/,n=document.cookie.match(r),a=n&&n[1],i=/_ga=([^;]*)/,o=document.cookie.match(i),s=o&&o[1];a&&s&&(e({gaSessionId:a,gaClientId:s}),clearInterval(t))},googleAnalyticsConfig.checkIntervalMs)}).then(function(t){e.replace_tags({ga_session_id:t.gaSessionId,ga_client_id:t.gaClientId})})}}function i(e){const t=n(e,"truecall.com");if(void 0!==t){document.getElementById("__tc_script")&&window.TrueCall||function(){const e=document.createElement("script");e.type="text/javascript",e.async=!0,e.defer=!0,e.dataset.campaign_uuid=t.tcCampaignUuid,e.dataset.use_set_did="1",e.id="__tc_script",e.src=t.scriptSrc,(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]).appendChild(e)}();const r=setInterval(function(){window.TrueCall&&window.TrueCall.setDID(e.get("number")).then(function(){return clearInterval(r),window.TrueCall.getIdAsync()}).then(function(r){const n={};n[t.tagName]=r,e.replace_tags(n)})},t.checkIntervalMs)}}function o(e){function t(e){const t="; "+document.cookie,r=t.split("; "+e+"=");if(2==r.length)return r.pop().split(";").shift()}const r=n(e,"red_track");if(void 0!==r){new Promise(function(e){const n=setInterval(function(){const r=t("rtkclickid-store");r&&(e(r),clearInterval(n))},r.checkIntervalMs)}).then(function(t){const n={};n[r.tagName]=t,e.replace_tags(n)})}}function s(e){const t=n(e,"click_flare");if(void 0!==t){const r=function(){if(window.clickflare&&window.clickflare.data&&window.clickflare.data.event_tokens)return window.clickflare.data.event_tokens.cv_click_id||window.clickflare.data.event_tokens.cf_click_id};new Promise(function(e){const n=setInterval(function(){const t=r();t&&(e(t),clearInterval(n))},t.checkIntervalMs)}).then(function(r){const n={};n[t.tagName]=r,e.replace_tags(n)})}}var c=this;c.type="campaigns",c.primary_key("campaign_key"),c.numbers=[],c.request_number=function(t,n,u){"function"==typeof t&&(u=n,n=t,t={}),void 0===n&&(n=function(){}),void 0===t&&(t={}),c.set("number_matching_tags",t),new e(c.get("campaign_key","number_matching_tags")).perform(function(e){if(void 0!==e&&void 0!==e.number&&""!==e.number){var t=new Retreaver.Number(e.number);try{i(t)}catch(e){console.error("Could not integrate with truecall.com, ",e)}try{o(t)}catch(e){console.error("Could not integrate with Red Track, ",e)}try{a(t)}catch(e){console.error("Could not integrate with google analytics, ",e)}try{s(t)}catch(e){console.error("Could not integrate with click flare, ",e)}void 0!==e.number.replacement_numbers&&r(e.number.replacement_numbers),n.apply(c,[t])}else"function"==typeof u&&u.apply(c,[e])})},c.auto_replace_numbers=function(e,t,r){void 0===t&&(t=function(){}),void 0===r&&(r=function(){}),c.request_number(e,t,r)},c.numbers=function(){var e=[];if(void 0!==Retreaver.Base.Data._store){var t=Retreaver.Base.Data._store.numbers;if(void 0!==t)for(var r in t){var n=t[r];c.get("campaign_key")==n.campaign_key&&e.push(new Retreaver.Number(n))}}return e},c.set_number_matching_tags=function(e){if("string"==typeof e&&(e=Retreaver.Number.extract_tags_from_string(e)),!e||"object"!=typeof e||e instanceof Array)throw"ArgumentError: Expected number_matching_tags to be an object. eg: {tag: 'value'}";return e},function(e){c.store(e)}(t)};t.prototype=new Retreaver.Base.Model,Retreaver.Campaign=t}(),function(e){e.Callpixels=window.Retreaver}(window),void 0===Retreaver)var Retreaver={};void 0===Retreaver.Vendor&&(Retreaver.Vendor={}),function(e,t){e.findAndReplaceDOMText=function(){function e(e){return String(e).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function t(){return r.apply(null,arguments)||n.apply(null,arguments)}function r(e,r,a,i,o){if(r&&!r.nodeType&&arguments.length<=2)return!1;var s="function"==typeof a;s&&(a=function(e){return function(t,r){return e(t.text,r.startIndex)}}(a));var c=n(r,{find:e,wrap:s?null:a,replace:s?a:"$"+(i||"&"),prepMatch:function(e,t){if(!e[0])throw"findAndReplaceDOMText cannot handle zero-length matches";if(i>0){var r=e[i];e.index+=e[0].indexOf(r),e[0]=r}return e.endIndex=e.index+e[0].length,e.startIndex=e.index,e.index=t,e},filterElements:o});return t.revert=function(){return c.revert()},!0}function n(e,t){return new a(e,t)}function a(e,r){var n=r.preset&&t.PRESETS[r.preset];if(r.portionMode=r.portionMode||i,n)for(var a in n)s.call(n,a)&&!s.call(r,a)&&(r[a]=n[a]);this.node=e,this.options=r,this.prepMatch=r.prepMatch||this.prepMatch,this.reverts=[],this.matches=this.search(),this.matches.length&&this.processMatches()}var i="retain",o=document,s={}.hasOwnProperty;return t.NON_PROSE_ELEMENTS={br:1,hr:1,script:1,style:1,img:1,video:1,audio:1,canvas:1,svg:1,map:1,object:1,input:1,textarea:1,select:1,option:1,optgroup:1,button:1},t.NON_CONTIGUOUS_PROSE_ELEMENTS={address:1,article:1,aside:1,blockquote:1,dd:1,div:1,dl:1,fieldset:1,figcaption:1,figure:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,hr:1,main:1,nav:1,noscript:1,ol:1,output:1,p:1,pre:1,section:1,ul:1,br:1,li:1,summary:1,dt:1,details:1,rp:1,rt:1,rtc:1,script:1,style:1,img:1,video:1,audio:1,canvas:1,svg:1,map:1,object:1,input:1,textarea:1,select:1,option:1,optgroup:1,button:1,table:1,tbody:1,thead:1,th:1,tr:1,td:1,caption:1,col:1,tfoot:1,colgroup:1},t.NON_INLINE_PROSE=function(e){return s.call(t.NON_CONTIGUOUS_PROSE_ELEMENTS,e.nodeName.toLowerCase())},t.PRESETS={prose:{forceContext:t.NON_INLINE_PROSE,filterElements:function(e){return!s.call(t.NON_PROSE_ELEMENTS,e.nodeName.toLowerCase())}}},t.Finder=a,a.prototype={search:function(){function t(e){for(var o=0,u=e.length;o<u;++o){var d=e[o];if("string"==typeof d){if(i.global)for(;r=i.exec(d);)s.push(c.prepMatch(r,n++,a));else(r=d.match(i))&&s.push(c.prepMatch(r,0,a));a+=d.length}else t(d)}}var r,n=0,a=0,i=this.options.find,o=this.getAggregateText(),s=[],c=this;return i="string"==typeof i?RegExp(e(i),"g"):i,t(o),s},prepMatch:function(e,t,r){if(!e[0])throw new Error("findAndReplaceDOMText cannot handle zero-length matches");return e.endIndex=r+e.index+e[0].length,e.startIndex=r+e.index,e.index=t,e},getAggregateText:function(){function e(n){if(3===n.nodeType)return[n.data];if(t&&!t(n))return[];var a=[""],i=0;if(n=n.firstChild)do{if(3!==n.nodeType){var o=e(n);r&&1===n.nodeType&&(!0===r||r(n))?(a[++i]=o,a[++i]=""):("string"==typeof o[0]&&(a[i]+=o.shift()),o.length&&(a[++i]=o,a[++i]=""))}else a[i]+=n.data}while(n=n.nextSibling);return a}var t=this.options.filterElements,r=this.options.forceContext;return e(this.node)},processMatches:function(){var e,t,r,n=this.matches,a=this.node,i=this.options.filterElements,o=[],s=a,c=n.shift(),u=0,d=0,l=0,f=[a];e:for(;;){if(3===s.nodeType&&(!t&&s.length+u>=c.endIndex?t={node:s,index:l++,text:s.data.substring(c.startIndex-u,c.endIndex-u),indexInMatch:u-c.startIndex,indexInNode:c.startIndex-u,endIndexInNode:c.endIndex-u,isEnd:!0}:e&&o.push({node:s,index:l++,text:s.data,indexInMatch:u-c.startIndex,indexInNode:0}),!e&&s.length+u>c.startIndex&&(e={node:s,index:l++,indexInMatch:0,indexInNode:c.startIndex-u,endIndexInNode:c.endIndex-u,text:s.data.substring(c.startIndex-u,c.endIndex-u)}),u+=s.data.length),r=1===s.nodeType&&i&&!i(s),e&&t){if(s=this.replaceMatch(c,e,o,t),u-=t.node.data.length-t.endIndexInNode,e=null,t=null,o=[],c=n.shift(),l=0,d++,!c)break}else if(!r&&(s.firstChild||s.nextSibling)){s.firstChild?(f.push(s),s=s.firstChild):s=s.nextSibling;continue}for(;;){if(s.nextSibling){s=s.nextSibling;break}if((s=f.pop())===a)break e}}},revert:function(){for(var e=this.reverts.length;e--;)this.reverts[e]();this.reverts=[]},prepareReplacementString:function(e,t,r){var n=this.options.portionMode;return"first"===n&&t.indexInMatch>0?"":(e=e.replace(/\$(\d+|&|`|')/g,function(e,t){var n;switch(t){case"&":n=r[0];break;case"`":n=r.input.substring(0,r.startIndex);break;case"'":n=r.input.substring(r.endIndex);break;default:n=r[+t]}return n}),"first"===n?e:t.isEnd?e.substring(t.indexInMatch):e.substring(t.indexInMatch,t.indexInMatch+t.text.length))},getPortionReplacementNode:function(e,t){var r=this.options.replace||"$&",n=this.options.wrap;if(n&&n.nodeType){var a=o.createElement("div");a.innerHTML=n.outerHTML||(new XMLSerializer).serializeToString(n),n=a.firstChild}if("function"==typeof r)return r=r(e,t),r&&r.nodeType?r:o.createTextNode(String(r));var i="string"==typeof n?o.createElement(n):n;return r=o.createTextNode(this.prepareReplacementString(r,e,t)),r.data&&i?(i.appendChild(r),i):r},replaceMatch:function(e,t,r,n){var a,i,s=t.node,c=n.node;if(s===c){var u=s;t.indexInNode>0&&(a=o.createTextNode(u.data.substring(0,t.indexInNode)),u.parentNode.insertBefore(a,u));var d=this.getPortionReplacementNode(n,e);return u.parentNode.insertBefore(d,u),n.endIndexInNode<u.length&&(i=o.createTextNode(u.data.substring(n.endIndexInNode)),u.parentNode.insertBefore(i,u)),u.parentNode.removeChild(u),this.reverts.push(function(){a===d.previousSibling&&a.parentNode.removeChild(a),i===d.nextSibling&&i.parentNode.removeChild(i),d.parentNode.replaceChild(u,d)}),d}a=o.createTextNode(s.data.substring(0,t.indexInNode)),i=o.createTextNode(c.data.substring(n.endIndexInNode));for(var l=this.getPortionReplacementNode(t,e),f=[],p=0,g=r.length;p<g;++p){var _=r[p],v=this.getPortionReplacementNode(_,e);_.node.parentNode.replaceChild(v,_.node),this.reverts.push(function(e,t){return function(){t.parentNode.replaceChild(e.node,t)}}(_,v)),f.push(v)}var h=this.getPortionReplacementNode(n,e);return s.parentNode.insertBefore(a,s),s.parentNode.insertBefore(l,s),s.parentNode.removeChild(s),c.parentNode.insertBefore(h,c),c.parentNode.insertBefore(i,c),c.parentNode.removeChild(c),this.reverts.push(function(){a.parentNode.removeChild(a),l.parentNode.replaceChild(s,l),i.parentNode.removeChild(i),h.parentNode.replaceChild(c,h)}),h}},t}()}(Retreaver.Vendor);