{"project":"aec_vision_simulator","branch":"main","commit":"7226af27fa598d249abd7a6d9123f9b371e0bf08","component":{"apis":{"Untitled":{"url":{"type":"value","value":"https://toddle.dev/.toddle/demo/weather"},"auth":null,"body":{"type":"value","value":null},"name":"Untitled","path":[],"type":"REST","proxy":false,"method":"GET","headers":{"type":"record","entries":[]},"autoFetch":{"type":"value","value":true},"dependsOn":[]}},"name":"HomePage","nodes":{"root":{"tag":"div","type":"element","children":["qAqgqq8_gwm9g3MRBJn6W"],"classes":{"eYsmYy":{"formula":{"type":"value","value":true}}},"customProperties":{}},"qAqgqq8_gwm9g3MRBJn6W":{"name":"aec_vision_simulator-main","type":"component","customProperties":{}}},"route":{"path":[],"query":{}},"onLoad":{"actions":[],"trigger":"load"},"functions":{},"variables":{"selected_category":{"initialValue":{"type":"value","value":"none"}},"showPerfectVision":{"initialValue":{"type":"value","value":false}},"selected_condition":{"initialValue":{"type":"value","value":"none"}},"selected_variation":{"initialValue":{"type":"value","value":"none"}}}},"components":[{"apis":{"getImage":{"url":{"type":"value","value":"https://flow.amplifyeyecare.com"},"auth":null,"body":{"type":"value","value":null},"name":"getImage","path":[{"formula":{"type":"value","value":"api_functions"}},{"formula":{"type":"value","value":"vision_sim"}},{"formula":{"type":"value","value":"vision_sim_2"}},{"formula":{"type":"value","value":"getSingleVariation.php"}}],"type":"REST","proxy":false,"method":"GET","headers":null,"autoFetch":{"type":"value","value":false},"onCompleted":{"actions":[{"data":{"path":["Apis","getImage","data","image"],"type":"path"},"type":"SetVariable","variable":"currentImgURL"},{"data":{"name":"@toddle/concatenate","type":"function","arguments":[{"name":"0","type":{"type":"Union","types":[{"type":"String"},{"type":"Array","ofType":{"type":"Any"}}]},"formula":{"path":["Apis","getImage","data","variation"],"type":"path"}}],"display_name":"Concatenate","variableArguments":true},"type":"SetVariable","variable":"title"},{"data":{"path":["Apis","getImage","data","description"],"type":"path"},"type":"SetVariable","variable":"description"},{"data":{"path":["Variables","youtube_link"],"type":"path"},"type":"SetVariable","variable":"youtube_link"},{"data":{"path":["Apis","getImage","data","more_info"],"type":"path"},"type":"SetVariable","variable":"page_link"},{"data":{"type":"switch","cases":[{"formula":{"type":"value","value":true},"condition":{"name":"@toddle/not","type":"function","arguments":[{"name":"Input","type":{"type":"Boolean"},"formula":{"name":"@toddle/equals","type":"function","arguments":[{"name":"First","type":{"type":"Any"},"formula":{"path":["Apis","getImage","data","data","0","ampup_link"],"type":"path"}},{"name":"Second","type":{"type":"Any"},"formula":{"type":"value","value":""}}],"display_name":"Equals"}}],"display_name":"Not"}}],"default":{"type":"value","value":false}},"type":"SetVariable","variable":"showButton"}],"trigger":"Success"},"queryParams":{"recordId":{"name":"recordId","formula":{"path":["Variables","selectedVariation"],"type":"path"}}},"dependsOn":[]},"getCondition":{"url":{"type":"value","value":"https://flow.amplifyeyecare.com"},"auth":null,"body":{"type":"value","value":null},"name":"getCondition","path":[{"formula":{"type":"value","value":"api_functions"}},{"formula":{"type":"value","value":"vision_sim"}},{"formula":{"type":"value","value":"vision_sim_2"}},{"formula":{"type":"value","value":"lookupConditions.php"}}],"type":"REST","proxy":false,"method":"GET","headers":{"type":"record","entries":[]},"autoFetch":{"type":"value","value":false},"queryParams":{"category":{"name":"category","formula":{"path":["Variables","selectedCategory"],"type":"path"}}},"dependsOn":[]},"getVariation":{"url":{"type":"value","value":"https://flow.amplifyeyecare.com"},"auth":null,"body":{"type":"value","value":null},"name":"getVariation","path":[{"formula":{"type":"value","value":"api_functions"}},{"formula":{"type":"value","value":"vision_sim"}},{"formula":{"type":"value","value":"vision_sim_2"}},{"formula":{"type":"value","value":"lookupVariation.php"}}],"type":"REST","proxy":false,"method":"GET","headers":{"type":"record","entries":[]},"autoFetch":{"type":"value","value":false},"onCompleted":{"actions":[{"data":{"type":"switch","cases":[{"formula":{"path":["Apis","getImage","data","data","0","img_url"],"type":"path"},"condition":{"name":"@toddle/notEqual","type":"function","arguments":[{"name":"First","type":{"type":"Any"},"formula":{"path":["Apis","getImage","data","data","0","img_url"],"type":"path"}},{"name":"Second","type":{"type":"Any"},"formula":{"type":"value","value":""}}],"display_name":"Not equal"}}],"default":{"type":"value","value":"https://cdn.amplifyeye.care/wp-content/uploads/2023/12/Perfect-Vision-1.jpg"}},"type":"SetVariable","variable":"currentImgURL"},{"data":{"path":["Apis","getVariation","data","0","youtube"],"type":"path"},"type":"SetVariable","variable":"youtube_link"}],"trigger":"Success"},"queryParams":{"category":{"name":"category","formula":{"path":["Variables","selectedCategory"],"type":"path"}},"condition":{"name":"condition","formula":{"path":["Variables","selectedCondition"],"type":"path"}}},"dependsOn":[]},"getCategories":{"url":{"type":"value","value":"https://flow.amplifyeyecare.com"},"auth":null,"body":{"type":"value","value":null},"name":"getCategories","path":[{"formula":{"type":"value","value":"api_functions"}},{"formula":{"type":"value","value":"vision_sim"}},{"formula":{"type":"value","value":"vision_sim_2"}},{"formula":{"type":"value","value":"allCategories.php"}}],"type":"REST","proxy":false,"method":"GET","headers":{"type":"record","entries":[]},"autoFetch":{"type":"value","value":true},"queryParams":{},"dependsOn":[]}},"name":"aec_vision_simulator-main","nodes":{"root":{"tag":"aec_vision_simulator-main","type":"element","children":["Ou7iIK8B4aE4vvMzAsGJS"],"classes":{"byyowX":{"formula":{"type":"value","value":true}}},"customProperties":{}},"--tM-YkyWkdXOI8vymGSQ":{"tag":"p","type":"element","children":["clX8jQCy1TJpWsYjPUVuG"],"classes":{"fzgNPK":{"formula":{"type":"value","value":true}}},"customProperties":{}},"3SWt5kgmTehOeR5eHPZa5":{"type":"text","value":{"path":["ListItem","Item"],"type":"path"}},"5qfCB0RxuEStpngMLiad5":{"id":"5qfCB0RxuEStpngMLiad5","tag":"select","type":"element","events":{"change":{"actions":[{"data":{"path":["Event","target","value"],"type":"path"},"type":"SetVariable","variable":"selectedVariation"},{"api":"getImage","type":"Fetch","input":{},"onError":{"actions":[]},"onSuccess":{"actions":[{"data":{"path":["Apis","getImage","data","image"],"type":"path"},"type":"SetVariable","variable":"currentImgURL"}],"trigger":"onSuccess"}}],"trigger":"change"}},"children":["gWHjbivVak0o75gRtmgV3"],"condition":{"type":"and","arguments":[{"formula":{"name":"@toddle/not","type":"function","arguments":[{"name":"Input","type":{"type":"Boolean"},"formula":{"path":["Apis","getCondition","isLoading"],"type":"path"}}],"display_name":"Not"}},{"formula":{"name":"@toddle/not","type":"function","arguments":[{"name":"Input","type":{"type":"Boolean"},"formula":{"path":["Apis","getVariation","isLoading"],"type":"path"}}],"display_name":"Not"}},{"formula":{"path":["Variables","showVariationDropdown"],"type":"path"}}]},"classes":{"eLTHeJ":{"formula":{"type":"value","value":true}}},"customProperties":{}},"6Xx0HBsoCGY4aWSl8LCRu":{"type":"text","value":{"type":"value","value":"Watch on YouTube"}},"7x4xbhOQ9PDkuofC5WjIH":{"type":"text","value":{"type":"value","value":"View Perfect Vision"}},"8GYs6BqsDkzhYsWElVkSD":{"tag":"option","type":"element","attrs":{"value":{"type":"value","value":"1"},"hidden":{"type":"value","value":"<attribute>"},"disabled":{"type":"value","value":"<attribute>"},"selected":{"type":"value","value":"<attribute>"}},"children":["y015Z1-9W6N1s-qATaDeR"],"customProperties":{}},"9fDgbBF36QuH9ynLafXLi":{"id":"9fDgbBF36QuH9ynLafXLi","tag":"button","type":"element","attrs":{"type":{"type":"value","value":"button"}},"events":{"mouseup":{"actions":[{"data":{"path":["Variables","tempVariationButtonDown"],"type":"path"},"type":"SetVariable","variable":"currentImgURL"}],"trigger":"mouseup"},"touchend":{"actions":[{"data":{"path":["Variables","tempVariationButtonDown"],"type":"path"},"type":"SetVariable","variable":"currentImgURL"}],"trigger":"touchend"},"mousedown":{"actions":[{"data":{"path":["Variables","currentImgURL"],"type":"path"},"type":"SetVariable","variable":"tempVariationButtonDown"},{"data":{"path":["Apis","getImage","data","perfect_vision_url"],"type":"path"},"type":"SetVariable","variable":"currentImgURL"}],"trigger":"mousedown"},"touchstart":{"actions":[{"data":{"path":["Variables","currentImgURL"],"type":"path"},"type":"SetVariable","variable":"tempVariationButtonDown"},{"data":{"path":["Apis","getImage","data","data","0","perfect_vision_url"],"type":"path"},"type":"SetVariable","variable":"currentImgURL"}],"trigger":"touchstart"}},"children":["7x4xbhOQ9PDkuofC5WjIH"],"condition":{"name":"@toddle/startsWith","type":"function","arguments":[{"name":"String","type":{"type":"String"},"formula":{"path":["Variables","selectedVariation"],"type":"path"}},{"name":"Prefix","type":{"type":"String"},"formula":{"type":"value","value":"rec"}}],"display_name":"Starts with"},"classes":{"bMiaMR":{"formula":{"type":"value","value":true}}},"customProperties":{}},"Cs26e4GoCd3G3gXDrWE-N":{"tag":"div","type":"element","children":["IsvHnifY0RR8LiLUURKvi","--tM-YkyWkdXOI8vymGSQ","mdLqQ2JCwzd7xKs3rovcE"],"classes":{"NzWll":{"formula":{"type":"value","value":true}}},"customProperties":{}},"IsvHnifY0RR8LiLUURKvi":{"tag":"h2","type":"element","children":["oxeTjYCgfvofNsT2Kv3yG"],"classes":{"beWYYP":{"formula":{"type":"value","value":true}}},"customProperties":{}},"KZcCkUhGuIoFqORwKfN2G":{"type":"text","value":{"type":"value","value":"Powered by Specialty Vision"}},"LiZGKLEsLcfIrWfdHYqtW":{"type":"text","value":{"type":"value","value":"Select"}},"Lv1eMAEAH5MsfXy5bMBQd":{"type":"text","value":{"path":["ListItem","Item","variation"],"type":"path"}},"N7rhq4iF-2Yt1ScEKCb9W":{"type":"text","value":{"type":"value","value":"More information"}},"NV6wxGg2D-cjSf-vK2aAz":{"tag":"div","type":"element","children":["r1AXerO3us4iE5u-dgmP5"],"classes":{"bCSSEQ":{"formula":{"type":"value","value":true}}},"customProperties":{}},"Ou7iIK8B4aE4vvMzAsGJS":{"tag":"div","type":"element","children":["cj0EtugauUK6ujWZ0Q2NE","PpXtvnZSgVG1rBWuGxHkS","n6ALvJh5u2S4x7wJEisQr"],"classes":{"cARGcU":{"formula":{"type":"value","value":true}}},"customProperties":{}},"PCkTCHOLlXU1u-Vod7kEc":{"tag":"div","type":"element","children":["_O1NC7AgKn6nSE7jQviH3","xCArqsybpAmyuqU-vGiHW","5qfCB0RxuEStpngMLiad5","9fDgbBF36QuH9ynLafXLi"],"classes":{"bqLeKd":{"formula":{"type":"value","value":true}}},"customProperties":{}},"PpXtvnZSgVG1rBWuGxHkS":{"tag":"div","type":"element","children":["y6VgyAJLVDu-aFX0I78Cs"],"classes":{"ePeRet":{"formula":{"type":"value","value":true}}},"customProperties":{}},"_O1NC7AgKn6nSE7jQviH3":{"tag":"select","type":"element","events":{"change":{"actions":[{"data":{"path":["Event","target","value"],"type":"path"},"type":"SetVariable","variable":"selectedCategory"},{"data":{"type":"value","value":""},"type":"SetVariable","variable":"selectedVariation"},{"data":{"type":"value","value":false},"type":"SetVariable","variable":"showVariationDropdown"},{"data":{"type":"value","value":true},"type":"SetVariable","variable":"showConditionDropdown"},{"api":"getCondition","type":"Fetch","input":{},"onError":{"actions":[]},"onSuccess":{"actions":[{"data":{"type":"value","value":true},"type":"SetVariable","variable":"showConditionDropdown"}],"trigger":"onSuccess"}}],"trigger":"change"}},"children":["tbaMPyl6JgFGrAx5GqiEv","eCfnGP7d5nDLEsRAiNBpn"],"classes":{"bOUEJe":{"formula":{"type":"value","value":true}}},"customProperties":{}},"cj0EtugauUK6ujWZ0Q2NE":{"tag":"div","type":"element","children":["PCkTCHOLlXU1u-Vod7kEc"],"classes":{"fxDqwo":{"formula":{"type":"value","value":true}}},"customProperties":{}},"clX8jQCy1TJpWsYjPUVuG":{"type":"text","value":{"type":"switch","cases":[{"formula":{"path":["Variables","description"],"type":"path"},"condition":{"name":"@toddle/greaterThan","type":"function","arguments":[{"name":"First","type":{"type":"Number"},"formula":{"name":"@toddle/size","type":"function","arguments":[{"name":"Collection","type":{"type":"Union","types":[{"type":"String"},{"type":"Array"},{"type":"Object"}]},"formula":{"path":["Variables","description"],"type":"path"}}],"display_name":"Size"}},{"name":"Second","type":{"type":"Number"},"formula":{"type":"value","value":0}}],"display_name":"Greater than"}}],"default":{"type":"value","value":""}}},"eCfnGP7d5nDLEsRAiNBpn":{"id":"eCfnGP7d5nDLEsRAiNBpn","tag":"option","type":"element","attrs":{"value":{"path":["ListItem","Item"],"type":"path"}},"repeat":{"path":["Apis","getCategories","data"],"type":"path"},"children":["3SWt5kgmTehOeR5eHPZa5"],"customProperties":{}},"gWHjbivVak0o75gRtmgV3":{"id":"gWHjbivVak0o75gRtmgV3","tag":"option","type":"element","attrs":{"value":{"path":["ListItem","Item","recordId"],"type":"path"},"imgURL":{"type":"value","value":""}},"repeat":{"path":["Apis","getVariation","data"],"type":"path"},"children":["Lv1eMAEAH5MsfXy5bMBQd"],"customProperties":{}},"l7GbGWUBWEgVupdDfrRU4":{"id":"l7GbGWUBWEgVupdDfrRU4","tag":"option","type":"element","attrs":{"value":{"path":["ListItem","Item"],"type":"path"}},"repeat":{"path":["Apis","getCondition","data"],"type":"path"},"children":["lExl_IIXLn9rsm8Ny7clc"],"customProperties":{}},"lExl_IIXLn9rsm8Ny7clc":{"type":"text","value":{"path":["ListItem","Item"],"type":"path"}},"mdLqQ2JCwzd7xKs3rovcE":{"tag":"div","type":"element","children":["pNCPzsDKZEaYPo7gPH8kW","se3qM8rpuMYlq04A32jOI"],"classes":{"cuUonW":{"formula":{"type":"value","value":true}}},"customProperties":{}},"n6ALvJh5u2S4x7wJEisQr":{"tag":"a","type":"element","attrs":{"href":{"type":"value","value":"https://specialty.vision/"}},"children":["KZcCkUhGuIoFqORwKfN2G"],"condition":{"name":"@toddle/notEqual","type":"function","arguments":[{"name":"First","type":{"type":"Any"},"formula":{"name":"@toddle/number","type":"function","arguments":[{"name":"Input","type":{"type":"Any"},"formula":{"path":["Attributes","aec_site"],"type":"path"}}],"display_name":"Number"}},{"name":"Second","type":{"type":"Any"},"formula":{"name":"@toddle/number","type":"function","arguments":[{"name":"Input","type":{"type":"Any"},"formula":{"type":"value","value":"1"}}],"display_name":"Number"}}],"display_name":"Not equal"},"classes":{"dVbCZj":{"formula":{"type":"value","value":true}}},"customProperties":{}},"oxeTjYCgfvofNsT2Kv3yG":{"type":"text","value":{"path":["Variables","title"],"type":"path"}},"pNCPzsDKZEaYPo7gPH8kW":{"id":"se3qM8rpuMYlq04A32jOI","tag":"button","type":"element","attrs":{"type":{"type":"value","value":"button"}},"events":{"click":{"actions":[{"name":"@toddle/gotToURL","arguments":[{"name":"URL","formula":{"path":["Variables","page_link"],"type":"path"}}]}],"trigger":"click"}},"children":["N7rhq4iF-2Yt1ScEKCb9W"],"condition":{"type":"and","arguments":[{"formula":{"type":"value","value":true}},{"formula":{"name":"@toddle/includes","type":"function","arguments":[{"name":"Array","type":{"type":"Union","types":[{"type":"String"},{"type":"Array"}]},"formula":{"path":["Variables","page_link"],"type":"path"}},{"name":"Item","type":{"type":"Any"},"formula":{"type":"value","value":"https://"}}],"display_name":"Includes"}}]},"classes":{"bMiaMR":{"formula":{"type":"value","value":true}}},"customProperties":{}},"r1AXerO3us4iE5u-dgmP5":{"tag":"img","type":"element","attrs":{"alt":{"path":["Variables","title"],"type":"path"},"src":{"path":["Variables","currentImgURL"],"type":"path"}},"classes":{"IKsrH":{"formula":{"type":"value","value":true}}},"customProperties":{}},"se3qM8rpuMYlq04A32jOI":{"id":"se3qM8rpuMYlq04A32jOI","tag":"button","type":"element","attrs":{"type":{"type":"value","value":"button"}},"events":{"click":{"actions":[{"name":"@toddle/gotToURL","arguments":[{"name":"URL","formula":{"path":["Variables","youtube_link"],"type":"path"}}]}],"trigger":"click"}},"children":["6Xx0HBsoCGY4aWSl8LCRu"],"condition":{"type":"and","arguments":[{"formula":{"type":"value","value":true}},{"formula":{"name":"@toddle/includes","type":"function","arguments":[{"name":"Array","type":{"type":"Union","types":[{"type":"String"},{"type":"Array"}]},"formula":{"path":["Variables","youtube_link"],"type":"path"}},{"name":"Item","type":{"type":"Any"},"formula":{"type":"value","value":"https://"}}],"display_name":"Includes"}}]},"classes":{"bMiaMR":{"formula":{"type":"value","value":true}}},"customProperties":{}},"tbaMPyl6JgFGrAx5GqiEv":{"tag":"option","type":"element","attrs":{"value":{"type":"value","value":"1"},"hidden":{"type":"value","value":"<attribute>"},"disabled":{"type":"value","value":"<attribute>"},"selected":{"type":"value","value":"<attribute>"}},"children":["LiZGKLEsLcfIrWfdHYqtW"],"customProperties":{}},"xCArqsybpAmyuqU-vGiHW":{"id":"xCArqsybpAmyuqU-vGiHW","tag":"select","type":"element","events":{"change":{"actions":[{"data":{"path":["Event","target","value"],"type":"path"},"type":"SetVariable","variable":"selectedCondition"},{"api":"getVariation","type":"Fetch","input":{},"onError":{"actions":[]},"onSuccess":{"actions":[{"data":{"path":["Apis","getVariation","data","0","image"],"type":"path"},"type":"SetVariable","variable":"currentImgURL"},{"data":{"path":["Apis","getVariation","data","0","recordId"],"type":"path"},"type":"SetVariable","variable":"selectedVariation"},{"data":{"path":["Apis","getVariation","data","0","variation"],"type":"path"},"type":"SetVariable","variable":"title"},{"data":{"name":"@toddle/greaterThan","type":"function","arguments":[{"name":"First","type":{"type":"Number"},"formula":{"name":"@toddle/size","type":"function","arguments":[{"name":"Collection","type":{"type":"Union","types":[{"type":"String"},{"type":"Array"},{"type":"Object"}]},"formula":{"path":["Apis","getVariation","data"],"type":"path"}}],"display_name":"Size"}},{"name":"Second","type":{"type":"Number"},"formula":{"type":"value","value":1}}],"display_name":"Greater than"},"type":"SetVariable","variable":"showVariationDropdown"},{"data":{"path":["Apis","getVariation","data","0","description"],"type":"path"},"type":"SetVariable","variable":"description"},{"data":{"path":["Apis","getVariation","data","0","more_info"],"type":"path"},"type":"SetVariable","variable":"page_link"}],"trigger":"onSuccess"}}],"trigger":"change"}},"children":["8GYs6BqsDkzhYsWElVkSD","l7GbGWUBWEgVupdDfrRU4"],"condition":{"type":"and","arguments":[{"formula":{"name":"@toddle/not","type":"function","arguments":[{"name":"Input","type":{"type":"Boolean"},"formula":{"path":["Apis","getCondition","isLoading"],"type":"path"}}],"display_name":"Not"}},{"formula":{"path":["Variables","showConditionDropdown"],"type":"path"}}]},"classes":{"eLTHeJ":{"formula":{"type":"value","value":true}}},"customProperties":{}},"y015Z1-9W6N1s-qATaDeR":{"type":"text","value":{"type":"value","value":"Select Condition"}},"y6VgyAJLVDu-aFX0I78Cs":{"tag":"div","type":"element","children":["NV6wxGg2D-cjSf-vK2aAz","Cs26e4GoCd3G3gXDrWE-N"],"classes":{"XvYHQ":{"formula":{"type":"value","value":true}}},"customProperties":{}}},"onLoad":{"actions":[{"data":{"type":"value","value":"https://cdn.specialty.vision/wp-content/uploads/2023/12/Perfect-Vision-1.jpg"},"type":"SetVariable","variable":"currentImgURL"},{"data":{"type":"value","value":false},"type":"SetVariable","variable":"showButton"}],"trigger":"Load"},"variables":{"title":{"initialValue":{"type":"value","value":"Perfect Vision"}},"isAECSite":{"initialValue":{"name":"@toddle/boolean","type":"function","arguments":[{"name":"Input","type":{"type":"Any"},"formula":{"path":["Attributes","aec_site"],"type":"path"}}],"display_name":"Boolean"}},"page_link":{"initialValue":{"type":"value","value":""}},"showButton":{"initialValue":{"type":"value","value":false}},"description":{"initialValue":{"type":"value","value":""}},"youtube_link":{"initialValue":{"type":"value","value":""}},"currentImgURL":{"initialValue":{"value":"https://cdn.specialty.vision/wp-content/uploads/2023/12/Perfect-Vision-1.jpg","type":"value"}},"selectedCategory":{"initialValue":{"type":"value","value":0}},"condition_default":{"initialValue":{"type":"value","value":true}},"selectedCondition":{"initialValue":{"type":"value","value":0}},"selectedVariation":{"initialValue":null},"showPerfectVision":{"initialValue":{"type":"value","value":true}},"variation_default":{"initialValue":{"type":"value","value":true}},"tempImageButtonDown":{"initialValue":{"type":"value","value":""}},"showConditionDropdown":{"initialValue":{"type":"value","value":false}},"showVariationDropdown":{"initialValue":{"type":"value","value":false}},"tempVariationButtonDown":{"initialValue":{"type":"value","value":""}}},"attributes":{"aec_site":{"name":"aec_site"}}}]}