{"version":3,"file":"PlaySound.C6WPLfRX.mjs","names":["r","p"],"sources":["https:/framerusercontent.com/modules/hW9NdhS2HLoMJWaWtxpu/LptRCf9cdiMn41wP8gRY/PlaySound.js"],"sourcesContent":["import{jsx as o}from\"react/jsx-runtime\";import{useRef as r}from\"react\";let n={click:\"https://avara.xyz/sounds/click.wav\",error:\"https://avara.xyz/sounds/error.wav\",open:\"https://avara.xyz/sounds/open.wav\",close:\"https://avara.xyz/sounds/close.wav\",forward:\"https://avara.xyz/sounds/forward.wav\",back:\"https://avara.xyz/sounds/back.wav\"};function t(o){let n=r(new Audio(o));return n.current;}function e(){return\"ontouchstart\"in window;}export function withError(r){return a=>{let u=t(n.click),c=t(n.error),s=()=>u.play(),p=()=>c.play(),i=e()?{onTouchStart:s,onTouchEnd:p}:{onMouseDown:s,onMouseUp:p};return /*#__PURE__*/o(r,{...a,...i});};}export function withFigure(r){return a=>{let u=t(n.click),c=t(n.open),s=()=>u.play(),p=()=>c.play(),i=e()?{onTouchStart:s,onTouchEnd:p}:{onMouseDown:s,onMouseUp:p};return /*#__PURE__*/o(r,{...a,...i});};}export function withLeave(r){return a=>{let u=t(n.close),c=()=>u.play(),s=e()?{onTouchEnd:c}:{onMouseUp:c};return /*#__PURE__*/o(r,{...a,...s});};}export function withForward(r){return a=>{let u=t(n.forward),c=()=>u.play(),s=e()?{onTouchEnd:c}:{onMouseUp:c};return /*#__PURE__*/o(r,{...a,...s});};}export function withBack(r){return a=>{let u=t(n.back),c=()=>u.play(),s=e()?{onTouchEnd:c}:{onMouseUp:c};return /*#__PURE__*/o(r,{...a,...s});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withFigure\":{\"type\":\"reactHoc\",\"name\":\"withFigure\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withLeave\":{\"type\":\"reactHoc\",\"name\":\"withLeave\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withForward\":{\"type\":\"reactHoc\",\"name\":\"withForward\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withError\":{\"type\":\"reactHoc\",\"name\":\"withError\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withBack\":{\"type\":\"reactHoc\",\"name\":\"withBack\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./PlaySound.map"],"mappings":"2HAAiV,SAAS,EAAE,EAAE,CAAuB,OAAhBA,EAAE,IAAI,MAAM,EAAE,CAAC,CAAU,QAAS,SAAS,GAAG,CAAC,MAAM,iBAAiB,EAAoN,SAAgB,EAAW,EAAE,CAAC,MAAO,IAAG,CAAC,IAAI,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,KAAK,CAAC,MAAM,EAAE,MAAM,CAACC,MAAM,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC,aAAa,EAAE,WAAWA,EAAE,CAAC,CAAC,YAAY,EAAE,UAAUA,EAAE,CAAC,OAAoB,EAAE,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,yBAA/xB,IAA+B,CAAI,EAAE,CAAC,MAAM,qCAAqC,MAAM,qCAAqC,KAAK,oCAAoC,MAAM,qCAAqC,QAAQ,uCAAuC,KAAK,oCAAoC"}