vendor: 4,276 bytes, line 1
1!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=13)}({13:function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */i=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function d(e,t,n,r){var o=t&&t.prototype instanceof f?t:f,i=Object.create(o.prototype),a=new D(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return x()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=S(a,n);if(s){if(s===p)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=l(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(e,n,a),i}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=d;var p={};function f(){}function m(){}function h(){}var v={};u(v,a,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(O([])));g&&g!==t&&r.call(g,a)&&(v=g);var w=h.prototype=f.prototype=Object.create(v);function b(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){var o;this._invoke=function(i,a){function s(){return new t((function(o,s){!function o(i,a,s,c){var u=l(e[i],e,a);if("throw"!==u.type){var d=u.arg,p=d.value;return p&&"object"==n(p)&&r.call(p,"__await")?t.resolve(p.__await).then((function(e){o("next",e,s,c)}),(function(e){o("throw",e,s,c)})):t.resolve(p).then((function(e){d.value=e,s(d)}),(function(e){return o("throw",e,s,c)}))}c(u.arg)}(i,a,o,s)}))}return o=o?o.then(s,s):s()}}function S(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var r=l(n,e.iterator,t.arg);
vendor: 4,996 bytes, line 1
1if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,p;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function D(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:x}}function x(){return{value:void 0,done:!0}}return m.prototype=h,u(w,"constructor",h),u(h,"constructor",m),m.displayName=u(h,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,u(e,c,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},b(_.prototype),u(_.prototype,s,(function(){return this})),e.AsyncIterator=_,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new _(d(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},b(w),u(w,c,"Generator"),u(w,a,(function(){return this})),u(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=O,D.prototype={constructor:D,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),E(n),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;E(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:O(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},e}function a(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function s(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function s(e){a(i,r,o,s,c,"next",e)}function c(e){a(i,r,o,s,c,"throw",e)}s(void 0)}))}}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}window.tp=window.tp||[];var p=u((function e(t,n){var r=this;d(this,e),l(this,"tp",window.tp||[]),l(this,"_gaEvents",[]),l(this,"_appSett
1ings",[]),l(this,"_tag_vars",null),l(this,"_user",{accessLevel:null,firstName:"",lastName:"",email:null}),l(this,"_isDeepDive",!1),l(this,"_deepDiveAccess",!0),l(this,"setup",(function(){r.debug("TP integration: start setup"),window.tp.push(["setAid",r._appSettings.aid]),window.tp.push(["setEndpoint","https://buy.tinypass.com/api/v3"]),window.tp.push(["setUseTinypassAccounts",!1]),window.tp.push(["setUsePianoIdUserProvider",!0]),"1"===r._appSettings.debug&&window.tp.push(["setDebug",!1]),"1"===r._appSettings.sandbox&&window.tp.push(["setSandbox",!0]),r.debug("TP integration: set tags"),r.setTags(),r.debug("TP integration: Setup Google analytics events"),r._gaEvents=new f(r._appSettings),r._gaEvents.setup(),r.debug("TP integration: pushEvents"),r.pushEvents()})),l(this,"setTags",(function(){void 0!==r._tag_vars&&r._tag_vars&&r._tag_vars.post_tags&&r._tag_vars.post_tags.length&&(r._appSettings.deepDive&&(r._isDeepDive=r._tag_vars.post_tags.split(",").find((function(e){return-1!==e.indexOf("deepdive-")||-1!==e.indexOf("-deepdive")}))),window.tp.push(["setTags",[r._tag_vars.post_tags]]))})),l(this,"pushEvents",(function(){document.addEventListener("click",(function(e){r.debug("TP integration: pushEvents addEventListener click",e.target.classList),e.target.classList.contains("tp-login-button")?(e.preventDefault(),window.tp.user.showLogin({})):e.target.classList.contains("tp-logout-button")&&(e.preventDefault(),window.tp.pianoId.logout((function(){location.reload()})))})),window.tp.push(["init",s(i().mark((function t(){return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return window.tp.enableGACrossDomainLinking(),e.myAccount(),r.resetPassword(),t.next=5,r.getAccessListAndFetchUser();case 5:r.updateMenu(),r.sendParselyData(),r.ready((function(){r.loadCMSubscriptions(),r.prefillGravityForms()}));case 8:case"end":return t.stop()}}),t)})))]),window.tp.push(["addHandler","loginSuccess",function(){var e=s(i().mark((function e(t){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return window.tp.amp.login(),r._appSettings.deepDive&&(r._isDeepDive=!1),r._gaEvents.pushPaywallDataGtm(t,"loginSuccessful"),e.next=5,r.getAccessListAndFetchUser().then((function(e){r.updateMenu(),r.sendParselyData()}));case 5:"OFFER"!==t.source&&location.reload(),"PIANOID"===t.source&&location.reload();case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()]),window.tp.push(["addHandler","checkoutComplete",function(e){r._gaEvents.pushPaywallDataGtm(e,"checkoutSuccess")}]),window.tp.push(["addHandler","showOffer",function(e,t){r._appSettings.deepDive&&r._isDeepDive&&(r._deepDiveAccess=!1)}]),window.tp.push(["addHandler","experienceExecute",function(e){r.getAccessListAndFetchUser()}]),"digiday"===r._appSettings.brand&&window.tp.push(["addHandler","showOffer",function(e){var t=document.querySelector("body"),n=document.querySelectorAll(".sections-nav li.scrollup"),o=document.querySelectorAll('.sections-nav li:not(.scrollup) a[href^="#"]');t.classList.add("tp-offer-show"),n&&n.length&&n.forEach((function(e){r.removeEvents(e)})),o&&o.length&&o.forEach((function(e){r.removeEvents(e).addEventListener("click",(function(e){e.preventDefault()}))}))}])})),l(this,"resetPassword",(function(){if(!e.isUserValid()){var t=location.search.match(/reset_token=([A-Za-z0-9]+)/);if(t){var n=t[1];window.tp.pianoId.show({resetPasswordToken:n,loggedIn:function(){location.reload()}})}}})),l(this,"getAccessListAndFetchUser",(function(){return r.fetchUserDatafromTP(),new Promise((function(t,n){if(!e.isUserValid())return t(r._user.accessLevel);try{window.tp.api.callApi("/access/list",{},(function(e){Array.isArray(e.data)&&0<e.data.length?-1!==e.data.map((function(e){return!(!e.granted||!0!==e.granted)})).indexOf(!0)&&(r._user.accessLevel=!0):r._user.accessLevel=!1;return r.pushUserDataGtm(),t(r._user.accessLevel)}))}catch(e){return n(e)}}))})),l(this,"updateMenu",(function(){var e=document.querySelector("body");if(null!==r._user.accessLevel){!1!==r._user.accessLevel&&"/modernretail/subscribe/"===window.location.pathname&&window.location.replace(window.location.origin+"/plus/"),!1===r._user.accessLevel?e.setAttribute("piano-user-subscription","free"):e.setAttribute("piano-user-subscription","paid"),e.setAttribute("piano-status-user","subscriber");var t=document.querySelectorAll(".who .avatar"),n=document.querySelector(".top-head .dropdown-toggle"),o=document.querySelector(".default-alternative-header .dropdown-toggle"),i=document.querySelector(".top-head .nav-dropdown-menu"),a=document.querySelector(".default-alternative-header .nav-dropdown-menu");t&&t.forEach((function(e){var t=document.createTextNode("".concat(r._user.firstName," ").concat(r._user.lastName));e.parentNode.insertBefore(t,e.nextSibling)})),n&&i&&(n.text="Hi, ".concat(r._user.firstName),n.addEventListener("click",(function(e){e.preventDefault(),i.classList.toggle("active"),i.classList.contains("active")?document.addEventListener("click",r.hideDropdownOnClickEverywhere):document.removeEventListener("click",r.hideDropdownOnClickEverywhere)}))),o&&a&&(o.text="Hi, ".concat(r._user.firstName),o.addEventListener("click",(function(e){e.preventDefault(),a.classList.toggle("active"),a.classList.contains("active")?document.addEventListener("click",r.hideDropdownOnClickEverywhere):document.removeEventListener("click",r.hideDropdownOnClickEverywhere)})))}else e.setAttribute("piano-status-user","guest")})),l(this,"hideDropdownOnClickEverywhere",(function(e){var t=document.querySelector(".top-head .nav-dropdown-menu"),n=document.querySelector(".default-alternative-header .nav-dropdown-menu");t&&!e.target.classList.contains("dropdown-toggle")&&!r.isDescendant(t,e.target)&&t.classList.contains("active")&&(t.classList.toggle("active"),document.removeEventListener("click",r.hideDropdownOnClickEverywhere)),n&&!e.target.classList.contains("dropdown-toggle")&&!r.isDescendant(n,e.target)&&n.classList.contains("active")&&(n.classList.toggle("active"),document.removeEventListener("click",r.hideDropdownOnClickEverywhere))})),l(this,"fetchUserDatafromTP",(function(){if(e.isUserValid())try{var t=window.tp.user.getProvider().getUser();if(null===t)return;["firstName","lastName","email"].forEach((function(e){r._user[e]=t[e]||""}))}catch(e){}})),l(this,"pushUserDataGtm",(function(){var e=window.tp.user.getProvider().getUser();if(null!==e){var t={uid:"".concat(e.uid),subscriptionStatus:!0===r._user.accessLevel||!1};
1r._appSettings.deepDive&&r._isDeepDive&&(t.deepDiveAccess=r._deepDiveAccess),r._gaEvents.dataLayer.push({userDetails:t})}})),l(this,"sendParselyData",(function(){var e;"undefined"!=typeof PARSELY&&(e=r._user&&r._user.accessLevel?{data:{user_type:"subscriber"}}:{data:{user_type:"general"}},PARSELY.updateDefaults(e),PARSELY.beacon.trackPageView())})),l(this,"prefillGravityForms",(function(){if(document.querySelector(".gform_body")){var e={email:document.querySelector(".business-email input")||{},fName:document.querySelector(".first-name input")||{},lName:document.querySelector(".last-name input")||{},nameF:document.querySelector(".name_first input")||{},nameL:document.querySelector(".name_last input")||{}};e.email.value=r._user.email,e.fName.value=r._user.firstName,e.lName.value=r._user.lastName,e.nameF.value=r._user.firstName,e.nameL.value=r._user.lastName}})),l(this,"loadCMSubscriptions",(function(){if(document.querySelector("#cm-member-newsletters")){var e=new FormData;e.append("action","ddm_get_member_transient"),e.append("email",r._user.email),fetch(r._appSettings.rest_endpoints.admin_base,{method:"POST",body:e}).then(function(){var e=s(i().mark((function e(t){var n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.json();case 2:if(n=e.sent){e.next=6;break}return r.loadCMSubscriptionsFromSource(),e.abrupt("return");case 6:document.querySelector('input[id="email"]')&&(document.querySelector('input[id="email"]').value=r._user.email),n.forEach((function(e){"Subscribed"===e.Value&&document.querySelector('input[name="'+e.Key+'"]')&&(document.querySelector('input[name="'+e.Key+'"]').checked=!0)}));case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){r.loadCMSubscriptionsFromSource()}))}})),l(this,"loadCMSubscriptionsFromSource",(function(){var e=new FormData;e.append("action","ddm_get_member_subscriptions"),e.append("email",r._user.email),fetch(r._appSettings.rest_endpoints.admin_base,{method:"POST",body:e}).then(function(){var e=s(i().mark((function e(t){var n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.json();case 2:if(n=e.sent,document.querySelector('input[id="email"]')&&(document.querySelector('input[id="email"]').value=r._user.email),200===n.http_code){e.next=6;break}return e.abrupt("return");case 6:n.response.CustomFields.forEach((function(e){"Subscribed"===e.Value&&document.querySelector('input[name="'+e.Key+'"]')&&(document.querySelector('input[name="'+e.Key+'"]').checked=!0)}));case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())})),l(this,"ready",(function(e){"loading"!==document.readyState?e():document.addEventListener?document.addEventListener("DOMContentLoaded",e):document.attachEvent("onreadystatechange",(function(){"complete"===document.readyState&&e()}))})),l(this,"isDescendant",(function(e,t){for(var n=t.parentNode;null!=n;){if(n===e)return!0;n=n.parentNode}return!1})),l(this,"removeEvents",(function(e){var t=e.cloneNode(!0);return e.parentNode.replaceChild(t,e),t})),l(this,"debug",(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r._appSettings.debug&&console.log(e,t)})),this._appSettings=t,this._tag_vars=n}));l(p,"myAccount",(function(){"complete"===document.readyState||"loaded"===document.readyState||"interactive"===document.readyState?document.getElementById("my-account-container")&&window.tp.myaccount.show({displayMode:"inline",containerSelector:"#my-account-container",activateTemplateInteraction:!0}):document.addEventListener("DOMContentLoaded",(function(){document.getElementById("my-account-container")&&window.tp.myaccount.show({displayMode:"inline",containerSelector:"#my-account-container",activateTemplateInteraction:!0})}))})),l(p,"isUserValid",(function(){try{if(window.tp.user.isUserValid())return!0}catch(e){}return!1}));var f=function(){function e(){d(this,e),l(this,"tp",window.tp||[]),l(this,"dataLayer",window.dataLayer||[]),l(this,"_appSettings",[]),l(this,"_userSegment",{segment:void 0,subSegment:void 0}),l(this,"_meterName",void 0),l(this,"_events",[{event:"showOffer",name:"offerShown"},{event:"checkoutSelectTerm",name:"termCheckoutDisplayed"},{event:"startCheckout",name:"termSelectedinPromotion"},{event:"loginRequired",name:"signupFormDisplayed"},{event:"loginDisplayed",name:"loginFormDisplayed"},{event:"registrationSuccess",name:"signupSuccessful"},{event:"registrationFailed",name:"signupFail"}])}var t;return u(e,[{key:"setup",value:function(){var e=this;
1this._events.forEach((function(t){window.tp.push(["addHandler",t.event,function(n){e.pushPaywallDataGtm(n,t.name)}])})),this.pushEvents()}},{key:"pushEvents",value:function(){var e=this;window.tp.push(["addHandler","meterActive",function(t,n){void 0!==n.moduleName&&(e._meterName=n.moduleName)}]),window.tp.push(["addHandler","meterExpired",function(t,n){void 0!==n.moduleName&&(e._meterName=n.moduleName)}]),window.tp.push(["addHandler","beforeComposerAction",function(t,n,r){t=o(o(o(o(o({},t),n),r),e._userSegment),{},{meterName:e._meterName}),e.pushPaywallDataGtm(t,"actionsCardTitle"),e._userSegment={segment:void 0,subSegment:void 0}}]),window.tp.push(["addHandler","userSegmentTrue",function(t,n){void 0!==n.moduleName&&(void 0===e._userSegment.segment?e._userSegment.segment=n.moduleName:e._userSegment.subSegment=n.moduleName)}])}},{key:"pushPaywallDataGtm",value:function(e,t){var n={};n[t]={};var r={};if(void 0!==e){if(void 0!==e.termId&&(n[t].term=e.termId,void 0!==(r=this.getTermInfo(e.termId)).term&&(n[t].resource=r.term.resource.rid)),void 0!==e.resourceId&&(n[t].resource=e.resourceId),void 0!==e.offerId&&(n[t].offer=e.offerId),void 0!==e.templateId&&(n[t].template=e.templateId),void 0!==e.templateVariantId&&(n[t].template_variant=e.templateVariantId),void 0!==e.promotionId&&(n[t].promotion=e.promotionId),void 0!==e.moduleName&&(n[t].actionName=e.moduleName),void 0!==e.chargeAmount&&void 0!==e.chargeCurrency){var i=e.chargeAmount;void 0!==e.promotionId&&null!==e.promotionId&&1===i&&(i=0),n[t].price={amount:i,currency:e.chargeCurrency}}else"checkoutSuccess"===t&&(n[t].price={amount:0,currency:"USD"});void 0!==e.paymentId&&(n[t].paymentId=e.paymentId),void 0!==e.rid&&(n[t].items={item_id:e.rid,item_name:"Piano Subscription "+e.rid}),void 0!==e.meterName&&(n[t].pageviewMeterName=e.meterName),void 0!==e.segment&&(n[t].userSegmentName=e.segment),void 0!==e.subSegment&&(n[t].subsegmentName=e.subSegment),void 0!==e.activeMeters&&e.activeMeters.length>0&&(void 0!==e.activeMeters[0].totalViews&&(n[t].meterValueViews=e.activeMeters[0].totalViews),void 0!==e.activeMeters[0].viewsLeft&&(n[t].meterValueViewsLeft=e.activeMeters[0].viewsLeft))}this.dataLayer.push({event:t,ecommerce:o({},n)})}},{key:"getTermInfo",value:(t=s(i().mark((function e(t){var n,r,o,a;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this._appSettings.rest_endpoints.term_info,(r={}).term_id=t,o={},e.prev=4,e.next=7,fetch(n,{method:"POST",body:JSON.stringify(r)});case 7:return a=e.sent,e.next=10,a.json();case 10:o=e.sent,e.next=16;break;case 13:e.prev=13,e.t0=e.catch(4),console.log("Fetch Error :-S",e.t0);case 16:return e.abrupt("return",o);case 17:case"end":return e.stop()}}),e,this,[[4,13]])}))),function(e){return t.apply(this,arguments)})}]),e}();new p(window.pianoSettings,window.tag_vars).setup()}});
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.