/** * Copyright (c) 2017-present, Facebook, Inc. All rights reserved. * * You are hereby granted a non-exclusive, worldwide, royalty-free license to use, * copy, modify, and distribute this software in source code or binary form for use * in connection with the web services and APIs provided by Facebook. * * As with any software that integrates with the Facebook platform, your use of * this software is subject to the Facebook Platform Policy * [http://developers.facebook.com/policy/]. This copyright notice shall be * included in all copies or substantial portions of the software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ fbq.version="2.8.1"; fbq.pendingConfigs=["global_config"]; (function(a,b,c,d){var e={exports:{}},f=e.exports;(function(){var g=a.fbq;g.execStart=a.performance&&a.performance.now&&a.performance.now();if(!function(){var o=a.postMessage||function(){};if(!g){o({action:"FB_LOG",logType:"Facebook Pixel Error",logMessage:"Pixel code is not installed correctly on this page"},"*");if("error"in console)console.error("Facebook Pixel Error: Pixel code is not installed correctly on this page");return false}return true}())return;"use strict";if(!g.__fbeventsModules){g.__fbeventsModules={};g.__fbeventsResolvedModules={};g.getFbeventsModules=function(o){if(!g.__fbeventsResolvedModules[o])g.__fbeventsResolvedModules[o]=g.__fbeventsModules[o]();return g.__fbeventsResolvedModules[o]};g.fbIsModuleLoaded=function(o){return!!g.__fbeventsModules[o]};g.ensureModuleRegistered=function(o,e){if(!g.fbIsModuleLoaded(o))g.__fbeventsModules[o]=e}}g.ensureModuleRegistered("SignalsFBEventsPlugin",function(){return function(a,b,c,d){var e={exports:{}},f=e.exports;(function(){"use strict";function h(n){this.plugin=n;this.__fbEventsPlugin=1;return this}e.exports=h})();return e.exports}(a,b,c,d)});g.ensureModuleRegistered("undefined",function(){return undefined});"use strict";var h=g.getFbeventsModules("SignalsFBEventsPlugin"),i={AUTO_CONFIG_OPT_OUT:1<<0,AUTO_CONFIG:1<<1,CONFIG_LOADING:1<<2,SUPPORTS_DEFINE_PROPERTY:1<<3,SUPPORTS_SEND_BEACON:1<<4,HAS_INVALIDATED_PII:1<<5},j=false;function k(){try{Object.defineProperty({},"test",{})}catch(o){return false}return true}function l(){return!!(a.navigator&&a.navigator.sendBeacon)}function m(o,p){return o?p:0}var n=new h(function(g,o){if(j)return;var p={};g.on("pii_invalidated",function(q){if(q!=null)p[typeof q==="string"?q:q.id]=true});g.on("getCustomParameters",function(q){if(q!=null){var r=o.optIns,s=m(r.isOptedOut(q.id,"AutomaticSetup"),i.AUTO_CONFIG_OPT_OUT),t=m(r.isOptedIn(q.id,"AutomaticSetup"),i.AUTO_CONFIG),u=m(g.disableConfigLoading!==true,i.CONFIG_LOADING),v=m(k(),i.SUPPORTS_DEFINE_PROPERTY),w=m(l(),i.SUPPORTS_SEND_BEACON),x=m(q!=null&&p[q.id],i.HAS_INVALIDATED_PII),y=s|t|u|v|w|x;return{o:y}}return{}});j=true});n.OPTIONS=i;e.exports=n;if(g.registerPlugin)g.registerPlugin("fbevents.plugins.opttracking",e.exports);g.ensureModuleRegistered("fbevents.plugins.opttracking",function(){return e.exports})})();return e.exports})(window,document,location,history); (function(a,b,c,d){var e={exports:{}},f=e.exports;(function(){var g=a.fbq;g.execStart=a.performance&&a.performance.now&&a.performance.now();if(!function(){var A=a.postMessage||function(){};if(!g){A({action:"FB_LOG",logType:"Facebook Pixel Error",logMessage:"Pixel code is not installed correctly on this page"},"*");if("error"in console)console.error("Facebook Pixel Error: Pixel code is not installed correctly on this page");return false}return true}())return;"use strict";var aa=function(){function A(B,C){var D=[],E=true,F=false,G=undefined;try{for(var H=B[typeof Symbol==="function"?Symbol.iterator:"@@iterator"](),I;!(E=(I=H.next()).done);E=true){D.push(I.value);if(C&&D.length===C)break}}catch(J){F=true;G=J}finally{try{if(!E&&H["return"])H["return"]()}finally{if(F)throw G}}return D}return function(B,C){if(Array.isArray(B))return B;else if((typeof Symbol==="function"?Symbol.iterator:"@@iterator")in Object(B))return A(B,C);else throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),ba=typeof Symbol==="function"&&typeof (typeof Symbol==="function"?Symbol.iterator:"@@iterator")==="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol==="function"&&A.constructor===Symbol&&A!==(typeof Symbol==="function"?Symbol.prototype:"@@prototype")?"symbol":typeof A};function ca(A){if(Array.isArray(A)){for(var B=0,C=Array(A.length);B>>0;if(typeof V!=="function")throw new TypeError(V+" is not a function");W=new Array(Z);X=0;while(X>>0,X=arguments.length>=2?arguments[1]:void 0;for(var Y=0;Y>>0;if(typeof U!=="function")throw new TypeError();var X=[],Y=arguments.length>=2?arguments[1]:void 0;for(var Z=0;Z':"iframe",$=b.createElement(Z);$.src="javascript:false";$.id=W;$.name=W;X.appendChild($);M($,"load",function(){U.each(function(W,Ua){var Va=b.createElement("input");Va.name=W;Va.value=Ua;X.appendChild(Va)});M($,"load",function(){if(X.parentNode)X.parentNode.removeChild(X)});X.submit()});b.body.appendChild(X);return true}function Sa(U,V){if(a.navigator&&a.navigator.sendBeacon){a.navigator.sendBeacon(V,U.toFormData());return true}return false}var Ta={injectMethod:N,isArray:ka,isEmptyObject:la,isNumber:ma,keys:p,listenOnce:M,logError:q,logErrorOnce:r,logWarning:L,makeSafe:na,map:S,sendGET:Qa,sendPOST:Ra,sendBeacon:Sa,FBSet:o,each:function n(U,V){S.call(this,U,V)},some:function U(V,W){return T.call(V,W)},filter:function U(V,W){return Pa.call(V,W)}};e.exports=Ta})();return e.exports}(a,b,c,d)});g.ensureModuleRegistered("SignalsEvents",function(){return function(a,b,c,d){var e={exports:{}},f=e.exports;(function(){"use strict";var A=g.getFbeventsModules("SignalsFBEventsUtils"),q=A.logError,p=A.keys,B=0;function j(){this._listeners={}}j.prototype.on=function(D,E){var F=this,G=B++;if(!this._listeners[D])this._listeners[D]={};this._listeners[D][G.toString()]=E;return function(){F._unsubscribe(D,G.toString())}};j.prototype.once=function(D,E){var F=this,G=arguments,H=this.on(D,function(){H();return E.apply(F,G)});return H};j.prototype.trigger=function(D){var E=this;for(var F=arguments.length,G=Array(F>1?F-1:0),H=1;H2&&arguments[2]!==undefined?arguments[2]:false;n(this._getOpts(G),function(J){var K=I==true&&H.isOptedOut(F,G);if(!K)H._setOpt(F,J,true)});return this};E.prototype.optOut=function(F,G){var H=this;n(this._getOpts(G),function(I){return H._setOpt(F,I,false)});return this};E.prototype.isOptedIn=function(F,G){return this._opts[G]&&this._opts[G][F]===true};E.prototype.isOptedOut=function(F,G){return this._opts[G]&&this._opts[G][F]===false};E.prototype.listPixelIds=function(F){var G=this;return this._opts[F]?B(p(this._opts[F]),function(H){return G._opts[F][H]}):[]};e.exports=E})();return e.exports}(a,b,c,d)});g.ensureModuleRegistered("SignalsFBEventsQE",function(){return function(a,b,c,d){var e={exports:{}},f=e.exports;(function(){"use strict";var A=function A(){return Math.random()};function B(D){var B=A();for(var E=0;E1)throw new Error("passRate should be between 0 and 1 in "+F.name);if(B>=I&&B1){E=I[0];F=G[H]}}return{baseURL:E,scriptElement:F}}var C=null;function D(){if(!C)C=B();return C}e.exports={get:D}})();return e.exports}(a,b,c,d)});g.ensureModuleRegistered("SignalsFBEventsFireLock",function(){return function(a,b,c,d){var e={exports:{}},f=e.exports;(function(){"use strict";var A=g.getFbeventsModules("SignalsFBEventsUtils"),n=A.each,p=A.keys;function B(){this._locks={};this._callbacks=[]}B.prototype={lock:function C(D){this._locks[D]=true},release:function C(D){if(Object.prototype.hasOwnProperty.call(this._locks,D)){delete this._locks[D];if(p(this._locks).length===0)n(this._callbacks,function(E){return E(D)})}},onUnlocked:function C(D){this._callbacks.push(D)},isLocked:function C(){return p(this._locks).length>0}};B.global=new B();B.global.lockPlugin=function(C){this.lock("plugin:"+C)};B.global.releasePlugin=function(C){this.release("plugin:"+C)};B.global.lockConfig=function(C){this.lock("config:"+C)};B.global.releaseConfig=function(C){this.release("config:"+C)};e.exports=B})();return e.exports}(a,b,c,d)});g.ensureModuleRegistered("SignalsFBEventsConstants",function(){return function(a,b,c,d){var e={exports:{}},f=e.exports;(function(){"use strict";e.exports={ERRORS:{PREFIX:function A(B,C){if(B!=null)return"[ID:"+(typeof B==="string"?B:B.id)+"] "+C;else return C},PII_INVALID:function A(B,C){return"An invalid "+B+" was specified for '"+C+"'. This data will not be sent with any events for this Pixel."}}}})();return e.exports}(a,b,c,d)});g.ensureModuleRegistered("SignalsFBEventsFBQ",function(){return function(a,b,c,d){var e={exports:{}},f=e.exports;(function(){"use strict";var A=g.getFbeventsModules("SignalsFBEventsOptIn"),B=g.getFbeventsModules("SignalsFBEventsQE"),h=g.getFbeventsModules("SignalsParamList"),i=g.getFbeventsModules("SignalsPixelEndpoint"),ea=g.getFbeventsModules("SignalsFBEventsPluginPath"),k=g.getFbeventsModules("SignalsFBEventsUtils"),l=g.getFbeventsModules("SignalsEventValidation"),fa=g.getFbeventsModules("SignalsFBEventsFireLock"),ga=g.getFbeventsModules("SignalsFBEventsConstants"),ha=ga.ERRORS,n=k.each,p=k.keys,q=k.logError,r=k.logErrorOnce,C=k.map,D=k.some,E={Dwell:true,InferredEvents:true,Microdata:true,FPCookie:true,Sessions:true,TimeSpent:true,Interaction:true},F=["InferredEvents","Microdata"],G={AutomaticSetup:F},H={Dwell:["dwell"],FPCookie:["fpcookie"],InferredEvents:["inferredevents","identity"],Microdata:["microdata","identity"],Sessions:["sessions"],TimeSpent:["timespent"],Interaction:["interaction","timespent"]};function I(M){return!!(E[M]||G[M])}function J(M,N){var O=ea.get();if(typeof O.baseURL!="string"||!(O.scriptElement&&O.scriptElement.parentNode))throw new Error("fbevents script element not found.");var P=O.baseURL+"/signals/config/"+M+"?v="+N,Q=b.createElement("script");Q.src=P;Q.async=true;if(O.scriptElement&&O.scriptElement.parentNode)O.scriptElement.parentNode.insertBefore(Q,O.scriptElement)}var K={VALID_FEATURES:E,optIn:function M(N,O){var P=this,Q=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;if(typeof O!=="string"||!I(O))throw new Error('Invalid Argument: "'+O+'" is not a valid opt-in feature');if(I(O)){this.optIns.optIn(N,O,Q);n([O].concat(ca(G[O]||[])),function(R){if(H[R])n(H[R],function(S){return P.fbq.loadPlugin(S)})})}return this},optOut:function M(N,O){this.optIns.optOut(N,O);return this},trackSingle:function M(N,O,P){l.validateEventAndLog(O,P);return this.trackSingleCustom(N,O,P)},trackSingleCustom:function M(N,O,P){var Q=typeof N==="string"?N:N.id,R=this.getDefaultSendData(Q,O);R.customData=P;this.fire(R,false);return this},enqueue:function M(){for(var N=arguments.length,O=Array(N),P=0;P1&&arguments[1]!==undefined?arguments[1]:false;this._validateSend(N,O);if(N.userData&&p(N.userData).length>0&&!this.fbq.loadPlugin("identity")){this.enqueue("fire",N);return this}var P=new h(this.fbq.piiTranslator);try{P.append("ud",N.userData,true)}catch(Q){this.fbq.trigger("pii_invalidated",N.pixelId,Q.message);r(new Error(ha.PREFIX(N.pixelId,Q.message)))}P.append("v",this.fbq.version);N.set&&N.set.agent&&P.append("a",N.set.agent);var R=this.fbq.trigger("getCustomParameters",{id:N.pixelId});n(R,function(S){return n(p(S),function(T){if(P.containsKey(T))q(new Error("Custom parameter "+T+" has already been specified."));else P.append(T,S[T])})});i.sendEvent(N.pixelId,N.eventName,N.customData,P);return this},callMethod:function ya(M){var N=M[0],O=Array.prototype.slice.call(M,1);if(typeof this[N]==="function")try{this[N].apply(this,O)}catch(P){q(P)}else q(new Error("Invalid FBQ method "+N))},getDefaultSendData:function M(N,O){var P=this.getPixel(N),Q={pixelId:N,eventName:O};if(P){if(P.userData)Q.userData=P.userData;if(P.agent)Q.set={agent:P.agent};else if(this.fbq.agent)Q.set={agent:this.fbq.agent}}return Q},getOptedInPixels:function M(N){var O=this;return this.optIns.listPixelIds(N).map(function(P){return O.pixelsByID[P]})},ensurePixel:function M(N){if(!Object.prototype.hasOwnProperty.call(this.pixelsByID,N))throw new Error('Pixel "'+N+'" not found')},getPixel:function M(N){this.ensurePixel(N);return this.pixelsByID[N]},loadConfig:function M(N){if(this.fbq.disableConfigLoading||Object.prototype.hasOwnProperty.call(this.configsLoaded,N))return;this.locks.lockConfig(N);if(!this.fbq.pendingConfigs||D(this.fbq.pendingConfigs,function(O){return O===N})==false)J(N,this.VERSION)},setExperiments:function M(N){this._defaultExperiments=new B(N)},getExperiments:function M(){return this._defaultExperiments},configLoaded:function M(N){this.configsLoaded[N]=true;this.locks.releaseConfig(N);this.fbq.trigger("configLoaded",N)}};function L(g,w){var M=this;this.VERSION=g.version;this.pixelsByID=w;this.fbq=g;this.optIns=new A(G);this.configsLoaded={};this._defaultExperiments=new B([]);this.locks=fa.global;n(g.pendingConfigs||[],function(N){return M.locks.lockConfig(N)})}L.prototype=K;e.exports=L})();return e.exports}(a,b,c,d)});g.ensureModuleRegistered("undefined",function(){return undefined});"use strict";var g=a.fbq;g.execStart=a.performance&&typeof a.performance.now==="function"?a.performance.now():null;var h=g.getFbeventsModules("SignalsParamList"),i=g.getFbeventsModules("SignalsPixelEndpoint"),j=g.getFbeventsModules("SignalsEvents"),k=g.getFbeventsModules("SignalsFBEventsUtils"),l=g.getFbeventsModules("SignalsEventValidation"),da=g.getFbeventsModules("SignalsFBEventsFBQ"),ea=g.getFbeventsModules("SignalsFBEventsPluginPath"),fa=g.getFbeventsModules("SignalsFBEventsFireLock"),ga=g.getFbeventsModules("SignalsFBEventsConstants"),ha=ga.ERRORS,ia=j.on,ja=j.once,m=j.trigger,n=k.each,o=k.FBSet,ka=k.isArray,la=k.isEmptyObject,ma=k.isNumber,p=k.keys,q=k.logError,r=k.logErrorOnce,na=k.makeSafe,s=fa.global;function oa(A){return g.getFbeventsModules(A)}function pa(A){return g.fbIsModuleLoaded(A)}var t={},u=-1,qa=Array.prototype.slice,ra=Object.prototype.hasOwnProperty,sa=c.href,ta=false,ua=false,v=[],w={},va=b.referrer,wa={PageView:new o(),PixelInitialized:new o()},x=new da(g,w);function xa(A){for(var B in A)if(ra.call(A,B))this[B]=A[B];return this}function ya(A){try{if(s.isLocked()){g.queue.push(arguments);return}var B=qa.call(arguments),C=B.length===1&&ka(B[0]);if(C)B=B[0];if(typeof B[0]!=="string")q(new Error("The first argument to fbq must be a method name."));if(A.slice(0,6)==="report"){var D=A.slice(6);if(D==="CustomEvent"){D=(B[1]||{}).event||D;B=["trackCustom",D].concat(B.slice(1))}else B=["track",D].concat(B.slice(1))}A=B.shift();switch(A){case"addPixelId":ta=true;Aa.apply(this,B);break;case"init":ua=true;Aa.apply(this,B);break;case"set":za.apply(this,B);break;case"track":if(ma(B[0])){Fa.apply(this,B);break}if(C){Ea.apply(this,B);break}Da.apply(this,B);break;case"trackCustom":Ea.apply(this,B);break;case"send":Ga.apply(this,B);break;case"on":ia.apply(null,B);break;case"loadPlugin":z(B[0]);break;default:x.callMethod(arguments);break}}catch(E){q(E)}}function za(A){for(var B=arguments.length,C=Array(B>1?B-1:0),D=1;D1)k.logWarning("Multiple different pixels were detected on this page");function La(){if(g.disablePushState===true)return;if(!d.pushState||!d.replaceState)return;var A=na(function(){va=sa;sa=c.href;if(sa===va)return;var B=new xa({allowDuplicatePageViews:true});ya.call(B,"trackCustom","PageView")});k.injectMethod(d,"pushState",A);k.injectMethod(d,"replaceState",A);a.addEventListener("popstate",A,false)}ja("fired",function(){return La()});function Ma(A){g._initHandlers.push(A);Ba()}function Na(){return{pixelInitializationTime:u,pixels:v}}function Oa(g){g.instance=x;g.callMethod=ya;g.loadPlugin=z;g.registerPlugin=Ka;g._initHandlers=[];g._initsDone={};g.on=ia;g.once=ja;g.send=Ga;g.trigger=m;g.getEventCustomParameters=Ha;g.addInitHandler=Ma;g.getState=Na;g.init=Aa;g.set=za}Oa(a.fbq);Ia();e.exports={addInitHandler:function Ma(A){g._initHandlers.push(A);Ba()},doExport:Oa,getState:Na,getEventCustomParameters:Ha,sendEvent:y,loadPlugin:z};m("execEnd");m("initialized",g);if(g.registerPlugin)g.registerPlugin("fbevents",e.exports);g.ensureModuleRegistered("fbevents",function(){return e.exports})})();return e.exports})(window,document,location,history); fbq.registerPlugin("global_config", {__fbEventsPlugin: 1, plugin: function(fbq, instance) { fbq.loadPlugin("opttracking");instance.configLoaded("global_config"); }});