makethisbetter 1.5.2 → 1.5.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.
- package/dist/makethisbetter.cjs +8 -8
- package/dist/makethisbetter.cjs.map +1 -1
- package/dist/makethisbetter.esm.js +32 -32
- package/dist/makethisbetter.esm.js.map +1 -1
- package/dist/makethisbetter.js +8 -8
- package/dist/makethisbetter.js.map +1 -1
- package/dist/widget/controller.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/popup/success.ts +2 -2
- package/src/styles/widget.css +49 -28
- package/src/widget/controller.ts +1 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const bt = '*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}:host{all:initial;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-size:14px;line-height:1.5;color:#191a1c;-webkit-font-smoothing:antialiased}:host([data-mtb-theme="dark"]) .mtb-popup,:host([data-mtb-theme="dark"]) .mtb-success{background:#151719;border-color:#ffffff1f;color:#f9fafb}:host([data-mtb-theme="dark"]) .mtb-popup-header{border-bottom-color:#ffffff1a}:host([data-mtb-theme="dark"]) .mtb-popup-title,:host([data-mtb-theme="dark"]) .mtb-success-title{color:#f9fafb}:host([data-mtb-theme="dark"]) .mtb-quick-option,:host([data-mtb-theme="dark"]) .mtb-textarea{background:#1f2327;border-color:#ffffff1f;color:#f9fafb}:host([data-mtb-theme="dark"]) .mtb-popup-close,:host([data-mtb-theme="dark"]) .mtb-success-msg,:host([data-mtb-theme="dark"]) .mtb-close-link{color:#ffffffad}@media (prefers-color-scheme: dark){:host([data-mtb-theme="auto"]) .mtb-popup,:host([data-mtb-theme="auto"]) .mtb-success{background:#151719;border-color:#ffffff1f;color:#f9fafb}:host([data-mtb-theme="auto"]) .mtb-popup-header{border-bottom-color:#ffffff1a}:host([data-mtb-theme="auto"]) .mtb-popup-title,:host([data-mtb-theme="auto"]) .mtb-success-title{color:#f9fafb}:host([data-mtb-theme="auto"]) .mtb-quick-option,:host([data-mtb-theme="auto"]) .mtb-textarea{background:#1f2327;border-color:#ffffff1f;color:#f9fafb}:host([data-mtb-theme="auto"]) .mtb-popup-close,:host([data-mtb-theme="auto"]) .mtb-success-msg,:host([data-mtb-theme="auto"]) .mtb-close-link{color:#ffffffad}}.mtb-tab{position:fixed;top:50%;right:0;transform:translateY(-50%);z-index:2147483646;display:flex;align-items:center;justify-content:center;width:32px;padding:14px 0;background:#059669;color:#fff;border-radius:8px 0 0 8px;cursor:pointer;box-shadow:-2px 0 14px #05966959;transition:background .15s,box-shadow .15s,width .15s;writing-mode:vertical-lr;text-orientation:mixed;font-size:12px;font-weight:600;letter-spacing:.04em;user-select:none;border:none;outline:none}.mtb-tab.left{right:auto;left:0;border-radius:0 8px 8px 0;box-shadow:2px 0 14px #05966959}.mtb-tab:hover{background:#047857;box-shadow:-3px 0 20px #05966980}.mtb-tab.active{background:#065f46}.mtb-toolbar{position:fixed;top:18px;left:50%;transform:translate(-50%);z-index:2147483647;display:flex;align-items:center;gap:11px;height:46px;padding:0 7px;border-radius:13px;background:linear-gradient(120deg,#10b981,#059669);box-shadow:0 10px 26px #0f172a38;animation:mtbBarIn .2s ease;white-space:nowrap}@keyframes mtbBarIn{0%{transform:translate(-50%,12px);opacity:0}to{transform:translate(-50%);opacity:1}}.mtb-toolbar-modes{display:flex;align-items:center;gap:3px;background:#ffffff29;border-radius:9px;padding:3px}.mtb-toolbar-mode-btn{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 12px;border-radius:7px;border:none;cursor:pointer;font-family:inherit;font-size:12px;font-weight:550;white-space:nowrap;background:transparent;color:#fffffff2;transition:all .12s}.mtb-toolbar-mode-btn.active{background:#fff;color:#047857}.mtb-toolbar-hint{font-size:12px;color:#fffffff2;white-space:nowrap}.mtb-toolbar-sep{width:1px;height:20px;background:#ffffff38}.mtb-exit-btn{display:inline-flex;align-items:center;gap:5px;height:30px;padding:0 12px;border-radius:8px;font-size:11.5px;font-weight:500;color:#fff;cursor:pointer;background:#ffffff29;border:none;font-family:inherit;transition:background .12s}.mtb-exit-btn:hover{background:#ffffff47}.mtb-overlay{position:fixed;inset:0;z-index:2147483640;cursor:crosshair}.mtb-dim{position:fixed;inset:0;z-index:2147483639;background:#00000014}.mtb-highlight{position:fixed;z-index:2147483641;pointer-events:none;border:2px solid #10b981;border-radius:6px;background:#10b9810f;transition:all .08s ease}.mtb-highlight-tooltip{position:fixed;z-index:2147483642;pointer-events:none;transform:translate(-50%);background:#064e3b;color:#fff;padding:4px 10px;border-radius:6px;font-size:11px;font-weight:500;white-space:nowrap;box-shadow:0 4px 12px #0000002e}.mtb-highlight-tooltip:after{content:"";position:absolute;top:100%;left:50%;transform:translate(-50%);border:4px solid transparent;border-top-color:#064e3b}.mtb-draw-svg{position:fixed;inset:0;z-index:2147483643;pointer-events:none;width:100%;height:100%;overflow:visible}.mtb-pin{position:fixed;z-index:2147483644;pointer-events:none;width:22px;height:22px;border-radius:50% 50% 50% 2px;background:#059669;border:2px solid #fff;display:flex;align-items:center;justify-content:center;font-size:10px;color:#fff;font-weight:700;box-shadow:0 2px 8px #05966973;animation:mtbPinPop .25s cubic-bezier(.34,1.56,.64,1);transform:translate(-50%,-50%)}@keyframes mtbPinPop{0%{transform:translate(-50%,-50%) scale(.4)}to{transform:translate(-50%,-50%) scale(1)}}.mtb-popup{position:fixed;z-index:2147483645;width:320px;background:#fff;border:1px solid rgba(0,0,0,.1);border-radius:14px;box-shadow:0 12px 40px #00000029;overflow:hidden;animation:mtbSlideUp .28s cubic-bezier(.34,1.56,.64,1);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}@keyframes mtbSlideUp{0%{transform:translateY(14px) scale(.97);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}.mtb-popup-header{padding:11px 13px 11px 14px;border-bottom:1px solid rgba(0,0,0,.06);display:flex;align-items:center;gap:8px}.mtb-popup-icon{width:20px;height:20px;border-radius:5px;background:#10b9811a;display:flex;align-items:center;justify-content:center;flex-shrink:0}.mtb-popup-title{flex:1;font-size:12.5px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#191a1c}.mtb-popup-close{background:none;border:none;cursor:pointer;padding:3px;color:#00000061;display:flex;align-items:center;border-radius:4px;transition:color .12s}.mtb-popup-close:hover{color:#000000b3}.mtb-popup-body{padding:13px}.mtb-quick-options{display:flex;flex-direction:column;gap:6px;margin-bottom:12px}.mtb-quick-option{display:flex;align-items:center;gap:10px;width:100%;padding:10px 12px;border:1px solid rgba(0,0,0,.09);border-radius:10px;background:#fafafa;cursor:pointer;font-family:inherit;font-size:13px;color:#191a1c;text-align:left;transition:all .12s}.mtb-quick-option:hover{background:#10b9810f;border-color:#10b9814d}.mtb-quick-option-emoji{font-size:15px;flex-shrink:0;line-height:1}.mtb-textarea-wrap{position:relative}.mtb-textarea{width:100%;height:64px;padding:9px 11px;border:1px solid rgba(0,0,0,.12);border-radius:9px;font-family:inherit;font-size:12.5px;line-height:1.5;color:#191a1c;outline:none;background:#fff;resize:none;transition:border-color .12s,box-shadow .12s}.mtb-textarea:focus{border-color:#10b981;box-shadow:0 0 0 3px #10b9811f}.mtb-textarea::placeholder{color:#00000057}.mtb-popup-error{margin-top:8px;color:#b91c1c;font-size:11.5px}.mtb-popup-error:empty,.mtb-popup-error[hidden]{display:none}.mtb-popup-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}.mtb-cancel-btn,.mtb-submit-btn{min-width:72px;height:30px;border:none;border-radius:7px;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0 12px;font-family:inherit;font-size:12px;font-weight:600;transition:background .12s}.mtb-cancel-btn{background:#f3f4f6;color:#000000ad}.mtb-cancel-btn:hover{background:#e5e7eb}.mtb-submit-btn{background:#d1d5db;color:#fff}.mtb-submit-btn.ready{background:#059669}.mtb-submit-btn.ready:hover{background:#047857}.mtb-submit-btn.loading{background:#059669;opacity:.7;cursor:wait}.mtb-submit-btn:disabled{cursor:not-allowed}.mtb-success{position:fixed;z-index:2147483645;width:300px;background:#fff;border:1px solid rgba(0,0,0,.1);border-radius:16px;box-shadow:0 20px 60px #0000001f;padding:26px 22px;text-align:center;animation:mtbSlideUp .35s cubic-bezier(.34,1.56,.64,1);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.mtb-success-icon{width:44px;height:44px;border-radius:50%;background:#05966914;display:flex;align-items:center;justify-content:center;margin:0 auto 12px}.mtb-success-title{font-size:16px;font-weight:700;margin-bottom:6px;color:#191a1c}.mtb-success-msg{font-size:13px;color:#0000008c;margin-bottom:16px;line-height:1.6}.mtb-close-link{background:none;border:none;cursor:pointer;font-size:12px;color:#00000073;font-family:inherit;transition:color .12s}.mtb-close-link:hover{color:#000000b3}.mtb-email-capture{margin-bottom:14px;text-align:left}.mtb-email-prompt{font-size:12px;color:#0000008c;line-height:1.5;margin-bottom:8px}.mtb-email-row{display:flex;gap:6px}.mtb-email-input{flex:1;min-width:0;font-size:12.5px;font-family:inherit;padding:7px 10px;border:1px solid rgba(0,0,0,.14);border-radius:8px;outline:none}.mtb-email-input:focus{border-color:#059669}.mtb-email-input.mtb-email-invalid{border-color:#dc2626}.mtb-email-submit{font-size:12px;font-weight:600;font-family:inherit;color:#fff;background:#059669;border:none;border-radius:8px;padding:7px 12px;cursor:pointer;white-space:nowrap}.mtb-email-submit:disabled{opacity:.6;cursor:default}.mtb-email-error{font-size:11.5px;color:#dc2626;margin-top:6px}.mtb-email-saved{font-size:12px;color:#059669;line-height:1.5}.mtb-my-feedback{display:block;margin:8px auto 0;background:none;border:none;cursor:pointer;font-size:11.5px;font-family:inherit;color:#0006;text-decoration:underline;text-underline-offset:2px;transition:color .12s}.mtb-my-feedback:hover{color:#059669}.mtb-pet{position:fixed;bottom:20px;right:20px;z-index:2147483646;cursor:pointer;width:52px;height:52px;display:flex;align-items:center;justify-content:center;border-radius:50%;background:transparent;animation:mtbPetBounce 3s ease-in-out infinite;transition:transform .2s;user-select:none;outline:none;filter:drop-shadow(0 4px 12px rgba(5,150,105,.35))}.mtb-pet:hover{transform:scale(1.12);animation-play-state:paused}.mtb-pet:hover .mtb-pet-bubble{opacity:1;transform:translate(-50%) translateY(0);pointer-events:auto}.mtb-pet.active{animation:none;opacity:.6}.mtb-pet-svg{display:block}@keyframes mtbPetBounce{0%,to{transform:translateY(0)}50%{transform:translateY(-6px)}}.mtb-pet-bubble{position:absolute;bottom:100%;left:50%;transform:translate(-50%) translateY(4px);margin-bottom:8px;background:#064e3b;color:#fff;padding:6px 12px;border-radius:8px;font-size:12px;font-weight:500;white-space:nowrap;box-shadow:0 4px 14px #0000002e;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s}.mtb-pet-bubble.visible{opacity:1;transform:translate(-50%) translateY(0);pointer-events:auto}.mtb-pet-bubble.hidden{opacity:0;pointer-events:none}.mtb-pet-bubble:after{content:"";position:absolute;top:100%;left:50%;transform:translate(-50%);border:5px solid transparent;border-top-color:#064e3b}.mtb-frustration-prompt{position:fixed;bottom:20px;right:20px;z-index:2147483645;display:flex;align-items:center;gap:10px;padding:12px 16px;background:#fff;border:1px solid rgba(0,0,0,.1);border-radius:12px;box-shadow:0 8px 30px #0000001f;animation:mtbSlideUp .35s cubic-bezier(.34,1.56,.64,1);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}:host([data-mtb-theme="dark"]) .mtb-frustration-prompt{background:#151719;border-color:#ffffff1f;color:#f9fafb}@media (prefers-color-scheme: dark){:host([data-mtb-theme="auto"]) .mtb-frustration-prompt{background:#151719;border-color:#ffffff1f;color:#f9fafb}}.mtb-frustration-icon{width:32px;height:32px;border-radius:50%;background:#eab3081a;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:16px;line-height:1}.mtb-frustration-text{font-size:13px;font-weight:500;color:inherit;line-height:1.4}.mtb-frustration-actions{display:flex;gap:6px;flex-shrink:0}.mtb-frustration-tell{height:28px;padding:0 12px;border:none;border-radius:7px;background:#059669;color:#fff;cursor:pointer;font-family:inherit;font-size:12px;font-weight:600;transition:background .12s}.mtb-frustration-tell:hover{background:#047857}.mtb-frustration-dismiss{height:28px;padding:0 8px;border:none;border-radius:7px;background:transparent;color:#0006;cursor:pointer;font-family:inherit;font-size:12px;transition:color .12s}.mtb-frustration-dismiss:hover{color:#000000b3}:host([data-mtb-theme="dark"]) .mtb-frustration-dismiss{color:#fff6}:host([data-mtb-theme="dark"]) .mtb-frustration-dismiss:hover{color:#ffffffb3}@media (prefers-color-scheme: dark){:host([data-mtb-theme="auto"]) .mtb-frustration-dismiss{color:#fff6}:host([data-mtb-theme="auto"]) .mtb-frustration-dismiss:hover{color:#ffffffb3}}.mtb-record-bar{position:fixed;bottom:24px;left:50%;transform:translate(-50%);z-index:2147483647;display:flex;align-items:center;gap:12px;height:42px;padding:0 8px 0 14px;border-radius:12px;background:#0f172aeb;box-shadow:0 8px 24px #00000040;animation:mtbBarIn .2s ease}.mtb-record-dot{width:8px;height:8px;border-radius:50%;background:#ef4444;animation:mtbRecordPulse 1.2s ease-in-out infinite;flex-shrink:0}@keyframes mtbRecordPulse{0%,to{opacity:1}50%{opacity:.3}}.mtb-record-timer{font-family:JetBrains Mono,SF Mono,Fira Code,Cascadia Code,monospace;font-size:13px;font-weight:500;color:#fff;font-variant-numeric:tabular-nums;letter-spacing:.02em;min-width:38px}.mtb-record-stop{height:28px;padding:0 14px;border:none;border-radius:7px;background:#059669;color:#fff;cursor:pointer;font-family:inherit;font-size:12px;font-weight:600;transition:background .12s}.mtb-record-stop:hover{background:#047857}.mtb-click-ripple{position:fixed;z-index:2147483644;width:24px;height:24px;border-radius:50%;border:2px solid #10b981;background:#10b98133;pointer-events:none;transform:translate(-50%,-50%) scale(.5);animation:mtbClickRipple .3s ease-out forwards}@keyframes mtbClickRipple{0%{transform:translate(-50%,-50%) scale(.5);opacity:1}to{transform:translate(-50%,-50%) scale(2);opacity:0}}.mtb-dot{display:inline-block;width:4px;height:4px;border-radius:50%;background:#fff;animation:mtbDot 1.2s infinite}.mtb-dot:nth-child(2){animation-delay:.2s}.mtb-dot:nth-child(3){animation-delay:.4s}@keyframes mtbDot{0%,80%,to{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}.mtb-clarify{position:fixed;z-index:2147483645;width:346px;background:#fff;border:1px solid rgba(0,0,0,.1);border-radius:14px;box-shadow:0 12px 40px #00000029;display:flex;flex-direction:column;animation:mtbSlideUp .28s cubic-bezier(.34,1.56,.64,1);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;overflow:hidden}.mtb-clarify-header{padding:11px 13px 11px 14px;display:flex;align-items:center;gap:9px;border-bottom:1px solid rgba(0,0,0,.06)}.mtb-clarify-icon{width:24px;height:24px;border-radius:7px;background:linear-gradient(140deg,#10b981,#059669);box-shadow:0 1px 3px #05966966;display:flex;align-items:center;justify-content:center;flex-shrink:0}.mtb-clarify-titles{flex:1;min-width:0}.mtb-clarify-title{font-size:12.5px;font-weight:650;line-height:1.2;color:#191a1c}.mtb-clarify-subtitle{font-size:10px;color:#0000006b}.mtb-clarify-close{background:none;border:none;cursor:pointer;padding:3px;color:#00000061;display:flex;transition:color .12s}.mtb-clarify-close:hover{color:#000000b3}.mtb-clarify-messages{flex:1;max-height:250px;overflow-y:auto;padding:13px 13px 5px;display:flex;flex-direction:column;gap:9px}.mtb-clarify-bubble{max-width:82%;padding:9px 12px;font-size:12.5px;line-height:1.5;white-space:pre-wrap;word-break:break-word}.mtb-clarify-ai{align-self:flex-start;background:#fff;color:#191a1c;border:1px solid rgba(0,0,0,.09);border-radius:13px 13px 13px 4px}.mtb-clarify-user{align-self:flex-end;background:#059669;color:#fff;border:1px solid #059669;border-radius:13px 13px 4px}.mtb-clarify-thinking{display:flex;align-items:center;gap:4px;padding:11px 14px}.mtb-clarify-thinking .mtb-dot{width:6px;height:6px;background:#059669b3}.mtb-clarify-footer{padding:3px 13px 13px;display:flex;flex-direction:column}.mtb-clarify-input{width:100%;height:52px;padding:9px 11px;border:1px solid rgba(0,0,0,.12);border-radius:9px;font-family:inherit;font-size:13px;line-height:1.5;color:#191a1c;outline:none;background:#fafafa;resize:none;box-sizing:border-box;transition:border-color .12s,box-shadow .12s,background .12s}.mtb-clarify-input:focus{border-color:#10b981;box-shadow:0 0 0 3px #10b9811f;background:#fff}.mtb-clarify-input::placeholder{color:#00000057}.mtb-clarify-actions{display:flex;gap:8px;margin-top:9px}.mtb-clarify-skip{flex:0 0 auto;height:34px;padding:0 14px;border:1px solid rgba(0,0,0,.12);border-radius:9px;background:#fff;cursor:pointer;font-family:inherit;font-size:12.5px;font-weight:550;color:#0000008c;transition:background .12s}.mtb-clarify-skip:hover{background:#0000000a}.mtb-clarify-send{flex:1;height:34px;display:inline-flex;align-items:center;justify-content:center;gap:6px;border:none;border-radius:9px;background:#059669;color:#fff;cursor:pointer;font-family:inherit;font-size:12.5px;font-weight:600;transition:background .12s}.mtb-clarify-send:not(:disabled):hover{background:#047857}.mtb-clarify-send:disabled{background:#00000026;cursor:not-allowed}:host([data-mtb-theme="dark"]) .mtb-clarify{background:#151719;border-color:#ffffff1f;color:#f9fafb}:host([data-mtb-theme="dark"]) .mtb-clarify-header{border-bottom-color:#ffffff1a}:host([data-mtb-theme="dark"]) .mtb-clarify-title{color:#f9fafb}:host([data-mtb-theme="dark"]) .mtb-clarify-subtitle{color:#ffffff73}:host([data-mtb-theme="dark"]) .mtb-clarify-close{color:#ffffff73}:host([data-mtb-theme="dark"]) .mtb-clarify-close:hover{color:#ffffffbf}:host([data-mtb-theme="dark"]) .mtb-clarify-skip{background:#1f2327;border-color:#ffffff24;color:#ffffffb3}:host([data-mtb-theme="dark"]) .mtb-clarify-skip:hover{background:#ffffff0f}:host([data-mtb-theme="dark"]) .mtb-clarify-ai{background:#1f2327;border-color:#ffffff1f;color:#f9fafb}:host([data-mtb-theme="dark"]) .mtb-clarify-input{background:#1f2327;border-color:#ffffff1f;color:#f9fafb}@media (prefers-color-scheme: dark){:host([data-mtb-theme="auto"]) .mtb-clarify{background:#151719;border-color:#ffffff1f;color:#f9fafb}:host([data-mtb-theme="auto"]) .mtb-clarify-header{border-bottom-color:#ffffff1a}:host([data-mtb-theme="auto"]) .mtb-clarify-title{color:#f9fafb}:host([data-mtb-theme="auto"]) .mtb-clarify-subtitle{color:#ffffff73}:host([data-mtb-theme="auto"]) .mtb-clarify-close{color:#ffffff73}:host([data-mtb-theme="auto"]) .mtb-clarify-close:hover{color:#ffffffbf}:host([data-mtb-theme="auto"]) .mtb-clarify-skip{background:#1f2327;border-color:#ffffff24;color:#ffffffb3}:host([data-mtb-theme="auto"]) .mtb-clarify-skip:hover{background:#ffffff0f}:host([data-mtb-theme="auto"]) .mtb-clarify-ai{background:#1f2327;border-color:#ffffff1f;color:#f9fafb}:host([data-mtb-theme="auto"]) .mtb-clarify-input{background:#1f2327;border-color:#ffffff1f;color:#f9fafb}}';
|
|
1
|
+
const bt = '*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}:host{all:initial;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-size:14px;line-height:1.5;color:#191a1c;-webkit-font-smoothing:antialiased}:host([data-mtb-theme="dark"]) .mtb-popup,:host([data-mtb-theme="dark"]) .mtb-success{background:#151719;border-color:#ffffff1f;color:#f9fafb}:host([data-mtb-theme="dark"]) .mtb-popup-header{border-bottom-color:#ffffff1a}:host([data-mtb-theme="dark"]) .mtb-popup-title,:host([data-mtb-theme="dark"]) .mtb-success-title{color:#f9fafb}:host([data-mtb-theme="dark"]) .mtb-quick-option,:host([data-mtb-theme="dark"]) .mtb-textarea{background:#1f2327;border-color:#ffffff1f;color:#f9fafb}:host([data-mtb-theme="dark"]) .mtb-popup-close,:host([data-mtb-theme="dark"]) .mtb-success-msg,:host([data-mtb-theme="dark"]) .mtb-close-link{color:#ffffffad}@media (prefers-color-scheme: dark){:host([data-mtb-theme="auto"]) .mtb-popup,:host([data-mtb-theme="auto"]) .mtb-success{background:#151719;border-color:#ffffff1f;color:#f9fafb}:host([data-mtb-theme="auto"]) .mtb-popup-header{border-bottom-color:#ffffff1a}:host([data-mtb-theme="auto"]) .mtb-popup-title,:host([data-mtb-theme="auto"]) .mtb-success-title{color:#f9fafb}:host([data-mtb-theme="auto"]) .mtb-quick-option,:host([data-mtb-theme="auto"]) .mtb-textarea{background:#1f2327;border-color:#ffffff1f;color:#f9fafb}:host([data-mtb-theme="auto"]) .mtb-popup-close,:host([data-mtb-theme="auto"]) .mtb-success-msg,:host([data-mtb-theme="auto"]) .mtb-close-link{color:#ffffffad}}.mtb-tab{position:fixed;top:50%;right:0;transform:translateY(-50%);z-index:2147483646;display:flex;align-items:center;justify-content:center;width:32px;padding:14px 0;background:#059669;color:#fff;border-radius:8px 0 0 8px;cursor:pointer;box-shadow:-2px 0 14px #05966959;transition:background .15s,box-shadow .15s,width .15s;writing-mode:vertical-lr;text-orientation:mixed;font-size:12px;font-weight:600;letter-spacing:.04em;user-select:none;border:none;outline:none}.mtb-tab.left{right:auto;left:0;border-radius:0 8px 8px 0;box-shadow:2px 0 14px #05966959}.mtb-tab:hover{background:#047857;box-shadow:-3px 0 20px #05966980}.mtb-tab.active{background:#065f46}.mtb-toolbar{position:fixed;top:18px;left:50%;transform:translate(-50%);z-index:2147483647;display:flex;align-items:center;gap:11px;height:46px;padding:0 7px;border-radius:13px;background:linear-gradient(120deg,#10b981,#059669);box-shadow:0 10px 26px #0f172a38;animation:mtbBarIn .2s ease;white-space:nowrap}@keyframes mtbBarIn{0%{transform:translate(-50%,12px);opacity:0}to{transform:translate(-50%);opacity:1}}.mtb-toolbar-modes{display:flex;align-items:center;gap:3px;background:#ffffff29;border-radius:9px;padding:3px}.mtb-toolbar-mode-btn{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 12px;border-radius:7px;border:none;cursor:pointer;font-family:inherit;font-size:12px;font-weight:550;white-space:nowrap;background:transparent;color:#fffffff2;transition:all .12s}.mtb-toolbar-mode-btn.active{background:#fff;color:#047857}.mtb-toolbar-hint{font-size:12px;color:#fffffff2;white-space:nowrap}.mtb-toolbar-sep{width:1px;height:20px;background:#ffffff38}.mtb-exit-btn{display:inline-flex;align-items:center;gap:5px;height:30px;padding:0 12px;border-radius:8px;font-size:11.5px;font-weight:500;color:#fff;cursor:pointer;background:#ffffff29;border:none;font-family:inherit;transition:background .12s}.mtb-exit-btn:hover{background:#ffffff47}.mtb-overlay{position:fixed;inset:0;z-index:2147483640;cursor:crosshair}.mtb-dim{position:fixed;inset:0;z-index:2147483639;background:#00000014}.mtb-highlight{position:fixed;z-index:2147483641;pointer-events:none;border:2px solid #10b981;border-radius:6px;background:#10b9810f;transition:all .08s ease}.mtb-highlight-tooltip{position:fixed;z-index:2147483642;pointer-events:none;transform:translate(-50%);background:#064e3b;color:#fff;padding:4px 10px;border-radius:6px;font-size:11px;font-weight:500;white-space:nowrap;box-shadow:0 4px 12px #0000002e}.mtb-highlight-tooltip:after{content:"";position:absolute;top:100%;left:50%;transform:translate(-50%);border:4px solid transparent;border-top-color:#064e3b}.mtb-draw-svg{position:fixed;inset:0;z-index:2147483643;pointer-events:none;width:100%;height:100%;overflow:visible}.mtb-pin{position:fixed;z-index:2147483644;pointer-events:none;width:22px;height:22px;border-radius:50% 50% 50% 2px;background:#059669;border:2px solid #fff;display:flex;align-items:center;justify-content:center;font-size:10px;color:#fff;font-weight:700;box-shadow:0 2px 8px #05966973;animation:mtbPinPop .25s cubic-bezier(.34,1.56,.64,1);transform:translate(-50%,-50%)}@keyframes mtbPinPop{0%{transform:translate(-50%,-50%) scale(.4)}to{transform:translate(-50%,-50%) scale(1)}}.mtb-popup{position:fixed;z-index:2147483645;width:320px;background:#fff;border:1px solid rgba(0,0,0,.1);border-radius:14px;box-shadow:0 12px 40px #00000029;overflow:hidden;animation:mtbSlideUp .28s cubic-bezier(.34,1.56,.64,1);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}@keyframes mtbSlideUp{0%{transform:translateY(14px) scale(.97);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}.mtb-popup-header{padding:11px 13px 11px 14px;border-bottom:1px solid rgba(0,0,0,.06);display:flex;align-items:center;gap:8px}.mtb-popup-icon{width:20px;height:20px;border-radius:5px;background:#10b9811a;display:flex;align-items:center;justify-content:center;flex-shrink:0}.mtb-popup-title{flex:1;font-size:12.5px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#191a1c}.mtb-popup-close{background:none;border:none;cursor:pointer;padding:3px;color:#00000061;display:flex;align-items:center;border-radius:4px;transition:color .12s}.mtb-popup-close:hover{color:#000000b3}.mtb-popup-body{padding:13px}.mtb-quick-options{display:flex;flex-direction:column;gap:6px;margin-bottom:12px}.mtb-quick-option{display:flex;align-items:center;gap:10px;width:100%;padding:10px 12px;border:1px solid rgba(0,0,0,.09);border-radius:10px;background:#fafafa;cursor:pointer;font-family:inherit;font-size:13px;color:#191a1c;text-align:left;transition:all .12s}.mtb-quick-option:hover{background:#10b9810f;border-color:#10b9814d}.mtb-quick-option-emoji{font-size:15px;flex-shrink:0;line-height:1}.mtb-textarea-wrap{position:relative}.mtb-textarea{width:100%;height:64px;padding:9px 11px;border:1px solid rgba(0,0,0,.12);border-radius:9px;font-family:inherit;font-size:12.5px;line-height:1.5;color:#191a1c;outline:none;background:#fff;resize:none;transition:border-color .12s,box-shadow .12s}.mtb-textarea:focus{border-color:#10b981;box-shadow:0 0 0 3px #10b9811f}.mtb-textarea::placeholder{color:#00000057}.mtb-popup-error{margin-top:8px;color:#b91c1c;font-size:11.5px}.mtb-popup-error:empty,.mtb-popup-error[hidden]{display:none}.mtb-popup-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}.mtb-cancel-btn,.mtb-submit-btn{min-width:72px;height:30px;border:none;border-radius:7px;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0 12px;font-family:inherit;font-size:12px;font-weight:600;transition:background .12s}.mtb-cancel-btn{background:#f3f4f6;color:#000000ad}.mtb-cancel-btn:hover{background:#e5e7eb}.mtb-submit-btn{background:#d1d5db;color:#fff}.mtb-submit-btn.ready{background:#059669}.mtb-submit-btn.ready:hover{background:#047857}.mtb-submit-btn.loading{background:#059669;opacity:.7;cursor:wait}.mtb-submit-btn:disabled{cursor:not-allowed}.mtb-success{position:fixed;z-index:2147483645;width:332px;background:#fff;border:1px solid rgba(0,0,0,.1);border-radius:16px;box-shadow:0 20px 60px #00000029;padding:24px 22px;text-align:center;animation:mtbSlideUp .35s cubic-bezier(.34,1.56,.64,1);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.mtb-success-icon{width:46px;height:46px;border-radius:50%;background:#05966917;display:flex;align-items:center;justify-content:center;margin:0 auto 12px}.mtb-success-title{font-size:16px;font-weight:700;margin-bottom:5px;letter-spacing:-.01em;color:#191a1c}.mtb-success-msg{font-size:13px;color:#0000008c;margin-bottom:16px;line-height:1.6}.mtb-view-feedback-link{display:inline-flex;align-items:center;gap:5px;color:#047857;text-decoration:none;font-size:13px;font-weight:500;font-family:JetBrains Mono,monospace;background:none;border:none;cursor:pointer;transition:text-decoration .12s}.mtb-view-feedback-link:hover{text-decoration:underline}.mtb-close-link{margin-top:13px;background:none;border:none;cursor:pointer;font-size:12px;color:#0006;font-family:inherit;transition:color .12s}.mtb-close-link:hover{color:#000000b3}.mtb-email-capture{margin-bottom:14px;text-align:left}.mtb-email-prompt{font-size:12px;color:#0000008c;line-height:1.5;margin-bottom:8px}.mtb-email-row{display:flex;gap:6px}.mtb-email-input{flex:1;min-width:0;font-size:12.5px;font-family:inherit;padding:7px 10px;border:1px solid rgba(0,0,0,.14);border-radius:8px;outline:none}.mtb-email-input:focus{border-color:#059669}.mtb-email-input.mtb-email-invalid{border-color:#dc2626}.mtb-email-submit{font-size:12px;font-weight:600;font-family:inherit;color:#fff;background:#059669;border:none;border-radius:8px;padding:7px 12px;cursor:pointer;white-space:nowrap}.mtb-email-submit:disabled{opacity:.6;cursor:default}.mtb-email-error{font-size:11.5px;color:#dc2626;margin-top:6px}.mtb-email-saved{font-size:12px;color:#059669;line-height:1.5}.mtb-my-feedback{display:block;margin:8px auto 0;background:none;border:none;cursor:pointer;font-size:11.5px;font-family:inherit;color:#0006;text-decoration:underline;text-underline-offset:2px;transition:color .12s}.mtb-my-feedback:hover{color:#059669}.mtb-pet{position:fixed;bottom:20px;right:20px;z-index:2147483646;cursor:pointer;width:52px;height:52px;display:flex;align-items:center;justify-content:center;border-radius:50%;background:transparent;animation:mtbPetBounce 3s ease-in-out infinite;transition:transform .2s;user-select:none;outline:none;filter:drop-shadow(0 4px 12px rgba(5,150,105,.35))}.mtb-pet:hover{transform:scale(1.12);animation-play-state:paused}.mtb-pet:hover .mtb-pet-bubble{opacity:1;transform:translate(-50%) translateY(0);pointer-events:auto}.mtb-pet.active{animation:none;opacity:.6}.mtb-pet-svg{display:block}@keyframes mtbPetBounce{0%,to{transform:translateY(0)}50%{transform:translateY(-6px)}}.mtb-pet-bubble{position:absolute;bottom:100%;left:50%;transform:translate(-50%) translateY(4px);margin-bottom:8px;background:#064e3b;color:#fff;padding:6px 12px;border-radius:8px;font-size:12px;font-weight:500;white-space:nowrap;box-shadow:0 4px 14px #0000002e;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s}.mtb-pet-bubble.visible{opacity:1;transform:translate(-50%) translateY(0);pointer-events:auto}.mtb-pet-bubble.hidden{opacity:0;pointer-events:none}.mtb-pet-bubble:after{content:"";position:absolute;top:100%;left:50%;transform:translate(-50%);border:5px solid transparent;border-top-color:#064e3b}.mtb-frustration-prompt{position:fixed;bottom:20px;right:20px;z-index:2147483645;display:flex;align-items:center;gap:10px;padding:12px 16px;background:#fff;border:1px solid rgba(0,0,0,.1);border-radius:12px;box-shadow:0 8px 30px #0000001f;animation:mtbSlideUp .35s cubic-bezier(.34,1.56,.64,1);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}:host([data-mtb-theme="dark"]) .mtb-frustration-prompt{background:#151719;border-color:#ffffff1f;color:#f9fafb}@media (prefers-color-scheme: dark){:host([data-mtb-theme="auto"]) .mtb-frustration-prompt{background:#151719;border-color:#ffffff1f;color:#f9fafb}}.mtb-frustration-icon{width:32px;height:32px;border-radius:50%;background:#eab3081a;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:16px;line-height:1}.mtb-frustration-text{font-size:13px;font-weight:500;color:inherit;line-height:1.4}.mtb-frustration-actions{display:flex;gap:6px;flex-shrink:0}.mtb-frustration-tell{height:28px;padding:0 12px;border:none;border-radius:7px;background:#059669;color:#fff;cursor:pointer;font-family:inherit;font-size:12px;font-weight:600;transition:background .12s}.mtb-frustration-tell:hover{background:#047857}.mtb-frustration-dismiss{height:28px;padding:0 8px;border:none;border-radius:7px;background:transparent;color:#0006;cursor:pointer;font-family:inherit;font-size:12px;transition:color .12s}.mtb-frustration-dismiss:hover{color:#000000b3}:host([data-mtb-theme="dark"]) .mtb-frustration-dismiss{color:#fff6}:host([data-mtb-theme="dark"]) .mtb-frustration-dismiss:hover{color:#ffffffb3}@media (prefers-color-scheme: dark){:host([data-mtb-theme="auto"]) .mtb-frustration-dismiss{color:#fff6}:host([data-mtb-theme="auto"]) .mtb-frustration-dismiss:hover{color:#ffffffb3}}.mtb-record-bar{position:fixed;bottom:24px;left:50%;transform:translate(-50%);z-index:2147483647;display:flex;align-items:center;gap:12px;height:42px;padding:0 8px 0 14px;border-radius:12px;background:#0f172aeb;box-shadow:0 8px 24px #00000040;animation:mtbBarIn .2s ease}.mtb-record-dot{width:8px;height:8px;border-radius:50%;background:#ef4444;animation:mtbRecordPulse 1.2s ease-in-out infinite;flex-shrink:0}@keyframes mtbRecordPulse{0%,to{opacity:1}50%{opacity:.3}}.mtb-record-timer{font-family:JetBrains Mono,SF Mono,Fira Code,Cascadia Code,monospace;font-size:13px;font-weight:500;color:#fff;font-variant-numeric:tabular-nums;letter-spacing:.02em;min-width:38px}.mtb-record-stop{height:28px;padding:0 14px;border:none;border-radius:7px;background:#059669;color:#fff;cursor:pointer;font-family:inherit;font-size:12px;font-weight:600;transition:background .12s}.mtb-record-stop:hover{background:#047857}.mtb-click-ripple{position:fixed;z-index:2147483644;width:24px;height:24px;border-radius:50%;border:2px solid #10b981;background:#10b98133;pointer-events:none;transform:translate(-50%,-50%) scale(.5);animation:mtbClickRipple .3s ease-out forwards}@keyframes mtbClickRipple{0%{transform:translate(-50%,-50%) scale(.5);opacity:1}to{transform:translate(-50%,-50%) scale(2);opacity:0}}.mtb-dot{display:inline-block;width:4px;height:4px;border-radius:50%;background:#fff;animation:mtbDot 1.2s infinite}.mtb-dot:nth-child(2){animation-delay:.2s}.mtb-dot:nth-child(3){animation-delay:.4s}@keyframes mtbDot{0%,80%,to{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}.mtb-clarify{position:fixed;z-index:2147483645;width:346px;background:#fff;border:1px solid rgba(0,0,0,.1);border-radius:14px;box-shadow:0 12px 40px #00000029;display:flex;flex-direction:column;animation:mtbSlideUp .28s cubic-bezier(.34,1.56,.64,1);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;overflow:hidden}.mtb-clarify-header{padding:11px 13px 11px 14px;display:flex;align-items:center;gap:9px;border-bottom:1px solid rgba(0,0,0,.06)}.mtb-clarify-icon{width:24px;height:24px;border-radius:7px;background:linear-gradient(140deg,#10b981,#059669);box-shadow:0 1px 3px #05966966;display:flex;align-items:center;justify-content:center;flex-shrink:0}.mtb-clarify-titles{flex:1;min-width:0}.mtb-clarify-title{font-size:12.5px;font-weight:650;line-height:1.2;color:#191a1c}.mtb-clarify-subtitle{font-size:10px;color:#0000006b}.mtb-clarify-close{background:none;border:none;cursor:pointer;padding:3px;color:#00000061;display:flex;transition:color .12s}.mtb-clarify-close:hover{color:#000000b3}.mtb-clarify-messages{flex:1;max-height:250px;overflow-y:auto;padding:13px 13px 5px;display:flex;flex-direction:column;gap:9px}.mtb-clarify-bubble{max-width:82%;padding:9px 12px;font-size:12.5px;line-height:1.5;white-space:pre-wrap;word-break:break-word}.mtb-clarify-ai{align-self:flex-start;background:#fff;color:#191a1c;border:1px solid rgba(0,0,0,.09);border-radius:13px 13px 13px 4px}.mtb-clarify-user{align-self:flex-end;background:#059669;color:#fff;border:1px solid #059669;border-radius:13px 13px 4px}.mtb-clarify-thinking{display:flex;align-items:center;gap:4px;padding:11px 14px}.mtb-clarify-thinking .mtb-dot{width:6px;height:6px;background:#059669b3}.mtb-clarify-footer{padding:3px 13px 13px;display:flex;flex-direction:column}.mtb-clarify-input{width:100%;height:52px;padding:9px 11px;border:1px solid rgba(0,0,0,.12);border-radius:9px;font-family:inherit;font-size:13px;line-height:1.5;color:#191a1c;outline:none;background:#fafafa;resize:none;box-sizing:border-box;transition:border-color .12s,box-shadow .12s,background .12s}.mtb-clarify-input:focus{border-color:#10b981;box-shadow:0 0 0 3px #10b9811f;background:#fff}.mtb-clarify-input::placeholder{color:#00000057}.mtb-clarify-actions{display:flex;gap:8px;margin-top:9px}.mtb-clarify-skip{flex:0 0 auto;height:34px;padding:0 14px;border:1px solid rgba(0,0,0,.12);border-radius:9px;background:#fff;cursor:pointer;font-family:inherit;font-size:12.5px;font-weight:550;color:#0000008c;transition:background .12s}.mtb-clarify-skip:hover{background:#0000000a}.mtb-clarify-send{flex:1;height:34px;display:inline-flex;align-items:center;justify-content:center;gap:6px;border:none;border-radius:9px;background:#059669;color:#fff;cursor:pointer;font-family:inherit;font-size:12.5px;font-weight:600;transition:background .12s}.mtb-clarify-send:not(:disabled):hover{background:#047857}.mtb-clarify-send:disabled{background:#00000026;cursor:not-allowed}:host([data-mtb-theme="dark"]) .mtb-clarify{background:#151719;border-color:#ffffff1f;color:#f9fafb}:host([data-mtb-theme="dark"]) .mtb-clarify-header{border-bottom-color:#ffffff1a}:host([data-mtb-theme="dark"]) .mtb-clarify-title{color:#f9fafb}:host([data-mtb-theme="dark"]) .mtb-clarify-subtitle{color:#ffffff73}:host([data-mtb-theme="dark"]) .mtb-clarify-close{color:#ffffff73}:host([data-mtb-theme="dark"]) .mtb-clarify-close:hover{color:#ffffffbf}:host([data-mtb-theme="dark"]) .mtb-clarify-skip{background:#1f2327;border-color:#ffffff24;color:#ffffffb3}:host([data-mtb-theme="dark"]) .mtb-clarify-skip:hover{background:#ffffff0f}:host([data-mtb-theme="dark"]) .mtb-clarify-ai{background:#1f2327;border-color:#ffffff1f;color:#f9fafb}:host([data-mtb-theme="dark"]) .mtb-clarify-input{background:#1f2327;border-color:#ffffff1f;color:#f9fafb}@media (prefers-color-scheme: dark){:host([data-mtb-theme="auto"]) .mtb-clarify{background:#151719;border-color:#ffffff1f;color:#f9fafb}:host([data-mtb-theme="auto"]) .mtb-clarify-header{border-bottom-color:#ffffff1a}:host([data-mtb-theme="auto"]) .mtb-clarify-title{color:#f9fafb}:host([data-mtb-theme="auto"]) .mtb-clarify-subtitle{color:#ffffff73}:host([data-mtb-theme="auto"]) .mtb-clarify-close{color:#ffffff73}:host([data-mtb-theme="auto"]) .mtb-clarify-close:hover{color:#ffffffbf}:host([data-mtb-theme="auto"]) .mtb-clarify-skip{background:#1f2327;border-color:#ffffff24;color:#ffffffb3}:host([data-mtb-theme="auto"]) .mtb-clarify-skip:hover{background:#ffffff0f}:host([data-mtb-theme="auto"]) .mtb-clarify-ai{background:#1f2327;border-color:#ffffff1f;color:#f9fafb}:host([data-mtb-theme="auto"]) .mtb-clarify-input{background:#1f2327;border-color:#ffffff1f;color:#f9fafb}}';
|
|
2
2
|
class gt {
|
|
3
3
|
constructor(t = "auto") {
|
|
4
4
|
this.host = document.createElement("div"), this.host.id = "mtb-widget-host", this.host.style.cssText = "position:fixed;top:0;left:0;width:0;height:0;overflow:visible;z-index:2147483646;", this.host.setAttribute("data-mtb-theme", t), document.body.appendChild(this.host), this.root = this.host.attachShadow({ mode: "open" });
|
|
@@ -174,7 +174,7 @@ const et = "#059669", v = {
|
|
|
174
174
|
linejoin: "round",
|
|
175
175
|
filter: "drop-shadow(0 1px 2px rgba(5,150,105,0.35))"
|
|
176
176
|
};
|
|
177
|
-
class
|
|
177
|
+
class Mt {
|
|
178
178
|
constructor(t, e) {
|
|
179
179
|
this.path = null, this.points = [], this.isDrawing = !1, this.onDrawComplete = e, this.svg = document.createElementNS("http://www.w3.org/2000/svg", "svg"), this.svg.setAttribute("class", "mtb-draw-svg"), t.append(this.svg);
|
|
180
180
|
}
|
|
@@ -229,10 +229,10 @@ class Tt {
|
|
|
229
229
|
this.svg.remove();
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
|
-
const
|
|
232
|
+
const Tt = 5;
|
|
233
233
|
class H {
|
|
234
234
|
constructor(t, e, r) {
|
|
235
|
-
this.messages = e, this.onReady = r, this.pinCount = 0, this.interactionActive = !0, this.pendingHighlightFrame = null, this.lastMoveX = 0, this.lastMoveY = 0, this.highlighter = new St(t), this.pinMarker = new _t(t), this.drawLayer = new
|
|
235
|
+
this.messages = e, this.onReady = r, this.pinCount = 0, this.interactionActive = !0, this.pendingHighlightFrame = null, this.lastMoveX = 0, this.lastMoveY = 0, this.highlighter = new St(t), this.pinMarker = new _t(t), this.drawLayer = new Mt(t, (s) => {
|
|
236
236
|
this.onReady(s, this.messages.annotation.drawing);
|
|
237
237
|
}), this.overlay = new vt(t, {
|
|
238
238
|
onMouseDown: (s) => this.handleMouseDown(s),
|
|
@@ -265,7 +265,7 @@ class H {
|
|
|
265
265
|
}
|
|
266
266
|
handleMouseUp(t) {
|
|
267
267
|
if (!this.drawLayer.isCurrentlyDrawing()) return;
|
|
268
|
-
if (this.drawLayer.getPointCount() >=
|
|
268
|
+
if (this.drawLayer.getPointCount() >= Tt) {
|
|
269
269
|
this.drawLayer.endDraw();
|
|
270
270
|
return;
|
|
271
271
|
}
|
|
@@ -531,7 +531,7 @@ const It = 5e3, $t = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
|
531
531
|
class Ht {
|
|
532
532
|
constructor(t, e, r, s, n) {
|
|
533
533
|
this.messages = e, this.el = t.el("div", "mtb-success"), this.el.style.right = "20px", this.el.style.bottom = "20px";
|
|
534
|
-
const o = n?.skipFollowup ? e.success.title_no_ai : e.success.title, a = n?.skipFollowup ? e.success.message_no_ai : e.success.message, l = s ? `<button class="mtb-view-feedback-link">${e.success.view_feedback}
|
|
534
|
+
const o = n?.skipFollowup ? e.success.title_no_ai : e.success.title, a = n?.skipFollowup ? e.success.message_no_ai : e.success.message, l = s ? `<button class="mtb-view-feedback-link">${e.success.view_feedback} <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14M12 5l7 7-7 7"/></svg></button>` : "", c = n?.emailCapture ? `
|
|
535
535
|
<div class="mtb-email-capture">
|
|
536
536
|
<div class="mtb-email-prompt">${e.success.email_prompt}</div>
|
|
537
537
|
<div class="mtb-email-row">
|
|
@@ -542,7 +542,7 @@ class Ht {
|
|
|
542
542
|
</div>` : "";
|
|
543
543
|
this.el.innerHTML = `
|
|
544
544
|
<div class="mtb-success-icon">
|
|
545
|
-
<svg width="
|
|
545
|
+
<svg width="23" height="23" viewBox="0 0 24 24" fill="none" stroke="${et}" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round">
|
|
546
546
|
<polyline points="20 6 9 17 4 12"/>
|
|
547
547
|
</svg>
|
|
548
548
|
</div>
|
|
@@ -602,16 +602,16 @@ function _(i, t) {
|
|
|
602
602
|
const r = (i.ownerDocument.defaultView || window).getComputedStyle(i).getPropertyValue(t);
|
|
603
603
|
return r ? parseFloat(r.replace("px", "")) : 0;
|
|
604
604
|
}
|
|
605
|
-
function
|
|
605
|
+
function jt(i) {
|
|
606
606
|
const t = _(i, "border-left-width"), e = _(i, "border-right-width");
|
|
607
607
|
return i.clientWidth + t + e;
|
|
608
608
|
}
|
|
609
|
-
function
|
|
609
|
+
function Ut(i) {
|
|
610
610
|
const t = _(i, "border-top-width"), e = _(i, "border-bottom-width");
|
|
611
611
|
return i.clientHeight + t + e;
|
|
612
612
|
}
|
|
613
613
|
function rt(i, t = {}) {
|
|
614
|
-
const e = t.width ||
|
|
614
|
+
const e = t.width || jt(i), r = t.height || Ut(i);
|
|
615
615
|
return { width: e, height: r };
|
|
616
616
|
}
|
|
617
617
|
function Bt() {
|
|
@@ -627,7 +627,7 @@ const u = 16384;
|
|
|
627
627
|
function zt(i) {
|
|
628
628
|
(i.width > u || i.height > u) && (i.width > u && i.height > u ? i.width > i.height ? (i.height *= u / i.width, i.width = u) : (i.width *= u / i.height, i.height = u) : i.width > u ? (i.height *= u / i.width, i.width = u) : (i.width *= u / i.height, i.height = u));
|
|
629
629
|
}
|
|
630
|
-
function
|
|
630
|
+
function M(i) {
|
|
631
631
|
return new Promise((t, e) => {
|
|
632
632
|
const r = new Image();
|
|
633
633
|
r.onload = () => {
|
|
@@ -680,14 +680,14 @@ function F(i, t, e, r) {
|
|
|
680
680
|
function Xt(i, t, e) {
|
|
681
681
|
F(i, t, ":before", e), F(i, t, ":after", e);
|
|
682
682
|
}
|
|
683
|
-
const
|
|
684
|
-
woff:
|
|
685
|
-
woff2:
|
|
683
|
+
const j = "application/font-woff", U = "image/jpeg", Gt = {
|
|
684
|
+
woff: j,
|
|
685
|
+
woff2: j,
|
|
686
686
|
ttf: "application/font-truetype",
|
|
687
687
|
eot: "application/vnd.ms-fontobject",
|
|
688
688
|
png: "image/png",
|
|
689
|
-
jpg:
|
|
690
|
-
jpeg:
|
|
689
|
+
jpg: U,
|
|
690
|
+
jpeg: U,
|
|
691
691
|
gif: "image/gif",
|
|
692
692
|
tiff: "image/tiff",
|
|
693
693
|
svg: "image/svg+xml",
|
|
@@ -749,23 +749,23 @@ async function $(i, t, e) {
|
|
|
749
749
|
}
|
|
750
750
|
async function te(i) {
|
|
751
751
|
const t = i.toDataURL();
|
|
752
|
-
return t === "data:," ? i.cloneNode(!1) :
|
|
752
|
+
return t === "data:," ? i.cloneNode(!1) : M(t);
|
|
753
753
|
}
|
|
754
754
|
async function ee(i, t) {
|
|
755
755
|
if (i.currentSrc) {
|
|
756
756
|
const n = document.createElement("canvas"), o = n.getContext("2d");
|
|
757
757
|
n.width = i.clientWidth, n.height = i.clientHeight, o?.drawImage(i, 0, 0, n.width, n.height);
|
|
758
758
|
const a = n.toDataURL();
|
|
759
|
-
return
|
|
759
|
+
return M(a);
|
|
760
760
|
}
|
|
761
761
|
const e = i.poster, r = I(e), s = await $(e, r, t);
|
|
762
|
-
return
|
|
762
|
+
return M(s);
|
|
763
763
|
}
|
|
764
764
|
async function ie(i, t) {
|
|
765
765
|
var e;
|
|
766
766
|
try {
|
|
767
767
|
if (!((e = i?.contentDocument) === null || e === void 0) && e.body)
|
|
768
|
-
return await
|
|
768
|
+
return await T(i.contentDocument.body, t, !0);
|
|
769
769
|
} catch {
|
|
770
770
|
}
|
|
771
771
|
return i.cloneNode(!1);
|
|
@@ -779,7 +779,7 @@ async function ne(i, t, e) {
|
|
|
779
779
|
if (nt(t))
|
|
780
780
|
return t;
|
|
781
781
|
let n = [];
|
|
782
|
-
return se(i) && i.assignedNodes ? n = f(i.assignedNodes()) : d(i, HTMLIFrameElement) && (!((r = i.contentDocument) === null || r === void 0) && r.body) ? n = f(i.contentDocument.body.childNodes) : n = f(((s = i.shadowRoot) !== null && s !== void 0 ? s : i).childNodes), n.length === 0 || d(i, HTMLVideoElement) || await n.reduce((o, a) => o.then(() =>
|
|
782
|
+
return se(i) && i.assignedNodes ? n = f(i.assignedNodes()) : d(i, HTMLIFrameElement) && (!((r = i.contentDocument) === null || r === void 0) && r.body) ? n = f(i.contentDocument.body.childNodes) : n = f(((s = i.shadowRoot) !== null && s !== void 0 ? s : i).childNodes), n.length === 0 || d(i, HTMLVideoElement) || await n.reduce((o, a) => o.then(() => T(a, e)).then((l) => {
|
|
783
783
|
l && t.appendChild(l);
|
|
784
784
|
}), Promise.resolve()), t;
|
|
785
785
|
}
|
|
@@ -814,7 +814,7 @@ async function de(i, t) {
|
|
|
814
814
|
const a = e[n].getAttribute("xlink:href");
|
|
815
815
|
if (a) {
|
|
816
816
|
const l = i.querySelector(a), c = document.querySelector(a);
|
|
817
|
-
!l && c && !r[a] && (r[a] = await
|
|
817
|
+
!l && c && !r[a] && (r[a] = await T(c, t, !0));
|
|
818
818
|
}
|
|
819
819
|
}
|
|
820
820
|
const s = Object.values(r);
|
|
@@ -829,7 +829,7 @@ async function de(i, t) {
|
|
|
829
829
|
}
|
|
830
830
|
return i;
|
|
831
831
|
}
|
|
832
|
-
async function
|
|
832
|
+
async function T(i, t, e) {
|
|
833
833
|
return !e && t.filter && !t.filter(i) ? null : Promise.resolve(i).then((r) => re(r, t)).then((r) => ne(i, r, t)).then((r) => ce(i, r, t)).then((r) => de(r, t));
|
|
834
834
|
}
|
|
835
835
|
const ot = /url\((['"]?)([^'"]+?)\1\)/g, he = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, ue = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
|
|
@@ -1036,16 +1036,16 @@ async function _e(i, t) {
|
|
|
1036
1036
|
r.appendChild(s), i.firstChild ? i.insertBefore(r, i.firstChild) : i.appendChild(r);
|
|
1037
1037
|
}
|
|
1038
1038
|
}
|
|
1039
|
-
async function
|
|
1040
|
-
const { width: e, height: r } = rt(i, t), s = await
|
|
1039
|
+
async function Me(i, t = {}) {
|
|
1040
|
+
const { width: e, height: r } = rt(i, t), s = await T(i, t, !0);
|
|
1041
1041
|
return await _e(s, t), await ct(s, t), we(s, t), await Wt(s, e, r);
|
|
1042
1042
|
}
|
|
1043
|
-
async function
|
|
1044
|
-
const { width: e, height: r } = rt(i, t), s = await
|
|
1043
|
+
async function Te(i, t = {}) {
|
|
1044
|
+
const { width: e, height: r } = rt(i, t), s = await Me(i, t), n = await M(s), o = document.createElement("canvas"), a = o.getContext("2d"), l = t.pixelRatio || Bt(), c = t.canvasWidth || e, h = t.canvasHeight || r;
|
|
1045
1045
|
return o.width = c * l, o.height = h * l, t.skipAutoScale || zt(o), o.style.width = `${c}`, o.style.height = `${h}`, t.backgroundColor && (a.fillStyle = t.backgroundColor, a.fillRect(0, 0, o.width, o.height)), a.drawImage(n, 0, 0, o.width, o.height), o;
|
|
1046
1046
|
}
|
|
1047
1047
|
async function Le(i, t = {}) {
|
|
1048
|
-
return (await
|
|
1048
|
+
return (await Te(i, t)).toDataURL("image/jpeg", t.quality || 1);
|
|
1049
1049
|
}
|
|
1050
1050
|
async function Ae(i = []) {
|
|
1051
1051
|
const t = De(i);
|
|
@@ -1149,7 +1149,7 @@ class Oe {
|
|
|
1149
1149
|
this.unsubscribe?.(), this.unsubscribe = null;
|
|
1150
1150
|
}
|
|
1151
1151
|
}
|
|
1152
|
-
const Fe = 3,
|
|
1152
|
+
const Fe = 3, je = 1e3, Ue = 3, Be = 5e3, ze = 500, qe = 500, We = 300, Ne = /* @__PURE__ */ new Set([
|
|
1153
1153
|
"A",
|
|
1154
1154
|
"BUTTON",
|
|
1155
1155
|
"INPUT",
|
|
@@ -1214,7 +1214,7 @@ const Fe = 3, Ue = 1e3, je = 3, Be = 5e3, ze = 500, qe = 500, We = 300, Ne = /*
|
|
|
1214
1214
|
if (!e || this.isWidgetElement(e)) return;
|
|
1215
1215
|
const r = Date.now();
|
|
1216
1216
|
this.clickHistory.push({ target: e, time: r });
|
|
1217
|
-
const s = r -
|
|
1217
|
+
const s = r - je;
|
|
1218
1218
|
if (this.clickHistory = this.clickHistory.filter((o) => o.time > s), this.clickHistory.filter((o) => o.target === e).length >= Fe) {
|
|
1219
1219
|
this.clickHistory = [], this.emitHighPriority({
|
|
1220
1220
|
signal: "rage_click",
|
|
@@ -1233,7 +1233,7 @@ const Fe = 3, Ue = 1e3, je = 3, Be = 5e3, ze = 500, qe = 500, We = 300, Ne = /*
|
|
|
1233
1233
|
const t = Date.now();
|
|
1234
1234
|
this.navTimestamps.push(t);
|
|
1235
1235
|
const e = t - Be;
|
|
1236
|
-
this.navTimestamps = this.navTimestamps.filter((r) => r > e), this.navTimestamps.length >=
|
|
1236
|
+
this.navTimestamps = this.navTimestamps.filter((r) => r > e), this.navTimestamps.length >= Ue && (this.navTimestamps = [], this.emitIfReady({
|
|
1237
1237
|
signal: "rapid_navigation",
|
|
1238
1238
|
timestamp: t
|
|
1239
1239
|
})), setTimeout(() => {
|
|
@@ -2199,7 +2199,7 @@ class tt {
|
|
|
2199
2199
|
}
|
|
2200
2200
|
async handleSubmit(t) {
|
|
2201
2201
|
if (!this.popup) return;
|
|
2202
|
-
this.popup.setLoading(!0);
|
|
2202
|
+
this.popup.setLoading(!0), await new Promise((a) => requestAnimationFrame(() => setTimeout(a, 0)));
|
|
2203
2203
|
const e = this.currentAnnotation, r = this.recordingManager?.getRecording() ?? void 0, [s, n] = await Promise.all([
|
|
2204
2204
|
Ae(e ? [e] : []),
|
|
2205
2205
|
Promise.resolve(Ye())
|