{"version":3,"file":"utils.js@_0.9.DYUAL2LH.mjs","names":["Input","useRef","useMemo","useCallback","value","useState"],"sources":["https:/framerusercontent.com/modules/bKbq7LPnXlKphdBV6Fka/Fr4TWZ23hljnULSF9dIC/Input.js","https:/framerusercontent.com/modules/vj7bFUjvEQFgEzNBkdoG/vf3CKm378wlVcBk7IhSU/createStore.js","https:/framer.com/m/framer/store.js@^1.0.0","https:/framerusercontent.com/modules/28rXvpPsrum7FH6cMELS/1jCAazZw1EGHjrG5Nu5D/Utils.js","https:/framer.com/m/framer/utils.js@^0.9.0"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";// @ts-ignore\nimport{ControlType,addPropertyControls,withCSS}from\"framer\";import{useCallback,useEffect,useRef,useMemo}from\"react\";import{fontStack,fontControls,fontSizeOptions,useOnEnter,useFontControls,useIsInPreview,usePadding,useRadius,paddingControl,borderRadiusControl,useControlledState}from\"https://framer.com/m/framer/default-utils.js@^0.45.0\";import{useIsomorphicLayoutEffect}from\"https://framer.com/m/framer/useIsomorphicLayoutEffect.js@0.2.0\";/**\n * INPUT\n *\n * @framerIntrinsicWidth 260\n * @framerIntrinsicHeight 50\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight any\n */export const Input=withCSS(function Input(props){const{placeholder,backgroundColor,textColor,border,borderWidth,password,onSubmit,onFocus,onBlur,value,textAlign,multiLine,placeholderColor,focused,inputStyle,caretColor,fontFamily,blurOnSubmit,disabled,keyboard,truncate,onChange,onValueChange,maxLength,lineHeight,enableLimit,isRTL,style}=props;const[inputValue,setValue]=useControlledState(value);const inputEle=useRef();const Tag=useMemo(()=>multiLine?\"textarea\":\"input\",[multiLine]);const inPreview=useIsInPreview();const fontStyles=useFontControls(props);const paddingValue=usePadding(props);const borderRadius=useRadius(props);const handleChange=useCallback(event=>{const element=multiLine?event.nativeEvent.target:event.nativeEvent.target;const value=element.value;setValue(value);if(onChange)onChange(value);if(onValueChange)onValueChange(value);},[onChange,multiLine]);useOnEnter(()=>{if(inPreview&&focused)inputEle.current.focus();});useEffect(()=>{if(inPreview&&focused)inputEle.current.focus();},[focused]);useIsomorphicLayoutEffect(()=>{// I only want to control my own height is auto-sizing is enabled\nif(multiLine&&props.style.height!==\"100%\"){// Autosizing hack for multi-line textareas, may have perf impact\ninputEle.current.style.height=\"auto\";inputEle.current.style.height=inputEle.current.scrollHeight+\"px\";}},[inputValue,multiLine,style?.height,placeholder]);return /*#__PURE__*/_jsx(Tag,{onChange:handleChange,ref:inputEle,value:inputValue,placeholder:placeholder,onKeyDown:e=>{if(e.keyCode===13){if(blurOnSubmit&&inputEle.current)inputEle.current.blur();if(onSubmit)onSubmit();}},disabled:disabled,onFocus:()=>{if(onFocus)onFocus();},onBlur:()=>{if(onBlur)onBlur();},maxLength:enableLimit?maxLength:524288,autoFocus:inPreview&&focused,className:\"framer-default-input\",rows:1,style:{\"--framer-default-input-border-width\":`${props.borderWidth}px`,\"--framer-default-input-border-color\":props.focusColor,\"--framer-default-input-placeholder-color\":props.placeholderColor,...baseInputStyles,color:textColor,backgroundColor,borderRadius,textAlign,lineHeight,letterSpacing:props.letter,caretColor,margin:0,display:\"flex\",height:\"auto\",padding:paddingValue,direction:isRTL?\"rtl\":\"ltr\",overflow:\"show\",textOverflow:truncate?\"ellipsis\":\"unset\",boxShadow:!inPreview&&focused?`inset 0 0 0 ${props.borderWidth}px ${props.focusColor}`:`inset 0 0 0 ${borderWidth}px ${border}`,...inputStyle,...style,...fontStyles},type:password?\"password\":\"text\",inputMode:keyboard});},[\".framer-default-input { --framer-default-input-border-width: 1px; --framer-default-input-border-color: #09f; --framer-default-input-placeholder-color: #aaa; }\",\".framer-default-input:focus { box-shadow: inset 0 0 0 var(--framer-default-input-border-width) var(--framer-default-input-border-color) !important; }\",\".framer-default-input::placeholder { color: var(--framer-default-input-placeholder-color) !important; }\"]);Input.defaultProps={value:\"\",placeholder:\"Type something…\",width:260,height:50,backgroundColor:\"#EBEBEB\",textColor:\"#333\",focusColor:\"#09F\",fontSize:16,fontWeight:400,borderRadius:8,lineHeight:1.4,padding:15,border:\"rgba(0,0,0,0)\",placeholderColor:\"#aaa\",borderWidth:1,truncate:false,alignment:\"left\",caretColor:\"#333\",multiLine:false,maxLength:10,password:false,keyboard:\"\"};addPropertyControls(Input,{placeholder:{type:ControlType.String,title:\"Placeholder\"},value:{type:ControlType.String,title:\"Value\"},textColor:{type:ControlType.Color,title:\"Text\"},caretColor:{type:ControlType.Color,title:\"Caret\"},placeholderColor:{type:ControlType.Color,title:\"Placeholder\"},backgroundColor:{type:ControlType.Color,title:\"Background\"},border:{type:ControlType.Color,title:\"Border\"},borderWidth:{type:ControlType.Number,title:\" \",min:1,max:5,displayStepper:true},focusColor:{type:ControlType.Color,title:\"Focus\"},focused:{type:ControlType.Boolean,title:\"Focused\",defaultValue:false,disabledTitle:\"No\",enabledTitle:\"Yes\"},...fontControls,fontSize:{...fontSizeOptions},lineHeight:{type:ControlType.Number,min:0,step:.1,max:2,displayStepper:true},...paddingControl,...borderRadiusControl,textAlign:{title:\"Text Align\",type:ControlType.Enum,displaySegmentedControl:true,optionTitles:[\"Left\",\"Center\",\"Right\"],options:[\"left\",\"center\",\"right\"]},letter:{type:ControlType.Number,title:\"Letter\",min:-.5,max:5,step:.01,defaultValue:0},isRTL:{type:ControlType.Boolean,title:\"Direction\",enabledTitle:\"RTL\",disabledTitle:\"LTR\",defaultValue:false},disabled:{type:ControlType.Boolean,title:\"Disabled\",defaultValue:false,disabledTitle:\"No\",enabledTitle:\"Yes\"},multiLine:{type:ControlType.Boolean,title:\"Text Area\",defaultValue:false,disabledTitle:\"No\",enabledTitle:\"Yes\"},truncate:{type:ControlType.Boolean,title:\"Truncate\",defaultValue:false,disabledTitle:\"No\",enabledTitle:\"Yes\",hidden:({multiLine})=>multiLine},password:{type:ControlType.Boolean,title:\"Password\",hidden:({multiLine})=>multiLine,defaultValue:false,disabledTitle:\"No\",enabledTitle:\"Yes\"},enableLimit:{title:\"Limit\",type:ControlType.Boolean,displayStepper:true,defaultValue:false,disabledTitle:\"No\",enabledTitle:\"Yes\"},maxLength:{title:\" \",type:ControlType.Number,// @ts-ignore\ndefaultValue:Input.defaultProps.maxLength,displayStepper:true,min:1,hidden:({enableLimit})=>!enableLimit},keyboard:{type:ControlType.Enum,title:\"Keyboard\",defaultValue:\"\",options:[\"\",\"numeric\",\"tel\",\"decimal\",\"email\",\"url\",\"search\"],optionTitles:[\"Default\",\"Numeric\",\"Phone\",\"Decimal\",\"Email\",\"URL\",\"Search\"]},onChange:{type:ControlType.EventHandler},onSubmit:{type:ControlType.EventHandler},onFocus:{type:ControlType.EventHandler},onBlur:{type:ControlType.EventHandler}});const baseInputStyles={pointerEvents:\"auto\",border:\"none\",width:\"100%\",boxSizing:\"border-box\",outline:\"none\",resize:\"none\",margin:0,fontFamily:fontStack,WebkitTapHighlightColor:\"rgba(0, 0, 0, 0)\",WebkitAppearance:\"none\"};\nexport const __FramerMetadata__ = {\"exports\":{\"Props\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"Input\":{\"type\":\"reactComponent\",\"name\":\"Input\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"any\",\"framerIntrinsicWidth\":\"260\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"50\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Input.map","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","/*\n * createStore (framer/store@1.0.1)\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/vj7bFUjvEQFgEzNBkdoG/vf3CKm378wlVcBk7IhSU/createStore.js\"\n","export const centerContent = {\n    display: \"flex\",\n    justifyContent: \"center\",\n    alignItems: \"center\"\n};\nexport const autoSizingText = {\n    width: \"max-content\",\n    wordBreak: \"break-word\",\n    overflowWrap: \"break-word\",\n    overflow: \"hidden\",\n    whiteSpace: \"pre-wrap\",\n    flexShrink: 0\n};\nexport const defaultContainerStyles = {\n    ...centerContent,\n    overflow: \"hidden\"\n};\nexport const containerStyles = defaultContainerStyles;\nexport const randomColor = ()=>\"#\" + Math.floor(Math.random() * 16777215).toString(16)\n;\n\nexport const __FramerMetadata__ = {\"exports\":{\"centerContent\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"containerStyles\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"autoSizingText\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"defaultContainerStyles\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"randomColor\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}\n//# sourceMappingURL=./Utils.map","/*\n * Utils (framer/utils@0.9.0)\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/28rXvpPsrum7FH6cMELS/1jCAazZw1EGHjrG5Nu5D/Utils.js\"\n"],"mappings":"6tBAA2C,IACiB,IAAwD,IAA8N,IAAsG,CAQxa,EAAM,EAAQ,SAAe,EAAM,CAAC,GAAK,CAAC,cAAY,kBAAgB,YAAU,SAAO,cAAY,WAAS,WAAS,UAAQ,SAAO,QAAM,YAAU,YAAU,mBAAiB,UAAQ,aAAW,aAAW,aAAW,eAAa,WAAS,WAAS,WAAS,WAAS,gBAAc,YAAU,aAAW,cAAY,QAAM,SAAO,EAAW,CAAC,EAAW,GAAU,EAAmB,EAAM,CAAO,EAASC,GAAQ,CAAO,EAAIC,MAAY,EAAU,WAAW,QAAQ,CAAC,EAAU,CAAC,CAAO,EAAU,GAAgB,CAAO,EAAW,EAAgB,EAAM,CAAO,EAAa,EAAW,EAAM,CAAO,EAAa,EAAU,EAAM,CAAO,EAAaC,EAAY,GAAO,CAA2E,IAAMC,EAAxD,EAAM,YAAY,OAAoD,MAAM,EAASA,EAAM,CAAI,GAAS,EAASA,EAAM,CAAI,GAAc,EAAcA,EAAM,EAAG,CAAC,EAAS,EAAU,CAAC,CAEntB,OAFotB,MAAe,CAAI,GAAW,GAAQ,EAAS,QAAQ,OAAO,EAAG,CAAC,MAAc,CAAI,GAAW,GAAQ,EAAS,QAAQ,OAAO,EAAG,CAAC,EAAQ,CAAC,CAAC,MAA8B,CACvhC,GAAW,EAAM,MAAM,SAAS,SACnC,EAAS,QAAQ,MAAM,OAAO,OAAO,EAAS,QAAQ,MAAM,OAAO,EAAS,QAAQ,aA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