PageSourceSearch

https://wavevisual.com/_next/static/chunks/7281.8f6195c8c5f99fdb.js

js wavevisual.com collected 2026-10-04 13:33:42 UTC 9,907 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7281],{87281:function(e,t,n){n.r(t),n.d(t,{CanvasHotKeys:function(){return F}});var r=n(52322),o="undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().indexOf("firefox")>0;function i(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r):e.attachEvent&&e.attachEvent("on".concat(t),function(){n(window.event)})}function a(e,t){for(var n=t.slice(0,t.length-1),r=0;r<n.length;r++)n[r]=e[n[r].toLowerCase()];return n}function l(e){"string"!=typeof e&&(e="");for(var t=(e=e.replace(/\s/g,"")).split(","),n=t.lastIndexOf("");n>=0;)t[n-1]+=",",t.splice(n,1),n=t.lastIndexOf("");return t}for(var c={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":o?173:189,"=":o?61:187,";":o?59:186,"'":222,"[":219,"]":221,"\\":220},s={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},u={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},d={16:!1,18:!1,17:!1,91:!1},f={},p=1;p<20;p++)c["f".concat(p)]=111+p;var v=[],y=!1,h="all",m=[],E=function(e){return c[e.toLowerCase()]||s[e.toLowerCase()]||e.toUpperCase().charCodeAt(0)};function g(e){h=e||"all"}function _(){return h||"all"}var O=function(e){var t=e.key,n=e.scope,r=e.method,o=e.splitKey,i=void 0===o?"+":o;l(t).forEach(function(e){var t=e.split(i),o=t.length,l=t[o-1],c="*"===l?"*":E(l);if(f[c]){n||(n=_());var u=o>1?a(s,t):[];f[c]=f[c].filter(function(e){return!((!r||e.method===r)&&e.scope===n&&function(e,t){for(var n=e.length>=t.length?e:t,r=e.length>=t.length?t:e,o=!0,i=0;i<n.length;i++)-1===r.indexOf(n[i])&&(o=!1);return o}(e.mods,u))})}})};function k(e,t,n,r){var o;if(t.element===r&&(t.scope===n||"all"===t.scope)){for(var i in o=t.mods.length>0,d)Object.prototype.hasOwnProperty.call(d,i)&&(!d[i]&&t.mods.indexOf(+i)>-1||d[i]&&-1===t.mods.indexOf(+i))&&(o=!1);(0!==t.mods.length||d[16]||d[18]||d[17]||d[91])&&!o&&"*"!==t.shortcut||!1!==t.method(e,t)||(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}function b(e,t){var n=f["*"],r=e.keyCode||e.which||e.charCode;if(w.filter.call(this,e)){if((93===r||224===r)&&(r=91),-1===v.indexOf(r)&&229!==r&&v.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach(function(t){var n=u[t];e[t]&&-1===v.indexOf(n)?v.push(n):!e[t]&&v.indexOf(n)>-1?v.splice(v.indexOf(n),1):"metaKey"===t&&e[t]&&3===v.length&&!(e.ctrlKey||e.shiftKey||e.altKey)&&(v=v.slice(v.indexOf(n)))}),r in d){for(var o in d[r]=!0,s)s[o]===r&&(w[o]=!0);if(!n)return}for(var i in d)Object.prototype.hasOwnProperty.call(d,i)&&(d[i]=e[u[i]]);e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(-1===v.indexOf(17)&&v.push(17),-1===v.indexOf(18)&&v.push(18),d[17]=!0,d[18]=!0);var a=_();if(n)for(var l=0;l<n.length;l++)n[l].scope===a&&("keydown"===e.type&&n[l].keydown||"keyup"===e.type&&n[l].keyup)&&k(e,n[l],a,t);if(r in f){for(var c=0;c<f[r].length;c++)if(("keydown"===e.type&&f[r][c].keydown||"keyup"===e.type&&f[r][c].keyup)&&f[r][c].key){for(var p=f[r][c],y=p.splitKey,h=p.key.split(y),m=[],g=0;g<h.length;g++)m.push(E(h[g]));m.sort().join("")===v.sort().join("")&&k(e,p,a,t)}}}}function w(e,t,n){v=[];var r,o=l(e),c=[],u="all",p=document,h=0,g=!1,_=!0,O="+",k=!1;for(void 0===n&&"function"==typeof t&&(n=t),"[object Object]"===Object.prototype.toString.call(t)&&(t.scope&&(u=t.scope),t.element&&(p=t.element),t.keyup&&(g=t.keyup),void 0!==t.keydown&&(_=t.keydown),void 0!==t.capture&&(k=t.capture),"string"==typeof t.splitKey&&(O=t.splitKey)),"string"==typeof t&&(u=t);h<o.length;h++)e=o[h].split(O),c=[],e.length>1&&(c=a(s,e)),(e="*"===(e=e[e.length-1])?"*":E(e))in f||(f[e]=[]),f[e].push({keyup:g,keydown:_,scope:u,mods:c,shortcut:o[h],method:n,key:o[h],splitKey:O,element:p});void 0!==p&&(r=p,!(m.indexOf(r)>-1))&&window&&(m.push(p),i(p,"keydown",function(e){b(e,p)}
1,k),y||(y=!0,i(window,"focus",function(){v=[]},k)),i(p,"keyup",function(e){b(e,p),function(e){var t=e.keyCode||e.which||e.charCode,n=v.indexOf(t);if(n>=0&&v.splice(n,1),e.key&&"meta"===e.key.toLowerCase()&&v.splice(0,v.length),(93===t||224===t)&&(t=91),t in d)for(var r in d[t]=!1,s)s[r]===t&&(w[r]=!1)}(e)},k))}var C={setScope:g,getScope:_,deleteScope:function(e,t){var n,r;for(var o in e||(e=_()),f)if(Object.prototype.hasOwnProperty.call(f,o))for(r=0,n=f[o];r<n.length;)n[r].scope===e?n.splice(r,1):r++;_()===e&&g(t||"all")},getPressedKeyCodes:function(){return v.slice(0)},isPressed:function(e){return"string"==typeof e&&(e=E(e)),-1!==v.indexOf(e)},filter:function(e){var t=e.target||e.srcElement,n=t.tagName,r=!0;return(t.isContentEditable||("INPUT"===n||"TEXTAREA"===n||"SELECT"===n)&&!t.readOnly)&&(r=!1),r},trigger:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all";Object.keys(f).forEach(function(n){var r=f[n].find(function(n){return n.scope===t&&n.shortcut===e});r&&r.method&&r.method()})},unbind:function(e){if(void 0===e)Object.keys(f).forEach(function(e){return delete f[e]});else if(Array.isArray(e))e.forEach(function(e){e.key&&O(e)});else if("object"==typeof e)e.key&&O(e);else if("string"==typeof e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=n[0],i=n[1];"function"==typeof o&&(i=o,o=""),O({key:e,scope:o,method:i,splitKey:"+"})}},keyMap:c,modifier:s,modifierMap:u};for(var A in C)Object.prototype.hasOwnProperty.call(C,A)&&(w[A]=C[A]);if("undefined"!=typeof window){var x=window.hotkeys;w.noConflict=function(e){return e&&window.hotkeys===w&&(window.hotkeys=x),w},window.hotkeys=w}var j=n(2784);w.filter=function(){return!0};var T=function(e,t){var n=e.target,r=n&&n.tagName;return!!(r&&t&&t.includes(r))};function N(e,t,n,r){n instanceof Array&&(r=n,n=void 0);var o=n||{},i=o.enableOnTags,a=o.filter,l=o.keyup,c=o.keydown,s=o.filterPreventDefault,u=void 0===s||s,d=o.enabled,f=void 0===d||d,p=o.enableOnContentEditable,v=void 0!==p&&p,y=(0,j.useRef)(null),h=(0,j.useCallback)(function(e,n){var r,o;return a&&!a(e)?!u:!!T(e,["INPUT","TEXTAREA","SELECT"])&&!T(e,i)||null!=(r=e.target)&&!!r.isContentEditable&&!v||!!(null===y.current||document.activeElement===y.current||null!=(o=y.current)&&o.contains(document.activeElement))&&(t(e,n),!0)},r?[y,i,a].concat(r):[y,i,a]);return(0,j.useEffect)(function(){if(!f){w.unbind(e,h);return}return l&&!0!==c&&(n.keydown=!1),w(e,n||{},h),function(){return w.unbind(e,h)}},[h,e,f]),y}w.isPressed;var K=n(21749),R=n(38986),M=n(11080),P=n(90655),I=n(2803),L=n(80920),B=n(39488),D=n(15644),S=n(83327),X=n(11474);let W=e=>null!=e&&!!e.name&&(e.name.startsWith(R.WAVEFORM_NODE_PREFIX)||e.name.startsWith(R.TEXT_NODE_OBJECT_NAME_PREFIX)||e.name===M.CAPTION_TEXT_NODE_NAME||e.name.startsWith(R.IMAGE_LAYER_OBJECT_NAME_PREFIX)||e.name===R.QRCODE_OBJECT_NAME||e.name===R.BG_IMAGE_OBJECT_NAME||e.name.startsWith(R.IMAGE_LAYER_OBJECT_NAME_PREFIX)),F=()=>{var e,t,n,o;let{canvas:i}=(0,X.j)(),a=(0,L.Q5)(),l=(0,L.kH)(),c=(0,I.Sq)(),{undo:s,redo:u,removeTextNode:d,removeWaveform:f,removeImageLayer:p,updateBackgroun
1d:v}=(0,P._)(),y=null!==(e=null==c?void 0:c.undo)&&void 0!==e?e:s,h=null!==(t=null==c?void 0:c.redo)&&void 0!==t?t:u,m=c?e=>c.removeTextLayer(e):d,E=null!==(n=null==c?void 0:c.removeImageLayer)&&void 0!==n?n:p,g=null!==(o=null==c?void 0:c.updateBackground)&&void 0!==o?o:v,{updateQRCode:_}=(0,B.O)(),[O,k]=(0,j.useState)(null);N("esc",()=>{i instanceof K.fabric.Canvas&&(i.discardActiveObject(),i.requestRenderAll())},[i]),N("ctrl+z,command+z",e=>{e.preventDefault(),y&&y()},[y]),N("ctrl+shift+z,command+shift+z",e=>{e.preventDefault(),h&&h()},[h]),N("backspace",()=>{var e,t,n,r;if(!(null==i?void 0:null===(e=i._activeObject)||void 0===e?void 0:e.name)||!(i instanceof K.fabric.Canvas))return;let o=i._activeObject;if((null===(t=o.name)||void 0===t?void 0:t.startsWith(R.WAVEFORM_NODE_PREFIX))&&l&&l.length>1){k(o.name);return}(null===(n=o.name)||void 0===n?void 0:n.startsWith(R.TEXT_NODE_OBJECT_NAME_PREFIX))&&m(o.name),o.name===R.QRCODE_OBJECT_NAME&&_({imported:!1}),o.name===R.BG_IMAGE_OBJECT_NAME&&(g({imageURL:null,imageRect:{},backgroundSize:null}),i.discardActiveObject(),i.requestRenderAll()),(null===(r=o.name)||void 0===r?void 0:r.startsWith(R.IMAGE_LAYER_OBJECT_NAME_PREFIX))&&(E(o.name),i.discardActiveObject(),i.requestRenderAll())},[null==i?void 0:i._activeObject,l,f,m,a,E,g]);let b=(0,j.useCallback)(e=>{if(!(i instanceof K.fabric.Canvas))return;let t=i._activeObject;if(!t||!W(t))return;let n=R.ARROW_KEY_MOVEMENT_STEP,r=t.left||0,o=t.top||0;switch(e){case"up":o-=n;break;case"down":o+=n;break;case"left":r-=n;break;case"right":r+=n}t.set({left:r,top:o}),t.setCoords(),i.requestRenderAll(),i.fire("object:modified",{target:t})},[i]);return N("up",()=>{b("up")},[b]),N("down",()=>{b("down")},[b]),N("left",()=>{b("left")},[b]),N("right",()=>{b("right")},[b]),(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(D.Q,{open:!!O,onClose:()=>k(null),className:"sm:max-w-lg",children:(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("h3",{className:"text-lg font-medium leading-6 text-gray-900",children:"Delete Sound Wave"}),(0,r.jsx)("p",{className:"text-sm text-gray-500",children:"Are you sure you want to delete this sound wave? This action cannot be undone."}),(0,r.jsxs)("div",{className:"mt-5 flex justify-end gap-3",children:[(0,r.jsx)(S.z,{variant:"outline",onClick:()=>k(null),children:"Cancel"}),(0,r.jsx)(S.z,{variant:"destructive",onClick:()=>{O&&(f(O),k(null),i instanceof K.fabric.Canvas&&(i.discardActiveObject(),i.requestRenderAll()))},children:"Delete"})]})]})})})}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.