{"version":3,"file":"FC_SortButton.DBMAfVBh.mjs","names":["React.useState","React.useRef","React.useCallback","products","urlParams","error","type","active","value","p","matches","debounce","React.Component","React.useState","React.useMemo","React.useCallback"],"sources":["https:/framerusercontent.com/modules/Hk0F8C2ru2KtdcLr7KmL/LQFgyVryymI71uln2dK3/FC_CatalogDisplay.js","https:/framerusercontent.com/modules/4w9sJWojogi6mWAJoJH9/yWDuikQSaQQDOJT4sG0Q/FC_SortButton.js"],"sourcesContent":["/*\n * Framer Commerce\n * Confidential and Proprietary - All Rights Reserved\n * Unauthorized use, reproduction, distribution, or disclosure of this\n * source code or any related information is strictly prohibited.\n *\n * This software is the exclusive property of Framer Commerce (\"Company\").\n * It is considered highly confidential and proprietary information.\n *\n * Any use, copying, modification, distribution, or sharing of this software,\n * in whole or in part, without the express written permission of the Company\n * is strictly prohibited and may result in legal action.\n *\n * DISCLAIMER: This software does not provide any express or\n * implied warranties, including, but not limited to, the implied warranties\n * of merchantability and fitness for a particular purpose. In no event shall\n * Framer Commerce be liable for any direct, indirect, incidental, special,\n * exemplary, or consequential damages (including, but not limited to, procurement\n * of substitute goods or services; loss of use, data, or profits; or business\n * interruption) however caused and on any theory of liability, whether in\n * contract, strict liability, or tort (including negligence or otherwise)\n * arising in any way out of the use of this software, even if advised of\n * the possibility of such damage.\n *\n * Any unauthorized possession, use, copying, distribution, or dissemination\n * of this software will be considered a breach of confidentiality and may\n * result in legal action.\n *\n * For inquiries, contact:\n * Framer Commerce\n * Email: hello@framercommerce.com\n *\n * © 2025 Butter Supply Inc. All Rights Reserved.\n */function _define_property(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{debounce}from\"lodash-es\";import{parseUrlFilters,updateUrlWithFilters}from\"https://framerusercontent.com/modules/A55TPw8oJtDToWtsjcDZ/efvR3aKErSMemVA7DBdP/filterMappings.js\";// Global state management to prevent duplicate instances\nconst globalSortState={instances:new Set,eventListeners:new Map,cleanup:()=>{globalSortState.instances.clear();globalSortState.eventListeners.forEach((listener,event)=>{window.removeEventListener(event,listener);});globalSortState.eventListeners.clear();},lastUrl:typeof window!==\"undefined\"?window.location.href:\"\",isBackToFilter:false};// Ensure cleanup on page unload\nif(typeof window!==\"undefined\"){window.addEventListener(\"beforeunload\",globalSortState.cleanup);}// Helper function to find 13-digit number\nfunction findDeep13DigitNumber(obj){if(typeof obj===\"string\"){const match=obj.match(/\\d{12,}/);if(match)return match[0];return null;}if(!obj||typeof obj!==\"object\")return null;for(const key in obj){if(Array.isArray(obj[key])||typeof obj[key]===\"object\"){const found=findDeep13DigitNumber(obj[key]);if(found)return found;}else if(typeof obj[key]===\"string\"){const match=obj[key].match(/\\d{12,}/);if(match)return match[0];}}return null;}class ErrorBoundary extends React.Component{static getDerivedStateFromError(error){return{hasError:true,error};}componentDidCatch(error,errorInfo){console.error(\"CMS Error:\",error,errorInfo);}render(){if(this.state.hasError){return /*#__PURE__*/_jsx(\"div\",{style:{padding:20,color:\"red\"},children:\"Something went wrong loading the CMS content.\"});}// @ts-ignore: TypeScript doesn't recognize props in this context\nreturn this.props.children;}constructor(props){super(props);_define_property(this,\"state\",{hasError:false,error:null});}}// Let's add a helper function for consistent logging\nconst logDebug=(component,action,data)=>{// console.log(`🔍 [${component}] ${action}:`, data)\n};// Helper function to get active search fields based on scope settings\nfunction getActiveSearchFields(scope){const fields=[];if(scope?.title)fields.push(\"title\");if(scope?.productType)fields.push(\"productType\");if(scope?.productTag)fields.push(\"tags\");if(scope?.collection)fields.push(\"collections\");if(scope?.vendor)fields.push(\"vendor\");if(scope?.variants)fields.push(\"variants\");if(scope?.customColor)fields.push(\"customColor\");return fields;}/**\n * @framerDisableUnlink\n */export default function FC_CatalogDisplay(props){// State declarations at the top of the component\nconst[isLoading,setIsLoading]=React.useState(true);const[sortedChildren,setSortedChildren]=React.useState(null);const[products,setProducts]=React.useState([]);const[favorites,setFavorites]=React.useState([]);const[isTransitioning,setIsTransitioning]=React.useState(false);const[isSettling,setIsSettling]=React.useState(false);// console.log(\"🚨🚨🚨 COMPONENT MOUNTED 🚨🚨🚨\", {\n//     hasCollection: !!props.Collection,\n//     hasProducts:\n//         typeof window !== \"undefined\" && !!window.shopXtools?.products,\n//     url: typeof window !== \"undefined\" ? window.location.href : null,\n// })\n// Keep a log of component initialization\nlogDebug(\"ProductSort\",\"Component initializing\",{props:Object.keys(props)});const{Collection,pageType,Filters}=props;const transitionTimeoutRef=React.useRef(null);const settlingTimeoutRef=React.useRef(null);const lastUpdateRef=React.useRef(null);const urlParams=typeof window!==\"undefined\"?new URLSearchParams(window.location.search):new URLSearchParams;// Add pagination state\nconst[currentPage,setCurrentPage]=React.useState(()=>{if(typeof window!==\"undefined\"){const pageParam=urlParams.get(\"page\");return pageParam?parseInt(pageParam):1;}return 1;});const[hasMore,setHasMore]=React.useState(false);const observerRef=React.useRef(null);const loadMoreRef=React.useRef(null);const itemsPerPage=props.Pagination?.items||8;// Add state to maintain full product list\nconst[allProducts,setAllProducts]=React.useState([]);const[displayedProducts,setDisplayedProducts]=React.useState([]);// Function to get paginated products\nconst getPaginatedProducts=React.useCallback(products=>{if(!props.Pagination?.enable||!Array.isArray(products))return products;let startIndex,endIndex,paginatedProducts;switch(props.Pagination.type){case\"load_more\":// For Load More, show all items up to current page\nstartIndex=0;endIndex=currentPage*itemsPerPage;paginatedProducts=products.slice(startIndex,endIndex);const hasMoreLoadMore=endIndex<products.length;setHasMore(hasMoreLoadMore);if(!hasMoreLoadMore){const hasMoreItemsEvent=new CustomEvent(\"hide-loadmore-button\",{detail:{hasMoreItems:hasMoreLoadMore}});document.dispatchEvent(hasMoreItemsEvent);//console.log(\"hide-loadmore-button dispatched\", hasMoreItemsEvent)\n}break;case\"next_prev\":// For Next/Previous, show only current page items\nstartIndex=(currentPage-1)*itemsPerPage;endIndex=startIndex+itemsPerPage;paginatedProducts=products.slice(startIndex,endIndex);const hasMoreNextPrev=endIndex<products.length;setHasMore(hasMoreNextPrev);const updateNextPrevButtonsEvent=new CustomEvent(\"update_next_prev_buttons\",{detail:{hasMoreItems:hasMoreNextPrev,type:props.Pagination?.type,currentPage}});document.dispatchEvent(updateNextPrevButtonsEvent);break;case\"infinite\":// For Infinite Scroll, show all items up to current page\nstartIndex=0;endIndex=currentPage*itemsPerPage;paginatedProducts=products.slice(startIndex,endIndex);const hasMoreInfinite=endIndex<products.length;setHasMore(hasMoreInfinite);break;default:return products;}return paginatedProducts;},[currentPage,itemsPerPage,props.Pagination?.enable,props.Pagination?.type]);// Add effect to handle URL pagination parameters\nReact.useEffect(()=>{if(typeof window===\"undefined\"||!props.Pagination?.enable)return;const url=new URL(window.location.href);const urlParams=new URLSearchParams(url.search);// // Update page parameter\n// if (props.Pagination?.enable) {\n//     if (currentPage > 1) {\n//         urlParams.set(\"page\", currentPage.toString())\n//     } else {\n//         urlParams.delete(\"page\")\n//     }\n// } else {\n//     urlParams.delete(\"page\")\n// }\n// // Update URL without triggering a page reload\n// window.history.pushState(\n//     { page: currentPage },\n//     \"\",\n//     url.toString()\n// )\nif(currentPage>1){urlParams.set(\"page\",currentPage.toString());}else{urlParams.delete(\"page\");}const newUrl=`${url.pathname}?${urlParams.toString()}`;if(newUrl!==window.location.pathname+window.location.search){//console.log(\"📌 Pushing new page URL:\", newUrl)\nwindow.history.pushState({page:currentPage},\"\",newUrl);}},[currentPage,props.Pagination?.enable]);// Update the infinite scroll effect\nReact.useEffect(()=>{if(!props.Pagination?.enable||props.Pagination?.type!==\"infinite\"||typeof window===\"undefined\")return;console.log(\"[CMS] Setting up infinite scroll observer\",{hasMore,isLoading,currentPage,loadMoreRefExists:!!loadMoreRef.current});const observer=new IntersectionObserver(entries=>{const target=entries[0];console.log(\"[CMS] Intersection observed:\",{isIntersecting:target.isIntersecting,hasMore,isLoading,currentPage});if(target.isIntersecting&&hasMore&&!isLoading){console.log(\"[CMS] Loading more items, incrementing page\");setCurrentPage(prev=>prev+1);}},{root:null,rootMargin:\"100px\",threshold:.1});if(loadMoreRef.current){console.log(\"[CMS] Observing load more trigger element\");observer.observe(loadMoreRef.current);}return()=>{if(observer){console.log(\"[CMS] Cleaning up observer\");observer.disconnect();}};},[hasMore,props.Pagination?.enable,props.Pagination?.type,isLoading,currentPage]);// Update the sorted children wrapper to include the infinite scroll trigger\nconst updateSortedChildrenWithTransition=newChildren=>{if(!newChildren){console.warn(\"[CMS] Received null/undefined children\");return;}// console.log(\"[CMS] Starting transition update:\", {\n//     totalChildren: newChildren.length,\n//     currentPage,\n//     paginationType: props.Pagination?.type,\n//     hasMore,\n// })\n// Store the full list\nsetAllProducts(newChildren);// Get paginated subset for display\nconst paginatedChildren=getPaginatedProducts(newChildren);//console.log(\"[CMS] hasMore:\", hasMore)\n// Add infinite scroll trigger if needed\nif(props.Pagination?.enable&&props.Pagination?.type===\"infinite\"&&hasMore&&paginatedChildren.length>0){console.log(\"[CMS] Adding infinite scroll trigger\");paginatedChildren.push(/*#__PURE__*/_jsx(\"div\",{ref:loadMoreRef,style:{width:\"100%\",height:\"50px\",gridColumn:\"1 / -1\",opacity:0,pointerEvents:\"none\"}},\"infinite-scroll-trigger\"));}logDebug(\"ProductSort\",\"Updating sorted children with transition\",{totalChildren:newChildren.length,paginatedChildren:paginatedChildren.length,currentPage,isSettling,hasMore});const now=Date.now();if(lastUpdateRef.current&&now-lastUpdateRef.current<100){setIsSettling(true);if(settlingTimeoutRef.current){clearTimeout(settlingTimeoutRef.current);}//console.log(\"[CMS] Delaying transition\")\nsettlingTimeoutRef.current=setTimeout(()=>{setIsSettling(false);setDisplayedProducts(paginatedChildren);performTransition(paginatedChildren);},150);}else{//console.log(\"[CMS] Immediate transition\")\nsetDisplayedProducts(paginatedChildren);performTransition(paginatedChildren);}lastUpdateRef.current=now;};// Add logging for URL parameters\nif(typeof window!==\"undefined\"){logDebug(\"ProductSort\",\"URL parameters on init\",{url:window.location.href,params:Object.fromEntries(urlParams.entries())});}const[sortConfig,setSortConfig]=React.useState(()=>{// First try to get sort from URL parameter\nif(typeof window!==\"undefined\"){const urlParams=new URLSearchParams(window.location.search);const sortParam=urlParams.get(\"sort\");logDebug(\"ProductSort\",\"Sort parameter from URL\",{sortParam});if(sortParam){// Map URL sort parameter to internal sort configuration\nswitch(sortParam){case\"relevance\":return{type:\"relevancy\",sortBy:\"relevancy\",sortDirection:null};case\"title_asc\":return{type:\"name\",sortBy:\"name\",sortDirection:\"aToZ\"};case\"title_desc\":return{type:\"name\",sortBy:\"name\",sortDirection:\"zToA\"};case\"price_asc\":return{type:\"price\",sortBy:\"price\",sortDirection:\"lowToHigh\"};case\"price_desc\":return{type:\"price\",sortBy:\"price\",sortDirection:\"highToLow\"};case\"newest\":return{type:\"created\",sortBy:\"created\",sortDirection:\"newest\"};case\"best_selling\":return{type:\"best-selling\",sortBy:\"best-selling\",sortDirection:null};}}// Then check session storage\nconst storedSort=sessionStorage.getItem(\"sortBy\");if(storedSort){switch(storedSort){case\"relevance\":return{type:\"relevancy\",sortBy:\"relevancy\",sortDirection:null};case\"title_asc\":return{type:\"name\",sortBy:\"name\",sortDirection:\"aToZ\"};case\"title_desc\":return{type:\"name\",sortBy:\"name\",sortDirection:\"zToA\"};case\"price_asc\":return{type:\"price\",sortBy:\"price\",sortDirection:\"lowToHigh\"};case\"price_desc\":return{type:\"price\",sortBy:\"price\",sortDirection:\"highToLow\"};case\"newest\":return{type:\"created\",sortBy:\"created\",sortDirection:\"newest\"};case\"best_selling\":return{type:\"best-selling\",sortBy:\"best-selling\",sortDirection:null};}}}// If no URL parameter or session storage, use the default sort from props\nswitch(props.defaultSort){case\"relevance\":return{type:\"relevancy\",sortBy:\"relevancy\",sortDirection:null};case\"title_asc\":return{type:\"name\",sortBy:\"name\",sortDirection:\"aToZ\"};case\"title_desc\":return{type:\"name\",sortBy:\"name\",sortDirection:\"zToA\"};case\"price_asc\":return{type:\"price\",sortBy:\"price\",sortDirection:\"lowToHigh\"};case\"price_desc\":return{type:\"price\",sortBy:\"price\",sortDirection:\"highToLow\"};case\"newest\":return{type:\"created\",sortBy:\"created\",sortDirection:\"newest\"};case\"best_selling\":return{type:\"best-selling\",sortBy:\"best-selling\",sortDirection:null};default:return{type:\"relevancy\",sortBy:\"relevancy\",sortDirection:null};}});const[filters,setFilters]=React.useState(()=>{//console.log(\"props.display for scopes\", props.display)\n// Create the initial filter state based on props\nconst initialFilters={collection:{active:props.display===\"Collection\"&&props.value?true:false,values:props.display===\"Collection\"&&props.value?[props.value]:[]},product_type:{active:props.display===\"Product Type\"&&props.value?true:false,values:props.display===\"Product Type\"&&props.value?[props.value]:[]},product_tag:{active:props.display===\"Product Tag\"&&props.value?true:false,values:props.display===\"Product Tag\"&&props.value?[props.value]:[]},on_sale:{active:false,value:true},in_stock:{active:false,value:true},bundle:{active:false,value:true},subscription:{active:false,value:true},price:{active:false,values:[]},discount_amount:{active:false,values:[]},discount_percent:{active:false,values:[]},variant:{active:false,values:[]}};// Log the initial filter state\nlogDebug(\"ProductSort\",\"Initial filter state created\",{display:props.display,value:props.value,filters:initialFilters,activeFilters:Object.entries(initialFilters).filter(([key,filter])=>filter.active).reduce((acc,[key,filter])=>({...acc,[key]:filter}),{})});// First try to parse filters directly from URL\nif(typeof window!==\"undefined\"){const url=new URL(window.location.href);logDebug(\"ProductSort\",\"Attempting to parse filters from URL for scopes\",{url:url.toString(),search:url.search});try{const urlFilters=parseUrlFilters(url.searchParams);logDebug(\"ProductSort\",\"Filters parsed from URL for scopes\",urlFilters);if(urlFilters&&Object.keys(urlFilters).length>0){const activeFilters=Object.entries(urlFilters).filter(([key,filter])=>filter.active).reduce((acc,[key,filter])=>({...acc,[key]:filter}),{});logDebug(\"ProductSort\",\"Active filters from URL for scopes\",activeFilters);if(Object.keys(activeFilters).length>0){// Merge URL filters with initial scope instead of replacing them\nconst mergedFilters={...initialFilters};logDebug(\"ProductSort\",\"Merged filters from URL for scopes\",mergedFilters);// For each filter type that has an initial scope, ensure it's preserved\nif(props.display===\"Collection\"&&props.value){mergedFilters.collection={active:true,values:[props.value]};}else if(props.display===\"Product Type\"&&props.value){mergedFilters.product_type={active:true,values:[props.value]};}else if(props.display===\"Product Tag\"&&props.value){mergedFilters.product_tag={active:true,values:[props.value]};}// console.log(\"Props - Tag:\", {\n//     active:\n//         props.display === \"Product Tag\" && props.value\n//             ? true\n//             : false,\n//     values:\n//         props.display === \"Product Tag\" && props.value\n//             ? [props.value]\n//             : [],\n// })\n// console.log(\"Props:\", props.display)\n// Then apply URL filters for other filter types\nObject.entries(urlFilters).forEach(([key,filter])=>{if(key===\"collection\"&&props.display===\"Collection\"&&props.value||key===\"product_type\"&&props.display===\"Product Type\"&&props.value||key===\"product_tag\"&&props.display===\"Product Tag\"&&props.value){// Merge values for the scoped filter\nmergedFilters[key]={active:true,values:[...new Set([...mergedFilters[key].values,...filter.values||[]])]};}else{// For non-scoped filters, use the URL filter\nmergedFilters[key]=filter;}});logDebug(\"ProductSort\",\"Merged filters\",mergedFilters);return mergedFilters;}}}catch(error){console.error(\"❌ Error parsing URL filters:\",error);}}// If no URL filters or error, return the initial filters\nreturn initialFilters;});// Add search state\nconst[searchConfig,setSearchConfig]=React.useState(()=>{// Initialize from URL parameter if it exists\nif(typeof window!==\"undefined\"){const urlParams=new URLSearchParams(window.location.search);const searchParam=urlParams.get(\"search\");// console.log(\"🔍 Initializing search from URL:\", {\n//     url: window.location.href,\n//     searchParam,\n//     allParams: Object.fromEntries(urlParams.entries()),\n// })\nif(searchParam){return{term:searchParam,fields:getActiveSearchFields(props.Search?.Scope),active:true};}}return{term:\"\",fields:getActiveSearchFields(props.Search?.Scope),active:false};});// Add effect to update search fields when scope changes\nReact.useEffect(()=>{setSearchConfig(prev=>({...prev,fields:getActiveSearchFields(props.Search?.Scope)}));},[props.Search?.Scope]);// Adjust initial state based on search settings\nReact.useEffect(()=>{if(props.Search.initialSearchState===\"none\"&&props.Search.enableSearch&&!searchConfig.term){// console.log(\"Applying initial 'none' state\")\nsetSortedChildren([])// Start with no products displayed\n;}},[props.Search.initialSearchState,props.Search.enableSearch,searchConfig.term]);// Memoize event handlers\nconst handleProductsReady=React.useCallback(e=>{logDebug(\"ProductSort\",\"Products ready event received\",{eventType:e.type,shopXToolsAvailable:typeof window!==\"undefined\"&&!!window.shopXtools,shopXProductsCount:typeof window!==\"undefined\"?window.shopXtools?.products?.length:0});// First try to get products from shopXtools\nif(typeof window!==\"undefined\"&&window.shopXtools?.products){// console.log(\"🚨 Setting products from shopXtools 🚨\", {\n//     count: window.shopXtools.products.length,\n//     sample: window.shopXtools.products[0]?.node,\n//     sampleTitle:\n//         window.shopXtools.products[0]?.node?.title ||\n//         \"No title\",\n//     hasNode: !!window.shopXtools.products[0]?.node,\n//     searchConfig: searchConfig,\n//     searchActive: searchConfig.active,\n//     searchTerm: searchConfig.term,\n// })\n// Important: shopXtools.products is already in the correct format with node structure\nsetProducts(window.shopXtools.products);// After setting products, force a re-filter if search is active\nif(searchConfig.active&&searchConfig.term){// console.log(\n//     \"🔍 Active search detected during product load, forcing re-filter\"\n// )\nsetSortedChildren(null);}}else if(Array.isArray(e.detail.products)){// console.log(\"🚨 Setting products from event 🚨\", {\n//     count: e.detail.products.length,\n//     sample: e.detail.products[0],\n//     sampleTitle:\n//         e.detail.products[0]?.node?.title || \"No title\",\n//     hasNode: !!e.detail.products[0]?.node,\n//     searchConfig: searchConfig,\n//     searchActive: searchConfig.active,\n//     searchTerm: searchConfig.term,\n// })\nsetProducts(e.detail.products);// After setting products, force a re-filter if search is active\nif(searchConfig.active&&searchConfig.term){// console.log(\n//     \"🔍 Active search detected during product load, forcing re-filter\"\n// )\nsetSortedChildren(null);}}},[searchConfig]);const handleSortChange=React.useCallback(e=>{setSortConfig(e.detail);setSortedChildren(null)// Reset sorted children to trigger resort\n;},[]);const handleFilterReset=React.useCallback(e=>{// console.log(\"Resetting filters\", e)\n// Check if we should reset to initial scope\nconst shouldResetToInitialScope=e?.detail?.resetToInitialScope===true;// console.log(\n//     \"Should reset to initial scope:\",\n//     shouldResetToInitialScope\n// )\nif(shouldResetToInitialScope){// Create a reset state that respects the initial filter scope\nconst resetFilters={collection:{active:props.display===\"Collection\"&&props.value?true:false,values:props.display===\"Collection\"&&props.value?[props.value]:[]},product_type:{active:props.display===\"Product Type\"&&props.value?true:false,values:props.display===\"Product Type\"&&props.value?[props.value]:[]},product_tag:{active:props.display===\"Product Tag\"&&props.value?true:false,values:props.display===\"Product Tag\"&&props.value?[props.value]:[]},on_sale:{active:false,value:true},in_stock:{active:false,value:true},bundle:{active:false,value:true},subscription:{active:false,value:true},price:{active:false,values:[]},discount_amount:{active:false,values:[]},discount_percent:{active:false,values:[]},variant:{active:false,values:[]}};// console.log(\"Resetting to initial filter scope:\", resetFilters)\nsetFilters(resetFilters);}else{// Reset all filters to inactive\nsetFilters({collection:{active:false,values:[]},product_type:{active:false,values:[]},product_tag:{active:false,values:[]},on_sale:{active:false,value:true},in_stock:{active:false,value:true},bundle:{active:false,value:true},subscription:{active:false,value:true},price:{active:false,values:[]},discount_amount:{active:false,values:[]},discount_percent:{active:false,values:[]},variant:{active:false,values:[]}});}setSortedChildren(null)// Reset sorted children to trigger filter reset\n;},[props.display,props.value]);const handleFilter=React.useCallback(e=>{const{type,value,active}=e.detail;// console.log(\n//     \"Received filter event:\",\n//     e?.detail || \"Reset filter event is not receieved\"\n// )\nlogDebug(\"ProductSort\",\"Processing filter event\",{type:e.detail.type,group:e.detail.group,active:e.detail.active,value:e.detail.value,filterType:e.detail.filterType,componentId:e.detail.componentId});// Check if this filter matches the initial filter scope\nconst isInitialFilter=type===\"collection\"&&props.display===\"Collection\"&&props.value===value||type===\"product_type\"&&props.display===\"Product Type\"&&props.value===value||type===\"product_tag\"&&props.display===\"Product Tag\"&&props.value===value;// If this is the initial filter and we're trying to deactivate it, ignore the event\nif(isInitialFilter&&!active){// console.log(\"Ignoring deactivation of initial filter scope\")\nreturn;}// Continue with normal filter handling\nsetFilters(prev=>{const newFilters={...prev};const{type,group,active,value,filterType,variantStockFilter}=e.detail;// console.log(\"Processing filter:\", {\n//     type,\n//     group,\n//     active,\n//     value,\n//     filterType,\n//     variantStockFilter,\n// })\n// Log previous state of this filter\nlogDebug(\"ProductSort\",\"Filter state before update\",{filterType:type,previousState:prev[type]||\"not set\",newActive:active,newValue:value});// Use filterMappings to handle the filter\nif(type.startsWith(\"variant_\")){// Handle dynamic variant filters\nconst variantName=type.replace(\"variant_\",\"\");// Add more comprehensive debugging for variant filters\n// console.log(\"🚨 Processing variant filter:\", {\n//     type,\n//     variantName,\n//     active,\n//     variantStockFilter,\n//     value,\n//     isMultiValue:\n//         typeof value === \"string\" && value.includes(\",\"),\n//     multipleValues:\n//         typeof value === \"string\" && value.includes(\",\")\n//             ? value.split(\",\").filter(Boolean)\n//             : null,\n//     currentVariantValues:\n//         newFilters.variant?.values?.filter(\n//             (v) => v.name === variantName\n//         ) || [],\n//     rawValue: value,\n//     decodedValue:\n//         typeof value === \"string\"\n//             ? decodeURIComponent(value)\n//             : value,\n// })\nif(active){if(!newFilters.variant){newFilters.variant={active:true,values:[],variantStockFilter:variantStockFilter||undefined};}else if(variantStockFilter){newFilters.variant.variantStockFilter=variantStockFilter;}// Check if value is a comma-separated list - support both encoded and decoded commas\n// Both %2C and , should be treated as delimiters\nlet valueToProcess=value;if(typeof value===\"string\"){// First decode the value to handle any URL encoding\nvalueToProcess=decodeURIComponent(value);}if(typeof valueToProcess===\"string\"&&valueToProcess.includes(\",\")){// Handle multiple comma-separated values (OR condition)\nconst variantValues=valueToProcess.split(\",\").filter(Boolean);// console.log(\"Processing multiple variant values:\", {\n//     variantName,\n//     variantValues,\n//     original: valueToProcess,\n// })\n// Add each value as a separate entry\nvariantValues.forEach(val=>{// Check if this value already exists to avoid duplicates\nconst exists=newFilters.variant.values.some(v=>v.name.toLowerCase()===variantName.toLowerCase()&&v.value.toLowerCase()===val.trim().toLowerCase());if(!exists){newFilters.variant.values.push({name:variantName,value:val.trim()});}});}else{// Handle single value\n// Check if this value already exists\nconst exists=newFilters.variant.values.some(v=>v.name.toLowerCase()===variantName.toLowerCase()&&v.value.toLowerCase()===String(valueToProcess).toLowerCase());if(!exists){newFilters.variant.values.push({name:variantName,value:valueToProcess});}}newFilters.variant.active=true;}else{if(newFilters.variant&&newFilters.variant.values){// console.log(\n//     \"[Variant Removal] Initial variant values:\",\n//     newFilters.variant.values\n// )\n// Check if we're removing a comma-separated list - support both encoded and decoded commas\nlet valueToProcess=value;// console.log(\n//     \"[Variant Removal] Value to process\",\n//     valueToProcess\n// )\nif(typeof value===\"string\"){// First decode the value to handle any URL encoding\nvalueToProcess=decodeURIComponent(value);// console.log(\n//     \"[Variant Removal] Value to process (decoded)\",\n//     valueToProcess\n// )\n}if(typeof valueToProcess===\"string\"&&valueToProcess.includes(\",\")){const variantValues=valueToProcess.split(\",\").filter(Boolean);// console.log(\n//     \"[Variant Removal] Comma-separated variant values:\",\n//     variantValues\n// )\n// Remove each value individually (case-insensitive)\nnewFilters.variant.values=newFilters.variant.values.filter(v=>{const nameMatches=v.name.toLowerCase()===variantName.toLowerCase();const valueMatches=v.value.toLowerCase()===String(valueToProcess).toLowerCase();const shouldRemove=nameMatches&&valueMatches;// console.log(\n//     \"[Variant Removal] Checking variant:\",\n//     {\n//         variant: v,\n//         nameMatches,\n//         valueMatches,\n//         shouldRemove,\n//     }\n// )\nreturn!shouldRemove;});}else{// Remove single value (case-insensitive)\nnewFilters.variant.values=newFilters.variant.values.filter(v=>{const nameMatches=v.name.toLowerCase()===variantName.toLowerCase();const valueMatches=v.value.toLowerCase()===String(valueToProcess).toLowerCase();const shouldRemove=nameMatches&&valueMatches;// console.log(\n//     \"[Variant Removal] Checking variant:\",\n//     {\n//         variant: v,\n//         nameMatches,\n//         valueMatches,\n//         shouldRemove,\n//     }\n// )\nreturn!shouldRemove;});}// console.log(\n//     \"[Variant Removal] Updated variant values:\",\n//     newFilters.variant.values\n// )\nnewFilters.variant.active=newFilters.variant.values.length>0;// console.log(\n//     \"[Variant Removal] Variant active state:\",\n//     newFilters.variant.active\n// )\n}}}else{// Handle other filter types\nswitch(type){case\"product_type\":case\"product_tag\":case\"collection\":logDebug(\"ProductSort\",`Processing ${type} filter`,{active,value,currentValues:newFilters[type].values});if(active){newFilters[type].values=[...newFilters[type].values||[],value];}else{newFilters[type].values=newFilters[type].values.filter(v=>v!==value);}newFilters[type].active=newFilters[type].values.length>0;logDebug(\"ProductSort\",`${type} filter updated`,{newActive:newFilters[type].active,newValues:newFilters[type].values});break;case\"price\":if(active){// console.log(\n//     \"🏷️ Processing ACTIVE price filter:\",\n//     {\n//         currentPriceFilter:\n//             newFilters.price.values,\n//         incomingValue: value,\n//     }\n// )\nif(!newFilters.price){newFilters.price={active:active,values:[]};}// Always ensure active state is set when adding ranges\nnewFilters.price.active=active;const newRange=value?.values?.[0];if(newRange){// console.log(\n//     \"🎯 Processing new price range:\",\n//     {\n//         newRange,\n//         priceType: newRange.priceType,\n//         currentRanges:\n//             newFilters.price.values,\n//     }\n// )\n// Format the range based on priceType\nconst formattedRange={priceType:newRange.priceType,min:newRange.priceType===\"Under\"?null:newRange.min,max:newRange.priceType===\"Over\"?null:newRange.max};const rangeExists=newFilters.price.values.some(range=>range.priceType===formattedRange.priceType&&range.min===formattedRange.min&&range.max===formattedRange.max);if(!rangeExists){newFilters.price.values.push(formattedRange);// console.log(\n//     \"✅ Added new price range. Updated ranges:\",\n//     newFilters.price.values\n// )\n}}}else{// console.log(\n//     \"🏷️ Processing INACTIVE price filter:\",\n//     {\n//         currentPriceFilter: newFilters.price,\n//         incomingValue: value,\n//     }\n// )\nif(newFilters.price.active&&newFilters.price.values){// Loop through incoming values and remove them from current filters\nvalue.values?.forEach(valueRange=>{newFilters.price.values=newFilters.price.values.filter(currentRange=>{// Check if the current range matches the incoming range\nconst isMatchingRange=currentRange.priceType===valueRange.priceType&&currentRange.min===valueRange.min&&currentRange.max===valueRange.max;return!isMatchingRange// Remove only the matching range\n;});});}// Update the active state based on remaining ranges\nnewFilters.price.active=newFilters.price.values.length>0;}break;case\"discount_amount\":case\"discount_percent\":const discountType=type;if(!newFilters[discountType]){newFilters[discountType]={active:false,values:[]};}if(active){// Add new discount range\nnewFilters[discountType].values.push(...value.values);}else{// Remove discount range\nnewFilters[discountType].values=newFilters[discountType].values.filter(range=>!value.values.some(v=>v.min===range.min&&v.max===range.max));}// Update active state\nnewFilters[discountType].active=newFilters[discountType].values.length>0;break;case\"on_sale\":case\"in_stock\":case\"bundle\":case\"subscription\":newFilters[type]={active:active,value:true};break;default:console.warn(\"Unhandled filter type:\",type);}}logDebug(\"ProductSort\",\"Updated filters\",{filterType:type,newFilterState:newFilters[type],allActiveFilters:Object.entries(newFilters).filter(([key,filter])=>filter.active).reduce((acc,[key,filter])=>({...acc,[key]:filter}),{})});return newFilters;});// Force reset sorted children to trigger re-filter and re-sort\nlogDebug(\"ProductSort\",\"Resetting sorted children to trigger re-filtering\",null);setSortedChildren(null);},[props.display,props.value]);// Add a new handler for search events\nconst handleSearch=React.useCallback(e=>{// Only process search if it's enabled\nif(!props.Search?.enableSearch){return;}setSearchConfig({term:e.detail.term,fields:getActiveSearchFields(props.Search?.Scope),active:!!e.detail.term});setSortedChildren(null);},[props.Search?.enableSearch,props.Search?.Scope]);// Load favorites from localStorage\nReact.useEffect(()=>{if(typeof window===\"undefined\")return;const loadFavorites=()=>{const storedFavorites=JSON.parse(localStorage.getItem(\"favorites\")||\"[]\");// console.log(\"Loaded favorites:\", storedFavorites)\nsetFavorites(storedFavorites);};loadFavorites();const handleFavoritesUpdate=e=>{// console.log(\"favorites_updated event\", e.detail)\nconst{favorites:newFavorites,action,productId}=e.detail||{};// Set isTransitioning early to prevent flash\nif(pageType===\"favorites\"&&action===\"remove\"){setIsTransitioning(true);}if(action===\"remove\"&&productId){// console.log(\"Removing from favorites:\", productId)\nsetFavorites(prev=>{const updatedFavorites=prev.filter(id=>id!==productId);// Only retrigger UI if we're in favorites display mode\nif(pageType===\"favorites\"){// If we have sorted children already, prepare for a smoother transition\nif(sortedChildren&&sortedChildren.length>0){// Filter out the removed product from current view without setting to null\nconst updatedChildren=sortedChildren.filter(child=>{const key=child.key||\"\";return key!==productId;});if(updatedChildren.length>0){performTransition(updatedChildren);}else{// If all items removed, then do a full reset\nsetSortedChildren(null);}}else{setSortedChildren(null);}}return updatedFavorites;});}else if(action===\"add\"&&productId){// console.log(\"Adding to favorites:\", productId)\nsetFavorites(prev=>{const updatedFavorites=[...prev,productId];// Only retrigger UI if we're in favorites display mode\nif(pageType===\"favorites\"){setSortedChildren(null);}return updatedFavorites;});}else{//(\"Loading favorites with loadFavorites\")\nloadFavorites();// Only retrigger UI if we're in favorites display mode\nif(pageType===\"favorites\"){setSortedChildren(null);}}};document.addEventListener(\"favorites-updated\",handleFavoritesUpdate);return()=>{document.removeEventListener(\"favorites-updated\",handleFavoritesUpdate);};},[pageType,sortedChildren]);// Use global state management for event listeners\nReact.useEffect(()=>{// console.log(\"🚨 Setting up event listeners 🚨\", {\n//     hasShopXTools: typeof window !== \"undefined\" && !!window.shopXtools,\n//     hasProducts:\n//         typeof window !== \"undefined\" && !!window.shopXtools?.products,\n//     productsCount:\n//         typeof window !== \"undefined\"\n//             ? window.shopXtools?.products?.length\n//             : 0,\n// })\n// Use global state management\nglobalSortState.instances.add(\"FC_CatalogDisplay\");// Add event listeners with proper typing\nconst handleProductsReadyEvent=e=>{// console.log(\"🚨 Received data__products-ready event 🚨\", {\n//     hasEventDetail: !!e,\n//     hasProducts: !!(e as any).detail?.products,\n//     productsCount: (e as any).detail?.products?.length || 0,\n// })\nconst customEvent=e;logDebug(\"ProductSort\",\"data__products-ready event received\",{hasProducts:!!customEvent.detail?.products,count:customEvent.detail?.products?.length||0});handleProductsReady(customEvent);};const handleSortChangeEvent=e=>{const customEvent=e;logDebug(\"ProductSort\",\"product-sort-change event received\",customEvent.detail);handleSortChange(customEvent);};const handleFilterResetEvent=e=>{const customEvent=e;logDebug(\"ProductSort\",\"filter-reset for reset event received\",customEvent.detail);handleFilterReset(customEvent);};const handleFilterChangeEvent=e=>{const customEvent=e;logDebug(\"ProductSort\",\"product-filter-change event received\",customEvent.detail);handleFilter(customEvent);};const handleSearchChangeEvent=e=>{const customEvent=e;logDebug(\"ProductSort\",\"product-search-change event received\",customEvent.detail);handleSearch(customEvent);};document.addEventListener(\"filter-reset\",handleFilterResetEvent);document.addEventListener(\"data__products-ready\",handleProductsReadyEvent);document.addEventListener(\"product-sort-change\",handleSortChangeEvent);document.addEventListener(\"product-filter-change\",handleFilterChangeEvent);document.addEventListener(\"product-search-change\",handleSearchChangeEvent);// Cleanup\nreturn()=>{globalSortState.instances.delete(\"FC_CatalogDisplay\");document.removeEventListener(\"data__products-ready\",handleProductsReadyEvent);document.removeEventListener(\"product-sort-change\",handleSortChangeEvent);document.removeEventListener(\"product-filter-change\",handleFilterChangeEvent);document.removeEventListener(\"product-search-change\",handleSearchChangeEvent);document.removeEventListener(\"filter-reset\",handleFilterReset);logDebug(\"ProductSort\",\"Event listeners cleaned up\",null);};},[handleProductsReady,handleSortChange,handleFilter,handleSearch,handleFilterReset]);// At the top of your component, add this debug log\nReact.useEffect(()=>{if(products.length>0){// console.log(\"Products data structure:\", {\n//     totalProducts: products.length,\n//     sampleProduct: products[0]?.node,\n//     allFields: products[0]?.node\n//         ? Object.keys(products[0].node)\n//         : [],\n//     allProductTypes: products\n//         .slice(0, 10)\n//         .map((p) => p.node?.productType), // Log first 10 product types\n//     activeFilters: Object.entries(filters)\n//         .filter(([key, filter]: [string, any]) => filter.active)\n//         .reduce(\n//             (acc, [key, filter]: [string, any]) => ({\n//                 ...acc,\n//                 [key]: filter,\n//             }),\n//             {}\n//         ),\n// })\n// Log a specific check for the filter value\nif(filters.product_type?.active){const filterValues=filters.product_type.values;const matchingProducts=products.filter(p=>{const productType=p.node?.productType;if(!productType)return false;return filterValues.some(filterValue=>productType.toLowerCase().includes(filterValue.toLowerCase()));});// console.log(\"Filter match check:\", {\n//     filterValues: filterValues,\n//     totalProducts: products.length,\n//     matchingProductsCount: matchingProducts.length,\n//     sampleMatches: matchingProducts.slice(0, 3).map((p) => ({\n//         title: p.node?.title,\n//         productType: p.node?.productType,\n//     })),\n// })\n}}},[products]);// At the top of your component, add this debug log\n// React.useEffect(() => {\n//     if (products.length > 0) {\n//         console.log(\"🔍 Debugging Product Structure:\", {\n//             firstProduct: products[0]?.node,\n//             hasSellingPlanGroups:\n//                 products[0]?.node?.sellingPlanGroups?.edges?.length > 0,\n//             variants: products[0]?.node?.variants?.edges?.map((edge) => ({\n//                 title: edge.node.title,\n//                 hasSellingPlans:\n//                     edge.node.sellingPlanAllocations?.edges?.length > 0,\n//                 sellingPlans: edge.node.sellingPlanAllocations?.edges,\n//             })),\n//         })\n//     }\n// }, [products])\n// Helper to get product details\nconst getProductDetails=React.useCallback(productId=>{logDebug(\"ProductSort\",\"Looking up product details\",{searchingForId:productId,fullId:`gid://shopify/Product/${productId}`,productsCount:products.length,usingShopXTools:typeof window!==\"undefined\"&&!!window.shopXtools});const fullId=`gid://shopify/Product/${productId}`;let product;// First try to find product in shopXtools\nif(typeof window!==\"undefined\"&&window.shopXtools?.products){product=window.shopXtools.products.find(({node})=>node.id===fullId)?.node;if(product){logDebug(\"ProductSort\",\"Found product in shopXtools\",{id:product.id,title:product.title});}}// Fall back to products state if not found in shopXtools\nif(!product){product=products.find(({node})=>node.id===fullId)?.node;}if(product){logDebug(\"ProductSort\",\"Raw product data found\",{id:product.id,title:product.title,rawProductType:product.productType,rawTags:product.tags,rawCollections:product.collections,fromShopXTools:!!window.shopXtools});return{id:product.id,title:product.title||\"\",price:product.priceRange?.minVariantPrice?.amount?parseFloat(product.priceRange.minVariantPrice.amount):0,productType:product.productType||\"\",tags:product.tags||[],compareAtPrice:product.compareAtPriceRange?.minVariantPrice?.amount?parseFloat(product.compareAtPriceRange.minVariantPrice.amount):0,isOnSale:product.compareAtPriceRange?.minVariantPrice?.amount?parseFloat(product.compareAtPriceRange.minVariantPrice.amount)>parseFloat(product.priceRange?.minVariantPrice?.amount||\"0\"):false,collections:Array.isArray(product.collections)?product.collections.map(c=>c.title):[],options:product.options||[],variants:product.variants?.edges||[],sellingPlanGroups:product.sellingPlanGroups?.edges||[],hasProductLevelPlans:product.sellingPlanGroups?.edges?.length>0,hasVariantLevelPlans:product.variants?.edges?.some(edge=>edge.node.sellingPlanAllocations?.edges?.length>0)};}logDebug(\"ProductSort\",\"Product not found in any source\",{searchId:productId});return{id:\"\",title:\"\",price:0,productType:\"\",tags:[],compareAtPrice:0,isOnSale:false,collections:[],options:[],variants:[],sellingPlanGroups:[],hasProductLevelPlans:false,hasVariantLevelPlans:false};},[products]);// Helper function to perform the actual transition\nconst performTransition=newChildren=>{logDebug(\"ProductSort\",\"Performing transition\",{childrenCount:newChildren?newChildren.length:0});if(transitionTimeoutRef.current){clearTimeout(transitionTimeoutRef.current);}setIsTransitioning(true);// transitionTimeoutRef.current = setTimeout(() => {\n//     logDebug(\"ProductSort\", \"Setting sorted children\", {\n//         childrenCount: newChildren ? newChildren.length : 0,\n//     })\n//     setSortedChildren(newChildren)\n//     setTimeout(() => {\n//         setIsTransitioning(false)\n//         setIsSettling(false)\n//     }, 200) // Fade in duration\n// }, 200) // Fade out duration\n// Directly set sorted children without fade out\nsetSortedChildren(newChildren);setTimeout(()=>{setIsTransitioning(false);setIsSettling(false);},200)// Fade in duration\n;};// Cleanup timeouts\nReact.useEffect(()=>{return()=>{if(transitionTimeoutRef.current){clearTimeout(transitionTimeoutRef.current);}if(settlingTimeoutRef.current){clearTimeout(settlingTimeoutRef.current);}};},[]);// Add a debug log to show which filters are active when filtering products\n// After the getProductDetails function, add this useEffect for debugging\n// React.useEffect(() => {\n//     console.log(\n//         \"Active filters:\",\n//         Object.entries(filters)\n//             .filter(([key, filter]: [string, any]) => filter.active)\n//             .reduce(\n//                 (acc, [key, filter]: [string, any]) => ({\n//                     ...acc,\n//                     [key]: filter,\n//                 }),\n//                 {}\n//             )\n//     )\n// }, [filters])\n// Add this function to check if a product matches the filters\nconst productMatchesFilters=React.useCallback(product=>{/**\n             * Determines if a product matches all active filters\n             * Returns details about which filters matched or failed\n             */const filterResults={};// Log active filters at the beginning\nconst activeFilters={search:searchConfig.active?{term:searchConfig.term,fields:searchConfig.fields}:null,collection:filters.collection?.active?{values:filters.collection.values}:null,product_type:filters.product_type?.active?{values:filters.product_type.values}:null,product_tag:filters.product_tag?.active?{values:filters.product_tag.values}:null,price:filters.price?.active?{values:filters.price.values}:null,on_sale:filters.on_sale?.active||null,in_stock:filters.in_stock?.active||null,bundle:filters.bundle?.active||null,subscription:filters.subscription?.active||null,variant:filters.variant?.active?{values:filters.variant.values}:null,discount_amount:filters.discount_amount?.active?{values:filters.discount_amount.values}:null,discount_percent:filters.discount_percent?.active?{values:filters.discount_percent.values}:null};// console.log(\"Active filters (line 1128):\", activeFilters)\n// Only log if we have any active filters\nif(Object.values(activeFilters).some(v=>v!==null)){// console.log(\n//     `🔍 FILTERING PRODUCT \"${product.title}\" with active filters:`,\n//     Object.fromEntries(\n//         Object.entries(activeFilters).filter(\n//             ([_, v]) => v !== null\n//         )\n//     )\n// )\n}// ---- SEARCH TERM FILTER ----\nif(searchConfig.active&&searchConfig.term&&props.Search?.enableSearch){const searchTerm=searchConfig.term.toLowerCase();let matches=false;// Add debug log for search filtering\n// console.log(\"🔍 FILTERING PRODUCT by search term\", {\n//     productTitle: product.title,\n//     searchTerm: searchTerm,\n//     searchFields: searchConfig.fields,\n//     searchConfig: searchConfig\n// })\n// Map search fields to shopX product structure\nfor(const field of searchConfig.fields){// console.log(`🔍 Checking search field:`, {\n//     field,\n//     searchTerm,\n//     productTitle: product.title\n// });\nswitch(field){case\"variants\":// Search through variant values with proper null checks\nif(product?.variants?.edges&&Array.isArray(product.variants.edges))try{// First check variant colors\nconst variantMatches=product.variants.edges.some(edge=>{if(!edge?.node?.selectedOptions||!Array.isArray(edge.node.selectedOptions)){return false;}return edge.node.selectedOptions.some(option=>{return option?.value&&typeof option.value===\"string\"&&option.value.toLowerCase().includes(searchTerm);});});// Search all custom.fc_* metafields for the search term\nlet metafieldMatches=false;if(product?.metafields&&Array.isArray(product.metafields)){metafieldMatches=product.metafields.some(mf=>{if(mf&&mf.namespace===\"custom\"&&mf.key.startsWith(\"fc_\")&&typeof mf.value===\"string\"){let values=[];try{const parsed=JSON.parse(mf.value);if(Array.isArray(parsed)){values=parsed.map(v=>v.toLowerCase());}else if(typeof parsed===\"string\"){values=[parsed.toLowerCase()];}}catch{values=[mf.value.toLowerCase()];}return values.some(val=>val.includes(searchTerm));}return false;});}matches=matches||variantMatches||metafieldMatches;if(matches){// console.log(`🎯 Final match found for \"${product.title}\"`, {\n//     variantMatches,\n//     metafieldMatches\n// })\n}}catch(error){console.error(\"Error searching variants and custom color:\",error);return false;}break;case\"title\":// Product title is directly accessible on the product object\nif(product.title){const titleMatches=product.title.toLowerCase().includes(searchTerm);if(titleMatches){// Only log matches to reduce console noise\n// console.log(\n//     `🎯 Title match: \"${product.title}\" includes \"${searchTerm}\"`\n// )\n}matches=matches||titleMatches;}else{// console.log(\n//     `⚠️ Product has no title property:`,\n//     product\n// )\n}break;case\"productType\":// Product type is under productType\nif(product.productType){const typeMatches=product.productType.toLowerCase().includes(searchTerm);if(typeMatches){// console.log(\n//     `🎯 Product Type match: \"${product.productType}\" includes \"${searchTerm}\"`\n// )\n}matches=matches||typeMatches;}break;case\"tags\":// Tags are in an array\nif(Array.isArray(product.tags)){const tagMatches=product.tags.some(tag=>tag&&tag.toLowerCase().includes(searchTerm));if(tagMatches){// console.log(\n//     `🎯 Tag match: \"${product.tags.join(\", \")}\" includes \"${searchTerm}\"`\n// )\n}matches=matches||tagMatches;}break;case\"collections\":// Collections are in an array\nif(Array.isArray(product.collections)){const collectionMatches=product.collections.some(collection=>{const collectionTitle=collection?.title||collection;return typeof collectionTitle===\"string\"&&collectionTitle.toLowerCase().includes(searchTerm);});if(collectionMatches){// console.log(\n//     `🎯 Collection match: \"${product.collections\n//         .map((c) => c?.title || c)\n//         .filter(Boolean)\n//         .join(\n//             \", \"\n//         )}\" includes \"${searchTerm}\"`\n// )\n}matches=matches||collectionMatches;}break;case\"vendor\":// Vendor is under product.vendor\nif(product.vendor){const vendorMatches=product.vendor.toLowerCase().includes(searchTerm);if(vendorMatches){// console.log(\n//     `🎯 Vendor match: \"${product.vendor}\" includes \"${searchTerm}\"`\n// )\n}matches=matches||vendorMatches;}break;case\"customColor\":// Search through custom.fc_color metafield (flat array, supports JSON array or string)\nif(product?.metafields&&Array.isArray(product.metafields)){const colorMetafield=product.metafields.find(mf=>mf&&mf.namespace===\"custom\"&&mf.key===\"fc_color\"&&typeof mf.value===\"string\");let colorValues=[];if(colorMetafield){//console.log(\"colorMetafield\", colorMetafield)\ntry{const parsed=JSON.parse(colorMetafield.value);if(Array.isArray(parsed)){colorValues=parsed.map(v=>v.toLowerCase());}else if(typeof parsed===\"string\"){colorValues=[parsed.toLowerCase()];}}catch{colorValues=[colorMetafield.value.toLowerCase()];}}if(colorValues.length>0){const customColorMatches=colorValues.some(val=>val.includes(searchTerm));if(customColorMatches){// console.log(\n//     `Custom color match found in product \"${product.title}\"`\n// );\n}matches=matches||customColorMatches;}}break;}// If we found a match, no need to check other fields\nif(matches)break;}filterResults.search={active:true,term:searchConfig.term,matches};// If search is active but we don't match, return early\nif(!matches){return{matches:false,filterResults};}}// ----- COLLECTION FILTER -----\nif(filters.collection?.active&&filters.collection.values?.length>0){const collectionValues=filters.collection.values;let matches=false;// Get the collection titles from the new nested structure\nconst productCollections=product.collections.map(collection=>collection.node?.title||collection.node?.handle||collection);// Use OR logic (some) for collections if not scoped to collections\n// Use AND logic (every) only if scoped to collections\nif(props.display===\"Collection\"){matches=collectionValues.every(collectionValue=>productCollections.includes(collectionValue));}else{matches=collectionValues.some(collectionValue=>productCollections.includes(collectionValue));}filterResults.collection={active:true,values:collectionValues,matches};if(!matches){return{matches:false,filterResults};}}// ----- PRODUCT TYPE FILTER -----\nif(filters.product_type?.active&&filters.product_type.values?.length>0){const productTypeValues=filters.product_type.values;let matches=false;if(product.productType){// Use OR logic (some) for product types if not scoped to product types\n// Use AND logic (every) only if scoped to product types\nif(props.display===\"Product Type\"){matches=productTypeValues.every(type=>product.productType.toLowerCase().includes(type.toLowerCase()));}else{matches=productTypeValues.some(type=>product.productType.toLowerCase().includes(type.toLowerCase()));}}filterResults.product_type={active:true,values:productTypeValues,matches};if(!matches){return{matches:false,filterResults};}}// ----- PRODUCT TAG FILTER -----\nif(filters.product_tag?.active&&filters.product_tag.values?.length>0){const tagValues=filters.product_tag.values;let matches=false;if(Array.isArray(product.tags)){// Use OR logic (some) for tags if not scoped to tags\n// Use AND logic (every) only if scoped to tags\nif(props.display===\"Product Tag\"){matches=tagValues.every(tagValue=>product.tags.some(tag=>tag.toLowerCase().includes(tagValue.toLowerCase())));}else{matches=tagValues.some(tagValue=>product.tags.some(tag=>tag.toLowerCase().includes(tagValue.toLowerCase())));}}filterResults.product_tag={active:true,values:tagValues,matches};if(!matches){return{matches:false,filterResults};}}// ----- PRICE FILTER -----\nif(filters.price?.active&&filters.price.values?.length>0){const productPrice=parseFloat(product.priceRange?.minVariantPrice?.amount||\"0\");let matches=false;// Check if product matches any of the active price ranges\nmatches=filters.price.values.some(range=>{if(range.min===null){// Handle \"Under\" price range\nreturn productPrice<=range.max;}else if(range.max===null){// Handle \"Over\" price range\nreturn productPrice>=range.min;}else{// Handle regular price range\nreturn productPrice>=range.min&&productPrice<=range.max;}});filterResults.price={active:true,values:filters.price.values,productPrice,matches};if(!matches){return{matches:false,filterResults};}}// ----- DISCOUNT FILTER -----\nif(filters.discount_amount?.active&&filters.discount_amount.values?.length>0){const productPrice=parseFloat(product.priceRange?.minVariantPrice?.amount||\"0\");const compareAtPrice=parseFloat(product.compareAtPriceRange?.minVariantPrice?.amount||\"0\");const discountAmount=compareAtPrice>productPrice?compareAtPrice-productPrice:0;let matches=false;// console.log(\"🔍 Checking discount amount:\", {\n//     productPrice,\n//     compareAtPrice,\n//     discountAmount,\n//     ranges: filters.discount_amount.values,\n// })\n// Check if product matches any of the active discount ranges\nmatches=filters.discount_amount.values.some(range=>{if(range.min===null){// Handle \"Under\" discount range\nreturn discountAmount<=range.max;}else if(range.max===null){// Handle \"Over\" discount range\nreturn discountAmount>=range.min;}else{// Handle regular discount range\nreturn discountAmount>=range.min&&discountAmount<=range.max;}});filterResults.discount_amount={active:true,values:filters.discount_amount.values,discountAmount,matches};if(!matches){return{matches:false,filterResults};}}if(filters.discount_percent?.active&&filters.discount_percent.values?.length>0){const productPrice=parseFloat(product.priceRange?.minVariantPrice?.amount||\"0\");const compareAtPrice=parseFloat(product.compareAtPriceRange?.minVariantPrice?.amount||\"0\");const discountPercent=compareAtPrice>productPrice?(compareAtPrice-productPrice)/compareAtPrice*100:0;let matches=false;// console.log(\"🔍 Checking discount percent:\", {\n//     productPrice,\n//     compareAtPrice,\n//     discountPercent,\n//     ranges: filters.discount_percent.values,\n// })\n// Check if product matches any of the active discount percentage ranges\nmatches=filters.discount_percent.values.some(range=>{if(range.min===null){// Handle \"Under\" discount percentage range\nreturn discountPercent<=range.max;}else if(range.max===null){// Handle \"Over\" discount percentage range\nreturn discountPercent>=range.min;}else{// Handle regular discount percentage range\nreturn discountPercent>=range.min&&discountPercent<=range.max;}});filterResults.discount_percent={active:true,values:filters.discount_percent.values,discountPercent,matches};if(!matches){return{matches:false,filterResults};}}// ----- DISCOUNT FILTER -----\nif(filters.discount_amount?.active&&filters.discount_amount.values?.length>0){const productPrice=parseFloat(product.priceRange?.minVariantPrice?.amount||\"0\");const compareAtPrice=parseFloat(product.compareAtPriceRange?.minVariantPrice?.amount||\"0\");const discountAmount=compareAtPrice>productPrice?compareAtPrice-productPrice:0;let matches=false;// console.log(\"🔍 Checking discount amount:\", {\n//     productPrice,\n//     compareAtPrice,\n//     discountAmount,\n//     ranges: filters.discount_amount.values,\n// })\n// Check if product matches any of the active discount ranges\nmatches=filters.discount_amount.values.some(range=>{if(range.min===null){// Handle \"Under\" discount range\nreturn discountAmount<=range.max;}else if(range.max===null){// Handle \"Over\" discount range\nreturn discountAmount>=range.min;}else{// Handle regular discount range\nreturn discountAmount>=range.min&&discountAmount<=range.max;}});filterResults.discount_amount={active:true,values:filters.discount_amount.values,discountAmount,matches};if(!matches){return{matches:false,filterResults};}}if(filters.discount_percent?.active&&filters.discount_percent.values?.length>0){const productPrice=parseFloat(product.priceRange?.minVariantPrice?.amount||\"0\");const compareAtPrice=parseFloat(product.compareAtPriceRange?.minVariantPrice?.amount||\"0\");const discountPercent=compareAtPrice>productPrice?(compareAtPrice-productPrice)/compareAtPrice*100:0;let matches=false;// console.log(\"🔍 Checking discount percent:\", {\n//     productPrice,\n//     compareAtPrice,\n//     discountPercent,\n//     ranges: filters.discount_percent.values,\n// })\n// Check if product matches any of the active discount percentage ranges\nmatches=filters.discount_percent.values.some(range=>{if(range.min===null){// Handle \"Under\" discount percentage range\nreturn discountPercent<=range.max;}else if(range.max===null){// Handle \"Over\" discount percentage range\nreturn discountPercent>=range.min;}else{// Handle regular discount percentage range\nreturn discountPercent>=range.min&&discountPercent<=range.max;}});filterResults.discount_percent={active:true,values:filters.discount_percent.values,discountPercent,matches};if(!matches){return{matches:false,filterResults};}}// ----- DISCOUNT FILTER -----\nif(filters.discount_amount?.active&&filters.discount_amount.values?.length>0){const productPrice=parseFloat(product.priceRange?.minVariantPrice?.amount||\"0\");const compareAtPrice=parseFloat(product.compareAtPriceRange?.minVariantPrice?.amount||\"0\");const discountAmount=compareAtPrice>productPrice?compareAtPrice-productPrice:0;let matches=false;// console.log(\"🔍 Checking discount amount:\", {\n//     productPrice,\n//     compareAtPrice,\n//     discountAmount,\n//     ranges: filters.discount_amount.values,\n// })\n// Check if product matches any of the active discount ranges\nmatches=filters.discount_amount.values.some(range=>{if(range.min===null){// Handle \"Under\" discount range\nreturn discountAmount<=range.max;}else if(range.max===null){// Handle \"Over\" discount range\nreturn discountAmount>=range.min;}else{// Handle regular discount range\nreturn discountAmount>=range.min&&discountAmount<=range.max;}});filterResults.discount_amount={active:true,values:filters.discount_amount.values,discountAmount,matches};if(!matches){return{matches:false,filterResults};}}if(filters.discount_percent?.active&&filters.discount_percent.values?.length>0){const productPrice=parseFloat(product.priceRange?.minVariantPrice?.amount||\"0\");const compareAtPrice=parseFloat(product.compareAtPriceRange?.minVariantPrice?.amount||\"0\");const discountPercent=compareAtPrice>productPrice?(compareAtPrice-productPrice)/compareAtPrice*100:0;let matches=false;// console.log(\"🔍 Checking discount percent:\", {\n//     productPrice,\n//     compareAtPrice,\n//     discountPercent,\n//     ranges: filters.discount_percent.values,\n// })\n// Check if product matches any of the active discount percentage ranges\nmatches=filters.discount_percent.values.some(range=>{if(range.min===null){// Handle \"Under\" discount percentage range\nreturn discountPercent<=range.max;}else if(range.max===null){// Handle \"Over\" discount percentage range\nreturn discountPercent>=range.min;}else{// Handle regular discount percentage range\nreturn discountPercent>=range.min&&discountPercent<=range.max;}});filterResults.discount_percent={active:true,values:filters.discount_percent.values,discountPercent,matches};if(!matches){return{matches:false,filterResults};}}// ----- ON SALE FILTER -----\nif(filters.on_sale?.active){let matches=false;if(product.compareAtPriceRange?.minVariantPrice?.amount&&product.priceRange?.minVariantPrice?.amount){const comparePrice=parseFloat(product.compareAtPriceRange.minVariantPrice.amount);const price=parseFloat(product.priceRange.minVariantPrice.amount);matches=comparePrice>price;}filterResults.on_sale={active:true,matches};if(!matches){return{matches:false,filterResults};}}// ----- IN STOCK FILTER -----\nif(filters.in_stock?.active){let matches=false;// Check if any variant is available for sale\nif(product.variants?.edges?.some(edge=>edge.node.availableForSale)){matches=true;}filterResults.in_stock={active:true,matches};if(!matches){return{matches:false,filterResults};}}// ----- SUBSCRIPTION FILTER -----\nif(filters.subscription?.active){let matches=false;const sellingPlanGroups=product.sellingPlanGroups?.edges||[];// Check if the product has subscription plans\nif(sellingPlanGroups&&product.sellingPlanGroups?.edges?.length>0){matches=true;}// Check for variant-level subscription plans\nif(product.variants?.edges?.some(edge=>edge.node.sellingPlanAllocations?.edges?.length>0)){matches=true;}filterResults.subscription={active:true,matches};// console.log(\n//     \"filterResults.subscription\",\n//     filterResults.subscription\n// )\nif(!matches){return{matches:false,filterResults};}}// ----- VARIANT FILTER -----\nconst includeMetafields=Filters;if(filters.variant?.active&&filters.variant.values?.length>0){const variantFilters=filters.variant.values;let matches=false;// Check if any variant matches the filter criteria\nif(product.variants?.edges){// Add detailed logging for variant filtering\n// console.log(\n//     `🔍 VARIANT FILTERING: Checking product \"${product.title}\" variants against filter:`,\n//     {\n//         filterCriteria: variantFilters.map((filter) => ({\n//             name: filter.name,\n//             value: filter.value,\n//         })),\n//         hasVariants: product.variants.edges.length > 0,\n//         variantCount: product.variants.edges.length,\n//     }\n// )\n// First check variant options\nmatches=product.variants.edges.some(edge=>{const variant=edge.node;if(!variant.selectedOptions){// console.log(\n//     `⚠️ Variant has no selectedOptions:`,\n//     variant\n// )\nreturn false;}// Optional stock filter for variant match\nconst shouldCheckStock=filters.variant?.variantStockFilter===\"in_stock\";const isAvailable=variant.availableForSale;if(shouldCheckStock&&!isAvailable){return false// Skip this variant if it's not available\n;}// Log variant options for debugging\n// console.log(`👉 Checking variant:`, {\n//     variantOptions: variant.selectedOptions.map(\n//         (opt) => `${opt.name}: ${opt.value}`\n//     ),\n//     filterValues: variantFilters.map(\n//         (f) => `${f.name}: ${f.value}`\n//     ),\n// })\n// Group filters by variant name (e.g., Color, Size)\n// For OR logic within same variant type, we need to group filters by name\nconst variantFiltersByName={};variantFilters.forEach(filter=>{if(!variantFiltersByName[filter.name]){variantFiltersByName[filter.name]=[];}variantFiltersByName[filter.name].push(filter.value);});// Log grouped filters\n// console.log(\n//     `🔍 Grouped variant filters:`,\n//     variantFiltersByName\n// )\n// A variant matches if it satisfies at least one value from each variant type\n// (AND between different variant types, OR between values of same type)\nconst matchesByType=Object.entries(variantFiltersByName).map(([name,values])=>{// Find the option that matches the filter name\nconst matchingOption=variant.selectedOptions.find(option=>option.name.toLowerCase()===name.toLowerCase());if(!matchingOption){// console.log(\n//     `❌ No matching option found for ${name}`\n// )\nreturn false;}// Check if the option value matches any of the filter values (case-insensitive)\nconst valueMatches=values.some(value=>matchingOption.value.toLowerCase()===value.toLowerCase());// console.log(\n//     `${valueMatches ? \"✅\" : \"❌\"} ${name} = ${matchingOption.value}`,\n//     {\n//         acceptableValues: values,\n//         matches: valueMatches,\n//     }\n// )\nreturn valueMatches;});// True if ALL filter types have at least one matching value\nconst allTypesMatch=matchesByType.every(matches=>matches);// console.log(\n//     `${allTypesMatch ? \"✅\" : \"❌\"} Overall match result: ${allTypesMatch}`\n// )\nreturn allTypesMatch;});// If no variant matches and we're looking for a color, check custom metadata\nif(includeMetafields&&product.metafields&&Array.isArray(product.metafields)){variantFilters.forEach(filter=>{const metafieldKey=`fc_${filter.name.toLowerCase()}`;const metafield=product.metafields.find(mf=>mf&&mf.namespace===\"custom\"&&mf.key===metafieldKey&&typeof mf.value===\"string\");if(metafield){let values=[];try{// Try to parse as JSON array\nconst parsed=JSON.parse(metafield.value);if(Array.isArray(parsed)){values=parsed.map(v=>v.toLowerCase());}else if(typeof parsed===\"string\"){values=[parsed.toLowerCase()];}}catch{// If not JSON, treat as a single string value\nvalues=[metafield.value.toLowerCase()];}if(values.length>0&&filter.value){if(values.includes(filter.value.toLowerCase())){matches=true;}}}});}}filterResults.variant={active:true,values:variantFilters,matches};if(!matches){return{matches:false,filterResults};}}// Log final result\n// console.log(\n//     `🔍 FILTER RESULT for \"${product.title}\": ${JSON.stringify({ matches: true, filterResults })}`\n// )\n// All tests passed\nreturn{matches:true,filterResults};},[filters,searchConfig]);// Add this after the handleFilter useCallback\nReact.useEffect(()=>{// console.log(\"🚨 Products state changed 🚨\", {\n//     hasProducts: products.length > 0,\n//     count: products.length,\n//     firstProduct: products[0]?.node\n//         ? {\n//               title: products[0].node.title,\n//               productType: products[0].node.productType,\n//           }\n//         : null,\n//     sortedChildrenExists: !!sortedChildren,\n// })\n// Dispatch product-search-results event when filtered products change\nif(sortedChildren&&searchConfig.active||!searchConfig.active){const searchResultsEvent=new CustomEvent(\"product-search-results\",{detail:{count:sortedChildren?sortedChildren.length:products.length,term:searchConfig.term||\"\"}});document.dispatchEvent(searchResultsEvent);//console.log(\"product-search-results dispatched\", searchResultsEvent);\n}},[products,sortedChildren,searchConfig]);// Add this after the URL parameters useEffect\nReact.useEffect(()=>{// Check if we're in a browser environment\nif(typeof window===\"undefined\")return;// Check for shopXtools and products\nconst hasShopXTools=!!window.shopXtools;const products=window.shopXtools?.products;// Log initial state\n// console.log(\"🚨 Checking for initial shopXtools products 🚨\", {\n//     hasShopXTools,\n//     hasProducts: !!products,\n//     productsCount: products?.length || 0,\n// })\n// Set products if available\nif(products){// console.log(\"🚨 Setting initial products from shopXtools 🚨\", {\n//     count: products.length,\n//     sample: products[0]?.node,\n// })\nsetProducts(products);}},[])// Only run on mount\n;if(!Collection?.[0]){logDebug(\"ProductSort\",\"No collection instance found\",null);return /*#__PURE__*/_jsx(\"div\",{style:{height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",color:\"#666\",fontSize:\"14px\"},children:\"Connect instance\"});}const collectionInstance=Collection[0];const emptyStateInstance=props.EmptyState?.[0];const sizedInstance=/*#__PURE__*/React.cloneElement(collectionInstance,{style:{...collectionInstance.props?.style||{},width:\"100%\",height:\"100%\"}});// Update the layout styling logic\nlet layoutStyle={};if(props.layout){const layout=props.layout;switch(layout.type){case\"stack\":const isVertical=layout.direction===\"vertical\";layoutStyle={display:\"flex\",flexDirection:isVertical?\"column\":\"row\",flexWrap:layout.wrap?\"wrap\":\"nowrap\",alignItems:isVertical?layout.align:layout.alignH,justifyContent:layout.distribute,gap:layout.gap,padding:layout.paddingPerSide?`${layout.paddingTop}px ${layout.paddingRight}px ${layout.paddingBottom}px ${layout.paddingLeft}px`:`${layout.padding}px`,width:\"100%\",\"& > *\":{minWidth:layout.stackMinWidth,flexGrow:1,flexShrink:1,flexBasis:0}};break;case\"grid\":let gridTemplateColumns=\"\";if(layout.columns===\"auto\"){// Combine auto-fit with a calculated minmax to respect both gridWidth and maxColumns.\n// The min value ensures columns are at least gridWidth, but also effectively caps\n// the column count at maxColumns by calculating the width required for that many columns.\ngridTemplateColumns=`repeat(auto-fit, minmax(max(${layout.gridWidth}px, calc((100% - ${layout.gap*(layout.maxColumns-1)}px) / ${layout.maxColumns})), 1fr))`;}else{gridTemplateColumns=`repeat(${layout.columnCount}, 1fr)`;}layoutStyle={display:\"grid\",gridTemplateColumns,justifyItems:layout.gridAlign,gap:layout.gap,padding:layout.paddingPerSide?`${layout.paddingTop}px ${layout.paddingRight}px ${layout.paddingBottom}px ${layout.paddingLeft}px`:`${layout.padding}px`,width:\"100%\"};break;}}// Create the styled instance with layout\nconst styledInstance=/*#__PURE__*/React.cloneElement(sizedInstance,{style:{...sizedInstance.props.style,...layoutStyle}});if(RenderTarget.current()===RenderTarget.canvas){return styledInstance;}const[isBackNavigation,setIsBackNavigation]=React.useState(false);React.useEffect(()=>{if(typeof window===\"undefined\")return;const handleUrlChange=event=>{// console.log(\"popstate\", event)\nconst url=new URL(window.location.href);const urlParams=new URLSearchParams(url.search);// Handle page parameter\nconst pageParam=urlParams.get(\"page\");const newPage=pageParam?parseInt(pageParam,10):1;//console.log(\"[CMS] Checking page change:\", { currentPage, newPage })\nif(newPage!==currentPage){//console.log(\"[CMS] Updating to page:\", newPage)\nsetCurrentPage(newPage);setSortedChildren(null)// Reset sorted children to trigger re-render\n;}setIsLoading(true);logDebug(\"ProductSort\",\"URL changed\",{url:url.toString(),search:url.search,eventType:event?.type||\"direct\",currentPage:currentPage,newPage:newPage});if(event.type===\"popstate\"){//console.log(\"Reloading the page\")\nwindow.location.reload();}// Set loading to false after a short delay to prevent flash\nsetTimeout(()=>{setIsLoading(false);setIsBackNavigation(false);},150);};// Run initial check\nhandleUrlChange({});// Listen for both popstate and pagination events\nwindow.addEventListener(\"popstate\",handleUrlChange);document.addEventListener(\"product-pagination-change\",handleUrlChange);return()=>{// window.removeEventListener(\"popstate\", handleUrlChange)\ndocument.removeEventListener(\"product-pagination-change\",handleUrlChange);};},[currentPage]);try{logDebug(\"ProductSort\",\"Rendering collection\",{hasCollection:!!Collection[0],productsCount:products.length,sortedChildrenCount:sortedChildren?sortedChildren.length:0,isBackNavigation,isLoading});return /*#__PURE__*/React.cloneElement(styledInstance,{...styledInstance.props,style:{...styledInstance.props.style,opacity:isLoading?0:1,transition:\"opacity 0.2s ease-in-out\",visibility:isLoading?\"hidden\":\"visible\"},children:/*#__PURE__*/React.cloneElement(styledInstance.props.children,{...styledInstance.props.children.props,children:/*#__PURE__*/React.cloneElement(styledInstance.props.children.props.children,{...styledInstance.props.children.props.children.props,children:collection=>{logDebug(\"ProductSort\",\"Collection render function called\",{collectionSize:collection?.length||0});const originalRender=styledInstance.props.children.props.children.props.children(collection);if(!originalRender?.props?.children){logDebug(\"ProductSort\",\"No children in original render\",null);return originalRender;}if(!sortedChildren&&products.length>0){// console.log(\n//     \"🚨🚨🚨 STARTING FILTERING PROCESS 🚨🚨🚨\",\n//     {\n//         productsLength: products.length,\n//         hasShopXTools:\n//             typeof window !== \"undefined\" &&\n//             !!window.shopXtools,\n//         activeFilters: Object.entries(filters)\n//             .filter(\n//                 ([key, filter]: [\n//                     string,\n//                     any,\n//                 ]) => filter.active\n//             )\n//             .reduce(\n//                 (\n//                     acc,\n//                     [key, filter]: [string, any]\n//                 ) => ({\n//                     ...acc,\n//                     [key]: filter,\n//                 }),\n//                 {}\n//             ),\n//         firstProduct: products[0]?.node,\n//     }\n// )\n// First filter all shopXtools products\nconst filteredShopXProducts=products.filter(({node})=>{// Add debug log for products being filtered\n// console.log(\n//     \"🔍 Checking product for filtering:\",\n//     {\n//         title:\n//             node?.title || \"No title\",\n//         hasNode: !!node,\n//         nodeType: node\n//             ? typeof node\n//             : \"undefined\",\n//         productType:\n//             node?.productType ||\n//             \"No product type\",\n//         filterActive:\n//             searchConfig.active,\n//     }\n// )\n// Ensure node exists\nif(!node){// console.log(\n//     \"⚠️ No node found for product, skipping\"\n// )\nreturn false;}const matches=productMatchesFilters(node);// console.log(\n//     \"🔍 Product filter result:\",\n//     {\n//         title: node.title,\n//         productType: node.productType,\n//         matches: matches.matches,\n//         searchActive:\n//             searchConfig.active,\n//         searchTerm: searchConfig.term,\n//     }\n// )\nreturn matches.matches;});// console.log(\n//     \"🔍 Filtered shopX products results:\",\n//     {\n//         totalBefore: products.length,\n//         totalAfter:\n//             filteredShopXProducts.length,\n//         firstProduct: filteredShopXProducts[0]\n//             ?.node\n//             ? {\n//                   title: filteredShopXProducts[0]\n//                       .node.title,\n//                   productType:\n//                       filteredShopXProducts[0]\n//                           .node.productType,\n//               }\n//             : null,\n//         activeFilters: Object.entries(filters)\n//             .filter(\n//                 ([key, filter]: [\n//                     string,\n//                     any,\n//                 ]) => filter.active\n//             )\n//             .reduce(\n//                 (\n//                     acc,\n//                     [key, filter]: [string, any]\n//                 ) => ({\n//                     ...acc,\n//                     [key]: filter,\n//                 }),\n//                 {}\n//             ),\n//         searchActive: searchConfig.active,\n//         searchTerm: searchConfig.term,\n//     }\n// )\n// Add additional debugging if no products match\n// if (\n//     filteredShopXProducts.length === 0 &&\n//     products.length > 0\n// ) {\n//     console.log(\n//         \"⚠️ NO PRODUCTS MATCHED FILTERS! Active filters:\",\n//         {\n//             searchConfig: searchConfig.active\n//                 ? searchConfig\n//                 : null,\n//             otherFilters: Object.entries(\n//                 filters\n//             )\n//                 .filter(\n//                     ([key, filter]: [\n//                         string,\n//                         any,\n//                     ]) => filter.active\n//                 )\n//                 .reduce(\n//                     (\n//                         acc,\n//                         [key, filter]: [\n//                             string,\n//                             any,\n//                         ]\n//                     ) => ({\n//                         ...acc,\n//                         [key]: filter,\n//                     }),\n//                     {}\n//                 ),\n//         }\n//     )\n//     // Log some sample products to help diagnose\n//     console.log(\n//         \"Sample products that didn't match:\",\n//         products.slice(0, 3).map((p) => ({\n//             title: p.node?.title,\n//             productType: p.node?.productType,\n//             tags: p.node?.tags?.slice(0, 3),\n//             collections: p.node?.collections\n//                 ?.map((c) => c.title || c)\n//                 .slice(0, 3),\n//         }))\n//     )\n// }\nconst filteredForPage=pageType===\"favorites\"?filteredShopXProducts.filter(({node})=>{const productId=findDeep13DigitNumber(node);return productId&&favorites.includes(productId);}):filteredShopXProducts;// If no items match, render the empty state directly\nif(filteredForPage.length===0){if(emptyStateInstance){const styledEmptyState=/*#__PURE__*/React.cloneElement(emptyStateInstance,{style:{...emptyStateInstance.props?.style||{},width:\"100%\",height:\"100%\",maxWidth:\"100%\",transform:\"none\"}});// Create a wrapper that completely overrides any grid styles\nconst EmptyStateWrapper=()=>/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",padding:props.layout?.padding?`${props.layout.padding}px`:\"0px\",// Override any grid properties\n    gridColumn:\"1 / -1\",gridRow:\"1 / -1\",// Ensure it spans the full container\n    position:\"relative\",minWidth:\"100%\",maxWidth:\"100%\"},children:styledEmptyState});// Return the wrapper component directly\nreturn{...originalRender,props:{...originalRender.props,style:{...originalRender.props.style,// Override grid properties at the container level\ndisplay:\"flex\",gridTemplateColumns:\"none\",gridAutoColumns:\"none\",gridTemplateRows:\"none\",gap:0},children:/*#__PURE__*/_jsx(EmptyStateWrapper,{})}};}return null;}// Then map the filtered products to collection items\nconst items=originalRender.props.children.map(child=>{const item=collection.find(collectionItem=>collectionItem.id===child.key);const productId=item?findDeep13DigitNumber(item):null;// Find the product in our filtered shopX products\nconst fullId=`gid://shopify/Product/${productId}`;const matchingProduct=filteredForPage.find(({node})=>node.id===fullId);// Only include items that exist in our filtered products\nif(!matchingProduct){logDebug(\"ProductSort\",\"Product filtered out\",{id:fullId,productId});return null;}const details={id:matchingProduct.node.id,title:matchingProduct.node.title||\"\",price:matchingProduct.node.priceRange?.minVariantPrice?.amount?parseFloat(matchingProduct.node.priceRange.minVariantPrice.amount):0,productType:matchingProduct.node.productType||\"\",tags:matchingProduct.node.tags||[],compareAtPrice:matchingProduct.node.compareAtPriceRange?.minVariantPrice?.amount?parseFloat(matchingProduct.node.compareAtPriceRange.minVariantPrice.amount):0,collections:Array.isArray(matchingProduct.node.collections)?matchingProduct.node.collections.map(c=>c.title):[]};return{child,productId:productId||\"0\",price:details.price,title:details.title,originalIndex:originalRender.props.children.indexOf(child),details};}).filter(Boolean)// Remove null items\n;logDebug(\"ProductSort\",\"Final filtered items\",{totalProducts:products.length,filteredForPage:filteredForPage.length,finalItems:items.length,finalItemsList:items,sample:items[0]?{title:items[0].title,productType:items[0].details.productType}:null});// Use React.memo for components that do not change\nconst OptimizedChild=/*#__PURE__*/React.memo(({child,...props})=>{return /*#__PURE__*/React.cloneElement(child,props);});// Ensure debouncing is applied effectively\nconst debouncedUpdateSort=React.useCallback(debounce(newSortConfig=>{setSortConfig(newSortConfig);},150),[]);const debouncedUpdateFilter=React.useCallback(debounce(newFilters=>{setFilters(newFilters);},150),[]);// Add detailed logging around transition logic\n// console.log(\n//     \"🔍 Transition state before rendering\",\n//     {\n//         isTransitioning,\n//         isSettling,\n//         itemsLength: items.length,\n//         emptyStateInstanceExists:\n//             !!emptyStateInstance,\n//     }\n// )\n// Modify the child wrapper styles to include settling state\nconst getTransitionStyles=baseStyles=>({...baseStyles,opacity:isTransitioning||isSettling?0:1,transition:`opacity ${isSettling?\"0.5s\":\"0.3s\"} ease-in-out`,pointerEvents:isTransitioning||isSettling?\"none\":\"auto\"});// Render sorted items\n// console.log(\"🔍 Rendering sorted items\", {\n//     sortedItemsCount: items.length,\n//     sortedItems: items,\n//     isTransitioning,\n//     isSettling,\n// })\n// Sort the filtered items\nconst sorted=[...items].sort((a,b)=>{if(sortConfig.type===\"relevancy\"){return a.originalIndex-b.originalIndex;}if(sortConfig.type===\"price\"){const result=sortConfig.sortDirection===\"highToLow\"?b.price-a.price:a.price-b.price;return result||a.originalIndex-b.originalIndex;}else if(sortConfig.type===\"name\"){// sort by name\nconst result=sortConfig.sortDirection===\"aToZ\"?a.title.localeCompare(b.title):b.title.localeCompare(a.title);return result||a.originalIndex-b.originalIndex;}else if(sortConfig.type===\"created\"){// For \"newest\", we try to use the product ID as a proxy\n// since Shopify IDs are sequential\n// Higher ID = newer product\nconst aId=parseInt(a.productId);const bId=parseInt(b.productId);if(!isNaN(aId)&&!isNaN(bId)){return bId-aId// Newest first\n;}// Fall back to original order if we can't parse IDs\nreturn a.originalIndex-b.originalIndex;}else if(sortConfig.type===\"best-selling\"){// For best-selling, maintain the original order\n// as we assume Shopify has already sorted by best-selling\nreturn a.originalIndex-b.originalIndex;}else{// Default to original order for unknown types\nreturn a.originalIndex-b.originalIndex;}});// Apply pagination if enabled\nlet paginatedItems=sorted;// Update the product items wrapper with a standard list instead of virtualized one\nconst wrappedChildren=paginatedItems.map(item=>/*#__PURE__*/React.cloneElement(item.child,{style:getTransitionStyles(item.child.props.style),key:item.productId||item.originalIndex}));// Update sorted children state which triggers re-render\nupdateSortedChildrenWithTransition(wrappedChildren);// Return the placeholder structure expected by the outer cloneElement\n// The actual content will be replaced by sortedChildren on re-render\nreturn{...originalRender,props:{...originalRender.props,// Use the original children length initially\nchildren:originalRender.props.children}};}// Initial render or while loading/filtering\nreturn{...originalRender,props:{...originalRender.props,children:sortedChildren||originalRender.props.children}};}})})});}catch(error){console.error(\"Error in ProductSort:\",error);logDebug(\"ProductSort\",\"Render error\",{error:error.message});return styledInstance;}// Update URL state management\nReact.useEffect(()=>{if(typeof window===\"undefined\")return;const url=new URL(window.location.href);// Use the updateUrlWithFilters function to update URL parameters\nupdateUrlWithFilters(filters,url);// Add search term to URL\nif(searchConfig.active&&searchConfig.term){url.searchParams.set(\"search\",searchConfig.term);}else if(url.searchParams.has(\"search\")){url.searchParams.delete(\"search\");}// Add sort configuration to URL using the simplified sort parameter\nif(sortConfig){// Map internal sort configuration to URL sort parameter\nlet sortParam;if(sortConfig.type===\"relevancy\"){sortParam=\"relevance\";}else if(sortConfig.type===\"name\"){sortParam=sortConfig.sortDirection===\"aToZ\"?\"title_asc\":\"title_desc\";}else if(sortConfig.type===\"price\"){sortParam=sortConfig.sortDirection===\"lowToHigh\"?\"price_asc\":\"price_desc\";}else if(sortConfig.type===\"created\"){sortParam=\"newest\";}else if(sortConfig.type===\"best-selling\"){sortParam=\"best_selling\";}if(sortParam){url.searchParams.set(\"sort\",sortParam);// Remove legacy sortConfig parameter if it exists\nif(url.searchParams.has(\"sortConfig\")){url.searchParams.delete(\"sortConfig\");}}else{// Fallback to the old format if we can't map to a simple parameter\nurl.searchParams.set(\"sortConfig\",JSON.stringify(sortConfig));}}// Update history state with search config\nwindow.history.pushState({filters,sortConfig,searchConfig},\"\",url.toString());},[sortConfig,filters,searchConfig]);// Update the useEffect for initializing state from URL\nReact.useEffect(()=>{if(typeof window===\"undefined\")return;const handleUrlChange=event=>{const url=new URL(window.location.href);const urlParams=new URLSearchParams(window.location.search);logDebug(\"ProductSort\",\"URL changed\",{url:url.toString(),search:url.search,eventType:event?.type||\"direct\"});// Handle search parameter\nconst searchParam=urlParams.get(\"search\");if(searchParam){setSearchConfig({term:searchParam,fields:getActiveSearchFields(props.Search?.Scope),active:true});setSortedChildren(null)// Force re-filter when search changes\n;}else if(searchConfig.active){setSearchConfig({term:\"\",fields:getActiveSearchFields(props.Search?.Scope),active:false});setSortedChildren(null)// Force re-filter when search is cleared\n;}// Log all variant parameters in URL for debugging\nconst variantParams=Array.from(urlParams.keys()).filter(key=>key.startsWith(\"variant_\")).reduce((acc,key)=>{const value=urlParams.get(key);// Decode values to see what's actually stored\nacc[key]={raw:value,decoded:value?decodeURIComponent(value):null,values:value?decodeURIComponent(value).split(\",\").filter(Boolean):[]};return acc;},{});//console.log(\"📊 VARIANT PARAMS IN URL:\", variantParams)\n// Handle sort parameter\nconst sortParam=urlParams.get(\"sort\");if(sortParam){let newSortConfig;// Map URL sort parameter to internal sort configuration\nswitch(sortParam){case\"relevance\":newSortConfig={type:\"relevancy\",sortBy:\"relevancy\",sortDirection:null};break;case\"title_asc\":newSortConfig={type:\"name\",sortBy:\"name\",sortDirection:\"aToZ\"};break;case\"title_desc\":newSortConfig={type:\"name\",sortBy:\"name\",sortDirection:\"zToA\"};break;case\"price_asc\":newSortConfig={type:\"price\",sortBy:\"price\",sortDirection:\"lowToHigh\"};break;case\"price_desc\":newSortConfig={type:\"price\",sortBy:\"price\",sortDirection:\"highToLow\"};break;case\"newest\":newSortConfig={type:\"created\",sortBy:\"created\",sortDirection:\"newest\"};break;case\"best_selling\":newSortConfig={type:\"best-selling\",sortBy:\"best-selling\",sortDirection:null};break;}if(newSortConfig){logDebug(\"ProductSort\",\"Updating sort config from URL parameter\",{sortParam,newSortConfig});setSortConfig(newSortConfig);setSortedChildren(null)// Reset sorted children to trigger resort\n;}}try{// Use parseUrlFilters to get filters from URL\nconst urlFilters=parseUrlFilters(url.searchParams);// Check if we have active filters\nconst hasActiveFilters=urlFilters&&Object.keys(urlFilters).some(key=>urlFilters[key]?.active);logDebug(\"ProductSort\",\"URL filters parsed\",{hasActiveFilters,filters:urlFilters,activeFilters:hasActiveFilters?Object.entries(urlFilters).filter(([key,filter])=>filter.active).reduce((acc,[key,filter])=>({...acc,[key]:filter}),{}):null});// Only update if we have filters in the URL\nif(hasActiveFilters){setFilters(urlFilters);setSortedChildren(null);}}catch(error){console.error(\"❌ Error handling URL change:\",error);}};// Run initial check\nlogDebug(\"ProductSort\",\"Running initial URL check\",{url:window.location.href});handleUrlChange({})// Removed event listener for now\n;// Listen for popstate events\nwindow.addEventListener(\"popstate\",handleUrlChange);return()=>{window.removeEventListener(\"popstate\",handleUrlChange);};},[props.Search?.Scope]);// Add error state management\nconst[error,setError]=React.useState(null);// Create the content to render\nconst content=error?/*#__PURE__*/_jsx(\"div\",{style:{padding:20,color:\"red\"},children:error.message}):// Original render content with layout styling\n/*#__PURE__*/_jsx(\"div\",{...props,style:{...props.style,width:\"100%\",height:\"100%\",...(!products?.length||pageType===\"favorites\"&&!favorites?.length)&&{display:\"flex\",gridTemplateColumns:\"none\",gridAutoColumns:\"none\",gridTemplateRows:\"none\",gap:0}},children:styledInstance.props.children});// Wrap the main content in error boundary\nreturn /*#__PURE__*/_jsx(ErrorBoundary,{children:content});}addPropertyControls(FC_CatalogDisplay,{Collection:{type:ControlType.ComponentInstance,title:\"CMS Source\",description:\"Connect to CMS collection off-page\"},EmptyState:{type:ControlType.ComponentInstance,title:\"Empty State\",description:\"Connect to design off-page\"},pageType:{type:ControlType.Enum,title:\"Display\",options:[\"default\",\"favorites\"],optionTitles:[\"All\",\"Favorites\"],defaultValue:\"default\",displaySegmentedControl:true},display:{type:ControlType.Enum,title:\"Filter Type\",options:[\"All\",\"Collection\",\"Product Tag\",\"Product Type\"],defaultValue:\"All\"},value:{type:ControlType.String,title:\"Filter Value\",placeholder:\"New Arrivals\"},defaultSort:{type:ControlType.Enum,title:\"Default Sort\",options:[\"relevance\",\"title_asc\",\"title_desc\",\"price_asc\",\"price_desc\",\"newest\",\"best_selling\"],optionTitles:[\"Relevance\",\"Title A-Z\",\"Title Z-A\",\"Price Low-High\",\"Price High-Low\",\"Newest\",\"Best Selling\"],defaultValue:\"relevance\"},Search:{type:ControlType.Object,title:\"Search\",controls:{enableSearch:{type:ControlType.Boolean,title:\"Allow\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\"},initialSearchState:{type:ControlType.Enum,title:\"Initial State\",options:[\"all\",\"none\"],optionTitles:[\"Full\",\"Empty\"],defaultValue:\"all\",displaySegmentedControl:true,hidden:props=>!props.enableSearch},Scope:{type:ControlType.Object,title:\"Scope\",hidden:props=>!props.enableSearch,controls:{title:{type:ControlType.Boolean,title:\"Title\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\"},productType:{type:ControlType.Boolean,title:\"Product Type\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\"},productTag:{type:ControlType.Boolean,title:\"Tags\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\"},collection:{type:ControlType.Boolean,title:\"Collections\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\"},vendor:{type:ControlType.Boolean,title:\"Vendor\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\"},variants:{type:ControlType.Boolean,title:\"Variants\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\"},customColor:{type:ControlType.Boolean,title:\"Custom Color\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\"}}}}},Filters:{type:ControlType.Object,title:\"Metafields\",controls:{include:{type:ControlType.Boolean,title:\"Include\",defaultValue:false,enabledTitle:\"Yes\",disabledTitle:\"No\",description:\"Searching or filtering by variant will also check custom metafields using custom.fc_{key}. \\n [Learn more](https://framercommerce.com/resources/docs/components/catalog#catalog-display)\"}}},Pagination:{type:ControlType.Object,title:\"Pagination\",controls:{enable:{type:ControlType.Boolean,title:\"Enable\",defaultValue:false,enabledTitle:\"Yes\",disabledTitle:\"No\"},type:{type:ControlType.Enum,title:\"Type\",options:[\"load_more\",\"next_prev\"/* \"infinite\"*/],optionTitles:[\"Load More\",\"Next/Prev\"/*\"Infinite Scroll\"*/],defaultValue:\"load_more\",displaySegmentedControl:true,segmentedControlDirection:\"vertical\",hidden:({enable})=>!enable},items:{type:ControlType.Number,title:\"Items\",defaultValue:12,min:1,step:1,displayStepper:true,hidden:({enable})=>!enable}}},layout:{type:ControlType.Object,optional:true,controls:{type:{type:ControlType.Enum,defaultValue:\"grid\",options:[\"stack\",\"grid\"],optionTitles:[\"Stack\",\"Grid\"],displaySegmentedControl:true},// Stack specific controls\ndirection:{type:ControlType.Enum,defaultValue:\"vertical\",options:[\"horizontal\",\"vertical\"],optionTitles:[\"Horizontal\",\"Vertical\"],optionIcons:[\"direction-horizontal\",\"direction-vertical\"],displaySegmentedControl:true,hidden:props=>props.type!==\"stack\"},wrap:{type:ControlType.Boolean,defaultValue:false,title:\"Wrap\",hidden:props=>props.type!==\"stack\"},stackMinWidth:{type:ControlType.Number,defaultValue:200,min:1,max:1e3,step:1,title:\"Min Width\",hidden:props=>props.type!==\"stack\"||!props.wrap},distribute:{type:ControlType.Enum,defaultValue:\"start\",options:[\"start\",\"center\",\"end\",\"space-between\",\"space-around\",\"space-evenly\"],optionTitles:[\"Start\",\"Center\",\"End\",\"Space Between\",\"Space Around\",\"Space Evenly\"],hidden:props=>props.type!==\"stack\"},align:{type:ControlType.Enum,defaultValue:\"start\",options:[\"start\",\"center\",\"end\"],optionTitles:[\"Start\",\"Center\",\"End\"],optionIcons:[\"align-left\",\"align-center\",\"align-right\"],displaySegmentedControl:true,hidden:props=>props.type!==\"stack\"||props.direction!==\"vertical\"},alignH:{type:ControlType.Enum,defaultValue:\"start\",options:[\"start\",\"center\",\"end\"],optionTitles:[\"Top\",\"Center\",\"Bottom\"],optionIcons:[\"align-top\",\"align-middle\",\"align-bottom\"],displaySegmentedControl:true,title:\"Align\",hidden:props=>props.type!==\"stack\"||props.direction!==\"horizontal\"},// Grid specific controls\ncolumns:{type:ControlType.Enum,defaultValue:\"fixed\",options:[\"auto\",\"fixed\"],optionTitles:[\"Auto\",\"Fixed\"],displaySegmentedControl:true,hidden:props=>props.type!==\"grid\"},columnCount:{type:ControlType.Number,defaultValue:3,min:1,step:1,displayStepper:true,title:\"Columns\",hidden:props=>props.type!==\"grid\"||props.columns===\"auto\"},gridWidth:{type:ControlType.Number,defaultValue:300,min:1,max:1e3,step:1,title:\"Min Width\",hidden:props=>props.type!==\"grid\"||props.columns===\"fixed\"},maxColumns:{type:ControlType.Number,defaultValue:4,min:1,step:1,title:\"Max Col\",displayStepper:true,hidden:props=>props.type!==\"grid\"||props.columns===\"fixed\"},gridAlign:{type:ControlType.Enum,defaultValue:\"center\",options:[\"start\",\"center\",\"end\"],optionTitles:[\"Left\",\"Center\",\"Right\"],displaySegmentedControl:true,title:\"Align\",hidden:props=>props.type!==\"grid\"},// Common controls\ngap:{type:ControlType.Number,defaultValue:20,min:0,step:1,title:\"Gap\"},padding:{type:ControlType.FusedNumber,title:\"Padding\",defaultValue:0,min:0,toggleKey:\"paddingPerSide\",toggleTitles:[\"All\",\"Sides\"],valueKeys:[\"paddingTop\",\"paddingRight\",\"paddingBottom\",\"paddingLeft\"],valueLabels:[\"T\",\"R\",\"B\",\"L\"]}}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FC_CatalogDisplay\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FC_CatalogDisplay.map","import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";export default function FC_SortButton(props){const{DropdownVisual,relevanceText=\"Relevance\",titleAscText=\"A-Z\",titleDescText=\"Z-A\",priceAscText=\"Price (lowest first)\",priceDescText=\"Price (highest first)\",newestText=\"Newest\",bestSellingText=\"Best Selling\"}=props;const[currentSort,setCurrentSort]=React.useState(\"relevance\");// Map internal sort values to display text\nconst sortOptions=React.useMemo(()=>{return[{value:\"relevance\",text:relevanceText},{value:\"title_asc\",text:titleAscText},{value:\"title_desc\",text:titleDescText},{value:\"price_asc\",text:priceAscText},{value:\"price_desc\",text:priceDescText},{value:\"newest\",text:newestText},{value:\"best_selling\",text:bestSellingText}].filter(option=>option.text)// Filter out options with empty text\n;},[relevanceText,titleAscText,titleDescText,priceAscText,priceDescText,newestText,bestSellingText]);// Get the current sort text\nconst getCurrentSortText=React.useCallback(()=>{const option=sortOptions.find(opt=>opt.value===currentSort);return option?.text||relevanceText;},[currentSort,sortOptions,relevanceText]);// Helper function to update text content with {{param}}\nconst updateButtonContent=element=>{if(!element||typeof element!==\"object\")return element;// Handle arrays\nif(Array.isArray(element)){return element.map(child=>updateButtonContent(child));}if(!/*#__PURE__*/React.isValidElement(element))return element;const{children,...otherProps}=element.props;// Special handling for Framer Text components\nif(element.type?.displayName?.includes(\"Text\")){const text=element.props.text||\"\";const newText=text.replace(/{{param}}/g,getCurrentSortText());return /*#__PURE__*/React.cloneElement(element,{...otherProps,text:newText});}// Handle children recursively\nlet newChildren=children;if(children){if(typeof children===\"string\"){newChildren=children.replace(/{{param}}/g,getCurrentSortText());}else if(/*#__PURE__*/React.isValidElement(children)||Array.isArray(children)){newChildren=updateButtonContent(children);}}return /*#__PURE__*/React.cloneElement(element,{...otherProps,children:newChildren});};// Handle sort change\nconst handleSortChange=React.useCallback(e=>{const value=e.target.value;setCurrentSort(value);// Map URL sort parameter to internal sort configuration\nlet sortConfig;switch(value){case\"relevance\":sortConfig={type:\"relevancy\",sortBy:\"relevancy\",sortDirection:null};break;case\"title_asc\":sortConfig={type:\"name\",sortBy:\"name\",sortDirection:\"aToZ\"};break;case\"title_desc\":sortConfig={type:\"name\",sortBy:\"name\",sortDirection:\"zToA\"};break;case\"price_asc\":sortConfig={type:\"price\",sortBy:\"price\",sortDirection:\"lowToHigh\"};break;case\"price_desc\":sortConfig={type:\"price\",sortBy:\"price\",sortDirection:\"highToLow\"};break;case\"newest\":sortConfig={type:\"created\",sortBy:\"created\",sortDirection:\"newest\"};break;case\"best_selling\":sortConfig={type:\"best-selling\",sortBy:\"best-selling\",sortDirection:null};break;}// Update URL with sort parameter\nif(typeof window!==\"undefined\"){const url=new URL(window.location.href);url.searchParams.set(\"sort\",value);window.history.pushState({sortConfig},\"\",url.toString());}// Dispatch sort change event\ndocument.dispatchEvent(new CustomEvent(\"product-sort-change\",{detail:sortConfig}));},[]);// Update sort value from URL on mount and URL changes\nReact.useEffect(()=>{if(typeof window===\"undefined\")return;const updateSortFromUrl=()=>{const urlParams=new URLSearchParams(window.location.search);const sortParam=urlParams.get(\"sort\");if(sortParam&&sortOptions.some(option=>option.value===sortParam)){setCurrentSort(sortParam);}};updateSortFromUrl();window.addEventListener(\"popstate\",updateSortFromUrl);return()=>{window.removeEventListener(\"popstate\",updateSortFromUrl);};},[sortOptions]);return /*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",width:\"100%\",height:\"100%\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",pointerEvents:\"none\"},children:updateButtonContent(DropdownVisual)}),/*#__PURE__*/_jsx(\"select\",{value:currentSort,onChange:handleSortChange,style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",opacity:0,cursor:\"pointer\"},children:sortOptions.map(option=>/*#__PURE__*/_jsx(\"option\",{value:option.value,children:option.text},option.value))})]});}addPropertyControls(FC_SortButton,{DropdownVisual:{type:ControlType.ComponentInstance,title:\"Component\",description:\"Connect to native Framer component, on-canvas but off-page. Use {{param}} in text to show the current sort option\"},relevanceText:{type:ControlType.String,title:\"Relevance\",defaultValue:\"Relevance\"},titleAscText:{type:ControlType.String,title:\"Title (A-Z)\",defaultValue:\"A-Z\"},titleDescText:{type:ControlType.String,title:\"Title (Z-A)\",defaultValue:\"Z-A\"},priceAscText:{type:ControlType.String,title:\"Price (Low)\",defaultValue:\"Price (lowest first)\"},priceDescText:{type:ControlType.String,title:\"Price (High)\",defaultValue:\"Price (highest first)\"},newestText:{type:ControlType.String,title:\"Newest\",defaultValue:\"Newest\"},bestSellingText:{type:ControlType.String,title:\"Best Selling\",defaultValue:\"Best Selling\",description:\"Empty fields won't be displayed\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FC_SortButton\",\"slots\":[\"DropdownVisual\"],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FC_SortButton.map"],"mappings":"sWAiCG,SAAS,EAAiB,EAAI,EAAI,EAAM,CAAmI,OAA/H,KAAO,EAAK,OAAO,eAAe,EAAI,EAAI,CAAO,QAAM,WAAW,GAAK,aAAa,GAAK,SAAS,GAAK,CAAC,CAAO,EAAI,GAAK,EAAc,EAGrL,SAAS,EAAsB,EAAI,CAAC,GAAG,OAAO,GAAM,SAAS,CAAC,IAAM,EAAM,EAAI,MAAM,UAA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