@codernote/record-tree 1.4.5 → 1.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +682 -669
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.node-div[data-v-8db3bbd0]{display:flex;align-items:center;position:relative}.node-text[data-v-8db3bbd0]{margin-left:5px;flex:1;border:none;outline:none}.node-icon[data-v-8db3bbd0]{position:relative;width:17px;height:17px;border-radius:10px;background-color:#fff;cursor:pointer;margin-left:5px;align-self:center;top:0}.node-icon-complex[data-v-8db3bbd0]{align-self:flex-start;top:3px}.node-icon[data-v-8db3bbd0]:after{content:"";position:absolute;top:5px;left:5px;width:7px;height:7px;border-radius:10px;background-color:#eee}.node-icon[data-v-8db3bbd0]:hover{background-color:#ccc}.node-complex[data-v-8db3bbd0]{display:flex;flex-direction:row;align-self:center;justify-self:center;outline:none}.holder[data-v-8db3bbd0]{width:0px;overflow:hidden;border-width:1px;border-style:solid;border-color:transparent;outline:none}.node-element[data-v-8db3bbd0]{display:inline-block;position:relative;margin:5px 1px}.node-element:hover .node-del[data-v-8db3bbd0]{display:block}.node-image img[data-v-8db3bbd0]{width:auto;max-height:80px;outline:none}.node-audio[data-v-8db3bbd0],.node-video[data-v-8db3bbd0]{width:300px}.node-audio audio[data-v-8db3bbd0]{width:300px;outline:none}.node-video video[data-v-8db3bbd0]{width:300px;outline:none}.node-del[data-v-8db3bbd0]{cursor:pointer;display:none;width:15px;height:15px;position:absolute;top:-3px;right:-3px;background-color:#e6f7ff;background-size:100% 100%;border-radius:50%}.node-del[data-v-8db3bbd0]:before,.node-del[data-v-8db3bbd0]:after{content:"";position:absolute;top:50%;left:50%;width:2px;height:10px;background-color:#595959}.node-del[data-v-8db3bbd0]:before{transform:translate(-50%,-50%) rotate(45deg)}.node-del[data-v-8db3bbd0]:after{transform:translate(-50%,-50%) rotate(-45deg)}.node-file-wrap[data-v-8db3bbd0]{width:260px;padding:10px 16px;display:flex;background:#f2f2f2;border-radius:5px;justify-content:center;align-items:center}.node-file-left[data-v-8db3bbd0]{flex:1}.node-file-left h6[data-v-8db3bbd0]{font-size:14px;font-weight:700;margin:0 0 5px;padding:0;white-space:nowrap}.node-file-left p[data-v-8db3bbd0]{margin:0;padding:0;font-size:12px;color:#999}.node-file-right a[data-v-8db3bbd0]{color:#52a770;font-size:14px}@keyframes blinkBorder-8db3bbd0{0%,to{border-color:transparent}50%{border-color:#333}}.node-complex .holder[data-v-8db3bbd0]:focus{animation:blinkBorder-8db3bbd0 1s infinite}.node-ul[data-v-97a7403f]{background-color:#fff;margin:0;padding:0;list-style:none}.node-li[data-v-97a7403f]{padding:0;list-style:none;margin:0;line-height:1.5;position:relative;overflow:hidden}[data-v-97a7403f] .sublevel .node-li{margin-left:15px}[data-v-97a7403f] .drag-over-top:before{content:"";width:100%;height:1px;top:0;background-color:#eee;position:absolute}[data-v-97a7403f] .drag-over-center{background-color:#eee}[data-v-97a7403f] .drag-over-bottom:after{content:"";width:100%;height:1px;background-color:#eee;position:absolute;bottom:0}.collapsed>ul[data-v-97a7403f]{display:none}[data-v-97a7403f] .collapsed .node-icon:before{display:none}.tree-title[data-v-97a7403f]{padding-left:25px;font-weight:700;outline:none;font-size:1.125rem;line-height:1.5;width:100%}[data-v-97a7403f] .node-li.has-child.collapsed .node-icon:after{background-color:#aaa}[data-v-97a7403f] .node-li.dragging .node-icon:before{display:none}[data-v-97a7403f] .has-child>.node-div>.node-icon:before{content:"";position:absolute;top:20px;left:50%;height:9999px;width:1px;background-color:#f2f2f2}[data-v-97a7403f] .has-child>.node-div>.node-icon:hover:before{background-color:#52a770}.record-audio[data-v-26b984ff]{position:absolute;background:#fff;padding:20px;width:400px;left:50%;top:50%;transform:translate(-50%,-50%);border-radius:10px;z-index:999;box-shadow:0 4px 6px #0000001a,0 1px 3px #00000014}.record-audio .recwave[data-v-26b984ff]{width:300px;height:40px}.record-audio .audio-item[data-v-26b984ff]{margin-top:10px}.record-audio .buttons[data-v-26b984ff]{margin-top:10px;display:flex;align-items:center}.record-audio .buttons .btn[data-v-26b984ff]{margin-right:10px;font-size:14px;width:80px;padding:6px 0;text-align:center;cursor:pointer;border-radius:20px}.record-audio .buttons .finish[data-v-26b984ff]{color:#fff;background:#1677ff;border:1px solid #1677ff}.record-audio .buttons .disabled[data-v-26b984ff]{background:#eee;cursor:default;border-color:#eee}.record-audio .buttons .cancel[data-v-26b984ff]{border:1px solid #eee}.record-audio .buttons .oper[data-v-26b984ff]{margin-right:10px}.record-audio .main[data-v-26b984ff]{display:flex;align-items:center}.record-audio .duration[data-v-26b984ff]{width:60px;margin-left:10px;color:#999;font-size:12px}.wrap[data-v-26b984ff]{position:fixed;left:0;top:0;bottom:0;z-index:9999}.mask[data-v-26b984ff]{position:absolute;left:0;top:0;right:0;bottom:0;background:rgba(255,255,255,.8)}.record-audio-mobile[data-v-26b984ff]{display:flex;width:100vw;position:absolute;background:#fff;padding:20px;left:50%;top:50%;transform:translate(-50%,-50%);z-index:999;align-items:center}.record-audio-mobile .recwave[data-v-26b984ff]{flex:1;height:30px}.record-audio-mobile .oper[data-v-26b984ff]{margin-right:10px}.record-video[data-v-a9fc7189]{position:absolute;background:#fff;padding:20px;left:50%;top:50%;transform:translate(-50%,-50%);border-radius:10px;z-index:999;box-shadow:0 4px 6px #0000001a,0 1px 3px #00000014}.video-item[data-v-a9fc7189]{width:300px}.buttons[data-v-a9fc7189]{margin-top:10px;display:flex;align-items:center}.buttons .btn[data-v-a9fc7189]{margin-right:10px;font-size:14px;width:80px;padding:6px 0;text-align:center;cursor:pointer;border-radius:20px}.buttons .finish[data-v-a9fc7189]{color:#fff;background:#1677ff;border:1px solid #1677ff}.buttons .disabled[data-v-a9fc7189]{background:#eee;cursor:default;border-color:#eee}.buttons .cancel[data-v-a9fc7189]{border:1px solid #eee}.buttons .oper[data-v-a9fc7189]{margin-right:10px}.wrap[data-v-a9fc7189]{position:fixed;left:0;top:0;bottom:0;z-index:9999}.mask[data-v-a9fc7189]{position:absolute;left:0;top:0;right:0;bottom:0;background:rgba(255,255,255,.8)}.record-video[data-v-91883306]{position:absolute;background:#fff;padding:20px;left:50%;top:50%;width:452px;transform:translate(-50%,-50%);border-radius:10px;z-index:999;box-shadow:0 4px 6px #0000001a,0 1px 3px #00000014}.video-item[data-v-91883306]{width:200px}.img-item[data-v-91883306]{width:200px;height:150px;border:1px dashed #eee;margin-left:10px}.img-item img[data-v-91883306]{width:200px}.record-content[data-v-91883306]{display:flex}.buttons[data-v-91883306]{margin-top:10px;display:flex;align-items:center}.buttons .btn[data-v-91883306]{margin-right:10px;font-size:14px;width:80px;padding:6px 0;text-align:center;cursor:pointer;border-radius:20px}.buttons .finish[data-v-91883306]{color:#fff;background:#1677ff;border:1px solid #1677ff}.buttons .disabled[data-v-91883306]{background:#eee;cursor:default;border-color:#eee}.buttons .cancel[data-v-91883306]{border:1px solid #eee}.buttons .oper[data-v-91883306]{margin-right:10px}.wrap[data-v-91883306]{position:fixed;left:0;top:0;bottom:0;z-index:9999}.mask[data-v-91883306]{position:absolute;left:0;top:0;right:0;bottom:0;background:rgba(255,255,255,.8)}.popper{width:auto;background-color:#fafafa;color:#212121;text-align:center;padding:2px;display:inline-block;border-radius:3px;position:absolute;font-size:14px;font-weight:400;border:1px #ebebeb solid;z-index:200000;box-shadow:#3a3a3a 0 0 6px}.popper .popper__arrow{width:0;height:0;border-style:solid;position:absolute;margin:5px}.popper[x-placement^=top]{margin-bottom:5px}.popper[x-placement^=top] .popper__arrow{border-width:5px 5px 0 5px;border-color:#fafafa transparent transparent transparent;bottom:-5px;left:calc(50% - 5px);margin-top:0;margin-bottom:0}.popper[x-placement^=bottom]{margin-top:5px}.popper[x-placement^=bottom] .popper__arrow{border-width:0 5px 5px 5px;border-color:transparent transparent #fafafa transparent;top:-5px;left:calc(50% - 5px);margin-top:0;margin-bottom:0}.popper[x-placement^=right]{margin-left:5px}.popper[x-placement^=right] .popper__arrow{border-width:5px 5px 5px 0;border-color:transparent #fafafa transparent transparent;left:-5px;top:calc(50% - 5px);margin-left:0;margin-right:0}.popper[x-placement^=left]{margin-right:5px}.popper[x-placement^=left] .popper__arrow{border-width:5px 0 5px 5px;border-color:transparent transparent transparent #fafafa;right:-5px;top:calc(50% - 5px);margin-left:0;margin-right:0}[data-v-7f00d874] .popper{transform:translate3d(0,22px,0)!important}.record-tree-mobile{height:calc(100vh - 45px);overflow-y:scroll}.record-tree-mobile .record-tree-main{padding-left:0}.record-tree-mobile .record-tree-options{padding:12px 0;background:#fff;border-top:1px dotted #eee;display:flex}.record-tree-mobile .record-tree-option-item{flex:1;max-width:32px}.record-tree-mobile .node-file-wrap{width:200px}.record-tree-mobile .node-file-right{display:none}.record-tree-mobile .node-audio,.record-tree-mobile .node-video{width:200px}.record-tree-mobile .node-audio audio{width:200px;outline:none}.record-tree-mobile .node-video video{width:200px;outline:none}.record-tree-popper-content{display:flex;flex-wrap:wrap;padding:10px;box-shadow:0 2px 12px #1d1c1c1f;border:1px solid rgba(29,28,28,.12);border-radius:5px;overflow:hidden;background:#fff;z-index:9999}.record-tree-main{padding-left:15px}.record-tree-popper-content-item{padding:8px 10px;display:flex;align-items:center;justify-content:center;cursor:pointer}.record-tree{position:relative;padding-bottom:40px}.record-tree-svg{display:inline-block;border-radius:9999px;color:#fff;cursor:pointer}.record-tree-title-bar{position:relative;display:flex;margin-bottom:3px}.record-tree-title{padding-left:25px;font-weight:700;outline:none;font-size:18px;line-height:1.5;width:100%}.record-tree-popper-reference{display:flex;position:absolute;top:0px;left:0px;text-align:center;border-radius:9999px;color:#fff}.record-tree-options{position:fixed;bottom:0px;left:0px;width:100%;display:flex;justify-content:space-between;padding:5px 0;background:rgb(236,236,236)}.record-tree-option-left{display:flex;flex:1;padding-left:10px}.record-tree-option-right{padding-right:10px;font-size:14px}.record-tree-option-item{margin:0 5px;cursor:pointer;display:flex;justify-content:center;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.record-tree-empty-icon{display:inline-block;border-radius:9999px}.record-tree-placeholder{position:absolute;left:0;top:0;padding-left:25px;font-weight:700;outline:none;font-size:18px;line-height:1.5;width:100%;color:#999;pointer-events:none}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.node-div[data-v-78187b1c]{display:flex;align-items:center;position:relative}.node-text[data-v-78187b1c]{margin-left:5px;flex:1;border:none;outline:none}.node-icon[data-v-78187b1c]{position:relative;width:17px;height:17px;border-radius:10px;background-color:#fff;cursor:pointer;margin-left:5px;align-self:center;top:0}.node-icon-complex[data-v-78187b1c]{align-self:flex-start;top:3px}.node-icon[data-v-78187b1c]:after{content:"";position:absolute;top:5px;left:5px;width:7px;height:7px;border-radius:10px;background-color:#eee}.node-icon[data-v-78187b1c]:hover{background-color:#ccc}.node-complex[data-v-78187b1c]{display:flex;flex-direction:row;align-self:center;justify-self:center;outline:none}.holder[data-v-78187b1c]{width:0px;overflow:hidden;border-width:1px;border-style:solid;border-color:transparent;outline:none}.node-element[data-v-78187b1c]{display:inline-block;position:relative;margin:5px 1px}.node-element:hover .node-del[data-v-78187b1c]{display:block}.node-image img[data-v-78187b1c]{width:auto;max-height:80px;outline:none}.node-audio[data-v-78187b1c],.node-video[data-v-78187b1c]{width:300px}.node-audio audio[data-v-78187b1c]{width:300px;outline:none}.node-video video[data-v-78187b1c]{width:300px;outline:none}.node-del[data-v-78187b1c]{cursor:pointer;display:none;width:15px;height:15px;position:absolute;top:-3px;right:-3px;background-color:#e6f7ff;background-size:100% 100%;border-radius:50%}.node-del[data-v-78187b1c]:before,.node-del[data-v-78187b1c]:after{content:"";position:absolute;top:50%;left:50%;width:2px;height:10px;background-color:#595959}.node-del[data-v-78187b1c]:before{transform:translate(-50%,-50%) rotate(45deg)}.node-del[data-v-78187b1c]:after{transform:translate(-50%,-50%) rotate(-45deg)}.node-file-wrap[data-v-78187b1c]{width:260px;padding:10px 16px;display:flex;background:#f2f2f2;border-radius:5px;justify-content:center;align-items:center}.node-file-left[data-v-78187b1c]{flex:1}.node-file-left h6[data-v-78187b1c]{font-size:14px;font-weight:700;margin:0 0 5px;padding:0;white-space:nowrap}.node-file-left p[data-v-78187b1c]{margin:0;padding:0;font-size:12px;color:#999}.node-file-right a[data-v-78187b1c]{color:#52a770;font-size:14px}@keyframes blinkBorder-78187b1c{0%,to{border-color:transparent}50%{border-color:#333}}.node-complex .holder[data-v-78187b1c]:focus{animation:blinkBorder-78187b1c 1s infinite}.node-ul[data-v-bc9015c1]{background-color:#fff;margin:0;padding:0;list-style:none}.node-li[data-v-bc9015c1]{padding:0;list-style:none;margin:0;line-height:1.5;position:relative;overflow:hidden}[data-v-bc9015c1] .sublevel .node-li{margin-left:15px}[data-v-bc9015c1] .drag-over-top:before{content:"";width:100%;height:1px;top:0;background-color:#eee;position:absolute}[data-v-bc9015c1] .drag-over-center{background-color:#eee}[data-v-bc9015c1] .drag-over-bottom:after{content:"";width:100%;height:1px;background-color:#eee;position:absolute;bottom:0}.collapsed>ul[data-v-bc9015c1]{display:none}[data-v-bc9015c1] .collapsed .node-icon:before{display:none}.tree-title[data-v-bc9015c1]{padding-left:25px;font-weight:700;outline:none;font-size:1.125rem;line-height:1.5;width:100%}[data-v-bc9015c1] .node-li.has-child.collapsed .node-icon:after{background-color:#aaa}[data-v-bc9015c1] .node-li.dragging .node-icon:before{display:none}[data-v-bc9015c1] .has-child>.node-div>.node-icon:before{content:"";position:absolute;top:20px;left:50%;height:9999px;width:1px;background-color:#f2f2f2}[data-v-bc9015c1] .has-child>.node-div>.node-icon:hover:before{background-color:#52a770}.record-audio[data-v-26b984ff]{position:absolute;background:#fff;padding:20px;width:400px;left:50%;top:50%;transform:translate(-50%,-50%);border-radius:10px;z-index:999;box-shadow:0 4px 6px #0000001a,0 1px 3px #00000014}.record-audio .recwave[data-v-26b984ff]{width:300px;height:40px}.record-audio .audio-item[data-v-26b984ff]{margin-top:10px}.record-audio .buttons[data-v-26b984ff]{margin-top:10px;display:flex;align-items:center}.record-audio .buttons .btn[data-v-26b984ff]{margin-right:10px;font-size:14px;width:80px;padding:6px 0;text-align:center;cursor:pointer;border-radius:20px}.record-audio .buttons .finish[data-v-26b984ff]{color:#fff;background:#1677ff;border:1px solid #1677ff}.record-audio .buttons .disabled[data-v-26b984ff]{background:#eee;cursor:default;border-color:#eee}.record-audio .buttons .cancel[data-v-26b984ff]{border:1px solid #eee}.record-audio .buttons .oper[data-v-26b984ff]{margin-right:10px}.record-audio .main[data-v-26b984ff]{display:flex;align-items:center}.record-audio .duration[data-v-26b984ff]{width:60px;margin-left:10px;color:#999;font-size:12px}.wrap[data-v-26b984ff]{position:fixed;left:0;top:0;bottom:0;z-index:9999}.mask[data-v-26b984ff]{position:absolute;left:0;top:0;right:0;bottom:0;background:rgba(255,255,255,.8)}.record-audio-mobile[data-v-26b984ff]{display:flex;width:100vw;position:absolute;background:#fff;padding:20px;left:50%;top:50%;transform:translate(-50%,-50%);z-index:999;align-items:center}.record-audio-mobile .recwave[data-v-26b984ff]{flex:1;height:30px}.record-audio-mobile .oper[data-v-26b984ff]{margin-right:10px}.record-video[data-v-a9fc7189]{position:absolute;background:#fff;padding:20px;left:50%;top:50%;transform:translate(-50%,-50%);border-radius:10px;z-index:999;box-shadow:0 4px 6px #0000001a,0 1px 3px #00000014}.video-item[data-v-a9fc7189]{width:300px}.buttons[data-v-a9fc7189]{margin-top:10px;display:flex;align-items:center}.buttons .btn[data-v-a9fc7189]{margin-right:10px;font-size:14px;width:80px;padding:6px 0;text-align:center;cursor:pointer;border-radius:20px}.buttons .finish[data-v-a9fc7189]{color:#fff;background:#1677ff;border:1px solid #1677ff}.buttons .disabled[data-v-a9fc7189]{background:#eee;cursor:default;border-color:#eee}.buttons .cancel[data-v-a9fc7189]{border:1px solid #eee}.buttons .oper[data-v-a9fc7189]{margin-right:10px}.wrap[data-v-a9fc7189]{position:fixed;left:0;top:0;bottom:0;z-index:9999}.mask[data-v-a9fc7189]{position:absolute;left:0;top:0;right:0;bottom:0;background:rgba(255,255,255,.8)}.record-video[data-v-91883306]{position:absolute;background:#fff;padding:20px;left:50%;top:50%;width:452px;transform:translate(-50%,-50%);border-radius:10px;z-index:999;box-shadow:0 4px 6px #0000001a,0 1px 3px #00000014}.video-item[data-v-91883306]{width:200px}.img-item[data-v-91883306]{width:200px;height:150px;border:1px dashed #eee;margin-left:10px}.img-item img[data-v-91883306]{width:200px}.record-content[data-v-91883306]{display:flex}.buttons[data-v-91883306]{margin-top:10px;display:flex;align-items:center}.buttons .btn[data-v-91883306]{margin-right:10px;font-size:14px;width:80px;padding:6px 0;text-align:center;cursor:pointer;border-radius:20px}.buttons .finish[data-v-91883306]{color:#fff;background:#1677ff;border:1px solid #1677ff}.buttons .disabled[data-v-91883306]{background:#eee;cursor:default;border-color:#eee}.buttons .cancel[data-v-91883306]{border:1px solid #eee}.buttons .oper[data-v-91883306]{margin-right:10px}.wrap[data-v-91883306]{position:fixed;left:0;top:0;bottom:0;z-index:9999}.mask[data-v-91883306]{position:absolute;left:0;top:0;right:0;bottom:0;background:rgba(255,255,255,.8)}.popper{width:auto;background-color:#fafafa;color:#212121;text-align:center;padding:2px;display:inline-block;border-radius:3px;position:absolute;font-size:14px;font-weight:400;border:1px #ebebeb solid;z-index:200000;box-shadow:#3a3a3a 0 0 6px}.popper .popper__arrow{width:0;height:0;border-style:solid;position:absolute;margin:5px}.popper[x-placement^=top]{margin-bottom:5px}.popper[x-placement^=top] .popper__arrow{border-width:5px 5px 0 5px;border-color:#fafafa transparent transparent transparent;bottom:-5px;left:calc(50% - 5px);margin-top:0;margin-bottom:0}.popper[x-placement^=bottom]{margin-top:5px}.popper[x-placement^=bottom] .popper__arrow{border-width:0 5px 5px 5px;border-color:transparent transparent #fafafa transparent;top:-5px;left:calc(50% - 5px);margin-top:0;margin-bottom:0}.popper[x-placement^=right]{margin-left:5px}.popper[x-placement^=right] .popper__arrow{border-width:5px 5px 5px 0;border-color:transparent #fafafa transparent transparent;left:-5px;top:calc(50% - 5px);margin-left:0;margin-right:0}.popper[x-placement^=left]{margin-right:5px}.popper[x-placement^=left] .popper__arrow{border-width:5px 0 5px 5px;border-color:transparent transparent transparent #fafafa;right:-5px;top:calc(50% - 5px);margin-left:0;margin-right:0}[data-v-7f00d874] .popper{transform:translate3d(0,22px,0)!important}.record-tree-mobile{height:calc(100vh - 45px);overflow-y:scroll}.record-tree-mobile .record-tree-main{padding-left:0}.record-tree-mobile .record-tree-options{padding:12px 0;background:#fff;border-top:1px dotted #eee;display:flex}.record-tree-mobile .record-tree-option-item{flex:1;max-width:32px}.record-tree-mobile .node-file-wrap{width:200px}.record-tree-mobile .node-file-right{display:none}.record-tree-mobile .node-audio,.record-tree-mobile .node-video{width:200px}.record-tree-mobile .node-audio audio{width:200px;outline:none}.record-tree-mobile .node-video video{width:200px;outline:none}.record-tree-popper-content{display:flex;flex-wrap:wrap;padding:10px;box-shadow:0 2px 12px #1d1c1c1f;border:1px solid rgba(29,28,28,.12);border-radius:5px;overflow:hidden;background:#fff;z-index:9999}.record-tree-main{padding-left:15px}.record-tree-popper-content-item{padding:8px 10px;display:flex;align-items:center;justify-content:center;cursor:pointer}.record-tree{position:relative;padding-bottom:40px}.record-tree-svg{display:inline-block;border-radius:9999px;color:#fff;cursor:pointer}.record-tree-title-bar{position:relative;display:flex;margin-bottom:3px}.record-tree-title{padding-left:25px;font-weight:700;outline:none;font-size:18px;line-height:1.5;width:100%}.record-tree-popper-reference{display:flex;position:absolute;top:0px;left:0px;text-align:center;border-radius:9999px;color:#fff}.record-tree-options{position:fixed;bottom:0px;left:0px;width:100%;display:flex;justify-content:space-between;padding:5px 0;background:rgb(236,236,236)}.record-tree-option-left{display:flex;flex:1;padding-left:10px}.record-tree-option-right{padding-right:10px;font-size:14px}.record-tree-option-item{margin:0 5px;cursor:pointer;display:flex;justify-content:center;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.record-tree-empty-icon{display:inline-block;border-radius:9999px}.record-tree-placeholder{position:absolute;left:0;top:0;padding-left:25px;font-weight:700;outline:none;font-size:18px;line-height:1.5;width:100%;color:#999;pointer-events:none}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
2
  import { uuid as Ct, detectDeviceType as g0, byNameFindIcon as w0, icons as y0, parseMimeType as T0, oss as x0 } from "@codernote/utils";
3
3
  import Gt from "vue-inline-svg";
4
4
  import A0 from "vue-popperjs";
@@ -41,17 +41,17 @@ function Rt(_, r = 0, m = !1) {
41
41
  console.error("Element is not contenteditable");
42
42
  return;
43
43
  }
44
- const $ = window.getSelection(), Z = document.createRange();
45
- $.removeAllRanges();
44
+ const q = window.getSelection(), V = document.createRange();
45
+ q.removeAllRanges();
46
46
  try {
47
47
  let K = _;
48
48
  if (_.childNodes.length > 0 ? K = _.childNodes[0] : (m || r > 0) && (K = document.createTextNode(""), _.appendChild(K)), m)
49
- Z.selectNodeContents(K), Z.collapse(!1);
49
+ V.selectNodeContents(K), V.collapse(!1);
50
50
  else {
51
51
  const ie = Math.min(r, K.length || 0);
52
- Z.setStart(K, ie), Z.collapse(!0);
52
+ V.setStart(K, ie), V.collapse(!0);
53
53
  }
54
- $.addRange(Z);
54
+ q.addRange(V);
55
55
  } catch (K) {
56
56
  console.error("Error setting focus position:", K);
57
57
  }
@@ -64,8 +64,8 @@ function S0(_) {
64
64
  }
65
65
  function p0(_) {
66
66
  var K;
67
- let m = (((K = _.target) == null ? void 0 : K.querySelector(".node-div")) || _.target).getBoundingClientRect(), p = _.clientY, $ = m.top + m.height / 3, Z = m.top + m.height / 3 * 2;
68
- return p < $ ? "top" : p < Z ? "center" : "bottom";
67
+ let m = (((K = _.target) == null ? void 0 : K.querySelector(".node-div")) || _.target).getBoundingClientRect(), p = _.clientY, q = m.top + m.height / 3, V = m.top + m.height / 3 * 2;
68
+ return p < q ? "top" : p < V ? "center" : "bottom";
69
69
  }
70
70
  function r0(_) {
71
71
  return /<(img|audio|video)/.test(_.text) || _.type;
@@ -76,8 +76,8 @@ function N0(_) {
76
76
  function Nt(_, r = !1) {
77
77
  const m = N0(_), p = ".node-text";
78
78
  if (r) {
79
- const $ = m.querySelectorAll(p);
80
- return $[$.length - 1];
79
+ const q = m.querySelectorAll(p);
80
+ return q[q.length - 1];
81
81
  }
82
82
  return m == null ? void 0 : m.querySelector(p);
83
83
  }
@@ -94,20 +94,20 @@ function I0(_, r) {
94
94
  return;
95
95
  }
96
96
  i0();
97
- const $ = p0(_), Z = (K = m.querySelector(".node-div")) == null ? void 0 : K.classList;
98
- Z && Z.add(`drag-over-${$}`);
97
+ const q = p0(_), V = (K = m.querySelector(".node-div")) == null ? void 0 : K.classList;
98
+ V && V.add(`drag-over-${q}`);
99
99
  }
100
100
  function C0(_) {
101
- const m = new DOMParser().parseFromString(_, "text/html"), p = m.querySelector("img"), $ = m.querySelector("video"), Z = m.querySelector("audio");
101
+ const m = new DOMParser().parseFromString(_, "text/html"), p = m.querySelector("img"), q = m.querySelector("video"), V = m.querySelector("audio");
102
102
  return p ? {
103
103
  type: "image",
104
104
  content: p.src
105
- } : $ ? {
105
+ } : q ? {
106
106
  type: "video",
107
- content: $.src
108
- } : Z ? {
107
+ content: q.src
108
+ } : V ? {
109
109
  type: "audio",
110
- content: Z.src
110
+ content: V.src
111
111
  } : null;
112
112
  }
113
113
  function n0(_, r) {
@@ -119,8 +119,8 @@ function n0(_, r) {
119
119
  function R0(_, r = 0) {
120
120
  if (_ === 0)
121
121
  return "0 Bytes";
122
- const m = 1024, p = r < 0 ? 0 : r, $ = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"], Z = Math.floor(Math.log(_) / Math.log(m));
123
- return parseFloat((_ / Math.pow(m, Z)).toFixed(p)) + " " + $[Z];
122
+ const m = 1024, p = r < 0 ? 0 : r, q = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"], V = Math.floor(Math.log(_) / Math.log(m));
123
+ return parseFloat((_ / Math.pow(m, V)).toFixed(p)) + " " + q[V];
124
124
  }
125
125
  function L0(_, r) {
126
126
  if (_.length <= r)
@@ -131,18 +131,18 @@ function L0(_, r) {
131
131
  function E0(_) {
132
132
  return (_ || "").replace("contenteditable", "temp");
133
133
  }
134
- function zt(_, r, m, p, $, Z, K, ie) {
134
+ function zt(_, r, m, p, q, V, K, ie) {
135
135
  var ye = typeof _ == "function" ? _.options : _;
136
- r && (ye.render = r, ye.staticRenderFns = m, ye._compiled = !0), p && (ye.functional = !0), Z && (ye._scopeId = "data-v-" + Z);
136
+ r && (ye.render = r, ye.staticRenderFns = m, ye._compiled = !0), p && (ye.functional = !0), V && (ye._scopeId = "data-v-" + V);
137
137
  var Re;
138
138
  if (K ? (Re = function(Ve) {
139
- Ve = Ve || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !Ve && typeof __VUE_SSR_CONTEXT__ < "u" && (Ve = __VUE_SSR_CONTEXT__), $ && $.call(this, Ve), Ve && Ve._registeredComponents && Ve._registeredComponents.add(K);
140
- }, ye._ssrRegister = Re) : $ && (Re = ie ? function() {
141
- $.call(
139
+ Ve = Ve || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !Ve && typeof __VUE_SSR_CONTEXT__ < "u" && (Ve = __VUE_SSR_CONTEXT__), q && q.call(this, Ve), Ve && Ve._registeredComponents && Ve._registeredComponents.add(K);
140
+ }, ye._ssrRegister = Re) : q && (Re = ie ? function() {
141
+ q.call(
142
142
  this,
143
143
  (ye.functional ? this.parent : this).$root.$options.shadowRoot
144
144
  );
145
- } : $), Re)
145
+ } : q), Re)
146
146
  if (ye.functional) {
147
147
  ye._injectStyles = Re;
148
148
  var ke = ye.render;
@@ -207,10 +207,13 @@ const k0 = {
207
207
  if (this.disableInput)
208
208
  return this.disableInput = !1, _.preventDefault(), !1;
209
209
  if (!this.isComposition || _.which === 32) {
210
- const p = kt(), $ = r.text !== _.target.innerHTML;
211
- r.text = _.target.innerHTML, this.$nextTick(() => {
210
+ const p = kt(), q = (_.target.innerHTML || "").replace(
211
+ /<br\s*\/?>/gi,
212
+ ""
213
+ ), V = r.text !== q;
214
+ r.text = q, this.$nextTick(() => {
212
215
  Rt(_.target, p);
213
- }), $ && this.update();
216
+ }), V && this.update();
214
217
  } else
215
218
  this.disableInput = !1;
216
219
  },
@@ -250,8 +253,8 @@ const k0 = {
250
253
  _.preventDefault(), this.$emit("toPrevFocus", r, !0), this.remove();
251
254
  else {
252
255
  const p = window.getSelection();
253
- let $ = p.focusOffset - 1;
254
- if (_.target && p && $ < 0) {
256
+ let q = p.focusOffset - 1;
257
+ if (_.target && p && q < 0) {
255
258
  if (_.preventDefault(), (m = r.children) != null && m.length)
256
259
  return;
257
260
  this.$emit("toPrevFocus", r, !0), this.$emit("remove", r);
@@ -295,8 +298,8 @@ const k0 = {
295
298
  const r = this.node, m = _.currentTarget, p = kt();
296
299
  if (!m)
297
300
  return;
298
- const $ = p + 1, Z = m.innerText.length;
299
- !p && r.type ? Rt(m, $, !0) : $ > Z ? this.$emit("toNextFocus", r, !0, !0) : Rt(m, $);
301
+ const q = p + 1, V = m.innerText.length;
302
+ !p && r.type ? Rt(m, q, !0) : q > V ? this.$emit("toNextFocus", r, !0, !0) : Rt(m, q);
300
303
  },
301
304
  handleArrowDown() {
302
305
  this.$emit("toNextFocus", this.node, !1, !0);
@@ -350,7 +353,7 @@ var j0 = function() {
350
353
  B0,
351
354
  !1,
352
355
  null,
353
- "8db3bbd0",
356
+ "78187b1c",
354
357
  null,
355
358
  null
356
359
  );
@@ -423,7 +426,7 @@ const F0 = {
423
426
  this.addFiles(m, r);
424
427
  else {
425
428
  let p = _.dataTransfer.getData("dragNode");
426
- const $ = p0(_);
429
+ const q = p0(_);
427
430
  try {
428
431
  p = JSON.parse(p);
429
432
  } catch {
@@ -433,36 +436,46 @@ const F0 = {
433
436
  n0(r, p) || // 拖拽到自己的父节点
434
437
  n0(p, r))
435
438
  return;
436
- let Z = [...this.nodes];
437
- if (Z.find((K) => K.uuid === p.uuid) ? Z = Z.filter((K) => K.uuid !== p.uuid) : St.trigger("dragEnd"), St.remove("dragId"), $ === "center" && (this.status[r.uuid].collapsed = !1, r.children ? r.children.push(p) : r.children = [p], this.$nextTick(() => {
438
- this.update(Z);
439
- })), $ === "top") {
440
- const K = Z.findIndex((ie) => ie === r);
441
- Z.splice(K, 0, p), this.update(Z);
439
+ let V = [...this.nodes];
440
+ if (V.find((K) => K.uuid === p.uuid) ? V = V.filter((K) => K.uuid !== p.uuid) : St.trigger("dragEnd"), St.remove("dragId"), q === "center" && (this.status[r.uuid].collapsed = !1, r.children ? r.children.push(p) : r.children = [p], this.$nextTick(() => {
441
+ this.update(V);
442
+ })), q === "top") {
443
+ const K = V.findIndex((ie) => ie === r);
444
+ V.splice(K, 0, p), this.update(V);
442
445
  }
443
- if ($ === "bottom") {
444
- const K = Z.findIndex((ie) => ie === r);
445
- Z.splice(K + 1, 0, p), this.update(Z);
446
+ if (q === "bottom") {
447
+ const K = V.findIndex((ie) => ie === r);
448
+ V.splice(K + 1, 0, p), this.update(V);
446
449
  }
447
450
  }
448
451
  },
449
452
  handlePaste(_, r) {
450
- const m = _.clipboardData.files;
451
- m.length != 0 && (this.addFiles(m, r), _.preventDefault());
453
+ const m = _.clipboardData.files, p = _.target;
454
+ if (m.length == 0) {
455
+ const q = [...this.nodes], V = q.findIndex((K) => K === r);
456
+ setTimeout(() => {
457
+ r.text !== p.innerText && (q[V] = {
458
+ ...r,
459
+ text: p.innerText
460
+ }, this.update(q));
461
+ }, 0);
462
+ return;
463
+ }
464
+ this.addFiles(m, r), _.preventDefault();
452
465
  },
453
466
  handleTab(_, r) {
454
- var Z;
467
+ var V;
455
468
  _.preventDefault();
456
- const m = [...this.nodes], p = m.findIndex((K) => K === r), $ = kt();
469
+ const m = [...this.nodes], p = m.findIndex((K) => K === r), q = kt();
457
470
  if (_.shiftKey)
458
471
  this.$emit("transfer", r);
459
472
  else if (p > 0) {
460
473
  const K = this.nodes[p - 1];
461
- (Z = this.status[K.uuid]) != null && Z.collapsed && (this.status[K.uuid].collapsed = !1), K.children ? K.children.push(r) : K.children = [r], m.splice(p, 1), this.update(m);
474
+ (V = this.status[K.uuid]) != null && V.collapsed && (this.status[K.uuid].collapsed = !1), K.children ? K.children.push(r) : K.children = [r], m.splice(p, 1), this.update(m);
462
475
  } else
463
476
  _.target.focus();
464
477
  this.$nextTick(() => {
465
- Rt(Nt(r), $);
478
+ Rt(Nt(r), q);
466
479
  });
467
480
  },
468
481
  handleRemove(_) {
@@ -480,8 +493,8 @@ const F0 = {
480
493
  },
481
494
  // 节点跨父级移动
482
495
  handleTransfer(_, r) {
483
- const m = [...this.nodes], p = m.findIndex((Z) => Z === _), $ = _.children.findIndex((Z) => Z === r);
484
- _.children.splice($, 1), m.splice(p + 1, 0, r), this.update(m);
496
+ const m = [...this.nodes], p = m.findIndex((V) => V === _), q = _.children.findIndex((V) => V === r);
497
+ _.children.splice(q, 1), m.splice(p + 1, 0, r), this.update(m);
485
498
  },
486
499
  handleEnter(_) {
487
500
  this.enableDbEnter ? this.timeout ? (clearTimeout(this.timeout), this.timeout = null, this.handleDbEnter()) : this.timeout = setTimeout(() => {
@@ -492,27 +505,27 @@ const F0 = {
492
505
  this.$emit("dbEnter");
493
506
  },
494
507
  keyEnter(_) {
495
- const r = r0(_), m = this.nodes.findIndex((K) => K.uuid === _.uuid), p = kt(), $ = [...this.nodes], Z = { text: "", uuid: Ct() };
508
+ const r = r0(_), m = this.nodes.findIndex((K) => K.uuid === _.uuid), p = kt(), q = [...this.nodes], V = { text: "", uuid: Ct() };
496
509
  if (r)
497
- $.splice(m + 1, 0, Z);
510
+ q.splice(m + 1, 0, V);
498
511
  else {
499
512
  let K = _.text.replace(/&nbsp;?/g, " ");
500
- _.text = K.slice(0, p), Z.text = K.slice(p, K.length), $.splice(m + 1, 0, Z);
513
+ _.text = K.slice(0, p), V.text = K.slice(p, K.length), q.splice(m + 1, 0, V);
501
514
  }
502
- this.update($), this.$nextTick(() => {
503
- const K = Nt(Z);
515
+ this.update(q), this.$nextTick(() => {
516
+ const K = Nt(V);
504
517
  K == null || K.focus();
505
518
  });
506
519
  },
507
520
  // 聚焦上一节点
508
521
  toPrevFocus(_, r = !1) {
509
- var $;
522
+ var q;
510
523
  let m = kt();
511
- const p = this.nodes.findIndex((Z) => Z === _);
524
+ const p = this.nodes.findIndex((V) => V === _);
512
525
  if (p === 0)
513
526
  this.$emit("focusPrev", r);
514
527
  else {
515
- const Z = this.nodes[p - 1], K = (($ = Z.children) == null ? void 0 : $.length) && !this.status[Z.uuid].collapsed, ie = Nt(this.nodes[p - 1], K), ye = r || m === 1 / 0;
528
+ const V = this.nodes[p - 1], K = ((q = V.children) == null ? void 0 : q.length) && !this.status[V.uuid].collapsed, ie = Nt(this.nodes[p - 1], K), ye = r || m === 1 / 0;
516
529
  Rt(
517
530
  ie,
518
531
  ye ? ie.innerText.length : m,
@@ -522,15 +535,15 @@ const F0 = {
522
535
  },
523
536
  // 聚焦下一节点
524
537
  toNextFocus(_, r = !1, m = !1) {
525
- var Z;
526
- const p = kt(), $ = this.nodes.findIndex((K) => K === _);
527
- if (m && ((Z = _.children) != null && Z.length) && !this.status[_.uuid].collapsed) {
538
+ var V;
539
+ const p = kt(), q = this.nodes.findIndex((K) => K === _);
540
+ if (m && ((V = _.children) != null && V.length) && !this.status[_.uuid].collapsed) {
528
541
  const K = Nt(_.children[0]);
529
542
  Rt(K, r ? 0 : p);
530
- } else if ($ + 1 >= this.nodes.length)
543
+ } else if (q + 1 >= this.nodes.length)
531
544
  this.$emit("focusNext", !0);
532
545
  else {
533
- const K = Nt(this.nodes[$ + 1]);
546
+ const K = Nt(this.nodes[q + 1]);
534
547
  Rt(K, r ? 0 : p);
535
548
  }
536
549
  },
@@ -542,10 +555,10 @@ const F0 = {
542
555
  },
543
556
  addFiles(_, r) {
544
557
  if (_) {
545
- const p = Array.from(_).slice(0, 5), $ = (Z) => {
558
+ const p = Array.from(_).slice(0, 5), q = (V) => {
546
559
  const K = [...this.nodes];
547
560
  let ie = K.findIndex((ye) => ye === r);
548
- Z.forEach((ye, Re) => {
561
+ V.forEach((ye, Re) => {
549
562
  !r.text && !r.content && Re === 0 ? K.splice(ie, 1, {
550
563
  ...ye,
551
564
  uuid: r.uuid,
@@ -553,7 +566,7 @@ const F0 = {
553
566
  }) : K.splice(ie + 1, 0, ye), ie++;
554
567
  }), this.update(K);
555
568
  };
556
- this.$emit("fileUpload", p, $);
569
+ this.$emit("fileUpload", p, q);
557
570
  }
558
571
  },
559
572
  handleCollapse(_, r) {
@@ -569,35 +582,35 @@ const F0 = {
569
582
  },
570
583
  // dfs查找并追加节点
571
584
  appendNode(_, r = !1, m = this.nodes) {
572
- const p = St.get("currentId"), $ = [...m];
585
+ const p = St.get("currentId"), q = [...m];
573
586
  if (!r && (!p || !document.getElementById(p))) {
574
- const K = $[$.length - 1];
575
- !(K != null && K.type) && !K.text ? $[$.length - 1] = {
587
+ const K = q[q.length - 1];
588
+ !(K != null && K.type) && !K.text ? q[q.length - 1] = {
576
589
  ...K,
577
590
  ..._
578
- } : $.push(_), this.update($);
591
+ } : q.push(_), this.update(q);
579
592
  return;
580
593
  }
581
- const Z = $.findIndex((K) => K.uuid === p);
582
- if (Z >= 0) {
583
- const K = $[Z];
584
- !(K != null && K.type) && !K.text ? $[Z] = {
594
+ const V = q.findIndex((K) => K.uuid === p);
595
+ if (V >= 0) {
596
+ const K = q[V];
597
+ !(K != null && K.type) && !K.text ? q[V] = {
585
598
  ...K,
586
599
  ..._
587
- } : $.splice(Z + 1, 0, _);
600
+ } : q.splice(V + 1, 0, _);
588
601
  } else
589
- $.forEach((K) => {
602
+ q.forEach((K) => {
590
603
  var ie;
591
604
  (ie = K.children) != null && ie.length && (K.children = this.appendNode(_, !0, K.children));
592
605
  });
593
- return r || this.update($), $;
606
+ return r || this.update(q), q;
594
607
  },
595
608
  // dfs查找并更新节点
596
609
  updateNode(_, r = !1, m = this.nodes) {
597
- const p = [...m], $ = p.findIndex((Z) => Z.uuid === _.uuid);
598
- return $ >= 0 ? p[$] = _ : p.forEach((Z) => {
610
+ const p = [...m], q = p.findIndex((V) => V.uuid === _.uuid);
611
+ return q >= 0 ? p[q] = _ : p.forEach((V) => {
599
612
  var K;
600
- (K = Z.children) != null && K.length && (Z.children = this.updateNode(_, !0, Z.children));
613
+ (K = V.children) != null && K.length && (V.children = this.updateNode(_, !0, V.children));
601
614
  }), r || this.update(p), p;
602
615
  },
603
616
  filterNodes(_) {
@@ -655,19 +668,19 @@ var U0 = function() {
655
668
  "node-li": !0,
656
669
  collapsed: r.status[p.uuid] ? r.status[p.uuid].collapsed : !1,
657
670
  "has-child": !!(p.children || []).length
658
- }, attrs: { id: `${p.uuid}`, draggable: "true" }, on: { dragstart: function($) {
659
- return $.stopPropagation(), r.handleDragStart($, p);
660
- }, dragover: function($) {
661
- return $.stopPropagation(), $.preventDefault(), r.handleDragOver($, p);
662
- }, dragend: function($) {
663
- return $.stopPropagation(), $.preventDefault(), r.handleDragEnd($, p);
664
- }, drop: function($) {
665
- return $.stopPropagation(), r.handleDrop($, p);
666
- }, dragleave: function($) {
667
- return $.stopPropagation(), r.handleDragLeave($, p);
668
- }, paste: function($) {
669
- return $.stopPropagation(), $.preventDefault(), r.handlePaste($, p);
670
- } } }, [m("Node", { attrs: { node: p, isMobile: r.isMobile }, on: { change: r.handleNodeChange, toPrevFocus: r.toPrevFocus, toNextFocus: r.toNextFocus, toFocus: r.toFocus, collapse: r.handleCollapse, enter: r.handleEnter, tab: r.handleTab, remove: r.handleRemove } }), (p.children || []).length ? m("tree-editor", { attrs: { nodes: p.children, enableDbEnter: r.enableDbEnter, hash: r.hash, isMobile: r.isMobile, allowEmpty: !0, sublevel: !0 }, on: { change: ($) => r.handleChangeChildren(p, $), focusPrev: ($) => r.toFocus(p, $), focusNext: ($) => r.toNextFocus(p, $), transfer: ($) => r.handleTransfer(p, $), fileUpload: (...$) => r.$emit("fileUpload", ...$), dbEnter: r.handleDbEnter } }) : r._e()], 1);
671
+ }, attrs: { id: `${p.uuid}`, draggable: "true" }, on: { dragstart: function(q) {
672
+ return q.stopPropagation(), r.handleDragStart(q, p);
673
+ }, dragover: function(q) {
674
+ return q.stopPropagation(), q.preventDefault(), r.handleDragOver(q, p);
675
+ }, dragend: function(q) {
676
+ return q.stopPropagation(), q.preventDefault(), r.handleDragEnd(q, p);
677
+ }, drop: function(q) {
678
+ return q.stopPropagation(), r.handleDrop(q, p);
679
+ }, dragleave: function(q) {
680
+ return q.stopPropagation(), r.handleDragLeave(q, p);
681
+ }, paste: function(q) {
682
+ return q.stopPropagation(), r.handlePaste(q, p);
683
+ } } }, [m("Node", { attrs: { node: p, isMobile: r.isMobile }, on: { change: r.handleNodeChange, toPrevFocus: r.toPrevFocus, toNextFocus: r.toNextFocus, toFocus: r.toFocus, collapse: r.handleCollapse, enter: r.handleEnter, tab: r.handleTab, remove: r.handleRemove } }), (p.children || []).length ? m("tree-editor", { attrs: { nodes: p.children, enableDbEnter: r.enableDbEnter, hash: r.hash, isMobile: r.isMobile, allowEmpty: !0, sublevel: !0 }, on: { change: (q) => r.handleChangeChildren(p, q), focusPrev: (q) => r.toFocus(p, q), focusNext: (q) => r.toNextFocus(p, q), transfer: (q) => r.handleTransfer(p, q), fileUpload: (...q) => r.$emit("fileUpload", ...q), dbEnter: r.handleDbEnter } }) : r._e()], 1);
671
684
  }), 0);
672
685
  }, P0 = [], H0 = /* @__PURE__ */ zt(
673
686
  F0,
@@ -675,7 +688,7 @@ var U0 = function() {
675
688
  P0,
676
689
  !1,
677
690
  null,
678
- "97a7403f",
691
+ "bc9015c1",
679
692
  null,
680
693
  null
681
694
  );
@@ -705,17 +718,17 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
705
718
  r(p, m), _.exports && (_.exports = p.Recorder);
706
719
  })(function(r, m) {
707
720
  var p = function() {
708
- }, $ = function(e) {
721
+ }, q = function(e) {
709
722
  return typeof e == "number";
710
- }, Z = function(e) {
711
- return new V(e);
712
- }, K = Z.LM = "2023-12-24 18:09", ie = "https://github.com/xiangyuecn/Recorder", ye = "Recorder", Re = "getUserMedia", ke = "srcSampleRate", Oe = "sampleRate", Ve = "bitRate", Ze = "catch", ue = r[ye];
723
+ }, V = function(e) {
724
+ return new W(e);
725
+ }, K = V.LM = "2023-12-24 18:09", ie = "https://github.com/xiangyuecn/Recorder", ye = "Recorder", Re = "getUserMedia", ke = "srcSampleRate", Oe = "sampleRate", Ve = "bitRate", Ze = "catch", ue = r[ye];
713
726
  if (ue && ue.LM == K) {
714
727
  ue.CLog(ue.i18n.$T("K8zP::重复导入{1}", 0, ye), 3);
715
728
  return;
716
729
  }
717
- Z.IsOpen = function() {
718
- var e = Z.Stream;
730
+ V.IsOpen = function() {
731
+ var e = V.Stream;
719
732
  if (e) {
720
733
  var o = e.getTracks && e.getTracks() || e.audioTracks || [], h = o[0];
721
734
  if (h) {
@@ -724,44 +737,44 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
724
737
  }
725
738
  }
726
739
  return !1;
727
- }, Z.BufferSize = 4096, Z.Destroy = function() {
740
+ }, V.BufferSize = 4096, V.Destroy = function() {
728
741
  Fe(ye + " Destroy"), at();
729
742
  for (var e in ge)
730
743
  ge[e]();
731
744
  };
732
745
  var ge = {};
733
- Z.BindDestroy = function(e, o) {
746
+ V.BindDestroy = function(e, o) {
734
747
  ge[e] = o;
735
- }, Z.Support = function() {
748
+ }, V.Support = function() {
736
749
  if (!m)
737
750
  return !1;
738
751
  var e = navigator.mediaDevices || {};
739
- return e[Re] || (e = navigator, e[Re] || (e[Re] = e.webkitGetUserMedia || e.mozGetUserMedia || e.msGetUserMedia)), !(!e[Re] || (Z.Scope = e, !Z.GetContext()));
740
- }, Z.GetContext = function(e) {
752
+ return e[Re] || (e = navigator, e[Re] || (e[Re] = e.webkitGetUserMedia || e.mozGetUserMedia || e.msGetUserMedia)), !(!e[Re] || (V.Scope = e, !V.GetContext()));
753
+ }, V.GetContext = function(e) {
741
754
  if (!m)
742
755
  return null;
743
756
  var o = window.AudioContext;
744
757
  if (o || (o = window.webkitAudioContext), !o)
745
758
  return null;
746
- var h = Z.Ctx;
747
- if ((!h || h.state == "closed") && (h = Z.Ctx = new o(), Z.NewCtxs = Z.NewCtxs || [], Z.BindDestroy("Ctx", function() {
748
- var b = Z.Ctx;
749
- b && b.close && (b.close(), Z.Ctx = 0);
750
- var S = Z.NewCtxs;
751
- Z.NewCtxs = [];
759
+ var h = V.Ctx;
760
+ if ((!h || h.state == "closed") && (h = V.Ctx = new o(), V.NewCtxs = V.NewCtxs || [], V.BindDestroy("Ctx", function() {
761
+ var b = V.Ctx;
762
+ b && b.close && (b.close(), V.Ctx = 0);
763
+ var S = V.NewCtxs;
764
+ V.NewCtxs = [];
752
765
  for (var Y = 0; Y < S.length; Y++)
753
766
  S[Y].close();
754
767
  })), e && h.close)
755
768
  try {
756
- h = new o(), Z.NewCtxs.push(h);
769
+ h = new o(), V.NewCtxs.push(h);
757
770
  } catch (b) {
758
771
  Fe("GetContext tryNew Error", 1, b);
759
772
  }
760
773
  return h;
761
- }, Z.CloseNewCtx = function(e) {
762
- if (e && e != Z.Ctx) {
774
+ }, V.CloseNewCtx = function(e) {
775
+ if (e && e != V.Ctx) {
763
776
  e.close && e.close();
764
- for (var o = Z.NewCtxs || [], h = o.length, b = 0; b < o.length; b++)
777
+ for (var o = V.NewCtxs || [], h = o.length, b = 0; b < o.length; b++)
765
778
  if (o[b] == e) {
766
779
  o.splice(b, 1);
767
780
  break;
@@ -773,16 +786,16 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
773
786
  var o = e.state, h = "ctx.state=" + o;
774
787
  return o == "suspended" && (h += De("nMIy::(注意:ctx不是running状态,rec.open和start至少要有一个在用户操作(触摸、点击等)时进行调用,否则将在rec.start时尝试进行ctx.resume,可能会产生兼容性问题(仅iOS),请参阅文档中runningContext配置)")), h;
775
788
  }, Ye = "ConnectEnableWebM";
776
- Z[Ye] = !0;
789
+ V[Ye] = !0;
777
790
  var de = "ConnectEnableWorklet";
778
- Z[de] = !1;
791
+ V[de] = !1;
779
792
  var ze = function(e, o) {
780
- var h = e.BufferSize || Z.BufferSize, b = e.Stream, S = b._RC || b._c || Z.GetContext(!0);
793
+ var h = e.BufferSize || V.BufferSize, b = e.Stream, S = b._RC || b._c || V.GetContext(!0);
781
794
  b._c = S;
782
795
  var Y = function(P) {
783
796
  var T = b._m = S.createMediaStreamSource(b), oe = S.destination, g = "createMediaStreamDestination";
784
797
  S[g] && (oe = b._d = S[g]()), T.connect(P), P.connect(oe);
785
- }, D, s, q, ae = "", me = b._call, be = function(P) {
798
+ }, D, s, $, ae = "", me = b._call, be = function(P) {
786
799
  for (var T in me) {
787
800
  for (var oe = P.length, g = new Int16Array(oe), z = 0, re = 0; re < oe; re++) {
788
801
  var j = Math.max(-1, Math.min(1, P[re]));
@@ -792,9 +805,9 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
792
805
  me[ee](g, z);
793
806
  return;
794
807
  }
795
- }, ne = "ScriptProcessor", ce = "audioWorklet", pe = ye + " " + ce, se = "RecProc", G = "MediaRecorder", ve = G + ".WebM.PCM", we = S.createScriptProcessor || S.createJavaScriptNode, U = De("ZGlf::。由于{1}内部1秒375次回调,在移动端可能会有性能问题导致回调丢失录音变短,PC端无影响,暂不建议开启{1}。", 0, ce), te = function() {
808
+ }, ne = "ScriptProcessor", ce = "audioWorklet", pe = ye + " " + ce, se = "RecProc", Z = "MediaRecorder", ve = Z + ".WebM.PCM", we = S.createScriptProcessor || S.createJavaScriptNode, U = De("ZGlf::。由于{1}内部1秒375次回调,在移动端可能会有性能问题导致回调丢失录音变短,PC端无影响,暂不建议开启{1}。", 0, ce), te = function() {
796
809
  s = b.isWorklet = !1, $e(b), Fe(De("7TU0::Connect采用老的{1},", 0, ne) + ft.get(
797
- Z[de] ? De("JwCL::但已设置{1}尝试启用{2}", 2) : De("VGjB::可设置{1}尝试启用{2}", 2),
810
+ V[de] ? De("JwCL::但已设置{1}尝试启用{2}", 2) : De("VGjB::可设置{1}尝试启用{2}", 2),
798
811
  [ye + "." + de + "=true", ce]
799
812
  ) + ae + U, 3);
800
813
  var P = b._p = we.call(S, h, 1, 1);
@@ -803,7 +816,7 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
803
816
  be(oe);
804
817
  };
805
818
  }, c = function() {
806
- D = b.isWebM = !1, Ke(b), s = b.isWorklet = !we || Z[de];
819
+ D = b.isWebM = !1, Ke(b), s = b.isWorklet = !we || V[de];
807
820
  var P = window.AudioWorkletNode;
808
821
  if (!(s && S[ce] && P)) {
809
822
  te();
@@ -836,8 +849,8 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
836
849
  }, oe = function() {
837
850
  return s && b._na;
838
851
  }, g = b._na = function() {
839
- q !== "" && (clearTimeout(q), q = setTimeout(function() {
840
- q = 0, oe() && (Fe(De("MxX1::{1}未返回任何音频,恢复使用{2}", 0, ce, ne), 3), we && te());
852
+ $ !== "" && (clearTimeout($), $ = setTimeout(function() {
853
+ $ = 0, oe() && (Fe(De("MxX1::{1}未返回任何音频,恢复使用{2}", 0, ce, ne), 3), we && te());
841
854
  }, 500));
842
855
  }, z = function() {
843
856
  if (oe()) {
@@ -845,7 +858,7 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
845
858
  processorOptions: { bufferSize: h }
846
859
  });
847
860
  Y(re), re.port.onmessage = function(j) {
848
- q && (clearTimeout(q), q = ""), oe() ? be(j.data.val) : s || Fe(De("XUap::{1}多余回调", 0, ce), 3);
861
+ $ && (clearTimeout($), $ = ""), oe() ? be(j.data.val) : s || Fe(De("XUap::{1}多余回调", 0, ce), 3);
849
862
  }, Fe(De("yOta::Connect采用{1},设置{2}可恢复老式{3}", 0, ce, ye + "." + de + "=false", ne) + ae + U, 3);
850
863
  }
851
864
  };
@@ -857,15 +870,15 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
857
870
  }
858
871
  var re = T();
859
872
  S[ce].addModule(re).then(function(j) {
860
- oe() && (S[se] = 1, z(), q && g());
873
+ oe() && (S[se] = 1, z(), $ && g());
861
874
  })[Ze](function(j) {
862
875
  Fe(ce + ".addModule Error", 1, j), oe() && te();
863
876
  });
864
877
  }
865
878
  });
866
879
  }, N = function() {
867
- var P = window[G], T = "ondataavailable", oe = "audio/webm; codecs=pcm";
868
- D = b.isWebM = Z[Ye];
880
+ var P = window[Z], T = "ondataavailable", oe = "audio/webm; codecs=pcm";
881
+ D = b.isWebM = V[Ye];
869
882
  var g = P && T in P.prototype && P.isTypeSupported(oe);
870
883
  if (ae = g ? "" : De("VwPd::(此浏览器不支持{1})", 0, ve), !o || !D || !g) {
871
884
  c();
@@ -875,11 +888,11 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
875
888
  return D && b._ra;
876
889
  };
877
890
  b._ra = function() {
878
- q !== "" && (clearTimeout(q), q = setTimeout(function() {
879
- z() && (Fe(De("vHnb::{1}未返回任何音频,降级使用{2}", 0, G, ce), 3), c());
891
+ $ !== "" && (clearTimeout($), $ = setTimeout(function() {
892
+ z() && (Fe(De("vHnb::{1}未返回任何音频,降级使用{2}", 0, Z, ce), 3), c());
880
893
  }, 500));
881
894
  };
882
- var re = Object.assign({ mimeType: oe }, Z.ConnectWebMOptions), j = b._r = new P(b, re), ee = b._rd = { sampleRate: S[Oe] };
895
+ var re = Object.assign({ mimeType: oe }, V.ConnectWebMOptions), j = b._r = new P(b, re), ee = b._rd = { sampleRate: S[Oe] };
883
896
  j[T] = function(k) {
884
897
  var fe = new FileReader();
885
898
  fe.onloadend = function() {
@@ -891,9 +904,9 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
891
904
  c();
892
905
  return;
893
906
  }
894
- q && (clearTimeout(q), q = ""), be(E);
907
+ $ && (clearTimeout($), $ = ""), be(E);
895
908
  } else
896
- D || Fe(De("O9P7::{1}多余回调", 0, G), 3);
909
+ D || Fe(De("O9P7::{1}多余回调", 0, Z), 3);
897
910
  }, fe.readAsArrayBuffer(k.data);
898
911
  }, j.start(~~(h / 48)), Fe(De("LMEm::Connect采用{1},设置{2}可恢复使用{3}或老式{4}", 0, ve, ye + "." + Ye + "=false", ce, ne));
899
912
  };
@@ -905,26 +918,26 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
905
918
  }, Ke = function(e) {
906
919
  e._ra = null, e._r && (e._r.stop(), e._r = null);
907
920
  }, at = function(e) {
908
- e = e || Z;
909
- var o = e == Z, h = e.Stream;
910
- h && (h._m && (h._m.disconnect(), h._m = null), !h._RC && h._c && Z.CloseNewCtx(h._c), h._RC = null, h._c = null, h._d && (Je(h._d.stream), h._d = null), h._p && (h._p.disconnect(), h._p.onaudioprocess = h._p = null), $e(h), Ke(h), o && Je(h)), e.Stream = 0;
911
- }, Je = Z.StopS_ = function(e) {
921
+ e = e || V;
922
+ var o = e == V, h = e.Stream;
923
+ h && (h._m && (h._m.disconnect(), h._m = null), !h._RC && h._c && V.CloseNewCtx(h._c), h._RC = null, h._c = null, h._d && (Je(h._d.stream), h._d = null), h._p && (h._p.disconnect(), h._p.onaudioprocess = h._p = null), $e(h), Ke(h), o && Je(h)), e.Stream = 0;
924
+ }, Je = V.StopS_ = function(e) {
912
925
  for (var o = e.getTracks && e.getTracks() || e.audioTracks || [], h = 0; h < o.length; h++) {
913
926
  var b = o[h];
914
927
  b.stop && b.stop();
915
928
  }
916
929
  e.stop && e.stop();
917
930
  };
918
- Z.SampleData = function(e, o, h, b, S) {
931
+ V.SampleData = function(e, o, h, b, S) {
919
932
  var Y = "SampleData";
920
933
  b || (b = {});
921
- var D = b.index || 0, s = b.offset || 0, q = b.filter;
922
- if (q && q.fn && q.sr != o && (q = null, Fe(De("d48C::{1}的filter采样率变了,重设滤波", 0, Y), 3)), !q) {
934
+ var D = b.index || 0, s = b.offset || 0, $ = b.filter;
935
+ if ($ && $.fn && $.sr != o && ($ = null, Fe(De("d48C::{1}的filter采样率变了,重设滤波", 0, Y), 3)), !$) {
923
936
  var ae = h > o * 3 / 4 ? 0 : h / 2 * 3 / 4;
924
- q = { fn: ae ? Z.IIRFilter(!0, o, ae) : 0 };
937
+ $ = { fn: ae ? V.IIRFilter(!0, o, ae) : 0 };
925
938
  }
926
- q.sr = o;
927
- var me = q.fn, be = b.frameNext || [];
939
+ $.sr = o;
940
+ var me = $.fn, be = b.frameNext || [];
928
941
  S || (S = {});
929
942
  var ne = S.frameSize || 1;
930
943
  S.frameType && (ne = S.frameType == "mp3" ? 1152 : 1);
@@ -933,8 +946,8 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
933
946
  for (var pe = 0, se = D; se < ce; se++)
934
947
  pe += e[se].length;
935
948
  pe = Math.max(0, pe - Math.floor(s));
936
- var G = o / h;
937
- G > 1 ? pe = Math.floor(pe / G) : (G = 1, h = o), pe += be.length;
949
+ var Z = o / h;
950
+ Z > 1 ? pe = Math.floor(pe / Z) : (Z = 1, h = o), pe += be.length;
938
951
  for (var ve = new Int16Array(pe), we = 0, se = 0; se < be.length; se++)
939
952
  ve[we] = be[se], we++;
940
953
  for (; D < ce; D++) {
@@ -946,7 +959,7 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
946
959
  var re = Math.floor(se);
947
960
  if (g == re) {
948
961
  var j = Math.ceil(se), ee = se - re, k = N, fe = j < te ? P : k, E = k + (fe - k) * ee;
949
- E > 32767 ? E = 32767 : E < -32768 && (E = -32768), ve[we] = E, we++, se += G;
962
+ E > 32767 ? E = 32767 : E < -32768 && (E = -32768), ve[we] = E, we++, se += Z;
950
963
  }
951
964
  }
952
965
  s = Math.max(0, se - te);
@@ -960,44 +973,44 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
960
973
  return {
961
974
  index: D,
962
975
  offset: s,
963
- filter: q,
976
+ filter: $,
964
977
  frameNext: be,
965
978
  sampleRate: h,
966
979
  data: ve
967
980
  };
968
- }, Z.IIRFilter = function(e, o, h) {
969
- var b = 2 * Math.PI * h / o, S = Math.sin(b), Y = Math.cos(b), D = S / 2, s = 1 + D, q = -2 * Y / s, ae = (1 - D) / s;
981
+ }, V.IIRFilter = function(e, o, h) {
982
+ var b = 2 * Math.PI * h / o, S = Math.sin(b), Y = Math.cos(b), D = S / 2, s = 1 + D, $ = -2 * Y / s, ae = (1 - D) / s;
970
983
  if (e)
971
984
  var me = (1 - Y) / 2 / s, be = (1 - Y) / s;
972
985
  else
973
986
  var me = (1 + Y) / 2 / s, be = -(1 + Y) / s;
974
- var ne = 0, ce = 0, pe = 0, se = 0, G = 0, ve = function(we) {
975
- return pe = me * we + be * ne + me * ce - q * se - ae * G, ce = ne, ne = we, G = se, se = pe, pe;
987
+ var ne = 0, ce = 0, pe = 0, se = 0, Z = 0, ve = function(we) {
988
+ return pe = me * we + be * ne + me * ce - $ * se - ae * Z, ce = ne, ne = we, Z = se, se = pe, pe;
976
989
  };
977
- return ve.Embed = { x1: 0, x2: 0, y1: 0, y2: 0, b0: me, b1: be, a1: q, a2: ae }, ve;
978
- }, Z.PowerLevel = function(e, o) {
990
+ return ve.Embed = { x1: 0, x2: 0, y1: 0, y2: 0, b0: me, b1: be, a1: $, a2: ae }, ve;
991
+ }, V.PowerLevel = function(e, o) {
979
992
  var h = e / o || 0, b;
980
993
  return h < 1251 ? b = Math.round(h / 1250 * 10) : b = Math.round(Math.min(100, Math.max(0, (1 + Math.log(h / 1e4) / Math.log(10)) * 100))), b;
981
- }, Z.PowerDBFS = function(e) {
994
+ }, V.PowerDBFS = function(e) {
982
995
  var o = Math.max(0.1, e || 0), h = 32767;
983
996
  return o = Math.min(o, h), o = 20 * Math.log(o / h) / Math.log(10), Math.max(-100, Math.round(o));
984
- }, Z.CLog = function(e, o) {
997
+ }, V.CLog = function(e, o) {
985
998
  if (typeof console == "object") {
986
- var h = new Date(), b = ("0" + h.getMinutes()).substr(-2) + ":" + ("0" + h.getSeconds()).substr(-2) + "." + ("00" + h.getMilliseconds()).substr(-3), S = this && this.envIn && this.envCheck && this.id, Y = ["[" + b + " " + ye + (S ? ":" + S : "") + "]" + e], D = arguments, s = Z.CLog, q = 2, ae = s.log || console.log;
987
- for ($(o) ? ae = o == 1 ? s.error || console.error : o == 3 ? s.warn || console.warn : ae : q = 1; q < D.length; q++)
988
- Y.push(D[q]);
999
+ var h = new Date(), b = ("0" + h.getMinutes()).substr(-2) + ":" + ("0" + h.getSeconds()).substr(-2) + "." + ("00" + h.getMilliseconds()).substr(-3), S = this && this.envIn && this.envCheck && this.id, Y = ["[" + b + " " + ye + (S ? ":" + S : "") + "]" + e], D = arguments, s = V.CLog, $ = 2, ae = s.log || console.log;
1000
+ for (q(o) ? ae = o == 1 ? s.error || console.error : o == 3 ? s.warn || console.warn : ae : $ = 1; $ < D.length; $++)
1001
+ Y.push(D[$]);
989
1002
  Xe ? ae && ae("[IsLoser]" + Y[0], Y.length > 1 ? Y : "") : ae.apply(console, Y);
990
1003
  }
991
1004
  };
992
1005
  var Fe = function() {
993
- Z.CLog.apply(this, arguments);
1006
+ V.CLog.apply(this, arguments);
994
1007
  }, Xe = !0;
995
1008
  try {
996
1009
  Xe = !console.log.apply;
997
1010
  } catch {
998
1011
  }
999
1012
  var Le = 0;
1000
- function V(e) {
1013
+ function W(e) {
1001
1014
  var o = this;
1002
1015
  o.id = ++Le, R();
1003
1016
  var h = {
@@ -1026,17 +1039,17 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
1026
1039
  h[b] = e[b];
1027
1040
  o.set = h;
1028
1041
  var S = h[Ve], Y = h[Oe];
1029
- (S && !$(S) || Y && !$(Y)) && o.CLog(De.G("IllegalArgs-1", [De("VtS4::{1}和{2}必须是数值", 0, Oe, Ve)]), 1, e), h[Ve] = +S || 16, h[Oe] = +Y || 16e3, o.state = 0, o._S = 9, o.Sync = { O: 9, C: 9 };
1042
+ (S && !q(S) || Y && !q(Y)) && o.CLog(De.G("IllegalArgs-1", [De("VtS4::{1}和{2}必须是数值", 0, Oe, Ve)]), 1, e), h[Ve] = +S || 16, h[Oe] = +Y || 16e3, o.state = 0, o._S = 9, o.Sync = { O: 9, C: 9 };
1030
1043
  }
1031
- Z.Sync = {
1044
+ V.Sync = {
1032
1045
  /*open*/
1033
1046
  O: 9,
1034
1047
  /*close*/
1035
1048
  C: 9
1036
- }, Z.prototype = V.prototype = {
1049
+ }, V.prototype = W.prototype = {
1037
1050
  CLog: Fe,
1038
1051
  _streamStore: function() {
1039
- return this.set.sourceStream ? this : Z;
1052
+ return this.set.sourceStream ? this : V;
1040
1053
  },
1041
1054
  _streamCtx: function() {
1042
1055
  var e = this._streamStore().Stream;
@@ -1046,17 +1059,17 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
1046
1059
  var h = this, b = h.set, S = h._streamStore(), Y = 0;
1047
1060
  e = e || p;
1048
1061
  var D = function(c, N) {
1049
- N = !!N, h.CLog(De("5tWi::录音open失败:") + c + ",isUserNotAllow:" + N, 1), Y && Z.CloseNewCtx(Y), o && o(c, N);
1062
+ N = !!N, h.CLog(De("5tWi::录音open失败:") + c + ",isUserNotAllow:" + N, 1), Y && V.CloseNewCtx(Y), o && o(c, N);
1050
1063
  };
1051
1064
  h._streamTag = Re;
1052
1065
  var s = function() {
1053
1066
  h.CLog("open ok, id:" + h.id + " stream:" + h._streamTag), e(), h._SO = 0;
1054
- }, q = S.Sync, ae = ++q.O, me = q.C;
1067
+ }, $ = S.Sync, ae = ++$.O, me = $.C;
1055
1068
  h._O = h._O_ = ae, h._SO = h._S;
1056
1069
  var be = function() {
1057
- if (me != q.C || !h._O) {
1070
+ if (me != $.C || !h._O) {
1058
1071
  var c = De("dFm8::open被取消");
1059
- return ae == q.O ? h.close() : c = De("VtJO::open被中断"), D(c), !0;
1072
+ return ae == $.O ? h.close() : c = De("VtJO::open被中断"), D(c), !0;
1060
1073
  }
1061
1074
  };
1062
1075
  if (!m) {
@@ -1069,7 +1082,7 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
1069
1082
  return;
1070
1083
  }
1071
1084
  if (b.sourceStream) {
1072
- if (h._streamTag = "set.sourceStream", !Z.GetContext()) {
1085
+ if (h._streamTag = "set.sourceStream", !V.GetContext()) {
1073
1086
  D(De("1iU7::不支持此浏览器从流中获取录音"));
1074
1087
  return;
1075
1088
  }
@@ -1094,21 +1107,21 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
1094
1107
  }
1095
1108
  /Permission|Allow/i.test(c) ? D(De("gyO5::用户拒绝了录音权限"), !0) : window.isSecureContext === !1 ? D(De("oWNo::浏览器禁止不安全页面录音,可开启https解决")) : /Found/i.test(c) ? D(N + De("jBa9::,无可用麦克风")) : D(N);
1096
1109
  };
1097
- if (Z.IsOpen()) {
1110
+ if (V.IsOpen()) {
1098
1111
  s();
1099
1112
  return;
1100
1113
  }
1101
- if (!Z.Support()) {
1114
+ if (!V.Support()) {
1102
1115
  pe("", De("COxc::此浏览器不支持录音"));
1103
1116
  return;
1104
1117
  }
1105
1118
  var se = b.runningContext;
1106
- se || (se = Y = Z.GetContext(!0));
1107
- var G = function(c) {
1119
+ se || (se = Y = V.GetContext(!0));
1120
+ var Z = function(c) {
1108
1121
  setTimeout(function() {
1109
1122
  c._call = {};
1110
- var N = Z.Stream;
1111
- N && (at(), c._call = N._call), Z.Stream = c, c._c = se, c._RC = b.runningContext, !be() && (Z.IsOpen() ? (N && h.CLog(De("upb8::发现同时多次调用open"), 1), ze(S, 1), s()) : D(De("Q1GA::录音功能无效:无音频流")));
1123
+ var N = V.Stream;
1124
+ N && (at(), c._call = N._call), V.Stream = c, c._c = se, c._RC = b.runningContext, !be() && (V.IsOpen() ? (N && h.CLog(De("upb8::发现同时多次调用open"), 1), ze(S, 1), s()) : D(De("Q1GA::录音功能无效:无音频流")));
1112
1125
  }, 100);
1113
1126
  }, ve = function(c) {
1114
1127
  var N = c.name || c.message || c.code + ":" + c;
@@ -1117,11 +1130,11 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
1117
1130
  we[Oe] = se[Oe];
1118
1131
  var U = { audio: we };
1119
1132
  try {
1120
- var te = Z.Scope[Re](U, G, ve);
1133
+ var te = V.Scope[Re](U, Z, ve);
1121
1134
  } catch (c) {
1122
- h.CLog(Re, 3, c), U = { audio: !0 }, te = Z.Scope[Re](U, G, ve);
1135
+ h.CLog(Re, 3, c), U = { audio: !0 }, te = V.Scope[Re](U, Z, ve);
1123
1136
  }
1124
- h.CLog(Re + "(" + JSON.stringify(U) + ") " + Ce(se) + De("RiWe::,未配置noiseSuppression和echoCancellation时浏览器可能会自动打开降噪和回声消除,移动端可能会降低系统播放音量(关闭录音后可恢复),请参阅文档中audioTrackSet配置") + "(" + ie + ") LM:" + K + " UA:" + navigator.userAgent), te && te.then && te.then(G)[Ze](ve);
1137
+ h.CLog(Re + "(" + JSON.stringify(U) + ") " + Ce(se) + De("RiWe::,未配置noiseSuppression和echoCancellation时浏览器可能会自动打开降噪和回声消除,移动端可能会降低系统播放音量(关闭录音后可恢复),请参阅文档中audioTrackSet配置") + "(" + ie + ") LM:" + K + " UA:" + navigator.userAgent), te && te.then && te.then(Z)[Ze](ve);
1125
1138
  },
1126
1139
  close: function(e) {
1127
1140
  e = e || p;
@@ -1144,7 +1157,7 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
1144
1157
  },
1145
1158
  envCheck: function(e) {
1146
1159
  var o, h = this, b = h.set, S = "CPU_BE";
1147
- if (!o && !Z[S] && typeof Int8Array == "function" && !new Int8Array(new Int32Array([1]).buffer)[0] && (R(S), o = De("Essp::不支持{1}架构", 0, S)), !o) {
1160
+ if (!o && !V[S] && typeof Int8Array == "function" && !new Int8Array(new Int32Array([1]).buffer)[0] && (R(S), o = De("Essp::不支持{1}架构", 0, S)), !o) {
1148
1161
  var Y = b.type, D = h[Y + "_envCheck"];
1149
1162
  b.takeoffEncodeChunk && (D ? e.canProcess || (o = De("7uMV::{1}环境不支持实时处理", 0, e.envName)) : o = De("2XBl::{1}类型不支持设置takeoffEncodeChunk", 0, Y) + (h[Y] ? "" : De("LG7e::(未加载编码器)"))), !o && D && (o = h[Y + "_envCheck"](e, b));
1150
1163
  }
@@ -1166,39 +1179,39 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
1166
1179
  h.state || h.CLog("envIn at state=0", 3);
1167
1180
  return;
1168
1181
  }
1169
- var Y = h[ke], D = e.length, s = Z.PowerLevel(o, D), q = h.buffers, ae = q.length;
1170
- q.push(e);
1171
- var me = q, be = ae, ne = Date.now(), ce = Math.round(D / Y * 1e3);
1182
+ var Y = h[ke], D = e.length, s = V.PowerLevel(o, D), $ = h.buffers, ae = $.length;
1183
+ $.push(e);
1184
+ var me = $, be = ae, ne = Date.now(), ce = Math.round(D / Y * 1e3);
1172
1185
  h.envInLast = ne, h.buffers.length == 1 && (h.envInFirst = ne - ce);
1173
1186
  var pe = h.envInFixTs;
1174
1187
  pe.splice(0, 0, { t: ne, d: ce });
1175
- for (var se = ne, G = 0, ve = 0; ve < pe.length; ve++) {
1188
+ for (var se = ne, Z = 0, ve = 0; ve < pe.length; ve++) {
1176
1189
  var we = pe[ve];
1177
1190
  if (ne - we.t > 3e3) {
1178
1191
  pe.length = ve;
1179
1192
  break;
1180
1193
  }
1181
- se = we.t, G += we.d;
1194
+ se = we.t, Z += we.d;
1182
1195
  }
1183
- var U = pe[1], te = ne - se, c = te - G;
1196
+ var U = pe[1], te = ne - se, c = te - Z;
1184
1197
  if (c > te / 3 && (U && te > 1e3 || pe.length >= 6)) {
1185
1198
  var N = ne - U.t - ce;
1186
1199
  if (N > ce / 5) {
1187
1200
  var P = !b.disableEnvInFix;
1188
1201
  if (h.CLog("[" + ne + "]" + ft.get(De(P ? "4Kfd::补偿{1}ms" : "bM5i::未补偿{1}ms", 1), [N]), 3), h.envInFix += N, P) {
1189
1202
  var T = new Int16Array(N * Y / 1e3);
1190
- D += T.length, q.push(T);
1203
+ D += T.length, $.push(T);
1191
1204
  }
1192
1205
  }
1193
1206
  }
1194
1207
  var oe = h.recSize, g = D, z = oe + g;
1195
1208
  if (h.recSize = z, S) {
1196
- var re = Z.SampleData(q, Y, b[Oe], S.chunkInfo);
1197
- S.chunkInfo = re, oe = S.pcmSize, g = re.data.length, z = oe + g, S.pcmSize = z, q = S.pcmDatas, ae = q.length, q.push(re.data), Y = re[Oe];
1209
+ var re = V.SampleData($, Y, b[Oe], S.chunkInfo);
1210
+ S.chunkInfo = re, oe = S.pcmSize, g = re.data.length, z = oe + g, S.pcmSize = z, $ = S.pcmDatas, ae = $.length, $.push(re.data), Y = re[Oe];
1198
1211
  }
1199
- var j = Math.round(z / Y * 1e3), ee = q.length, k = me.length, fe = function() {
1200
- for (var A = E ? 0 : -g, F = q[0] == null, y = ae; y < ee; y++) {
1201
- var f = q[y];
1212
+ var j = Math.round(z / Y * 1e3), ee = $.length, k = me.length, fe = function() {
1213
+ for (var A = E ? 0 : -g, F = $[0] == null, y = ae; y < ee; y++) {
1214
+ var f = $[y];
1202
1215
  f == null ? F = 1 : (A += f.length, S && f.length && h[b.type + "_encode"](S, f));
1203
1216
  }
1204
1217
  if (F && S) {
@@ -1206,24 +1219,24 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
1206
1219
  for (me[0] && (y = 0); y < k; y++)
1207
1220
  me[y] = null;
1208
1221
  }
1209
- F && (A = E ? g : 0, q[0] = null), S ? S.pcmSize += A : h.recSize += A;
1222
+ F && (A = E ? g : 0, $[0] = null), S ? S.pcmSize += A : h.recSize += A;
1210
1223
  }, E = 0, B = "rec.set.onProcess";
1211
1224
  try {
1212
- E = b.onProcess(q, s, j, Y, ae, fe);
1225
+ E = b.onProcess($, s, j, Y, ae, fe);
1213
1226
  } catch (A) {
1214
1227
  console.error(B + De("gFUF::回调出错是不允许的,需保证不会抛异常"), A);
1215
1228
  }
1216
1229
  var t = Date.now() - ne;
1217
1230
  if (t > 10 && h.envInFirst - ne > 1e3 && h.CLog(B + De("2ghS::低性能,耗时{1}ms", 0, t), 3), E === !0) {
1218
1231
  for (var l = 0, ve = ae; ve < ee; ve++)
1219
- q[ve] == null ? l = 1 : q[ve] = new Int16Array(0);
1232
+ $[ve] == null ? l = 1 : $[ve] = new Int16Array(0);
1220
1233
  l ? h.CLog(De("ufqH::未进入异步前不能清除buffers"), 3) : S ? S.pcmSize -= g : h.recSize -= g;
1221
1234
  } else
1222
1235
  fe();
1223
1236
  },
1224
1237
  start: function() {
1225
1238
  var e = this, o = 1;
1226
- if (e.set.sourceStream ? e.Stream || (o = 0) : Z.IsOpen() || (o = 0), !o) {
1239
+ if (e.set.sourceStream ? e.Stream || (o = 0) : V.IsOpen() || (o = 0), !o) {
1227
1240
  e.CLog(De("6WmN::start失败:未open"), 1);
1228
1241
  return;
1229
1242
  }
@@ -1263,12 +1276,12 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
1263
1276
  stop: function(e, o, h) {
1264
1277
  var b = this, S = b.set, Y, D = b.envInLast - b.envInFirst, s = D && b.buffers.length;
1265
1278
  b.CLog(De("Xq4s::stop 和start时差:") + (D ? D + "ms " + De("3CQP::补偿:") + b.envInFix + "ms envIn:" + s + " fps:" + (s / D * 1e3).toFixed(1) : "-") + " stream:" + b._streamTag + " (" + ie + ") LM:" + K);
1266
- var q = function() {
1279
+ var $ = function() {
1267
1280
  b._stop(), h && b.close();
1268
1281
  }, ae = function(we) {
1269
- b.CLog(De("u8JG::结束录音失败:") + we, 1), o && o(we), q();
1282
+ b.CLog(De("u8JG::结束录音失败:") + we, 1), o && o(we), $();
1270
1283
  }, me = function(we, U, te) {
1271
- var c = "blob", N = "arraybuffer", P = "dataType", T = "DefaultDataType", oe = b[P] || Z[T] || c, g = P + "=" + oe, z = we instanceof ArrayBuffer, re = 0, j = z ? we.byteLength : we.size;
1284
+ var c = "blob", N = "arraybuffer", P = "dataType", T = "DefaultDataType", oe = b[P] || V[T] || c, g = P + "=" + oe, z = we instanceof ArrayBuffer, re = 0, j = z ? we.byteLength : we.size;
1272
1285
  if (oe == N ? z || (re = 1) : oe == c ? typeof Blob != "function" ? re = De.G("NonBrowser-1", [g]) + De("1skY::,请设置{1}", 0, ye + "." + T + '="' + N + '"') : (z && (we = new Blob([we], { type: U })), we instanceof Blob || (re = 1), U = we.type || U) : re = De.G("NotSupport-1", [g]), b.CLog(De("Wv7l::结束录音 编码花{1}ms 音频时长{2}ms 文件大小{3}b", 0, Date.now() - Y, te, j) + " " + g + "," + U), re) {
1273
1286
  ae(re != 1 ? re : De("Vkbd::{1}编码器返回的不是{2}", 0, S.type, oe) + ", " + g);
1274
1287
  return;
@@ -1279,7 +1292,7 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
1279
1292
  ae(De("Sz2H::生成的{1}无效", 0, S.type));
1280
1293
  return;
1281
1294
  }
1282
- e && e(we, te, U), q();
1295
+ e && e(we, te, U), $();
1283
1296
  };
1284
1297
  if (!b.isMock) {
1285
1298
  var be = b.state == 3;
@@ -1317,11 +1330,11 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
1317
1330
  ae(De("xkKd::音频buffers被释放"));
1318
1331
  return;
1319
1332
  }
1320
- var se = Z.SampleData(b.buffers, b[ke], S[Oe]);
1333
+ var se = V.SampleData(b.buffers, b[ke], S[Oe]);
1321
1334
  S[Oe] = se[Oe];
1322
- var G = se.data, ve = Math.round(G.length / S[Oe] * 1e3);
1323
- b.CLog(De("CxeT::采样:{1} 花:{2}ms", 0, ne + "->" + G.length, Date.now() - Y)), setTimeout(function() {
1324
- Y = Date.now(), b[S.type](G, function(we, U) {
1335
+ var Z = se.data, ve = Math.round(Z.length / S[Oe] * 1e3);
1336
+ b.CLog(De("CxeT::采样:{1} 花:{2}ms", 0, ne + "->" + Z.length, Date.now() - Y)), setTimeout(function() {
1337
+ Y = Date.now(), b[S.type](Z, function(we, U) {
1325
1338
  me(we, U, ve);
1326
1339
  }, function(we) {
1327
1340
  ae(we);
@@ -1338,28 +1351,28 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
1338
1351
  if (_t(D, b), Mt(D, b), !rt(_t(D, b), [24, 83, 128, 103]))
1339
1352
  return;
1340
1353
  for (_t(D, b); b[0] < D.length; ) {
1341
- var s = _t(D, b), q = Mt(D, b), ae = [0], me = 0;
1342
- if (!q)
1354
+ var s = _t(D, b), $ = Mt(D, b), ae = [0], me = 0;
1355
+ if (!$)
1343
1356
  return;
1344
1357
  if (rt(s, [22, 84, 174, 107])) {
1345
- for (; ae[0] < q.length; ) {
1346
- var be = _t(q, ae), ne = Mt(q, ae), ce = [0], pe = { channels: 0, sampleRate: 0 };
1358
+ for (; ae[0] < $.length; ) {
1359
+ var be = _t($, ae), ne = Mt($, ae), ce = [0], pe = { channels: 0, sampleRate: 0 };
1347
1360
  if (rt(be, [174]))
1348
1361
  for (; ce[0] < ne.length; ) {
1349
- var se = _t(ne, ce), G = Mt(ne, ce), ve = [0];
1362
+ var se = _t(ne, ce), Z = Mt(ne, ce), ve = [0];
1350
1363
  if (rt(se, [215])) {
1351
- var we = qe(G);
1364
+ var we = qe(Z);
1352
1365
  pe.number = we, h[we] = pe;
1353
1366
  } else if (rt(se, [131])) {
1354
- var we = qe(G);
1367
+ var we = qe(Z);
1355
1368
  we == 1 ? pe.type = "video" : we == 2 ? (pe.type = "audio", me || (o.track0 = pe), pe.idx = me++) : pe.type = "Type-" + we;
1356
1369
  } else if (rt(se, [134])) {
1357
- for (var U = "", te = 0; te < G.length; te++)
1358
- U += String.fromCharCode(G[te]);
1370
+ for (var U = "", te = 0; te < Z.length; te++)
1371
+ U += String.fromCharCode(Z[te]);
1359
1372
  pe.codec = U;
1360
1373
  } else if (rt(se, [225]))
1361
- for (; ve[0] < G.length; ) {
1362
- var c = _t(G, ve), N = Mt(G, ve);
1374
+ for (; ve[0] < Z.length; ) {
1375
+ var c = _t(Z, ve), N = Mt(Z, ve);
1363
1376
  if (rt(c, [181])) {
1364
1377
  var we = 0, P = new Uint8Array(N.reverse()).buffer;
1365
1378
  N.length == 4 ? we = new Float32Array(P)[0] : N.length == 8 ? we = new Float64Array(P)[0] : Fe("WebM Track !Float", 1, N), pe[Oe] = Math.round(we);
@@ -1427,11 +1440,11 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
1427
1440
  if (!(b >= e.length)) {
1428
1441
  var S = e[b], Y = ("0000000" + S.toString(2)).substr(-8), D = /^(0*1)(\d*)$/.exec(Y);
1429
1442
  if (D) {
1430
- var s = D[1].length, q = [];
1443
+ var s = D[1].length, $ = [];
1431
1444
  if (!(b + s > e.length)) {
1432
1445
  for (var ae = 0; ae < s; ae++)
1433
- q[ae] = e[b], b++;
1434
- return h && (q[0] = parseInt(D[2] || "0", 2)), o[0] = b, q;
1446
+ $[ae] = e[b], b++;
1447
+ return h && ($[0] = parseInt(D[2] || "0", 2)), o[0] = b, $;
1435
1448
  }
1436
1449
  }
1437
1450
  }
@@ -1447,7 +1460,7 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
1447
1460
  }
1448
1461
  return o[0] = S, Y;
1449
1462
  }
1450
- }, ft = Z.i18n = {
1463
+ }, ft = V.i18n = {
1451
1464
  lang: "zh-CN",
1452
1465
  alias: { "zh-CN": "zh", "en-US": "en" },
1453
1466
  locales: {},
@@ -1460,8 +1473,8 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
1460
1473
  throw new Error(h + "set.lang?");
1461
1474
  var Y = ft.locales[S];
1462
1475
  Y || (Y = {}, ft.locales[S] = Y);
1463
- for (var D = /^([\w\-]+):/, s, q = 0; q < o.length; q++) {
1464
- var me = o[q];
1476
+ for (var D = /^([\w\-]+):/, s, $ = 0; $ < o.length; $++) {
1477
+ var me = o[$];
1465
1478
  if (s = D.exec(me), !s) {
1466
1479
  Fe(h + "'key:'? " + me, 3, e);
1467
1480
  continue;
@@ -1485,73 +1498,73 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
1485
1498
  },
1486
1499
  v_T: function() {
1487
1500
  for (var e = arguments, o = "", h = [], b = 0, S = ye + ".i18n.$T:", Y = /^([\w\-]*):/, D, s = 0; s < e.length; s++) {
1488
- var q = e[s];
1501
+ var $ = e[s];
1489
1502
  if (s == 0) {
1490
- if (D = Y.exec(q), o = D && D[1], !o)
1503
+ if (D = Y.exec($), o = D && D[1], !o)
1491
1504
  throw new Error(S + "0 'key:'?");
1492
- q = q.substr(o.length + 1);
1505
+ $ = $.substr(o.length + 1);
1493
1506
  }
1494
1507
  if (b === -1)
1495
- h.push(q);
1508
+ h.push($);
1496
1509
  else {
1497
1510
  if (b)
1498
1511
  throw new Error(S + " bad args");
1499
- if (q === 0)
1512
+ if ($ === 0)
1500
1513
  b = -1;
1501
- else if ($(q)) {
1502
- if (q < 1)
1514
+ else if (q($)) {
1515
+ if ($ < 1)
1503
1516
  throw new Error(S + " bad args");
1504
- b = q;
1517
+ b = $;
1505
1518
  } else {
1506
1519
  var ae = s == 1 ? "en" : s ? "" : "zh";
1507
- if (D = Y.exec(q), D && (ae = D[1] || ae, q = q.substr(D[1].length + 1)), !D || !ae)
1520
+ if (D = Y.exec($), D && (ae = D[1] || ae, $ = $.substr(D[1].length + 1)), !D || !ae)
1508
1521
  throw new Error(S + s + " 'lang:'?");
1509
- ft.put({ lang: ae, overwrite: !1 }, [o + ":" + q]);
1522
+ ft.put({ lang: ae, overwrite: !1 }, [o + ":" + $]);
1510
1523
  }
1511
1524
  }
1512
1525
  }
1513
1526
  return o ? b > 0 ? o : ft.v_G(o, h) : "";
1514
1527
  }
1515
1528
  }, De = ft.$T;
1516
- De.G = ft.get, De("NonBrowser-1::非浏览器环境,不支持{1}", 1), De("IllegalArgs-1::参数错误:{1}", 1), De("NeedImport-2::调用{1}需要先导入{2}", 2), De("NotSupport-1::不支持:{1}", 1), Z.TrafficImgUrl = "//ia.51.la/go1?id=20469973&pvFlag=1";
1517
- var R = Z.Traffic = function(e) {
1529
+ De.G = ft.get, De("NonBrowser-1::非浏览器环境,不支持{1}", 1), De("IllegalArgs-1::参数错误:{1}", 1), De("NeedImport-2::调用{1}需要先导入{2}", 2), De("NotSupport-1::不支持:{1}", 1), V.TrafficImgUrl = "//ia.51.la/go1?id=20469973&pvFlag=1";
1530
+ var R = V.Traffic = function(e) {
1518
1531
  if (m) {
1519
1532
  e = e ? "/" + ye + "/Report/" + e : "";
1520
- var o = Z.TrafficImgUrl;
1533
+ var o = V.TrafficImgUrl;
1521
1534
  if (o) {
1522
- var h = Z.Traffic, b = /^(https?:..[^\/#]*\/?)[^#]*/i.exec(location.href) || [], S = b[1] || "http://file/", Y = (b[0] || S) + e;
1535
+ var h = V.Traffic, b = /^(https?:..[^\/#]*\/?)[^#]*/i.exec(location.href) || [], S = b[1] || "http://file/", Y = (b[0] || S) + e;
1523
1536
  if (o.indexOf("//") == 0 && (/^https:/i.test(Y) ? o = "https:" + o : o = "http:" + o), e && (o = o + "&cu=" + encodeURIComponent(S + e)), !h[Y]) {
1524
1537
  h[Y] = 1;
1525
1538
  var D = new Image();
1526
- D.src = o, Fe("Traffic Analysis Image: " + (e || ye + ".TrafficImgUrl=" + Z.TrafficImgUrl));
1539
+ D.src = o, Fe("Traffic Analysis Image: " + (e || ye + ".TrafficImgUrl=" + V.TrafficImgUrl));
1527
1540
  }
1528
1541
  }
1529
1542
  }
1530
1543
  };
1531
- ue && (Fe(De("8HO5::覆盖导入{1}", 0, ye), 1), ue.Destroy()), r[ye] = Z;
1544
+ ue && (Fe(De("8HO5::覆盖导入{1}", 0, ye), 1), ue.Destroy()), r[ye] = V;
1532
1545
  });
1533
1546
  })(ea);
1534
1547
  const a0 = s0;
1535
1548
  (function(_) {
1536
- var r = typeof window == "object" && !!window.document, m = r ? window : Object, p = m.Recorder, $ = p.i18n;
1537
- _(p, $, $.$T, r);
1549
+ var r = typeof window == "object" && !!window.document, m = r ? window : Object, p = m.Recorder, q = p.i18n;
1550
+ _(p, q, q.$T, r);
1538
1551
  })(function(_, r, m, p) {
1539
- var $ = "48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000", Z = "8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160, 192, 224, 256, 320";
1552
+ var q = "48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000", V = "8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160, 192, 224, 256, 320";
1540
1553
  _.prototype.enc_mp3 = {
1541
1554
  stable: !0,
1542
1555
  takeEC: "full",
1543
1556
  getTestMsg: function() {
1544
- return m("Zm7L::采样率范围:{1};比特率范围:{2}(不同比特率支持的采样率范围不同,小于32kbps时采样率需小于32000)", 0, $, Z);
1557
+ return m("Zm7L::采样率范围:{1};比特率范围:{2}(不同比特率支持的采样率范围不同,小于32kbps时采样率需小于32000)", 0, q, V);
1545
1558
  }
1546
1559
  };
1547
1560
  var K = function(ue) {
1548
1561
  var ge = ue.bitRate, Ce = ue.sampleRate, Ye = Ce;
1549
- if ((" " + Z + ",").indexOf(" " + ge + ",") == -1 && _.CLog(m("eGB9::{1}不在mp3支持的取值范围:{2}", 0, "bitRate=" + ge, Z), 3), (" " + $ + ",").indexOf(" " + Ce + ",") == -1) {
1550
- for (var de = $.split(", "), ze = [], Be = 0; Be < de.length; Be++)
1562
+ if ((" " + V + ",").indexOf(" " + ge + ",") == -1 && _.CLog(m("eGB9::{1}不在mp3支持的取值范围:{2}", 0, "bitRate=" + ge, V), 3), (" " + q + ",").indexOf(" " + Ce + ",") == -1) {
1563
+ for (var de = q.split(", "), ze = [], Be = 0; Be < de.length; Be++)
1551
1564
  ze.push({ v: +de[Be], s: Math.abs(de[Be] - Ce) });
1552
1565
  ze.sort(function($e, Ke) {
1553
1566
  return $e.s - Ke.s;
1554
- }), Ye = ze[0].v, ue.sampleRate = Ye, _.CLog(m("zLTa::sampleRate已更新为{1},因为{2}不在mp3支持的取值范围:{3}", 0, Ye, Ce, $), 3);
1567
+ }), Ye = ze[0].v, ue.sampleRate = Ye, _.CLog(m("zLTa::sampleRate已更新为{1},因为{2}不在mp3支持的取值范围:{3}", 0, Ye, Ce, q), 3);
1555
1568
  }
1556
1569
  }, ie = function() {
1557
1570
  return m.G("NeedImport-2", ["mp3.js", "src/engine/mp3-engine.js"]);
@@ -1583,13 +1596,13 @@ const a0 = s0;
1583
1596
  console.error(_t), Ce("MP3 Encoder: " + _t.message);
1584
1597
  return;
1585
1598
  }
1586
- var V = Le.length;
1587
- if (V > 0) {
1588
- if (Je + V > at.length) {
1589
- var pt = new Int8Array(at.length + Math.max(5e5, V));
1599
+ var W = Le.length;
1600
+ if (W > 0) {
1601
+ if (Je + W > at.length) {
1602
+ var pt = new Int8Array(at.length + Math.max(5e5, W));
1590
1603
  pt.set(at.subarray(0, Je)), at = pt;
1591
1604
  }
1592
- at.set(Le, Je), Je += V;
1605
+ at.set(Le, Je), Je += W;
1593
1606
  }
1594
1607
  if (Fe < ze)
1595
1608
  Fe += Ke, setTimeout(Xe);
@@ -1611,9 +1624,9 @@ const a0 = s0;
1611
1624
  };
1612
1625
  var ke = { id: 0 }, Oe = function(ue, ge) {
1613
1626
  var Ce = function(Xe) {
1614
- var Le = Xe.data, V = ze.wkScope.wk_ctxs, pt = ze.wkScope.wk_lame, rt = ze.wkScope.wk_mp3TrimFix, qe = V[Le.id];
1627
+ var Le = Xe.data, W = ze.wkScope.wk_ctxs, pt = ze.wkScope.wk_lame, rt = ze.wkScope.wk_mp3TrimFix, qe = W[Le.id];
1615
1628
  if (Le.action == "init")
1616
- V[Le.id] = {
1629
+ W[Le.id] = {
1617
1630
  sampleRate: Le.sampleRate,
1618
1631
  bitRate: Le.bitRate,
1619
1632
  takeoff: Le.takeoff,
@@ -1634,7 +1647,7 @@ const a0 = s0;
1634
1647
  };
1635
1648
  switch (Le.action) {
1636
1649
  case "stop":
1637
- qe.encObj = null, delete V[Le.id];
1650
+ qe.encObj = null, delete W[Le.id];
1638
1651
  break;
1639
1652
  case "encode":
1640
1653
  qe.pcmSize += Le.pcm.length;
@@ -1670,10 +1683,10 @@ const a0 = s0;
1670
1683
  }
1671
1684
  }, Ye = function(Xe) {
1672
1685
  Be.onmessage = function(Le) {
1673
- var V = Le;
1674
- Xe && (V = Le.data);
1675
- var pt = ke[V.id];
1676
- pt && (V.action == "takeoff" ? pt.set.takeoffEncodeChunk(new Uint8Array(V.chunk.buffer)) : (pt.call && pt.call(V), pt.call = null));
1686
+ var W = Le;
1687
+ Xe && (W = Le.data);
1688
+ var pt = ke[W.id];
1689
+ pt && (W.action == "takeoff" ? pt.set.takeoffEncodeChunk(new Uint8Array(W.chunk.buffer)) : (pt.call && pt.call(W), pt.call = null));
1677
1690
  };
1678
1691
  }, de = function() {
1679
1692
  var Xe = { worker: Be, set: ue };
@@ -1764,15 +1777,15 @@ const a0 = s0;
1764
1777
  ][$e == 1 ? 1 : 0][Ce(Be.substr(0, 4), 2)];
1765
1778
  if (!$e || !Ke || !Je || !at)
1766
1779
  return null;
1767
- for (var Fe = Math.round(ge * 8 / Je), Xe = Ke == 1 ? 384 : Ke == 2 || $e == 1 ? 1152 : 576, Le = Xe / at * 1e3, V = Math.floor(Xe * Je / 8 / at * 1e3), pt = 0, rt = 0, qe = 0; qe < ue.length; qe++) {
1780
+ for (var Fe = Math.round(ge * 8 / Je), Xe = Ke == 1 ? 384 : Ke == 2 || $e == 1 ? 1152 : 576, Le = Xe / at * 1e3, W = Math.floor(Xe * Je / 8 / at * 1e3), pt = 0, rt = 0, qe = 0; qe < ue.length; qe++) {
1768
1781
  var _t = ue[qe];
1769
- if (rt += _t.byteLength, rt >= V + 3) {
1770
- var Mt = new Uint8Array(_t), ft = _t.byteLength - (rt - (V + 3) + 1), De = de(ft, Mt);
1782
+ if (rt += _t.byteLength, rt >= W + 3) {
1783
+ var Mt = new Uint8Array(_t), ft = _t.byteLength - (rt - (W + 3) + 1), De = de(ft, Mt);
1771
1784
  pt = De.charAt(6) == "1";
1772
1785
  break;
1773
1786
  }
1774
1787
  }
1775
- return pt && V++, {
1788
+ return pt && W++, {
1776
1789
  version: $e,
1777
1790
  layer: Ke,
1778
1791
  sampleRate: at,
@@ -1780,7 +1793,7 @@ const a0 = s0;
1780
1793
  duration: Fe,
1781
1794
  size: ge,
1782
1795
  hasPadding: pt,
1783
- frameSize: V,
1796
+ frameSize: W,
1784
1797
  frameDurationFloat: Le
1785
1798
  //每帧时长,含小数 ms
1786
1799
  };
@@ -1831,10 +1844,10 @@ const a0 = s0;
1831
1844
  }, p = function(c) {
1832
1845
  throw new Error("abort(" + c + ")");
1833
1846
  };
1834
- function $(c) {
1847
+ function q(c) {
1835
1848
  return new Int8Array(c);
1836
1849
  }
1837
- function Z(c) {
1850
+ function V(c) {
1838
1851
  return new Int16Array(c);
1839
1852
  }
1840
1853
  function K(c) {
@@ -1866,7 +1879,7 @@ const a0 = s0;
1866
1879
  }
1867
1880
  function Oe(c) {
1868
1881
  if (c.length == 1)
1869
- return Z(c[0]);
1882
+ return V(c[0]);
1870
1883
  var N = c[0];
1871
1884
  c = c.slice(1);
1872
1885
  for (var P = [], T = 0; T < N; T++)
@@ -1990,16 +2003,16 @@ const a0 = s0;
1990
2003
  d = d >> 1;
1991
2004
  var i = d % 2;
1992
2005
  for (d = d >> 1; d-- != 0; ) {
1993
- var W, L, Q, le, _e, Me, je, He;
1994
- W = M[x++] * v, L = M[x++] * v, _e = 0 | W, Q = M[x++] * v, Me = 0 | L, le = M[x++] * v, je = 0 | Q, W += c.adj43[_e], He = 0 | le, L += c.adj43[Me], C[a++] = 0 | W, Q += c.adj43[je], C[a++] = 0 | L, le += c.adj43[He], C[a++] = 0 | Q, C[a++] = 0 | le;
2006
+ var G, L, Q, le, _e, Me, je, He;
2007
+ G = M[x++] * v, L = M[x++] * v, _e = 0 | G, Q = M[x++] * v, Me = 0 | L, le = M[x++] * v, je = 0 | Q, G += c.adj43[_e], He = 0 | le, L += c.adj43[Me], C[a++] = 0 | G, Q += c.adj43[je], C[a++] = 0 | L, le += c.adj43[He], C[a++] = 0 | Q, C[a++] = 0 | le;
1995
2008
  }
1996
2009
  if (i != 0) {
1997
- var W, L, _e, Me;
1998
- W = M[x++] * v, L = M[x++] * v, _e = 0 | W, Me = 0 | L, W += c.adj43[_e], L += c.adj43[Me], C[a++] = 0 | W, C[a++] = 0 | L;
2010
+ var G, L, _e, Me;
2011
+ G = M[x++] * v, L = M[x++] * v, _e = 0 | G, Me = 0 | L, G += c.adj43[_e], L += c.adj43[Me], C[a++] = 0 | G, C[a++] = 0 | L;
1999
2012
  }
2000
2013
  }
2001
2014
  function g(d, v, M, x, C) {
2002
- var a, i, W = 0, L, Q = 0, le = 0, _e = 0, Me = v, je = 0, He = Me, Ue = 0, ht = d, vt = 0;
2015
+ var a, i, G = 0, L, Q = 0, le = 0, _e = 0, Me = v, je = 0, He = Me, Ue = 0, ht = d, vt = 0;
2003
2016
  for (L = C != null && x.global_gain == C.global_gain, x.block_type == s.SHORT_TYPE ? i = 38 : i = 21, a = 0; a <= i; a++) {
2004
2017
  var ot = -1;
2005
2018
  if ((L || x.block_type == s.NORM_TYPE) && (ot = x.global_gain - (x.scalefac[a] + (x.preflag != 0 ? c.pretab[a] : 0) << x.scalefac_scale + 1) - x.subblock_gain[x.window[a]] * 8), L && C.step[a] == ot)
@@ -2013,9 +2026,9 @@ const a0 = s0;
2013
2026
  ), Q = 0), le != 0 && p();
2014
2027
  else {
2015
2028
  var ct = x.width[a];
2016
- if (W + x.width[a] > x.max_nonzero_coeff) {
2029
+ if (G + x.width[a] > x.max_nonzero_coeff) {
2017
2030
  var gt;
2018
- gt = x.max_nonzero_coeff - W + 1, Ze.fill(v, x.max_nonzero_coeff, 576, 0), ct = gt, ct < 0 && (ct = 0), a = i + 1;
2031
+ gt = x.max_nonzero_coeff - G + 1, Ze.fill(v, x.max_nonzero_coeff, 576, 0), ct = gt, ct < 0 && (ct = 0), a = i + 1;
2019
2032
  }
2020
2033
  if (Q == 0 && le == 0 && (He = Me, Ue = je, ht = d, vt = _e), C != null && C.sfb_count1 > 0 && a >= C.sfb_count1 && C.step[a] > 0 && ot >= C.step[a] ? (Q != 0 && (oe(
2021
2034
  Q,
@@ -2036,7 +2049,7 @@ const a0 = s0;
2036
2049
  break;
2037
2050
  }
2038
2051
  }
2039
- a <= i && (je += x.width[a], _e += x.width[a], W += x.width[a]);
2052
+ a <= i && (je += x.width[a], _e += x.width[a], G += x.width[a]);
2040
2053
  }
2041
2054
  Q != 0 && (oe(
2042
2055
  Q,
@@ -2056,15 +2069,15 @@ const a0 = s0;
2056
2069
  return x < C && (x = C), x;
2057
2070
  }
2058
2071
  function re(d, v, M, x, C, a) {
2059
- var i = V.ht[x].xlen * 65536 + V.ht[C].xlen, W = 0, L;
2072
+ var i = W.ht[x].xlen * 65536 + W.ht[C].xlen, G = 0, L;
2060
2073
  do {
2061
2074
  var Q = d[v++], le = d[v++];
2062
- Q != 0 && (Q > 14 && (Q = 15, W += i), Q *= 16), le != 0 && (le > 14 && (le = 15, W += i), Q += le), W += V.largetbl[Q];
2075
+ Q != 0 && (Q > 14 && (Q = 15, G += i), Q *= 16), le != 0 && (le > 14 && (le = 15, G += i), Q += le), G += W.largetbl[Q];
2063
2076
  } while (v < M);
2064
- return L = W & 65535, W >>= 16, W > L && (W = L, x = C), a.bits += W, x;
2077
+ return L = G & 65535, G >>= 16, G > L && (G = L, x = C), a.bits += G, x;
2065
2078
  }
2066
2079
  function j(d, v, M, x) {
2067
- var C = 0, a = V.ht[1].hlen;
2080
+ var C = 0, a = W.ht[1].hlen;
2068
2081
  do {
2069
2082
  var i = d[v + 0] * 2 + d[v + 1];
2070
2083
  v += 2, C += a[i];
@@ -2072,22 +2085,22 @@ const a0 = s0;
2072
2085
  return x.bits += C, 1;
2073
2086
  }
2074
2087
  function ee(d, v, M, x, C) {
2075
- var a = 0, i, W = V.ht[x].xlen, L;
2076
- x == 2 ? L = V.table23 : L = V.table56;
2088
+ var a = 0, i, G = W.ht[x].xlen, L;
2089
+ x == 2 ? L = W.table23 : L = W.table56;
2077
2090
  do {
2078
- var Q = d[v + 0] * W + d[v + 1];
2091
+ var Q = d[v + 0] * G + d[v + 1];
2079
2092
  v += 2, a += L[Q];
2080
2093
  } while (v < M);
2081
2094
  return i = a & 65535, a >>= 16, a > i && (a = i, x++), C.bits += a, x;
2082
2095
  }
2083
2096
  function k(d, v, M, x, C) {
2084
- var a = 0, i = 0, W = 0, L = V.ht[x].xlen, Q = V.ht[x].hlen, le = V.ht[x + 1].hlen, _e = V.ht[x + 2].hlen;
2097
+ var a = 0, i = 0, G = 0, L = W.ht[x].xlen, Q = W.ht[x].hlen, le = W.ht[x + 1].hlen, _e = W.ht[x + 2].hlen;
2085
2098
  do {
2086
2099
  var Me = d[v + 0] * L + d[v + 1];
2087
- v += 2, a += Q[Me], i += le[Me], W += _e[Me];
2100
+ v += 2, a += Q[Me], i += le[Me], G += _e[Me];
2088
2101
  } while (v < M);
2089
2102
  var je = x;
2090
- return a > i && (a = i, je++), a > W && (a = W, je = x + 2), C.bits += a, je;
2103
+ return a > i && (a = i, je++), a > G && (a = G, je = x + 2), C.bits += a, je;
2091
2104
  }
2092
2105
  var fe = [
2093
2106
  1,
@@ -2144,10 +2157,10 @@ const a0 = s0;
2144
2157
  default:
2145
2158
  C > e.IXMAX_VAL && p(), C -= 15;
2146
2159
  var a;
2147
- for (a = 24; a < 32 && !(V.ht[a].linmax >= C); a++)
2160
+ for (a = 24; a < 32 && !(W.ht[a].linmax >= C); a++)
2148
2161
  ;
2149
2162
  var i;
2150
- for (i = a - 8; i < 24 && !(V.ht[i].linmax >= C); i++)
2163
+ for (i = a - 8; i < 24 && !(W.ht[i].linmax >= C); i++)
2151
2164
  ;
2152
2165
  return re(d, v, M, i, a, x);
2153
2166
  }
@@ -2158,10 +2171,10 @@ const a0 = s0;
2158
2171
  ;
2159
2172
  v.count1 = C;
2160
2173
  for (var a = 0, i = 0; C > 3; C -= 4) {
2161
- var W;
2174
+ var G;
2162
2175
  if (((x[C - 1] | x[C - 2] | x[C - 3] | x[C - 4]) & 2147483647) > 1)
2163
2176
  break;
2164
- W = ((x[C - 4] * 2 + x[C - 3]) * 2 + x[C - 2]) * 2 + x[C - 1], a += V.t32l[W], i += V.t33l[W];
2177
+ G = ((x[C - 4] * 2 + x[C - 3]) * 2 + x[C - 2]) * 2 + x[C - 1], a += W.t32l[G], i += W.t33l[G];
2165
2178
  }
2166
2179
  var L = a;
2167
2180
  if (v.count1table_select = 0, a > i && (L = i, v.count1table_select = 1), v.count1bits = L, v.big_values = C, C == 0)
@@ -2194,17 +2207,17 @@ const a0 = s0;
2194
2207
  return M.xrpow_max > a ? e.LARGE_BITS : (g(v, C, c.IPOW20(M.global_gain), M, x), d.substep_shaping & 2 && p(), this.noquant_count_bits(d, M, x));
2195
2208
  };
2196
2209
  function B(d, v, M, x, C, a, i) {
2197
- for (var W = v.big_values, L = 0; L <= 7 + 15; L++)
2210
+ for (var G = v.big_values, L = 0; L <= 7 + 15; L++)
2198
2211
  x[L] = e.LARGE_BITS;
2199
2212
  for (var L = 0; L < 16; L++) {
2200
2213
  var Q = d.scalefac_band.l[L + 1];
2201
- if (Q >= W)
2214
+ if (Q >= G)
2202
2215
  break;
2203
2216
  var le = 0, _e = new N(le), Me = E(M, 0, Q, _e);
2204
2217
  le = _e.bits;
2205
2218
  for (var je = 0; je < 8; je++) {
2206
2219
  var He = d.scalefac_band.l[L + je + 2];
2207
- if (He >= W)
2220
+ if (He >= G)
2208
2221
  break;
2209
2222
  var Ue = le;
2210
2223
  _e = new N(Ue);
@@ -2213,7 +2226,7 @@ const a0 = s0;
2213
2226
  }
2214
2227
  }
2215
2228
  }
2216
- function t(d, v, M, x, C, a, i, W) {
2229
+ function t(d, v, M, x, C, a, i, G) {
2217
2230
  for (var L = v.big_values, Q = 2; Q < s.SBMAX_l + 1; Q++) {
2218
2231
  var le = d.scalefac_band.l[Q];
2219
2232
  if (le >= L)
@@ -2222,13 +2235,13 @@ const a0 = s0;
2222
2235
  if (M.part2_3_length <= _e)
2223
2236
  break;
2224
2237
  var Me = new N(_e), je = E(x, le, L, Me);
2225
- _e = Me.bits, !(M.part2_3_length <= _e) && (M.assign(v), M.part2_3_length = _e, M.region0_count = a[Q - 2], M.region1_count = Q - 2 - a[Q - 2], M.table_select[0] = i[Q - 2], M.table_select[1] = W[Q - 2], M.table_select[2] = je);
2238
+ _e = Me.bits, !(M.part2_3_length <= _e) && (M.assign(v), M.part2_3_length = _e, M.region0_count = a[Q - 2], M.region1_count = Q - 2 - a[Q - 2], M.table_select[0] = i[Q - 2], M.table_select[1] = G[Q - 2], M.table_select[2] = je);
2226
2239
  }
2227
2240
  }
2228
2241
  this.best_huffman_divide = function(d, v) {
2229
- var M = new h(), x = v.l3_enc, C = K(7 + 15 + 1), a = K(7 + 15 + 1), i = K(7 + 15 + 1), W = K(7 + 15 + 1);
2242
+ var M = new h(), x = v.l3_enc, C = K(7 + 15 + 1), a = K(7 + 15 + 1), i = K(7 + 15 + 1), G = K(7 + 15 + 1);
2230
2243
  if (!(v.block_type == s.SHORT_TYPE && d.mode_gr == 1)) {
2231
- M.assign(v), v.block_type == s.NORM_TYPE && (B(d, v, x, C, a, i, W), t(
2244
+ M.assign(v), v.block_type == s.NORM_TYPE && (B(d, v, x, C, a, i, G), t(
2232
2245
  d,
2233
2246
  M,
2234
2247
  v,
@@ -2236,14 +2249,14 @@ const a0 = s0;
2236
2249
  C,
2237
2250
  a,
2238
2251
  i,
2239
- W
2252
+ G
2240
2253
  ));
2241
2254
  var L = M.big_values;
2242
2255
  if (!(L == 0 || (x[L - 2] | x[L - 1]) > 1) && (L = v.count1 + 2, !(L > 576))) {
2243
2256
  M.assign(v), M.count1 = L;
2244
2257
  for (var Q = 0, le = 0; L > M.big_values; L -= 4) {
2245
2258
  var _e = ((x[L - 4] * 2 + x[L - 3]) * 2 + x[L - 2]) * 2 + x[L - 1];
2246
- Q += V.t32l[_e], le += V.t33l[_e];
2259
+ Q += W.t32l[_e], le += W.t33l[_e];
2247
2260
  }
2248
2261
  if (M.big_values = L, M.count1table_select = 0, Q > le && (Q = le, M.count1table_select = 1), M.count1bits = Q, M.block_type == s.NORM_TYPE)
2249
2262
  t(
@@ -2254,7 +2267,7 @@ const a0 = s0;
2254
2267
  C,
2255
2268
  a,
2256
2269
  i,
2257
- W
2270
+ G
2258
2271
  );
2259
2272
  else {
2260
2273
  if (M.part2_3_length = Q, Q = d.scalefac_band.l[7 + 1], Q > L && (Q = L), Q > 0) {
@@ -2273,31 +2286,31 @@ const a0 = s0;
2273
2286
  var l = [1, 1, 1, 1, 8, 2, 2, 2, 4, 4, 4, 8, 8, 8, 16, 16], A = [1, 2, 4, 8, 1, 2, 4, 8, 2, 4, 8, 2, 4, 8, 4, 8], F = [0, 0, 0, 0, 3, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4], y = [0, 1, 2, 3, 0, 1, 2, 3, 1, 2, 3, 1, 2, 3, 2, 3];
2274
2287
  $e.slen1_tab = F, $e.slen2_tab = y;
2275
2288
  function f(d, v) {
2276
- for (var M, x = v.tt[1][d], C = v.tt[0][d], a = 0; a < V.scfsi_band.length - 1; a++) {
2277
- for (M = V.scfsi_band[a]; M < V.scfsi_band[a + 1] && !(C.scalefac[M] != x.scalefac[M] && x.scalefac[M] >= 0); M++)
2289
+ for (var M, x = v.tt[1][d], C = v.tt[0][d], a = 0; a < W.scfsi_band.length - 1; a++) {
2290
+ for (M = W.scfsi_band[a]; M < W.scfsi_band[a + 1] && !(C.scalefac[M] != x.scalefac[M] && x.scalefac[M] >= 0); M++)
2278
2291
  ;
2279
- if (M == V.scfsi_band[a + 1]) {
2280
- for (M = V.scfsi_band[a]; M < V.scfsi_band[a + 1]; M++)
2292
+ if (M == W.scfsi_band[a + 1]) {
2293
+ for (M = W.scfsi_band[a]; M < W.scfsi_band[a + 1]; M++)
2281
2294
  x.scalefac[M] = -1;
2282
2295
  v.scfsi[d][a] = 1;
2283
2296
  }
2284
2297
  }
2285
- var i = 0, W = 0;
2298
+ var i = 0, G = 0;
2286
2299
  for (M = 0; M < 11; M++)
2287
- x.scalefac[M] != -1 && (W++, i < x.scalefac[M] && (i = x.scalefac[M]));
2300
+ x.scalefac[M] != -1 && (G++, i < x.scalefac[M] && (i = x.scalefac[M]));
2288
2301
  for (var L = 0, Q = 0; M < s.SBPSY_l; M++)
2289
2302
  x.scalefac[M] != -1 && (Q++, L < x.scalefac[M] && (L = x.scalefac[M]));
2290
2303
  for (var a = 0; a < 16; a++)
2291
2304
  if (i < l[a] && L < A[a]) {
2292
- var le = F[a] * W + y[a] * Q;
2305
+ var le = F[a] * G + y[a] * Q;
2293
2306
  x.part2_length > le && (x.part2_length = le, x.scalefac_compress = a);
2294
2307
  }
2295
2308
  }
2296
2309
  this.best_scalefac_store = function(d, v, M, x) {
2297
- var C = x.tt[v][M], a, i, W, L, Q = 0;
2298
- for (W = 0, a = 0; a < C.sfbmax; a++) {
2310
+ var C = x.tt[v][M], a, i, G, L, Q = 0;
2311
+ for (G = 0, a = 0; a < C.sfbmax; a++) {
2299
2312
  var le = C.width[a];
2300
- for (W += le, L = -le; L < 0 && C.l3_enc[L + W] == 0; L++)
2313
+ for (G += le, L = -le; L < 0 && C.l3_enc[L + G] == 0; L++)
2301
2314
  ;
2302
2315
  L == 0 && (C.scalefac[a] = Q = -2);
2303
2316
  }
@@ -2406,7 +2419,7 @@ const a0 = s0;
2406
2419
  [3, 3, 0, 0]
2407
2420
  ];
2408
2421
  this.scale_bitcount_lsf = function(d, v) {
2409
- var M, x, C, a, i, W, L, Q, le = K(4), _e = v.scalefac;
2422
+ var M, x, C, a, i, G, L, Q, le = K(4), _e = v.scalefac;
2410
2423
  for (v.preflag != 0 ? M = 2 : M = 0, L = 0; L < 4; L++)
2411
2424
  le[L] = 0;
2412
2425
  if (v.block_type == s.SHORT_TYPE) {
@@ -2423,9 +2436,9 @@ const a0 = s0;
2423
2436
  for (a = Me[C], L = 0; L < a; L++, Q++)
2424
2437
  _e[Q] > le[C] && (le[C] = _e[Q]);
2425
2438
  }
2426
- for (W = !1, C = 0; C < 4; C++)
2427
- le[C] > n[M][C] && (W = !0);
2428
- if (!W) {
2439
+ for (G = !1, C = 0; C < 4; C++)
2440
+ le[C] > n[M][C] && (G = !0);
2441
+ if (!G) {
2429
2442
  var je, He, Ue, ht;
2430
2443
  for (v.sfb_partition_table = c.nr_of_sfb_block[M][x], C = 0; C < 4; C++)
2431
2444
  v.slen[C] = H[le[C]];
@@ -2441,10 +2454,10 @@ const a0 = s0;
2441
2454
  break;
2442
2455
  }
2443
2456
  }
2444
- if (!W)
2457
+ if (!G)
2445
2458
  for (v.part2_length = 0, C = 0; C < 4; C++)
2446
2459
  v.part2_length += v.slen[C] * v.sfb_partition_table[C];
2447
- return W;
2460
+ return G;
2448
2461
  };
2449
2462
  var H = [
2450
2463
  0,
@@ -2906,7 +2919,7 @@ const a0 = s0;
2906
2919
  var T = null, oe = 0, g = 0, z = 0;
2907
2920
  this.getframebits = function(f) {
2908
2921
  var w = f.internal_flags, u;
2909
- w.bitrate_index != 0 ? u = V.bitrate_table[f.version][w.bitrate_index] : u = f.brate;
2922
+ w.bitrate_index != 0 ? u = W.bitrate_table[f.version][w.bitrate_index] : u = f.brate;
2910
2923
  var I = 0 | (f.version + 1) * 72e3 * u / f.out_samplerate + w.padding;
2911
2924
  return 8 * I;
2912
2925
  };
@@ -2962,7 +2975,7 @@ const a0 = s0;
2962
2975
  }
2963
2976
  }
2964
2977
  function E(f, w) {
2965
- var u = V.ht[w.count1table_select + 32], I, n = 0, H = w.big_values, d = w.big_values;
2978
+ var u = W.ht[w.count1table_select + 32], I, n = 0, H = w.big_values, d = w.big_values;
2966
2979
  for (I = (w.count1 - w.big_values) / 4; I > 0; --I) {
2967
2980
  var v = 0, M = 0, x;
2968
2981
  x = w.l3_enc[H + 0], x != 0 && (M += 8, w.xr[d + 0] < 0 && v++), x = w.l3_enc[H + 1], x != 0 && (M += 4, v *= 2, w.xr[d + 1] < 0 && v++), x = w.l3_enc[H + 2], x != 0 && (M += 2, v *= 2, w.xr[d + 2] < 0 && v++), x = w.l3_enc[H + 3], x != 0 && (M++, v *= 2, w.xr[d + 3] < 0 && v++), H += 4, d += 4, j(f, v + u.table[M], u.hlen[M]), n += u.hlen[M];
@@ -2970,15 +2983,15 @@ const a0 = s0;
2970
2983
  return n;
2971
2984
  }
2972
2985
  function B(f, w, u, I, n) {
2973
- var H = V.ht[w], d = 0;
2986
+ var H = W.ht[w], d = 0;
2974
2987
  if (w == 0)
2975
2988
  return d;
2976
2989
  for (var v = u; v < I; v += 2) {
2977
- var M = 0, x = 0, C = H.xlen, a = H.xlen, i = 0, W = n.l3_enc[v], L = n.l3_enc[v + 1];
2978
- if (W != 0 && (n.xr[v] < 0 && i++, M--), w > 15) {
2979
- if (W > 14) {
2980
- var Q = W - 15;
2981
- i |= Q << 1, x = C, W = 15;
2990
+ var M = 0, x = 0, C = H.xlen, a = H.xlen, i = 0, G = n.l3_enc[v], L = n.l3_enc[v + 1];
2991
+ if (G != 0 && (n.xr[v] < 0 && i++, M--), w > 15) {
2992
+ if (G > 14) {
2993
+ var Q = G - 15;
2994
+ i |= Q << 1, x = C, G = 15;
2982
2995
  }
2983
2996
  if (L > 14) {
2984
2997
  var le = L - 15;
@@ -2986,7 +2999,7 @@ const a0 = s0;
2986
2999
  }
2987
3000
  a = 16;
2988
3001
  }
2989
- L != 0 && (i <<= 1, n.xr[v + 1] < 0 && i++, M--), W = W * a + L, x -= M, M += H.hlen[W], j(f, H.table[W], M), j(f, i, x), d += M + x;
3002
+ L != 0 && (i <<= 1, n.xr[v + 1] < 0 && i++, M--), G = G * a + L, x -= M, M += H.hlen[G], j(f, H.table[G], M), j(f, i, x), d += M + x;
2990
3003
  }
2991
3004
  return d;
2992
3005
  }
@@ -3034,7 +3047,7 @@ const a0 = s0;
3034
3047
  }
3035
3048
  else
3036
3049
  for (w = 0, u = 0; u < d.channels_out; u++) {
3037
- var M = v.tt[w][u], a, i, W = 0;
3050
+ var M = v.tt[w][u], a, i, G = 0;
3038
3051
  if (n = 0, I = 0, i = 0, M.block_type == s.SHORT_TYPE) {
3039
3052
  for (; i < 4; i++) {
3040
3053
  var L = M.sfb_partition_table[i] / 3, Q = M.slen[i];
@@ -3051,18 +3064,18 @@ const a0 = s0;
3051
3064
  d,
3052
3065
  Math.max(M.scalefac[I * 3 + 2], 0),
3053
3066
  Q
3054
- ), W += 3 * Q;
3067
+ ), G += 3 * Q;
3055
3068
  }
3056
3069
  n += t(d, M);
3057
3070
  } else {
3058
3071
  for (; i < 4; i++) {
3059
3072
  var L = M.sfb_partition_table[i], Q = M.slen[i];
3060
3073
  for (a = 0; a < L; a++, I++)
3061
- j(d, Math.max(M.scalefac[I], 0), Q), W += Q;
3074
+ j(d, Math.max(M.scalefac[I], 0), Q), G += Q;
3062
3075
  }
3063
3076
  n += l(d, M);
3064
3077
  }
3065
- n += E(d, M), H += W + n;
3078
+ n += E(d, M), H += G + n;
3066
3079
  }
3067
3080
  return H;
3068
3081
  }
@@ -3101,19 +3114,19 @@ const a0 = s0;
3101
3114
  }
3102
3115
  return H;
3103
3116
  }, this.init_bit_stream_w = function(f) {
3104
- T = $(se.LAME_MAXMP3BUFFER), f.h_ptr = f.w_ptr = 0, f.header[f.h_ptr].write_timing = 0, g = -1, z = 0, oe = 0;
3117
+ T = q(se.LAME_MAXMP3BUFFER), f.h_ptr = f.w_ptr = 0, f.header[f.h_ptr].write_timing = 0, g = -1, z = 0, oe = 0;
3105
3118
  };
3106
3119
  }
3107
3120
  function Le(c, N, P, T) {
3108
3121
  this.xlen = c, this.linmax = N, this.table = P, this.hlen = T;
3109
3122
  }
3110
- var V = {};
3111
- V.t1HB = [
3123
+ var W = {};
3124
+ W.t1HB = [
3112
3125
  1,
3113
3126
  1,
3114
3127
  1,
3115
3128
  0
3116
- ], V.t2HB = [
3129
+ ], W.t2HB = [
3117
3130
  1,
3118
3131
  2,
3119
3132
  1,
@@ -3123,7 +3136,7 @@ const a0 = s0;
3123
3136
  3,
3124
3137
  2,
3125
3138
  0
3126
- ], V.t3HB = [
3139
+ ], W.t3HB = [
3127
3140
  3,
3128
3141
  2,
3129
3142
  1,
@@ -3133,7 +3146,7 @@ const a0 = s0;
3133
3146
  3,
3134
3147
  2,
3135
3148
  0
3136
- ], V.t5HB = [
3149
+ ], W.t5HB = [
3137
3150
  1,
3138
3151
  2,
3139
3152
  6,
@@ -3150,7 +3163,7 @@ const a0 = s0;
3150
3163
  1,
3151
3164
  1,
3152
3165
  0
3153
- ], V.t6HB = [
3166
+ ], W.t6HB = [
3154
3167
  7,
3155
3168
  3,
3156
3169
  5,
@@ -3167,7 +3180,7 @@ const a0 = s0;
3167
3180
  3,
3168
3181
  2,
3169
3182
  0
3170
- ], V.t7HB = [
3183
+ ], W.t7HB = [
3171
3184
  1,
3172
3185
  2,
3173
3186
  10,
@@ -3204,7 +3217,7 @@ const a0 = s0;
3204
3217
  3,
3205
3218
  2,
3206
3219
  0
3207
- ], V.t8HB = [
3220
+ ], W.t8HB = [
3208
3221
  3,
3209
3222
  4,
3210
3223
  6,
@@ -3241,7 +3254,7 @@ const a0 = s0;
3241
3254
  1,
3242
3255
  1,
3243
3256
  0
3244
- ], V.t9HB = [
3257
+ ], W.t9HB = [
3245
3258
  7,
3246
3259
  5,
3247
3260
  9,
@@ -3278,7 +3291,7 @@ const a0 = s0;
3278
3291
  2,
3279
3292
  6,
3280
3293
  0
3281
- ], V.t10HB = [
3294
+ ], W.t10HB = [
3282
3295
  1,
3283
3296
  2,
3284
3297
  10,
@@ -3343,7 +3356,7 @@ const a0 = s0;
3343
3356
  4,
3344
3357
  2,
3345
3358
  0
3346
- ], V.t11HB = [
3359
+ ], W.t11HB = [
3347
3360
  3,
3348
3361
  4,
3349
3362
  10,
@@ -3408,7 +3421,7 @@ const a0 = s0;
3408
3421
  3,
3409
3422
  2,
3410
3423
  0
3411
- ], V.t12HB = [
3424
+ ], W.t12HB = [
3412
3425
  9,
3413
3426
  6,
3414
3427
  16,
@@ -3473,7 +3486,7 @@ const a0 = s0;
3473
3486
  3,
3474
3487
  1,
3475
3488
  0
3476
- ], V.t13HB = [
3489
+ ], W.t13HB = [
3477
3490
  1,
3478
3491
  5,
3479
3492
  14,
@@ -3730,7 +3743,7 @@ const a0 = s0;
3730
3743
  1,
3731
3744
  0,
3732
3745
  1
3733
- ], V.t15HB = [
3746
+ ], W.t15HB = [
3734
3747
  7,
3735
3748
  12,
3736
3749
  18,
@@ -3987,7 +4000,7 @@ const a0 = s0;
3987
4000
  6,
3988
4001
  2,
3989
4002
  0
3990
- ], V.t16HB = [
4003
+ ], W.t16HB = [
3991
4004
  1,
3992
4005
  5,
3993
4006
  14,
@@ -4244,7 +4257,7 @@ const a0 = s0;
4244
4257
  3,
4245
4258
  1,
4246
4259
  3
4247
- ], V.t24HB = [
4260
+ ], W.t24HB = [
4248
4261
  15,
4249
4262
  13,
4250
4263
  46,
@@ -4501,7 +4514,7 @@ const a0 = s0;
4501
4514
  3,
4502
4515
  1,
4503
4516
  3
4504
- ], V.t32HB = [
4517
+ ], W.t32HB = [
4505
4518
  1 << 0,
4506
4519
  5 << 1,
4507
4520
  4 << 1,
@@ -4518,7 +4531,7 @@ const a0 = s0;
4518
4531
  2 << 3,
4519
4532
  3 << 3,
4520
4533
  1 << 4
4521
- ], V.t33HB = [
4534
+ ], W.t33HB = [
4522
4535
  15 << 0,
4523
4536
  14 << 1,
4524
4537
  13 << 1,
@@ -4535,12 +4548,12 @@ const a0 = s0;
4535
4548
  2 << 3,
4536
4549
  1 << 3,
4537
4550
  0 << 4
4538
- ], V.t1l = [
4551
+ ], W.t1l = [
4539
4552
  1,
4540
4553
  4,
4541
4554
  3,
4542
4555
  5
4543
- ], V.t2l = [
4556
+ ], W.t2l = [
4544
4557
  1,
4545
4558
  4,
4546
4559
  7,
@@ -4550,7 +4563,7 @@ const a0 = s0;
4550
4563
  6,
4551
4564
  7,
4552
4565
  8
4553
- ], V.t3l = [
4566
+ ], W.t3l = [
4554
4567
  2,
4555
4568
  3,
4556
4569
  7,
@@ -4560,7 +4573,7 @@ const a0 = s0;
4560
4573
  6,
4561
4574
  7,
4562
4575
  8
4563
- ], V.t5l = [
4576
+ ], W.t5l = [
4564
4577
  1,
4565
4578
  4,
4566
4579
  7,
@@ -4577,7 +4590,7 @@ const a0 = s0;
4577
4590
  8,
4578
4591
  9,
4579
4592
  10
4580
- ], V.t6l = [
4593
+ ], W.t6l = [
4581
4594
  3,
4582
4595
  4,
4583
4596
  6,
@@ -4594,7 +4607,7 @@ const a0 = s0;
4594
4607
  7,
4595
4608
  8,
4596
4609
  9
4597
- ], V.t7l = [
4610
+ ], W.t7l = [
4598
4611
  1,
4599
4612
  4,
4600
4613
  7,
@@ -4631,7 +4644,7 @@ const a0 = s0;
4631
4644
  12,
4632
4645
  12,
4633
4646
  12
4634
- ], V.t8l = [
4647
+ ], W.t8l = [
4635
4648
  2,
4636
4649
  4,
4637
4650
  7,
@@ -4668,7 +4681,7 @@ const a0 = s0;
4668
4681
  11,
4669
4682
  13,
4670
4683
  13
4671
- ], V.t9l = [
4684
+ ], W.t9l = [
4672
4685
  3,
4673
4686
  4,
4674
4687
  6,
@@ -4705,7 +4718,7 @@ const a0 = s0;
4705
4718
  10,
4706
4719
  11,
4707
4720
  11
4708
- ], V.t10l = [
4721
+ ], W.t10l = [
4709
4722
  1,
4710
4723
  4,
4711
4724
  7,
@@ -4770,7 +4783,7 @@ const a0 = s0;
4770
4783
  13,
4771
4784
  13,
4772
4785
  13
4773
- ], V.t11l = [
4786
+ ], W.t11l = [
4774
4787
  2,
4775
4788
  4,
4776
4789
  6,
@@ -4835,7 +4848,7 @@ const a0 = s0;
4835
4848
  12,
4836
4849
  12,
4837
4850
  12
4838
- ], V.t12l = [
4851
+ ], W.t12l = [
4839
4852
  4,
4840
4853
  4,
4841
4854
  6,
@@ -4900,7 +4913,7 @@ const a0 = s0;
4900
4913
  11,
4901
4914
  11,
4902
4915
  12
4903
- ], V.t13l = [
4916
+ ], W.t13l = [
4904
4917
  1,
4905
4918
  5,
4906
4919
  7,
@@ -5157,7 +5170,7 @@ const a0 = s0;
5157
5170
  20,
5158
5171
  21,
5159
5172
  18
5160
- ], V.t15l = [
5173
+ ], W.t15l = [
5161
5174
  3,
5162
5175
  5,
5163
5176
  6,
@@ -5414,7 +5427,7 @@ const a0 = s0;
5414
5427
  15,
5415
5428
  15,
5416
5429
  15
5417
- ], V.t16_5l = [
5430
+ ], W.t16_5l = [
5418
5431
  1,
5419
5432
  5,
5420
5433
  7,
@@ -5671,7 +5684,7 @@ const a0 = s0;
5671
5684
  14,
5672
5685
  14,
5673
5686
  12
5674
- ], V.t16l = [
5687
+ ], W.t16l = [
5675
5688
  1,
5676
5689
  5,
5677
5690
  7,
@@ -5928,7 +5941,7 @@ const a0 = s0;
5928
5941
  13,
5929
5942
  13,
5930
5943
  10
5931
- ], V.t24l = [
5944
+ ], W.t24l = [
5932
5945
  4,
5933
5946
  5,
5934
5947
  7,
@@ -6185,7 +6198,7 @@ const a0 = s0;
6185
6198
  10,
6186
6199
  10,
6187
6200
  6
6188
- ], V.t32l = [
6201
+ ], W.t32l = [
6189
6202
  1 + 0,
6190
6203
  4 + 1,
6191
6204
  4 + 1,
@@ -6202,7 +6215,7 @@ const a0 = s0;
6202
6215
  6 + 3,
6203
6216
  6 + 3,
6204
6217
  6 + 4
6205
- ], V.t33l = [
6218
+ ], W.t33l = [
6206
6219
  4 + 0,
6207
6220
  4 + 1,
6208
6221
  4 + 1,
@@ -6219,45 +6232,45 @@ const a0 = s0;
6219
6232
  4 + 3,
6220
6233
  4 + 3,
6221
6234
  4 + 4
6222
- ], V.ht = [
6235
+ ], W.ht = [
6223
6236
  /* xlen, linmax, table, hlen */
6224
6237
  new Le(0, 0, null, null),
6225
- new Le(2, 0, V.t1HB, V.t1l),
6226
- new Le(3, 0, V.t2HB, V.t2l),
6227
- new Le(3, 0, V.t3HB, V.t3l),
6238
+ new Le(2, 0, W.t1HB, W.t1l),
6239
+ new Le(3, 0, W.t2HB, W.t2l),
6240
+ new Le(3, 0, W.t3HB, W.t3l),
6228
6241
  new Le(0, 0, null, null),
6229
6242
  /* Apparently not used */
6230
- new Le(4, 0, V.t5HB, V.t5l),
6231
- new Le(4, 0, V.t6HB, V.t6l),
6232
- new Le(6, 0, V.t7HB, V.t7l),
6233
- new Le(6, 0, V.t8HB, V.t8l),
6234
- new Le(6, 0, V.t9HB, V.t9l),
6235
- new Le(8, 0, V.t10HB, V.t10l),
6236
- new Le(8, 0, V.t11HB, V.t11l),
6237
- new Le(8, 0, V.t12HB, V.t12l),
6238
- new Le(16, 0, V.t13HB, V.t13l),
6239
- new Le(0, 0, null, V.t16_5l),
6243
+ new Le(4, 0, W.t5HB, W.t5l),
6244
+ new Le(4, 0, W.t6HB, W.t6l),
6245
+ new Le(6, 0, W.t7HB, W.t7l),
6246
+ new Le(6, 0, W.t8HB, W.t8l),
6247
+ new Le(6, 0, W.t9HB, W.t9l),
6248
+ new Le(8, 0, W.t10HB, W.t10l),
6249
+ new Le(8, 0, W.t11HB, W.t11l),
6250
+ new Le(8, 0, W.t12HB, W.t12l),
6251
+ new Le(16, 0, W.t13HB, W.t13l),
6252
+ new Le(0, 0, null, W.t16_5l),
6240
6253
  /* Apparently not used */
6241
- new Le(16, 0, V.t15HB, V.t15l),
6242
- new Le(1, 1, V.t16HB, V.t16l),
6243
- new Le(2, 3, V.t16HB, V.t16l),
6244
- new Le(3, 7, V.t16HB, V.t16l),
6245
- new Le(4, 15, V.t16HB, V.t16l),
6246
- new Le(6, 63, V.t16HB, V.t16l),
6247
- new Le(8, 255, V.t16HB, V.t16l),
6248
- new Le(10, 1023, V.t16HB, V.t16l),
6249
- new Le(13, 8191, V.t16HB, V.t16l),
6250
- new Le(4, 15, V.t24HB, V.t24l),
6251
- new Le(5, 31, V.t24HB, V.t24l),
6252
- new Le(6, 63, V.t24HB, V.t24l),
6253
- new Le(7, 127, V.t24HB, V.t24l),
6254
- new Le(8, 255, V.t24HB, V.t24l),
6255
- new Le(9, 511, V.t24HB, V.t24l),
6256
- new Le(11, 2047, V.t24HB, V.t24l),
6257
- new Le(13, 8191, V.t24HB, V.t24l),
6258
- new Le(0, 0, V.t32HB, V.t32l),
6259
- new Le(0, 0, V.t33HB, V.t33l)
6260
- ], V.largetbl = [
6254
+ new Le(16, 0, W.t15HB, W.t15l),
6255
+ new Le(1, 1, W.t16HB, W.t16l),
6256
+ new Le(2, 3, W.t16HB, W.t16l),
6257
+ new Le(3, 7, W.t16HB, W.t16l),
6258
+ new Le(4, 15, W.t16HB, W.t16l),
6259
+ new Le(6, 63, W.t16HB, W.t16l),
6260
+ new Le(8, 255, W.t16HB, W.t16l),
6261
+ new Le(10, 1023, W.t16HB, W.t16l),
6262
+ new Le(13, 8191, W.t16HB, W.t16l),
6263
+ new Le(4, 15, W.t24HB, W.t24l),
6264
+ new Le(5, 31, W.t24HB, W.t24l),
6265
+ new Le(6, 63, W.t24HB, W.t24l),
6266
+ new Le(7, 127, W.t24HB, W.t24l),
6267
+ new Le(8, 255, W.t24HB, W.t24l),
6268
+ new Le(9, 511, W.t24HB, W.t24l),
6269
+ new Le(11, 2047, W.t24HB, W.t24l),
6270
+ new Le(13, 8191, W.t24HB, W.t24l),
6271
+ new Le(0, 0, W.t32HB, W.t32l),
6272
+ new Le(0, 0, W.t33HB, W.t33l)
6273
+ ], W.largetbl = [
6261
6274
  65540,
6262
6275
  327685,
6263
6276
  458759,
@@ -6514,7 +6527,7 @@ const a0 = s0;
6514
6527
  851978,
6515
6528
  851978,
6516
6529
  655366
6517
- ], V.table23 = [
6530
+ ], W.table23 = [
6518
6531
  65538,
6519
6532
  262147,
6520
6533
  458759,
@@ -6524,7 +6537,7 @@ const a0 = s0;
6524
6537
  393222,
6525
6538
  458759,
6526
6539
  524296
6527
- ], V.table56 = [
6540
+ ], W.table56 = [
6528
6541
  65539,
6529
6542
  262148,
6530
6543
  458758,
@@ -6541,18 +6554,18 @@ const a0 = s0;
6541
6554
  524295,
6542
6555
  589832,
6543
6556
  655369
6544
- ], V.bitrate_table = [
6557
+ ], W.bitrate_table = [
6545
6558
  [0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160, -1],
6546
6559
  /* MPEG 2 */
6547
6560
  [0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, -1],
6548
6561
  /* MPEG 1 */
6549
6562
  [0, 8, 16, 24, 32, 40, 48, 56, 64, -1, -1, -1, -1, -1, -1, -1]
6550
6563
  /* MPEG 2.5 */
6551
- ], V.samplerate_table = [
6564
+ ], W.samplerate_table = [
6552
6565
  [22050, 24e3, 16e3, -1],
6553
6566
  [44100, 48e3, 32e3, -1],
6554
6567
  [11025, 12e3, 8e3, -1]
6555
- ], V.scfsi_band = [0, 6, 11, 16, 21];
6568
+ ], W.scfsi_band = [0, 6, 11, 16, 21];
6556
6569
  function pt(c) {
6557
6570
  this.bits = c;
6558
6571
  }
@@ -7090,20 +7103,20 @@ const a0 = s0;
7090
7103
  }, this.calc_xmin = function(y, f, w, u) {
7091
7104
  var I = 0, n = y.internal_flags, H, d = 0, v = 0, M = n.ATH, x = w.xr, C = y.VBR == de.vbr_mtrh ? 1 : 0, a = n.masking_lower;
7092
7105
  for ((y.VBR == de.vbr_mtrh || y.VBR == de.vbr_mt) && (a = 1), H = 0; H < w.psy_lmax; H++) {
7093
- var i, W, L, Q, le, _e;
7094
- y.VBR == de.vbr_rh || y.VBR == de.vbr_mtrh ? W = athAdjust(M.adjust, M.l[H], M.floor) : W = M.adjust * M.l[H], le = w.width[H], L = W / le, Q = oe, _e = le >> 1, i = 0;
7106
+ var i, G, L, Q, le, _e;
7107
+ y.VBR == de.vbr_rh || y.VBR == de.vbr_mtrh ? G = athAdjust(M.adjust, M.l[H], M.floor) : G = M.adjust * M.l[H], le = w.width[H], L = G / le, Q = oe, _e = le >> 1, i = 0;
7095
7108
  do {
7096
7109
  var Me, je;
7097
7110
  Me = x[d] * x[d], i += Me, Q += Me < L ? Me : L, d++, je = x[d] * x[d], i += je, Q += je < L ? je : L, d++;
7098
7111
  } while (--_e > 0);
7099
- if (i > W && v++, H == s.SBPSY_l && p(), C != 0 && (W = Q), !y.ATHonly) {
7112
+ if (i > G && v++, H == s.SBPSY_l && p(), C != 0 && (G = Q), !y.ATHonly) {
7100
7113
  var He = f.en.l[H];
7101
7114
  if (He > 0) {
7102
7115
  var Ue;
7103
- Ue = i * f.thm.l[H] * a / He, C != 0 && (Ue *= n.nsPsy.longfact[H]), W < Ue && (W = Ue);
7116
+ Ue = i * f.thm.l[H] * a / He, C != 0 && (Ue *= n.nsPsy.longfact[H]), G < Ue && (G = Ue);
7104
7117
  }
7105
7118
  }
7106
- C != 0 ? u[I++] = W : u[I++] = W * n.nsPsy.longfact[H];
7119
+ C != 0 ? u[I++] = G : u[I++] = G * n.nsPsy.longfact[H];
7107
7120
  }
7108
7121
  var ht = 575;
7109
7122
  if (w.block_type != s.SHORT_TYPE)
@@ -7113,20 +7126,20 @@ const a0 = s0;
7113
7126
  for (var ot = w.sfb_smin; H < w.psymax; ot++, H += 3) {
7114
7127
  var le, ct, gt;
7115
7128
  for (y.VBR == de.vbr_rh || y.VBR == de.vbr_mtrh ? gt = athAdjust(M.adjust, M.s[ot], M.floor) : gt = M.adjust * M.s[ot], le = w.width[H], ct = 0; ct < 3; ct++) {
7116
- var i = 0, W, L, Q, _e = le >> 1;
7129
+ var i = 0, G, L, Q, _e = le >> 1;
7117
7130
  L = gt / le, Q = oe;
7118
7131
  do {
7119
7132
  var Me, je;
7120
7133
  Me = x[d] * x[d], i += Me, Q += Me < L ? Me : L, d++, je = x[d] * x[d], i += je, Q += je < L ? je : L, d++;
7121
7134
  } while (--_e > 0);
7122
- if (i > gt && v++, ot == s.SBPSY_s && p(), C != 0 ? W = Q : W = gt, !y.ATHonly && !y.ATHshort) {
7135
+ if (i > gt && v++, ot == s.SBPSY_s && p(), C != 0 ? G = Q : G = gt, !y.ATHonly && !y.ATHshort) {
7123
7136
  var He = f.en.s[ot][ct];
7124
7137
  if (He > 0) {
7125
7138
  var Ue;
7126
- Ue = i * f.thm.s[ot][ct] * a / He, C != 0 && (Ue *= n.nsPsy.shortfact[ot]), W < Ue && (W = Ue);
7139
+ Ue = i * f.thm.s[ot][ct] * a / He, C != 0 && (Ue *= n.nsPsy.shortfact[ot]), G < Ue && (G = Ue);
7127
7140
  }
7128
7141
  }
7129
- C != 0 ? u[I++] = W : u[I++] = W * n.nsPsy.shortfact[ot];
7142
+ C != 0 ? u[I++] = G : u[I++] = G * n.nsPsy.shortfact[ot];
7130
7143
  }
7131
7144
  y.useTemporal && (u[I - 3] > u[I - 3 + 1] && (u[I - 3 + 1] += (u[I - 3] - u[I - 3 + 1]) * n.decay), u[I - 3 + 1] > u[I - 3 + 2] && (u[I - 3 + 2] += (u[I - 3 + 1] - u[I - 3 + 2]) * n.decay));
7132
7145
  }
@@ -7155,9 +7168,9 @@ const a0 = s0;
7155
7168
  }
7156
7169
  return f.s = n, I;
7157
7170
  }, this.calc_noise = function(y, f, w, u, I) {
7158
- var n = 0, H = 0, d, v, M = 0, x = 0, C = 0, a = -20, i = 0, W = y.scalefac, L = 0;
7171
+ var n = 0, H = 0, d, v, M = 0, x = 0, C = 0, a = -20, i = 0, G = y.scalefac, L = 0;
7159
7172
  for (u.over_SSD = 0, d = 0; d < y.psymax; d++) {
7160
- var Q = y.global_gain - (W[L++] + (y.preflag != 0 ? k[d] : 0) << y.scalefac_scale + 1) - y.subblock_gain[y.window[d]] * 8, le = 0;
7173
+ var Q = y.global_gain - (G[L++] + (y.preflag != 0 ? k[d] : 0) << y.scalefac_scale + 1) - y.subblock_gain[y.window[d]] * 8, le = 0;
7161
7174
  if (I != null && I.step[d] == Q)
7162
7175
  le = I.noise[d], i += y.width[d], w[n++] = le / f[H++], le = I.noise_log[d];
7163
7176
  else {
@@ -7437,7 +7450,7 @@ const a0 = s0;
7437
7450
  var i = 0;
7438
7451
  for (ue.arraycopy(F, 0, I, 0, 576); !x; ) {
7439
7452
  do {
7440
- var W = new rt(), L, Q = 255;
7453
+ var G = new rt(), L, Q = 255;
7441
7454
  if (w.substep_shaping & 2 ? L = 20 : L = 3, w.sfb21_extra && p(), !B(t, u, n, F))
7442
7455
  break;
7443
7456
  u.scalefac_scale != 0 && (Q = 254);
@@ -7468,10 +7481,10 @@ const a0 = s0;
7468
7481
  u,
7469
7482
  A,
7470
7483
  n,
7471
- W,
7484
+ G,
7472
7485
  v
7473
- ), W.bits = u.part2_3_length, l.block_type != s.SHORT_TYPE ? d = t.quant_comp : d = t.quant_comp_short, d = ee(d, H, W) ? 1 : 0, d != 0)
7474
- M = l.part2_3_length, H = W, l.assign(u), i = 0, ue.arraycopy(F, 0, I, 0, 576);
7486
+ ), G.bits = u.part2_3_length, l.block_type != s.SHORT_TYPE ? d = t.quant_comp : d = t.quant_comp_short, d = ee(d, H, G) ? 1 : 0, d != 0)
7487
+ M = l.part2_3_length, H = G, l.assign(u), i = 0, ue.arraycopy(F, 0, I, 0, 576);
7475
7488
  else if (w.full_outer_loop == 0 && (++i > L && H.over_count == 0 || w.noise_shaping_amp == 3 && C && i > 30 || w.noise_shaping_amp == 3 && C && u.global_gain - a > 15))
7476
7489
  break;
7477
7490
  } while (u.global_gain + u.scalefac_scale < 255);
@@ -8003,8 +8016,8 @@ const a0 = s0;
8003
8016
  F = t[17] - t[9], f = t[15] - t[11], w = t[14] - t[12], u = t[0] + t[8], I = t[1] + t[7], n = t[2] + t[6], H = t[3] + t[5], E[B + 17] = u + n - H - (I - t[4]), A = (u + n - H) * g[12 + 7] + (I - t[4]), l = (F - f - w) * g[12 + 6], E[B + 5] = l + A, E[B + 6] = l - A, y = (t[16] - t[10]) * g[12 + 6], I = I * g[12 + 7] + t[4], l = F * g[12 + 0] + y + f * g[12 + 1] + w * g[12 + 2], A = -u * g[12 + 4] + I - n * g[12 + 5] + H * g[12 + 3], E[B + 1] = l + A, E[B + 2] = l - A, l = F * g[12 + 1] - y - f * g[12 + 2] + w * g[12 + 0], A = -u * g[12 + 5] + I - n * g[12 + 3] + H * g[12 + 4], E[B + 9] = l + A, E[B + 10] = l - A, l = F * g[12 + 2] - y + f * g[12 + 0] - w * g[12 + 1], A = u * g[12 + 3] - I + n * g[12 + 4] - H * g[12 + 5], E[B + 13] = l + A, E[B + 14] = l - A;
8004
8017
  }
8005
8018
  {
8006
- var d, v, M, x, C, a, i, W;
8007
- d = t[8] - t[0], M = t[6] - t[2], x = t[5] - t[3], C = t[17] + t[9], a = t[16] + t[10], i = t[15] + t[11], W = t[14] + t[12], E[B + 0] = C + i + W + (a + t[13]), l = (C + i + W) * g[12 + 7] - (a + t[13]), A = (d - M + x) * g[12 + 6], E[B + 11] = l + A, E[B + 12] = l - A, v = (t[7] - t[1]) * g[12 + 6], a = t[13] - a * g[12 + 7], l = C * g[12 + 3] - a + i * g[12 + 4] + W * g[12 + 5], A = d * g[12 + 2] + v + M * g[12 + 0] + x * g[12 + 1], E[B + 3] = l + A, E[B + 4] = l - A, l = -C * g[12 + 5] + a - i * g[12 + 3] - W * g[12 + 4], A = d * g[12 + 1] + v - M * g[12 + 2] - x * g[12 + 0], E[B + 7] = l + A, E[B + 8] = l - A, l = -C * g[12 + 4] + a - i * g[12 + 5] - W * g[12 + 3], A = d * g[12 + 0] - v + M * g[12 + 1] - x * g[12 + 2], E[B + 15] = l + A, E[B + 16] = l - A;
8019
+ var d, v, M, x, C, a, i, G;
8020
+ d = t[8] - t[0], M = t[6] - t[2], x = t[5] - t[3], C = t[17] + t[9], a = t[16] + t[10], i = t[15] + t[11], G = t[14] + t[12], E[B + 0] = C + i + G + (a + t[13]), l = (C + i + G) * g[12 + 7] - (a + t[13]), A = (d - M + x) * g[12 + 6], E[B + 11] = l + A, E[B + 12] = l - A, v = (t[7] - t[1]) * g[12 + 6], a = t[13] - a * g[12 + 7], l = C * g[12 + 3] - a + i * g[12 + 4] + G * g[12 + 5], A = d * g[12 + 2] + v + M * g[12 + 0] + x * g[12 + 1], E[B + 3] = l + A, E[B + 4] = l - A, l = -C * g[12 + 5] + a - i * g[12 + 3] - G * g[12 + 4], A = d * g[12 + 1] + v - M * g[12 + 2] - x * g[12 + 0], E[B + 7] = l + A, E[B + 8] = l - A, l = -C * g[12 + 4] + a - i * g[12 + 5] - G * g[12 + 3], A = d * g[12 + 0] - v + M * g[12 + 1] - x * g[12 + 2], E[B + 15] = l + A, E[B + 16] = l - A;
8008
8021
  }
8009
8022
  }
8010
8023
  this.mdct_sub48 = function(E, B, t) {
@@ -8030,8 +8043,8 @@ const a0 = s0;
8030
8043
  k(u, I);
8031
8044
  } else {
8032
8045
  for (var a = ie(18), d = -P / 4; d < 0; d++) {
8033
- var i, W;
8034
- i = T[v][d + 27] * x[d + 9][j[f]] + T[v][d + 36] * x[8 - d][j[f]], W = T[v][d + 9] * M[d + 9][j[f]] - T[v][d + 18] * M[8 - d][j[f]], a[d + 9] = i - W * oe[3 + d + 9], a[d + 18] = i * oe[3 + d + 9] + W;
8046
+ var i, G;
8047
+ i = T[v][d + 27] * x[d + 9][j[f]] + T[v][d + 36] * x[8 - d][j[f]], G = T[v][d + 9] * M[d + 9][j[f]] - T[v][d + 18] * M[8 - d][j[f]], a[d + 9] = i - G * oe[3 + d + 9], a[d + 18] = i * oe[3 + d + 9] + G;
8035
8048
  }
8036
8049
  fe(u, I, a);
8037
8050
  }
@@ -8141,14 +8154,14 @@ const a0 = s0;
8141
8154
  } else
8142
8155
  p();
8143
8156
  if (g(f), oe.mdct_sub48(f, y[0], y[1]), f.mode_ext = s.MPG_MD_LR_LR, j.force_ms ? f.mode_ext = s.MPG_MD_MS_LR : j.mode == ze.JOINT_STEREO && p(), f.mode_ext == c ? (F = A, H = n) : (F = l, H = I), j.analysis && f.pinfo != null && p(), j.VBR == de.vbr_off || j.VBR == de.vbr_abr) {
8144
- var W, L;
8145
- for (W = 0; W < 18; W++)
8146
- f.nsPsy.pefirbuf[W] = f.nsPsy.pefirbuf[W + 1];
8157
+ var G, L;
8158
+ for (G = 0; G < 18; G++)
8159
+ f.nsPsy.pefirbuf[G] = f.nsPsy.pefirbuf[G + 1];
8147
8160
  for (L = 0, v = 0; v < f.mode_gr; v++)
8148
8161
  for (d = 0; d < f.channels_out; d++)
8149
8162
  L += H[v][d];
8150
- for (f.nsPsy.pefirbuf[18] = L, L = f.nsPsy.pefirbuf[9], W = 0; W < 9; W++)
8151
- L += (f.nsPsy.pefirbuf[W] + f.nsPsy.pefirbuf[18 - W]) * s.fircoef[W];
8163
+ for (f.nsPsy.pefirbuf[18] = L, L = f.nsPsy.pefirbuf[9], G = 0; G < 9; G++)
8164
+ L += (f.nsPsy.pefirbuf[G] + f.nsPsy.pefirbuf[18 - G]) * s.fircoef[G];
8152
8165
  for (L = 670 * 5 * f.mode_gr * f.channels_out / L, v = 0; v < f.mode_gr; v++)
8153
8166
  for (d = 0; d < f.channels_out; d++)
8154
8167
  H[v][d] *= L;
@@ -8156,7 +8169,7 @@ const a0 = s0;
8156
8169
  return f.iteration_loop.iteration_loop(j, H, u, F), N.format_bitstream(j), t = N.copy_buffer(f, fe, E, B, 1), j.bWriteVbrTag && T.addVbrFrame(j), j.analysis && f.pinfo != null && p(), z(f), t;
8157
8170
  };
8158
8171
  }
8159
- function q() {
8172
+ function $() {
8160
8173
  this.sum = 0, this.seen = 0, this.want = 0, this.pos = 0, this.size = 0, this.bag = null, this.nVbrNumFrames = 0, this.nBytesWritten = 0, this.TotalFrameSize = 0;
8161
8174
  }
8162
8175
  function ae() {
@@ -8183,9 +8196,9 @@ const a0 = s0;
8183
8196
  var c = 40;
8184
8197
  this.Class_ID = 0, this.lame_encode_frame_init = 0, this.iteration_init_init = 0, this.fill_buffer_resample_init = 0, this.mfbuf = Re([2, ne.MFSIZE]), this.mode_gr = 0, this.channels_in = 0, this.channels_out = 0, this.resample_ratio = 0, this.mf_samples_to_encode = 0, this.mf_size = 0, this.VBR_min_bitrate = 0, this.VBR_max_bitrate = 0, this.bitrate_index = 0, this.samplerate_index = 0, this.mode_ext = 0, this.lowpass1 = 0, this.lowpass2 = 0, this.highpass1 = 0, this.highpass2 = 0, this.noise_shaping = 0, this.noise_shaping_amp = 0, this.substep_shaping = 0, this.psymodel = 0, this.noise_shaping_stop = 0, this.subblock_gain = 0, this.use_best_huffman = 0, this.full_outer_loop = 0, this.l3_side = new ae(), this.ms_ratio = ie(2), this.padding = 0, this.frac_SpF = 0, this.slot_lag = 0, this.tag_spec = null, this.nMusicCRC = 0, this.OldValue = K(2), this.CurrentStep = K(2), this.masking_lower = 0, this.bv_scf = K(576), this.pseudohalf = K(b.SFBMAX), this.sfb21_extra = !1, this.inbuf_old = new Array(2), this.blackfilt = new Array(2 * ne.BPC + 1), this.itime = ye(2), this.sideinfo_len = 0, this.sb_sample = Re([2, 2, 18, s.SBLIMIT]), this.amp_filter = ie(32);
8185
8198
  function N() {
8186
- this.write_timing = 0, this.ptr = 0, this.buf = $(c);
8199
+ this.write_timing = 0, this.ptr = 0, this.buf = q(c);
8187
8200
  }
8188
- this.header = new Array(ne.MAX_HEADER_BUF), this.h_ptr = 0, this.w_ptr = 0, this.ancillary_flag = 0, this.ResvSize = 0, this.ResvMax = 0, this.scalefac_band = new R(), this.minval_l = ie(s.CBANDS), this.minval_s = ie(s.CBANDS), this.nb_1 = Re([4, s.CBANDS]), this.nb_2 = Re([4, s.CBANDS]), this.nb_s1 = Re([4, s.CBANDS]), this.nb_s2 = Re([4, s.CBANDS]), this.s3_ss = null, this.s3_ll = null, this.decay = 0, this.thm = new Array(4), this.en = new Array(4), this.tot_ener = ie(4), this.loudness_sq = Re([2, 2]), this.loudness_sq_save = ie(2), this.mld_l = ie(s.SBMAX_l), this.mld_s = ie(s.SBMAX_s), this.bm_l = K(s.SBMAX_l), this.bo_l = K(s.SBMAX_l), this.bm_s = K(s.SBMAX_s), this.bo_s = K(s.SBMAX_s), this.npart_l = 0, this.npart_s = 0, this.s3ind = ke([s.CBANDS, 2]), this.s3ind_s = ke([s.CBANDS, 2]), this.numlines_s = K(s.CBANDS), this.numlines_l = K(s.CBANDS), this.rnumlines_l = ie(s.CBANDS), this.mld_cb_l = ie(s.CBANDS), this.mld_cb_s = ie(s.CBANDS), this.numlines_s_num1 = 0, this.numlines_l_num1 = 0, this.pe = ie(4), this.ms_ratio_s_old = 0, this.ms_ratio_l_old = 0, this.ms_ener_ratio_old = 0, this.blocktype_old = K(2), this.nsPsy = new be(), this.VBR_seek_table = new q(), this.ATH = null, this.PSY = null, this.nogap_total = 0, this.nogap_current = 0, this.decode_on_the_fly = !0, this.findReplayGain = !0, this.findPeakSample = !0, this.PeakSample = 0, this.RadioGain = 0, this.AudiophileGain = 0, this.rgdata = null, this.noclipGainChange = 0, this.noclipScale = 0, this.bitrate_stereoMode_Hist = ke([16, 4 + 1]), this.bitrate_blockType_Hist = ke([16, 4 + 1 + 1]), this.pinfo = null, this.hip = null, this.in_buffer_nsamples = 0, this.in_buffer_0 = null, this.in_buffer_1 = null, this.iteration_loop = null;
8201
+ this.header = new Array(ne.MAX_HEADER_BUF), this.h_ptr = 0, this.w_ptr = 0, this.ancillary_flag = 0, this.ResvSize = 0, this.ResvMax = 0, this.scalefac_band = new R(), this.minval_l = ie(s.CBANDS), this.minval_s = ie(s.CBANDS), this.nb_1 = Re([4, s.CBANDS]), this.nb_2 = Re([4, s.CBANDS]), this.nb_s1 = Re([4, s.CBANDS]), this.nb_s2 = Re([4, s.CBANDS]), this.s3_ss = null, this.s3_ll = null, this.decay = 0, this.thm = new Array(4), this.en = new Array(4), this.tot_ener = ie(4), this.loudness_sq = Re([2, 2]), this.loudness_sq_save = ie(2), this.mld_l = ie(s.SBMAX_l), this.mld_s = ie(s.SBMAX_s), this.bm_l = K(s.SBMAX_l), this.bo_l = K(s.SBMAX_l), this.bm_s = K(s.SBMAX_s), this.bo_s = K(s.SBMAX_s), this.npart_l = 0, this.npart_s = 0, this.s3ind = ke([s.CBANDS, 2]), this.s3ind_s = ke([s.CBANDS, 2]), this.numlines_s = K(s.CBANDS), this.numlines_l = K(s.CBANDS), this.rnumlines_l = ie(s.CBANDS), this.mld_cb_l = ie(s.CBANDS), this.mld_cb_s = ie(s.CBANDS), this.numlines_s_num1 = 0, this.numlines_l_num1 = 0, this.pe = ie(4), this.ms_ratio_s_old = 0, this.ms_ratio_l_old = 0, this.ms_ener_ratio_old = 0, this.blocktype_old = K(2), this.nsPsy = new be(), this.VBR_seek_table = new $(), this.ATH = null, this.PSY = null, this.nogap_total = 0, this.nogap_current = 0, this.decode_on_the_fly = !0, this.findReplayGain = !0, this.findPeakSample = !0, this.PeakSample = 0, this.RadioGain = 0, this.AudiophileGain = 0, this.rgdata = null, this.noclipGainChange = 0, this.noclipScale = 0, this.bitrate_stereoMode_Hist = ke([16, 4 + 1]), this.bitrate_blockType_Hist = ke([16, 4 + 1 + 1]), this.pinfo = null, this.hip = null, this.in_buffer_nsamples = 0, this.in_buffer_0 = null, this.in_buffer_1 = null, this.iteration_loop = null;
8189
8202
  for (var P = 0; P < this.en.length; P++)
8190
8203
  this.en[P] = new me();
8191
8204
  for (var P = 0; P < this.thm.length; P++)
@@ -8564,7 +8577,7 @@ const a0 = s0;
8564
8577
  for (; Ne <= s.CBANDS; ++Ne)
8565
8578
  X[Ne] = 0, Se[Ne] = 0;
8566
8579
  }
8567
- function W(J, O, X, Se) {
8580
+ function G(J, O, X, Se) {
8568
8581
  var Te = J.internal_flags;
8569
8582
  J.short_blocks == Ce.short_block_coupled && !(O[0] != 0 && O[1] != 0) && (O[0] = O[1] = 0);
8570
8583
  for (var he = 0; he < Te.channels_out; he++)
@@ -8773,7 +8786,7 @@ const a0 = s0;
8773
8786
  st[Ge] = 0, tt[Ge] = 0;
8774
8787
  a(Ie, st, tt, Ee);
8775
8788
  }
8776
- for ((J.mode == ze.STEREO || J.mode == ze.JOINT_STEREO) && p(), J.mode == ze.JOINT_STEREO && p(), W(J, nt, We, Qe), Ee = 0; Ee < wt; Ee++) {
8789
+ for ((J.mode == ze.STEREO || J.mode == ze.JOINT_STEREO) && p(), J.mode == ze.JOINT_STEREO && p(), G(J, nt, We, Qe), Ee = 0; Ee < wt; Ee++) {
8777
8790
  var Vt, Wt = 0, b0, t0;
8778
8791
  Ee > 1 ? p() : (Vt = xe, Wt = 0, b0 = We[Ee], t0 = Te[Se][Ee]), b0 == s.SHORT_TYPE ? Vt[Wt + Ee] = le(t0, Ie.masking_lower) : Vt[Wt + Ee] = Me(t0, Ie.masking_lower), J.analysis && (Ie.pinfo.pe[Se][Ee] = Vt[Wt + Ee]);
8779
8792
  }
@@ -9014,8 +9027,8 @@ const a0 = s0;
9014
9027
  var P = 16384 + N;
9015
9028
  se.LAME_MAXMP3BUFFER = P;
9016
9029
  var T, oe, g, z, re, j = new pe(), ee, k;
9017
- this.enc = new s(), this.setModules = function(a, i, W, L, Q, le, _e, Me, je) {
9018
- T = a, oe = i, g = W, z = L, re = Q, ee = le, k = Me, this.enc.setModules(oe, j, z, ee);
9030
+ this.enc = new s(), this.setModules = function(a, i, G, L, Q, le, _e, Me, je) {
9031
+ T = a, oe = i, g = G, z = L, re = Q, ee = le, k = Me, this.enc.setModules(oe, j, z, ee);
9019
9032
  };
9020
9033
  function fe() {
9021
9034
  this.mask_adjust = 0, this.mask_adjust_short = 0, this.bo_l_weight = ie(s.SBMAX_l), this.bo_s_weight = ie(s.SBMAX_s);
@@ -9057,14 +9070,14 @@ const a0 = s0;
9057
9070
  224,
9058
9071
  256,
9059
9072
  320
9060
- ], W = 0, L = 0, Q = 0, le = 0;
9061
- le = i[16], Q = 16, L = i[16], W = 16;
9073
+ ], G = 0, L = 0, Q = 0, le = 0;
9074
+ le = i[16], Q = 16, L = i[16], G = 16;
9062
9075
  for (var _e = 0; _e < 16; _e++)
9063
9076
  if (Math.max(a, i[_e + 1]) != a) {
9064
- le = i[_e + 1], Q = _e + 1, L = i[_e], W = _e;
9077
+ le = i[_e + 1], Q = _e + 1, L = i[_e], G = _e;
9065
9078
  break;
9066
9079
  }
9067
- return le - a > a - L ? W : Q;
9080
+ return le - a > a - L ? G : Q;
9068
9081
  };
9069
9082
  function F(a, i) {
9070
9083
  switch (a) {
@@ -9090,21 +9103,21 @@ const a0 = s0;
9090
9103
  return i.version = 0, -1;
9091
9104
  }
9092
9105
  }
9093
- function y(a, i, W) {
9094
- W < 16e3 && (i = 2);
9095
- for (var L = V.bitrate_table[i][1], Q = 2; Q <= 14; Q++)
9096
- V.bitrate_table[i][Q] > 0 && Math.abs(V.bitrate_table[i][Q] - a) < Math.abs(L - a) && (L = V.bitrate_table[i][Q]);
9106
+ function y(a, i, G) {
9107
+ G < 16e3 && (i = 2);
9108
+ for (var L = W.bitrate_table[i][1], Q = 2; Q <= 14; Q++)
9109
+ W.bitrate_table[i][Q] > 0 && Math.abs(W.bitrate_table[i][Q] - a) < Math.abs(L - a) && (L = W.bitrate_table[i][Q]);
9097
9110
  return L;
9098
9111
  }
9099
- function f(a, i, W) {
9100
- W < 16e3 && (i = 2);
9112
+ function f(a, i, G) {
9113
+ G < 16e3 && (i = 2);
9101
9114
  for (var L = 0; L <= 14; L++)
9102
- if (V.bitrate_table[i][L] > 0 && V.bitrate_table[i][L] == a)
9115
+ if (W.bitrate_table[i][L] > 0 && W.bitrate_table[i][L] == a)
9103
9116
  return L;
9104
9117
  return -1;
9105
9118
  }
9106
9119
  function w(a, i) {
9107
- var W = [
9120
+ var G = [
9108
9121
  new B(8, 2e3),
9109
9122
  new B(16, 3700),
9110
9123
  new B(24, 3900),
@@ -9123,16 +9136,16 @@ const a0 = s0;
9123
9136
  new B(256, 19700),
9124
9137
  new B(320, 20500)
9125
9138
  ], L = c.nearestBitrateFullIndex(i);
9126
- a.lowerlimit = W[L].lowpass;
9139
+ a.lowerlimit = G[L].lowpass;
9127
9140
  }
9128
9141
  function u(a) {
9129
- var i = a.internal_flags, W = 32;
9142
+ var i = a.internal_flags, G = 32;
9130
9143
  if (i.lowpass1 > 0) {
9131
9144
  for (var L = 999, Q = 0; Q <= 31; Q++) {
9132
9145
  var le = Q / 31;
9133
- le >= i.lowpass2 && (W = Math.min(W, Q)), i.lowpass1 < le && le < i.lowpass2 && (L = Math.min(L, Q));
9146
+ le >= i.lowpass2 && (G = Math.min(G, Q)), i.lowpass1 < le && le < i.lowpass2 && (L = Math.min(L, Q));
9134
9147
  }
9135
- L == 999 ? i.lowpass1 = (W - 0.75) / 31 : i.lowpass1 = (L - 0.75) / 31, i.lowpass2 = W / 31;
9148
+ L == 999 ? i.lowpass1 = (G - 0.75) / 31 : i.lowpass1 = (L - 0.75) / 31, i.lowpass2 = G / 31;
9136
9149
  }
9137
9150
  i.highpass2 > 0 && p(), i.highpass2 > 0 && p();
9138
9151
  for (var Q = 0; Q < 32; Q++) {
@@ -9200,16 +9213,16 @@ const a0 = s0;
9200
9213
  a.VBR_mean_bitrate_kbps,
9201
9214
  320
9202
9215
  ))), a.lowpassfreq == 0) {
9203
- var W = 16e3;
9216
+ var G = 16e3;
9204
9217
  switch (a.VBR) {
9205
9218
  case de.vbr_off: {
9206
9219
  var L = new E();
9207
- w(L, a.brate), W = L.lowerlimit;
9220
+ w(L, a.brate), G = L.lowerlimit;
9208
9221
  break;
9209
9222
  }
9210
9223
  case de.vbr_abr: {
9211
9224
  var L = new E();
9212
- w(L, a.VBR_mean_bitrate_kbps), W = L.lowerlimit;
9225
+ w(L, a.VBR_mean_bitrate_kbps), G = L.lowerlimit;
9213
9226
  break;
9214
9227
  }
9215
9228
  case de.vbr_rh:
@@ -9217,7 +9230,7 @@ const a0 = s0;
9217
9230
  default:
9218
9231
  p();
9219
9232
  }
9220
- a.mode == ze.MONO && (a.VBR == de.vbr_off || a.VBR == de.vbr_abr) && (W *= 1.5), a.lowpassfreq = W | 0;
9233
+ a.mode == ze.MONO && (a.VBR == de.vbr_off || a.VBR == de.vbr_abr) && (G *= 1.5), a.lowpassfreq = G | 0;
9221
9234
  }
9222
9235
  switch (a.out_samplerate == 0 && p(), a.lowpassfreq = Math.min(20500, a.lowpassfreq), a.lowpassfreq = Math.min(a.out_samplerate / 2, a.lowpassfreq), a.VBR == de.vbr_off && (a.compression_ratio = a.out_samplerate * 16 * i.channels_out / (1e3 * a.brate)), a.VBR == de.vbr_abr && p(), a.bWriteVbrTag || (a.findReplayGain = !1, a.decode_on_the_fly = !1, i.findPeakSample = !1), i.findReplayGain = a.findReplayGain, i.decode_on_the_fly = a.decode_on_the_fly, i.decode_on_the_fly && (i.findPeakSample = !0), i.findReplayGain && p(), i.decode_on_the_fly && !a.decode_only && p(), i.mode_gr = a.out_samplerate <= 24e3 ? 1 : 2, a.framesize = 576 * i.mode_gr, a.encoder_delay = s.ENCDELAY, i.resample_ratio = a.in_samplerate / a.out_samplerate, a.VBR) {
9223
9236
  case de.vbr_mt:
@@ -9297,7 +9310,7 @@ const a0 = s0;
9297
9310
  function H(a, i) {
9298
9311
  (a.in_buffer_0 == null || a.in_buffer_nsamples < i) && (a.in_buffer_0 = ie(i), a.in_buffer_1 = ie(i), a.in_buffer_nsamples = i);
9299
9312
  }
9300
- this.lame_encode_flush = function(a, i, W, L) {
9313
+ this.lame_encode_flush = function(a, i, G, L) {
9301
9314
  var Q = a.internal_flags, le = Oe([2, 1152]), _e = 0, Me, je, He, Ue, ht = Q.mf_samples_to_encode - s.POSTDELAY, vt = d(a);
9302
9315
  if (Q.mf_samples_to_encode < 1)
9303
9316
  return 0;
@@ -9309,18 +9322,18 @@ const a0 = s0;
9309
9322
  le[1],
9310
9323
  ot,
9311
9324
  i,
9312
- W,
9325
+ G,
9313
9326
  je
9314
- ), W += _e, Me += _e, Ue -= ct != a.frameNum ? 1 : 0;
9327
+ ), G += _e, Me += _e, Ue -= ct != a.frameNum ? 1 : 0;
9315
9328
  }
9316
9329
  return Q.mf_samples_to_encode = 0, _e < 0 || (je = L - Me, L == 0 && (je = 0), oe.flush_bitstream(a), _e = oe.copy_buffer(
9317
9330
  Q,
9318
9331
  i,
9319
- W,
9332
+ G,
9320
9333
  je,
9321
9334
  1
9322
- ), _e < 0) ? _e : (W += _e, Me += _e, je = L - Me, L == 0 && (je = 0), a.write_id3tag_automatic && p(), Me);
9323
- }, this.lame_encode_buffer = function(a, i, W, L, Q, le, _e) {
9335
+ ), _e < 0) ? _e : (G += _e, Me += _e, je = L - Me, L == 0 && (je = 0), a.write_id3tag_automatic && p(), Me);
9336
+ }, this.lame_encode_buffer = function(a, i, G, L, Q, le, _e) {
9324
9337
  var Me = a.internal_flags, je = [null, null];
9325
9338
  if (Me.Class_ID != t)
9326
9339
  return -3;
@@ -9328,7 +9341,7 @@ const a0 = s0;
9328
9341
  return 0;
9329
9342
  H(Me, L), je[0] = Me.in_buffer_0, je[1] = Me.in_buffer_1;
9330
9343
  for (var He = 0; He < L; He++)
9331
- je[0][He] = i[He], Me.channels_in > 1 && (je[1][He] = W[He]);
9344
+ je[0][He] = i[He], Me.channels_in > 1 && (je[1][He] = G[He]);
9332
9345
  return v(
9333
9346
  a,
9334
9347
  je[0],
@@ -9343,7 +9356,7 @@ const a0 = s0;
9343
9356
  var i = s.BLKSIZE + a.framesize - s.FFTOFFSET;
9344
9357
  return i = Math.max(i, 512 + a.framesize - 32), i;
9345
9358
  }
9346
- function v(a, i, W, L, Q, le, _e) {
9359
+ function v(a, i, G, L, Q, le, _e) {
9347
9360
  var Me = a.internal_flags, je = 0, He, Ue, ht, vt, ot, ct = [null, null], gt = [null, null];
9348
9361
  if (Me.Class_ID != t)
9349
9362
  return -3;
@@ -9351,7 +9364,7 @@ const a0 = s0;
9351
9364
  return 0;
9352
9365
  if (ot = oe.copy_buffer(Me, Q, le, _e, 0), ot < 0)
9353
9366
  return ot;
9354
- if (le += ot, je += ot, gt[0] = i, gt[1] = W, Xe.NEQ(a.scale, 0) && Xe.NEQ(a.scale, 1))
9367
+ if (le += ot, je += ot, gt[0] = i, gt[1] = G, Xe.NEQ(a.scale, 0) && Xe.NEQ(a.scale, 1))
9355
9368
  for (Ue = 0; Ue < L; ++Ue)
9356
9369
  gt[0][Ue] *= a.scale, Me.channels_out == 2 && (gt[1][Ue] *= a.scale);
9357
9370
  if (Xe.NEQ(a.scale_left, 0) && Xe.NEQ(a.scale_left, 1))
@@ -9400,11 +9413,11 @@ const a0 = s0;
9400
9413
  }
9401
9414
  return je;
9402
9415
  }
9403
- function M(a, i, W, L, Q, le) {
9416
+ function M(a, i, G, L, Q, le) {
9404
9417
  var _e = c.enc.lame_encode_mp3_frame(
9405
9418
  a,
9406
9419
  i,
9407
- W,
9420
+ G,
9408
9421
  L,
9409
9422
  Q,
9410
9423
  le
@@ -9414,18 +9427,18 @@ const a0 = s0;
9414
9427
  function x() {
9415
9428
  this.n_in = 0, this.n_out = 0;
9416
9429
  }
9417
- function C(a, i, W, L, Q, le) {
9430
+ function C(a, i, G, L, Q, le) {
9418
9431
  var _e = a.internal_flags;
9419
9432
  if (_e.resample_ratio < 0.9999 || _e.resample_ratio > 1.0001)
9420
9433
  p();
9421
9434
  else {
9422
9435
  le.n_out = Math.min(a.framesize, Q), le.n_in = le.n_out;
9423
9436
  for (var Me = 0; Me < le.n_out; ++Me)
9424
- i[0][_e.mf_size + Me] = W[0][L + Me], _e.channels_out == 2 && (i[1][_e.mf_size + Me] = W[1][L + Me]);
9437
+ i[0][_e.mf_size + Me] = G[0][L + Me], _e.channels_out == 2 && (i[1][_e.mf_size + Me] = G[1][L + Me]);
9425
9438
  }
9426
9439
  }
9427
9440
  }
9428
- function G() {
9441
+ function Z() {
9429
9442
  this.setModules = function(c, N) {
9430
9443
  };
9431
9444
  }
@@ -9441,13 +9454,13 @@ const a0 = s0;
9441
9454
  }
9442
9455
  function te(c, N, P) {
9443
9456
  c != 1 && p("fix cc: only supports mono");
9444
- var T = new se(), oe = new G(), g = new Ke(), z = new Xe(), re = new at(), j = new e(), ee = new S(), k = new Fe(), fe = new Be(), E = new U(), B = new Je(), t = new $e(), l = new ve(), A = new we();
9457
+ var T = new se(), oe = new Z(), g = new Ke(), z = new Xe(), re = new at(), j = new e(), ee = new S(), k = new Fe(), fe = new Be(), E = new U(), B = new Je(), t = new $e(), l = new ve(), A = new we();
9445
9458
  T.setModules(g, z, re, j, ee, k, fe, E, A), z.setModules(g, A, fe, k), E.setModules(z, fe), re.setModules(T), ee.setModules(z, B, j, t), j.setModules(t, B, T.enc.psy), B.setModules(z), t.setModules(j), k.setModules(T, z, fe), oe.setModules(l, A), l.setModules(fe, E, re);
9446
9459
  var F = T.lame_init();
9447
9460
  F.num_channels = c, F.in_samplerate = N, F.out_samplerate = N, F.brate = P, F.mode = ze.STEREO, F.quality = 3, F.bWriteVbrTag = !1, F.disable_reservoir = !0, F.write_id3tag_automatic = !1, T.lame_init_params(F);
9448
- var y = 1152, f = 0 | 1.25 * y + 7200, w = $(f);
9461
+ var y = 1152, f = 0 | 1.25 * y + 7200, w = q(f);
9449
9462
  this.encodeBuffer = function(u, I) {
9450
- c == 1 && (I = u), u.length > y && (y = u.length, f = 0 | 1.25 * y + 7200, w = $(f));
9463
+ c == 1 && (I = u), u.length > y && (y = u.length, f = 0 | 1.25 * y + 7200, w = q(f));
9451
9464
  var n = T.lame_encode_buffer(F, u, I, u.length, w, 0, f);
9452
9465
  return new Int8Array(w.subarray(0, n));
9453
9466
  }, this.flush = function() {
@@ -9460,12 +9473,12 @@ const a0 = s0;
9460
9473
  r(), _.lamejs = r;
9461
9474
  });
9462
9475
  (function(_) {
9463
- var r = typeof window == "object" && !!window.document, m = r ? window : Object, p = m.Recorder, $ = p.i18n;
9464
- _(p, $, $.$T, r);
9476
+ var r = typeof window == "object" && !!window.document, m = r ? window : Object, p = m.Recorder, q = p.i18n;
9477
+ _(p, q, q.$T, r);
9465
9478
  })(function(_, r, m, p) {
9466
- var $ = function(ie) {
9479
+ var q = function(ie) {
9467
9480
  return new K(ie);
9468
- }, Z = "WaveView", K = function(ie) {
9481
+ }, V = "WaveView", K = function(ie) {
9469
9482
  var ye = this, Re = {
9470
9483
  /*
9471
9484
  elem:"css selector" //自动显示到dom,并以此dom大小为显示大小
@@ -9499,7 +9512,7 @@ const a0 = s0;
9499
9512
  var Ve = ye.canvas = ie[Oe];
9500
9513
  else {
9501
9514
  if (!p)
9502
- throw new Error(m.G("NonBrowser-1", [Z]));
9515
+ throw new Error(m.G("NonBrowser-1", [V]));
9503
9516
  var Ze = ie.elem;
9504
9517
  Ze && (typeof Ze == "string" ? Ze = document.querySelector(Ze) : Ze.length && (Ze = Ze[0])), Ze && (ie.width = Ze.offsetWidth, ie.height = Ze.offsetHeight);
9505
9518
  var ue = ye.elem = document.createElement("div");
@@ -9509,12 +9522,12 @@ const a0 = s0;
9509
9522
  }
9510
9523
  var ge = ie.scale, Ce = ie.width * ge, Ye = ie.height * ge;
9511
9524
  if (!Ce || !Ye)
9512
- throw new Error(m.G("IllegalArgs-1", [Z + " width=0 height=0"]));
9525
+ throw new Error(m.G("IllegalArgs-1", [V + " width=0 height=0"]));
9513
9526
  Ve.width = Ce, Ve.height = Ye;
9514
9527
  var de = ye.ctx = Ve.getContext("2d");
9515
9528
  ye.linear1 = ye.genLinear(de, Ce, ie.linear1), ye.linear2 = ye.genLinear(de, Ce, ie.linear2), ye.linearBg = ye.genLinear(de, Ye, ie.linearBg, !0), ye._phase = 0;
9516
9529
  };
9517
- K.prototype = $.prototype = {
9530
+ K.prototype = q.prototype = {
9518
9531
  genLinear: function(ie, ye, Re, ke) {
9519
9532
  for (var Oe = ie.createLinearGradient(0, 0, ke ? 0 : ye, ke ? ye : 0), Ve = 0; Ve < Re.length; )
9520
9533
  Oe.addColorStop(Re[Ve++], Re[Ve++]);
@@ -9561,7 +9574,7 @@ const a0 = s0;
9561
9574
  ge == 0 ? Oe.moveTo(ge, ie[ue]) : Oe.lineTo(ge, ie[ue]);
9562
9575
  Oe.lineWidth = ke.lineWidth * Ve, Oe.strokeStyle = ye, Oe.stroke();
9563
9576
  }
9564
- }, _[Z] = $;
9577
+ }, _[V] = q;
9565
9578
  });
9566
9579
  const ta = {
9567
9580
  components: { InlineSvg: Gt },
@@ -9614,8 +9627,8 @@ const ta = {
9614
9627
  },
9615
9628
  methods: {
9616
9629
  formatMilliseconds(_) {
9617
- const r = Math.floor(_ / 1e3), m = Math.floor(r / 60), p = r % 60, $ = m.toString().padStart(2, "0"), Z = p.toString().padStart(2, "0");
9618
- return `${$}:${Z}`;
9630
+ const r = Math.floor(_ / 1e3), m = Math.floor(r / 60), p = r % 60, q = m.toString().padStart(2, "0"), V = p.toString().padStart(2, "0");
9631
+ return `${q}:${V}`;
9619
9632
  },
9620
9633
  start() {
9621
9634
  this.ready && (this.pending = !0, this.rec.start());
@@ -9696,34 +9709,34 @@ var o0 = {}, sa = {
9696
9709
  type: "video"
9697
9710
  }, e = new m(R, e);
9698
9711
  var o = this;
9699
- function h(G) {
9700
- return e.disableLogs || console.log("RecordRTC version: ", o.version), G && (e = new m(R, G)), e.disableLogs || console.log("started recording " + e.type + " stream."), ce ? (ce.clearRecordedData(), ce.record(), me("recording"), o.recordingDuration && ae(), o) : (b(function() {
9712
+ function h(Z) {
9713
+ return e.disableLogs || console.log("RecordRTC version: ", o.version), Z && (e = new m(R, Z)), e.disableLogs || console.log("started recording " + e.type + " stream."), ce ? (ce.clearRecordedData(), ce.record(), me("recording"), o.recordingDuration && ae(), o) : (b(function() {
9701
9714
  o.recordingDuration && ae();
9702
9715
  }), o);
9703
9716
  }
9704
- function b(G) {
9705
- G && (e.initCallback = function() {
9706
- G(), G = e.initCallback = null;
9717
+ function b(Z) {
9718
+ Z && (e.initCallback = function() {
9719
+ Z(), Z = e.initCallback = null;
9707
9720
  });
9708
9721
  var ve = new p(R, e);
9709
9722
  ce = new ve(R, e), ce.record(), me("recording"), e.disableLogs || console.log("Initialized recorderType:", ce.constructor.name, "for output-type:", e.type);
9710
9723
  }
9711
- function S(G) {
9712
- if (G = G || function() {
9724
+ function S(Z) {
9725
+ if (Z = Z || function() {
9713
9726
  }, !ce) {
9714
9727
  ne();
9715
9728
  return;
9716
9729
  }
9717
9730
  if (o.state === "paused") {
9718
9731
  o.resumeRecording(), setTimeout(function() {
9719
- S(G);
9732
+ S(Z);
9720
9733
  }, 1);
9721
9734
  return;
9722
9735
  }
9723
9736
  o.state !== "recording" && !e.disableLogs && console.warn('Recording state should be: "recording", however current state is: ', o.state), e.disableLogs || console.log("Stopped recording " + e.type + " stream."), e.type !== "gif" ? ce.stop(ve) : (ce.stop(), ve()), me("stopped");
9724
9737
  function ve(we) {
9725
9738
  if (!ce) {
9726
- typeof G.call == "function" ? G.call(o, "") : G("");
9739
+ typeof Z.call == "function" ? Z.call(o, "") : Z("");
9727
9740
  return;
9728
9741
  }
9729
9742
  Object.keys(ce).forEach(function(c) {
@@ -9735,15 +9748,15 @@ var o0 = {}, sa = {
9735
9748
  ce.blob = U = we;
9736
9749
  else
9737
9750
  throw "Recording failed.";
9738
- if (U && !e.disableLogs && console.log(U.type, "->", Ye(U.size)), G) {
9751
+ if (U && !e.disableLogs && console.log(U.type, "->", Ye(U.size)), Z) {
9739
9752
  var te;
9740
9753
  try {
9741
9754
  te = ke.createObjectURL(U);
9742
9755
  } catch {
9743
9756
  }
9744
- typeof G.call == "function" ? G.call(o, te) : G(te);
9757
+ typeof Z.call == "function" ? Z.call(o, te) : Z(te);
9745
9758
  }
9746
- e.autoWriteToDisk && q(function(c) {
9759
+ e.autoWriteToDisk && $(function(c) {
9747
9760
  var N = {};
9748
9761
  N[e.type + "Blob"] = c, rt.Store(N);
9749
9762
  });
@@ -9771,28 +9784,28 @@ var o0 = {}, sa = {
9771
9784
  }
9772
9785
  me("recording"), ce.resume(), e.disableLogs || console.log("Resumed recording.");
9773
9786
  }
9774
- function s(G) {
9775
- postMessage(new FileReaderSync().readAsDataURL(G));
9787
+ function s(Z) {
9788
+ postMessage(new FileReaderSync().readAsDataURL(Z));
9776
9789
  }
9777
- function q(G, ve) {
9778
- if (!G)
9790
+ function $(Z, ve) {
9791
+ if (!Z)
9779
9792
  throw "Pass a callback function over getDataURL.";
9780
9793
  var we = ve ? ve.blob : (ce || {}).blob;
9781
9794
  if (!we) {
9782
9795
  e.disableLogs || console.warn("Blob encoder did not finish its job yet."), setTimeout(function() {
9783
- q(G, ve);
9796
+ $(Z, ve);
9784
9797
  }, 1e3);
9785
9798
  return;
9786
9799
  }
9787
9800
  if (typeof Worker < "u" && !navigator.mozGetUserMedia) {
9788
9801
  var U = c(s);
9789
9802
  U.onmessage = function(N) {
9790
- G(N.data);
9803
+ Z(N.data);
9791
9804
  }, U.postMessage(we);
9792
9805
  } else {
9793
9806
  var te = new FileReader();
9794
9807
  te.readAsDataURL(we), te.onload = function(N) {
9795
- G(N.target.result);
9808
+ Z(N.target.result);
9796
9809
  };
9797
9810
  }
9798
9811
  function c(N) {
@@ -9808,25 +9821,25 @@ var o0 = {}, sa = {
9808
9821
  }
9809
9822
  }
9810
9823
  }
9811
- function ae(G) {
9812
- if (G = G || 0, o.state === "paused") {
9824
+ function ae(Z) {
9825
+ if (Z = Z || 0, o.state === "paused") {
9813
9826
  setTimeout(function() {
9814
- ae(G);
9827
+ ae(Z);
9815
9828
  }, 1e3);
9816
9829
  return;
9817
9830
  }
9818
9831
  if (o.state !== "stopped") {
9819
- if (G >= o.recordingDuration) {
9832
+ if (Z >= o.recordingDuration) {
9820
9833
  S(o.onRecordingStopped);
9821
9834
  return;
9822
9835
  }
9823
- G += 1e3, setTimeout(function() {
9824
- ae(G);
9836
+ Z += 1e3, setTimeout(function() {
9837
+ ae(Z);
9825
9838
  }, 1e3);
9826
9839
  }
9827
9840
  }
9828
- function me(G) {
9829
- o && (o.state = G, typeof o.onStateChanged.call == "function" ? o.onStateChanged.call(o, G) : o.onStateChanged(G));
9841
+ function me(Z) {
9842
+ o && (o.state = Z, typeof o.onStateChanged.call == "function" ? o.onStateChanged.call(o, Z) : o.onStateChanged(Z));
9830
9843
  }
9831
9844
  var be = 'It seems that recorder is destroyed or "startRecording" is not invoked for ' + e.type + " recorder.";
9832
9845
  function ne() {
@@ -9908,12 +9921,12 @@ var o0 = {}, sa = {
9908
9921
  * video.src = this.toURL();
9909
9922
  * });
9910
9923
  */
9911
- setRecordingDuration: function(G, ve) {
9912
- if (typeof G > "u")
9924
+ setRecordingDuration: function(Z, ve) {
9925
+ if (typeof Z > "u")
9913
9926
  throw "recordingDuration is required.";
9914
- if (typeof G != "number")
9927
+ if (typeof Z != "number")
9915
9928
  throw "recordingDuration must be a number.";
9916
- return o.recordingDuration = G, o.onRecordingStopped = ve || function() {
9929
+ return o.recordingDuration = Z, o.onRecordingStopped = ve || function() {
9917
9930
  }, {
9918
9931
  onRecordingStopped: function(we) {
9919
9932
  o.onRecordingStopped = we;
@@ -9975,7 +9988,7 @@ var o0 = {}, sa = {
9975
9988
  * });
9976
9989
  * });
9977
9990
  */
9978
- getDataURL: q,
9991
+ getDataURL: $,
9979
9992
  /**
9980
9993
  * Get virtual/temporary URL. Usage of this URL is limited to current tab.
9981
9994
  * @method
@@ -10024,12 +10037,12 @@ var o0 = {}, sa = {
10024
10037
  * invokeSaveAsDialog(this.getBlob(), 'filename.webm');
10025
10038
  * });
10026
10039
  */
10027
- save: function(G) {
10040
+ save: function(Z) {
10028
10041
  if (!ce) {
10029
10042
  ne();
10030
10043
  return;
10031
10044
  }
10032
- de(ce.blob, G);
10045
+ de(ce.blob, Z);
10033
10046
  },
10034
10047
  /**
10035
10048
  * This method gets a blob from indexed-DB storage.
@@ -10042,12 +10055,12 @@ var o0 = {}, sa = {
10042
10055
  * video.src = dataURL;
10043
10056
  * });
10044
10057
  */
10045
- getFromDisk: function(G) {
10058
+ getFromDisk: function(Z) {
10046
10059
  if (!ce) {
10047
10060
  ne();
10048
10061
  return;
10049
10062
  }
10050
- r.getFromDisk(e.type, G);
10063
+ r.getFromDisk(e.type, Z);
10051
10064
  },
10052
10065
  /**
10053
10066
  * This method appends an array of webp images to the recorded video-blob. It takes an "array" object.
@@ -10065,12 +10078,12 @@ var o0 = {}, sa = {
10065
10078
  * });
10066
10079
  * recorder.setAdvertisementArray(arrayOfWebPImages);
10067
10080
  */
10068
- setAdvertisementArray: function(G) {
10081
+ setAdvertisementArray: function(Z) {
10069
10082
  e.advertisement = [];
10070
- for (var ve = G.length, we = 0; we < ve; we++)
10083
+ for (var ve = Z.length, we = 0; we < ve; we++)
10071
10084
  e.advertisement.push({
10072
10085
  duration: we,
10073
- image: G[we]
10086
+ image: Z[we]
10074
10087
  });
10075
10088
  },
10076
10089
  /**
@@ -10148,8 +10161,8 @@ var o0 = {}, sa = {
10148
10161
  * console.log('Recorder state: ', state);
10149
10162
  * };
10150
10163
  */
10151
- onStateChanged: function(G) {
10152
- e.disableLogs || console.log("Recorder state changed:", G);
10164
+ onStateChanged: function(Z) {
10165
+ e.disableLogs || console.log("Recorder state changed:", Z);
10153
10166
  },
10154
10167
  /**
10155
10168
  * A recorder can have inactive, recording, paused or stopped states.
@@ -10186,10 +10199,10 @@ var o0 = {}, sa = {
10186
10199
  * recorder.destroy();
10187
10200
  */
10188
10201
  destroy: function() {
10189
- var G = e.disableLogs;
10202
+ var Z = e.disableLogs;
10190
10203
  e = {
10191
10204
  disableLogs: !0
10192
- }, o.reset(), me("destroyed"), pe = o = null, at.AudioContextConstructor && (at.AudioContextConstructor.close(), at.AudioContextConstructor = null), e.disableLogs = G, e.disableLogs || console.log("RecordRTC is destroyed.");
10205
+ }, o.reset(), me("destroyed"), pe = o = null, at.AudioContextConstructor && (at.AudioContextConstructor.close(), at.AudioContextConstructor = null), e.disableLogs = Z, e.disableLogs || console.log("RecordRTC is destroyed.");
10193
10206
  },
10194
10207
  /**
10195
10208
  * RecordRTC version number
@@ -10274,7 +10287,7 @@ var o0 = {}, sa = {
10274
10287
  * @param {object} config - {type:"video", disableLogs: true, numberOfAudioChannels: 1, bufferSize: 0, sampleRate: 0, video: HTMLVideoElement, getNativeBlob:true, etc.}
10275
10288
  */
10276
10289
  function m(R, e) {
10277
- return !e.recorderType && !e.type && (e.audio && e.video ? e.type = "video" : e.audio && !e.video && (e.type = "audio")), e.recorderType && !e.type && (e.recorderType === V || e.recorderType === Le || typeof De < "u" && e.recorderType === De ? e.type = "video" : e.recorderType === qe ? e.type = "gif" : e.recorderType === Xe ? e.type = "audio" : e.recorderType === Fe && (Be(R, "audio").length && Be(R, "video").length || !Be(R, "audio").length && Be(R, "video").length ? e.type = "video" : Be(R, "audio").length && !Be(R, "video").length && (e.type = "audio"))), typeof Fe < "u" && typeof MediaRecorder < "u" && "requestData" in MediaRecorder.prototype && (e.mimeType || (e.mimeType = "video/webm"), e.type || (e.type = e.mimeType.split("/")[0]), e.bitsPerSecond), e.type || (e.mimeType && (e.type = e.mimeType.split("/")[0]), e.type || (e.type = "audio")), e;
10290
+ return !e.recorderType && !e.type && (e.audio && e.video ? e.type = "video" : e.audio && !e.video && (e.type = "audio")), e.recorderType && !e.type && (e.recorderType === W || e.recorderType === Le || typeof De < "u" && e.recorderType === De ? e.type = "video" : e.recorderType === qe ? e.type = "gif" : e.recorderType === Xe ? e.type = "audio" : e.recorderType === Fe && (Be(R, "audio").length && Be(R, "video").length || !Be(R, "audio").length && Be(R, "video").length ? e.type = "video" : Be(R, "audio").length && !Be(R, "video").length && (e.type = "audio"))), typeof Fe < "u" && typeof MediaRecorder < "u" && "requestData" in MediaRecorder.prototype && (e.mimeType || (e.mimeType = "video/webm"), e.type || (e.type = e.mimeType.split("/")[0]), e.bitsPerSecond), e.type || (e.mimeType && (e.type = e.mimeType.split("/")[0]), e.type || (e.type = "audio")), e;
10278
10291
  }
10279
10292
  /**
10280
10293
  * {@link GetRecorderType} is an inner/private helper for {@link RecordRTC}.
@@ -10292,7 +10305,7 @@ var o0 = {}, sa = {
10292
10305
  */
10293
10306
  function p(R, e) {
10294
10307
  var o;
10295
- return (ue || Oe || Ve) && (o = Xe), typeof MediaRecorder < "u" && "requestData" in MediaRecorder.prototype && !ue && (o = Fe), e.type === "video" && (ue || Ve) && (o = V, typeof De < "u" && typeof ReadableStream < "u" && (o = De)), e.type === "gif" && (o = qe), e.type === "canvas" && (o = Le), Je() && o !== Le && o !== qe && typeof MediaRecorder < "u" && "requestData" in MediaRecorder.prototype && (Be(R, "video").length || Be(R, "audio").length) && (e.type === "audio" ? typeof MediaRecorder.isTypeSupported == "function" && MediaRecorder.isTypeSupported("audio/webm") && (o = Fe) : typeof MediaRecorder.isTypeSupported == "function" && MediaRecorder.isTypeSupported("video/webm") && (o = Fe)), R instanceof Array && R.length && (o = Mt), e.recorderType && (o = e.recorderType), !e.disableLogs && o && o.name && console.log("Using recorderType:", o.name || o.constructor.name), !o && ge && (o = Fe), o;
10308
+ return (ue || Oe || Ve) && (o = Xe), typeof MediaRecorder < "u" && "requestData" in MediaRecorder.prototype && !ue && (o = Fe), e.type === "video" && (ue || Ve) && (o = W, typeof De < "u" && typeof ReadableStream < "u" && (o = De)), e.type === "gif" && (o = qe), e.type === "canvas" && (o = Le), Je() && o !== Le && o !== qe && typeof MediaRecorder < "u" && "requestData" in MediaRecorder.prototype && (Be(R, "video").length || Be(R, "audio").length) && (e.type === "audio" ? typeof MediaRecorder.isTypeSupported == "function" && MediaRecorder.isTypeSupported("audio/webm") && (o = Fe) : typeof MediaRecorder.isTypeSupported == "function" && MediaRecorder.isTypeSupported("video/webm") && (o = Fe)), R instanceof Array && R.length && (o = Mt), e.recorderType && (o = e.recorderType), !e.disableLogs && o && o.name && console.log("Using recorderType:", o.name || o.constructor.name), !o && ge && (o = Fe), o;
10296
10309
  }
10297
10310
  /**
10298
10311
  * MRecordRTC runs on top of {@link RecordRTC} to bring multiple recordings in a single place, by providing simple API.
@@ -10321,7 +10334,7 @@ var o0 = {}, sa = {
10321
10334
  * @param {MediaStream} mediaStream - MediaStream object fetched using getUserMedia API or generated using captureStreamUntilEnded or WebAudio API.
10322
10335
  * @requires {@link RecordRTC}
10323
10336
  */
10324
- function $(R) {
10337
+ function q(R) {
10325
10338
  this.addStream = function(e) {
10326
10339
  e && (R = e);
10327
10340
  }, this.mediaType = {
@@ -10350,7 +10363,7 @@ var o0 = {}, sa = {
10350
10363
  var b = R;
10351
10364
  if (Je() && e.audio && typeof e.audio == "function") {
10352
10365
  var S = Be(R, "video")[0];
10353
- Ze ? (b = new Ce(), b.addTrack(S), o && o === V && (o = Fe)) : (b = new Ce(), b.addTrack(S));
10366
+ Ze ? (b = new Ce(), b.addTrack(S), o && o === W && (o = Fe)) : (b = new Ce(), b.addTrack(S));
10354
10367
  }
10355
10368
  this.videoRecorder = new r(b, {
10356
10369
  type: "video",
@@ -10425,8 +10438,8 @@ var o0 = {}, sa = {
10425
10438
  });
10426
10439
  function o(b, S) {
10427
10440
  if (typeof Worker < "u") {
10428
- var Y = h(function(q) {
10429
- postMessage(new FileReaderSync().readAsDataURL(q));
10441
+ var Y = h(function($) {
10442
+ postMessage(new FileReaderSync().readAsDataURL($));
10430
10443
  });
10431
10444
  Y.onmessage = function(s) {
10432
10445
  S(s.data);
@@ -10467,11 +10480,11 @@ var o0 = {}, sa = {
10467
10480
  }, e.audio && this.audioRecorder && this.audioRecorder.save(typeof e.audio == "string" ? e.audio : ""), e.video && this.videoRecorder && this.videoRecorder.save(typeof e.video == "string" ? e.video : ""), e.gif && this.gifRecorder && this.gifRecorder.save(typeof e.gif == "string" ? e.gif : "");
10468
10481
  };
10469
10482
  }
10470
- $.getFromDisk = r.getFromDisk, $.writeToDisk = r.writeToDisk, typeof r < "u" && (r.MRecordRTC = $);
10471
- var Z = "Fake/5.0 (FakeOS) AppleWebKit/123 (KHTML, like Gecko) Fake/12.3.4567.89 Fake/123.45";
10483
+ q.getFromDisk = r.getFromDisk, q.writeToDisk = r.writeToDisk, typeof r < "u" && (r.MRecordRTC = q);
10484
+ var V = "Fake/5.0 (FakeOS) AppleWebKit/123 (KHTML, like Gecko) Fake/12.3.4567.89 Fake/123.45";
10472
10485
  (function(R) {
10473
10486
  R && (typeof window < "u" || typeof bt > "u" || (bt.navigator = {
10474
- userAgent: Z,
10487
+ userAgent: V,
10475
10488
  getUserMedia: function() {
10476
10489
  }
10477
10490
  }, bt.console || (bt.console = {}), (typeof bt.console.log > "u" || typeof bt.console.error > "u") && (bt.console.error = bt.console.log = bt.console.log || function() {
@@ -10602,7 +10615,7 @@ var o0 = {}, sa = {
10602
10615
  D.forEach(function(me) {
10603
10616
  o.read(me);
10604
10617
  }), o.stop();
10605
- var s = b.makeMetadataSeekable(o.metadatas, o.duration, o.cues), q = this.result.slice(o.metadataSize), ae = new Blob([s, q], {
10618
+ var s = b.makeMetadataSeekable(o.metadatas, o.duration, o.cues), $ = this.result.slice(o.metadataSize), ae = new Blob([s, $], {
10606
10619
  type: "video/webm"
10607
10620
  });
10608
10621
  e(ae);
@@ -10676,7 +10689,7 @@ var o0 = {}, sa = {
10676
10689
  this.getArrayOfBlobs = function() {
10677
10690
  return h;
10678
10691
  }, this.record = function() {
10679
- ae.blob = null, ae.clearRecordedData(), ae.timestamps = [], q = [], h = [];
10692
+ ae.blob = null, ae.clearRecordedData(), ae.timestamps = [], $ = [], h = [];
10680
10693
  var me = e;
10681
10694
  e.disableLogs || console.log("Passing following config over MediaRecorder API.", me), D && (D = null), ue && !Je() && (me = "video/vp8"), typeof MediaRecorder.isTypeSupported == "function" && me.mimeType && (MediaRecorder.isTypeSupported(me.mimeType) || (e.disableLogs || console.warn("MediaRecorder API seems unable to record mimeType:", me.mimeType), me.mimeType = e.type === "audio" ? "audio/webm" : "video/webm"));
10682
10695
  try {
@@ -10685,7 +10698,7 @@ var o0 = {}, sa = {
10685
10698
  D = new MediaRecorder(R);
10686
10699
  }
10687
10700
  me.mimeType && !MediaRecorder.isTypeSupported && "canRecordMimeType" in D && D.canRecordMimeType(me.mimeType) === !1 && (e.disableLogs || console.warn("MediaRecorder API seems unable to record mimeType:", me.mimeType)), D.ondataavailable = function(be) {
10688
- if (be.data && q.push("ondataavailable: " + Ye(be.data.size)), typeof e.timeSlice == "number") {
10701
+ if (be.data && $.push("ondataavailable: " + Ye(be.data.size)), typeof e.timeSlice == "number") {
10689
10702
  if (be.data && be.data.size && (h.push(be.data), b(), typeof e.ondataavailable == "function")) {
10690
10703
  var ne = e.getNativeBlob ? be.data : new Blob([be.data], {
10691
10704
  type: S(me)
@@ -10704,15 +10717,15 @@ var o0 = {}, sa = {
10704
10717
  type: S(me)
10705
10718
  }), ae.recordingCallback && (ae.recordingCallback(ae.blob), ae.recordingCallback = null);
10706
10719
  }, D.onstart = function() {
10707
- q.push("started");
10720
+ $.push("started");
10708
10721
  }, D.onpause = function() {
10709
- q.push("paused");
10722
+ $.push("paused");
10710
10723
  }, D.onresume = function() {
10711
- q.push("resumed");
10724
+ $.push("resumed");
10712
10725
  }, D.onstop = function() {
10713
- q.push("stopped");
10726
+ $.push("stopped");
10714
10727
  }, D.onerror = function(be) {
10715
- be && (be.name || (be.name = "UnknownError"), q.push("error: " + be), e.disableLogs || (be.name.toString().toLowerCase().indexOf("invalidstate") !== -1 ? console.error("The MediaRecorder is not in a state in which the proposed operation is allowed to be executed.", be) : be.name.toString().toLowerCase().indexOf("notsupported") !== -1 ? console.error("MIME type (", me.mimeType, ") is not supported.", be) : be.name.toString().toLowerCase().indexOf("security") !== -1 ? console.error("MediaRecorder security error", be) : be.name === "OutOfMemory" ? console.error("The UA has exhaused the available memory. User agents SHOULD provide as much additional information as possible in the message attribute.", be) : be.name === "IllegalStreamModification" ? console.error("A modification to the stream has occurred that makes it impossible to continue recording. An example would be the addition of a Track while recording is occurring. User agents SHOULD provide as much additional information as possible in the message attribute.", be) : be.name === "OtherRecordingError" ? console.error("Used for an fatal error other than those listed above. User agents SHOULD provide as much additional information as possible in the message attribute.", be) : be.name === "GenericError" ? console.error("The UA cannot provide the codec or recording option that has been requested.", be) : console.error("MediaRecorder Error", be)), function(ne) {
10728
+ be && (be.name || (be.name = "UnknownError"), $.push("error: " + be), e.disableLogs || (be.name.toString().toLowerCase().indexOf("invalidstate") !== -1 ? console.error("The MediaRecorder is not in a state in which the proposed operation is allowed to be executed.", be) : be.name.toString().toLowerCase().indexOf("notsupported") !== -1 ? console.error("MIME type (", me.mimeType, ") is not supported.", be) : be.name.toString().toLowerCase().indexOf("security") !== -1 ? console.error("MediaRecorder security error", be) : be.name === "OutOfMemory" ? console.error("The UA has exhaused the available memory. User agents SHOULD provide as much additional information as possible in the message attribute.", be) : be.name === "IllegalStreamModification" ? console.error("A modification to the stream has occurred that makes it impossible to continue recording. An example would be the addition of a Track while recording is occurring. User agents SHOULD provide as much additional information as possible in the message attribute.", be) : be.name === "OtherRecordingError" ? console.error("Used for an fatal error other than those listed above. User agents SHOULD provide as much additional information as possible in the message attribute.", be) : be.name === "GenericError" ? console.error("The UA cannot provide the codec or recording option that has been requested.", be) : console.error("MediaRecorder Error", be)), function(ne) {
10716
10729
  if (!ae.manuallyStopped && D && D.state === "inactive") {
10717
10730
  delete e.timeslice, D.start(10 * 60 * 1e3);
10718
10731
  return;
@@ -10759,9 +10772,9 @@ var o0 = {}, sa = {
10759
10772
  this.blob = null, this.getState = function() {
10760
10773
  return D && D.state || "inactive";
10761
10774
  };
10762
- var q = [];
10775
+ var $ = [];
10763
10776
  this.getAllStates = function() {
10764
- return q;
10777
+ return $;
10765
10778
  }, typeof e.checkForInactiveTracks > "u" && (e.checkForInactiveTracks = !1);
10766
10779
  var ae = this;
10767
10780
  (function me() {
@@ -10801,7 +10814,7 @@ var o0 = {}, sa = {
10801
10814
  if (!Be(R, "audio").length)
10802
10815
  throw "Your stream has no audio tracks.";
10803
10816
  e = e || {};
10804
- var o = this, h = [], b = [], S = !1, Y = 0, D, s = 2, q = e.desiredSampRate;
10817
+ var o = this, h = [], b = [], S = !1, Y = 0, D, s = 2, $ = e.desiredSampRate;
10805
10818
  e.leftChannel === !0 && (s = 1), e.numberOfAudioChannels === 1 && (s = 1), (!s || s < 1) && (s = 2), e.disableLogs || console.log("StereoAudioRecorder is set to record number of channels: " + s), typeof e.checkForInactiveTracks > "u" && (e.checkForInactiveTracks = !0);
10806
10819
  function ae() {
10807
10820
  if (e.checkForInactiveTracks === !1)
@@ -10823,31 +10836,31 @@ var o0 = {}, sa = {
10823
10836
  var ee = re.numberOfAudioChannels, k = re.leftBuffers.slice(0), fe = re.rightBuffers.slice(0), E = re.sampleRate, B = re.internalInterleavedLength, t = re.desiredSampRate;
10824
10837
  ee === 2 && (k = F(k, B), fe = F(fe, B), t && (k = l(k, t, E), fe = l(fe, t, E))), ee === 1 && (k = F(k, B), t && (k = l(k, t, E))), t && (E = t);
10825
10838
  function l(C, a, i) {
10826
- var W = Math.round(C.length * (a / i)), L = [], Q = Number((C.length - 1) / (W - 1));
10839
+ var G = Math.round(C.length * (a / i)), L = [], Q = Number((C.length - 1) / (G - 1));
10827
10840
  L[0] = C[0];
10828
- for (var le = 1; le < W - 1; le++) {
10841
+ for (var le = 1; le < G - 1; le++) {
10829
10842
  var _e = le * Q, Me = Number(Math.floor(_e)).toFixed(), je = Number(Math.ceil(_e)).toFixed(), He = _e - Me;
10830
10843
  L[le] = A(C[Me], C[je], He);
10831
10844
  }
10832
- return L[W - 1] = C[C.length - 1], L;
10845
+ return L[G - 1] = C[C.length - 1], L;
10833
10846
  }
10834
10847
  function A(C, a, i) {
10835
10848
  return C + (a - C) * i;
10836
10849
  }
10837
10850
  function F(C, a) {
10838
- for (var i = new Float64Array(a), W = 0, L = C.length, Q = 0; Q < L; Q++) {
10851
+ for (var i = new Float64Array(a), G = 0, L = C.length, Q = 0; Q < L; Q++) {
10839
10852
  var le = C[Q];
10840
- i.set(le, W), W += le.length;
10853
+ i.set(le, G), G += le.length;
10841
10854
  }
10842
10855
  return i;
10843
10856
  }
10844
10857
  function y(C, a) {
10845
- for (var i = C.length + a.length, W = new Float64Array(i), L = 0, Q = 0; Q < i; )
10846
- W[Q++] = C[L], W[Q++] = a[L], L++;
10847
- return W;
10858
+ for (var i = C.length + a.length, G = new Float64Array(i), L = 0, Q = 0; Q < i; )
10859
+ G[Q++] = C[L], G[Q++] = a[L], L++;
10860
+ return G;
10848
10861
  }
10849
10862
  function f(C, a, i) {
10850
- for (var W = i.length, L = 0; L < W; L++)
10863
+ for (var G = i.length, L = 0; L < G; L++)
10851
10864
  C.setUint8(a + L, i.charCodeAt(L));
10852
10865
  }
10853
10866
  var w;
@@ -10889,8 +10902,8 @@ var o0 = {}, sa = {
10889
10902
  this.stop = function(T) {
10890
10903
  T = T || function() {
10891
10904
  }, S = !1, me({
10892
- desiredSampRate: q,
10893
- sampleRate: G,
10905
+ desiredSampRate: $,
10906
+ sampleRate: Z,
10894
10907
  numberOfAudioChannels: s,
10895
10908
  internalInterleavedLength: Y,
10896
10909
  leftBuffers: h,
@@ -10899,7 +10912,7 @@ var o0 = {}, sa = {
10899
10912
  }, function(oe, g) {
10900
10913
  o.blob = new Blob([g], {
10901
10914
  type: "audio/wav"
10902
- }), o.buffer = new ArrayBuffer(g.buffer.byteLength), o.view = g, o.sampleRate = q || G, o.bufferSize = se, o.length = Y, te = !1, T && T(o.blob);
10915
+ }), o.buffer = new ArrayBuffer(g.buffer.byteLength), o.view = g, o.sampleRate = $ || Z, o.bufferSize = se, o.length = Y, te = !1, T && T(o.blob);
10903
10916
  });
10904
10917
  }, typeof r.Storage > "u" && (r.Storage = {
10905
10918
  AudioContextConstructor: null,
@@ -10913,8 +10926,8 @@ var o0 = {}, sa = {
10913
10926
  else
10914
10927
  throw "WebAudio API has no support on this browser.";
10915
10928
  ce.connect(D), e.bufferSize || (se = D.bufferSize);
10916
- var G = typeof e.sampleRate < "u" ? e.sampleRate : ne.sampleRate || 44100;
10917
- (G < 22050 || G > 96e3) && (e.disableLogs || console.log("sample-rate must be under range 22050 and 96000.")), e.disableLogs || e.desiredSampRate && console.log("Desired sample-rate: " + e.desiredSampRate);
10929
+ var Z = typeof e.sampleRate < "u" ? e.sampleRate : ne.sampleRate || 44100;
10930
+ (Z < 22050 || Z > 96e3) && (e.disableLogs || console.log("sample-rate must be under range 22050 and 96000.")), e.disableLogs || e.desiredSampRate && console.log("Desired sample-rate: " + e.desiredSampRate);
10918
10931
  var ve = !1;
10919
10932
  this.pause = function() {
10920
10933
  ve = !0;
@@ -10930,7 +10943,7 @@ var o0 = {}, sa = {
10930
10943
  e.checkForInactiveTracks = !1, S && this.stop(U), U();
10931
10944
  };
10932
10945
  function we() {
10933
- h = [], b = [], Y = 0, te = !1, S = !1, ve = !1, ne = null, o.leftchannel = h, o.rightchannel = b, o.numberOfAudioChannels = s, o.desiredSampRate = q, o.sampleRate = G, o.recordingLength = Y, N = {
10946
+ h = [], b = [], Y = 0, te = !1, S = !1, ve = !1, ne = null, o.leftchannel = h, o.rightchannel = b, o.numberOfAudioChannels = s, o.desiredSampRate = $, o.sampleRate = Z, o.recordingLength = Y, N = {
10934
10947
  left: [],
10935
10948
  right: [],
10936
10949
  recordingLength: 0
@@ -10958,7 +10971,7 @@ var o0 = {}, sa = {
10958
10971
  Y += se, o.recordingLength = Y, typeof e.timeSlice < "u" && (N.recordingLength += se, N.left.push(g), s === 2 && N.right.push(re));
10959
10972
  }
10960
10973
  }
10961
- D.onaudioprocess = c, ne.createMediaStreamDestination ? D.connect(ne.createMediaStreamDestination()) : D.connect(ne.destination), this.leftchannel = h, this.rightchannel = b, this.numberOfAudioChannels = s, this.desiredSampRate = q, this.sampleRate = G, o.recordingLength = Y;
10974
+ D.onaudioprocess = c, ne.createMediaStreamDestination ? D.connect(ne.createMediaStreamDestination()) : D.connect(ne.destination), this.leftchannel = h, this.rightchannel = b, this.numberOfAudioChannels = s, this.desiredSampRate = $, this.sampleRate = Z, o.recordingLength = Y;
10962
10975
  var N = {
10963
10976
  left: [],
10964
10977
  right: [],
@@ -10966,8 +10979,8 @@ var o0 = {}, sa = {
10966
10979
  };
10967
10980
  function P() {
10968
10981
  !S || typeof e.ondataavailable != "function" || typeof e.timeSlice > "u" || (N.left.length ? (me({
10969
- desiredSampRate: q,
10970
- sampleRate: G,
10982
+ desiredSampRate: $,
10983
+ sampleRate: Z,
10971
10984
  numberOfAudioChannels: s,
10972
10985
  internalInterleavedLength: N.recordingLength,
10973
10986
  leftBuffers: N.left,
@@ -11046,10 +11059,10 @@ var o0 = {}, sa = {
11046
11059
  return;
11047
11060
  }
11048
11061
  var se = ce.frames.length;
11049
- ce.frames.forEach(function(G, ve) {
11062
+ ce.frames.forEach(function(Z, ve) {
11050
11063
  var we = se - ve;
11051
11064
  e.disableLogs || console.log(we + "/" + se + " frames remaining"), e.onEncodingCallback && e.onEncodingCallback(we, se);
11052
- var U = G.image.toDataURL("image/webp", 1);
11065
+ var U = Z.image.toDataURL("image/webp", 1);
11053
11066
  ce.frames[ve].image = U;
11054
11067
  }), e.disableLogs || console.log("Generating WebM"), pe();
11055
11068
  }, this.stop = function(pe) {
@@ -11060,21 +11073,21 @@ var o0 = {}, sa = {
11060
11073
  return;
11061
11074
  }
11062
11075
  this.getWebPImages(function() {
11063
- ce.compile(function(G) {
11064
- e.disableLogs || console.log("Recording finished!"), se.blob = G, se.blob.forEach && (se.blob = new Blob([], {
11076
+ ce.compile(function(Z) {
11077
+ e.disableLogs || console.log("Recording finished!"), se.blob = Z, se.blob.forEach && (se.blob = new Blob([], {
11065
11078
  type: "video/webm"
11066
11079
  })), pe && pe(se.blob), ce.frames = [];
11067
11080
  });
11068
11081
  });
11069
11082
  };
11070
- var q = !1;
11083
+ var $ = !1;
11071
11084
  this.pause = function() {
11072
- if (q = !0, D instanceof Fe) {
11085
+ if ($ = !0, D instanceof Fe) {
11073
11086
  D.pause();
11074
11087
  return;
11075
11088
  }
11076
11089
  }, this.resume = function() {
11077
- if (q = !1, D instanceof Fe) {
11090
+ if ($ = !1, D instanceof Fe) {
11078
11091
  D.resume();
11079
11092
  return;
11080
11093
  }
@@ -11083,7 +11096,7 @@ var o0 = {}, sa = {
11083
11096
  s && this.stop(ae), ae();
11084
11097
  };
11085
11098
  function ae() {
11086
- ce.frames = [], s = !1, q = !1;
11099
+ ce.frames = [], s = !1, $ = !1;
11087
11100
  }
11088
11101
  this.name = "CanvasRecorder", this.toString = function() {
11089
11102
  return this.name;
@@ -11093,7 +11106,7 @@ var o0 = {}, sa = {
11093
11106
  return pe.width = R.width, pe.height = R.height, se.drawImage(R, 0, 0), pe;
11094
11107
  }
11095
11108
  function be() {
11096
- if (q)
11109
+ if ($)
11097
11110
  return ne = new Date().getTime(), setTimeout(be, 500);
11098
11111
  if (R.nodeName.toLowerCase() === "canvas") {
11099
11112
  var pe = new Date().getTime() - ne;
@@ -11106,12 +11119,12 @@ var o0 = {}, sa = {
11106
11119
  html2canvas(R, {
11107
11120
  grabMouse: typeof e.showMousePointer > "u" || e.showMousePointer,
11108
11121
  onrendered: function(se) {
11109
- var G = new Date().getTime() - ne;
11110
- if (!G)
11122
+ var Z = new Date().getTime() - ne;
11123
+ if (!Z)
11111
11124
  return setTimeout(be, e.frameInterval);
11112
11125
  ne = new Date().getTime(), ce.frames.push({
11113
11126
  image: se.toDataURL("image/webp", 1),
11114
- duration: G
11127
+ duration: Z
11115
11128
  }), s && setTimeout(be, e.frameInterval);
11116
11129
  }
11117
11130
  });
@@ -11136,7 +11149,7 @@ var o0 = {}, sa = {
11136
11149
  * @param {MediaStream} mediaStream - MediaStream object fetched using getUserMedia API or generated using captureStreamUntilEnded or WebAudio API.
11137
11150
  * @param {object} config - {disableLogs: true, initCallback: function, video: HTMLVideoElement, etc.}
11138
11151
  */
11139
- function V(R, e) {
11152
+ function W(R, e) {
11140
11153
  e = e || {}, e.frameInterval || (e.frameInterval = 10), e.disableLogs || console.log("Using frames-interval:", e.frameInterval), this.record = function() {
11141
11154
  e.width || (e.width = 320), e.height || (e.height = 240), e.video || (e.video = {
11142
11155
  width: e.width,
@@ -11144,7 +11157,7 @@ var o0 = {}, sa = {
11144
11157
  }), e.canvas || (e.canvas = {
11145
11158
  width: e.width,
11146
11159
  height: e.height
11147
- }), s.width = e.canvas.width || 320, s.height = e.canvas.height || 240, q = s.getContext("2d"), e.video && e.video instanceof HTMLVideoElement ? (ae = e.video.cloneNode(), e.initCallback && e.initCallback()) : (ae = document.createElement("video"), $e(R, ae), ae.onloadedmetadata = function() {
11160
+ }), s.width = e.canvas.width || 320, s.height = e.canvas.height || 240, $ = s.getContext("2d"), e.video && e.video instanceof HTMLVideoElement ? (ae = e.video.cloneNode(), e.initCallback && e.initCallback()) : (ae = document.createElement("video"), $e(R, ae), ae.onloadedmetadata = function() {
11148
11161
  e.initCallback && e.initCallback();
11149
11162
  }, ae.width = e.video.width, ae.height = e.video.height), ae.muted = !0, ae.play(), me = new Date().getTime(), be = new pt.Video(), e.disableLogs || (console.log("canvas resolutions", s.width, "*", s.height), console.log("video width/height", ae.width || s.width, "*", ae.height || s.height)), o(e.frameInterval);
11150
11163
  };
@@ -11155,7 +11168,7 @@ var o0 = {}, sa = {
11155
11168
  return setTimeout(o, ne, ne);
11156
11169
  if (Y)
11157
11170
  return me = new Date().getTime(), setTimeout(o, 100);
11158
- me = new Date().getTime(), ae.paused && ae.play(), q.drawImage(ae, 0, 0, s.width, s.height), be.frames.push({
11171
+ me = new Date().getTime(), ae.paused && ae.play(), $.drawImage(ae, 0, 0, s.width, s.height), be.frames.push({
11159
11172
  duration: ce,
11160
11173
  image: s.toDataURL("image/webp")
11161
11174
  }), S || setTimeout(o, ne, ne);
@@ -11172,7 +11185,7 @@ var o0 = {}, sa = {
11172
11185
  }, 1);
11173
11186
  })();
11174
11187
  }
11175
- function b(ne, ce, pe, se, G) {
11188
+ function b(ne, ce, pe, se, Z) {
11176
11189
  var ve = document.createElement("canvas");
11177
11190
  ve.width = s.width, ve.height = s.height;
11178
11191
  var we = ve.getContext("2d"), U = [], te = ce === -1, c = ce && ce > 0 && ce <= ne.length ? ce : ne.length, N = {
@@ -11211,7 +11224,7 @@ var o0 = {}, sa = {
11211
11224
  }
11212
11225
  },
11213
11226
  callback: function() {
11214
- U = U.concat(ne.slice(c)), U.length <= 0 && U.push(ne[ne.length - 1]), G(U);
11227
+ U = U.concat(ne.slice(c)), U.length <= 0 && U.push(ne[ne.length - 1]), Z(U);
11215
11228
  }
11216
11229
  });
11217
11230
  }
@@ -11244,9 +11257,9 @@ var o0 = {}, sa = {
11244
11257
  this.name = "WhammyRecorder", this.toString = function() {
11245
11258
  return this.name;
11246
11259
  };
11247
- var s = document.createElement("canvas"), q = s.getContext("2d"), ae, me, be;
11260
+ var s = document.createElement("canvas"), $ = s.getContext("2d"), ae, me, be;
11248
11261
  }
11249
- typeof r < "u" && (r.WhammyRecorder = V);
11262
+ typeof r < "u" && (r.WhammyRecorder = W);
11250
11263
  /**
11251
11264
  * Whammy is a standalone class used by {@link RecordRTC} to bring video recording in Chrome. It is written by {@link https://github.com/antimatter15|antimatter15}
11252
11265
  * @summary A real time javascript webm encoder based on a canvas hack.
@@ -11282,8 +11295,8 @@ var o0 = {}, sa = {
11282
11295
  return ke.revokeObjectURL(b), S;
11283
11296
  }
11284
11297
  function o(h) {
11285
- function b(G) {
11286
- var ve = Y(G);
11298
+ function b(Z) {
11299
+ var ve = Y(Z);
11287
11300
  if (!ve)
11288
11301
  return [];
11289
11302
  for (var we = 3e4, U = [{
@@ -11391,11 +11404,11 @@ var o0 = {}, sa = {
11391
11404
  }]
11392
11405
  }]
11393
11406
  }]
11394
- }], te = 0, c = 0; te < G.length; ) {
11407
+ }], te = 0, c = 0; te < Z.length; ) {
11395
11408
  var N = [], P = 0;
11396
11409
  do
11397
- N.push(G[te]), P += G[te].duration, te++;
11398
- while (te < G.length && P < we);
11410
+ N.push(Z[te]), P += Z[te].duration, te++;
11411
+ while (te < Z.length && P < we);
11399
11412
  var T = 0, oe = {
11400
11413
  id: 524531317,
11401
11414
  // Cluster
@@ -11405,9 +11418,9 @@ var o0 = {}, sa = {
11405
11418
  }
11406
11419
  return ae(U);
11407
11420
  }
11408
- function S(G, ve, we) {
11421
+ function S(Z, ve, we) {
11409
11422
  return [{
11410
- data: G,
11423
+ data: Z,
11411
11424
  id: 231
11412
11425
  // Timecode
11413
11426
  }].concat(we.map(function(U) {
@@ -11426,93 +11439,93 @@ var o0 = {}, sa = {
11426
11439
  };
11427
11440
  }));
11428
11441
  }
11429
- function Y(G) {
11430
- if (!G[0]) {
11442
+ function Y(Z) {
11443
+ if (!Z[0]) {
11431
11444
  postMessage({
11432
11445
  error: "Something went wrong. Maybe WebP format is not supported in the current browser."
11433
11446
  });
11434
11447
  return;
11435
11448
  }
11436
- for (var ve = G[0].width, we = G[0].height, U = G[0].duration, te = 1; te < G.length; te++)
11437
- U += G[te].duration;
11449
+ for (var ve = Z[0].width, we = Z[0].height, U = Z[0].duration, te = 1; te < Z.length; te++)
11450
+ U += Z[te].duration;
11438
11451
  return {
11439
11452
  duration: U,
11440
11453
  width: ve,
11441
11454
  height: we
11442
11455
  };
11443
11456
  }
11444
- function D(G) {
11445
- for (var ve = []; G > 0; )
11446
- ve.push(G & 255), G = G >> 8;
11457
+ function D(Z) {
11458
+ for (var ve = []; Z > 0; )
11459
+ ve.push(Z & 255), Z = Z >> 8;
11447
11460
  return new Uint8Array(ve.reverse());
11448
11461
  }
11449
- function s(G) {
11450
- return new Uint8Array(G.split("").map(function(ve) {
11462
+ function s(Z) {
11463
+ return new Uint8Array(Z.split("").map(function(ve) {
11451
11464
  return ve.charCodeAt(0);
11452
11465
  }));
11453
11466
  }
11454
- function q(G) {
11455
- var ve = [], we = G.length % 8 ? new Array(9 - G.length % 8).join("0") : "";
11456
- G = we + G;
11457
- for (var U = 0; U < G.length; U += 8)
11458
- ve.push(parseInt(G.substr(U, 8), 2));
11467
+ function $(Z) {
11468
+ var ve = [], we = Z.length % 8 ? new Array(9 - Z.length % 8).join("0") : "";
11469
+ Z = we + Z;
11470
+ for (var U = 0; U < Z.length; U += 8)
11471
+ ve.push(parseInt(Z.substr(U, 8), 2));
11459
11472
  return new Uint8Array(ve);
11460
11473
  }
11461
- function ae(G) {
11462
- for (var ve = [], we = 0; we < G.length; we++) {
11463
- var U = G[we].data;
11464
- typeof U == "object" && (U = ae(U)), typeof U == "number" && (U = q(U.toString(2))), typeof U == "string" && (U = s(U));
11474
+ function ae(Z) {
11475
+ for (var ve = [], we = 0; we < Z.length; we++) {
11476
+ var U = Z[we].data;
11477
+ typeof U == "object" && (U = ae(U)), typeof U == "number" && (U = $(U.toString(2))), typeof U == "string" && (U = s(U));
11465
11478
  var te = U.size || U.byteLength || U.length, c = Math.ceil(Math.ceil(Math.log(te) / Math.log(2)) / 8), N = te.toString(2), P = new Array(c * 7 + 7 + 1 - N.length).join("0") + N, T = new Array(c).join("0") + "1" + P;
11466
- ve.push(D(G[we].id)), ve.push(q(T)), ve.push(U);
11479
+ ve.push(D(Z[we].id)), ve.push($(T)), ve.push(U);
11467
11480
  }
11468
11481
  return new Blob(ve, {
11469
11482
  type: "video/webm"
11470
11483
  });
11471
11484
  }
11472
- function me(G) {
11485
+ function me(Z) {
11473
11486
  var ve = 0;
11474
- if (G.keyframe && (ve |= 128), G.invisible && (ve |= 8), G.lacing && (ve |= G.lacing << 1), G.discardable && (ve |= 1), G.trackNum > 127)
11487
+ if (Z.keyframe && (ve |= 128), Z.invisible && (ve |= 8), Z.lacing && (ve |= Z.lacing << 1), Z.discardable && (ve |= 1), Z.trackNum > 127)
11475
11488
  throw "TrackNumber > 127 not supported";
11476
- var we = [G.trackNum | 128, G.timecode >> 8, G.timecode & 255, ve].map(function(U) {
11489
+ var we = [Z.trackNum | 128, Z.timecode >> 8, Z.timecode & 255, ve].map(function(U) {
11477
11490
  return String.fromCharCode(U);
11478
- }).join("") + G.frame;
11491
+ }).join("") + Z.frame;
11479
11492
  return we;
11480
11493
  }
11481
- function be(G) {
11482
- for (var ve = G.RIFF[0].WEBP[0], we = ve.indexOf("*"), U = 0, te = []; U < 4; U++)
11494
+ function be(Z) {
11495
+ for (var ve = Z.RIFF[0].WEBP[0], we = ve.indexOf("*"), U = 0, te = []; U < 4; U++)
11483
11496
  te[U] = ve.charCodeAt(we + 3 + U);
11484
11497
  var c, N, P;
11485
11498
  return P = te[1] << 8 | te[0], c = P & 16383, P = te[3] << 8 | te[2], N = P & 16383, {
11486
11499
  width: c,
11487
11500
  height: N,
11488
11501
  data: ve,
11489
- riff: G
11502
+ riff: Z
11490
11503
  };
11491
11504
  }
11492
- function ne(G, ve) {
11493
- return parseInt(G.substr(ve + 4, 4).split("").map(function(we) {
11505
+ function ne(Z, ve) {
11506
+ return parseInt(Z.substr(ve + 4, 4).split("").map(function(we) {
11494
11507
  var U = we.charCodeAt(0).toString(2);
11495
11508
  return new Array(8 - U.length + 1).join("0") + U;
11496
11509
  }).join(""), 2);
11497
11510
  }
11498
- function ce(G) {
11499
- for (var ve = 0, we = {}; ve < G.length; ) {
11500
- var U = G.substr(ve, 4), te = ne(G, ve), c = G.substr(ve + 4 + 4, te);
11511
+ function ce(Z) {
11512
+ for (var ve = 0, we = {}; ve < Z.length; ) {
11513
+ var U = Z.substr(ve, 4), te = ne(Z, ve), c = Z.substr(ve + 4 + 4, te);
11501
11514
  ve += 4 + 4 + te, we[U] = we[U] || [], U === "RIFF" || U === "LIST" ? we[U].push(ce(c)) : we[U].push(c);
11502
11515
  }
11503
11516
  return we;
11504
11517
  }
11505
- function pe(G) {
11518
+ function pe(Z) {
11506
11519
  return [].slice.call(
11507
- new Uint8Array(new Float64Array([G]).buffer),
11520
+ new Uint8Array(new Float64Array([Z]).buffer),
11508
11521
  0
11509
11522
  ).map(function(ve) {
11510
11523
  return String.fromCharCode(ve);
11511
11524
  }).reverse().join("");
11512
11525
  }
11513
- var se = new b(h.map(function(G) {
11514
- var ve = be(ce(atob(G.image.slice(23))));
11515
- return ve.duration = G.duration, ve;
11526
+ var se = new b(h.map(function(Z) {
11527
+ var ve = be(ce(atob(Z.image.slice(23))));
11528
+ return ve.duration = Z.duration, ve;
11516
11529
  }));
11517
11530
  postMessage(se);
11518
11531
  }
@@ -11586,9 +11599,9 @@ var o0 = {}, sa = {
11586
11599
  function Y() {
11587
11600
  var D = h.transaction([R.dataStoreName], "readwrite");
11588
11601
  R.videoBlob && D.objectStore(R.dataStoreName).put(R.videoBlob, "videoBlob"), R.gifBlob && D.objectStore(R.dataStoreName).put(R.gifBlob, "gifBlob"), R.audioBlob && D.objectStore(R.dataStoreName).put(R.audioBlob, "audioBlob");
11589
- function s(q) {
11590
- D.objectStore(R.dataStoreName).get(q).onsuccess = function(ae) {
11591
- R.callback && R.callback(ae.target.result, q);
11602
+ function s($) {
11603
+ D.objectStore(R.dataStoreName).get($).onsuccess = function(ae) {
11604
+ R.callback && R.callback(ae.target.result, $);
11592
11605
  };
11593
11606
  }
11594
11607
  s("audioBlob"), s("videoBlob"), s("gifBlob");
@@ -11694,20 +11707,20 @@ var o0 = {}, sa = {
11694
11707
  setTimeout(ne.record, 1e3);
11695
11708
  return;
11696
11709
  }
11697
- h || (e.width || (e.width = q.offsetWidth || 320), e.height || (e.height = q.offsetHeight || 240), e.video || (e.video = {
11710
+ h || (e.width || (e.width = $.offsetWidth || 320), e.height || (e.height = $.offsetHeight || 240), e.video || (e.video = {
11698
11711
  width: e.width,
11699
11712
  height: e.height
11700
11713
  }), e.canvas || (e.canvas = {
11701
11714
  width: e.width,
11702
11715
  height: e.height
11703
- }), Y.width = e.canvas.width || 320, Y.height = e.canvas.height || 240, q.width = e.video.width || 320, q.height = e.video.height || 240), be = new GIFEncoder(), be.setRepeat(0), be.setDelay(e.frameRate || 200), be.setQuality(e.quality || 10), be.start(), typeof e.onGifRecordingStarted == "function" && e.onGifRecordingStarted();
11716
+ }), Y.width = e.canvas.width || 320, Y.height = e.canvas.height || 240, $.width = e.video.width || 320, $.height = e.video.height || 240), be = new GIFEncoder(), be.setRepeat(0), be.setDelay(e.frameRate || 200), be.setQuality(e.quality || 10), be.start(), typeof e.onGifRecordingStarted == "function" && e.onGifRecordingStarted();
11704
11717
  function ce(pe) {
11705
11718
  if (ne.clearedRecordedData !== !0) {
11706
11719
  if (b)
11707
11720
  return setTimeout(function() {
11708
11721
  ce(pe);
11709
11722
  }, 100);
11710
- ae = K(ce), typeof me === void 0 && (me = pe), !(pe - me < 90) && (!h && q.paused && q.play(), h || D.drawImage(q, 0, 0, Y.width, Y.height), e.onGifPreview && e.onGifPreview(Y.toDataURL("image/png")), be.addFrame(D), me = pe);
11723
+ ae = K(ce), typeof me === void 0 && (me = pe), !(pe - me < 90) && (!h && $.paused && $.play(), h || D.drawImage($, 0, 0, Y.width, Y.height), e.onGifPreview && e.onGifPreview(Y.toDataURL("image/png")), be.addFrame(D), me = pe);
11711
11724
  }
11712
11725
  }
11713
11726
  ae = K(ce), e.initCallback && e.initCallback();
@@ -11735,10 +11748,10 @@ var o0 = {}, sa = {
11735
11748
  h && (R instanceof CanvasRenderingContext2D ? (D = R, Y = D.canvas) : R instanceof HTMLCanvasElement && (D = R.getContext("2d"), Y = R));
11736
11749
  var s = !0;
11737
11750
  if (!h) {
11738
- var q = document.createElement("video");
11739
- q.muted = !0, q.autoplay = !0, q.playsInline = !0, s = !1, q.onloadedmetadata = function() {
11751
+ var $ = document.createElement("video");
11752
+ $.muted = !0, $.autoplay = !0, $.playsInline = !0, s = !1, $.onloadedmetadata = function() {
11740
11753
  s = !0;
11741
- }, $e(R, q), q.play();
11754
+ }, $e(R, $), $.play();
11742
11755
  }
11743
11756
  var ae = null, me, be, ne = this;
11744
11757
  }
@@ -11783,7 +11796,7 @@ var o0 = {}, sa = {
11783
11796
  }), typeof screen > "u" && (U.screen = {
11784
11797
  width: 0,
11785
11798
  height: 0
11786
- }), typeof q > "u" && (U.URL = {
11799
+ }), typeof $ > "u" && (U.URL = {
11787
11800
  createObjectURL: function() {
11788
11801
  return "";
11789
11802
  },
@@ -11796,8 +11809,8 @@ var o0 = {}, sa = {
11796
11809
  S.style.opacity = 0, S.style.position = "absolute", S.style.zIndex = -1, S.style.top = "-1000em", S.style.left = "-1000em", S.className = e, (document.body || document.documentElement).appendChild(S), this.disableLogs = !1, this.frameInterval = 10, this.width = 360, this.height = 240, this.useGainNode = !0;
11797
11810
  var D = this, s = window.AudioContext;
11798
11811
  typeof s > "u" && (typeof webkitAudioContext < "u" && (s = webkitAudioContext), typeof mozAudioContext < "u" && (s = mozAudioContext));
11799
- var q = window.URL;
11800
- typeof q > "u" && typeof webkitURL < "u" && (q = webkitURL), typeof navigator < "u" && typeof navigator.getUserMedia > "u" && (typeof navigator.webkitGetUserMedia < "u" && (navigator.getUserMedia = navigator.webkitGetUserMedia), typeof navigator.mozGetUserMedia < "u" && (navigator.getUserMedia = navigator.mozGetUserMedia));
11812
+ var $ = window.URL;
11813
+ typeof $ > "u" && typeof webkitURL < "u" && ($ = webkitURL), typeof navigator < "u" && typeof navigator.getUserMedia > "u" && (typeof navigator.webkitGetUserMedia < "u" && (navigator.getUserMedia = navigator.webkitGetUserMedia), typeof navigator.mozGetUserMedia < "u" && (navigator.getUserMedia = navigator.mozGetUserMedia));
11801
11814
  var ae = window.MediaStream;
11802
11815
  typeof ae > "u" && typeof webkitMediaStream < "u" && (ae = webkitMediaStream), typeof ae < "u" && typeof ae.prototype.stop > "u" && (ae.prototype.stop = function() {
11803
11816
  this.getTracks().forEach(function(U) {
@@ -11838,7 +11851,7 @@ var o0 = {}, sa = {
11838
11851
  }
11839
11852
  function pe() {
11840
11853
  b = !1;
11841
- var U = se(), te = G();
11854
+ var U = se(), te = Z();
11842
11855
  return te && te.getTracks().filter(function(c) {
11843
11856
  return c.kind === "audio";
11844
11857
  }).forEach(function(c) {
@@ -11858,7 +11871,7 @@ var o0 = {}, sa = {
11858
11871
  te.addTrack(c);
11859
11872
  }), S.stream = te, te;
11860
11873
  }
11861
- function G() {
11874
+ function Z() {
11862
11875
  me.AudioContextConstructor || (me.AudioContextConstructor = new me.AudioContext()), D.audioContext = me.AudioContextConstructor, D.audioSources = [], D.useGainNode === !0 && (D.gainNode = D.audioContext.createGain(), D.gainNode.connect(D.audioContext.destination), D.gainNode.gain.value = 0);
11863
11876
  var U = 0;
11864
11877
  if (R.forEach(function(te) {
@@ -12130,14 +12143,14 @@ var o0 = {}, sa = {
12130
12143
  var o;
12131
12144
  function h() {
12132
12145
  return new ReadableStream({
12133
- start: function(q) {
12146
+ start: function($) {
12134
12147
  var ae = document.createElement("canvas"), me = document.createElement("video"), be = !0;
12135
12148
  me.srcObject = R, me.muted = !0, me.height = e.height, me.width = e.width, me.volume = 0, me.onplaying = function() {
12136
12149
  ae.width = e.width, ae.height = e.height;
12137
12150
  var ne = ae.getContext("2d"), ce = 1e3 / e.frameRate, pe = setInterval(function() {
12138
- if (o && (clearInterval(pe), q.close()), be && (be = !1, e.onVideoProcessStarted && e.onVideoProcessStarted()), ne.drawImage(me, 0, 0), q._controlledReadableStream.state !== "closed")
12151
+ if (o && (clearInterval(pe), $.close()), be && (be = !1, e.onVideoProcessStarted && e.onVideoProcessStarted()), ne.drawImage(me, 0, 0), $._controlledReadableStream.state !== "closed")
12139
12152
  try {
12140
- q.enqueue(
12153
+ $.enqueue(
12141
12154
  ne.getImageData(0, 0, e.width, e.height)
12142
12155
  );
12143
12156
  } catch {
@@ -12148,13 +12161,13 @@ var o0 = {}, sa = {
12148
12161
  });
12149
12162
  }
12150
12163
  var b;
12151
- function S(q, ae) {
12164
+ function S($, ae) {
12152
12165
  if (!e.workerPath && !ae) {
12153
12166
  o = !1, fetch(
12154
12167
  "https://unpkg.com/webm-wasm@latest/dist/webm-worker.js"
12155
12168
  ).then(function(be) {
12156
12169
  be.arrayBuffer().then(function(ne) {
12157
- S(q, ne);
12170
+ S($, ne);
12158
12171
  });
12159
12172
  });
12160
12173
  return;
@@ -12192,23 +12205,23 @@ var o0 = {}, sa = {
12192
12205
  }, this.resume = function() {
12193
12206
  Y = !1;
12194
12207
  };
12195
- function D(q) {
12208
+ function D($) {
12196
12209
  if (!b) {
12197
- q && q();
12210
+ $ && $();
12198
12211
  return;
12199
12212
  }
12200
12213
  b.addEventListener("message", function(ae) {
12201
- ae.data === null && (b.terminate(), b = null, q && q());
12214
+ ae.data === null && (b.terminate(), b = null, $ && $());
12202
12215
  }), b.postMessage(null);
12203
12216
  }
12204
12217
  var s = [];
12205
- this.stop = function(q) {
12218
+ this.stop = function($) {
12206
12219
  o = !0;
12207
12220
  var ae = this;
12208
12221
  D(function() {
12209
12222
  ae.blob = new Blob(s, {
12210
12223
  type: "video/webm"
12211
- }), q(ae.blob);
12224
+ }), $(ae.blob);
12212
12225
  });
12213
12226
  }, this.name = "WebAssemblyRecorder", this.toString = function() {
12214
12227
  return this.name;
@@ -12330,9 +12343,9 @@ const fa = {
12330
12343
  this.$emit("finish", [m]), this.$emit("cancel");
12331
12344
  },
12332
12345
  dataURLtoFile(_, r) {
12333
- let m = _.split(","), p = m[0].match(/:(.*?);/)[1], $ = atob(m[1]), Z = $.length, K = new Uint8Array(Z);
12334
- for (; Z--; )
12335
- K[Z] = $.charCodeAt(Z);
12346
+ let m = _.split(","), p = m[0].match(/:(.*?);/)[1], q = atob(m[1]), V = q.length, K = new Uint8Array(V);
12347
+ for (; V--; )
12348
+ K[V] = q.charCodeAt(V);
12336
12349
  return new File([K], r, { type: p });
12337
12350
  },
12338
12351
  handleCancel() {
@@ -12466,7 +12479,7 @@ const ya = {
12466
12479
  this.noteId = _.id, this.curNodes = JSON.parse(_.content), this.curNodes.length || this.curNodes.push({
12467
12480
  text: "",
12468
12481
  uuid: Ct()
12469
- }), _.title || (this.titleEmpty = !0);
12482
+ }), this.titleEmpty = !_.title;
12470
12483
  } catch {
12471
12484
  }
12472
12485
  },
@@ -12543,46 +12556,46 @@ const ya = {
12543
12556
  },
12544
12557
  // 移动端=====================
12545
12558
  setToParent() {
12546
- var $;
12559
+ var q;
12547
12560
  let _ = new KeyboardEvent("keydown", {
12548
12561
  bubbles: !0,
12549
12562
  cancelable: !0,
12550
12563
  key: "Tab",
12551
12564
  shiftKey: !0
12552
- }), m = ($ = window.getSelection().baseNode) == null ? void 0 : $.parentNode;
12565
+ }), m = (q = window.getSelection().baseNode) == null ? void 0 : q.parentNode;
12553
12566
  const p = St.get("currentId");
12554
12567
  !m && p && (m = Nt({ uuid: p })), m.dispatchEvent(_);
12555
12568
  },
12556
12569
  setToChild() {
12557
- var $;
12570
+ var q;
12558
12571
  let _ = new KeyboardEvent("keydown", {
12559
12572
  bubbles: !0,
12560
12573
  cancelable: !0,
12561
12574
  key: "Tab",
12562
12575
  shiftKey: !1
12563
- }), m = ($ = window.getSelection().baseNode) == null ? void 0 : $.parentNode;
12576
+ }), m = (q = window.getSelection().baseNode) == null ? void 0 : q.parentNode;
12564
12577
  const p = St.get("currentId");
12565
12578
  !m && p && (m = Nt({ uuid: p })), m.dispatchEvent(_);
12566
12579
  },
12567
12580
  setToUp() {
12568
- var $;
12581
+ var q;
12569
12582
  let _ = new KeyboardEvent("keydown", {
12570
12583
  bubbles: !0,
12571
12584
  cancelable: !0,
12572
12585
  key: "ArrowUp",
12573
12586
  shiftKey: !1
12574
- }), m = ($ = window.getSelection().baseNode) == null ? void 0 : $.parentNode;
12587
+ }), m = (q = window.getSelection().baseNode) == null ? void 0 : q.parentNode;
12575
12588
  const p = St.get("currentId");
12576
12589
  !m && p && (m = Nt({ uuid: p })), m.dispatchEvent(_);
12577
12590
  },
12578
12591
  setToDown() {
12579
- var $;
12592
+ var q;
12580
12593
  let _ = new KeyboardEvent("keydown", {
12581
12594
  bubbles: !0,
12582
12595
  cancelable: !0,
12583
12596
  key: "ArrowDown",
12584
12597
  shiftKey: !1
12585
- }), m = ($ = window.getSelection().baseNode) == null ? void 0 : $.parentNode;
12598
+ }), m = (q = window.getSelection().baseNode) == null ? void 0 : q.parentNode;
12586
12599
  const p = St.get("currentId");
12587
12600
  !m && p && (m = Nt({ uuid: p })), m.dispatchEvent(_);
12588
12601
  },
@@ -12605,15 +12618,15 @@ const ya = {
12605
12618
  if (!_.length)
12606
12619
  return;
12607
12620
  const m = Array.from(_).map((p) => {
12608
- const $ = T0(p.type), Z = URL.createObjectURL(p);
12609
- switch ($.mainType) {
12621
+ const q = T0(p.type), V = URL.createObjectURL(p);
12622
+ switch (q.mainType) {
12610
12623
  case "image":
12611
12624
  case "audio":
12612
12625
  case "video":
12613
12626
  return {
12614
12627
  uuid: Ct(),
12615
- type: $.mainType,
12616
- content: Z,
12628
+ type: q.mainType,
12629
+ content: V,
12617
12630
  pending: !0,
12618
12631
  hash: this.hash
12619
12632
  };
@@ -12622,7 +12635,7 @@ const ya = {
12622
12635
  uuid: Ct(),
12623
12636
  type: "file",
12624
12637
  name: p.name,
12625
- content: Z,
12638
+ content: V,
12626
12639
  size: p.size,
12627
12640
  pending: !0,
12628
12641
  hash: this.hash
@@ -12631,10 +12644,10 @@ const ya = {
12631
12644
  });
12632
12645
  r ? r(m) : m.forEach((p) => {
12633
12646
  this.$refs.treeEditor.appendNode(p);
12634
- }), x0.uploadFile(_, (p, $) => {
12635
- $ && $.forEach((Z, K) => {
12636
- const ie = m[K], ye = Z.data;
12637
- if (Z.code === 0) {
12647
+ }), x0.uploadFile(_, (p, q) => {
12648
+ q && q.forEach((V, K) => {
12649
+ const ie = m[K], ye = V.data;
12650
+ if (V.code === 0) {
12638
12651
  const { pending: Re, hash: ke, ...Oe } = ie;
12639
12652
  switch (Oe.content = ye.url, this.$refs.treeEditor.updateNode(Oe), ie.type) {
12640
12653
  case "file":
@@ -12659,8 +12672,8 @@ var xa = function() {
12659
12672
  "record-tree": !0,
12660
12673
  "record-tree-mobile": r.isMobile
12661
12674
  }, on: { mouseenter: r.hideHoverNote } }, [r._t("default"), m("div", { staticClass: "record-tree-title-bar" }, [r.tags.length ? m("Picker", { scopedSlots: r._u([r.readOnly ? null : { key: "default", fn: function() {
12662
- return [m("div", { staticClass: "record-tree-popper-content", style: { width: r.tagConfig.popW, height: r.tagConfig.popH } }, r._l(r.tags, function(p, $) {
12663
- return m("span", { key: $, staticClass: "record-tree-popper-content-item", on: { click: function(Z) {
12675
+ return [m("div", { staticClass: "record-tree-popper-content", style: { width: r.tagConfig.popW, height: r.tagConfig.popH } }, r._l(r.tags, function(p, q) {
12676
+ return m("span", { key: q, staticClass: "record-tree-popper-content-item", on: { click: function(V) {
12664
12677
  return r.tagSelect(p);
12665
12678
  } } }, [r.getSvgUrl(p) ? m("inline-svg", { staticClass: "record-tree-svg", style: { backgroundColor: p.color }, attrs: { src: r.getSvgUrl(p), width: r.tagConfig.tagSize, height: r.tagConfig.tagSize } }) : m("span", { staticClass: "record-tree-empty-icon", style: {
12666
12679
  width: r.tagConfig.tagSize + "px",