PageSourceSearch

https://thelovebugtimmins.com/cdn/shop/t/39/assets/cart-notification.js?v=171228165611604599641790758486

js thelovebugtimmins.com collected 2026-10-09 18:26:58 UTC 14,280 bytes, 2 lines download raw bytes

1function _typeof(a){"@babel/helpers - typeof";return _typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a2){return typeof a2}:function(a2){return a2&&typeof Symbol=="function"&&a2.constructor===Symbol&&a2!==Symbol.prototype?"symbol":typeof a2},_typeof(a)}function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */function b(a2,b2,c2){return Object.defineProperty(a2,b2,{value:c2,enumerable:!0,configurable:!0,writable:!0}),a2[b2]}function f(b2,d2,e2,f2){var g=d2&&d2.prototype instanceof k?d2:k,h2=Object.create(g.prototype),a2=new B(f2||[]);return E(h2,"_invoke",{value:w(b2,e2,a2)}),h2}function j(a2,b2,c2){try{return{type:"normal",arg:a2.call(b2,c2)}}catch(a3){return{type:"throw",arg:a3}}}function k(){}function l(){}function m(){}function q(a2){["next","throw","return"].forEach(function(c2){b(a2,c2,function(a3){return this._invoke(c2,a3)})})}function s(b2,d2){function c2(e3,f2,g,i2){var a2=j(b2[e3],b2,f2);if(a2.type!=="throw"){var k2=a2.arg,l2=k2.value;return l2&&_typeof(l2)=="object"&&t.call(l2,"__await")?d2.resolve(l2.__await).then(function(a3){c2("next",a3,g,i2)},function(a3){c2("throw",a3,g,i2)}):d2.resolve(l2).then(function(a3){k2.value=a3,g(k2)},function(a3){return c2("throw",a3,g,i2)})}i2(a2.arg)}var e2;E(this,"_invoke",{value:function(a2,b3){function f2(){return new d2(function(d3,e3){c2(a2,b3,d3,e3)})}return e2=e2?e2.then(f2,f2):f2()}})}function w(a2,b2,d2){var e2="suspendedStart";return function(f2,g){if(e2==="executing")throw new Error("Generator is already running");if(e2==="completed"){if(f2==="throw")throw g;return{value:D,done:!0}}for(d2.method=f2,d2.arg=g;;){var h2=d2.delegate;if(h2){var i2=x(h2,d2);if(i2){if(i2===G)continue;return i2}}if(d2.method==="next")d2.sent=d2._sent=d2.arg;else if(d2.method==="throw"){if(e2==="suspendedStart")throw e2="completed",d2.arg;d2.dispatchException(d2.arg)}else d2.method==="return"&&d2.abrupt("return",d2.arg);e2="executing";var k2=j(a2,b2,d2);if(k2.type==="normal"){if(e2=d2.done?"completed":"suspendedYield",k2.arg===G)continue;return{value:k2.arg,done:d2.done}}k2.type==="throw"&&(e2="completed",d2.method="throw",d2.arg=k2.arg)}}}function x(b2,c2){var d2=c2.method,e2=b2.iterator[d2];if(e2===D)return c2.delegate=null,d2==="throw"&&b2.iterator.return&&(c2.method="return",c2.arg=D,x(b2,c2),c2.method==="throw")||d2!=="return"&&(c2.method="throw",c2.arg=new TypeError("The iterator does not provide a '"+d2+"' method")),G;var f2=j(e2,b2.iterator,c2.arg);if(f2.type==="throw")return c2.method="throw",c2.arg=f2.arg,c2.delegate=null,G;var g=f2.arg;return g?g.done?(c2[b2.resultName]=g.value,c2.next=b2.nextLoc,c2.method!=="return"&&(c2.method="next",c2.arg=D),c2.delegate=null,G):g:(c2.method="throw",c2.arg=new TypeError("iterator result is not an object"),c2.delegate=null,G)}function z(a2){var b2={tryLoc:a2[0]};1 in a2&&(b2.catchLoc=a2[1]),2 in a2&&(b2.finallyLoc=a2[2],b2.afterLoc=a2[3]),this.tryEntries.push(b2)}function A(a2){var b2=a2.completion||{};b2.type="normal",delete b2.arg,a2.completion=b2}function B(a2){this.tryEntries=[{tryLoc:"root"}],a2.forEach(z,this),this.reset(!0)}function C(a2){if(a2||a2===""){var b2=a2[F];if(b2)return b2.call(a2);if(typeof a2.next=="function")return a2;if(!isNaN(a2.length)){var c2=-1,d2=function b3(){for(;++c2<a2.length;)if(t.call(a2,c2))return b3.value=a2[c2],b3.done=!1,b3;return b3.value=D,b3.done=!0,b3};return d2.next=d2}}throw new TypeError(_typeof(a2)+" is not iterable")}_regeneratorRuntime=function(){return h};var D,h={},e=Object.prototype,t=e.hasOwnProperty,E=Object.defineProperty||function(a2,b2,c2){a2[b2]=c2.value},n=typeof Symbol=="function"?Symbol:{},F=n.iterator||"@@iterator",a=n.asyncIterator||"@@asyncIterator",c=n.toStringTag||"@@toStringTag";try{b({},"")}catch(a2){b=function(a3,b2,c2){return a3[b2]=c2}}h.wrap=f;var G={},i={};b(i,F,function(){return this});var o=Object.getPrototypeOf,d=o&&o(o(C([])));d&&d!==e&&t.call(d,F)&&(i=d);var r=m.prototype=k.prototype=Object.create(i);return l.prototype=m,E(r,"constructor",{value:m,configurable:!0}),E(m,"constructor",{value:l,configurable:!0}),l.displayName=b(m,c,"GeneratorFunction"),h.isGeneratorFunction=function(a2){var b2=typeof a2=="function"&&a2.constructor;return!!b2&&(b2===l||(b2.displayName||b2.name)==="GeneratorFunction")},h.mark=function(a2){return Object.setPrototypeOf?Object.setPrototypeOf(a2,m):(a2.__proto__=m,b(a2,c,"GeneratorFunction")),a2.prototype=Object.create(r),a2},h.awrap=function(a2){return{__await:a2}},q(s.prototype),b(s.prototype,a,function(){return this}),h.AsyncIterator=s,h.async=function(b2,c2,d2,e2,g){g===void 0&&(g=Promise);
1var j2=new s(f(b2,c2,d2,e2),g);return h.isGeneratorFunction(c2)?j2:j2.next().then(function(a2){return a2.done?a2.value:j2.next()})},q(r),b(r,c,"Generator"),b(r,F,function(){return this}),b(r,"toString",function(){return"[object Generator]"}),h.keys=function(a2){var b2=Object(a2),c2=[];for(var d2 in b2)c2.push(d2);return c2.reverse(),function a3(){for(;c2.length;){var d3=c2.pop();if(d3 in b2)return a3.value=d3,a3.done=!1,a3}return a3.done=!0,a3}},h.values=C,B.prototype={constructor:B,reset:function(a2){if(this.prev=0,this.next=0,this.sent=this._sent=D,this.done=!1,this.delegate=null,this.method="next",this.arg=D,this.tryEntries.forEach(A),!a2)for(var b2 in this)b2.charAt(0)==="t"&&t.call(this,b2)&&!isNaN(+b2.slice(1))&&(this[b2]=D)},stop:function(){this.done=!0;var a2=this.tryEntries[0].completion;if(a2.type==="throw")throw a2.arg;return this.rval},dispatchException:function(b2){function d2(a2,c2){return h2.type="throw",h2.arg=b2,e2.next=a2,c2&&(e2.method="next",e2.arg=D),!!c2}if(this.done)throw b2;for(var e2=this,f2=this.tryEntries.length-1;0<=f2;--f2){var g=this.tryEntries[f2],h2=g.completion;if(g.tryLoc==="root")return d2("end");if(g.tryLoc<=this.prev){var j2=t.call(g,"catchLoc"),k2=t.call(g,"finallyLoc");if(j2&&k2){if(this.prev<g.catchLoc)return d2(g.catchLoc,!0);if(this.prev<g.finallyLoc)return d2(g.finallyLoc)}else if(j2){if(this.prev<g.catchLoc)return d2(g.catchLoc,!0)}else{if(!k2)throw new Error("try statement without catch or finally");if(this.prev<g.finallyLoc)return d2(g.finallyLoc)}}}},abrupt:function(b2,c2){for(var d2,e2=this.tryEntries.length-1;0<=e2;--e2)if(d2=this.tryEntries[e2],d2.tryLoc<=this.prev&&t.call(d2,"finallyLoc")&&this.prev<d2.finallyLoc){var f2=d2;break}f2&&(b2==="break"||b2==="continue")&&f2.tryLoc<=c2&&c2<=f2.finallyLoc&&(f2=null);var g=f2?f2.completion:{};return g.type=b2,g.arg=c2,f2?(this.method="next",this.next=f2.finallyLoc,G):this.complete(g)},complete:function(a2,b2){if(a2.type==="throw")throw a2.arg;return a2.type==="break"||a2.type==="continue"?this.next=a2.arg:a2.type==="return"?(this.rval=this.arg=a2.arg,this.method="return",this.next="end"):a2.type==="normal"&&b2&&(this.next=b2),G},finish:function(a2){for(var b2,c2=this.tryEntries.length-1;0<=c2;--c2)if(b2=this.tryEntries[c2],b2.finallyLoc===a2)return this.complete(b2.completion,b2.afterLoc),A(b2),G},catch:function(a2){for(var b2,c2=this.tryEntries.length-1;0<=c2;--c2)if(b2=this.tryEntries[c2],b2.tryLoc===a2){var d2=b2.completion;if(d2.type==="throw"){var f2=d2.arg;A(b2)}return f2}throw new Error("illegal catch attempt")},delegateYield:function(a2,b2,c2){return this.delegate={iterator:C(a2),resultName:b2,nextLoc:c2},this.method==="next"&&(this.arg=D),G}},h}function asyncGeneratorStep(a,b,c,d,e,f,g){try{var h=a[f](g),i=h.value}catch(a2){return void c(a2)}h.done?b(i):Promise.resolve(i).then(d,e)}function _asyncToGenerator(a){return function(){var b=this,c=arguments;return new Promise(function(d,e){function f(a2){asyncGeneratorStep(h,d,e,f,g,"next",a2)}function g(a2){asyncGeneratorStep(h,d,e,f,g,"throw",a2)}var h=a.apply(b,c);f(void 0)})}}function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function _defineProperties(a,b){for(var c,d=0;d<b.length;d++)c=b[d],c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(a,_toPropertyKey(c.key),c)}function _createClass(a,b,c){return b&&_defineProperties(a.prototype,b),c&&_defineProperties(a,c),Object.defineProperty(a,"prototype",{writable:!1}),a}function _toPropertyKey(a){var b=_toPrimitive(a,"string");return _typeof(b)==="symbol"?b:b+""}function _toPrimitive(a,b){if(_typeof(a)!=="object"||a===null)return a;var c=a[Symbol.toPrimitive];if(c!==void 0){var d=c.call(a,b||"default");if(_typeof(d)!=="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return(b==="string"?String:Number)(a)}function _inherits(a,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),b&&_setPrototypeOf(a,b)}function _createSuper(a){var b=_isNativeReflectConstruct();return function(){var c,d=_getPrototypeOf(a);if(b){var e=_getPrototypeOf(this).constructor;c=Reflect.construct(d,arguments,e)}else c=d.apply(this,arguments);return _possibleConstructorReturn(this,c)}}function _possibleConstructorReturn(a,b){if(b&&(_typeof(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(a)}
1function _assertThisInitialized(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _wrapNativeSuper(a){var b=typeof Map=="function"?new Map:void 0;return _wrapNativeSuper=function(a2){function c(){return _construct(a2,arguments,_getPrototypeOf(this).constructor)}if(a2===null||!_isNativeFunction(a2))return a2;if(typeof a2!="function")throw new TypeError("Super expression must either be null or a function");if(typeof b!="undefined"){if(b.has(a2))return b.get(a2);b.set(a2,c)}return c.prototype=Object.create(a2.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(c,a2)},_wrapNativeSuper(a)}function _construct(){return _construct=_isNativeReflectConstruct()?Reflect.construct.bind():function(b,c,d){var e=[null];e.push.apply(e,c);var a=Function.bind.apply(b,e),f=new a;return d&&_setPrototypeOf(f,d.prototype),f},_construct.apply(null,arguments)}function _isNativeReflectConstruct(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(a){return!1}}function _isNativeFunction(a){return Function.toString.call(a).indexOf("[native code]")!==-1}function _setPrototypeOf(a,b){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a2,b2){return a2.__proto__=b2,a2},_setPrototypeOf(a,b)}function _getPrototypeOf(a){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a2){return a2.__proto__||Object.getPrototypeOf(a2)},_getPrototypeOf(a)}var CartNotification=(function(a){function b(){var a2;return _classCallCheck(this,b),a2=c.call(this),a2.notification=document.getElementById("cart-notification"),a2.header=document.querySelector("sticky-header"),a2.onBodyClick=a2.handleBodyClick.bind(_assertThisInitialized(a2)),a2.notification.addEventListener("keyup",function(b2){return b2.code==="Escape"&&a2.close()}),a2.querySelectorAll('button[type="button"]').forEach(function(b2){return b2.addEventListener("click",a2.close.bind(_assertThisInitialized(a2)))}),a2}_inherits(b,a);var c=_createSuper(b);return _createClass(b,[{key:"open",value:function(){var a2=this;this.notification.classList.add("animate","active"),this.notification.addEventListener("transitionend",function(){a2.notification.focus(),trapFocus(a2.notification)},{once:!0}),document.body.addEventListener("click",this.onBodyClick),this.dispatchCartViewEvent()}},{key:"dispatchCartViewEvent",value:(function(){function a2(){return b2.apply(this,arguments)}var b2=_asyncToGenerator(_regeneratorRuntime().mark(function a3(){var b3,c2,d,e;return _regeneratorRuntime().wrap(function(a4){for(;;)switch(a4.prev=a4.next){case 0:if(b3=window.StandardEvents||{},c2=b3.CartViewEvent,c2){a4.next=3;break}return a4.abrupt("return");case 3:return a4.prev=3,a4.next=6,fetch("".concat(routes.cart_url,".json"));case 6:return d=a4.sent,a4.next=9,d.json();case 9:if(e=a4.sent,e!=null&&e.currency){a4.next=12;break}return a4.abrupt("return");case 12:this.dispatchEvent(new c2({context:"dialog",cart:c2.createCartFromAjaxResponse(e)})),a4.next=17;break;case 15:a4.prev=15,a4.t0=a4.catch(3);case 17:case"end":return a4.stop()}},a3,this,[[3,15]])}));return a2})()},{key:"close",value:function(){this.notification.classList.remove("active"),document.body.removeEventListener("click",this.onBodyClick),removeTrapFocus(this.activeElement)}},{key:"renderContents",value:function(a2){var b2=this;this.cartItemKey=this.getProductItemKey(a2),this.getSectionsToRender().forEach(function(c2){document.getElementById(c2.id).innerHTML=b2.getSectionInnerHTML(a2.sections[c2.id],c2.selector)}),this.header&&this.header.reveal(),this.open()}},{key:"getProductItemKey",value:function(a2){return a2.items.find(function(a3){return a3.properties._type==="product"}).key}},{key:"getSectionsToRender",value:function(){return[{id:"cart-notification-product",selector:'[id="cart-notification-product-'.concat(this.cartItemKey,'"]')},{id:"cart-notification-button"},{id:"cart-icon-bubble"}]}},{key:"getSectionInnerHTML",value:function(a2){var b2=1<arguments.length&&arguments[1]!==void 0?arguments[1]:".shopify-section";return new DOMParser().parseFromString(a2,"text/html").querySelector(b2).innerHTML}},{key:"handleBodyClick",value:function(a2){var b2=a2.target;if(b2!==this.notification&&!b2.closest("cart-notification")){var c2=b2.closest("details-disclosure, header-menu");this.activeElement=c2?c2.querySelector("summary"):null,this.close()}}},{key:"setActiveElement",value:function(a2){this.activeElement=a2}}]),b})(_wrapNativeSuper(HTMLElement));customElements.define("cart-notification",CartNotification);
2//# sourceMappingURL=/cdn/shop/t/39/assets/cart-notification.js.map?v=171228165611604599641790758486

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.