@codernote/record-tree 1.4.2 → 1.4.3

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 +860 -859
  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-bd3dcd6b]{display:flex;align-items:center;position:relative}.node-text[data-v-bd3dcd6b]{margin-left:5px;flex:1;border:none;outline:none}.node-icon[data-v-bd3dcd6b]{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-bd3dcd6b]{align-self:flex-start;top:3px}.node-icon[data-v-bd3dcd6b]:after{content:"";position:absolute;top:5px;left:5px;width:7px;height:7px;border-radius:10px;background-color:#eee}.node-icon[data-v-bd3dcd6b]:hover{background-color:#ccc}.node-complex[data-v-bd3dcd6b]{display:flex;flex-direction:row;align-self:center;justify-self:center;outline:none}.holder[data-v-bd3dcd6b]{width:0px;overflow:hidden;border-width:1px;border-style:solid;border-color:transparent;outline:none}.node-element[data-v-bd3dcd6b]{display:inline-block;position:relative;margin:5px 1px}.node-element:hover .node-del[data-v-bd3dcd6b]{display:block}.node-image img[data-v-bd3dcd6b]{width:auto;max-height:80px;outline:none}.node-audio[data-v-bd3dcd6b],.node-video[data-v-bd3dcd6b]{width:300px}.node-audio audio[data-v-bd3dcd6b]{width:300px;outline:none}.node-video video[data-v-bd3dcd6b]{width:300px;outline:none}.node-del[data-v-bd3dcd6b]{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-bd3dcd6b]:before,.node-del[data-v-bd3dcd6b]:after{content:"";position:absolute;top:50%;left:50%;width:2px;height:10px;background-color:#595959}.node-del[data-v-bd3dcd6b]:before{transform:translate(-50%,-50%) rotate(45deg)}.node-del[data-v-bd3dcd6b]:after{transform:translate(-50%,-50%) rotate(-45deg)}.node-file-wrap[data-v-bd3dcd6b]{width:260px;padding:10px 16px;display:flex;background:#f2f2f2;border-radius:5px;justify-content:center;align-items:center}.node-file-left[data-v-bd3dcd6b]{flex:1}.node-file-left h6[data-v-bd3dcd6b]{font-size:14px;font-weight:700;margin:0 0 5px;padding:0;white-space:nowrap}.node-file-left p[data-v-bd3dcd6b]{margin:0;padding:0;font-size:12px;color:#999}.node-file-right a[data-v-bd3dcd6b]{color:#52a770;font-size:14px}@keyframes blinkBorder-bd3dcd6b{0%,to{border-color:transparent}50%{border-color:#333}}.node-complex .holder[data-v-bd3dcd6b]:focus{animation:blinkBorder-bd3dcd6b 1s infinite}.node-ul[data-v-e0823576]{background-color:#fff;margin:0;padding:0;list-style:none}.node-li[data-v-e0823576]{padding:0;list-style:none;margin:0;line-height:1.5;position:relative;overflow:hidden}[data-v-e0823576] .sublevel .node-li{margin-left:15px}[data-v-e0823576] .drag-over-top:before{content:"";width:100%;height:1px;top:0;background-color:#eee;position:absolute}[data-v-e0823576] .drag-over-center{background-color:#eee}[data-v-e0823576] .drag-over-bottom:after{content:"";width:100%;height:1px;background-color:#eee;position:absolute;bottom:0}.collapsed>ul[data-v-e0823576]{display:none}[data-v-e0823576] .collapsed .node-icon:before{display:none}.tree-title[data-v-e0823576]{padding-left:25px;font-weight:700;outline:none;font-size:1.125rem;line-height:1.5;width:100%}[data-v-e0823576] .node-li.has-child.collapsed .node-icon:after{background-color:#aaa}[data-v-e0823576] .node-li.dragging .node-icon:before{display:none}[data-v-e0823576] .has-child>.node-div>.node-icon:before{content:"";position:absolute;top:20px;left:50%;height:9999px;width:1px;background-color:#f2f2f2}[data-v-e0823576] .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}')),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-bd3dcd6b]{display:flex;align-items:center;position:relative}.node-text[data-v-bd3dcd6b]{margin-left:5px;flex:1;border:none;outline:none}.node-icon[data-v-bd3dcd6b]{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-bd3dcd6b]{align-self:flex-start;top:3px}.node-icon[data-v-bd3dcd6b]:after{content:"";position:absolute;top:5px;left:5px;width:7px;height:7px;border-radius:10px;background-color:#eee}.node-icon[data-v-bd3dcd6b]:hover{background-color:#ccc}.node-complex[data-v-bd3dcd6b]{display:flex;flex-direction:row;align-self:center;justify-self:center;outline:none}.holder[data-v-bd3dcd6b]{width:0px;overflow:hidden;border-width:1px;border-style:solid;border-color:transparent;outline:none}.node-element[data-v-bd3dcd6b]{display:inline-block;position:relative;margin:5px 1px}.node-element:hover .node-del[data-v-bd3dcd6b]{display:block}.node-image img[data-v-bd3dcd6b]{width:auto;max-height:80px;outline:none}.node-audio[data-v-bd3dcd6b],.node-video[data-v-bd3dcd6b]{width:300px}.node-audio audio[data-v-bd3dcd6b]{width:300px;outline:none}.node-video video[data-v-bd3dcd6b]{width:300px;outline:none}.node-del[data-v-bd3dcd6b]{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-bd3dcd6b]:before,.node-del[data-v-bd3dcd6b]:after{content:"";position:absolute;top:50%;left:50%;width:2px;height:10px;background-color:#595959}.node-del[data-v-bd3dcd6b]:before{transform:translate(-50%,-50%) rotate(45deg)}.node-del[data-v-bd3dcd6b]:after{transform:translate(-50%,-50%) rotate(-45deg)}.node-file-wrap[data-v-bd3dcd6b]{width:260px;padding:10px 16px;display:flex;background:#f2f2f2;border-radius:5px;justify-content:center;align-items:center}.node-file-left[data-v-bd3dcd6b]{flex:1}.node-file-left h6[data-v-bd3dcd6b]{font-size:14px;font-weight:700;margin:0 0 5px;padding:0;white-space:nowrap}.node-file-left p[data-v-bd3dcd6b]{margin:0;padding:0;font-size:12px;color:#999}.node-file-right a[data-v-bd3dcd6b]{color:#52a770;font-size:14px}@keyframes blinkBorder-bd3dcd6b{0%,to{border-color:transparent}50%{border-color:#333}}.node-complex .holder[data-v-bd3dcd6b]:focus{animation:blinkBorder-bd3dcd6b 1s infinite}.node-ul[data-v-b06218f5]{background-color:#fff;margin:0;padding:0;list-style:none}.node-li[data-v-b06218f5]{padding:0;list-style:none;margin:0;line-height:1.5;position:relative;overflow:hidden}[data-v-b06218f5] .sublevel .node-li{margin-left:15px}[data-v-b06218f5] .drag-over-top:before{content:"";width:100%;height:1px;top:0;background-color:#eee;position:absolute}[data-v-b06218f5] .drag-over-center{background-color:#eee}[data-v-b06218f5] .drag-over-bottom:after{content:"";width:100%;height:1px;background-color:#eee;position:absolute;bottom:0}.collapsed>ul[data-v-b06218f5]{display:none}[data-v-b06218f5] .collapsed .node-icon:before{display:none}.tree-title[data-v-b06218f5]{padding-left:25px;font-weight:700;outline:none;font-size:1.125rem;line-height:1.5;width:100%}[data-v-b06218f5] .node-li.has-child.collapsed .node-icon:after{background-color:#aaa}[data-v-b06218f5] .node-li.dragging .node-icon:before{display:none}[data-v-b06218f5] .has-child>.node-div>.node-icon:before{content:"";position:absolute;top:20px;left:50%;height:9999px;width:1px;background-color:#f2f2f2}[data-v-b06218f5] .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";
@@ -6,8 +6,8 @@ class D0 {
6
6
  constructor() {
7
7
  this.events = {};
8
8
  }
9
- set(r, b) {
10
- this[r] = b;
9
+ set(r, m) {
10
+ this[r] = m;
11
11
  }
12
12
  get(r) {
13
13
  return this[r];
@@ -15,8 +15,8 @@ class D0 {
15
15
  remove(r) {
16
16
  delete this[r];
17
17
  }
18
- on(r, b) {
19
- this.events[r] = b;
18
+ on(r, m) {
19
+ this.events[r] = m;
20
20
  }
21
21
  trigger(r) {
22
22
  this.events[r] && (this.events[r](), delete this.events[r]);
@@ -29,12 +29,12 @@ function kt() {
29
29
  let _ = window.getSelection();
30
30
  return _.rangeCount > 0 && _.getRangeAt(0).startOffset || 0;
31
31
  }
32
- function Rt(_, r = 0, b = !1) {
32
+ function Rt(_, r = 0, m = !1) {
33
33
  if (!_)
34
34
  return;
35
- const M = _.querySelectorAll(".holder");
36
- if (M.length) {
37
- (b || r > 0 ? M[1] : M[0]).focus();
35
+ const p = _.querySelectorAll(".holder");
36
+ if (p.length) {
37
+ (m || r > 0 ? p[1] : p[0]).focus();
38
38
  return;
39
39
  }
40
40
  if (!_.isContentEditable) {
@@ -45,7 +45,7 @@ function Rt(_, r = 0, b = !1) {
45
45
  J.removeAllRanges();
46
46
  try {
47
47
  let re = _;
48
- if (_.childNodes.length > 0 ? re = _.childNodes[0] : (b || r > 0) && (re = document.createTextNode(""), _.appendChild(re)), b)
48
+ if (_.childNodes.length > 0 ? re = _.childNodes[0] : (m || r > 0) && (re = document.createTextNode(""), _.appendChild(re)), m)
49
49
  Z.selectNodeContents(re), Z.collapse(!1);
50
50
  else {
51
51
  const ie = Math.min(r, re.length || 0);
@@ -59,13 +59,13 @@ function Rt(_, r = 0, b = !1) {
59
59
  function S0(_) {
60
60
  const r = window.getSelection();
61
61
  r.removeAllRanges();
62
- const b = document.createRange();
63
- b.setStart(_.childNodes[0], 0), b.setEnd(_.childNodes[0], _.innerText.length), r.addRange(b);
62
+ const m = document.createRange();
63
+ m.setStart(_.childNodes[0], 0), m.setEnd(_.childNodes[0], _.innerText.length), r.addRange(m);
64
64
  }
65
- function M0(_) {
65
+ function p0(_) {
66
66
  var re;
67
- let b = (((re = _.target) == null ? void 0 : re.querySelector(".node-div")) || _.target).getBoundingClientRect(), M = _.clientY, J = b.top + b.height / 3, Z = b.top + b.height / 3 * 2;
68
- return M < J ? "top" : M < Z ? "center" : "bottom";
67
+ let m = (((re = _.target) == null ? void 0 : re.querySelector(".node-div")) || _.target).getBoundingClientRect(), p = _.clientY, J = m.top + m.height / 3, Z = m.top + m.height / 3 * 2;
68
+ return p < J ? "top" : p < Z ? "center" : "bottom";
69
69
  }
70
70
  function r0(_) {
71
71
  return /<(img|audio|video)/.test(_.text) || _.type;
@@ -74,12 +74,12 @@ function N0(_) {
74
74
  return _ && _.uuid ? document.getElementById(_.uuid) : null;
75
75
  }
76
76
  function Nt(_, r = !1) {
77
- const b = N0(_), M = ".node-text";
77
+ const m = N0(_), p = ".node-text";
78
78
  if (r) {
79
- const J = b.querySelectorAll(M);
79
+ const J = m.querySelectorAll(p);
80
80
  return J[J.length - 1];
81
81
  }
82
- return b == null ? void 0 : b.querySelector(M);
82
+ return m == null ? void 0 : m.querySelector(p);
83
83
  }
84
84
  function i0() {
85
85
  ["drag-over-top", "drag-over-center", "drag-over-bottom"].forEach((_) => {
@@ -88,20 +88,20 @@ function i0() {
88
88
  }
89
89
  function I0(_, r) {
90
90
  var re;
91
- const b = _.currentTarget, M = St.get("dragId") ? document.getElementById(St.get("dragId")) : null;
92
- if (!b || St.get("dragId") === r.uuid || M != null && M.querySelector(`[id="${r.uuid}"]`)) {
91
+ const m = _.currentTarget, p = St.get("dragId") ? document.getElementById(St.get("dragId")) : null;
92
+ if (!m || St.get("dragId") === r.uuid || p != null && p.querySelector(`[id="${r.uuid}"]`)) {
93
93
  _.dataTransfer.dropEffect = "none";
94
94
  return;
95
95
  }
96
96
  i0();
97
- const J = M0(_), Z = (re = b.querySelector(".node-div")) == null ? void 0 : re.classList;
97
+ const J = p0(_), Z = (re = m.querySelector(".node-div")) == null ? void 0 : re.classList;
98
98
  Z && Z.add(`drag-over-${J}`);
99
99
  }
100
100
  function C0(_) {
101
- const b = new DOMParser().parseFromString(_, "text/html"), M = b.querySelector("img"), J = b.querySelector("video"), Z = b.querySelector("audio");
102
- return M ? {
101
+ const m = new DOMParser().parseFromString(_, "text/html"), p = m.querySelector("img"), J = m.querySelector("video"), Z = m.querySelector("audio");
102
+ return p ? {
103
103
  type: "image",
104
- content: M.src
104
+ content: p.src
105
105
  } : J ? {
106
106
  type: "video",
107
107
  content: J.src
@@ -111,29 +111,29 @@ function C0(_) {
111
111
  } : null;
112
112
  }
113
113
  function n0(_, r) {
114
- var b;
115
- return (b = r.children) != null && b.length ? r.children.some(
116
- (M) => M.uuid === _.uuid || n0(_, M)
114
+ var m;
115
+ return (m = r.children) != null && m.length ? r.children.some(
116
+ (p) => p.uuid === _.uuid || n0(_, p)
117
117
  ) : !1;
118
118
  }
119
119
  function R0(_, r = 0) {
120
120
  if (_ === 0)
121
121
  return "0 Bytes";
122
- const b = 1024, M = r < 0 ? 0 : r, J = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"], Z = Math.floor(Math.log(_) / Math.log(b));
123
- return parseFloat((_ / Math.pow(b, Z)).toFixed(M)) + " " + J[Z];
122
+ const m = 1024, p = r < 0 ? 0 : r, J = ["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)) + " " + J[Z];
124
124
  }
125
125
  function L0(_, r) {
126
126
  if (_.length <= r)
127
127
  return _;
128
- const b = _.length - r + 3;
129
- return "..." + _.substring(b);
128
+ const m = _.length - r + 3;
129
+ return "..." + _.substring(m);
130
130
  }
131
131
  function E0(_) {
132
132
  return (_ || "").replace("contenteditable", "temp");
133
133
  }
134
- function zt(_, r, b, M, J, Z, re, ie) {
134
+ function zt(_, r, m, p, J, Z, re, ie) {
135
135
  var ye = typeof _ == "function" ? _.options : _;
136
- r && (ye.render = r, ye.staticRenderFns = b, ye._compiled = !0), M && (ye.functional = !0), Z && (ye._scopeId = "data-v-" + Z);
136
+ r && (ye.render = r, ye.staticRenderFns = m, ye._compiled = !0), p && (ye.functional = !0), Z && (ye._scopeId = "data-v-" + Z);
137
137
  var Re;
138
138
  if (re ? (Re = function(Ve) {
139
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__), J && J.call(this, Ve), Ve && Ve._registeredComponents && Ve._registeredComponents.add(re);
@@ -207,9 +207,9 @@ const k0 = {
207
207
  if (this.disableInput)
208
208
  return this.disableInput = !1, _.preventDefault(), !1;
209
209
  if (!this.isComposition || _.which === 32) {
210
- const M = kt(), J = r.text !== _.target.innerHTML;
210
+ const p = kt(), J = r.text !== _.target.innerHTML;
211
211
  r.text = _.target.innerHTML, this.$nextTick(() => {
212
- Rt(_.target, M);
212
+ Rt(_.target, p);
213
213
  }), J && this.update();
214
214
  } else
215
215
  this.disableInput = !1;
@@ -244,15 +244,15 @@ const k0 = {
244
244
  }
245
245
  },
246
246
  handleBackspace(_) {
247
- var b;
247
+ var m;
248
248
  const r = this.node;
249
249
  if (this.isComplex)
250
250
  _.preventDefault(), this.$emit("toPrevFocus", r, !0), this.remove();
251
251
  else {
252
- const M = window.getSelection();
253
- let J = M.focusOffset - 1;
254
- if (_.target && M && J < 0) {
255
- if (_.preventDefault(), (b = r.children) != null && b.length)
252
+ const p = window.getSelection();
253
+ let J = p.focusOffset - 1;
254
+ if (_.target && p && J < 0) {
255
+ if (_.preventDefault(), (m = r.children) != null && m.length)
256
256
  return;
257
257
  this.$emit("toPrevFocus", r, !0), this.$emit("remove", r);
258
258
  }
@@ -265,12 +265,12 @@ const k0 = {
265
265
  const r = this.node;
266
266
  if (_.ctrlKey) {
267
267
  this.$emit("collapse", r, !1);
268
- const b = {
268
+ const m = {
269
269
  text: "",
270
270
  uuid: Ct()
271
271
  };
272
- r.children ? r.children.unshift(b) : r.children = [b], this.update(), this.$nextTick(() => {
273
- this.$emit("toFocus", b);
272
+ r.children ? r.children.unshift(m) : r.children = [m], this.update(), this.$nextTick(() => {
273
+ this.$emit("toFocus", m);
274
274
  });
275
275
  } else
276
276
  this.isComposition || this.$emit("enter", r);
@@ -283,20 +283,20 @@ const k0 = {
283
283
  _ && _.focus();
284
284
  },
285
285
  handleArrowLeft(_) {
286
- const r = this.node, b = _.currentTarget, M = kt();
287
- b && (M ? this.$nextTick(() => {
286
+ const r = this.node, m = _.currentTarget, p = kt();
287
+ m && (p ? this.$nextTick(() => {
288
288
  Rt(
289
- b,
290
- M === 1 / 0 ? 0 : M - 1
289
+ m,
290
+ p === 1 / 0 ? 0 : p - 1
291
291
  );
292
292
  }) : this.$emit("toPrevFocus", r, !0));
293
293
  },
294
294
  handleArrowRight(_) {
295
- const r = this.node, b = _.currentTarget, M = kt();
296
- if (!b)
295
+ const r = this.node, m = _.currentTarget, p = kt();
296
+ if (!m)
297
297
  return;
298
- const J = M + 1, Z = b.innerText.length;
299
- !M && r.type ? Rt(b, J, !0) : J > Z ? this.$emit("toNextFocus", r, !0, !0) : Rt(b, J);
298
+ const J = p + 1, Z = m.innerText.length;
299
+ !p && r.type ? Rt(m, J, !0) : J > Z ? this.$emit("toNextFocus", r, !0, !0) : Rt(m, J);
300
300
  },
301
301
  handleArrowDown() {
302
302
  this.$emit("toNextFocus", this.node, !1, !0);
@@ -313,36 +313,36 @@ const k0 = {
313
313
  }
314
314
  };
315
315
  var j0 = function() {
316
- var r = this, b = r._self._c;
317
- return b("div", { ref: "row", staticClass: "node-div" }, [b("span", { staticClass: "node-icon", class: {
316
+ var r = this, m = r._self._c;
317
+ return m("div", { ref: "row", staticClass: "node-div" }, [m("span", { staticClass: "node-icon", class: {
318
318
  "node-icon": !0,
319
319
  "node-icon-complex": !!r.node.type
320
- }, on: { click: function(M) {
321
- return M.stopPropagation(), r.$emit("collapse", r.node);
322
- } } }), r.node.type ? b("div", { ref: "element", staticClass: "node-text", attrs: { contenteditable: !r.readOnly }, on: { compositionstart: function(M) {
323
- return M.stopPropagation(), r.handleCompositionStart.apply(null, arguments);
324
- }, compositionend: function(M) {
325
- return M.stopPropagation(), r.handleCompositionEnd.apply(null, arguments);
326
- }, keydown: function(M) {
327
- return M.stopPropagation(), r.handleKeydown.apply(null, arguments);
328
- }, focusin: function(M) {
329
- return M.stopPropagation(), r.handleFocus.apply(null, arguments);
330
- }, click: function(M) {
331
- return M.stopPropagation(), r.handleFocusHolder.apply(null, arguments);
332
- } } }, [b("div", { class: `node-complex node-${r.node.type}`, attrs: { contenteditable: !1 } }, [b("span", { staticClass: "holder holder-left", attrs: { contenteditable: "true", tabindex: "-1" } }), b("div", { staticClass: "node-element", attrs: { contenteditable: "false" } }, [r.node.type === "image" ? b("img", { attrs: { src: r.node.content, width: "80", height: "80" } }) : r._e(), r.node.type === "audio" ? b("audio", { attrs: { src: r.node.content, controls: "", width: "300" } }) : r._e(), r.node.type === "video" ? b("video", { attrs: { src: r.node.content, controls: "", width: "300", poster: r.isMobile ? "data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=" : null } }) : r._e(), r.node.type === "file" ? b("div", { staticClass: "node-file-wrap", attrs: { contenteditable: !1 } }, [b("div", { staticClass: "node-file-left" }, [b("h6", [r._v(r._s(r.truncateString(r.node.name, 20)))]), b("p", [r._v(r._s(r.formatBytes(r.node.size)))])]), b("div", { staticClass: "node-file-right" }, [b("a", { attrs: { href: r.node.content, download: r.node.name, tabindex: "-1" } }, [r._v("下载")])])]) : r._e(), r.readOnly ? r._e() : b("div", { staticClass: "node-del", on: { click: function(M) {
333
- return M.stopPropagation(), r.remove.apply(null, arguments);
334
- } } })]), b("span", { staticClass: "holder holder-right", attrs: { contenteditable: "true", tabindex: "-1" } })])]) : b("div", { staticClass: "node-text", attrs: { contenteditable: !r.readOnly }, domProps: { innerHTML: r._s(r.readOnly ? r.formatReadOnly(r.node.text) : r.node.text) }, on: { compositionstart: function(M) {
335
- return M.stopPropagation(), r.handleCompositionStart.apply(null, arguments);
336
- }, compositionend: function(M) {
337
- return M.stopPropagation(), r.handleCompositionEnd.apply(null, arguments);
338
- }, keyup: function(M) {
339
- return M.stopPropagation(), r.handleKeyup.apply(null, arguments);
340
- }, keydown: function(M) {
341
- return M.stopPropagation(), r.handleKeydown.apply(null, arguments);
342
- }, dblclick: function(M) {
343
- return M.stopPropagation(), M.preventDefault(), r.handleDbClick.apply(null, arguments);
344
- }, focusin: function(M) {
345
- return M.stopPropagation(), r.handleFocus.apply(null, arguments);
320
+ }, on: { click: function(p) {
321
+ return p.stopPropagation(), r.$emit("collapse", r.node);
322
+ } } }), r.node.type ? m("div", { ref: "element", staticClass: "node-text", attrs: { contenteditable: !r.readOnly }, on: { compositionstart: function(p) {
323
+ return p.stopPropagation(), r.handleCompositionStart.apply(null, arguments);
324
+ }, compositionend: function(p) {
325
+ return p.stopPropagation(), r.handleCompositionEnd.apply(null, arguments);
326
+ }, keydown: function(p) {
327
+ return p.stopPropagation(), r.handleKeydown.apply(null, arguments);
328
+ }, focusin: function(p) {
329
+ return p.stopPropagation(), r.handleFocus.apply(null, arguments);
330
+ }, click: function(p) {
331
+ return p.stopPropagation(), r.handleFocusHolder.apply(null, arguments);
332
+ } } }, [m("div", { class: `node-complex node-${r.node.type}`, attrs: { contenteditable: !1 } }, [m("span", { staticClass: "holder holder-left", attrs: { contenteditable: "true", tabindex: "-1" } }), m("div", { staticClass: "node-element", attrs: { contenteditable: "false" } }, [r.node.type === "image" ? m("img", { attrs: { src: r.node.content, width: "80", height: "80" } }) : r._e(), r.node.type === "audio" ? m("audio", { attrs: { src: r.node.content, controls: "", width: "300" } }) : r._e(), r.node.type === "video" ? m("video", { attrs: { src: r.node.content, controls: "", width: "300", poster: r.isMobile ? "data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=" : null } }) : r._e(), r.node.type === "file" ? m("div", { staticClass: "node-file-wrap", attrs: { contenteditable: !1 } }, [m("div", { staticClass: "node-file-left" }, [m("h6", [r._v(r._s(r.truncateString(r.node.name, 20)))]), m("p", [r._v(r._s(r.formatBytes(r.node.size)))])]), m("div", { staticClass: "node-file-right" }, [m("a", { attrs: { href: r.node.content, download: r.node.name, tabindex: "-1" } }, [r._v("下载")])])]) : r._e(), r.readOnly ? r._e() : m("div", { staticClass: "node-del", on: { click: function(p) {
333
+ return p.stopPropagation(), r.remove.apply(null, arguments);
334
+ } } })]), m("span", { staticClass: "holder holder-right", attrs: { contenteditable: "true", tabindex: "-1" } })])]) : m("div", { staticClass: "node-text", attrs: { contenteditable: !r.readOnly }, domProps: { innerHTML: r._s(r.readOnly ? r.formatReadOnly(r.node.text) : r.node.text) }, on: { compositionstart: function(p) {
335
+ return p.stopPropagation(), r.handleCompositionStart.apply(null, arguments);
336
+ }, compositionend: function(p) {
337
+ return p.stopPropagation(), r.handleCompositionEnd.apply(null, arguments);
338
+ }, keyup: function(p) {
339
+ return p.stopPropagation(), r.handleKeyup.apply(null, arguments);
340
+ }, keydown: function(p) {
341
+ return p.stopPropagation(), r.handleKeydown.apply(null, arguments);
342
+ }, dblclick: function(p) {
343
+ return p.stopPropagation(), p.preventDefault(), r.handleDbClick.apply(null, arguments);
344
+ }, focusin: function(p) {
345
+ return p.stopPropagation(), r.handleFocus.apply(null, arguments);
346
346
  } } })]);
347
347
  }, B0 = [], O0 = /* @__PURE__ */ zt(
348
348
  k0,
@@ -409,8 +409,8 @@ const F0 = {
409
409
  handleDragLeave: i0,
410
410
  handleDragStart(_, r) {
411
411
  _.currentTarget.classList.add("dragging"), _.dataTransfer.setData("dragNode", JSON.stringify(r)), St.on("dragEnd", () => {
412
- const b = this.nodes.filter((M) => M !== r);
413
- this.update(b);
412
+ const m = this.nodes.filter((p) => p !== r);
413
+ this.update(m);
414
414
  }), St.set("dragId", r.uuid);
415
415
  },
416
416
  handleDragEnd(_) {
@@ -418,47 +418,47 @@ const F0 = {
418
418
  },
419
419
  handleDrop(_, r) {
420
420
  _.stopPropagation();
421
- const b = _.dataTransfer.files;
422
- if (i0(), b.length)
423
- this.addFiles(b, r);
421
+ const m = _.dataTransfer.files;
422
+ if (i0(), m.length)
423
+ this.addFiles(m, r);
424
424
  else {
425
- let M = _.dataTransfer.getData("dragNode");
426
- const J = M0(_);
425
+ let p = _.dataTransfer.getData("dragNode");
426
+ const J = p0(_);
427
427
  try {
428
- M = JSON.parse(M);
428
+ p = JSON.parse(p);
429
429
  } catch {
430
430
  }
431
431
  if (// 拖拽到自己
432
- r.uuid === M.uuid || // 拖拽到自己的子节点
433
- n0(r, M) || // 拖拽到自己的父节点
434
- n0(M, r))
432
+ r.uuid === p.uuid || // 拖拽到自己的子节点
433
+ n0(r, p) || // 拖拽到自己的父节点
434
+ n0(p, r))
435
435
  return;
436
436
  let Z = [...this.nodes];
437
- if (Z.find((re) => re.uuid === M.uuid) ? Z = Z.filter((re) => re.uuid !== M.uuid) : St.trigger("dragEnd"), St.remove("dragId"), J === "center" && (this.status[r.uuid].collapsed = !1, r.children ? r.children.push(M) : r.children = [M], this.$nextTick(() => {
437
+ if (Z.find((re) => re.uuid === p.uuid) ? Z = Z.filter((re) => re.uuid !== p.uuid) : St.trigger("dragEnd"), St.remove("dragId"), J === "center" && (this.status[r.uuid].collapsed = !1, r.children ? r.children.push(p) : r.children = [p], this.$nextTick(() => {
438
438
  this.update(Z);
439
439
  })), J === "top") {
440
440
  const re = Z.findIndex((ie) => ie === r);
441
- Z.splice(re, 0, M), this.update(Z);
441
+ Z.splice(re, 0, p), this.update(Z);
442
442
  }
443
443
  if (J === "bottom") {
444
444
  const re = Z.findIndex((ie) => ie === r);
445
- Z.splice(re + 1, 0, M), this.update(Z);
445
+ Z.splice(re + 1, 0, p), this.update(Z);
446
446
  }
447
447
  }
448
448
  },
449
449
  handlePaste(_, r) {
450
- const b = _.clipboardData.files;
451
- b.length != 0 && (this.addFiles(b, r), _.preventDefault());
450
+ const m = _.clipboardData.files;
451
+ m.length != 0 && (this.addFiles(m, r), _.preventDefault());
452
452
  },
453
453
  handleTab(_, r) {
454
454
  var Z;
455
455
  _.preventDefault();
456
- const b = [...this.nodes], M = b.findIndex((re) => re === r), J = kt();
456
+ const m = [...this.nodes], p = m.findIndex((re) => re === r), J = kt();
457
457
  if (_.shiftKey)
458
458
  this.$emit("transfer", r);
459
- else if (M > 0) {
460
- const re = this.nodes[M - 1];
461
- (Z = this.status[re.uuid]) != null && Z.collapsed && (this.status[re.uuid].collapsed = !1), re.children ? re.children.push(r) : re.children = [r], b.splice(M, 1), this.update(b);
459
+ else if (p > 0) {
460
+ const re = this.nodes[p - 1];
461
+ (Z = this.status[re.uuid]) != null && Z.collapsed && (this.status[re.uuid].collapsed = !1), re.children ? re.children.push(r) : re.children = [r], m.splice(p, 1), this.update(m);
462
462
  } else
463
463
  _.target.focus();
464
464
  this.$nextTick(() => {
@@ -466,22 +466,22 @@ const F0 = {
466
466
  });
467
467
  },
468
468
  handleRemove(_) {
469
- const r = this.nodes.filter((b) => b.uuid !== _.uuid);
469
+ const r = this.nodes.filter((m) => m.uuid !== _.uuid);
470
470
  if (!this.allowEmpty && this.nodes.length === 1) {
471
- const b = {
471
+ const m = {
472
472
  text: "",
473
473
  uuid: Ct()
474
474
  };
475
- r.push(b), setTimeout(() => {
476
- this.toFocus(b);
475
+ r.push(m), setTimeout(() => {
476
+ this.toFocus(m);
477
477
  }, 200);
478
478
  }
479
479
  this.update(r);
480
480
  },
481
481
  // 节点跨父级移动
482
482
  handleTransfer(_, r) {
483
- const b = [...this.nodes], M = b.findIndex((Z) => Z === _), J = _.children.findIndex((Z) => Z === r);
484
- _.children.splice(J, 1), b.splice(M + 1, 0, r), this.update(b);
483
+ const m = [...this.nodes], p = m.findIndex((Z) => Z === _), J = _.children.findIndex((Z) => Z === r);
484
+ _.children.splice(J, 1), m.splice(p + 1, 0, r), this.update(m);
485
485
  },
486
486
  handleEnter(_) {
487
487
  this.enableDbEnter ? this.timeout ? (clearTimeout(this.timeout), this.timeout = null, this.handleDbEnter()) : this.timeout = setTimeout(() => {
@@ -492,12 +492,12 @@ const F0 = {
492
492
  this.$emit("dbEnter");
493
493
  },
494
494
  keyEnter(_) {
495
- const r = r0(_), b = this.nodes.findIndex((re) => re.uuid === _.uuid), M = kt(), J = [...this.nodes], Z = { text: "", uuid: Ct() };
495
+ const r = r0(_), m = this.nodes.findIndex((re) => re.uuid === _.uuid), p = kt(), J = [...this.nodes], Z = { text: "", uuid: Ct() };
496
496
  if (r)
497
- J.splice(b + 1, 0, Z);
497
+ J.splice(m + 1, 0, Z);
498
498
  else {
499
499
  let re = _.text.replace(/&nbsp;?/g, " ");
500
- _.text = re.slice(0, M), Z.text = re.slice(M, re.length), J.splice(b + 1, 0, Z);
500
+ _.text = re.slice(0, p), Z.text = re.slice(p, re.length), J.splice(m + 1, 0, Z);
501
501
  }
502
502
  this.update(J), this.$nextTick(() => {
503
503
  const re = Nt(Z);
@@ -507,42 +507,42 @@ const F0 = {
507
507
  // 聚焦上一节点
508
508
  toPrevFocus(_, r = !1) {
509
509
  var J;
510
- let b = kt();
511
- const M = this.nodes.findIndex((Z) => Z === _);
512
- if (M === 0)
510
+ let m = kt();
511
+ const p = this.nodes.findIndex((Z) => Z === _);
512
+ if (p === 0)
513
513
  this.$emit("focusPrev", r);
514
514
  else {
515
- const Z = this.nodes[M - 1], re = ((J = Z.children) == null ? void 0 : J.length) && !this.status[Z.uuid].collapsed, ie = Nt(this.nodes[M - 1], re), ye = r || b === 1 / 0;
515
+ const Z = this.nodes[p - 1], re = ((J = Z.children) == null ? void 0 : J.length) && !this.status[Z.uuid].collapsed, ie = Nt(this.nodes[p - 1], re), ye = r || m === 1 / 0;
516
516
  Rt(
517
517
  ie,
518
- ye ? ie.innerText.length : b,
518
+ ye ? ie.innerText.length : m,
519
519
  ye
520
520
  );
521
521
  }
522
522
  },
523
523
  // 聚焦下一节点
524
- toNextFocus(_, r = !1, b = !1) {
524
+ toNextFocus(_, r = !1, m = !1) {
525
525
  var Z;
526
- const M = kt(), J = this.nodes.findIndex((re) => re === _);
527
- if (b && ((Z = _.children) != null && Z.length) && !this.status[_.uuid].collapsed) {
526
+ const p = kt(), J = this.nodes.findIndex((re) => re === _);
527
+ if (m && ((Z = _.children) != null && Z.length) && !this.status[_.uuid].collapsed) {
528
528
  const re = Nt(_.children[0]);
529
- Rt(re, r ? 0 : M);
529
+ Rt(re, r ? 0 : p);
530
530
  } else if (J + 1 >= this.nodes.length)
531
531
  this.$emit("focusNext", !0);
532
532
  else {
533
533
  const re = Nt(this.nodes[J + 1]);
534
- Rt(re, r ? 0 : M);
534
+ Rt(re, r ? 0 : p);
535
535
  }
536
536
  },
537
537
  // 聚焦到指定节点
538
538
  toFocus(_, r = !1) {
539
- let b = kt();
540
- const M = Nt(_);
541
- Rt(M, b, r);
539
+ let m = kt();
540
+ const p = Nt(_);
541
+ Rt(p, m, r);
542
542
  },
543
543
  addFiles(_, r) {
544
544
  if (_) {
545
- const M = Array.from(_).slice(0, 5), J = (Z) => {
545
+ const p = Array.from(_).slice(0, 5), J = (Z) => {
546
546
  const re = [...this.nodes];
547
547
  let ie = re.findIndex((ye) => ye === r);
548
548
  Z.forEach((ye, Re) => {
@@ -553,7 +553,7 @@ const F0 = {
553
553
  }) : re.splice(ie + 1, 0, ye), ie++;
554
554
  }), this.update(re);
555
555
  };
556
- this.$emit("fileUpload", M, J);
556
+ this.$emit("fileUpload", p, J);
557
557
  }
558
558
  },
559
559
  handleCollapse(_, r) {
@@ -561,28 +561,32 @@ const F0 = {
561
561
  },
562
562
  head(_ = !1) {
563
563
  const r = Nt(this.nodes[0]);
564
- return _ && r && r.focus(), r;
564
+ if (_ && r) {
565
+ const m = r.querySelector(".holder-right");
566
+ m ? m.focus() : r.focus();
567
+ }
568
+ return r;
565
569
  },
566
570
  // dfs查找并追加节点
567
- appendNode(_, r = !1, b = this.nodes) {
568
- const M = St.get("currentId"), J = [...b];
569
- if (!r && (!M || !document.getElementById(M))) {
571
+ appendNode(_, r = !1, m = this.nodes) {
572
+ const p = St.get("currentId"), J = [...m];
573
+ if (!r && (!p || !document.getElementById(p))) {
570
574
  J.push(_), this.update(J);
571
575
  return;
572
576
  }
573
- const Z = J.findIndex((re) => re.uuid === M);
577
+ const Z = J.findIndex((re) => re.uuid === p);
574
578
  return Z >= 0 ? J.splice(Z + 1, 0, _) : J.forEach((re) => {
575
579
  var ie;
576
580
  (ie = re.children) != null && ie.length && (re.children = this.appendNode(_, !0, re.children));
577
581
  }), r || this.update(J), J;
578
582
  },
579
583
  // dfs查找并更新节点
580
- updateNode(_, r = !1, b = this.nodes) {
581
- const M = [...b], J = M.findIndex((Z) => Z.uuid === _.uuid);
582
- return J >= 0 ? M[J] = _ : M.forEach((Z) => {
584
+ updateNode(_, r = !1, m = this.nodes) {
585
+ const p = [...m], J = p.findIndex((Z) => Z.uuid === _.uuid);
586
+ return J >= 0 ? p[J] = _ : p.forEach((Z) => {
583
587
  var re;
584
588
  (re = Z.children) != null && re.length && (Z.children = this.updateNode(_, !0, Z.children));
585
- }), r || this.update(M), M;
589
+ }), r || this.update(p), p;
586
590
  },
587
591
  filterNodes(_) {
588
592
  return process.env.NODE_ENV === "development" ? _ : _.filter((r) => !r.pending || r.hash === this.hash);
@@ -592,8 +596,8 @@ const F0 = {
592
596
  let _ = !1;
593
597
  this.nodes.forEach((r) => {
594
598
  if (r.uuid || (r.uuid = Ct(), _ = !0), r0(r) && !r.type) {
595
- const b = C0(r.text);
596
- b && (r.type = b.type, r.content = b.content), _ = !0;
599
+ const m = C0(r.text);
600
+ m && (r.type = m.type, r.content = m.content), _ = !0;
597
601
  }
598
602
  }), _ ? this.update() : this.ensureStatus(this.nodes);
599
603
  },
@@ -611,7 +615,7 @@ const F0 = {
611
615
  // 更新node节点
612
616
  // 用于Node组件触发change
613
617
  handleNodeChange(_) {
614
- const r = this.nodes.map((b) => b.uuid === _.uuid ? _ : b);
618
+ const r = this.nodes.map((m) => m.uuid === _.uuid ? _ : m);
615
619
  this.update(r);
616
620
  },
617
621
  update(_ = this.nodes) {
@@ -620,38 +624,38 @@ const F0 = {
620
624
  }
621
625
  };
622
626
  var U0 = function() {
623
- var r = this, b = r._self._c;
624
- return r.readOnly ? b("ul", { class: {
627
+ var r = this, m = r._self._c;
628
+ return r.readOnly ? m("ul", { class: {
625
629
  "node-ul": !0,
626
630
  readOnly: !0,
627
631
  sublevel: !0
628
- } }, r._l(r.filterNodes(r.nodes), function(M) {
629
- return b("li", { key: M.uuid, class: {
632
+ } }, r._l(r.filterNodes(r.nodes), function(p) {
633
+ return m("li", { key: p.uuid, class: {
630
634
  "node-li": !0,
631
- collapsed: r.status[M.uuid] ? r.status[M.uuid].collapsed : !1,
632
- "has-child": !!(M.children || []).length
633
- }, attrs: { id: `${M.uuid}` } }, [b("Node", { attrs: { readOnly: "", node: M, isMobile: r.isMobile }, on: { collapse: r.handleCollapse } }), (M.children || []).length ? b("tree-editor", { attrs: { nodes: M.children, sublevel: !0, isMobile: r.isMobile } }) : r._e()], 1);
634
- }), 0) : b("ul", { class: {
635
+ collapsed: r.status[p.uuid] ? r.status[p.uuid].collapsed : !1,
636
+ "has-child": !!(p.children || []).length
637
+ }, attrs: { id: `${p.uuid}` } }, [m("Node", { attrs: { readOnly: "", node: p, isMobile: r.isMobile }, on: { collapse: r.handleCollapse } }), (p.children || []).length ? m("tree-editor", { attrs: { nodes: p.children, sublevel: !0, isMobile: r.isMobile } }) : r._e()], 1);
638
+ }), 0) : m("ul", { class: {
635
639
  "node-ul": !0,
636
640
  sublevel: !0
637
- } }, r._l(r.filterNodes(r.nodes), function(M) {
638
- return b("li", { key: M.uuid, ref: "elements", refInFor: !0, class: {
641
+ } }, r._l(r.filterNodes(r.nodes), function(p) {
642
+ return m("li", { key: p.uuid, ref: "elements", refInFor: !0, class: {
639
643
  "node-li": !0,
640
- collapsed: r.status[M.uuid] ? r.status[M.uuid].collapsed : !1,
641
- "has-child": !!(M.children || []).length
642
- }, attrs: { id: `${M.uuid}`, draggable: "true" }, on: { dragstart: function(J) {
643
- return J.stopPropagation(), r.handleDragStart(J, M);
644
+ collapsed: r.status[p.uuid] ? r.status[p.uuid].collapsed : !1,
645
+ "has-child": !!(p.children || []).length
646
+ }, attrs: { id: `${p.uuid}`, draggable: "true" }, on: { dragstart: function(J) {
647
+ return J.stopPropagation(), r.handleDragStart(J, p);
644
648
  }, dragover: function(J) {
645
- return J.stopPropagation(), J.preventDefault(), r.handleDragOver(J, M);
649
+ return J.stopPropagation(), J.preventDefault(), r.handleDragOver(J, p);
646
650
  }, dragend: function(J) {
647
- return J.stopPropagation(), J.preventDefault(), r.handleDragEnd(J, M);
651
+ return J.stopPropagation(), J.preventDefault(), r.handleDragEnd(J, p);
648
652
  }, drop: function(J) {
649
- return J.stopPropagation(), r.handleDrop(J, M);
653
+ return J.stopPropagation(), r.handleDrop(J, p);
650
654
  }, dragleave: function(J) {
651
- return J.stopPropagation(), r.handleDragLeave(J, M);
655
+ return J.stopPropagation(), r.handleDragLeave(J, p);
652
656
  }, paste: function(J) {
653
- return J.stopPropagation(), J.preventDefault(), r.handlePaste(J, M);
654
- } } }, [b("Node", { attrs: { node: M, 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 } }), (M.children || []).length ? b("tree-editor", { attrs: { nodes: M.children, enableDbEnter: r.enableDbEnter, hash: r.hash, isMobile: r.isMobile, allowEmpty: !0, sublevel: !0 }, on: { change: (J) => r.handleChangeChildren(M, J), focusPrev: (J) => r.toFocus(M, J), focusNext: (J) => r.toNextFocus(M, J), transfer: (J) => r.handleTransfer(M, J), fileUpload: (...J) => r.$emit("fileUpload", ...J), dbEnter: r.handleDbEnter } }) : r._e()], 1);
657
+ return J.stopPropagation(), J.preventDefault(), r.handlePaste(J, p);
658
+ } } }, [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: (J) => r.handleChangeChildren(p, J), focusPrev: (J) => r.toFocus(p, J), focusNext: (J) => r.toNextFocus(p, J), transfer: (J) => r.handleTransfer(p, J), fileUpload: (...J) => r.$emit("fileUpload", ...J), dbEnter: r.handleDbEnter } }) : r._e()], 1);
655
659
  }), 0);
656
660
  }, P0 = [], H0 = /* @__PURE__ */ zt(
657
661
  F0,
@@ -659,7 +663,7 @@ var U0 = function() {
659
663
  P0,
660
664
  !1,
661
665
  null,
662
- "e0823576",
666
+ "b06218f5",
663
667
  null,
664
668
  null
665
669
  );
@@ -685,10 +689,10 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
685
689
  };
686
690
  (function(_) {
687
691
  (function(r) {
688
- var b = typeof window == "object" && !!window.document, M = b ? window : Object;
689
- r(M, b), _.exports && (_.exports = M.Recorder);
690
- })(function(r, b) {
691
- var M = function() {
692
+ var m = typeof window == "object" && !!window.document, p = m ? window : Object;
693
+ r(p, m), _.exports && (_.exports = p.Recorder);
694
+ })(function(r, m) {
695
+ var p = function() {
692
696
  }, J = function(e) {
693
697
  return typeof e == "number";
694
698
  }, Z = function(e) {
@@ -703,8 +707,8 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
703
707
  if (e) {
704
708
  var o = e.getTracks && e.getTracks() || e.audioTracks || [], h = o[0];
705
709
  if (h) {
706
- var m = h.readyState;
707
- return m == "live" || m == h.LIVE;
710
+ var b = h.readyState;
711
+ return b == "live" || b == h.LIVE;
708
712
  }
709
713
  }
710
714
  return !1;
@@ -717,20 +721,20 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
717
721
  Z.BindDestroy = function(e, o) {
718
722
  ge[e] = o;
719
723
  }, Z.Support = function() {
720
- if (!b)
724
+ if (!m)
721
725
  return !1;
722
726
  var e = navigator.mediaDevices || {};
723
727
  return e[Re] || (e = navigator, e[Re] || (e[Re] = e.webkitGetUserMedia || e.mozGetUserMedia || e.msGetUserMedia)), !(!e[Re] || (Z.Scope = e, !Z.GetContext()));
724
728
  }, Z.GetContext = function(e) {
725
- if (!b)
729
+ if (!m)
726
730
  return null;
727
731
  var o = window.AudioContext;
728
732
  if (o || (o = window.webkitAudioContext), !o)
729
733
  return null;
730
734
  var h = Z.Ctx;
731
735
  if ((!h || h.state == "closed") && (h = Z.Ctx = new o(), Z.NewCtxs = Z.NewCtxs || [], Z.BindDestroy("Ctx", function() {
732
- var m = Z.Ctx;
733
- m && m.close && (m.close(), Z.Ctx = 0);
736
+ var b = Z.Ctx;
737
+ b && b.close && (b.close(), Z.Ctx = 0);
734
738
  var S = Z.NewCtxs;
735
739
  Z.NewCtxs = [];
736
740
  for (var Y = 0; Y < S.length; Y++)
@@ -738,16 +742,16 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
738
742
  })), e && h.close)
739
743
  try {
740
744
  h = new o(), Z.NewCtxs.push(h);
741
- } catch (m) {
742
- Fe("GetContext tryNew Error", 1, m);
745
+ } catch (b) {
746
+ Fe("GetContext tryNew Error", 1, b);
743
747
  }
744
748
  return h;
745
749
  }, Z.CloseNewCtx = function(e) {
746
750
  if (e && e != Z.Ctx) {
747
751
  e.close && e.close();
748
- for (var o = Z.NewCtxs || [], h = o.length, m = 0; m < o.length; m++)
749
- if (o[m] == e) {
750
- o.splice(m, 1);
752
+ for (var o = Z.NewCtxs || [], h = o.length, b = 0; b < o.length; b++)
753
+ if (o[b] == e) {
754
+ o.splice(b, 1);
751
755
  break;
752
756
  }
753
757
  Fe(De("mSxV::剩{1}个GetContext未close", 0, h + "-1=" + o.length), o.length ? 3 : 0);
@@ -761,12 +765,12 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
761
765
  var de = "ConnectEnableWorklet";
762
766
  Z[de] = !1;
763
767
  var ze = function(e, o) {
764
- var h = e.BufferSize || Z.BufferSize, m = e.Stream, S = m._RC || m._c || Z.GetContext(!0);
765
- m._c = S;
768
+ var h = e.BufferSize || Z.BufferSize, b = e.Stream, S = b._RC || b._c || Z.GetContext(!0);
769
+ b._c = S;
766
770
  var Y = function(P) {
767
- var T = m._m = S.createMediaStreamSource(m), oe = S.destination, g = "createMediaStreamDestination";
768
- S[g] && (oe = m._d = S[g]()), T.connect(P), P.connect(oe);
769
- }, D, s, q, te = "", me = m._call, be = function(P) {
771
+ var T = b._m = S.createMediaStreamSource(b), oe = S.destination, g = "createMediaStreamDestination";
772
+ S[g] && (oe = b._d = S[g]()), T.connect(P), P.connect(oe);
773
+ }, D, s, q, te = "", me = b._call, be = function(P) {
770
774
  for (var T in me) {
771
775
  for (var oe = P.length, g = new Int16Array(oe), z = 0, ae = 0; ae < oe; ae++) {
772
776
  var j = Math.max(-1, Math.min(1, P[ae]));
@@ -776,18 +780,18 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
776
780
  me[K](g, z);
777
781
  return;
778
782
  }
779
- }, ne = "ScriptProcessor", ce = "audioWorklet", Me = 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), ee = function() {
780
- s = m.isWorklet = !1, $e(m), Fe(De("7TU0::Connect采用老的{1},", 0, ne) + ft.get(
783
+ }, 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), ee = function() {
784
+ s = b.isWorklet = !1, $e(b), Fe(De("7TU0::Connect采用老的{1},", 0, ne) + ft.get(
781
785
  Z[de] ? De("JwCL::但已设置{1}尝试启用{2}", 2) : De("VGjB::可设置{1}尝试启用{2}", 2),
782
786
  [ye + "." + de + "=true", ce]
783
787
  ) + te + U, 3);
784
- var P = m._p = we.call(S, h, 1, 1);
788
+ var P = b._p = we.call(S, h, 1, 1);
785
789
  Y(P), P.onaudioprocess = function(T) {
786
790
  var oe = T.inputBuffer.getChannelData(0);
787
791
  be(oe);
788
792
  };
789
793
  }, c = function() {
790
- D = m.isWebM = !1, Ke(m), s = m.isWorklet = !we || Z[de];
794
+ D = b.isWebM = !1, Ke(b), s = b.isWorklet = !we || Z[de];
791
795
  var P = window.AudioWorkletNode;
792
796
  if (!(s && S[ce] && P)) {
793
797
  ee();
@@ -795,7 +799,7 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
795
799
  }
796
800
  var T = function() {
797
801
  var ae = function(K) {
798
- return K.toString().replace(/^function|DEL_/g, "").replace(/\$RA/g, Me);
802
+ return K.toString().replace(/^function|DEL_/g, "").replace(/\$RA/g, pe);
799
803
  }, j = "class " + se + " extends AudioWorkletProcessor{";
800
804
  return j += "constructor " + ae(function(K) {
801
805
  DEL_super(K);
@@ -816,16 +820,16 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
816
820
  E.pos = l;
817
821
  }
818
822
  return !E.kill;
819
- }), j += '}try{registerProcessor("' + se + '", ' + se + ')}catch(e){$C.error("' + Me + ' Reg Error",e)}', j = j.replace(/\$C\./g, "console."), "data:text/javascript;base64," + btoa(unescape(encodeURIComponent(j)));
823
+ }), j += '}try{registerProcessor("' + se + '", ' + se + ')}catch(e){$C.error("' + pe + ' Reg Error",e)}', j = j.replace(/\$C\./g, "console."), "data:text/javascript;base64," + btoa(unescape(encodeURIComponent(j)));
820
824
  }, oe = function() {
821
- return s && m._na;
822
- }, g = m._na = function() {
825
+ return s && b._na;
826
+ }, g = b._na = function() {
823
827
  q !== "" && (clearTimeout(q), q = setTimeout(function() {
824
828
  q = 0, oe() && (Fe(De("MxX1::{1}未返回任何音频,恢复使用{2}", 0, ce, ne), 3), we && ee());
825
829
  }, 500));
826
830
  }, z = function() {
827
831
  if (oe()) {
828
- var ae = m._n = new P(S, se, {
832
+ var ae = b._n = new P(S, se, {
829
833
  processorOptions: { bufferSize: h }
830
834
  });
831
835
  Y(ae), ae.port.onmessage = function(j) {
@@ -849,26 +853,26 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
849
853
  });
850
854
  }, N = function() {
851
855
  var P = window[G], T = "ondataavailable", oe = "audio/webm; codecs=pcm";
852
- D = m.isWebM = Z[Ye];
856
+ D = b.isWebM = Z[Ye];
853
857
  var g = P && T in P.prototype && P.isTypeSupported(oe);
854
858
  if (te = g ? "" : De("VwPd::(此浏览器不支持{1})", 0, ve), !o || !D || !g) {
855
859
  c();
856
860
  return;
857
861
  }
858
862
  var z = function() {
859
- return D && m._ra;
863
+ return D && b._ra;
860
864
  };
861
- m._ra = function() {
865
+ b._ra = function() {
862
866
  q !== "" && (clearTimeout(q), q = setTimeout(function() {
863
867
  z() && (Fe(De("vHnb::{1}未返回任何音频,降级使用{2}", 0, G, ce), 3), c());
864
868
  }, 500));
865
869
  };
866
- var ae = Object.assign({ mimeType: oe }, Z.ConnectWebMOptions), j = m._r = new P(m, ae), K = m._rd = { sampleRate: S[Oe] };
870
+ var ae = Object.assign({ mimeType: oe }, Z.ConnectWebMOptions), j = b._r = new P(b, ae), K = b._rd = { sampleRate: S[Oe] };
867
871
  j[T] = function(k) {
868
872
  var fe = new FileReader();
869
873
  fe.onloadend = function() {
870
874
  if (z()) {
871
- var E = Mt(new Uint8Array(fe.result), K);
875
+ var E = pt(new Uint8Array(fe.result), K);
872
876
  if (!E)
873
877
  return;
874
878
  if (E == -1) {
@@ -894,32 +898,32 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
894
898
  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;
895
899
  }, Je = Z.StopS_ = function(e) {
896
900
  for (var o = e.getTracks && e.getTracks() || e.audioTracks || [], h = 0; h < o.length; h++) {
897
- var m = o[h];
898
- m.stop && m.stop();
901
+ var b = o[h];
902
+ b.stop && b.stop();
899
903
  }
900
904
  e.stop && e.stop();
901
905
  };
902
- Z.SampleData = function(e, o, h, m, S) {
906
+ Z.SampleData = function(e, o, h, b, S) {
903
907
  var Y = "SampleData";
904
- m || (m = {});
905
- var D = m.index || 0, s = m.offset || 0, q = m.filter;
908
+ b || (b = {});
909
+ var D = b.index || 0, s = b.offset || 0, q = b.filter;
906
910
  if (q && q.fn && q.sr != o && (q = null, Fe(De("d48C::{1}的filter采样率变了,重设滤波", 0, Y), 3)), !q) {
907
911
  var te = h > o * 3 / 4 ? 0 : h / 2 * 3 / 4;
908
912
  q = { fn: te ? Z.IIRFilter(!0, o, te) : 0 };
909
913
  }
910
914
  q.sr = o;
911
- var me = q.fn, be = m.frameNext || [];
915
+ var me = q.fn, be = b.frameNext || [];
912
916
  S || (S = {});
913
917
  var ne = S.frameSize || 1;
914
918
  S.frameType && (ne = S.frameType == "mp3" ? 1152 : 1);
915
919
  var ce = e.length;
916
920
  D > ce + 1 && Fe(De("tlbC::{1}似乎传入了未重置chunk {2}", 0, Y, D + ">" + ce), 3);
917
- for (var Me = 0, se = D; se < ce; se++)
918
- Me += e[se].length;
919
- Me = Math.max(0, Me - Math.floor(s));
921
+ for (var pe = 0, se = D; se < ce; se++)
922
+ pe += e[se].length;
923
+ pe = Math.max(0, pe - Math.floor(s));
920
924
  var G = o / h;
921
- G > 1 ? Me = Math.floor(Me / G) : (G = 1, h = o), Me += be.length;
922
- for (var ve = new Int16Array(Me), we = 0, se = 0; se < be.length; se++)
925
+ G > 1 ? pe = Math.floor(pe / G) : (G = 1, h = o), pe += be.length;
926
+ for (var ve = new Int16Array(pe), we = 0, se = 0; se < be.length; se++)
923
927
  ve[we] = be[se], we++;
924
928
  for (; D < ce; D++) {
925
929
  for (var U = e[D], se = s, ee = U.length, c = me && me.Embed, N = 0, P = 0, T = 0, oe = 0, g = 0, z = 0; g < ee; g++, z++) {
@@ -950,24 +954,24 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
950
954
  data: ve
951
955
  };
952
956
  }, Z.IIRFilter = function(e, o, h) {
953
- var m = 2 * Math.PI * h / o, S = Math.sin(m), Y = Math.cos(m), D = S / 2, s = 1 + D, q = -2 * Y / s, te = (1 - D) / s;
957
+ 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, te = (1 - D) / s;
954
958
  if (e)
955
959
  var me = (1 - Y) / 2 / s, be = (1 - Y) / s;
956
960
  else
957
961
  var me = (1 + Y) / 2 / s, be = -(1 + Y) / s;
958
- var ne = 0, ce = 0, Me = 0, se = 0, G = 0, ve = function(we) {
959
- return Me = me * we + be * ne + me * ce - q * se - te * G, ce = ne, ne = we, G = se, se = Me, Me;
962
+ var ne = 0, ce = 0, pe = 0, se = 0, G = 0, ve = function(we) {
963
+ return pe = me * we + be * ne + me * ce - q * se - te * G, ce = ne, ne = we, G = se, se = pe, pe;
960
964
  };
961
965
  return ve.Embed = { x1: 0, x2: 0, y1: 0, y2: 0, b0: me, b1: be, a1: q, a2: te }, ve;
962
966
  }, Z.PowerLevel = function(e, o) {
963
- var h = e / o || 0, m;
964
- return h < 1251 ? m = Math.round(h / 1250 * 10) : m = Math.round(Math.min(100, Math.max(0, (1 + Math.log(h / 1e4) / Math.log(10)) * 100))), m;
967
+ var h = e / o || 0, b;
968
+ 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;
965
969
  }, Z.PowerDBFS = function(e) {
966
970
  var o = Math.max(0.1, e || 0), h = 32767;
967
971
  return o = Math.min(o, h), o = 20 * Math.log(o / h) / Math.log(10), Math.max(-100, Math.round(o));
968
972
  }, Z.CLog = function(e, o) {
969
973
  if (typeof console == "object") {
970
- var h = new Date(), m = ("0" + h.getMinutes()).substr(-2) + ":" + ("0" + h.getSeconds()).substr(-2) + "." + ("00" + h.getMilliseconds()).substr(-3), S = this && this.envIn && this.envCheck && this.id, Y = ["[" + m + " " + ye + (S ? ":" + S : "") + "]" + e], D = arguments, s = Z.CLog, q = 2, te = s.log || console.log;
974
+ 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, te = s.log || console.log;
971
975
  for (J(o) ? te = o == 1 ? s.error || console.error : o == 3 ? s.warn || console.warn : te : q = 1; q < D.length; q++)
972
976
  Y.push(D[q]);
973
977
  Xe ? te && te("[IsLoser]" + Y[0], Y.length > 1 ? Y : "") : te.apply(console, Y);
@@ -986,7 +990,7 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
986
990
  o.id = ++Le, R();
987
991
  var h = {
988
992
  type: "mp3",
989
- onProcess: M
993
+ onProcess: p
990
994
  //fn(buffers,powerLevel,bufferDuration,bufferSampleRate,newBufferIdx,asyncEnd) buffers=[[Int16,...],...]:缓冲的PCM数据,为从开始录音到现在的所有pcm片段;powerLevel:当前缓冲的音量级别0-100,bufferDuration:已缓冲时长,bufferSampleRate:缓冲使用的采样率(当type支持边录边转码(Worker)时,此采样率和设置的采样率相同,否则不一定相同);newBufferIdx:本次回调新增的buffer起始索引;asyncEnd:fn() 如果onProcess是异步的(返回值为true时),处理完成时需要调用此回调,如果不是异步的请忽略此参数,此方法回调时必须是真异步(不能真异步时需用setTimeout包裹)。onProcess返回值:如果返回true代表开启异步模式,在某些大量运算的场合异步是必须的,必须在异步处理完成时调用asyncEnd(不能真异步时需用setTimeout包裹),在onProcess执行后新增的buffer会全部替换成空数组,因此本回调开头应立即将newBufferIdx到本次回调结尾位置的buffer全部保存到另外一个数组内,处理完成后写回buffers中本次回调的结尾位置。
991
995
  //*******高级设置******
992
996
  //,sourceStream:MediaStream Object
@@ -1006,8 +1010,8 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
1006
1010
  //大部分录音格式编码器都支持实时编码(边录边转码),比如mp3格式:会实时的将编码出来的mp3片段通过此方法回调,所有的chunkBytes拼接到一起即为完整的mp3,此种拼接的结果比mock方法实时生成的音质更加,因为天然避免了首尾的静默
1007
1011
  //不支持实时编码的录音格式不可以提供此回调(wav格式不支持,因为wav文件头中需要提供文件最终长度),提供了将在open时直接走fail逻辑
1008
1012
  };
1009
- for (var m in e)
1010
- h[m] = e[m];
1013
+ for (var b in e)
1014
+ h[b] = e[b];
1011
1015
  o.set = h;
1012
1016
  var S = h[Ve], Y = h[Oe];
1013
1017
  (S && !J(S) || Y && !J(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 };
@@ -1027,8 +1031,8 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
1027
1031
  return e && e._c;
1028
1032
  },
1029
1033
  open: function(e, o) {
1030
- var h = this, m = h.set, S = h._streamStore(), Y = 0;
1031
- e = e || M;
1034
+ var h = this, b = h.set, S = h._streamStore(), Y = 0;
1035
+ e = e || p;
1032
1036
  var D = function(c, N) {
1033
1037
  N = !!N, h.CLog(De("5tWi::录音open失败:") + c + ",isUserNotAllow:" + N, 1), Y && Z.CloseNewCtx(Y), o && o(c, N);
1034
1038
  };
@@ -1043,7 +1047,7 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
1043
1047
  return te == q.O ? h.close() : c = De("VtJO::open被中断"), D(c), !0;
1044
1048
  }
1045
1049
  };
1046
- if (!b) {
1050
+ if (!m) {
1047
1051
  D(De.G("NonBrowser-1", ["open"]) + De("EMJq::,可尝试使用RecordApp解决方案") + "(" + ie + "/tree/master/app-support-sample)");
1048
1052
  return;
1049
1053
  }
@@ -1052,14 +1056,14 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
1052
1056
  D(De("A5bm::不能录音:") + ne);
1053
1057
  return;
1054
1058
  }
1055
- if (m.sourceStream) {
1059
+ if (b.sourceStream) {
1056
1060
  if (h._streamTag = "set.sourceStream", !Z.GetContext()) {
1057
1061
  D(De("1iU7::不支持此浏览器从流中获取录音"));
1058
1062
  return;
1059
1063
  }
1060
1064
  at(S);
1061
- var ce = h.Stream = m.sourceStream;
1062
- ce._RC = m.runningContext, ce._call = {};
1065
+ var ce = h.Stream = b.sourceStream;
1066
+ ce._RC = b.runningContext, ce._call = {};
1063
1067
  try {
1064
1068
  ze(S);
1065
1069
  } catch (c) {
@@ -1069,7 +1073,7 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
1069
1073
  s();
1070
1074
  return;
1071
1075
  }
1072
- var Me = function(c, N) {
1076
+ var pe = function(c, N) {
1073
1077
  try {
1074
1078
  window.top.a;
1075
1079
  } catch {
@@ -1083,21 +1087,21 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
1083
1087
  return;
1084
1088
  }
1085
1089
  if (!Z.Support()) {
1086
- Me("", De("COxc::此浏览器不支持录音"));
1090
+ pe("", De("COxc::此浏览器不支持录音"));
1087
1091
  return;
1088
1092
  }
1089
- var se = m.runningContext;
1093
+ var se = b.runningContext;
1090
1094
  se || (se = Y = Z.GetContext(!0));
1091
1095
  var G = function(c) {
1092
1096
  setTimeout(function() {
1093
1097
  c._call = {};
1094
1098
  var N = Z.Stream;
1095
- N && (at(), c._call = N._call), Z.Stream = c, c._c = se, c._RC = m.runningContext, !be() && (Z.IsOpen() ? (N && h.CLog(De("upb8::发现同时多次调用open"), 1), ze(S, 1), s()) : D(De("Q1GA::录音功能无效:无音频流")));
1099
+ 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::录音功能无效:无音频流")));
1096
1100
  }, 100);
1097
1101
  }, ve = function(c) {
1098
1102
  var N = c.name || c.message || c.code + ":" + c;
1099
- h.CLog(De("xEQR::请求录音权限错误"), 1, c), Me(N, De("bDOG::无法录音:") + N);
1100
- }, we = m.audioTrackSet || {};
1103
+ h.CLog(De("xEQR::请求录音权限错误"), 1, c), pe(N, De("bDOG::无法录音:") + N);
1104
+ }, we = b.audioTrackSet || {};
1101
1105
  we[Oe] = se[Oe];
1102
1106
  var U = { audio: we };
1103
1107
  try {
@@ -1108,36 +1112,36 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
1108
1112
  h.CLog(Re + "(" + JSON.stringify(U) + ") " + Ce(se) + De("RiWe::,未配置noiseSuppression和echoCancellation时浏览器可能会自动打开降噪和回声消除,移动端可能会降低系统播放音量(关闭录音后可恢复),请参阅文档中audioTrackSet配置") + "(" + ie + ") LM:" + re + " UA:" + navigator.userAgent), ee && ee.then && ee.then(G)[Ze](ve);
1109
1113
  },
1110
1114
  close: function(e) {
1111
- e = e || M;
1115
+ e = e || p;
1112
1116
  var o = this, h = o._streamStore();
1113
1117
  o._stop();
1114
- var m = " stream:" + o._streamTag, S = h.Sync;
1118
+ var b = " stream:" + o._streamTag, S = h.Sync;
1115
1119
  if (o._O = 0, o._O_ != S.O) {
1116
- o.CLog(De("hWVz::close被忽略(因为同时open了多个rec,只有最后一个会真正close)") + m, 3), e();
1120
+ o.CLog(De("hWVz::close被忽略(因为同时open了多个rec,只有最后一个会真正close)") + b, 3), e();
1117
1121
  return;
1118
1122
  }
1119
- S.C++, at(h), o.CLog("close," + m), e();
1123
+ S.C++, at(h), o.CLog("close," + b), e();
1120
1124
  },
1121
1125
  mock: function(e, o) {
1122
1126
  var h = this;
1123
1127
  return h._stop(), h.isMock = 1, h.mockEnvInfo = null, h.buffers = [e], h.recSize = e.length, h._setSrcSR(o), h._streamTag = "mock", h;
1124
1128
  },
1125
1129
  _setSrcSR: function(e) {
1126
- var o = this, h = o.set, m = h[Oe];
1127
- m > e ? h[Oe] = e : m = 0, o[ke] = e, o.CLog(ke + ": " + e + " set." + Oe + ": " + h[Oe] + (m ? " " + De("UHvm::忽略") + ": " + m : ""), m ? 3 : 0);
1130
+ var o = this, h = o.set, b = h[Oe];
1131
+ b > e ? h[Oe] = e : b = 0, o[ke] = e, o.CLog(ke + ": " + e + " set." + Oe + ": " + h[Oe] + (b ? " " + De("UHvm::忽略") + ": " + b : ""), b ? 3 : 0);
1128
1132
  },
1129
1133
  envCheck: function(e) {
1130
- var o, h = this, m = h.set, S = "CPU_BE";
1134
+ var o, h = this, b = h.set, S = "CPU_BE";
1131
1135
  if (!o && !Z[S] && typeof Int8Array == "function" && !new Int8Array(new Int32Array([1]).buffer)[0] && (R(S), o = De("Essp::不支持{1}架构", 0, S)), !o) {
1132
- var Y = m.type, D = h[Y + "_envCheck"];
1133
- m.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, m));
1136
+ var Y = b.type, D = h[Y + "_envCheck"];
1137
+ 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));
1134
1138
  }
1135
1139
  return o || "";
1136
1140
  },
1137
1141
  envStart: function(e, o) {
1138
- var h = this, m = h.set;
1139
- if (h.isMock = e ? 1 : 0, h.mockEnvInfo = e, h.buffers = [], h.recSize = 0, e && (h._streamTag = "env$" + e.envName), h.state = 1, h.envInLast = 0, h.envInFirst = 0, h.envInFix = 0, h.envInFixTs = [], h._setSrcSR(o), h.engineCtx = 0, h[m.type + "_start"]) {
1140
- var S = h.engineCtx = h[m.type + "_start"](m);
1142
+ var h = this, b = h.set;
1143
+ if (h.isMock = e ? 1 : 0, h.mockEnvInfo = e, h.buffers = [], h.recSize = 0, e && (h._streamTag = "env$" + e.envName), h.state = 1, h.envInLast = 0, h.envInFirst = 0, h.envInFix = 0, h.envInFixTs = [], h._setSrcSR(o), h.engineCtx = 0, h[b.type + "_start"]) {
1144
+ var S = h.engineCtx = h[b.type + "_start"](b);
1141
1145
  S && (S.pcmDatas = [], S.pcmSize = 0);
1142
1146
  }
1143
1147
  },
@@ -1145,7 +1149,7 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
1145
1149
  this.envInFixTs = [];
1146
1150
  },
1147
1151
  envIn: function(e, o) {
1148
- var h = this, m = h.set, S = h.engineCtx;
1152
+ var h = this, b = h.set, S = h.engineCtx;
1149
1153
  if (h.state != 1) {
1150
1154
  h.state || h.CLog("envIn at state=0", 3);
1151
1155
  return;
@@ -1154,21 +1158,21 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
1154
1158
  q.push(e);
1155
1159
  var me = q, be = te, ne = Date.now(), ce = Math.round(D / Y * 1e3);
1156
1160
  h.envInLast = ne, h.buffers.length == 1 && (h.envInFirst = ne - ce);
1157
- var Me = h.envInFixTs;
1158
- Me.splice(0, 0, { t: ne, d: ce });
1159
- for (var se = ne, G = 0, ve = 0; ve < Me.length; ve++) {
1160
- var we = Me[ve];
1161
+ var pe = h.envInFixTs;
1162
+ pe.splice(0, 0, { t: ne, d: ce });
1163
+ for (var se = ne, G = 0, ve = 0; ve < pe.length; ve++) {
1164
+ var we = pe[ve];
1161
1165
  if (ne - we.t > 3e3) {
1162
- Me.length = ve;
1166
+ pe.length = ve;
1163
1167
  break;
1164
1168
  }
1165
1169
  se = we.t, G += we.d;
1166
1170
  }
1167
- var U = Me[1], ee = ne - se, c = ee - G;
1168
- if (c > ee / 3 && (U && ee > 1e3 || Me.length >= 6)) {
1171
+ var U = pe[1], ee = ne - se, c = ee - G;
1172
+ if (c > ee / 3 && (U && ee > 1e3 || pe.length >= 6)) {
1169
1173
  var N = ne - U.t - ce;
1170
1174
  if (N > ce / 5) {
1171
- var P = !m.disableEnvInFix;
1175
+ var P = !b.disableEnvInFix;
1172
1176
  if (h.CLog("[" + ne + "]" + ft.get(De(P ? "4Kfd::补偿{1}ms" : "bM5i::未补偿{1}ms", 1), [N]), 3), h.envInFix += N, P) {
1173
1177
  var T = new Int16Array(N * Y / 1e3);
1174
1178
  D += T.length, q.push(T);
@@ -1177,13 +1181,13 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
1177
1181
  }
1178
1182
  var oe = h.recSize, g = D, z = oe + g;
1179
1183
  if (h.recSize = z, S) {
1180
- var ae = Z.SampleData(q, Y, m[Oe], S.chunkInfo);
1184
+ var ae = Z.SampleData(q, Y, b[Oe], S.chunkInfo);
1181
1185
  S.chunkInfo = ae, oe = S.pcmSize, g = ae.data.length, z = oe + g, S.pcmSize = z, q = S.pcmDatas, te = q.length, q.push(ae.data), Y = ae[Oe];
1182
1186
  }
1183
1187
  var j = Math.round(z / Y * 1e3), K = q.length, k = me.length, fe = function() {
1184
1188
  for (var A = E ? 0 : -g, F = q[0] == null, y = te; y < K; y++) {
1185
1189
  var f = q[y];
1186
- f == null ? F = 1 : (A += f.length, S && f.length && h[m.type + "_encode"](S, f));
1190
+ f == null ? F = 1 : (A += f.length, S && f.length && h[b.type + "_encode"](S, f));
1187
1191
  }
1188
1192
  if (F && S) {
1189
1193
  var y = be;
@@ -1193,7 +1197,7 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
1193
1197
  F && (A = E ? g : 0, q[0] = null), S ? S.pcmSize += A : h.recSize += A;
1194
1198
  }, E = 0, B = "rec.set.onProcess";
1195
1199
  try {
1196
- E = m.onProcess(q, s, j, Y, te, fe);
1200
+ E = b.onProcess(q, s, j, Y, te, fe);
1197
1201
  } catch (A) {
1198
1202
  console.error(B + De("gFUF::回调出错是不允许的,需保证不会抛异常"), A);
1199
1203
  }
@@ -1217,18 +1221,18 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
1217
1221
  return;
1218
1222
  }
1219
1223
  e._SO = 0;
1220
- var m = function() {
1224
+ var b = function() {
1221
1225
  e.state == 3 && (e.state = 1, e.resume());
1222
1226
  };
1223
1227
  if (h.state == "suspended") {
1224
1228
  var S = "AudioContext resume: ";
1225
1229
  e.CLog(S + "wait..."), h.resume().then(function() {
1226
- e.CLog(S + h.state), m();
1230
+ e.CLog(S + h.state), b();
1227
1231
  })[Ze](function(Y) {
1228
- e.CLog(S + h.state + De("upkE::,可能无法录音:") + Y.message, 1, Y), m();
1232
+ e.CLog(S + h.state + De("upkE::,可能无法录音:") + Y.message, 1, Y), b();
1229
1233
  });
1230
1234
  } else
1231
- m();
1235
+ b();
1232
1236
  },
1233
1237
  pause: function() {
1234
1238
  var e = this, o = e._streamStore().Stream;
@@ -1236,8 +1240,8 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
1236
1240
  },
1237
1241
  resume: function() {
1238
1242
  var e = this, o = e._streamStore().Stream;
1239
- e.state && (e.state = 1, e.CLog("resume"), e.envResume(), o && (o._call[e.id] = function(h, m) {
1240
- e.state == 1 && e.envIn(h, m);
1243
+ e.state && (e.state = 1, e.CLog("resume"), e.envResume(), o && (o._call[e.id] = function(h, b) {
1244
+ e.state == 1 && e.envIn(h, b);
1241
1245
  }, Be(o)));
1242
1246
  },
1243
1247
  _stop: function(e) {
@@ -1245,67 +1249,67 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
1245
1249
  o.isMock || o._S++, o.state && (o.pause(), o.state = 0), !e && o[h.type + "_stop"] && (o[h.type + "_stop"](o.engineCtx), o.engineCtx = 0);
1246
1250
  },
1247
1251
  stop: function(e, o, h) {
1248
- var m = this, S = m.set, Y, D = m.envInLast - m.envInFirst, s = D && m.buffers.length;
1249
- m.CLog(De("Xq4s::stop 和start时差:") + (D ? D + "ms " + De("3CQP::补偿:") + m.envInFix + "ms envIn:" + s + " fps:" + (s / D * 1e3).toFixed(1) : "-") + " stream:" + m._streamTag + " (" + ie + ") LM:" + re);
1252
+ var b = this, S = b.set, Y, D = b.envInLast - b.envInFirst, s = D && b.buffers.length;
1253
+ 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:" + re);
1250
1254
  var q = function() {
1251
- m._stop(), h && m.close();
1255
+ b._stop(), h && b.close();
1252
1256
  }, te = function(we) {
1253
- m.CLog(De("u8JG::结束录音失败:") + we, 1), o && o(we), q();
1257
+ b.CLog(De("u8JG::结束录音失败:") + we, 1), o && o(we), q();
1254
1258
  }, me = function(we, U, ee) {
1255
- var c = "blob", N = "arraybuffer", P = "dataType", T = "DefaultDataType", oe = m[P] || Z[T] || c, g = P + "=" + oe, z = we instanceof ArrayBuffer, ae = 0, j = z ? we.byteLength : we.size;
1256
- if (oe == N ? z || (ae = 1) : oe == c ? typeof Blob != "function" ? ae = De.G("NonBrowser-1", [g]) + De("1skY::,请设置{1}", 0, ye + "." + T + '="' + N + '"') : (z && (we = new Blob([we], { type: U })), we instanceof Blob || (ae = 1), U = we.type || U) : ae = De.G("NotSupport-1", [g]), m.CLog(De("Wv7l::结束录音 编码花{1}ms 音频时长{2}ms 文件大小{3}b", 0, Date.now() - Y, ee, j) + " " + g + "," + U), ae) {
1259
+ var c = "blob", N = "arraybuffer", P = "dataType", T = "DefaultDataType", oe = b[P] || Z[T] || c, g = P + "=" + oe, z = we instanceof ArrayBuffer, ae = 0, j = z ? we.byteLength : we.size;
1260
+ if (oe == N ? z || (ae = 1) : oe == c ? typeof Blob != "function" ? ae = De.G("NonBrowser-1", [g]) + De("1skY::,请设置{1}", 0, ye + "." + T + '="' + N + '"') : (z && (we = new Blob([we], { type: U })), we instanceof Blob || (ae = 1), U = we.type || U) : ae = De.G("NotSupport-1", [g]), b.CLog(De("Wv7l::结束录音 编码花{1}ms 音频时长{2}ms 文件大小{3}b", 0, Date.now() - Y, ee, j) + " " + g + "," + U), ae) {
1257
1261
  te(ae != 1 ? ae : De("Vkbd::{1}编码器返回的不是{2}", 0, S.type, oe) + ", " + g);
1258
1262
  return;
1259
1263
  }
1260
1264
  if (S.takeoffEncodeChunk)
1261
- m.CLog(De("QWnr::启用takeoffEncodeChunk后stop返回的blob长度为0不提供音频数据"), 3);
1265
+ b.CLog(De("QWnr::启用takeoffEncodeChunk后stop返回的blob长度为0不提供音频数据"), 3);
1262
1266
  else if (j < Math.max(50, ee / 5)) {
1263
1267
  te(De("Sz2H::生成的{1}无效", 0, S.type));
1264
1268
  return;
1265
1269
  }
1266
1270
  e && e(we, ee, U), q();
1267
1271
  };
1268
- if (!m.isMock) {
1269
- var be = m.state == 3;
1270
- if (!m.state || be) {
1272
+ if (!b.isMock) {
1273
+ var be = b.state == 3;
1274
+ if (!b.state || be) {
1271
1275
  te(De("wf9t::未开始录音") + (be ? De("Dl2c::,开始录音前无用户交互导致AudioContext未运行") : ""));
1272
1276
  return;
1273
1277
  }
1274
1278
  }
1275
- m._stop(!0);
1276
- var ne = m.recSize;
1279
+ b._stop(!0);
1280
+ var ne = b.recSize;
1277
1281
  if (!ne) {
1278
1282
  te(De("Ltz3::未采集到录音"));
1279
1283
  return;
1280
1284
  }
1281
- if (!m[S.type]) {
1285
+ if (!b[S.type]) {
1282
1286
  te(De("xGuI::未加载{1}编码器,请尝试到{2}的src/engine内找到{1}的编码器并加载", 0, S.type, ye));
1283
1287
  return;
1284
1288
  }
1285
- if (m.isMock) {
1286
- var ce = m.envCheck(m.mockEnvInfo || { envName: "mock", canProcess: !1 });
1289
+ if (b.isMock) {
1290
+ var ce = b.envCheck(b.mockEnvInfo || { envName: "mock", canProcess: !1 });
1287
1291
  if (ce) {
1288
1292
  te(De("AxOH::录音错误:") + ce);
1289
1293
  return;
1290
1294
  }
1291
1295
  }
1292
- var Me = m.engineCtx;
1293
- if (m[S.type + "_complete"] && Me) {
1294
- var ve = Math.round(Me.pcmSize / S[Oe] * 1e3);
1295
- Y = Date.now(), m[S.type + "_complete"](Me, function(U, ee) {
1296
+ var pe = b.engineCtx;
1297
+ if (b[S.type + "_complete"] && pe) {
1298
+ var ve = Math.round(pe.pcmSize / S[Oe] * 1e3);
1299
+ Y = Date.now(), b[S.type + "_complete"](pe, function(U, ee) {
1296
1300
  me(U, ee, ve);
1297
1301
  }, te);
1298
1302
  return;
1299
1303
  }
1300
- if (Y = Date.now(), !m.buffers[0]) {
1304
+ if (Y = Date.now(), !b.buffers[0]) {
1301
1305
  te(De("xkKd::音频buffers被释放"));
1302
1306
  return;
1303
1307
  }
1304
- var se = Z.SampleData(m.buffers, m[ke], S[Oe]);
1308
+ var se = Z.SampleData(b.buffers, b[ke], S[Oe]);
1305
1309
  S[Oe] = se[Oe];
1306
1310
  var G = se.data, ve = Math.round(G.length / S[Oe] * 1e3);
1307
- m.CLog(De("CxeT::采样:{1} 花:{2}ms", 0, ne + "->" + G.length, Date.now() - Y)), setTimeout(function() {
1308
- Y = Date.now(), m[S.type](G, function(we, U) {
1311
+ b.CLog(De("CxeT::采样:{1} 花:{2}ms", 0, ne + "->" + G.length, Date.now() - Y)), setTimeout(function() {
1312
+ Y = Date.now(), b[S.type](G, function(we, U) {
1309
1313
  me(we, U, ve);
1310
1314
  }, function(we) {
1311
1315
  te(we);
@@ -1313,42 +1317,42 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
1313
1317
  });
1314
1318
  }
1315
1319
  };
1316
- var Mt = function(e, o) {
1320
+ var pt = function(e, o) {
1317
1321
  o.pos || (o.pos = [0], o.tracks = {}, o.bytes = []);
1318
- var h = o.tracks, m = [o.pos[0]], S = function() {
1319
- o.pos[0] = m[0];
1322
+ var h = o.tracks, b = [o.pos[0]], S = function() {
1323
+ o.pos[0] = b[0];
1320
1324
  }, Y = o.bytes.length, D = new Uint8Array(Y + e.length);
1321
1325
  if (D.set(o.bytes), D.set(e, Y), o.bytes = D, !o._ht) {
1322
- if (_t(D, m), pt(D, m), !rt(_t(D, m), [24, 83, 128, 103]))
1326
+ if (_t(D, b), Mt(D, b), !rt(_t(D, b), [24, 83, 128, 103]))
1323
1327
  return;
1324
- for (_t(D, m); m[0] < D.length; ) {
1325
- var s = _t(D, m), q = pt(D, m), te = [0], me = 0;
1328
+ for (_t(D, b); b[0] < D.length; ) {
1329
+ var s = _t(D, b), q = Mt(D, b), te = [0], me = 0;
1326
1330
  if (!q)
1327
1331
  return;
1328
1332
  if (rt(s, [22, 84, 174, 107])) {
1329
1333
  for (; te[0] < q.length; ) {
1330
- var be = _t(q, te), ne = pt(q, te), ce = [0], Me = { channels: 0, sampleRate: 0 };
1334
+ var be = _t(q, te), ne = Mt(q, te), ce = [0], pe = { channels: 0, sampleRate: 0 };
1331
1335
  if (rt(be, [174]))
1332
1336
  for (; ce[0] < ne.length; ) {
1333
- var se = _t(ne, ce), G = pt(ne, ce), ve = [0];
1337
+ var se = _t(ne, ce), G = Mt(ne, ce), ve = [0];
1334
1338
  if (rt(se, [215])) {
1335
1339
  var we = qe(G);
1336
- Me.number = we, h[we] = Me;
1340
+ pe.number = we, h[we] = pe;
1337
1341
  } else if (rt(se, [131])) {
1338
1342
  var we = qe(G);
1339
- we == 1 ? Me.type = "video" : we == 2 ? (Me.type = "audio", me || (o.track0 = Me), Me.idx = me++) : Me.type = "Type-" + we;
1343
+ we == 1 ? pe.type = "video" : we == 2 ? (pe.type = "audio", me || (o.track0 = pe), pe.idx = me++) : pe.type = "Type-" + we;
1340
1344
  } else if (rt(se, [134])) {
1341
1345
  for (var U = "", ee = 0; ee < G.length; ee++)
1342
1346
  U += String.fromCharCode(G[ee]);
1343
- Me.codec = U;
1347
+ pe.codec = U;
1344
1348
  } else if (rt(se, [225]))
1345
1349
  for (; ve[0] < G.length; ) {
1346
- var c = _t(G, ve), N = pt(G, ve);
1350
+ var c = _t(G, ve), N = Mt(G, ve);
1347
1351
  if (rt(c, [181])) {
1348
1352
  var we = 0, P = new Uint8Array(N.reverse()).buffer;
1349
- N.length == 4 ? we = new Float32Array(P)[0] : N.length == 8 ? we = new Float64Array(P)[0] : Fe("WebM Track !Float", 1, N), Me[Oe] = Math.round(we);
1353
+ 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);
1350
1354
  } else
1351
- rt(c, [98, 100]) ? Me.bitDepth = qe(N) : rt(c, [159]) && (Me.channels = qe(N));
1355
+ rt(c, [98, 100]) ? pe.bitDepth = qe(N) : rt(c, [159]) && (pe.channels = qe(N));
1352
1356
  }
1353
1357
  }
1354
1358
  }
@@ -1361,15 +1365,15 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
1361
1365
  if (T) {
1362
1366
  if (T.bitDepth == 16 && /FLOAT/i.test(T.codec) && (T.bitDepth = 32, Fe("WebM 16->32 bit", 3)), T[Oe] != o[Oe] || T.bitDepth != 32 || T.channels < 1 || !/(\b|_)PCM\b/i.test(T.codec))
1363
1367
  return o.bytes = [], o.bad || Fe("WebM Track Unexpected", 3, o), o.bad = 1, -1;
1364
- for (var oe = [], g = 0; m[0] < D.length; ) {
1365
- var be = _t(D, m), ne = pt(D, m);
1368
+ for (var oe = [], g = 0; b[0] < D.length; ) {
1369
+ var be = _t(D, b), ne = Mt(D, b);
1366
1370
  if (!ne)
1367
1371
  break;
1368
1372
  if (rt(be, [163])) {
1369
- var z = ne[0] & 15, Me = h[z];
1370
- if (!Me)
1373
+ var z = ne[0] & 15, pe = h[z];
1374
+ if (!pe)
1371
1375
  Fe("WebM !Track" + z, 1, h);
1372
- else if (Me.idx === 0) {
1376
+ else if (pe.idx === 0) {
1373
1377
  for (var ae = new Uint8Array(ne.length - 4), ee = 4; ee < ne.length; ee++)
1374
1378
  ae[ee - 4] = ne[ee];
1375
1379
  oe.push(ae), g += ae.length;
@@ -1402,31 +1406,31 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
1402
1406
  return !0;
1403
1407
  }, qe = function(e) {
1404
1408
  for (var o = "", h = 0; h < e.length; h++) {
1405
- var m = e[h];
1406
- o += (m < 16 ? "0" : "") + m.toString(16);
1409
+ var b = e[h];
1410
+ o += (b < 16 ? "0" : "") + b.toString(16);
1407
1411
  }
1408
1412
  return parseInt(o, 16) || 0;
1409
1413
  }, _t = function(e, o, h) {
1410
- var m = o[0];
1411
- if (!(m >= e.length)) {
1412
- var S = e[m], Y = ("0000000" + S.toString(2)).substr(-8), D = /^(0*1)(\d*)$/.exec(Y);
1414
+ var b = o[0];
1415
+ if (!(b >= e.length)) {
1416
+ var S = e[b], Y = ("0000000" + S.toString(2)).substr(-8), D = /^(0*1)(\d*)$/.exec(Y);
1413
1417
  if (D) {
1414
1418
  var s = D[1].length, q = [];
1415
- if (!(m + s > e.length)) {
1419
+ if (!(b + s > e.length)) {
1416
1420
  for (var te = 0; te < s; te++)
1417
- q[te] = e[m], m++;
1418
- return h && (q[0] = parseInt(D[2] || "0", 2)), o[0] = m, q;
1421
+ q[te] = e[b], b++;
1422
+ return h && (q[0] = parseInt(D[2] || "0", 2)), o[0] = b, q;
1419
1423
  }
1420
1424
  }
1421
1425
  }
1422
- }, pt = function(e, o) {
1426
+ }, Mt = function(e, o) {
1423
1427
  var h = _t(e, o, 1);
1424
1428
  if (h) {
1425
- var m = qe(h), S = o[0], Y = [];
1426
- if (m < 2147483647) {
1427
- if (S + m > e.length)
1429
+ var b = qe(h), S = o[0], Y = [];
1430
+ if (b < 2147483647) {
1431
+ if (S + b > e.length)
1428
1432
  return;
1429
- for (var D = 0; D < m; D++)
1433
+ for (var D = 0; D < b; D++)
1430
1434
  Y[D] = e[S], S++;
1431
1435
  }
1432
1436
  return o[0] = S, Y;
@@ -1437,8 +1441,8 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
1437
1441
  locales: {},
1438
1442
  data: {},
1439
1443
  put: function(e, o) {
1440
- var h = ye + ".i18n.put: ", m = e.overwrite;
1441
- m = m == null || m;
1444
+ var h = ye + ".i18n.put: ", b = e.overwrite;
1445
+ b = b == null || b;
1442
1446
  var S = e.lang;
1443
1447
  if (S = ft.alias[S] || S, !S)
1444
1448
  throw new Error(h + "set.lang?");
@@ -1451,7 +1455,7 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
1451
1455
  continue;
1452
1456
  }
1453
1457
  var te = s[1], me = me.substr(te.length + 1);
1454
- !m && Y[te] || (Y[te] = me);
1458
+ !b && Y[te] || (Y[te] = me);
1455
1459
  }
1456
1460
  },
1457
1461
  get: function() {
@@ -1459,7 +1463,7 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
1459
1463
  },
1460
1464
  v_G: function(e, o, h) {
1461
1465
  o = o || [], h = h || ft.lang, h = ft.alias[h] || h;
1462
- var m = ft.locales[h], S = m && m[e] || "";
1466
+ var b = ft.locales[h], S = b && b[e] || "";
1463
1467
  return !S && h != "zh" ? h == "en" ? ft.v_G(e, o, "zh") : ft.v_G(e, o, "en") : (ft.lastLang = h, S == "=Empty" ? "" : S.replace(/\{(\d+)(\!?)\}/g, function(Y, D, s) {
1464
1468
  return D = +D || 0, Y = o[D - 1], (D < 1 || D > o.length) && (Y = "{?}", Fe("i18n[" + e + "] no {" + D + "}: " + S, 3)), s ? "" : Y;
1465
1469
  }));
@@ -1468,24 +1472,24 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
1468
1472
  return ft.v_T.apply(null, arguments);
1469
1473
  },
1470
1474
  v_T: function() {
1471
- for (var e = arguments, o = "", h = [], m = 0, S = ye + ".i18n.$T:", Y = /^([\w\-]*):/, D, s = 0; s < e.length; s++) {
1475
+ for (var e = arguments, o = "", h = [], b = 0, S = ye + ".i18n.$T:", Y = /^([\w\-]*):/, D, s = 0; s < e.length; s++) {
1472
1476
  var q = e[s];
1473
1477
  if (s == 0) {
1474
1478
  if (D = Y.exec(q), o = D && D[1], !o)
1475
1479
  throw new Error(S + "0 'key:'?");
1476
1480
  q = q.substr(o.length + 1);
1477
1481
  }
1478
- if (m === -1)
1482
+ if (b === -1)
1479
1483
  h.push(q);
1480
1484
  else {
1481
- if (m)
1485
+ if (b)
1482
1486
  throw new Error(S + " bad args");
1483
1487
  if (q === 0)
1484
- m = -1;
1488
+ b = -1;
1485
1489
  else if (J(q)) {
1486
1490
  if (q < 1)
1487
1491
  throw new Error(S + " bad args");
1488
- m = q;
1492
+ b = q;
1489
1493
  } else {
1490
1494
  var te = s == 1 ? "en" : s ? "" : "zh";
1491
1495
  if (D = Y.exec(q), D && (te = D[1] || te, q = q.substr(D[1].length + 1)), !D || !te)
@@ -1494,16 +1498,16 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
1494
1498
  }
1495
1499
  }
1496
1500
  }
1497
- return o ? m > 0 ? o : ft.v_G(o, h) : "";
1501
+ return o ? b > 0 ? o : ft.v_G(o, h) : "";
1498
1502
  }
1499
1503
  }, De = ft.$T;
1500
1504
  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";
1501
1505
  var R = Z.Traffic = function(e) {
1502
- if (b) {
1506
+ if (m) {
1503
1507
  e = e ? "/" + ye + "/Report/" + e : "";
1504
1508
  var o = Z.TrafficImgUrl;
1505
1509
  if (o) {
1506
- var h = Z.Traffic, m = /^(https?:..[^\/#]*\/?)[^#]*/i.exec(location.href) || [], S = m[1] || "http://file/", Y = (m[0] || S) + e;
1510
+ var h = Z.Traffic, b = /^(https?:..[^\/#]*\/?)[^#]*/i.exec(location.href) || [], S = b[1] || "http://file/", Y = (b[0] || S) + e;
1507
1511
  if (o.indexOf("//") == 0 && (/^https:/i.test(Y) ? o = "https:" + o : o = "http:" + o), e && (o = o + "&cu=" + encodeURIComponent(S + e)), !h[Y]) {
1508
1512
  h[Y] = 1;
1509
1513
  var D = new Image();
@@ -1517,29 +1521,29 @@ var bt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
1517
1521
  })(ea);
1518
1522
  const a0 = s0;
1519
1523
  (function(_) {
1520
- var r = typeof window == "object" && !!window.document, b = r ? window : Object, M = b.Recorder, J = M.i18n;
1521
- _(M, J, J.$T, r);
1522
- })(function(_, r, b, M) {
1524
+ var r = typeof window == "object" && !!window.document, m = r ? window : Object, p = m.Recorder, J = p.i18n;
1525
+ _(p, J, J.$T, r);
1526
+ })(function(_, r, m, p) {
1523
1527
  var J = "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";
1524
1528
  _.prototype.enc_mp3 = {
1525
1529
  stable: !0,
1526
1530
  takeEC: "full",
1527
1531
  getTestMsg: function() {
1528
- return b("Zm7L::采样率范围:{1};比特率范围:{2}(不同比特率支持的采样率范围不同,小于32kbps时采样率需小于32000)", 0, J, Z);
1532
+ return m("Zm7L::采样率范围:{1};比特率范围:{2}(不同比特率支持的采样率范围不同,小于32kbps时采样率需小于32000)", 0, J, Z);
1529
1533
  }
1530
1534
  };
1531
1535
  var re = function(ue) {
1532
1536
  var ge = ue.bitRate, Ce = ue.sampleRate, Ye = Ce;
1533
- if ((" " + Z + ",").indexOf(" " + ge + ",") == -1 && _.CLog(b("eGB9::{1}不在mp3支持的取值范围:{2}", 0, "bitRate=" + ge, Z), 3), (" " + J + ",").indexOf(" " + Ce + ",") == -1) {
1537
+ if ((" " + Z + ",").indexOf(" " + ge + ",") == -1 && _.CLog(m("eGB9::{1}不在mp3支持的取值范围:{2}", 0, "bitRate=" + ge, Z), 3), (" " + J + ",").indexOf(" " + Ce + ",") == -1) {
1534
1538
  for (var de = J.split(", "), ze = [], Be = 0; Be < de.length; Be++)
1535
1539
  ze.push({ v: +de[Be], s: Math.abs(de[Be] - Ce) });
1536
1540
  ze.sort(function($e, Ke) {
1537
1541
  return $e.s - Ke.s;
1538
- }), Ye = ze[0].v, ue.sampleRate = Ye, _.CLog(b("zLTa::sampleRate已更新为{1},因为{2}不在mp3支持的取值范围:{3}", 0, Ye, Ce, J), 3);
1542
+ }), Ye = ze[0].v, ue.sampleRate = Ye, _.CLog(m("zLTa::sampleRate已更新为{1},因为{2}不在mp3支持的取值范围:{3}", 0, Ye, Ce, J), 3);
1539
1543
  }
1540
1544
  }, ie = function() {
1541
- return b.G("NeedImport-2", ["mp3.js", "src/engine/mp3-engine.js"]);
1542
- }, ye = M && typeof Worker == "function";
1545
+ return m.G("NeedImport-2", ["mp3.js", "src/engine/mp3-engine.js"]);
1546
+ }, ye = p && typeof Worker == "function";
1543
1547
  _.prototype.mp3 = function(ue, ge, Ce) {
1544
1548
  var Ye = this, de = Ye.set, ze = ue.length;
1545
1549
  if (!_.lamejs) {
@@ -1570,8 +1574,8 @@ const a0 = s0;
1570
1574
  var V = Le.length;
1571
1575
  if (V > 0) {
1572
1576
  if (Je + V > at.length) {
1573
- var Mt = new Int8Array(at.length + Math.max(5e5, V));
1574
- Mt.set(at.subarray(0, Je)), at = Mt;
1577
+ var pt = new Int8Array(at.length + Math.max(5e5, V));
1578
+ pt.set(at.subarray(0, Je)), at = pt;
1575
1579
  }
1576
1580
  at.set(Le, Je), Je += V;
1577
1581
  }
@@ -1589,13 +1593,13 @@ const a0 = s0;
1589
1593
  Re && (_.CLog("mp3Worker Destroy"), Re.terminate(), Re = null);
1590
1594
  }), _.prototype.mp3_envCheck = function(ue, ge) {
1591
1595
  var Ce = "";
1592
- return ge.takeoffEncodeChunk && (Oe() || (Ce = b("yhUs::当前浏览器版本太低,无法实时处理"))), !Ce && !_.lamejs && (Ce = ie()), Ce;
1596
+ return ge.takeoffEncodeChunk && (Oe() || (Ce = m("yhUs::当前浏览器版本太低,无法实时处理"))), !Ce && !_.lamejs && (Ce = ie()), Ce;
1593
1597
  }, _.prototype.mp3_start = function(ue) {
1594
1598
  return Oe(ue);
1595
1599
  };
1596
1600
  var ke = { id: 0 }, Oe = function(ue, ge) {
1597
1601
  var Ce = function(Xe) {
1598
- var Le = Xe.data, V = ze.wkScope.wk_ctxs, Mt = ze.wkScope.wk_lame, rt = ze.wkScope.wk_mp3TrimFix, qe = V[Le.id];
1602
+ var Le = Xe.data, V = ze.wkScope.wk_ctxs, pt = ze.wkScope.wk_lame, rt = ze.wkScope.wk_mp3TrimFix, qe = V[Le.id];
1599
1603
  if (Le.action == "init")
1600
1604
  V[Le.id] = {
1601
1605
  sampleRate: Le.sampleRate,
@@ -1604,7 +1608,7 @@ const a0 = s0;
1604
1608
  pcmSize: 0,
1605
1609
  memory: new Int8Array(5e5),
1606
1610
  mOffset: 0,
1607
- encObj: new Mt.Mp3Encoder(1, Le.sampleRate, Le.bitRate)
1611
+ encObj: new pt.Mp3Encoder(1, Le.sampleRate, Le.bitRate)
1608
1612
  };
1609
1613
  else if (!qe)
1610
1614
  return;
@@ -1623,19 +1627,19 @@ const a0 = s0;
1623
1627
  case "encode":
1624
1628
  qe.pcmSize += Le.pcm.length;
1625
1629
  try {
1626
- var pt = qe.encObj.encodeBuffer(Le.pcm);
1630
+ var Mt = qe.encObj.encodeBuffer(Le.pcm);
1627
1631
  } catch (R) {
1628
1632
  qe.err = R, console.error(R);
1629
1633
  }
1630
- pt && pt.length > 0 && (qe.takeoff ? Be.onmessage({ action: "takeoff", id: Le.id, chunk: pt }) : _t(pt));
1634
+ Mt && Mt.length > 0 && (qe.takeoff ? Be.onmessage({ action: "takeoff", id: Le.id, chunk: Mt }) : _t(Mt));
1631
1635
  break;
1632
1636
  case "complete":
1633
1637
  try {
1634
- var pt = qe.encObj.flush();
1638
+ var Mt = qe.encObj.flush();
1635
1639
  } catch (R) {
1636
1640
  qe.err = R, console.error(R);
1637
1641
  }
1638
- if (pt && pt.length > 0 && (qe.takeoff ? Be.onmessage({ action: "takeoff", id: Le.id, chunk: pt }) : _t(pt)), qe.err) {
1642
+ if (Mt && Mt.length > 0 && (qe.takeoff ? Be.onmessage({ action: "takeoff", id: Le.id, chunk: Mt }) : _t(Mt)), qe.err) {
1639
1643
  Be.onmessage({
1640
1644
  action: Le.action,
1641
1645
  id: Le.id,
@@ -1656,8 +1660,8 @@ const a0 = s0;
1656
1660
  Be.onmessage = function(Le) {
1657
1661
  var V = Le;
1658
1662
  Xe && (V = Le.data);
1659
- var Mt = ke[V.id];
1660
- Mt && (V.action == "takeoff" ? Mt.set.takeoffEncodeChunk(new Uint8Array(V.chunk.buffer)) : (Mt.call && Mt.call(V), Mt.call = null));
1663
+ var pt = ke[V.id];
1664
+ pt && (V.action == "takeoff" ? pt.set.takeoffEncodeChunk(new Uint8Array(V.chunk.buffer)) : (pt.call && pt.call(V), pt.call = null));
1661
1665
  };
1662
1666
  }, de = function() {
1663
1667
  var Xe = { worker: Be, set: ue };
@@ -1675,7 +1679,7 @@ const a0 = s0;
1675
1679
  }), Xe;
1676
1680
  }, ze, Be = Re;
1677
1681
  if (ge || !ye)
1678
- return _.CLog(b("k9PT::当前环境不支持Web Worker,mp3实时编码器运行在主线程中"), 3), Be = { postMessage: function(Xe) {
1682
+ return _.CLog(m("k9PT::当前环境不支持Web Worker,mp3实时编码器运行在主线程中"), 3), Be = { postMessage: function(Xe) {
1679
1683
  Ce({ data: Xe });
1680
1684
  } }, ze = { wkScope: {
1681
1685
  wk_ctxs: {},
@@ -1708,7 +1712,7 @@ const a0 = s0;
1708
1712
  var ge = -1;
1709
1713
  for (var Ce in ke)
1710
1714
  ge++;
1711
- ge && _.CLog(b("fT6M::mp3 worker剩{1}个未stop", 0, ge), 3);
1715
+ ge && _.CLog(m("fT6M::mp3 worker剩{1}个未stop", 0, ge), 3);
1712
1716
  }
1713
1717
  }, _.prototype.mp3_encode = function(ue, ge) {
1714
1718
  ue && ue.worker && ue.worker.postMessage({
@@ -1723,7 +1727,7 @@ const a0 = s0;
1723
1727
  }, ue.worker.postMessage({
1724
1728
  action: "complete",
1725
1729
  id: ue.id
1726
- })) : Ce(b("mPxH::mp3编码器未start"));
1730
+ })) : Ce(m("mPxH::mp3编码器未start"));
1727
1731
  }, _.mp3ReadMeta = function(ue, ge) {
1728
1732
  var Ce = typeof window < "u" && window.parseInt || typeof self < "u" && self.parseInt || parseInt, Ye = new Uint8Array(ue[0] || []);
1729
1733
  if (Ye.length < 4)
@@ -1748,22 +1752,22 @@ const a0 = s0;
1748
1752
  ][$e == 1 ? 1 : 0][Ce(Be.substr(0, 4), 2)];
1749
1753
  if (!$e || !Ke || !Je || !at)
1750
1754
  return null;
1751
- 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), Mt = 0, rt = 0, qe = 0; qe < ue.length; qe++) {
1755
+ 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++) {
1752
1756
  var _t = ue[qe];
1753
1757
  if (rt += _t.byteLength, rt >= V + 3) {
1754
- var pt = new Uint8Array(_t), ft = _t.byteLength - (rt - (V + 3) + 1), De = de(ft, pt);
1755
- Mt = De.charAt(6) == "1";
1758
+ var Mt = new Uint8Array(_t), ft = _t.byteLength - (rt - (V + 3) + 1), De = de(ft, Mt);
1759
+ pt = De.charAt(6) == "1";
1756
1760
  break;
1757
1761
  }
1758
1762
  }
1759
- return Mt && V++, {
1763
+ return pt && V++, {
1760
1764
  version: $e,
1761
1765
  layer: Ke,
1762
1766
  sampleRate: at,
1763
1767
  bitRate: Je,
1764
1768
  duration: Fe,
1765
1769
  size: ge,
1766
- hasPadding: Mt,
1770
+ hasPadding: pt,
1767
1771
  frameSize: V,
1768
1772
  frameDurationFloat: Le
1769
1773
  //每帧时长,含小数 ms
@@ -1800,19 +1804,19 @@ const a0 = s0;
1800
1804
  }
1801
1805
  }, Ze = function(ue, ge) {
1802
1806
  var Ce = "MP3 Info: ";
1803
- (ue.sampleRate && ue.sampleRate != ge.sampleRate || ue.bitRate && ue.bitRate != ge.bitRate) && (_.CLog(Ce + b("uY9i::和设置的不匹配{1},已更新成{2}", 0, "set:" + ge.bitRate + "kbps " + ge.sampleRate + "hz", "set:" + ue.bitRate + "kbps " + ue.sampleRate + "hz"), 3, ge), ge.sampleRate = ue.sampleRate, ge.bitRate = ue.bitRate);
1807
+ (ue.sampleRate && ue.sampleRate != ge.sampleRate || ue.bitRate && ue.bitRate != ge.bitRate) && (_.CLog(Ce + m("uY9i::和设置的不匹配{1},已更新成{2}", 0, "set:" + ge.bitRate + "kbps " + ge.sampleRate + "hz", "set:" + ue.bitRate + "kbps " + ue.sampleRate + "hz"), 3, ge), ge.sampleRate = ue.sampleRate, ge.bitRate = ue.bitRate);
1804
1808
  var Ye = ue.trimFix;
1805
- Ye ? (Ce += b("iMSm::Fix移除{1}帧", 0, Ye.remove) + " " + Ye.removeDuration + "ms -> " + Ye.duration + "ms", Ye.remove > 2 && (ue.err = (ue.err ? ue.err + ", " : "") + b("b9zm::移除帧数过多"))) : Ce += (ue.duration || "-") + "ms", ue.err ? _.CLog(Ce, 1, ue.err, ue) : _.CLog(Ce, ue);
1809
+ Ye ? (Ce += m("iMSm::Fix移除{1}帧", 0, Ye.remove) + " " + Ye.removeDuration + "ms -> " + Ye.duration + "ms", Ye.remove > 2 && (ue.err = (ue.err ? ue.err + ", " : "") + m("b9zm::移除帧数过多"))) : Ce += (ue.duration || "-") + "ms", ue.err ? _.CLog(Ce, 1, ue.err, ue) : _.CLog(Ce, ue);
1806
1810
  };
1807
1811
  });
1808
1812
  (function(_) {
1809
- var r = typeof window == "object" && !!window.document, b = r ? window : Object, M = b.Recorder;
1810
- _(M);
1813
+ var r = typeof window == "object" && !!window.document, m = r ? window : Object, p = m.Recorder;
1814
+ _(p);
1811
1815
  })(function(_) {
1812
1816
  function r() {
1813
- var b = function(c) {
1817
+ var m = function(c) {
1814
1818
  return Math.log(c) / Math.log(10);
1815
- }, M = function(c) {
1819
+ }, p = function(c) {
1816
1820
  throw new Error("abort(" + c + ")");
1817
1821
  };
1818
1822
  function J(c) {
@@ -1882,9 +1886,9 @@ const a0 = s0;
1882
1886
  };
1883
1887
  var ge = {};
1884
1888
  ge.SQRT2 = 1.4142135623730951, ge.FAST_LOG10 = function(c) {
1885
- return b(c);
1889
+ return m(c);
1886
1890
  }, ge.FAST_LOG10_X = function(c, N) {
1887
- return b(c) * N;
1891
+ return m(c) * N;
1888
1892
  };
1889
1893
  function Ce(c) {
1890
1894
  this.ordinal = c;
@@ -1965,58 +1969,58 @@ const a0 = s0;
1965
1969
  [6, 7]
1966
1970
  /* 22 bands */
1967
1971
  ];
1968
- function T(d, v, p, x, C, a) {
1972
+ function T(d, v, M, x, C, a) {
1969
1973
  var i = 0.5946 / v;
1970
1974
  for (d = d >> 1; d-- != 0; )
1971
- C[a++] = i > p[x++] ? 0 : 1, C[a++] = i > p[x++] ? 0 : 1;
1975
+ C[a++] = i > M[x++] ? 0 : 1, C[a++] = i > M[x++] ? 0 : 1;
1972
1976
  }
1973
- function oe(d, v, p, x, C, a) {
1977
+ function oe(d, v, M, x, C, a) {
1974
1978
  d = d >> 1;
1975
1979
  var i = d % 2;
1976
1980
  for (d = d >> 1; d-- != 0; ) {
1977
- var W, L, Q, le, _e, pe, je, He;
1978
- W = p[x++] * v, L = p[x++] * v, _e = 0 | W, Q = p[x++] * v, pe = 0 | L, le = p[x++] * v, je = 0 | Q, W += c.adj43[_e], He = 0 | le, L += c.adj43[pe], C[a++] = 0 | W, Q += c.adj43[je], C[a++] = 0 | L, le += c.adj43[He], C[a++] = 0 | Q, C[a++] = 0 | le;
1981
+ var W, L, Q, le, _e, Me, je, He;
1982
+ 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;
1979
1983
  }
1980
1984
  if (i != 0) {
1981
- var W, L, _e, pe;
1982
- W = p[x++] * v, L = p[x++] * v, _e = 0 | W, pe = 0 | L, W += c.adj43[_e], L += c.adj43[pe], C[a++] = 0 | W, C[a++] = 0 | L;
1985
+ var W, L, _e, Me;
1986
+ 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;
1983
1987
  }
1984
1988
  }
1985
- function g(d, v, p, x, C) {
1986
- var a, i, W = 0, L, Q = 0, le = 0, _e = 0, pe = v, je = 0, He = pe, Ue = 0, ht = d, vt = 0;
1989
+ function g(d, v, M, x, C) {
1990
+ var a, i, W = 0, L, Q = 0, le = 0, _e = 0, Me = v, je = 0, He = Me, Ue = 0, ht = d, vt = 0;
1987
1991
  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++) {
1988
1992
  var ot = -1;
1989
1993
  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)
1990
1994
  Q != 0 && (oe(
1991
1995
  Q,
1992
- p,
1996
+ M,
1993
1997
  ht,
1994
1998
  vt,
1995
1999
  He,
1996
2000
  Ue
1997
- ), Q = 0), le != 0 && M();
2001
+ ), Q = 0), le != 0 && p();
1998
2002
  else {
1999
2003
  var ct = x.width[a];
2000
2004
  if (W + x.width[a] > x.max_nonzero_coeff) {
2001
2005
  var gt;
2002
2006
  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;
2003
2007
  }
2004
- if (Q == 0 && le == 0 && (He = pe, 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(
2008
+ 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(
2005
2009
  Q,
2006
- p,
2010
+ M,
2007
2011
  ht,
2008
2012
  vt,
2009
2013
  He,
2010
2014
  Ue
2011
- ), Q = 0, He = pe, Ue = je, ht = d, vt = _e), le += ct) : (le != 0 && (T(
2015
+ ), Q = 0, He = Me, Ue = je, ht = d, vt = _e), le += ct) : (le != 0 && (T(
2012
2016
  le,
2013
- p,
2017
+ M,
2014
2018
  ht,
2015
2019
  vt,
2016
2020
  He,
2017
2021
  Ue
2018
- ), le = 0, He = pe, Ue = je, ht = d, vt = _e), Q += ct), ct <= 0) {
2019
- le != 0 && M(), Q != 0 && M();
2022
+ ), le = 0, He = Me, Ue = je, ht = d, vt = _e), Q += ct), ct <= 0) {
2023
+ le != 0 && p(), Q != 0 && p();
2020
2024
  break;
2021
2025
  }
2022
2026
  }
@@ -2024,52 +2028,52 @@ const a0 = s0;
2024
2028
  }
2025
2029
  Q != 0 && (oe(
2026
2030
  Q,
2027
- p,
2031
+ M,
2028
2032
  ht,
2029
2033
  vt,
2030
2034
  He,
2031
2035
  Ue
2032
- ), Q = 0), le != 0 && M();
2036
+ ), Q = 0), le != 0 && p();
2033
2037
  }
2034
- function z(d, v, p) {
2038
+ function z(d, v, M) {
2035
2039
  var x = 0, C = 0;
2036
2040
  do {
2037
2041
  var a = d[v++], i = d[v++];
2038
2042
  x < a && (x = a), C < i && (C = i);
2039
- } while (v < p);
2043
+ } while (v < M);
2040
2044
  return x < C && (x = C), x;
2041
2045
  }
2042
- function ae(d, v, p, x, C, a) {
2046
+ function ae(d, v, M, x, C, a) {
2043
2047
  var i = V.ht[x].xlen * 65536 + V.ht[C].xlen, W = 0, L;
2044
2048
  do {
2045
2049
  var Q = d[v++], le = d[v++];
2046
2050
  Q != 0 && (Q > 14 && (Q = 15, W += i), Q *= 16), le != 0 && (le > 14 && (le = 15, W += i), Q += le), W += V.largetbl[Q];
2047
- } while (v < p);
2051
+ } while (v < M);
2048
2052
  return L = W & 65535, W >>= 16, W > L && (W = L, x = C), a.bits += W, x;
2049
2053
  }
2050
- function j(d, v, p, x) {
2054
+ function j(d, v, M, x) {
2051
2055
  var C = 0, a = V.ht[1].hlen;
2052
2056
  do {
2053
2057
  var i = d[v + 0] * 2 + d[v + 1];
2054
2058
  v += 2, C += a[i];
2055
- } while (v < p);
2059
+ } while (v < M);
2056
2060
  return x.bits += C, 1;
2057
2061
  }
2058
- function K(d, v, p, x, C) {
2062
+ function K(d, v, M, x, C) {
2059
2063
  var a = 0, i, W = V.ht[x].xlen, L;
2060
2064
  x == 2 ? L = V.table23 : L = V.table56;
2061
2065
  do {
2062
2066
  var Q = d[v + 0] * W + d[v + 1];
2063
2067
  v += 2, a += L[Q];
2064
- } while (v < p);
2068
+ } while (v < M);
2065
2069
  return i = a & 65535, a >>= 16, a > i && (a = i, x++), C.bits += a, x;
2066
2070
  }
2067
- function k(d, v, p, x, C) {
2071
+ function k(d, v, M, x, C) {
2068
2072
  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;
2069
2073
  do {
2070
- var pe = d[v + 0] * L + d[v + 1];
2071
- v += 2, a += Q[pe], i += le[pe], W += _e[pe];
2072
- } while (v < p);
2074
+ var Me = d[v + 0] * L + d[v + 1];
2075
+ v += 2, a += Q[Me], i += le[Me], W += _e[Me];
2076
+ } while (v < M);
2073
2077
  var je = x;
2074
2078
  return a > i && (a = i, je++), a > W && (a = W, je = x + 2), C.bits += a, je;
2075
2079
  }
@@ -2090,19 +2094,19 @@ const a0 = s0;
2090
2094
  13,
2091
2095
  13
2092
2096
  ];
2093
- function E(d, v, p, x) {
2094
- var C = z(d, v, p);
2097
+ function E(d, v, M, x) {
2098
+ var C = z(d, v, M);
2095
2099
  switch (C) {
2096
2100
  case 0:
2097
2101
  return C;
2098
2102
  case 1:
2099
- return j(d, v, p, x);
2103
+ return j(d, v, M, x);
2100
2104
  case 2:
2101
2105
  case 3:
2102
2106
  return K(
2103
2107
  d,
2104
2108
  v,
2105
- p,
2109
+ M,
2106
2110
  fe[C - 1],
2107
2111
  x
2108
2112
  );
@@ -2121,24 +2125,24 @@ const a0 = s0;
2121
2125
  return k(
2122
2126
  d,
2123
2127
  v,
2124
- p,
2128
+ M,
2125
2129
  fe[C - 1],
2126
2130
  x
2127
2131
  );
2128
2132
  default:
2129
- C > e.IXMAX_VAL && M(), C -= 15;
2133
+ C > e.IXMAX_VAL && p(), C -= 15;
2130
2134
  var a;
2131
2135
  for (a = 24; a < 32 && !(V.ht[a].linmax >= C); a++)
2132
2136
  ;
2133
2137
  var i;
2134
2138
  for (i = a - 8; i < 24 && !(V.ht[i].linmax >= C); i++)
2135
2139
  ;
2136
- return ae(d, v, p, i, a, x);
2140
+ return ae(d, v, M, i, a, x);
2137
2141
  }
2138
2142
  }
2139
- this.noquant_count_bits = function(d, v, p) {
2143
+ this.noquant_count_bits = function(d, v, M) {
2140
2144
  var x = v.l3_enc, C = Math.min(576, v.max_nonzero_coeff + 2 >> 1 << 1);
2141
- for (p != null && (p.sfb_count1 = 0); C > 1 && !(x[C - 1] | x[C - 2]); C -= 2)
2145
+ for (M != null && (M.sfb_count1 = 0); C > 1 && !(x[C - 1] | x[C - 2]); C -= 2)
2142
2146
  ;
2143
2147
  v.count1 = C;
2144
2148
  for (var a = 0, i = 0; C > 3; C -= 4) {
@@ -2167,24 +2171,24 @@ const a0 = s0;
2167
2171
  var Q = new N(L);
2168
2172
  v.table_select[1] = E(x, a, i, Q), L = Q.bits;
2169
2173
  }
2170
- if (d.use_best_huffman == 2 && M(), p != null && v.block_type == s.NORM_TYPE) {
2174
+ if (d.use_best_huffman == 2 && p(), M != null && v.block_type == s.NORM_TYPE) {
2171
2175
  for (var le = 0; d.scalefac_band.l[le] < v.big_values; )
2172
2176
  le++;
2173
- p.sfb_count1 = le;
2177
+ M.sfb_count1 = le;
2174
2178
  }
2175
2179
  return L;
2176
- }, this.count_bits = function(d, v, p, x) {
2177
- var C = p.l3_enc, a = e.IXMAX_VAL / c.IPOW20(p.global_gain);
2178
- return p.xrpow_max > a ? e.LARGE_BITS : (g(v, C, c.IPOW20(p.global_gain), p, x), d.substep_shaping & 2 && M(), this.noquant_count_bits(d, p, x));
2180
+ }, this.count_bits = function(d, v, M, x) {
2181
+ var C = M.l3_enc, a = e.IXMAX_VAL / c.IPOW20(M.global_gain);
2182
+ 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));
2179
2183
  };
2180
- function B(d, v, p, x, C, a, i) {
2184
+ function B(d, v, M, x, C, a, i) {
2181
2185
  for (var W = v.big_values, L = 0; L <= 7 + 15; L++)
2182
2186
  x[L] = e.LARGE_BITS;
2183
2187
  for (var L = 0; L < 16; L++) {
2184
2188
  var Q = d.scalefac_band.l[L + 1];
2185
2189
  if (Q >= W)
2186
2190
  break;
2187
- var le = 0, _e = new N(le), pe = E(p, 0, Q, _e);
2191
+ var le = 0, _e = new N(le), Me = E(M, 0, Q, _e);
2188
2192
  le = _e.bits;
2189
2193
  for (var je = 0; je < 8; je++) {
2190
2194
  var He = d.scalefac_band.l[L + je + 2];
@@ -2192,29 +2196,29 @@ const a0 = s0;
2192
2196
  break;
2193
2197
  var Ue = le;
2194
2198
  _e = new N(Ue);
2195
- var ht = E(p, Q, He, _e);
2196
- Ue = _e.bits, x[L + je] > Ue && (x[L + je] = Ue, C[L + je] = L, a[L + je] = pe, i[L + je] = ht);
2199
+ var ht = E(M, Q, He, _e);
2200
+ Ue = _e.bits, x[L + je] > Ue && (x[L + je] = Ue, C[L + je] = L, a[L + je] = Me, i[L + je] = ht);
2197
2201
  }
2198
2202
  }
2199
2203
  }
2200
- function t(d, v, p, x, C, a, i, W) {
2204
+ function t(d, v, M, x, C, a, i, W) {
2201
2205
  for (var L = v.big_values, Q = 2; Q < s.SBMAX_l + 1; Q++) {
2202
2206
  var le = d.scalefac_band.l[Q];
2203
2207
  if (le >= L)
2204
2208
  break;
2205
2209
  var _e = C[Q - 2] + v.count1bits;
2206
- if (p.part2_3_length <= _e)
2210
+ if (M.part2_3_length <= _e)
2207
2211
  break;
2208
- var pe = new N(_e), je = E(x, le, L, pe);
2209
- _e = pe.bits, !(p.part2_3_length <= _e) && (p.assign(v), p.part2_3_length = _e, p.region0_count = a[Q - 2], p.region1_count = Q - 2 - a[Q - 2], p.table_select[0] = i[Q - 2], p.table_select[1] = W[Q - 2], p.table_select[2] = je);
2212
+ var Me = new N(_e), je = E(x, le, L, Me);
2213
+ _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);
2210
2214
  }
2211
2215
  }
2212
2216
  this.best_huffman_divide = function(d, v) {
2213
- var p = new h(), x = v.l3_enc, C = re(7 + 15 + 1), a = re(7 + 15 + 1), i = re(7 + 15 + 1), W = re(7 + 15 + 1);
2217
+ var M = new h(), x = v.l3_enc, C = re(7 + 15 + 1), a = re(7 + 15 + 1), i = re(7 + 15 + 1), W = re(7 + 15 + 1);
2214
2218
  if (!(v.block_type == s.SHORT_TYPE && d.mode_gr == 1)) {
2215
- p.assign(v), v.block_type == s.NORM_TYPE && (B(d, v, x, C, a, i, W), t(
2219
+ M.assign(v), v.block_type == s.NORM_TYPE && (B(d, v, x, C, a, i, W), t(
2216
2220
  d,
2217
- p,
2221
+ M,
2218
2222
  v,
2219
2223
  x,
2220
2224
  C,
@@ -2222,17 +2226,17 @@ const a0 = s0;
2222
2226
  i,
2223
2227
  W
2224
2228
  ));
2225
- var L = p.big_values;
2229
+ var L = M.big_values;
2226
2230
  if (!(L == 0 || (x[L - 2] | x[L - 1]) > 1) && (L = v.count1 + 2, !(L > 576))) {
2227
- p.assign(v), p.count1 = L;
2228
- for (var Q = 0, le = 0; L > p.big_values; L -= 4) {
2231
+ M.assign(v), M.count1 = L;
2232
+ for (var Q = 0, le = 0; L > M.big_values; L -= 4) {
2229
2233
  var _e = ((x[L - 4] * 2 + x[L - 3]) * 2 + x[L - 2]) * 2 + x[L - 1];
2230
2234
  Q += V.t32l[_e], le += V.t33l[_e];
2231
2235
  }
2232
- if (p.big_values = L, p.count1table_select = 0, Q > le && (Q = le, p.count1table_select = 1), p.count1bits = Q, p.block_type == s.NORM_TYPE)
2236
+ 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)
2233
2237
  t(
2234
2238
  d,
2235
- p,
2239
+ M,
2236
2240
  v,
2237
2241
  x,
2238
2242
  C,
@@ -2241,15 +2245,15 @@ const a0 = s0;
2241
2245
  W
2242
2246
  );
2243
2247
  else {
2244
- if (p.part2_3_length = Q, Q = d.scalefac_band.l[7 + 1], Q > L && (Q = L), Q > 0) {
2245
- var pe = new N(p.part2_3_length);
2246
- p.table_select[0] = E(x, 0, Q, pe), p.part2_3_length = pe.bits;
2248
+ if (M.part2_3_length = Q, Q = d.scalefac_band.l[7 + 1], Q > L && (Q = L), Q > 0) {
2249
+ var Me = new N(M.part2_3_length);
2250
+ M.table_select[0] = E(x, 0, Q, Me), M.part2_3_length = Me.bits;
2247
2251
  }
2248
2252
  if (L > Q) {
2249
- var pe = new N(p.part2_3_length);
2250
- p.table_select[1] = E(x, Q, L, pe), p.part2_3_length = pe.bits;
2253
+ var Me = new N(M.part2_3_length);
2254
+ M.table_select[1] = E(x, Q, L, Me), M.part2_3_length = Me.bits;
2251
2255
  }
2252
- v.part2_3_length > p.part2_3_length && v.assign(p);
2256
+ v.part2_3_length > M.part2_3_length && v.assign(M);
2253
2257
  }
2254
2258
  }
2255
2259
  }
@@ -2257,28 +2261,28 @@ const a0 = s0;
2257
2261
  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];
2258
2262
  $e.slen1_tab = F, $e.slen2_tab = y;
2259
2263
  function f(d, v) {
2260
- for (var p, x = v.tt[1][d], C = v.tt[0][d], a = 0; a < V.scfsi_band.length - 1; a++) {
2261
- for (p = V.scfsi_band[a]; p < V.scfsi_band[a + 1] && !(C.scalefac[p] != x.scalefac[p] && x.scalefac[p] >= 0); p++)
2264
+ for (var M, x = v.tt[1][d], C = v.tt[0][d], a = 0; a < V.scfsi_band.length - 1; a++) {
2265
+ for (M = V.scfsi_band[a]; M < V.scfsi_band[a + 1] && !(C.scalefac[M] != x.scalefac[M] && x.scalefac[M] >= 0); M++)
2262
2266
  ;
2263
- if (p == V.scfsi_band[a + 1]) {
2264
- for (p = V.scfsi_band[a]; p < V.scfsi_band[a + 1]; p++)
2265
- x.scalefac[p] = -1;
2267
+ if (M == V.scfsi_band[a + 1]) {
2268
+ for (M = V.scfsi_band[a]; M < V.scfsi_band[a + 1]; M++)
2269
+ x.scalefac[M] = -1;
2266
2270
  v.scfsi[d][a] = 1;
2267
2271
  }
2268
2272
  }
2269
2273
  var i = 0, W = 0;
2270
- for (p = 0; p < 11; p++)
2271
- x.scalefac[p] != -1 && (W++, i < x.scalefac[p] && (i = x.scalefac[p]));
2272
- for (var L = 0, Q = 0; p < s.SBPSY_l; p++)
2273
- x.scalefac[p] != -1 && (Q++, L < x.scalefac[p] && (L = x.scalefac[p]));
2274
+ for (M = 0; M < 11; M++)
2275
+ x.scalefac[M] != -1 && (W++, i < x.scalefac[M] && (i = x.scalefac[M]));
2276
+ for (var L = 0, Q = 0; M < s.SBPSY_l; M++)
2277
+ x.scalefac[M] != -1 && (Q++, L < x.scalefac[M] && (L = x.scalefac[M]));
2274
2278
  for (var a = 0; a < 16; a++)
2275
2279
  if (i < l[a] && L < A[a]) {
2276
2280
  var le = F[a] * W + y[a] * Q;
2277
2281
  x.part2_length > le && (x.part2_length = le, x.scalefac_compress = a);
2278
2282
  }
2279
2283
  }
2280
- this.best_scalefac_store = function(d, v, p, x) {
2281
- var C = x.tt[v][p], a, i, W, L, Q = 0;
2284
+ this.best_scalefac_store = function(d, v, M, x) {
2285
+ var C = x.tt[v][M], a, i, W, L, Q = 0;
2282
2286
  for (W = 0, a = 0; a < C.sfbmax; a++) {
2283
2287
  var le = C.width[a];
2284
2288
  for (W += le, L = -le; L < 0 && C.l3_enc[L + W] == 0; L++)
@@ -2305,8 +2309,8 @@ const a0 = s0;
2305
2309
  }
2306
2310
  }
2307
2311
  for (i = 0; i < 4; i++)
2308
- x.scfsi[p][i] = 0;
2309
- for (d.mode_gr == 2 && v == 1 && x.tt[0][p].block_type != s.SHORT_TYPE && x.tt[1][p].block_type != s.SHORT_TYPE && (f(p, x), Q = 0), a = 0; a < C.sfbmax; a++)
2312
+ x.scfsi[M][i] = 0;
2313
+ for (d.mode_gr == 2 && v == 1 && x.tt[0][M].block_type != s.SHORT_TYPE && x.tt[1][M].block_type != s.SHORT_TYPE && (f(M, x), Q = 0), a = 0; a < C.sfbmax; a++)
2310
2314
  C.scalefac[a] == -2 && (C.scalefac[a] = 0);
2311
2315
  Q != 0 && (d.mode_gr == 2 ? this.scale_bitcount(C) : this.scale_bitcount_lsf(d, C));
2312
2316
  };
@@ -2363,20 +2367,20 @@ const a0 = s0;
2363
2367
  74
2364
2368
  ];
2365
2369
  this.scale_bitcount = function(d) {
2366
- var v, p, x = 0, C = 0, a, i = d.scalefac;
2370
+ var v, M, x = 0, C = 0, a, i = d.scalefac;
2367
2371
  if (d.block_type == s.SHORT_TYPE)
2368
2372
  a = w, d.mixed_block_flag != 0 && (a = u);
2369
2373
  else if (a = I, d.preflag == 0) {
2370
- for (p = 11; p < s.SBPSY_l && !(i[p] < c.pretab[p]); p++)
2374
+ for (M = 11; M < s.SBPSY_l && !(i[M] < c.pretab[M]); M++)
2371
2375
  ;
2372
- if (p == s.SBPSY_l)
2373
- for (d.preflag = 1, p = 11; p < s.SBPSY_l; p++)
2374
- i[p] -= c.pretab[p];
2375
- }
2376
- for (p = 0; p < d.sfbdivide; p++)
2377
- x < i[p] && (x = i[p]);
2378
- for (; p < d.sfbmax; p++)
2379
- C < i[p] && (C = i[p]);
2376
+ if (M == s.SBPSY_l)
2377
+ for (d.preflag = 1, M = 11; M < s.SBPSY_l; M++)
2378
+ i[M] -= c.pretab[M];
2379
+ }
2380
+ for (M = 0; M < d.sfbdivide; M++)
2381
+ x < i[M] && (x = i[M]);
2382
+ for (; M < d.sfbmax; M++)
2383
+ C < i[M] && (C = i[M]);
2380
2384
  for (d.part2_length = e.LARGE_BITS, v = 0; v < 16; v++)
2381
2385
  x < l[v] && C < A[v] && d.part2_length > a[v] && (d.part2_length = a[v], d.scalefac_compress = v);
2382
2386
  return d.part2_length == e.LARGE_BITS;
@@ -2390,30 +2394,30 @@ const a0 = s0;
2390
2394
  [3, 3, 0, 0]
2391
2395
  ];
2392
2396
  this.scale_bitcount_lsf = function(d, v) {
2393
- var p, x, C, a, i, W, L, Q, le = re(4), _e = v.scalefac;
2394
- for (v.preflag != 0 ? p = 2 : p = 0, L = 0; L < 4; L++)
2397
+ var M, x, C, a, i, W, L, Q, le = re(4), _e = v.scalefac;
2398
+ for (v.preflag != 0 ? M = 2 : M = 0, L = 0; L < 4; L++)
2395
2399
  le[L] = 0;
2396
2400
  if (v.block_type == s.SHORT_TYPE) {
2397
2401
  x = 1;
2398
- var pe = c.nr_of_sfb_block[p][x];
2402
+ var Me = c.nr_of_sfb_block[M][x];
2399
2403
  for (Q = 0, C = 0; C < 4; C++)
2400
- for (a = pe[C] / 3, L = 0; L < a; L++, Q++)
2404
+ for (a = Me[C] / 3, L = 0; L < a; L++, Q++)
2401
2405
  for (i = 0; i < 3; i++)
2402
2406
  _e[Q * 3 + i] > le[C] && (le[C] = _e[Q * 3 + i]);
2403
2407
  } else {
2404
2408
  x = 0;
2405
- var pe = c.nr_of_sfb_block[p][x];
2409
+ var Me = c.nr_of_sfb_block[M][x];
2406
2410
  for (Q = 0, C = 0; C < 4; C++)
2407
- for (a = pe[C], L = 0; L < a; L++, Q++)
2411
+ for (a = Me[C], L = 0; L < a; L++, Q++)
2408
2412
  _e[Q] > le[C] && (le[C] = _e[Q]);
2409
2413
  }
2410
2414
  for (W = !1, C = 0; C < 4; C++)
2411
- le[C] > n[p][C] && (W = !0);
2415
+ le[C] > n[M][C] && (W = !0);
2412
2416
  if (!W) {
2413
2417
  var je, He, Ue, ht;
2414
- for (v.sfb_partition_table = c.nr_of_sfb_block[p][x], C = 0; C < 4; C++)
2418
+ for (v.sfb_partition_table = c.nr_of_sfb_block[M][x], C = 0; C < 4; C++)
2415
2419
  v.slen[C] = H[le[C]];
2416
- switch (je = v.slen[0], He = v.slen[1], Ue = v.slen[2], ht = v.slen[3], p) {
2420
+ switch (je = v.slen[0], He = v.slen[1], Ue = v.slen[2], ht = v.slen[3], M) {
2417
2421
  case 0:
2418
2422
  v.scalefac_compress = (je * 5 + He << 4) + (Ue << 2) + ht;
2419
2423
  break;
@@ -2450,13 +2454,13 @@ const a0 = s0;
2450
2454
  ];
2451
2455
  this.huffman_init = function(d) {
2452
2456
  for (var v = 2; v <= 576; v += 2) {
2453
- for (var p = 0, x; d.scalefac_band.l[++p] < v; )
2457
+ for (var M = 0, x; d.scalefac_band.l[++M] < v; )
2454
2458
  ;
2455
- for (x = P[p][0]; d.scalefac_band.l[x + 1] > v; )
2459
+ for (x = P[M][0]; d.scalefac_band.l[x + 1] > v; )
2456
2460
  x--;
2457
- for (x < 0 && (x = P[p][0]), d.bv_scf[v - 2] = x, x = P[p][1]; d.scalefac_band.l[x + d.bv_scf[v - 2] + 2] > v; )
2461
+ for (x < 0 && (x = P[M][0]), d.bv_scf[v - 2] = x, x = P[M][1]; d.scalefac_band.l[x + d.bv_scf[v - 2] + 2] > v; )
2458
2462
  x--;
2459
- x < 0 && (x = P[p][1]), d.bv_scf[v - 1] = x;
2463
+ x < 0 && (x = P[M][1]), d.bv_scf[v - 1] = x;
2460
2464
  }
2461
2465
  };
2462
2466
  }
@@ -2472,7 +2476,7 @@ const a0 = s0;
2472
2476
  N = g;
2473
2477
  };
2474
2478
  function P(g, z, ae) {
2475
- M();
2479
+ p();
2476
2480
  }
2477
2481
  var T = [
2478
2482
  new c(8, 9, 9, 0, 0, 6.6, 145, 0, 0.95, 0, -30, 11, 12e-4, 1),
@@ -2584,9 +2588,9 @@ const a0 = s0;
2584
2588
  var T = N.internal_flags, oe, g = T.l3_side, z = c.getframebits(N);
2585
2589
  P.bits = (z - T.sideinfo_len * 8) / T.mode_gr;
2586
2590
  var ae = 8 * 256 * T.mode_gr - 8;
2587
- N.brate > 320 ? M() : (oe = 8 * 1440, N.strict_ISO && M()), T.ResvMax = oe - z, T.ResvMax > ae && (T.ResvMax = ae), (T.ResvMax < 0 || N.disable_reservoir) && (T.ResvMax = 0);
2591
+ N.brate > 320 ? p() : (oe = 8 * 1440, N.strict_ISO && p()), T.ResvMax = oe - z, T.ResvMax > ae && (T.ResvMax = ae), (T.ResvMax < 0 || N.disable_reservoir) && (T.ResvMax = 0);
2588
2592
  var j = P.bits * T.mode_gr + Math.min(T.ResvSize, T.ResvMax);
2589
- return j > oe && (j = oe), g.resvDrain_pre = 0, T.pinfo != null && M(), j;
2593
+ return j > oe && (j = oe), g.resvDrain_pre = 0, T.pinfo != null && p(), j;
2590
2594
  }, this.ResvMaxBits = function(N, P, T, oe) {
2591
2595
  var g = N.internal_flags, z, ae = g.ResvSize, j = g.ResvMax;
2592
2596
  oe != 0 && (ae += P), g.substep_shaping & 1 && (j *= 0.9), T.bits = P, ae * 10 > j * 9 ? (z = ae - j * 9 / 10, T.bits += z, g.substep_shaping |= 128) : (z = 0, g.substep_shaping &= 127, !N.disable_reservoir && !(g.substep_shaping & 1) && (T.bits -= 0.1 * P));
@@ -2939,17 +2943,17 @@ const a0 = s0;
2939
2943
  var v = I.tt[n][H];
2940
2944
  k(u, v.part2_3_length + v.part2_length, 12), k(u, v.big_values / 2, 9), k(u, v.global_gain, 8), k(u, v.scalefac_compress, 9), v.block_type != s.NORM_TYPE ? (k(u, 1, 1), k(u, v.block_type, 2), k(u, v.mixed_block_flag, 1), v.table_select[0] == 14 && (v.table_select[0] = 16), k(u, v.table_select[0], 5), v.table_select[1] == 14 && (v.table_select[1] = 16), k(u, v.table_select[1], 5), k(u, v.subblock_gain[0], 3), k(u, v.subblock_gain[1], 3), k(u, v.subblock_gain[2], 3)) : (k(u, 0, 1), v.table_select[0] == 14 && (v.table_select[0] = 16), k(u, v.table_select[0], 5), v.table_select[1] == 14 && (v.table_select[1] = 16), k(u, v.table_select[1], 5), v.table_select[2] == 14 && (v.table_select[2] = 16), k(u, v.table_select[2], 5), k(u, v.region0_count, 4), k(u, v.region1_count, 3)), k(u, v.scalefac_scale, 1), k(u, v.count1table_select, 1);
2941
2945
  }
2942
- f.error_protection && M();
2946
+ f.error_protection && p();
2943
2947
  {
2944
- var p = u.h_ptr;
2945
- u.h_ptr = p + 1 & ne.MAX_HEADER_BUF - 1, u.header[u.h_ptr].write_timing = u.header[p].write_timing + w, u.h_ptr == u.w_ptr;
2948
+ var M = u.h_ptr;
2949
+ u.h_ptr = M + 1 & ne.MAX_HEADER_BUF - 1, u.header[u.h_ptr].write_timing = u.header[M].write_timing + w, u.h_ptr == u.w_ptr;
2946
2950
  }
2947
2951
  }
2948
2952
  function E(f, w) {
2949
2953
  var u = V.ht[w.count1table_select + 32], I, n = 0, H = w.big_values, d = w.big_values;
2950
2954
  for (I = (w.count1 - w.big_values) / 4; I > 0; --I) {
2951
- var v = 0, p = 0, x;
2952
- x = w.l3_enc[H + 0], x != 0 && (p += 8, w.xr[d + 0] < 0 && v++), x = w.l3_enc[H + 1], x != 0 && (p += 4, v *= 2, w.xr[d + 1] < 0 && v++), x = w.l3_enc[H + 2], x != 0 && (p += 2, v *= 2, w.xr[d + 2] < 0 && v++), x = w.l3_enc[H + 3], x != 0 && (p++, v *= 2, w.xr[d + 3] < 0 && v++), H += 4, d += 4, j(f, v + u.table[p], u.hlen[p]), n += u.hlen[p];
2955
+ var v = 0, M = 0, x;
2956
+ 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];
2953
2957
  }
2954
2958
  return n;
2955
2959
  }
@@ -2958,8 +2962,8 @@ const a0 = s0;
2958
2962
  if (w == 0)
2959
2963
  return d;
2960
2964
  for (var v = u; v < I; v += 2) {
2961
- var p = 0, x = 0, C = H.xlen, a = H.xlen, i = 0, W = n.l3_enc[v], L = n.l3_enc[v + 1];
2962
- if (W != 0 && (n.xr[v] < 0 && i++, p--), w > 15) {
2965
+ var M = 0, x = 0, C = H.xlen, a = H.xlen, i = 0, W = n.l3_enc[v], L = n.l3_enc[v + 1];
2966
+ if (W != 0 && (n.xr[v] < 0 && i++, M--), w > 15) {
2963
2967
  if (W > 14) {
2964
2968
  var Q = W - 15;
2965
2969
  i |= Q << 1, x = C, W = 15;
@@ -2970,7 +2974,7 @@ const a0 = s0;
2970
2974
  }
2971
2975
  a = 16;
2972
2976
  }
2973
- L != 0 && (i <<= 1, n.xr[v + 1] < 0 && i++, p--), W = W * a + L, x -= p, p += H.hlen[W], j(f, H.table[W], p), j(f, i, x), d += p + x;
2977
+ 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;
2974
2978
  }
2975
2979
  return d;
2976
2980
  }
@@ -3009,44 +3013,44 @@ const a0 = s0;
3009
3013
  if (f.version == 1)
3010
3014
  for (w = 0; w < 2; w++)
3011
3015
  for (u = 0; u < d.channels_out; u++) {
3012
- var p = v.tt[w][u], x = $e.slen1_tab[p.scalefac_compress], C = $e.slen2_tab[p.scalefac_compress];
3013
- for (n = 0, I = 0; I < p.sfbdivide; I++)
3014
- p.scalefac[I] != -1 && (j(d, p.scalefac[I], x), n += x);
3015
- for (; I < p.sfbmax; I++)
3016
- p.scalefac[I] != -1 && (j(d, p.scalefac[I], C), n += C);
3017
- p.block_type == s.SHORT_TYPE ? n += t(d, p) : n += l(d, p), n += E(d, p), H += n;
3016
+ var M = v.tt[w][u], x = $e.slen1_tab[M.scalefac_compress], C = $e.slen2_tab[M.scalefac_compress];
3017
+ for (n = 0, I = 0; I < M.sfbdivide; I++)
3018
+ M.scalefac[I] != -1 && (j(d, M.scalefac[I], x), n += x);
3019
+ for (; I < M.sfbmax; I++)
3020
+ M.scalefac[I] != -1 && (j(d, M.scalefac[I], C), n += C);
3021
+ M.block_type == s.SHORT_TYPE ? n += t(d, M) : n += l(d, M), n += E(d, M), H += n;
3018
3022
  }
3019
3023
  else
3020
3024
  for (w = 0, u = 0; u < d.channels_out; u++) {
3021
- var p = v.tt[w][u], a, i, W = 0;
3022
- if (n = 0, I = 0, i = 0, p.block_type == s.SHORT_TYPE) {
3025
+ var M = v.tt[w][u], a, i, W = 0;
3026
+ if (n = 0, I = 0, i = 0, M.block_type == s.SHORT_TYPE) {
3023
3027
  for (; i < 4; i++) {
3024
- var L = p.sfb_partition_table[i] / 3, Q = p.slen[i];
3028
+ var L = M.sfb_partition_table[i] / 3, Q = M.slen[i];
3025
3029
  for (a = 0; a < L; a++, I++)
3026
3030
  j(
3027
3031
  d,
3028
- Math.max(p.scalefac[I * 3 + 0], 0),
3032
+ Math.max(M.scalefac[I * 3 + 0], 0),
3029
3033
  Q
3030
3034
  ), j(
3031
3035
  d,
3032
- Math.max(p.scalefac[I * 3 + 1], 0),
3036
+ Math.max(M.scalefac[I * 3 + 1], 0),
3033
3037
  Q
3034
3038
  ), j(
3035
3039
  d,
3036
- Math.max(p.scalefac[I * 3 + 2], 0),
3040
+ Math.max(M.scalefac[I * 3 + 2], 0),
3037
3041
  Q
3038
3042
  ), W += 3 * Q;
3039
3043
  }
3040
- n += t(d, p);
3044
+ n += t(d, M);
3041
3045
  } else {
3042
3046
  for (; i < 4; i++) {
3043
- var L = p.sfb_partition_table[i], Q = p.slen[i];
3047
+ var L = M.sfb_partition_table[i], Q = M.slen[i];
3044
3048
  for (a = 0; a < L; a++, I++)
3045
- j(d, Math.max(p.scalefac[I], 0), Q), W += Q;
3049
+ j(d, Math.max(M.scalefac[I], 0), Q), W += Q;
3046
3050
  }
3047
- n += l(d, p);
3051
+ n += l(d, M);
3048
3052
  }
3049
- n += E(d, p), H += W + n;
3053
+ n += E(d, M), H += W + n;
3050
3054
  }
3051
3055
  return H;
3052
3056
  }
@@ -3055,11 +3059,11 @@ const a0 = s0;
3055
3059
  }
3056
3060
  function y(f, w) {
3057
3061
  var u = f.internal_flags, I, n, H;
3058
- return u.w_ptr, H = u.h_ptr - 1, H == -1 && (H = ne.MAX_HEADER_BUF - 1), I = u.header[H].write_timing - oe, w.total = I, I >= 0 && M(), n = c.getframebits(f), I += n, w.total += n, w.total % 8 != 0 ? w.total = 1 + w.total / 8 : w.total = w.total / 8, w.total += g + 1, I;
3062
+ return u.w_ptr, H = u.h_ptr - 1, H == -1 && (H = ne.MAX_HEADER_BUF - 1), I = u.header[H].write_timing - oe, w.total = I, I >= 0 && p(), n = c.getframebits(f), I += n, w.total += n, w.total % 8 != 0 ? w.total = 1 + w.total / 8 : w.total = w.total / 8, w.total += g + 1, I;
3059
3063
  }
3060
3064
  this.flush_bitstream = function(f) {
3061
3065
  var w = f.internal_flags, u, I;
3062
- w.h_ptr - 1, u = w.l3_side, !((I = y(f, new F())) < 0) && (K(f, I), w.ResvSize = 0, u.main_data_begin = 0, w.findReplayGain && M(), w.findPeakSample && M());
3066
+ w.h_ptr - 1, u = w.l3_side, !((I = y(f, new F())) < 0) && (K(f, I), w.ResvSize = 0, u.main_data_begin = 0, w.findReplayGain && p(), w.findPeakSample && p());
3063
3067
  }, this.format_bitstream = function(f) {
3064
3068
  var w = f.internal_flags, u;
3065
3069
  u = w.l3_side;
@@ -3081,7 +3085,7 @@ const a0 = s0;
3081
3085
  return -1;
3082
3086
  if (ue.arraycopy(T, 0, w, u, H), g = -1, z = 0, n != 0) {
3083
3087
  var d = re(1);
3084
- d[0] = f.nMusicCRC, P.updateMusicCRC(d, w, u, H), f.nMusicCRC = d[0], H > 0 && (f.VBR_seek_table.nBytesWritten += H), f.decode_on_the_fly && M();
3088
+ d[0] = f.nMusicCRC, P.updateMusicCRC(d, w, u, H), f.nMusicCRC = d[0], H > 0 && (f.VBR_seek_table.nBytesWritten += H), f.decode_on_the_fly && p();
3085
3089
  }
3086
3090
  return H;
3087
3091
  }, this.init_bit_stream_w = function(f) {
@@ -6537,7 +6541,7 @@ const a0 = s0;
6537
6541
  [44100, 48e3, 32e3, -1],
6538
6542
  [11025, 12e3, 8e3, -1]
6539
6543
  ], V.scfsi_band = [0, 6, 11, 16, 21];
6540
- function Mt(c) {
6544
+ function pt(c) {
6541
6545
  this.bits = c;
6542
6546
  }
6543
6547
  function rt() {
@@ -6550,13 +6554,13 @@ const a0 = s0;
6550
6554
  function _t() {
6551
6555
  this.useAdjust = 0, this.aaSensitivityP = 0, this.adjust = 0, this.adjustLimit = 0, this.decay = 0, this.floor = 0, this.l = ie(s.SBMAX_l), this.s = ie(s.SBMAX_s), this.psfb21 = ie(s.PSFB21), this.psfb12 = ie(s.PSFB12), this.cb_l = ie(s.CBANDS), this.cb_s = ie(s.CBANDS), this.eql_w = ie(s.BLKSIZE / 2);
6552
6556
  }
6553
- function pt() {
6557
+ function Mt() {
6554
6558
  this.class_id = 0, this.num_samples = 0, this.num_channels = 0, this.in_samplerate = 0, this.out_samplerate = 0, this.scale = 0, this.scale_left = 0, this.scale_right = 0, this.analysis = !1, this.bWriteVbrTag = !1, this.decode_only = !1, this.quality = 0, this.mode = ze.STEREO, this.force_ms = !1, this.free_format = !1, this.findReplayGain = !1, this.decode_on_the_fly = !1, this.write_id3tag_automatic = !1, this.brate = 0, this.compression_ratio = 0, this.copyright = 0, this.original = 0, this.extension = 0, this.emphasis = 0, this.error_protection = 0, this.strict_ISO = !1, this.disable_reservoir = !1, this.quant_comp = 0, this.quant_comp_short = 0, this.experimentalY = !1, this.experimentalZ = 0, this.exp_nspsytune = 0, this.preset = 0, this.VBR = null, this.VBR_q_frac = 0, this.VBR_q = 0, this.VBR_mean_bitrate_kbps = 0, this.VBR_min_bitrate_kbps = 0, this.VBR_max_bitrate_kbps = 0, this.VBR_hard_min = 0, this.lowpassfreq = 0, this.highpassfreq = 0, this.lowpasswidth = 0, this.highpasswidth = 0, this.maskingadjust = 0, this.maskingadjust_short = 0, this.ATHonly = !1, this.ATHshort = !1, this.noATH = !1, this.ATHtype = 0, this.ATHcurve = 0, this.ATHlower = 0, this.athaa_type = 0, this.athaa_loudapprox = 0, this.athaa_sensitivity = 0, this.short_blocks = null, this.useTemporal = !1, this.interChRatio = 0, this.msfix = 0, this.tune = !1, this.tune_value_a = 0, this.version = 0, this.encoder_delay = 0, this.encoder_padding = 0, this.framesize = 0, this.frameNum = 0, this.lame_allocated_gfp = 0, this.internal_flags = null;
6555
6559
  }
6556
6560
  function ft(c) {
6557
6561
  var N = c;
6558
6562
  this.quantize = N, this.iteration_loop = function(P, T, oe, g) {
6559
- var z = P.internal_flags, ae = ie(m.SFBMAX), j = ie(576), K = re(2), k = 0, fe = z.l3_side, E = new Mt(k);
6563
+ var z = P.internal_flags, ae = ie(b.SFBMAX), j = ie(576), K = re(2), k = 0, fe = z.l3_side, E = new pt(k);
6560
6564
  this.quantize.rv.ResvFrameBegin(P, E), k = E.bits;
6561
6565
  for (var B = 0; B < z.mode_gr; B++) {
6562
6566
  this.quantize.qupvt.on_pe(
@@ -6566,7 +6570,7 @@ const a0 = s0;
6566
6570
  k,
6567
6571
  B,
6568
6572
  B
6569
- ), z.mode_ext == s.MPG_MD_MS_LR && M();
6573
+ ), z.mode_ext == s.MPG_MD_MS_LR && p();
6570
6574
  for (var t = 0; t < z.channels_out; t++) {
6571
6575
  var l, A, F = fe.tt[B][t];
6572
6576
  F.block_type != s.SHORT_TYPE ? (l = 0, A = z.PSY.mask_adjust - l) : (l = 0, A = z.PSY.mask_adjust_short - l), z.masking_lower = Math.pow(
@@ -6986,40 +6990,40 @@ const a0 = s0;
6986
6990
  }
6987
6991
  function A(y) {
6988
6992
  for (var f = y.internal_flags.ATH.l, w = y.internal_flags.ATH.psfb21, u = y.internal_flags.ATH.s, I = y.internal_flags.ATH.psfb12, n = y.internal_flags, H = y.out_samplerate, d = 0; d < s.SBMAX_l; d++) {
6989
- var v = n.scalefac_band.l[d], p = n.scalefac_band.l[d + 1];
6993
+ var v = n.scalefac_band.l[d], M = n.scalefac_band.l[d + 1];
6990
6994
  f[d] = Ye.MAX_VALUE;
6991
- for (var x = v; x < p; x++) {
6995
+ for (var x = v; x < M; x++) {
6992
6996
  var C = x * H / 1152, a = l(y, C);
6993
6997
  f[d] = Math.min(f[d], a);
6994
6998
  }
6995
6999
  }
6996
7000
  for (var d = 0; d < s.PSFB21; d++) {
6997
- var v = n.scalefac_band.psfb21[d], p = n.scalefac_band.psfb21[d + 1];
7001
+ var v = n.scalefac_band.psfb21[d], M = n.scalefac_band.psfb21[d + 1];
6998
7002
  w[d] = Ye.MAX_VALUE;
6999
- for (var x = v; x < p; x++) {
7003
+ for (var x = v; x < M; x++) {
7000
7004
  var C = x * H / 1152, a = l(y, C);
7001
7005
  w[d] = Math.min(w[d], a);
7002
7006
  }
7003
7007
  }
7004
7008
  for (var d = 0; d < s.SBMAX_s; d++) {
7005
- var v = n.scalefac_band.s[d], p = n.scalefac_band.s[d + 1];
7009
+ var v = n.scalefac_band.s[d], M = n.scalefac_band.s[d + 1];
7006
7010
  u[d] = Ye.MAX_VALUE;
7007
- for (var x = v; x < p; x++) {
7011
+ for (var x = v; x < M; x++) {
7008
7012
  var C = x * H / 384, a = l(y, C);
7009
7013
  u[d] = Math.min(u[d], a);
7010
7014
  }
7011
7015
  u[d] *= n.scalefac_band.s[d + 1] - n.scalefac_band.s[d];
7012
7016
  }
7013
7017
  for (var d = 0; d < s.PSFB12; d++) {
7014
- var v = n.scalefac_band.psfb12[d], p = n.scalefac_band.psfb12[d + 1];
7018
+ var v = n.scalefac_band.psfb12[d], M = n.scalefac_band.psfb12[d + 1];
7015
7019
  I[d] = Ye.MAX_VALUE;
7016
- for (var x = v; x < p; x++) {
7020
+ for (var x = v; x < M; x++) {
7017
7021
  var C = x * H / 384, a = l(y, C);
7018
7022
  I[d] = Math.min(I[d], a);
7019
7023
  }
7020
7024
  I[d] *= n.scalefac_band.s[13] - n.scalefac_band.s[12];
7021
7025
  }
7022
- y.noATH && M(), n.ATH.floor = 10 * b(l(y, -1));
7026
+ y.noATH && p(), n.ATH.floor = 10 * m(l(y, -1));
7023
7027
  }
7024
7028
  this.iteration_init = function(y) {
7025
7029
  var f = y.internal_flags, w = f.l3_side, u;
@@ -7049,38 +7053,38 @@ const a0 = s0;
7049
7053
  }
7050
7054
  }
7051
7055
  }, this.on_pe = function(y, f, w, u, I, n) {
7052
- var H = y.internal_flags, d = 0, v, p = re(2), x, C = new Mt(d), a = N.ResvMaxBits(y, u, C, n);
7056
+ var H = y.internal_flags, d = 0, v, M = re(2), x, C = new pt(d), a = N.ResvMaxBits(y, u, C, n);
7053
7057
  d = C.bits;
7054
7058
  var i = d + a;
7055
7059
  for (i > ne.MAX_BITS_PER_GRANULE && (i = ne.MAX_BITS_PER_GRANULE), v = 0, x = 0; x < H.channels_out; ++x)
7056
7060
  w[x] = Math.min(
7057
7061
  ne.MAX_BITS_PER_CHANNEL,
7058
7062
  d / H.channels_out
7059
- ), p[x] = 0 | w[x] * f[I][x] / 700 - w[x], p[x] > u * 3 / 4 && (p[x] = u * 3 / 4), p[x] < 0 && (p[x] = 0), p[x] + w[x] > ne.MAX_BITS_PER_CHANNEL && (p[x] = Math.max(
7063
+ ), M[x] = 0 | w[x] * f[I][x] / 700 - w[x], M[x] > u * 3 / 4 && (M[x] = u * 3 / 4), M[x] < 0 && (M[x] = 0), M[x] + w[x] > ne.MAX_BITS_PER_CHANNEL && (M[x] = Math.max(
7060
7064
  0,
7061
7065
  ne.MAX_BITS_PER_CHANNEL - w[x]
7062
- )), v += p[x];
7066
+ )), v += M[x];
7063
7067
  if (v > a)
7064
7068
  for (x = 0; x < H.channels_out; ++x)
7065
- p[x] = a * p[x] / v;
7069
+ M[x] = a * M[x] / v;
7066
7070
  for (x = 0; x < H.channels_out; ++x)
7067
- w[x] += p[x], a -= p[x];
7071
+ w[x] += M[x], a -= M[x];
7068
7072
  for (v = 0, x = 0; x < H.channels_out; ++x)
7069
7073
  v += w[x];
7070
- return v > ne.MAX_BITS_PER_GRANULE && M(), i;
7074
+ return v > ne.MAX_BITS_PER_GRANULE && p(), i;
7071
7075
  }, this.athAdjust = function(y, f, w) {
7072
7076
  var u = 90.30873362, I = 94.82444863, n = ge.FAST_LOG10_X(f, 10), H = y * y, d = 0;
7073
7077
  return n -= w, H > 1e-20 && (d = 1 + ge.FAST_LOG10_X(H, 10 / u)), d < 0 && (d = 0), n *= d, n += w + u - I, Math.pow(10, 0.1 * n);
7074
7078
  }, this.calc_xmin = function(y, f, w, u) {
7075
- var I = 0, n = y.internal_flags, H, d = 0, v = 0, p = n.ATH, x = w.xr, C = y.VBR == de.vbr_mtrh ? 1 : 0, a = n.masking_lower;
7079
+ 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;
7076
7080
  for ((y.VBR == de.vbr_mtrh || y.VBR == de.vbr_mt) && (a = 1), H = 0; H < w.psy_lmax; H++) {
7077
7081
  var i, W, L, Q, le, _e;
7078
- y.VBR == de.vbr_rh || y.VBR == de.vbr_mtrh ? W = athAdjust(p.adjust, p.l[H], p.floor) : W = p.adjust * p.l[H], le = w.width[H], L = W / le, Q = oe, _e = le >> 1, i = 0;
7082
+ 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;
7079
7083
  do {
7080
- var pe, je;
7081
- pe = x[d] * x[d], i += pe, Q += pe < L ? pe : L, d++, je = x[d] * x[d], i += je, Q += je < L ? je : L, d++;
7084
+ var Me, je;
7085
+ 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++;
7082
7086
  } while (--_e > 0);
7083
- if (i > W && v++, H == s.SBPSY_l && M(), C != 0 && (W = Q), !y.ATHonly) {
7087
+ if (i > W && v++, H == s.SBPSY_l && p(), C != 0 && (W = Q), !y.ATHonly) {
7084
7088
  var He = f.en.l[H];
7085
7089
  if (He > 0) {
7086
7090
  var Ue;
@@ -7096,14 +7100,14 @@ const a0 = s0;
7096
7100
  w.max_nonzero_coeff = ht;
7097
7101
  for (var ot = w.sfb_smin; H < w.psymax; ot++, H += 3) {
7098
7102
  var le, ct, gt;
7099
- for (y.VBR == de.vbr_rh || y.VBR == de.vbr_mtrh ? gt = athAdjust(p.adjust, p.s[ot], p.floor) : gt = p.adjust * p.s[ot], le = w.width[H], ct = 0; ct < 3; ct++) {
7103
+ 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++) {
7100
7104
  var i = 0, W, L, Q, _e = le >> 1;
7101
7105
  L = gt / le, Q = oe;
7102
7106
  do {
7103
- var pe, je;
7104
- pe = x[d] * x[d], i += pe, Q += pe < L ? pe : L, d++, je = x[d] * x[d], i += je, Q += je < L ? je : L, d++;
7107
+ var Me, je;
7108
+ 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++;
7105
7109
  } while (--_e > 0);
7106
- if (i > gt && v++, ot == s.SBPSY_s && M(), C != 0 ? W = Q : W = gt, !y.ATHonly && !y.ATHshort) {
7110
+ if (i > gt && v++, ot == s.SBPSY_s && p(), C != 0 ? W = Q : W = gt, !y.ATHonly && !y.ATHshort) {
7107
7111
  var He = f.en.s[ot][ct];
7108
7112
  if (He > 0) {
7109
7113
  var Ue;
@@ -7139,7 +7143,7 @@ const a0 = s0;
7139
7143
  }
7140
7144
  return f.s = n, I;
7141
7145
  }, this.calc_noise = function(y, f, w, u, I) {
7142
- var n = 0, H = 0, d, v, p = 0, x = 0, C = 0, a = -20, i = 0, W = y.scalefac, L = 0;
7146
+ var n = 0, H = 0, d, v, M = 0, x = 0, C = 0, a = -20, i = 0, W = y.scalefac, L = 0;
7143
7147
  for (u.over_SSD = 0, d = 0; d < y.psymax; d++) {
7144
7148
  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;
7145
7149
  if (I != null && I.step[d] == Q)
@@ -7147,26 +7151,26 @@ const a0 = s0;
7147
7151
  else {
7148
7152
  var _e = T(Q);
7149
7153
  if (v = y.width[d] >> 1, i + y.width[d] > y.max_nonzero_coeff) {
7150
- var pe;
7151
- pe = y.max_nonzero_coeff - i + 1, pe > 0 ? v = pe >> 1 : v = 0;
7154
+ var Me;
7155
+ Me = y.max_nonzero_coeff - i + 1, Me > 0 ? v = Me >> 1 : v = 0;
7152
7156
  }
7153
7157
  var je = new F(i);
7154
7158
  le = this.calc_noise_core(y, je, v, _e), i = je.s, I != null && (I.step[d] = Q, I.noise[d] = le), le = w[n++] = le / f[H++], le = ge.FAST_LOG10(Math.max(le, 1e-20)), I != null && (I.noise_log[d] = le);
7155
7159
  }
7156
7160
  if (I != null && (I.global_gain = y.global_gain), C += le, le > 0) {
7157
7161
  var He;
7158
- He = Math.max(0 | le * 10 + 0.5, 1), u.over_SSD += He * He, p++, x += le;
7162
+ He = Math.max(0 | le * 10 + 0.5, 1), u.over_SSD += He * He, M++, x += le;
7159
7163
  }
7160
7164
  a = Math.max(a, le);
7161
7165
  }
7162
- return u.over_count = p, u.tot_noise = C, u.over_noise = x, u.max_noise = a, p;
7166
+ return u.over_count = M, u.tot_noise = C, u.over_noise = x, u.max_noise = a, M;
7163
7167
  };
7164
7168
  }
7165
7169
  function o() {
7166
7170
  this.global_gain = 0, this.sfb_count1 = 0, this.step = re(39), this.noise = ie(39), this.noise_log = ie(39);
7167
7171
  }
7168
7172
  function h() {
7169
- this.xr = ie(576), this.l3_enc = re(576), this.scalefac = re(m.SFBMAX), this.xrpow_max = 0, this.part2_3_length = 0, this.big_values = 0, this.count1 = 0, this.global_gain = 0, this.scalefac_compress = 0, this.block_type = 0, this.mixed_block_flag = 0, this.table_select = re(3), this.subblock_gain = re(3 + 1), this.region0_count = 0, this.region1_count = 0, this.preflag = 0, this.scalefac_scale = 0, this.count1table_select = 0, this.part2_length = 0, this.sfb_lmax = 0, this.sfb_smin = 0, this.psy_lmax = 0, this.sfbmax = 0, this.psymax = 0, this.sfbdivide = 0, this.width = re(m.SFBMAX), this.window = re(m.SFBMAX), this.count1bits = 0, this.sfb_partition_table = null, this.slen = re(4), this.max_nonzero_coeff = 0;
7173
+ this.xr = ie(576), this.l3_enc = re(576), this.scalefac = re(b.SFBMAX), this.xrpow_max = 0, this.part2_3_length = 0, this.big_values = 0, this.count1 = 0, this.global_gain = 0, this.scalefac_compress = 0, this.block_type = 0, this.mixed_block_flag = 0, this.table_select = re(3), this.subblock_gain = re(3 + 1), this.region0_count = 0, this.region1_count = 0, this.preflag = 0, this.scalefac_scale = 0, this.count1table_select = 0, this.part2_length = 0, this.sfb_lmax = 0, this.sfb_smin = 0, this.psy_lmax = 0, this.sfbmax = 0, this.psymax = 0, this.sfbdivide = 0, this.width = re(b.SFBMAX), this.window = re(b.SFBMAX), this.count1bits = 0, this.sfb_partition_table = null, this.slen = re(4), this.max_nonzero_coeff = 0;
7170
7174
  var c = this;
7171
7175
  function N(T) {
7172
7176
  return new Int32Array(T);
@@ -7178,8 +7182,8 @@ const a0 = s0;
7178
7182
  c.xr = P(T.xr), c.l3_enc = N(T.l3_enc), c.scalefac = N(T.scalefac), c.xrpow_max = T.xrpow_max, c.part2_3_length = T.part2_3_length, c.big_values = T.big_values, c.count1 = T.count1, c.global_gain = T.global_gain, c.scalefac_compress = T.scalefac_compress, c.block_type = T.block_type, c.mixed_block_flag = T.mixed_block_flag, c.table_select = N(T.table_select), c.subblock_gain = N(T.subblock_gain), c.region0_count = T.region0_count, c.region1_count = T.region1_count, c.preflag = T.preflag, c.scalefac_scale = T.scalefac_scale, c.count1table_select = T.count1table_select, c.part2_length = T.part2_length, c.sfb_lmax = T.sfb_lmax, c.sfb_smin = T.sfb_smin, c.psy_lmax = T.psy_lmax, c.sfbmax = T.sfbmax, c.psymax = T.psymax, c.sfbdivide = T.sfbdivide, c.width = N(T.width), c.window = N(T.window), c.count1bits = T.count1bits, c.sfb_partition_table = T.sfb_partition_table.slice(0), c.slen = N(T.slen), c.max_nonzero_coeff = T.max_nonzero_coeff;
7179
7183
  };
7180
7184
  }
7181
- var m = {};
7182
- m.SFBMAX = s.SBMAX_s * 3;
7185
+ var b = {};
7186
+ b.SFBMAX = s.SBMAX_s * 3;
7183
7187
  function S() {
7184
7188
  this.rv = null;
7185
7189
  var c;
@@ -7249,7 +7253,7 @@ const a0 = s0;
7249
7253
  l.width[A] = t.scalefac_band.l[A + 1] - t.scalefac_band.l[A], l.window[A] = 3;
7250
7254
  if (l.block_type == s.SHORT_TYPE) {
7251
7255
  var F = ie(576);
7252
- l.sfb_smin = 0, l.sfb_lmax = 0, l.mixed_block_flag != 0 && M(), l.psymax = l.sfb_lmax + 3 * ((t.sfb21_extra ? s.SBMAX_s : s.SBPSY_s) - l.sfb_smin), l.sfbmax = l.sfb_lmax + 3 * (s.SBPSY_s - l.sfb_smin), l.sfbdivide = l.sfbmax - 18, l.psy_lmax = l.sfb_lmax;
7256
+ l.sfb_smin = 0, l.sfb_lmax = 0, l.mixed_block_flag != 0 && p(), l.psymax = l.sfb_lmax + 3 * ((t.sfb21_extra ? s.SBMAX_s : s.SBPSY_s) - l.sfb_smin), l.sfbmax = l.sfb_lmax + 3 * (s.SBPSY_s - l.sfb_smin), l.sfbdivide = l.sfbmax - 18, l.psy_lmax = l.sfb_lmax;
7253
7257
  var y = t.scalefac_band.l[l.sfb_lmax];
7254
7258
  ue.arraycopy(l.xr, 0, F, 0, 576);
7255
7259
  for (var A = l.sfb_smin; A < s.SBMAX_s; A++)
@@ -7271,7 +7275,7 @@ const a0 = s0;
7271
7275
  var H;
7272
7276
  if (f = T.count_bits(t, y, l, null), w == 1 || f == A)
7273
7277
  break;
7274
- f > A ? (n == z.BINSEARCH_DOWN && (u = !0), u && (w /= 2), n = z.BINSEARCH_UP, H = w) : (n == z.BINSEARCH_UP && (u = !0), u && (w /= 2), n = z.BINSEARCH_DOWN, H = -w), l.global_gain += H, l.global_gain < 0 && M(), l.global_gain > 255 && M();
7278
+ f > A ? (n == z.BINSEARCH_DOWN && (u = !0), u && (w /= 2), n = z.BINSEARCH_UP, H = w) : (n == z.BINSEARCH_UP && (u = !0), u && (w /= 2), n = z.BINSEARCH_DOWN, H = -w), l.global_gain += H, l.global_gain < 0 && p(), l.global_gain > 255 && p();
7275
7279
  }
7276
7280
  for (; f > A && l.global_gain < 255; )
7277
7281
  l.global_gain++, f = T.count_bits(t, y, l, null);
@@ -7295,7 +7299,7 @@ const a0 = s0;
7295
7299
  f = A.over_count < l.over_count || A.over_count == l.over_count && A.over_noise < l.over_noise || A.over_count == l.over_count && Xe.EQ(A.over_noise, l.over_noise) && A.tot_noise < l.tot_noise;
7296
7300
  break;
7297
7301
  case 8:
7298
- M();
7302
+ p();
7299
7303
  case 1:
7300
7304
  f = A.max_noise < l.max_noise;
7301
7305
  break;
@@ -7326,7 +7330,7 @@ const a0 = s0;
7326
7330
  for (var u = 0, I = 0; I < l.sfbmax; I++)
7327
7331
  u < A[I] && (u = A[I]);
7328
7332
  var n = f.noise_shaping_amp;
7329
- switch (n == 3 && M(), n) {
7333
+ switch (n == 3 && p(), n) {
7330
7334
  case 2:
7331
7335
  break;
7332
7336
  case 1:
@@ -7340,7 +7344,7 @@ const a0 = s0;
7340
7344
  for (var H = 0, I = 0; I < l.sfbmax; I++) {
7341
7345
  var d = l.width[I], v;
7342
7346
  if (H += d, !(A[I] < u)) {
7343
- for (f.substep_shaping & 2 && M(), l.scalefac[I]++, v = -d; v < 0; v++)
7347
+ for (f.substep_shaping & 2 && p(), l.scalefac[I]++, v = -d; v < 0; v++)
7344
7348
  F[H + v] *= w, F[H + v] > l.xrpow_max && (l.xrpow_max = F[H + v]);
7345
7349
  if (f.noise_shaping_amp == 2)
7346
7350
  return;
@@ -7387,15 +7391,15 @@ const a0 = s0;
7387
7391
  n = N.IPOW20(v);
7388
7392
  }
7389
7393
  I += H * (f + 1);
7390
- for (var p = -H; p < 0; p++)
7391
- A[I + p] *= n, A[I + p] > l.xrpow_max && (l.xrpow_max = A[I + p]);
7394
+ for (var M = -H; M < 0; M++)
7395
+ A[I + M] *= n, A[I + M] > l.xrpow_max && (l.xrpow_max = A[I + M]);
7392
7396
  I += H * (3 - f - 1);
7393
7397
  }
7394
7398
  {
7395
7399
  var n = N.IPOW20(202);
7396
7400
  I += l.width[F] * (f + 1);
7397
- for (var p = -l.width[F]; p < 0; p++)
7398
- A[I + p] *= n, A[I + p] > l.xrpow_max && (l.xrpow_max = A[I + p]);
7401
+ for (var M = -l.width[F]; M < 0; M++)
7402
+ A[I + M] *= n, A[I + M] > l.xrpow_max && (l.xrpow_max = A[I + M]);
7399
7403
  }
7400
7404
  }
7401
7405
  }
@@ -7408,7 +7412,7 @@ const a0 = s0;
7408
7412
  return w ? !1 : (f.mode_gr == 2 ? w = T.scale_bitcount(l) : w = T.scale_bitcount_lsf(f, l), w ? (f.noise_shaping > 1 && (Ze.fill(f.pseudohalf, 0), l.scalefac_scale == 0 ? (fe(l, F), w = !1) : l.block_type == s.SHORT_TYPE && f.subblock_gain > 0 && (w = E(f, l, F) || j(l))), w || (f.mode_gr == 2 ? w = T.scale_bitcount(l) : w = T.scale_bitcount_lsf(f, l)), !w) : !0);
7409
7413
  }
7410
7414
  this.outer_loop = function(t, l, A, F, y, f) {
7411
- var w = t.internal_flags, u = new h(), I = ie(576), n = ie(m.SFBMAX), H = new rt(), d, v = new o(), p = 9999999, x = !1, C = !1, a = 0;
7415
+ var w = t.internal_flags, u = new h(), I = ie(576), n = ie(b.SFBMAX), H = new rt(), d, v = new o(), M = 9999999, x = !1, C = !1, a = 0;
7412
7416
  if (ae(w, l, f, y, F), w.noise_shaping == 0)
7413
7417
  return 100;
7414
7418
  N.calc_noise(
@@ -7422,7 +7426,7 @@ const a0 = s0;
7422
7426
  for (ue.arraycopy(F, 0, I, 0, 576); !x; ) {
7423
7427
  do {
7424
7428
  var W = new rt(), L, Q = 255;
7425
- if (w.substep_shaping & 2 ? L = 20 : L = 3, w.sfb21_extra && M(), !B(t, u, n, F))
7429
+ if (w.substep_shaping & 2 ? L = 20 : L = 3, w.sfb21_extra && p(), !B(t, u, n, F))
7426
7430
  break;
7427
7431
  u.scalefac_scale != 0 && (Q = 254);
7428
7432
  var le = f - u.part2_length;
@@ -7443,7 +7447,7 @@ const a0 = s0;
7443
7447
  F,
7444
7448
  u,
7445
7449
  v
7446
- )) > p && u.global_gain <= Q; )
7450
+ )) > M && u.global_gain <= Q; )
7447
7451
  u.global_gain++;
7448
7452
  if (u.global_gain > Q)
7449
7453
  break;
@@ -7455,13 +7459,13 @@ const a0 = s0;
7455
7459
  W,
7456
7460
  v
7457
7461
  ), W.bits = u.part2_3_length, l.block_type != s.SHORT_TYPE ? d = t.quant_comp : d = t.quant_comp_short, d = K(d, H, W) ? 1 : 0, d != 0)
7458
- p = l.part2_3_length, H = W, l.assign(u), i = 0, ue.arraycopy(F, 0, I, 0, 576);
7462
+ M = l.part2_3_length, H = W, l.assign(u), i = 0, ue.arraycopy(F, 0, I, 0, 576);
7459
7463
  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))
7460
7464
  break;
7461
7465
  } while (u.global_gain + u.scalefac_scale < 255);
7462
- w.noise_shaping_amp == 3 ? M() : x = !0;
7466
+ w.noise_shaping_amp == 3 ? p() : x = !0;
7463
7467
  }
7464
- return t.VBR == de.vbr_rh || t.VBR == de.vbr_mtrh ? ue.arraycopy(I, 0, F, 0, 576) : w.substep_shaping & 1 && M(), H.over_count;
7468
+ return t.VBR == de.vbr_rh || t.VBR == de.vbr_mtrh ? ue.arraycopy(I, 0, F, 0, 576) : w.substep_shaping & 1 && p(), H.over_count;
7465
7469
  }, this.iteration_finish_one = function(t, l, A) {
7466
7470
  var F = t.l3_side, y = F.tt[l][A];
7467
7471
  T.best_scalefac_store(t, l, A, F), t.use_best_huffman == 1 && T.best_huffman_divide(t, y), c.ResvAdjust(t, y);
@@ -7987,8 +7991,8 @@ const a0 = s0;
7987
7991
  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;
7988
7992
  }
7989
7993
  {
7990
- var d, v, p, x, C, a, i, W;
7991
- d = t[8] - t[0], p = 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 - p + 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 + p * 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 - p * 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 + p * g[12 + 1] - x * g[12 + 2], E[B + 15] = l + A, E[B + 16] = l - A;
7994
+ var d, v, M, x, C, a, i, W;
7995
+ 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;
7992
7996
  }
7993
7997
  }
7994
7998
  this.mdct_sub48 = function(E, B, t) {
@@ -7998,7 +8002,7 @@ const a0 = s0;
7998
8002
  for (K(l, A, n[H]), K(l, A + 32, n[H + 1]), H += 2, A += 64, f = 1; f < 32; f += 2)
7999
8003
  n[H - 1][f] *= -1;
8000
8004
  for (f = 0; f < 32; f++, I += 18) {
8001
- var v = w.block_type, p = E.sb_sample[F][y], x = E.sb_sample[F][1 - y];
8005
+ var v = w.block_type, M = E.sb_sample[F][y], x = E.sb_sample[F][1 - y];
8002
8006
  if (w.mixed_block_flag != 0 && f < 2 && (v = 0), E.amp_filter[f] < 1e-12)
8003
8007
  Ze.fill(
8004
8008
  u,
@@ -8006,16 +8010,16 @@ const a0 = s0;
8006
8010
  I + 18,
8007
8011
  0
8008
8012
  );
8009
- else if (E.amp_filter[f] < 1 && M(), v == s.SHORT_TYPE) {
8013
+ else if (E.amp_filter[f] < 1 && p(), v == s.SHORT_TYPE) {
8010
8014
  for (var d = -N / 4; d < 0; d++) {
8011
8015
  var C = T[s.SHORT_TYPE][d + 3];
8012
- u[I + d * 3 + 9] = p[9 + d][j[f]] * C - p[8 - d][j[f]], u[I + d * 3 + 18] = p[14 - d][j[f]] * C + p[15 + d][j[f]], u[I + d * 3 + 10] = p[15 + d][j[f]] * C - p[14 - d][j[f]], u[I + d * 3 + 19] = x[2 - d][j[f]] * C + x[3 + d][j[f]], u[I + d * 3 + 11] = x[3 + d][j[f]] * C - x[2 - d][j[f]], u[I + d * 3 + 20] = x[8 - d][j[f]] * C + x[9 + d][j[f]];
8016
+ u[I + d * 3 + 9] = M[9 + d][j[f]] * C - M[8 - d][j[f]], u[I + d * 3 + 18] = M[14 - d][j[f]] * C + M[15 + d][j[f]], u[I + d * 3 + 10] = M[15 + d][j[f]] * C - M[14 - d][j[f]], u[I + d * 3 + 19] = x[2 - d][j[f]] * C + x[3 + d][j[f]], u[I + d * 3 + 11] = x[3 + d][j[f]] * C - x[2 - d][j[f]], u[I + d * 3 + 20] = x[8 - d][j[f]] * C + x[9 + d][j[f]];
8013
8017
  }
8014
8018
  k(u, I);
8015
8019
  } else {
8016
8020
  for (var a = ie(18), d = -P / 4; d < 0; d++) {
8017
8021
  var i, W;
8018
- i = T[v][d + 27] * x[d + 9][j[f]] + T[v][d + 36] * x[8 - d][j[f]], W = T[v][d + 9] * p[d + 9][j[f]] - T[v][d + 18] * p[8 - d][j[f]], a[d + 9] = i - W * oe[3 + d + 9], a[d + 18] = i * oe[3 + d + 9] + W;
8022
+ 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;
8019
8023
  }
8020
8024
  fe(u, I, a);
8021
8025
  }
@@ -8066,7 +8070,7 @@ const a0 = s0;
8066
8070
  j.ATH.adjust = 1;
8067
8071
  return;
8068
8072
  }
8069
- if (k = j.loudness_sq[0][0], K = j.loudness_sq[1][0], j.channels_out == 2 ? M() : (k += k, K += K), j.mode_gr == 2 && (k = Math.max(k, K)), k *= 0.5, k *= j.ATH.aaSensitivityP, k > 0.03125)
8073
+ if (k = j.loudness_sq[0][0], K = j.loudness_sq[1][0], j.channels_out == 2 ? p() : (k += k, K += K), j.mode_gr == 2 && (k = Math.max(k, K)), k *= 0.5, k *= j.ATH.aaSensitivityP, k > 0.03125)
8070
8074
  j.ATH.adjust >= 1 ? j.ATH.adjust = 1 : j.ATH.adjust < j.ATH.adjustLimit && (j.ATH.adjust = j.ATH.adjustLimit), j.ATH.adjustLimit = 1;
8071
8075
  else {
8072
8076
  var fe = 31.98 * k + 625e-6;
@@ -8075,7 +8079,7 @@ const a0 = s0;
8075
8079
  }
8076
8080
  function z(j) {
8077
8081
  var K, k;
8078
- for (j.bitrate_stereoMode_Hist[j.bitrate_index][4]++, j.bitrate_stereoMode_Hist[15][4]++, j.channels_out == 2 && M(), K = 0; K < j.mode_gr; ++K)
8082
+ for (j.bitrate_stereoMode_Hist[j.bitrate_index][4]++, j.bitrate_stereoMode_Hist[15][4]++, j.channels_out == 2 && p(), K = 0; K < j.mode_gr; ++K)
8079
8083
  for (k = 0; k < j.channels_out; ++k) {
8080
8084
  var fe = j.l3_side.tt[K][k].block_type | 0;
8081
8085
  j.l3_side.tt[K][k].mixed_block_flag != 0 && (fe = 4), j.bitrate_blockType_Hist[j.bitrate_index][fe]++, j.bitrate_blockType_Hist[j.bitrate_index][5]++, j.bitrate_blockType_Hist[15][fe]++, j.bitrate_blockType_Hist[15][5]++;
@@ -8100,11 +8104,11 @@ const a0 = s0;
8100
8104
  A[0][0] = new D(), A[0][1] = new D(), A[1][0] = new D(), A[1][1] = new D();
8101
8105
  var F, y = [null, null], f = j.internal_flags, w = Re([2, 4]), u = [0.5, 0.5], I = [[0, 0], [0, 0]], n = [[0, 0], [0, 0]], H, d, v;
8102
8106
  if (y[0] = K, y[1] = k, f.lame_encode_frame_init == 0 && ae(j, y), f.padding = 0, (f.slot_lag -= f.frac_SpF) < 0 && (f.slot_lag += j.out_samplerate, f.padding = 1), f.psymodel != 0) {
8103
- var p, x = [null, null], C = 0, a = re(2);
8107
+ var M, x = [null, null], C = 0, a = re(2);
8104
8108
  for (v = 0; v < f.mode_gr; v++) {
8105
8109
  for (d = 0; d < f.channels_out; d++)
8106
8110
  x[d] = y[d], C = 576 + v * 576 - s.FFTOFFSET;
8107
- if (j.VBR == de.vbr_mtrh || j.VBR == de.vbr_mt ? M() : p = P.L3psycho_anal_ns(
8111
+ if (j.VBR == de.vbr_mtrh || j.VBR == de.vbr_mt ? p() : M = P.L3psycho_anal_ns(
8108
8112
  j,
8109
8113
  x,
8110
8114
  C,
@@ -8115,16 +8119,16 @@ const a0 = s0;
8115
8119
  n[v],
8116
8120
  w[v],
8117
8121
  a
8118
- ), p != 0)
8122
+ ), M != 0)
8119
8123
  return -4;
8120
- for (j.mode == ze.JOINT_STEREO && M(), d = 0; d < f.channels_out; d++) {
8124
+ for (j.mode == ze.JOINT_STEREO && p(), d = 0; d < f.channels_out; d++) {
8121
8125
  var i = f.l3_side.tt[v][d];
8122
8126
  i.block_type = a[d], i.mixed_block_flag = 0;
8123
8127
  }
8124
8128
  }
8125
8129
  } else
8126
- M();
8127
- 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 && M(), f.mode_ext == c ? (F = A, H = n) : (F = l, H = I), j.analysis && f.pinfo != null && M(), j.VBR == de.vbr_off || j.VBR == de.vbr_abr) {
8130
+ p();
8131
+ 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) {
8128
8132
  var W, L;
8129
8133
  for (W = 0; W < 18; W++)
8130
8134
  f.nsPsy.pefirbuf[W] = f.nsPsy.pefirbuf[W + 1];
@@ -8137,7 +8141,7 @@ const a0 = s0;
8137
8141
  for (d = 0; d < f.channels_out; d++)
8138
8142
  H[v][d] *= L;
8139
8143
  }
8140
- 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 && M(), z(f), t;
8144
+ 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;
8141
8145
  };
8142
8146
  }
8143
8147
  function q() {
@@ -8165,7 +8169,7 @@ const a0 = s0;
8165
8169
  ne.MFSIZE = 3 * 1152 + s.ENCDELAY - s.MDCTDELAY, ne.MAX_HEADER_BUF = 256, ne.MAX_BITS_PER_CHANNEL = 4095, ne.MAX_BITS_PER_GRANULE = 7680, ne.BPC = 320;
8166
8170
  function ne() {
8167
8171
  var c = 40;
8168
- 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 te(), 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 = re(2), this.CurrentStep = re(2), this.masking_lower = 0, this.bv_scf = re(576), this.pseudohalf = re(m.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);
8172
+ 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 te(), 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 = re(2), this.CurrentStep = re(2), this.masking_lower = 0, this.bv_scf = re(576), this.pseudohalf = re(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);
8169
8173
  function N() {
8170
8174
  this.write_timing = 0, this.ptr = 0, this.buf = J(c);
8171
8175
  }
@@ -8204,8 +8208,8 @@ const a0 = s0;
8204
8208
  var H, d;
8205
8209
  H = 1 - 2 * B * B, d = 2 * B * t, k = z + l, fe = z + A - l;
8206
8210
  do {
8207
- var v, p, x, w, u, C, I, a, n, i;
8208
- p = d * g[k + A] - H * g[fe + A], v = H * g[k + A] + d * g[fe + A], u = g[k + 0] - v, w = g[k + 0] + v, C = g[fe + 0] - p, x = g[fe + 0] + p, p = d * g[k + y] - H * g[fe + y], v = H * g[k + y] + d * g[fe + y], n = g[k + F] - v, I = g[k + F] + v, i = g[fe + F] - p, a = g[fe + F] + p, p = B * I - t * i, v = t * I + B * i, g[k + F] = w - v, g[k + 0] = w + v, g[fe + y] = C - p, g[fe + A] = C + p, p = t * a - B * n, v = B * a + t * n, g[fe + F] = x - v, g[fe + 0] = x + v, g[k + y] = u - p, g[k + A] = u + p, fe += K, k += K;
8211
+ var v, M, x, w, u, C, I, a, n, i;
8212
+ M = d * g[k + A] - H * g[fe + A], v = H * g[k + A] + d * g[fe + A], u = g[k + 0] - v, w = g[k + 0] + v, C = g[fe + 0] - M, x = g[fe + 0] + M, M = d * g[k + y] - H * g[fe + y], v = H * g[k + y] + d * g[fe + y], n = g[k + F] - v, I = g[k + F] + v, i = g[fe + F] - M, a = g[fe + F] + M, M = B * I - t * i, v = t * I + B * i, g[k + F] = w - v, g[k + 0] = w + v, g[fe + y] = C - M, g[fe + A] = C + M, M = t * a - B * n, v = B * a + t * n, g[fe + F] = x - v, g[fe + 0] = x + v, g[k + y] = u - M, g[k + A] = u + M, fe += K, k += K;
8209
8213
  } while (k < E);
8210
8214
  H = t, t = H * P[j + 0] - B * P[j + 1], B = H * P[j + 1] + B * P[j + 0];
8211
8215
  }
@@ -8365,7 +8369,7 @@ const a0 = s0;
8365
8369
  N[z] = 0.5 * (1 - Math.cos(2 * Math.PI * (z + 0.5) / s.BLKSIZE_s));
8366
8370
  };
8367
8371
  }
8368
- function Me() {
8372
+ function pe() {
8369
8373
  var c = new ce(), N = 2.302585092994046, P = 2, T = 16, oe = 2, g = 16, z = 0.34, ae = 1 / (14752 * 14752) / (s.BLKSIZE / 2), j = 0.01, K = 0.8, k = 0.6, fe = 0.3, E = 3.5, B = 21, t = 0.2302585093;
8370
8374
  function l($, O) {
8371
8375
  for (var X = 0, Se = 0; Se < s.BLKSIZE / 2; ++Se)
@@ -8374,7 +8378,7 @@ const a0 = s0;
8374
8378
  }
8375
8379
  function A($, O, X, Se, Te, he, xe, Ae, Ne, We, Ie) {
8376
8380
  var lt = $.internal_flags;
8377
- Ne < 2 ? (c.fft_long(lt, Se[Te], Ne, We, Ie), c.fft_short(lt, he[xe], Ne, We, Ie)) : Ne == 2 && M(), O[0] = Se[Te + 0][0], O[0] *= O[0];
8381
+ Ne < 2 ? (c.fft_long(lt, Se[Te], Ne, We, Ie), c.fft_short(lt, he[xe], Ne, We, Ie)) : Ne == 2 && p(), O[0] = Se[Te + 0][0], O[0] *= O[0];
8378
8382
  for (var et = s.BLKSIZE / 2 - 1; et >= 0; --et) {
8379
8383
  var st = Se[Te + 0][s.BLKSIZE / 2 - et], dt = Se[Te + 0][s.BLKSIZE / 2 + et];
8380
8384
  O[s.BLKSIZE / 2 - et] = (st * st + dt * dt) * 0.5;
@@ -8391,7 +8395,7 @@ const a0 = s0;
8391
8395
  Qe += O[et];
8392
8396
  lt.tot_ener[Ne] = Qe;
8393
8397
  }
8394
- $.analysis && M(), $.athaa_loudapprox == 2 && Ne < 2 && (lt.loudness_sq[Ae][Ne] = lt.loudness_sq_save[Ne], lt.loudness_sq_save[Ne] = l(O, lt));
8398
+ $.analysis && p(), $.athaa_loudapprox == 2 && Ne < 2 && (lt.loudness_sq[Ae][Ne] = lt.loudness_sq_save[Ne], lt.loudness_sq_save[Ne] = l(O, lt));
8395
8399
  }
8396
8400
  var F = 8, y = 23, f = 15, w, u, I, n = [
8397
8401
  1,
@@ -8444,7 +8448,7 @@ const a0 = s0;
8444
8448
  1.22321 * 1.22321,
8445
8449
  1.14758 * 1.14758,
8446
8450
  1
8447
- ], p = [
8451
+ ], M = [
8448
8452
  2.35364 * 2.35364,
8449
8453
  2.29259 * 2.29259,
8450
8454
  2.23313 * 2.23313,
@@ -8482,9 +8486,9 @@ const a0 = s0;
8482
8486
  if (he != 0 ? O = Te.ATH.cb_s[X] * Te.ATH.adjust : O = Te.ATH.cb_l[X] * Te.ATH.adjust, $ < I * O) {
8483
8487
  if ($ > O) {
8484
8488
  var Ne, We;
8485
- return Ne = 1, Ae <= 13 && (Ne = p[Ae]), We = ge.FAST_LOG10_X($ / O, 10 / 15), $ * ((d[Ae] - Ne) * We + Ne);
8489
+ return Ne = 1, Ae <= 13 && (Ne = M[Ae]), We = ge.FAST_LOG10_X($ / O, 10 / 15), $ * ((d[Ae] - Ne) * We + Ne);
8486
8490
  }
8487
- return Ae > 13 ? $ : $ * p[Ae];
8491
+ return Ae > 13 ? $ : $ * M[Ae];
8488
8492
  }
8489
8493
  return $ * d[Ae];
8490
8494
  }
@@ -8607,7 +8611,7 @@ const a0 = s0;
8607
8611
  126.1
8608
8612
  /* 241.3 */
8609
8613
  ];
8610
- function pe($, O) {
8614
+ function Me($, O) {
8611
8615
  for (var X = 281.0575, Se = 0; Se < s.SBMAX_l - 1; Se++) {
8612
8616
  var Te = $.thm.l[Se];
8613
8617
  if (Te > 0) {
@@ -8675,28 +8679,28 @@ const a0 = s0;
8675
8679
  Xt += Ue[ut] * (Ut[Pt + Pe + ut] + Ut[Pt + Pe + B - ut]), qt += Ue[ut + 1] * (Ut[Pt + Pe + ut + 1] + Ut[Pt + Pe + B - ut - 1]);
8676
8680
  Yt[Ee][Pe] = Xt + qt;
8677
8681
  }
8678
- Te[Se][Ee].en.assign(Ie.en[Ee]), Te[Se][Ee].thm.assign(Ie.thm[Ee]), wt > 2 && M();
8682
+ Te[Se][Ee].en.assign(Ie.en[Ee]), Te[Se][Ee].thm.assign(Ie.thm[Ee]), wt > 2 && p();
8679
8683
  }
8680
8684
  for (Ee = 0; Ee < wt; Ee++) {
8681
8685
  var l0, u0, Dt = ie(12), Et = [0, 0, 0, 0], $t = ie(12), c0 = 1, d0, f0 = ie(s.CBANDS), h0 = ie(s.CBANDS), mt = [0, 0, 0, 0], v0 = ie(s.HBLKSIZE), _0 = Re([3, s.HBLKSIZE_s]);
8682
8686
  for (Pe = 0; Pe < 3; Pe++)
8683
8687
  Dt[Pe] = Ie.nsPsy.last_en_subshort[Ee][Pe + 6], $t[Pe] = Dt[Pe] / Ie.nsPsy.last_en_subshort[Ee][Pe + 4], Et[0] += Dt[Pe];
8684
- Ee == 2 && M();
8688
+ Ee == 2 && p();
8685
8689
  {
8686
8690
  var m0 = Yt[Ee & 1], Ht = 0;
8687
8691
  for (Pe = 0; Pe < 9; Pe++) {
8688
- for (var p0 = Ht + 64, yt = 1; Ht < p0; Ht++)
8692
+ for (var M0 = Ht + 64, yt = 1; Ht < M0; Ht++)
8689
8693
  yt < Math.abs(m0[Ht]) && (yt = Math.abs(m0[Ht]));
8690
8694
  Ie.nsPsy.last_en_subshort[Ee][Pe] = Dt[Pe + 3] = yt, Et[1 + Pe / 3] += yt, yt > Dt[Pe + 3 - 2] ? yt = yt / Dt[Pe + 3 - 2] : Dt[Pe + 3 - 2] > yt * 10 ? yt = Dt[Pe + 3 - 2] / (yt * 10) : yt = 0, $t[Pe + 3] = yt;
8691
8695
  }
8692
8696
  }
8693
- for ($.analysis && M(), d0 = Ee == 3 ? Ie.nsPsy.attackthre_s : Ie.nsPsy.attackthre, Pe = 0; Pe < 12; Pe++)
8697
+ for ($.analysis && p(), d0 = Ee == 3 ? Ie.nsPsy.attackthre_s : Ie.nsPsy.attackthre, Pe = 0; Pe < 12; Pe++)
8694
8698
  mt[Pe / 3] == 0 && $t[Pe] > d0 && (mt[Pe / 3] = Pe % 3 + 1);
8695
8699
  for (Pe = 1; Pe < 4; Pe++) {
8696
8700
  var Kt;
8697
8701
  Et[Pe - 1] > Et[Pe] ? Kt = Et[Pe - 1] / Et[Pe] : Kt = Et[Pe] / Et[Pe - 1], Kt < 1.7 && (mt[Pe] = 0, Pe == 1 && (mt[0] = 0));
8698
8702
  }
8699
- for (mt[0] != 0 && Ie.nsPsy.lastAttacks[Ee] != 0 && (mt[0] = 0), (Ie.nsPsy.lastAttacks[Ee] == 3 || mt[0] + mt[1] + mt[2] + mt[3] != 0) && (c0 = 0, mt[1] != 0 && mt[0] != 0 && (mt[1] = 0), mt[2] != 0 && mt[1] != 0 && (mt[2] = 0), mt[3] != 0 && mt[2] != 0 && (mt[3] = 0)), Ee < 2 ? nt[Ee] = c0 : M(), Ne[Ee] = Ie.tot_ener[Ee], u0 = et, l0 = lt, A(
8703
+ for (mt[0] != 0 && Ie.nsPsy.lastAttacks[Ee] != 0 && (mt[0] = 0), (Ie.nsPsy.lastAttacks[Ee] == 3 || mt[0] + mt[1] + mt[2] + mt[3] != 0) && (c0 = 0, mt[1] != 0 && mt[0] != 0 && (mt[1] = 0), mt[2] != 0 && mt[1] != 0 && (mt[2] = 0), mt[3] != 0 && mt[2] != 0 && (mt[3] = 0)), Ee < 2 ? nt[Ee] = c0 : p(), Ne[Ee] = Ie.tot_ener[Ee], u0 = et, l0 = lt, A(
8700
8704
  $,
8701
8705
  v0,
8702
8706
  _0,
@@ -8757,9 +8761,9 @@ const a0 = s0;
8757
8761
  st[Ge] = 0, tt[Ge] = 0;
8758
8762
  a(Ie, st, tt, Ee);
8759
8763
  }
8760
- for (($.mode == ze.STEREO || $.mode == ze.JOINT_STEREO) && M(), $.mode == ze.JOINT_STEREO && M(), W($, nt, We, Qe), Ee = 0; Ee < wt; Ee++) {
8764
+ for (($.mode == ze.STEREO || $.mode == ze.JOINT_STEREO) && p(), $.mode == ze.JOINT_STEREO && p(), W($, nt, We, Qe), Ee = 0; Ee < wt; Ee++) {
8761
8765
  var Vt, Wt = 0, b0, t0;
8762
- Ee > 1 ? M() : (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] = pe(t0, Ie.masking_lower), $.analysis && (Ie.pinfo.pe[Se][Ee] = Vt[Wt + Ee]);
8766
+ 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), $.analysis && (Ie.pinfo.pe[Se][Ee] = Vt[Wt + Ee]);
8763
8767
  }
8764
8768
  return 0;
8765
8769
  };
@@ -8811,7 +8815,7 @@ const a0 = s0;
8811
8815
  xe[We][Ae] = Ie * Te[We];
8812
8816
  }
8813
8817
  else
8814
- M();
8818
+ p();
8815
8819
  for (var We = 0; We < O; We++) {
8816
8820
  for (Ae = 0; Ae < O && !(xe[We][Ae] > 0); Ae++)
8817
8821
  ;
@@ -8997,9 +9001,9 @@ const a0 = s0;
8997
9001
  se.V9 = 410, se.V8 = 420, se.V7 = 430, se.V6 = 440, se.V5 = 450, se.V4 = 460, se.V3 = 470, se.V2 = 480, se.V1 = 490, se.V0 = 500, se.R3MIX = 1e3, se.STANDARD = 1001, se.EXTREME = 1002, se.INSANE = 1003, se.STANDARD_FAST = 1004, se.EXTREME_FAST = 1005, se.MEDIUM = 1006, se.MEDIUM_FAST = 1007;
8998
9002
  var P = 16384 + N;
8999
9003
  se.LAME_MAXMP3BUFFER = P;
9000
- var T, oe, g, z, ae, j = new Me(), K, k;
9001
- this.enc = new s(), this.setModules = function(a, i, W, L, Q, le, _e, pe, je) {
9002
- T = a, oe = i, g = W, z = L, ae = Q, K = le, k = pe, this.enc.setModules(oe, j, z, K);
9004
+ var T, oe, g, z, ae, j = new pe(), K, k;
9005
+ this.enc = new s(), this.setModules = function(a, i, W, L, Q, le, _e, Me, je) {
9006
+ T = a, oe = i, g = W, z = L, ae = Q, K = le, k = Me, this.enc.setModules(oe, j, z, K);
9003
9007
  };
9004
9008
  function fe() {
9005
9009
  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);
@@ -9016,7 +9020,7 @@ const a0 = s0;
9016
9020
  return a.class_id = t, i = a.internal_flags = new ne(), a.mode = ze.NOT_SET, a.original = 1, a.in_samplerate = 44100, a.num_channels = 2, a.num_samples = -1, a.bWriteVbrTag = !0, a.quality = -1, a.short_blocks = null, i.subblock_gain = -1, a.lowpassfreq = 0, a.highpassfreq = 0, a.lowpasswidth = -1, a.highpasswidth = -1, a.VBR = de.vbr_off, a.VBR_q = 4, a.ATHcurve = -1, a.VBR_mean_bitrate_kbps = 128, a.VBR_min_bitrate_kbps = 0, a.VBR_max_bitrate_kbps = 0, a.VBR_hard_min = 0, i.VBR_min_bitrate = 1, i.VBR_max_bitrate = 13, a.quant_comp = -1, a.quant_comp_short = -1, a.msfix = -1, i.resample_ratio = 1, i.OldValue[0] = 180, i.OldValue[1] = 180, i.CurrentStep[0] = 4, i.CurrentStep[1] = 4, i.masking_lower = 1, i.nsPsy.attackthre = -1, i.nsPsy.attackthre_s = -1, a.scale = -1, a.athaa_type = -1, a.ATHtype = -1, a.athaa_loudapprox = -1, a.athaa_sensitivity = 0, a.useTemporal = null, a.interChRatio = -1, i.mf_samples_to_encode = s.ENCDELAY + s.POSTDELAY, a.encoder_padding = 0, i.mf_size = s.ENCDELAY - s.MDCTDELAY, a.findReplayGain = !1, a.decode_on_the_fly = !1, i.decode_on_the_fly = !1, i.findReplayGain = !1, i.findPeakSample = !1, i.RadioGain = 0, i.AudiophileGain = 0, i.noclipGainChange = 0, i.noclipScale = -1, a.preset = 0, a.write_id3tag_automatic = !0, 0;
9017
9021
  }
9018
9022
  this.lame_init = function() {
9019
- var a = new pt();
9023
+ var a = new Mt();
9020
9024
  return l(a), a.lame_allocated_gfp = 1, a;
9021
9025
  };
9022
9026
  function A(a) {
@@ -9118,10 +9122,10 @@ const a0 = s0;
9118
9122
  }
9119
9123
  L == 999 ? i.lowpass1 = (W - 0.75) / 31 : i.lowpass1 = (L - 0.75) / 31, i.lowpass2 = W / 31;
9120
9124
  }
9121
- i.highpass2 > 0 && M(), i.highpass2 > 0 && M();
9125
+ i.highpass2 > 0 && p(), i.highpass2 > 0 && p();
9122
9126
  for (var Q = 0; Q < 32; Q++) {
9123
- var _e, pe, le = Q / 31;
9124
- i.highpass2 > i.highpass1 ? M() : _e = 1, i.lowpass2 > i.lowpass1 ? pe = A((le - i.lowpass1) / (i.lowpass2 - i.lowpass1 + 1e-20)) : pe = 1, i.amp_filter[Q] = _e * pe;
9127
+ var _e, Me, le = Q / 31;
9128
+ i.highpass2 > i.highpass1 ? p() : _e = 1, i.lowpass2 > i.lowpass1 ? Me = A((le - i.lowpass1) / (i.lowpass2 - i.lowpass1 + 1e-20)) : Me = 1, i.amp_filter[Q] = _e * Me;
9125
9129
  }
9126
9130
  }
9127
9131
  function I(a) {
@@ -9165,7 +9169,7 @@ const a0 = s0;
9165
9169
  }
9166
9170
  this.lame_init_params = function(a) {
9167
9171
  var i = a.internal_flags;
9168
- if (i.Class_ID = 0, i.ATH == null && (i.ATH = new _t()), i.PSY == null && (i.PSY = new fe()), i.rgdata == null && (i.rgdata = new De()), i.channels_in = a.num_channels, i.channels_in == 1 && (a.mode = ze.MONO), i.channels_out = a.mode == ze.MONO ? 1 : 2, i.mode_ext = s.MPG_MD_MS_LR, a.mode == ze.MONO && (a.force_ms = !1), a.VBR == de.vbr_off && a.VBR_mean_bitrate_kbps != 128 && a.brate == 0 && (a.brate = a.VBR_mean_bitrate_kbps), a.VBR == de.vbr_off || a.VBR == de.vbr_mtrh || a.VBR == de.vbr_mt || (a.free_format = !1), a.VBR == de.vbr_off && a.brate == 0 && M(), a.VBR == de.vbr_off && a.compression_ratio > 0 && M(), a.out_samplerate != 0 && (a.out_samplerate < 16e3 ? (a.VBR_mean_bitrate_kbps = Math.max(
9172
+ if (i.Class_ID = 0, i.ATH == null && (i.ATH = new _t()), i.PSY == null && (i.PSY = new fe()), i.rgdata == null && (i.rgdata = new De()), i.channels_in = a.num_channels, i.channels_in == 1 && (a.mode = ze.MONO), i.channels_out = a.mode == ze.MONO ? 1 : 2, i.mode_ext = s.MPG_MD_MS_LR, a.mode == ze.MONO && (a.force_ms = !1), a.VBR == de.vbr_off && a.VBR_mean_bitrate_kbps != 128 && a.brate == 0 && (a.brate = a.VBR_mean_bitrate_kbps), a.VBR == de.vbr_off || a.VBR == de.vbr_mtrh || a.VBR == de.vbr_mt || (a.free_format = !1), a.VBR == de.vbr_off && a.brate == 0 && p(), a.VBR == de.vbr_off && a.compression_ratio > 0 && p(), a.out_samplerate != 0 && (a.out_samplerate < 16e3 ? (a.VBR_mean_bitrate_kbps = Math.max(
9169
9173
  a.VBR_mean_bitrate_kbps,
9170
9174
  8
9171
9175
  ), a.VBR_mean_bitrate_kbps = Math.min(
@@ -9197,13 +9201,13 @@ const a0 = s0;
9197
9201
  break;
9198
9202
  }
9199
9203
  case de.vbr_rh:
9200
- M();
9204
+ p();
9201
9205
  default:
9202
- M();
9206
+ p();
9203
9207
  }
9204
9208
  a.mode == ze.MONO && (a.VBR == de.vbr_off || a.VBR == de.vbr_abr) && (W *= 1.5), a.lowpassfreq = W | 0;
9205
9209
  }
9206
- switch (a.out_samplerate == 0 && M(), 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 && M(), 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 && M(), i.decode_on_the_fly && !a.decode_only && M(), 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) {
9210
+ 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) {
9207
9211
  case de.vbr_mt:
9208
9212
  case de.vbr_rh:
9209
9213
  case de.vbr_mtrh:
@@ -9230,7 +9234,7 @@ const a0 = s0;
9230
9234
  a.compression_ratio = a.out_samplerate * 16 * i.channels_out / (1e3 * a.brate);
9231
9235
  break;
9232
9236
  }
9233
- a.mode == ze.NOT_SET && (a.mode = ze.JOINT_STEREO), a.highpassfreq > 0 ? M() : (i.highpass1 = 0, i.highpass2 = 0), a.lowpassfreq > 0 ? (i.lowpass2 = 2 * a.lowpassfreq, a.lowpasswidth >= 0 ? M() : i.lowpass1 = (1 - 0) * 2 * a.lowpassfreq, i.lowpass1 /= a.out_samplerate, i.lowpass2 /= a.out_samplerate) : M(), u(a), i.samplerate_index = F(a.out_samplerate, a), i.samplerate_index < 0 && M(), a.VBR == de.vbr_off ? a.free_format ? i.bitrate_index = 0 : (a.brate = y(
9237
+ a.mode == ze.NOT_SET && (a.mode = ze.JOINT_STEREO), a.highpassfreq > 0 ? p() : (i.highpass1 = 0, i.highpass2 = 0), a.lowpassfreq > 0 ? (i.lowpass2 = 2 * a.lowpassfreq, a.lowpasswidth >= 0 ? p() : i.lowpass1 = (1 - 0) * 2 * a.lowpassfreq, i.lowpass1 /= a.out_samplerate, i.lowpass2 /= a.out_samplerate) : p(), u(a), i.samplerate_index = F(a.out_samplerate, a), i.samplerate_index < 0 && p(), a.VBR == de.vbr_off ? a.free_format ? i.bitrate_index = 0 : (a.brate = y(
9234
9238
  a.brate,
9235
9239
  a.version,
9236
9240
  a.out_samplerate
@@ -9238,18 +9242,18 @@ const a0 = s0;
9238
9242
  a.brate,
9239
9243
  a.version,
9240
9244
  a.out_samplerate
9241
- ), i.bitrate_index <= 0 && M()) : i.bitrate_index = 1, a.analysis && (a.bWriteVbrTag = !1), i.pinfo != null && (a.bWriteVbrTag = !1), oe.init_bit_stream_w(i);
9245
+ ), i.bitrate_index <= 0 && p()) : i.bitrate_index = 1, a.analysis && (a.bWriteVbrTag = !1), i.pinfo != null && (a.bWriteVbrTag = !1), oe.init_bit_stream_w(i);
9242
9246
  for (var le = i.samplerate_index + 3 * a.version + 6 * (a.out_samplerate < 16e3 ? 1 : 0), _e = 0; _e < s.SBMAX_l + 1; _e++)
9243
9247
  i.scalefac_band.l[_e] = z.sfBandIndex[le].l[_e];
9244
9248
  for (var _e = 0; _e < s.PSFB21 + 1; _e++) {
9245
- var pe = (i.scalefac_band.l[22] - i.scalefac_band.l[21]) / s.PSFB21, je = i.scalefac_band.l[21] + _e * pe;
9249
+ var Me = (i.scalefac_band.l[22] - i.scalefac_band.l[21]) / s.PSFB21, je = i.scalefac_band.l[21] + _e * Me;
9246
9250
  i.scalefac_band.psfb21[_e] = je;
9247
9251
  }
9248
9252
  i.scalefac_band.psfb21[s.PSFB21] = 576;
9249
9253
  for (var _e = 0; _e < s.SBMAX_s + 1; _e++)
9250
9254
  i.scalefac_band.s[_e] = z.sfBandIndex[le].s[_e];
9251
9255
  for (var _e = 0; _e < s.PSFB12 + 1; _e++) {
9252
- var pe = (i.scalefac_band.s[13] - i.scalefac_band.s[12]) / s.PSFB12, je = i.scalefac_band.s[12] + _e * pe;
9256
+ var Me = (i.scalefac_band.s[13] - i.scalefac_band.s[12]) / s.PSFB12, je = i.scalefac_band.s[12] + _e * Me;
9253
9257
  i.scalefac_band.psfb12[_e] = je;
9254
9258
  }
9255
9259
  i.scalefac_band.psfb12[s.PSFB12] = 192, a.version == 1 ? i.sideinfo_len = i.channels_out == 1 ? 4 + 17 : 4 + 32 : i.sideinfo_len = i.channels_out == 1 ? 4 + 9 : 4 + 17, a.error_protection && (i.sideinfo_len += 2), n(a), i.Class_ID = t;
@@ -9272,22 +9276,22 @@ const a0 = s0;
9272
9276
  }
9273
9277
  default: {
9274
9278
  var Ue;
9275
- i.sfb21_extra = !1, a.quality < 0 && (a.quality = LAME_DEFAULT_QUALITY), Ue = a.VBR, Ue == de.vbr_off && (a.VBR_mean_bitrate_kbps = a.brate), g.apply_preset(a, a.VBR_mean_bitrate_kbps, 0), a.VBR = Ue, i.PSY.mask_adjust = a.maskingadjust, i.PSY.mask_adjust_short = a.maskingadjust_short, Ue == de.vbr_off ? i.iteration_loop = new ft(ae) : M();
9279
+ i.sfb21_extra = !1, a.quality < 0 && (a.quality = LAME_DEFAULT_QUALITY), Ue = a.VBR, Ue == de.vbr_off && (a.VBR_mean_bitrate_kbps = a.brate), g.apply_preset(a, a.VBR_mean_bitrate_kbps, 0), a.VBR = Ue, i.PSY.mask_adjust = a.maskingadjust, i.PSY.mask_adjust_short = a.maskingadjust_short, Ue == de.vbr_off ? i.iteration_loop = new ft(ae) : p();
9276
9280
  break;
9277
9281
  }
9278
9282
  }
9279
- return a.VBR != de.vbr_off && M(), a.tune && M(), I(a), a.athaa_type < 0 ? i.ATH.useAdjust = 3 : i.ATH.useAdjust = a.athaa_type, i.ATH.aaSensitivityP = Math.pow(10, a.athaa_sensitivity / -10), a.short_blocks == null && (a.short_blocks = Ce.short_block_allowed), a.short_blocks == Ce.short_block_allowed && (a.mode == ze.JOINT_STEREO || a.mode == ze.STEREO) && (a.short_blocks = Ce.short_block_coupled), a.quant_comp < 0 && (a.quant_comp = 1), a.quant_comp_short < 0 && (a.quant_comp_short = 0), a.msfix < 0 && (a.msfix = 0), a.exp_nspsytune = a.exp_nspsytune | 1, a.internal_flags.nsPsy.attackthre < 0 && (a.internal_flags.nsPsy.attackthre = Me.NSATTACKTHRE), a.internal_flags.nsPsy.attackthre_s < 0 && (a.internal_flags.nsPsy.attackthre_s = Me.NSATTACKTHRE_S), a.scale < 0 && (a.scale = 1), a.ATHtype < 0 && (a.ATHtype = 4), a.ATHcurve < 0 && (a.ATHcurve = 4), a.athaa_loudapprox < 0 && (a.athaa_loudapprox = 2), a.interChRatio < 0 && (a.interChRatio = 0), a.useTemporal == null && (a.useTemporal = !0), i.slot_lag = i.frac_SpF = 0, a.VBR == de.vbr_off && (i.slot_lag = i.frac_SpF = (a.version + 1) * 72e3 * a.brate % a.out_samplerate | 0), z.iteration_init(a), j.psymodel_init(a), 0;
9283
+ return a.VBR != de.vbr_off && p(), a.tune && p(), I(a), a.athaa_type < 0 ? i.ATH.useAdjust = 3 : i.ATH.useAdjust = a.athaa_type, i.ATH.aaSensitivityP = Math.pow(10, a.athaa_sensitivity / -10), a.short_blocks == null && (a.short_blocks = Ce.short_block_allowed), a.short_blocks == Ce.short_block_allowed && (a.mode == ze.JOINT_STEREO || a.mode == ze.STEREO) && (a.short_blocks = Ce.short_block_coupled), a.quant_comp < 0 && (a.quant_comp = 1), a.quant_comp_short < 0 && (a.quant_comp_short = 0), a.msfix < 0 && (a.msfix = 0), a.exp_nspsytune = a.exp_nspsytune | 1, a.internal_flags.nsPsy.attackthre < 0 && (a.internal_flags.nsPsy.attackthre = pe.NSATTACKTHRE), a.internal_flags.nsPsy.attackthre_s < 0 && (a.internal_flags.nsPsy.attackthre_s = pe.NSATTACKTHRE_S), a.scale < 0 && (a.scale = 1), a.ATHtype < 0 && (a.ATHtype = 4), a.ATHcurve < 0 && (a.ATHcurve = 4), a.athaa_loudapprox < 0 && (a.athaa_loudapprox = 2), a.interChRatio < 0 && (a.interChRatio = 0), a.useTemporal == null && (a.useTemporal = !0), i.slot_lag = i.frac_SpF = 0, a.VBR == de.vbr_off && (i.slot_lag = i.frac_SpF = (a.version + 1) * 72e3 * a.brate % a.out_samplerate | 0), z.iteration_init(a), j.psymodel_init(a), 0;
9280
9284
  };
9281
9285
  function H(a, i) {
9282
9286
  (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);
9283
9287
  }
9284
9288
  this.lame_encode_flush = function(a, i, W, L) {
9285
- var Q = a.internal_flags, le = Oe([2, 1152]), _e = 0, pe, je, He, Ue, ht = Q.mf_samples_to_encode - s.POSTDELAY, vt = d(a);
9289
+ 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);
9286
9290
  if (Q.mf_samples_to_encode < 1)
9287
9291
  return 0;
9288
- for (pe = 0, a.in_samplerate != a.out_samplerate && M(), He = a.framesize - ht % a.framesize, He < 576 && (He += a.framesize), a.encoder_padding = He, Ue = (ht + He) / a.framesize; Ue > 0 && _e >= 0; ) {
9292
+ for (Me = 0, a.in_samplerate != a.out_samplerate && p(), He = a.framesize - ht % a.framesize, He < 576 && (He += a.framesize), a.encoder_padding = He, Ue = (ht + He) / a.framesize; Ue > 0 && _e >= 0; ) {
9289
9293
  var ot = vt - Q.mf_size, ct = a.frameNum;
9290
- ot *= a.in_samplerate, ot /= a.out_samplerate, ot > 1152 && (ot = 1152), ot < 1 && (ot = 1), je = L - pe, L == 0 && (je = 0), _e = this.lame_encode_buffer(
9294
+ ot *= a.in_samplerate, ot /= a.out_samplerate, ot > 1152 && (ot = 1152), ot < 1 && (ot = 1), je = L - Me, L == 0 && (je = 0), _e = this.lame_encode_buffer(
9291
9295
  a,
9292
9296
  le[0],
9293
9297
  le[1],
@@ -9295,24 +9299,24 @@ const a0 = s0;
9295
9299
  i,
9296
9300
  W,
9297
9301
  je
9298
- ), W += _e, pe += _e, Ue -= ct != a.frameNum ? 1 : 0;
9302
+ ), W += _e, Me += _e, Ue -= ct != a.frameNum ? 1 : 0;
9299
9303
  }
9300
- return Q.mf_samples_to_encode = 0, _e < 0 || (je = L - pe, L == 0 && (je = 0), oe.flush_bitstream(a), _e = oe.copy_buffer(
9304
+ return Q.mf_samples_to_encode = 0, _e < 0 || (je = L - Me, L == 0 && (je = 0), oe.flush_bitstream(a), _e = oe.copy_buffer(
9301
9305
  Q,
9302
9306
  i,
9303
9307
  W,
9304
9308
  je,
9305
9309
  1
9306
- ), _e < 0) ? _e : (W += _e, pe += _e, je = L - pe, L == 0 && (je = 0), a.write_id3tag_automatic && M(), pe);
9310
+ ), _e < 0) ? _e : (W += _e, Me += _e, je = L - Me, L == 0 && (je = 0), a.write_id3tag_automatic && p(), Me);
9307
9311
  }, this.lame_encode_buffer = function(a, i, W, L, Q, le, _e) {
9308
- var pe = a.internal_flags, je = [null, null];
9309
- if (pe.Class_ID != t)
9312
+ var Me = a.internal_flags, je = [null, null];
9313
+ if (Me.Class_ID != t)
9310
9314
  return -3;
9311
9315
  if (L == 0)
9312
9316
  return 0;
9313
- H(pe, L), je[0] = pe.in_buffer_0, je[1] = pe.in_buffer_1;
9317
+ H(Me, L), je[0] = Me.in_buffer_0, je[1] = Me.in_buffer_1;
9314
9318
  for (var He = 0; He < L; He++)
9315
- je[0][He] = i[He], pe.channels_in > 1 && (je[1][He] = W[He]);
9319
+ je[0][He] = i[He], Me.channels_in > 1 && (je[1][He] = W[He]);
9316
9320
  return v(
9317
9321
  a,
9318
9322
  je[0],
@@ -9328,23 +9332,23 @@ const a0 = s0;
9328
9332
  return i = Math.max(i, 512 + a.framesize - 32), i;
9329
9333
  }
9330
9334
  function v(a, i, W, L, Q, le, _e) {
9331
- var pe = a.internal_flags, je = 0, He, Ue, ht, vt, ot, ct = [null, null], gt = [null, null];
9332
- if (pe.Class_ID != t)
9335
+ var Me = a.internal_flags, je = 0, He, Ue, ht, vt, ot, ct = [null, null], gt = [null, null];
9336
+ if (Me.Class_ID != t)
9333
9337
  return -3;
9334
9338
  if (L == 0)
9335
9339
  return 0;
9336
- if (ot = oe.copy_buffer(pe, Q, le, _e, 0), ot < 0)
9340
+ if (ot = oe.copy_buffer(Me, Q, le, _e, 0), ot < 0)
9337
9341
  return ot;
9338
9342
  if (le += ot, je += ot, gt[0] = i, gt[1] = W, Xe.NEQ(a.scale, 0) && Xe.NEQ(a.scale, 1))
9339
9343
  for (Ue = 0; Ue < L; ++Ue)
9340
- gt[0][Ue] *= a.scale, pe.channels_out == 2 && (gt[1][Ue] *= a.scale);
9344
+ gt[0][Ue] *= a.scale, Me.channels_out == 2 && (gt[1][Ue] *= a.scale);
9341
9345
  if (Xe.NEQ(a.scale_left, 0) && Xe.NEQ(a.scale_left, 1))
9342
9346
  for (Ue = 0; Ue < L; ++Ue)
9343
9347
  gt[0][Ue] *= a.scale_left;
9344
9348
  if (Xe.NEQ(a.scale_right, 0) && Xe.NEQ(a.scale_right, 1))
9345
9349
  for (Ue = 0; Ue < L; ++Ue)
9346
9350
  gt[1][Ue] *= a.scale_right;
9347
- a.num_channels == 2 && pe.channels_out == 1 && M(), vt = d(a), ct[0] = pe.mfbuf[0], ct[1] = pe.mfbuf[1];
9351
+ a.num_channels == 2 && Me.channels_out == 1 && p(), vt = d(a), ct[0] = Me.mfbuf[0], ct[1] = Me.mfbuf[1];
9348
9352
  for (var It = 0; L > 0; ) {
9349
9353
  var $ = [null, null], O = 0, X = 0;
9350
9354
  $[0] = gt[0], $[1] = gt[1];
@@ -9356,19 +9360,19 @@ const a0 = s0;
9356
9360
  It,
9357
9361
  L,
9358
9362
  Se
9359
- ), O = Se.n_in, X = Se.n_out, pe.findReplayGain && !pe.decode_on_the_fly && T.AnalyzeSamples(
9360
- pe.rgdata,
9363
+ ), O = Se.n_in, X = Se.n_out, Me.findReplayGain && !Me.decode_on_the_fly && T.AnalyzeSamples(
9364
+ Me.rgdata,
9361
9365
  ct[0],
9362
- pe.mf_size,
9366
+ Me.mf_size,
9363
9367
  ct[1],
9364
- pe.mf_size,
9368
+ Me.mf_size,
9365
9369
  X,
9366
- pe.channels_out
9370
+ Me.channels_out
9367
9371
  ) == Ke.GAIN_ANALYSIS_ERROR)
9368
9372
  return -6;
9369
- if (L -= O, It += O, pe.channels_out == 2, pe.mf_size += X, pe.mf_samples_to_encode < 1 && M(), pe.mf_samples_to_encode += X, pe.mf_size >= vt) {
9373
+ if (L -= O, It += O, Me.channels_out == 2, Me.mf_size += X, Me.mf_samples_to_encode < 1 && p(), Me.mf_samples_to_encode += X, Me.mf_size >= vt) {
9370
9374
  var Te = _e - je;
9371
- if (_e == 0 && (Te = 0), He = p(
9375
+ if (_e == 0 && (Te = 0), He = M(
9372
9376
  a,
9373
9377
  ct[0],
9374
9378
  ct[1],
@@ -9377,14 +9381,14 @@ const a0 = s0;
9377
9381
  Te
9378
9382
  ), He < 0)
9379
9383
  return He;
9380
- for (le += He, je += He, pe.mf_size -= a.framesize, pe.mf_samples_to_encode -= a.framesize, ht = 0; ht < pe.channels_out; ht++)
9381
- for (Ue = 0; Ue < pe.mf_size; Ue++)
9384
+ for (le += He, je += He, Me.mf_size -= a.framesize, Me.mf_samples_to_encode -= a.framesize, ht = 0; ht < Me.channels_out; ht++)
9385
+ for (Ue = 0; Ue < Me.mf_size; Ue++)
9382
9386
  ct[ht][Ue] = ct[ht][Ue + a.framesize];
9383
9387
  }
9384
9388
  }
9385
9389
  return je;
9386
9390
  }
9387
- function p(a, i, W, L, Q, le) {
9391
+ function M(a, i, W, L, Q, le) {
9388
9392
  var _e = c.enc.lame_encode_mp3_frame(
9389
9393
  a,
9390
9394
  i,
@@ -9401,11 +9405,11 @@ const a0 = s0;
9401
9405
  function C(a, i, W, L, Q, le) {
9402
9406
  var _e = a.internal_flags;
9403
9407
  if (_e.resample_ratio < 0.9999 || _e.resample_ratio > 1.0001)
9404
- M();
9408
+ p();
9405
9409
  else {
9406
9410
  le.n_out = Math.min(a.framesize, Q), le.n_in = le.n_out;
9407
- for (var pe = 0; pe < le.n_out; ++pe)
9408
- i[0][_e.mf_size + pe] = W[0][L + pe], _e.channels_out == 2 && (i[1][_e.mf_size + pe] = W[1][L + pe]);
9411
+ for (var Me = 0; Me < le.n_out; ++Me)
9412
+ i[0][_e.mf_size + Me] = W[0][L + Me], _e.channels_out == 2 && (i[1][_e.mf_size + Me] = W[1][L + Me]);
9409
9413
  }
9410
9414
  }
9411
9415
  }
@@ -9424,7 +9428,7 @@ const a0 = s0;
9424
9428
  };
9425
9429
  }
9426
9430
  function ee(c, N, P) {
9427
- c != 1 && M("fix cc: only supports mono");
9431
+ c != 1 && p("fix cc: only supports mono");
9428
9432
  var T = new se(), oe = new G(), g = new Ke(), z = new Xe(), ae = new at(), j = new e(), K = new S(), k = new Fe(), fe = new Be(), E = new U(), B = new Je(), t = new $e(), l = new ve(), A = new we();
9429
9433
  T.setModules(g, z, ae, j, K, k, fe, E, A), z.setModules(g, A, fe, k), E.setModules(z, fe), ae.setModules(T), K.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, ae);
9430
9434
  var F = T.lame_init();
@@ -9439,14 +9443,14 @@ const a0 = s0;
9439
9443
  return new Int8Array(w.subarray(0, u));
9440
9444
  };
9441
9445
  }
9442
- m.SFBMAX = s.SBMAX_s * 3, r.Mp3Encoder = ee;
9446
+ b.SFBMAX = s.SBMAX_s * 3, r.Mp3Encoder = ee;
9443
9447
  }
9444
9448
  r(), _.lamejs = r;
9445
9449
  });
9446
9450
  (function(_) {
9447
- var r = typeof window == "object" && !!window.document, b = r ? window : Object, M = b.Recorder, J = M.i18n;
9448
- _(M, J, J.$T, r);
9449
- })(function(_, r, b, M) {
9451
+ var r = typeof window == "object" && !!window.document, m = r ? window : Object, p = m.Recorder, J = p.i18n;
9452
+ _(p, J, J.$T, r);
9453
+ })(function(_, r, m, p) {
9450
9454
  var J = function(ie) {
9451
9455
  return new re(ie);
9452
9456
  }, Z = "WaveView", re = function(ie) {
@@ -9482,8 +9486,8 @@ const a0 = s0;
9482
9486
  if (ie[Oe])
9483
9487
  var Ve = ye.canvas = ie[Oe];
9484
9488
  else {
9485
- if (!M)
9486
- throw new Error(b.G("NonBrowser-1", [Z]));
9489
+ if (!p)
9490
+ throw new Error(m.G("NonBrowser-1", [Z]));
9487
9491
  var Ze = ie.elem;
9488
9492
  Ze && (typeof Ze == "string" ? Ze = document.querySelector(Ze) : Ze.length && (Ze = Ze[0])), Ze && (ie.width = Ze.offsetWidth, ie.height = Ze.offsetHeight);
9489
9493
  var ue = ye.elem = document.createElement("div");
@@ -9493,7 +9497,7 @@ const a0 = s0;
9493
9497
  }
9494
9498
  var ge = ie.scale, Ce = ie.width * ge, Ye = ie.height * ge;
9495
9499
  if (!Ce || !Ye)
9496
- throw new Error(b.G("IllegalArgs-1", [Z + " width=0 height=0"]));
9500
+ throw new Error(m.G("IllegalArgs-1", [Z + " width=0 height=0"]));
9497
9501
  Ve.width = Ce, Ve.height = Ye;
9498
9502
  var de = ye.ctx = Ve.getContext("2d");
9499
9503
  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;
@@ -9562,11 +9566,11 @@ const ta = {
9562
9566
  sampleRate: 16e3,
9563
9567
  bitRate: 16,
9564
9568
  //mp3格式,指定采样率hz、比特率kbps,其他参数使用默认配置;注意:是数字的参数必须提供数字,不要用字符串;需要使用的type类型,需提前把格式支持文件加载进来,比如使用wav格式需要提前加载wav.js编码引擎
9565
- onProcess: (_, r, b, M) => {
9566
- this.duration = this.formatMilliseconds(b), this.wave && this.wave.input(
9569
+ onProcess: (_, r, m, p) => {
9570
+ this.duration = this.formatMilliseconds(m), this.wave && this.wave.input(
9567
9571
  _[_.length - 1],
9568
9572
  r,
9569
- M
9573
+ p
9570
9574
  );
9571
9575
  }
9572
9576
  }), this.rec.open(
@@ -9598,7 +9602,7 @@ const ta = {
9598
9602
  },
9599
9603
  methods: {
9600
9604
  formatMilliseconds(_) {
9601
- const r = Math.floor(_ / 1e3), b = Math.floor(r / 60), M = r % 60, J = b.toString().padStart(2, "0"), Z = M.toString().padStart(2, "0");
9605
+ const r = Math.floor(_ / 1e3), m = Math.floor(r / 60), p = r % 60, J = m.toString().padStart(2, "0"), Z = p.toString().padStart(2, "0");
9602
9606
  return `${J}:${Z}`;
9603
9607
  },
9604
9608
  start() {
@@ -9615,11 +9619,11 @@ const ta = {
9615
9619
  );
9616
9620
  },
9617
9621
  handleFinish() {
9618
- const [, _] = this.blob.type.split("/"), r = new Date().getTime(), b = `${r}.${_}`, M = new File([this.blob], b, {
9622
+ const [, _] = this.blob.type.split("/"), r = new Date().getTime(), m = `${r}.${_}`, p = new File([this.blob], m, {
9619
9623
  type: this.blob.type,
9620
9624
  lastModified: r
9621
9625
  });
9622
- this.$emit("finish", [M]), this.$emit("cancel");
9626
+ this.$emit("finish", [p]), this.$emit("cancel");
9623
9627
  },
9624
9628
  handleCancel() {
9625
9629
  this.$emit("cancel");
@@ -9627,14 +9631,14 @@ const ta = {
9627
9631
  }
9628
9632
  };
9629
9633
  var aa = function() {
9630
- var r = this, b = r._self._c;
9631
- return b("div", { staticClass: "wrap", style: {
9634
+ var r = this, m = r._self._c;
9635
+ return m("div", { staticClass: "wrap", style: {
9632
9636
  width: r.width
9633
- } }, [r.isMobile ? b("div", { staticClass: "record-audio-mobile" }, [r.pending ? b("a", { staticClass: "oper", attrs: { title: "停止录制" }, on: { click: r.stop } }, [b("inline-svg", { attrs: { src: r.icon.stop, width: 24, height: 24 } })], 1) : b("a", { staticClass: "oper", attrs: { title: "开始录制" }, on: { click: r.start } }, [b("inline-svg", { attrs: { src: r.icon.record, width: 24, height: 24 } })], 1), b("div", { staticClass: "recwave" })]) : b("div", { staticClass: "record-audio" }, [b("div", { staticClass: "main" }, [b("div", { staticClass: "recwave" }), b("div", { staticClass: "duration" }, [r._v(r._s(r.duration))])]), r.url && !r.isMobile ? b("audio", { ref: "audio", staticClass: "audio-item", attrs: { src: r.url, controls: "" } }) : r._e(), b("div", { staticClass: "buttons" }, [r.pending ? b("a", { staticClass: "oper", attrs: { title: "停止录制" }, on: { click: r.stop } }, [b("inline-svg", { attrs: { src: r.icon.stop, width: 24, height: 24 } })], 1) : b("a", { staticClass: "oper", attrs: { title: "开始录制" }, on: { click: r.start } }, [b("inline-svg", { attrs: { src: r.icon.record, width: 24, height: 24 } })], 1), b("a", { class: {
9637
+ } }, [r.isMobile ? m("div", { staticClass: "record-audio-mobile" }, [r.pending ? m("a", { staticClass: "oper", attrs: { title: "停止录制" }, on: { click: r.stop } }, [m("inline-svg", { attrs: { src: r.icon.stop, width: 24, height: 24 } })], 1) : m("a", { staticClass: "oper", attrs: { title: "开始录制" }, on: { click: r.start } }, [m("inline-svg", { attrs: { src: r.icon.record, width: 24, height: 24 } })], 1), m("div", { staticClass: "recwave" })]) : m("div", { staticClass: "record-audio" }, [m("div", { staticClass: "main" }, [m("div", { staticClass: "recwave" }), m("div", { staticClass: "duration" }, [r._v(r._s(r.duration))])]), r.url && !r.isMobile ? m("audio", { ref: "audio", staticClass: "audio-item", attrs: { src: r.url, controls: "" } }) : r._e(), m("div", { staticClass: "buttons" }, [r.pending ? m("a", { staticClass: "oper", attrs: { title: "停止录制" }, on: { click: r.stop } }, [m("inline-svg", { attrs: { src: r.icon.stop, width: 24, height: 24 } })], 1) : m("a", { staticClass: "oper", attrs: { title: "开始录制" }, on: { click: r.start } }, [m("inline-svg", { attrs: { src: r.icon.record, width: 24, height: 24 } })], 1), m("a", { class: {
9634
9638
  btn: !0,
9635
9639
  finish: !0,
9636
9640
  disabled: !r.blob
9637
- }, on: { click: r.handleFinish } }, [r._v(" 完成 ")]), b("a", { staticClass: "cancel btn", on: { click: r.handleCancel } }, [r._v("取消")])])]), b("div", { staticClass: "mask", on: { click: r.handleCancel } })]);
9641
+ }, on: { click: r.handleFinish } }, [r._v(" 完成 ")]), m("a", { staticClass: "cancel btn", on: { click: r.handleCancel } }, [r._v("取消")])])]), m("div", { staticClass: "mask", on: { click: r.handleCancel } })]);
9638
9642
  }, ra = [], ia = /* @__PURE__ */ zt(
9639
9643
  ta,
9640
9644
  aa,
@@ -9678,18 +9682,18 @@ var o0 = {}, sa = {
9678
9682
  throw "First parameter is required.";
9679
9683
  e = e || {
9680
9684
  type: "video"
9681
- }, e = new b(R, e);
9685
+ }, e = new m(R, e);
9682
9686
  var o = this;
9683
9687
  function h(G) {
9684
- return e.disableLogs || console.log("RecordRTC version: ", o.version), G && (e = new b(R, G)), e.disableLogs || console.log("started recording " + e.type + " stream."), ce ? (ce.clearRecordedData(), ce.record(), me("recording"), o.recordingDuration && te(), o) : (m(function() {
9688
+ 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 && te(), o) : (b(function() {
9685
9689
  o.recordingDuration && te();
9686
9690
  }), o);
9687
9691
  }
9688
- function m(G) {
9692
+ function b(G) {
9689
9693
  G && (e.initCallback = function() {
9690
9694
  G(), G = e.initCallback = null;
9691
9695
  });
9692
- var ve = new M(R, e);
9696
+ var ve = new p(R, e);
9693
9697
  ce = new ve(R, e), ce.record(), me("recording"), e.disableLogs || console.log("Initialized recorderType:", ce.constructor.name, "for output-type:", e.type);
9694
9698
  }
9695
9699
  function S(G) {
@@ -9816,7 +9820,7 @@ var o0 = {}, sa = {
9816
9820
  function ne() {
9817
9821
  e.disableLogs !== !0 && console.warn(be);
9818
9822
  }
9819
- var ce, Me = {
9823
+ var ce, pe = {
9820
9824
  /**
9821
9825
  * This method starts the recording.
9822
9826
  * @method
@@ -9873,7 +9877,7 @@ var o0 = {}, sa = {
9873
9877
  * @example
9874
9878
  * recorder.initRecorder();
9875
9879
  */
9876
- initRecorder: m,
9880
+ initRecorder: b,
9877
9881
  /**
9878
9882
  * Ask RecordRTC to auto-stop the recording after 5 minutes.
9879
9883
  * @method
@@ -10173,7 +10177,7 @@ var o0 = {}, sa = {
10173
10177
  var G = e.disableLogs;
10174
10178
  e = {
10175
10179
  disableLogs: !0
10176
- }, o.reset(), me("destroyed"), Me = o = null, at.AudioContextConstructor && (at.AudioContextConstructor.close(), at.AudioContextConstructor = null), e.disableLogs = G, e.disableLogs || console.log("RecordRTC is destroyed.");
10180
+ }, 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.");
10177
10181
  },
10178
10182
  /**
10179
10183
  * RecordRTC version number
@@ -10187,10 +10191,10 @@ var o0 = {}, sa = {
10187
10191
  version: "5.6.2"
10188
10192
  };
10189
10193
  if (!this)
10190
- return o = Me, Me;
10191
- for (var se in Me)
10192
- this[se] = Me[se];
10193
- return o = this, Me;
10194
+ return o = pe, pe;
10195
+ for (var se in pe)
10196
+ this[se] = pe[se];
10197
+ return o = this, pe;
10194
10198
  }
10195
10199
  r.version = "5.6.2", _.exports = r, r.getFromDisk = function(R, e) {
10196
10200
  if (!e)
@@ -10257,7 +10261,7 @@ var o0 = {}, sa = {
10257
10261
  * @param {MediaStream} mediaStream - MediaStream object fetched using getUserMedia API or generated using captureStreamUntilEnded or WebAudio API.
10258
10262
  * @param {object} config - {type:"video", disableLogs: true, numberOfAudioChannels: 1, bufferSize: 0, sampleRate: 0, video: HTMLVideoElement, getNativeBlob:true, etc.}
10259
10263
  */
10260
- function b(R, e) {
10264
+ function m(R, e) {
10261
10265
  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;
10262
10266
  }
10263
10267
  /**
@@ -10274,9 +10278,9 @@ var o0 = {}, sa = {
10274
10278
  * @param {MediaStream} mediaStream - MediaStream object fetched using getUserMedia API or generated using captureStreamUntilEnded or WebAudio API.
10275
10279
  * @param {object} config - {type:"video", disableLogs: true, numberOfAudioChannels: 1, bufferSize: 0, sampleRate: 0, video: HTMLVideoElement, etc.}
10276
10280
  */
10277
- function M(R, e) {
10281
+ function p(R, e) {
10278
10282
  var o;
10279
- 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 = pt), e.recorderType && (o = e.recorderType), !e.disableLogs && o && o.name && console.log("Using recorderType:", o.name || o.constructor.name), !o && ge && (o = Fe), o;
10283
+ 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;
10280
10284
  }
10281
10285
  /**
10282
10286
  * MRecordRTC runs on top of {@link RecordRTC} to bring multiple recordings in a single place, by providing simple API.
@@ -10331,12 +10335,12 @@ var o0 = {}, sa = {
10331
10335
  onTimeStamp: this.onTimeStamp
10332
10336
  }), e.video || this.audioRecorder.startRecording()), e.video) {
10333
10337
  o = null, typeof e.video == "function" && (o = e.video);
10334
- var m = R;
10338
+ var b = R;
10335
10339
  if (Je() && e.audio && typeof e.audio == "function") {
10336
10340
  var S = Be(R, "video")[0];
10337
- Ze ? (m = new Ce(), m.addTrack(S), o && o === V && (o = Fe)) : (m = new Ce(), m.addTrack(S));
10341
+ Ze ? (b = new Ce(), b.addTrack(S), o && o === V && (o = Fe)) : (b = new Ce(), b.addTrack(S));
10338
10342
  }
10339
- this.videoRecorder = new r(m, {
10343
+ this.videoRecorder = new r(b, {
10340
10344
  type: "video",
10341
10345
  video: this.video,
10342
10346
  canvas: this.canvas,
@@ -10389,43 +10393,43 @@ var o0 = {}, sa = {
10389
10393
  }, this.destroy = function() {
10390
10394
  this.audioRecorder && (this.audioRecorder.destroy(), this.audioRecorder = null), this.videoRecorder && (this.videoRecorder.destroy(), this.videoRecorder = null), this.gifRecorder && (this.gifRecorder.destroy(), this.gifRecorder = null);
10391
10395
  }, this.getDataURL = function(e) {
10392
- this.getBlob(function(m) {
10393
- m.audio && m.video ? o(m.audio, function(S) {
10394
- o(m.video, function(Y) {
10396
+ this.getBlob(function(b) {
10397
+ b.audio && b.video ? o(b.audio, function(S) {
10398
+ o(b.video, function(Y) {
10395
10399
  e({
10396
10400
  audio: S,
10397
10401
  video: Y
10398
10402
  });
10399
10403
  });
10400
- }) : m.audio ? o(m.audio, function(S) {
10404
+ }) : b.audio ? o(b.audio, function(S) {
10401
10405
  e({
10402
10406
  audio: S
10403
10407
  });
10404
- }) : m.video && o(m.video, function(S) {
10408
+ }) : b.video && o(b.video, function(S) {
10405
10409
  e({
10406
10410
  video: S
10407
10411
  });
10408
10412
  });
10409
10413
  });
10410
- function o(m, S) {
10414
+ function o(b, S) {
10411
10415
  if (typeof Worker < "u") {
10412
10416
  var Y = h(function(q) {
10413
10417
  postMessage(new FileReaderSync().readAsDataURL(q));
10414
10418
  });
10415
10419
  Y.onmessage = function(s) {
10416
10420
  S(s.data);
10417
- }, Y.postMessage(m);
10421
+ }, Y.postMessage(b);
10418
10422
  } else {
10419
10423
  var D = new FileReader();
10420
- D.readAsDataURL(m), D.onload = function(s) {
10424
+ D.readAsDataURL(b), D.onload = function(s) {
10421
10425
  S(s.target.result);
10422
10426
  };
10423
10427
  }
10424
10428
  }
10425
- function h(m) {
10429
+ function h(b) {
10426
10430
  var S = ke.createObjectURL(new Blob([
10427
- m.toString(),
10428
- "this.onmessage = function (eee) {" + m.name + "(eee.data);}"
10431
+ b.toString(),
10432
+ "this.onmessage = function (eee) {" + b.name + "(eee.data);}"
10429
10433
  ], {
10430
10434
  type: "application/javascript"
10431
10435
  })), Y = new Worker(S), D;
@@ -10511,10 +10515,10 @@ var o0 = {}, sa = {
10511
10515
  else if (typeof re > "u") {
10512
10516
  var ie = 0;
10513
10517
  re = function(R, e) {
10514
- var o = new Date().getTime(), h = Math.max(0, 16 - (o - ie)), m = setTimeout(function() {
10518
+ var o = new Date().getTime(), h = Math.max(0, 16 - (o - ie)), b = setTimeout(function() {
10515
10519
  R(o + h);
10516
10520
  }, h);
10517
- return ie = o + h, m;
10521
+ return ie = o + h, b;
10518
10522
  };
10519
10523
  }
10520
10524
  }
@@ -10554,13 +10558,13 @@ var o0 = {}, sa = {
10554
10558
  var h = e.split(".");
10555
10559
  e = h[0], o = h[1];
10556
10560
  }
10557
- var m = (e || Math.round(Math.random() * 9999999999) + 888888888) + "." + o;
10561
+ var b = (e || Math.round(Math.random() * 9999999999) + 888888888) + "." + o;
10558
10562
  if (typeof navigator.msSaveOrOpenBlob < "u")
10559
- return navigator.msSaveOrOpenBlob(R, m);
10563
+ return navigator.msSaveOrOpenBlob(R, b);
10560
10564
  if (typeof navigator.msSaveBlob < "u")
10561
- return navigator.msSaveBlob(R, m);
10565
+ return navigator.msSaveBlob(R, b);
10562
10566
  var S = document.createElement("a");
10563
- S.href = ke.createObjectURL(R), S.download = m, S.style = "display:none;opacity:0;color:transparent;", (document.body || document.documentElement).appendChild(S), typeof S.click == "function" ? S.click() : (S.target = "_blank", S.dispatchEvent(new MouseEvent("click", {
10567
+ S.href = ke.createObjectURL(R), S.download = b, S.style = "display:none;opacity:0;color:transparent;", (document.body || document.documentElement).appendChild(S), typeof S.click == "function" ? S.click() : (S.target = "_blank", S.dispatchEvent(new MouseEvent("click", {
10564
10568
  view: window,
10565
10569
  bubbles: !0,
10566
10570
  cancelable: !0
@@ -10580,13 +10584,13 @@ var o0 = {}, sa = {
10580
10584
  function Ke(R, e) {
10581
10585
  if (typeof EBML > "u")
10582
10586
  throw new Error("Please link: https://www.webrtc-experiment.com/EBML.js");
10583
- var o = new EBML.Reader(), h = new EBML.Decoder(), m = EBML.tools, S = new FileReader();
10587
+ var o = new EBML.Reader(), h = new EBML.Decoder(), b = EBML.tools, S = new FileReader();
10584
10588
  S.onload = function(Y) {
10585
10589
  var D = h.decode(this.result);
10586
10590
  D.forEach(function(me) {
10587
10591
  o.read(me);
10588
10592
  }), o.stop();
10589
- var s = m.makeMetadataSeekable(o.metadatas, o.duration, o.cues), q = this.result.slice(o.metadataSize), te = new Blob([s, q], {
10593
+ var s = b.makeMetadataSeekable(o.metadatas, o.duration, o.cues), q = this.result.slice(o.metadataSize), te = new Blob([s, q], {
10590
10594
  type: "video/webm"
10591
10595
  });
10592
10596
  e(te);
@@ -10607,8 +10611,8 @@ var o0 = {}, sa = {
10607
10611
  function Je() {
10608
10612
  if (Ze || ge || Oe)
10609
10613
  return !0;
10610
- var R = navigator.userAgent, e = "" + parseFloat(navigator.appVersion), o = parseInt(navigator.appVersion, 10), h, m;
10611
- return (ue || Ve) && (h = R.indexOf("Chrome"), e = R.substring(h + 7)), (m = e.indexOf(";")) !== -1 && (e = e.substring(0, m)), (m = e.indexOf(" ")) !== -1 && (e = e.substring(0, m)), o = parseInt("" + e, 10), isNaN(o) && (e = "" + parseFloat(navigator.appVersion), o = parseInt(navigator.appVersion, 10)), o >= 49;
10614
+ var R = navigator.userAgent, e = "" + parseFloat(navigator.appVersion), o = parseInt(navigator.appVersion, 10), h, b;
10615
+ return (ue || Ve) && (h = R.indexOf("Chrome"), e = R.substring(h + 7)), (b = e.indexOf(";")) !== -1 && (e = e.substring(0, b)), (b = e.indexOf(" ")) !== -1 && (e = e.substring(0, b)), o = parseInt("" + e, 10), isNaN(o) && (e = "" + parseFloat(navigator.appVersion), o = parseInt(navigator.appVersion, 10)), o >= 49;
10612
10616
  }
10613
10617
  /**
10614
10618
  * MediaStreamRecorder is an abstraction layer for {@link https://w3c.github.io/mediacapture-record/MediaRecorder.html|MediaRecorder API}. It is used by {@link RecordRTC} to record MediaStream(s) in both Chrome and Firefox.
@@ -10670,7 +10674,7 @@ var o0 = {}, sa = {
10670
10674
  }
10671
10675
  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) {
10672
10676
  if (be.data && q.push("ondataavailable: " + Ye(be.data.size)), typeof e.timeSlice == "number") {
10673
- if (be.data && be.data.size && (h.push(be.data), m(), typeof e.ondataavailable == "function")) {
10677
+ if (be.data && be.data.size && (h.push(be.data), b(), typeof e.ondataavailable == "function")) {
10674
10678
  var ne = e.getNativeBlob ? be.data : new Blob([be.data], {
10675
10679
  type: S(me)
10676
10680
  });
@@ -10703,9 +10707,9 @@ var o0 = {}, sa = {
10703
10707
  }
10704
10708
  setTimeout(ne, 1e3);
10705
10709
  }(), D.state !== "inactive" && D.state !== "stopped" && D.stop());
10706
- }, typeof e.timeSlice == "number" ? (m(), D.start(e.timeSlice)) : D.start(36e5), e.initCallback && e.initCallback();
10710
+ }, typeof e.timeSlice == "number" ? (b(), D.start(e.timeSlice)) : D.start(36e5), e.initCallback && e.initCallback();
10707
10711
  }, this.timestamps = [];
10708
- function m() {
10712
+ function b() {
10709
10713
  te.timestamps.push(new Date().getTime()), typeof e.onTimeStamp == "function" && e.onTimeStamp(te.timestamps[te.timestamps.length - 1], te.timestamps);
10710
10714
  }
10711
10715
  function S(me) {
@@ -10785,7 +10789,7 @@ var o0 = {}, sa = {
10785
10789
  if (!Be(R, "audio").length)
10786
10790
  throw "Your stream has no audio tracks.";
10787
10791
  e = e || {};
10788
- var o = this, h = [], m = [], S = !1, Y = 0, D, s = 2, q = e.desiredSampRate;
10792
+ var o = this, h = [], b = [], S = !1, Y = 0, D, s = 2, q = e.desiredSampRate;
10789
10793
  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);
10790
10794
  function te() {
10791
10795
  if (e.checkForInactiveTracks === !1)
@@ -10810,8 +10814,8 @@ var o0 = {}, sa = {
10810
10814
  var W = Math.round(C.length * (a / i)), L = [], Q = Number((C.length - 1) / (W - 1));
10811
10815
  L[0] = C[0];
10812
10816
  for (var le = 1; le < W - 1; le++) {
10813
- var _e = le * Q, pe = Number(Math.floor(_e)).toFixed(), je = Number(Math.ceil(_e)).toFixed(), He = _e - pe;
10814
- L[le] = A(C[pe], C[je], He);
10817
+ var _e = le * Q, Me = Number(Math.floor(_e)).toFixed(), je = Number(Math.ceil(_e)).toFixed(), He = _e - Me;
10818
+ L[le] = A(C[Me], C[je], He);
10815
10819
  }
10816
10820
  return L[W - 1] = C[C.length - 1], L;
10817
10821
  }
@@ -10838,8 +10842,8 @@ var o0 = {}, sa = {
10838
10842
  K === 2 && (w = y(k, fe)), K === 1 && (w = k);
10839
10843
  var u = w.length, I = 44 + u * 2, n = new ArrayBuffer(I), H = new DataView(n);
10840
10844
  f(H, 0, "RIFF"), H.setUint32(4, 36 + u * 2, !0), f(H, 8, "WAVE"), f(H, 12, "fmt "), H.setUint32(16, 16, !0), H.setUint16(20, 1, !0), H.setUint16(22, K, !0), H.setUint32(24, E, !0), H.setUint32(28, E * K * 2, !0), H.setUint16(32, K * 2, !0), H.setUint16(34, 16, !0), f(H, 36, "data"), H.setUint32(40, u * 2, !0);
10841
- for (var d = u, v = 44, p = 1, x = 0; x < d; x++)
10842
- H.setInt16(v, w[x] * (32767 * p), !0), v += 2;
10845
+ for (var d = u, v = 44, M = 1, x = 0; x < d; x++)
10846
+ H.setInt16(v, w[x] * (32767 * M), !0), v += 2;
10843
10847
  if (j)
10844
10848
  return j({
10845
10849
  buffer: n,
@@ -10878,7 +10882,7 @@ var o0 = {}, sa = {
10878
10882
  numberOfAudioChannels: s,
10879
10883
  internalInterleavedLength: Y,
10880
10884
  leftBuffers: h,
10881
- rightBuffers: s === 1 ? [] : m,
10885
+ rightBuffers: s === 1 ? [] : b,
10882
10886
  noWorker: e.noWorker
10883
10887
  }, function(oe, g) {
10884
10888
  o.blob = new Blob([g], {
@@ -10889,8 +10893,8 @@ var o0 = {}, sa = {
10889
10893
  AudioContextConstructor: null,
10890
10894
  AudioContext: window.AudioContext || window.webkitAudioContext
10891
10895
  }), (!r.Storage.AudioContextConstructor || r.Storage.AudioContextConstructor.state === "closed") && (r.Storage.AudioContextConstructor = new r.Storage.AudioContext());
10892
- var ne = r.Storage.AudioContextConstructor, ce = ne.createMediaStreamSource(R), Me = [0, 256, 512, 1024, 2048, 4096, 8192, 16384], se = typeof e.bufferSize > "u" ? 4096 : e.bufferSize;
10893
- if (Me.indexOf(se) === -1 && (e.disableLogs || console.log("Legal values for buffer-size are " + JSON.stringify(Me, null, " "))), ne.createJavaScriptNode)
10896
+ var ne = r.Storage.AudioContextConstructor, ce = ne.createMediaStreamSource(R), pe = [0, 256, 512, 1024, 2048, 4096, 8192, 16384], se = typeof e.bufferSize > "u" ? 4096 : e.bufferSize;
10897
+ if (pe.indexOf(se) === -1 && (e.disableLogs || console.log("Legal values for buffer-size are " + JSON.stringify(pe, null, " "))), ne.createJavaScriptNode)
10894
10898
  D = ne.createJavaScriptNode(se, s, s);
10895
10899
  else if (ne.createScriptProcessor)
10896
10900
  D = ne.createScriptProcessor(se, s, s);
@@ -10914,7 +10918,7 @@ var o0 = {}, sa = {
10914
10918
  e.checkForInactiveTracks = !1, S && this.stop(U), U();
10915
10919
  };
10916
10920
  function we() {
10917
- h = [], m = [], Y = 0, ee = !1, S = !1, ve = !1, ne = null, o.leftchannel = h, o.rightchannel = m, o.numberOfAudioChannels = s, o.desiredSampRate = q, o.sampleRate = G, o.recordingLength = Y, N = {
10921
+ h = [], b = [], Y = 0, ee = !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 = {
10918
10922
  left: [],
10919
10923
  right: [],
10920
10924
  recordingLength: 0
@@ -10937,12 +10941,12 @@ var o0 = {}, sa = {
10937
10941
  var oe = T.inputBuffer.getChannelData(0), g = new Float32Array(oe);
10938
10942
  if (h.push(g), s === 2) {
10939
10943
  var z = T.inputBuffer.getChannelData(1), ae = new Float32Array(z);
10940
- m.push(ae);
10944
+ b.push(ae);
10941
10945
  }
10942
10946
  Y += se, o.recordingLength = Y, typeof e.timeSlice < "u" && (N.recordingLength += se, N.left.push(g), s === 2 && N.right.push(ae));
10943
10947
  }
10944
10948
  }
10945
- D.onaudioprocess = c, ne.createMediaStreamDestination ? D.connect(ne.createMediaStreamDestination()) : D.connect(ne.destination), this.leftchannel = h, this.rightchannel = m, this.numberOfAudioChannels = s, this.desiredSampRate = q, this.sampleRate = G, o.recordingLength = Y;
10949
+ 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;
10946
10950
  var N = {
10947
10951
  left: [],
10948
10952
  right: [],
@@ -10991,11 +10995,11 @@ var o0 = {}, sa = {
10991
10995
  throw "Please link: https://www.webrtc-experiment.com/screenshot.js";
10992
10996
  e = e || {}, e.frameInterval || (e.frameInterval = 10);
10993
10997
  var o = !1;
10994
- ["captureStream", "mozCaptureStream", "webkitCaptureStream"].forEach(function(Me) {
10995
- Me in document.createElement("canvas") && (o = !0);
10998
+ ["captureStream", "mozCaptureStream", "webkitCaptureStream"].forEach(function(pe) {
10999
+ pe in document.createElement("canvas") && (o = !0);
10996
11000
  });
10997
- var h = (!!window.webkitRTCPeerConnection || !!window.webkitGetUserMedia) && !!window.chrome, m = 50, S = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
10998
- h && S && S[2] && (m = parseInt(S[2], 10)), h && m < 52 && (o = !1), e.useWhammyRecorder && (o = !1);
11001
+ var h = (!!window.webkitRTCPeerConnection || !!window.webkitGetUserMedia) && !!window.chrome, b = 50, S = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
11002
+ h && S && S[2] && (b = parseInt(S[2], 10)), h && b < 52 && (o = !1), e.useWhammyRecorder && (o = !1);
10999
11003
  var Y, D;
11000
11004
  if (o)
11001
11005
  if (e.disableLogs || console.log("Your browser supports both MediRecorder API and canvas.captureStream!"), R instanceof HTMLCanvasElement)
@@ -11009,24 +11013,24 @@ var o0 = {}, sa = {
11009
11013
  var s;
11010
11014
  this.record = function() {
11011
11015
  if (s = !0, o && !e.useWhammyRecorder) {
11012
- var Me;
11013
- "captureStream" in Y ? Me = Y.captureStream(25) : "mozCaptureStream" in Y ? Me = Y.mozCaptureStream(25) : "webkitCaptureStream" in Y && (Me = Y.webkitCaptureStream(25));
11016
+ var pe;
11017
+ "captureStream" in Y ? pe = Y.captureStream(25) : "mozCaptureStream" in Y ? pe = Y.mozCaptureStream(25) : "webkitCaptureStream" in Y && (pe = Y.webkitCaptureStream(25));
11014
11018
  try {
11015
11019
  var se = new Ce();
11016
- se.addTrack(Be(Me, "video")[0]), Me = se;
11020
+ se.addTrack(Be(pe, "video")[0]), pe = se;
11017
11021
  } catch {
11018
11022
  }
11019
- if (!Me)
11023
+ if (!pe)
11020
11024
  throw "captureStream API are NOT available.";
11021
- D = new Fe(Me, {
11025
+ D = new Fe(pe, {
11022
11026
  mimeType: e.mimeType || "video/webm"
11023
11027
  }), D.record();
11024
11028
  } else
11025
11029
  ce.frames = [], ne = new Date().getTime(), be();
11026
11030
  e.initCallback && e.initCallback();
11027
- }, this.getWebPImages = function(Me) {
11031
+ }, this.getWebPImages = function(pe) {
11028
11032
  if (R.nodeName.toLowerCase() !== "canvas") {
11029
- Me();
11033
+ pe();
11030
11034
  return;
11031
11035
  }
11032
11036
  var se = ce.frames.length;
@@ -11035,19 +11039,19 @@ var o0 = {}, sa = {
11035
11039
  e.disableLogs || console.log(we + "/" + se + " frames remaining"), e.onEncodingCallback && e.onEncodingCallback(we, se);
11036
11040
  var U = G.image.toDataURL("image/webp", 1);
11037
11041
  ce.frames[ve].image = U;
11038
- }), e.disableLogs || console.log("Generating WebM"), Me();
11039
- }, this.stop = function(Me) {
11042
+ }), e.disableLogs || console.log("Generating WebM"), pe();
11043
+ }, this.stop = function(pe) {
11040
11044
  s = !1;
11041
11045
  var se = this;
11042
11046
  if (o && D) {
11043
- D.stop(Me);
11047
+ D.stop(pe);
11044
11048
  return;
11045
11049
  }
11046
11050
  this.getWebPImages(function() {
11047
11051
  ce.compile(function(G) {
11048
11052
  e.disableLogs || console.log("Recording finished!"), se.blob = G, se.blob.forEach && (se.blob = new Blob([], {
11049
11053
  type: "video/webm"
11050
- })), Me && Me(se.blob), ce.frames = [];
11054
+ })), pe && pe(se.blob), ce.frames = [];
11051
11055
  });
11052
11056
  });
11053
11057
  };
@@ -11073,17 +11077,17 @@ var o0 = {}, sa = {
11073
11077
  return this.name;
11074
11078
  };
11075
11079
  function me() {
11076
- var Me = document.createElement("canvas"), se = Me.getContext("2d");
11077
- return Me.width = R.width, Me.height = R.height, se.drawImage(R, 0, 0), Me;
11080
+ var pe = document.createElement("canvas"), se = pe.getContext("2d");
11081
+ return pe.width = R.width, pe.height = R.height, se.drawImage(R, 0, 0), pe;
11078
11082
  }
11079
11083
  function be() {
11080
11084
  if (q)
11081
11085
  return ne = new Date().getTime(), setTimeout(be, 500);
11082
11086
  if (R.nodeName.toLowerCase() === "canvas") {
11083
- var Me = new Date().getTime() - ne;
11087
+ var pe = new Date().getTime() - ne;
11084
11088
  ne = new Date().getTime(), ce.frames.push({
11085
11089
  image: me(),
11086
- duration: Me
11090
+ duration: pe
11087
11091
  }), s && setTimeout(be, e.frameInterval);
11088
11092
  return;
11089
11093
  }
@@ -11100,7 +11104,7 @@ var o0 = {}, sa = {
11100
11104
  }
11101
11105
  });
11102
11106
  }
11103
- var ne = new Date().getTime(), ce = new Mt.Video(100);
11107
+ var ne = new Date().getTime(), ce = new pt.Video(100);
11104
11108
  }
11105
11109
  typeof r < "u" && (r.CanvasRecorder = Le);
11106
11110
  /**
@@ -11130,7 +11134,7 @@ var o0 = {}, sa = {
11130
11134
  height: e.height
11131
11135
  }), s.width = e.canvas.width || 320, s.height = e.canvas.height || 240, q = s.getContext("2d"), e.video && e.video instanceof HTMLVideoElement ? (te = e.video.cloneNode(), e.initCallback && e.initCallback()) : (te = document.createElement("video"), $e(R, te), te.onloadedmetadata = function() {
11132
11136
  e.initCallback && e.initCallback();
11133
- }, te.width = e.video.width, te.height = e.video.height), te.muted = !0, te.play(), me = new Date().getTime(), be = new Mt.Video(), e.disableLogs || (console.log("canvas resolutions", s.width, "*", s.height), console.log("video width/height", te.width || s.width, "*", te.height || s.height)), o(e.frameInterval);
11137
+ }, te.width = e.video.width, te.height = e.video.height), te.muted = !0, te.play(), me = new Date().getTime(), be = new pt.Video(), e.disableLogs || (console.log("canvas resolutions", s.width, "*", s.height), console.log("video width/height", te.width || s.width, "*", te.height || s.height)), o(e.frameInterval);
11134
11138
  };
11135
11139
  function o(ne) {
11136
11140
  ne = typeof ne < "u" ? ne : 10;
@@ -11145,9 +11149,9 @@ var o0 = {}, sa = {
11145
11149
  }), S || setTimeout(o, ne, ne);
11146
11150
  }
11147
11151
  function h(ne) {
11148
- var ce = -1, Me = ne.length;
11152
+ var ce = -1, pe = ne.length;
11149
11153
  (function se() {
11150
- if (ce++, ce === Me) {
11154
+ if (ce++, ce === pe) {
11151
11155
  ne.callback();
11152
11156
  return;
11153
11157
  }
@@ -11156,7 +11160,7 @@ var o0 = {}, sa = {
11156
11160
  }, 1);
11157
11161
  })();
11158
11162
  }
11159
- function m(ne, ce, Me, se, G) {
11163
+ function b(ne, ce, pe, se, G) {
11160
11164
  var ve = document.createElement("canvas");
11161
11165
  ve.width = s.width, ve.height = s.height;
11162
11166
  var we = ve.getContext("2d"), U = [], ee = ce === -1, c = ce && ce > 0 && ce <= ne.length ? ce : ne.length, N = {
@@ -11165,7 +11169,7 @@ var o0 = {}, sa = {
11165
11169
  b: 0
11166
11170
  }, P = Math.sqrt(
11167
11171
  Math.pow(255, 2) + Math.pow(255, 2) + Math.pow(255, 2)
11168
- ), T = Me && Me >= 0 && Me <= 1 ? Me : 0, oe = se && se >= 0 && se <= 1 ? se : 0, g = !1;
11172
+ ), T = pe && pe >= 0 && pe <= 1 ? pe : 0, oe = se && se >= 0 && se <= 1 ? se : 0, g = !1;
11169
11173
  h({
11170
11174
  length: c,
11171
11175
  functionToLoop: function(z, ae) {
@@ -11205,8 +11209,8 @@ var o0 = {}, sa = {
11205
11209
  }, S = !0;
11206
11210
  var ce = this;
11207
11211
  setTimeout(function() {
11208
- m(be.frames, -1, null, null, function(Me) {
11209
- be.frames = Me, e.advertisement && e.advertisement.length && (be.frames = e.advertisement.concat(be.frames)), be.compile(function(se) {
11212
+ b(be.frames, -1, null, null, function(pe) {
11213
+ be.frames = pe, e.advertisement && e.advertisement.length && (be.frames = e.advertisement.concat(be.frames)), be.compile(function(se) {
11210
11214
  ce.blob = se, ce.blob.forEach && (ce.blob = new Blob([], {
11211
11215
  type: "video/webm"
11212
11216
  })), ne && ne(ce.blob);
@@ -11244,29 +11248,29 @@ var o0 = {}, sa = {
11244
11248
  * var output = recorder.compile();
11245
11249
  * @see {@link https://github.com/muaz-khan/RecordRTC|RecordRTC Source Code}
11246
11250
  */
11247
- var Mt = function() {
11251
+ var pt = function() {
11248
11252
  function R(h) {
11249
11253
  this.frames = [], this.duration = h || 1, this.quality = 0.8;
11250
11254
  }
11251
- R.prototype.add = function(h, m) {
11255
+ R.prototype.add = function(h, b) {
11252
11256
  if ("canvas" in h && (h = h.canvas), "toDataURL" in h && (h = h.toDataURL("image/webp", this.quality)), !/^data:image\/webp;base64,/ig.test(h))
11253
11257
  throw "Input must be formatted properly as a base64 encoded DataURI of type image/webp";
11254
11258
  this.frames.push({
11255
11259
  image: h,
11256
- duration: m || this.duration
11260
+ duration: b || this.duration
11257
11261
  });
11258
11262
  };
11259
11263
  function e(h) {
11260
- var m = ke.createObjectURL(new Blob([
11264
+ var b = ke.createObjectURL(new Blob([
11261
11265
  h.toString(),
11262
11266
  "this.onmessage = function (eee) {" + h.name + "(eee.data);}"
11263
11267
  ], {
11264
11268
  type: "application/javascript"
11265
- })), S = new Worker(m);
11266
- return ke.revokeObjectURL(m), S;
11269
+ })), S = new Worker(b);
11270
+ return ke.revokeObjectURL(b), S;
11267
11271
  }
11268
11272
  function o(h) {
11269
- function m(G) {
11273
+ function b(G) {
11270
11274
  var ve = Y(G);
11271
11275
  if (!ve)
11272
11276
  return [];
@@ -11322,7 +11326,7 @@ var o0 = {}, sa = {
11322
11326
  id: 22337
11323
11327
  // WritingApp
11324
11328
  }, {
11325
- data: Me(ve.duration),
11329
+ data: pe(ve.duration),
11326
11330
  id: 17545
11327
11331
  // Duration
11328
11332
  }]
@@ -11486,7 +11490,7 @@ var o0 = {}, sa = {
11486
11490
  }
11487
11491
  return we;
11488
11492
  }
11489
- function Me(G) {
11493
+ function pe(G) {
11490
11494
  return [].slice.call(
11491
11495
  new Uint8Array(new Float64Array([G]).buffer),
11492
11496
  0
@@ -11494,21 +11498,21 @@ var o0 = {}, sa = {
11494
11498
  return String.fromCharCode(ve);
11495
11499
  }).reverse().join("");
11496
11500
  }
11497
- var se = new m(h.map(function(G) {
11501
+ var se = new b(h.map(function(G) {
11498
11502
  var ve = be(ce(atob(G.image.slice(23))));
11499
11503
  return ve.duration = G.duration, ve;
11500
11504
  }));
11501
11505
  postMessage(se);
11502
11506
  }
11503
11507
  return R.prototype.compile = function(h) {
11504
- var m = e(o);
11505
- m.onmessage = function(S) {
11508
+ var b = e(o);
11509
+ b.onmessage = function(S) {
11506
11510
  if (S.data.error) {
11507
11511
  console.error(S.data.error);
11508
11512
  return;
11509
11513
  }
11510
11514
  h(S.data);
11511
- }, m.postMessage(this.frames);
11515
+ }, b.postMessage(this.frames);
11512
11516
  }, {
11513
11517
  /**
11514
11518
  * A more abstract-ish API.
@@ -11522,7 +11526,7 @@ var o0 = {}, sa = {
11522
11526
  Video: R
11523
11527
  };
11524
11528
  }();
11525
- typeof r < "u" && (r.Whammy = Mt);
11529
+ typeof r < "u" && (r.Whammy = pt);
11526
11530
  /**
11527
11531
  * DiskStorage is a standalone object used by {@link RecordRTC} to store recorded blobs in IndexedDB storage.
11528
11532
  * @summary Writing blobs into IndexedDB.
@@ -11563,7 +11567,7 @@ var o0 = {}, sa = {
11563
11567
  console.error("IndexedDB API are not available in this browser.");
11564
11568
  return;
11565
11569
  }
11566
- var e = 1, o = this.dbName || location.href.replace(/\/|:|#|%|\.|\[|\]/g, ""), h, m = indexedDB.open(o, e);
11570
+ var e = 1, o = this.dbName || location.href.replace(/\/|:|#|%|\.|\[|\]/g, ""), h, b = indexedDB.open(o, e);
11567
11571
  function S(D) {
11568
11572
  D.createObjectStore(R.dataStoreName);
11569
11573
  }
@@ -11577,8 +11581,8 @@ var o0 = {}, sa = {
11577
11581
  }
11578
11582
  s("audioBlob"), s("videoBlob"), s("gifBlob");
11579
11583
  }
11580
- m.onerror = R.onError, m.onsuccess = function() {
11581
- if (h = m.result, h.onerror = R.onError, h.setVersion)
11584
+ b.onerror = R.onError, b.onsuccess = function() {
11585
+ if (h = b.result, h.onerror = R.onError, h.setVersion)
11582
11586
  if (h.version !== e) {
11583
11587
  var D = h.setVersion(e);
11584
11588
  D.onsuccess = function() {
@@ -11588,7 +11592,7 @@ var o0 = {}, sa = {
11588
11592
  Y();
11589
11593
  else
11590
11594
  Y();
11591
- }, m.onupgradeneeded = function(D) {
11595
+ }, b.onupgradeneeded = function(D) {
11592
11596
  S(D.target.result);
11593
11597
  };
11594
11598
  },
@@ -11685,13 +11689,13 @@ var o0 = {}, sa = {
11685
11689
  width: e.width,
11686
11690
  height: e.height
11687
11691
  }), 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();
11688
- function ce(Me) {
11692
+ function ce(pe) {
11689
11693
  if (ne.clearedRecordedData !== !0) {
11690
- if (m)
11694
+ if (b)
11691
11695
  return setTimeout(function() {
11692
- ce(Me);
11696
+ ce(pe);
11693
11697
  }, 100);
11694
- te = re(ce), typeof me === void 0 && (me = Me), !(Me - 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 = Me);
11698
+ te = re(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);
11695
11699
  }
11696
11700
  }
11697
11701
  te = re(ce), e.initCallback && e.initCallback();
@@ -11701,11 +11705,11 @@ var o0 = {}, sa = {
11701
11705
  type: "image/gif"
11702
11706
  }), ce(this.blob), be.stream().bin = [];
11703
11707
  };
11704
- var m = !1;
11708
+ var b = !1;
11705
11709
  this.pause = function() {
11706
- m = !0;
11710
+ b = !0;
11707
11711
  }, this.resume = function() {
11708
- m = !1;
11712
+ b = !1;
11709
11713
  }, this.clearRecordedData = function() {
11710
11714
  ne.clearedRecordedData = !0, S();
11711
11715
  };
@@ -11776,7 +11780,7 @@ var o0 = {}, sa = {
11776
11780
  }
11777
11781
  }), U.window = bt));
11778
11782
  })(typeof bt < "u" ? bt : null), e = e || "multi-streams-mixer";
11779
- var h = [], m = !1, S = document.createElement("canvas"), Y = S.getContext("2d");
11783
+ var h = [], b = !1, S = document.createElement("canvas"), Y = S.getContext("2d");
11780
11784
  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;
11781
11785
  var D = this, s = window.AudioContext;
11782
11786
  typeof s > "u" && (typeof webkitAudioContext < "u" && (s = webkitAudioContext), typeof mozAudioContext < "u" && (s = mozAudioContext));
@@ -11797,7 +11801,7 @@ var o0 = {}, sa = {
11797
11801
  ne();
11798
11802
  };
11799
11803
  function ne() {
11800
- if (!m) {
11804
+ if (!b) {
11801
11805
  var U = h.length, ee = !1, c = [];
11802
11806
  if (h.forEach(function(P) {
11803
11807
  P.stream || (P.stream = {}), P.stream.fullcanvas ? ee = P : c.push(P);
@@ -11815,13 +11819,13 @@ var o0 = {}, sa = {
11815
11819
  }
11816
11820
  }
11817
11821
  function ce(U, ee) {
11818
- if (!m) {
11822
+ if (!b) {
11819
11823
  var c = 0, N = 0, P = U.width, T = U.height;
11820
11824
  ee === 1 && (c = U.width), ee === 2 && (N = U.height), ee === 3 && (c = U.width, N = U.height), ee === 4 && (N = U.height * 2), ee === 5 && (c = U.width, N = U.height * 2), ee === 6 && (N = U.height * 3), ee === 7 && (c = U.width, N = U.height * 3), typeof U.stream.left < "u" && (c = U.stream.left), typeof U.stream.top < "u" && (N = U.stream.top), typeof U.stream.width < "u" && (P = U.stream.width), typeof U.stream.height < "u" && (T = U.stream.height), Y.drawImage(U, c, N, P, T), typeof U.stream.onRender == "function" && U.stream.onRender(Y, c, N, P, T, ee);
11821
11825
  }
11822
11826
  }
11823
- function Me() {
11824
- m = !1;
11827
+ function pe() {
11828
+ b = !1;
11825
11829
  var U = se(), ee = G();
11826
11830
  return ee && ee.getTracks().filter(function(c) {
11827
11831
  return c.kind === "audio";
@@ -11886,7 +11890,7 @@ var o0 = {}, sa = {
11886
11890
  R.push(c);
11887
11891
  });
11888
11892
  }, this.releaseStreams = function() {
11889
- h = [], m = !0, D.gainNode && (D.gainNode.disconnect(), D.gainNode = null), D.audioSources.length && (D.audioSources.forEach(function(U) {
11893
+ h = [], b = !0, D.gainNode && (D.gainNode.disconnect(), D.gainNode = null), D.audioSources.length && (D.audioSources.forEach(function(U) {
11890
11894
  U.disconnect();
11891
11895
  }), D.audioSources = []), D.audioDestination && (D.audioDestination.disconnect(), D.audioDestination = null), D.audioContext && D.audioContext.close(), D.audioContext = null, Y.clearRect(0, 0, S.width, S.height), S.stream && (S.stream.stop(), S.stream = null);
11892
11896
  }, this.resetVideoStreams = function(U) {
@@ -11904,7 +11908,7 @@ var o0 = {}, sa = {
11904
11908
  }
11905
11909
  this.name = "MultiStreamsMixer", this.toString = function() {
11906
11910
  return this.name;
11907
- }, this.getMixedStream = Me;
11911
+ }, this.getMixedStream = pe;
11908
11912
  }
11909
11913
  typeof r > "u" && (_.exports = _t);
11910
11914
  /**
@@ -11930,9 +11934,9 @@ var o0 = {}, sa = {
11930
11934
  * @param {MediaStreams} mediaStreams - Array of MediaStreams.
11931
11935
  * @param {object} config - {disableLogs:true, frameInterval: 1, mimeType: "video/webm"}
11932
11936
  */
11933
- function pt(R, e) {
11937
+ function Mt(R, e) {
11934
11938
  R = R || [];
11935
- var o = this, h, m;
11939
+ var o = this, h, b;
11936
11940
  e = e || {
11937
11941
  elementClass: "multi-streams-mixer",
11938
11942
  mimeType: "video/webm",
@@ -11941,7 +11945,7 @@ var o0 = {}, sa = {
11941
11945
  height: 240
11942
11946
  }
11943
11947
  }, e.frameInterval || (e.frameInterval = 10), e.video || (e.video = {}), e.video.width || (e.video.width = 360), e.video.height || (e.video.height = 240), this.record = function() {
11944
- h = new _t(R, e.elementClass || "multi-streams-mixer"), S().length && (h.frameInterval = e.frameInterval || 10, h.width = e.video.width || 360, h.height = e.video.height || 240, h.startDrawingFrames()), e.previewStream && typeof e.previewStream == "function" && e.previewStream(h.getMixedStream()), m = new Fe(h.getMixedStream(), e), m.record();
11948
+ h = new _t(R, e.elementClass || "multi-streams-mixer"), S().length && (h.frameInterval = e.frameInterval || 10, h.width = e.video.width || 360, h.height = e.video.height || 240, h.startDrawingFrames()), e.previewStream && typeof e.previewStream == "function" && e.previewStream(h.getMixedStream()), b = new Fe(h.getMixedStream(), e), b.record();
11945
11949
  };
11946
11950
  function S() {
11947
11951
  var Y = [];
@@ -11952,19 +11956,19 @@ var o0 = {}, sa = {
11952
11956
  }), Y;
11953
11957
  }
11954
11958
  this.stop = function(Y) {
11955
- m && m.stop(function(D) {
11959
+ b && b.stop(function(D) {
11956
11960
  o.blob = D, Y(D), o.clearRecordedData();
11957
11961
  });
11958
11962
  }, this.pause = function() {
11959
- m && m.pause();
11963
+ b && b.pause();
11960
11964
  }, this.resume = function() {
11961
- m && m.resume();
11965
+ b && b.resume();
11962
11966
  }, this.clearRecordedData = function() {
11963
- m && (m.clearRecordedData(), m = null), h && (h.releaseStreams(), h = null);
11967
+ b && (b.clearRecordedData(), b = null), h && (h.releaseStreams(), h = null);
11964
11968
  }, this.addStreams = function(Y) {
11965
11969
  if (!Y)
11966
11970
  throw "First parameter is required.";
11967
- Y instanceof Array || (Y = [Y]), R.concat(Y), !(!m || !h) && (h.appendStreams(Y), e.previewStream && typeof e.previewStream == "function" && e.previewStream(h.getMixedStream()));
11971
+ Y instanceof Array || (Y = [Y]), R.concat(Y), !(!b || !h) && (h.appendStreams(Y), e.previewStream && typeof e.previewStream == "function" && e.previewStream(h.getMixedStream()));
11968
11972
  }, this.resetVideoStreams = function(Y) {
11969
11973
  h && (Y && !(Y instanceof Array) && (Y = [Y]), h.resetVideoStreams(Y));
11970
11974
  }, this.getMixer = function() {
@@ -11973,7 +11977,7 @@ var o0 = {}, sa = {
11973
11977
  return this.name;
11974
11978
  };
11975
11979
  }
11976
- typeof r < "u" && (r.MultiStreamRecorder = pt);
11980
+ typeof r < "u" && (r.MultiStreamRecorder = Mt);
11977
11981
  /**
11978
11982
  * RecordRTCPromisesHandler adds promises support in {@link RecordRTC}. Try a {@link https://github.com/muaz-khan/RecordRTC/blob/master/simple-demos/RecordRTCPromisesHandler.html|demo here}
11979
11983
  * @summary Promises for {@link RecordRTC}
@@ -12002,91 +12006,91 @@ var o0 = {}, sa = {
12002
12006
  throw 'First argument "MediaStream" is required.';
12003
12007
  var o = this;
12004
12008
  o.recordRTC = new r(R, e), this.startRecording = function() {
12005
- return new Promise(function(h, m) {
12009
+ return new Promise(function(h, b) {
12006
12010
  try {
12007
12011
  o.recordRTC.startRecording(), h();
12008
12012
  } catch (S) {
12009
- m(S);
12013
+ b(S);
12010
12014
  }
12011
12015
  });
12012
12016
  }, this.stopRecording = function() {
12013
- return new Promise(function(h, m) {
12017
+ return new Promise(function(h, b) {
12014
12018
  try {
12015
12019
  o.recordRTC.stopRecording(function(S) {
12016
12020
  if (o.blob = o.recordRTC.getBlob(), !o.blob || !o.blob.size) {
12017
- m("Empty blob.", o.blob);
12021
+ b("Empty blob.", o.blob);
12018
12022
  return;
12019
12023
  }
12020
12024
  h(S);
12021
12025
  });
12022
12026
  } catch (S) {
12023
- m(S);
12027
+ b(S);
12024
12028
  }
12025
12029
  });
12026
12030
  }, this.pauseRecording = function() {
12027
- return new Promise(function(h, m) {
12031
+ return new Promise(function(h, b) {
12028
12032
  try {
12029
12033
  o.recordRTC.pauseRecording(), h();
12030
12034
  } catch (S) {
12031
- m(S);
12035
+ b(S);
12032
12036
  }
12033
12037
  });
12034
12038
  }, this.resumeRecording = function() {
12035
- return new Promise(function(h, m) {
12039
+ return new Promise(function(h, b) {
12036
12040
  try {
12037
12041
  o.recordRTC.resumeRecording(), h();
12038
12042
  } catch (S) {
12039
- m(S);
12043
+ b(S);
12040
12044
  }
12041
12045
  });
12042
12046
  }, this.getDataURL = function(h) {
12043
- return new Promise(function(m, S) {
12047
+ return new Promise(function(b, S) {
12044
12048
  try {
12045
12049
  o.recordRTC.getDataURL(function(Y) {
12046
- m(Y);
12050
+ b(Y);
12047
12051
  });
12048
12052
  } catch (Y) {
12049
12053
  S(Y);
12050
12054
  }
12051
12055
  });
12052
12056
  }, this.getBlob = function() {
12053
- return new Promise(function(h, m) {
12057
+ return new Promise(function(h, b) {
12054
12058
  try {
12055
12059
  h(o.recordRTC.getBlob());
12056
12060
  } catch (S) {
12057
- m(S);
12061
+ b(S);
12058
12062
  }
12059
12063
  });
12060
12064
  }, this.getInternalRecorder = function() {
12061
- return new Promise(function(h, m) {
12065
+ return new Promise(function(h, b) {
12062
12066
  try {
12063
12067
  h(o.recordRTC.getInternalRecorder());
12064
12068
  } catch (S) {
12065
- m(S);
12069
+ b(S);
12066
12070
  }
12067
12071
  });
12068
12072
  }, this.reset = function() {
12069
- return new Promise(function(h, m) {
12073
+ return new Promise(function(h, b) {
12070
12074
  try {
12071
12075
  h(o.recordRTC.reset());
12072
12076
  } catch (S) {
12073
- m(S);
12077
+ b(S);
12074
12078
  }
12075
12079
  });
12076
12080
  }, this.destroy = function() {
12077
- return new Promise(function(h, m) {
12081
+ return new Promise(function(h, b) {
12078
12082
  try {
12079
12083
  h(o.recordRTC.destroy());
12080
12084
  } catch (S) {
12081
- m(S);
12085
+ b(S);
12082
12086
  }
12083
12087
  });
12084
12088
  }, this.getState = function() {
12085
- return new Promise(function(h, m) {
12089
+ return new Promise(function(h, b) {
12086
12090
  try {
12087
12091
  h(o.recordRTC.getState());
12088
12092
  } catch (S) {
12089
- m(S);
12093
+ b(S);
12090
12094
  }
12091
12095
  });
12092
12096
  }, this.blob = null, this.version = "5.6.2";
@@ -12118,8 +12122,8 @@ var o0 = {}, sa = {
12118
12122
  var te = document.createElement("canvas"), me = document.createElement("video"), be = !0;
12119
12123
  me.srcObject = R, me.muted = !0, me.height = e.height, me.width = e.width, me.volume = 0, me.onplaying = function() {
12120
12124
  te.width = e.width, te.height = e.height;
12121
- var ne = te.getContext("2d"), ce = 1e3 / e.frameRate, Me = setInterval(function() {
12122
- if (o && (clearInterval(Me), q.close()), be && (be = !1, e.onVideoProcessStarted && e.onVideoProcessStarted()), ne.drawImage(me, 0, 0), q._controlledReadableStream.state !== "closed")
12125
+ var ne = te.getContext("2d"), ce = 1e3 / e.frameRate, pe = setInterval(function() {
12126
+ if (o && (clearInterval(pe), q.close()), be && (be = !1, e.onVideoProcessStarted && e.onVideoProcessStarted()), ne.drawImage(me, 0, 0), q._controlledReadableStream.state !== "closed")
12123
12127
  try {
12124
12128
  q.enqueue(
12125
12129
  ne.getImageData(0, 0, e.width, e.height)
@@ -12131,7 +12135,7 @@ var o0 = {}, sa = {
12131
12135
  }
12132
12136
  });
12133
12137
  }
12134
- var m;
12138
+ var b;
12135
12139
  function S(q, te) {
12136
12140
  if (!e.workerPath && !te) {
12137
12141
  o = !1, fetch(
@@ -12149,8 +12153,8 @@ var o0 = {}, sa = {
12149
12153
  });
12150
12154
  e.workerPath = ke.createObjectURL(me);
12151
12155
  }
12152
- e.workerPath || console.error("workerPath parameter is missing."), m = new Worker(e.workerPath), m.postMessage(e.webAssemblyPath || "https://unpkg.com/webm-wasm@latest/dist/webm-wasm.wasm"), m.addEventListener("message", function(be) {
12153
- be.data === "READY" ? (m.postMessage({
12156
+ e.workerPath || console.error("workerPath parameter is missing."), b = new Worker(e.workerPath), b.postMessage(e.webAssemblyPath || "https://unpkg.com/webm-wasm@latest/dist/webm-wasm.wasm"), b.addEventListener("message", function(be) {
12157
+ be.data === "READY" ? (b.postMessage({
12154
12158
  width: e.width,
12155
12159
  height: e.height,
12156
12160
  bitrate: e.bitrate || 1200,
@@ -12162,7 +12166,7 @@ var o0 = {}, sa = {
12162
12166
  console.error("Got image, but recorder is finished!");
12163
12167
  return;
12164
12168
  }
12165
- m.postMessage(ne.data.buffer, [ne.data.buffer]);
12169
+ b.postMessage(ne.data.buffer, [ne.data.buffer]);
12166
12170
  }
12167
12171
  }))) : be.data && (Y || s.push(be.data));
12168
12172
  });
@@ -12177,13 +12181,13 @@ var o0 = {}, sa = {
12177
12181
  Y = !1;
12178
12182
  };
12179
12183
  function D(q) {
12180
- if (!m) {
12184
+ if (!b) {
12181
12185
  q && q();
12182
12186
  return;
12183
12187
  }
12184
- m.addEventListener("message", function(te) {
12185
- te.data === null && (m.terminate(), m = null, q && q());
12186
- }), m.postMessage(null);
12188
+ b.addEventListener("message", function(te) {
12189
+ te.data === null && (b.terminate(), b = null, q && q());
12190
+ }), b.postMessage(null);
12187
12191
  }
12188
12192
  var s = [];
12189
12193
  this.stop = function(q) {
@@ -12249,11 +12253,11 @@ const oa = {
12249
12253
  handleFinish() {
12250
12254
  if (!this.blob)
12251
12255
  return;
12252
- const [, _] = this.blob.type.replace(/(;.*$)/, "").split("/"), r = new Date().getTime(), b = `${r}.${_}`, M = new File([this.blob], b, {
12256
+ const [, _] = this.blob.type.replace(/(;.*$)/, "").split("/"), r = new Date().getTime(), m = `${r}.${_}`, p = new File([this.blob], m, {
12253
12257
  type: this.blob.type,
12254
12258
  lastModified: r
12255
12259
  });
12256
- this.$emit("finish", [M]), this.$emit("cancel");
12260
+ this.$emit("finish", [p]), this.$emit("cancel");
12257
12261
  },
12258
12262
  handleCancel() {
12259
12263
  this.$emit("cancel");
@@ -12261,13 +12265,13 @@ const oa = {
12261
12265
  }
12262
12266
  };
12263
12267
  var la = function() {
12264
- var r = this, b = r._self._c;
12265
- return b("div", { staticClass: "wrap", style: {
12268
+ var r = this, m = r._self._c;
12269
+ return m("div", { staticClass: "wrap", style: {
12266
12270
  width: r.width
12267
- } }, [b("div", { staticClass: "record-video" }, [b("video", { ref: "video", staticClass: "video-item", attrs: { volume: 1, controls: "" }, domProps: { muted: !1 } }), b("div", { staticClass: "buttons" }, [r.pending ? b("a", { staticClass: "oper", attrs: { title: "停止录制" }, on: { click: r.stop } }, [b("inline-svg", { attrs: { src: r.icon.stop, width: 24, height: 24 } })], 1) : b("a", { staticClass: "oper", attrs: { title: "开始录制" }, on: { click: r.start } }, [b("inline-svg", { attrs: { src: r.icon.record, width: 24, height: 24 } })], 1), b("a", { staticClass: "btn", class: {
12271
+ } }, [m("div", { staticClass: "record-video" }, [m("video", { ref: "video", staticClass: "video-item", attrs: { volume: 1, controls: "" }, domProps: { muted: !1 } }), m("div", { staticClass: "buttons" }, [r.pending ? m("a", { staticClass: "oper", attrs: { title: "停止录制" }, on: { click: r.stop } }, [m("inline-svg", { attrs: { src: r.icon.stop, width: 24, height: 24 } })], 1) : m("a", { staticClass: "oper", attrs: { title: "开始录制" }, on: { click: r.start } }, [m("inline-svg", { attrs: { src: r.icon.record, width: 24, height: 24 } })], 1), m("a", { staticClass: "btn", class: {
12268
12272
  finish: !0,
12269
12273
  disabled: !r.blob
12270
- }, on: { click: r.handleFinish } }, [r._v("完成")]), b("a", { staticClass: "cancel btn", on: { click: r.handleCancel } }, [r._v("取消")])])]), b("div", { staticClass: "mask", on: { click: r.handleCancel } })]);
12274
+ }, on: { click: r.handleFinish } }, [r._v("完成")]), m("a", { staticClass: "cancel btn", on: { click: r.handleCancel } }, [r._v("取消")])])]), m("div", { staticClass: "mask", on: { click: r.handleCancel } })]);
12271
12275
  }, ua = [], ca = /* @__PURE__ */ zt(
12272
12276
  oa,
12273
12277
  la,
@@ -12310,14 +12314,14 @@ const fa = {
12310
12314
  ), this.url = this.$refs.canvas.toDataURL("image/jpeg");
12311
12315
  },
12312
12316
  handleFinish() {
12313
- const r = `${new Date().getTime()}.jpeg`, b = this.dataURLtoFile(this.url, r);
12314
- this.$emit("finish", [b]), this.$emit("cancel");
12317
+ const r = `${new Date().getTime()}.jpeg`, m = this.dataURLtoFile(this.url, r);
12318
+ this.$emit("finish", [m]), this.$emit("cancel");
12315
12319
  },
12316
12320
  dataURLtoFile(_, r) {
12317
- let b = _.split(","), M = b[0].match(/:(.*?);/)[1], J = atob(b[1]), Z = J.length, re = new Uint8Array(Z);
12321
+ let m = _.split(","), p = m[0].match(/:(.*?);/)[1], J = atob(m[1]), Z = J.length, re = new Uint8Array(Z);
12318
12322
  for (; Z--; )
12319
12323
  re[Z] = J.charCodeAt(Z);
12320
- return new File([re], r, { type: M });
12324
+ return new File([re], r, { type: p });
12321
12325
  },
12322
12326
  handleCancel() {
12323
12327
  this.$emit("cancel");
@@ -12325,13 +12329,13 @@ const fa = {
12325
12329
  }
12326
12330
  };
12327
12331
  var ha = function() {
12328
- var r = this, b = r._self._c;
12329
- return b("div", { staticClass: "wrap", style: {
12332
+ var r = this, m = r._self._c;
12333
+ return m("div", { staticClass: "wrap", style: {
12330
12334
  width: r.width
12331
- } }, [b("div", { staticClass: "record-video" }, [b("div", { staticClass: "record-content" }, [b("video", { ref: "video", staticClass: "video-item", attrs: { volume: 0, autoplay: "", controls: "" }, domProps: { muted: !0 } }), b("div", { staticClass: "img-item" }, [r.url ? b("img", { attrs: { src: r.url } }) : r._e()])]), b("canvas", { ref: "canvas", staticStyle: { display: "none" }, attrs: { width: "640", height: "480" } }), b("div", { staticClass: "buttons" }, [r.pending ? r._e() : b("a", { staticClass: "oper", attrs: { title: "拍照" }, on: { click: r.start } }, [b("inline-svg", { attrs: { src: r.icon.photo, width: 24, height: 24 } })], 1), b("a", { staticClass: "btn", class: {
12335
+ } }, [m("div", { staticClass: "record-video" }, [m("div", { staticClass: "record-content" }, [m("video", { ref: "video", staticClass: "video-item", attrs: { volume: 0, autoplay: "", controls: "" }, domProps: { muted: !0 } }), m("div", { staticClass: "img-item" }, [r.url ? m("img", { attrs: { src: r.url } }) : r._e()])]), m("canvas", { ref: "canvas", staticStyle: { display: "none" }, attrs: { width: "640", height: "480" } }), m("div", { staticClass: "buttons" }, [r.pending ? r._e() : m("a", { staticClass: "oper", attrs: { title: "拍照" }, on: { click: r.start } }, [m("inline-svg", { attrs: { src: r.icon.photo, width: 24, height: 24 } })], 1), m("a", { staticClass: "btn", class: {
12332
12336
  finish: !0,
12333
12337
  disabled: !r.url
12334
- }, on: { click: r.handleFinish } }, [r._v("完成")]), b("a", { staticClass: "cancel btn", on: { click: r.handleCancel } }, [r._v("取消")])])]), b("div", { staticClass: "mask", on: { click: r.handleCancel } })]);
12338
+ }, on: { click: r.handleFinish } }, [r._v("完成")]), m("a", { staticClass: "cancel btn", on: { click: r.handleCancel } }, [r._v("取消")])])]), m("div", { staticClass: "mask", on: { click: r.handleCancel } })]);
12335
12339
  }, va = [], _a = /* @__PURE__ */ zt(
12336
12340
  fa,
12337
12341
  ha,
@@ -12348,16 +12352,16 @@ const ba = {
12348
12352
  Popper: A0
12349
12353
  }
12350
12354
  };
12351
- var Ma = function() {
12352
- var r = this, b = r._self._c;
12353
- return b("Popper", { attrs: { trigger: "hover", options: {
12355
+ var pa = function() {
12356
+ var r = this, m = r._self._c;
12357
+ return m("Popper", { attrs: { trigger: "hover", options: {
12354
12358
  placement: "bottom",
12355
12359
  modifiers: { offset: { offset: "0px, 22px" } }
12356
- } } }, [r._t("default"), b("span", { attrs: { slot: "reference" }, slot: "reference" }, [r._t("trigger")], 2)], 2);
12357
- }, pa = [], ga = /* @__PURE__ */ zt(
12360
+ } } }, [r._t("default"), m("span", { attrs: { slot: "reference" }, slot: "reference" }, [r._t("trigger")], 2)], 2);
12361
+ }, Ma = [], ga = /* @__PURE__ */ zt(
12358
12362
  ba,
12359
- Ma,
12360
12363
  pa,
12364
+ Ma,
12361
12365
  !1,
12362
12366
  null,
12363
12367
  "7f00d874",
@@ -12426,15 +12430,15 @@ const ya = {
12426
12430
  icon: Zt,
12427
12431
  hash: Ct(),
12428
12432
  isMobile: g0() === "mobile",
12429
- titleFocus: !1,
12430
- modified: !1
12433
+ modified: !1,
12434
+ titleEmpty: !1
12431
12435
  };
12432
12436
  },
12433
12437
  computed: {
12434
12438
  curTag() {
12435
12439
  var r;
12436
12440
  const _ = this.tags.find(
12437
- (b) => b.created_at === this.note.tag_id
12441
+ (m) => m.created_at === this.note.tag_id
12438
12442
  );
12439
12443
  return {
12440
12444
  ..._,
@@ -12450,7 +12454,7 @@ const ya = {
12450
12454
  this.noteId = _.id, this.curNodes = JSON.parse(_.content), this.curNodes.length || this.curNodes.push({
12451
12455
  text: "",
12452
12456
  uuid: Ct()
12453
- });
12457
+ }), _.title || (this.titleEmpty = !0);
12454
12458
  } catch {
12455
12459
  }
12456
12460
  },
@@ -12469,7 +12473,7 @@ const ya = {
12469
12473
  },
12470
12474
  // 根据svg的icon名找到svg实体
12471
12475
  getSvgUrl(_) {
12472
- const r = y0.find((b) => b.name === _.icon);
12476
+ const r = y0.find((m) => m.name === _.icon);
12473
12477
  return (r == null ? void 0 : r.value) || "";
12474
12478
  },
12475
12479
  // 选择tag图标
@@ -12494,6 +12498,9 @@ const ya = {
12494
12498
  }
12495
12499
  });
12496
12500
  },
12501
+ handleTitleChange(_) {
12502
+ this.modified = !0, this.titleEmpty = !(_.target.innerText || "").replace(/\n/g, "");
12503
+ },
12497
12504
  // 标题enter输入
12498
12505
  handleTitleEnter(_) {
12499
12506
  _.preventDefault(), this.enableDbEnter ? this.timeout ? (clearTimeout(this.timeout), this.timeout = null, this.titleBlur(_), this.$emit("dbEnter")) : this.timeout = setTimeout(() => {
@@ -12506,7 +12513,7 @@ const ya = {
12506
12513
  handleTitlePaste(_) {
12507
12514
  if (_.clipboardData) {
12508
12515
  const r = _.clipboardData.items;
12509
- Array.from(r).some((M) => M.kind === "file") && (_.preventDefault(), this.$refs.treeEditor.addFiles(
12516
+ Array.from(r).some((p) => p.kind === "file") && (_.preventDefault(), this.$refs.treeEditor.addFiles(
12510
12517
  _.clipboardData.files,
12511
12518
  this.curNodes[0],
12512
12519
  -1
@@ -12530,9 +12537,9 @@ const ya = {
12530
12537
  cancelable: !0,
12531
12538
  key: "Tab",
12532
12539
  shiftKey: !0
12533
- }), b = (J = window.getSelection().baseNode) == null ? void 0 : J.parentNode;
12534
- const M = St.get("currentId");
12535
- !b && M && (b = Nt({ uuid: M })), b.dispatchEvent(_);
12540
+ }), m = (J = window.getSelection().baseNode) == null ? void 0 : J.parentNode;
12541
+ const p = St.get("currentId");
12542
+ !m && p && (m = Nt({ uuid: p })), m.dispatchEvent(_);
12536
12543
  },
12537
12544
  setToChild() {
12538
12545
  var J;
@@ -12541,9 +12548,9 @@ const ya = {
12541
12548
  cancelable: !0,
12542
12549
  key: "Tab",
12543
12550
  shiftKey: !1
12544
- }), b = (J = window.getSelection().baseNode) == null ? void 0 : J.parentNode;
12545
- const M = St.get("currentId");
12546
- !b && M && (b = Nt({ uuid: M })), b.dispatchEvent(_);
12551
+ }), m = (J = window.getSelection().baseNode) == null ? void 0 : J.parentNode;
12552
+ const p = St.get("currentId");
12553
+ !m && p && (m = Nt({ uuid: p })), m.dispatchEvent(_);
12547
12554
  },
12548
12555
  setToUp() {
12549
12556
  var J;
@@ -12552,9 +12559,9 @@ const ya = {
12552
12559
  cancelable: !0,
12553
12560
  key: "ArrowUp",
12554
12561
  shiftKey: !1
12555
- }), b = (J = window.getSelection().baseNode) == null ? void 0 : J.parentNode;
12556
- const M = St.get("currentId");
12557
- !b && M && (b = Nt({ uuid: M })), b.dispatchEvent(_);
12562
+ }), m = (J = window.getSelection().baseNode) == null ? void 0 : J.parentNode;
12563
+ const p = St.get("currentId");
12564
+ !m && p && (m = Nt({ uuid: p })), m.dispatchEvent(_);
12558
12565
  },
12559
12566
  setToDown() {
12560
12567
  var J;
@@ -12563,9 +12570,9 @@ const ya = {
12563
12570
  cancelable: !0,
12564
12571
  key: "ArrowDown",
12565
12572
  shiftKey: !1
12566
- }), b = (J = window.getSelection().baseNode) == null ? void 0 : J.parentNode;
12567
- const M = St.get("currentId");
12568
- !b && M && (b = Nt({ uuid: M })), b.dispatchEvent(_);
12573
+ }), m = (J = window.getSelection().baseNode) == null ? void 0 : J.parentNode;
12574
+ const p = St.get("currentId");
12575
+ !m && p && (m = Nt({ uuid: p })), m.dispatchEvent(_);
12569
12576
  },
12570
12577
  handleComplete() {
12571
12578
  this.$emit(this.modified ? "complete" : "cancel");
@@ -12585,8 +12592,8 @@ const ya = {
12585
12592
  handleFileUpload(_, r) {
12586
12593
  if (!_.length)
12587
12594
  return;
12588
- const b = Array.from(_).map((M) => {
12589
- const J = T0(M.type), Z = URL.createObjectURL(M);
12595
+ const m = Array.from(_).map((p) => {
12596
+ const J = T0(p.type), Z = URL.createObjectURL(p);
12590
12597
  switch (J.mainType) {
12591
12598
  case "image":
12592
12599
  case "audio":
@@ -12602,19 +12609,19 @@ const ya = {
12602
12609
  return {
12603
12610
  uuid: Ct(),
12604
12611
  type: "file",
12605
- name: M.name,
12612
+ name: p.name,
12606
12613
  content: Z,
12607
- size: M.size,
12614
+ size: p.size,
12608
12615
  pending: !0,
12609
12616
  hash: this.hash
12610
12617
  };
12611
12618
  }
12612
12619
  });
12613
- r ? r(b) : b.forEach((M) => {
12614
- this.$refs.treeEditor.appendNode(M);
12615
- }), x0.uploadFile(_, (M, J) => {
12620
+ r ? r(m) : m.forEach((p) => {
12621
+ this.$refs.treeEditor.appendNode(p);
12622
+ }), x0.uploadFile(_, (p, J) => {
12616
12623
  J && J.forEach((Z, re) => {
12617
- const ie = b[re], ye = Z.data;
12624
+ const ie = m[re], ye = Z.data;
12618
12625
  if (Z.code === 0) {
12619
12626
  const { pending: Re, hash: ke, ...Oe } = ie;
12620
12627
  switch (Oe.content = ye.url, this.$refs.treeEditor.updateNode(Oe), ie.type) {
@@ -12635,51 +12642,45 @@ const ya = {
12635
12642
  }
12636
12643
  };
12637
12644
  var xa = function() {
12638
- var r = this, b = r._self._c;
12639
- return b("div", { class: {
12645
+ var r = this, m = r._self._c;
12646
+ return m("div", { class: {
12640
12647
  "record-tree": !0,
12641
12648
  "record-tree-mobile": r.isMobile
12642
- }, on: { mouseenter: r.hideHoverNote } }, [r._t("default"), b("div", { staticClass: "record-tree-title-bar" }, [r.tags.length ? b("Picker", { scopedSlots: r._u([r.readOnly ? null : { key: "default", fn: function() {
12643
- return [b("div", { staticClass: "record-tree-popper-content", style: { width: r.tagConfig.popW, height: r.tagConfig.popH } }, r._l(r.tags, function(M, J) {
12644
- return b("span", { key: J, staticClass: "record-tree-popper-content-item", on: { click: function(Z) {
12645
- return r.tagSelect(M);
12646
- } } }, [r.getSvgUrl(M) ? b("inline-svg", { staticClass: "record-tree-svg", style: { backgroundColor: M.color }, attrs: { src: r.getSvgUrl(M), width: r.tagConfig.tagSize, height: r.tagConfig.tagSize } }) : b("span", { staticClass: "record-tree-empty-icon", style: {
12649
+ }, 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() {
12650
+ return [m("div", { staticClass: "record-tree-popper-content", style: { width: r.tagConfig.popW, height: r.tagConfig.popH } }, r._l(r.tags, function(p, J) {
12651
+ return m("span", { key: J, staticClass: "record-tree-popper-content-item", on: { click: function(Z) {
12652
+ return r.tagSelect(p);
12653
+ } } }, [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: {
12647
12654
  width: r.tagConfig.tagSize + "px",
12648
12655
  height: r.tagConfig.tagSize + "px",
12649
- backgroundColor: M.color
12656
+ backgroundColor: p.color
12650
12657
  } })], 1);
12651
12658
  }), 0)];
12652
12659
  }, proxy: !0 }, { key: "trigger", fn: function() {
12653
- return [b("span", { staticClass: "record-tree-popper-reference", style: {
12660
+ return [m("span", { staticClass: "record-tree-popper-reference", style: {
12654
12661
  backgroundColor: r.curTag.color,
12655
12662
  top: r.tagConfig.tagT,
12656
12663
  left: r.tagConfig.tagL
12657
- } }, [r.curTag.icon ? b("inline-svg", { staticClass: "record-tree-svg", attrs: { src: r.curTag.icon, width: r.tagConfig.tagSize, height: r.tagConfig.tagSize } }) : b("span", { staticClass: "record-tree-svg", style: {
12664
+ } }, [r.curTag.icon ? m("inline-svg", { staticClass: "record-tree-svg", attrs: { src: r.curTag.icon, width: r.tagConfig.tagSize, height: r.tagConfig.tagSize } }) : m("span", { staticClass: "record-tree-svg", style: {
12658
12665
  width: r.tagConfig.tagSize + "px",
12659
12666
  height: r.tagConfig.tagSize + "px",
12660
12667
  backgroundColor: r.curTag.color
12661
12668
  } })], 1)];
12662
- }, proxy: !0 }], null, !0) }) : r._e(), r.isMobile && !r.note.title && !r.titleFocus ? b("div", { staticClass: "record-tree-placeholder", on: { click: function(M) {
12669
+ }, proxy: !0 }], null, !0) }) : r._e(), r.isMobile && r.titleEmpty ? m("div", { staticClass: "record-tree-placeholder", on: { click: function(p) {
12663
12670
  return r.$refs.treeTitle.focus();
12664
- } } }, [r._v(" 点击此处开始编辑 ")]) : r._e(), b("div", { ref: "treeTitle", staticClass: "record-tree-title", attrs: { contenteditable: !r.readOnly, id: "tree_title" }, domProps: { innerHTML: r._s(r.note.title) }, on: { blur: r.titleBlur, click: function(M) {
12665
- M.stopPropagation();
12666
- }, keydown: function(M) {
12667
- return !M.type.indexOf("key") && r._k(M.keyCode, "enter", 13, M.key, "Enter") ? null : (M.preventDefault(), r.handleTitleEnter.apply(null, arguments));
12668
- }, keyup: function(M) {
12669
- r.modified = !0;
12670
- }, paste: r.handleTitlePaste, dragover: r.handleDragoverTitle, focusin: function(M) {
12671
- r.titleFocus = !0;
12672
- }, focusout: function(M) {
12673
- r.titleFocus = !1;
12674
- } } })], 1), b("div", { staticClass: "record-tree-main" }, [b("div", { attrs: { id: "root_tree" } }, [b("TreeEditor", { ref: "treeEditor", attrs: { nodes: r.curNodes, readOnly: r.readOnly, enableDbEnter: r.enableDbEnter, hash: r.hash, isMobile: r.isMobile }, on: { change: r.handleChangeNodes, fileUpload: r.handleFileUpload, dbEnter: function(M) {
12671
+ } } }, [r._v(" 请输入标题 ")]) : r._e(), m("div", { ref: "treeTitle", staticClass: "record-tree-title", attrs: { contenteditable: !r.readOnly, id: "tree_title" }, domProps: { innerHTML: r._s(r.note.title) }, on: { blur: r.titleBlur, click: function(p) {
12672
+ p.stopPropagation();
12673
+ }, keydown: function(p) {
12674
+ return !p.type.indexOf("key") && r._k(p.keyCode, "enter", 13, p.key, "Enter") ? null : (p.preventDefault(), r.handleTitleEnter.apply(null, arguments));
12675
+ }, keyup: r.handleTitleChange, paste: r.handleTitlePaste, dragover: r.handleDragoverTitle } })], 1), m("div", { staticClass: "record-tree-main" }, [m("div", { attrs: { id: "root_tree" } }, [m("TreeEditor", { ref: "treeEditor", attrs: { nodes: r.curNodes, readOnly: r.readOnly, enableDbEnter: r.enableDbEnter, hash: r.hash, isMobile: r.isMobile }, on: { change: r.handleChangeNodes, fileUpload: r.handleFileUpload, dbEnter: function(p) {
12675
12676
  return r.$emit("dbEnter");
12676
- } } })], 1)]), r.bar ? b("div", { staticClass: "record-tree-options" }, [b("div", { staticClass: "record-tree-option-left" }, [b("div", { staticClass: "record-tree-option-item", attrs: { title: "左缩进" }, on: { click: r.setToParent } }, [b("inline-svg", { attrs: { src: r.icon.left, width: 20, height: 20 } })], 1), b("div", { staticClass: "record-tree-option-item", attrs: { title: "右缩进" }, on: { click: r.setToChild } }, [b("inline-svg", { attrs: { src: r.icon.right, width: 20, height: 20 } })], 1), b("div", { staticClass: "record-tree-option-item", attrs: { title: "上移" }, on: { click: r.setToUp } }, [b("inline-svg", { attrs: { src: r.icon.up, width: 20, height: 20 } })], 1), b("div", { staticClass: "record-tree-option-item", attrs: { title: "移动" }, on: { click: r.setToDown } }, [b("inline-svg", { attrs: { src: r.icon.down, width: 20, height: 20 } })], 1), b("div", { staticClass: "record-tree-option-item", attrs: { title: "添加附件" }, on: { click: r.handleSelectFile } }, [b("inline-svg", { attrs: { src: r.icon.attach, width: 20, height: 20 } })], 1), b("div", { staticClass: "record-tree-option-item", attrs: { title: "录制音频" }, on: { click: r.handleRecordAudio } }, [b("inline-svg", { attrs: { src: r.icon.audio, width: 20, height: 20 } })], 1), b("div", { staticClass: "record-tree-option-item", attrs: { title: "录制视频" }, on: { click: r.handleRecordVideo } }, [b("inline-svg", { attrs: { src: r.icon.video, width: 20, height: 20 } })], 1), b("div", { staticClass: "record-tree-option-item", attrs: { title: "拍照" }, on: { click: r.handleRecordPhoto } }, [b("inline-svg", { attrs: { src: r.icon.photo, width: 20, height: 20 } })], 1)]), r.isMobile ? b("div", { staticClass: "record-tree-option-right" }, [b("div", { staticClass: "record-tree-option-item", on: { click: function(M) {
12677
- return M.stopPropagation(), r.handleComplete.apply(null, arguments);
12678
- } } }, [r._v(" " + r._s(r.modified || r.note.id ? "完成" : "取消") + " ")])]) : r._e(), b("div", { staticStyle: { display: "none" } }, [b("input", { ref: "selectFile", attrs: { type: "file" }, on: { change: (M) => r.handleFileUpload(M.target.files) } }), b("input", { ref: "selectPhoto", attrs: { type: "file", accept: "image/*", capture: "camera" }, on: { change: (M) => r.handleFileUpload(M.target.files) } }), b("input", { ref: "selectVideo", attrs: { type: "file", accept: "video/*", capture: "camcorder" }, on: { change: (M) => r.handleFileUpload(M.target.files) } })])]) : r._e(), r.recordAudioVisible ? b("RecordAudio", { attrs: { isMobile: r.isMobile }, on: { finish: r.handleFileUpload, cancel: function(M) {
12677
+ } } })], 1)]), r.bar ? m("div", { staticClass: "record-tree-options" }, [m("div", { staticClass: "record-tree-option-left" }, [m("div", { staticClass: "record-tree-option-item", attrs: { title: "左缩进" }, on: { click: r.setToParent } }, [m("inline-svg", { attrs: { src: r.icon.left, width: 20, height: 20 } })], 1), m("div", { staticClass: "record-tree-option-item", attrs: { title: "右缩进" }, on: { click: r.setToChild } }, [m("inline-svg", { attrs: { src: r.icon.right, width: 20, height: 20 } })], 1), m("div", { staticClass: "record-tree-option-item", attrs: { title: "上移" }, on: { click: r.setToUp } }, [m("inline-svg", { attrs: { src: r.icon.up, width: 20, height: 20 } })], 1), m("div", { staticClass: "record-tree-option-item", attrs: { title: "移动" }, on: { click: r.setToDown } }, [m("inline-svg", { attrs: { src: r.icon.down, width: 20, height: 20 } })], 1), m("div", { staticClass: "record-tree-option-item", attrs: { title: "添加附件" }, on: { click: r.handleSelectFile } }, [m("inline-svg", { attrs: { src: r.icon.attach, width: 20, height: 20 } })], 1), m("div", { staticClass: "record-tree-option-item", attrs: { title: "录制音频" }, on: { click: r.handleRecordAudio } }, [m("inline-svg", { attrs: { src: r.icon.audio, width: 20, height: 20 } })], 1), m("div", { staticClass: "record-tree-option-item", attrs: { title: "录制视频" }, on: { click: r.handleRecordVideo } }, [m("inline-svg", { attrs: { src: r.icon.video, width: 20, height: 20 } })], 1), m("div", { staticClass: "record-tree-option-item", attrs: { title: "拍照" }, on: { click: r.handleRecordPhoto } }, [m("inline-svg", { attrs: { src: r.icon.photo, width: 20, height: 20 } })], 1)]), r.isMobile ? m("div", { staticClass: "record-tree-option-right" }, [m("div", { staticClass: "record-tree-option-item", on: { click: function(p) {
12678
+ return p.stopPropagation(), r.handleComplete.apply(null, arguments);
12679
+ } } }, [r._v(" " + r._s(r.modified || r.note.id ? "完成" : "取消") + " ")])]) : r._e(), m("div", { staticStyle: { display: "none" } }, [m("input", { ref: "selectFile", attrs: { type: "file" }, on: { change: (p) => r.handleFileUpload(p.target.files) } }), m("input", { ref: "selectPhoto", attrs: { type: "file", accept: "image/*", capture: "camera" }, on: { change: (p) => r.handleFileUpload(p.target.files) } }), m("input", { ref: "selectVideo", attrs: { type: "file", accept: "video/*", capture: "camcorder" }, on: { change: (p) => r.handleFileUpload(p.target.files) } })])]) : r._e(), r.recordAudioVisible ? m("RecordAudio", { attrs: { isMobile: r.isMobile }, on: { finish: r.handleFileUpload, cancel: function(p) {
12679
12680
  r.recordAudioVisible = !1;
12680
- } } }) : r._e(), r.recordVideoVisible ? b("RecordVideo", { on: { finish: r.handleFileUpload, cancel: function(M) {
12681
+ } } }) : r._e(), r.recordVideoVisible ? m("RecordVideo", { on: { finish: r.handleFileUpload, cancel: function(p) {
12681
12682
  r.recordVideoVisible = !1;
12682
- } } }) : r._e(), r.recordPhotoVisible ? b("RecordPhoto", { on: { finish: r.handleFileUpload, cancel: function(M) {
12683
+ } } }) : r._e(), r.recordPhotoVisible ? m("RecordPhoto", { on: { finish: r.handleFileUpload, cancel: function(p) {
12683
12684
  r.recordPhotoVisible = !1;
12684
12685
  } } }) : r._e()], 2);
12685
12686
  }, Aa = [], Da = /* @__PURE__ */ zt(