mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
1 line
8.4 KiB
JSON
1 line
8.4 KiB
JSON
{"ast":null,"code":"const HapticEngine = {\n getEngine() {\n const win = window;\n return win.TapticEngine || win.Capacitor && win.Capacitor.isPluginAvailable('Haptics') && win.Capacitor.Plugins.Haptics;\n },\n available() {\n return !!this.getEngine();\n },\n isCordova() {\n return !!window.TapticEngine;\n },\n isCapacitor() {\n const win = window;\n return !!win.Capacitor;\n },\n impact(options) {\n const engine = this.getEngine();\n if (!engine) {\n return;\n }\n const style = this.isCapacitor() ? options.style.toUpperCase() : options.style;\n engine.impact({\n style\n });\n },\n notification(options) {\n const engine = this.getEngine();\n if (!engine) {\n return;\n }\n const style = this.isCapacitor() ? options.style.toUpperCase() : options.style;\n engine.notification({\n style\n });\n },\n selection() {\n this.impact({\n style: 'light'\n });\n },\n selectionStart() {\n const engine = this.getEngine();\n if (!engine) {\n return;\n }\n if (this.isCapacitor()) {\n engine.selectionStart();\n } else {\n engine.gestureSelectionStart();\n }\n },\n selectionChanged() {\n const engine = this.getEngine();\n if (!engine) {\n return;\n }\n if (this.isCapacitor()) {\n engine.selectionChanged();\n } else {\n engine.gestureSelectionChanged();\n }\n },\n selectionEnd() {\n const engine = this.getEngine();\n if (!engine) {\n return;\n }\n if (this.isCapacitor()) {\n engine.selectionEnd();\n } else {\n engine.gestureSelectionEnd();\n }\n }\n};\n/**\n * Trigger a selection changed haptic event. Good for one-time events\n * (not for gestures)\n */\nconst hapticSelection = () => {\n HapticEngine.selection();\n};\n/**\n * Tell the haptic engine that a gesture for a selection change is starting.\n */\nconst hapticSelectionStart = () => {\n HapticEngine.selectionStart();\n};\n/**\n * Tell the haptic engine that a selection changed during a gesture.\n */\nconst hapticSelectionChanged = () => {\n HapticEngine.selectionChanged();\n};\n/**\n * Tell the haptic engine we are done with a gesture. This needs to be\n * called lest resources are not properly recycled.\n */\nconst hapticSelectionEnd = () => {\n HapticEngine.selectionEnd();\n};\n/**\n * Use this to indicate success/failure/warning to the user.\n * options should be of the type `{ style: 'light' }` (or `medium`/`heavy`)\n */\nconst hapticImpact = options => {\n HapticEngine.impact(options);\n};\nexport { hapticSelectionStart as a, hapticSelectionChanged as b, hapticSelection as c, hapticImpact as d, hapticSelectionEnd as h };","map":{"version":3,"names":["HapticEngine","getEngine","win","window","TapticEngine","Capacitor","isPluginAvailable","Plugins","Haptics","available","isCordova","isCapacitor","impact","options","engine","style","toUpperCase","notification","selection","selectionStart","gestureSelectionStart","selectionChanged","gestureSelectionChanged","selectionEnd","gestureSelectionEnd","hapticSelection","hapticSelectionStart","hapticSelectionChanged","hapticSelectionEnd","hapticImpact","a","b","c","d","h"],"sources":["C:/Users/eudes.inacio/GabineteDigital/gabinete-digital-fo/node_modules/@ionic/core/dist/esm/haptic-27b3f981.js"],"sourcesContent":["const HapticEngine = {\n getEngine() {\n const win = window;\n return (win.TapticEngine) || (win.Capacitor && win.Capacitor.isPluginAvailable('Haptics') && win.Capacitor.Plugins.Haptics);\n },\n available() {\n return !!this.getEngine();\n },\n isCordova() {\n return !!window.TapticEngine;\n },\n isCapacitor() {\n const win = window;\n return !!win.Capacitor;\n },\n impact(options) {\n const engine = this.getEngine();\n if (!engine) {\n return;\n }\n const style = this.isCapacitor() ? options.style.toUpperCase() : options.style;\n engine.impact({ style });\n },\n notification(options) {\n const engine = this.getEngine();\n if (!engine) {\n return;\n }\n const style = this.isCapacitor() ? options.style.toUpperCase() : options.style;\n engine.notification({ style });\n },\n selection() {\n this.impact({ style: 'light' });\n },\n selectionStart() {\n const engine = this.getEngine();\n if (!engine) {\n return;\n }\n if (this.isCapacitor()) {\n engine.selectionStart();\n }\n else {\n engine.gestureSelectionStart();\n }\n },\n selectionChanged() {\n const engine = this.getEngine();\n if (!engine) {\n return;\n }\n if (this.isCapacitor()) {\n engine.selectionChanged();\n }\n else {\n engine.gestureSelectionChanged();\n }\n },\n selectionEnd() {\n const engine = this.getEngine();\n if (!engine) {\n return;\n }\n if (this.isCapacitor()) {\n engine.selectionEnd();\n }\n else {\n engine.gestureSelectionEnd();\n }\n }\n};\n/**\n * Trigger a selection changed haptic event. Good for one-time events\n * (not for gestures)\n */\nconst hapticSelection = () => {\n HapticEngine.selection();\n};\n/**\n * Tell the haptic engine that a gesture for a selection change is starting.\n */\nconst hapticSelectionStart = () => {\n HapticEngine.selectionStart();\n};\n/**\n * Tell the haptic engine that a selection changed during a gesture.\n */\nconst hapticSelectionChanged = () => {\n HapticEngine.selectionChanged();\n};\n/**\n * Tell the haptic engine we are done with a gesture. This needs to be\n * called lest resources are not properly recycled.\n */\nconst hapticSelectionEnd = () => {\n HapticEngine.selectionEnd();\n};\n/**\n * Use this to indicate success/failure/warning to the user.\n * options should be of the type `{ style: 'light' }` (or `medium`/`heavy`)\n */\nconst hapticImpact = (options) => {\n HapticEngine.impact(options);\n};\n\nexport { hapticSelectionStart as a, hapticSelectionChanged as b, hapticSelection as c, hapticImpact as d, hapticSelectionEnd as h };\n"],"mappings":"AAAA,MAAMA,YAAY,GAAG;EACnBC,SAASA,CAAA,EAAG;IACV,MAAMC,GAAG,GAAGC,MAAM;IAClB,OAAQD,GAAG,CAACE,YAAY,IAAMF,GAAG,CAACG,SAAS,IAAIH,GAAG,CAACG,SAAS,CAACC,iBAAiB,CAAC,SAAS,CAAC,IAAIJ,GAAG,CAACG,SAAS,CAACE,OAAO,CAACC,OAAQ;EAC7H,CAAC;EACDC,SAASA,CAAA,EAAG;IACV,OAAO,CAAC,CAAC,IAAI,CAACR,SAAS,CAAC,CAAC;EAC3B,CAAC;EACDS,SAASA,CAAA,EAAG;IACV,OAAO,CAAC,CAACP,MAAM,CAACC,YAAY;EAC9B,CAAC;EACDO,WAAWA,CAAA,EAAG;IACZ,MAAMT,GAAG,GAAGC,MAAM;IAClB,OAAO,CAAC,CAACD,GAAG,CAACG,SAAS;EACxB,CAAC;EACDO,MAAMA,CAACC,OAAO,EAAE;IACd,MAAMC,MAAM,GAAG,IAA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