{"version":3,"file":"Reference_Plus.F-W1GoDF.mjs","names":["useStore","useState","useState","useMemo","useRef","collectionID","cmsFieldName","condition","value","_Fragment","_Fragment","_Fragment","useMemo","_Fragment","BaseControls"],"sources":["https:/framer.com/m/framer/store.js@^1.0.0","https:/framerusercontent.com/modules/oaAH7umUjUOTeKmykfom/4GSr51yWhuxjuWu6QpOf/Stores.js","https:/framerusercontent.com/modules/NktNXvnf4m4T7jKQcOHx/ld1Thy4iHs6v3180zPrJ/Utilities.js","https:/framerusercontent.com/modules/uaC9hWf3ec7HqMv3sXMc/fThGQnEUZeWwDLSQMzea/Hooks.js","https:/framerusercontent.com/modules/Hxho9sUnioBkMjGbLBed/csoxszrftuhmv2NyuE1c/collectionID.js","https:/framerusercontent.com/modules/1abSdslctova79WmNQRw/3fHstYFUOpeaxageGRMz/Filter_Base.js","https:/framerusercontent.com/modules/xPWn77sAdxuRvon75kLo/B2UIyi7WVbdsZJvHIaDR/cmsFieldName.js","https:/framerusercontent.com/modules/QGRqJkgeASS31a3hsL58/KYeBcisX73BYW2z43Xq4/Reference_Plus.js"],"sourcesContent":["import{useState,useEffect}from\"react\";import{Data,useObserveData}from\"framer\";export function createStore(state1){// Use Data so that a Preview reload resets the state\nconst dataStore=Data({state:Object.freeze({...state1})});// Create a set function that updates the state\nconst setDataStore=newState=>{// If the state is an object, make sure we copy it\nif(typeof newState===\"function\"){newState=newState(dataStore.state);}dataStore.state=Object.freeze({...dataStore.state,...newState});};// Store the initial state, copy the object if it's an object\nlet storeState=typeof state1===\"object\"?Object.freeze({...state1}):state1;// Keep a list of all the listeners, in the form of React hook setters\nconst storeSetters=new Set();// Create a set function that updates all the listeners / setters\nconst setStoreState=newState=>{// If the state is an object, make sure we copy it\nif(typeof newState===\"function\"){newState=newState(storeState);}storeState=typeof newState===\"object\"?Object.freeze({...storeState,...newState}):newState;// Update all the listeners / setters with the new value\nstoreSetters.forEach(setter=>setter(storeState));};// Create the actual hook based on everything above\nfunction useStore(){// Create the hook we are going to use as a listener\nconst[state,setState]=useState(storeState);// If we unmount the component using this hook, we need to remove the listener\n// @ts-ignore\nuseEffect(()=>{// But right now, we need to add the listener\nstoreSetters.add(setState);return()=>storeSetters.delete(setState);},[]);// If Data context exists, use Data, otherwise use vanilla React state\nif(useObserveData()===true){useObserveData();return[dataStore.state,setDataStore];}else{// Return the state and a function to update the central store\nreturn[state,setStoreState];}}return useStore;}\nexport const __FramerMetadata__ = {\"exports\":{\"createStore\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./createStore.map","import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";export const useStore=createStore({});export const useDevStore=createStore({isDebugging:null});\nexport const __FramerMetadata__ = {\"exports\":{\"useStore\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useDevStore\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Stores.map","/**\n * Accepts a string, and returns true/false if the string is in ISO 8601 format with the option of adding \"Z\" at the end.\n * @param {string} str - A string representing a date in ISO 8601 format.\n * @returns {boolean} - Returns true if str is in ISO 8601 format, otherwise returns false.\n */export function isISO8601(str){const isoDateRegex=/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|([+-]\\d{2}:\\d{2}))?$/;return isoDateRegex.test(str);}/**\n * Accepts a text, checks to see if it's in ISO 8601 format, if yes, resets the time and returns ISO 8601 string, otherwise return empty string.\n * @param {string} text - Date as a string in ISO 8601 format.\n * @returns {string} - Returns the same string value with the time cleared or an empty string.\n */export function resetTimeOfISODateString(text){return isISO8601(text)?`${text.substring(0,10)}T00:00:00.000Z`:\"\";}export function getProps({object,target,returnParent=false}){if(!object||!target.name||!target.type)return undefined;const propMatch=object[target.name];const typeMatch=target.type.toLowerCase()===\"array\"?Array.isArray(propMatch):typeof propMatch===target.type.toLowerCase();if(propMatch&&typeMatch){// return the target or the target's parent (which will contain the target)\nreturn returnParent?object:propMatch;}for(let nestedProp in object){const value=object[nestedProp];// don't go down another level if the value is not of type object/array\nif(typeof value!==\"object\")continue;const result=getProps({returnParent,target,object:value});if(result!==undefined)return result;}}export function getAllCollections({queryFrom,referencedCollections={}}){if(!queryFrom)return false;const{constraint,left,right,type}=queryFrom;if(type===\"Collection\"){referencedCollections[queryFrom.alias]={...queryFrom};}getAllCollections({queryFrom:queryFrom.left,referencedCollections});getAllCollections({queryFrom:queryFrom.right,referencedCollections});return referencedCollections;}// the most basic of nodes, mostly used for literal value comparisons\nexport function createBinaryOperationNode({left,right,operator}){return{left,right,operator,type:\"BinaryOperation\"};}// used for enum/option CMS field types\nexport function createCaseNode({controlId,optionIds}){const createCondition=optionId=>{return{then:{type:\"LiteralValue\",value:true},type:\"Condition\",when:{type:\"LiteralValue\",value:optionId}};};return{type:\"Case\",conditions:optionIds.map(createCondition),else:{type:\"LiteralValue\",value:false},value:{name:controlId,type:\"Identifier\"}};}// used for string fields where the condition includes 'starts_with', 'ends_with', or 'contains'\nexport function createFunctionCallNode({binaryNode,functionName}){return{functionName,arguments:[binaryNode.left,binaryNode.right],type:\"FunctionCall\"};}// wraps a node to negate its value\nexport function createUnaryOperationNode({value}){return{operator:\"not\",type:\"UnaryOperation\",value};}export function handleCondition_IsIncludedIn({collection,condition,name,type,value}){// check if the filter condition is for the negated value\nconst negateValue=condition.charAt(0)===\"!\";const node=createBinaryOperationNode({left:{collection,name,type},right:{value,type:\"LiteralValue\"},operator:\"in\"});// if the value needs to be negated, wrap the node in a unary operation\nreturn negateValue?createUnaryOperationNode({value:node}):node;}/**\n * Handles filters with conditions as \"IS_SET\" or \"!IS_SET\".\n * @param {object} controlIdentifier - An object representing the control, composed of\n *   {collection, name, type} properties.\n * @param {string} condition - The string defining the type of filtering condition.\n * @returns {object} - Returns a binary operation node or unary operation node if the value is negated.\n */export function handleCondition_IsSet({collection,name,type,condition}){// check if the filter condition is for the negated value\nconst negateValue=condition.charAt(0)===\"!\";const left=createBinaryOperationNode({operator:\"!=\",left:{collection,name,type},right:{value:null,type:\"LiteralValue\"}});const right=createBinaryOperationNode({operator:\"!=\",left:{collection,name,type},right:{value:\"\",type:\"LiteralValue\"}});const node=createBinaryOperationNode({left,right,operator:\"and\"});// if the value needs to be negated, wrap the node in a unary operation\nreturn negateValue?createUnaryOperationNode({value:node}):node;}/**\n * Handles filters with conditions as \"STARTS_WITH\", \"!STARTS_WITH\", \"ENDS_WITH\", \"!ENDS_WITH\", \"CONTAINS\", \"!CONTAINS\".\n * @param {object} controlIdentifier - An object representing the control, composed of\n *   {collection, name, type} properties.\n * @param {string} condition - The string defining the type of filtering condition.\n * @returns {object} - Returns a binary operation node or unary operation node if the value is negated.\n */export function handleCondition_StartsWith_EndsWith_Contains({controlIdentifier,condition,value}){// check if the filter condition is for the negated value\nconst negateValue=condition.charAt(0)===\"!\";// Framer uses filter functions in their query tree for \"STARTS_WITH\", \"ENDS_WITH\", or \"CONTAINS\"\nconst functionName=negateValue?condition.substring(1):condition;const node=createFunctionCallNode({binaryNode:createBinaryOperationNode({left:controlIdentifier,right:{value,type:\"LiteralValue\"},operator:\"==\"}),functionName});// if the value needs to be negated, wrap the node in a unary operation\nreturn negateValue?createUnaryOperationNode({value:node}):node;}/**\n * Parses a string representing a range\n * @param {string} rangeString - String formatted to represent a range.\n * @returns {object} - Returns an object with the start and end values, and if they're inclusive or exclusive.\n */export function parseRangeCondition({rangeString}){// inclusive:\n// greater than or equal: [\n// lesser than or equal: ]\n//exclusive:\n// greater than: (\n// lesser than: )\n// check the first character to determine if the condition is \"greater than\", or \"greater than or equal\"\nconst startOperator=rangeString.charAt(0)===\"[\"?\">=\":\">\";// check the last character to determine if the condition is \"lesser than\", or \"lesser than or equal\"\nconst endOperator=rangeString.charAt(rangeString.length-1)===\"]\"?\"<=\":\"<\";// ommit the first and last charaters to split the values\nconst ranges=rangeString.substring(1,rangeString.length-1).split(\",\");return{start:{operator:startOperator,value:ranges[0]},end:{operator:endOperator,value:ranges[1]}};}/**\n * Handles filters with conditions that contains the substring \"IS_BETWEEN\".\n * @param {object} controlIdentifier - An object with properties of the control.\n * @param {object} start - The starting value and operator of the range.\n * @param {object} end - The ending value and operator of the range.\n * @returns {object} - Returns a binary operation node.\n */export function handleCondition_IsBetween({controlIdentifier,start,end}){const left=createBinaryOperationNode({left:controlIdentifier,right:{value:start.value,type:\"LiteralValue\"},operator:start.operator});// the results will be less than or equal to this end\nconst right=createBinaryOperationNode({left:controlIdentifier,right:{value:end.value,type:\"LiteralValue\"},operator:end.operator});return createBinaryOperationNode({left,right,operator:\"and\"});}// returns the tree structure used by Framer to apply filters to collection list\nexport function createFramerFilterTree({nodes=[],operator=\"and\"}){let tree={};nodes.forEach((node,index)=>{if(index===0){tree=node;}else{tree={operator,left:tree,right:node,type:\"BinaryOperation\"};}});return tree;}\nexport const __FramerMetadata__ = {\"exports\":{\"handleCondition_IsBetween\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"resetTimeOfISODateString\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getProps\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"handleCondition_StartsWith_EndsWith_Contains\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"isISO8601\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"createCaseNode\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"createBinaryOperationNode\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"createUnaryOperationNode\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"createFramerFilterTree\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getAllCollections\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"createFunctionCallNode\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"parseRangeCondition\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"handleCondition_IsIncludedIn\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"handleCondition_IsSet\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Utilities.map","// @ts-ignore\nimport{useQueryData,useIsOnFramerCanvas}from\"framer\";import{useState,useEffect,useRef,useMemo}from\"react\";import{useStore,useDevStore}from\"https://framerusercontent.com/modules/oaAH7umUjUOTeKmykfom/4GSr51yWhuxjuWu6QpOf/Stores.js\";import{getProps,getAllCollections,createFramerFilterTree,createBinaryOperationNode,createCaseNode,createFunctionCallNode,createUnaryOperationNode,handleCondition_IsBetween,handleCondition_IsIncludedIn,handleCondition_IsSet,handleCondition_StartsWith_EndsWith_Contains,parseRangeCondition}from\"https://framerusercontent.com/modules/NktNXvnf4m4T7jKQcOHx/ld1Thy4iHs6v3180zPrJ/Utilities.js\";/**\n * Hook that prints to the console when debugging CMS Plus.\n * @param {boolean} debug - Is debugging CMS Plus or not.\n *\n * @returns {object} - An object with the following properties:\n * @param {function} consoleLogWhenDebuggingCMSPlus - Function that acts just like console.log, but only when debugging CMS Plus.\n */export const useConsoleLogWhenDebuggingCMSPlus=()=>{const[store]=useDevStore();const consoleLogWhenDebuggingCMSPlus=(...args)=>{if(store.isDebugging)console.log(...args);};return{consoleLogWhenDebuggingCMSPlus};};export const useGetFramerCMSItems=query=>{const[items,setItem]=useState([]);useEffect(()=>{if(!!query){const extractedItems=useQueryData(query);setItem(extractedItems);}},[query]);return items;};/**\n * Hook to debounce a value.\n * @param {number} delay - The delay in milliseconds before the debounced value is returned. Default is 2000.\n * @param {any} value - The value to debounce; the hook will return this value only after the specified delay without changes.\n * @returns {any} - Returns the debounced value after the delay.\n */export const useDebouncer=({delay,value})=>{const[debouncedValue,setDebouncedValue]=useState(value);useEffect(()=>{const ID=setTimeout(()=>{setDebouncedValue(value);},delay);return()=>clearTimeout(ID);},[value]);return debouncedValue;};/**\n * Hook to manage error alerts with a customizable delay.\n * @param {object} options - Configuration options for the hook.\n * @param {number} [options.delay=2000] - Optional delay in milliseconds before showing the alert. Defaults to 2000 if not provided.\n * @returns {object} - An object with the following properties:\n * @property {string[]} addMessage - An array of text messages representing the current error messages.\n * @property {boolean} hasMessages - A boolean indicating if there are any error messages.\n */export const useAlert=({delay=2e3}={})=>{const isOnFramerCanvas=useIsOnFramerCanvas();const[messages,setMessages]=useState([]);const debouncedMessages=useDebouncer({delay,value:messages});const addMessage=message=>{if(!isOnFramerCanvas)setMessages(prev=>[...prev,message]);};const clearMessages=()=>{if(!isOnFramerCanvas)setMessages([]);};useEffect(()=>{if(debouncedMessages.length>0)alert(`\nError!\n\n${debouncedMessages.join(\"\\n\")}`);},[debouncedMessages]);return{addMessage,clearMessages,hasMessages:messages.length>0};};/**\n * Custom hook that uses the cmsPlus collection's active filters to construct Framer's collection query where object.\n * @param {string} collectionID - The id of the collection stored in cmsPlus store.\n * @returns {function} Returns the where object structures as Framer's filtering tree to be used within the colleciton list query.\n */export const useConstructFramerCollectionQueryWhere=({collectionID})=>{const{consoleLogWhenDebuggingCMSPlus}=useConsoleLogWhenDebuggingCMSPlus();const[store]=useStore();const collection=store[collectionID];// get the current collection's props\nconst alias=collection?.alias||\"\";const fields=collection?.fields||{};const realTimeSearch=collection?.realTimeSearch||null;const collectionReferences=collection?.collectionReferences||null;// every element stores Framer's query filter structure made up of all the filters for that CMS field,\n// 'branches' will looped throught and formatted into the same Framer query filter structure\nconst branches=[];// if there is a search text, loop through the selected CMS fields and create a Framer query tree joined with \"or\" logic.\n// this is the only time were different CMS field are joined as \"match any\" logic\nif(!!realTimeSearch&&realTimeSearch.text!==\"\"){const nodes=[];// gather all the fields to search in and remove any duplicates\nconst realTimeSearchFields=Array.from(new Set(realTimeSearch.fields));realTimeSearchFields.forEach(fieldName=>{// if the field does not exist in the CMS, skip\nif(!fields.hasOwnProperty(fieldName))return;const control=fields[fieldName];const{type}=control;const controlIdentifier={collection:alias,name:control.id,type:\"Identifier\"};if(type===\"string\"){nodes.push(createFunctionCallNode({binaryNode:createBinaryOperationNode({left:controlIdentifier,right:{value:realTimeSearch.text,type:\"LiteralValue\"},operator:\"==\"}),functionName:\"CONTAINS\"}));}});if(nodes.length>0)branches.push(createFramerFilterTree({nodes,operator:\"or\"}));}// loop through each CMS field, for each active filter create a node, store in 'nodes', then format the 'nodes' into Framer's query filter structure with 'or' logic\nfor(const[name,props]of Object.entries(fields)){// @ts-ignore\nconst{id,type,options,optionTitles,filters}=props;// required for building the Framer query where object\n// collection alias is what collection this field is derived from\n// id is the Framer identification for this field control\nconst controlIdentifier={collection:alias,name:id,type:\"Identifier\"};const nodes=[];filters?.forEach((activeFilter,currentFilterIndex,theseFilters)=>{const{condition,value,isActive}=activeFilter;// handle the active filter based on CMS field type\nswitch(type){case\"enum\":// enum/option CMS field type is different. it does not need to loop through each active filter.\n// all possible options are gathered, and if theres one active filter, then a binary operation node is pushed into nodes, otherwise, more than 1 active filter uses a case note instead.\nif(currentFilterIndex>0)return;// cross reference the filter values to their corresponding Framer control IDs\nconst activeFilterOptionIds=theseFilters.filter(thisFilter=>thisFilter.isActive).map(thisFilter=>{const index=optionTitles.indexOf(thisFilter.value);return options[index];});if(activeFilterOptionIds.length<1)return;// use a binary operation node for 1 active filter, otherwise, for more active filters, use a case node\nnodes.push(theseFilters.length===1?createBinaryOperationNode({left:controlIdentifier,right:{value:activeFilterOptionIds[0],type:\"LiteralValue\"},operator:activeFilter.condition}):createCaseNode({controlId:id,optionIds:activeFilterOptionIds}));break;case\"slug\":case\"string\":// skip if the filter is inactive\nif(!isActive)return;// handles when the condition is \"Equals\" or \"Doesn't Equal\"\nif(condition==\"==\"||condition==\"!=\"){nodes.push(createBinaryOperationNode({left:controlIdentifier,right:{value,type:\"LiteralValue\"},operator:condition}));// handles when the condition is \"IS_SET\" or \"!IS_SET\"\n}else if(condition.includes(\"IS_SET\")){nodes.push(handleCondition_IsSet({...controlIdentifier,condition}));// handles filters with conditions as \"STARTS_WITH\", \"!STARTS_WITH\", \"ENDS_WITH\", \"!ENDS_WITH\", \"CONTAINS\", or \"!CONTAINS\"\n}else if(condition.includes(\"STARTS_WITH\")||condition.includes(\"ENDS_WITH\")||condition.includes(\"CONTAINS\")){nodes.push(handleCondition_StartsWith_EndsWith_Contains({controlIdentifier,condition,value}));}break;case\"number\":// skip if the filter is inactive\nif(!isActive)return;if(condition===\"IS_BETWEEN_NUMBERS\"){const range=parseRangeCondition({rangeString:value});const start={value:Number(range.start.value),operator:range.start.operator};const end={value:Number(range.end.value),operator:range.end.operator};nodes.push(handleCondition_IsBetween({controlIdentifier,start,end}));}else{// handles single values\nnodes.push(createBinaryOperationNode({left:controlIdentifier,right:{value,type:\"LiteralValue\"},operator:condition}));}break;case\"date\":// skip if the filter is inactive\nif(!isActive)return;if(condition===\"IS_BETWEEN_DATES\"){const range=parseRangeCondition({rangeString:value});const start={value:range.start.value,operator:range.start.operator};const end={value:range.end.value,operator:range.end.operator};nodes.push(handleCondition_IsBetween({controlIdentifier,start,end}));}else{// handles single dates\nnodes.push(createBinaryOperationNode({left:controlIdentifier,right:{value,type:\"LiteralValue\"},operator:condition}));}break;case\"file\":case\"richtext\":case\"responsiveimage\":case\"link\":// skip if the filter is inactive\nif(!isActive)return;nodes.push(handleCondition_IsSet({...controlIdentifier,condition}));break;case\"boolean\":// skip if the filter is inactive\nif(!isActive)return;nodes.push(activeFilter.value?controlIdentifier:createUnaryOperationNode({value:controlIdentifier}));break;case\"collectionreference\":// skip if the filter is inactive\nif(!isActive)return;// for references, the referenced collection alias is used as this field control's id, and the name is replaced with 'id'\nconst collectionIdentifier={...controlIdentifier,collection:id,name:\"id\"};if(condition.includes(\"IS_SET\")){nodes.push(handleCondition_IsSet({...collectionIdentifier,condition}));}if(condition==\"==\"||condition==\"!=\"){nodes.push(createBinaryOperationNode({left:collectionIdentifier,right:{value,type:\"LiteralValue\"},operator:condition}));}if(condition.includes(\"IS_INCLUDED\")){nodes.push(handleCondition_IsIncludedIn({...collectionIdentifier,condition,value}));}break;case\"multicollectionreference\":// skip of the filter is inactive\nif(!isActive)return;// get the multi referenced collection\nconst argument=collectionReferences[value];if(condition.includes(\"CONTAINS\")){// check if the filter condition is for the negated value\nconst negateValue=condition.charAt(0)===\"!\";const node=createBinaryOperationNode({left:{value,type:\"LiteralValue\"},right:{arguments:[argument],functionName:\"FLAT_ARRAY\",type:\"FunctionCall\"},operator:\"in\"});nodes.push(negateValue?createUnaryOperationNode({value:node}):node);}break;// do nothing if the control is not supported\ndefault:consoleLogWhenDebuggingCMSPlus(\"🆇:\",`CMS field ${type} type is not supported.`);break;}});// every node will be used to construct Framer's query tree joined with \"or\" logic.\n// this will allow filters from the same CMS fields applied as \"match any\" logic.\nif(nodes.length>0)branches.push(createFramerFilterTree({nodes,operator:\"or\"}));}// every branch will be used to construct Framer's query tree joined with \"and\" logic.\n// this will allow filters from different CMS fields applied as \"match all\" logic.\nconst where=createFramerFilterTree({nodes:branches,operator:\"and\"});return()=>Object.keys(where).length>0?where:null;};export const useFramerCollectionList=({collectionPlusID,framerCollectionList,isDebugging=false})=>{// stores\nconst[store,setStore]=useStore();const[devStore,setDevStore]=useDevStore();// states\n// key for updating the collection list on the page, a change will trigger a render\nconst[key,setKey]=useState(0);const[noSearchResults,setNoSearchResults]=useState(false);const[collection,setCollection]=useState({alias:null,id:null,name:null,query:null});// local variables\nconst collectionInitializedInStore=!!store[collection.id];const sortDirection=store[collection.id]?.sort;const debounced_delay=250;// hooks\nconst isOnFramerCanvas=useIsOnFramerCanvas();const constructFramerCollectionQueryWhere=useConstructFramerCollectionQueryWhere({collectionID:collection.id});// any dependencies that can trigger the render key should be debounced to prevent collection list flicker\nconst fields_debounced=useDebouncer({delay:debounced_delay,value:store[collection.id]?.fields});const searchText_debounced=useDebouncer({delay:debounced_delay,value:store[collection.id]?.realTimeSearch.text});const framerCollectionList_debounced=useDebouncer({delay:debounced_delay,value:framerCollectionList});// in order to extract cms query data, the cmsPlus filters will need to be formatted into Framer's query where tree structure and applied to query\nconst searchResults=useMemo(()=>{if(!!fields_debounced&&!!collection.query){const where=constructFramerCollectionQueryWhere();const orderBy=collection.query?.orderBy||null;// by default, sort is ascending when orberBy is undefined, and is not neede\nif(!!orderBy&&!!sortDirection){if(isDebugging){console.log(\"↕️:\",`Setting ${sortDirection} order.`);}collection.query.orderBy[0]={...collection.query.orderBy[0],direction:sortDirection};}if(!!where){if(isDebugging)console.log(\"🈸:\",where);collection.query.where=where;}else{delete collection.query.where;}if(isDebugging){console.log(\"🟠:\",\"Query:\",Object.assign({},collection.query));}return useQueryData(collection.query);}return null;},[fields_debounced,sortDirection,!!collection.query,searchText_debounced,framerCollectionList]);// updates the collection store with cms items, updates the render key for the collection list, and updates if the noSearchResults frame shoule be shown\nuseEffect(()=>{/**\n         * at this point:\n         * 1. framerCollectionList has been validated\n         * 2. the collection has been stored\n         * 3. its query has been altered by applying CMS+ filters\n         * 4. the cms items (query data) has been extracted using the altered query\n         * 5. finally the collection list on the page needs to be updated by changing the render key\n         */if(!!searchResults){if(isDebugging){console.log(\"🟢:\",`Updating CMS Items: id# ${collection.id} || name ${collection.name} || item count ${searchResults.length}`);}const noResults=searchResults.length<1;// key = 0 signifies the collection list is updating on Collection+\n// this avoids a split-second double render when switching from no results --> results until the collection list is updated with the latest filters\nconst updatedKey=noResults?0:Math.floor(Math.random()*1e5);setNoSearchResults(noResults);setKey(updatedKey);setStore(prev=>({...prev,[collection.id]:{...prev[collection.id],searchResults}}));}},[collectionInitializedInStore,sortDirection,fields_debounced,searchText_debounced,framerCollectionList_debounced]);// when on Preview/Live view only\n// if collection is not set in store, initialize a valid Framer collection list in store\n// otherwise, if it's the same list, sync the stored collection to Collection+\nuseEffect(()=>{if(!isOnFramerCanvas){if(isDebugging){console.log(\"🛠️:\",\"CMS Plus debugging enabled...\");console.log(\"\");}// get the query object from the Framer collection list\n// if a query object does not exist, then the linked frame is not a valid Framer collection list instance\nconst query=getProps({object:framerCollectionList,target:{name:\"query\",type:\"object\"}});// for Framer collection lists not using any references, this will return query.from\n// otherwise, list using references, it will return query.from.left\nconst props=getProps({object:query,target:{name:\"alias\",type:\"string\"},returnParent:true});// get the name of the collection\n// for collections that include references, multiple collections will be in the query object, but the first one is the target\nconst name=getProps({object:props,target:{name:\"displayName\",type:\"string\"}});// initialize in store\nif(!!name&&!!query){const storedCollection=store[collectionPlusID];if(!storedCollection){if(isDebugging){console.log(\"✅:\",`Initializing Collection+: \"${name}\" with id# ${collectionPlusID} in store.`);console.log(\"🟠:\",\"Query:\",Object.assign({},query));}// these are any native Framer filters applied on the list via the canvas\nconst defaultFilters=getProps({object:query,target:{name:\"where\",type:\"object\"}});// make the cms fields easier to manage by having the object props by readable titles, rather than its Framer ID\nconst cmsFieldsByID=getProps({object:props,target:{name:\"propertyControls\",type:\"object\"}});const cmsFieldsByName={};for(const[controlID,field]of Object.entries(cmsFieldsByID)){// @ts-ignore\nconst{title,...otherProps}=field;cmsFieldsByName[title]={...otherProps,id:controlID};}const from=getProps({object:query,target:{name:\"from\",type:\"object\"}});// if this collection list includes reference CMS fields, then gather all collections and remove the current one to be left the referenced collections only\nconst allCollections=getAllCollections({queryFrom:from});delete allCollections[props?.alias];const collectionReferences=Object.keys(allCollections).length>0?allCollections:null;if(isDebugging&&collectionReferences){console.log(\"🟠:\",\"References:\",collectionReferences);}// initiate the collection in store if valid\nsetStore(prev=>({...prev,[collectionPlusID]:{...defaultFilters&&{defaultFilters},...collectionReferences&&{collectionReferences},name,alias:props?.alias,fields:cmsFieldsByName,realTimeSearch:{fields:[],text:\"\"},searchResults:[]}}));}else{if(isDebugging){console.log(\"🟩:\",`Syncing Collection+ from store: id#${storedCollection.id} \"${storedCollection.name}\"`);}if(name===storedCollection.name){if(collection.query?.where){query.where=collection.query.where;}}}}// store query from a valid Framer collection list\nsetCollection({name,alias:props?.alias,id:collectionPlusID,...!!query&&{query}});// always start off with a 0 key, this notifies Collection+ the list is not ready and do not show\nsetKey(0);// cmsPlus collection+ must have props._cmsPlusDebugging = true via an override\nsetDevStore(prev=>({...prev,isDebugging}));}},[isOnFramerCanvas,framerCollectionList]);if(isDebugging)console.log(\"📀:\",Object.assign({},store));return{key,noSearchResults};};/**\n * Accesses a collection from the store using its ID.\n *\n * @param {string} collectionID - The collection's unique ID.\n * @returns {Object} -\n *   - `isCollectionReady`: True if the collection exists and the view is not on Framer Canvas.\n *   - `collectionFromStore`: The collection data or null if not found.\n */export const useCollectionFromStore=collectionID=>{const[store,setStore]=useStore();const collection=store[collectionID]||null;const isOnFramerCanvas=useIsOnFramerCanvas();return{isCollectionReady:!isOnFramerCanvas&&!!collection,collectionFromStore:collection};};/**\n * Validates the Filter+ component for CMS Plus.\n * Ensures the collection, field, and value are valid based on the given conditions.\n *\n * @param {string} collectionID - The ID of the CMS collection to validate.\n * @param {string} controlType - The expected control type of the field (e.g., 'string', 'number').\n * @param {string} cmsFieldName - The name of the CMS field to validate.\n * @param {*} value - The value being checked; must not be undefined if required.\n * @param {boolean} valueIsRequired - Whether a value is required (true) or not (false).\n *\n * @returns {boolean} - Returns true if the filter is valid; otherwise, false.\n */export const useIsFilter_Valid=({collectionID,controlType,cmsFieldName,value,valueIsRequired})=>{const{consoleLogWhenDebuggingCMSPlus}=useConsoleLogWhenDebuggingCMSPlus();const[isFilter_Valid,setIsFilter_Valid]=useState(false);const{isCollectionReady,collectionFromStore}=useCollectionFromStore(collectionID);const supportedControlTypes=[\"boolean\",\"collectionreference\",\"date\",\"enum\",\"file\",\"link\",\"multicollectionreference\",\"number\",\"responsiveimage\",\"richtext\",\"string\"];// Validate the filter when collection or related dependencies change\nuseEffect(()=>{setIsFilter_Valid(false)// Reset filter validity on dependency changes\n;if(isCollectionReady){const field=collectionFromStore.fields[cmsFieldName];const isSupportedType=supportedControlTypes.includes(field?.type);const usingMatchingFilterType=field?.type===controlType;const value_isValid=valueIsRequired?value!==undefined// Value must not be undefined if required\n:value===null// For optional values, null is acceptable\n;if(!!field&&isSupportedType&&usingMatchingFilterType&&value_isValid){setIsFilter_Valid(true)// Mark filter as valid\n;}else{const errors=[`❗️ Invalid Filter+ for ${cmsFieldName}:`];if(!field)errors.push(`${cmsFieldName} does not exist.`);if(!isSupportedType)errors.push(`${!!field?field.type:`Field`} type is not supported.`);if(!usingMatchingFilterType)errors.push(\"Using the wrong type of Filter+ for CMS field.\");if(value===undefined)errors.push(\"Value is required.\");consoleLogWhenDebuggingCMSPlus(errors.join(\"\\n\"));}}},[isCollectionReady,cmsFieldName,value,valueIsRequired]);return isFilter_Valid// Returns whether the filter is valid\n;};/**\n * Hook to initialize a filter in the collection store.\n *\n * Ensures that the specified filter is added to the store when valid and handles\n * clean-up or reset logic for non-preserved filters.\n *\n * Arguments:\n * @param {string} cmsFieldName - The CMS field to apply the filter to.\n * @param {string} collectionID - The ID of the collection this filter belongs to.\n * @param {string} condition - The filter's condition (e.g., \"equals\").\n * @param {string} controlType - The type of control (e.g., toggle, dropdown).\n * @param {boolean} isFilterActive - Whether the filter is currently active.\n * @param {boolean} isFilter_Valid - Indicates if the filter is valid for initialization.\n * @param {boolean} isPreserving - Whether the filter should be preserved on page reload.\n * @param {*} value - The value the filter applies.\n *\n * Returns:\n * - `isFilter_Initialized`: True if the filter is already initialized.\n * - `isFilter_CurrentlyActive`: The active status of the filter or null if uninitialized.\n */export const useInitializeFilter=({cmsFieldName,collectionID,condition,controlType,isFilterActive,isFilter_Valid,isPreserving,value})=>{const{consoleLogWhenDebuggingCMSPlus}=useConsoleLogWhenDebuggingCMSPlus();const setStore=useStore()[1];// Store default values for the filter to detect overrides.\nconst defaultValues_Ref=useRef({cmsFieldName,collectionID,condition,isPreserving,value});const{collectionFromStore}=useCollectionFromStore(collectionID);// Check if the filter is already initialized in the collection store.\nconst initializedFilter=collectionFromStore?.fields?.[cmsFieldName]?.filters?.find(f=>f.condition===condition&&(f.value===value||JSON.stringify(f.value)===JSON.stringify(value)))??null;const isFilterActive_defaultRef=useRef(isFilterActive);const isFilterActive_Ref=useRef(isFilterActive);const isFilter_Initialized_Ref=useRef(!!initializedFilter);// Keep track of filter active state.\nuseEffect(()=>{isFilterActive_Ref.current=isFilterActive;},[isFilterActive]);// Initialize the filter in the collection store if it is valid and not already initialized.\nuseEffect(()=>{if(isFilter_Valid&&!initializedFilter){consoleLogWhenDebuggingCMSPlus(`✅ Initializing Filter+: id# ${collectionID} | field ${cmsFieldName} | type ${controlType} | condition ${condition} | value ${value} | active? ${isFilterActive}`);isFilter_Initialized_Ref.current=true;setStore(prev=>{const prevFilters=prev[collectionID]?.fields[cmsFieldName]?.filters??[];return{...prev,[collectionID]:{...prev[collectionID],fields:{...prev[collectionID]?.fields,[cmsFieldName]:{...prev[collectionID]?.fields[cmsFieldName],filters:[...prevFilters,{condition,value,isActive:isFilterActive}]}}}};});}// Clean up: handle overrides if default values have changed.\nreturn()=>{const currentValues={cmsFieldName,collectionID,condition,isPreserving,value};const hasOverrides=Object.keys(currentValues).some(key=>{const currentValue=currentValues[key];const defaultValue=defaultValues_Ref.current[key];consoleLogWhenDebuggingCMSPlus(`Hooks > ${defaultValues_Ref.current.cmsFieldName}:`);consoleLogWhenDebuggingCMSPlus(`Hooks > Current Value:`,currentValue);consoleLogWhenDebuggingCMSPlus(`Hooks > Default Value:`,defaultValue);if(typeof defaultValue===\"object\"){return JSON.stringify(currentValue)!==JSON.stringify(defaultValue);}return currentValue!==defaultValue;});if(isFilter_Valid&&hasOverrides){const{cmsFieldName:prevCMSFieldName,collectionID:prevCollectionID,condition:prevCondition,value:prevValue}=defaultValues_Ref.current;consoleLogWhenDebuggingCMSPlus(`🆑 Clean Up Filter+: id# ${prevCollectionID} | field ${prevCMSFieldName} | type ${controlType} | condition ${prevCondition} | value ${prevValue}`);setStore(prev=>{const prevFilters=prev[prevCollectionID]?.fields[prevCMSFieldName]?.filters??[];return{...prev,[prevCollectionID]:{...prev[prevCollectionID],fields:{...prev[prevCollectionID]?.fields,[prevCMSFieldName]:{...prev[prevCollectionID]?.fields[prevCMSFieldName],filters:prevFilters.filter(f=>f.condition!==prevCondition||f.value!==prevValue)}}}};});}Object.assign(defaultValues_Ref.current,currentValues);};},[isFilter_Valid,cmsFieldName,collectionID,condition,isPreserving,value]);// Reset filters that are not preserved to their default state.\nuseEffect(()=>{return()=>{if(isFilter_Initialized_Ref.current&&!defaultValues_Ref.current.isPreserving){if(isFilterActive_Ref.current!==isFilterActive_defaultRef.current){const{cmsFieldName,collectionID,condition,value}=defaultValues_Ref.current;consoleLogWhenDebuggingCMSPlus(`🟨 Resetting Filter+: id# ${collectionID} | field ${cmsFieldName} | type ${controlType} | condition ${condition} | value ${value}`);setStore(prev=>{const prevFilters=prev[collectionID]?.fields[cmsFieldName]?.filters??[];return{...prev,[collectionID]:{...prev[collectionID],fields:{...prev[collectionID]?.fields,[cmsFieldName]:{...prev[collectionID]?.fields[cmsFieldName],filters:prevFilters.map(f=>f.condition===condition&&f.value===value?{...f,isActive:isFilterActive_defaultRef.current}:f)}}}};});}}};},[]);return{isFilter_Initialized:!!initializedFilter,isFilter_CurrentlyActive:initializedFilter?.isActive??null};};/**\n * Custom hook to sync a component's variant with its stored state.\n *\n * Arguments:\n * @param {boolean} component_isReady - Indicates if the component is ready for synchronization.\n * @param {function} debuggingLog - Logs debug information during synchronization.\n * @param {boolean} desynchronized - True if the component state differs from the stored state.\n * @param {boolean} isPreserving - Enables synchronization when state preservation is active.\n * @param {*} remoteValue - The value representing changes from an external source.\n * @param {function} transitionToVariant - Triggers a transition to the correct variant.\n *\n * Returns:\n * @returns {object} - `{ checkVariantSync }`, a flag indicating if the synchronization check is in progress.\n */export const useVariantSync=({component_isReady,debuggingLog,desynchronized,isPreserving,remoteValue,transitionToVariant})=>{const[checkVariantSync,setCheckVariantSync]=useState(isPreserving);// Sync to the correct variant when the component is ready and preserving state.\nuseEffect(()=>{if(component_isReady){if(isPreserving&&desynchronized){debuggingLog();transitionToVariant?.();}// Mark the synchronization check as completed.\nsetCheckVariantSync(false);}},[component_isReady]);// Handle changes from an external source.\nuseEffect(()=>{if(desynchronized&&!checkVariantSync){debuggingLog();transitionToVariant?.();}},[remoteValue]);return{checkVariantSync};};export const useFilter=({cmsPlusComponentName,collectionID,condition,value,cmsFieldName,isPreserving,isFilterActive,interactionActiveFilter,interactionInactiveFilter,controlType,valueIsRequired})=>{const{consoleLogWhenDebuggingCMSPlus}=useConsoleLogWhenDebuggingCMSPlus();const setStore=useStore()[1];const isFilterActive_defaultRef=useRef(isFilterActive);// Step 1: Validate the filter configuration.\nconst isFilter_Valid=useIsFilter_Valid({collectionID,controlType,cmsFieldName,valueIsRequired,value});// Step 2: Initialize the filter with its default state if not already done.\nconst{isFilter_Initialized,isFilter_CurrentlyActive}=useInitializeFilter({cmsFieldName,collectionID,condition,controlType,isFilterActive,isFilter_Valid,isPreserving,value});// compares the current active status with what is in the collection store\nconst desynchronized=isFilterActive!==isFilter_CurrentlyActive;// wait for the component to be ready, then check if the variant needs to be synced\nconst{checkVariantSync}=useVariantSync({desynchronized,isPreserving,component_isReady:isFilter_Initialized,remoteValue:isFilter_CurrentlyActive,debuggingLog:()=>consoleLogWhenDebuggingCMSPlus(`🔄 Syncing Filter+ to ${isFilter_CurrentlyActive?\"active\":\"inactive\"} variant: id# ${collectionID} | field ${cmsFieldName} | type ${controlType} | condition ${condition} | value ${value}`),transitionToVariant:isFilter_CurrentlyActive?interactionActiveFilter:interactionInactiveFilter});const isFilterActive_Debounced=useDebouncer({delay:200,value:isFilterActive});useEffect(()=>{if(isFilter_Initialized&&desynchronized&&!checkVariantSync){setStore(prev=>({...prev,[collectionID]:{...prev[collectionID],fields:{...prev[collectionID]?.fields,[cmsFieldName]:{...prev[collectionID]?.fields?.[cmsFieldName],filters:prev[collectionID]?.fields?.[cmsFieldName]?.filters?.map(f=>{if(f.condition===condition&&(f.value===value||JSON.stringify(f.value)===JSON.stringify(value))){return{...f,isActive:isFilterActive};}return f;})}}}}));consoleLogWhenDebuggingCMSPlus(`🟨 ${isFilterActive?\"Activating\":\"Deactivating\"} Filter+`,cmsFieldName,condition,value,`for id# ${collectionID}.`);}},[isFilter_Initialized,isFilterActive_Debounced,checkVariantSync]);};export const useReferencedCMSIds=()=>{const[store]=useStore();console.log(\"reference cms ids >\",store);};\nexport const __FramerMetadata__ = {\"exports\":{\"useConstructFramerCollectionQueryWhere\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useDebouncer\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useCollectionFromStore\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useGetFramerCMSItems\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useAlert\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useFilter\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useConsoleLogWhenDebuggingCMSPlus\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useIsFilter_Valid\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useFramerCollectionList\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useInitializeFilter\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useVariantSync\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useReferencedCMSIds\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","import{jsx as _jsx,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n *\n * @framerDisableUnlink\n */export default function CollectionIDControl(props){return /*#__PURE__*/_jsx(_Fragment,{});}addPropertyControls(CollectionIDControl,{collectionID:{type:ControlType.Number,title:\"Collection+ ID\",defaultValue:0,min:0,displayStepper:true,step:1}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CollectionIDControl\",\"slots\":[],\"annotations\":{\"framerDisableUnlink\":\"\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"auto\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./collectionID.map","// @ts-ignore\nimport{jsx as _jsx,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,getPropertyControls,ControlType}from\"framer\";import CollectionIDControl from\"https://framerusercontent.com/modules/Hxho9sUnioBkMjGbLBed/csoxszrftuhmv2NyuE1c/collectionID.js\";/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n *\n * @framerDisableUnlink\n */export default function BaseFilterControls(props){return /*#__PURE__*/_jsx(_Fragment,{});}addPropertyControls(BaseFilterControls,{...getPropertyControls(CollectionIDControl),interactionActiveFilter:{type:ControlType.EventHandler,title:\"Active Filter\",defaultValue:null},interactionInactiveFilter:{type:ControlType.EventHandler,title:\"Inactive Filter\",defaultValue:null},applyFilter:{type:ControlType.Boolean,title:\"Filter\",defaultValue:false,enabledTitle:\"Apply\",disabledTitle:\"Clear\",description:`Triggers filter function. [Learn more](https://framercms.plus/documentation/pure-functionality).\nExplore its [documentation](https://framercms.plus/documentation/component-filters-plus).`},preserveActiveFilter:{type:ControlType.Boolean,title:\"Preserve\",defaultValue:true,description:`Filter state. [Explore feature.](https://framercms.plus/documentation/preserve-settings)`}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"BaseFilterControls\",\"slots\":[],\"annotations\":{\"framerDisableUnlink\":\"\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"auto\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","import{jsx as _jsx,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n *\n * @framerDisableUnlink\n */export default function CMSFieldNameControl(props){return /*#__PURE__*/_jsx(_Fragment,{});}addPropertyControls(CMSFieldNameControl,{cmsFieldName:{type:ControlType.String,title:\"Field Name\",description:\"Must match exactly as the field is named in its collection.\",defaultValue:\"\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CMSFieldNameControl\",\"slots\":[],\"annotations\":{\"framerDisableUnlink\":\"\",\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./cmsFieldName.map","import{jsx as _jsx,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,// @ts-ignore\ngetPropertyControls,ControlType,useIsOnFramerCanvas,// @ts-ignore\nuseQueryData}from\"framer\";import{useMemo}from\"react\";import{useFilter,useConsoleLogWhenDebuggingCMSPlus}from\"https://framerusercontent.com/modules/uaC9hWf3ec7HqMv3sXMc/fThGQnEUZeWwDLSQMzea/Hooks.js\";import{useStore}from\"https://framerusercontent.com/modules/oaAH7umUjUOTeKmykfom/4GSr51yWhuxjuWu6QpOf/Stores.js\";import{getProps}from\"https://framerusercontent.com/modules/NktNXvnf4m4T7jKQcOHx/ld1Thy4iHs6v3180zPrJ/Utilities.js\";import BaseControls from\"https://framerusercontent.com/modules/1abSdslctova79WmNQRw/3fHstYFUOpeaxageGRMz/Filter_Base.js\";import CollectionIDControl from\"https://framerusercontent.com/modules/Hxho9sUnioBkMjGbLBed/csoxszrftuhmv2NyuE1c/collectionID.js\";import CMSFieldNameControl from\"https://framerusercontent.com/modules/xPWn77sAdxuRvon75kLo/B2UIyi7WVbdsZJvHIaDR/cmsFieldName.js\";/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n *\n * @framerDisableUnlink\n */export default function ReferencePlus(props){const{applyFilter,cmsFieldName,collectionID,condition,interactionActiveFilter,interactionInactiveFilter,referenceCollectionListInstance,preserveActiveFilter,value,values}=props;const cmsPlusComponentName=\"Filter+ Reference\";const{consoleLogWhenDebuggingCMSPlus}=useConsoleLogWhenDebuggingCMSPlus();const[store]=useStore();const collection=store[collectionID]||null;const isOnFramerCanvas=useIsOnFramerCanvas();const collectionIsReady=!isOnFramerCanvas&&!!collection;const cmsIDs=useMemo(()=>{// when this filter is checking if the reference is set or not, then the value is not used, therefore 'null' is returned\nif(condition.includes(\"IS_SET\"))return null;if(!collectionIsReady){if(condition.includes(\"=\"))return value;return values;}consoleLogWhenDebuggingCMSPlus(`Reference Filter+ ${cmsFieldName} > Value(s):`,value,values);const referenceCollectionList=referenceCollectionListInstance?.[0];const collectionReferenceLink=getProps({object:referenceCollectionList,target:{name:\"from\",type:\"object\"}});consoleLogWhenDebuggingCMSPlus(`Reference Filter+ ${cmsFieldName} > Linked Collection Ref:`,collectionReferenceLink);// get all the referenced collections\nconst collectionReferences=collection?.collectionReferences||null;// get the CMS field\nconst cmsField=collection?.fields?.[cmsFieldName]||null;// for CMS fields of type: collection references, their control ID is the alias of their collection\nconst collectionAlias=cmsField?.id;// get the referenced collection\nconst collectionReference=collectionReferences?.[collectionAlias]||collectionReferenceLink||null;consoleLogWhenDebuggingCMSPlus(`Reference Filter+ ${cmsFieldName} > Collection Ref:`,collectionReference);if(!collectionReference)return null;// const collectionReferenceAlias = collectionReference.alias\n// get the CMS fields of the referenced collection\nconst collectionReferenceFields=getProps({object:collectionReference,target:{name:\"propertyControls\",type:\"object\"}});const collectionIdentifier={collection:collectionReference.alias,name:\"id\",type:\"Identifier\"};// construct the new query for extracting its CMS items\nconst newQuery={from:collectionReference,select:[collectionIdentifier]};consoleLogWhenDebuggingCMSPlus(`Reference Filter+ ${cmsFieldName} > New Query:`,newQuery);let slugControlID;// loop throught the referenced colletion fields until you find the Slug field\nfor(const[controlID,controlProps]of Object.entries(collectionReferenceFields)){if(controlProps.title!==\"Slug\")continue;// push the slug into the select array, which is needed in the new query\nnewQuery.select.push({...collectionIdentifier,name:controlID});slugControlID=controlID;break;}// extract the cmsItems\nconst cmsItems=useQueryData(newQuery)||[];consoleLogWhenDebuggingCMSPlus(`Reference Filter+ ${cmsFieldName} > CMS Items:`,cmsItems);// filter out only the cmsItems that the user inputed and return only the CMS item ID\n// slugs are unique, so there should be one result per input value\nconst selectedCMSItems=cmsItems.filter(item=>{const{id,[slugControlID]:slug}=item;consoleLogWhenDebuggingCMSPlus(`Reference Filter+ ${cmsFieldName} > Item:`,item);consoleLogWhenDebuggingCMSPlus(`Reference Filter+ ${cmsFieldName} > Slug:`,slug);// for equals/doesn't equal compare with the single value\nif(condition.includes(\"=\")){if(value===slug)return true;}else{// for included/not included compare the current slug agains all the values the user inputed\nif(values.find(v=>v===slug))return true;}return false;});// we only need to retrun the CMS item IDs\nconst selectedCMSItemIDs=selectedCMSItems.map(item=>item.id);/**\n         * when the condition is equals/doesn't equal, then the array should have only one, and if the user inputed a valid slug to reference, then the first element is defined, otherwise no slug was found and returns 'null'\n         *\n         * when condition is included/not included in, the array will contain all found CMS item IDs, one for each valid input, if nothing was found and it results in an empty array, then return 'null'\n         */return condition.includes(\"=\")?selectedCMSItemIDs[0]||null:selectedCMSItemIDs.length>0?selectedCMSItemIDs:null;},[collectionIsReady,value,values]);useFilter({cmsFieldName,cmsPlusComponentName,collectionID,condition,interactionActiveFilter,interactionInactiveFilter,isPreserving:preserveActiveFilter,controlType:\"collectionreference\",isFilterActive:applyFilter,value:cmsIDs,valueIsRequired:!condition.includes(\"IS_SET\")});return /*#__PURE__*/_jsx(_Fragment,{});}ReferencePlus.displayName=\"Filter+ Reference\";addPropertyControls(ReferencePlus,{...getPropertyControls(CollectionIDControl),...getPropertyControls(BaseControls),...getPropertyControls(CMSFieldNameControl),referenceCollectionListInstance:{type:ControlType.ComponentInstance,title:\"Referenced Collection List\",description:`Link the referenced collection list.`},condition:{type:ControlType.Enum,title:\"Condition\",defaultValue:\"IS_SET\",optionTitles:[\"Is Set\",\"Isn't Set\",\"Equals\",\"Doesn't Equal\",\"Is Included In\",\"Isn't Included In\"],options:[\"IS_SET\",\"!IS_SET\",\"==\",\"!=\",\"IS_INCLUDED\",\"!IS_INCLUDED\"]},value:{type:ControlType.String,defaultValue:\"\",title:\"Slug\",description:\"The slug of the referenced CMS item in its collection.\",hidden:({condition})=>!condition.includes(\"=\")},values:{type:ControlType.Array,defaultValue:[],title:\"Slugs\",description:\"A list of slugs of the referenced CMS items in their collection.\",control:{type:ControlType.String},hidden:({condition})=>!condition.includes(\"IS_INCLUDED\")}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ReferencePlus\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"auto\",\"framerDisableUnlink\":\"\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"mYAA8E,SAAgB,EAAY,EAAO,CACjH,IAAM,EAAU,EAAK,CAAC,MAAM,OAAO,OAAO,CAAC,GAAG,EAAO,CAAC,CAAC,CAAC,CAClD,EAAa,GAAU,CAC1B,OAAO,GAAW,aAAY,EAAS,EAAS,EAAU,MAAM,EAAE,EAAU,MAAM,OAAO,OAAO,CAAC,GAAG,EAAU,MAAM,GAAG,EAAS,CAAC,EAChI,EAAW,OAAO,GAAS,SAAS,OAAO,OAAO,CAAC,GAAG,EAAO,CAAC,CAAC,EAC7D,EAAa,IAAI,IACjB,EAAc,GAAU,CAC3B,OAAO,GAAW,aAAY,EAAS,EAAS,EAAW,EAAE,EAAW,OAAO,GAAW,SAAS,OAAO,OAAO,CAAC,GAAG,EAAW,GA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