PageSourceSearch

https://squareup.com/shop/hardware/v2/_next/static/chunks/6082.5ff0415a3845cd53.js

js squareup.com collected 2026-09-24 07:34:49 UTC 13,619 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6082],{68742:function(t,e,r){let i;function n(t){return new Proxy(t=>t,{apply:(t,e,r)=>Reflect.apply(null!=i?i:t,e,r)})(t)}function o(t,e){var r,i;return(null===(i=null===(r=null==t?void 0:t.tagName)||void 0===r?void 0:r.toLowerCase)||void 0===i?void 0:i.call(r))===n(e)}r.d(e,{g:function(){return n},i:function(){return o}})},19655:function(t,e,r){r.d(e,{A:function(){return n},B:function(){return s},C:function(){return u},D:function(){return D},E:function(){return j},F:function(){return W},G:function(){return B},H:function(){return A},I:function(){return V},J:function(){return $},K:function(){return q},L:function(){return H},M:function(){return z},N:function(){return M},R:function(){return L},S:function(){return N},T:function(){return P},a:function(){return o},b:function(){return i},c:function(){return d},d:function(){return l},e:function(){return v},f:function(){return _},g:function(){return g},h:function(){return b},i:function(){return O},j:function(){return E}
1,k:function(){return f},l:function(){return p},m:function(){return w},n:function(){return x},o:function(){return c},p:function(){return S},q:function(){return y},r:function(){return m},s:function(){return R},t:function(){return a},u:function(){return I},v:function(){return F},w:function(){return C},x:function(){return k},y:function(){return h},z:function(){return T}});let i="chevron-down",n="chevron-down",o="chevron-down",l="ellipsis-horizontal",s=16,u=240,a=100,d=160,c="rgb(0, 106, 255)",h=599,f="rgb(102, 74, 46)",v="rgb(153, 8, 56)",p="rgb(25, 128, 42)",b="rgb(255, 159, 64)",w="rgb(0, 178, 59)",g="rgb(242, 91, 61)",m="rgb(217, 54, 176)",y="rgb(135, 22, 217)",_="rgb(204, 0, 35)",S="rgb(38, 147, 255)",E="rgb(166, 124, 83)",x="rgb(18, 191, 148)",F="Square Sans Text",I=14,k="Square Sans Text",C=16,O="rgb(255, 191, 0)",A="x",z=240,R=160,T=240,D=160,j=240,W=160,q=6,H=8,M=26,V=2,$=2,B="chevron-right",L="chevron-right",N=4,P=320},19036:function(t,e,r){r.d(e,{S:function(){return a},a:function(){return w},b:function(){return b},f:function(){return n},i:function(){return g},r:function(){return s}});var i="object"==typeof global&&global&&global.Object===Object&&global;let n=i;var o="object"==typeof self&&self&&self.Object===Object&&self,l=n||o||Function("return this")();let s=l;var u=s.Symbol;let a=u;var d=Object.prototype,c=d.hasOwnProperty,h=d.toString,f=a?a.toStringTag:void 0,v=Object.prototype.toString,p=a?a.toStringTag:void 0;function b(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":p&&p in Object(t)?function(t){var e=c.call(t,f),r=t[f];try{t[f]=void 0;var i=!0}catch(t){}var n=h.call(t);return i&&(e?t[f]=r:delete t[f]),n}(t):v.call(t)}function w(t){return null!=t&&"object"==typeof t}function g(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},7364:function(t,e,r){r.d(e,{i:function(){return n}});var i=r(19036);function n(t){return"symbol"==typeof t||(0,i.a)(t)&&"[object Symbol]"==(0,i.b)(t)}},16082:function(t,e,r){r.r(e),r.d(e,{market_filter_group:function(){return u}});var i=r(54982),n=r(19655),o=r(68742),l=r(70171),s=r(8162);r(19036),r(7364);let u=class{constructor(t){(0,i.r)(this,t),this._isSearchActive=!1,this._willFocusOnFirstFilter=!1,this._willDelayDropdownOpen=!1,this._observers={},this.throttledHandleResize=(0,s.t)(this.handleResize.bind(this),16),this.maxVisibleFilters=3,this._sortedFilterEls={overflow:[],visible:[]}}maxVisibleFiltersWatcher(){this.handleResize()}marketInputSearchFocusHandler({detail:t}){this._isSearchActive=t}async marketInternalInputSearchCompactAnimationHandler(t){t.stopPropagation(),await this.handleResize(),await (0,l.a)(),this._willDelayDropdownOpen="animationstart"===t.detail}marketDropdownOpenedHandler(t){this._willDelayDropdownOpen&&(this._willDelayDropdownOpen=!1,t.preventDefault(),setTimeout(async()=>{var t,e,r,i,n,s;await (0,l.a)(),await (null===(r=null===(e=null===(t=this._dropdownMenuEl)||void 0===t?void 0:t.shadowRoot)||void 0===e?void 0:e.querySelector((0,o.g)("market-dropdown")))||void 0===r?void 0:r.updateDropdownPosition()),null===(s=null===(n=null===(i=this._dropdownMenuEl)||void 0===i?void 0:i.shadowRoot)||void 0===n?void 0:n.querySelector((0,o.g)("market-dropdown")))||void 0===s||s.openDropdown()},1.25*n.t))}calculateOverflowButtonWidth(t){if(!(null==t?void 0:t.length))return 0;let e=t.reduce((t,e)=>{let r=e.querySelector((0,o.g)("market-list"));if(null==r?void 0:r.value)return t+1;let i=e.querySelector((0,o.g)("market-date-picker"));return(null==i?void 0:i.selectedStartDate)?t+1:t},0);if(0===e)return 50;let r=document.createElement("canvas"),i=r.getContext("2d");"small"===t[0].size?i.font=`${n.u}px ${n.v}`:i.font=`${n.w}px ${n.x}`;let l=i.measureText(`${e}`).width;return r.remove(),58+l}getComputedWidth(t){return Number.parseFloat(window.getComputedStyle(t).width)}async findFilterCutoffIndex(){var t,e;if((null!==(t=this.maxVisibleFilters)&&void 0!==t?t:3)<=0)return 0;let r=(null==window?void 0:window.innerWidth)<=n.y;if(r&&!this._isSearchActive)return 1;if(this._isSearchActive)return 0;let i=this.getComputedWidth(this.el),o=this._slottedInputSearchEl?this.getComputedWidth(this._slottedInputSearchEl)+8:0,s=document.createElement("div");s.style.width="auto",s.style.position="absolute",s.style.visibility="hidden",this.el.shadowRoot.appendChild(s);let u=0,a=0;for(let t of this._filterEls){if(u===(null!==(e=this.maxVisibleFilters)&&void 0!==e?e:3))break;let r=u+1===this._filterEls.length?0:8+this.calculateOverflowButtonWidth(this._filterEls.slice(u)),n=t.cloneNode(!0);n.style.display="block",s.appendChild(n),await (0,l.a)();let d=this.getComputedWidth(s);s.removeChild(n),a+=(u>0?8:0)+d;let c=o+a+r;if(c>=i)break;++u}return this.el.shadowRoot.removeChild(s),s.remove(),u}sortVisibleAndOverflowFilters(){this._sortedFilterEls={visible:this._filterEls.slice(0,this._filterCutoffIndex),overflow:this._filterEls.slice(this._filterCutoffIndex)},this._sortedFilterEls.visible.forEach(t=>{t.style.display&&t.style.removeProperty("display"),"filters"!==t.getAttribute("slot")&&t.setAttribute("slot","filters")}),this._sortedFilterEls.overflow.forEach(t=>{"none"!==t.style.display&&(t.style.display="none"),"overflow-filters"!==t.getAttribute("slot")&&t.setAttribute("slot","overflow-filters")})}async handleResize(){if(!this.getComputedWidth(this.el))return;let t=await this.findFilterCutoffIndex(),e=t!==this._filterCutoffIndex;if(e&&(this._filterCutoffIndex=t,await (0,l.a)(),this.sortVisibleAndOverflowFilters(),this._dropdownMenuEl)){let t=this._dropdownMenuEl.querySelector((0,o.g)("market-dropdown"));(null==t?void 0:t.expanded)&&(null==t||t.closeDropdown())}this.checkIfSearchShouldBeCompact()}async checkIfSearchShouldBeCompact(){var t,e;if(!this._slottedInputSearchEl||this._slottedInputSearchEl.hasAttribute("focused"))return;let r=(null==window?void 0:window.innerWidth)<=n.y,i=Boolean(null===(t=this._filterEls)||void 0===t?void 0:t.length),o=this._filterEls.length>(null!==(e=this.maxVisibleFilters)&&void 0!==e?e:3),l=i&&(r||o);l!==this._slottedInputSearchEl.hasAttribute("compact")&&(this._slottedInputSearchEl.getAttribute("focused")&&await this._slottedInputSearchEl.setFocus(!1),l?this._slottedInputSearchEl.setAttribute("compact",""):this._slottedInputSearchEl.removeAttribute("compact"))}handleInputSearchTabKeydown(t){var e;"Tab"===t.key&&!t.shiftKey&&(null===(e=this._filterEls)||void 0===e?void 0:e.length)&&(t.preventDefault(),this._slottedInputSearchEl.blur(),this._willFocusOnFirstFilter=!0)}handleInputSearchFocus(){var t,e;let r=null===(e=null===(t=this._dropdownMenuEl)||void 0===t?void 0:t.shadowRoot)||void 0===e?void 0:e.querySelector((0,o.g)("market-dropdown"));(null==r?void 0:r.hasAttribute("expanded"))&&r.closeDropdown()}registerSlottedInputSearch(){var t,e,r,i,n,o,l,s;null===(e=null===(t=this._slottedInputSearchEl)||void 0===t?void 0:t.removeEventListener)||void 0===e||e.call(t,"keydown",this.handleInputSearchTabKeydown),null===(i=null===(r=this._slottedInputSearchEl)||void 0===r?void 0:r.removeEventListener)||void 0===i||i.call(r,"focus",this.handleInputSearchFocus),this._slottedInputSearchEl=this.el.querySelector('[slot="search"]'),null===(o=null===(n=this._slottedInputSearchEl)||void 0===n?void 0:n.addEventListener)||void 0===o||o.call(n,"keydown",this.handleInputSearchTabKeydown.bind(this)),null===(s=null===(l=this._slottedInputSearchEl)||void 0===l?void 0:l.addEventListener)||void 0===s||s.call(l,"focus",this.handleInputSearchFocus.bind(this)),this.checkIfSearchShouldBeCompact()}registerSlottedFilters(){this._filterEls=[...this.el.children].filter(t=>(0,o.i)(t,"market-filter"))}observeContent(t){this._observers.content||(this._observers.content=new ResizeObserver(this.throttledHandleResize),this._observers.content.observe(t))}filtersOnSlotChangeHandler(){this.registerSlottedFilters(),this.handleResize()}connectedCallback(){this._observers.host||(this._observers.host=new ResizeObserver(this.throttledHandleResize),this._observers.host.observe(this.el))}componentWillLoad(){this.registerSlottedFilters(),this.registerSlottedInputSearch(),this.handleResize()}componentWillRender(){var t,e,r;this._willFocusOnFirstFilter&&(null===(r=null===(e=null===(t=this._filterEls)||void 0===t?void 0:t[0])||void 0===e?void 0:e.setFocus)||void 0===r||r.call(e),this._willFocusOnFirstFilter=!1)}
1disconnectedCallback(){Object.entries(this._observers).forEach(([t,e])=>{e&&(e.disconnect(),this._observers[t]=void 0)})}render(){var t,e;let r=null===(e=null===(t=this._filterEls)||void 0===t?void 0:t[0])||void 0===e?void 0:e.size,n=(0,o.g)("market-filter-dropdown-menu");return(0,i.h)(i.H,{key:"e62a60c714982d50c6b68d72b3d82decb3431d40",class:"market-filter-group"},(0,i.h)("div",{key:"896e5b89b87f1d6547d63606656ab21b4d1cda0a",class:"content",ref:t=>this.observeContent(t)},(0,i.h)("slot",{key:"c465b4ccd8a75dd8be200e79906667a99ce71771",name:"search",onSlotchange:()=>this.registerSlottedInputSearch()}),(0,i.h)("slot",{key:"1ae32aa8991e3f9f9174a27c9848725a63b1c94e",name:"filters",onSlotchange:()=>this.filtersOnSlotChangeHandler()}),this._sortedFilterEls.overflow.length>0&&(0,i.h)(n,{key:"7062f0c4dfa911eafd17d5136bf85d7ceefa984a",class:"dropdown-menu",size:r,ref:t=>this._dropdownMenuEl=t},(0,i.h)("slot",{key:"125027747b32fc9f43b16193d93a6223fa006e0e",name:"overflow-filters",slot:"overflow-filters"}))))}get el(){return(0,i.g)(this)}static get watchers(){return{maxVisibleFilters:["maxVisibleFiltersWatcher"]}}};u.style=':host,::slotted(*),*{box-sizing:border-box}:host([disabled]){cursor:not-allowed !important;}:host([disabled]) *,:host([disabled]) ::slotted(*){cursor:not-allowed !important;pointer-events:none !important;}:host *{outline-color:var(--core-focus-ring-color)}:host(:focus-visible),::slotted(*:focus-visible){outline:var(--core-focus-ring-border-size) solid var(--core-focus-ring-color);outline-offset:var(--core-focus-ring-buffer-size)}::slotted(a),::slotted(button){border-radius:1px}:host{--filter-group-margin:var(--core-metrics-spacing-200);--filter-group-search-width:280px;display:flex;margin:var(--filter-group-margin)}.content{--filter-group-button-spacing:var(--core-metrics-spacing-100);display:flex;flex:1;flex-flow:row nowrap;gap:var(--filter-group-button-spacing, var(--core-metrics-spacing-100))}::slotted([slot="search"]){max-width:var(--filter-group-search-width)}::slotted([slot="search"]:not([compact])){min-width:var(--filter-group-search-width)}::slotted([slot="search"][focused]){flex:1 1 var(--filter-group-search-width)}@media (max-width: 599px){.content{justify-content:space-between}::slotted([slot="search"]){max-width:unset}::slotted([slot="search"][focused]){flex:1}::slotted([slot="filters"]){display:inline-flex;flex:1}}'},70171:function(t,e,r){r.d(e,{a:function(){return i}});function i(){return new Promise(t=>{var e;(null===(e=null==window?void 0:window.requestAnimationFrame)||void 0===e?void 0:e.call(window,()=>t()))||t()})}},8162:function(t,e,r){r.d(e,{a:function(){return h},t:function(){return b}});var i=r(19036),n=r(7364),o=/\s/,l=/^\s+/,s=0/0,u=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,d=/^0o[0-7]+$/i,c=parseInt;function h(t){if("number"==typeof t)return t;if((0,n.i)(t))return s;if((0,i.i)(t)){var e,r="function"==typeof t.valueOf?t.valueOf():t;t=(0,i.i)(r)?r+"":r}if("string"!=typeof t)return 0===t?t:+t;t=(e=t)?e.slice(0,function(t){for(var e=t.length;e--&&o.test(t.charAt(e)););return e}(e)+1).replace(l,""):e;var h=a.test(t);return h||d.test(t)?c(t.slice(2),h?2:8):u.test(t)?s:+t}let f=function(){return i.r.Date.now()};var v=Math.max,p=Math.min;function b(t,e,r){var n=!0,o=!0;if("function"!=typeof t)throw TypeError("Expected a function");return(0,i.i)(r)&&(n="leading"in r?!!r.leading:n,o="trailing"in r?!!r.trailing:o),function(t,e,r){var n,o,l,s,u,a,d=0,c=!1,b=!1,w=!0;if("function"!=typeof t)throw TypeError("Expected a function");function g(e){var r=n,i=o;return n=o=void 0,d=e,s=t.apply(i,r)}function m(t){var r=t-a,i=t-d;return void 0===a||r>=e||r<0||b&&i>=l}function y(){var t,r,i,n=f();if(m(n))return _(n);u=setTimeout(y,(t=n-a,r=n-d,i=e-t,b?p(i,l-r):i))}function _(t){return(u=void 0,w&&n)?g(t):(n=o=void 0,s)}function S(){var t,r=f(),i=m(r);if(n=arguments,o=this,a=r,i){if(void 0===u)return d=t=a,u=setTimeout(y,e),c?g(t):s;if(b)return clearTimeout(u),u=setTimeout(y,e),g(a)}return void 0===u&&(u=setTimeout(y,e)),s}return e=h(e)||0,(0,i.i)(r)&&(c=!!r.leading,l=(b="maxWait"in r)?v(h(r.maxWait)||0,e):l,w="trailing"in r?!!r.trailing:w),S.cancel=function(){void 0!==u&&clearTimeout(u),d=0,n=a=o=u=void 0},S.flush=function(){return void 0===u?s:_(f())},S}(t,e,{leading:n,maxWait:e,trailing:o})}}}]);

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.