PageSourceSearch

https://famousstages.com/cdn/shop/t/21/assets/pickup-availability.js?v=47189680510045280141785303454

js famousstages.com collected 2026-10-05 21:41:30 UTC 7,029 bytes, 1 lines download raw bytes

1'use strict';function _typeof(obj){return(_typeof='function'==typeof Symbol&&'symbol'==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&'function'==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?'symbol':typeof obj})(obj)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError('Cannot call a class as a function')}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,'value'in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Constructor}function _inherits(subClass,superClass){if('function'!=typeof superClass&&null!==superClass)throw new TypeError('Super expression must either be null or a function');subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),superClass&&_setPrototypeOf(subClass,superClass)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){return!call||'object'!==_typeof(call)&&'function'!=typeof call?_assertThisInitialized(self):call}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');return self}function _wrapNativeSuper(Class){var _cache='function'==typeof Map?new Map:void 0;return(_wrapNativeSuper=function(Class){if(null===Class||!_isNativeFunction(Class))return Class;if('function'!=typeof Class)throw new TypeError('Super expression must either be null or a function');if(void 0!==_cache){if(_cache.has(Class))return _cache.get(Class);_cache.set(Class,Wrapper)}function Wrapper(){return _construct(Class,arguments,_getPrototypeOf(this).constructor)}return Wrapper.prototype=Object.create(Class.prototype,{constructor:{value:Wrapper,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(Wrapper,Class)})(Class)}function _construct(Parent,args,Class){return(_construct=_isNativeReflectConstruct()?Reflect.construct:function(Parent,args,Class){var a=[null];a.push.apply(a,args);var instance=new(Function.bind.apply(Parent,a));return Class&&_setPrototypeOf(instance,Class.prototype),instance}).apply(null,arguments)}function _isNativeReflectConstruct(){if('undefined'==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if('function'==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _isNativeFunction(fn){return-1!==Function.toString.call(fn).indexOf('[native code]')}function _setPrototypeOf(o,p){return(_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o})(o,p)}function _getPrototypeOf(o){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}var PickupAvailability=function(_HTMLElement){_inherits(PickupAvailability,_wrapNativeSuper(HTMLElement));var _super=_createSuper(PickupAvailability);function PickupAvailability(){var _this;return _classCallCheck(this,PickupAvailability),(_this=_super.call(this)).hasAttribute('available')?(_this.errorHtml=_this.querySelector('template').content.firstElementChild.cloneNode(!0),_this.onClickRefreshList=_this.onClickRefreshList.bind(_assertThisInitialized(_this)),_this.fetchAvailability(_this.dataset.variantId),_this):_possibleConstructorReturn(_this)}return _createClass(PickupAvailability,[{key:'fetchAvailability',value:function(variantId){var _this2=this,variantSectionUrl=''.concat(this.dataset.baseUrl,'variants/').concat(variantId,'/?section_id=pickup-availability');fetch(variantSectionUrl).then((function(response){return response.text()})).then((function(text){var sectionInnerHTML=(new DOMParser).parseFromString(text,'text/html').querySelector('.shopify-section');_this2.renderPreview(sectionInnerHTML)})).catch((function(e){var _this2$querySelector;null===(_this2$querySelector=_this2.querySelector('button'))||void 0===_this2$querySelector||_this2$querySelector.removeEventListener('click',_this2.onClickRefreshList),_this2.renderError()}))}},{key:'onClickRefreshList',value:function(evt){this.fetchAvailability(this.dataset.variantId)}},{key:'renderError',value:function(){this.innerHTML='',this.appendChild(this.errorHtml),this.querySelector('button').addEventListener('click',this.onClickRefreshList)}},{key:'renderPreview',value:function(sectionInnerHTML){var drawer=document.querySelector('pickup-availability-drawer');if(drawer&&drawer.remove(),!sectionInnerHTML.querySelector('pickup-availability-preview'))return this.innerHTML='',void this.removeAttribute('available');this.innerHTML=sectionInnerHTML.querySelector('pickup-availability-preview').outerHTML,this.setAttribute('available',''),document.body.appendChild(sectionInnerHTML.querySelector('pickup-availability-drawer')),this.querySelector('button').addEventListener('click',(function(evt){document.querySelector('pickup-availability-drawer').show(evt.target)}))}}]),PickupAvailability}();customElements.define('pickup-availability',PickupAvailability);var PickupAvailabilityDrawer=function(_HTMLElement2){_inherits(PickupAvailabilityDrawer,_wrapNativeSuper(HTMLElement));var _super2=_createSuper(PickupAvailabilityDrawer);function PickupAvailabilityDrawer(){var _this3;return _classCallCheck(this,PickupAvailabilityDrawer),(_this3=_super2.call(this)).onBodyClick=_this3.handleBodyClick.bind(_assertThisInitialized(_this3)),_this3.querySelector('button').addEventListener('click',(function(){_this3.hide()})),_this3.addEventListener('keyup',(function(){'ESCAPE'===event.code.toUpperCase()&&_this3.hide()})),_this3}return _createClass(PickupAvailabilityDrawer,[{key:'handleBodyClick',value:function(evt){var target=evt.target;target==this||target.closest('pickup-availability-drawer')||'ShowPickupAvailabilityDrawer'
1==target.id||this.hide()}},{key:'hide',value:function(){this.removeAttribute('open'),document.body.removeEventListener('click',this.onBodyClick),document.body.classList.remove('overflow-hidden'),removeTrapFocus(this.focusElement)}},{key:'show',value:function(focusElement){this.focusElement=focusElement,this.setAttribute('open',''),document.body.addEventListener('click',this.onBodyClick),document.body.classList.add('overflow-hidden'),trapFocus(this)}}]),PickupAvailabilityDrawer}();customElements.define('pickup-availability-drawer',PickupAvailabilityDrawer);

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.