@saplingai/sapling-js 1.0.33-beta.0 → 1.0.33
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/index.d.ts +1 -1
- package/index.ts +1 -1
- package/package.json +1 -1
- package/sapling/sapling-sdk.min.js +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=(new Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="ebe1fae7-6e2d-450f-afe5-146b6d9c6b9f",t._sentryDebugIdIdentifier="sentry-dbid-ebe1fae7-6e2d-450f-afe5-146b6d9c6b9f")}catch(t){}}();export var SaplingModule; var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"ea4ec677"},(()=>{var t={376:(t,e,n)=>{"use strict";function r(){return!("undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}function i(t,e){return t.require(e)}n.d(e,{l$:()=>i,KV:()=>r}),t=n.hmd(t)},312:(t,e,n)=>{"use strict";n.d(e,{ph:()=>l,yW:()=>c});var r=n(376),i=n(458);t=n.hmd(t);const o=(0,i.Rf)(),a={nowSeconds:()=>Date.now()/1e3};const s=(0,r.KV)()?function(){try{return(0,r.l$)(t,"perf_hooks").performance}catch(t){return}}():function(){const{performance:t}=o;if(!t||!t.now)return;return{now:()=>t.now(),timeOrigin:Date.now()-t.now()}}(),u=void 0===s?a:{nowSeconds:()=>(s.timeOrigin+s.now())/1e3},c=a.nowSeconds.bind(a),l=u.nowSeconds.bind(u);let f;(()=>{const{performance:t}=o;if(!t||!t.now)return void(f="none");const e=36e5,n=t.now(),r=Date.now(),i=t.timeOrigin?Math.abs(t.timeOrigin+n-r):e,a=i<e,s=t.timing&&t.timing.navigationStart,u="number"==typeof s?Math.abs(s+n-r):e;a||u<e?i<=u?(f="timeOrigin",t.timeOrigin):f="navigationStart":f="dateNow"})()},458:(t,e,n)=>{"use strict";function r(t){return t&&t.Math==Math?t:void 0}n.d(e,{Rf:()=>o,YO:()=>a,n2:()=>i});const i="object"==typeof globalThis&&r(globalThis)||"object"==typeof window&&r(window)||"object"==typeof self&&r(self)||"object"==typeof n.g&&r(n.g)||function(){return this}()||{};function o(){return i}function a(t,e,n){const r=n||i,o=r.__SENTRY__=r.__SENTRY__||{};return o[t]||(o[t]=e())}},721:function(t,e){!function(t){"use strict";function e(){}function n(t,e,n,r,i){for(var o=0,a=e.length,s=0,u=0;o<a;o++){var c=e[o];if(c.removed){if(c.value=t.join(r.slice(u,u+c.count)),u+=c.count,o&&e[o-1].added){var l=e[o-1];e[o-1]=e[o],e[o]=l}}else{if(!c.added&&i){var f=n.slice(s,s+c.count);f=f.map((function(t,e){var n=r[u+e];return n.length>t.length?n:t})),c.value=t.join(f)}else c.value=t.join(n.slice(s,s+c.count));s+=c.count,c.added||(u+=c.count)}}var p=e[a-1];return a>1&&"string"==typeof p.value&&(p.added||p.removed)&&t.equals("",p.value)&&(e[a-2].value+=p.value,e.pop()),e}function r(t){return{newPos:t.newPos,components:t.components.slice(0)}}e.prototype={diff:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=i.callback;"function"==typeof i&&(o=i,i={}),this.options=i;var a=this;function s(t){return o?(setTimeout((function(){o(void 0,t)}),0),!0):t}t=this.castInput(t),e=this.castInput(e),t=this.removeEmpty(this.tokenize(t));var u=(e=this.removeEmpty(this.tokenize(e))).length,c=t.length,l=1,f=u+c,p=[{newPos:-1,components:[]}],d=this.extractCommon(p[0],e,t,0);if(p[0].newPos+1>=u&&d+1>=c)return s([{value:this.join(e),count:e.length}]);function h(){for(var i=-1*l;i<=l;i+=2){var o=void 0,f=p[i-1],d=p[i+1],h=(d?d.newPos:0)-i;f&&(p[i-1]=void 0);var g=f&&f.newPos+1<u,v=d&&0<=h&&h<c;if(g||v){if(!g||v&&f.newPos<d.newPos?(o=r(d),a.pushComponent(o.components,void 0,!0)):((o=f).newPos++,a.pushComponent(o.components,!0,void 0)),h=a.extractCommon(o,e,t,i),o.newPos+1>=u&&h+1>=c)return s(n(a,o.components,e,t,a.useLongestToken));p[i]=o}else p[i]=void 0}l++}if(o)!function t(){setTimeout((function(){if(l>f)return o();h()||t()}),0)}();else for(;l<=f;){var g=h();if(g)return g}},pushComponent:function(t,e,n){var r=t[t.length-1];r&&r.added===e&&r.removed===n?t[t.length-1]={count:r.count+1,added:e,removed:n}:t.push({count:1,added:e,removed:n})},extractCommon:function(t,e,n,r){for(var i=e.length,o=n.length,a=t.newPos,s=a-r,u=0;a+1<i&&s+1<o&&this.equals(e[a+1],n[s+1]);)a++,s++,u++;return u&&t.components.push({count:u}),t.newPos=a,s},equals:function(t,e){return this.options.comparator?this.options.comparator(t,e):t===e||this.options.ignoreCase&&t.toLowerCase()===e.toLowerCase()},removeEmpty:function(t){for(var e=[],n=0;n<t.length;n++)t[n]&&e.push(t[n]);return e},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};var i=new e;function o(t,e,n){return i.diff(t,e,n)}function a(t,e){if("function"==typeof t)e.callback=t;else if(t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}var s=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,u=/\S/,c=new e;function l(t,e,n){return n=a(n,{ignoreWhitespace:!0}),c.diff(t,e,n)}function f(t,e,n){return c.diff(t,e,n)}c.equals=function(t,e){return this.options.ignoreCase&&(t=t.toLowerCase(),e=e.toLowerCase()),t===e||this.options.ignoreWhitespace&&!u.test(t)&&!u.test(e)},c.tokenize=function(t){for(var e=t.split(/(\s+|[()[\]{}'"]|\b)/),n=0;n<e.length-1;n++)!e[n+1]&&e[n+2]&&s.test(e[n])&&s.test(e[n+2])&&(e[n]+=e[n+2],e.splice(n+1,2),n--);return e};var p=new e;function d(t,e,n){return p.diff(t,e,n)}function h(t,e,n){var r=a(n,{ignoreWhitespace:!0});return p.diff(t,e,r)}p.tokenize=function(t){var e=[],n=t.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var i=n[r];r%2&&!this.options.newlineIsToken?e[e.length-1]+=i:(this.options.ignoreWhitespace&&(i=i.trim()),e.push(i))}return e};var g=new e;function v(t,e,n){return g.diff(t,e,n)}g.tokenize=function(t){return t.split(/(\S.+?[.!?])(?=\s+|$)/)};var y=new e;function m(t,e,n){return y.diff(t,e,n)}function b(t){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},b(t)}function D(t){return w(t)||x(t)||E()}function w(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}function x(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function E(){throw new TypeError("Invalid attempt to spread non-iterable instance")}y.tokenize=function(t){return t.split(/([{}:;,]|\s+)/)};var A=Object.prototype.toString,_=new e;function S(t,e,n){return _.diff(t,e,n)}function C(t,e,n,r,i){var o,a;for(e=e||[],n=n||[],r&&(t=r(i,t)),o=0;o<e.length;o+=1)if(e[o]===t)return n[o];if("[object Array]"===A.call(t)){for(e.push(t),a=new Array(t.length),n.push(a),o=0;o<t.length;o+=1)a[o]=C(t[o],e,n,r,i);return e.pop(),n.pop(),a}if(t&&t.toJSON&&(t=t.toJSON()),"object"===b(t)&&null!==t){e.push(t),a={},n.push(a);var s,u=[];for(s in t)t.hasOwnProperty(s)&&u.push(s);for(u.sort(),o=0;o<u.length;o+=1)a[s=u[o]]=C(t[s],e,n,r,s);e.pop(),n.pop()}else a=t;return a}_.useLongestToken=!0,_.tokenize=p.tokenize,_.castInput=function(t){var e=this.options,n=e.undefinedReplacement,r=e.stringifyReplacer,i=void 0===r?function(t,e){return void 0===e?n:e}:r;return"string"==typeof t?t:JSON.stringify(C(t,null,null,i),i," ")},_.equals=function(t,n){return e.prototype.equals.call(_,t.replace(/,([\r\n])/g,"$1"),n.replace(/,([\r\n])/g,"$1"))};var k=new e;function O(t,e,n){return k.diff(t,e,n)}function T(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.split(/\r\n|[\n\v\f\r\x85]/),r=t.match(/\r\n|[\n\v\f\r\x85]/g)||[],i=[],o=0;function a(){var t={};for(i.push(t);o<n.length;){var r=n[o];if(/^(\-\-\-|\+\+\+|@@)\s/.test(r))break;var a=/^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(r);a&&(t.index=a[1]),o++}for(s(t),s(t),t.hunks=[];o<n.length;){var c=n[o];if(/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(c))break;if(/^@@/.test(c))t.hunks.push(u());else{if(c&&e.strict)throw new Error("Unknown line "+(o+1)+" "+JSON.stringify(c));o++}}}function s(t){var e=/^(---|\+\+\+)\s+(.*)$/.exec(n[o]);if(e){var r="---"===e[1]?"old":"new",i=e[2].split("\t",2),a=i[0].replace(/\\\\/g,"\\");/^".*"$/.test(a)&&(a=a.substr(1,a.length-2)),t[r+"FileName"]=a,t[r+"Header"]=(i[1]||"").trim(),o++}}function u(){for(var t=o,i=n[o++].split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/),a={oldStart:+i[1],oldLines:+i[2]||1,newStart:+i[3],newLines:+i[4]||1,lines:[],linedelimiters:[]},s=0,u=0;o<n.length&&!(0===n[o].indexOf("--- ")&&o+2<n.length&&0===n[o+1].indexOf("+++ ")&&0===n[o+2].indexOf("@@"));o++){var c=0==n[o].length&&o!=n.length-1?" ":n[o][0];if("+"!==c&&"-"!==c&&" "!==c&&"\\"!==c)break;a.lines.push(n[o]),a.linedelimiters.push(r[o]||"\n"),"+"===c?s++:"-"===c?u++:" "===c&&(s++,u++)}if(s||1!==a.newLines||(a.newLines=0),u||1!==a.oldLines||(a.oldLines=0),e.strict){if(s!==a.newLines)throw new Error("Added line count did not match for hunk at line "+(t+1));if(u!==a.oldLines)throw new Error("Removed line count did not match for hunk at line "+(t+1))}return a}for(;o<n.length;)a();return i}function F(t,e,n){var r=!0,i=!1,o=!1,a=1;return function s(){if(r&&!o){if(i?a++:r=!1,t+a<=n)return a;o=!0}if(!i)return o||(r=!0),e<=t-a?-a++:(i=!0,s())}}function j(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof e&&(e=T(e)),Array.isArray(e)){if(e.length>1)throw new Error("applyPatch only works with a single input.");e=e[0]}var r,i,o=t.split(/\r\n|[\n\v\f\r\x85]/),a=t.match(/\r\n|[\n\v\f\r\x85]/g)||[],s=e.hunks,u=n.compareLine||function(t,e,n,r){return e===r},c=0,l=n.fuzzFactor||0,f=0,p=0;function d(t,e){for(var n=0;n<t.lines.length;n++){var r=t.lines[n],i=r.length>0?r[0]:" ",a=r.length>0?r.substr(1):r;if(" "===i||"-"===i){if(!u(e+1,o[e],i,a)&&++c>l)return!1;e++}}return!0}for(var h=0;h<s.length;h++){for(var g=s[h],v=o.length-g.oldLines,y=0,m=p+g.oldStart-1,b=F(m,f,v);void 0!==y;y=b())if(d(g,m+y)){g.offset=p+=y;break}if(void 0===y)return!1;f=g.offset+g.oldStart+g.oldLines}for(var D=0,w=0;w<s.length;w++){var x=s[w],E=x.oldStart+x.offset+D-1;D+=x.newLines-x.oldLines,E<0&&(E=0);for(var A=0;A<x.lines.length;A++){var _=x.lines[A],S=_.length>0?_[0]:" ",C=_.length>0?_.substr(1):_,k=x.linedelimiters[A];if(" "===S)E++;else if("-"===S)o.splice(E,1),a.splice(E,1);else if("+"===S)o.splice(E,0,C),a.splice(E,0,k),E++;else if("\\"===S){var O=x.lines[A-1]?x.lines[A-1][0]:null;"+"===O?r=!0:"-"===O&&(i=!0)}}}if(r)for(;!o[o.length-1];)o.pop(),a.pop();else i&&(o.push(""),a.push("\n"));for(var j=0;j<o.length-1;j++)o[j]=o[j]+a[j];return o.join("")}function L(t,e){"string"==typeof t&&(t=T(t));var n=0;function r(){var i=t[n++];if(!i)return e.complete();e.loadFile(i,(function(t,n){if(t)return e.complete(t);var o=j(n,i,e);e.patched(i,o,(function(t){if(t)return e.complete(t);r()}))}))}r()}function I(t,e,n,r,i,o,a){a||(a={}),void 0===a.context&&(a.context=4);var s=d(n,r,a);function u(t){return t.map((function(t){return" "+t}))}s.push({value:"",lines:[]});for(var c=[],l=0,f=0,p=[],h=1,g=1,v=function(t){var e=s[t],i=e.lines||e.value.replace(/\n$/,"").split("\n");if(e.lines=i,e.added||e.removed){var o;if(!l){var d=s[t-1];l=h,f=g,d&&(p=a.context>0?u(d.lines.slice(-a.context)):[],l-=p.length,f-=p.length)}(o=p).push.apply(o,D(i.map((function(t){return(e.added?"+":"-")+t})))),e.added?g+=i.length:h+=i.length}else{if(l)if(i.length<=2*a.context&&t<s.length-2){var v;(v=p).push.apply(v,D(u(i)))}else{var y,m=Math.min(i.length,a.context);(y=p).push.apply(y,D(u(i.slice(0,m))));var b={oldStart:l,oldLines:h-l+m,newStart:f,newLines:g-f+m,lines:p};if(t>=s.length-2&&i.length<=a.context){var w=/\n$/.test(n),x=/\n$/.test(r),E=0==i.length&&p.length>b.oldLines;!w&&E&&p.splice(b.oldLines,0,"\"),(w||E)&&x||p.push("\")}c.push(b),l=0,f=0,p=[]}h+=i.length,g+=i.length}},y=0;y<s.length;y++)v(y);return{oldFileName:t,newFileName:e,oldHeader:i,newHeader:o,hunks:c}}function N(t,e,n,r,i,o,a){var s=I(t,e,n,r,i,o,a),u=[];t==e&&u.push("Index: "+t),u.push("==================================================================="),u.push("--- "+s.oldFileName+(void 0===s.oldHeader?"":"\t"+s.oldHeader)),u.push("+++ "+s.newFileName+(void 0===s.newHeader?"":"\t"+s.newHeader));for(var c=0;c<s.hunks.length;c++){var l=s.hunks[c];u.push("@@ -"+l.oldStart+","+l.oldLines+" +"+l.newStart+","+l.newLines+" @@"),u.push.apply(u,l.lines)}return u.join("\n")+"\n"}function B(t,e,n,r,i,o){return N(t,t,e,n,r,i,o)}function R(t,e){return t.length===e.length&&P(t,e)}function P(t,e){if(e.length>t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function M(t){var e=nt(t.lines),n=e.oldLines,r=e.newLines;void 0!==n?t.oldLines=n:delete t.oldLines,void 0!==r?t.newLines=r:delete t.newLines}function H(t,e,n){t=q(t,n),e=q(e,n);var r={};(t.index||e.index)&&(r.index=t.index||e.index),(t.newFileName||e.newFileName)&&(U(t)?U(e)?(r.oldFileName=z(r,t.oldFileName,e.oldFileName),r.newFileName=z(r,t.newFileName,e.newFileName),r.oldHeader=z(r,t.oldHeader,e.oldHeader),r.newHeader=z(r,t.newHeader,e.newHeader)):(r.oldFileName=t.oldFileName,r.newFileName=t.newFileName,r.oldHeader=t.oldHeader,r.newHeader=t.newHeader):(r.oldFileName=e.oldFileName||t.oldFileName,r.newFileName=e.newFileName||t.newFileName,r.oldHeader=e.oldHeader||t.oldHeader,r.newHeader=e.newHeader||t.newHeader)),r.hunks=[];for(var i=0,o=0,a=0,s=0;i<t.hunks.length||o<e.hunks.length;){var u=t.hunks[i]||{oldStart:1/0},c=e.hunks[o]||{oldStart:1/0};if(W(u,c))r.hunks.push(G(u,a)),i++,s+=u.newLines-u.oldLines;else if(W(c,u))r.hunks.push(G(c,s)),o++,a+=c.newLines-c.oldLines;else{var l={oldStart:Math.min(u.oldStart,c.oldStart),oldLines:0,newStart:Math.min(u.newStart+a,c.oldStart+s),newLines:0,lines:[]};Y(l,u.oldStart,u.lines,c.oldStart,c.lines),o++,i++,r.hunks.push(l)}}return r}function q(t,e){if("string"==typeof t){if(/^@@/m.test(t)||/^Index:/m.test(t))return T(t)[0];if(!e)throw new Error("Must provide a base reference or pass in a patch");return I(void 0,void 0,e,t)}return t}function U(t){return t.newFileName&&t.newFileName!==t.oldFileName}function z(t,e,n){return e===n?e:(t.conflict=!0,{mine:e,theirs:n})}function W(t,e){return t.oldStart<e.oldStart&&t.oldStart+t.oldLines<e.oldStart}function G(t,e){return{oldStart:t.oldStart,oldLines:t.oldLines,newStart:t.newStart+e,newLines:t.newLines,lines:t.lines}}function Y(t,e,n,r,i){var o={offset:e,lines:n,index:0},a={offset:r,lines:i,index:0};for(X(t,o,a),X(t,a,o);o.index<o.lines.length&&a.index<a.lines.length;){var s=o.lines[o.index],u=a.lines[a.index];if("-"!==s[0]&&"+"!==s[0]||"-"!==u[0]&&"+"!==u[0])if("+"===s[0]&&" "===u[0]){var c;(c=t.lines).push.apply(c,D(Q(o)))}else if("+"===u[0]&&" "===s[0]){var l;(l=t.lines).push.apply(l,D(Q(a)))}else"-"===s[0]&&" "===u[0]?V(t,o,a):"-"===u[0]&&" "===s[0]?V(t,a,o,!0):s===u?(t.lines.push(s),o.index++,a.index++):J(t,Q(o),Q(a));else $(t,o,a)}K(t,o),K(t,a),M(t)}function $(t,e,n){var r=Q(e),i=Q(n);if(tt(r)&&tt(i)){var o,a;if(P(r,i)&&et(n,r,r.length-i.length))return void(o=t.lines).push.apply(o,D(r));if(P(i,r)&&et(e,i,i.length-r.length))return void(a=t.lines).push.apply(a,D(i))}else if(R(r,i)){var s;return void(s=t.lines).push.apply(s,D(r))}J(t,r,i)}function V(t,e,n,r){var i,o=Q(e),a=Z(n,o);a.merged?(i=t.lines).push.apply(i,D(a.merged)):J(t,r?a:o,r?o:a)}function J(t,e,n){t.conflict=!0,t.lines.push({conflict:!0,mine:e,theirs:n})}function X(t,e,n){for(;e.offset<n.offset&&e.index<e.lines.length;){var r=e.lines[e.index++];t.lines.push(r),e.offset++}}function K(t,e){for(;e.index<e.lines.length;){var n=e.lines[e.index++];t.lines.push(n)}}function Q(t){for(var e=[],n=t.lines[t.index][0];t.index<t.lines.length;){var r=t.lines[t.index];if("-"===n&&"+"===r[0]&&(n="+"),n!==r[0])break;e.push(r),t.index++}return e}function Z(t,e){for(var n=[],r=[],i=0,o=!1,a=!1;i<e.length&&t.index<t.lines.length;){var s=t.lines[t.index],u=e[i];if("+"===u[0])break;if(o=o||" "!==s[0],r.push(u),i++,"+"===s[0])for(a=!0;"+"===s[0];)n.push(s),s=t.lines[++t.index];u.substr(1)===s.substr(1)?(n.push(s),t.index++):a=!0}if("+"===(e[i]||"")[0]&&o&&(a=!0),a)return n;for(;i<e.length;)r.push(e[i++]);return{merged:r,changes:n}}function tt(t){return t.reduce((function(t,e){return t&&"-"===e[0]}),!0)}function et(t,e,n){for(var r=0;r<n;r++){var i=e[e.length-n+r].substr(1);if(t.lines[t.index+r]!==" "+i)return!1}return t.index+=n,!0}function nt(t){var e=0,n=0;return t.forEach((function(t){if("string"!=typeof t){var r=nt(t.mine),i=nt(t.theirs);void 0!==e&&(r.oldLines===i.oldLines?e+=r.oldLines:e=void 0),void 0!==n&&(r.newLines===i.newLines?n+=r.newLines:n=void 0)}else void 0===n||"+"!==t[0]&&" "!==t[0]||n++,void 0===e||"-"!==t[0]&&" "!==t[0]||e++})),{oldLines:e,newLines:n}}function rt(t){for(var e,n,r=[],i=0;i<t.length;i++)n=(e=t[i]).added?1:e.removed?-1:0,r.push([n,e.value]);return r}function it(t){for(var e=[],n=0;n<t.length;n++){var r=t[n];r.added?e.push("<ins>"):r.removed&&e.push("<del>"),e.push(ot(r.value)),r.added?e.push("</ins>"):r.removed&&e.push("</del>")}return e.join("")}function ot(t){var e=t;return e=(e=(e=(e=e.replace(/&/g,"&")).replace(/</g,"<")).replace(/>/g,">")).replace(/"/g,""")}k.tokenize=function(t){return t.slice()},k.join=k.removeEmpty=function(t){return t},t.Diff=e,t.diffChars=o,t.diffWords=l,t.diffWordsWithSpace=f,t.diffLines=d,t.diffTrimmedLines=h,t.diffSentences=v,t.diffCss=m,t.diffJson=S,t.diffArrays=O,t.structuredPatch=I,t.createTwoFilesPatch=N,t.createPatch=B,t.applyPatch=j,t.applyPatches=L,t.parsePatch=T,t.merge=H,t.convertChangesToDMP=rt,t.convertChangesToXML=it,t.canonicalize=C,Object.defineProperty(t,"__esModule",{value:!0})}(e)},934:t=>{"use strict";t.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}},563:function(t,e){var n;!function(e,n){"use strict";"object"==typeof t.exports?t.exports=e.document?n(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return n(t)}:n(e)}("undefined"!=typeof window?window:this,(function(r,i){"use strict";var o=[],a=Object.getPrototypeOf,s=o.slice,u=o.flat?function(t){return o.flat.call(t)}:function(t){return o.concat.apply([],t)},c=o.push,l=o.indexOf,f={},p=f.toString,d=f.hasOwnProperty,h=d.toString,g=h.call(Object),v={},y=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType&&"function"!=typeof t.item},m=function(t){return null!=t&&t===t.window},b=r.document,D={type:!0,src:!0,nonce:!0,noModule:!0};function w(t,e,n){var r,i,o=(n=n||b).createElement("script");if(o.text=t,e)for(r in D)(i=e[r]||e.getAttribute&&e.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function x(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?f[p.call(t)]||"object":typeof t}var E="3.6.4",A=function(t,e){return new A.fn.init(t,e)};function _(t){var e=!!t&&"length"in t&&t.length,n=x(t);return!y(t)&&!m(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}A.fn=A.prototype={jquery:E,constructor:A,length:0,toArray:function(){return s.call(this)},get:function(t){return null==t?s.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=A.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return A.each(this,t)},map:function(t){return this.pushStack(A.map(this,(function(e,n){return t.call(e,n,e)})))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(A.grep(this,(function(t,e){return(e+1)%2})))},odd:function(){return this.pushStack(A.grep(this,(function(t,e){return e%2})))},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n<e?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:c,sort:o.sort,splice:o.splice},A.extend=A.fn.extend=function(){var t,e,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[s]||{},s++),"object"==typeof a||y(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(t=arguments[s]))for(e in t)r=t[e],"__proto__"!==e&&a!==r&&(c&&r&&(A.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[e],o=i&&!Array.isArray(n)?[]:i||A.isPlainObject(n)?n:{},i=!1,a[e]=A.extend(c,o,r)):void 0!==r&&(a[e]=r));return a},A.extend({expando:"jQuery"+(E+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isPlainObject:function(t){var e,n;return!(!t||"[object Object]"!==p.call(t))&&(!(e=a(t))||"function"==typeof(n=d.call(e,"constructor")&&e.constructor)&&h.call(n)===g)},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t,e,n){w(t,{nonce:e&&e.nonce},n)},each:function(t,e){var n,r=0;if(_(t))for(n=t.length;r<n&&!1!==e.call(t[r],r,t[r]);r++);else for(r in t)if(!1===e.call(t[r],r,t[r]))break;return t},makeArray:function(t,e){var n=e||[];return null!=t&&(_(Object(t))?A.merge(n,"string"==typeof t?[t]:t):c.call(n,t)),n},inArray:function(t,e,n){return null==e?-1:l.call(e,t,n)},merge:function(t,e){for(var n=+e.length,r=0,i=t.length;r<n;r++)t[i++]=e[r];return t.length=i,t},grep:function(t,e,n){for(var r=[],i=0,o=t.length,a=!n;i<o;i++)!e(t[i],i)!==a&&r.push(t[i]);return r},map:function(t,e,n){var r,i,o=0,a=[];if(_(t))for(r=t.length;o<r;o++)null!=(i=e(t[o],o,n))&&a.push(i);else for(o in t)null!=(i=e(t[o],o,n))&&a.push(i);return u(a)},guid:1,support:v}),"function"==typeof Symbol&&(A.fn[Symbol.iterator]=o[Symbol.iterator]),A.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(t,e){f["[object "+e+"]"]=e.toLowerCase()}));var S=function(t){var e,n,r,i,o,a,s,u,c,l,f,p,d,h,g,v,y,m,b,D="sizzle"+1*new Date,w=t.document,x=0,E=0,A=ut(),_=ut(),S=ut(),C=ut(),k=function(t,e){return t===e&&(f=!0),0},O={}.hasOwnProperty,T=[],F=T.pop,j=T.push,L=T.push,I=T.slice,N=function(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",R="[\\x20\\t\\r\\n\\f]",P="(?:\\\\[\\da-fA-F]{1,6}"+R+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",M="\\["+R+"*("+P+")(?:"+R+"*([*^$|!~]?=)"+R+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+P+"))|)"+R+"*\\]",H=":("+P+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+M+")*)|.*)\\)|)",q=new RegExp(R+"+","g"),U=new RegExp("^"+R+"+|((?:^|[^\\\\])(?:\\\\.)*)"+R+"+$","g"),z=new RegExp("^"+R+"*,"+R+"*"),W=new RegExp("^"+R+"*([>+~]|"+R+")"+R+"*"),G=new RegExp(R+"|>"),Y=new RegExp(H),$=new RegExp("^"+P+"$"),V={ID:new RegExp("^#("+P+")"),CLASS:new RegExp("^\\.("+P+")"),TAG:new RegExp("^("+P+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+H),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+R+"*(even|odd|(([+-]|)(\\d*)n|)"+R+"*(?:([+-]|)"+R+"*(\\d+)|))"+R+"*\\)|)","i"),bool:new RegExp("^(?:"+B+")$","i"),needsContext:new RegExp("^"+R+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+R+"*((?:-\\d)?\\d*)"+R+"*\\)|)(?=[^-]|$)","i")},J=/HTML$/i,X=/^(?:input|select|textarea|button)$/i,K=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,tt=/[+~]/,et=new RegExp("\\\\[\\da-fA-F]{1,6}"+R+"?|\\\\([^\\r\\n\\f])","g"),nt=function(t,e){var n="0x"+t.slice(1)-65536;return e||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},rt=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,it=function(t,e){return e?"\0"===t?"\ufffd":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},ot=function(){p()},at=Dt((function(t){return!0===t.disabled&&"fieldset"===t.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{L.apply(T=I.call(w.childNodes),w.childNodes),T[w.childNodes.length].nodeType}catch(t){L={apply:T.length?function(t,e){j.apply(t,I.call(e))}:function(t,e){for(var n=t.length,r=0;t[n++]=e[r++];);t.length=n-1}}}function st(t,e,r,i){var o,s,c,l,f,h,y,m=e&&e.ownerDocument,w=e?e.nodeType:9;if(r=r||[],"string"!=typeof t||!t||1!==w&&9!==w&&11!==w)return r;if(!i&&(p(e),e=e||d,g)){if(11!==w&&(f=Z.exec(t)))if(o=f[1]){if(9===w){if(!(c=e.getElementById(o)))return r;if(c.id===o)return r.push(c),r}else if(m&&(c=m.getElementById(o))&&b(e,c)&&c.id===o)return r.push(c),r}else{if(f[2])return L.apply(r,e.getElementsByTagName(t)),r;if((o=f[3])&&n.getElementsByClassName&&e.getElementsByClassName)return L.apply(r,e.getElementsByClassName(o)),r}if(n.qsa&&!C[t+" "]&&(!v||!v.test(t))&&(1!==w||"object"!==e.nodeName.toLowerCase())){if(y=t,m=e,1===w&&(G.test(t)||W.test(t))){for((m=tt.test(t)&&yt(e.parentNode)||e)===e&&n.scope||((l=e.getAttribute("id"))?l=l.replace(rt,it):e.setAttribute("id",l=D)),s=(h=a(t)).length;s--;)h[s]=(l?"#"+l:":scope")+" "+bt(h[s]);y=h.join(",")}try{return L.apply(r,m.querySelectorAll(y)),r}catch(e){C(t,!0)}finally{l===D&&e.removeAttribute("id")}}}return u(t.replace(U,"$1"),e,r,i)}function ut(){var t=[];return function e(n,i){return t.push(n+" ")>r.cacheLength&&delete e[t.shift()],e[n+" "]=i}}function ct(t){return t[D]=!0,t}function lt(t){var e=d.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function ft(t,e){for(var n=t.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=e}function pt(t,e){var n=e&&t,r=n&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function dt(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function ht(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function gt(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&at(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function vt(t){return ct((function(e){return e=+e,ct((function(n,r){for(var i,o=t([],n.length,e),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))}))}))}function yt(t){return t&&void 0!==t.getElementsByTagName&&t}for(e in n=st.support={},o=st.isXML=function(t){var e=t&&t.namespaceURI,n=t&&(t.ownerDocument||t).documentElement;return!J.test(e||n&&n.nodeName||"HTML")},p=st.setDocument=function(t){var e,i,a=t?t.ownerDocument||t:w;return a!=d&&9===a.nodeType&&a.documentElement?(h=(d=a).documentElement,g=!o(d),w!=d&&(i=d.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",ot,!1):i.attachEvent&&i.attachEvent("onunload",ot)),n.scope=lt((function(t){return h.appendChild(t).appendChild(d.createElement("div")),void 0!==t.querySelectorAll&&!t.querySelectorAll(":scope fieldset div").length})),n.cssHas=lt((function(){try{return d.querySelector(":has(*,:jqfake)"),!1}catch(t){return!0}})),n.attributes=lt((function(t){return t.className="i",!t.getAttribute("className")})),n.getElementsByTagName=lt((function(t){return t.appendChild(d.createComment("")),!t.getElementsByTagName("*").length})),n.getElementsByClassName=Q.test(d.getElementsByClassName),n.getById=lt((function(t){return h.appendChild(t).id=D,!d.getElementsByName||!d.getElementsByName(D).length})),n.getById?(r.filter.ID=function(t){var e=t.replace(et,nt);return function(t){return t.getAttribute("id")===e}},r.find.ID=function(t,e){if(void 0!==e.getElementById&&g){var n=e.getElementById(t);return n?[n]:[]}}):(r.filter.ID=function(t){var e=t.replace(et,nt);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},r.find.ID=function(t,e){if(void 0!==e.getElementById&&g){var n,r,i,o=e.getElementById(t);if(o){if((n=o.getAttributeNode("id"))&&n.value===t)return[o];for(i=e.getElementsByName(t),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===t)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):n.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,r=[],i=0,o=e.getElementsByTagName(t);if("*"===t){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&g)return e.getElementsByClassName(t)},y=[],v=[],(n.qsa=Q.test(d.querySelectorAll))&&(lt((function(t){var e;h.appendChild(t).innerHTML="<a id='"+D+"'></a><select id='"+D+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+R+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||v.push("\\["+R+"*(?:value|"+B+")"),t.querySelectorAll("[id~="+D+"-]").length||v.push("~="),(e=d.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||v.push("\\["+R+"*name"+R+"*="+R+"*(?:''|\"\")"),t.querySelectorAll(":checked").length||v.push(":checked"),t.querySelectorAll("a#"+D+"+*").length||v.push(".#.+[+~]"),t.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")})),lt((function(t){t.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var e=d.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&v.push("name"+R+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),h.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),v.push(",.*:")}))),(n.matchesSelector=Q.test(m=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&<((function(t){n.disconnectedMatch=m.call(t,"*"),m.call(t,"[s!='']:x"),y.push("!=",H)})),n.cssHas||v.push(":has"),v=v.length&&new RegExp(v.join("|")),y=y.length&&new RegExp(y.join("|")),e=Q.test(h.compareDocumentPosition),b=e||Q.test(h.contains)?function(t,e){var n=9===t.nodeType&&t.documentElement||t,r=e&&e.parentNode;return t===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):t.compareDocumentPosition&&16&t.compareDocumentPosition(r)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},k=e?function(t,e){if(t===e)return f=!0,0;var r=!t.compareDocumentPosition-!e.compareDocumentPosition;return r||(1&(r=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!n.sortDetached&&e.compareDocumentPosition(t)===r?t==d||t.ownerDocument==w&&b(w,t)?-1:e==d||e.ownerDocument==w&&b(w,e)?1:l?N(l,t)-N(l,e):0:4&r?-1:1)}:function(t,e){if(t===e)return f=!0,0;var n,r=0,i=t.parentNode,o=e.parentNode,a=[t],s=[e];if(!i||!o)return t==d?-1:e==d?1:i?-1:o?1:l?N(l,t)-N(l,e):0;if(i===o)return pt(t,e);for(n=t;n=n.parentNode;)a.unshift(n);for(n=e;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?pt(a[r],s[r]):a[r]==w?-1:s[r]==w?1:0},d):d},st.matches=function(t,e){return st(t,null,null,e)},st.matchesSelector=function(t,e){if(p(t),n.matchesSelector&&g&&!C[e+" "]&&(!y||!y.test(e))&&(!v||!v.test(e)))try{var r=m.call(t,e);if(r||n.disconnectedMatch||t.document&&11!==t.document.nodeType)return r}catch(t){C(e,!0)}return st(e,d,null,[t]).length>0},st.contains=function(t,e){return(t.ownerDocument||t)!=d&&p(t),b(t,e)},st.attr=function(t,e){(t.ownerDocument||t)!=d&&p(t);var i=r.attrHandle[e.toLowerCase()],o=i&&O.call(r.attrHandle,e.toLowerCase())?i(t,e,!g):void 0;return void 0!==o?o:n.attributes||!g?t.getAttribute(e):(o=t.getAttributeNode(e))&&o.specified?o.value:null},st.escape=function(t){return(t+"").replace(rt,it)},st.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},st.uniqueSort=function(t){var e,r=[],i=0,o=0;if(f=!n.detectDuplicates,l=!n.sortStable&&t.slice(0),t.sort(k),f){for(;e=t[o++];)e===t[o]&&(i=r.push(o));for(;i--;)t.splice(r[i],1)}return l=null,t},i=st.getText=function(t){var e,n="",r=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=i(t)}else if(3===o||4===o)return t.nodeValue}else for(;e=t[r++];)n+=i(e);return n},r=st.selectors={cacheLength:50,createPseudo:ct,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(et,nt),t[3]=(t[3]||t[4]||t[5]||"").replace(et,nt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||st.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&st.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return V.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&Y.test(n)&&(e=a(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(et,nt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=A[t+" "];return e||(e=new RegExp("(^|"+R+")"+t+"("+R+"|$)"))&&A(t,(function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,e,n){return function(r){var i=st.attr(r,t);return null==i?"!="===e:!e||(i+="","="===e?i===n:"!="===e?i!==n:"^="===e?n&&0===i.indexOf(n):"*="===e?n&&i.indexOf(n)>-1:"$="===e?n&&i.slice(-n.length)===n:"~="===e?(" "+i.replace(q," ")+" ").indexOf(n)>-1:"|="===e&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,r,i){var o="nth"!==t.slice(0,3),a="last"!==t.slice(-4),s="of-type"===e;return 1===r&&0===i?function(t){return!!t.parentNode}:function(e,n,u){var c,l,f,p,d,h,g=o!==a?"nextSibling":"previousSibling",v=e.parentNode,y=s&&e.nodeName.toLowerCase(),m=!u&&!s,b=!1;if(v){if(o){for(;g;){for(p=e;p=p[g];)if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===t&&!h&&"nextSibling"}return!0}if(h=[a?v.firstChild:v.lastChild],a&&m){for(b=(d=(c=(l=(f=(p=v)[D]||(p[D]={}))[p.uniqueID]||(f[p.uniqueID]={}))[t]||[])[0]===x&&c[1])&&c[2],p=d&&v.childNodes[d];p=++d&&p&&p[g]||(b=d=0)||h.pop();)if(1===p.nodeType&&++b&&p===e){l[t]=[x,d,b];break}}else if(m&&(b=d=(c=(l=(f=(p=e)[D]||(p[D]={}))[p.uniqueID]||(f[p.uniqueID]={}))[t]||[])[0]===x&&c[1]),!1===b)for(;(p=++d&&p&&p[g]||(b=d=0)||h.pop())&&((s?p.nodeName.toLowerCase()!==y:1!==p.nodeType)||!++b||(m&&((l=(f=p[D]||(p[D]={}))[p.uniqueID]||(f[p.uniqueID]={}))[t]=[x,b]),p!==e)););return(b-=i)===r||b%r==0&&b/r>=0}}},PSEUDO:function(t,e){var n,i=r.pseudos[t]||r.setFilters[t.toLowerCase()]||st.error("unsupported pseudo: "+t);return i[D]?i(e):i.length>1?(n=[t,t,"",e],r.setFilters.hasOwnProperty(t.toLowerCase())?ct((function(t,n){for(var r,o=i(t,e),a=o.length;a--;)t[r=N(t,o[a])]=!(n[r]=o[a])})):function(t){return i(t,0,n)}):i}},pseudos:{not:ct((function(t){var e=[],n=[],r=s(t.replace(U,"$1"));return r[D]?ct((function(t,e,n,i){for(var o,a=r(t,null,i,[]),s=t.length;s--;)(o=a[s])&&(t[s]=!(e[s]=o))})):function(t,i,o){return e[0]=t,r(e,null,o,n),e[0]=null,!n.pop()}})),has:ct((function(t){return function(e){return st(t,e).length>0}})),contains:ct((function(t){return t=t.replace(et,nt),function(e){return(e.textContent||i(e)).indexOf(t)>-1}})),lang:ct((function(t){return $.test(t||"")||st.error("unsupported lang: "+t),t=t.replace(et,nt).toLowerCase(),function(e){var n;do{if(n=g?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===h},focus:function(t){return t===d.activeElement&&(!d.hasFocus||d.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:gt(!1),disabled:gt(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!r.pseudos.empty(t)},header:function(t){return K.test(t.nodeName)},input:function(t){return X.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:vt((function(){return[0]})),last:vt((function(t,e){return[e-1]})),eq:vt((function(t,e,n){return[n<0?n+e:n]})),even:vt((function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t})),odd:vt((function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t})),lt:vt((function(t,e,n){for(var r=n<0?n+e:n>e?e:n;--r>=0;)t.push(r);return t})),gt:vt((function(t,e,n){for(var r=n<0?n+e:n;++r<e;)t.push(r);return t}))}},r.pseudos.nth=r.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[e]=dt(e);for(e in{submit:!0,reset:!0})r.pseudos[e]=ht(e);function mt(){}function bt(t){for(var e=0,n=t.length,r="";e<n;e++)r+=t[e].value;return r}function Dt(t,e,n){var r=e.dir,i=e.next,o=i||r,a=n&&"parentNode"===o,s=E++;return e.first?function(e,n,i){for(;e=e[r];)if(1===e.nodeType||a)return t(e,n,i);return!1}:function(e,n,u){var c,l,f,p=[x,s];if(u){for(;e=e[r];)if((1===e.nodeType||a)&&t(e,n,u))return!0}else for(;e=e[r];)if(1===e.nodeType||a)if(l=(f=e[D]||(e[D]={}))[e.uniqueID]||(f[e.uniqueID]={}),i&&i===e.nodeName.toLowerCase())e=e[r]||e;else{if((c=l[o])&&c[0]===x&&c[1]===s)return p[2]=c[2];if(l[o]=p,p[2]=t(e,n,u))return!0}return!1}}function wt(t){return t.length>1?function(e,n,r){for(var i=t.length;i--;)if(!t[i](e,n,r))return!1;return!0}:t[0]}function xt(t,e,n,r,i){for(var o,a=[],s=0,u=t.length,c=null!=e;s<u;s++)(o=t[s])&&(n&&!n(o,r,i)||(a.push(o),c&&e.push(s)));return a}function Et(t,e,n,r,i,o){return r&&!r[D]&&(r=Et(r)),i&&!i[D]&&(i=Et(i,o)),ct((function(o,a,s,u){var c,l,f,p=[],d=[],h=a.length,g=o||function(t,e,n){for(var r=0,i=e.length;r<i;r++)st(t,e[r],n);return n}(e||"*",s.nodeType?[s]:s,[]),v=!t||!o&&e?g:xt(g,p,t,s,u),y=n?i||(o?t:h||r)?[]:a:v;if(n&&n(v,y,s,u),r)for(c=xt(y,d),r(c,[],s,u),l=c.length;l--;)(f=c[l])&&(y[d[l]]=!(v[d[l]]=f));if(o){if(i||t){if(i){for(c=[],l=y.length;l--;)(f=y[l])&&c.push(v[l]=f);i(null,y=[],c,u)}for(l=y.length;l--;)(f=y[l])&&(c=i?N(o,f):p[l])>-1&&(o[c]=!(a[c]=f))}}else y=xt(y===a?y.splice(h,y.length):y),i?i(null,a,y,u):L.apply(a,y)}))}function At(t){for(var e,n,i,o=t.length,a=r.relative[t[0].type],s=a||r.relative[" "],u=a?1:0,l=Dt((function(t){return t===e}),s,!0),f=Dt((function(t){return N(e,t)>-1}),s,!0),p=[function(t,n,r){var i=!a&&(r||n!==c)||((e=n).nodeType?l(t,n,r):f(t,n,r));return e=null,i}];u<o;u++)if(n=r.relative[t[u].type])p=[Dt(wt(p),n)];else{if((n=r.filter[t[u].type].apply(null,t[u].matches))[D]){for(i=++u;i<o&&!r.relative[t[i].type];i++);return Et(u>1&&wt(p),u>1&&bt(t.slice(0,u-1).concat({value:" "===t[u-2].type?"*":""})).replace(U,"$1"),n,u<i&&At(t.slice(u,i)),i<o&&At(t=t.slice(i)),i<o&&bt(t))}p.push(n)}return wt(p)}return mt.prototype=r.filters=r.pseudos,r.setFilters=new mt,a=st.tokenize=function(t,e){var n,i,o,a,s,u,c,l=_[t+" "];if(l)return e?0:l.slice(0);for(s=t,u=[],c=r.preFilter;s;){for(a in n&&!(i=z.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),n=!1,(i=W.exec(s))&&(n=i.shift(),o.push({value:n,type:i[0].replace(U," ")}),s=s.slice(n.length)),r.filter)!(i=V[a].exec(s))||c[a]&&!(i=c[a](i))||(n=i.shift(),o.push({value:n,type:a,matches:i}),s=s.slice(n.length));if(!n)break}return e?s.length:s?st.error(t):_(t,u).slice(0)},s=st.compile=function(t,e){var n,i=[],o=[],s=S[t+" "];if(!s){for(e||(e=a(t)),n=e.length;n--;)(s=At(e[n]))[D]?i.push(s):o.push(s);s=S(t,function(t,e){var n=e.length>0,i=t.length>0,o=function(o,a,s,u,l){var f,h,v,y=0,m="0",b=o&&[],D=[],w=c,E=o||i&&r.find.TAG("*",l),A=x+=null==w?1:Math.random()||.1,_=E.length;for(l&&(c=a==d||a||l);m!==_&&null!=(f=E[m]);m++){if(i&&f){for(h=0,a||f.ownerDocument==d||(p(f),s=!g);v=t[h++];)if(v(f,a||d,s)){u.push(f);break}l&&(x=A)}n&&((f=!v&&f)&&y--,o&&b.push(f))}if(y+=m,n&&m!==y){for(h=0;v=e[h++];)v(b,D,a,s);if(o){if(y>0)for(;m--;)b[m]||D[m]||(D[m]=F.call(u));D=xt(D)}L.apply(u,D),l&&!o&&D.length>0&&y+e.length>1&&st.uniqueSort(u)}return l&&(x=A,c=w),b};return n?ct(o):o}(o,i)),s.selector=t}return s},u=st.select=function(t,e,n,i){var o,u,c,l,f,p="function"==typeof t&&t,d=!i&&a(t=p.selector||t);if(n=n||[],1===d.length){if((u=d[0]=d[0].slice(0)).length>2&&"ID"===(c=u[0]).type&&9===e.nodeType&&g&&r.relative[u[1].type]){if(!(e=(r.find.ID(c.matches[0].replace(et,nt),e)||[])[0]))return n;p&&(e=e.parentNode),t=t.slice(u.shift().value.length)}for(o=V.needsContext.test(t)?0:u.length;o--&&(c=u[o],!r.relative[l=c.type]);)if((f=r.find[l])&&(i=f(c.matches[0].replace(et,nt),tt.test(u[0].type)&&yt(e.parentNode)||e))){if(u.splice(o,1),!(t=i.length&&bt(u)))return L.apply(n,i),n;break}}return(p||s(t,d))(i,e,!g,n,!e||tt.test(t)&&yt(e.parentNode)||e),n},n.sortStable=D.split("").sort(k).join("")===D,n.detectDuplicates=!!f,p(),n.sortDetached=lt((function(t){return 1&t.compareDocumentPosition(d.createElement("fieldset"))})),lt((function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")}))||ft("type|href|height|width",(function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)})),n.attributes&<((function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")}))||ft("value",(function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue})),lt((function(t){return null==t.getAttribute("disabled")}))||ft(B,(function(t,e,n){var r;if(!n)return!0===t[e]?e.toLowerCase():(r=t.getAttributeNode(e))&&r.specified?r.value:null})),st}(r);A.find=S,A.expr=S.selectors,A.expr[":"]=A.expr.pseudos,A.uniqueSort=A.unique=S.uniqueSort,A.text=S.getText,A.isXMLDoc=S.isXML,A.contains=S.contains,A.escapeSelector=S.escape;var C=function(t,e,n){for(var r=[],i=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(i&&A(t).is(n))break;r.push(t)}return r},k=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},O=A.expr.match.needsContext;function T(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}var F=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(t,e,n){return y(e)?A.grep(t,(function(t,r){return!!e.call(t,r,t)!==n})):e.nodeType?A.grep(t,(function(t){return t===e!==n})):"string"!=typeof e?A.grep(t,(function(t){return l.call(e,t)>-1!==n})):A.filter(e,t,n)}A.filter=function(t,e,n){var r=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===r.nodeType?A.find.matchesSelector(r,t)?[r]:[]:A.find.matches(t,A.grep(e,(function(t){return 1===t.nodeType})))},A.fn.extend({find:function(t){var e,n,r=this.length,i=this;if("string"!=typeof t)return this.pushStack(A(t).filter((function(){for(e=0;e<r;e++)if(A.contains(i[e],this))return!0})));for(n=this.pushStack([]),e=0;e<r;e++)A.find(t,i[e],n);return r>1?A.uniqueSort(n):n},filter:function(t){return this.pushStack(j(this,t||[],!1))},not:function(t){return this.pushStack(j(this,t||[],!0))},is:function(t){return!!j(this,"string"==typeof t&&O.test(t)?A(t):t||[],!1).length}});var L,I=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(A.fn.init=function(t,e,n){var r,i;if(!t)return this;if(n=n||L,"string"==typeof t){if(!(r="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:I.exec(t))||!r[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(r[1]){if(e=e instanceof A?e[0]:e,A.merge(this,A.parseHTML(r[1],e&&e.nodeType?e.ownerDocument||e:b,!0)),F.test(r[1])&&A.isPlainObject(e))for(r in e)y(this[r])?this[r](e[r]):this.attr(r,e[r]);return this}return(i=b.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):y(t)?void 0!==n.ready?n.ready(t):t(A):A.makeArray(t,this)}).prototype=A.fn,L=A(b);var N=/^(?:parents|prev(?:Until|All))/,B={children:!0,contents:!0,next:!0,prev:!0};function R(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}A.fn.extend({has:function(t){var e=A(t,this),n=e.length;return this.filter((function(){for(var t=0;t<n;t++)if(A.contains(this,e[t]))return!0}))},closest:function(t,e){var n,r=0,i=this.length,o=[],a="string"!=typeof t&&A(t);if(!O.test(t))for(;r<i;r++)for(n=this[r];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&A.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?A.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?l.call(A(t),this[0]):l.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(A.uniqueSort(A.merge(this.get(),A(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),A.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return C(t,"parentNode")},parentsUntil:function(t,e,n){return C(t,"parentNode",n)},next:function(t){return R(t,"nextSibling")},prev:function(t){return R(t,"previousSibling")},nextAll:function(t){return C(t,"nextSibling")},prevAll:function(t){return C(t,"previousSibling")},nextUntil:function(t,e,n){return C(t,"nextSibling",n)},prevUntil:function(t,e,n){return C(t,"previousSibling",n)},siblings:function(t){return k((t.parentNode||{}).firstChild,t)},children:function(t){return k(t.firstChild)},contents:function(t){return null!=t.contentDocument&&a(t.contentDocument)?t.contentDocument:(T(t,"template")&&(t=t.content||t),A.merge([],t.childNodes))}},(function(t,e){A.fn[t]=function(n,r){var i=A.map(this,e,n);return"Until"!==t.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=A.filter(r,i)),this.length>1&&(B[t]||A.uniqueSort(i),N.test(t)&&i.reverse()),this.pushStack(i)}}));var P=/[^\x20\t\r\n\f]+/g;function M(t){return t}function H(t){throw t}function q(t,e,n,r){var i;try{t&&y(i=t.promise)?i.call(t).done(e).fail(n):t&&y(i=t.then)?i.call(t,e,n):e.apply(void 0,[t].slice(r))}catch(t){n.apply(void 0,[t])}}A.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return A.each(t.match(P)||[],(function(t,n){e[n]=!0})),e}(t):A.extend({},t);var e,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||t.once,r=e=!0;a.length;s=-1)for(n=a.shift();++s<o.length;)!1===o[s].apply(n[0],n[1])&&t.stopOnFalse&&(s=o.length,n=!1);t.memory||(n=!1),e=!1,i&&(o=n?[]:"")},c={add:function(){return o&&(n&&!e&&(s=o.length-1,a.push(n)),function e(n){A.each(n,(function(n,r){y(r)?t.unique&&c.has(r)||o.push(r):r&&r.length&&"string"!==x(r)&&e(r)}))}(arguments),n&&!e&&u()),this},remove:function(){return A.each(arguments,(function(t,e){for(var n;(n=A.inArray(e,o,n))>-1;)o.splice(n,1),n<=s&&s--})),this},has:function(t){return t?A.inArray(t,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||e||(o=n=""),this},locked:function(){return!!i},fireWith:function(t,n){return i||(n=[t,(n=n||[]).slice?n.slice():n],a.push(n),e||u()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},A.extend({Deferred:function(t){var e=[["notify","progress",A.Callbacks("memory"),A.Callbacks("memory"),2],["resolve","done",A.Callbacks("once memory"),A.Callbacks("once memory"),0,"resolved"],["reject","fail",A.Callbacks("once memory"),A.Callbacks("once memory"),1,"rejected"]],n="pending",i={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},catch:function(t){return i.then(null,t)},pipe:function(){var t=arguments;return A.Deferred((function(n){A.each(e,(function(e,r){var i=y(t[r[4]])&&t[r[4]];o[r[1]]((function(){var t=i&&i.apply(this,arguments);t&&y(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[t]:arguments)}))})),t=null})).promise()},then:function(t,n,i){var o=0;function a(t,e,n,i){return function(){var s=this,u=arguments,c=function(){var r,c;if(!(t<o)){if((r=n.apply(s,u))===e.promise())throw new TypeError("Thenable self-resolution");c=r&&("object"==typeof r||"function"==typeof r)&&r.then,y(c)?i?c.call(r,a(o,e,M,i),a(o,e,H,i)):(o++,c.call(r,a(o,e,M,i),a(o,e,H,i),a(o,e,M,e.notifyWith))):(n!==M&&(s=void 0,u=[r]),(i||e.resolveWith)(s,u))}},l=i?c:function(){try{c()}catch(r){A.Deferred.exceptionHook&&A.Deferred.exceptionHook(r,l.stackTrace),t+1>=o&&(n!==H&&(s=void 0,u=[r]),e.rejectWith(s,u))}};t?l():(A.Deferred.getStackHook&&(l.stackTrace=A.Deferred.getStackHook()),r.setTimeout(l))}}return A.Deferred((function(r){e[0][3].add(a(0,r,y(i)?i:M,r.notifyWith)),e[1][3].add(a(0,r,y(t)?t:M)),e[2][3].add(a(0,r,y(n)?n:H))})).promise()},promise:function(t){return null!=t?A.extend(t,i):i}},o={};return A.each(e,(function(t,r){var a=r[2],s=r[5];i[r[1]]=a.add,s&&a.add((function(){n=s}),e[3-t][2].disable,e[3-t][3].disable,e[0][2].lock,e[0][3].lock),a.add(r[3].fire),o[r[0]]=function(){return o[r[0]+"With"](this===o?void 0:this,arguments),this},o[r[0]+"With"]=a.fireWith})),i.promise(o),t&&t.call(o,o),o},when:function(t){var e=arguments.length,n=e,r=Array(n),i=s.call(arguments),o=A.Deferred(),a=function(t){return function(n){r[t]=this,i[t]=arguments.length>1?s.call(arguments):n,--e||o.resolveWith(r,i)}};if(e<=1&&(q(t,o.done(a(n)).resolve,o.reject,!e),"pending"===o.state()||y(i[n]&&i[n].then)))return o.then();for(;n--;)q(i[n],a(n),o.reject);return o.promise()}});var U=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;A.Deferred.exceptionHook=function(t,e){r.console&&r.console.warn&&t&&U.test(t.name)&&r.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},A.readyException=function(t){r.setTimeout((function(){throw t}))};var z=A.Deferred();function W(){b.removeEventListener("DOMContentLoaded",W),r.removeEventListener("load",W),A.ready()}A.fn.ready=function(t){return z.then(t).catch((function(t){A.readyException(t)})),this},A.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--A.readyWait:A.isReady)||(A.isReady=!0,!0!==t&&--A.readyWait>0||z.resolveWith(b,[A]))}}),A.ready.then=z.then,"complete"===b.readyState||"loading"!==b.readyState&&!b.documentElement.doScroll?r.setTimeout(A.ready):(b.addEventListener("DOMContentLoaded",W),r.addEventListener("load",W));var G=function(t,e,n,r,i,o,a){var s=0,u=t.length,c=null==n;if("object"===x(n))for(s in i=!0,n)G(t,e,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,y(r)||(a=!0),c&&(a?(e.call(t,r),e=null):(c=e,e=function(t,e,n){return c.call(A(t),n)})),e))for(;s<u;s++)e(t[s],n,a?r:r.call(t[s],s,e(t[s],n)));return i?t:c?e.call(t):u?e(t[0],n):o},Y=/^-ms-/,$=/-([a-z])/g;function V(t,e){return e.toUpperCase()}function J(t){return t.replace(Y,"ms-").replace($,V)}var X=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};function K(){this.expando=A.expando+K.uid++}K.uid=1,K.prototype={cache:function(t){var e=t[this.expando];return e||(e={},X(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,n){var r,i=this.cache(t);if("string"==typeof e)i[J(e)]=n;else for(r in e)i[J(r)]=e[r];return i},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][J(e)]},access:function(t,e,n){return void 0===e||e&&"string"==typeof e&&void 0===n?this.get(t,e):(this.set(t,e,n),void 0!==n?n:e)},remove:function(t,e){var n,r=t[this.expando];if(void 0!==r){if(void 0!==e){n=(e=Array.isArray(e)?e.map(J):(e=J(e))in r?[e]:e.match(P)||[]).length;for(;n--;)delete r[e[n]]}(void 0===e||A.isEmptyObject(r))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!A.isEmptyObject(e)}};var Q=new K,Z=new K,tt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,et=/[A-Z]/g;function nt(t,e,n){var r;if(void 0===n&&1===t.nodeType)if(r="data-"+e.replace(et,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(r))){try{n=function(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:tt.test(t)?JSON.parse(t):t)}(n)}catch(t){}Z.set(t,e,n)}else n=void 0;return n}A.extend({hasData:function(t){return Z.hasData(t)||Q.hasData(t)},data:function(t,e,n){return Z.access(t,e,n)},removeData:function(t,e){Z.remove(t,e)},_data:function(t,e,n){return Q.access(t,e,n)},_removeData:function(t,e){Q.remove(t,e)}}),A.fn.extend({data:function(t,e){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===t){if(this.length&&(i=Z.get(o),1===o.nodeType&&!Q.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&0===(r=a[n].name).indexOf("data-")&&(r=J(r.slice(5)),nt(o,r,i[r]));Q.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof t?this.each((function(){Z.set(this,t)})):G(this,(function(e){var n;if(o&&void 0===e)return void 0!==(n=Z.get(o,t))||void 0!==(n=nt(o,t))?n:void 0;this.each((function(){Z.set(this,t,e)}))}),null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each((function(){Z.remove(this,t)}))}}),A.extend({queue:function(t,e,n){var r;if(t)return e=(e||"fx")+"queue",r=Q.get(t,e),n&&(!r||Array.isArray(n)?r=Q.access(t,e,A.makeArray(n)):r.push(n)),r||[]},dequeue:function(t,e){e=e||"fx";var n=A.queue(t,e),r=n.length,i=n.shift(),o=A._queueHooks(t,e);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===e&&n.unshift("inprogress"),delete o.stop,i.call(t,(function(){A.dequeue(t,e)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return Q.get(t,n)||Q.access(t,n,{empty:A.Callbacks("once memory").add((function(){Q.remove(t,[e+"queue",n])}))})}}),A.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?A.queue(this[0],t):void 0===e?this:this.each((function(){var n=A.queue(this,t,e);A._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&A.dequeue(this,t)}))},dequeue:function(t){return this.each((function(){A.dequeue(this,t)}))},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,r=1,i=A.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";a--;)(n=Q.get(o[a],t+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(e)}});var rt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,it=new RegExp("^(?:([+-])=|)("+rt+")([a-z%]*)$","i"),ot=["Top","Right","Bottom","Left"],at=b.documentElement,st=function(t){return A.contains(t.ownerDocument,t)},ut={composed:!0};at.getRootNode&&(st=function(t){return A.contains(t.ownerDocument,t)||t.getRootNode(ut)===t.ownerDocument});var ct=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&st(t)&&"none"===A.css(t,"display")};function lt(t,e,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return A.css(t,e,"")},u=s(),c=n&&n[3]||(A.cssNumber[e]?"":"px"),l=t.nodeType&&(A.cssNumber[e]||"px"!==c&&+u)&&it.exec(A.css(t,e));if(l&&l[3]!==c){for(u/=2,c=c||l[3],l=+u||1;a--;)A.style(t,e,l+c),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),l/=o;l*=2,A.style(t,e,l+c),n=n||[]}return n&&(l=+l||+u||0,i=n[1]?l+(n[1]+1)*n[2]:+n[2],r&&(r.unit=c,r.start=l,r.end=i)),i}var ft={};function pt(t){var e,n=t.ownerDocument,r=t.nodeName,i=ft[r];return i||(e=n.body.appendChild(n.createElement(r)),i=A.css(e,"display"),e.parentNode.removeChild(e),"none"===i&&(i="block"),ft[r]=i,i)}function dt(t,e){for(var n,r,i=[],o=0,a=t.length;o<a;o++)(r=t[o]).style&&(n=r.style.display,e?("none"===n&&(i[o]=Q.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&ct(r)&&(i[o]=pt(r))):"none"!==n&&(i[o]="none",Q.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(t[o].style.display=i[o]);return t}A.fn.extend({show:function(){return dt(this,!0)},hide:function(){return dt(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each((function(){ct(this)?A(this).show():A(this).hide()}))}});var ht,gt,vt=/^(?:checkbox|radio)$/i,yt=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,mt=/^$|^module$|\/(?:java|ecma)script/i;ht=b.createDocumentFragment().appendChild(b.createElement("div")),(gt=b.createElement("input")).setAttribute("type","radio"),gt.setAttribute("checked","checked"),gt.setAttribute("name","t"),ht.appendChild(gt),v.checkClone=ht.cloneNode(!0).cloneNode(!0).lastChild.checked,ht.innerHTML="<textarea>x</textarea>",v.noCloneChecked=!!ht.cloneNode(!0).lastChild.defaultValue,ht.innerHTML="<option></option>",v.option=!!ht.lastChild;var bt={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function Dt(t,e){var n;return n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&T(t,e)?A.merge([t],n):n}function wt(t,e){for(var n=0,r=t.length;n<r;n++)Q.set(t[n],"globalEval",!e||Q.get(e[n],"globalEval"))}bt.tbody=bt.tfoot=bt.colgroup=bt.caption=bt.thead,bt.th=bt.td,v.option||(bt.optgroup=bt.option=[1,"<select multiple='multiple'>","</select>"]);var xt=/<|&#?\w+;/;function Et(t,e,n,r,i){for(var o,a,s,u,c,l,f=e.createDocumentFragment(),p=[],d=0,h=t.length;d<h;d++)if((o=t[d])||0===o)if("object"===x(o))A.merge(p,o.nodeType?[o]:o);else if(xt.test(o)){for(a=a||f.appendChild(e.createElement("div")),s=(yt.exec(o)||["",""])[1].toLowerCase(),u=bt[s]||bt._default,a.innerHTML=u[1]+A.htmlPrefilter(o)+u[2],l=u[0];l--;)a=a.lastChild;A.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(e.createTextNode(o));for(f.textContent="",d=0;o=p[d++];)if(r&&A.inArray(o,r)>-1)i&&i.push(o);else if(c=st(o),a=Dt(f.appendChild(o),"script"),c&&wt(a),n)for(l=0;o=a[l++];)mt.test(o.type||"")&&n.push(o);return f}var At=/^([^.]*)(?:\.(.+)|)/;function _t(){return!0}function St(){return!1}function Ct(t,e){return t===function(){try{return b.activeElement}catch(t){}}()==("focus"===e)}function kt(t,e,n,r,i,o){var a,s;if("object"==typeof e){for(s in"string"!=typeof n&&(r=r||n,n=void 0),e)kt(t,s,n,r,e[s],o);return t}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=St;else if(!i)return t;return 1===o&&(a=i,i=function(t){return A().off(t),a.apply(this,arguments)},i.guid=a.guid||(a.guid=A.guid++)),t.each((function(){A.event.add(this,e,i,r,n)}))}function Ot(t,e,n){n?(Q.set(t,e,!1),A.event.add(t,e,{namespace:!1,handler:function(t){var r,i,o=Q.get(this,e);if(1&t.isTrigger&&this[e]){if(o.length)(A.event.special[e]||{}).delegateType&&t.stopPropagation();else if(o=s.call(arguments),Q.set(this,e,o),r=n(this,e),this[e](),o!==(i=Q.get(this,e))||r?Q.set(this,e,!1):i={},o!==i)return t.stopImmediatePropagation(),t.preventDefault(),i&&i.value}else o.length&&(Q.set(this,e,{value:A.event.trigger(A.extend(o[0],A.Event.prototype),o.slice(1),this)}),t.stopImmediatePropagation())}})):void 0===Q.get(t,e)&&A.event.add(t,e,_t)}A.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,c,l,f,p,d,h,g,v=Q.get(t);if(X(t))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&A.find.matchesSelector(at,i),n.guid||(n.guid=A.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(e){return void 0!==A&&A.event.triggered!==e.type?A.event.dispatch.apply(t,arguments):void 0}),c=(e=(e||"").match(P)||[""]).length;c--;)d=g=(s=At.exec(e[c])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=A.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=A.event.special[d]||{},l=A.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&A.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,l),l.handler.guid||(l.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,l):p.push(l),A.event.global[d]=!0)},remove:function(t,e,n,r,i){var o,a,s,u,c,l,f,p,d,h,g,v=Q.hasData(t)&&Q.get(t);if(v&&(u=v.events)){for(c=(e=(e||"").match(P)||[""]).length;c--;)if(d=g=(s=At.exec(e[c])||[])[1],h=(s[2]||"").split(".").sort(),d){for(f=A.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;o--;)l=p[o],!i&&g!==l.origType||n&&n.guid!==l.guid||s&&!s.test(l.namespace)||r&&r!==l.selector&&("**"!==r||!l.selector)||(p.splice(o,1),l.selector&&p.delegateCount--,f.remove&&f.remove.call(t,l));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(t,h,v.handle)||A.removeEvent(t,d,v.handle),delete u[d])}else for(d in u)A.event.remove(t,d+e[c],n,r,!0);A.isEmptyObject(u)&&Q.remove(t,"handle events")}},dispatch:function(t){var e,n,r,i,o,a,s=new Array(arguments.length),u=A.event.fix(t),c=(Q.get(this,"events")||Object.create(null))[u.type]||[],l=A.event.special[u.type]||{};for(s[0]=u,e=1;e<arguments.length;e++)s[e]=arguments[e];if(u.delegateTarget=this,!l.preDispatch||!1!==l.preDispatch.call(this,u)){for(a=A.event.handlers.call(this,u,c),e=0;(i=a[e++])&&!u.isPropagationStopped();)for(u.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!u.isImmediatePropagationStopped();)u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((A.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,u),u.result}},handlers:function(t,e){var n,r,i,o,a,s=[],u=e.delegateCount,c=t.target;if(u&&c.nodeType&&!("click"===t.type&&t.button>=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==t.type||!0!==c.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=e[n]).selector+" "]&&(a[i]=r.needsContext?A(i,this).index(c)>-1:A.find(i,this,null,[c]).length),a[i]&&o.push(r);o.length&&s.push({elem:c,handlers:o})}return c=this,u<e.length&&s.push({elem:c,handlers:e.slice(u)}),s},addProp:function(t,e){Object.defineProperty(A.Event.prototype,t,{enumerable:!0,configurable:!0,get:y(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(t){return t[A.expando]?t:new A.Event(t)},special:{load:{noBubble:!0},click:{setup:function(t){var e=this||t;return vt.test(e.type)&&e.click&&T(e,"input")&&Ot(e,"click",_t),!1},trigger:function(t){var e=this||t;return vt.test(e.type)&&e.click&&T(e,"input")&&Ot(e,"click"),!0},_default:function(t){var e=t.target;return vt.test(e.type)&&e.click&&T(e,"input")&&Q.get(e,"click")||T(e,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},A.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},A.Event=function(t,e){if(!(this instanceof A.Event))return new A.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?_t:St,this.target=t.target&&3===t.target.nodeType?t.target.parentNode:t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget):this.type=t,e&&A.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[A.expando]=!0},A.Event.prototype={constructor:A.Event,isDefaultPrevented:St,isPropagationStopped:St,isImmediatePropagationStopped:St,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=_t,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=_t,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=_t,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},A.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},A.event.addProp),A.each({focus:"focusin",blur:"focusout"},(function(t,e){A.event.special[t]={setup:function(){return Ot(this,t,Ct),!1},trigger:function(){return Ot(this,t),!0},_default:function(e){return Q.get(e.target,t)},delegateType:e}})),A.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(t,e){A.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,r=t.relatedTarget,i=t.handleObj;return r&&(r===this||A.contains(this,r))||(t.type=i.origType,n=i.handler.apply(this,arguments),t.type=e),n}}})),A.fn.extend({on:function(t,e,n,r){return kt(this,t,e,n,r)},one:function(t,e,n,r){return kt(this,t,e,n,r,1)},off:function(t,e,n){var r,i;if(t&&t.preventDefault&&t.handleObj)return r=t.handleObj,A(t.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof t){for(i in t)this.off(i,e,t[i]);return this}return!1!==e&&"function"!=typeof e||(n=e,e=void 0),!1===n&&(n=St),this.each((function(){A.event.remove(this,t,n,e)}))}});var Tt=/<script|<style|<link/i,Ft=/checked\s*(?:[^=]|=\s*.checked.)/i,jt=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Lt(t,e){return T(t,"table")&&T(11!==e.nodeType?e:e.firstChild,"tr")&&A(t).children("tbody")[0]||t}function It(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Nt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Bt(t,e){var n,r,i,o,a,s;if(1===e.nodeType){if(Q.hasData(t)&&(s=Q.get(t).events))for(i in Q.remove(e,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)A.event.add(e,i,s[i][n]);Z.hasData(t)&&(o=Z.access(t),a=A.extend({},o),Z.set(e,a))}}function Rt(t,e){var n=e.nodeName.toLowerCase();"input"===n&&vt.test(t.type)?e.checked=t.checked:"input"!==n&&"textarea"!==n||(e.defaultValue=t.defaultValue)}function Pt(t,e,n,r){e=u(e);var i,o,a,s,c,l,f=0,p=t.length,d=p-1,h=e[0],g=y(h);if(g||p>1&&"string"==typeof h&&!v.checkClone&&Ft.test(h))return t.each((function(i){var o=t.eq(i);g&&(e[0]=h.call(this,i,o.html())),Pt(o,e,n,r)}));if(p&&(o=(i=Et(e,t[0].ownerDocument,!1,t,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(s=(a=A.map(Dt(i,"script"),It)).length;f<p;f++)c=i,f!==d&&(c=A.clone(c,!0,!0),s&&A.merge(a,Dt(c,"script"))),n.call(t[f],c,f);if(s)for(l=a[a.length-1].ownerDocument,A.map(a,Nt),f=0;f<s;f++)c=a[f],mt.test(c.type||"")&&!Q.access(c,"globalEval")&&A.contains(l,c)&&(c.src&&"module"!==(c.type||"").toLowerCase()?A._evalUrl&&!c.noModule&&A._evalUrl(c.src,{nonce:c.nonce||c.getAttribute("nonce")},l):w(c.textContent.replace(jt,""),c,l))}return t}function Mt(t,e,n){for(var r,i=e?A.filter(e,t):t,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||A.cleanData(Dt(r)),r.parentNode&&(n&&st(r)&&wt(Dt(r,"script")),r.parentNode.removeChild(r));return t}A.extend({htmlPrefilter:function(t){return t},clone:function(t,e,n){var r,i,o,a,s=t.cloneNode(!0),u=st(t);if(!(v.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||A.isXMLDoc(t)))for(a=Dt(s),r=0,i=(o=Dt(t)).length;r<i;r++)Rt(o[r],a[r]);if(e)if(n)for(o=o||Dt(t),a=a||Dt(s),r=0,i=o.length;r<i;r++)Bt(o[r],a[r]);else Bt(t,s);return(a=Dt(s,"script")).length>0&&wt(a,!u&&Dt(t,"script")),s},cleanData:function(t){for(var e,n,r,i=A.event.special,o=0;void 0!==(n=t[o]);o++)if(X(n)){if(e=n[Q.expando]){if(e.events)for(r in e.events)i[r]?A.event.remove(n,r):A.removeEvent(n,r,e.handle);n[Q.expando]=void 0}n[Z.expando]&&(n[Z.expando]=void 0)}}}),A.fn.extend({detach:function(t){return Mt(this,t,!0)},remove:function(t){return Mt(this,t)},text:function(t){return G(this,(function(t){return void 0===t?A.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)}))}),null,t,arguments.length)},append:function(){return Pt(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Lt(this,t).appendChild(t)}))},prepend:function(){return Pt(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Lt(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return Pt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return Pt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)}))},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(A.cleanData(Dt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return A.clone(this,t,e)}))},html:function(t){return G(this,(function(t){var e=this[0]||{},n=0,r=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Tt.test(t)&&!bt[(yt.exec(t)||["",""])[1].toLowerCase()]){t=A.htmlPrefilter(t);try{for(;n<r;n++)1===(e=this[n]||{}).nodeType&&(A.cleanData(Dt(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)}),null,t,arguments.length)},replaceWith:function(){var t=[];return Pt(this,arguments,(function(e){var n=this.parentNode;A.inArray(this,t)<0&&(A.cleanData(Dt(this)),n&&n.replaceChild(e,this))}),t)}}),A.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(t,e){A.fn[t]=function(t){for(var n,r=[],i=A(t),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),A(i[a])[e](n),c.apply(r,n.get());return this.pushStack(r)}}));var Ht=new RegExp("^("+rt+")(?!px)[a-z%]+$","i"),qt=/^--/,Ut=function(t){var e=t.ownerDocument.defaultView;return e&&e.opener||(e=r),e.getComputedStyle(t)},zt=function(t,e,n){var r,i,o={};for(i in e)o[i]=t.style[i],t.style[i]=e[i];for(i in r=n.call(t),e)t.style[i]=o[i];return r},Wt=new RegExp(ot.join("|"),"i"),Gt="[\\x20\\t\\r\\n\\f]",Yt=new RegExp("^"+Gt+"+|((?:^|[^\\\\])(?:\\\\.)*)"+Gt+"+$","g");function $t(t,e,n){var r,i,o,a,s=qt.test(e),u=t.style;return(n=n||Ut(t))&&(a=n.getPropertyValue(e)||n[e],s&&a&&(a=a.replace(Yt,"$1")||void 0),""!==a||st(t)||(a=A.style(t,e)),!v.pixelBoxStyles()&&Ht.test(a)&&Wt.test(e)&&(r=u.width,i=u.minWidth,o=u.maxWidth,u.minWidth=u.maxWidth=u.width=a,a=n.width,u.width=r,u.minWidth=i,u.maxWidth=o)),void 0!==a?a+"":a}function Vt(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}!function(){function t(){if(l){c.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",at.appendChild(c).appendChild(l);var t=r.getComputedStyle(l);n="1%"!==t.top,u=12===e(t.marginLeft),l.style.right="60%",a=36===e(t.right),i=36===e(t.width),l.style.position="absolute",o=12===e(l.offsetWidth/3),at.removeChild(c),l=null}}function e(t){return Math.round(parseFloat(t))}var n,i,o,a,s,u,c=b.createElement("div"),l=b.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",v.clearCloneStyle="content-box"===l.style.backgroundClip,A.extend(v,{boxSizingReliable:function(){return t(),i},pixelBoxStyles:function(){return t(),a},pixelPosition:function(){return t(),n},reliableMarginLeft:function(){return t(),u},scrollboxSize:function(){return t(),o},reliableTrDimensions:function(){var t,e,n,i;return null==s&&(t=b.createElement("table"),e=b.createElement("tr"),n=b.createElement("div"),t.style.cssText="position:absolute;left:-11111px;border-collapse:separate",e.style.cssText="border:1px solid",e.style.height="1px",n.style.height="9px",n.style.display="block",at.appendChild(t).appendChild(e).appendChild(n),i=r.getComputedStyle(e),s=parseInt(i.height,10)+parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10)===e.offsetHeight,at.removeChild(t)),s}}))}();var Jt=["Webkit","Moz","ms"],Xt=b.createElement("div").style,Kt={};function Qt(t){var e=A.cssProps[t]||Kt[t];return e||(t in Xt?t:Kt[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),n=Jt.length;n--;)if((t=Jt[n]+e)in Xt)return t}(t)||t)}var Zt=/^(none|table(?!-c[ea]).+)/,te={position:"absolute",visibility:"hidden",display:"block"},ee={letterSpacing:"0",fontWeight:"400"};function ne(t,e,n){var r=it.exec(e);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):e}function re(t,e,n,r,i,o){var a="width"===e?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=A.css(t,n+ot[a],!0,i)),r?("content"===n&&(u-=A.css(t,"padding"+ot[a],!0,i)),"margin"!==n&&(u-=A.css(t,"border"+ot[a]+"Width",!0,i))):(u+=A.css(t,"padding"+ot[a],!0,i),"padding"!==n?u+=A.css(t,"border"+ot[a]+"Width",!0,i):s+=A.css(t,"border"+ot[a]+"Width",!0,i));return!r&&o>=0&&(u+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-o-u-s-.5))||0),u}function ie(t,e,n){var r=Ut(t),i=(!v.boxSizingReliable()||n)&&"border-box"===A.css(t,"boxSizing",!1,r),o=i,a=$t(t,e,r),s="offset"+e[0].toUpperCase()+e.slice(1);if(Ht.test(a)){if(!n)return a;a="auto"}return(!v.boxSizingReliable()&&i||!v.reliableTrDimensions()&&T(t,"tr")||"auto"===a||!parseFloat(a)&&"inline"===A.css(t,"display",!1,r))&&t.getClientRects().length&&(i="border-box"===A.css(t,"boxSizing",!1,r),(o=s in t)&&(a=t[s])),(a=parseFloat(a)||0)+re(t,e,n||(i?"border":"content"),o,r,a)+"px"}function oe(t,e,n,r,i){return new oe.prototype.init(t,e,n,r,i)}A.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=$t(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(t,e,n,r){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var i,o,a,s=J(e),u=qt.test(e),c=t.style;if(u||(e=Qt(s)),a=A.cssHooks[e]||A.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(t,!1,r))?i:c[e];"string"===(o=typeof n)&&(i=it.exec(n))&&i[1]&&(n=lt(t,e,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(A.cssNumber[s]?"":"px")),v.clearCloneStyle||""!==n||0!==e.indexOf("background")||(c[e]="inherit"),a&&"set"in a&&void 0===(n=a.set(t,n,r))||(u?c.setProperty(e,n):c[e]=n))}},css:function(t,e,n,r){var i,o,a,s=J(e);return qt.test(e)||(e=Qt(s)),(a=A.cssHooks[e]||A.cssHooks[s])&&"get"in a&&(i=a.get(t,!0,n)),void 0===i&&(i=$t(t,e,r)),"normal"===i&&e in ee&&(i=ee[e]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),A.each(["height","width"],(function(t,e){A.cssHooks[e]={get:function(t,n,r){if(n)return!Zt.test(A.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?ie(t,e,r):zt(t,te,(function(){return ie(t,e,r)}))},set:function(t,n,r){var i,o=Ut(t),a=!v.scrollboxSize()&&"absolute"===o.position,s=(a||r)&&"border-box"===A.css(t,"boxSizing",!1,o),u=r?re(t,e,r,s,o):0;return s&&a&&(u-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(o[e])-re(t,e,"border",!1,o)-.5)),u&&(i=it.exec(n))&&"px"!==(i[3]||"px")&&(t.style[e]=n,n=A.css(t,e)),ne(0,n,u)}}})),A.cssHooks.marginLeft=Vt(v.reliableMarginLeft,(function(t,e){if(e)return(parseFloat($t(t,"marginLeft"))||t.getBoundingClientRect().left-zt(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),A.each({margin:"",padding:"",border:"Width"},(function(t,e){A.cssHooks[t+e]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[t+ot[r]+e]=o[r]||o[r-2]||o[0];return i}},"margin"!==t&&(A.cssHooks[t+e].set=ne)})),A.fn.extend({css:function(t,e){return G(this,(function(t,e,n){var r,i,o={},a=0;if(Array.isArray(e)){for(r=Ut(t),i=e.length;a<i;a++)o[e[a]]=A.css(t,e[a],!1,r);return o}return void 0!==n?A.style(t,e,n):A.css(t,e)}),t,e,arguments.length>1)}}),A.Tween=oe,oe.prototype={constructor:oe,init:function(t,e,n,r,i,o){this.elem=t,this.prop=n,this.easing=i||A.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=o||(A.cssNumber[n]?"":"px")},cur:function(){var t=oe.propHooks[this.prop];return t&&t.get?t.get(this):oe.propHooks._default.get(this)},run:function(t){var e,n=oe.propHooks[this.prop];return this.options.duration?this.pos=e=A.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):oe.propHooks._default.set(this),this}},oe.prototype.init.prototype=oe.prototype,oe.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=A.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){A.fx.step[t.prop]?A.fx.step[t.prop](t):1!==t.elem.nodeType||!A.cssHooks[t.prop]&&null==t.elem.style[Qt(t.prop)]?t.elem[t.prop]=t.now:A.style(t.elem,t.prop,t.now+t.unit)}}},oe.propHooks.scrollTop=oe.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},A.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},A.fx=oe.prototype.init,A.fx.step={};var ae,se,ue=/^(?:toggle|show|hide)$/,ce=/queueHooks$/;function le(){se&&(!1===b.hidden&&r.requestAnimationFrame?r.requestAnimationFrame(le):r.setTimeout(le,A.fx.interval),A.fx.tick())}function fe(){return r.setTimeout((function(){ae=void 0})),ae=Date.now()}function pe(t,e){var n,r=0,i={height:t};for(e=e?1:0;r<4;r+=2-e)i["margin"+(n=ot[r])]=i["padding"+n]=t;return e&&(i.opacity=i.width=t),i}function de(t,e,n){for(var r,i=(he.tweeners[e]||[]).concat(he.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,e,t))return r}function he(t,e,n){var r,i,o=0,a=he.prefilters.length,s=A.Deferred().always((function(){delete u.elem})),u=function(){if(i)return!1;for(var e=ae||fe(),n=Math.max(0,c.startTime+c.duration-e),r=1-(n/c.duration||0),o=0,a=c.tweens.length;o<a;o++)c.tweens[o].run(r);return s.notifyWith(t,[c,r,n]),r<1&&a?n:(a||s.notifyWith(t,[c,1,0]),s.resolveWith(t,[c]),!1)},c=s.promise({elem:t,props:A.extend({},e),opts:A.extend(!0,{specialEasing:{},easing:A.easing._default},n),originalProperties:e,originalOptions:n,startTime:ae||fe(),duration:n.duration,tweens:[],createTween:function(e,n){var r=A.Tween(t,c.opts,e,n,c.opts.specialEasing[e]||c.opts.easing);return c.tweens.push(r),r},stop:function(e){var n=0,r=e?c.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)c.tweens[n].run(1);return e?(s.notifyWith(t,[c,1,0]),s.resolveWith(t,[c,e])):s.rejectWith(t,[c,e]),this}}),l=c.props;for(!function(t,e){var n,r,i,o,a;for(n in t)if(i=e[r=J(n)],o=t[n],Array.isArray(o)&&(i=o[1],o=t[n]=o[0]),n!==r&&(t[r]=o,delete t[n]),(a=A.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete t[r],o)n in t||(t[n]=o[n],e[n]=i);else e[r]=i}(l,c.opts.specialEasing);o<a;o++)if(r=he.prefilters[o].call(c,t,l,c.opts))return y(r.stop)&&(A._queueHooks(c.elem,c.opts.queue).stop=r.stop.bind(r)),r;return A.map(l,de,c),y(c.opts.start)&&c.opts.start.call(t,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),A.fx.timer(A.extend(u,{elem:t,anim:c,queue:c.opts.queue})),c}A.Animation=A.extend(he,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return lt(n.elem,t,it.exec(e),n),n}]},tweener:function(t,e){y(t)?(e=t,t=["*"]):t=t.match(P);for(var n,r=0,i=t.length;r<i;r++)n=t[r],he.tweeners[n]=he.tweeners[n]||[],he.tweeners[n].unshift(e)},prefilters:[function(t,e,n){var r,i,o,a,s,u,c,l,f="width"in e||"height"in e,p=this,d={},h=t.style,g=t.nodeType&&ct(t),v=Q.get(t,"fxshow");for(r in n.queue||(null==(a=A._queueHooks(t,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always((function(){p.always((function(){a.unqueued--,A.queue(t,"fx").length||a.empty.fire()}))}))),e)if(i=e[r],ue.test(i)){if(delete e[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||A.style(t,r)}if((u=!A.isEmptyObject(e))||!A.isEmptyObject(d))for(r in f&&1===t.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(c=v&&v.display)&&(c=Q.get(t,"display")),"none"===(l=A.css(t,"display"))&&(c?l=c:(dt([t],!0),c=t.style.display||c,l=A.css(t,"display"),dt([t]))),("inline"===l||"inline-block"===l&&null!=c)&&"none"===A.css(t,"float")&&(u||(p.done((function(){h.display=c})),null==c&&(l=h.display,c="none"===l?"":l)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always((function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]}))),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=Q.access(t,"fxshow",{display:c}),o&&(v.hidden=!g),g&&dt([t],!0),p.done((function(){for(r in g||dt([t]),Q.remove(t,"fxshow"),d)A.style(t,r,d[r])}))),u=de(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(t,e){e?he.prefilters.unshift(t):he.prefilters.push(t)}}),A.speed=function(t,e,n){var r=t&&"object"==typeof t?A.extend({},t):{complete:n||!n&&e||y(t)&&t,duration:t,easing:n&&e||e&&!y(e)&&e};return A.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in A.fx.speeds?r.duration=A.fx.speeds[r.duration]:r.duration=A.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){y(r.old)&&r.old.call(this),r.queue&&A.dequeue(this,r.queue)},r},A.fn.extend({fadeTo:function(t,e,n,r){return this.filter(ct).css("opacity",0).show().end().animate({opacity:e},t,n,r)},animate:function(t,e,n,r){var i=A.isEmptyObject(t),o=A.speed(e,n,r),a=function(){var e=he(this,A.extend({},t),o);(i||Q.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(t,e,n){var r=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=void 0),e&&this.queue(t||"fx",[]),this.each((function(){var e=!0,i=null!=t&&t+"queueHooks",o=A.timers,a=Q.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&ce.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=t&&o[i].queue!==t||(o[i].anim.stop(n),e=!1,o.splice(i,1));!e&&n||A.dequeue(this,t)}))},finish:function(t){return!1!==t&&(t=t||"fx"),this.each((function(){var e,n=Q.get(this),r=n[t+"queue"],i=n[t+"queueHooks"],o=A.timers,a=r?r.length:0;for(n.finish=!0,A.queue(this,t,[]),i&&i.stop&&i.stop.call(this,!0),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;e<a;e++)r[e]&&r[e].finish&&r[e].finish.call(this);delete n.finish}))}}),A.each(["toggle","show","hide"],(function(t,e){var n=A.fn[e];A.fn[e]=function(t,r,i){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(pe(e,!0),t,r,i)}})),A.each({slideDown:pe("show"),slideUp:pe("hide"),slideToggle:pe("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(t,e){A.fn[t]=function(t,n,r){return this.animate(e,t,n,r)}})),A.timers=[],A.fx.tick=function(){var t,e=0,n=A.timers;for(ae=Date.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||A.fx.stop(),ae=void 0},A.fx.timer=function(t){A.timers.push(t),A.fx.start()},A.fx.interval=13,A.fx.start=function(){se||(se=!0,le())},A.fx.stop=function(){se=null},A.fx.speeds={slow:600,fast:200,_default:400},A.fn.delay=function(t,e){return t=A.fx&&A.fx.speeds[t]||t,e=e||"fx",this.queue(e,(function(e,n){var i=r.setTimeout(e,t);n.stop=function(){r.clearTimeout(i)}}))},function(){var t=b.createElement("input"),e=b.createElement("select").appendChild(b.createElement("option"));t.type="checkbox",v.checkOn=""!==t.value,v.optSelected=e.selected,(t=b.createElement("input")).value="t",t.type="radio",v.radioValue="t"===t.value}();var ge,ve=A.expr.attrHandle;A.fn.extend({attr:function(t,e){return G(this,A.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each((function(){A.removeAttr(this,t)}))}}),A.extend({attr:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?A.prop(t,e,n):(1===o&&A.isXMLDoc(t)||(i=A.attrHooks[e.toLowerCase()]||(A.expr.match.bool.test(e)?ge:void 0)),void 0!==n?null===n?void A.removeAttr(t,e):i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:(t.setAttribute(e,n+""),n):i&&"get"in i&&null!==(r=i.get(t,e))?r:null==(r=A.find.attr(t,e))?void 0:r)},attrHooks:{type:{set:function(t,e){if(!v.radioValue&&"radio"===e&&T(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,r=0,i=e&&e.match(P);if(i&&1===t.nodeType)for(;n=i[r++];)t.removeAttribute(n)}}),ge={set:function(t,e,n){return!1===e?A.removeAttr(t,n):t.setAttribute(n,n),n}},A.each(A.expr.match.bool.source.match(/\w+/g),(function(t,e){var n=ve[e]||A.find.attr;ve[e]=function(t,e,r){var i,o,a=e.toLowerCase();return r||(o=ve[a],ve[a]=i,i=null!=n(t,e,r)?a:null,ve[a]=o),i}}));var ye=/^(?:input|select|textarea|button)$/i,me=/^(?:a|area)$/i;function be(t){return(t.match(P)||[]).join(" ")}function De(t){return t.getAttribute&&t.getAttribute("class")||""}function we(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(P)||[]}A.fn.extend({prop:function(t,e){return G(this,A.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[A.propFix[t]||t]}))}}),A.extend({prop:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&A.isXMLDoc(t)||(e=A.propFix[e]||e,i=A.propHooks[e]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:t[e]=n:i&&"get"in i&&null!==(r=i.get(t,e))?r:t[e]},propHooks:{tabIndex:{get:function(t){var e=A.find.attr(t,"tabindex");return e?parseInt(e,10):ye.test(t.nodeName)||me.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),v.optSelected||(A.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),A.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){A.propFix[this.toLowerCase()]=this})),A.fn.extend({addClass:function(t){var e,n,r,i,o,a;return y(t)?this.each((function(e){A(this).addClass(t.call(this,e,De(this)))})):(e=we(t)).length?this.each((function(){if(r=De(this),n=1===this.nodeType&&" "+be(r)+" "){for(o=0;o<e.length;o++)i=e[o],n.indexOf(" "+i+" ")<0&&(n+=i+" ");a=be(n),r!==a&&this.setAttribute("class",a)}})):this},removeClass:function(t){var e,n,r,i,o,a;return y(t)?this.each((function(e){A(this).removeClass(t.call(this,e,De(this)))})):arguments.length?(e=we(t)).length?this.each((function(){if(r=De(this),n=1===this.nodeType&&" "+be(r)+" "){for(o=0;o<e.length;o++)for(i=e[o];n.indexOf(" "+i+" ")>-1;)n=n.replace(" "+i+" "," ");a=be(n),r!==a&&this.setAttribute("class",a)}})):this:this.attr("class","")},toggleClass:function(t,e){var n,r,i,o,a=typeof t,s="string"===a||Array.isArray(t);return y(t)?this.each((function(n){A(this).toggleClass(t.call(this,n,De(this),e),e)})):"boolean"==typeof e&&s?e?this.addClass(t):this.removeClass(t):(n=we(t),this.each((function(){if(s)for(o=A(this),i=0;i<n.length;i++)r=n[i],o.hasClass(r)?o.removeClass(r):o.addClass(r);else void 0!==t&&"boolean"!==a||((r=De(this))&&Q.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",r||!1===t?"":Q.get(this,"__className__")||""))})))},hasClass:function(t){var e,n,r=0;for(e=" "+t+" ";n=this[r++];)if(1===n.nodeType&&(" "+be(De(n))+" ").indexOf(e)>-1)return!0;return!1}});var xe=/\r/g;A.fn.extend({val:function(t){var e,n,r,i=this[0];return arguments.length?(r=y(t),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?t.call(this,n,A(this).val()):t)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=A.map(i,(function(t){return null==t?"":t+""}))),(e=A.valHooks[this.type]||A.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,i,"value")||(this.value=i))}))):i?(e=A.valHooks[i.type]||A.valHooks[i.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(xe,""):null==n?"":n:void 0}}),A.extend({valHooks:{option:{get:function(t){var e=A.find.attr(t,"value");return null!=e?e:be(A.text(t))}},select:{get:function(t){var e,n,r,i=t.options,o=t.selectedIndex,a="select-one"===t.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!T(n.parentNode,"optgroup"))){if(e=A(n).val(),a)return e;s.push(e)}return s},set:function(t,e){for(var n,r,i=t.options,o=A.makeArray(e),a=i.length;a--;)((r=i[a]).selected=A.inArray(A.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(t.selectedIndex=-1),o}}}}),A.each(["radio","checkbox"],(function(){A.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=A.inArray(A(t).val(),e)>-1}},v.checkOn||(A.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})})),v.focusin="onfocusin"in r;var Ee=/^(?:focusinfocus|focusoutblur)$/,Ae=function(t){t.stopPropagation()};A.extend(A.event,{trigger:function(t,e,n,i){var o,a,s,u,c,l,f,p,h=[n||b],g=d.call(t,"type")?t.type:t,v=d.call(t,"namespace")?t.namespace.split("."):[];if(a=p=s=n=n||b,3!==n.nodeType&&8!==n.nodeType&&!Ee.test(g+A.event.triggered)&&(g.indexOf(".")>-1&&(v=g.split("."),g=v.shift(),v.sort()),c=g.indexOf(":")<0&&"on"+g,(t=t[A.expando]?t:new A.Event(g,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=v.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=n),e=null==e?[t]:A.makeArray(e,[t]),f=A.event.special[g]||{},i||!f.trigger||!1!==f.trigger.apply(n,e))){if(!i&&!f.noBubble&&!m(n)){for(u=f.delegateType||g,Ee.test(u+g)||(a=a.parentNode);a;a=a.parentNode)h.push(a),s=a;s===(n.ownerDocument||b)&&h.push(s.defaultView||s.parentWindow||r)}for(o=0;(a=h[o++])&&!t.isPropagationStopped();)p=a,t.type=o>1?u:f.bindType||g,(l=(Q.get(a,"events")||Object.create(null))[t.type]&&Q.get(a,"handle"))&&l.apply(a,e),(l=c&&a[c])&&l.apply&&X(a)&&(t.result=l.apply(a,e),!1===t.result&&t.preventDefault());return t.type=g,i||t.isDefaultPrevented()||f._default&&!1!==f._default.apply(h.pop(),e)||!X(n)||c&&y(n[g])&&!m(n)&&((s=n[c])&&(n[c]=null),A.event.triggered=g,t.isPropagationStopped()&&p.addEventListener(g,Ae),n[g](),t.isPropagationStopped()&&p.removeEventListener(g,Ae),A.event.triggered=void 0,s&&(n[c]=s)),t.result}},simulate:function(t,e,n){var r=A.extend(new A.Event,n,{type:t,isSimulated:!0});A.event.trigger(r,null,e)}}),A.fn.extend({trigger:function(t,e){return this.each((function(){A.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var n=this[0];if(n)return A.event.trigger(t,e,n,!0)}}),v.focusin||A.each({focus:"focusin",blur:"focusout"},(function(t,e){var n=function(t){A.event.simulate(e,t.target,A.event.fix(t))};A.event.special[e]={setup:function(){var r=this.ownerDocument||this.document||this,i=Q.access(r,e);i||r.addEventListener(t,n,!0),Q.access(r,e,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=Q.access(r,e)-1;i?Q.access(r,e,i):(r.removeEventListener(t,n,!0),Q.remove(r,e))}}}));var _e=r.location,Se={guid:Date.now()},Ce=/\?/;A.parseXML=function(t){var e,n;if(!t||"string"!=typeof t)return null;try{e=(new r.DOMParser).parseFromString(t,"text/xml")}catch(t){}return n=e&&e.getElementsByTagName("parsererror")[0],e&&!n||A.error("Invalid XML: "+(n?A.map(n.childNodes,(function(t){return t.textContent})).join("\n"):t)),e};var ke=/\[\]$/,Oe=/\r?\n/g,Te=/^(?:submit|button|image|reset|file)$/i,Fe=/^(?:input|select|textarea|keygen)/i;function je(t,e,n,r){var i;if(Array.isArray(e))A.each(e,(function(e,i){n||ke.test(t)?r(t,i):je(t+"["+("object"==typeof i&&null!=i?e:"")+"]",i,n,r)}));else if(n||"object"!==x(e))r(t,e);else for(i in e)je(t+"["+i+"]",e[i],n,r)}A.param=function(t,e){var n,r=[],i=function(t,e){var n=y(e)?e():e;r[r.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!A.isPlainObject(t))A.each(t,(function(){i(this.name,this.value)}));else for(n in t)je(n,t[n],e,i);return r.join("&")},A.fn.extend({serialize:function(){return A.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=A.prop(this,"elements");return t?A.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!A(this).is(":disabled")&&Fe.test(this.nodeName)&&!Te.test(t)&&(this.checked||!vt.test(t))})).map((function(t,e){var n=A(this).val();return null==n?null:Array.isArray(n)?A.map(n,(function(t){return{name:e.name,value:t.replace(Oe,"\r\n")}})):{name:e.name,value:n.replace(Oe,"\r\n")}})).get()}});var Le=/%20/g,Ie=/#.*$/,Ne=/([?&])_=[^&]*/,Be=/^(.*?):[ \t]*([^\r\n]*)$/gm,Re=/^(?:GET|HEAD)$/,Pe=/^\/\//,Me={},He={},qe="*/".concat("*"),Ue=b.createElement("a");function ze(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var r,i=0,o=e.toLowerCase().match(P)||[];if(y(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(t[r]=t[r]||[]).unshift(n)):(t[r]=t[r]||[]).push(n)}}function We(t,e,n,r){var i={},o=t===He;function a(s){var u;return i[s]=!0,A.each(t[s]||[],(function(t,s){var c=s(e,n,r);return"string"!=typeof c||o||i[c]?o?!(u=c):void 0:(e.dataTypes.unshift(c),a(c),!1)})),u}return a(e.dataTypes[0])||!i["*"]&&a("*")}function Ge(t,e){var n,r,i=A.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((i[n]?t:r||(r={}))[n]=e[n]);return r&&A.extend(!0,t,r),t}Ue.href=_e.href,A.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:_e.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(_e.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":qe,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":A.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Ge(Ge(t,A.ajaxSettings),e):Ge(A.ajaxSettings,t)},ajaxPrefilter:ze(Me),ajaxTransport:ze(He),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var n,i,o,a,s,u,c,l,f,p,d=A.ajaxSetup({},e),h=d.context||d,g=d.context&&(h.nodeType||h.jquery)?A(h):A.event,v=A.Deferred(),y=A.Callbacks("once memory"),m=d.statusCode||{},D={},w={},x="canceled",E={readyState:0,getResponseHeader:function(t){var e;if(c){if(!a)for(a={};e=Be.exec(o);)a[e[1].toLowerCase()+" "]=(a[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=a[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return c?o:null},setRequestHeader:function(t,e){return null==c&&(t=w[t.toLowerCase()]=w[t.toLowerCase()]||t,D[t]=e),this},overrideMimeType:function(t){return null==c&&(d.mimeType=t),this},statusCode:function(t){var e;if(t)if(c)E.always(t[E.status]);else for(e in t)m[e]=[m[e],t[e]];return this},abort:function(t){var e=t||x;return n&&n.abort(e),_(0,e),this}};if(v.promise(E),d.url=((t||d.url||_e.href)+"").replace(Pe,_e.protocol+"//"),d.type=e.method||e.type||d.method||d.type,d.dataTypes=(d.dataType||"*").toLowerCase().match(P)||[""],null==d.crossDomain){u=b.createElement("a");try{u.href=d.url,u.href=u.href,d.crossDomain=Ue.protocol+"//"+Ue.host!=u.protocol+"//"+u.host}catch(t){d.crossDomain=!0}}if(d.data&&d.processData&&"string"!=typeof d.data&&(d.data=A.param(d.data,d.traditional)),We(Me,d,e,E),c)return E;for(f in(l=A.event&&d.global)&&0==A.active++&&A.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Re.test(d.type),i=d.url.replace(Ie,""),d.hasContent?d.data&&d.processData&&0===(d.contentType||"").indexOf("application/x-www-form-urlencoded")&&(d.data=d.data.replace(Le,"+")):(p=d.url.slice(i.length),d.data&&(d.processData||"string"==typeof d.data)&&(i+=(Ce.test(i)?"&":"?")+d.data,delete d.data),!1===d.cache&&(i=i.replace(Ne,"$1"),p=(Ce.test(i)?"&":"?")+"_="+Se.guid+++p),d.url=i+p),d.ifModified&&(A.lastModified[i]&&E.setRequestHeader("If-Modified-Since",A.lastModified[i]),A.etag[i]&&E.setRequestHeader("If-None-Match",A.etag[i])),(d.data&&d.hasContent&&!1!==d.contentType||e.contentType)&&E.setRequestHeader("Content-Type",d.contentType),E.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+qe+"; q=0.01":""):d.accepts["*"]),d.headers)E.setRequestHeader(f,d.headers[f]);if(d.beforeSend&&(!1===d.beforeSend.call(h,E,d)||c))return E.abort();if(x="abort",y.add(d.complete),E.done(d.success),E.fail(d.error),n=We(He,d,e,E)){if(E.readyState=1,l&&g.trigger("ajaxSend",[E,d]),c)return E;d.async&&d.timeout>0&&(s=r.setTimeout((function(){E.abort("timeout")}),d.timeout));try{c=!1,n.send(D,_)}catch(t){if(c)throw t;_(-1,t)}}else _(-1,"No Transport");function _(t,e,a,u){var f,p,b,D,w,x=e;c||(c=!0,s&&r.clearTimeout(s),n=void 0,o=u||"",E.readyState=t>0?4:0,f=t>=200&&t<300||304===t,a&&(D=function(t,e,n){for(var r,i,o,a,s=t.contents,u=t.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=t.mimeType||e.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||t.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(d,E,a)),!f&&A.inArray("script",d.dataTypes)>-1&&A.inArray("json",d.dataTypes)<0&&(d.converters["text script"]=function(){}),D=function(t,e,n,r){var i,o,a,s,u,c={},l=t.dataTypes.slice();if(l[1])for(a in t.converters)c[a.toLowerCase()]=t.converters[a];for(o=l.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!u&&r&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),u=o,o=l.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=c[u+" "+o]||c["* "+o]))for(i in c)if((s=i.split(" "))[1]===o&&(a=c[u+" "+s[0]]||c["* "+s[0]])){!0===a?a=c[i]:!0!==c[i]&&(o=s[0],l.unshift(s[1]));break}if(!0!==a)if(a&&t.throws)e=a(e);else try{e=a(e)}catch(t){return{state:"parsererror",error:a?t:"No conversion from "+u+" to "+o}}}return{state:"success",data:e}}(d,D,E,f),f?(d.ifModified&&((w=E.getResponseHeader("Last-Modified"))&&(A.lastModified[i]=w),(w=E.getResponseHeader("etag"))&&(A.etag[i]=w)),204===t||"HEAD"===d.type?x="nocontent":304===t?x="notmodified":(x=D.state,p=D.data,f=!(b=D.error))):(b=x,!t&&x||(x="error",t<0&&(t=0))),E.status=t,E.statusText=(e||x)+"",f?v.resolveWith(h,[p,x,E]):v.rejectWith(h,[E,x,b]),E.statusCode(m),m=void 0,l&&g.trigger(f?"ajaxSuccess":"ajaxError",[E,d,f?p:b]),y.fireWith(h,[E,x]),l&&(g.trigger("ajaxComplete",[E,d]),--A.active||A.event.trigger("ajaxStop")))}return E},getJSON:function(t,e,n){return A.get(t,e,n,"json")},getScript:function(t,e){return A.get(t,void 0,e,"script")}}),A.each(["get","post"],(function(t,e){A[e]=function(t,n,r,i){return y(n)&&(i=i||r,r=n,n=void 0),A.ajax(A.extend({url:t,type:e,dataType:i,data:n,success:r},A.isPlainObject(t)&&t))}})),A.ajaxPrefilter((function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")})),A._evalUrl=function(t,e,n){return A.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){A.globalEval(t,e,n)}})},A.fn.extend({wrapAll:function(t){var e;return this[0]&&(y(t)&&(t=t.call(this[0])),e=A(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t})).append(this)),this},wrapInner:function(t){return y(t)?this.each((function(e){A(this).wrapInner(t.call(this,e))})):this.each((function(){var e=A(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)}))},wrap:function(t){var e=y(t);return this.each((function(n){A(this).wrapAll(e?t.call(this,n):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){A(this).replaceWith(this.childNodes)})),this}}),A.expr.pseudos.hidden=function(t){return!A.expr.pseudos.visible(t)},A.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},A.ajaxSettings.xhr=function(){try{return new r.XMLHttpRequest}catch(t){}};var Ye={0:200,1223:204},$e=A.ajaxSettings.xhr();v.cors=!!$e&&"withCredentials"in $e,v.ajax=$e=!!$e,A.ajaxTransport((function(t){var e,n;if(v.cors||$e&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];for(a in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);e=function(t){return function(){e&&(e=n=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===t?s.abort():"error"===t?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Ye[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=e(),n=s.onerror=s.ontimeout=e("error"),void 0!==s.onabort?s.onabort=n:s.onreadystatechange=function(){4===s.readyState&&r.setTimeout((function(){e&&n()}))},e=e("abort");try{s.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}})),A.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),A.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return A.globalEval(t),t}}}),A.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),A.ajaxTransport("script",(function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(r,i){e=A("<script>").attr(t.scriptAttrs||{}).prop({charset:t.scriptCharset,src:t.url}).on("load error",n=function(t){e.remove(),n=null,t&&i("error"===t.type?404:200,t.type)}),b.head.appendChild(e[0])},abort:function(){n&&n()}}}));var Ve,Je=[],Xe=/(=)\?(?=&|$)|\?\?/;A.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Je.pop()||A.expando+"_"+Se.guid++;return this[t]=!0,t}}),A.ajaxPrefilter("json jsonp",(function(t,e,n){var i,o,a,s=!1!==t.jsonp&&(Xe.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Xe.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=y(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Xe,"$1"+i):!1!==t.jsonp&&(t.url+=(Ce.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||A.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=r[i],r[i]=function(){a=arguments},n.always((function(){void 0===o?A(r).removeProp(i):r[i]=o,t[i]&&(t.jsonpCallback=e.jsonpCallback,Je.push(i)),a&&y(o)&&o(a[0]),a=o=void 0})),"script"})),v.createHTMLDocument=((Ve=b.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ve.childNodes.length),A.parseHTML=function(t,e,n){return"string"!=typeof t?[]:("boolean"==typeof e&&(n=e,e=!1),e||(v.createHTMLDocument?((r=(e=b.implementation.createHTMLDocument("")).createElement("base")).href=b.location.href,e.head.appendChild(r)):e=b),o=!n&&[],(i=F.exec(t))?[e.createElement(i[1])]:(i=Et([t],e,o),o&&o.length&&A(o).remove(),A.merge([],i.childNodes)));var r,i,o},A.fn.load=function(t,e,n){var r,i,o,a=this,s=t.indexOf(" ");return s>-1&&(r=be(t.slice(s)),t=t.slice(0,s)),y(e)?(n=e,e=void 0):e&&"object"==typeof e&&(i="POST"),a.length>0&&A.ajax({url:t,type:i||"GET",dataType:"html",data:e}).done((function(t){o=arguments,a.html(r?A("<div>").append(A.parseHTML(t)).find(r):t)})).always(n&&function(t,e){a.each((function(){n.apply(this,o||[t.responseText,e,t])}))}),this},A.expr.pseudos.animated=function(t){return A.grep(A.timers,(function(e){return t===e.elem})).length},A.offset={setOffset:function(t,e,n){var r,i,o,a,s,u,c=A.css(t,"position"),l=A(t),f={};"static"===c&&(t.style.position="relative"),s=l.offset(),o=A.css(t,"top"),u=A.css(t,"left"),("absolute"===c||"fixed"===c)&&(o+u).indexOf("auto")>-1?(a=(r=l.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),y(e)&&(e=e.call(t,n,A.extend({},s))),null!=e.top&&(f.top=e.top-s.top+a),null!=e.left&&(f.left=e.left-s.left+i),"using"in e?e.using.call(t,f):l.css(f)}},A.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each((function(e){A.offset.setOffset(this,t,e)}));var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,n,r=this[0],i={top:0,left:0};if("fixed"===A.css(r,"position"))e=r.getBoundingClientRect();else{for(e=this.offset(),n=r.ownerDocument,t=r.offsetParent||n.documentElement;t&&(t===n.body||t===n.documentElement)&&"static"===A.css(t,"position");)t=t.parentNode;t&&t!==r&&1===t.nodeType&&((i=A(t).offset()).top+=A.css(t,"borderTopWidth",!0),i.left+=A.css(t,"borderLeftWidth",!0))}return{top:e.top-i.top-A.css(r,"marginTop",!0),left:e.left-i.left-A.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent;t&&"static"===A.css(t,"position");)t=t.offsetParent;return t||at}))}}),A.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(t,e){var n="pageYOffset"===e;A.fn[t]=function(r){return G(this,(function(t,r,i){var o;if(m(t)?o=t:9===t.nodeType&&(o=t.defaultView),void 0===i)return o?o[e]:t[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):t[r]=i}),t,r,arguments.length)}})),A.each(["top","left"],(function(t,e){A.cssHooks[e]=Vt(v.pixelPosition,(function(t,n){if(n)return n=$t(t,e),Ht.test(n)?A(t).position()[e]+"px":n}))})),A.each({Height:"height",Width:"width"},(function(t,e){A.each({padding:"inner"+t,content:e,"":"outer"+t},(function(n,r){A.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return G(this,(function(e,n,i){var o;return m(e)?0===r.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(o=e.documentElement,Math.max(e.body["scroll"+t],o["scroll"+t],e.body["offset"+t],o["offset"+t],o["client"+t])):void 0===i?A.css(e,n,s):A.style(e,n,i,s)}),e,a?i:void 0,a)}}))})),A.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(t,e){A.fn[e]=function(t){return this.on(e,t)}})),A.fn.extend({bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,r){return this.on(e,t,n,r)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)},hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),A.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(t,e){A.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}));var Ke=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;A.proxy=function(t,e){var n,r,i;if("string"==typeof e&&(n=t[e],e=t,t=n),y(t))return r=s.call(arguments,2),i=function(){return t.apply(e||this,r.concat(s.call(arguments)))},i.guid=t.guid=t.guid||A.guid++,i},A.holdReady=function(t){t?A.readyWait++:A.ready(!0)},A.isArray=Array.isArray,A.parseJSON=JSON.parse,A.nodeName=T,A.isFunction=y,A.isWindow=m,A.camelCase=J,A.type=x,A.now=Date.now,A.isNumeric=function(t){var e=A.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},A.trim=function(t){return null==t?"":(t+"").replace(Ke,"$1")},void 0===(n=function(){return A}.apply(e,[]))||(t.exports=n);var Qe=r.jQuery,Ze=r.$;return A.noConflict=function(t){return r.$===A&&(r.$=Ze),t&&r.jQuery===A&&(r.jQuery=Qe),A},void 0===i&&(r.jQuery=r.$=A),A}))},974:function(t,e,n){var r;t=n.nmd(t),function(){var i,o="Expected a function",a="__lodash_hash_undefined__",s="__lodash_placeholder__",u=16,c=32,l=64,f=128,p=256,d=1/0,h=9007199254740991,g=NaN,v=4294967295,y=[["ary",f],["bind",1],["bindKey",2],["curry",8],["curryRight",u],["flip",512],["partial",c],["partialRight",l],["rearg",p]],m="[object Arguments]",b="[object Array]",D="[object Boolean]",w="[object Date]",x="[object Error]",E="[object Function]",A="[object GeneratorFunction]",_="[object Map]",S="[object Number]",C="[object Object]",k="[object Promise]",O="[object RegExp]",T="[object Set]",F="[object String]",j="[object Symbol]",L="[object WeakMap]",I="[object ArrayBuffer]",N="[object DataView]",B="[object Float32Array]",R="[object Float64Array]",P="[object Int8Array]",M="[object Int16Array]",H="[object Int32Array]",q="[object Uint8Array]",U="[object Uint8ClampedArray]",z="[object Uint16Array]",W="[object Uint32Array]",G=/\b__p \+= '';/g,Y=/\b(__p \+=) '' \+/g,$=/(__e\(.*?\)|\b__t\)) \+\n'';/g,V=/&(?:amp|lt|gt|quot|#39);/g,J=/[&<>"']/g,X=RegExp(V.source),K=RegExp(J.source),Q=/<%-([\s\S]+?)%>/g,Z=/<%([\s\S]+?)%>/g,tt=/<%=([\s\S]+?)%>/g,et=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nt=/^\w*$/,rt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,it=/[\\^$.*+?()[\]{}|]/g,ot=RegExp(it.source),at=/^\s+/,st=/\s/,ut=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ct=/\{\n\/\* \[wrapped with (.+)\] \*/,lt=/,? & /,ft=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,pt=/[()=,{}\[\]\/\s]/,dt=/\\(\\)?/g,ht=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,gt=/\w*$/,vt=/^[-+]0x[0-9a-f]+$/i,yt=/^0b[01]+$/i,mt=/^\[object .+?Constructor\]$/,bt=/^0o[0-7]+$/i,Dt=/^(?:0|[1-9]\d*)$/,wt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,xt=/($^)/,Et=/['\n\r\u2028\u2029\\]/g,At="\\ud800-\\udfff",_t="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",St="\\u2700-\\u27bf",Ct="a-z\\xdf-\\xf6\\xf8-\\xff",kt="A-Z\\xc0-\\xd6\\xd8-\\xde",Ot="\\ufe0e\\ufe0f",Tt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ft="['\u2019]",jt="["+At+"]",Lt="["+Tt+"]",It="["+_t+"]",Nt="\\d+",Bt="["+St+"]",Rt="["+Ct+"]",Pt="[^"+At+Tt+Nt+St+Ct+kt+"]",Mt="\\ud83c[\\udffb-\\udfff]",Ht="[^"+At+"]",qt="(?:\\ud83c[\\udde6-\\uddff]){2}",Ut="[\\ud800-\\udbff][\\udc00-\\udfff]",zt="["+kt+"]",Wt="\\u200d",Gt="(?:"+Rt+"|"+Pt+")",Yt="(?:"+zt+"|"+Pt+")",$t="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Vt="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Jt="(?:"+It+"|"+Mt+")"+"?",Xt="["+Ot+"]?",Kt=Xt+Jt+("(?:"+Wt+"(?:"+[Ht,qt,Ut].join("|")+")"+Xt+Jt+")*"),Qt="(?:"+[Bt,qt,Ut].join("|")+")"+Kt,Zt="(?:"+[Ht+It+"?",It,qt,Ut,jt].join("|")+")",te=RegExp(Ft,"g"),ee=RegExp(It,"g"),ne=RegExp(Mt+"(?="+Mt+")|"+Zt+Kt,"g"),re=RegExp([zt+"?"+Rt+"+"+$t+"(?="+[Lt,zt,"$"].join("|")+")",Yt+"+"+Vt+"(?="+[Lt,zt+Gt,"$"].join("|")+")",zt+"?"+Gt+"+"+$t,zt+"+"+Vt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Nt,Qt].join("|"),"g"),ie=RegExp("["+Wt+At+_t+Ot+"]"),oe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ae=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],se=-1,ue={};ue[B]=ue[R]=ue[P]=ue[M]=ue[H]=ue[q]=ue[U]=ue[z]=ue[W]=!0,ue[m]=ue[b]=ue[I]=ue[D]=ue[N]=ue[w]=ue[x]=ue[E]=ue[_]=ue[S]=ue[C]=ue[O]=ue[T]=ue[F]=ue[L]=!1;var ce={};ce[m]=ce[b]=ce[I]=ce[N]=ce[D]=ce[w]=ce[B]=ce[R]=ce[P]=ce[M]=ce[H]=ce[_]=ce[S]=ce[C]=ce[O]=ce[T]=ce[F]=ce[j]=ce[q]=ce[U]=ce[z]=ce[W]=!0,ce[x]=ce[E]=ce[L]=!1;var le={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},fe=parseFloat,pe=parseInt,de="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,he="object"==typeof self&&self&&self.Object===Object&&self,ge=de||he||Function("return this")(),ve=e&&!e.nodeType&&e,ye=ve&&t&&!t.nodeType&&t,me=ye&&ye.exports===ve,be=me&&de.process,De=function(){try{var t=ye&&ye.require&&ye.require("util").types;return t||be&&be.binding&&be.binding("util")}catch(t){}}(),we=De&&De.isArrayBuffer,xe=De&&De.isDate,Ee=De&&De.isMap,Ae=De&&De.isRegExp,_e=De&&De.isSet,Se=De&&De.isTypedArray;function Ce(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function ke(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}function Oe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Te(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Fe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function je(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function Le(t,e){return!!(null==t?0:t.length)&&ze(t,e,0)>-1}function Ie(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function Ne(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function Be(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function Re(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function Pe(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function Me(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var He=$e("length");function qe(t,e,n){var r;return n(t,(function(t,n,i){if(e(t,n,i))return r=n,!1})),r}function Ue(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function ze(t,e,n){return e==e?function(t,e,n){var r=n-1,i=t.length;for(;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):Ue(t,Ge,n)}function We(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function Ge(t){return t!=t}function Ye(t,e){var n=null==t?0:t.length;return n?Xe(t,e)/n:g}function $e(t){return function(e){return null==e?i:e[t]}}function Ve(t){return function(e){return null==t?i:t[e]}}function Je(t,e,n,r,i){return i(t,(function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)})),n}function Xe(t,e){for(var n,r=-1,o=t.length;++r<o;){var a=e(t[r]);a!==i&&(n=n===i?a:n+a)}return n}function Ke(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Qe(t){return t?t.slice(0,vn(t)+1).replace(at,""):t}function Ze(t){return function(e){return t(e)}}function tn(t,e){return Ne(e,(function(e){return t[e]}))}function en(t,e){return t.has(e)}function nn(t,e){for(var n=-1,r=t.length;++n<r&&ze(e,t[n],0)>-1;);return n}function rn(t,e){for(var n=t.length;n--&&ze(e,t[n],0)>-1;);return n}var on=Ve({\u00c0:"A",\u00c1:"A",\u00c2:"A",\u00c3:"A",\u00c4:"A",\u00c5:"A",\u00e0:"a",\u00e1:"a",\u00e2:"a",\u00e3:"a",\u00e4:"a",\u00e5:"a",\u00c7:"C",\u00e7:"c",\u00d0:"D",\u00f0:"d",\u00c8:"E",\u00c9:"E",\u00ca:"E",\u00cb:"E",\u00e8:"e",\u00e9:"e",\u00ea:"e",\u00eb:"e",\u00cc:"I",\u00cd:"I",\u00ce:"I",\u00cf:"I",\u00ec:"i",\u00ed:"i",\u00ee:"i",\u00ef:"i",\u00d1:"N",\u00f1:"n",\u00d2:"O",\u00d3:"O",\u00d4:"O",\u00d5:"O",\u00d6:"O",\u00d8:"O",\u00f2:"o",\u00f3:"o",\u00f4:"o",\u00f5:"o",\u00f6:"o",\u00f8:"o",\u00d9:"U",\u00da:"U",\u00db:"U",\u00dc:"U",\u00f9:"u",\u00fa:"u",\u00fb:"u",\u00fc:"u",\u00dd:"Y",\u00fd:"y",\u00ff:"y",\u00c6:"Ae",\u00e6:"ae",\u00de:"Th",\u00fe:"th",\u00df:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010a:"C",\u010c:"C",\u0107:"c",\u0109:"c",\u010b:"c",\u010d:"c",\u010e:"D",\u0110:"D",\u010f:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011a:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011b:"e",\u011c:"G",\u011e:"G",\u0120:"G",\u0122:"G",\u011d:"g",\u011f:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012a:"I",\u012c:"I",\u012e:"I",\u0130:"I",\u0129:"i",\u012b:"i",\u012d:"i",\u012f:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013b:"L",\u013d:"L",\u013f:"L",\u0141:"L",\u013a:"l",\u013c:"l",\u013e:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014a:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014b:"n",\u014c:"O",\u014e:"O",\u0150:"O",\u014d:"o",\u014f:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015a:"S",\u015c:"S",\u015e:"S",\u0160:"S",\u015b:"s",\u015d:"s",\u015f:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016a:"U",\u016c:"U",\u016e:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016b:"u",\u016d:"u",\u016f:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017b:"Z",\u017d:"Z",\u017a:"z",\u017c:"z",\u017e:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017f:"s"}),an=Ve({"&":"&","<":"<",">":">",'"':""","'":"'"});function sn(t){return"\\"+le[t]}function un(t){return ie.test(t)}function cn(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function ln(t,e){return function(n){return t(e(n))}}function fn(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n];a!==e&&a!==s||(t[n]=s,o[i++]=n)}return o}function pn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function dn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function hn(t){return un(t)?function(t){var e=ne.lastIndex=0;for(;ne.test(t);)++e;return e}(t):He(t)}function gn(t){return un(t)?function(t){return t.match(ne)||[]}(t):function(t){return t.split("")}(t)}function vn(t){for(var e=t.length;e--&&st.test(t.charAt(e)););return e}var yn=Ve({"&":"&","<":"<",">":">",""":'"',"'":"'"});var mn=function t(e){var n,r=(e=null==e?ge:mn.defaults(ge.Object(),e,mn.pick(ge,ae))).Array,st=e.Date,At=e.Error,_t=e.Function,St=e.Math,Ct=e.Object,kt=e.RegExp,Ot=e.String,Tt=e.TypeError,Ft=r.prototype,jt=_t.prototype,Lt=Ct.prototype,It=e["__core-js_shared__"],Nt=jt.toString,Bt=Lt.hasOwnProperty,Rt=0,Pt=(n=/[^.]+$/.exec(It&&It.keys&&It.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Mt=Lt.toString,Ht=Nt.call(Ct),qt=ge._,Ut=kt("^"+Nt.call(Bt).replace(it,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),zt=me?e.Buffer:i,Wt=e.Symbol,Gt=e.Uint8Array,Yt=zt?zt.allocUnsafe:i,$t=ln(Ct.getPrototypeOf,Ct),Vt=Ct.create,Jt=Lt.propertyIsEnumerable,Xt=Ft.splice,Kt=Wt?Wt.isConcatSpreadable:i,Qt=Wt?Wt.iterator:i,Zt=Wt?Wt.toStringTag:i,ne=function(){try{var t=po(Ct,"defineProperty");return t({},"",{}),t}catch(t){}}(),ie=e.clearTimeout!==ge.clearTimeout&&e.clearTimeout,le=st&&st.now!==ge.Date.now&&st.now,de=e.setTimeout!==ge.setTimeout&&e.setTimeout,he=St.ceil,ve=St.floor,ye=Ct.getOwnPropertySymbols,be=zt?zt.isBuffer:i,De=e.isFinite,He=Ft.join,Ve=ln(Ct.keys,Ct),bn=St.max,Dn=St.min,wn=st.now,xn=e.parseInt,En=St.random,An=Ft.reverse,_n=po(e,"DataView"),Sn=po(e,"Map"),Cn=po(e,"Promise"),kn=po(e,"Set"),On=po(e,"WeakMap"),Tn=po(Ct,"create"),Fn=On&&new On,jn={},Ln=Mo(_n),In=Mo(Sn),Nn=Mo(Cn),Bn=Mo(kn),Rn=Mo(On),Pn=Wt?Wt.prototype:i,Mn=Pn?Pn.valueOf:i,Hn=Pn?Pn.toString:i;function qn(t){if(ns(t)&&!Ga(t)&&!(t instanceof Gn)){if(t instanceof Wn)return t;if(Bt.call(t,"__wrapped__"))return Ho(t)}return new Wn(t)}var Un=function(){function t(){}return function(e){if(!es(e))return{};if(Vt)return Vt(e);t.prototype=e;var n=new t;return t.prototype=i,n}}();function zn(){}function Wn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=i}function Gn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=v,this.__views__=[]}function Yn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function $n(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Vn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Jn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Vn;++e<n;)this.add(t[e])}function Xn(t){var e=this.__data__=new $n(t);this.size=e.size}function Kn(t,e){var n=Ga(t),r=!n&&Wa(t),i=!n&&!r&&Ja(t),o=!n&&!r&&!i&&ls(t),a=n||r||i||o,s=a?Ke(t.length,Ot):[],u=s.length;for(var c in t)!e&&!Bt.call(t,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Do(c,u))||s.push(c);return s}function Qn(t){var e=t.length;return e?t[Jr(0,e-1)]:i}function Zn(t,e){return Bo(Ti(t),ur(e,0,t.length))}function tr(t){return Bo(Ti(t))}function er(t,e,n){(n!==i&&!qa(t[e],n)||n===i&&!(e in t))&&ar(t,e,n)}function nr(t,e,n){var r=t[e];Bt.call(t,e)&&qa(r,n)&&(n!==i||e in t)||ar(t,e,n)}function rr(t,e){for(var n=t.length;n--;)if(qa(t[n][0],e))return n;return-1}function ir(t,e,n,r){return dr(t,(function(t,i,o){e(r,t,n(t),o)})),r}function or(t,e){return t&&Fi(e,js(e),t)}function ar(t,e,n){"__proto__"==e&&ne?ne(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function sr(t,e){for(var n=-1,o=e.length,a=r(o),s=null==t;++n<o;)a[n]=s?i:Cs(t,e[n]);return a}function ur(t,e,n){return t==t&&(n!==i&&(t=t<=n?t:n),e!==i&&(t=t>=e?t:e)),t}function cr(t,e,n,r,o,a){var s,u=1&e,c=2&e,l=4&e;if(n&&(s=o?n(t,r,o,a):n(t)),s!==i)return s;if(!es(t))return t;var f=Ga(t);if(f){if(s=function(t){var e=t.length,n=new t.constructor(e);e&&"string"==typeof t[0]&&Bt.call(t,"index")&&(n.index=t.index,n.input=t.input);return n}(t),!u)return Ti(t,s)}else{var p=vo(t),d=p==E||p==A;if(Ja(t))return Ai(t,u);if(p==C||p==m||d&&!o){if(s=c||d?{}:mo(t),!u)return c?function(t,e){return Fi(t,go(t),e)}(t,function(t,e){return t&&Fi(e,Ls(e),t)}(s,t)):function(t,e){return Fi(t,ho(t),e)}(t,or(s,t))}else{if(!ce[p])return o?t:{};s=function(t,e,n){var r=t.constructor;switch(e){case I:return _i(t);case D:case w:return new r(+t);case N:return function(t,e){var n=e?_i(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case B:case R:case P:case M:case H:case q:case U:case z:case W:return Si(t,n);case _:return new r;case S:case F:return new r(t);case O:return function(t){var e=new t.constructor(t.source,gt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case T:return new r;case j:return i=t,Mn?Ct(Mn.call(i)):{}}var i}(t,p,u)}}a||(a=new Xn);var h=a.get(t);if(h)return h;a.set(t,s),ss(t)?t.forEach((function(r){s.add(cr(r,e,n,r,t,a))})):rs(t)&&t.forEach((function(r,i){s.set(i,cr(r,e,n,i,t,a))}));var g=f?i:(l?c?oo:io:c?Ls:js)(t);return Oe(g||t,(function(r,i){g&&(r=t[i=r]),nr(s,i,cr(r,e,n,i,t,a))})),s}function lr(t,e,n){var r=n.length;if(null==t)return!r;for(t=Ct(t);r--;){var o=n[r],a=e[o],s=t[o];if(s===i&&!(o in t)||!a(s))return!1}return!0}function fr(t,e,n){if("function"!=typeof t)throw new Tt(o);return jo((function(){t.apply(i,n)}),e)}function pr(t,e,n,r){var i=-1,o=Le,a=!0,s=t.length,u=[],c=e.length;if(!s)return u;n&&(e=Ne(e,Ze(n))),r?(o=Ie,a=!1):e.length>=200&&(o=en,a=!1,e=new Jn(e));t:for(;++i<s;){var l=t[i],f=null==n?l:n(l);if(l=r||0!==l?l:0,a&&f==f){for(var p=c;p--;)if(e[p]===f)continue t;u.push(l)}else o(e,f,r)||u.push(l)}return u}qn.templateSettings={escape:Q,evaluate:Z,interpolate:tt,variable:"",imports:{_:qn}},qn.prototype=zn.prototype,qn.prototype.constructor=qn,Wn.prototype=Un(zn.prototype),Wn.prototype.constructor=Wn,Gn.prototype=Un(zn.prototype),Gn.prototype.constructor=Gn,Yn.prototype.clear=function(){this.__data__=Tn?Tn(null):{},this.size=0},Yn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Yn.prototype.get=function(t){var e=this.__data__;if(Tn){var n=e[t];return n===a?i:n}return Bt.call(e,t)?e[t]:i},Yn.prototype.has=function(t){var e=this.__data__;return Tn?e[t]!==i:Bt.call(e,t)},Yn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Tn&&e===i?a:e,this},$n.prototype.clear=function(){this.__data__=[],this.size=0},$n.prototype.delete=function(t){var e=this.__data__,n=rr(e,t);return!(n<0)&&(n==e.length-1?e.pop():Xt.call(e,n,1),--this.size,!0)},$n.prototype.get=function(t){var e=this.__data__,n=rr(e,t);return n<0?i:e[n][1]},$n.prototype.has=function(t){return rr(this.__data__,t)>-1},$n.prototype.set=function(t,e){var n=this.__data__,r=rr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Vn.prototype.clear=function(){this.size=0,this.__data__={hash:new Yn,map:new(Sn||$n),string:new Yn}},Vn.prototype.delete=function(t){var e=lo(this,t).delete(t);return this.size-=e?1:0,e},Vn.prototype.get=function(t){return lo(this,t).get(t)},Vn.prototype.has=function(t){return lo(this,t).has(t)},Vn.prototype.set=function(t,e){var n=lo(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Jn.prototype.add=Jn.prototype.push=function(t){return this.__data__.set(t,a),this},Jn.prototype.has=function(t){return this.__data__.has(t)},Xn.prototype.clear=function(){this.__data__=new $n,this.size=0},Xn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Xn.prototype.get=function(t){return this.__data__.get(t)},Xn.prototype.has=function(t){return this.__data__.has(t)},Xn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof $n){var r=n.__data__;if(!Sn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Vn(r)}return n.set(t,e),this.size=n.size,this};var dr=Ii(wr),hr=Ii(xr,!0);function gr(t,e){var n=!0;return dr(t,(function(t,r,i){return n=!!e(t,r,i)})),n}function vr(t,e,n){for(var r=-1,o=t.length;++r<o;){var a=t[r],s=e(a);if(null!=s&&(u===i?s==s&&!cs(s):n(s,u)))var u=s,c=a}return c}function yr(t,e){var n=[];return dr(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}function mr(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=bo),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?mr(s,e-1,n,r,i):Be(i,s):r||(i[i.length]=s)}return i}var br=Ni(),Dr=Ni(!0);function wr(t,e){return t&&br(t,e,js)}function xr(t,e){return t&&Dr(t,e,js)}function Er(t,e){return je(e,(function(e){return Qa(t[e])}))}function Ar(t,e){for(var n=0,r=(e=Di(e,t)).length;null!=t&&n<r;)t=t[Po(e[n++])];return n&&n==r?t:i}function _r(t,e,n){var r=e(t);return Ga(t)?r:Be(r,n(t))}function Sr(t){return null==t?t===i?"[object Undefined]":"[object Null]":Zt&&Zt in Ct(t)?function(t){var e=Bt.call(t,Zt),n=t[Zt];try{t[Zt]=i;var r=!0}catch(t){}var o=Mt.call(t);r&&(e?t[Zt]=n:delete t[Zt]);return o}(t):function(t){return Mt.call(t)}(t)}function Cr(t,e){return t>e}function kr(t,e){return null!=t&&Bt.call(t,e)}function Or(t,e){return null!=t&&e in Ct(t)}function Tr(t,e,n){for(var o=n?Ie:Le,a=t[0].length,s=t.length,u=s,c=r(s),l=1/0,f=[];u--;){var p=t[u];u&&e&&(p=Ne(p,Ze(e))),l=Dn(p.length,l),c[u]=!n&&(e||a>=120&&p.length>=120)?new Jn(u&&p):i}p=t[0];var d=-1,h=c[0];t:for(;++d<a&&f.length<l;){var g=p[d],v=e?e(g):g;if(g=n||0!==g?g:0,!(h?en(h,v):o(f,v,n))){for(u=s;--u;){var y=c[u];if(!(y?en(y,v):o(t[u],v,n)))continue t}h&&h.push(v),f.push(g)}}return f}function Fr(t,e,n){var r=null==(t=Oo(t,e=Di(e,t)))?t:t[Po(Ko(e))];return null==r?i:Ce(r,t,n)}function jr(t){return ns(t)&&Sr(t)==m}function Lr(t,e,n,r,o){return t===e||(null==t||null==e||!ns(t)&&!ns(e)?t!=t&&e!=e:function(t,e,n,r,o,a){var s=Ga(t),u=Ga(e),c=s?b:vo(t),l=u?b:vo(e),f=(c=c==m?C:c)==C,p=(l=l==m?C:l)==C,d=c==l;if(d&&Ja(t)){if(!Ja(e))return!1;s=!0,f=!1}if(d&&!f)return a||(a=new Xn),s||ls(t)?no(t,e,n,r,o,a):function(t,e,n,r,i,o,a){switch(n){case N:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case I:return!(t.byteLength!=e.byteLength||!o(new Gt(t),new Gt(e)));case D:case w:case S:return qa(+t,+e);case x:return t.name==e.name&&t.message==e.message;case O:case F:return t==e+"";case _:var s=cn;case T:var u=1&r;if(s||(s=pn),t.size!=e.size&&!u)return!1;var c=a.get(t);if(c)return c==e;r|=2,a.set(t,e);var l=no(s(t),s(e),r,i,o,a);return a.delete(t),l;case j:if(Mn)return Mn.call(t)==Mn.call(e)}return!1}(t,e,c,n,r,o,a);if(!(1&n)){var h=f&&Bt.call(t,"__wrapped__"),g=p&&Bt.call(e,"__wrapped__");if(h||g){var v=h?t.value():t,y=g?e.value():e;return a||(a=new Xn),o(v,y,n,r,a)}}if(!d)return!1;return a||(a=new Xn),function(t,e,n,r,o,a){var s=1&n,u=io(t),c=u.length,l=io(e),f=l.length;if(c!=f&&!s)return!1;var p=c;for(;p--;){var d=u[p];if(!(s?d in e:Bt.call(e,d)))return!1}var h=a.get(t),g=a.get(e);if(h&&g)return h==e&&g==t;var v=!0;a.set(t,e),a.set(e,t);var y=s;for(;++p<c;){var m=t[d=u[p]],b=e[d];if(r)var D=s?r(b,m,d,e,t,a):r(m,b,d,t,e,a);if(!(D===i?m===b||o(m,b,n,r,a):D)){v=!1;break}y||(y="constructor"==d)}if(v&&!y){var w=t.constructor,x=e.constructor;w==x||!("constructor"in t)||!("constructor"in e)||"function"==typeof w&&w instanceof w&&"function"==typeof x&&x instanceof x||(v=!1)}return a.delete(t),a.delete(e),v}(t,e,n,r,o,a)}(t,e,n,r,Lr,o))}function Ir(t,e,n,r){var o=n.length,a=o,s=!r;if(null==t)return!a;for(t=Ct(t);o--;){var u=n[o];if(s&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<a;){var c=(u=n[o])[0],l=t[c],f=u[1];if(s&&u[2]){if(l===i&&!(c in t))return!1}else{var p=new Xn;if(r)var d=r(l,f,c,t,e,p);if(!(d===i?Lr(f,l,3,r,p):d))return!1}}return!0}function Nr(t){return!(!es(t)||(e=t,Pt&&Pt in e))&&(Qa(t)?Ut:mt).test(Mo(t));var e}function Br(t){return"function"==typeof t?t:null==t?iu:"object"==typeof t?Ga(t)?Ur(t[0],t[1]):qr(t):du(t)}function Rr(t){if(!_o(t))return Ve(t);var e=[];for(var n in Ct(t))Bt.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Pr(t){if(!es(t))return function(t){var e=[];if(null!=t)for(var n in Ct(t))e.push(n);return e}(t);var e=_o(t),n=[];for(var r in t)("constructor"!=r||!e&&Bt.call(t,r))&&n.push(r);return n}function Mr(t,e){return t<e}function Hr(t,e){var n=-1,i=$a(t)?r(t.length):[];return dr(t,(function(t,r,o){i[++n]=e(t,r,o)})),i}function qr(t){var e=fo(t);return 1==e.length&&e[0][2]?Co(e[0][0],e[0][1]):function(n){return n===t||Ir(n,t,e)}}function Ur(t,e){return xo(t)&&So(e)?Co(Po(t),e):function(n){var r=Cs(n,t);return r===i&&r===e?ks(n,t):Lr(e,r,3)}}function zr(t,e,n,r,o){t!==e&&br(e,(function(a,s){if(o||(o=new Xn),es(a))!function(t,e,n,r,o,a,s){var u=To(t,n),c=To(e,n),l=s.get(c);if(l)return void er(t,n,l);var f=a?a(u,c,n+"",t,e,s):i,p=f===i;if(p){var d=Ga(c),h=!d&&Ja(c),g=!d&&!h&&ls(c);f=c,d||h||g?Ga(u)?f=u:Va(u)?f=Ti(u):h?(p=!1,f=Ai(c,!0)):g?(p=!1,f=Si(c,!0)):f=[]:os(c)||Wa(c)?(f=u,Wa(u)?f=ms(u):es(u)&&!Qa(u)||(f=mo(c))):p=!1}p&&(s.set(c,f),o(f,c,r,a,s),s.delete(c));er(t,n,f)}(t,e,s,n,zr,r,o);else{var u=r?r(To(t,s),a,s+"",t,e,o):i;u===i&&(u=a),er(t,s,u)}}),Ls)}function Wr(t,e){var n=t.length;if(n)return Do(e+=e<0?n:0,n)?t[e]:i}function Gr(t,e,n){e=e.length?Ne(e,(function(t){return Ga(t)?function(e){return Ar(e,1===t.length?t[0]:t)}:t})):[iu];var r=-1;e=Ne(e,Ze(co()));var i=Hr(t,(function(t,n,i){var o=Ne(e,(function(e){return e(t)}));return{criteria:o,index:++r,value:t}}));return function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(i,(function(t,e){return function(t,e,n){var r=-1,i=t.criteria,o=e.criteria,a=i.length,s=n.length;for(;++r<a;){var u=Ci(i[r],o[r]);if(u)return r>=s?u:u*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}))}function Yr(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var a=e[r],s=Ar(t,a);n(s,a)&&ti(o,Di(a,t),s)}return o}function $r(t,e,n,r){var i=r?We:ze,o=-1,a=e.length,s=t;for(t===e&&(e=Ti(e)),n&&(s=Ne(t,Ze(n)));++o<a;)for(var u=0,c=e[o],l=n?n(c):c;(u=i(s,l,u,r))>-1;)s!==t&&Xt.call(s,u,1),Xt.call(t,u,1);return t}function Vr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;Do(i)?Xt.call(t,i,1):pi(t,i)}}return t}function Jr(t,e){return t+ve(En()*(e-t+1))}function Xr(t,e){var n="";if(!t||e<1||e>h)return n;do{e%2&&(n+=t),(e=ve(e/2))&&(t+=t)}while(e);return n}function Kr(t,e){return Lo(ko(t,e,iu),t+"")}function Qr(t){return Qn(qs(t))}function Zr(t,e){var n=qs(t);return Bo(n,ur(e,0,n.length))}function ti(t,e,n,r){if(!es(t))return t;for(var o=-1,a=(e=Di(e,t)).length,s=a-1,u=t;null!=u&&++o<a;){var c=Po(e[o]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(o!=s){var f=u[c];(l=r?r(f,c,u):i)===i&&(l=es(f)?f:Do(e[o+1])?[]:{})}nr(u,c,l),u=u[c]}return t}var ei=Fn?function(t,e){return Fn.set(t,e),t}:iu,ni=ne?function(t,e){return ne(t,"toString",{configurable:!0,enumerable:!1,value:eu(e),writable:!0})}:iu;function ri(t){return Bo(qs(t))}function ii(t,e,n){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var a=r(o);++i<o;)a[i]=t[i+e];return a}function oi(t,e){var n;return dr(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function ai(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=t[o];null!==a&&!cs(a)&&(n?a<=e:a<e)?r=o+1:i=o}return i}return si(t,e,iu,n)}function si(t,e,n,r){var o=0,a=null==t?0:t.length;if(0===a)return 0;for(var s=(e=n(e))!=e,u=null===e,c=cs(e),l=e===i;o<a;){var f=ve((o+a)/2),p=n(t[f]),d=p!==i,h=null===p,g=p==p,v=cs(p);if(s)var y=r||g;else y=l?g&&(r||d):u?g&&d&&(r||!h):c?g&&d&&!h&&(r||!v):!h&&!v&&(r?p<=e:p<e);y?o=f+1:a=f}return Dn(a,4294967294)}function ui(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n],s=e?e(a):a;if(!n||!qa(s,u)){var u=s;o[i++]=0===a?0:a}}return o}function ci(t){return"number"==typeof t?t:cs(t)?g:+t}function li(t){if("string"==typeof t)return t;if(Ga(t))return Ne(t,li)+"";if(cs(t))return Hn?Hn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function fi(t,e,n){var r=-1,i=Le,o=t.length,a=!0,s=[],u=s;if(n)a=!1,i=Ie;else if(o>=200){var c=e?null:Xi(t);if(c)return pn(c);a=!1,i=en,u=new Jn}else u=e?[]:s;t:for(;++r<o;){var l=t[r],f=e?e(l):l;if(l=n||0!==l?l:0,a&&f==f){for(var p=u.length;p--;)if(u[p]===f)continue t;e&&u.push(f),s.push(l)}else i(u,f,n)||(u!==s&&u.push(f),s.push(l))}return s}function pi(t,e){return null==(t=Oo(t,e=Di(e,t)))||delete t[Po(Ko(e))]}function di(t,e,n,r){return ti(t,e,n(Ar(t,e)),r)}function hi(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?ii(t,r?0:o,r?o+1:i):ii(t,r?o+1:0,r?i:o)}function gi(t,e){var n=t;return n instanceof Gn&&(n=n.value()),Re(e,(function(t,e){return e.func.apply(e.thisArg,Be([t],e.args))}),n)}function vi(t,e,n){var i=t.length;if(i<2)return i?fi(t[0]):[];for(var o=-1,a=r(i);++o<i;)for(var s=t[o],u=-1;++u<i;)u!=o&&(a[o]=pr(a[o]||s,t[u],e,n));return fi(mr(a,1),e,n)}function yi(t,e,n){for(var r=-1,o=t.length,a=e.length,s={};++r<o;){var u=r<a?e[r]:i;n(s,t[r],u)}return s}function mi(t){return Va(t)?t:[]}function bi(t){return"function"==typeof t?t:iu}function Di(t,e){return Ga(t)?t:xo(t,e)?[t]:Ro(bs(t))}var wi=Kr;function xi(t,e,n){var r=t.length;return n=n===i?r:n,!e&&n>=r?t:ii(t,e,n)}var Ei=ie||function(t){return ge.clearTimeout(t)};function Ai(t,e){if(e)return t.slice();var n=t.length,r=Yt?Yt(n):new t.constructor(n);return t.copy(r),r}function _i(t){var e=new t.constructor(t.byteLength);return new Gt(e).set(new Gt(t)),e}function Si(t,e){var n=e?_i(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Ci(t,e){if(t!==e){var n=t!==i,r=null===t,o=t==t,a=cs(t),s=e!==i,u=null===e,c=e==e,l=cs(e);if(!u&&!l&&!a&&t>e||a&&s&&c&&!u&&!l||r&&s&&c||!n&&c||!o)return 1;if(!r&&!a&&!l&&t<e||l&&n&&o&&!r&&!a||u&&n&&o||!s&&o||!c)return-1}return 0}function ki(t,e,n,i){for(var o=-1,a=t.length,s=n.length,u=-1,c=e.length,l=bn(a-s,0),f=r(c+l),p=!i;++u<c;)f[u]=e[u];for(;++o<s;)(p||o<a)&&(f[n[o]]=t[o]);for(;l--;)f[u++]=t[o++];return f}function Oi(t,e,n,i){for(var o=-1,a=t.length,s=-1,u=n.length,c=-1,l=e.length,f=bn(a-u,0),p=r(f+l),d=!i;++o<f;)p[o]=t[o];for(var h=o;++c<l;)p[h+c]=e[c];for(;++s<u;)(d||o<a)&&(p[h+n[s]]=t[o++]);return p}function Ti(t,e){var n=-1,i=t.length;for(e||(e=r(i));++n<i;)e[n]=t[n];return e}function Fi(t,e,n,r){var o=!n;n||(n={});for(var a=-1,s=e.length;++a<s;){var u=e[a],c=r?r(n[u],t[u],u,n,t):i;c===i&&(c=t[u]),o?ar(n,u,c):nr(n,u,c)}return n}function ji(t,e){return function(n,r){var i=Ga(n)?ke:ir,o=e?e():{};return i(n,t,co(r,2),o)}}function Li(t){return Kr((function(e,n){var r=-1,o=n.length,a=o>1?n[o-1]:i,s=o>2?n[2]:i;for(a=t.length>3&&"function"==typeof a?(o--,a):i,s&&wo(n[0],n[1],s)&&(a=o<3?i:a,o=1),e=Ct(e);++r<o;){var u=n[r];u&&t(e,u,r,a)}return e}))}function Ii(t,e){return function(n,r){if(null==n)return n;if(!$a(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=Ct(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Ni(t){return function(e,n,r){for(var i=-1,o=Ct(e),a=r(e),s=a.length;s--;){var u=a[t?s:++i];if(!1===n(o[u],u,o))break}return e}}function Bi(t){return function(e){var n=un(e=bs(e))?gn(e):i,r=n?n[0]:e.charAt(0),o=n?xi(n,1).join(""):e.slice(1);return r[t]()+o}}function Ri(t){return function(e){return Re(Qs(Ws(e).replace(te,"")),t,"")}}function Pi(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Un(t.prototype),r=t.apply(n,e);return es(r)?r:n}}function Mi(t){return function(e,n,r){var o=Ct(e);if(!$a(e)){var a=co(n,3);e=js(e),n=function(t){return a(o[t],t,o)}}var s=t(e,n,r);return s>-1?o[a?e[s]:s]:i}}function Hi(t){return ro((function(e){var n=e.length,r=n,a=Wn.prototype.thru;for(t&&e.reverse();r--;){var s=e[r];if("function"!=typeof s)throw new Tt(o);if(a&&!u&&"wrapper"==so(s))var u=new Wn([],!0)}for(r=u?r:n;++r<n;){var c=so(s=e[r]),l="wrapper"==c?ao(s):i;u=l&&Eo(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[so(l[0])].apply(u,l[3]):1==s.length&&Eo(s)?u[c]():u.thru(s)}return function(){var t=arguments,r=t[0];if(u&&1==t.length&&Ga(r))return u.plant(r).value();for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}}))}function qi(t,e,n,o,a,s,u,c,l,p){var d=e&f,h=1&e,g=2&e,v=24&e,y=512&e,m=g?i:Pi(t);return function f(){for(var b=arguments.length,D=r(b),w=b;w--;)D[w]=arguments[w];if(v)var x=uo(f),E=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(D,x);if(o&&(D=ki(D,o,a,v)),s&&(D=Oi(D,s,u,v)),b-=E,v&&b<p){var A=fn(D,x);return Vi(t,e,qi,f.placeholder,n,D,A,c,l,p-b)}var _=h?n:this,S=g?_[t]:t;return b=D.length,c?D=function(t,e){var n=t.length,r=Dn(e.length,n),o=Ti(t);for(;r--;){var a=e[r];t[r]=Do(a,n)?o[a]:i}return t}(D,c):y&&b>1&&D.reverse(),d&&l<b&&(D.length=l),this&&this!==ge&&this instanceof f&&(S=m||Pi(S)),S.apply(_,D)}}function Ui(t,e){return function(n,r){return function(t,e,n,r){return wr(t,(function(t,i,o){e(r,n(t),i,o)})),r}(n,t,e(r),{})}}function zi(t,e){return function(n,r){var o;if(n===i&&r===i)return e;if(n!==i&&(o=n),r!==i){if(o===i)return r;"string"==typeof n||"string"==typeof r?(n=li(n),r=li(r)):(n=ci(n),r=ci(r)),o=t(n,r)}return o}}function Wi(t){return ro((function(e){return e=Ne(e,Ze(co())),Kr((function(n){var r=this;return t(e,(function(t){return Ce(t,r,n)}))}))}))}function Gi(t,e){var n=(e=e===i?" ":li(e)).length;if(n<2)return n?Xr(e,t):e;var r=Xr(e,he(t/hn(e)));return un(e)?xi(gn(r),0,t).join(""):r.slice(0,t)}function Yi(t){return function(e,n,o){return o&&"number"!=typeof o&&wo(e,n,o)&&(n=o=i),e=hs(e),n===i?(n=e,e=0):n=hs(n),function(t,e,n,i){for(var o=-1,a=bn(he((e-t)/(n||1)),0),s=r(a);a--;)s[i?a:++o]=t,t+=n;return s}(e,n,o=o===i?e<n?1:-1:hs(o),t)}}function $i(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=ys(e),n=ys(n)),t(e,n)}}function Vi(t,e,n,r,o,a,s,u,f,p){var d=8&e;e|=d?c:l,4&(e&=~(d?l:c))||(e&=-4);var h=[t,e,o,d?a:i,d?s:i,d?i:a,d?i:s,u,f,p],g=n.apply(i,h);return Eo(t)&&Fo(g,h),g.placeholder=r,Io(g,t,e)}function Ji(t){var e=St[t];return function(t,n){if(t=ys(t),(n=null==n?0:Dn(gs(n),292))&&De(t)){var r=(bs(t)+"e").split("e");return+((r=(bs(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Xi=kn&&1/pn(new kn([,-0]))[1]==d?function(t){return new kn(t)}:cu;function Ki(t){return function(e){var n=vo(e);return n==_?cn(e):n==T?dn(e):function(t,e){return Ne(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Qi(t,e,n,a,d,h,g,v){var y=2&e;if(!y&&"function"!=typeof t)throw new Tt(o);var m=a?a.length:0;if(m||(e&=-97,a=d=i),g=g===i?g:bn(gs(g),0),v=v===i?v:gs(v),m-=d?d.length:0,e&l){var b=a,D=d;a=d=i}var w=y?i:ao(t),x=[t,e,n,a,d,b,D,h,g,v];if(w&&function(t,e){var n=t[1],r=e[1],i=n|r,o=i<131,a=r==f&&8==n||r==f&&n==p&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!o&&!a)return t;1&r&&(t[2]=e[2],i|=1&n?0:4);var u=e[3];if(u){var c=t[3];t[3]=c?ki(c,u,e[4]):u,t[4]=c?fn(t[3],s):e[4]}(u=e[5])&&(c=t[5],t[5]=c?Oi(c,u,e[6]):u,t[6]=c?fn(t[5],s):e[6]);(u=e[7])&&(t[7]=u);r&f&&(t[8]=null==t[8]?e[8]:Dn(t[8],e[8]));null==t[9]&&(t[9]=e[9]);t[0]=e[0],t[1]=i}(x,w),t=x[0],e=x[1],n=x[2],a=x[3],d=x[4],!(v=x[9]=x[9]===i?y?0:t.length:bn(x[9]-m,0))&&24&e&&(e&=-25),e&&1!=e)E=8==e||e==u?function(t,e,n){var o=Pi(t);return function a(){for(var s=arguments.length,u=r(s),c=s,l=uo(a);c--;)u[c]=arguments[c];var f=s<3&&u[0]!==l&&u[s-1]!==l?[]:fn(u,l);return(s-=f.length)<n?Vi(t,e,qi,a.placeholder,i,u,f,i,i,n-s):Ce(this&&this!==ge&&this instanceof a?o:t,this,u)}}(t,e,v):e!=c&&33!=e||d.length?qi.apply(i,x):function(t,e,n,i){var o=1&e,a=Pi(t);return function e(){for(var s=-1,u=arguments.length,c=-1,l=i.length,f=r(l+u),p=this&&this!==ge&&this instanceof e?a:t;++c<l;)f[c]=i[c];for(;u--;)f[c++]=arguments[++s];return Ce(p,o?n:this,f)}}(t,e,n,a);else var E=function(t,e,n){var r=1&e,i=Pi(t);return function e(){return(this&&this!==ge&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,n);return Io((w?ei:Fo)(E,x),t,e)}function Zi(t,e,n,r){return t===i||qa(t,Lt[n])&&!Bt.call(r,n)?e:t}function to(t,e,n,r,o,a){return es(t)&&es(e)&&(a.set(e,t),zr(t,e,i,to,a),a.delete(e)),t}function eo(t){return os(t)?i:t}function no(t,e,n,r,o,a){var s=1&n,u=t.length,c=e.length;if(u!=c&&!(s&&c>u))return!1;var l=a.get(t),f=a.get(e);if(l&&f)return l==e&&f==t;var p=-1,d=!0,h=2&n?new Jn:i;for(a.set(t,e),a.set(e,t);++p<u;){var g=t[p],v=e[p];if(r)var y=s?r(v,g,p,e,t,a):r(g,v,p,t,e,a);if(y!==i){if(y)continue;d=!1;break}if(h){if(!Me(e,(function(t,e){if(!en(h,e)&&(g===t||o(g,t,n,r,a)))return h.push(e)}))){d=!1;break}}else if(g!==v&&!o(g,v,n,r,a)){d=!1;break}}return a.delete(t),a.delete(e),d}function ro(t){return Lo(ko(t,i,Yo),t+"")}function io(t){return _r(t,js,ho)}function oo(t){return _r(t,Ls,go)}var ao=Fn?function(t){return Fn.get(t)}:cu;function so(t){for(var e=t.name+"",n=jn[e],r=Bt.call(jn,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function uo(t){return(Bt.call(qn,"placeholder")?qn:t).placeholder}function co(){var t=qn.iteratee||ou;return t=t===ou?Br:t,arguments.length?t(arguments[0],arguments[1]):t}function lo(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function fo(t){for(var e=js(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,So(i)]}return e}function po(t,e){var n=function(t,e){return null==t?i:t[e]}(t,e);return Nr(n)?n:i}var ho=ye?function(t){return null==t?[]:(t=Ct(t),je(ye(t),(function(e){return Jt.call(t,e)})))}:vu,go=ye?function(t){for(var e=[];t;)Be(e,ho(t)),t=$t(t);return e}:vu,vo=Sr;function yo(t,e,n){for(var r=-1,i=(e=Di(e,t)).length,o=!1;++r<i;){var a=Po(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&ts(i)&&Do(a,i)&&(Ga(t)||Wa(t))}function mo(t){return"function"!=typeof t.constructor||_o(t)?{}:Un($t(t))}function bo(t){return Ga(t)||Wa(t)||!!(Kt&&t&&t[Kt])}function Do(t,e){var n=typeof t;return!!(e=null==e?h:e)&&("number"==n||"symbol"!=n&&Dt.test(t))&&t>-1&&t%1==0&&t<e}function wo(t,e,n){if(!es(n))return!1;var r=typeof e;return!!("number"==r?$a(n)&&Do(e,n.length):"string"==r&&e in n)&&qa(n[e],t)}function xo(t,e){if(Ga(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!cs(t))||(nt.test(t)||!et.test(t)||null!=e&&t in Ct(e))}function Eo(t){var e=so(t),n=qn[e];if("function"!=typeof n||!(e in Gn.prototype))return!1;if(t===n)return!0;var r=ao(n);return!!r&&t===r[0]}(_n&&vo(new _n(new ArrayBuffer(1)))!=N||Sn&&vo(new Sn)!=_||Cn&&vo(Cn.resolve())!=k||kn&&vo(new kn)!=T||On&&vo(new On)!=L)&&(vo=function(t){var e=Sr(t),n=e==C?t.constructor:i,r=n?Mo(n):"";if(r)switch(r){case Ln:return N;case In:return _;case Nn:return k;case Bn:return T;case Rn:return L}return e});var Ao=It?Qa:yu;function _o(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Lt)}function So(t){return t==t&&!es(t)}function Co(t,e){return function(n){return null!=n&&(n[t]===e&&(e!==i||t in Ct(n)))}}function ko(t,e,n){return e=bn(e===i?t.length-1:e,0),function(){for(var i=arguments,o=-1,a=bn(i.length-e,0),s=r(a);++o<a;)s[o]=i[e+o];o=-1;for(var u=r(e+1);++o<e;)u[o]=i[o];return u[e]=n(s),Ce(t,this,u)}}function Oo(t,e){return e.length<2?t:Ar(t,ii(e,0,-1))}function To(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Fo=No(ei),jo=de||function(t,e){return ge.setTimeout(t,e)},Lo=No(ni);function Io(t,e,n){var r=e+"";return Lo(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(ut,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return Oe(y,(function(n){var r="_."+n[0];e&n[1]&&!Le(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(ct);return e?e[1].split(lt):[]}(r),n)))}function No(t){var e=0,n=0;return function(){var r=wn(),o=16-(r-n);if(n=r,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(i,arguments)}}function Bo(t,e){var n=-1,r=t.length,o=r-1;for(e=e===i?r:e;++n<e;){var a=Jr(n,o),s=t[a];t[a]=t[n],t[n]=s}return t.length=e,t}var Ro=function(t){var e=Na(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(rt,(function(t,n,r,i){e.push(r?i.replace(dt,"$1"):n||t)})),e}));function Po(t){if("string"==typeof t||cs(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Mo(t){if(null!=t){try{return Nt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Ho(t){if(t instanceof Gn)return t.clone();var e=new Wn(t.__wrapped__,t.__chain__);return e.__actions__=Ti(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var qo=Kr((function(t,e){return Va(t)?pr(t,mr(e,1,Va,!0)):[]})),Uo=Kr((function(t,e){var n=Ko(e);return Va(n)&&(n=i),Va(t)?pr(t,mr(e,1,Va,!0),co(n,2)):[]})),zo=Kr((function(t,e){var n=Ko(e);return Va(n)&&(n=i),Va(t)?pr(t,mr(e,1,Va,!0),i,n):[]}));function Wo(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:gs(n);return i<0&&(i=bn(r+i,0)),Ue(t,co(e,3),i)}function Go(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=r-1;return n!==i&&(o=gs(n),o=n<0?bn(r+o,0):Dn(o,r-1)),Ue(t,co(e,3),o,!0)}function Yo(t){return(null==t?0:t.length)?mr(t,1):[]}function $o(t){return t&&t.length?t[0]:i}var Vo=Kr((function(t){var e=Ne(t,mi);return e.length&&e[0]===t[0]?Tr(e):[]})),Jo=Kr((function(t){var e=Ko(t),n=Ne(t,mi);return e===Ko(n)?e=i:n.pop(),n.length&&n[0]===t[0]?Tr(n,co(e,2)):[]})),Xo=Kr((function(t){var e=Ko(t),n=Ne(t,mi);return(e="function"==typeof e?e:i)&&n.pop(),n.length&&n[0]===t[0]?Tr(n,i,e):[]}));function Ko(t){var e=null==t?0:t.length;return e?t[e-1]:i}var Qo=Kr(Zo);function Zo(t,e){return t&&t.length&&e&&e.length?$r(t,e):t}var ta=ro((function(t,e){var n=null==t?0:t.length,r=sr(t,e);return Vr(t,Ne(e,(function(t){return Do(t,n)?+t:t})).sort(Ci)),r}));function ea(t){return null==t?t:An.call(t)}var na=Kr((function(t){return fi(mr(t,1,Va,!0))})),ra=Kr((function(t){var e=Ko(t);return Va(e)&&(e=i),fi(mr(t,1,Va,!0),co(e,2))})),ia=Kr((function(t){var e=Ko(t);return e="function"==typeof e?e:i,fi(mr(t,1,Va,!0),i,e)}));function oa(t){if(!t||!t.length)return[];var e=0;return t=je(t,(function(t){if(Va(t))return e=bn(t.length,e),!0})),Ke(e,(function(e){return Ne(t,$e(e))}))}function aa(t,e){if(!t||!t.length)return[];var n=oa(t);return null==e?n:Ne(n,(function(t){return Ce(e,i,t)}))}var sa=Kr((function(t,e){return Va(t)?pr(t,e):[]})),ua=Kr((function(t){return vi(je(t,Va))})),ca=Kr((function(t){var e=Ko(t);return Va(e)&&(e=i),vi(je(t,Va),co(e,2))})),la=Kr((function(t){var e=Ko(t);return e="function"==typeof e?e:i,vi(je(t,Va),i,e)})),fa=Kr(oa);var pa=Kr((function(t){var e=t.length,n=e>1?t[e-1]:i;return n="function"==typeof n?(t.pop(),n):i,aa(t,n)}));function da(t){var e=qn(t);return e.__chain__=!0,e}function ha(t,e){return e(t)}var ga=ro((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,o=function(e){return sr(e,t)};return!(e>1||this.__actions__.length)&&r instanceof Gn&&Do(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:ha,args:[o],thisArg:i}),new Wn(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(i),t}))):this.thru(o)}));var va=ji((function(t,e,n){Bt.call(t,n)?++t[n]:ar(t,n,1)}));var ya=Mi(Wo),ma=Mi(Go);function ba(t,e){return(Ga(t)?Oe:dr)(t,co(e,3))}function Da(t,e){return(Ga(t)?Te:hr)(t,co(e,3))}var wa=ji((function(t,e,n){Bt.call(t,n)?t[n].push(e):ar(t,n,[e])}));var xa=Kr((function(t,e,n){var i=-1,o="function"==typeof e,a=$a(t)?r(t.length):[];return dr(t,(function(t){a[++i]=o?Ce(e,t,n):Fr(t,e,n)})),a})),Ea=ji((function(t,e,n){ar(t,n,e)}));function Aa(t,e){return(Ga(t)?Ne:Hr)(t,co(e,3))}var _a=ji((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]}));var Sa=Kr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&wo(t,e[0],e[1])?e=[]:n>2&&wo(e[0],e[1],e[2])&&(e=[e[0]]),Gr(t,mr(e,1),[])})),Ca=le||function(){return ge.Date.now()};function ka(t,e,n){return e=n?i:e,e=t&&null==e?t.length:e,Qi(t,f,i,i,i,i,e)}function Oa(t,e){var n;if("function"!=typeof e)throw new Tt(o);return t=gs(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=i),n}}var Ta=Kr((function(t,e,n){var r=1;if(n.length){var i=fn(n,uo(Ta));r|=c}return Qi(t,r,e,n,i)})),Fa=Kr((function(t,e,n){var r=3;if(n.length){var i=fn(n,uo(Fa));r|=c}return Qi(e,r,t,n,i)}));function ja(t,e,n){var r,a,s,u,c,l,f=0,p=!1,d=!1,h=!0;if("function"!=typeof t)throw new Tt(o);function g(e){var n=r,o=a;return r=a=i,f=e,u=t.apply(o,n)}function v(t){var n=t-l;return l===i||n>=e||n<0||d&&t-f>=s}function y(){var t=Ca();if(v(t))return m(t);c=jo(y,function(t){var n=e-(t-l);return d?Dn(n,s-(t-f)):n}(t))}function m(t){return c=i,h&&r?g(t):(r=a=i,u)}function b(){var t=Ca(),n=v(t);if(r=arguments,a=this,l=t,n){if(c===i)return function(t){return f=t,c=jo(y,e),p?g(t):u}(l);if(d)return Ei(c),c=jo(y,e),g(l)}return c===i&&(c=jo(y,e)),u}return e=ys(e)||0,es(n)&&(p=!!n.leading,s=(d="maxWait"in n)?bn(ys(n.maxWait)||0,e):s,h="trailing"in n?!!n.trailing:h),b.cancel=function(){c!==i&&Ei(c),f=0,r=l=a=c=i},b.flush=function(){return c===i?u:m(Ca())},b}var La=Kr((function(t,e){return fr(t,1,e)})),Ia=Kr((function(t,e,n){return fr(t,ys(e)||0,n)}));function Na(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new Tt(o);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Na.Cache||Vn),n}function Ba(t){if("function"!=typeof t)throw new Tt(o);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Na.Cache=Vn;var Ra=wi((function(t,e){var n=(e=1==e.length&&Ga(e[0])?Ne(e[0],Ze(co())):Ne(mr(e,1),Ze(co()))).length;return Kr((function(r){for(var i=-1,o=Dn(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return Ce(t,this,r)}))})),Pa=Kr((function(t,e){var n=fn(e,uo(Pa));return Qi(t,c,i,e,n)})),Ma=Kr((function(t,e){var n=fn(e,uo(Ma));return Qi(t,l,i,e,n)})),Ha=ro((function(t,e){return Qi(t,p,i,i,i,e)}));function qa(t,e){return t===e||t!=t&&e!=e}var Ua=$i(Cr),za=$i((function(t,e){return t>=e})),Wa=jr(function(){return arguments}())?jr:function(t){return ns(t)&&Bt.call(t,"callee")&&!Jt.call(t,"callee")},Ga=r.isArray,Ya=we?Ze(we):function(t){return ns(t)&&Sr(t)==I};function $a(t){return null!=t&&ts(t.length)&&!Qa(t)}function Va(t){return ns(t)&&$a(t)}var Ja=be||yu,Xa=xe?Ze(xe):function(t){return ns(t)&&Sr(t)==w};function Ka(t){if(!ns(t))return!1;var e=Sr(t);return e==x||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!os(t)}function Qa(t){if(!es(t))return!1;var e=Sr(t);return e==E||e==A||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Za(t){return"number"==typeof t&&t==gs(t)}function ts(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=h}function es(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function ns(t){return null!=t&&"object"==typeof t}var rs=Ee?Ze(Ee):function(t){return ns(t)&&vo(t)==_};function is(t){return"number"==typeof t||ns(t)&&Sr(t)==S}function os(t){if(!ns(t)||Sr(t)!=C)return!1;var e=$t(t);if(null===e)return!0;var n=Bt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Nt.call(n)==Ht}var as=Ae?Ze(Ae):function(t){return ns(t)&&Sr(t)==O};var ss=_e?Ze(_e):function(t){return ns(t)&&vo(t)==T};function us(t){return"string"==typeof t||!Ga(t)&&ns(t)&&Sr(t)==F}function cs(t){return"symbol"==typeof t||ns(t)&&Sr(t)==j}var ls=Se?Ze(Se):function(t){return ns(t)&&ts(t.length)&&!!ue[Sr(t)]};var fs=$i(Mr),ps=$i((function(t,e){return t<=e}));function ds(t){if(!t)return[];if($a(t))return us(t)?gn(t):Ti(t);if(Qt&&t[Qt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Qt]());var e=vo(t);return(e==_?cn:e==T?pn:qs)(t)}function hs(t){return t?(t=ys(t))===d||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function gs(t){var e=hs(t),n=e%1;return e==e?n?e-n:e:0}function vs(t){return t?ur(gs(t),0,v):0}function ys(t){if("number"==typeof t)return t;if(cs(t))return g;if(es(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=es(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Qe(t);var n=yt.test(t);return n||bt.test(t)?pe(t.slice(2),n?2:8):vt.test(t)?g:+t}function ms(t){return Fi(t,Ls(t))}function bs(t){return null==t?"":li(t)}var Ds=Li((function(t,e){if(_o(e)||$a(e))Fi(e,js(e),t);else for(var n in e)Bt.call(e,n)&&nr(t,n,e[n])})),ws=Li((function(t,e){Fi(e,Ls(e),t)})),xs=Li((function(t,e,n,r){Fi(e,Ls(e),t,r)})),Es=Li((function(t,e,n,r){Fi(e,js(e),t,r)})),As=ro(sr);var _s=Kr((function(t,e){t=Ct(t);var n=-1,r=e.length,o=r>2?e[2]:i;for(o&&wo(e[0],e[1],o)&&(r=1);++n<r;)for(var a=e[n],s=Ls(a),u=-1,c=s.length;++u<c;){var l=s[u],f=t[l];(f===i||qa(f,Lt[l])&&!Bt.call(t,l))&&(t[l]=a[l])}return t})),Ss=Kr((function(t){return t.push(i,to),Ce(Ns,i,t)}));function Cs(t,e,n){var r=null==t?i:Ar(t,e);return r===i?n:r}function ks(t,e){return null!=t&&yo(t,e,Or)}var Os=Ui((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Mt.call(e)),t[e]=n}),eu(iu)),Ts=Ui((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Mt.call(e)),Bt.call(t,e)?t[e].push(n):t[e]=[n]}),co),Fs=Kr(Fr);function js(t){return $a(t)?Kn(t):Rr(t)}function Ls(t){return $a(t)?Kn(t,!0):Pr(t)}var Is=Li((function(t,e,n){zr(t,e,n)})),Ns=Li((function(t,e,n,r){zr(t,e,n,r)})),Bs=ro((function(t,e){var n={};if(null==t)return n;var r=!1;e=Ne(e,(function(e){return e=Di(e,t),r||(r=e.length>1),e})),Fi(t,oo(t),n),r&&(n=cr(n,7,eo));for(var i=e.length;i--;)pi(n,e[i]);return n}));var Rs=ro((function(t,e){return null==t?{}:function(t,e){return Yr(t,e,(function(e,n){return ks(t,n)}))}(t,e)}));function Ps(t,e){if(null==t)return{};var n=Ne(oo(t),(function(t){return[t]}));return e=co(e),Yr(t,n,(function(t,n){return e(t,n[0])}))}var Ms=Ki(js),Hs=Ki(Ls);function qs(t){return null==t?[]:tn(t,js(t))}var Us=Ri((function(t,e,n){return e=e.toLowerCase(),t+(n?zs(e):e)}));function zs(t){return Ks(bs(t).toLowerCase())}function Ws(t){return(t=bs(t))&&t.replace(wt,on).replace(ee,"")}var Gs=Ri((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Ys=Ri((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),$s=Bi("toLowerCase");var Vs=Ri((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}));var Js=Ri((function(t,e,n){return t+(n?" ":"")+Ks(e)}));var Xs=Ri((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Ks=Bi("toUpperCase");function Qs(t,e,n){return t=bs(t),(e=n?i:e)===i?function(t){return oe.test(t)}(t)?function(t){return t.match(re)||[]}(t):function(t){return t.match(ft)||[]}(t):t.match(e)||[]}var Zs=Kr((function(t,e){try{return Ce(t,i,e)}catch(t){return Ka(t)?t:new At(t)}})),tu=ro((function(t,e){return Oe(e,(function(e){e=Po(e),ar(t,e,Ta(t[e],t))})),t}));function eu(t){return function(){return t}}var nu=Hi(),ru=Hi(!0);function iu(t){return t}function ou(t){return Br("function"==typeof t?t:cr(t,1))}var au=Kr((function(t,e){return function(n){return Fr(n,t,e)}})),su=Kr((function(t,e){return function(n){return Fr(t,n,e)}}));function uu(t,e,n){var r=js(e),i=Er(e,r);null!=n||es(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=Er(e,js(e)));var o=!(es(n)&&"chain"in n&&!n.chain),a=Qa(t);return Oe(i,(function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__);return(n.__actions__=Ti(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,Be([this.value()],arguments))})})),t}function cu(){}var lu=Wi(Ne),fu=Wi(Fe),pu=Wi(Me);function du(t){return xo(t)?$e(Po(t)):function(t){return function(e){return Ar(e,t)}}(t)}var hu=Yi(),gu=Yi(!0);function vu(){return[]}function yu(){return!1}var mu=zi((function(t,e){return t+e}),0),bu=Ji("ceil"),Du=zi((function(t,e){return t/e}),1),wu=Ji("floor");var xu,Eu=zi((function(t,e){return t*e}),1),Au=Ji("round"),_u=zi((function(t,e){return t-e}),0);return qn.after=function(t,e){if("function"!=typeof e)throw new Tt(o);return t=gs(t),function(){if(--t<1)return e.apply(this,arguments)}},qn.ary=ka,qn.assign=Ds,qn.assignIn=ws,qn.assignInWith=xs,qn.assignWith=Es,qn.at=As,qn.before=Oa,qn.bind=Ta,qn.bindAll=tu,qn.bindKey=Fa,qn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Ga(t)?t:[t]},qn.chain=da,qn.chunk=function(t,e,n){e=(n?wo(t,e,n):e===i)?1:bn(gs(e),0);var o=null==t?0:t.length;if(!o||e<1)return[];for(var a=0,s=0,u=r(he(o/e));a<o;)u[s++]=ii(t,a,a+=e);return u},qn.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i},qn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],i=t;i--;)e[i-1]=arguments[i];return Be(Ga(n)?Ti(n):[n],mr(e,1))},qn.cond=function(t){var e=null==t?0:t.length,n=co();return t=e?Ne(t,(function(t){if("function"!=typeof t[1])throw new Tt(o);return[n(t[0]),t[1]]})):[],Kr((function(n){for(var r=-1;++r<e;){var i=t[r];if(Ce(i[0],this,n))return Ce(i[1],this,n)}}))},qn.conforms=function(t){return function(t){var e=js(t);return function(n){return lr(n,t,e)}}(cr(t,1))},qn.constant=eu,qn.countBy=va,qn.create=function(t,e){var n=Un(t);return null==e?n:or(n,e)},qn.curry=function t(e,n,r){var o=Qi(e,8,i,i,i,i,i,n=r?i:n);return o.placeholder=t.placeholder,o},qn.curryRight=function t(e,n,r){var o=Qi(e,u,i,i,i,i,i,n=r?i:n);return o.placeholder=t.placeholder,o},qn.debounce=ja,qn.defaults=_s,qn.defaultsDeep=Ss,qn.defer=La,qn.delay=Ia,qn.difference=qo,qn.differenceBy=Uo,qn.differenceWith=zo,qn.drop=function(t,e,n){var r=null==t?0:t.length;return r?ii(t,(e=n||e===i?1:gs(e))<0?0:e,r):[]},qn.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?ii(t,0,(e=r-(e=n||e===i?1:gs(e)))<0?0:e):[]},qn.dropRightWhile=function(t,e){return t&&t.length?hi(t,co(e,3),!0,!0):[]},qn.dropWhile=function(t,e){return t&&t.length?hi(t,co(e,3),!0):[]},qn.fill=function(t,e,n,r){var o=null==t?0:t.length;return o?(n&&"number"!=typeof n&&wo(t,e,n)&&(n=0,r=o),function(t,e,n,r){var o=t.length;for((n=gs(n))<0&&(n=-n>o?0:o+n),(r=r===i||r>o?o:gs(r))<0&&(r+=o),r=n>r?0:vs(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},qn.filter=function(t,e){return(Ga(t)?je:yr)(t,co(e,3))},qn.flatMap=function(t,e){return mr(Aa(t,e),1)},qn.flatMapDeep=function(t,e){return mr(Aa(t,e),d)},qn.flatMapDepth=function(t,e,n){return n=n===i?1:gs(n),mr(Aa(t,e),n)},qn.flatten=Yo,qn.flattenDeep=function(t){return(null==t?0:t.length)?mr(t,d):[]},qn.flattenDepth=function(t,e){return(null==t?0:t.length)?mr(t,e=e===i?1:gs(e)):[]},qn.flip=function(t){return Qi(t,512)},qn.flow=nu,qn.flowRight=ru,qn.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},qn.functions=function(t){return null==t?[]:Er(t,js(t))},qn.functionsIn=function(t){return null==t?[]:Er(t,Ls(t))},qn.groupBy=wa,qn.initial=function(t){return(null==t?0:t.length)?ii(t,0,-1):[]},qn.intersection=Vo,qn.intersectionBy=Jo,qn.intersectionWith=Xo,qn.invert=Os,qn.invertBy=Ts,qn.invokeMap=xa,qn.iteratee=ou,qn.keyBy=Ea,qn.keys=js,qn.keysIn=Ls,qn.map=Aa,qn.mapKeys=function(t,e){var n={};return e=co(e,3),wr(t,(function(t,r,i){ar(n,e(t,r,i),t)})),n},qn.mapValues=function(t,e){var n={};return e=co(e,3),wr(t,(function(t,r,i){ar(n,r,e(t,r,i))})),n},qn.matches=function(t){return qr(cr(t,1))},qn.matchesProperty=function(t,e){return Ur(t,cr(e,1))},qn.memoize=Na,qn.merge=Is,qn.mergeWith=Ns,qn.method=au,qn.methodOf=su,qn.mixin=uu,qn.negate=Ba,qn.nthArg=function(t){return t=gs(t),Kr((function(e){return Wr(e,t)}))},qn.omit=Bs,qn.omitBy=function(t,e){return Ps(t,Ba(co(e)))},qn.once=function(t){return Oa(2,t)},qn.orderBy=function(t,e,n,r){return null==t?[]:(Ga(e)||(e=null==e?[]:[e]),Ga(n=r?i:n)||(n=null==n?[]:[n]),Gr(t,e,n))},qn.over=lu,qn.overArgs=Ra,qn.overEvery=fu,qn.overSome=pu,qn.partial=Pa,qn.partialRight=Ma,qn.partition=_a,qn.pick=Rs,qn.pickBy=Ps,qn.property=du,qn.propertyOf=function(t){return function(e){return null==t?i:Ar(t,e)}},qn.pull=Qo,qn.pullAll=Zo,qn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?$r(t,e,co(n,2)):t},qn.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?$r(t,e,i,n):t},qn.pullAt=ta,qn.range=hu,qn.rangeRight=gu,qn.rearg=Ha,qn.reject=function(t,e){return(Ga(t)?je:yr)(t,Ba(co(e,3)))},qn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=co(e,3);++r<o;){var a=t[r];e(a,r,t)&&(n.push(a),i.push(r))}return Vr(t,i),n},qn.rest=function(t,e){if("function"!=typeof t)throw new Tt(o);return Kr(t,e=e===i?e:gs(e))},qn.reverse=ea,qn.sampleSize=function(t,e,n){return e=(n?wo(t,e,n):e===i)?1:gs(e),(Ga(t)?Zn:Zr)(t,e)},qn.set=function(t,e,n){return null==t?t:ti(t,e,n)},qn.setWith=function(t,e,n,r){return r="function"==typeof r?r:i,null==t?t:ti(t,e,n,r)},qn.shuffle=function(t){return(Ga(t)?tr:ri)(t)},qn.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&wo(t,e,n)?(e=0,n=r):(e=null==e?0:gs(e),n=n===i?r:gs(n)),ii(t,e,n)):[]},qn.sortBy=Sa,qn.sortedUniq=function(t){return t&&t.length?ui(t):[]},qn.sortedUniqBy=function(t,e){return t&&t.length?ui(t,co(e,2)):[]},qn.split=function(t,e,n){return n&&"number"!=typeof n&&wo(t,e,n)&&(e=n=i),(n=n===i?v:n>>>0)?(t=bs(t))&&("string"==typeof e||null!=e&&!as(e))&&!(e=li(e))&&un(t)?xi(gn(t),0,n):t.split(e,n):[]},qn.spread=function(t,e){if("function"!=typeof t)throw new Tt(o);return e=null==e?0:bn(gs(e),0),Kr((function(n){var r=n[e],i=xi(n,0,e);return r&&Be(i,r),Ce(t,this,i)}))},qn.tail=function(t){var e=null==t?0:t.length;return e?ii(t,1,e):[]},qn.take=function(t,e,n){return t&&t.length?ii(t,0,(e=n||e===i?1:gs(e))<0?0:e):[]},qn.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?ii(t,(e=r-(e=n||e===i?1:gs(e)))<0?0:e,r):[]},qn.takeRightWhile=function(t,e){return t&&t.length?hi(t,co(e,3),!1,!0):[]},qn.takeWhile=function(t,e){return t&&t.length?hi(t,co(e,3)):[]},qn.tap=function(t,e){return e(t),t},qn.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new Tt(o);return es(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),ja(t,e,{leading:r,maxWait:e,trailing:i})},qn.thru=ha,qn.toArray=ds,qn.toPairs=Ms,qn.toPairsIn=Hs,qn.toPath=function(t){return Ga(t)?Ne(t,Po):cs(t)?[t]:Ti(Ro(bs(t)))},qn.toPlainObject=ms,qn.transform=function(t,e,n){var r=Ga(t),i=r||Ja(t)||ls(t);if(e=co(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:es(t)&&Qa(o)?Un($t(t)):{}}return(i?Oe:wr)(t,(function(t,r,i){return e(n,t,r,i)})),n},qn.unary=function(t){return ka(t,1)},qn.union=na,qn.unionBy=ra,qn.unionWith=ia,qn.uniq=function(t){return t&&t.length?fi(t):[]},qn.uniqBy=function(t,e){return t&&t.length?fi(t,co(e,2)):[]},qn.uniqWith=function(t,e){return e="function"==typeof e?e:i,t&&t.length?fi(t,i,e):[]},qn.unset=function(t,e){return null==t||pi(t,e)},qn.unzip=oa,qn.unzipWith=aa,qn.update=function(t,e,n){return null==t?t:di(t,e,bi(n))},qn.updateWith=function(t,e,n,r){return r="function"==typeof r?r:i,null==t?t:di(t,e,bi(n),r)},qn.values=qs,qn.valuesIn=function(t){return null==t?[]:tn(t,Ls(t))},qn.without=sa,qn.words=Qs,qn.wrap=function(t,e){return Pa(bi(e),t)},qn.xor=ua,qn.xorBy=ca,qn.xorWith=la,qn.zip=fa,qn.zipObject=function(t,e){return yi(t||[],e||[],nr)},qn.zipObjectDeep=function(t,e){return yi(t||[],e||[],ti)},qn.zipWith=pa,qn.entries=Ms,qn.entriesIn=Hs,qn.extend=ws,qn.extendWith=xs,uu(qn,qn),qn.add=mu,qn.attempt=Zs,qn.camelCase=Us,qn.capitalize=zs,qn.ceil=bu,qn.clamp=function(t,e,n){return n===i&&(n=e,e=i),n!==i&&(n=(n=ys(n))==n?n:0),e!==i&&(e=(e=ys(e))==e?e:0),ur(ys(t),e,n)},qn.clone=function(t){return cr(t,4)},qn.cloneDeep=function(t){return cr(t,5)},qn.cloneDeepWith=function(t,e){return cr(t,5,e="function"==typeof e?e:i)},qn.cloneWith=function(t,e){return cr(t,4,e="function"==typeof e?e:i)},qn.conformsTo=function(t,e){return null==e||lr(t,e,js(e))},qn.deburr=Ws,qn.defaultTo=function(t,e){return null==t||t!=t?e:t},qn.divide=Du,qn.endsWith=function(t,e,n){t=bs(t),e=li(e);var r=t.length,o=n=n===i?r:ur(gs(n),0,r);return(n-=e.length)>=0&&t.slice(n,o)==e},qn.eq=qa,qn.escape=function(t){return(t=bs(t))&&K.test(t)?t.replace(J,an):t},qn.escapeRegExp=function(t){return(t=bs(t))&&ot.test(t)?t.replace(it,"\\$&"):t},qn.every=function(t,e,n){var r=Ga(t)?Fe:gr;return n&&wo(t,e,n)&&(e=i),r(t,co(e,3))},qn.find=ya,qn.findIndex=Wo,qn.findKey=function(t,e){return qe(t,co(e,3),wr)},qn.findLast=ma,qn.findLastIndex=Go,qn.findLastKey=function(t,e){return qe(t,co(e,3),xr)},qn.floor=wu,qn.forEach=ba,qn.forEachRight=Da,qn.forIn=function(t,e){return null==t?t:br(t,co(e,3),Ls)},qn.forInRight=function(t,e){return null==t?t:Dr(t,co(e,3),Ls)},qn.forOwn=function(t,e){return t&&wr(t,co(e,3))},qn.forOwnRight=function(t,e){return t&&xr(t,co(e,3))},qn.get=Cs,qn.gt=Ua,qn.gte=za,qn.has=function(t,e){return null!=t&&yo(t,e,kr)},qn.hasIn=ks,qn.head=$o,qn.identity=iu,qn.includes=function(t,e,n,r){t=$a(t)?t:qs(t),n=n&&!r?gs(n):0;var i=t.length;return n<0&&(n=bn(i+n,0)),us(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&ze(t,e,n)>-1},qn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:gs(n);return i<0&&(i=bn(r+i,0)),ze(t,e,i)},qn.inRange=function(t,e,n){return e=hs(e),n===i?(n=e,e=0):n=hs(n),function(t,e,n){return t>=Dn(e,n)&&t<bn(e,n)}(t=ys(t),e,n)},qn.invoke=Fs,qn.isArguments=Wa,qn.isArray=Ga,qn.isArrayBuffer=Ya,qn.isArrayLike=$a,qn.isArrayLikeObject=Va,qn.isBoolean=function(t){return!0===t||!1===t||ns(t)&&Sr(t)==D},qn.isBuffer=Ja,qn.isDate=Xa,qn.isElement=function(t){return ns(t)&&1===t.nodeType&&!os(t)},qn.isEmpty=function(t){if(null==t)return!0;if($a(t)&&(Ga(t)||"string"==typeof t||"function"==typeof t.splice||Ja(t)||ls(t)||Wa(t)))return!t.length;var e=vo(t);if(e==_||e==T)return!t.size;if(_o(t))return!Rr(t).length;for(var n in t)if(Bt.call(t,n))return!1;return!0},qn.isEqual=function(t,e){return Lr(t,e)},qn.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:i)?n(t,e):i;return r===i?Lr(t,e,i,n):!!r},qn.isError=Ka,qn.isFinite=function(t){return"number"==typeof t&&De(t)},qn.isFunction=Qa,qn.isInteger=Za,qn.isLength=ts,qn.isMap=rs,qn.isMatch=function(t,e){return t===e||Ir(t,e,fo(e))},qn.isMatchWith=function(t,e,n){return n="function"==typeof n?n:i,Ir(t,e,fo(e),n)},qn.isNaN=function(t){return is(t)&&t!=+t},qn.isNative=function(t){if(Ao(t))throw new At("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Nr(t)},qn.isNil=function(t){return null==t},qn.isNull=function(t){return null===t},qn.isNumber=is,qn.isObject=es,qn.isObjectLike=ns,qn.isPlainObject=os,qn.isRegExp=as,qn.isSafeInteger=function(t){return Za(t)&&t>=-9007199254740991&&t<=h},qn.isSet=ss,qn.isString=us,qn.isSymbol=cs,qn.isTypedArray=ls,qn.isUndefined=function(t){return t===i},qn.isWeakMap=function(t){return ns(t)&&vo(t)==L},qn.isWeakSet=function(t){return ns(t)&&"[object WeakSet]"==Sr(t)},qn.join=function(t,e){return null==t?"":He.call(t,e)},qn.kebabCase=Gs,qn.last=Ko,qn.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=gs(n))<0?bn(r+o,0):Dn(o,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,o):Ue(t,Ge,o,!0)},qn.lowerCase=Ys,qn.lowerFirst=$s,qn.lt=fs,qn.lte=ps,qn.max=function(t){return t&&t.length?vr(t,iu,Cr):i},qn.maxBy=function(t,e){return t&&t.length?vr(t,co(e,2),Cr):i},qn.mean=function(t){return Ye(t,iu)},qn.meanBy=function(t,e){return Ye(t,co(e,2))},qn.min=function(t){return t&&t.length?vr(t,iu,Mr):i},qn.minBy=function(t,e){return t&&t.length?vr(t,co(e,2),Mr):i},qn.stubArray=vu,qn.stubFalse=yu,qn.stubObject=function(){return{}},qn.stubString=function(){return""},qn.stubTrue=function(){return!0},qn.multiply=Eu,qn.nth=function(t,e){return t&&t.length?Wr(t,gs(e)):i},qn.noConflict=function(){return ge._===this&&(ge._=qt),this},qn.noop=cu,qn.now=Ca,qn.pad=function(t,e,n){t=bs(t);var r=(e=gs(e))?hn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return Gi(ve(i),n)+t+Gi(he(i),n)},qn.padEnd=function(t,e,n){t=bs(t);var r=(e=gs(e))?hn(t):0;return e&&r<e?t+Gi(e-r,n):t},qn.padStart=function(t,e,n){t=bs(t);var r=(e=gs(e))?hn(t):0;return e&&r<e?Gi(e-r,n)+t:t},qn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),xn(bs(t).replace(at,""),e||0)},qn.random=function(t,e,n){if(n&&"boolean"!=typeof n&&wo(t,e,n)&&(e=n=i),n===i&&("boolean"==typeof e?(n=e,e=i):"boolean"==typeof t&&(n=t,t=i)),t===i&&e===i?(t=0,e=1):(t=hs(t),e===i?(e=t,t=0):e=hs(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var o=En();return Dn(t+o*(e-t+fe("1e-"+((o+"").length-1))),e)}return Jr(t,e)},qn.reduce=function(t,e,n){var r=Ga(t)?Re:Je,i=arguments.length<3;return r(t,co(e,4),n,i,dr)},qn.reduceRight=function(t,e,n){var r=Ga(t)?Pe:Je,i=arguments.length<3;return r(t,co(e,4),n,i,hr)},qn.repeat=function(t,e,n){return e=(n?wo(t,e,n):e===i)?1:gs(e),Xr(bs(t),e)},qn.replace=function(){var t=arguments,e=bs(t[0]);return t.length<3?e:e.replace(t[1],t[2])},qn.result=function(t,e,n){var r=-1,o=(e=Di(e,t)).length;for(o||(o=1,t=i);++r<o;){var a=null==t?i:t[Po(e[r])];a===i&&(r=o,a=n),t=Qa(a)?a.call(t):a}return t},qn.round=Au,qn.runInContext=t,qn.sample=function(t){return(Ga(t)?Qn:Qr)(t)},qn.size=function(t){if(null==t)return 0;if($a(t))return us(t)?hn(t):t.length;var e=vo(t);return e==_||e==T?t.size:Rr(t).length},qn.snakeCase=Vs,qn.some=function(t,e,n){var r=Ga(t)?Me:oi;return n&&wo(t,e,n)&&(e=i),r(t,co(e,3))},qn.sortedIndex=function(t,e){return ai(t,e)},qn.sortedIndexBy=function(t,e,n){return si(t,e,co(n,2))},qn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=ai(t,e);if(r<n&&qa(t[r],e))return r}return-1},qn.sortedLastIndex=function(t,e){return ai(t,e,!0)},qn.sortedLastIndexBy=function(t,e,n){return si(t,e,co(n,2),!0)},qn.sortedLastIndexOf=function(t,e){if(null==t?0:t.length){var n=ai(t,e,!0)-1;if(qa(t[n],e))return n}return-1},qn.startCase=Js,qn.startsWith=function(t,e,n){return t=bs(t),n=null==n?0:ur(gs(n),0,t.length),e=li(e),t.slice(n,n+e.length)==e},qn.subtract=_u,qn.sum=function(t){return t&&t.length?Xe(t,iu):0},qn.sumBy=function(t,e){return t&&t.length?Xe(t,co(e,2)):0},qn.template=function(t,e,n){var r=qn.templateSettings;n&&wo(t,e,n)&&(e=i),t=bs(t),e=xs({},e,r,Zi);var o,a,s=xs({},e.imports,r.imports,Zi),u=js(s),c=tn(s,u),l=0,f=e.interpolate||xt,p="__p += '",d=kt((e.escape||xt).source+"|"+f.source+"|"+(f===tt?ht:xt).source+"|"+(e.evaluate||xt).source+"|$","g"),h="//# sourceURL="+(Bt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++se+"]")+"\n";t.replace(d,(function(e,n,r,i,s,u){return r||(r=i),p+=t.slice(l,u).replace(Et,sn),n&&(o=!0,p+="' +\n__e("+n+") +\n'"),s&&(a=!0,p+="';\n"+s+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+e.length,e})),p+="';\n";var g=Bt.call(e,"variable")&&e.variable;if(g){if(pt.test(g))throw new At("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(a?p.replace(G,""):p).replace(Y,"$1").replace($,"$1;"),p="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var v=Zs((function(){return _t(u,h+"return "+p).apply(i,c)}));if(v.source=p,Ka(v))throw v;return v},qn.times=function(t,e){if((t=gs(t))<1||t>h)return[];var n=v,r=Dn(t,v);e=co(e),t-=v;for(var i=Ke(r,e);++n<t;)e(n);return i},qn.toFinite=hs,qn.toInteger=gs,qn.toLength=vs,qn.toLower=function(t){return bs(t).toLowerCase()},qn.toNumber=ys,qn.toSafeInteger=function(t){return t?ur(gs(t),-9007199254740991,h):0===t?t:0},qn.toString=bs,qn.toUpper=function(t){return bs(t).toUpperCase()},qn.trim=function(t,e,n){if((t=bs(t))&&(n||e===i))return Qe(t);if(!t||!(e=li(e)))return t;var r=gn(t),o=gn(e);return xi(r,nn(r,o),rn(r,o)+1).join("")},qn.trimEnd=function(t,e,n){if((t=bs(t))&&(n||e===i))return t.slice(0,vn(t)+1);if(!t||!(e=li(e)))return t;var r=gn(t);return xi(r,0,rn(r,gn(e))+1).join("")},qn.trimStart=function(t,e,n){if((t=bs(t))&&(n||e===i))return t.replace(at,"");if(!t||!(e=li(e)))return t;var r=gn(t);return xi(r,nn(r,gn(e))).join("")},qn.truncate=function(t,e){var n=30,r="...";if(es(e)){var o="separator"in e?e.separator:o;n="length"in e?gs(e.length):n,r="omission"in e?li(e.omission):r}var a=(t=bs(t)).length;if(un(t)){var s=gn(t);a=s.length}if(n>=a)return t;var u=n-hn(r);if(u<1)return r;var c=s?xi(s,0,u).join(""):t.slice(0,u);if(o===i)return c+r;if(s&&(u+=c.length-u),as(o)){if(t.slice(u).search(o)){var l,f=c;for(o.global||(o=kt(o.source,bs(gt.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var p=l.index;c=c.slice(0,p===i?u:p)}}else if(t.indexOf(li(o),u)!=u){var d=c.lastIndexOf(o);d>-1&&(c=c.slice(0,d))}return c+r},qn.unescape=function(t){return(t=bs(t))&&X.test(t)?t.replace(V,yn):t},qn.uniqueId=function(t){var e=++Rt;return bs(t)+e},qn.upperCase=Xs,qn.upperFirst=Ks,qn.each=ba,qn.eachRight=Da,qn.first=$o,uu(qn,(xu={},wr(qn,(function(t,e){Bt.call(qn.prototype,e)||(xu[e]=t)})),xu),{chain:!1}),qn.VERSION="4.17.21",Oe(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){qn[t].placeholder=qn})),Oe(["drop","take"],(function(t,e){Gn.prototype[t]=function(n){n=n===i?1:bn(gs(n),0);var r=this.__filtered__&&!e?new Gn(this):this.clone();return r.__filtered__?r.__takeCount__=Dn(n,r.__takeCount__):r.__views__.push({size:Dn(n,v),type:t+(r.__dir__<0?"Right":"")}),r},Gn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),Oe(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Gn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:co(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),Oe(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Gn.prototype[t]=function(){return this[n](1).value()[0]}})),Oe(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Gn.prototype[t]=function(){return this.__filtered__?new Gn(this):this[n](1)}})),Gn.prototype.compact=function(){return this.filter(iu)},Gn.prototype.find=function(t){return this.filter(t).head()},Gn.prototype.findLast=function(t){return this.reverse().find(t)},Gn.prototype.invokeMap=Kr((function(t,e){return"function"==typeof t?new Gn(this):this.map((function(n){return Fr(n,t,e)}))})),Gn.prototype.reject=function(t){return this.filter(Ba(co(t)))},Gn.prototype.slice=function(t,e){t=gs(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Gn(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==i&&(n=(e=gs(e))<0?n.dropRight(-e):n.take(e-t)),n)},Gn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Gn.prototype.toArray=function(){return this.take(v)},wr(Gn.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),o=qn[r?"take"+("last"==e?"Right":""):e],a=r||/^find/.test(e);o&&(qn.prototype[e]=function(){var e=this.__wrapped__,s=r?[1]:arguments,u=e instanceof Gn,c=s[0],l=u||Ga(e),f=function(t){var e=o.apply(qn,Be([t],s));return r&&p?e[0]:e};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var p=this.__chain__,d=!!this.__actions__.length,h=a&&!p,g=u&&!d;if(!a&&l){e=g?e:new Gn(this);var v=t.apply(e,s);return v.__actions__.push({func:ha,args:[f],thisArg:i}),new Wn(v,p)}return h&&g?t.apply(this,s):(v=this.thru(f),h?r?v.value()[0]:v.value():v)})})),Oe(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Ft[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);qn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(Ga(i)?i:[],t)}return this[n]((function(n){return e.apply(Ga(n)?n:[],t)}))}})),wr(Gn.prototype,(function(t,e){var n=qn[e];if(n){var r=n.name+"";Bt.call(jn,r)||(jn[r]=[]),jn[r].push({name:e,func:n})}})),jn[qi(i,2).name]=[{name:"wrapper",func:i}],Gn.prototype.clone=function(){var t=new Gn(this.__wrapped__);return t.__actions__=Ti(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Ti(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Ti(this.__views__),t},Gn.prototype.reverse=function(){if(this.__filtered__){var t=new Gn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Gn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Ga(t),r=e<0,i=n?t.length:0,o=function(t,e,n){var r=-1,i=n.length;for(;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=Dn(e,t+a);break;case"takeRight":t=bn(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,s=o.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,f=l.length,p=0,d=Dn(u,this.__takeCount__);if(!n||!r&&i==u&&d==u)return gi(t,this.__actions__);var h=[];t:for(;u--&&p<d;){for(var g=-1,v=t[c+=e];++g<f;){var y=l[g],m=y.iteratee,b=y.type,D=m(v);if(2==b)v=D;else if(!D){if(1==b)continue t;break t}}h[p++]=v}return h},qn.prototype.at=ga,qn.prototype.chain=function(){return da(this)},qn.prototype.commit=function(){return new Wn(this.value(),this.__chain__)},qn.prototype.next=function(){this.__values__===i&&(this.__values__=ds(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?i:this.__values__[this.__index__++]}},qn.prototype.plant=function(t){for(var e,n=this;n instanceof zn;){var r=Ho(n);r.__index__=0,r.__values__=i,e?o.__wrapped__=r:e=r;var o=r;n=n.__wrapped__}return o.__wrapped__=t,e},qn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Gn){var e=t;return this.__actions__.length&&(e=new Gn(this)),(e=e.reverse()).__actions__.push({func:ha,args:[ea],thisArg:i}),new Wn(e,this.__chain__)}return this.thru(ea)},qn.prototype.toJSON=qn.prototype.valueOf=qn.prototype.value=function(){return gi(this.__wrapped__,this.__actions__)},qn.prototype.first=qn.prototype.head,Qt&&(qn.prototype[Qt]=function(){return this}),qn}();ge._=mn,(r=function(){return mn}.call(e,n,e,t))===i||(t.exports=r)}.call(this)},938:(t,e)=>{"use strict";var n=Object.prototype.hasOwnProperty;function r(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(t){return null}}function i(t){try{return encodeURIComponent(t)}catch(t){return null}}e.stringify=function(t,e){e=e||"";var r,o,a=[];for(o in"string"!=typeof e&&(e="?"),t)if(n.call(t,o)){if((r=t[o])||null!=r&&!isNaN(r)||(r=""),o=i(o),r=i(r),null===o||null===r)continue;a.push(o+"="+r)}return a.length?e+a.join("&"):""},e.parse=function(t){for(var e,n=/([^=?#&]+)=?([^&]*)/g,i={};e=n.exec(t);){var o=r(e[1]),a=r(e[2]);null===o||null===a||o in i||(i[o]=a)}return i}},588:t=>{var e=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof y?e:y,a=Object.create(o.prototype),s=new T(r||[]);return i(a,"_invoke",{value:S(t,n,s)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var p="suspendedStart",d="suspendedYield",h="executing",g="completed",v={};function y(){}function m(){}function b(){}var D={};c(D,a,(function(){return this}));var w=Object.getPrototypeOf,x=w&&w(w(F([])));x&&x!==n&&r.call(x,a)&&(D=x);var E=b.prototype=y.prototype=Object.create(D);function A(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function n(i,o,a,s){var u=f(t[i],t,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function S(t,e,n){var r=p;return function(i,o){if(r===h)throw new Error("Generator is already running");if(r===g){if("throw"===i)throw o;return j()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=C(a,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===p)throw r=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var u=f(t,e,n);if("normal"===u.type){if(r=n.done?g:d,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=g,n.method="throw",n.arg=u.arg)}}}function C(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function F(t){if(t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}return{next:j}}function j(){return{value:e,done:!0}}return m.prototype=b,i(E,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:m,configurable:!0}),m.displayName=c(b,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,c(t,u,"GeneratorFunction")),t.prototype=Object.create(E),t},t.awrap=function(t){return{__await:t}},A(_.prototype),c(_.prototype,s,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new _(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},A(E),c(E,u,"Generator"),c(E,a,(function(){return this})),c(E,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=F,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;O(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:F(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},461:t=>{"use strict";t.exports=function(t,e){if(e=e.split(":")[0],!(t=+t))return!1;switch(e){case"http":case"ws":return 80!==t;case"https":case"wss":return 443!==t;case"ftp":return 21!==t;case"gopher":return 70!==t;case"file":return!1}return 0!==t}},283:(t,e,n)=>{"use strict";var r=n(158),i=n(271);t.exports=r.bind(null,i)},158:t=>{"use strict";function e(t){return t>=55296&&t<=56319}function n(t){return t>=56320&&t<=57343}t.exports=function(t,r,i){if("string"!=typeof r)throw new Error("Input must be string");for(var o,a,s=r.length,u=0,c=0;c<s;c+=1){if(o=r.charCodeAt(c),a=r[c],e(o)&&n(r.charCodeAt(c+1))&&(a+=r[c+=1]),(u+=t(a))===i)return r.slice(0,c+1);if(u>i)return r.slice(0,c-a.length+1)}return r}},137:(t,e,n)=>{"use strict";var r=n(461),i=n(938),o=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,a=/[\n\r\t]/g,s=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,u=/:\d+$/,c=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,l=/^[a-zA-Z]:/;function f(t){return(t||"").toString().replace(o,"")}var p=[["#","hash"],["?","query"],function(t,e){return g(e.protocol)?t.replace(/\\/g,"/"):t},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],d={hash:1,query:1};function h(t){var e,r=("undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}).location||{},i={},o=typeof(t=t||r);if("blob:"===t.protocol)i=new y(unescape(t.pathname),{});else if("string"===o)for(e in i=new y(t,{}),d)delete i[e];else if("object"===o){for(e in t)e in d||(i[e]=t[e]);void 0===i.slashes&&(i.slashes=s.test(t.href))}return i}function g(t){return"file:"===t||"ftp:"===t||"http:"===t||"https:"===t||"ws:"===t||"wss:"===t}function v(t,e){t=(t=f(t)).replace(a,""),e=e||{};var n,r=c.exec(t),i=r[1]?r[1].toLowerCase():"",o=!!r[2],s=!!r[3],u=0;return o?s?(n=r[2]+r[3]+r[4],u=r[2].length+r[3].length):(n=r[2]+r[4],u=r[2].length):s?(n=r[3]+r[4],u=r[3].length):n=r[4],"file:"===i?u>=2&&(n=n.slice(2)):g(i)?n=r[4]:i?o&&(n=n.slice(2)):u>=2&&g(e.protocol)&&(n=r[4]),{protocol:i,slashes:o||g(i),slashesCount:u,rest:n}}function y(t,e,n){if(t=(t=f(t)).replace(a,""),!(this instanceof y))return new y(t,e,n);var o,s,u,c,d,m,b=p.slice(),D=typeof e,w=this,x=0;for("object"!==D&&"string"!==D&&(n=e,e=null),n&&"function"!=typeof n&&(n=i.parse),o=!(s=v(t||"",e=h(e))).protocol&&!s.slashes,w.slashes=s.slashes||o&&e.slashes,w.protocol=s.protocol||e.protocol||"",t=s.rest,("file:"===s.protocol&&(2!==s.slashesCount||l.test(t))||!s.slashes&&(s.protocol||s.slashesCount<2||!g(w.protocol)))&&(b[3]=[/(.*)/,"pathname"]);x<b.length;x++)"function"!=typeof(c=b[x])?(u=c[0],m=c[1],u!=u?w[m]=t:"string"==typeof u?~(d="@"===u?t.lastIndexOf(u):t.indexOf(u))&&("number"==typeof c[2]?(w[m]=t.slice(0,d),t=t.slice(d+c[2])):(w[m]=t.slice(d),t=t.slice(0,d))):(d=u.exec(t))&&(w[m]=d[1],t=t.slice(0,d.index)),w[m]=w[m]||o&&c[3]&&e[m]||"",c[4]&&(w[m]=w[m].toLowerCase())):t=c(t,w);n&&(w.query=n(w.query)),o&&e.slashes&&"/"!==w.pathname.charAt(0)&&(""!==w.pathname||""!==e.pathname)&&(w.pathname=function(t,e){if(""===t)return e;for(var n=(e||"/").split("/").slice(0,-1).concat(t.split("/")),r=n.length,i=n[r-1],o=!1,a=0;r--;)"."===n[r]?n.splice(r,1):".."===n[r]?(n.splice(r,1),a++):a&&(0===r&&(o=!0),n.splice(r,1),a--);return o&&n.unshift(""),"."!==i&&".."!==i||n.push(""),n.join("/")}(w.pathname,e.pathname)),"/"!==w.pathname.charAt(0)&&g(w.protocol)&&(w.pathname="/"+w.pathname),r(w.port,w.protocol)||(w.host=w.hostname,w.port=""),w.username=w.password="",w.auth&&(~(d=w.auth.indexOf(":"))?(w.username=w.auth.slice(0,d),w.username=encodeURIComponent(decodeURIComponent(w.username)),w.password=w.auth.slice(d+1),w.password=encodeURIComponent(decodeURIComponent(w.password))):w.username=encodeURIComponent(decodeURIComponent(w.auth)),w.auth=w.password?w.username+":"+w.password:w.username),w.origin="file:"!==w.protocol&&g(w.protocol)&&w.host?w.protocol+"//"+w.host:"null",w.href=w.toString()}y.prototype={set:function(t,e,n){var o=this;switch(t){case"query":"string"==typeof e&&e.length&&(e=(n||i.parse)(e)),o[t]=e;break;case"port":o[t]=e,r(e,o.protocol)?e&&(o.host=o.hostname+":"+e):(o.host=o.hostname,o[t]="");break;case"hostname":o[t]=e,o.port&&(e+=":"+o.port),o.host=e;break;case"host":o[t]=e,u.test(e)?(e=e.split(":"),o.port=e.pop(),o.hostname=e.join(":")):(o.hostname=e,o.port="");break;case"protocol":o.protocol=e.toLowerCase(),o.slashes=!n;break;case"pathname":case"hash":if(e){var a="pathname"===t?"/":"#";o[t]=e.charAt(0)!==a?a+e:e}else o[t]=e;break;case"username":case"password":o[t]=encodeURIComponent(e);break;case"auth":var s=e.indexOf(":");~s?(o.username=e.slice(0,s),o.username=encodeURIComponent(decodeURIComponent(o.username)),o.password=e.slice(s+1),o.password=encodeURIComponent(decodeURIComponent(o.password))):o.username=encodeURIComponent(decodeURIComponent(e))}for(var c=0;c<p.length;c++){var l=p[c];l[4]&&(o[l[1]]=o[l[1]].toLowerCase())}return o.auth=o.password?o.username+":"+o.password:o.username,o.origin="file:"!==o.protocol&&g(o.protocol)&&o.host?o.protocol+"//"+o.host:"null",o.href=o.toString(),o},toString:function(t){t&&"function"==typeof t||(t=i.stringify);var e,n=this,r=n.host,o=n.protocol;o&&":"!==o.charAt(o.length-1)&&(o+=":");var a=o+(n.protocol&&n.slashes||g(n.protocol)?"//":"");return n.username?(a+=n.username,n.password&&(a+=":"+n.password),a+="@"):n.password?(a+=":"+n.password,a+="@"):"file:"!==n.protocol&&g(n.protocol)&&!r&&"/"!==n.pathname&&(a+="@"),(":"===r[r.length-1]||u.test(n.hostname)&&!n.port)&&(r+=":"),a+=r+n.pathname,(e="object"==typeof n.query?t(n.query):n.query)&&(a+="?"!==e.charAt(0)?"?"+e:e),n.hash&&(a+=n.hash),a}},y.extractProtocol=v,y.location=h,y.trimLeft=f,y.qs=i,t.exports=y},271:t=>{"use strict";function e(t){return t>=55296&&t<=56319}function n(t){return t>=56320&&t<=57343}t.exports=function(t){if("string"!=typeof t)throw new Error("Input must be string");for(var r=t.length,i=0,o=null,a=null,s=0;s<r;s++)n(o=t.charCodeAt(s))?null!=a&&e(a)?i+=1:i+=3:o<=127?i+=1:o>=128&&o<=2047?i+=2:o>=2048&&o<=65535&&(i+=3),a=o;return i}},580:(t,e,n)=>{"use strict";var r;n.r(e),n.d(e,{SaplingModule:()=>If});var i=new Uint8Array(16);function o(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}const a=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const s=function(t){return"string"==typeof t&&a.test(t)};for(var u=[],c=0;c<256;++c)u.push((c+256).toString(16).substr(1));const l=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(u[t[e+0]]+u[t[e+1]]+u[t[e+2]]+u[t[e+3]]+"-"+u[t[e+4]]+u[t[e+5]]+"-"+u[t[e+6]]+u[t[e+7]]+"-"+u[t[e+8]]+u[t[e+9]]+"-"+u[t[e+10]]+u[t[e+11]]+u[t[e+12]]+u[t[e+13]]+u[t[e+14]]+u[t[e+15]]).toLowerCase();if(!s(n))throw TypeError("Stringified UUID is invalid");return n};const f=function(t,e,n){var r=(t=t||{}).random||(t.rng||o)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(var i=0;i<16;++i)e[n+i]=r[i];return e}return l(r)},p="@font-face {\n font-family: 'icomoon';\n src: url(data:application/font-woff;base64,d09GRgABAAAAAAYkAAsAAAAABdgAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABCAAAAGAAAABgDxIM5GNtYXAAAAFoAAAAXAAAAFzwrfDAZ2FzcAAAAcQAAAAIAAAACAAAABBnbHlmAAABzAAAAggAAAIIgIUPmmhlYWQAAAPUAAAANgAAADYbiHinaGhlYQAABAwAAAAkAAAAJAe0A8hobXR4AAAEMAAAABwAAAAcESUAkmxvY2EAAARMAAAAEAAAABAA4AF0bWF4cAAABFwAAAAgAAAAIAAMAD9uYW1lAAAEfAAAAYYAAAGGmUoJ+3Bvc3QAAAYEAAAAIAAAACAAAwAAAAMDSQGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAA8HEDwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEAEAAAAAMAAgAAgAEAAEAIPAN8HH//f//AAAAAAAg8Azwcf/9//8AAf/jD/gPlQADAAEAAAAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAEUAUQO7AvgAJAAAARQGBwEOASMiJicBLgE1NDY/AT4BMzIWHwEBPgEzMhYfAR4BFQO7CAj+FAcVCgsVB/7jCAgICE4IFAsKFQioAXYIFQoLFAhOCAgCcwoVB/4UCAgICAEdBxULChUHTggICAioAXcICAgITgcVCwAAAQA/AD8C5gLmADwAACUUBg8BDgEjIiYvAQcOASMiJi8BLgE1NDY/AScuATU0Nj8BPgEzMhYfATc+ATMyFh8BHgEVFAYPARceARUC5gkHTggUCwsUCKioBxULChUHTggICAioqAgICAhOBxUKCxUHqKgIFAsLFAhOBwkJB6ioBwnDChUHTggICAioqAgICAhOBxUKCxUHqKgIFAsLFAhOBwkJB6ioBwkJB04IFAsLFAioqAcVCwAAAAQADv/AA/IDwAADABUAIQAvAAAJASEBNSIGBwEGFjMhMjYnMQEuASMxExQGIyImNTQ2MzIWJyImPQE0NjMyFh0BFAYCAAGt/KYBrREfDf5LGSUzA2YzJRn+Sw0fEUAlGxslJRsbJUAbJSUbGyUlA2P8qQNXXRYX/JksQEAsA2cXFvzAGyUlGxslJWUlG8AbJSUbwBslAAAAAQAAAAEAAKB25qVfDzz1AAsEAAAAAADcO5oVAAAAANw7mhUAAP/AA/IDwAAAAAgAAgAAAAAAAAABAAADwP/AAAAEAAAAAAAD8gABAAAAAAAAAAAAAAAAAAAABwQAAAAAAAAAAAAAAAIAAAAEAABFAyUAPwQAAA4AAAAAAAoAFAAeAFwAuAEEAAEAAAAHAD0ABAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAOAK4AAQAAAAAAAQAHAAAAAQAAAAAAAgAHAGAAAQAAAAAAAwAHADYAAQAAAAAABAAHAHUAAQAAAAAABQALABUAAQAAAAAABgAHAEsAAQAAAAAACgAaAIoAAwABBAkAAQAOAAcAAwABBAkAAgAOAGcAAwABBAkAAwAOAD0AAwABBAkABAAOAHwAAwABBAkABQAWACAAAwABBAkABgAOAFIAAwABBAkACgA0AKRpY29tb29uAGkAYwBvAG0AbwBvAG5WZXJzaW9uIDEuMABWAGUAcgBzAGkAbwBuACAAMQAuADBpY29tb29uAGkAYwBvAG0AbwBvAG5pY29tb29uAGkAYwBvAG0AbwBvAG5SZWd1bGFyAFIAZQBnAHUAbABhAHJpY29tb29uAGkAYwBvAG0AbwBvAG5Gb250IGdlbmVyYXRlZCBieSBJY29Nb29uLgBGAG8AbgB0ACAAZwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABJAGMAbwBNAG8AbwBuAC4AAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA);\n font-weight: normal;\n font-style: normal;\n}\n\n/* need icon-sapling- because sites like trello use icomoon too */\n[class^=\"icon-sapling-\"], [class*=\" icon-sapling-\"] {\n /* use !important to prevent issues with browser extensions that change fonts */\n font-family: 'icomoon' !important;\n speak: none;\n font-style: normal;\n font-weight: normal;\n font-variant: normal;\n text-transform: none;\n line-height: 1;\n\n /* Better Font Rendering =========== */\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.icon-sapling-accept:before {\n font-family: 'icomoon' !important;\n content: \"\\f00c\";\n}\n.icon-sapling-close:before {\n font-family: 'icomoon' !important;\n content: \"\\f00d\";\n}\n.icon-sapling-remove:before {\n font-family: 'icomoon' !important;\n content: \"\\f00d\";\n}\n.icon-sapling-reject:before {\n font-family: 'icomoon' !important;\n content: \"\\f00d\";\n}\n";var d=n(137),h={SENTRY_DSN:"https://c1aab70fab174e668864c166c00749ac@o137760.ingest.sentry.io/4504958473404416",WEBSITE_URL:"https://sapling.ai",API_URL:"https://api.sapling.ai",WEBSITE_HOSTNAME:new d("https://sapling.ai").hostname,API_HOSTNAME:new d("https://api.sapling.ai").hostname,MODE:"SDK",AI_DETECT_ANYWHERE_EXTENSION:!1,CONTROL_ELEMENT:"sapling-controls-sdk"},g=n(137),v="",y="";function m(){return v}function b(){return y}var D=n(283),w=n.n(D),x=n(934),E=n.n(x),A=n(563),S=E()();function C(t){return" ".repeat(t.length)}function k(t){return t.replace(/\u00A0/g," ").replace(/\u200B/g," ").replace(/\u00A9/g," ").replace(/\u00AE/g," ").replace(/ /g," ").replace(S,C)}function O(t){return"scroll"===A(t).css("overflow-y")||"auto"===A(t).css("overflow-y")||A(t).is("textarea")||U(t)}function T(t){var e=[];e.push(t);for(var n=A(t).parentsUntil("body"),r=0;r<n.length;r+=1){var i=n[r];O(i)&&e.push(i)}return e}function F(t){for(var e=t,n=A(t).parentsUntil("body"),r=t.clientHeight,i=t.clientWidth,o=0;o<n.length;o+=1){var a=n[o],s=a.clientWidth,u=a.clientHeight;if(0!==s&&0!==u)if((u<r||s<i)&&(r=u,i=s,e=a),"absolute"===window.getComputedStyle(a).position)break}return e}function j(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=t;if(r.firstChild&&n)return r.firstChild;if(r.nextSibling)return r.nextSibling;for(var i=r.parentNode;null===e||i!==e;){if(i.nextSibling)return i.nextSibling;i=i.parentNode}return null}function L(t){return!!t.tagName&&["script","style","xml"].includes(t.tagName.toLowerCase())}function I(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];if(e>n)return null;for(var a=t,s=e;null!==a;){if(i&&A(a).is("br")){if(n===s)return{domElement:a,indexSum:s,domOffset:s}}else if(a.nodeType===Node.TEXT_NODE){var u=a.data.length,c=n-s;if(c<u||o&&c===u)return{domElement:a,domOffset:c,indexSum:s};s+=u}a=j(a,r,!L(a))}return null}function N(t,e,n){for(var r=t,i=0;null!==r;){if(r===e)return i+n;r.nodeType===Node.TEXT_NODE&&(i+=r.data.length),r=j(r,t,!L(r))}return null}function B(t,e){if(!e)return null;var n=N(t,e.startContainer,e.startOffset),r=N(t,e.endContainer,e.endOffset);return null===n||null===r?null:[n,r]}function R(t){var e=getComputedStyle(t).position,n=t.getBoundingClientRect(),r={position:e,left:n.left,top:n.top,height:n.height,width:n.width};"static"!==e&&"relative"!==e||(r.position="absolute");var i=m();(i.endsWith("messenger.com")||i.endsWith("twitter.com")||i.endsWith("workplaceoptions.com"))&&(r.left-=1);var o=function(t){for(var e=t.parentElement;null!==e;){if("static"!==getComputedStyle(e).position)return e;e=e.parentElement}return null}(t);if(o){var a=o.getBoundingClientRect();r.left-=a.left-(o.scrollLeft||0),r.top-=a.top-(o.scrollTop||0)}else{var s=t.ownerDocument,u=s.defaultView||s.parentWindow,c=u.pageXOffset,l=u.pageYOffset;void 0!==c&&(r.top+=l),void 0!==l&&(r.top+=c)}return{frameDimensions:r,nonstaticParent:o}}function P(t){return!m().includes("gladly.")&&("true"===t.getAttribute("data-slate-editor")||A("[data-slate-leaf]",t).length>0)}function M(t){var e=t.tagName.toLowerCase();return("input"===e||"lightning-input-field"===e)&&"text"===t.getAttribute("type").toLowerCase()}function H(t){return A(t).attr("sapling-id")||A(t).data("sapling-id")}function q(t,e){return e||(e=f()),A(t).attr("sapling-id",e),A(t).data("sapling-id",e),e}function U(t){return A(t).attr("sapling-textarea-id")||A(t).data("sapling-textarea-id")}function z(t,e){return e||(e=f()),A(t).attr("sapling-textarea-id",e),A(t).data("sapling-textarea-id",e),e}function W(t){try{var e=getComputedStyle(t).zIndex;return isNaN(e)?W(t.parentElement):parseInt(e)}catch(t){return 0}}function G(t){return t<0?"rgb(0,0,0)":(t<=50?(e=Math.floor(225*t/50),n=225):(e=225,n=Math.floor(225*(100-t)/50)),"rgb("+e+","+n+",0)");var e,n}var Y=n(563);function $(t){return!!t.shadowRoot}function V(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return"TEXTAREA"===t.tagName||e&&M(t)}function J(t){return t.isContentEditable&&"TEXTAREA"!==t.tagName}function X(t,e,n,r){for(var i,o=0;i=t[o];++o)e(i)&&r&&n.push(i),$(i)&&X(i.shadowRoot.querySelectorAll("*"),e,n,!0)}function K(t){var e=[];return X(document.querySelectorAll("*"),t,e,!1),e}function Q(t){if((t.ownerDocument||document).contains(t))return!0;var e=function(t){return K((function(e){return e.contains(t)}))}(t);return e.length>0}function Z(t){var e=t.path||t.composedPath&&t.composedPath();return e.length<1?t.target:e[0]}function tt(t){var e=null;if(t.hasFocus&&t.hasFocus())for(e=t.activeElement;$(e);)e=e.shadowRoot.activeElement;return e}var et=n(563);function nt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return rt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rt(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var it={},ot={},at={},st=[],ut=[];function ct(t){ut.push(t)}function lt(t){st.push(t)}function ft(t,e,n,r,i){var o=n?ot:it,a={};t in o&&(a=o[t]),"domElement"in a||(a.domElement=e);var s=[];r in a&&(s=a[r]),s.push(i),a[r]=s,o[t]=a}function pt(t,e){var n=e?ot:it;if(t in n){var r=n[t];"intervals"in r&&r.intervals.forEach((function(t){clearInterval(t)})),"eventListeners"in r&&r.eventListeners.forEach((function(t){t.element.removeEventListener(t.event,t.handler,t.options)})),"jqueryObservers"in r&&r.jqueryObservers.forEach((function(t){et(t).off()})),"resizeObservers"in r&&r.resizeObservers.forEach((function(t){t.observer.unobserve(t.container)})),"mutationObservers"in r&&r.mutationObservers.forEach((function(t){t.disconnect()})),delete n[t]}}function dt(){st.forEach((function(t){t.disconnect()})),st=[],ut.forEach((function(t){t.element.removeEventListener(t.event,t.handler,t.options)})),ut=[],Object.keys(it).forEach((function(t){pt(t,!1)})),Object.keys(ot).forEach((function(t){pt(t,!0)})),function(){for(var t=0,e=Object.entries(at);t<e.length;t++){var n=nt(e[t],2);(r=(n[0],n[1]))&&(r.shadowHost&&r.shadowHost.remove(),r.badge&&r.badge.removeUIElements(),r.annotationsOverlay&&r.annotationsOverlay.removeUIElements())}var r}()}function ht(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;try{var i={};i.action=t,i.data=e,Je(i,(function(t){t&&t.status?(n&&t.success&&n(t.data),r&&!t.success&&r(t.data)):r&&r({message:"Error contacting background script."})}),r)}catch(e){"makeToolbarIconInactive"!==t&&dt()}}var gt=n(563);function vt(t){return vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vt(t)}function yt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function mt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?yt(Object(n),!0).forEach((function(e){bt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):yt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function bt(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==vt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==vt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===vt(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Dt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e={language:Le(),browserLanguage:window.navigator.language,hostname:m(),pathname:b(),frame_hostname:window.location.hostname,frame_pathname:window.location.pathname};if(t){var n=gt("[sapling-id=".concat(t,"]")).attr("id");e.is_sapling_textbox="sapling-embedded-editable"===n,e.is_enabled=e.is_enabled||e.is_sapling_textbox}return e}function wt(t,e,n,r,i,o){ht("request/GET_AI_DETECTION_SCORES",{html:w()(t,8e3),sessionId:n,context:mt(mt({},Dt()),r)},i,o)}function xt(t,e,n,r,i,o,a){ht("request/POST_TONE_FEEDBACK",{html:w()(t,5e4),toneData:e,textType:n,score:r,sessionId:i,context:Dt()},o,a)}function Et(t,e){ht("request/SEND_EVENT",{context:mt(mt({},Dt(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null)),e),eventAction:t})}function At(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];ht("request/POST_EDIT",{editHash:t,context:mt(mt({},Dt(n)),r),action:i?"hover":e?"accept":"reject",sessionId:n})}function _t(t){ht("request/POST_CHAT_EVENT",{context:t})}function St(t){ht("request/POST_CHAT_TURN",{context:t})}function Ct(t,e,n,r){ht("request/SELECT_SNIPPET",{snippetId:t,mode:e,context:Dt(),queryTerms:n,queryCount:r})}var kt=n(563),Ot=null,Tt=null,Ft=null,jt=null,Lt=null,It=null,Nt=null,Bt="en",Rt=!0,Pt=!0,Mt=!1,Ht=!0,qt=!1,Ut=!0,zt="free",Wt=null,Gt=null,Yt=null,$t=null,Vt=null,Jt=null,Xt="\\",Kt=!1,Qt=!1,Zt=!1,te=!1,ee=!1,ne=["en","zh","de","es","fr","he","it","jp","ja","ko","pt","ar","nl","pl","ru","sv","tl","no","hi","cs","da","el","et","fa","fi","hr","hu","id","lt","lv","ro","sk","sl","sr","th","tr","uk","vi"];function re(t,e,n,r,i,o,a){var s=m(),u="crioenabled".concat(s),c="completeEnabled-".concat(s),l="badgeEnabled-".concat(s),f="toneEnabled-".concat(s),p="aiDetectEnabled-".concat(s),d="rephraseEnabled-".concat(s),h="advancedEditsEnabled-".concat(s),g={};g[u]=t,g[c]=e,g[l]=n,g[f]=r,g[p]=i,g[d]=o,g[h]=a;var v,y,b;Ve(g),v=t,y=e,ht("request/POST_SETTINGS",{context:b=Dt(),settings:[{hostname:b.hostname,enabled:v,completeEnabled:y}]})}function ie(t){return new Promise((function(e){!function(t,e,n){ht("request/GET_USER",{ignoreCache:t},e,n)}(t,(function(t){oe(t),e()}),(function(){e()}))}))}function oe(t){Rt=t.is_anonymous,Pt=t.email_confirmed,Mt=t.suggest,Jt=t.shortcuts.complete,Xt=t.shortcuts.snippet,Ht=t.snippets,qt=t.annotations,Ut=t.power_button,Bt=t.lang,Object.hasOwn(t,"popup_editor")&&t.popup_editor,Object.hasOwn(t,"check_inputs")&&(Kt=t.check_inputs),Object.hasOwn(t,"rephrase")&&(Qt=t.rephrase),Object.hasOwn(t,"tone")&&(Zt=t.tone),Object.hasOwn(t,"ai_detect")&&(te=t.ai_detect),Object.hasOwn(t,"multiFillin")&&(ee=t.multiFillin);var e=t.subscription;e&&(zt=e.tier,Wt=e.end_datetime),!0}function ae(){return Rt}function se(){return Pt}function ue(){return"free"!==zt}function ce(){return zt}function le(){return Mt}function fe(){return Ht}function pe(){return"SDK"===h.MODE?Sapling.advancedEdits.advanced_edits:qt}function de(){return Jt}function he(){return Xt}function ge(){if(!Wt)return Wt;var t=new Date,e=new Date(Wt);if(e.getTime()-t.getTime()<0)return null;var n=Math.round(Math.abs((e.getTime()-t.getTime())/864e5));return Math.max(n,1)}function ve(t){var e=t.tagName.toLowerCase();return!!("textarea"===e||"lightning-textarea"===e||Kt&&M(t))}function ye(){return!1!==$t}function me(){return"SDK"===h.MODE||(null!==Yt?Yt:!(!ue()||!0!==Ot)||!1!==Ot&&ye())}function be(){return"SDK"===h.MODE||(null!==Yt?Yt:!(!ue()||!0!==Nt)||!1!==Nt&&ye())}function De(t){return"SDK"===h.MODE||!!me()&&("true"!==kt(t).attr("sapling-ignore")&&("To"!==kt(t).attr("aria-label")&&"Cc"!==kt(t).attr("aria-label")&&"Bcc"!==kt(t).attr("aria-label")&&(!m().includes("github.com")||"false"!==kt(t).attr("spellcheck"))))}function we(){return"SDK"===h.MODE?Sapling.autocomplete:!!m().includes("sapling.ai")||(null!==Yt?Yt:!(!ue()||!1===Tt))}function xe(t){return!!we()&&(("SDK"===h.MODE||"true"!==kt(t).attr("sapling-ignore"))&&("off"!==kt(t).attr("autocomplete")&&"false"!==kt(t).attr("autocomplete")))}function Ee(){return null!==Gt?Gt:!(ye()||me()||we()||ue())}function Ae(){return _e()&&Qt}function _e(){return!1!==It}function Se(){return"SDK"===h.MODE||Ie()&&te&&Ce()}function Ce(){return"SDK"!==h.MODE&&!1!==Lt}function ke(){return"SDK"===h.MODE?Sapling.toneEnabled:Oe()&&Ie()&&Zt}function Oe(){return"SDK"!==h.MODE&&!1!==jt}function Te(){return"SDK"===h.MODE?Sapling.statusBadge:!1!==Ft&&!0!==Vt}function Fe(){return"SDK"===h.MODE||Kt}function je(t){ne.includes(t)&&(Bt=t),function(t){ht("request/POST_SETTINGS",{context:Dt(),settings:[{lang:t}]})}(Bt)}function Le(){return Bt}function Ie(){return!ae()&&(!!se()&&!!ue())}var Ne=n(563);function Be(t){return Be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Be(t)}function Re(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Pe(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Re(Object(n),!0).forEach((function(e){Me(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Re(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Me(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==Be(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Be(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Be(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var He=null;function qe(t){var e=t.sentence.substring(t.start,t.end),n={offset:t.start+t.sentence_start,text:e},r={offset:t.end+t.sentence_start,text:e},i=t;return i.replacement_text=t.replacement,i.original_text=e,i.start=n,i.end=r,i.replacement_text=t.replacement,"Advanced Edit"===t.general_error_type&&(i.category=t.error_type),i}function Ue(t){var e=t.type,n=t.url,r=t.contentType,i=t.dataType,o=t.data,a=t.xhrFields,s=t.success,u=t.error,c=Date.now();Ne.ajax({type:e,url:n,contentType:r||"application/json",dataType:i||"json",data:o,xhrFields:a||{},success:s||function(){},error:u||function(){},complete:function(t){return function(t){var e=t.startTime,n=t.status,r=t.url;if(!Sapling.telemetryEndpoint)return;var i={status:n,latency:Date.now()-e,url:r};try{Ne.ajax({type:"post",url:Sapling.telemetryEndpoint,contentType:"application/json",dataType:"json",data:JSON.stringify(i)})}catch(t){}}({startTime:c,status:t.status,url:n,data:o})}})}function ze(t){if(Sapling.key){var e={version:"TODO",source:"SDK"};e.hostname=m(),e.pathname=b();var n={name:t,key:Sapling.key,event_properties:e},r="".concat(Sapling.endpointHostname).concat(Sapling.saplingPathPrefix,"/api/v1/events");try{Ue({type:"post",url:r,contentType:"application/json",dataType:"json",data:JSON.stringify(n)})}catch(t){}}}function We(t,e,n,r){var i,o=m(),a="".concat(Sapling.endpointHostname).concat(Sapling.saplingPathPrefix).concat(Sapling.editPathname);i=!!(Sapling.freemium||o===h.WEBSITE_HOSTNAME&&Sapling.editPathname.endsWith("edits_nk"));var s={key:Sapling.key,session_id:Sapling.sessionId,user_id:Sapling.userId,is_anon_user:Sapling.isAnonUser,text:t,noformat:!0,lang:Sapling.lang,variety:Sapling.variety,advanced_edits:Sapling.advancedEdits,operations:Sapling.operations,freemium:Sapling.freemium,context:e};Sapling.appearance.compact||(s.sdk_extended=!0),Sapling.freemium&&Sapling.userPropertiesLoaded&&!Ie()&&delete s.advanced_edits,null!==Sapling.userData&&(s.userData=Sapling.userData),null!==Sapling.neuralSpellcheck&&(s.neural_spellcheck=Sapling.neuralSpellcheck),null!==Sapling.medical&&(s.medical=Sapling.medical),Ue({type:"post",url:a,contentType:"application/json",dataType:"json",data:JSON.stringify(s),xhrFields:{withCredentials:i},success:function(t){var e;e=t.edits&&t.edits[0]&&t.edits[0].error_type?function(t){for(var e=[],n=0;n<t.length;n++){var r=qe(t[n]);e.push(r)}return e}(t.edits):t,n({data:{edits:e},status:!0,success:!0})},error:function(t){r(t.responseJSON)}})}var Ge={"assets/sapling-176x176.svg":"https://sapling.ai/static/img/logos/sapling-176x176.svg","fa-chart-column-solid.svg":"https://sapling.ai/static/img/fa/fa-chart-column-solid.svg","assets/fa-spinner-solid.svg":"https://sapling.ai/static/img/fa/fa-spinner-solid.svg","assets/fa-chart-column-solid.svg":"https://sapling.ai/static/img/fa/fa-chart-column-solid.svg","assets/xmark-solid.svg":"https://sapling.ai/static/img/xmark-solid.svg","assets/spinner-solid.svg":"https://sapling.ai/static/img/spinner-solid.svg","assets/thumbs-up-regular.svg":"https://sapling.ai/static/img/thumbs-up-regular.svg","assets/thumbs-down-regular.svg":"https://sapling.ai/static/img/thumbs-down-regular.svg","assets/power.svg":"https://sapling.ai/static/img/power.svg"};function Ye(t){return"SDK"!==h.MODE?chrome.runtime.getURL(t):t in Ge?Ge[t]:t}function $e(){var t,e;"SDK"===h.MODE&&(Sapling.userToggle&&(t=Ge["assets/power.svg"],(e=document.createElement("link")).rel="preload",e.as="image",e.href=t,document.head.appendChild(e)))}function Ve(t){"SDK"!==h.MODE&&chrome.storage.sync.set(t)}function Je(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if("SDK"===h.MODE){var r=t.data,i=t.action,o=Pe(Pe({},{version:"TODO",source:"SDK"}),r.context);"request/GET_EDITS"===i?We(r.html,o,e,n):"request/GET_COMPLETION"===i?function(t,e,n,r){var i={query:t,context:e,session_id:Sapling.sessionId,user_id:Sapling.userId,is_anon_user:Sapling.isAnonUser,lang:"en",key:Sapling.key};Ue({type:"post",url:"".concat(Sapling.endpointHostname).concat(Sapling.saplingPathPrefix).concat(Sapling.completePathname),contentType:"application/json",dataType:"json",data:JSON.stringify(i),success:function(t){n({data:{completion:t},status:!0,success:!0})},error:function(t){r(t.responseJSON)}})}(r.query,o,e,n):"request/GET_SHORTCUT_SNIPPETS"===i&&Sapling.snippets?function(t,e){if(He)t({data:He,status:!0,success:!0});else{var n=(new Date).getTimezoneOffset();Ue({type:"get",url:"".concat(Sapling.endpointHostname).concat(Sapling.saplingPathPrefix,"/snippets/shortcut_snippets?timeZoneOffset=").concat(n),contentType:"application/json",xhrFields:{withCredentials:!0},success:function(e){He=e.snippets,t({data:He,status:!0,success:!0})},error:function(t){e(t.responseJSON)}})}}(e,n):"request/GET_STATISTICS"===i?function(t,e,n,r){var i={text:t,context:e,session_id:Sapling.sessionId,user_id:Sapling.userId,is_anon_user:Sapling.isAnonUser,key:Sapling.key};Ue({type:"post",url:"".concat(Sapling.endpointHostname).concat(Sapling.saplingPathPrefix).concat(Sapling.statisticsPathname),contentType:"application/json",dataType:"json",data:JSON.stringify(i),success:function(t){n({data:{statistics:t},status:!0,success:!0})},error:function(t){r(t.responseJSON)}})}(r.html,o,e,n):"request/POST_EDIT"===i?function(t,e,n){if("accept"===e||"reject"===e){var r={context:n,session_id:Sapling.sessionId,user_id:Sapling.userId,is_anon_user:Sapling.isAnonUser,key:Sapling.key};Ue({type:"post",url:"".concat(Sapling.endpointHostname).concat(Sapling.saplingPathPrefix,"/api/v1/edits/").concat(t,"/").concat(e),contentType:"application/json",dataType:"json",data:JSON.stringify(r)})}}(r.editHash,r.action,o):"request/GET_AI_DETECTION_SCORES"===i?function(t,e,n,r){var i={text:t,context:e,session_id:Sapling.sessionId,user_id:Sapling.userId,is_anon_user:Sapling.isAnonUser,lang:"en",key:Sapling.key};Ue({type:"post",url:"".concat(Sapling.endpointHostname).concat(Sapling.saplingPathPrefix).concat(Sapling.aiDetectPathname),contentType:"application/json",dataType:"json",data:JSON.stringify(i),success:function(t){n({data:{aidetect:t},status:!0,success:!0})},error:function(t){r(t.responseJSON)}})}(r.html,o,e,n):"request/GET_TONE"===i?function(t,e,n,r){var i={text:t,context:e,session_id:Sapling.sessionId,user_id:Sapling.userId,is_anon_user:Sapling.isAnonUser,lang:"en",key:Sapling.key};Ue({type:"post",url:"".concat(Sapling.endpointHostname).concat(Sapling.saplingPathPrefix).concat(Sapling.tonePathname),contentType:"application/json",dataType:"json",data:JSON.stringify(i),success:function(t){n({data:{tone:t},status:!0,success:!0})},error:function(t){r(t.responseJSON)}})}(r.html,o,e,n):"request/POST_TONE_FEEDBACK"===i?function(t,e,n,r,i,o,a){var s={html:t,text_type:n,tone_percentage:parseInt(100*e[0]),tone_name:e[1],score:r,context:i,session_id:Sapling.sessionId,user_id:Sapling.userId,is_anon_user:Sapling.isAnonUser,lang:"en",key:Sapling.key};Ue({type:"post",url:"".concat(Sapling.endpointHostname).concat(Sapling.saplingPathPrefix).concat(Sapling.toneFeedbackPathname),contentType:"application/json",dataType:"json",data:JSON.stringify(s),success:function(t){o({data:{tone:t},status:!0,success:!0})},error:function(t){a(t.responseJSON)}})}(r.html,r.toneData,r.textType,r.score,o,e,n):"request/GET_USER"===i&&Ue({type:"get",url:"".concat(Sapling.endpointHostname).concat(Sapling.saplingPathPrefix,"/users/me"),contentType:"application/json",xhrFields:{withCredentials:!0},success:function(t){oe(t),Sapling.userPropertiesLoaded=!0},error:function(t){}})}else chrome.runtime.sendMessage(t,(function(t){chrome.runtime.lastError&&n&&n({message:chrome.runtime.lastError}),e&&e(t)}))}function Xe(t){return new Promise((function(e,n){Je(t,(function(t){e(t)}),(function(t){n(t)}))}))}function Ke(){try{return window.self!==window.top}catch(t){return!0}}function Qe(t,e){t.on("load",(function(){setTimeout(e,500)}));var n=t.get(0);try{n&&n.contentWindow&&"complete"===n.contentWindow.document.readyState&&setTimeout(e,500)}catch(t){setTimeout(e,500)}}function Ze(t){var e,n=t.ownerDocument;if((e=n.defaultView||n.parentWindow).self===e.top)return{x:0,y:0};for(var r=document.getElementsByTagName("iframe"),i=0;i<r.length;i++)if(r[i].contentWindow===e){var o=r[i].getBoundingClientRect();return{x:o.x,y:o.y}}return{x:0,y:0}}var tn=n(721),en=n(563),nn={};function rn(t){var e=U(t);nn[e]=nn[e]||{};var n=nn[e].overlayDomElement;if(n&&!Q(n)&&(n.remove(),n=null),!n){for(var r=t.nextSibling;r&&r.nodeType===Node.ELEMENT_NODE&&U(r);){var i=r;r=r.nextSibling,i.remove()}(n=document.createElement("div")).setAttribute("contenteditable",!0),"SDK"===h.MODE&&n.setAttribute("sapling-ignore",!0),z(n,e),en(t).after(n),nn[e].overlayDomElement=n,nn[e].textArea=t}var o=R(t).frameDimensions,a=o.width,s=o.height;if("content-box"===en(t).css("box-sizing")){var u=parseInt(en(t).css("padding-left"))||0,c=parseInt(en(t).css("padding-right"))||0,l=parseInt(en(t).css("padding-top"))||0,f=parseInt(en(t).css("padding-bottom"))||0;a=a-u-c-(parseInt(en(t).css("border-left-width"))||0)-(parseInt(en(t).css("border-right-width"))||0),s=s-l-f-(parseInt(en(t).css("border-top-width"))||0)-(parseInt(en(t).css("border-bottom-width"))||0)}var p=document.defaultView.getComputedStyle(t);return en(n).css({"z-index":p.getPropertyValue("z-index"),spellcheck:!1,"font-style":en(t).css("font-style"),"font-weight":en(t).css("font-weight"),"font-size":en(t).css("font-size"),"font-family":en(t).css("font-family"),"text-align":en(t).css("text-align"),"line-height":en(t).css("line-height"),"letter-spacing":en(t).css("letter-spacing"),"word-spacing":en(t).css("word-spacing"),color:"transparent",opacity:0,background:en(t).css("background"),"overflow-x":en(t).css("overflowX"),"overflow-y":en(t).css("overflowY"),"background-color":"transparent","white-space":en(t).css("whiteSpace"),"pointer-events":"none","border-top-width":en(t).css("border-top-width"),"border-top-style":en(t).css("border-top-style"),"border-top-color":"transparent","border-left-width":en(t).css("border-left-width"),"border-left-style":en(t).css("border-left-style"),"border-left-color":"transparent","box-sizing":en(t).css("boxSizing"),padding:en(t).css("padding"),"padding-top":en(t).css("padding-top"),"padding-left":en(t).css("padding-left"),overflow:en(t).css("overflow"),display:en(t).css("display"),position:o.position,left:o.left,top:o.top,height:s,width:a}),"input"===t.nodeName.toLowerCase()&&en(n).css({display:"flex","align-items":"center","white-space":"nowrap",overflow:"hidden","text-overflow":"clip"}),"linkedin.com"===m()&&en(t).css({"line-height":p.getPropertyValue("line-height")}),n}function on(t){return t in nn?nn[t].textArea:null}function an(t,e){if(t in nn){var n=nn[t].overlayDomElement,r=n.firstChild,i=n.textContent,o="".concat(e,"\n");if(i!==o)if(Math.abs(o.length-i.length)>250)n.textContent=o;else if(r&&r.nodeType===Node.TEXT_NODE)for(var a=(0,tn.diffChars)(i,o),s=0,u=0;u<a.length;u+=1){var c=a[u],l=c.value.length,f=n.textContent;if(c.added)r.insertData(s,c.value),s+=l;else{if(c.value!==f.substr(s,l)){n.textContent=o;break}c.removed?r.deleteData(s,l):s+=l}}else n.textContent=o}}function sn(t){if(t in nn){var e=nn[t],n=e.textArea,r=e.overlayDomElement;r.scrollTop=n.scrollTop,r.scrollLeft=n.scrollLeft,Ou(H(r))}}function un(t){if(t in nn){var e=nn[t],n=e.textArea,r=e.overlayDomElement,i=R(n).frameDimensions;en(r).css({left:i.left,top:i.top,height:i.height,width:i.width}),Ou(H(r))}}function cn(t){var e=U(t);e&&function(t){t in nn&&(nn[t].overlayDomElement.remove(),delete nn[t])}(e)}function ln(t){var e=window.getSelection();e.removeAllRanges(),e.addRange(t),window.getSelection().setBaseAndExtent(t.startContainer,t.startOffset,t.endContainer,t.endOffset)}function fn(t,e,n,r){t.focus();var i=t.value;t.selectionStart=e,t.selectionEnd=n;var o,a=i.slice(0,e)+r+i.slice(n),s=m();try{s.endsWith("overleaf.com")||document.execCommand("insertText",!1,r)}catch(t){}(o=t)&&o.parentElement&&o.parentElement.parentElement&&o.parentElement.parentElement.classList.contains("CodeMirror")||t.value!==a&&(t.value=a),t.selectionStart=e,t.selectionEnd=e,t.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!1})),document.body.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0,cancelable:!0}))}function pn(t,e,n,r){if(P(r))dn(t,e);else{ln(t),m().includes("gladly.")&&setTimeout((function(){ln(t)}),10);var i=new DataTransfer;i.setData("text/plain",e),n&&i.setData("text/html","<meta charset='utf-8'>".concat(n));var o=new InputEvent("beforeinput",{inputType:"insertFromPaste",dataTransfer:i,bubbles:!0,cancelable:!0,isComposing:!1}),a=r.innerText;setTimeout((function(){t.startContainer.dispatchEvent(o),o.defaultPrevented&&a!==r.innerText||(document.body.dataset.saplingSnippetInsert=!0,document.execCommand("paste"),delete document.body.dataset.saplingSnippetInsert)}),100),document.body.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0,cancelable:!0}))}}function dn(t,e){var n={inputType:"insertReplacementText",data:e,bubbles:!0,cancelable:!1};ln(t),setTimeout((function(){t.startContainer.dispatchEvent(new InputEvent("beforeinput",n))}),0)}function hn(t){var e=window.getSelection();if("function"==typeof e.setBaseAndExtent)e.setBaseAndExtent(t.endContainer,t.endOffset,t.endContainer,t.endOffset);else{var n=document.createRange();n.setStart(t.endContainer,t.endOffset),e.addRange(n)}}function gn(t,e,n){if(P(n))dn(t,e);else{var r=m();if(r.endsWith("facebook.com")||r.endsWith("messenger.com")||r.endsWith("whatsapp.com")||r.endsWith("workplace.com")||r.endsWith("instagram.com")||(i=n.getAttribute("class"))&&i.includes("DraftEditor"))!function(t,e){ln(t);var n={inputType:"insertText",data:e,bubbles:!0,cancelable:!1};ln(t),document.body.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0,cancelable:!0})),setTimeout((function(){var r=t.startContainer,i=t.startOffset,o=t.endContainer,a=t.endOffset;r===o?r.replaceData(i,a-i,e):(t.deleteContents(),r.insertData(i,e)),t.startContainer.dispatchEvent(new InputEvent("input",n)),document.body.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0,cancelable:!0}))}),50)}(t,e);else{var i,o=t.startContainer,a=t.startOffset,s=t.endContainer,u=t.endOffset,c=new StaticRange({startContainer:o,startOffset:a,endContainer:s,endOffset:u});ln(t);var l={inputType:"insertText",data:e,bubbles:!0,cancelable:!1,targetRanges:[c]};t.startContainer.dispatchEvent(new InputEvent("beforeinput",l)),hn(t),document.body.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0,cancelable:!0})),o===s?o.replaceData(a,u-a,e):(t.deleteContents(),o.insertData(a,e)),t.startContainer.dispatchEvent(new InputEvent("input",l)),document.body.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0,cancelable:!0})),(function(t){return A(t).is('[class*="PSPDFKit"]')}(n)||function(t){return A(t).is('[class*="mce-content-body"]')}(n))&&(n.blur(),n.focus())}}}var vn=n(563),yn=864e5;function mn(t,e,n,r,i,o,a,s){var u=arguments.length>8&&void 0!==arguments[8]&&arguments[8];if(!Ke()){var c,l=vn("sapling-popup-controls");0===l.length?((c=document.createElement("sapling-popup-controls")).attachShadow({mode:"open"}),vn("html").append(c)):(l.is(":last-child")||l.appendTo("html"),c=l[0]);var f=c.shadowRoot;vn(".sapling-tooltip-container",f)[0]?(vn(".sapling-tooltip-button-primary",f).off("mousedown"),vn(".sapling-tooltip-button-secondary",f).off("mousedown"),vn(".sapling-tooltip-container",f).off("blur")):function(t){vn(t).prepend(vn('\n<style type="text/css">\n\n.sapling-tooltip-container {\n position: absolute;\n z-index: 2147483647 !important;\n}\n\n.sapling-tooltip {\n position: absolute;\n padding: 10px;\n width: 220px;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n border: 1px solid #eee;\n border-radius: 5px;\n background-color: #FFF;\n box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);\n font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;\n}\n\n.sapling-tooltip-icon {\n margin-top: 5px;\n width: 30px;\n height: 30px;\n background-size: cover;\n background-image: url("'.concat(Ye("assets/sapling-176x176.svg"),'");\n background-repeat: no-repeat;\n}\n\n.sapling-tooltip-title {\n font-size: 16px;\n font-weight: 600;\n}\n\n.sapling-tooltip-body {\n font-size: 14px;\n line-height: 18px;\n}\n\n.sapling-tooltip-body{\n margin-top: 10px;\n text-align: center;\n}\n\n.sapling-tooltip-title {\n margin-top: 5px;\n text-align: center;\n}\n\n.sapling-tooltip-button-container {\n margin-top: 10px;\n display: flex;\n flex-direction: column;\n width: 100%;\n justify-content: center;\n align-items: center;\n}\n\n.sapling-tooltip-button {\n font-size: 16px;\n padding: 6px;\n margin: 5px;\n width: 140px;\n border-radius: 5px;\n display: flex;\n justify-content: center;\n align-items: center;\n text-align: center;\n color: #FFF;\n transition: all .15s ease;\n user-select: none;\n}\n\n.sapling-tooltip-button:hover {\n transform: translateY(-1px);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.32);\n}\n\n.sapling-tooltip-button:active {\n transform: translateY(0px);\n}\n\n.sapling-tooltip-button-primary {\n background-color: #3f51b5;\n}\n\n.sapling-tooltip-button-secondary {\n background-color: #999;\n}\n</style>'))),vn(t).append(vn('\n<div class="sapling-tooltip-container">\n <div class="sapling-tooltip">\n <div class="sapling-tooltip-icon"> </div>\n <div class="sapling-tooltip-title"></div>\n <div class="sapling-tooltip-body"></div>\n <div class="sapling-tooltip-button-container">\n <div class="sapling-tooltip-button sapling-tooltip-button-primary"></div>\n <div class="sapling-tooltip-button sapling-tooltip-button-secondary"></div>\n <div>\n </div>\n</div>'))}(f);var p=t.top,d=t.left,h=window.innerHeight+window.scrollY,g=window.innerWidth+window.scrollX;null!==p&&p+190>h&&(p=h-190,t.top=Math.max(p,0)),null!==d&&d+250>g&&(d=g-250,t.left=Math.max(d,0)),vn(".sapling-tooltip-container",f).css(t),e?vn(".sapling-tooltip-icon",f).show():vn(".sapling-tooltip-icon",f).hide(),vn(".sapling-tooltip-title",f).html(n),vn(".sapling-tooltip-body",f).html(r),vn(".sapling-tooltip-button-primary",f).text(i),o?vn(".sapling-tooltip-button-secondary",f).text(o):vn(".sapling-tooltip-button-secondary",f).hide(),u&&vn(".sapling-tooltip-container",f).attr("tabindex",-1).on("blur",(function(){vn(this).hide()})),vn(".sapling-tooltip-button-primary",f).on("mousedown",(function(t){1===t.which&&(t.preventDefault(),t.stopPropagation(),vn(".sapling-tooltip-container",f).hide(),a&&a())})),vn(".sapling-tooltip-button-secondary",f).on("mousedown",(function(t){1===t.which&&(t.preventDefault(),t.stopPropagation(),vn(".sapling-tooltip-container",f).hide(),s&&s())})),u?vn(".sapling-tooltip-container",f).show().focus():vn(".sapling-tooltip-container",f).show()}}function bn(){var t,e;ae()&&(t=["ToolTipLogin"],e=function(t){var e=(new Date).getTime(),n=e-yn;(!t.ToolTipLogin||t.ToolTipLogin<n)&&mn({right:8,bottom:8,top:"",left:""},!0,"Are you signed in?","For full access to Sapling, make sure you are on your team's enterprise plan.","Sign in","Cancel",(function(){var t="".concat(h.WEBSITE_URL,"/user/sign-in");window.open(t),Ve({ToolTipLogin:e})}),(function(){Ve({ToolTipLogin:e})}))},"SDK"!==h.MODE&&chrome.storage.sync.get(t,e))}var Dn=n(458);function wn(){const t=Dn.n2,e=t.crypto||t.msCrypto;if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");const n=e&&e.getRandomValues?()=>e.getRandomValues(new Uint8Array(1))[0]:()=>16*Math.random();return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(t=>(t^(15&n())>>t/4).toString(16)))}var xn=n(312);const En="Sentry Logger ",An=["debug","info","warn","error","log","assert","trace"];function _n(t){if(!("console"in Dn.n2))return t();const e=Dn.n2.console,n={};An.forEach((t=>{const r=e[t]&&e[t].__sentry_original__;t in e&&r&&(n[t]=e[t],e[t]=r)}));try{return t()}finally{Object.keys(n).forEach((t=>{e[t]=n[t]}))}}function Sn(){let t=!1;const e={enable:()=>{t=!0},disable:()=>{t=!1}};return"undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?An.forEach((n=>{e[n]=(...e)=>{t&&_n((()=>{Dn.n2.console[n](`${En}[${n}]:`,...e)}))}})):An.forEach((t=>{e[t]=()=>{}})),e}let Cn;Cn="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?(0,Dn.YO)("logger",Sn):Sn();const kn="production",On=Object.prototype.toString;function Tn(t,e){return On.call(t)===`[object ${e}]`}function Fn(t){return Tn(t,"Object")}function jn(t){return Boolean(t&&t.then&&"function"==typeof t.then)}var Ln;!function(t){t[t.PENDING=0]="PENDING";t[t.RESOLVED=1]="RESOLVED";t[t.REJECTED=2]="REJECTED"}(Ln||(Ln={}));class In{__init(){this._state=Ln.PENDING}__init2(){this._handlers=[]}constructor(t){In.prototype.__init.call(this),In.prototype.__init2.call(this),In.prototype.__init3.call(this),In.prototype.__init4.call(this),In.prototype.__init5.call(this),In.prototype.__init6.call(this);try{t(this._resolve,this._reject)}catch(t){this._reject(t)}}then(t,e){return new In(((n,r)=>{this._handlers.push([!1,e=>{if(t)try{n(t(e))}catch(t){r(t)}else n(e)},t=>{if(e)try{n(e(t))}catch(t){r(t)}else r(t)}]),this._executeHandlers()}))}catch(t){return this.then((t=>t),t)}finally(t){return new In(((e,n)=>{let r,i;return this.then((e=>{i=!1,r=e,t&&t()}),(e=>{i=!0,r=e,t&&t()})).then((()=>{i?n(r):e(r)}))}))}__init3(){this._resolve=t=>{this._setResult(Ln.RESOLVED,t)}}__init4(){this._reject=t=>{this._setResult(Ln.REJECTED,t)}}__init5(){this._setResult=(t,e)=>{this._state===Ln.PENDING&&(jn(e)?e.then(this._resolve,this._reject):(this._state=t,this._value=e,this._executeHandlers()))}}__init6(){this._executeHandlers=()=>{if(this._state===Ln.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach((t=>{t[0]||(this._state===Ln.RESOLVED&&t[1](this._value),this._state===Ln.REJECTED&&t[2](this._value),t[0]=!0)}))}}}function Nn(t){return Bn(t,new Map)}function Bn(t,e){if(Fn(t)){const n=e.get(t);if(void 0!==n)return n;const r={};e.set(t,r);for(const n of Object.keys(t))void 0!==t[n]&&(r[n]=Bn(t[n],e));return r}if(Array.isArray(t)){const n=e.get(t);if(void 0!==n)return n;const r=[];return e.set(t,r),t.forEach((t=>{r.push(Bn(t,e))})),r}return t}function Rn(t){const e=(0,xn.ph)(),n={sid:wn(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(t){return Nn({sid:`${t.sid}`,init:t.init,started:new Date(1e3*t.started).toISOString(),timestamp:new Date(1e3*t.timestamp).toISOString(),status:t.status,errors:t.errors,did:"number"==typeof t.did||"string"==typeof t.did?`${t.did}`:void 0,duration:t.duration,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}(n)};return t&&Pn(n,t),n}function Pn(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),t.did||e.did||(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||(0,xn.ph)(),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=32===e.sid.length?e.sid:wn()),void 0!==e.init&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),"number"==typeof e.started&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if("number"==typeof e.duration)t.duration=e.duration;else{const e=t.timestamp-t.started;t.duration=e>=0?e:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),"number"==typeof e.errors&&(t.errors=e.errors),e.status&&(t.status=e.status)}class Mn{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}static clone(t){const e=new Mn;return t&&(e._breadcrumbs=[...t._breadcrumbs],e._tags={...t._tags},e._extra={...t._extra},e._contexts={...t._contexts},e._user=t._user,e._level=t._level,e._span=t._span,e._session=t._session,e._transactionName=t._transactionName,e._fingerprint=t._fingerprint,e._eventProcessors=[...t._eventProcessors],e._requestSession=t._requestSession,e._attachments=[...t._attachments],e._sdkProcessingMetadata={...t._sdkProcessingMetadata}),e}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{},this._session&&Pn(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,e){return this._tags={...this._tags,[t]:e},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,e){return this._extra={...this._extra,[t]:e},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,e){return null===e?delete this._contexts[t]:this._contexts[t]=e,this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const t=this.getSpan();return t&&t.transaction}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;if("function"==typeof t){const e=t(this);return e instanceof Mn?e:this}return t instanceof Mn?(this._tags={...this._tags,...t._tags},this._extra={...this._extra,...t._extra},this._contexts={...this._contexts,...t._contexts},t._user&&Object.keys(t._user).length&&(this._user=t._user),t._level&&(this._level=t._level),t._fingerprint&&(this._fingerprint=t._fingerprint),t._requestSession&&(this._requestSession=t._requestSession)):Fn(t)&&(this._tags={...this._tags,...t.tags},this._extra={...this._extra,...t.extra},this._contexts={...this._contexts,...t.contexts},t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint),t.requestSession&&(this._requestSession=t.requestSession)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}addBreadcrumb(t,e){const n="number"==typeof e?e:100;if(n<=0)return this;const r={timestamp:(0,xn.yW)(),...t};return this._breadcrumbs=[...this._breadcrumbs,r].slice(-n),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(t,e={}){if(this._extra&&Object.keys(this._extra).length&&(t.extra={...this._extra,...t.extra}),this._tags&&Object.keys(this._tags).length&&(t.tags={...this._tags,...t.tags}),this._user&&Object.keys(this._user).length&&(t.user={...this._user,...t.user}),this._contexts&&Object.keys(this._contexts).length&&(t.contexts={...this._contexts,...t.contexts}),this._level&&(t.level=this._level),this._transactionName&&(t.transaction=this._transactionName),this._span){t.contexts={trace:this._span.getTraceContext(),...t.contexts};const e=this._span.transaction;if(e){t.sdkProcessingMetadata={dynamicSamplingContext:e.getDynamicSamplingContext(),...t.sdkProcessingMetadata};const n=e.name;n&&(t.tags={transaction:n,...t.tags})}}return this._applyFingerprint(t),t.breadcrumbs=[...t.breadcrumbs||[],...this._breadcrumbs],t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...this._sdkProcessingMetadata},this._notifyEventProcessors([...Hn(),...this._eventProcessors],t,e)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}_notifyEventProcessors(t,e,n,r=0){return new In(((i,o)=>{const a=t[r];if(null===e||"function"!=typeof a)i(e);else{const s=a({...e},n);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.id&&null===s&&Cn.log(`Event processor "${a.id}" dropped event`),jn(s)?s.then((e=>this._notifyEventProcessors(t,e,n,r+1).then(i))).then(null,o):this._notifyEventProcessors(t,s,n,r+1).then(i).then(null,o)}}))}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((t=>{t(this)})),this._notifyingListeners=!1)}_applyFingerprint(t){var e;t.fingerprint=t.fingerprint?(e=t.fingerprint,Array.isArray(e)?e:[e]):[],this._fingerprint&&(t.fingerprint=t.fingerprint.concat(this._fingerprint)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}}function Hn(){return(0,Dn.YO)("globalEventProcessors",(()=>[]))}const qn=4,Un=100;class zn{constructor(t,e=new Mn,n=qn){this._version=n,this._stack=[{scope:e}],t&&this.bindClient(t)}isOlderThan(t){return this._version<t}bindClient(t){this.getStackTop().client=t,t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){const t=Mn.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:t}),t}popScope(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}withScope(t){const e=this.pushScope();try{t(e)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(t,e){const n=this._lastEventId=e&&e.event_id?e.event_id:wn(),r=new Error("Sentry syntheticException");return this._withClient(((i,o)=>{i.captureException(t,{originalException:t,syntheticException:r,...e,event_id:n},o)})),n}captureMessage(t,e,n){const r=this._lastEventId=n&&n.event_id?n.event_id:wn(),i=new Error(t);return this._withClient(((o,a)=>{o.captureMessage(t,e,{originalException:t,syntheticException:i,...n,event_id:r},a)})),r}captureEvent(t,e){const n=e&&e.event_id?e.event_id:wn();return t.type||(this._lastEventId=n),this._withClient(((r,i)=>{r.captureEvent(t,{...e,event_id:n},i)})),n}lastEventId(){return this._lastEventId}addBreadcrumb(t,e){const{scope:n,client:r}=this.getStackTop();if(!r)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:o=Un}=r.getOptions&&r.getOptions()||{};if(o<=0)return;const a={timestamp:(0,xn.yW)(),...t},s=i?_n((()=>i(a,e))):a;null!==s&&(r.emit&&r.emit("beforeAddBreadcrumb",s,e),n.addBreadcrumb(s,o))}setUser(t){this.getScope().setUser(t)}setTags(t){this.getScope().setTags(t)}setExtras(t){this.getScope().setExtras(t)}setTag(t,e){this.getScope().setTag(t,e)}setExtra(t,e){this.getScope().setExtra(t,e)}setContext(t,e){this.getScope().setContext(t,e)}configureScope(t){const{scope:e,client:n}=this.getStackTop();n&&t(e)}run(t){const e=Gn(this);try{t(this)}finally{Gn(e)}}getIntegration(t){const e=this.getClient();if(!e)return null;try{return e.getIntegration(t)}catch(e){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Cn.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,e){const n=this._callExtensionMethod("startTransaction",t,e);return"undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){const t=this.getStackTop().scope,e=t.getSession();e&&function(t,e){let n={};e?n={status:e}:"ok"===t.status&&(n={status:"exited"}),Pn(t,n)}(e),this._sendSessionUpdate(),t.setSession()}startSession(t){const{scope:e,client:n}=this.getStackTop(),{release:r,environment:i=kn}=n&&n.getOptions()||{},{userAgent:o}=Dn.n2.navigator||{},a=Rn({release:r,environment:i,user:e.getUser(),...o&&{userAgent:o},...t}),s=e.getSession&&e.getSession();return s&&"ok"===s.status&&Pn(s,{status:"exited"}),this.endSession(),e.setSession(a),a}shouldSendDefaultPii(){const t=this.getClient(),e=t&&t.getOptions();return Boolean(e&&e.sendDefaultPii)}_sendSessionUpdate(){const{scope:t,client:e}=this.getStackTop(),n=t.getSession();n&&e&&e.captureSession&&e.captureSession(n)}_withClient(t){const{scope:e,client:n}=this.getStackTop();n&&t(n,e)}_callExtensionMethod(t,...e){const n=Wn().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[t])return n.extensions[t].apply(this,e);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Cn.warn(`Extension method ${t} couldn't be found, doing nothing.`)}}function Wn(){return Dn.n2.__SENTRY__=Dn.n2.__SENTRY__||{extensions:{},hub:void 0},Dn.n2}function Gn(t){const e=Wn(),n=Vn(e);return Jn(e,t),n}function Yn(t=Wn()){return $n(t)&&!Vn(t).isOlderThan(qn)||Jn(t,new zn),Vn(t)}function $n(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function Vn(t){return(0,Dn.YO)("hub",(()=>new zn),t)}function Jn(t,e){if(!t)return!1;return(t.__SENTRY__=t.__SENTRY__||{}).hub=e,!0}function Xn(t,e){return function(){const t=Wn();if(t.__SENTRY__&&t.__SENTRY__.acs){const e=t.__SENTRY__.acs.getCurrentHub();if(e)return e}return Yn(t)}().captureException(t,{captureContext:e})}function Kn(){if("chrome-extension:"===window.location.protocol){if("#saplingpopup"===window.location.hash)return!0}else{if("ms-browser-extension:"===window.location.protocol)return!0;if("moz-extension:"===window.location.protocol)return!0}return!1}var Qn=n(563);function Zn(){return Zn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=rr(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Zn.apply(this,arguments)}function tr(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&er(t,e)}function er(t,e){return er=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},er(t,e)}function nr(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=rr(t);if(e){var i=rr(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===ir(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function rr(t){return rr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},rr(t)}function ir(t){return ir="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ir(t)}function or(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ar(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(i=r.key,o=void 0,o=function(t,e){if("object"!==ir(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==ir(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===ir(o)?o:String(o)),r)}var i,o}function sr(t,e,n){return e&&ar(t.prototype,e),n&&ar(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var ur=function(){return"SDK"===h.MODE&&Sapling.customStyles&&Sapling.customStyles.badgeTooltipLeft?"tooltiptext-left":""},cr=function(){function t(e){or(this,t),this.elem=null,this.badgeDashboard=e}return sr(t,[{key:"shouldShow",value:function(){return!0}},{key:"refreshState",value:function(){this.shouldShow()?this.elem.show():this.elem.hide()}}]),t}(),lr=function(t){tr(n,t);var e=nr(n);function n(){return or(this,n),e.apply(this,arguments)}return sr(n,[{key:"getName",value:function(){return"SignInButton"}},{key:"shouldShow",value:function(){return"SDK"!==h.MODE&&ae()}},{key:"createElement",value:function(){return this.elem=Qn('<a target="_blank" href="'.concat(h.WEBSITE_URL,'/user/sign-in">\n <div class="sapling-dashboard-icon sapling-button-profile">\n <span class="tooltiptext ').concat(ur(),' caret-mid">Sign in</span>\n </div>\n </a>')),this.elem}}]),n}(cr),fr=function(t){tr(n,t);var e=nr(n);function n(){return or(this,n),e.apply(this,arguments)}return sr(n,[{key:"getName",value:function(){return"SearchSnippetButton"}},{key:"shouldShow",value:function(){return"SDK"!==h.MODE&&(!Kn()&&(!ae()&&fe()))}},{key:"createElement",value:function(){var t=this;return this.elem=Qn('<div class="sapling-dashboard-icon sapling-button-search">\n <span class="tooltiptext '.concat(ur(),' caret-mid">Search Snippets</span>\n </div>')),this.elem.on("mousedown",(function(e){if(1===e.which){e.preventDefault(),e.stopPropagation();var n=t.badgeDashboard.parentContainer,r=n,i=U(n);i&&(r=on(i)),r.focus(),Je({action:"snippet-control",data:{mode:"insert"}})}})),this.elem}}]),n}(cr),pr=function(t){tr(n,t);var e=nr(n);function n(){return or(this,n),e.apply(this,arguments)}return sr(n,[{key:"getName",value:function(){return"AddSnippetButton"}},{key:"shouldShow",value:function(){return"SDK"!==h.MODE&&(!ae()&&fe())}},{key:"createElement",value:function(){var t=this;return this.elem=Qn('<div class="sapling-dashboard-icon sapling-button-snippets">\n <span class="tooltiptext '.concat(ur(),' caret-mid">Add Snippet</span>\n </div>')),this.elem.on("mousedown",(function(e){if(1===e.which){e.preventDefault(),e.stopPropagation();var n=t.badgeDashboard.parentContainer.textContent;n=btoa(unescape(encodeURIComponent(n)));var r=Qn.param({preload:n}),i="".concat(h.WEBSITE_URL,"/snippets/new?").concat(r);window.open(i)}})),this.elem}}]),n}(cr),dr=function(t){tr(n,t);var e=nr(n);function n(){return or(this,n),e.apply(this,arguments)}return sr(n,[{key:"getName",value:function(){return"AddSuggestionButton"}},{key:"shouldShow",value:function(){return"SDK"!==h.MODE&&(!ae&&(!!ue()&&le()))}},{key:"createElement",value:function(){var t=this;return this.elem=Qn('<div class="sapling-dashboard-icon sapling-button-suggest">\n <span class="tooltiptext '.concat(ur(),' caret-mid">Add Suggestion</span>\n </div>')),this.elem.on("mousedown",(function(e){if(1===e.which){e.preventDefault(),e.stopPropagation();var n=Qn(t.badgeDashboard.parentContainer).text().trim();n=btoa(unescape(encodeURIComponent(n)));var r=Qn.param({preload:n}),i="".concat(h.WEBSITE_URL,"/suggest/new?").concat(r);window.open(i)}})),this.elem}}]),n}(cr),hr=function(t){tr(n,t);var e=nr(n);function n(){return or(this,n),e.apply(this,arguments)}return sr(n,[{key:"getName",value:function(){return"AnnotationsButton"}},{key:"shouldShow",value:function(){return"SDK"===h.MODE?pe():!Kn()&&(!ae()&&pe())}},{key:"updateIcon",value:function(){var t="Show Annotations";this.badgeDashboard.containerInfo&&this.badgeDashboard.containerInfo.annotationsOverlay&&this.badgeDashboard.containerInfo.annotationsOverlay.summaryAnnotations&&this.badgeDashboard.containerInfo.annotationsOverlay.summaryAnnotations.summaryVisible()&&(t="Hide Annotations"),Qn(this.elem).find(".tooltiptext").html(t)}},{key:"createElement",value:function(){var t=this;return this.elem=Qn('<div class="sapling-dashboard-icon sapling-button-annotations">\n <span class="tooltiptext '.concat(ur(),' caret-mid">Show Annotations</span>\n </div>')),this.elem.on("mousedown",(function(e){1===e.which&&(e.preventDefault(),e.stopPropagation(),t.badgeDashboard.containerInfo.annotationsOverlay.toggleSummaryAnnotations(),t.updateIcon())})),this.elem}}]),n}(cr),gr=function(t){tr(n,t);var e=nr(n);function n(){return or(this,n),e.apply(this,arguments)}return sr(n,[{key:"getName",value:function(){return"ToneButton"}},{key:"shouldShow",value:function(){return ke()}},{key:"updateIcon",value:function(){var t=this.badgeDashboard.containerInfo.toneOverlay;if(t){var e=t.getTopTone(),n="Show Tone";Qn(t.toneOverlay).is(".visible")?n="Hide Tone":e&&(Qn(this.elem).find(".top-tone-emoji").html(e[2]),n="".concat(e[1]," tone<br/>See More"),Qn(this.elem).css({backgroundSize:0})),Qn(this.elem).find(".tooltiptext").html(n)}}},{key:"createElement",value:function(){var t=this;return this.elem=Qn('<div class="sapling-dashboard-icon sapling-button-tone">\n <span class="top-tone-emoji">\u{1f610}</span>\n <span class="tooltiptext '.concat(ur(),' caret-mid">Show Tone</span>\n </div>')),this.elem.on("mousedown",(function(e){1===e.which&&(e.preventDefault(),e.stopPropagation(),t.badgeDashboard.containerInfo.toneOverlay&&t.badgeDashboard.containerInfo.toneOverlay.toggleVisibility(),t.updateIcon())})),this.elem}}]),n}(cr),vr=function(t){tr(n,t);var e=nr(n);function n(t){var r;return or(this,n),(r=e.call(this,t)).isThrottled=!1,r}return sr(n,[{key:"getName",value:function(){return"ThrottleButton"}},{key:"shouldShow",value:function(){return this.isThrottled}},{key:"createElement",value:function(){return this.elem=Qn('<a target="_blank" href="'.concat(h.WEBSITE_URL,'/usage-limits">\n <div class="sapling-dashboard-icon sapling-button-throttled">\n <span class="tooltiptext ').concat(ur(),' caret-mid">Usage limit exceeded</span>\n </div>\n </a>')),this.elem}}]),n}(cr),yr=[lr,fr,pr,dr,hr,vr,gr,function(t){tr(n,t);var e=nr(n);function n(){return or(this,n),e.apply(this,arguments)}return sr(n,[{key:"getName",value:function(){return"PowerButton"}},{key:"shouldShow",value:function(){return"SDK"===h.MODE?Sapling.userToggle:Ut}},{key:"refreshState",value:function(){var t,e=m(),r="off";"SDK"===h.MODE?Sapling.userToggleEnabled?(r="off",t="Disable grammar checking"):(r="on",t="Enable grammar checking"):t="Turn ".concat(r," Sapling for ").concat(e);var i=Qn(this.elem).find(".tooltiptext").html(i);i.text(t),Zn(rr(n.prototype),"refreshState",this).call(this)}},{key:"createElement",value:function(){var t=this,e=m();return this.elem=Qn('<div class="sapling-dashboard-icon sapling-button-power">\n <span class="tooltiptext '.concat(ur(),' caret-mid">Turn off Sapling for ').concat(e,"</span>\n </div>")),this.elem.on("mousedown",(function(e){if(1===e.which){e.preventDefault(),e.stopPropagation();var n,r,i,o,a,s,u=t.elem.offset();t.badgeDashboard.hide(),n=Sapling.userToggleEnabled,r=u.top-60,i=u.left-110,o="Sapling",a="Disable",s="Keep Enabled","SDK"===h.MODE&&(o="grammar checking"),n||(a="Enable",s="Keep Disabled"),mn({top:r,left:i,right:"",bottom:""},!1,"".concat(a," ").concat(o),"".concat(a," ").concat(o," on pages of site: <b>").concat(m(),"</b>?"),a,s,(function(){"SDK"===h.MODE?(Sapling.setUserToggleEnabled(!n),ze(n?"sdk-disable":"sdk-enable")):re(!n,!n)}),null,!0)}})),this.elem}}]),n}(cr)],mr=n(563);function br(t){return br="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},br(t)}function Dr(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return wr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wr(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function wr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function xr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(i=r.key,o=void 0,o=function(t,e){if("object"!==br(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==br(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===br(o)?o:String(o)),r)}var i,o}var Er=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.parentContainer=null,this.popupControls=null,this.popupControlsJq=null,this.shadowRoot=null,this.shadowRootJq=null,this.containerId=null,this.containerInfo=null,this.badgeDashContainer=null,this.badgeDash=null,this.buttons={}}var e,n,r;return e=t,(n=[{key:"createPopupContainer",value:function(){var t;this.popupControls||(0===mr("sapling-popup-controls").length?((t=document.createElement("sapling-popup-controls")).attachShadow({mode:"open"}),mr("html").append(t)):t=mr("sapling-popup-controls")[0],this.popupControls=t,this.popupControlsJq=mr(t),this.shadowRoot=t.shadowRoot,this.shadowRootJq=mr(this.shadowRoot))}},{key:"createDashboardContainer",value:function(){var t=this,e=this.popupControls.shadowRoot;if(!this.badgeDashContainer){var n=mr('\n<style type="text/css">\n\n.sapling-badge-dash-container {\n position: absolute;\n z-index: 2147483647 !important;\n}\n\n.sapling-badge-dash {\n position: relative;\n height: 34px;\n bottom: 2px;\n right: 2px;\n display: flex;\n flex-direction: row-reverse;\n align-items: center;\n padding-right: 5px;\n background-color: #FFFFFF;\n border-radius: 16px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.32);\n}\n\n.connectivity-error .sapling-badge-dash {\n background-color: #FFCCCC;\n}\n\n.sapling-dashboard-icon {\n width: 24px;\n height: 24px;\n background-color: #3f51b5;\n border-radius: 50%;\n margin-left: 5px;\n position: relative;\n transition: all .15s ease;\n}\n\n.sapling-dashboard-icon:hover {\n transform: translateY(-1px);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.32);\n}\n\n.sapling-button-count {\n position: absolute;\n width: 24px;\n height: 24px;\n color: #fff;\n font-weight: 600;\n font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;\n font-size: 12px;\n line-height: 24px;\n text-align: center;\n user-select: none;\n}\n\n.sapling-button-logo {\n position: absolute;\n width: 24px;\n height: 24px;\n background-size: cover;\n background-image: url("'.concat(Ye("assets/sapling-176x176.svg"),'");\n background-repeat: no-repeat;\n}\n\n.sapling-button-profile {\n background-size: 10px 10px;\n background-position: center center;\n background-image: url("').concat(Ye("assets/profile.svg"),'");\n background-repeat: no-repeat;\n cursor: pointer;\n}\n\n.sapling-button-snippets {\n background-size: 12px 12px;\n background-position: center center;\n background-image: url("').concat(Ye("assets/scissor.svg"),'");\n background-repeat: no-repeat;\n cursor: pointer;\n}\n\n.sapling-button-suggest {\n background-size: 12px 12px;\n background-position: center center;\n background-image: url("').concat(Ye("assets/chat-plus.svg"),'");\n background-repeat: no-repeat;\n cursor: pointer;\n}\n\n.sapling-button-search {\n background-size: 12px 12px;\n background-position: center center;\n background-image: url("').concat(Ye("assets/magnifying-glass.svg"),'");\n background-repeat: no-repeat;\n cursor: pointer;\n}\n\n.sapling-button-annotations {\n background-size: 12px 12px;\n background-position: center center;\n background-image: url("').concat(Ye("assets/fa-chart-column-solid.svg"),'");\n background-repeat: no-repeat;\n cursor: pointer;\n}\n\n.sapling-button-tone {\n background-size: 12px 12px;\n background-position: center center;\n background-image: url("').concat(Ye("assets/face-flushed-regular.svg"),'");\n background-repeat: no-repeat;\n cursor: pointer;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.sapling-button-tone:hover .tooltiptext {\n visibility: visible;\n width: 140px;\n margin-left: -77px;\n transition-delay: 400ms;\n}\n\n.sapling-button-tone .top-tone-emoji {\n font-size: 18px;\n margin-top: 2px;\n}\n\n.sapling-button-tone .tooltiptext {\n text-transform: capitalize;\n}\n\n.sapling-button-throttled {\n background-color: orange;\n background-size: 16px 16px;\n background-position: center center;\n background-image: url("').concat(Ye("assets/throttled.svg"),'");\n background-repeat: no-repeat;\n cursor: pointer;\n}\n\n.sapling-button-feedback {\n background-size: 13px 13px;\n background-position: center center;\n background-image: url("').concat(Ye("assets/feedback.svg"),'");\n background-repeat: no-repeat;\n cursor: pointer;\n}\n\n.sapling-button-power {\n background-size: 12px 12px;\n background-position: center center;\n background-image: url("').concat(Ye("assets/power.svg"),'");\n background-repeat: no-repeat;\n cursor: pointer;\n}\n\n.sapling-button-edit-count:hover .tooltiptext {\n visibility: visible;\n width: 80px;\n transition-delay: 400ms;\n}\n\n#tooltiptext-right {\n margin-left: -80px\n}\n\n.sapling-button-profile:hover .tooltiptext {\n visibility: visible;\n width: 60px;\n margin-left: -37px;\n transition-delay: 400ms;\n}\n\n.sapling-button-search:hover .tooltiptext {\n visibility: visible;\n width: 95px;\n\n margin-left: -55px;\n transition-delay: 400ms;\n}\n\n.sapling-button-snippets:hover .tooltiptext {\n visibility: visible;\n width: 80px;\n margin-left: -47px;\n transition-delay: 400ms;\n}\n\n.sapling-button-suggest:hover .tooltiptext {\n visibility: visible;\n width: 100px;\n margin-left: -57px;\n transition-delay: 400ms;\n}\n\n.sapling-button-annotations:hover .tooltiptext {\n visibility: visible;\n width: 140px;\n margin-left: -77px;\n transition-delay: 200ms;\n}\n\n.sapling-button-throttled:hover .tooltiptext {\n visibility: visible;\n width: 140px;\n margin-left: -77px;\n transition-delay: 200ms;\n}\n\n.sapling-button-feedback:hover .tooltiptext {\n visibility: visible;\n width: 140px;\n margin-left: -77px;\n transition-delay: 400ms;\n}\n\n.sapling-button-power:hover .tooltiptext {\n visibility: visible;\n width: 120px;\n margin-left: -67px;\n transition-delay: 400ms;\n}\n\n.tooltiptext {\n width: 0;\n visibility: hidden;\n font-size: 12px;\n font-family: \'Helvetica\', \'Arial\', sans-serif;\n background-color: black;\n color: #fff;\n text-align: center;\n padding: 7px;\n border-radius: 7px;\n user-select: none;\n pointer-events: none;\n\n position: absolute;\n z-index: 1;\n bottom: 120%;\n left: 50%;\n margin-top: -10px;\n z-index: 1;\n}\n\n.tooltiptext.tooltiptext-left {\n right: 0;\n left: auto;\n}\n\n.caret-right::after {\n content: " ";\n position: absolute;\n top: 100%;\n left: 85%;\n margin-left: -4px;\n border-width: 4px;\n border-style: solid;\n border-color: black transparent transparent transparent;\n}\n\n.caret-mid::after {\n content: " ";\n position: absolute;\n top: 100%;\n left: 50%;\n margin-left: -4px;\n border-width: 4px;\n border-style: solid;\n border-color: black transparent transparent transparent;\n}\n\n.tooltiptext-left.caret-mid::after {\n left: auto;\n right: 5%;\n}\n\n</style>'));mr(e).prepend(n),this.badgeDashContainer=mr('<div class="sapling-badge-dash-container" style="display: none;"></div>'),this.badgeDash=mr('<div class="sapling-badge-dash"></div>'),this.badgeDashContainer.append(this.badgeDash);var r,i=Dr(yr);try{for(i.s();!(r=i.n()).done;){var o=new(0,r.value)(this),a=o.createElement();this.badgeDash.append(a),this.buttons[o.getName()]=o,o.refreshState()}}catch(t){i.e(t)}finally{i.f()}this.badgeDash.hover(null,(function(){t.hide()})),this.shadowRootJq.append(this.badgeDashContainer)}}},{key:"createUIElements",value:function(){this.createPopupContainer(),this.createDashboardContainer()}},{key:"show",value:function(t,e,n,r){if(this.parentContainer=t,this.popupControlsJq.is(":last-child")||this.popupControlsJq.appendTo("html"),n!==this.containerId){this.containerId=n,this.containerInfo=r,this.badgeDashContainer.containerId=n;for(var i=!0,o=0,a=Object.values(this.buttons);o<a.length;o++){var s=a[o];s.refreshState(),s.shouldShow()&&(i=!1)}if(!i){var u=e.badge[0].getBoundingClientRect(),c=u.right+window.scrollX-this.badgeDashContainer.width()+6,l=u.bottom+window.scrollY-this.badgeDashContainer.height()+6;if("SDK"===h.MODE){var f=Ze(t);c+=f.x,l+=f.y}l=Math.max(l,20),c=Math.max(c,0),this.badgeDashContainer.css({left:c,top:l}),this.buttons.EditCountButton&&this.buttons.EditCountButton.setEditCount(e.editCount),this.buttons.ToneButton&&this.buttons.ToneButton.updateIcon(),this.buttons.AnnotationsButton&&this.buttons.AnnotationsButton.updateIcon(),this.badgeDashContainer.show()}}}},{key:"hide",value:function(){this.badgeDashContainer&&(this.badgeDashContainer.hide(),this.containerId=null)}}])&&xr(e.prototype,n),r&&xr(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Ar=n(563);function _r(t){return _r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_r(t)}function Sr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(i=r.key,o=void 0,o=function(t,e){if("object"!==_r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==_r(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===_r(o)?o:String(o)),r)}var i,o}var Cr=null,kr=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.showSpinner=this.regularShowSpinner,this.hideSpinner=this.regularHideSpinner,this.parentContainer=null,this.containerId=null,this.containerInfo=null,this.badgeShadowHost=null,this.badge=null,this.badgeSpinner=null,this.badgeContainer=null,this.hostname=m(),this.pathname=b(),this.editCount=0}var e,n,r;return e=t,(n=[{key:"firefoxShowSpinner",value:function(){this.isEnabled()&&(this.badge.hide(),this.badgeSpinner.show())}},{key:"firefoxHideSpinner",value:function(){this.isEnabled()&&(this.badge.show(),this.badgeSpinner.hide())}},{key:"regularShowSpinner",value:function(){this.isEnabled()&&(this.badge.stop().fadeOut(300),this.badgeSpinner.stop().fadeIn(300))}},{key:"regularHideSpinner",value:function(){this.isEnabled()&&(this.badge.stop().fadeIn(300),this.badgeSpinner.stop().fadeOut(300))}},{key:"createUIElements",value:function(t,e,n,r){if(this.isEnabled()&&(this.parentContainer=t,this.containerId=n,this.containerInfo=r,"outlook.live.com"===this.hostname?(this.badgeShadowHost&&!Q(this.badgeShadowHost)&&(this.badgeShadowHost.remove(),this.badgeShadowHost=null),this.badgeShadowHost||(this.badgeShadowHost=document.createElement("div"),this.badgeShadowHost.setAttribute("is-sapling-overlay",!0),this.badgeShadowHost.attachShadow({mode:"open"}),Ar(t.parentNode.parentNode).append(this.badgeShadowHost),Ar(this.badgeShadowHost).css({"pointer-events":"none",position:"sticky",bottom:"0px"}))):this.badgeShadowHost=e,!this.badgeContainer)){var i=this.badgeShadowHost.shadowRoot;Cr||(Cr=new Er).createUIElements();var o="2px";"outlook.live.com"===this.hostname&&(o="100px");var a=2,s=8,u=8,c="#3f51b5",l="#990000";if((Ar(t).height()<24||Ar(t).width()<140)&&(s=6,u=4,a=1),"SDK"===h.MODE){if(Sapling.appearance.customCSS){var f=Ar('<style type="text/css">'.concat(Sapling.appearance.customCSS,"</style>"));Ar(i).prepend(f)}Sapling.appearance.variables.badgeSize&&(s=Sapling.appearance.variables.badgeSize),Sapling.appearance.variables.badgeMargin&&(u=Sapling.appearance.variables.badgeMargin),Sapling.appearance.variables.badgeColor&&(c=Sapling.appearance.variables.badgeColor),Sapling.appearance.variables.badgeErrorColor&&(l=Sapling.appearance.variables.badgeErrorColor)}var p=Ar(function(t,e,n,r,i,o){return'\n<style type="text/css">\n.sapling-badge-container {\n position: absolute;\n bottom: '.concat(t,";\n right: 0px;\n font-family: 'Helvetica', 'Arial', sans-serif;\n}\n\n.sapling-status-container {\n position: absolute;\n bottom: ").concat(e,"px;\n right: ").concat(e,"px;\n}\n\n.sapling-badge {\n position: absolute;\n width: ").concat(n,"px;\n height: ").concat(n,"px;\n bottom: ").concat(r,"px;\n right: ").concat(r,"px;\n text-align: center;\n border-radius: 50%;\n}\n\n.errors {\n background-color: ").concat(o,";\n}\n\n.no-errors {\n background-color: ").concat(i,";\n}\n\n.connectivity-error .sapling-badge {\n background-color: ").concat(o,";\n}\n\n.throttled-error .sapling-badge {\n background-color: orange;\n}\n\n.sapling-badge-spinner {\n position: absolute;\n width: ").concat(n-4,"px;\n height: ").concat(n-4,"px;\n border: ").concat(Math.floor(n/4),"px solid ").concat(i,";\n bottom: ").concat(r,"px;\n right: ").concat(r,"px;\n border-top: ").concat(Math.floor(n/4),"px solid rgba(0,0,0,0);\n border-radius: 50%;\n animation: rotation 2s infinite linear;\n}\n\n.connectivity-error .sapling-badge-spinner {\n border: 2px solid ").concat(o,";\n border-top: 2px solid rgba(0,0,0,0);\n}\n\n.sapling-badge-hud {\n position: absolute;\n top: -22px;\n left: -42px;\n transition: all 0.25s;\n}\n\n.sapling-tone-hud {\n cursor: pointer;\n pointer-events: initial;\n display: flex;\n transition: all 0.25s;\n}\n\n@keyframes rotation {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n</style>")}(o,a,s,u,c,l));Ar(i).prepend(p),this.badgeContainer=Ar('<div class="sapling-badge-container"></div>');var d=Ar('<div class="sapling-status-container"></div>');this.badge=Ar('<div class="sapling-badge no-errors"></div>'),this.badgeSpinner=Ar('<div class="sapling-badge-spinner" style="display: none;"> </div>'),this.headsUpContainer=Ar('<div class="sapling-badge-hud" style=""></div>'),this.badgeContainer.append(d),d.append(this.headsUpContainer),d.append(this.badge),d.append(this.badgeSpinner),Ar(i).append(this.badgeContainer)}}},{key:"removeUIElements",value:function(){this.badgeShadowHost&&this.badgeShadowHost.remove()}},{key:"isEnabled",value:function(){return!!Te()&&!["notion.so","trello.com"].includes(this.hostname)&&!this.pathname.includes("wp-admin")}},{key:"updateBadgeCount",value:function(t){this.isEnabled()&&(0===t?(this.badge.removeClass("errors"),this.badge.addClass("no-errors")):(this.badge.removeClass("no-errors"),this.badge.addClass("errors")),this.badgeContainer&&(this.badgeContainer.removeClass("connectivity-error"),this.hideSpinner(),this.editCount=t,this.containerId===Cr.badgeDashContainer.containerId&&Cr.buttons.EditCountButton&&Cr.buttons.EditCountButton.setEditCount(t)))}},{key:"showErrorState",value:function(){this.badgeContainer&&this.badgeContainer.addClass("connectivity-error"),this.badgeDashboard&&this.badgeDashboard.buttons&&this.badgeDashboard.buttons.EditCountButton&&this.badgeDashboard.buttons.EditCountButton.setToolTipText("Check your internet and firewall settings.")}},{key:"showThrottledState",value:function(){this.hideSpinner(),this.badgeContainer.addClass("throttled-error"),Cr.buttons.ThrottleButton&&(Cr.buttons.ThrottleButton.isThrottled=!0,Cr.buttons.ThrottleButton.refreshState())}},{key:"showBadgeDashboard",value:function(){Cr.show(this.parentContainer,this,this.containerId,this.containerInfo)}}])&&Sr(e.prototype,n),r&&Sr(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Or(t,e){var n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset;return t.isPointInRange(n,r)&&t.isPointInRange(i,o)}function Tr(t,e){var n=e.endContainer,r=e.endOffset;return t.isPointInRange(n,r)}function Fr(t,e){var n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset;return t.isPointInRange(n,r)||t.isPointInRange(i,o)}function jr(t,e){return Fr(t,e)||Fr(e,t)}function Lr(t,e){return e<=(t.nodeType===Node.TEXT_NODE?t.length:t.childNodes.length)}function Ir(t){var e=t.startContainer,n=t.startOffset,r=t.endContainer,i=t.endOffset;return!!e&&!!r&&e.ownerDocument===r.ownerDocument&&Lr(e,n)&&Lr(r,i)}function Nr(t){return!!["TEXTAREA","INPUT"].includes(t.nodeName)||!!t.isContentEditable}function Br(){return!!["TEXTAREA","INPUT"].includes(document.activeElement.nodeName)||!!document.activeElement.isContentEditable}var Rr=n(563);function Pr(t){return Pr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pr(t)}function Mr(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Hr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Hr(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Hr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function qr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ur(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(i=r.key,o=void 0,o=function(t,e){if("object"!==Pr(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Pr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===Pr(o)?o:String(o)),r)}var i,o}function zr(t,e,n){return e&&Ur(t.prototype,e),n&&Ur(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var Wr=32,Gr=void 0===Gr?null:Gr,Yr=void 0===Yr?null:Yr;function $r(){if((!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&!Br())return!1;var t=getSelection();return t.rangeCount&&!t.isCollapsed&&t.getRangeAt(0)}var Vr=function(){function t(e){qr(this,t),this.shadowHost=e,this.rephraseButton=null,this.rephraseShortcut=null,this.rephraseSpinner=null,this.rephraseWand=null}return zr(t,[{key:"createUIElements",value:function(){var e=this;Ae()&&(this.rephraseButton||(Rr(this.shadowHost.shadowRoot).find(".sapling-rephrase-button").remove(),ht("request/GET_REPHRASE_SHORTCUT",{},(function(n){e.rephraseShortcut=n.shortcut,e.rephraseButton=Rr('\n <div class="sapling-rephrase-button">\n '.concat('<style type="text/css">\n .sapling-rephrase-button {\n z-index: 2147483646 !important;\n position: absolute;\n display: flex;\n width: '.concat(Wr,"px;\n height: ").concat(Wr,"px;\n margin: 0;\n padding: 0;\n justify-content: center;\n align-items: center;\n border-radius: ").concat(Wr/2,"px;\n background-color: #303f9f;\n box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);\n cursor: pointer;\n }\n .sapling-rephrase-button img {\n transform: scale(0.5);\n fill: #fff;\n }\n .sapling-rephrase-spinner {\n padding: 8px;\n animation-name: spin;\n animation-duration: 1500ms;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n }\n @keyframes spin {\n from {\n transform:rotate(0deg);\n }\n to {\n transform:rotate(360deg);\n }\n }\n</style>"),"\n ").concat("<style>/* From badge controls */\n.sapling-rephrase-button:hover .tooltiptext, .sapling-rephrase-type:hover .tooltiptext {\n display: block;\n transition-delay: 500ms;\n}\n.tooltiptext {\n z-index: 2147483647;\n display: none;\n\n width: 80px;\n\n position: absolute;\n bottom: 100%;\n left: 50%;\n\n margin-bottom: -3px;\n padding: 7px;\n\n font-size: 12px;\n font-family: 'Helvetica', 'Arial', sans-serif;\n background-color: black;\n color: #fff;\n text-align: center;\n border-radius: 7px;\n user-select: none;\n pointer-events: none;\n\n}\n\n.caret-right::after {\n content: \" \";\n position: absolute;\n top: 100%;\n left: 85%;\n margin-left: -4px;\n border-width: 4px;\n border-style: solid;\n border-color: black transparent transparent transparent;\n}\n\n.caret-mid::after {\n content: \" \";\n position: absolute;\n top: 100%;\n left: 50%;\n margin-left: -4px;\n border-width: 4px;\n border-style: solid;\n border-color: black transparent transparent transparent;\n}\n\n.shortcut-key {\n display: inline-block;\n background-color: #555;\n color: #fff;\n font-family: monospace;\n padding: 0.2em;\n border-radius: 0.2em;\n}\n</style>",'\n <div style="margin-left: -47px; margin-bottom: 3px;" class="tooltiptext caret-mid">\n Rephrase').concat(e.rephraseShortcut?' <span class="shortcut-key">'+e.rephraseShortcut+"</span>":"",'\n </div>\n <img class="sapling-rephrase-wand" src="').concat(Ye("assets/fa-wand-magic-sparkles-solid.svg"),'" />\n <img class="sapling-rephrase-spinner" src="').concat(Ye("assets/fa-spinner-solid-white.svg"),'" />\n </div>\n ')),e.rephraseWand=e.rephraseButton.find(".sapling-rephrase-wand").first(),e.rephraseSpinner=e.rephraseButton.find(".sapling-rephrase-spinner").first(),e.rephraseSpinner.hide();var r=e.shadowHost.shadowRoot;Rr(r).append(e.rephraseButton),e.rephraseButton.get(0).addEventListener("mousedown",(function(t){1===t.which&&(Gr.toggleControls(),t.preventDefault(),t.stopPropagation())})),t.positionButton()}),(function(t){}))))}},{key:"show",value:function(){var e=this;setTimeout((function(){var n=$r();n&&n.toString().trim()&&(t.positionButton(),e.rephraseButton.fadeIn(50))}),200)}},{key:"hide",value:function(){this.rephraseButton&&this.rephraseButton.hide()}}],[{key:"positionButton",value:function(){var t=$r();if(t&&t.toString().trim()){var e=function(){var t=document.activeElement;if(!Nr(t))return null;for(;t.parentElement;){var e=t.parentElement;if(!Nr(e))break;t=e}return t}();if(e){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect();n.top>r.top-Wr?Rr("sapling-rephrase-button").css({left:r.x+r.width+5+window.scrollX,top:r.y+window.scrollY,position:"absolute"}):Rr("sapling-rephrase-button").css({left:r.x+r.width+5+window.scrollX,top:r.y-5-Wr+window.scrollY,position:"absolute"})}}}}]),t}(),Jr=function(){function t(e){qr(this,t),this.shadowHost=e,this.activeRange=null,this.rephraseContainer=null,this.rephraseCandidatesContainer=null,this.rephraseStatusMessage=null,this.rephraseType="paraphrase",this.toneMapping="straightforward"}return zr(t,[{key:"setRephraseType",value:function(t){var e=Rr(t).attr("data-rephrase-type");this.rephraseType=e,Rr(t).parent().find(".sapling-rephrase-type-active").removeClass("sapling-rephrase-type-active"),Rr(t).addClass("sapling-rephrase-type-active"),this.queryAndUpdate()}},{key:"setToneMapping",value:function(t){var e=Rr(t).attr("data-tone-mapping");this.toneMapping=e,Rr(t).parent().find(".sapling-tone-mapping-active").removeClass("sapling-tone-mapping-active"),Rr(t).addClass("sapling-tone-mapping-active"),this.queryAndUpdate()}},{key:"createUIElements",value:function(){if(Ae()&&!this.rephraseContainer){Rr(this.shadowHost.shadowRoot).find(".sapling-rephrase-container").remove(),this.rephraseContainer=Rr('\n <div class="sapling-rephrase-container" style="display: none;">\n '.concat('<style type="text/css">\n.sapling-rephrase-container {\n z-index: 2147483646;\n display: block;\n max-width: 500px;\n min-width: 300px;\n margin: 0;\n padding: 0;\n border: 1px solid rgba(0, 0, 93, 0.1);\n border-radius: 0.5em;\n background-color: #fff;\n box-shadow: 5px 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);\n font-size: .875rem;\n font-weight: 500;\n font-family: roboto, helvetica, arial;\n}\n.sapling-rephrase-candidates {\n}\n.sapling-rephrase-candidate {\n display: block;\n padding: 0.8em;\n border-bottom: 1px solid #c5cae9;\n background-color: #fff;\n color: #3f51b5;\n pointer-events: auto;\n cursor: pointer;\n}\n.sapling-rephrase-candidate:hover {\n background-color: #e8eaf6;\n}\n.sapling-rephrase-status-bar {\n display: flex;\n justify-content: space-between;\n text-align: right;\n background-color: #e8eaf6;\n color: #5c6bc0;\n font-size: 0.9em;\n padding: 0.4em;\n}\n.sapling-rephrase-types {\n display: block;\n padding: 0.4em 0.6em;\n border-bottom: 1px solid #ccc;\n pointer-events: auto;\n}\n.sapling-rephrase-type {\n display: inline-block;\n height: 16px;\n width: 16px;\n opacity: 0.9;\n padding: 0.4em;\n border: 1px solid #fff;\n border-radius: 0.2em;\n cursor: pointer;\n}\n.sapling-rephrase-type img {\n height: 16px;\n width: 16px;\n}\n.candidate-copy-icon {\n display: inline-block;\n visibility: hidden;\n opacity: 0.5;\n height: 15px;\n width: 15px;\n float: right;\n cursor: pointer;\n}\n.sapling-rephrase-candidate:hover .candidate-copy-icon {\n visibility: visible;\n color: #c5cae9;\n}\n.sapling-rephrase-type:hover {\n background-color: #c5cae9;\n}\n.sapling-rephrase-type-paraphrase {\n}\n.sapling-rephrase-type-formal {\n}\n.sapling-rephrase-type-informal {\n}\n.sapling-rephrase-type-split {\n}\n.sapling-rephrase-type-active {\n border: 1px solid #7986cb;\n background-color: #c5cae9;\n}\n.sapling-rephrase-type .tooltiptext {\n margin-left: -47px !important;\n margin-bottom: 5px;\n}\n.sapling-rephrase-status-message {\n display: inline-block;\n font-size: 9pt;\n}\n\n.dropdown-menu {\n display: none;\n position: absolute;\n top: 28px;\n left: -2px;\n margin: 0;\n padding: 3px;\n background-color: #fff;\n border: 1px solid #eee;\n border-radius: 3px;\n font: 10pt "San Francisco", "Segoe UI", arial;\n box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);\n}\n.dropdown-menu li {\n display: block;\n padding: 5px;\n margin: 0;\n border-radius: 2px;\n}\n.dropdown-menu li:hover {\n background-color: #eee;\n}\n.sapling-rephrase-type {\n position: relative;\n}\n.sapling-rephrase-type-active .dropdown-menu {\n list-style-type: none;\n}\n.sapling-rephrase-type-active:hover .dropdown-menu {\n display: block;\n}\n.sapling-tone-mapping-active {\n background-color: #eee;\n}\n</style>',"\n ").concat("<style>/* From badge controls */\n.sapling-rephrase-button:hover .tooltiptext, .sapling-rephrase-type:hover .tooltiptext {\n display: block;\n transition-delay: 500ms;\n}\n.tooltiptext {\n z-index: 2147483647;\n display: none;\n\n width: 80px;\n\n position: absolute;\n bottom: 100%;\n left: 50%;\n\n margin-bottom: -3px;\n padding: 7px;\n\n font-size: 12px;\n font-family: 'Helvetica', 'Arial', sans-serif;\n background-color: black;\n color: #fff;\n text-align: center;\n border-radius: 7px;\n user-select: none;\n pointer-events: none;\n\n}\n\n.caret-right::after {\n content: \" \";\n position: absolute;\n top: 100%;\n left: 85%;\n margin-left: -4px;\n border-width: 4px;\n border-style: solid;\n border-color: black transparent transparent transparent;\n}\n\n.caret-mid::after {\n content: \" \";\n position: absolute;\n top: 100%;\n left: 50%;\n margin-left: -4px;\n border-width: 4px;\n border-style: solid;\n border-color: black transparent transparent transparent;\n}\n\n.shortcut-key {\n display: inline-block;\n background-color: #555;\n color: #fff;\n font-family: monospace;\n padding: 0.2em;\n border-radius: 0.2em;\n}\n</style>",'\n <div class="sapling-rephrase-types">\n <div class="sapling-rephrase-type sapling-rephrase-type-paraphrase" data-rephrase-type="paraphrase" title="Paraphrase">\n <div style="margin-left: -176px" class="tooltiptext caret-mid">Paraphrase</div>\n <img src="').concat(Ye("assets/fa-rotate-solid.svg"),'" />\n </div>\n <div class="sapling-rephrase-type sapling-rephrase-type-formal" data-rephrase-type="informal_to_formal" title="Formal">\n <img src="').concat(Ye("assets/fa-black-tie.svg"),'" />\n <div style="margin-left: -141px" class="tooltiptext caret-mid">Make formal</div>\n </div>\n \x3c!--<div class="sapling-rephrase-type sapling-rephrase-type-informal" data-rephrase-type="formal_to_informal" title="Informal">\n <img src="').concat(Ye("assets/fa-shirt-solid.svg"),'" />\n </div>--\x3e\n <div class="sapling-rephrase-type sapling-rephrase-type-split" data-rephrase-type="sentence_split" title="Split">\n <img src="').concat(Ye("assets/fa-scissors-solid.svg"),'" />\n <div style="margin-left: -107px" class="tooltiptext caret-mid">Split</div>\n </div>\n <div class="sapling-rephrase-type sapling-rephrase-type-tone" data-rephrase-type="switch_tone" title="Tone">\n <div class="dropdown-toggle">\n <img src="').concat(Ye("assets/fa-smile-solid.svg"),'" />\n <div style="margin-left: -74px" class="tooltiptext caret-mid">Switch Tone</div>\n <div class="dropdown-menu-wrapper">\n <ul class="dropdown-menu">\n <li class="sapling-tone-mapping" data-tone-mapping="straightforward">Straightforward</li>\n <li class="sapling-tone-mapping" data-tone-mapping="confident">Confident</li>\n <li class="sapling-tone-mapping" data-tone-mapping="friendly">Friendly</li>\n <li class="sapling-tone-mapping" data-tone-mapping="empathetic">Empathetic</li>\n </ul>\n </div>\n </div>\n </div>\n </div>\n <div class="sapling-rephrase-candidates">\n </div>\n <div class="sapling-rephrase-status-bar">\n <div style="display: flex"><img src="').concat(Ye("assets/sapling-logo-small-white.svg"),'" style="height: 16px" /></div>\n <div class="sapling-rephrase-status-message"></div>\n </div>\n </div>\n '));var t=this.shadowHost.shadowRoot;Rr(t).append(this.rephraseContainer),this.rephraseCandidatesContainer=this.rephraseContainer.find(".sapling-rephrase-candidates").first(),this.rephraseStatusMessage=this.rephraseContainer.find(".sapling-rephrase-status-message").first(),this.rephraseSpinner=this.rephraseContainer.find(".sapling-rephrase-spinner").first(),Gr=this,this.rephraseContainer.find(".sapling-rephrase-type").each((function(t,e){Rr(e).attr("data-rephrase-type")===Gr.rephraseType?Rr(e).addClass("sapling-rephrase-type-active"):Rr(e).removeClass("sapling-rephrase-type-active");Rr(e).on("mousedown",{el:e},(function(t){t.preventDefault(),t.stopPropagation(),Gr.setRephraseType(t.data.el)}))})),this.rephraseContainer.find(".sapling-tone-mapping").each((function(t,e){Rr(e).attr("data-tone-mapping")===Gr.toneMapping?Rr(e).addClass("sapling-tone-mapping-active"):Rr(e).removeClass("sapling-tone-mapping-active");Rr(e).on("mousedown",{el:e},(function(t){t.preventDefault(),t.stopPropagation(),Gr.setToneMapping(t.data.el)}))})),this.showControls()}}},{key:"positionControls",value:function(){if(this.activeRange){var t=this.activeRange.getBoundingClientRect(),e=Rr("sapling-rephrase-controls").height();t.y<window.innerHeight-e||t.y<e/2?Rr("sapling-rephrase-controls").css({left:t.x+window.scrollX,top:t.y+t.height+window.scrollY,position:"absolute"}):Rr("sapling-rephrase-controls").css({left:t.x+window.scrollX,top:t.y-e+window.scrollY-2,position:"absolute"})}}},{key:"showControls",value:function(){this.activeRange=$r(),this.activeRange&&this.activeRange.toString().trim()&&(this.queryAndUpdate(),this.rephraseContainer.show(),this.positionControls())}},{key:"hideControls",value:function(){this.activeRange=null,this.rephraseContainer&&this.rephraseContainer.hide()}},{key:"toggleControls",value:function(){this.rephraseContainer&&(this.rephraseContainer.is(":visible")?this.hideControls():this.showControls())}},{key:"loadingOn",value:function(){this.setStatus("Loading suggestions..."),this.rephraseCandidatesContainer.html(""),Yr.rephraseWand.hide(),Yr.rephraseSpinner.show()}},{key:"loadingOff",value:function(){this.setStatus("Ready."),Yr.rephraseSpinner.hide(),Yr.rephraseWand.show()}},{key:"queryAndUpdate",value:function(){var t=this;this.loadingOn();var e,n,r,i,o,a,s=this.activeRange.toString();e=s,n=this.rephraseType,r={tone_mapping:this.toneMapping},i="TODO-SESSION-ID",o=function(e){t.updateCandidates(e.rephrases.results),t.loadingOff()},a=function(e){t.loadingOff(),e&&s.length>250?t.setStatus("Error: selected text too long"):t.setStatus("Unexpected error")},ht("request/GET_REPHRASE",{html:w()(e,256),mapping:n,metadata:r,sessionId:i,context:Dt()},o,a)}},{key:"updateCandidates",value:function(e){var n=this;this.rephraseCandidatesContainer.html("");var r,i=Mr(e);try{var o=function(){var e=r.value,i=Rr('<div class="sapling-rephrase-candidate" data-candidate-hash="'.concat(e.hash,'">\n <span>').concat(e.replacement,'</span>\n <img class="candidate-copy-icon" src="').concat(Ye("assets/fa-copy-regular.svg"),'" title="Copy" />\n </div>'));i.find(".candidate-copy-icon").first().mousedown((function(e){t.copyCandidate(i,e)})),n.rephraseCandidatesContainer.append(i)};for(i.s();!(r=i.n()).done;)o()}catch(t){i.e(t)}finally{i.f()}this.rephraseCandidatesContainer.find(".sapling-rephrase-candidate").each((function(t,e){var n=e.innerText;e.addEventListener("mousedown",(function(t){Gr.acceptCandidate(n,document.activeElement,Rr(e).attr("data-candidate-hash")),t.preventDefault(),t.stopPropagation()}))})),this.positionControls()}},{key:"acceptCandidate",value:function(t,e,n){if(this.activeRange){var r=this.activeRange,i=U(e),o=H(e)||i;i?fn(e,r.startOffset,r.endOffset,t):gn(r,t,e),function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];ht("request/POST_REPHRASE",{rephraseHash:t,context:mt(mt({},Dt(n)),r),action:i?"hover":e?"accept":"reject",sessionId:n})}(n,!0,o,{}),this.hideControls()}}},{key:"setStatus",value:function(t){this.rephraseStatusMessage.text(t)}}],[{key:"copyCandidate",value:function(t,e){e.preventDefault(),e.stopPropagation(),function(t){function e(e){e.clipboardData.setData("text/html",t),e.clipboardData.setData("text/plain",t),e.preventDefault()}document.addEventListener("copy",e),document.execCommand("copy"),document.removeEventListener("copy",e)}(t[0].querySelector("span").innerText),Gr.setStatus("Text copied.")}}]),t}();function Xr(){return[Gr,Yr]}function Kr(){Gr&&Gr.hideControls(),Yr&&Yr.hide()}function Qr(t,e){return Yr||(Yr=new Vr(e)).createUIElements(),Gr||(Gr=new Jr(t)).createUIElements(),[Gr,Yr]}var Zr=n(563);function ti(t){return ti="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ti(t)}function ei(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||oi(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ni(){ni=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function c(t,e,n,i){var o=e&&e.prototype instanceof p?e:p,a=Object.create(o.prototype),s=new _(i||[]);return r(a,"_invoke",{value:w(t,n,s)}),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function p(){}function d(){}function h(){}var g={};u(g,o,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(S([])));y&&y!==e&&n.call(y,o)&&(g=y);var m=h.prototype=p.prototype=Object.create(g);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function D(t,e){function i(r,o,a,s){var u=l(t[r],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==ti(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,s)}),(function(t){i("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return i("throw",t,a,s)}))}s(u.arg)}var o;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){i(t,n,e,r)}))}return o=o?o.then(r,r):r()}})}function w(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return C()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=x(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function x(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=l(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,f;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function S(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return d.prototype=h,r(m,"constructor",{value:h,configurable:!0}),r(h,"constructor",{value:d,configurable:!0}),d.displayName=u(h,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,u(t,s,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(D.prototype),u(D.prototype,a,(function(){return this})),t.AsyncIterator=D,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new D(c(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(m),u(m,s,"Generator"),u(m,o,(function(){return this})),u(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=S,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),A(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function ri(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function ii(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){ri(o,r,i,a,s,"next",t)}function s(t){ri(o,r,i,a,s,"throw",t)}a(void 0)}))}}function oi(t,e){if(t){if("string"==typeof t)return ai(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ai(t,e):void 0}}function ai(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function si(t){Zr(t).find("*").each((function(t,e){var n,r=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=oi(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(e.attributes);try{for(r.s();!(n=r.n()).done;){var i=n.value;"data-sapling-ignore"!==i.name&&e.removeAttribute(i.name)}}catch(t){r.e(t)}finally{r.f()}}))}function ui(t){if("textarea"===t.type)return t.value;var e=t.cloneNode(!0);Zr(e).find("script").remove(),Zr(e).find("style").remove(),Zr(e).find("xml").remove(),function(t){Zr(t).find(".gmail_quote").remove(),Zr(t).find(".gmail_attr").remove()}(e);for(var n=e.firstChild;null!==n;){var r=n.nodeType;if(r!==Node.TEXT_NODE&&r!==Node.ELEMENT_NODE){var i=n;if(i.nextSibling)n=i.nextSibling;else{var o=i.parentNode;if(o)for(;o!==e;){if(o.nextSibling){n=o.nextSibling;break}o=o.parentNode}else n=null}i.remove()}else n=j(n,e)}return si(e),k(e.innerHTML||"")}function ci(t,e,n,r,i,o){var a=n,s=r,u=I(a,s,i.startIndex+e,t,!1,!1);if(null===u)return[a,s];var c=u.domElement,l=u.domOffset,f=I(a=c,s=u.indexSum,i.endIndex+e,t,!1,!0);if(null===f)return[a,s];var p=f.domElement,d=f.domOffset;a=p,s=f.indexSum;var h=function(t,e,n,r,i,o){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=document.createRange();if(s.setStart(e,n),s.setEnd(r,i),!Oa(s,o))return null;return function(t,e,n,r){var i=r,o=H(t);if(!(o in Qs))return;if(n.editId in Qs[o].edits){if(Oa(Qs[o].edits[n.editId].editRange,n,!1))return void(i&&delete i[n.editId])}if(i)for(var a=0,s=Object.keys(i);a<s.length;a++){var u=s[a],c=i[u],l=c.edit,f=c.editRange;if(jr(f,e)){if(f.toString()===e.toString()){l.editId in Qs[o].edits&&!Qs[o].edits[u].isHover&&hu(o,l.editId),delete i[u];break}hu(o,u),delete i[u]}}n.editId in Qs[o].edits?(Qs[o].edits[n.editId].edit=n,Qs[o].edits[n.editId].editRange=e):Qs[o].edits[n.editId]={editRange:e,edit:n,domElements:[],isHover:!1};du(o,n.editId)}(t,s,o,a)}(t,c,l,p,d,i,o);return h&&(a=h,s=i.startIndex+e),[a,s]}function li(t,e,n){return fi.apply(this,arguments)}function fi(){return(fi=ii(ni().mark((function t(e,n,r){var i,o;return ni().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=I(e,0,n,e,!1,!1)){t.next=3;break}return t.abrupt("return",[]);case 3:if(o=I(i.domElement,i.indexSum,r,e,!1,!0)){t.next=6;break}return t.abrupt("return",[]);case 6:return t.next=8,Du(e,i.domElement,i.domOffset,o.domElement,o.domOffset);case 8:return t.abrupt("return",t.sent);case 9:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function pi(t,e,n,r){return di.apply(this,arguments)}function di(){return(di=ii(ni().mark((function t(e,n,r,i){var o,a,s,u,c,l,f,p,d;return ni().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("SDK"!==h.MODE||Sapling.edits){t.next=2;break}return t.abrupt("return");case 2:return o=Object.keys(n).map((function(t){return n[t]})).sort((function(t,e){return t.sortId-e.sortId})),t.next=5,li(e,r,r+i);case 5:a=t.sent,s=e,u=0,c=1,l=0;case 10:if(!(l<o.length)){t.next=23;break}if(f=o[l],p=ci(e,r,s,u,f,a),d=ei(p,2),s=d[0],u=d[1],++c%10!=0){t.next=20;break}return t.next=20,new Promise((function(t){return setTimeout(t,0)}));case 20:l+=1,t.next=10;break;case 23:return a&&gu(e,Object.keys(a)),t.abrupt("return",!0);case 25:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var hi=n(563);function gi(t,e){var n=function(t){for(var e=t&&t.parentNode;e;){if("[object ShadowRoot]"===e.toString())return e;e=e.parentNode}return!1}(t);return(n?e&&!function(t,e){for(var n=e.parentNode||e.host;null!=n;){if(n===t)return!0;n=n.parentNode||n.host}return!1}(e.contentDocument,n)?e.contentDocument:n:e?e.contentDocument:window).getSelection().getRangeAt(0)}function vi(t){var e,n=function(t){for(var e=null,n=t;n&&"IFRAME"===n.nodeName;){e=n;var r=n.contentDocument;if(r||(r=Y(n).contents()[0]),!r)return{deepestIframe:null,deepFocusedElement:null};n=tt(r)}return{deepestIframe:e,deepFocusedElement:n}}(t),r=n.deepestIframe,i=n.deepFocusedElement;if(!i)return null;"true"===i.getAttribute("contenteditable")||""===i.getAttribute("contenteditable")||"plaintext-only"===i.getAttribute("contenteditable")?e={deepestIframe:r,isContentEditable:!0,isTextarea:!1,element:i,range:gi(i,r)}:e=V(i)?{deepestIframe:r,isContentEditable:!1,isTextarea:!0,element:i,start:i.selectionStart,end:i.selectionEnd}:{deepestIframe:r,isContentEditable:!1,isTextarea:!1,element:i};return e}function yi(t){var e=window.getSelection();e.getRangeAt&&e.rangeCount&&function(t,e){var n=t.startContainer,r=t.startOffset,i=t.endContainer,o=t.endOffset,a={inputType:"insertText",data:e,bubbles:!0,cancelable:!1,targetRanges:[new StaticRange({startContainer:n,startOffset:r,endContainer:i,endOffset:o})]};t.startContainer.dispatchEvent(new InputEvent("beforeinput",a)),n===i?n.replaceData(r,o-r,e):n.insertData(r,e),t.selectNodeContents(i),t.collapse(!1)}(e.getRangeAt(0),t)}function mi(t){if("TEXTAREA"===t.nodeName||"INPUT"===t.nodeName){var e=function(t,e,n){if(!Di)throw new Error("textarea-caret-position#getCaretCoordinates should only be called in a browser");var r=n&&n.debug||!1;if(r){var i=document.querySelector("#input-textarea-caret-position-mirror-div");i&&i.parentNode.removeChild(i)}var o=document.createElement("div");o.id="input-textarea-caret-position-mirror-div",document.body.appendChild(o);var a=o.style,s=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,u="INPUT"===t.nodeName;a.whiteSpace="pre-wrap",u||(a.wordWrap="break-word");a.position="absolute",r||(a.visibility="hidden");bi.forEach((function(t){if(u&&"lineHeight"===t)if("border-box"===s.boxSizing){var e=parseInt(s.height),n=parseInt(s.paddingTop)+parseInt(s.paddingBottom)+parseInt(s.borderTopWidth)+parseInt(s.borderBottomWidth),r=n+parseInt(s.lineHeight);a.lineHeight=e>r?e-n+"px":e===r?s.lineHeight:0}else a.lineHeight=s.height;else a[t]=s[t]})),wi?t.scrollHeight>parseInt(s.height)&&(a.overflowY="scroll"):a.overflow="hidden";o.textContent=t.value.substring(0,e),u&&(o.textContent=o.textContent.replace(/\s/g,"\xa0"));var c=document.createElement("span");c.textContent=t.value.substring(e)||".",o.appendChild(c);var l={top:c.offsetTop+parseInt(s.borderTopWidth),left:c.offsetLeft+parseInt(s.borderLeftWidth),height:parseInt(s.fontSize)};r?c.style.backgroundColor="#aaa":document.body.removeChild(o);return l}(t,t.selectionEnd),n=t.getBoundingClientRect();return{left:n.left+e.left-hi(t).scrollLeft(),top:n.top+e.top-hi(t).scrollTop(),height:e.height}}var r=t.getRootNode().getSelection().getRangeAt(0);if(0===r.startOffset){r=r.cloneRange();try{r.setEnd(r.startContainer,1)}catch(t){var i=r.startContainer.getBoundingClientRect(),o=hi(r.startContainer),a=parseInt(o.css("padding-top"))+parseInt(o.css("border-top-width"))+parseInt(o.css("font-size")),s=parseInt(o.css("padding-left"))+parseInt(o.css("border-left-width"));return{left:i.left+s,top:i.top,height:a}}}var u=r.getBoundingClientRect();if(0===u.x&&0===u.y){var c=document.createTextNode("\ufeff");r.insertNode(c),u=r.getBoundingClientRect(),c.remove()}return u}var bi=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"],Di="undefined"!=typeof window,wi=Di&&null!=window.mozInnerScreenX;var xi=n(563),Ei=["fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","fontFamily","textAlign","textTransform","letterSpacing","wordSpacing","tabSize"];function Ai(t,e){var n=getComputedStyle(t);xi(Ei).each((function(t,r){e.style[r]=n[r]}))}var _i=n(563);function Si(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Ci(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ci(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ci(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var ki=null,Oi="",Ti="",Fi=null;function ji(){_i("sapling-complete").length&&(ki=_i("sapling-complete")[0].shadowRoot,_i("#sapling-complete-div-box",ki).css("visibility","hidden"),_i(ki).text(""),Fi=null)}function Li(t){var e=[],n=0;if("TEXTAREA"===t.nodeName)e=t.value.split("\n"),n=t.selectionEnd;else{if("function"!=typeof t.getRootNode().getSelection)return[e,n];var r=t.getRootNode().getSelection(),i=r.anchorNode;if(!i)return[e,n];e=i.textContent.split("\n"),n=r.focusOffset}return[e,n]}function Ii(t){for(var e=Si(Li(t),2),n=e[0],r=e[1],i=0,o="",a=0;a<n.length;a++){if(""!==o?o+=" "+n[a]:o=n[a],i+n[a].length>=r)return o;i+=n[a].length+1}return""}function Ni(){try{return ki=_i("sapling-complete")[0].shadowRoot,_i(ki).find("span").first().attr("completion-hash")}catch(t){return""}}function Bi(t,e){var n=function(t){if(O(t))return t;for(var e=A(t).parentsUntil("body"),n=0;n<e.length;n+=1){var r=e[n];if(O(r))return r}return null}(e);if(null!==n){var r=m(),i=_i(n).css("overflow");_i(n).css("overflow","hidden"),"messenger.com"!==r&&"facebook.com"!==r||_i("html").attr("style","overflow: hidden !important;"),t(),_i(n).css("overflow",i),"facebook.com"===r&&_i("html").attr("style","")}else t()}function Ri(t,e,n){if(""!==e){var r=Ni();n&&"query"in n&&(Oi=n.query,Ti=n.model_version,r=n.hash);var i=_i("sapling-complete");ki=i[0].shadowRoot;var o=de();o||(o="`");var a='<span title="Hit the backtick or tab key to use Sapling\'s completion." style="margin-left: 1em; background: #ccc; font-weight: 500; border-radius: 0.2em; line-height: 0.6em; padding: 0 0.4em 0 0.3em;">'.concat(o,"</span>");ki.innerHTML='\n <style type="text/css">\n #sapling-complete-div {\n margin: 0;\n padding: 0;\n\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n\n color: #3f51b5;\n opacity: 0.5;\n\n -webkit-user-select: none; /* Safari */\n -moz-user-select: none; /* Firefox */\n -ms-user-select: none; /* IE10+/Edge */\n user-select: none; /* Standard */\n }\n #sapling-complete-div-box {\n z-index: 2147483647 !important;\n display: table;\n margin: 0;\n padding: 0;\n }\n </style>\n '+'<div id="sapling-complete-div-box"><div id="sapling-complete-div"><span completion-hash="'.concat(r,'">').concat(e.replace(" "," "),"</span>").concat(a,"</div></div>");var s=_i("#sapling-complete-div",ki),u=mi(t);if(void 0!==u){if(Fi=vi(t),"TEXTAREA"===t.nodeName)Ai(t,s[0]);else{for(var c=t.getRootNode().getSelection().anchorNode;c.nodeType===Node.TEXT_NODE;)c=c.parentNode;Ai(c,s[0])}var l=_i("#sapling-complete-div-box",ki);l.offset({top:u.top+window.scrollY,left:u.left+window.scrollX});var f=t.getBoundingClientRect(),p=l.offset().left+l.width()-(f.left+f.width);p>0?s.css("max-width",l.width()-p):s.css("max-width",""),Bi((function(){l.css("visibility","visible")}),t)}}else ji()}function Pi(){try{ki=_i("sapling-complete")[0].shadowRoot}catch(t){return""}return _i(ki).find("span").first().text().replace(/\u00A0/g," ")}function Mi(t){Ri(t,Pi().substring(1))}function Hi(t,e){var n,r=t.key,i=de();if("Tab"===r||"ArrowRight"===r||!i&&"`"===r||i&&r===i){if(!function(t,e){if(!t||!e)return!1;if(t.isContentEditable){var n=t.range,r=e.range;return n.startContainer===r.startContainer&&n.startOffset===r.startOffset&&n.endContainer===r.endContainer&&n.endOffset===r.endOffset}return!!t.isTextarea&&t.start===e.start&&t.end===e.end}(vi(e),Fi))return;var o=Pi();if(""===o&&"chatTextArea"!==e.getAttribute("id"))return;if(t.preventDefault(),P(e)){var a={inputType:"insertText",data:o,bubbles:!0,cancelable:!1},s=window.getSelection().getRangeAt(0);setTimeout((function(){s.startContainer.dispatchEvent(new InputEvent("beforeinput",a))}),100)}else e.className.includes("ck-editor")?yi(o):(n=o,document.execCommand("insertText",!1,n));var u=Ni(),c=H(t.target);ji(),function(t,e,n,r){ht("request/POST_COMPLETION",{completionHash:t,context:mt(mt({},Dt(n)),r),action:"accept",sessionId:n})}(u,0,c,{query:Oi,completion:o,model_version:Ti})}}var qi=!0;function Ui(t){qi=t}function zi(){ht("makeToolbarIconActive")}function Wi(){ht("makeToolbarIconInactive")}function Gi(t){ht("updateToolbarIconEditCount",{editCount:t})}function Yi(){ht("updateToolbarIconDisconnected")}var $i=n(974),Vi=n.n($i),Ji=n(137);new Ji("https://sapling.ai").hostname,new Ji("https://api.sapling.ai").hostname;n(137);var Xi,Ki=n(563),Qi=null;function Zi(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(Ki("#slidecheck").attr("disabled",Ee()),Ki("#slidecheck").attr("checked",me()),Ki("#advanced-edits-slidecheck").attr("disabled",Ee()),Ki("#advanced-edits-slidecheck").attr("checked",be()),Ki("#complete-slidecheck").attr("disabled",!ue()),Ki("#complete-slidecheck").attr("checked",we()),Ki("#badge-slidecheck").attr("checked",Te()),Ki("#tone-slidecheck").attr("checked",Oe()),Ki("#ai-detect-slidecheck").attr("checked",Ce()),Ki("#rephrase-slidecheck").attr("checked",_e()),Ki("#lang-select").val(Le()),t)return ae()?Ki("#subscription-banner").html('Daily limit exceeded for <a href="https://sapling.ai/integrations" target="_blank">premium domain</a>.<br/> Do you need to <a href="https://sapling.ai/user/sign-in">sign in</a>?'):Ki("#subscription-banner").html('Daily limit exceeded for <a href="https://sapling.ai/integrations" target="_blank">premium domain</a>.<br/> Contact <a href="https://sapling.ai/contact" target="_blank">Sapling Sales</a> to subscribe.'),Ki("#subscription-banner").css({"font-weight":"500",border:"2px solid #555"}),void Ki("#subscription-banner").show();me()||we()?zi():Wi()}function to(t){if(ue()){var e=ge();null===e?(t.html("<strong>".concat(ce().toUpperCase(),"</strong>")),t.css({"background-color":"#deefde",border:"0"}),Ki("#team-premium-banner").hide()):(e<=1?t.html('<a target="_blank" href="https://sapling.ai/plans"><strong'.concat(ce().toUpperCase(),"</strong></a> (<strong>1 day</strong> left)")):t.html('<a target="_blank" href="https://sapling.ai/plans"><strong>'.concat(ce().toUpperCase(),"</strong></a> (<strong>").concat(e," days</strong> left)")),t.css({"background-color":"#fff3cd",color:"#856404",border:"1px solid #ffeeba"})),t.show()}else se()?(t.html('<a target="_blank" href="https://sapling.ai/plans"><strong>Upgrade</strong></a> or sign in to see premium edits.'),t.css({"background-color":"#fff3cd",border:"0",color:"#856404"})):ae()||se()?(t.html('<strong><a target="_blank" href="'.concat(h.WEBSITE_URL,'/user/register">Sign up</a></strong>')),t.css({"background-color":"#fff3cd",border:"0",color:"#856404"})):(t.html("<strong>Please confirm your email using the link in email we sent you.</strong>"),t.css({"background-color":"#fff3cd",border:"0",color:"#856404"})),t.show()}Vi().debounce((function(){Qi.postMessage(Xi.innerHTML)}),200,{leading:!1,trailing:!0});var eo=n(563);function no(t){return no="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},no(t)}function ro(){ro=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function c(t,e,n,i){var o=e&&e.prototype instanceof p?e:p,a=Object.create(o.prototype),s=new _(i||[]);return r(a,"_invoke",{value:w(t,n,s)}),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function p(){}function d(){}function h(){}var g={};u(g,o,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(S([])));y&&y!==e&&n.call(y,o)&&(g=y);var m=h.prototype=p.prototype=Object.create(g);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function D(t,e){function i(r,o,a,s){var u=l(t[r],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==no(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,s)}),(function(t){i("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return i("throw",t,a,s)}))}s(u.arg)}var o;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){i(t,n,e,r)}))}return o=o?o.then(r,r):r()}})}function w(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return C()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=x(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function x(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=l(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,f;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function S(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return d.prototype=h,r(m,"constructor",{value:h,configurable:!0}),r(h,"constructor",{value:d,configurable:!0}),d.displayName=u(h,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,u(t,s,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(D.prototype),u(D.prototype,a,(function(){return this})),t.AsyncIterator=D,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new D(c(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(m),u(m,s,"Generator"),u(m,o,(function(){return this})),u(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=S,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),A(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function io(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}var oo=new Set;function ao(t,e,n,r){var i;return i=[],Object.keys(Ho).forEach((function(t){var e=Ho[t];Object.keys(e).forEach((function(t){i.push(e[t])}))})),Object.keys(qo).forEach((function(t){i.push(qo[t])})),i.filter((function(t){return t.isLoading})).length>0&&function(t){var e=Qs[t];if(!e||!e.badge)return;e.badge.showSpinner()}(r),ht("makeToolbarIconLoading"),function(t){var e=Qs[t];if(!e)return;if(!e.annotationsOverlay)return;e.annotationsOverlay.queryAndUpdate()}(r),function(t,e,n,r){ht("request/GET_EDITS",{html:w()(t,2097152),sessionId:e,context:Dt()},n,r)}(t,r,function(){var t,i=(t=ro().mark((function t(i){var o,a;return ro().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(o=i.edits).includes("throttled")){t.next=7;break}return bn(),ht("makeToolbarIconThrottled"),iu(r),"sapling-embedded-editable"===n.id&&Zi(!0),t.abrupt("return");case 7:return Vo(r,e),Go(),a=0,t.next=12,Jo(n,r,e,o);case 12:a=eu(n),Ui(!0),a>0&&!oo.has(r)&&(Et("edits_applied",{num_edits:a},r),oo.add(r)),qi&&("sapling-embedded-editable"===n.id?zi():Gi(a)),ru(r),au(r),ou(r);case 19:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){io(o,r,i,a,s,"next",t)}function s(t){io(o,r,i,a,s,"throw",t)}a(void 0)}))});return function(t){return i.apply(this,arguments)}}(),(function(t){Ui(!1),Yi(),ru(r),function(t){var e=Qs[t];if(!e)return;if(!e.badge)return;e.badge.showErrorState()}(r)}))}function so(t,e){if(function(){if(!_i("sapling-complete").length){var t=_i("<sapling-complete></sapling-complete>");t.css({display:"inline",width:0,height:0});var e=t[0];e.attachShadow({mode:"open"}),ki=e.shadowRoot,_i("html").append(t)}}(),ji(),!function(t){for(var e=Si(Li(t),2),n=e[0],r=e[1],i=0,o=0;o<n.length;o++){var a=i+n[o].length;if(i<=r&&a>r)return!0;i=a+1}return!1}(t=eo(t)[0])){var n=Ii(t);eo.trim(n)&&function(t,e,n,r){ht("request/GET_COMPLETION",{query:t.slice(-300),sessionId:e,context:Dt()},n,r)}(n,e,(function(e){if(Ii(t)===n){var r=e.completion;eo.trim(r.output)&&Ri(t,r.output,r)}else ji()}),(function(){Ui(!1),Yi()}))}}function uo(t,e,n,r){var i={hidden:document.hidden};return Object.assign(i,r),function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=Dt();Object.assign(o,i),ht("request/GET_SUGGEST",{query:t.slice(-300),multiquery:e,context:o},n,r)}(t,e,(function(t){n(t)}),(function(){}),i)}function co(t,e,n){!function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=Dt();Object.assign(i,r),ht("request/GET_MATCH_SUGGEST",{inp:t.slice(-300),context:i},e,n)}(t,(function(t){e(t)}),(function(){}),n)}function lo(t,e,n){if(!n.isPointInRange(t,e))return null;var r=n.cloneRange();return r.setEnd(t,e),r.toString().length}function fo(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=document.createRange();if(n.selectNodeContents(t),e)return t.selectionStart;if(!t.getRootNode().getSelection)return 0;var r=t.getRootNode().getSelection(),i=null,o=null;return r.anchorNode&&(i=lo(r.anchorNode,r.anchorOffset,n)),r.focusNode&&(o=lo(r.focusNode,r.focusOffset,n)),i&&o?Math.min(i,o):i||o}var po=n(563);function ho(t){return ho="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ho(t)}function go(){go=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function c(t,e,n,i){var o=e&&e.prototype instanceof p?e:p,a=Object.create(o.prototype),s=new _(i||[]);return r(a,"_invoke",{value:w(t,n,s)}),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function p(){}function d(){}function h(){}var g={};u(g,o,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(S([])));y&&y!==e&&n.call(y,o)&&(g=y);var m=h.prototype=p.prototype=Object.create(g);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function D(t,e){function i(r,o,a,s){var u=l(t[r],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==ho(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,s)}),(function(t){i("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return i("throw",t,a,s)}))}s(u.arg)}var o;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){i(t,n,e,r)}))}return o=o?o.then(r,r):r()}})}function w(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return C()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=x(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function x(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=l(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,f;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function S(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return d.prototype=h,r(m,"constructor",{value:h,configurable:!0}),r(h,"constructor",{value:d,configurable:!0}),d.displayName=u(h,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,u(t,s,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(D.prototype),u(D.prototype,a,(function(){return this})),t.AsyncIterator=D,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new D(c(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(m),u(m,s,"Generator"),u(m,o,(function(){return this})),u(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=S,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),A(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function vo(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function yo(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){vo(o,r,i,a,s,"next",t)}function s(t){vo(o,r,i,a,s,"throw",t)}a(void 0)}))}}var mo=4e3,bo=2e3,Do=8,wo=[new RegExp("[\\s\\S]{0,".concat(mo,"}</div>"),"imy"),new RegExp("[\\s\\S]{0,".concat(mo,"}</p>"),"imy"),new RegExp("[\\s\\S]{0,".concat(mo,"}<br ?/?>"),"imy"),new RegExp("[\\s\\S]{0,".concat(mo,"}(\\.|\\?|!)(?=[^>]*(<|$))"),"imy")];function xo(t,e){if(t.length-e<=bo)return t.length;for(var n=0;n<wo.length;n+=1){wo[n].lastIndex=e;var r=t.match(wo[n]);if(r)return e+r[0].length}return e+mo}function Eo(t){var e=0,n=null;if(0===t.length)return e;for(n=0;n<t.length;n+=1)e=(e<<5)-e+t.charCodeAt(n),e|=0;return e}function Ao(t){return _o.apply(this,arguments)}function _o(){return(_o=yo(go().mark((function t(e){var n,r,i,o,a,s,u;return go().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=[],r=0,i=0,o=0;case 4:if(!(r<e.length)){t.next=17;break}if(a=xo(e,r),s=e.substring(r,a),u=po("<span>".concat(s,"</span>")).text().length,n.push({html:s,htmlLength:s.length,htmlOffset:r,htmlHash:Eo(s),textOffset:i,textLength:u}),r=a,i+=u,++o%25!=0){t.next=15;break}return t.next=15,new Promise((function(t){return setTimeout(t,50)}));case 15:t.next=4;break;case 17:return t.abrupt("return",n);case 18:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function So(t,e){var n=I(t,0,e.textOffset,t,!1,!1),r=document.createRange();return r.selectNodeContents(n.domElement),r.getBoundingClientRect().top}function Co(t,e){var n=window.innerHeight/2;t.sort((function(t,r){var i=So(e,t),o=So(e,r);return Math.abs(i-n)-Math.abs(o-n)}));for(var r=0;r<t.length;r+=1){var i=t[r];i.priority=r<Do?r:100}return t}function ko(t,e){t.sort((function(t,n){return Math.abs(t.textOffset-e)-Math.abs(n.textOffset-e)}));for(var n=0;n<t.length;n+=1){var r=t[n];r.priority=n<Do?n:100}return t}function Oo(t,e){return To.apply(this,arguments)}function To(){return(To=yo(go().mark((function t(e,n){var r,i;return go().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=fo(n)||0,t.next=3,Ao(e);case 3:if(0!==(i=t.sent).length){t.next=6;break}return t.abrupt("return",[]);case 6:return t.abrupt("return",ko(i,r));case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Fo(t,e){return jo.apply(this,arguments)}function jo(){return(jo=yo(go().mark((function t(e,n){var r;return go().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Ao(e);case 2:if(0!==(r=t.sent).length){t.next=5;break}return t.abrupt("return",[]);case 5:return t.abrupt("return",Co(r,n));case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Lo=n(563);function Io(t){return Io="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Io(t)}function No(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Bo(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Bo(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Bo(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Ro(){Ro=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function c(t,e,n,i){var o=e&&e.prototype instanceof p?e:p,a=Object.create(o.prototype),s=new _(i||[]);return r(a,"_invoke",{value:w(t,n,s)}),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function p(){}function d(){}function h(){}var g={};u(g,o,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(S([])));y&&y!==e&&n.call(y,o)&&(g=y);var m=h.prototype=p.prototype=Object.create(g);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function D(t,e){function i(r,o,a,s){var u=l(t[r],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==Io(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,s)}),(function(t){i("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return i("throw",t,a,s)}))}s(u.arg)}var o;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){i(t,n,e,r)}))}return o=o?o.then(r,r):r()}})}function w(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return C()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=x(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function x(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=l(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,f;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function S(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return d.prototype=h,r(m,"constructor",{value:h,configurable:!0}),r(h,"constructor",{value:d,configurable:!0}),d.displayName=u(h,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,u(t,s,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(D.prototype),u(D.prototype,a,(function(){return this})),t.AsyncIterator=D,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new D(c(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(m),u(m,s,"Generator"),u(m,o,(function(){return this})),u(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=S,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),A(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function Po(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function Mo(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){Po(o,r,i,a,s,"next",t)}function s(t){Po(o,r,i,a,s,"throw",t)}a(void 0)}))}}var Ho={},qo={},Uo=1,zo=15e3;function Wo(t,e){if(t in Ho){var n=Ho[t];e in n&&(n[e].isLoading&&(qo[e]=n[e]),delete n[e])}}function Go(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=[];Object.keys(Ho).forEach((function(t){var n=Ho[t];Object.keys(n).forEach((function(t){e.push(n[t])}))}));var n=(new Date).getTime(),r=e.filter((function(t){return!t.isComplete})),i=e.filter((function(t){return t.isLoading&&n-t.requestTime<zo}));r.sort((function(e,n){if(t&&e.containerId!==n.containerId){if(e.containerId===t)return-1;if(e.containerId===t)return 1}return e.priority-n.priority}));var o=[];Object.keys(qo).forEach((function(t){o.push(qo[t])}));var a=o.filter((function(t){return t.isLoading&&n-t.requestTime<zo})),s=i.length+a.length;if(s<Uo)for(var u=Math.min(r.length,Uo-s),c=0;c<u;c+=1){var l=r[c];l.requestTime=(new Date).getTime(),l.isLoading=!0,l.htmlHash in qo?(l.requestObj=qo[l.htmlHash].requestObj,delete qo[l.htmlHash]):(l.requestObj=l.requestFunction(),l.requestTime=n)}}function Yo(t,e){return $o.apply(this,arguments)}function $o(){return($o=Mo(Ro().mark((function t(e,n){var r,i,o,a,s,u,c;return Ro().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=(r=ui(e)).replace(/\u00A0/g," ").replace(/\u200B/g," ").replace(/\uFEFF/g," "),i=H(e),!n){t.next=9;break}return t.next=6,Fo(r,e);case 6:o=t.sent,t.next=12;break;case 9:return t.next=11,Oo(r,e);case 11:o=t.sent;case 12:Ho[i]=Ho[i]||[],a=Ho[i],s={},u=Ro().mark((function t(){var n,r,u,l;return Ro().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=o[c],r=Lo("<span>".concat(n.html,"</span>")).text(),0!==r.replace(/(\r\n\t|\n|\r\t)/gm,"").trim().length){t.next=5;break}return t.abrupt("return","continue");case 5:if(s[n.htmlHash]=s[n.htmlHash]||[],s[n.htmlHash].push([n.textOffset,n.textLength]),!(n.htmlHash in a)){t.next=18;break}if((u=a[n.htmlHash]).priority=n.priority,!("edits"in u)){t.next=15;break}return t.next=13,pi(e,u.edits,n.textOffset,n.textLength);case 13:t.next=16;break;case 15:u.isComplete=!1;case 16:t.next=20;break;case 18:l=function(){return ao(n.html,n.htmlHash,e,i)},a[n.htmlHash]={requestFunction:l,containerId:i,priority:n.priority,hash:n.htmlHash,requestTime:null};case 20:case"end":return t.stop()}}),t)})),c=0;case 17:if(!(c<o.length)){t.next=25;break}return t.delegateYield(u(),"t0",19);case 19:if("continue"!==t.t0){t.next=22;break}return t.abrupt("continue",22);case 22:c++,t.next=17;break;case 25:Object.keys(a).forEach((function(t){t in s?a[t].textOffsets=s[t]:Wo(i,t)}));case 26:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Vo(t,e){t in Ho&&e in Ho[t]&&(Ho[t][e].isLoading=!1,Ho[t][e].isComplete=!0),e in qo&&delete qo[e]}function Jo(t,e,n,r){return Xo.apply(this,arguments)}function Xo(){return(Xo=Mo(Ro().mark((function t(e,n,r,i){var o,a,s,u,c,l,f,p,d,h,g;return Ro().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(o={},a=0,s=0;s<i.length;s+=1)u=i[s],c="".concat(u.id,":").concat(u.start.offset),o[c]={sortId:a,editId:c,editHash:u.id,startIndex:u.start.offset,endIndex:u.end.offset,startText:u.start.text,endText:u.end.text,originalText:u.original_text,replacementText:u.replacement_text,replacementContext:u.replacement_context,premium:u.premium,fillin:u.replacement_text&&u.replacement_text.includes("SAPLING_FILLIN"),description:u.description,requireLogin:u.require_login,category:u.category,generalErrorType:u.general_error_type,difficulty:u.difficulty},a+=1;if(!Ho[n]||!(r in Ho[n])){t.next=15;break}(l=Ho[n][r]).edits=o,f=l.textOffsets,p=0;case 8:if(!(p<f.length)){t.next=15;break}return d=No(f[p],2),h=d[0],g=d[1],t.next=12,pi(e,o,h,g);case 12:p+=1,t.next=8;break;case 15:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Ko=n(563);function Qo(t){return Qo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qo(t)}function Zo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(i=r.key,o=void 0,o=function(t,e){if("object"!==Qo(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Qo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===Qo(o)?o:String(o)),r)}var i,o}var ta=new WeakMap,ea="\n<style>\n .sapling-ai-detect-select-button::after {\n content: 'Run AI Detection';\n position: absolute;\n display: none;\n background-color: #333;\n color: #fff;\n padding: 5px;\n border-radius: 5px;\n width: 150px;\n left: 50%;\n transform: translateX(-50%);\n bottom: -100%;\n text-align: center;\n }\n\n .sapling-ai-detect-select-button:hover::after {\n display: block;\n }\n\n .sapling-ai-detect-select-button {\n opacity: 0.5;\n }\n\n .sapling-ai-detect-select-button:hover {\n opacity: 1;\n }\n\n .sapling-ai-detect-select-content {\n width: 80vw;\n min-height: 40vh;\n max-height: 90vh;\n background: white;\n border-radius: 20px;\n position: fixed;\n overflow: hidden;\n top: 5vh;\n left: 10vw;\n z-index: 9999;\n box-shadow: 0 1px 2px 0 rgb(65 69 73 / 30%), 0 3px 6px 2px rgb(65 69 73 / 15%);\n font: 9pt helvetica, arial;\n display: flex;\n flex-direction: column;\n }\n\n .sapling-ai-detect-select-content-header {\n background-color: #e8eaf6;\n color: #5c6bc0;\n font: 14pt helvetica, arial;\n padding: 8px;\n border-bottom: 1px solid #ccc;\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n\n .sapling-ai-detect-select-content-header .left {\n display: flex;\n align-items: center;\n }\n\n .sapling-ai-detect-select-content-header .left img {\n height: 20px;\n padding: 5px 10px;\n border-right: 1px solid #ccc;\n padding-right: 20px;\n margin-right: 20px;\n }\n\n .sapling-ai-detect-select-content-header .right {\n display: flex;\n align-items: center;\n padding: 5px 10px;\n }\n\n .sapling-ai-detect-select-content-header .right img {\n height: 16px;\n width: 16px;\n vertical-align: middle;\n }\n\n .sapling-ai-detect-select-content-header #subscription-banner {\n padding: 5px 10px;\n margin: 0 15px;\n font-size: 10pt;\n border-radius: 5px;\n }\n\n .sapling-ai-detect-select-content-header #subscription-banner a {\n text-decoration: none;\n }\n\n .sapling-ai-detect-select-header-button {\n cursor: pointer;\n padding: 0 5px;\n }\n\n .sapling-ai-detect-select-content-body {\n display: flex;\n flex-grow: 1;\n position: relative;\n overflow: hidden;\n justify-content: center;\n }\n\n .sapling-ai-detect-select-content-body .hidden {\n display: none;\n }\n\n .sapling-ai-detect-select-overall {\n flex-basis: 35%;\n flex-shrink: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n }\n\n .sapling-ai-detect-select-overall .overall-score {\n font-size: 35pt;\n }\n\n .sapling-ai-detect-select-overall .overall-message {\n text-align: center;\n font-size: 12pt;\n color: #555;\n margin: 15px;\n }\n\n .sapling-ai-detect-select-score-string {\n overflow: scroll;\n font-size: 10pt;\n padding: 20px;\n width: 100%;\n }\n\n .sapling-ai-detect-select-score-string .score-strings {\n padding: 5px;\n text-align: justify;\n border: 1px solid #999;\n color: #333;\n }\n\n .sapling-ai-detect-select-sentences {\n padding: 20px 40px;\n font-size: 12pt;\n overflow: scroll;\n max-height: 65vh;\n color: #333;\n }\n\n .sapling-ai-detect-select-sentences .sentence-row {\n display: flex;\n margin: 15px 0;\n }\n\n .sapling-ai-detect-select-sentences .sentence-row .sentence-text {\n flex-basis: 85%;\n margin-right: 15px;\n }\n\n .sapling-ai-detect-select-error.hidden, .sapling-ai-detect-select-waiting.hidden {\n display: none;\n }\n\n .sapling-ai-detect-select-error {\n color: red;\n }\n\n .sapling-ai-detect-select-error,\n .sapling-ai-detect-select-waiting,\n .sapling-ai-detect-select-premium {\n color: #333;\n position: absolute;\n height: 100%;\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: 12pt;\n top: 0;\n left: 0;\n text-align: center;\n background: white;\n }\n\n .sapling-ai-detect-select-premium a {\n padding: 5px 15px;\n margin: 10px;\n background-color: #535f99;\n color: white;\n text-transform: capitalize;\n text-decoration: none;\n border-radius: 5px;\n }\n\n .sapling-ai-detect-select-spinner {\n transition: all 0.25s;\n transform: rotate(0deg);\n right: 30px;\n opacity: 0;\n }\n\n .sapling-ai-detect-select-spinner.sapling-loading {\n transform: rotate(0deg);\n animation: rotation 3s linear infinite;\n opacity: 1;\n }\n\n @keyframes rotation {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n }\n\n .sapling-ai-detect-select-analysis-mode {\n margin-left: 10px;\n font-size: 12pt;\n border: 1px solid #5c6bc0;\n padding: 5px 10px;\n border-radius: 10px;\n cursor: pointer;\n transition: all 0.25s;\n }\n\n .sapling-ai-detect-select-analysis-mode.inactive {\n opacity: 0.5;\n }\n\n .sapling-ai-detect-select-analysis-mode:hover {\n background-color: #5c6bc0;\n color: white;\n }\n\n .sapling-ai-detect-select-edit-recheck {\n display: block;\n margin: 5px auto;\n margin-top: -10px;\n width: 100%;\n border: none;\n border-radius: 5px;\n padding: 5px;\n background-color: #535f99;\n color: white;\n font-size: 10pt;\n cursor: pointer;\n }\n</style>\n",na=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.shadowHost=e,this.contentShadowHost=n,this.aiDetectSelectButton=null,this.aiDetectSelectContent=null,this.assetUrls={"xmark-solid":Ye("assets/xmark-solid.svg"),"spinner-solid":Ye("assets/spinner-solid.svg"),"thumbs-up-regular":Ye("assets/thumbs-up-regular.svg"),"thumbs-down-regular":Ye("assets/thumbs-down-regular.svg"),"sapling-logo-horizontal":Ye("assets/sapling-logo-horizontal.png"),"fa-hand-sparkles-solid":Ye("assets/fa-hand-sparkles-solid.svg")}}var e,n,r;return e=t,n=[{key:"positionButton",value:function(){var t=window.getSelection();if(t&&t.rangeCount&&t.toString().trim()){var e=t.getRangeAt(0).getBoundingClientRect(),n=Ae()?15:0;Ko(this.aiDetectSelectButton).css({left:Math.min(e.right+10+n,window.innerWidth-50),top:Math.max(e.top-10+n,50)+window.scrollY,background:"#e8eaf6",padding:"12px 10px 7px 10px",position:"absolute",cursor:"pointer",borderRadius:"35px",border:"2px solid #535f99",zIndex:9998})}}},{key:"_getAIDetectionScores",value:function(t,e){var n,r=this;if(Ko(this.aiDetectSelectContent).find(".sapling-ai-detect-select-error").addClass("hidden"),!Se())return Ko(this.aiDetectSelectContent).find(".sapling-ai-detect-select-waiting").addClass("hidden"),void Ko(this.aiDetectSelectContent).find(".sapling-ai-detect-select-premium").removeClass("hidden");Ko(this.loadingIndicator).addClass("sapling-loading"),t=t.trim(),this.lastQueryText=t,"chat.openai.com"==window.location.hostname&&(e.openai_model=null===(n=document.querySelectorAll(".items-center.sm\\:justify-center span")[0])||void 0===n?void 0:n.innerText),wt(t,0,window.location.href,e,(function(t){Ko(r.loadingIndicator).removeClass("sapling-loading"),Ko(r.aiDetectSelectContent).find(".sapling-ai-detect-select-waiting").addClass("hidden");var n,i=t.aidetect,o=i.score,a=i.sentence_scores,s=i.score_string,u=i.hash;n=(o*=100)>90?"Highly likely composed by AI.":o>70?"Significant chance of AI authorship.":o>50?"Toss-up: might be AI-generated.":o>25?"Low likelihood of AI creation.":o>10?"Minimal signs of AI origin.":"Unlikely AI-authored; appears human-written.",Ko(r.aiDetectSelectContent).find(".sapling-ai-detect-select-overall").html('\n <b class="overall-score" style="color: '.concat(G(o),'">\n ').concat(o.toFixed(2),'%\n </b>\n <div class="overall-message">').concat(n,'</div>\n <div>\n <a href="https://sapling.ai/ai-content-detector/').concat(u,'" target="__blank" style="color: #535f99;" title="Use to share a detailed link to this AI Detection analysis. Link will expire in 3 days.">\n Sapling AI Detection certificate</a>\n </div>\n ')),Ko(r.aiDetectSelectContent).find(".sapling-ai-detect-select-score-string .score-strings").addClass("has-backend-response").html("".concat(s));var c=document.createRange();c.selectNodeContents(r.scoreStrings),c.collapse(!1);var l=window.getSelection();l.removeAllRanges(),l.addRange(c),Ko(r.aiDetectSelectContent).find(".sapling-ai-detect-select-sentences").html(""),a.forEach((function(t){var e=t.score,n=t.sentence,i=(e*=100)>=0?"".concat(e.toFixed(2),"%"):"n/a";Ko(r.aiDetectSelectContent).find(".sapling-ai-detect-select-sentences").append('\n <div class="sentence-row">\n <div class="sentence-text">'.concat(n,'</div>\n <div class="sentence-score" style="color: ').concat(G(e),'">').concat(i,"</div>\n </div>\n "))})),Et("ai_detect_select_processed_".concat(e.source.toLowerCase().replace(/\s+/g,"_")))}),(function(t){Ko(r.loadingIndicator).removeClass("sapling-loading"),Ko(r.aiDetectSelectContent).find(".sapling-ai-detect-select-error").removeClass("hidden")}))}},{key:"createUIElements",value:function(){var t=this;this.aiDetectSelectButton||(Ko(this.shadowHost.shadowRoot).find(".sapling-ai-detect-select-button").remove(),this.aiDetectSelectButton=Ko('\n <div class="sapling-ai-detect-select-button">\n <img src="'.concat(this.assetUrls["fa-hand-sparkles-solid"],'" style="height: 20px" />\n </div>\n ')),this.aiDetectSelectButton.hide(),Ko(this.shadowHost.shadowRoot).append(ea),Ko(this.shadowHost.shadowRoot).append(this.aiDetectSelectButton),Ko(this.contentShadowHost.shadowRoot).append(ea),this.aiDetectSelectContent=Ko('\n <div class="sapling-ai-detect-select-content">\n <div class="sapling-ai-detect-select-content-header">\n <div class="left">\n <img src="'.concat(this.assetUrls["sapling-logo-horizontal"],'" style="height: 20px" />\n <span style="margin-right: 10px;">AI Detector</span>\n <span class="sapling-ai-detect-select-analysis-mode" id="sapling-ai-detect-select-overall-analysis">\n Overall Analysis\n </span>\n <span class="sapling-ai-detect-select-analysis-mode inactive" id="sapling-ai-detect-select-sentence-analysis">\n Sentence-level Analysis\n </span>\n <span id="subscription-banner"></span>\n </div>\n <div class="right"></div>\n </div>\n <div class="sapling-ai-detect-select-content-body">\n <div class="sapling-ai-detect-select-overall">\n </div>\n <div class="sapling-ai-detect-select-score-string">\n <button class="sapling-ai-detect-select-edit-recheck">\n Re-check edited text\n </button>\n </div>\n <div class="sapling-ai-detect-select-sentences hidden">\n </div>\n <div class="sapling-ai-detect-select-error hidden">\n An unknown error has occurred.<br/>Please try again in some time, or contact support@sapling.ai\n </div>\n <div class="sapling-ai-detect-select-premium hidden">\n Please <a href="https://sapling.ai/pricing" target="_blank">subscribe</a> to access the AI Detection feature.\n </div>\n <div class="sapling-ai-detect-select-waiting">\n Processing your text, please wait...\n </div>\n </div>\n </div>\n ')),this.aiDetectSelectContent.hide(),Ko(this.contentShadowHost.shadowRoot).append(this.aiDetectSelectContent),this.aiDetectSelectContent[0].addEventListener("mousedown",(function(t){t.stopPropagation()})),this.aiDetectSelectContent[0].addEventListener("contextmenu",(function(t){t.stopPropagation()})),this.loadingIndicator=document.createElement("div"),Ko(this.loadingIndicator).html('<img src="'.concat(this.assetUrls["spinner-solid"],'" />')),Ko(this.loadingIndicator).addClass("sapling-ai-detect-select-spinner"),Ko(this.loadingIndicator).addClass("sapling-ai-detect-select-header-button"),Ko(this.aiDetectSelectContent).find(".right").append(this.loadingIndicator),this.cancelButton=document.createElement("div"),Ko(this.cancelButton).html('<img src="'.concat(this.assetUrls["xmark-solid"],'" />')),Ko(this.cancelButton).addClass("sapling-ai-detect-select-cancel"),Ko(this.cancelButton).addClass("sapling-ai-detect-select-header-button"),Ko(this.cancelButton).on("click",(function(){t.hide()})),Ko(this.aiDetectSelectContent).find(".right").append(this.cancelButton),Ko(document).keyup((function(e){"Escape"===e.key&&t.hide()})),this.scoreStrings=document.createElement("div"),Ko(this.scoreStrings).addClass("score-strings"),Ko(this.scoreStrings).attr("sapling-ignore","true"),Ko(this.scoreStrings).attr("contenteditable","true"),this.scoreStringsObserver=new MutationObserver((function(e,n){Ko(t.scoreStrings).is(".has-backend-response")?Ko(t.scoreStrings).removeClass("has-backend-response"):Ko(t.aiDetectSelectContent).find(".score-strings")[0].innerText.replace(/\n+/g,"\n\n")!=t.lastQueryText&&Ko(t.scoreStrings).find("span").css("background-color","white")})),this.scoreStringsObserver.observe(this.scoreStrings,{attributes:!0,childList:!0,subtree:!0,characterData:!0}),Ko(this.aiDetectSelectContent).find(".sapling-ai-detect-select-score-string").append(this.scoreStrings),this.aiDetectSelectButton[0].addEventListener("mousedown",(function(e){e.preventDefault(),Ko(t.aiDetectSelectContent).fadeIn(50),t._getAIDetectionScores(t._getSelectedText(),{source:"selected text"}),Et("ai_detect_select_overlay_visible_selected_text")})),Ko(this.aiDetectSelectContent).on("click",".sapling-ai-detect-select-edit-recheck",(function(e){t._getAIDetectionScores(Ko(t.aiDetectSelectContent).find(".score-strings")[0].innerText.replace(/\n+/g,"\n\n"),{source:"edited text"})})),Ko(this.aiDetectSelectContent).on("click",".sapling-ai-detect-select-analysis-mode",(function(e){Ko(t.aiDetectSelectContent).find(".sapling-ai-detect-select-analysis-mode").addClass("inactive"),Ko(e.target).removeClass("inactive"),Ko(e.target).is("#sapling-ai-detect-select-overall-analysis")?(Ko(t.aiDetectSelectContent).find(".sapling-ai-detect-select-overall").removeClass("hidden"),Ko(t.aiDetectSelectContent).find(".sapling-ai-detect-select-score-string").removeClass("hidden"),Ko(t.aiDetectSelectContent).find(".sapling-ai-detect-select-sentences").addClass("hidden")):(Ko(t.aiDetectSelectContent).find(".sapling-ai-detect-select-overall").addClass("hidden"),Ko(t.aiDetectSelectContent).find(".sapling-ai-detect-select-score-string").addClass("hidden"),Ko(t.aiDetectSelectContent).find(".sapling-ai-detect-select-sentences").removeClass("hidden"))})),to(Ko(this.aiDetectSelectContent).find("#subscription-banner")))}},{key:"_getSelectedText",value:function(){return document.getSelection().toString().replace(/\n+/g,"\n\n")}},{key:"showContent",value:function(t,e){Ko(this.aiDetectSelectContent).fadeIn(50),Ko(this.aiDetectSelectContent).find(".sapling-ai-detect-select-waiting").removeClass("hidden"),this._getAIDetectionScores(t.replace(/\n+/g,"\n\n").trim(),{source:e}),Et("ai_detect_select_overlay_visible_".concat(e.toLowerCase().replace(/\s+/g,"_")))}},{key:"show",value:function(){var t=this,e=this._getSelectedText().trim();!e||e.split(" ").length<50||setTimeout((function(){t.positionButton(),t.aiDetectSelectButton.fadeIn(50)}),200)}},{key:"hide",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.aiDetectSelectButton&&setTimeout((function(){t.aiDetectSelectButton.hide(),e||(t.aiDetectSelectContent.fadeOut(250),Ko(t.aiDetectSelectContent).find(".sapling-ai-detect-select-waiting").removeClass("hidden"),Ko(t.aiDetectSelectContent).find(".sapling-ai-detect-select-overall").html(""),Ko(t.aiDetectSelectContent).find(".sapling-ai-detect-select-sentences").html(""),Ko(t.aiDetectSelectContent).find(".sapling-ai-detect-select-score-string .score-strings").html(""))}),200)}}],n&&Zo(e.prototype,n),r&&Zo(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ra(){if(Se()){var t=function(){var t,e,n;if(Ko("sapling-ai-detect-controls").length)t=Ko("sapling-ai-detect-controls")[0],e=Ko("sapling-ai-detect-button")[0],n=ta.get(t);else{t=Ko("<sapling-ai-detect-controls></sapling-ai-detect-controls>")[0],e=Ko("<sapling-ai-detect-button></sapling-ai-detect-button>")[0];try{t.attachShadow({mode:"open"}),e.attachShadow({mode:"open"})}catch(t){return{aiDetectHost:null,buttonHost:null,aiDetectSelectButton:null}}Ko("html").append(t),Ko("html").append(e),n=new na(e,t),ta.set(t,n),n.createUIElements()}return{aiDetectHost:t,buttonHost:e,aiDetectSelectButton:n}}(),e=t.aiDetectSelectButton;if(e)"chat.openai.com"===window.location.hostname&&function(t){Ko(document.body).append("\n <style>\n .sapling-run-ai-detection-button {\n position: absolute;\n border: 2px solid #535f99;\n border-radius: 5px;\n width: 100%;\n font-size: 10pt;\n text-align: center;\n color: #535f99;\n top: 110%;\n background: white;\n cursor: pointer;\n transition: all 0.25s;\n }\n\n .sapling-run-ai-detection-button:hover {\n color: white;\n background: #535f99;\n }\n </style>\n "),setInterval((function(){document.querySelectorAll(".group.w-full.text-token-text-primary.bg-gray-50").forEach((function(e){if(e.querySelectorAll(".text-gray-400.flex button.rounded-md")&&!ia.get(e)){var n=e.innerText.replace(/^chatgpt\s+/i,"");if(!(n.trim().split(" ").length<50)){ia.set(e,n);var r=e.querySelector(".text-gray-400.flex");Ko(r).append('\n <div class="sapling-run-ai-detection-button">Detect AI</div>\n ');var i=document.createElement("div");Ko(i).html("Detect AI"),Ko(i).addClass("sapling-run-ai-detection-button"),Ko(i).on("click",(function(){n=e.querySelector(".markdown").innerText.replace(/^chatgpt\s+/i,""),t.showContent(n,"chat.openai.com generated")})),Ko(r).append(i)}}}))}),1e3)}(e)}}var ia=new WeakMap;var oa=n(563);function aa(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||sa(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sa(t,e){if(t){if("string"==typeof t)return ua(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ua(t,e):void 0}}function ua(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ca(t,e){var n=Fu(t);if(n){var r=n.edits,i=n.textAreaId,o=n.containerDomElement;if(r){var a=r[e];if(a){var s=a.edit,u=a.editRange,c=s.replacementText,l={is_premium:s.premium};At(s.editHash,!0,t,l),i?function(t,e,n){t in nn&&fn(nn[t].textArea,e.startOffset,e.endOffset,n)}(i,u,c):gn(u,c,o),hu(t,e)}}ma(),Au()}}function la(t,e){var n=Fu(t);if(n){var r=n.edits;if(r){var i=r[e];if(i){var o=i.edit,a={is_premium:o.premium};At(o.editHash,!1,t,a),function(t,e){if(t in Ho)for(var n=Ho[t],r=Object.keys(n),i=0;i<r.length;i+=1){var o=r[i];n[o].edits&&delete n[o].edits[e]}}(t,e),hu(t,e)}}ma(),Au(),ru(t)}}function fa(){if(oa("sapling-rephrase-controls").length)return[oa("sapling-rephrase-controls")[0],oa("sapling-rephrase-button")[0]];var t=oa("<sapling-rephrase-controls></sapling-rephrase-controls>");t.css({zIndex:"2147483647",font:'11pt "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif',position:"absolute"});var e=t[0],n=oa("<sapling-rephrase-button></sapling-rephrase-button>")[0];return e.attachShadow({mode:"open"}),n.attachShadow({mode:"open"}),oa("html").append(e),oa("html").append(n),[e,n]}function pa(){var t=oa("sapling-rephrase-controls")[0],e=oa("sapling-rephrase-button")[0];if(t&&e&&t.shadowRoot&&e.shadowRoot){var n=aa(Qr(t,e),2),r=n[0],i=n[1];r.hideControls(),$r()||i.hide()}}function da(){if(Ae()){var t=aa(fa(),2),e=Qr(t[0],t[1])[1];if(Br())$r()?e.show():e.hide();else e.hide()}}var ha=n(563),ga=null,va=500,ya=null;function ma(){ha("#active-edit",ya).removeAttr("id"),ha("#active-edit",ya).removeAttr("sapling-edit-id"),ha("#active-edit",ya).removeAttr("sapling-container-id"),ha(h.CONTROL_ELEMENT).remove(),Au()}function ba(t,e){!function(t,e){ca(t,e)}(t,e.editId)}function Da(t,e){la(t,e.editId)}function wa(t){!function(t){var e=Qs[t];if(!e)return;if(!e.annotationsOverlay)return;e.annotationsOverlay.hideEdits()}(t),ma()}function xa(){window.open("".concat(h.WEBSITE_URL,"/plans#trial_pro_edit_click"))}function Ea(){window.open("".concat("https://sapling.ai","/user/sign-in#edit_click"))}function Aa(t,e){if(e.category&&("SDK"===h.MODE&&Sapling.autoShowAdvancedEdits||ha("#snooze-row",ya).show(),ha("#type-text",ya).html(e.category.replace(/_/g," ")),ha(".icon-sapling-type",ya).addClass(e.category),"voice"!==e.category&&"hard_to_read"!==e.category||(ha("#text-row",ya).hide(),ha("#accept-row",ya).hide()),e.description)){ha("#description-text",ya).text(e.description);var n=Math.min(e.description.length,35)/35*220;ha("#description-text",ya).css("min-width",n),ha("#description-row",ya).css("display","flex")}}function _a(){(function(){if(Zs&&Zs.containerId in Qs){var t=Qs[Zs.containerId].edits;if(!(Zs.editId in t))return!0;var e=t[Zs.editId].editRange;if(!Q(e.startContainer)||!Q(e.endContainer))return!0}return!1})()&&ma()}function Sa(t,e,n,r){var i,o;clearTimeout(ga),ha("#active-edit",ya).removeAttr("id"),function(){if(!ha(h.CONTROL_ELEMENT).length){var t=document.createElement(h.CONTROL_ELEMENT);ha(t).css({zIndex:"2147483647",font:'12pt "Helvetica Neue", Helvetica, Arial, sans-serif',position:"absolute",textAlign:"center"}),ha("html").append(t),t.attachShadow({mode:"open"}),ya=t.shadowRoot,ha(h.CONTROL_ELEMENT).hide();var e="Ignore",n="Accept",r='<style type="text/css">\n\n#sapling-edit-controls {\n border-radius: 6px;\n}\n\n.edit-controls-row {\n overflow: hidden;\n}\n\n#accept-text, #ignore-text, #snooze-text {\n line-height: 2em;\n}\n\n.icon-sapling-accept, .icon-sapling-reject {\n width: 36px;\n}\n\n#accept-button, #ignore-button, #explanations, #snooze-button {\n background-color: #fff;\n align-items: center;\n justify-content: left;\n width: 100%;\n}\n\n#accept-text, #snooze-text, .icon-sapling-accept {\n color: #6C3082;\n}\n\n#ignore-row,\n#description-row,\n#snooze-row {\n border-top: 0.5px solid #ECECEC;\n}\n\n#accept-button:hover, #ignore-button:hover, #explanations:hover, #snooze-button:hover {\n background-color: #ECECEC;\n}\n\n#accept-button:focus, #ignore-button:focus, #explanations:focus, #snooze-button:focus {\n outline: none;\n background-color: #ECECEC;\n}\n#accept-button:active, #ignore-button:active, #explanations:active, #snooze-button:active {\n background-color: #DDD;\n}\n\n.icon-sapling-description {\n padding: 0px 8px 0px 4px;\n display: flex;\n align-items: center;\n}\n\n.icon-sapling-description:before {\n font-family: \'icomoon\' !important;\n color: #ffc107;\n content: "\\f071";\n}\n#description-row {\n padding: 8px;\n}\n#description-text {\n margin-left: 2px;\n}\n </style>',i="";"SDK"===h.MODE&&(e=Sapling.appearance.variables.ignoreText,n=Sapling.appearance.variables.acceptText,Sapling.appearance.compact||(r='<style type="text/css">\n\n#sapling-edit-controls #type-row,\n#sapling-edit-controls #text-row,\n#sapling-edit-controls #description-row {\n display: flex;\n}\n\n#sapling-edit-controls {\n position: relative;\n padding: 15px 20px;\n border-radius: 10px;\n min-width: 210px;\n box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12);\n}\n\n#accept-row,\n#ignore-row {\n border: none;\n position: absolute;\n bottom: 15px;\n user-select: none;\n}\n\n#accept-row {\n left: 20px;\n}\n\n#ignore-row {\n right: 20px;\n}\n\n.icon-sapling-accept,\n.icon-sapling-reject {\n width: 24px;\n}\n\n.icon-sapling-accept,\n#accept-text {\n color: white;\n}\n\n#accept-text,\n#ignore-text {\n padding: 0px;\n padding-right: 8px;\n padding-left: 4px;\n}\n\n#accept-button,\n#ignore-button {\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 33px;\n padding: 7px 5px;\n border-radius: 10px;\n transition: all .15s ease;\n}\n\n#accept-button {\n border: none;\n background-color: #6C3082;\n}\n\n#accept-button:hover,\n#ignore-button:hover {\n transform: translateY(-1px);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.32);\n max-height: none;\n}\n\n#accept-button:active,\n#ignore-button:active {\n transform: translateY(0px);\n}\n\n#ignore-button {\n border: 1px solid #A9A9A9;\n background-color: transparent;\n color: #657786;\n}\n\n#description-text {\n font-size: 0.9em;\n line-height: 1.5em;\n color: #666;\n margin-bottom: 50px;\n}\n\n </style>'),Sapling.appearance.customCSS&&(i=Sapling.appearance.customCSS)),ha(ya).html("\n ".concat('<style type="text/css">\n#sapling-edit-controls {\n z-index: 2147483647 !important;\n background-color: #fff;\n color: #333;\n border: 0.5px solid #ECECEC;\n overflow: hidden;\n}\n.edit-controls-row {\n max-width: 500px;\n display: flex;\n}\n#explanations {\n font-size: 14px;\n color: #8f8f8f;\n padding: 7px 12px 0px 12px;\n}\n#accept-button, #ignore-button {\n line-height: 1.1em;\n}\n#accept-button, #ignore-button, #explanations, #snooze-button {\n cursor: pointer;\n}\n\n#premium-button {\n cursor: pointer;\n background-color: #ffc107;\n}\n#premium-button:hover {\n background-color: #ffb006;\n}\n#accept-button {\n float: left;\n}\n\n.sapling-right-arrow {\n color:red;\n}\n\n.icon-sapling-right-arrow {\n background-image: url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="sapling-right-arrow"><polygon points="8.59,16.59 13.17,12 8.59,7.41 10,6 16,12 10,18 8.59,16.59" fill="%23A9A9A9"/><polygon points="3,13 13,13 13,11 3,11" fill="%23A9A9A9"/></svg>\');\n background-size: 24px 24px;\n background-position: center;\n background-repeat: no-repeat;\n width: 24px;\n height: 24px;\n margin-left: 5px;\n}\n\n.icon-sapling-accept, .icon-sapling-reject {\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 16px;\n}\n\n#snooze-text {\n font-size: 14px;\n}\n#accept-button, #ignore-button, #premium-button, #snooze-button {\n display: flex;\n}\n#ignore-text, #snooze-text, .icon-sapling-reject {\n color: #A9A9A9;\n}\n\n#accept-text, #ignore-text, #snooze-text {\n display: table-cell;\n text-align: left;\n white-space: nowrap;\n padding-right: 8px;\n}\n#description-row {\n display: flex;\n font-size: 12px;\n color: #8f8f8f;\n}\n\n#description-text {\n flex-grow: 1;\n width: min-content;\n text-align: left;\n}\n#premium-text {\n padding: 4px 8px 4px 8px;\n line-height: 1.2em;\n font-size: 90%;\n color: #fff;\n}\n\n.advanced-edit {\n color: #d4af37;\n text-decoration: none;\n}\n.register-edit {\n color: #6C3082;\n text-decoration: none;\n font-weight: 500;\n}\n/* need icon-sapling- because sites like trello use icomoon too */\n[class^="icon-sapling-"], [class*=" icon-sapling-"] {\n /* use !important to prevent issues with browser extensions that change fonts */\n font-family: \'icomoon\' !important;\n speak: none;\n font-style: normal;\n font-weight: normal;\n font-variant: normal;\n text-transform: none;\n line-height: 1;\n\n /* Better Font Rendering =========== */\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n#type-row,\n#text-row,\n#description-row,\n#snooze-row,\n#premium-banner-row\n{\n display: none;\n}\n\n.icon-sapling-accept:before {\n font-family: \'icomoon\' !important;\n content: "\\f00c";\n}\n.icon-sapling-close:before {\n font-family: \'icomoon\' !important;\n content: "\\f00d";\n}\n.icon-sapling-remove:before {\n font-family: \'icomoon\' !important;\n content: "\\f00d";\n}\n.icon-sapling-reject:before {\n font-family: \'icomoon\' !important;\n content: "\\f00d";\n}\n\n#type-row,\n#text-row {\n margin-bottom: 10px;\n}\n\n#type-text {\n text-transform: uppercase;\n font-size: 10px;\n color: #A9A9A9;\n}\n\n#original-text-row,\n#replacement-text-row,\n#text-row {\n align-items: center;\n}\n\n#original-text-row,\n#replacement-text-row {\n max-width: 200px;\n word-wrap: break-word;\n}\n\n#text-row {\n justify-content: flex-start;\n}\n\n#description-text:empty {\n margin-bottom: 40px;\n}\n\n.icon-sapling-type {\n border-radius: 50%;\n display: inline-block;\n vertical-align: middle;\n}\n\n.grammar,\n.spelling,\n.punctuation,\n.fluency,\n.other,\n.voice,\n.adverbs,\n.simplifications,\n.hard_to_read,\n.qualifiers,\n.profanity,\n.dei\n{\n width: 6px;\n height: 6px;\n margin: 3px;\n background-color: #6C3082;\n}\n\n </style>',"\n ").concat(r,'\n <style type="text/css">\n ').concat(i,'\n </style>\n <div id="sapling-edit-controls">\n\n <div id="type-row">\n <div class="icon-sapling-type"></div>\n <div id="type-text"></div>\n </div>\n\n <div id="text-row">\n <div id="original-text-row">\n <div class="icon-sapling-original-text"></div>\n <div id="original-text"></div>\n </div>\n\n <div class="icon-sapling-right-arrow"></div>\n\n <div id="replacement-text-row">\n <div class="icon-sapling-replacement-text"></div>\n <div id="replacement-text"></div>\n </div>\n </div>\n\n <div id="accept-row" class="edit-controls-row">\n <div id="accept-button" tabindex="0">\n <div class="icon-sapling-accept"></div>\n <div id="accept-text">').concat(n,'</div>\n </div>\n </div>\n\n <div id="ignore-row" class="edit-controls-row">\n <div id="ignore-button" tabindex="0">\n <div class="icon-sapling-reject"></div>\n <div id="ignore-text">').concat(e,'</div>\n </div>\n </div>\n\n <div id="description-row" class="edit-controls-row">\n <div class="icon-sapling-description"></div>\n <div id="description-text"></div>\n </div>\n\n <div id="snooze-row" class="edit-controls-row">\n <div id="snooze-button" tabindex="0">\n <div class="icon-sapling-reject"></div>\n <div id="snooze-text">Hide Advanced Edits</div>\n </div>\n </div>\n\n <div id="premium-banner-row" class="edit-controls-row">\n <div id="premium-button" tabindex="0">\n <div id="premium-text">\n Your trial ends in 1 day\n </div>\n </div>\n </div>\n\n <span id="hide-control" tabindex="0"></span>\n </div>')),ha("#hide-control",ya).focus((function(t){t.preventDefault(),t.stopPropagation();var e=Tu(ha(h.CONTROL_ELEMENT).attr("sapling-container-id")),n=U(e);n&&(e=on(n)),ma(),e.focus()}))}}(),ha("#accept-button",ya).off("click mousedown keyup"),ha("#ignore-button",ya).off("click mousedown keyup"),ha("#snooze-button",ya).off("click mousedown keyup"),ha("#premium-button",ya).off("click mousedown keyup"),ha("#type-text",ya).html(""),ha("#description-text",ya).html(""),ha("#snooze-row",ya).hide(),ha("#accept-row",ya).show(),ha("#ignore-row",ya).show(),ha("#text-row",ya).hide(),ha("#description-row",ya).hide(),ha(".icon-sapling-type",ya).attr("class","icon-sapling-type"),"SDK"!==h.MODE||Sapling.appearance.compact||(ha("#text-row",ya).css("display","flex"),ha("#description-row",ya).show()),"SDK"===h.MODE?function(t,e){var n=e.replacementText,r=e.originalText;""===e.replacementText?n="<del> ".concat(e.originalText," </del>"):r="<del> ".concat(e.originalText," </del>");var i=ha("#accept-button",ya);i.click((function(){return ba(t,e)})),i.keyup((function(n){"Enter"===n.key?ba(t,e):"ArrowDown"===n.key&&ha("#ignore-button",ya).focus()})),ha("#type-text",ya).html(e.generalErrorType),ha("#original-text",ya).html(r),ha("#replacement-text",ya).html(n),ha("#description-text",ya).html(e.description);var o=e.generalErrorType;o&&(o=o.split(" ")[0].split("/")[0].toLowerCase()),ha(".icon-sapling-type",ya).addClass(o),e.premium&&null==e.replacementText&&(ae()?(n="[Sign in to see premium edit]",i.off("click").click(Ea),i.off("keyup")):se()||(n="[Confirm email to see premium edit]",i.off("click").click(Ea),i.off("keyup")),n="[Pro Edit: Only in Sapling Pro]",i.off("click").click(xa),i.off("keyup")),Sapling.appearance.compact?ha("#accept-text",ya).html(n):ha("#accept-text",ya).html(Sapling.appearance.variables.acceptText),Aa(0,e)}(t,e):function(t,e){var n=e.replacementText;""===e.replacementText&&(n="<del> ".concat(e.originalText," </del>"));var r=ha("#accept-button",ya);r.click((function(){return ba(t,e)})),r.keyup((function(n){"Enter"===n.key?ba(t,e):"ArrowDown"===n.key&&ha("#ignore-button",ya).focus()})),m()===h.WEBSITE_HOSTNAME||(ae()&&(e.requireLogin||e.premium)?(n="[Sign in to see premium edit]",r.off("click").click(Ea),r.off("keyup")):e.premium&&(se()?ue()||(n="[Pro Edit: Only in Sapling Pro]",r.off("click").click(xa),r.off("keyup")):(n="[Confirm email to see premium edit]",r.off("click").click(Ea),r.off("keyup")))),ha("#accept-text",ya).html(n),Aa(0,e)}(t,e),function(t,e){ha("#accept-button",ya).mousedown((function(t){t.stopPropagation(),t.preventDefault()})),ha("#ignore-button",ya).mousedown((function(t){t.stopPropagation(),t.preventDefault()})),ha("#snooze-button",ya).mousedown((function(t){t.stopPropagation(),t.preventDefault()})),ha("#premium-button",ya).mousedown((function(t){t.stopPropagation(),t.preventDefault()})),ha("#ignore-button",ya).click((function(){return Da(t,e)})),ha("#premium-button",ya).click(xa),ha("#snooze-button",ya).click((function(){return wa(t)})),ha("#ignore-button",ya).keyup((function(n){"Enter"===n.key?(Da(t,e),Tu(t).focus()):"ArrowUp"===n.key&&ha("#accept-button",ya).focus()}))}(t,e),i=e.premium,null!==(o=ge())&&i&&o<4?(1===o?ha("#premium-text",ya).html("Your trial ends in 1 day"):o<4&&ha("#premium-text",ya).html("Your trial ends in ".concat(o," days")),ha("#premium-banner-row",ya).show()):ha("#premium-banner-row",ya).hide(),ha(h.CONTROL_ELEMENT).attr("sapling-edit-id",e.editId),ha(h.CONTROL_ELEMENT).attr("sapling-container-id",t);var a=n[0];if(ha(a).attr("id","active-edit"),a){var s=a.getBoundingClientRect(),u=s.left-18;u=Math.min(u,window.innerWidth+window.scrollX-ha(h.CONTROL_ELEMENT).width()-16),u=Math.max(u,8);for(var c=s.top+ha(a).height(),l=1;l<n.length;l++){var f=n[l],p=f.getBoundingClientRect().top+ha(f).height();p>c&&(c=p)}var d=c+window.scrollY;if(d+ha(h.CONTROL_ELEMENT).height()>window.innerHeight+window.scrollY){var g=s.top-ha(h.CONTROL_ELEMENT).height()+window.scrollY;g>=0&&(d=g)}if("SDK"===h.MODE){var v=Ze(a);u+=v.x,d+=v.y}var y=function(t){var e,n=F(t),r={height:(e=n).clientHeight,width:e.clientWidth},i=A(n).offset();return{top:i.top,bottom:i.top+r.height,left:i.left,right:i.left+r.width}}(F(r));ha(h.CONTROL_ELEMENT).data("bounds",y),ha(h.CONTROL_ELEMENT).data("defaultHeight",ha(h.CONTROL_ELEMENT).outerHeight()),ha(h.CONTROL_ELEMENT).data("defaultOrigin",{left:u,top:d}),ha(h.CONTROL_ELEMENT).css({left:u,top:d}),ha(h.CONTROL_ELEMENT).fadeIn(200),Et("hover_on",{is_premium:e.premium},t),function(){var t=oa(h.CONTROL_ELEMENT).attr("sapling-container-id"),e=oa(h.CONTROL_ELEMENT).attr("sapling-edit-id"),n=Fu(t);if(n){var r=n.edits;if(r){var i=r[e];if(i){var o=i.edit,a={is_premium:o.premium};At(o.editHash,null,t,a,!0)}}}}()}}function Ca(){ga&&(clearTimeout(ga),ga=null),ga=setTimeout(ma,va)}function ka(t){return t.match(/^[0-9a-z]+$/)}function Oa(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=k(t.toString()),i=k(e.startText),o=k(e.endText),a=r.substring(0,i.length),s=r.substring(r.length-o.length);if(a!==i||s!==o)return n&&"Incorrect inner text |".concat(a,"|!=|").concat(i,"||").concat(s,"|!=|").concat(o,"|"),!1;if(function(t,e){return!(void 0===t||t.length<=e||0===e)&&ka(k(t.substr(e,1)))&&ka(k(t.substr(e-1,1)))}(t.endContainer.data,t.endOffset)){var u=Le();return u&&(u=u.toLowerCase()),"jp"===u||"zh"===u||"ko"===u||"ar"===u}return!0}var Ta={voice:{"background-image":"linear-gradient(to right, rgba(22, 112, 49, 0.8), rgb(22, 112, 49, 0.8))","background-color":"rgba(22, 112, 49, 0.2)"},adverbs:{"background-image":"linear-gradient(to right, rgba(0, 170, 193, 0.8), rgba(0, 170, 193, 0.8))","background-color":"rgba(0, 170, 193, 0.2)"},simplifications:{"background-image":"linear-gradient(to right, rgba(51, 146, 255, 0.8),rgba(51, 146, 255, 0.8))","background-color":"rgba(51, 146, 255, 0.2)"},qualifiers:{"background-image":"linear-gradient(to right, rgba(35, 62, 143, 0.8),rgba(35, 62, 143, 0.8))","background-color":"rgba(35, 62, 143, 0.2)"},dei:{"background-image":"linear-gradient(to right, rgba(111, 39, 153, 0.8),rgba(111, 39, 153, 0.8))","background-color":"rgba(111, 39, 153, 0.2)"},profanity:{"background-image":"linear-gradient(to right, rgba(111, 39, 153, 0.8),rgba(111, 39, 153, 0.8))","background-color":"rgba(111, 39, 153, 0.2)"},hard_to_read:{"background-image":"linear-gradient(to right, rgba(255, 0, 0, 0.2), rgba(255, 0, 0, 0.2))","background-image2":"linear-gradient(to right, rgba(255, 255, 50, 0.4), rgba(255, 255, 50, 0.4))","background-color":"rgba(255, 100, 100, 0.2)","background-color2":"rgba(255, 255, 200, 0.2)"}};function Fa(){return'<style type="text/css">\n .sapling-edit {\n position: absolute;\n box-sizing: content-box;\n display: inline;\n min-width: 0.5em;\n opacity: 0.85;\n background-position: 0px calc(100% + 1px);\n background-repeat: no-repeat;\n background-size: calc(100% + 1px) 2px;\n border-bottom: 2px solid transparent;\n background-image: linear-gradient(to right, #ff0000, #ff0000);\n }\n\n .sapling-edit:hover {\n background-color: #ffb2b2;\n background-image: linear-gradient(to right, #ffb2b2, #ffb2b2);\n -webkit-transition: background-color 200ms linear;\n -ms-transition: background-color 200ms linear;\n transition: background-color 200ms linear;\n }\n</style>'}var ja=n(563);function La(t){return La="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},La(t)}function Ia(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(i=r.key,o=void 0,o=function(t,e){if("object"!==La(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==La(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===La(o)?o:String(o)),r)}var i,o}var Na=function(){function t(e,n,r,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.draggableJq=e,this.dragJq=n||e,this.ignoreJqSelector=r,this.ignoreScroll=i,this.dragMove=this.dragMove.bind(this),this.dragMouseUp=this.dragMouseUp.bind(this),this.dragMouseDown=this.dragMouseDown.bind(this),this.posX=0,this.posY=0,this.dragJq.on("mousedown",this.dragMouseDown),window.addEventListener("mouseup",this.dragMouseUp,!1)}var e,n,r;return e=t,(n=[{key:"dragMove",value:function(t){var e=t.clientY+this.posY,n=t.clientX+this.posX;this.ignoreScroll||(e+=window.scrollY,n+=window.scrollX),this.draggableJq.css({top:e,left:n,bottom:"",right:""})}},{key:"dragMouseUp",value:function(){window.removeEventListener("mousemove",this.dragMove,!0),this.dragJq.css({cursor:"grab"})}},{key:"dragMouseDown",value:function(t){if(!this.ignoreJqSelector||!ja(t.target).is(this.ignoreJqSelector)){t.preventDefault();var e=this.draggableJq[0].getBoundingClientRect();this.posX=e.left-t.clientX,this.posY=e.top-t.clientY,window.addEventListener("mousemove",this.dragMove,!0),this.dragJq.css({cursor:"grabbing"})}}}])&&Ia(e.prototype,n),r&&Ia(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Ba=n(563);function Ra(t){return Ra="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ra(t)}function Pa(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||Ma(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ma(t,e){if(t){if("string"==typeof t)return Ha(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ha(t,e):void 0}}function Ha(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function qa(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(i=r.key,o=void 0,o=function(t,e){if("object"!==Ra(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Ra(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===Ra(o)?o:String(o)),r)}var i,o}var Ua=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.containerId=e,this.annotationsOverlay=n,this.summaryWrapper=null,this.summaryList=null,this.annotationsSpinner=null,this.annotationsError=null,this.shadowRoot=null,this.summaryAnnotationsContainer=null,this.summaryDragger=null,this.annotationsCache=[],this.statisticsCache={}}var e,n,r;return e=t,n=[{key:"handleDismiss",value:function(t){1===t.which&&this.annotationsOverlay.hideSummaryAnnotations()}},{key:"maybeEmbedSaplingSummaryAnnotations",value:function(){var t=Ba("sapling-summary-annotations");if(t.length&&(this.summaryAnnotationsContainer||(this.summaryAnnotationsContainer=t.first(),this.shadowRoot=this.summaryAnnotationsContainer[0].shadowRoot)),!this.summaryAnnotationsContainer){this.summaryAnnotationsContainer=Ba("<sapling-summary-annotations>\n </sapling-summary-annotations>");var e="\n ".concat('<style type="text/css">\n\n/* Structures */\n\n.summary-annotations-wrapper {\n width: 400px;\n min-height: 80px;\n opacity: 0.9;\n background-color: #fff;\n box-shadow: 0 1px 2px 0 rgb(65 69 73 / 30%), 0 3px 6px 2px rgb(65 69 73 / 15%);\n border-radius: 8px;\n font: 9pt helvetica, arial;\n}\n\n.annotations-dismiss {\n cursor: pointer;\n margin-left: auto;\n position: absolute;\n right: 0px;\n top: -1px;\n width: 1.5em;\n height: 1.5em;\n line-height: 1.5em;\n text-align: center;\n user-select: none;\n font-size: 14px;\n font-weight: 700;\n border-radius: 50%;\n color: rgba(110, 115, 128, 0.95);\n transition: all .15s ease;\n}\n\n.summary-annotations {\n display: block;\n padding: 0.5em;\n padding-bottom: 0;\n}\n.sapling-summary-annotation {\n background-color: #eef;\n padding: 5px;\n border-radius: 5px;\n margin-bottom: 0.5em;\n}\n.sapling-annotation-count {\n display: inline-block;\n padding: 5px 10px;\n border-radius: 3px;\n background-color: #6200ea;\n color: #fff;\n font-weight: bold;\n}\n\n\n/* begin toggle css */\n\n.sapling-annotation-toggle.switch {\n position: relative;\n display: inline-block;\n width: 28px;\n height: 18px;\n border-radius: 3px;\n}\n\n.sapling-annotation-toggle.switch input {\n opacity: 0;\n width: 0;\n height: 0;\n}\n\n.sapling-annotation-toggle .slider {\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: #ccc;\n -webkit-transition: .4s;\n transition: .4s;\n border-radius: 3px;\n}\n\n.sapling-annotation-toggle .slider:before {\n position: absolute;\n content: "";\n height: 10px;\n width: 10px;\n left: 4px;\n bottom: 4px;\n background-color: white;\n -webkit-transition: .4s;\n transition: .4s;\n border-radius: 3px;\n}\n\n.sapling-annotation-toggle input:checked + .slider {\n background-color: #6200ea;\n}\n\n.sapling-annotation-toggle input:focus + .slider {\n box-shadow: 0 0 1px #2196F3;\n}\n\n.sapling-annotation-toggle input:checked + .slider:before {\n -webkit-transform: translateX(10px);\n -ms-transform: translateX(10px);\n transform: translateX(10px);\n}\n\n/* end toggle css */\n\n.sapling-annotation-toggle-row {\n width: 200px;\n margin-bottom: 10px;\n padding-left: 5px;\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.sapling-annotation-explanation .toggle-text {\n left-margin: 5px;\n cursor: pointer;\n padding-left: 4px;\n padding-top: 8px;\n padding-bottom: 8px;\n padding-right: 8px;\n}\n\n.sapling-annotation-type {\n display: inline-block;\n padding: 5px 10px;\n border-radius: 3px;\n align-items:center;\n color: #fff;\n font-weight:bold;\n}\n.sapling-annotation-explanation {\n display: inline;\n padding: 5px;\n line-height: 1.5em;\n}\n.sapling-annotations-error {\n padding: 0.2em 0.4em;\n background-color: #ffebee;\n text-align: right;\n color: #d32f2f;\n}\n\n\n/* Spinner */\n\n.sapling-annotations-spinner {\n position: absolute;\n right: 5px;\n bottom: 5px;\n display: inline-block;\n}\n.sapling-annotations-spinner img {\n display: block;\n height: 12px;\n width: 12px;\n\n animation-name: spin;\n animation-duration: 1500ms;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n}\n@keyframes spin {\n from {\n transform:rotate(0deg);\n }\n to {\n transform:rotate(360deg);\n }\n}\n\n/* Statistics */\n\ndiv.dl-cols {\n display: grid;\n padding: 1em 1em 0.5em 1em;\n grid-template-columns: max-content auto;\n}\ndl {\n display: grid;\n grid-template-columns: max-content auto;\n margin: 0;\n line-height: 1.5;\n}\ndt {\n font-weight: bold;\n grid-column-start: 1;\n}\ndd {\n grid-column-start: 2;\n}\ndl + dl {\n margin-left: 4em;\n}\n</style>','\n <div class="summary-annotations-wrapper">\n <span class="annotations-dismiss">\xd7</span>\n <div class="dl-cols">\n <dl>\n <dt>Characters</dt>\n <dd class="summary-chars">-</dd>\n <dt >Words</dt>\n <dd class="summary-words">-</dd>\n <dt>Sentences</dt>\n <dd class="summary-sentences">-</dd>\n </dl>\n <dl>\n <dt>Readability (Grade)</dt>\n <dd class="summary-readability">-</dd>\n <dt>Reading Time (min)</dt>\n <dd class="summary-reading_time_min">- min</dd>\n <dt> </dt>\n <dd> </dd>\n </dl>\n </div>\n <div class="summary-annotations">\n </div>\n <div class="sapling-annotations-error"></div>\n <div class="sapling-annotations-spinner" style=""><img src="').concat(Ye("assets/fa-spinner-solid.svg"),'" /></div>\n </div>');this.summaryAnnotationsContainer[0].attachShadow({mode:"open"}),this.shadowRoot=this.summaryAnnotationsContainer[0].shadowRoot,Ba(this.shadowRoot).html(e),Ba("html").append(this.summaryAnnotationsContainer)}this.summaryWrapper=Ba(this.shadowRoot).find(".summary-annotations-wrapper").first(),this.summaryList=Ba(this.shadowRoot).find(".summary-annotations").first(),this.annotationsSpinner=Ba(this.shadowRoot).find(".sapling-annotations-spinner").first(),this.annotationsError=Ba(this.summaryWrapper).find(".sapling-annotations-error").first(),Ba(this.summaryWrapper).find(".annotations-dismiss").on("mousedown",this.handleDismiss.bind(this)),this.annotationsError.hide(),this.summaryDragger=new Na(this.summaryWrapper,this.summaryWrapper,null,!1)}},{key:"summaryVisible",value:function(){return this.summaryAnnotationsContainer.attr("container-id")===this.containerId}},{key:"showSummary",value:function(t){this.summaryAnnotationsContainer&&(this.updateAnnotationsDOM(),this.summaryAnnotationsContainer.attr("container-id",this.containerId),this.updateToggle(t),this.summaryAnnotationsContainer.show())}},{key:"hideSummary",value:function(){this.summaryAnnotationsContainer&&(this.summaryAnnotationsContainer.hide(),this.summaryAnnotationsContainer.attr("container-id",""))}},{key:"buildSummaryElement",value:function(t,e,n){var r=Ta[t]["background-color"].replace("0.2)","1.0)"),i=t.replaceAll(" ","-"),o=t.replaceAll("_"," ");return"dei"===o&&(o="DEI"),Ba('\n <div class="sapling-summary-annotation">\n <span class="sapling-annotation-count">'.concat(e,'</span>\n <span class="sapling-annotation-type ').concat(i,'" style="background-color: ').concat(r,';">').concat(o,'</span>\n <span class="sapling-annotation-explanation">\n ').concat(n,"\n </span>\n </div>\n "))}},{key:"setSummaryAnnotations",value:function(t){this.annotationsCache=t,this.summaryVisible()&&this.updateAnnotationsDOM()}},{key:"setStatistics",value:function(t){this.statisticsCache=t,this.summaryVisible()&&this.updateAnnotationsDOM()}},{key:"updateAnnotationsDOM",value:function(){if(this.summaryWrapper)for(var t=0,e=Object.entries(this.statisticsCache);t<e.length;t++){var n=Pa(e[t],2),r=n[0],i=n[1];this.summaryWrapper.find(".summary-".concat(r)).text(i)}this.clear(),this.annotationsError.hide();var o,a=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Ma(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(this.annotationsCache);try{for(a.s();!(o=a.n()).done;){var s=o.value,u=this.buildSummaryElement(s.type,s.count,s.explanation);this.summaryList.append(u)}}catch(t){a.e(t)}finally{a.f()}"SDK"===h.MODE&&Sapling.freemium&&!Ie()||(this.summaryList.append(Ba('\n <div>\n <label class="sapling-annotation-toggle-row">\n <div class="sapling-annotation-toggle switch">\n <input type="checkbox">\n <span class="slider"></span>\n </div>\n <span class="sapling-annotation-explanation">\n <span class="toggle-text">Hide Advanced Edits</span>\n </span>\n </label>\n </div>\n ')),Ba("input",this.summaryList).change(this.editsToggled.bind(this)))}},{key:"editsToggled",value:function(t){var e=t.currentTarget.checked;this.updateToggle(e),e?this.annotationsOverlay.showEdits():this.annotationsOverlay.hideEdits()}},{key:"updateToggle",value:function(t){Ba("input",this.summaryList).prop("checked",t),t?Ba(".toggle-text",this.summaryList).text("Advanced Edits Shown"):Ba(".toggle-text",this.summaryList).text("Advanced Edits Hidden")}},{key:"clear",value:function(){this.summaryList&&this.summaryList.html("")}},{key:"setErrorStatus",value:function(t){this.annotationsError.text(t),this.annotationsError.show()}},{key:"showSpinner",value:function(){this.annotationsSpinner&&this.annotationsSpinner.show()}},{key:"hideSpinner",value:function(){this.annotationsSpinner&&this.annotationsSpinner.hide()}}],n&&qa(e.prototype,n),r&&qa(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),za=n(563);function Wa(t){return Wa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wa(t)}function Ga(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Ya(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ya(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Ya(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function $a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(i=r.key,o=void 0,o=function(t,e){if("object"!==Wa(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Wa(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===Wa(o)?o:String(o)),r)}var i,o}var Va=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.containerId=e,this.shadowHost=n,this.annotationsContainer=null,this.summaryAnnotations=null,this.annotationsAlwaysVisible=!1,this.editsVisible=!0,this.annotationEditInfos={},this.lastQueryText=null}var e,n,r;return e=t,(n=[{key:"createUIElements",value:function(){if(pe()){be()||(this.editsVisible=!1);var t=this.shadowHost.shadowRoot;this.annotationsContainer=za(".sapling-annotations-container",t),this.annotationsContainer.length||(this.annotationsContainer=za('\n <div class="sapling-annotations-container">\n </div>\n ')),za(t).append(this.annotationsContainer),this.summaryAnnotations||(this.summaryAnnotations=new Ua(this.containerId,this),this.summaryAnnotations.maybeEmbedSaplingSummaryAnnotations()),this.hideSummaryAnnotations(),"SDK"===h.MODE&&Sapling.autoShowAdvancedEdits&&(this.annotationsAlwaysVisible=!0)}}},{key:"positionAnnotations",value:function(){var t=this.shadowHost.getBoundingClientRect(),e=this.summaryAnnotations.summaryWrapper,n=t.left+window.scrollX+t.width-e.width()-6,r=t.bottom+window.scrollY-e.height()-25;r=Math.max(r,20),n=Math.max(n,0),e.css({position:"absolute",left:n,top:r})}},{key:"updateAnnotationSummary",value:function(){for(var t={},e=0,n=Object.values(this.annotationEditInfos);e<n.length;e++){var r=n[e],i=r.edit.category;if(i){var o=r.edit.description;t[i]||(t[i]={type:i,count:0,explanation:o}),t[i].count++}}this.summaryAnnotations.setSummaryAnnotations(Object.values(t)),this.positionAnnotations(),this.summaryAnnotations.updateToggle(this.editsVisible)}},{key:"updateAnnotationForOverlay",value:function(t,e){this.annotationEditInfos[t]=e;var n,r=Ga(e.domElements);try{for(r.s();!(n=r.n()).done;){var i=n.value;this.annotationsAlwaysVisible||this.editsVisible?za(i).show():za(i).hide()}}catch(t){r.e(t)}finally{r.f()}}},{key:"clearAnnotationForOverlay",value:function(t){delete this.annotationEditInfos[t]}},{key:"queryAndUpdate",value:function(){var t=this;if(pe()){this.summaryAnnotations.showSpinner();var e=za(this.shadowHost).prevAll("[sapling-id],[sapling-textarea-id]").first()[0];if(void 0!==e&&e){var n=e.innerHTML.trim();if(n&&this.lastQueryText!==n){this.lastQueryText=n;var r=za(this.shadowHost).prev().attr("sapling-id");r||(r=za(this.shadowHost).prev().attr("sapling-textarea-id")),function(t,e,n,r,i){ht("request/GET_STATISTICS",{html:w()(t,5e4),sessionId:n,context:Dt()},r,i)}(n,0,r,(function(e){t.summaryAnnotations.setStatistics(e.statistics)}),(function(e){e&&t.setErrorStatus(e.toString())})),this.summaryAnnotations.hideSpinner()}else this.summaryAnnotations.hideSpinner()}else this.summaryAnnotations.hideSpinner()}}},{key:"toggleSummaryAnnotations",value:function(){this.summaryAnnotations.summaryVisible()?this.hideSummaryAnnotations():this.showSummaryAnnotations()}},{key:"showEdits",value:function(){this.editsVisible=!0;for(var t=0,e=Object.values(this.annotationEditInfos);t<e.length;t++){var n,r=Ga(e[t].domElements);try{for(r.s();!(n=r.n()).done;){var i=n.value;za(i).show()}}catch(t){r.e(t)}finally{r.f()}}this.summaryAnnotations.updateToggle(this.editsVisible)}},{key:"hideEdits",value:function(){if(this.editsVisible=!1,!this.annotationsAlwaysVisible){for(var t=0,e=Object.values(this.annotationEditInfos);t<e.length;t++){var n,r=Ga(e[t].domElements);try{for(r.s();!(n=r.n()).done;){var i=n.value;za(i).hide()}}catch(t){r.e(t)}finally{r.f()}}this.summaryAnnotations.updateToggle(this.editsVisible)}}},{key:"showSummaryAnnotations",value:function(){this.summaryAnnotations.showSummary(this.editsVisible),this.positionAnnotations()}},{key:"hideSummaryAnnotations",value:function(){this.summaryAnnotations.hideSummary()}},{key:"removeUIElements",value:function(){this.shadowHost&&this.shadowHost.remove(),this.annotationEditInfos={}}}])&&$a(e.prototype,n),r&&$a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Ja=n(563);function Xa(t){return Xa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xa(t)}function Ka(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Za(r.key),r)}}function Qa(t,e,n){return(e=Za(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Za(t){var e=function(t,e){if("object"!==Xa(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Xa(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Xa(e)?e:String(e)}var ts="\n .sapling-utility-overlay {\n background-color: rgba(255, 255, 255, 0.9);\n border-radius: 20px;\n display: none;\n position: absolute;\n z-index: 999;\n box-shadow: 0 1px 2px 0 rgb(65 69 73 / 30%), 0 3px 6px 2px rgb(65 69 73 / 15%);\n border-radius: 8px;\n font: 9pt helvetica, arial;\n flex-direction: column;\n }\n\n .sapling-utility-overlay.sapling-utility-empty .sapling-utility-empty-message {\n display: block;\n }\n\n .sapling-utility-overlay.sapling-utility-empty .sapling-utility-data {\n display: none;\n }\n\n .sapling-utility-empty-message {\n display: none;\n padding: 10px;\n }\n\n .sapling-utility-overlay.visible {\n display: flex;\n }\n\n .sapling-utility-sentence-overlays {\n display: none;\n z-index: 999;\n }\n\n .sapling-utility-sentence-overlays.visible {\n display: inherit;\n }\n\n .sapling-utility-sentence-overlays.sapling-loading {\n opacity: 0.5;\n transition: all 0.25s;\n }\n\n .sapling-utility-header-button {\n position: absolute;\n top: 10px;\n cursor: pointer;\n width: 12px;\n }\n\n .sapling-utility-overlay-cancel {\n right: 10px;\n }\n\n .sapling-utility-overlay-drag {\n right: 30px;\n }\n\n .sapling-utility-overlay-spinner {\n transform: rotate(0deg);\n right: 30px;\n opacity: 0;\n }\n\n .sapling-utility-overlay-spinner.sapling-loading {\n transform: rotate(0deg);\n animation: rotation 3s linear infinite;\n opacity: 1;\n }\n\n @keyframes rotation {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n }\n\n .utility-overlay-header {\n background-color: #e8eaf6;\n color: #5c6bc0;\n font-size: 14px;\n padding: 8px;\n border-bottom: 1px solid #ccc;\n display: flex;\n align-items: center;\n cursor: grab;\n }\n\n .sapling-utility-data {\n padding: 8px;\n padding-top: 4px;\n }\n\n .sapling-utility-data-row {\n padding: 4px;\n padding-left: 0;\n display: flex;\n width: 100%;\n justify-content: space-between;\n }\n\n .sapling-utility-data-row span {\n margin-right: 4px;\n }\n\n .sapling-utility-beta {\n background-color: rgba(92, 107, 192, 0.5);\n color: #fff;\n padding: 2px;\n border-radius: 2px;\n text-transform: uppercase;\n font-size: 9px;\n margin-left: 8px;\n }\n",es=function(){function t(e,n,r){var i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.containerId=n,this.shadowHost=e,this.badge=r,this.queryAndUpdate=_.debounce((function(){return i._queryAndUpdate()}),100),this.inDOM=document.documentElement.contains(this.shadowHost),this.overlayDragger=null,this.queryEl=null,this.hudEl=null,this.assetUrls={"xmark-solid":Ye("assets/xmark-solid.svg"),"spinner-solid":Ye("assets/spinner-solid.svg"),"thumbs-up-regular":Ye("assets/thumbs-up-regular.svg"),"thumbs-down-regular":Ye("assets/thumbs-down-regular.svg")};var o=this.utilityName().toLowerCase().replace(/\s+/g,"-");if(Ja("sapling-".concat(o,"-overlays-container")).length){var a=Ja("sapling-".concat(o,"-overlays-container")).first();this.utilityContainerShadowRoot=Ja(a[0].shadowRoot)}else{var s=document.createElement("sapling-".concat(o,"-overlays-container"));Ja("html").append(Ja(s)),s.attachShadow({mode:"open"}),this.utilityContainerShadowRoot=Ja(s.shadowRoot),Ja(this.utilityContainerShadowRoot).append("\n <style>".concat(ts).concat(this.utilityCSS(),"</style>\n "))}this._setupStyleMutationObserver(),this._setupContainerRemovedObserver()}var e,n,r;return e=t,(n=[{key:"utilityName",value:function(){throw new Error("Method not implemented.")}},{key:"renderUtilityData",value:function(){throw new Error("Method not implemented")}},{key:"utilityCSS",value:function(){return""}},{key:"isBeta",value:function(){return!0}},{key:"isUtilityEnabled",value:function(){throw new Error("Method not implemented")}},{key:"getUtilityData",value:function(t,e,n,r,i){throw new Error("Method not implemented")}},{key:"updateHud",value:function(t){var e=this,n=t.hudEmoji,r=t.hudWarning,i=t.hudTitle;if(null!=n||null!=r?(null==this.hudEl&&(this.hudEl=document.createElement("div"),Ja(this.hudEl).addClass("sapling-tone-hud"),Ja(this.hudEl).attr("style","opacity: 0")),i?Ja(this.hudEl).attr("title",i):Ja(this.hudEl).attr("title",""),Ja(this.hudEl).html(""),Ja(this.hudEl).append(n),Ja(this.hudEl).append(r)):this.hudEl=null,Ja(this.badge.headsUpContainer).html(this.hudEl),this.hudEl){Ja(this.hudEl).on("click",(function(){e.toggleVisibility()}));var o=this.hudEl.getBoundingClientRect(),a=o.height,s=o.width,u=this.badge.badge[0].getBoundingClientRect().width;Ja(this.badge.headsUpContainer).css({left:"".concat(-12-Math.max(u,8)-s,"px"),top:"".concat(-.9*a,"px")}),Ja(this.hudEl).attr("style","opacity: 1")}}},{key:"_setupStyleMutationObserver",value:function(){var t=this;new MutationObserver((function(e){t.renderUtilityData()})).observe(this.shadowHost,{attributes:!0,attributeOldValue:!0,attributeFilter:["style"],childList:!0,subtree:!0})}},{key:"_setupContainerRemovedObserver",value:function(){var t=this;Ja(this.shadowHost).parent(),setInterval((function(){t.inDOM&&!document.documentElement.contains(t.shadowHost)&&t.toggleVisibility()}),50)}},{key:"createUIElements",value:function(){var t=this;this.utilityOverlay||(this.utilityOverlay=document.createElement("div"),Ja(this.utilityOverlay).addClass("sapling-utility-overlay"),Ja(this.utilityOverlay).addClass("sapling-utility-empty"),Ja(this.utilityOverlay).attr("id","utility-overlay-".concat(this.containerId)),this.cancelButton=document.createElement("div"),Ja(this.cancelButton).html('<img src="'.concat(this.assetUrls["xmark-solid"],'" />')),Ja(this.cancelButton).addClass("sapling-utility-overlay-cancel"),Ja(this.cancelButton).addClass("sapling-utility-header-button"),Ja(this.cancelButton).on("click",(function(){t.toggleVisibility()})),this.loadingIndicator=document.createElement("div"),Ja(this.loadingIndicator).html('<img src="'.concat(this.assetUrls["spinner-solid"],'" />')),Ja(this.loadingIndicator).addClass("sapling-utility-header-button"),Ja(this.loadingIndicator).addClass("sapling-utility-overlay-spinner"),this.overlayHeader=document.createElement("div"),Ja(this.overlayHeader).addClass("utility-overlay-header"),Ja(this.overlayHeader).html("\n ".concat(this.utilityName(),"\n ").concat(this.isBeta()?'<span class="sapling-utility-beta">beta</span>':null,"\n ")),this.overlayDragger=new Na(Ja(this.utilityOverlay),Ja(this.overlayHeader),null),Ja(this.utilityOverlay).append(this.overlayHeader),Ja(this.utilityOverlay).append(this.loadingIndicator),Ja(this.utilityOverlay).append(this.cancelButton),Ja(this.utilityOverlay).append('<div class="sapling-utility-data"></div>'),Ja(this.utilityOverlay).append('<div class="sapling-utility-empty-message">Waiting for text...</div>'),Ja(this.utilityContainerShadowRoot).append(this.utilityOverlay),this.sentenceOverlays=document.createElement("div"),Ja(this.sentenceOverlays).addClass("sapling-utility-sentence-overlays"),Ja(this.sentenceOverlays).attr("id","utility-sentence-overlay-".concat(this.containerId)),Ja(this.shadowHost.shadowRoot).append("<style>".concat(ts).concat(this.utilityCSS(),"</style>")),Ja(this.shadowHost.shadowRoot).append(this.sentenceOverlays))}},{key:"updateOverlayPosition",value:function(){var t=this.shadowHost.getBoundingClientRect(),e=t.bottom,n=t.right,r=e-2*this.constructor.HEIGHT-this.constructor.PADDING+window.scrollY,i=n-this.constructor.WIDTH-this.constructor.PADDING+window.scrollX,o=Math.max(W(this.shadowHost.parentNode),9999);Ja(this.utilityOverlay).css({zIndex:o});var a=getComputedStyle(this.shadowHost).fontSize;Ja(this.sentenceOverlays).css({zIndex:o,fontSize:a}),Ja(this.utilityOverlay).css({top:r,left:i,width:this.constructor.WIDTH,minHeight:this.constructor.HEIGHT}),this.updateSentenceOverlayPosition()}},{key:"updateSentenceOverlayPosition",value:function(){var t=this.shadowHost.getBoundingClientRect();Ja(this.sentenceOverlays).css({position:"absolute",top:0,left:0,width:"".concat(t.width,"px"),height:"".concat(t.height,"px"),pointerEvents:"none"})}},{key:"toggleVisibility",value:function(){if(this.updateOverlayPosition(),Ja(this.utilityOverlay).toggleClass("visible"),Ja(this.sentenceOverlays).toggleClass("visible"),this.inDOM=Ja(this.utilityOverlay).is(".visible"),Ja(this.utilityOverlay).is(".visible")){var t=this.utilityName().toLowerCase().replace(/\s+/g,"_");Et("".concat(t,"_overlay_visible"))}}},{key:"initForCheckOnce",value:function(){this.showOverlay(),this.hideOnTextChange()}},{key:"showOverlay",value:function(){this.updateOverlayPosition(),Ja(this.utilityOverlay).addClass("visible"),Ja(this.sentenceOverlays).addClass("visible"),this.inDOM=!0}},{key:"hideOnTextChange",value:function(){var t=this;this.textChangeCheckInterval=setInterval((function(){t._getQueryText()!==t.lastQueryText&&(Ja(t.sentenceOverlays).html(""),clearInterval(t.textChangeCheckInterval))}),500)}},{key:"getTextNodes",value:function(t,e){var n=this;t.nodeType!==Node.TEXT_NODE?t.childNodes.forEach((function(t){return n.getTextNodes(t,e)})):e.push({node:t,text:t.data})}},{key:"_getQueryText",value:function(){if(this.queryEl=Ja(this.shadowHost).prevAll("[sapling-id],[sapling-textarea-id],[contenteditable]").first()[0],void 0===this.queryEl||!this.queryEl)return null;var t=this.queryEl.innerHTML;return this.queryEl.innerText.trim()?t:(this.resetUIElements(),null)}},{key:"_queryAndUpdate",value:function(){var t=this,e=this._getQueryText();null!=e&&(this.lastQueryText!=e?this.isUtilityEnabled()&&(this.lastQueryText=e,Ja(this.loadingIndicator).addClass("sapling-loading"),Ja(this.sentenceOverlays).addClass("sapling-loading"),this.getUtilityData(e,"en",this.containerId,(function(e){Ja(t.utilityOverlay).removeClass("sapling-utility-empty"),t.renderUtilityData(),Ja(t.loadingIndicator).removeClass("sapling-loading"),Ja(t.sentenceOverlays).removeClass("sapling-loading")}),(function(e){Ja(t.loadingIndicator).removeClass("sapling-loading"),Ja(t.sentenceOverlays).removeClass("sapling-loading")}))):this.renderUtilityData())}},{key:"removeUIElements",value:function(){Ja(this.utilityOverlay).remove()}},{key:"resetUIElements",value:function(){Ja(this.sentenceOverlays).html(""),Ja(this.utilityOverlay).addClass("sapling-utility-empty"),this.hudEl=null,Ja(this.badge.headsUpContainer).html(this.hudEl)}},{key:"_getRanges",value:function(t,e){for(var n=0,r=0,i=0,o=[];r<t.length&&n<e.length;){for(var a=t[r],s=e[n].text.indexOf(a[0],i);s<0;){if(i=0,++n===e.length)return[];s=e[n].text.indexOf(a[0],i)}var u=n;i=s;for(var c=Math.max(0,a.length-(e[n].text.length-i)),l=i+a.length;c;){if(++n===e.length)return[];l=c,c=Math.max(0,c-e[n].text.length)}var f=n;o.push({startingTextIndex:u,startingOffset:s,endingTextIndex:f,endingOffset:l,sentenceIndex:r}),l<e[n].text.length-1?i=l:(i=0,n++),r++}return o}}])&&Ka(e.prototype,n),r&&Ka(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ns(t){switch(t){case"admiring":case"amused":case"approving":case"confident":case"eager":case"excited":case"grateful":case"joyful":case"loving":case"optimistic":case"relieved":return"joy";case"angry":case"annoyed":case"repulsed":case"disappointed":case"disapproving":return"anger";case"aware":case"neutral":case"sympathetic":return"neutral";case"confused":case"curious":case"surprised":return"surprise";case"fearful":return"fear";case"embarassed":case"mournful":case"remorseful":case"sad":case"worried":return"sadness"}return"neutral"}function rs(t){switch(ns(t)){case"joy":case"neutral":case"surprise":case"fear":case"sadness":return"#535f99";case"anger":return"red"}}Qa(es,"WIDTH",300),Qa(es,"HEIGHT",50),Qa(es,"PADDING",15);var is=n(563);function os(t){return os="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},os(t)}function as(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return ss(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ss(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function ss(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function us(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(i=r.key,o=void 0,o=function(t,e){if("object"!==os(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==os(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===os(o)?o:String(o)),r)}var i,o}function cs(){return cs="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ps(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},cs.apply(this,arguments)}function ls(t,e){return ls=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ls(t,e)}function fs(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=ps(t);if(e){var i=ps(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===os(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function ps(t){return ps=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ps(t)}var ds='\n .sapling-utility-data-row .tone-feedback {\n display: flex;\n justify-content: space-between;\n width: 60px;\n height: 20px;\n }\n\n .sapling-utility-data-row.hide-feedback-buttons .tone-feedback {\n display: none;\n }\n\n .sapling-utility-data-row .tone-feedback.feedback-recorded {\n font-size: 8px;\n text-transform: uppercase;\n text-align: center;\n color: #999;\n line-height: 10px;\n }\n\n .tone-feedback-button img:hover, .tone-feedback-button img.selected {\n opacity: 0.5;\n }\n\n .tone-feedback-button img:active {\n opacity: 1;\n }\n\n .sapling-utility-data-row .tone-name {\n text-transform: capitalize;\n }\n\n .tone-sentence-feedback.feedback-recorded {\n display: none !important;\n }\n\n .tone-sentence-feedback {\n right: -4.75em;\n top: 0px;\n display: none;\n width: 74px;\n height: 38px;\n justify-content: space-between;\n background: white;\n padding: 5px;\n border: 2px solid #535f99;\n border-radius: 5px;\n align-items: center;\n box-sizing: border-box;\n flex-direction: column;\n margin-left: 4px;\n padding-top: 3px;\n }\n\n .tone-sentence-feedback:before {\n content: "";\n position: absolute;\n top: 4px;\n left: 0.9em;\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n border-right: 6px solid #535f99;\n }\n\n .tone-sentence-feedback.hide-feedback-buttons {\n justify-content: center;\n }\n\n .tone-sentence-feedback-title {\n text-transform: uppercase;\n font-size: 8px;\n width: 74px;\n text-align: center;\n }\n\n .tone-sentence-feedback-button-container {\n display: flex;\n width: 100%;\n justify-content: space-around;\n }\n\n .hide-feedback-buttons .tone-sentence-feedback-button-container {\n display: none;\n }\n\n .tone-feedback-button {\n display: flex;\n align-items: center;\n }\n\n .tone-feedback-button img {\n width: 15px;\n opacity: 0.25;\n cursor: pointer;\n padding: 1px;\n }\n\n .tone-feedback-button img:hover, .tone-feedback-button img.selected {\n opacity: 0.5;\n }\n\n .tone-feedback-button img:active {\n opacity: 1;\n }\n',hs=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ls(t,e)}(o,t);var e,n,r,i=fs(o);function o(t,e,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this,t,e,n)).topTone=null,r.toneData=null,r.feedbackDisplayClass="SDK"!==h.MODE||Sapling.toneFeedbackEnabled?"":"hide-feedback-buttons",r}return e=o,n=[{key:"utilityName",value:function(){return"Tone"}},{key:"utilityCSS",value:function(){return"".concat(ds)}},{key:"isBeta",value:function(){return!0}},{key:"isUtilityEnabled",value:function(){return ke()}},{key:"getUtilityData",value:function(t,e,n,r,i){var o=this;!function(t,e,n,r,i){ht("request/GET_TONE",{html:w()(t,25e3),sessionId:n,context:Dt()},r,i)}(t,0,n,(function(t){o.toneData=t.tone,r(t)}),(function(t){i(t)}))}},{key:"_updateToneHud",value:function(t,e){var n,r=null,i=null;t.length>0&&(this.topTone=t[0],"neutral"!==this.topTone[1].toLowerCase()&&(r='<span style="padding-top: 0.1rem;">'.concat(this.topTone[2],"</span>")));var o,a=as(e);try{for(a.s();!(o=a.n()).done;)"anger"===ns(o.value[0][1])&&(n="Angry sentence detected",i='\n <div style="margin-left: 3px; transform: rotate(10deg); padding-top: 0.15rem;">\n <svg fill="red" height="1em" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 512">\x3c!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path d="M64 64c0-17.7-14.3-32-32-32S0 46.3 0 64V320c0 17.7 14.3 32 32 32s32-14.3 32-32V64zM32 480a40 40 0 1 0 0-80 40 40 0 1 0 0 80z"/></svg>\n </div>\n ')}catch(t){a.e(t)}finally{a.f()}this.updateHud({hudEmoji:r,hudWarning:i,hudTitle:n})}},{key:"createUIElements",value:function(){var t=this;cs(ps(o.prototype),"createUIElements",this).call(this),is(this.utilityOverlay).on("click",".tone-feedback-button img",(function(e){var n=is(e.target),r=is(n).is(".selected");is(n).parents(".tone-feedback").find("img").removeClass("selected"),r||is(n).addClass("selected");var i=JSON.parse(is(n).parents(".sapling-tone-data-row").attr("data-tone")),o=is(n).is(".thumbs-up")?1:-1;xt(t.lastQueryText,i,"overall",o,t.containerId,(function(t){is(n).parents(".tone-feedback").addClass("feedback-recorded").html("Feedback recorded")}),(function(t){is(n).parents(".tone-feedback").addClass("feedback-recorded").html("Feedback recorded")}))}))}},{key:"renderUtilityData",value:function(){var t=this,e=this.toneData,n=this.queryEl;if(e&&n){var r=e.overall,i=e.sents,o=e.results;if(r){var a=r.filter((function(t){return t[0]>.05})).sort((function(t,e){return e[0]-t[0]}));this._updateToneHud(a,o);var s,u="",c=as(a);try{for(c.s();!(s=c.n()).done;){var l=s.value,f=5*Math.round(100*l[0]/5);u+='\n <div class="sapling-utility-data-row '.concat(this.feedbackDisplayClass,"\" data-tone='").concat(JSON.stringify(l),'\'>\n <div>\n <span class="tone-emoji">').concat(l[2],'</span>\n <span class="tone-name">').concat(l[1],' -</span>\n <span class="tone-percentage">').concat(f,'%</span>\n </div>\n <div class="tone-feedback">\n <span class="tone-feedback-button"><img class="thumbs-up" src="').concat(this.assetUrls["thumbs-up-regular"],'" /></span>\n <span class="tone-feedback-button"><img class="thumbs-down" src="').concat(this.assetUrls["thumbs-down-regular"],'" /></span>\n </div>\n </div>\n ')}}catch(t){c.e(t)}finally{c.f()}is(this.utilityOverlay).find(".sapling-utility-data").html(u),this.updateSentenceOverlayPosition();var p=this.shadowHost.getBoundingClientRect(),d=document.createElement("sapling-sentence-tones"),h=[];this.getTextNodes(n,h);for(var g=this._getRanges(i,h),v=function(){var e=g[y],n=e.startingTextIndex,r=e.startingOffset,a=e.endingTextIndex,s=e.endingOffset,u=e.sentenceIndex,c=i[u],l="."===c.slice(-1)?5:0,f=m().includes("zendesk")?8:0,v=document.createRange();v.setStart(h[n].node,r),v.setEnd(h[a].node,s);var b=v.getClientRects(),D=b.item(b.length-1),w=document.createElement("div");is(w).css({position:"absolute",pointerEvents:"auto",left:"".concat(D.x-p.x+D.width-l,"px"),top:"".concat(D.y-p.y-10+f,"px"),width:"20px",height:"20px",cursor:"pointer",opacity:.5,display:"flex"}),is(w).attr("data-sentence",c),is(w).attr("data-tone",JSON.stringify(o[y][0])),w.innerHTML="\n ".concat(o[y][0][2],'\n <div class="tone-sentence-feedback ').concat(t.feedbackDisplayClass,'">\n <div class="tone-sentence-feedback-title">').concat(o[y][0][1],'</div>\n <div class="tone-sentence-feedback-button-container">\n <div class="tone-feedback-button"><img class="thumbs-up" src="').concat(t.assetUrls["thumbs-up-regular"],'" /></div>\n <div class="tone-feedback-button"><img class="thumbs-down" src="').concat(t.assetUrls["thumbs-down-regular"],'" /></div>\n </div>\n </div>\n '),w.rects=[];var x,E={},A=as(b);try{for(A.s();!(x=A.n()).done;){var _=x.value;if(!E.hasOwnProperty(JSON.stringify(_))){E[JSON.stringify(_)]=1;var S=rs(o[y][0][1].toLowerCase()),C=document.createElement("div");is(C).css({position:"absolute",left:"".concat(_.x-p.x-1,"px"),top:"".concat(_.y-p.y-1,"px"),width:"".concat(_.width+2,"px"),height:"".concat(_.height+2,"px"),backgroundColor:S,border:"1px solid black",borderRadius:"5px",cursor:"pointer",opacity:.1}),is(d).append(C),w.rects.push(C)}}}catch(t){A.e(t)}finally{A.f()}is(d).append(w),w.addEventListener("mouseenter",(function(){is(w).css({opacity:1}),is(w).find(".tone-sentence-feedback").css({display:"flex"}),w.rects.forEach((function(t){return t.style.opacity=.25}))})),w.addEventListener("mouseleave",(function(){is(w).css({opacity:.75}),is(w).find(".tone-sentence-feedback").css({display:"none"}),w.rects.forEach((function(t){return t.style.opacity=.1}))})),is(w).on("click",".tone-feedback-button img",(function(e){var n=is(e.target),r=is(n).is(".selected");is(n).parents(".tone-sentence-feedback").find("img").removeClass("selected"),r||is(n).addClass("selected");var i=JSON.parse(is(w).attr("data-tone")),o=is(n).is(".thumbs-up")?1:-1;xt(c,i,"sentence",o,t.containerId,(function(t){is(n).parents(".tone-sentence-feedback").addClass("feedback-recorded")}),(function(t){is(n).parents(".tone-sentence-feedback").addClass("feedback-recorded")}))}))},y=0;y<g.length;y++)v();is(this.sentenceOverlays).html("<style>".concat(ds,"</style>")),is(this.sentenceOverlays).append(d)}}}},{key:"getTopTone",value:function(){return this.topTone}}],n&&us(e.prototype,n),r&&us(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(es),gs=n(563);function vs(t){return vs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vs(t)}function ys(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return ms(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ms(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function ms(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function bs(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(i=r.key,o=void 0,o=function(t,e){if("object"!==vs(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==vs(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===vs(o)?o:String(o)),r)}var i,o}function Ds(){return Ds="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Es(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Ds.apply(this,arguments)}function ws(t,e){return ws=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ws(t,e)}function xs(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Es(t);if(e){var i=Es(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===vs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function Es(t){return Es=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Es(t)}var As=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ws(t,e)}(o,t);var e,n,r,i=xs(o);function o(t,e,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this,t,e,n)).aiDetectionData=null,r}return e=o,n=[{key:"utilityName",value:function(){return"AI Detect"}},{key:"utilityCSS",value:function(){return"".concat("\n\n")}},{key:"isBeta",value:function(){return!0}},{key:"isUtilityEnabled",value:function(){return Se()}},{key:"getUtilityData",value:function(t,e,n,r,i){var o=this;wt(t,0,n,{source:"sdk"},(function(t){o.aiDetectionData=t.aidetect,r(t)}),(function(t){i(t)}))}},{key:"createUIElements",value:function(){Ds(Es(o.prototype),"createUIElements",this).call(this)}},{key:"renderUtilityData",value:function(){var t=this.aiDetectionData,e=this.queryEl;if(t&&e){var n=this.aiDetectionData,r=n.score,i=n.sentence_scores;if(r){var o='\n <div class="sapling-utility-data-row">\n Percentage fake: '.concat((100*r).toFixed(2),"%\n </div>\n ");gs(this.utilityOverlay).find(".sapling-utility-data").html(o),this.updateSentenceOverlayPosition();var a=this.shadowHost.getBoundingClientRect(),s=document.createElement("sapling-sentence-ai-detections"),u=[];this.getTextNodes(e,u);for(var c=i.map((function(t){return t.sentence})),l=this._getRanges(c,u),f=function(){var t=l[p],e=t.startingTextIndex,n=t.startingOffset,r=t.endingTextIndex,o=t.endingOffset,c=t.sentenceIndex,f=i[c],d=document.createRange();d.setStart(u[e].node,n),d.setEnd(u[r].node,o);var h,g=d.getClientRects(),v=[],y={},m=ys(g);try{for(m.s();!(h=m.n()).done;){var b=h.value;if(!y.hasOwnProperty(JSON.stringify(b))){y[JSON.stringify(b)]=1;var D="rgba(255, 0, 0, ".concat(f.score,")"),w=document.createElement("div");gs(w).css({position:"absolute",left:"".concat(b.x-a.x-1,"px"),top:"".concat(b.y-a.y-1,"px"),width:"".concat(b.width+2,"px"),height:"".concat(b.height+2,"px"),backgroundColor:D,border:"1px solid black",borderRadius:"5px",cursor:"pointer",opacity:.1}),gs(s).append(w),v.push(w)}}}catch(t){m.e(t)}finally{m.f()}v.forEach((function(t){t.addEventListener("mouseenter",(function(){v.forEach((function(t){return t.style.opacity=.25}))}))})),v.forEach((function(t){t.addEventListener("mouseleave",(function(){v.forEach((function(t){return t.style.opacity=.1}))}))}))},p=0;p<l.length;p++)f();gs(this.sentenceOverlays).html("<style>".concat("\n\n","</style>")),gs(this.sentenceOverlays).append(s)}}}}],n&&bs(e.prototype,n),r&&bs(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(es);function _s(t){for(var e,n,r,i,o=t[0],a=1;a<t.length;a++)e=o,n=t[a],r=void 0,i=void 0,r=e.editRange,i=n.editRange,o=Or(r,i)?n:Or(i,r)||Tr(r,i)?e:Tr(i,r)?n:e;return o}function Ss(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||ks(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Cs(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=ks(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function ks(t,e){if(t){if("string"==typeof t)return Os(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Os(t,e):void 0}}function Os(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Ts=!0,Fs=null,js=[],Ls=null,Is=!1;function Ns(){Fs&&(Fs.removeEventListener("keydown",Ms),Fs.removeEventListener("paste",Hs),Fs=null),js=[],Ls=null,Is=!1,document.removeEventListener("selectionchange",Rs)}function Bs(t,e,n){if(Ns(),ee){for(var r=[],i=0,o=Object.values(n);i<o.length;i++){var a=o[i];e.edit.originalText===a.edit.originalText&&e.edit.editId!==a.edit.editId&&r.push(a.editRange)}r.length&&function(t,e,n){if(Ts=!0,Is=!1,js=[],ve(Fs=t)){Ls=[e.startOffset,e.endOffset];var r,i=Cs(n);try{for(i.s();!(r=i.n()).done;){var o=r.value;js.push([o.startOffset,o.endOffset])}}catch(t){i.e(t)}finally{i.f()}}else{if(null===(Ls=B(Fs,e)))return void(Fs=null);var a,s=Cs(n);try{for(s.s();!(a=s.n()).done;){var u=a.value,c=B(Fs,u);null!==c&&js.push(c)}}catch(t){s.e(t)}finally{s.f()}}js.sort((function(t,e){return e[0]-t[0]})),Fs.addEventListener("keydown",Ms),Fs.addEventListener("paste",Hs),document.addEventListener("selectionchange",Rs)}(t,e.editRange,r)}}function Rs(t){if(ve(Fs)){var e=Ls[0],n=Ls[1];n++;var r=Fs,i=r.selectionStart,o=r.selectionEnd;if(e<=i&&i<=n||e<=o&&o<=n)return}else{var a=window.getSelection();if(a){var s=a.getRangeAt(0),u=Ls[0],c=Ls[1];c++;var l=B(Fs,s);if(u<=l[0]&&l[0]<=c||u<=l[1]&&l[1]<=c)return}}Ns()}function Ps(t,e){for(var n=t.length,r=Ls[1]-Ls[0],i=0;i<js.length;i++)Ls[0]<=js[i][0]&&(Ts?(js[i][0]-=r,js[i][1]-=r,e||(js[i][0]+=n,js[i][1]+=n)):e?(js[i][0]--,js[i][1]--):(js[i][0]+=n,js[i][1]+=n));for(var o=0;o<js.length;o++){var a=Ss(js[o],2),s=a[0],u=a[1],c=void 0;if(!ve(Fs)){c=document.createRange();var l=I(Fs,0,s,Fs),f=I(Fs,0,u,Fs);c.setStart(l.domElement,l.domOffset),c.setEnd(f.domElement,f.domOffset)}if(Ts){var p="",d=-r;e||(d+=(p=t).length),ve(Fs)?fn(Fs,s,u,p):gn(c,p,Fs),js[o][1]+=d,Ls[0]>s&&(Ls[0]+=d,Ls[1]+=d);for(var h=0;h<o;h++)js[h][0]+=d,js[h][1]+=d}else{if(e){if(ve(Fs)&&u>s)fn(Fs,u-1,u,""),js[o][1]--;else if(c.toString().length){var g=I(Fs,0,u-1,Fs);c.setStart(g.domElement,g.domOffset),gn(c,"",Fs),js[o][1]--}for(var v=0;v<o;v++)js[v][0]--,js[v][1]--}else{ve(Fs)?fn(Fs,u,u,t):(c.collapse(),gn(c,t,Fs)),js[o][1]+=n;for(var y=0;y<o;y++)js[y][0]+=n,js[y][1]+=n}Ls[0]>js[o][0]&&(e?(Ls[0]--,Ls[1]--):(Ls[0]+=n,Ls[1]+=n))}}if(Ts&&(Ts=!1,Ls[1]=Ls[0]),e?Ls[1]--:Ls[1]+=n,ve(Fs))Fs.selectionStart=Ls[1],Fs.selectionEnd=Ls[1];else{var m=document.createRange(),b=I(Fs,0,Ls[0],Fs),D=I(Fs,0,Ls[1],Fs);m.setStart(b.domElement,b.domOffset),m.setEnd(D.domElement,D.domOffset),hn(m)}setTimeout((function(){return document.addEventListener("selectionchange",Rs)}),0)}function Ms(t){var e=t.key;if(1===e.length||"Backspace"===e){document.removeEventListener("selectionchange",Rs);var n="Backspace"===e;setTimeout((function(){Is||Ps(e,n)}),10)}}function Hs(t){Is=!0,document.removeEventListener("selectionchange",Rs);var e=(t.clipboardData||window.clipboardData).getData("text");setTimeout((function(){Ps(e,!1),Is=!1}),10)}var qs=n(563);function Us(t){return Us="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Us(t)}function zs(){zs=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function c(t,e,n,i){var o=e&&e.prototype instanceof p?e:p,a=Object.create(o.prototype),s=new _(i||[]);return r(a,"_invoke",{value:w(t,n,s)}),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function p(){}function d(){}function h(){}var g={};u(g,o,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(S([])));y&&y!==e&&n.call(y,o)&&(g=y);var m=h.prototype=p.prototype=Object.create(g);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function D(t,e){function i(r,o,a,s){var u=l(t[r],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==Us(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,s)}),(function(t){i("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return i("throw",t,a,s)}))}s(u.arg)}var o;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){i(t,n,e,r)}))}return o=o?o.then(r,r):r()}})}function w(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return C()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=x(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function x(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=l(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,f;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function S(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return d.prototype=h,r(m,"constructor",{value:h,configurable:!0}),r(h,"constructor",{value:d,configurable:!0}),d.displayName=u(h,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,u(t,s,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(D.prototype),u(D.prototype,a,(function(){return this})),t.AsyncIterator=D,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new D(c(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(m),u(m,s,"Generator"),u(m,o,(function(){return this})),u(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=S,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),A(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function Ws(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||Xs(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Gs(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function Ys(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function $s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ys(Object(n),!0).forEach((function(e){Vs(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ys(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Vs(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==Us(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Us(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Us(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Js(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Xs(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Xs(t,e){if(t){if("string"==typeof t)return Ks(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ks(t,e):void 0}}function Ks(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Qs={},Zs=null,tu={};function eu(t){var e=H(t);if(e){var n=Qs[e];if(n)return Object.keys(n.edits).length}return 0}function nu(t){if(Qs[t]){var e=Qs[t],n=e.shadowHost,r=e.badge,i=e.annotationsOverlay,o=e.toneOverlay,a=e.aiDetectOverlay;n&&n.remove(),r&&r.removeUIElements(),i&&i.removeUIElements(),o&&o.removeUIElements(),a&&a.removeUIElements()}}function ru(t){var e=Qs[t];if(e&&e.badge){var n=Object.keys(e.edits).length||0;e.badge.updateBadgeCount(n)}}function iu(t){var e=Qs[t];e&&e.badge&&e.badge.showThrottledState()}function ou(t){var e=Qs[t];e&&e.annotationsOverlay&&e.annotationsOverlay.updateAnnotationSummary()}function au(t){var e=Qs[t];e&&e.toneOverlay&&e.toneOverlay.queryAndUpdate()}function su(t,e,n){if(n&&!tu[t]){var r=new MutationObserver((function(t){!function(t,e){var n,r=Js(e);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(qs(i.target).hasClass("notion-text-block"))return void uu(t)}}catch(t){r.e(t)}finally{r.f()}}(e,t)}));r.observe(n,{attributes:!0,attributeFilter:["style"],childList:!0,subtree:!0}),tu[t]=r,ft(t,e,!1,"mutationObservers",r)}}function uu(t){if(!("SDK"!==h.MODE&&t.hasAttribute("sapling-ignore")||qs(t).parents(".codex-editor").length)){var e=H(t);if(e){var n=Qs[e]||{edits:{}},r=n.shadowHost,i=n.badge;if(r&&!Q(r)&&(r.remove(),r=null),!r){var o=t;if(qs(t).is("td")&&t.parentNode)o=t.parentNode.parentNode;else for(var a=o.nextSibling;a&&a.nodeType===Node.ELEMENT_NODE&&a.getAttribute("is-sapling-overlay");){var s=a;a=a.nextSibling,s.remove()}(r=document.createElement("div")).setAttribute("is-sapling-overlay",!0),qs(r).css({"pointer-events":"none"}),qs(o).after(r),r.attachShadow({mode:"open"});var u=document.createElement("div");if(qs(u).addClass("tag-container"),qs(u).css({position:"absolute"}),qs(r.shadowRoot).prepend(Fa),r.shadowRoot.appendChild(u),i||(i=new kr).createUIElements(t,r,e,n),n.badge=i,!n.annotationsOverlay&&pe()&&(n.annotationsOverlay=new Va(e,r),n.annotationsOverlay.createUIElements()),!n.toneOverlay&&ke()&&(n.toneOverlay=new hs(r,e,i),n.toneOverlay.createUIElements()),n.shadowHost=r,n.overlayDomElement=u,n.containerDomElement=t,n.textAreaId=U(t),"notion.so"===m())su(e,t,R(t).nonstaticParent)}var c,l=R(t).frameDimensions;qs(r).css({overflow:"hidden","padding-bottom":"2px","z-index":document.defaultView.getComputedStyle(t).getPropertyValue("z-index"),position:l.position,left:l.left,top:l.top,height:l.height,width:l.width}),n.annotationsOverlay&&n.annotationsOverlay.queryAndUpdate(),n.toneOverlay&&n.toneOverlay.queryAndUpdate(),n.aiDetectOverlay&&n.aiDetectOverlay.queryAndUpdate(),Ai(t,r),Qs[e]=n,c=n,at[e]=c}}}function cu(t,e){if(!(null!=qs(e.containerDomElement).attr("sapling-figma-text-id")))return t;var n=qs(e.containerDomElement).data("figma-zoom");return $s($s({},t),{},{left:t.left*n,right:t.right*n,top:t.top*n,bottom:t.bottom*n,width:t.width*n,height:t.height*n})}function lu(t,e){var n=t.premium;if(t.category in Ta){var r="background-image";return"hard_to_read"===t.category&&"hard"===t.difficulty&&(r="background-image2"),Ta[t.category][r]}return n?e?"linear-gradient(to right, rgba(255, 214, 51, 0.15), rgba(255, 214, 51, 0.15))":"linear-gradient(to right, #eeb122, #ffd633)":e?"linear-gradient(to right, rgba(255, 0, 0, 0.15), rgba(255, 0, 0, 0.15))":"linear-gradient(to right, #ff0000, #ff0000)"}function fu(t,e){var n=t.premium;if(e){if(t.category in Ta){var r="background-color";return"hard_to_read"===t.category&&"hard"===t.difficulty&&(r="background-color2"),Ta[t.category][r]}return n?"#eeb122":"#ff0000"}return""}function pu(t,e){if(!t.edit.fillin){t.isHover=e;var n={opacity:.85,transition:"","background-color":fu(t.edit,e),"background-image":lu(t.edit,e),"-webkit-transition":"","-ms-transition":""};e&&(n={"background-color":fu(t.edit,e),"background-image":lu(t.edit,e)},t.edit.category||(n.opacity=.15,n.transition="background-color 200ms linear",n["-webkit-transition"]="background-color 200ms linear",n["-ms-transition"]="background-color 200ms linear")),t.domElements.forEach((function(t){qs(t).css(n)}))}}function du(t,e){var n=Qs[t],r=n.edits[e],i=n.edits[e].editRange;if(!r.edit.category||n.annotationsOverlay){var o=function(t,e){for(var n=e.shadowHost.getBoundingClientRect(),r=[],i=t.getClientRects(),o=0;o<i.length;o+=1){var a=cu(i[o],e);r.push({left:a.left-n.left,top:a.top-n.top,height:a.height,width:a.width})}return r}(i,n),a=o.length-r.domElements.length;if(a>0)for(var s=0;s<a;s++){var u=document.createElement("span");u.classList.add("sapling-edit"),u.setAttribute("sapling-edit-id",e),u.setAttribute("sapling-container-id",t),n.overlayDomElement.appendChild(u),r.domElements.push(u)}else if(a<0)for(var c=0;c>a;c--){r.domElements.pop().remove()}for(var l=0;l<o.length;l+=1){var f=o[l],p=r.domElements[l];qs(p).css({left:f.left,top:f.top,height:f.height,width:f.width}),r.edit.fillin?qs(p).css({border:"1px solid #6f68f7","border-radius":"0.4em"}):r.edit.annotation?r.edit.annotationStyle&&qs(p).css(r.edit.annotationStyle):qs(p).css({"background-image":lu(r.edit,!1)})}r.edit.category&&n.annotationsOverlay&&n.annotationsOverlay.updateAnnotationForOverlay(e,r),r.isHover&&pu(r,!0)}}function hu(t,e){var n=Qs[t],r=n.edits,i=n.annotationsOverlay;r[e].domElements.forEach((function(t){return t.remove()})),r[e].isHover&&Ca(),delete r[e],i&&i.clearAnnotationForOverlay(e)}function gu(t,e){for(var n=H(t),r=0;r<e.length;r+=1)hu(n,e[r])}function vu(t,e,n){for(var r=0,i=0;i<n.length;i+=1){var o=n[i],a=o.textContent.length;if(o.contains(e))return r+t;r+=a}return null}function yu(t,e,n,r,i){var o=t.startContainer,a=t.startOffset,s=t.endContainer,u=t.endOffset;if(!Q(e)||!Q(r))return null;if(null!==n){var c=I(e,0,n,r,!1,!1);c&&(o=c.domElement,a=c.domOffset)}if(null!==i){var l=I(e,0,i,r,!1,!0);l&&(s=l.domElement,u=l.domOffset)}var f=document.createRange();return!Q(o)||!Q(s)||o.length<=a||s.length<=u||a<0||u<0?null:(f.setStart(o,a),f.setEnd(s,u),f)}function mu(t,e){if(t in Qs){var n=e.removedNodes;if(0!==n.length){var r=Qs[t].edits;Object.keys(r).forEach((function(i){var o=r[i],a=o.edit,s=o.editRange,u=vu(s.startOffset,s.startContainer,n),c=vu(s.endOffset,s.endContainer,n);if(null!==u||null!==c){var l=e.previousSibling||e.target,f=yu(s,l,u,e.target,c);if(f&&Oa(f,a,!1))r[i].editRange=f,du(t,i);else{var p=e.target.textContent.length-function(t){for(var e=0,n=t.previousSibling;n;)e+=n.textContent.length,n=n.previousSibling;for(var r=t.nextSibling;r;)e+=r.textContent.length,r=r.nextSibling;for(var i=0;i<t.removedNodes.length;i+=1)e+=t.removedNodes[i].textContent.length;return e}(e),d=yu(s,l,u+p,e.target,c+p);d&&Oa(d,a,!1)&&(r[i].editRange=d,du(t,i))}}}))}}}function bu(t,e){if(t in Qs){var n=Qs[t].edits;Object.keys(n).forEach((function(r){var i=n[r],o=i.edit,a=i.editRange;if(a.startContainer===e.target){if(Ir(a)){var s=a.cloneRange();if(Oa(s,o,!1))return void(n[r].editRange=s)}var u=e.target.length-e.oldValue.length,c=a.startOffset+u,l=a.endOffset;if(a.endContainer===e.target&&(l+=u),c>=0&&c<=a.startContainer.length&&l>=0&&l<=a.endContainer.length){var f=document.createRange();f.setStart(a.startContainer,c),f.setEnd(a.endContainer,l),Oa(f,o,!1)&&(n[r].editRange=f,du(t,r))}Ir(n[r].editRange)||hu(t,r)}}))}}function Du(t,e,n,r,i){return wu.apply(this,arguments)}function wu(){var t;return t=zs().mark((function t(e,n,r,i,o){var a,s,u,c,l,f,p,d,h;return zs().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((a=document.createRange()).setStart(n,r),a.setEnd(i,o),!((s=H(e))in Qs)){t.next=22;break}u=Qs[s].edits,c={},l=Object.entries(u),f=0,p=0;case 10:if(!(p<l.length)){t.next=21;break}if(d=l[p][0],Q((h=l[p][1].editRange).startContainer)&&Q(h.endContainer)&&jr(h,a)&&(c[d]=u[d]),++f%100!=0){t.next=18;break}return t.next=18,new Promise((function(t){return setTimeout(t,50)}));case 18:p++,t.next=10;break;case 21:return t.abrupt("return",c);case 22:return t.abrupt("return",null);case 23:case"end":return t.stop()}}),t)})),wu=function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){Gs(o,r,i,a,s,"next",t)}function s(t){Gs(o,r,i,a,s,"throw",t)}a(void 0)}))},wu.apply(this,arguments)}function xu(t,e){var n=Qs[t];if(!n||!n.badge||!n.badge.badge)return!1;var r=n.badge.badge[0].getBoundingClientRect(),i=r.top,o=r.bottom,a=r.left,s=r.right;return a<=e.clientX&&e.clientX<=s&&i<=e.clientY&&e.clientY<=o}function Eu(t,e,n){var r=null,i=Z(n);if(i){var o=H(i);o?r=o:qs(i).parents().each((function(t,e){var n=H(e);return!n||(r=n,!1)}))}if(!r||r===e)for(var a=t.getClientRects(),s=Qs[e],u=0;u<a.length;u+=1){var c=cu(a[u],s);if(c.top<=n.clientY&&c.bottom>=n.clientY&&c.left<=n.clientX&&c.right>=n.clientX)return!0}return!1}function Au(){if(Zs){if(Zs.containerId in Qs){var t=Qs[Zs.containerId].edits;if(Zs.editId in t)pu(t[Zs.editId],!1)}Zs=null}}function _u(t,e,n,r,i){var o=n.edit,a=n.domElements;if(n.edit.category){if(!r)return!1;if(!r.annotationsAlwaysVisible&&!r.editsVisible)return!1}else if(n.edit.fillin)return!1;return Zs&&t===Zs.editId||(Au(),pu(n,!0),Zs={editId:t,containerId:e},Sa(e,o,a,i)),!0}function Su(t){var e=qs(h.CONTROL_ELEMENT).get(0);if(!e)return!1;for(var n=e.getClientRects(),r=0;r<n.length;r+=1){var i=n[r];if(i.top<=t.clientY&&i.top+i.height>=t.clientY&&i.left<=t.clientX&&i.left+i.width>=t.clientX)return!0}return!1}function Cu(t){var e=Ws(Xr(),2),n=e[0];e[1];if(ve(t)){var r=H(t);Qs[r].edits;if(n&&n.hideControls(),r in Qs){var i=Qs[r].edits;Object.keys(i).forEach((function(e){var n=i[e],r=n.editRange,o=!1,a=fo(t,!0);r.startOffset+2<=a&&a+2<=r.endOffset&&(o=!0),o&&n.edit.fillin&&(t.setSelectionRange(r.startOffset,r.endOffset),Bs(t,n,i))}))}}else{var o=H(t),a=Qs[o],s=a.edits;a.annotationsOverlay;n&&n.hideControls();var u=t.getRootNode().getSelection(),c=u.rangeCount&&u.getRangeAt(0);if(!c)return;Object.keys(s).forEach((function(e){var n=s[e],r=n.editRange,i=!1,o=!1;if(1!==r.compareBoundaryPoints(Range.START_TO_START,c)&&(i=!0),-1!==r.compareBoundaryPoints(Range.END_TO_END,c)&&(o=!0),i&&o&&n.edit.fillin){var a=window.getSelection();a.removeAllRanges(),a.addRange(r),Bs(t,n,s)}}))}}function ku(t){var e=!1,n=H(t),r=Qs[n];if(r){var i=r.edits,o=r.overlayDomElement,a=r.annotationsOverlay;if(i){var s=[];if(ve(t))for(var u=0,c=Object.values(i);u<c.length;u++){var l=c[u],f=l.editRange,p=!1,d=fo(t,!0);f.startOffset<=d&&d<=f.endOffset&&(p=!0),p&&s.push(l)}else{var h;try{h=t.getRootNode().getSelection()}catch(t){return}var g=h.rangeCount&&h.getRangeAt(0);if(!g)return;for(var v=0,y=Object.values(i);v<y.length;v++){var m=y[v],b=m.editRange,D=!1,w=!1;1!==b.compareBoundaryPoints(Range.START_TO_START,g)&&(D=!0),-1!==b.compareBoundaryPoints(Range.END_TO_END,g)&&(w=!0),D&&w&&s.push(m)}}if(s.length){e=!0;var x=_s(s),E=_u(x.edit.editId,n,x,a,o);e=e||E}e||Ca()}}}function Ou(t){if(t in Qs){var e=Qs[t].edits;Object.keys(e).forEach((function(e){du(t,e)}))}}function Tu(t){return t in Qs?Qs[t].containerDomElement:null}function Fu(t){return Qs[t]}var ju=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some((function(t,r){return t[0]===e&&(n=r,!0)})),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),r=this.__entries__[n];return r&&r[1]},e.prototype.set=function(e,n){var r=t(this.__entries__,e);~r?this.__entries__[r][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,r=t(n,e);~r&&n.splice(r,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];t.call(e,i[1],i[0])}},e}()}(),Lu="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,Iu=void 0!==n.g&&n.g.Math===Math?n.g:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Nu="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(Iu):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},Bu=2;var Ru=["top","right","bottom","left","width","height","size","weight"],Pu="undefined"!=typeof MutationObserver,Mu=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var n=!1,r=!1,i=0;function o(){n&&(n=!1,t()),r&&s()}function a(){Nu(o)}function s(){var t=Date.now();if(n){if(t-i<Bu)return;r=!0}else n=!0,r=!1,setTimeout(a,e);i=t}return s}(this.refresh.bind(this),20)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter((function(t){return t.gatherActive(),t.hasActive()}));return t.forEach((function(t){return t.broadcastActive()})),t.length>0},t.prototype.connect_=function(){Lu&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Pu?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){Lu&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;Ru.some((function(t){return!!~n.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),Hu=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},qu=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||Iu},Uu=Vu(0,0,0,0);function zu(t){return parseFloat(t)||0}function Wu(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce((function(e,n){return e+zu(t["border-"+n+"-width"])}),0)}function Gu(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return Uu;var r=qu(t).getComputedStyle(t),i=function(t){for(var e={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var i=r[n],o=t["padding-"+i];e[i]=zu(o)}return e}(r),o=i.left+i.right,a=i.top+i.bottom,s=zu(r.width),u=zu(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==e&&(s-=Wu(r,"left","right")+o),Math.round(u+a)!==n&&(u-=Wu(r,"top","bottom")+a)),!function(t){return t===qu(t).document.documentElement}(t)){var c=Math.round(s+o)-e,l=Math.round(u+a)-n;1!==Math.abs(c)&&(s-=c),1!==Math.abs(l)&&(u-=l)}return Vu(i.left,i.top,s,u)}var Yu="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof qu(t).SVGGraphicsElement}:function(t){return t instanceof qu(t).SVGElement&&"function"==typeof t.getBBox};function $u(t){return Lu?Yu(t)?function(t){var e=t.getBBox();return Vu(0,0,e.width,e.height)}(t):Gu(t):Uu}function Vu(t,e,n,r){return{x:t,y:e,width:n,height:r}}var Ju=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Vu(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=$u(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),Xu=function(t,e){var n,r,i,o,a,s,u,c=(r=(n=e).x,i=n.y,o=n.width,a=n.height,s="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,u=Object.create(s.prototype),Hu(u,{x:r,y:i,width:o,height:a,top:i,right:r+o,bottom:a+i,left:r}),u);Hu(this,{target:t,contentRect:c})},Ku=function(){function t(t,e,n){if(this.activeObservations_=[],this.observations_=new ju,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=n}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof qu(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new Ju(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof qu(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new Xu(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),Qu="undefined"!=typeof WeakMap?new WeakMap:new ju,Zu=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=Mu.getInstance(),r=new Ku(e,n,this);Qu.set(this,r)};["observe","unobserve","disconnect"].forEach((function(t){Zu.prototype[t]=function(){var e;return(e=Qu.get(this))[t].apply(e,arguments)}}));const tc=void 0!==Iu.ResizeObserver?Iu.ResizeObserver:Zu;n(563);function ec(t){return ec="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ec(t)}function nc(){nc=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function c(t,e,n,i){var o=e&&e.prototype instanceof p?e:p,a=Object.create(o.prototype),s=new _(i||[]);return r(a,"_invoke",{value:w(t,n,s)}),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function p(){}function d(){}function h(){}var g={};u(g,o,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(S([])));y&&y!==e&&n.call(y,o)&&(g=y);var m=h.prototype=p.prototype=Object.create(g);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function D(t,e){function i(r,o,a,s){var u=l(t[r],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==ec(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,s)}),(function(t){i("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return i("throw",t,a,s)}))}s(u.arg)}var o;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){i(t,n,e,r)}))}return o=o?o.then(r,r):r()}})}function w(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return C()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=x(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function x(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=l(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,f;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function S(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return d.prototype=h,r(m,"constructor",{value:h,configurable:!0}),r(h,"constructor",{value:d,configurable:!0}),d.displayName=u(h,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,u(t,s,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(D.prototype),u(D.prototype,a,(function(){return this})),t.AsyncIterator=D,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new D(c(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(m),u(m,s,"Generator"),u(m,o,(function(){return this})),u(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=S,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),A(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function rc(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function ic(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){rc(o,r,i,a,s,"next",t)}function s(t){rc(o,r,i,a,s,"throw",t)}a(void 0)}))}}function oc(t,e){return ac.apply(this,arguments)}function ac(){return(ac=ic(nc().mark((function t(e,n){var r,i,o,a,s,u,c;return nc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r={},n&&(o=n.getRootNode().getSelection()))for(i=o.anchorNode||o.focusNode;i&&i.nodeType!==Node.ELEMENT_NODE&&i.parentElement;)i=i.parentElement;if(i=i||n){for(a=window.getComputedStyle(i),s=0,u=["font-family","font-style","font-weight","color","line-height","letter-spacing","word-spacing"];s<u.length;s++)(c=u[s])in a&&(r[c]=a[c]);"font-size"in a&&(a["font-size"].startsWith("0")||(r["font-size"]=a["font-size"]))}return t.next=6,Xe({action:"copy-snippet",html:e,fontStyle:r});case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var sc=n(563);function uc(){uc=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function c(t,e,n,i){var o=e&&e.prototype instanceof p?e:p,a=Object.create(o.prototype),s=new _(i||[]);return r(a,"_invoke",{value:w(t,n,s)}),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function p(){}function d(){}function h(){}var g={};u(g,o,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(S([])));y&&y!==e&&n.call(y,o)&&(g=y);var m=h.prototype=p.prototype=Object.create(g);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function D(t,e){function i(r,o,a,s){var u=l(t[r],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==lc(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,s)}),(function(t){i("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return i("throw",t,a,s)}))}s(u.arg)}var o;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){i(t,n,e,r)}))}return o=o?o.then(r,r):r()}})}function w(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return C()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=x(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function x(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=l(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,f;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function S(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return d.prototype=h,r(m,"constructor",{value:h,configurable:!0}),r(h,"constructor",{value:d,configurable:!0}),d.displayName=u(h,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,u(t,s,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(D.prototype),u(D.prototype,a,(function(){return this})),t.AsyncIterator=D,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new D(c(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(m),u(m,s,"Generator"),u(m,o,(function(){return this})),u(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=S,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),A(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function cc(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function lc(t){return lc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lc(t)}function fc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(i=r.key,o=void 0,o=function(t,e){if("object"!==lc(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==lc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===lc(o)?o:String(o)),r)}var i,o}var pc=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Enter","Tab"]),dc=new Set(["ArrowUp","ArrowDown","Enter","Escape"]),hc=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.children={},this.end=!1}var e,n,r;return e=t,n=[{key:"insert",value:function(e){for(var n=this,r=0;r<e.length;r++)n.children[e[r]]||(n.children[e[r]]=new t),n=n.children[e[r]],r===e.length-1&&(n.end=!0)}},{key:"contains",value:function(t){for(var e=this,n=0;n<t.length;n++){if(!e.children[t[n]])return 0;e=e.children[t[n]]}return e.end?2:1}}],n&&fc(e.prototype,n),r&&fc(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),gc="\\",vc=!1,yc=new hc,mc={},bc=[];function Dc(){var t;t=function(t){!function(t){if(t){for(var e=new hc,n={},r=0;r<t.length;r++){var i=t[r],o=i.shortcut;if(o){var a=o.toLowerCase();e.insert(a),n[a]=i}}yc=e,mc=n}}(t)},ht("request/GET_SHORTCUT_SNIPPETS",{},t,(function(t){}));var e=he();null!=e&&(gc=e)}function wc(t){vc&&t?(vc=!1,Je({action:"snippet-control"})):bc=[]}function xc(){var t;return t=uc().mark((function t(e){var n,r,i,o,a,s;return uc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=bc.join(""),bc=[],r=mc[n],"true"!==e.getAttribute("contenteditable")&&""!==e.getAttribute("contenteditable")&&"plaintext-only"!==e.getAttribute("contenteditable")){t.next=17;break}if(i=gi(e,null),o=Math.max(0,i.startOffset-n.length+1),i.setStart(i.startContainer,o),""===r.rich_text){t.next=14;break}return t.next=10,Xe({action:"cache-clipboard"});case 10:return t.next=12,oc(r.rich_text,e);case 12:pn(i,r.plain_text,r.rich_text,e),Je({action:"pop-cached-clipboard"});case 14:Ct(r.id,"shortcut",n,0),t.next=18;break;case 17:"textarea"===e.nodeName.toLowerCase()&&(a=Math.max(0,e.selectionStart-n.length+1),s=a+r.plain_text.length,fn(e,a,e.selectionEnd,r.plain_text),e.setSelectionRange(s,s),Ct(r.id,"shortcut",n,0));case 18:case"end":return t.stop()}}),t)})),xc=function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){cc(o,r,i,a,s,"next",t)}function s(t){cc(o,r,i,a,s,"throw",t)}a(void 0)}))},xc.apply(this,arguments)}function Ec(){if(vc){var t,e=bc.join("");if(t=e.length,t,e.startsWith(gc))Je({action:"snippet-control",data:{query:e.substring(gc.length)}});else vc=!1,Je({action:"snippet-control",data:{show:!1}})}}function Ac(t,e){if(e.length>1)return!1;bc.push(e.toLowerCase());var n=yc.contains(bc);if(2===n)return function(t){xc.apply(this,arguments)}(t),!0;if(bc.join("")===gc){var r=mi(t),i=r.top,o=r.top+r.height+10,a=r.left,s=sc(window).height();Ke()?Je({action:"get-iframe-bounding-rect",href:window.location.href,name:window.name,x:a,y:o,caretY:i,frameIds:[]}):function(t,e,n,r){var i={top:"",bottom:"",left:t};n-e<300?i.bottom=n-r+10:i.top=e,Je({action:"snippet-control",data:{coordinates:i,mode:"inline",show:!0}}),vc=!0,Ec()}(a,o,s,i)}else Ec();if(1===n);else if(0===n&&!vc)for(;;){var u=bc.indexOf(" ");if(!(u>=0))return!1;if(0===(bc=bc.slice(u+1,bc.length)).length)return!1;if(0!==yc.contains(bc))return!1}}var _c=n(563);function Sc(t,e,n){t.observe(_c("#chatLog")[0],e),t.observe(_c("#chatTextArea")[0],e),n&&n()}function Cc(){var t;0===_c("sapling-chat-controls").length?((t=document.createElement("sapling-chat-controls")).attachShadow({mode:"open"}),_c("#chatInput").after(t)):t=_c("sapling-chat-controls")[0];var e=t.shadowRoot;_c(".sapling-chat-container",e)[0]||(_c(e).prepend(_c('\n<style type="text/css">\n.sapling-chat-container{\n}\n.sapling-chat-suggestion{\n width: 305px;\n margin: 5px;\n border: 1px solid rgba(82, 95, 153, 0.8);\n color: rgba(82, 95, 153, 0.8);\n background-color: #fff;\n border-radius: 5px;\n padding-left: 10px;\n padding-right: 10px;\n padding-top: 5px;\n padding-bottom: 5px;\n user-select: none;\n font-family: Helvetica, Arial, sans-serif;\n font-size: 12px;\n transition: all .15s ease;\n}\n.sapling-chat-suggestion:hover {\n transform: translateY(-1px);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.32);\n}\n.sapling-chat-suggestion:active {\n transform: translateY(0px);\n background-color: rgba(82, 95, 153, 0.5);\n}\n.sapling-chat-suggestion .sapling-suggestion-send img {\n z-index: 10;\n width: 20px;\n height: 20px;\n position: absolute;\n top: 0px; right: 0px;\n padding-top: 5px; padding-right: 5px;\n color: rgba(82, 95, 153, 0.8);\n visibility: hidden;\n}\n.sapling-chat-suggestion:hover .sapling-suggestion-send img {\n visibility: visible;\n}\n</style>')),_c(e).append(_c("\n<div class='sapling-chat-container'>\n</div>\n")))}function kc(t){for(var e=_c("#chatLog div"),n=[],r=function(){var r=_c(e[i]);if(r.hasClass("agentMessage"));else if(r.hasClass("chasitorMessage")){var o=_c(".messageText",r).text();o||(o=r.text()),n.push(o),t&&(_c(r).off("click"),_c(r).css("cursor","pointer"),_c(r).on("click",(function(){return t(o)})))}},i=0;i<e.length;i+=1)r();return n}function Oc(t,e){fn(_c("#chatTextArea")[0],0,0,t);try{_c("#chatInputSend").click()}catch(t){}e(U(_c("#chatTextArea")),_c("#chatTextArea")[0].value)}function Tc(t){fn(_c("#chatTextArea")[0],0,0,t)}function Fc(){return!!location.hostname.endsWith("salesforce.com")&&("/liveagent/chatlog.apexp"===location.pathname&&!!_c("#chatLog")[0])}function jc(){return _c("#chatTextArea")[0]?{sessionId:U(_c("#chatTextArea"))}:""}var Lc=n(563);function Ic(t){return function(t){if(Array.isArray(t))return Bc(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Nc(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Nc(t,e){if(t){if("string"==typeof t)return Bc(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Bc(t,e):void 0}}function Bc(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}window.log_last_mutated=void 0===window.log_last_mutated?new Date:window.log_last_mutated,window.sendEvent=Et;var Rc,Pc=null,Mc=null,Hc=null,qc=null,Uc=null,zc=3e3,Wc=null,Gc=null,Yc=null,$c=!1,Vc=void 0===Vc?null:Vc,Jc=void 0===Jc?"":Jc,Xc=void 0===Xc?"":Xc,Kc=void 0===Kc?null:Kc,Qc=void 0!==Qc&&Qc,Zc=void 0===Zc?null:Zc;window.lastResponseTimestamp="undefined"==typeof lastResponseTimestamp?null:lastResponseTimestamp;var tl=3;function el(t){for(var e=t.split(" "),n=new Set,r=0;r<=e.length&&(n.add(e.slice(r,r+tl).join(" ")),!(r+tl>=e.length));r++);return n}function nl(){var t=[];return new Date-log_last_mutated>6e4&&t.push({id:"helper-still-connected",doc:"Are we still connected?",confidence:null}),t}function rl(t){log_last_mutated=new Date;var e,n=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Nc(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;if("childList"===r.type){return ll(),void sl()}if("attributes"===r.type&&"disabled"===r.attributeName)return void yl()}}catch(t){n.e(t)}finally{n.f()}}function il(t){Zc&&(Zc.agent_message=t,function(t){var e=t.suggestion_id,n=t.index,r=(t.helper,t.suggest_text),i=t.agent_message,o=t.confidence,a=t.quick_send,s=el(r),u=el(i),c=new Set(Ic(s).filter((function(t){return u.has(t)}))),l=Hc(),f={hostname:m(),pathname:b(),suggest_index:n,confidence:o,frame_hostname:window.location.hostname,frame_pathname:window.location.pathname,ng_size:tl,ng_select:s.size,ng_sent:u.size,ng_overlap:c.size,quick_send:a,click_query:Qc};Object.assign(f,l),p={context:f,suggestion_id:e,action:"send"},ht("request/POST_SUGGESTION_EVENT",p),Zc=null,Qc=!1;var p}(Zc))}function ol(t){var e=t.suggestion_id,n=t.index,r=t.helper,i=t.confidence,o=t.quick_send,a=Hc(),s={hostname:m(),pathname:b(),suggest_index:n,confidence:i,frame_hostname:window.location.hostname,frame_pathname:window.location.pathname,quick_send:o,click_query:Qc,helper:r};Object.assign(s,a),ht("request/POST_SUGGESTION_SELECT",{suggestionId:e,context:s}),o?(Zc=null,Qc=!1):Zc=t}function al(t){var e=t.split(":");return 3600*parseInt(e[0])+60*parseInt(e[1])+parseInt(e[2])}var sl=Vi().debounce((function(){Wc(_t)}),300);function ul(){return{inpEl:null,inp:""}}function cl(t){for(var e=null,n=null,r=null,i=null,o=Lc("#chatLog div"),a=0;a<o.length;a+=1){var s=Lc(o[a]);s.hasClass("agentMessage")?(r=e,e="agent",i=n,n=Lc(".timestamp",s).text()):s.hasClass("chasitorMessage")&&(r=e,e="visitor",i=n,n=Lc(".timestamp",s).text())}if(n!==lastResponseTimestamp&&(lastResponseTimestamp=n,"agent"===e&&"visitor"===r)){var u=al(n)-al(i),c=Hc(),l={hostname:m(),pathname:b(),frame_hostname:window.location.hostname,frame_pathname:window.location.pathname,response_time:u,action:"agent_response"};Object.assign(l,c),Et("chat_event",l,""),t(l)}}var ll=Vi().debounce((function(){var t=Hc(),e=Pc((function(e){Qc=!0,uo(e,null,vl,t)}),St),n=e[e.length-1];e&&n&&n!==Jc&&(Jc=n,yl(),$c=!1,hl(),Qc=!1,uo(n,e,vl,t))}),200);var fl=Vi().debounce((function(){var t=Hc(),e=Yc(),n=(e.inpEl,e.inp);n&&n!==Xc&&(Xc=n,$c=!1,Qc=!1,co(n,vl,t))}),200);function pl(t,e,n){var r=t.doc,i=t.id;if(i!==Kc){var o=Gc().shadowRoot,a=Lc("<div class='sapling-chat-suggestion'>".concat(r,"</div>"));if("confidence"in t&&null!==t.confidence){var s=t.confidence.toFixed(2),u="low";s>.25&&(u="med"),s>.75&&(u="high");var c=Lc('<div class="sapling-suggestion-conf sapling-conf-'.concat(u,'">').concat(s,"</div>"));a.append(c)}n?Lc(".sapling-helper-container",o).append(a):Lc(".sapling-chat-container",o).append(a),a.on("mousedown",(function(o){1===o.which&&(log_last_mutated=new Date,Kc=i,yl(),Mc(r),ol({suggestion_id:i,index:e,helper:n,suggest_text:r,agent_message:r,confidence:t.confidence,quick_send:!1}))}))}else Kc=null}function dl(t){for(var e=new Set,n=[],r=0;r<t.length;r++)e.has(t[r].doc)||(e.add(t[r].doc),n.push(t[r]));return n}function hl(){if(!$c){var t=Gc();if(null===t&&Uc(),null!==(t=Gc())){var e=qc();if(e.length){var n=t.shadowRoot;0===Lc(".sapling-response-wrapper-close",n).length&&Lc(".sapling-response-wrapper",n).prepend('<div class="sapling-response-wrapper-close">×</div>'),Lc(".sapling-response-wrapper-close",n).click(yl),Lc(".sapling-helper-container",n).html(""),e=dl(e);for(var r=0;r<e.length;r++)pl(e[r],r,!0)}}}}function gl(){var t=Lc("sapling-chat-controls");return t.length?t[0]:null}function vl(t){if(t.length){var e=Gc().shadowRoot;0===Lc(".sapling-response-wrapper-close",e).length&&Lc(".sapling-response-wrapper",e).prepend('<div class="sapling-response-wrapper-close">×</div>'),Lc(".sapling-response-wrapper-close",e).click(yl),Lc(".sapling-chat-container",e).html(""),t=dl(t);for(var n=0;n<Math.min(3,t.length);n+=1)pl(t[n],n,!1);var r={num_responses:t.length,hidden:document.hidden},i=Hc();Object.assign(r,i),Et("show_suggest_responses",r,"")}}function yl(){$c=!0;var t=Gc();if(null!==t){var e=t.shadowRoot;Lc(".sapling-chat-suggestion",e).remove(),Lc(".sapling-response-wrapper-close",e).remove()}}function ml(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;if(le()&&((e=location.hostname)&&(e.includes("chat.cloudhumans.com")||e.includes("zendesk.com")||e.includes("ujet.co")||e.includes("force.com")||e.includes("connect.aws")||e.includes("awsapps")||e.includes("amazonaws.com")||e.includes("salesiq.zoho.com")||e.includes("intercom.com")||e.includes("agent.")||e.includes("sapling.ai")||e.includes("kustomer")||e.includes("gorgias")||e.includes("bliss.")))&&!(n<1)){"function"!=typeof shouldInitializeChatObserverOverride&&setTimeout((function(){ml(t,n-1)}),1e3);if(null!==Vc&&Vc.disconnect(),("function"==typeof shouldInitializeChatObserverOverride?shouldInitializeChatObserverOverride:Fc)()){var r="function"==typeof getLastClientChatMessagesOverride?getLastClientChatMessagesOverride:kc,i="function"==typeof injectChatResponseOverride?injectChatResponseOverride:Oc,o="function"==typeof editChatResponseOverride?editChatResponseOverride:Tc,a="function"==typeof observeChatEventsOverride?observeChatEventsOverride:Sc;Uc="function"==typeof injectChatUIOverride?injectChatUIOverride:Cc;var s="function"==typeof getContextOverride?getContextOverride:jc,u="function"==typeof getHelperResponsesOverride?getHelperResponsesOverride:nl,c="function"==typeof getResponseTimeHelperOverride?getResponseTimeHelperOverride:cl,l="function"==typeof getResponseWrapperOverride?getResponseWrapperOverride:gl,f="function"==typeof getInpOverride?getInpOverride:ul;Pc=r,function(e){return i(e,t)},Mc=function(t){return o(t)},Hc=s,qc=u,Wc=c,Gc=l,Yc=f,null==Vc&&(Vc=new MutationObserver(rl)),Uc(),a(Vc,{attributes:!0,childList:!0,characterData:!0,subtree:!0},ll,il),ll(),clearInterval(Rc),Rc=setInterval(hl,zc);var p=Yc(),d=p.inpEl;p.inp;d&&Lc(d).on("input",fl)}}}var bl=n(563);function Dl(t){return Dl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dl(t)}function wl(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return xl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xl(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function xl(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function El(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Al(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==Dl(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Dl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Dl(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var _l,Sl,Cl={},kl={},Ol={};function Tl(t,e){(_l=t,Sl=e,m().includes("figma.com"))&&(bl((function(){bl('div[name="propertiesPanelContainer"]').css("z-index",1)})),function(t,e){try{var n=document.getElementsByTagName("head")[0];if(!n)return!1;var r=document.getElementById(e);if(r)return[!1,r];var i=document.createElement("script");return i.setAttribute("type","text/javascript"),i.setAttribute("src",t),i.setAttribute("id",e),n.appendChild(i),i.remove(),!0}catch(t){return Xn(t),!1}}(Ye("/generated/figma-module.js"),"sapling-figma-extension-page-script")&&(window.addEventListener("sapling-figma-text-nodes-updated",(function(t){Fl(t.detail.figmaTextNodes)})),window.addEventListener("sapling-figma-viewport-updated",(function(t){var e,n;e=t.detail.figmaViewport,n=t.detail.figmaTextNodes,kl=e,Fl(n)}))))}function Fl(t){kl.viewportBounds&&kl.zoom&&t&&(Object.keys(Cl).filter((function(e){0===t.filter((function(t){return t.figmaId===e})).length&&(Cl[e].overlayDomElement.remove(),delete Cl[e])})),t.forEach((function(t){return function(t){var e=t.figmaId;Cl.hasOwnProperty(e)||(Cl[e]=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?El(Object(n),!0).forEach((function(e){Al(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):El(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t));var n=function(t){var e=t.figmaId,n=t.characters,r=t.textBounds,i=t.style;if(!Cl.hasOwnProperty(e))return;var o=Cl[e].overlayDomElement;if(!o){(o=document.createElement("div")).setAttribute("contenteditable",!0),bl(o).attr("id","sapling-figma-text-".concat(e)),bl(o).attr("sapling-figma-text-id",e),bl(o).data("sapling-figma-text-id",e),document.getElementsByTagName("body")[0].appendChild(o),Cl[e].overlayDomElement=o,o.addEventListener("input",(function(t){window.dispatchEvent(new CustomEvent("sapling-figma-edit-accepted",{detail:{figmaId:e,updatedText:jl(o.innerHTML)}}))}))}var a=kl.canvasRect.top,s=kl.canvasRect.left,u=kl.viewportBounds.y,c=kl.viewportBounds.x,l=kl.zoom;bl(o).data("figma-zoom",l);var f=r.y,p=r.x,d=r.width,h=r.height,g=s+(p-c)*l,v=a+(f-u)*l,y=d*l,m=h*l,b=i.textAlignHorizontal,D=i.textAlignVertical,w=i.paragraphSpacing,x=i.paragraphIndent,E=i.listSpacing,A=i.textSegments,_=w,S=E;o.innerHTML="";var C=document.createElement("span");function k(t,e){var n=new RegExp("[".concat(e.join(""),"]"),"g");return t.split(n)}bl(C).css({zoom:l}),Ou(bl(o).attr("sapling-id"));var O,T,F,j=String.fromCodePoint(8232),L=k(n.trim(),["\n",j]),I=0,N=0,B=wl(L);try{for(B.s();!(F=B.n()).done;){var R=F.value;T=0===R.length;var P=document.createElement("div"),M="NONE"!==(O=A[N]).listOptions.type,H={};M||(H["text-indent"]="".concat(x,"px")),0===I||(M?"NONE"!==A[N-1].listOptions.type?H["margin-top"]="".concat(_,"px"):H["margin-top"]="".concat(S,"px"):H["margin-top"]="".concat(_,"px"));var q=O.lineHeight,U="inherit";"PERCENT"===q.unit?U=Math.trunc(q.value)/100:"PIXELS"===q.unit&&(U="".concat(q.value-1,"px")),H["line-height"]=U,bl(P).css(H),T&&bl(P).attr("sapling-figma-empty-line",!0);for(var z=I+R.length;T||I<z&&O;){var W=document.createElement("span"),G=O,Y=G.characters,$=G.start,V=G.end,J=G.fontName,X=G.fontSize,K=G.fontWeight,Q=G.letterSpacing,Z=G.textCase,tt=J.family.split(" ").join("+")+":wght@".concat(K);Ol.hasOwnProperty(tt)||(document.getElementsByTagName("head")[0].innerHTML+='<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family='.concat(tt,'" />'),Ol[tt]=1);var et=X,nt="inherit";"UPPER"===Z||"LOWER"===Z?nt=Z.toLowerCase()+"case":"TITLE"===Z&&(nt="capitalize");var rt="inherit";"PERCENT"===Q.unit?rt="".concat(Math.trunc(100*Q.value)/1e4,"em"):"PIXELS"===Q.unit&&(rt="".concat(Q.value,"px")),bl(W).css({"font-family":J.family,"font-style":J.style,"font-size":"".concat(et,"px"),"text-transform":nt,"letter-spacing":rt,"font-weight":K});var it=I-$,ot=it+(Math.min(V,z)-I);W.textContent=Y.slice(it,ot),T&&(W.textContent="-"),P.appendChild(W),I=Math.min(z,V),z>=V?N++:I++,O=A[N],T=!1}C.appendChild(P)}}catch(t){B.e(t)}finally{B.f()}o.appendChild(C);var at="flex-start",st=b.toLowerCase();"CENTER"===b?at="center":"RIGHT"===b?at="flex-end":"JUSTIFIED"===b&&(st="justify");var ut="flex-start";"CENTER"===D?ut="center":"BOTTOM"===D&&(ut="flex-end");return bl(o).css({spellcheck:!1,color:"red",opacity:0,"pointer-events":"none",position:"fixed",top:"".concat(v,"px"),left:"".concat(g,"px"),height:"".concat(m,"px"),width:"".concat(y,"px"),"text-align":st,display:"flex","justify-content":at,"align-items":ut}),_l(o),uu(o),o}(t);Sl({saplingId:bl(n).attr("sapling-id"),editable:n})}(t)})))}function jl(t){var e,n="",r=wl((new DOMParser).parseFromString(t,"text/html").firstChild.lastChild.firstChild.children);try{for(r.s();!(e=r.n()).done;){var i=e.value;i.attributes.hasOwnProperty("sapling-figma-empty-line")?n+="\n":n+=i.textContent+"\n"}}catch(t){r.e(t)}finally{r.f()}return n.trimEnd()}var Ll=n(563);function Il(t){return Il="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Il(t)}function Nl(){Nl=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function c(t,e,n,i){var o=e&&e.prototype instanceof p?e:p,a=Object.create(o.prototype),s=new _(i||[]);return r(a,"_invoke",{value:w(t,n,s)}),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function p(){}function d(){}function h(){}var g={};u(g,o,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(S([])));y&&y!==e&&n.call(y,o)&&(g=y);var m=h.prototype=p.prototype=Object.create(g);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function D(t,e){function i(r,o,a,s){var u=l(t[r],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==Il(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,s)}),(function(t){i("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return i("throw",t,a,s)}))}s(u.arg)}var o;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){i(t,n,e,r)}))}return o=o?o.then(r,r):r()}})}function w(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return C()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=x(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function x(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=l(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,f;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function S(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return d.prototype=h,r(m,"constructor",{value:h,configurable:!0}),r(h,"constructor",{value:d,configurable:!0}),d.displayName=u(h,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,u(t,s,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(D.prototype),u(D.prototype,a,(function(){return this})),t.AsyncIterator=D,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new D(c(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(m),u(m,s,"Generator"),u(m,o,(function(){return this})),u(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=S,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),A(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function Bl(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Rl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Rl(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rl(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Pl(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}var Ml={},Hl={},ql={};function Ul(t){return zl.apply(this,arguments)}function zl(){var t;return t=Nl().mark((function t(e){var n,r,i,o;return Nl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.saplingId,r=e.editable,i=e.useVisibleText,"SDK"!==h.MODE){t.next=6;break}if(Sapling.userToggleEnabled){t.next=4;break}return t.abrupt("return");case 4:t.next=8;break;case 6:if(De(r)||"sapling-embedded-editable"===r.id){t.next=8;break}return t.abrupt("return");case 8:if(o=H(r)){t.next=11;break}return t.abrupt("return");case 11:if(au(o),!ql[n]){t.next=14;break}return t.abrupt("return");case 14:return ql[n]=!0,t.next=17,Yo(r,i||!1);case 17:Go(n),delete ql[n];case 19:case"end":return t.stop()}}),t)})),zl=function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){Pl(o,r,i,a,s,"next",t)}function s(t){Pl(o,r,i,a,s,"throw",t)}a(void 0)}))},zl.apply(this,arguments)}function Wl(t){xe(t.editable)&&(t.hasOwnProperty("saplingId")?so(t.editable,t.saplingId):so(t.editable,t.textAreaId))}var Gl=Vi().wrap(Vi().memoize((function(){return Vi().debounce(Ul,250,{leading:!1,trailing:!0})}),Vi().property("id")),(function(t,e){return t(e)(e)})),Yl=Vi().wrap(Vi().memoize((function(){return Vi().debounce(Wl,50,{leading:!1,trailing:!0})}),Vi().property("id")),(function(t,e){return t(e)(e)})),$l=Vi().wrap(Vi().memoize((function(){return Vi().debounce(ku,20,{leading:!1,trailing:!0})}),Vi().property("id")),(function(t,e){return t(e)(e)}));function Vl(t){if("characterData"!==t.type)return!1;var e=t.target.data.replace(/\u00A0/g," "),n=t.oldValue.replace(/\u00A0/g," ");if(!e.startsWith(n))return!1;var r=e.substring(n.length);return!!Pi().startsWith(r)}var Jl=Vi().wrap(Vi().memoize((function(){return Vi().debounce((function(t){!function(t){if(t in Qs){var e=Qs[t].edits;Object.keys(e).forEach((function(n){var r=e[n];Oa(r.editRange,r.edit,!1)||hu(t,n)}))}}(t),Ou(t),_a()}),50,{leading:!1,trailing:!0})})),(function(t,e){return t(e)(e)}));function Xl(t,e){Ll(t).on("focus click keyup",(function(n){"keyup"===n.type?"ArrowLeft"!==n.key&&"ArrowRight"!==n.key&&"ArrowUp"!==n.key&&"ArrowDown"!==n.key||Gl({saplingId:e,editable:t}):(Gl({saplingId:e,editable:t}),"focus"===n.type&&Dc())})),ft(e,t,!1,"jqueryObservers",t)}function Kl(t,e){for(var n=T(t),r=0;r<n.length;r+=1){var i=n[r];Ll(i).on("scroll",(function(){Ou(e),Gl({saplingId:e,editable:t,useVisibleText:!0}),ma()})),ft(e,t,!1,"jqueryObservers",i)}}function Ql(t,e){var n=new MutationObserver((function(n){!function(t,e,n){for(var r=!1,i=0;i<n.length;i+=1){var o=n[i];if(Gl({saplingId:e,editable:t}),"characterData"!==o.type||r){if("childList"===o.type)mu(e,o),U(t)||(Vl(o)?Mi(t):(ji(),Yl({saplingId:e,editable:t})));else if("attributes"===o.type&&"contenteditable"===o.attributeName){var a=t.getAttribute("contenteditable");"DIV"!==t.tagName||U(t)||"true"===a||""===a||"plaintext-only"===a||Zl(t,!1)}}else bu(e,o),U(t)||(Vl(o)?Mi(t):(ji(),Yl({saplingId:e,editable:t}))),r=!0}Jl(e)}(t,e,n)}));n.observe(t,{attributes:!0,childList:!0,characterData:!0,subtree:!0,characterDataOldValue:!0}),ft(e,t,!1,"mutationObservers",n)}function Zl(t,e){var n=t.getAttribute("sapling-input-id");if(n&&(nu(n),pt(n,e)),e){var r=U(t);r&&(pt(r,e),cn(t)),delete Hl[r]}else{var i=H(t);i&&(pt(i,e),nu(i),function(t){t in Qs&&(Qs[t].overlayDomElement.remove(),Qs[t].summaryAnnotationsContainer&&Qs[t].summaryAnnotationsContainer.removeUIElements(),delete Qs[t])}(i),function(t){t in Ho&&delete Ho[t]}(i)),delete Ml[i]}Kr()}var tf=Vi().throttle((function(t){Object.keys(Ml).forEach((function(t){var e,n=Ml[t];void 0===n||n.classList.contains("wysihtml5-editor")||(Q(n)?(uu(e=n),Ou(H(e)),document.activeElement===n&&Pi()&&Ri(n,Pi())):Zl(n,!0))})),Object.keys(Hl).forEach((function(t){var e=Hl[t];void 0!==e&&(Q(e)?uu(rn(e)):Zl(e,!0))}))}),30,{leading:!1,trailing:!0}),ef=new tc((function(t){requestAnimationFrame((function(){tf(t)}))}));function nf(t){var e=Z(t);if(void 0!==e){var n,r=U(e);if(r)an(r,e.value),"input"===t.type&&(n=t.data,Pi().startsWith(n)?Mi(e):(ji(),Yl({textAreaId:r,editable:e})))}}function rf(t){var e=U(t),n={passive:!0,once:!1};t.addEventListener("input",nf,n),ft(e,t,!0,"eventListeners",{element:t,event:"input",handler:nf,options:n}),t.addEventListener("keyup",nf,n),ft(e,t,!0,"eventListeners",{element:t,event:"keyup",handler:nf,options:n})}function of(t,e){for(var n=T(t),r=0;r<n.length;r+=1){var i=n[r];U(i)===e?Ll(i).on("scroll",(function(){sn(e)})):Ll(i).on("scroll",(function(){un(e)})),ft(e,t,!0,"jqueryObservers",i)}}var af=function(){setTimeout(pa,100)};function sf(t){if("SDK"===h.MODE||De(t)||xe(t)||"sapling-embedded-editable"===t.id){var e=H(t);if(!e||!(e in Ml)){var n=q(t,e);Ml[n]=t,uu(t),Ql(t,n),ef.observe(t),ft(n,t,!1,"resizeObservers",{container:t,observer:ef}),uf(n,t,!1),Xl(t,n),cf(n,t,!1),Kl(t,n),hf(t),Ul({saplingId:n,editable:t,useVisibleText:!1})}}}function uf(t,e,n){Ll(e).on("keypress",(function(t){if(Ac(e,t.key))return!1}));var r=xe(e);Ll(e).on("keydown",(function(t){if("Tab"===t.key){if(!!ha(h.CONTROL_ELEMENT).attr("sapling-edit-id")&&(ha("#accept-button",ya).focus(),!0))return!1}else{if(!(n=t.key,vc&&dc.has(n)?(Je({action:"snippet-control",data:{key:n}}),!1):("Backspace"===n?(bc.pop(),Ec()):pc.has(n)&&(bc=[]),!0)))return!1;$l(e)}var n;r&&(P(e),Hi(t,e)),Ae()&&af()})),ft(t,e,n,"jqueryObservers",e)}function cf(t,e,n){Ll(e).on("click",(function(t){Cu(e)})),ft(t,e,n,"eventListeners",{element:e,event:"click",handler:Cu})}function lf(t){if(De(t)||xe(t)){var e=Ll(t).attr("onfocus");if(!e||!e.includes("(this).hide()")){var n=U(t);if(n&&n in Hl)an(n,t.value);else{var r=z(t);Hl[r]=t;var i=rn(t);rf(t),ef.observe(t),ft(r,t,!0,"resizeObservers",{container:t,observer:ef}),of(t,r),uf(n,t,!0),cf(n,t,!0),an(r,t.value),sn(r),sf(i),q(t,H(i))}}}}var ff=Vi().throttle((function(t){for(var e=null,n=0,r=Object.entries(Qs);n<r.length;n++){var i=Ws(r[n],2),o=i[0],a=i[1],s=a.edits,u=a.overlayDomElement,c=a.annotationsOverlay;if(s){for(var l=[],f=0,p=Object.values(s);f<p.length;f++){var d=p[f],h=d.edit,g=d.editRange,v=d.isHover;if(!h.fillin){if(v&&Su(t)){l=[d];break}Eu(g,o,t)&&l.push(d)}}if(l.length)e={editInfo:_s(l),containerId:o,overlayDomElement:u,annotationsOverlay:c};xu(o,t)&&a.badge.showBadgeDashboard()}}var y=!1;if(e){var m=e,b=m.editInfo,D=m.containerId,w=m.overlayDomElement,x=m.annotationsOverlay;y=_u(b.edit.editId,D,b,x,w)}y?clearTimeout(ga):Ca()}),100,{leading:!1,trailing:!0});function pf(t,e){for(var n=0;n<t.length;n+=1){if(t[n].id===e)return!0}return!1}function df(t){var e=t.path;e&&(wc(pf(e,"sapling-snippet-controls")),(pf(e,"accept-button")||pf(e,"ignore-button")||pf(e,"explanations"))&&t.preventDefault())}function hf(t){if(document!==t.ownerDocument&&"SDK"===h.MODE){Sapling.injectCSS(t.ownerDocument);var e={passive:!0};t.ownerDocument.addEventListener("mousemove",ff,e),ct({element:document,event:"mousemove",handler:ff,options:e}),t.ownerDocument.addEventListener("mousedown",df,{}),ct({element:document,event:"mousedown",handler:df,options:{}})}}function gf(t){wc();var e=Z(t);"true"===e.getAttribute("contenteditable")||""===e.getAttribute("contenteditable")||"plaintext-only"===e.getAttribute("contenteditable")?sf(e):ve(e)&&lf(e),Object.keys(it).forEach((function(t){Q(it[t].domElement)||pt(t,!1)})),Object.keys(ot).forEach((function(t){Q(ot[t].domElement)||pt(t,!0)}))}function vf(){var t={passive:!0};document.addEventListener("selectionchange",af,t),ct({element:document,event:"selectionchange",handler:af,options:t}),document.addEventListener("selectionchange",da,t),ct({element:document,event:"selectionchange",handler:da,options:t})}function yf(t){return!!(Ll(t).is(":focus")||""!==t.textContent&&Ll(t).is(":visible"))}function mf(t){for(var e=0;e<t.length;e+=1){var n=t[e];if("childList"===n.type){for(var r=0;r<n.addedNodes.length;r+=1){var i=n.addedNodes[r];"IFRAME"===i.tagName?Qe(Ll(i),(function(){ht("init/NEW_IFRAME_LOADED")})):Ll("iframe",i).each((function(t,e){Qe(Ll(e),(function(){ht("init/NEW_IFRAME_LOADED")}))}))}for(var o=0;o<n.removedNodes.length;o+=1){var a=n.removedNodes[o];if(a.nodeType===Node.ELEMENT_NODE&&(J(a)||ve(a)))Zl(a,ve(a))}}}}function bf(){if(m().includes(h.WEBSITE_HOSTNAME)){var t=document.getElementById("logout-button");t&&t.addEventListener("click",(function(){ht("request/LOGOUT_USER",{},(function(){ie(!0)}),(function(){ie(!0)}))}));var e=document.getElementById("login-button");e&&e.addEventListener("click",(function(){var t,e;ht("request/CLEAR_USER",t,e)}))}}function Df(){if(h.AI_DETECT_ANYWHERE_EXTENSION)return ra(),void vf();var t;if(function(){"SDK"!==h.MODE&&(m(),Ll("iframe").each((function(t,e){try{Qe(Ll(e),(function(){return ht("init/NEW_IFRAME_LOADED")}))}catch(t){}})));var t=document.body;if(t){if("SDK"!==h.MODE){var e=new MutationObserver(mf);e.observe(t,{attributes:!1,childList:!0,subtree:!0}),lt(e)}ef.observe(t),lt(ef)}}(),t={passive:!0},document.addEventListener("mousemove",ff,t),ct({element:document,event:"mousemove",handler:ff,options:t}),document.addEventListener("mousedown",df,{}),ct({element:document,event:"mousedown",handler:df,options:{}}),"SDK"!==h.MODE){bf(),function(){var t={passive:!0};document.addEventListener("focusin",gf,t),ct({element:document,event:"focusin",handler:gf,options:t}),document.addEventListener("focusout",ji,t),ct({element:document,event:"focusout",handler:ji,options:t}),document.addEventListener("focusout",Kr,t),ct({element:document,event:"focusout",handler:Kr,options:t})}(),vf(),function(){var t="textarea";Fe()&&(t='textarea,input[type="text"]'),Ll(t).each((function(t,e){yf(e)&&lf(e)})),Ll("[contenteditable=true], [contenteditable=plaintext-only]").each((function(t,e){yf(e)&&sf(e)}));var e=K((function(t){return V(t,Fe())}));Ll(e).each((function(t,e){yf(e)&&lf(e)}));var n=K(J);Ll(n).each((function(t,e){yf(e)&&sf(e)}))}(),Tl(sf,Ul),Dc();try{ml(an)}catch(t){}}}function wf(t){var e=H(t);e&&e in Ml||(e=q(t),Ml[e]=t,ef.observe(t),ft(e,t,!1,"resizeObservers",{container:t,observer:ef}),Xl(t,e),cf(e,t,!1),Kl(t,e),hf(t)),uu(t),Ul({saplingId:e,editable:t,useVisibleText:!1})}function xf(t){var e=U(t);e&&e in Hl||(e=z(t),Hl[e]=t,rf(t),ef.observe(t),ft(e,t,!0,"resizeObservers",{container:t,observer:ef}),of(t,e),uf(e,t,!0),cf(e,t,!0),sn(e)),an(e,t.value),wf(rn(t))}function Ef(t,e){localStorage.setItem(t,e);var n=new Date;n.setTime(n.getTime()+31536e6),document.cookie="".concat(t,"=").concat(e,"; expires=").concat(n.toUTCString())}function Af(t){var e=document.cookie.split("; ").find((function(e){return e.trim().startsWith(t)}));if(e){var n=e.split("=")[1];if(n&&n.trim().length>0)return n}var r=localStorage.getItem(t);return r&&r.trim().length>0?r:null}var _f=n(563);function Sf(t){return Sf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sf(t)}function Cf(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return kf(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kf(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kf(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Of={advancedEdits:{advanced_edits:!1},aiDetectPathname:"/api/v1/aidetect",annotationsEnabled:!1,autocomplete:!1,autoShowAdvancedEdits:!1,autoShowAnnotations:!1,checkButton:!1,completePathname:"/api/v1/complete",editActionPathname:"",editPathname:"/api/v1/edits",endpointHostname:"https://api.sapling.ai",edits:!0,ignoreText:"Ignore",isAnonUser:!1,lang:"en",lightningCompat:!1,lightningCompatLeft:0,lightningCompatTop:0,medical:null,mode:"prod",neuralSpellcheck:null,operations:[],saplingPathPrefix:"",shadowRoot:!0,snippets:!1,statisticsPathname:"/api/v1/statistics",statusBadge:!0,toneEnabled:!1,toneFeedbackEnabled:!1,toneFeedbackPathname:"/api/v1/tone/feedback",tonePathname:"/api/v1/tone",userData:null,userId:"",userToggle:!1,userToggleEnabled:null,variety:null,telemetryEndpoint:null,freemium:!1,customStyles:{},appearance:{compact:!0,variables:{acceptText:"Accept",ignoreText:"Ignore",badgeSize:null,badgeMargin:null,badgeColor:null,badgeErrorColor:null},customCSS:""}};function Tf(t,e){for(var n={},r=0,i=Object.entries(t);r<i.length;r++){var o=Cf(i[r],2),a=o[0],s=o[1];a in e?"object"===Sf(s)&&"object"===Sf(e[a])?n[a]=Tf(s,e[a]):n[a]=e[a]:n[a]=s}return n}function Ff(t){var e=t.createElement("style");e.textContent=p,t.head.appendChild(e)}function jf(t){Sapling.userToggleEnabled=t,Ef("sapling-sdk-user-toggle-enabled",t),t?function(){for(var t=0,e=Object.entries(Ml);t<e.length;t++){var n=Bl(e[t],2);Ul({saplingId:n[0],editable:n[1],useVisibleText:!1})}for(var r=0,i=Object.entries(Hl);r<i.length;r++){var o=Bl(i[r],2);an(o[0],o[1].value)}}():function(){for(var t=0,e=Object.entries(Qs);t<e.length;t++){for(var n=Ws(e[t],2),r=(n[0],n[1]),i=0,o=Object.entries(r.edits);i<o.length;i++){var a,s=Ws(o[i],2),u=(s[0],Js(s[1].domElements));try{for(u.s();!(a=u.n()).done;)a.value.remove()}catch(t){u.e(t)}finally{u.f()}}r.edits={}}}()}var Lf={};window&&void 0===window.Sapling&&(Lf.init=function(t){for(var e,n,r=Tf(Of,t),i=0,o=Object.entries(r);i<o.length;i++){var a=Cf(o[i],2),s=a[0],u=a[1];Sapling[s]=u}if(t.userId||(Sapling.userId=function(){var t="sapling-sdk-anon-user-id",e=Af(t);return e&&"null"!=e||(e="anon-".concat(f())),Ef(t,e),e}(),Sapling.isAnonUser=!0),Sapling.freemium&&ie(!0),Sapling.saplingPathPrefix.length&&!Sapling.saplingPathPrefix.startsWith("/")&&(Sapling.saplingPathPrefix="/".concat(Sapling.saplingPathPrefix)),je(t.lang),"key"in t&&("dev"===Sapling.mode||t.key&&t.key.includes("."))&&(Sapling.key=t.key),Sapling.sessionId=f(),e=window.location.href,n=new g(e),v=n.hostname||window.location.hostname,y=n.pathname||window.location.pathname,Df(),ze("sdk-init"),"headers"in t&&_f.ajaxSetup({beforeSend:function(e){for(var n=0,r=Object.entries(t.headers);n<r.length;n++){var i=Cf(r[n],2),o=i[0],a=i[1];e.setRequestHeader(o,a)}}}),Sapling.autoShowAnnotations&&(Sapling.autoShowAdvancedEdits=!0),Sapling.annotationsEnabled&&(Sapling.advancedEdits.advanced_edits=!0),Sapling.userToggle){if(null===Sapling.userToggleEnabled){var c=Af("sapling-sdk-user-toggle-enabled");if(null!==c){var l="true"===String(c).toLowerCase();Sapling.userToggleEnabled=l}}}else Sapling.userToggleEnabled=!0;Sapling.setUserToggleEnabled=jf,Sapling.injectCSS=Ff,Ff(document),$e()},Lf.observe=function(t){if(!t)throw new Error("Sapling.observe must be called on a DOM element.");if("textarea"===t.nodeName.toLowerCase())lf(t);else if("input"===t.nodeName.toLowerCase()){if("text"!==t.type)throw new Error('Sapling.observe must be called on input of type="text".');lf(t)}else if("lightning-textarea"===t.nodeName.toLowerCase()||"lightning-input-field"===t.nodeName.toLowerCase())Sapling.lightningCompat=!0,lf(t);else{if("true"!==t.getAttribute("contenteditable")&&""!==t.getAttribute("contenteditable")&&"plaintext-only"!==t.getAttribute("contenteditable"))throw new Error("Sapling.observe must be called on textarea, contenteditable, or input.");sf(t)}},Lf.unobserve=function(t){if(!t)throw new Error("Sapling.unobserve must be called on a DOM element.");if("textarea"===t.nodeName.toLowerCase())Zl(t,!0);else if("input"===t.nodeName.toLowerCase())Zl(t,!0);else if("lightning-textarea"===t.nodeName.toLowerCase()||"lightning-input-field"===t.nodeName.toLowerCase())Zl(t);else{if("true"!==t.getAttribute("contenteditable")&&""!==t.getAttribute("contenteditable")&&"plaintext-only"!==t.getAttribute("contenteditable"))throw new Error("Sapling.unobserve must be called on textarea, contenteditable, or input.");Zl(t,!1)}},Lf.checkOnce=function(t){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{aiDetect:!1}).aiDetect;if(!t)throw new Error("Sapling.checkOnce must be called on a DOM element.");if("textarea"===t.nodeName.toLowerCase())xf(t);else if("input"===t.nodeName.toLowerCase()){if("text"!==t.type)throw new Error('Sapling.checkOnce must be called on input of type="text".');xf(t)}else if("lightning-textarea"===t.nodeName.toLowerCase()||"lightning-input-field"===t.nodeName.toLowerCase())Sapling.lightningCompat=!0,xf(t);else{if("true"!==t.getAttribute("contenteditable")&&""!==t.getAttribute("contenteditable")&&"plaintext-only"!==t.getAttribute("contenteditable"))throw new Error("Sapling.checkOnce must be called on textarea, contenteditable, or input.");wf(t)}if(e){var n=function(t){var e=H(t);if(e){var n=Qs[e]||{edits:{}},r=n.shadowHost,i=n.badge;return n.aiDetectOverlay||(n.aiDetectOverlay=new As(r,e,i),n.aiDetectOverlay.createUIElements()),{containerId:e,aiDetectOverlay:n.aiDetectOverlay}}}(t),r=n.containerId,i=n.aiDetectOverlay;!function(t){var e=Qs[t];e&&e.aiDetectOverlay&&e.aiDetectOverlay.queryAndUpdate()}(r),i.initForCheckOnce()}},window.Sapling=Lf);var If=Lf}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={id:r,loaded:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.hmd=t=>((t=Object.create(t)).children||(t.children=[]),Object.defineProperty(t,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+t.id)}}),t),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),n(588);var r=n(580);SaplingModule=r})();
|
|
1
|
+
!function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=(new Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="7271f14c-79ee-4521-bc6d-dda71a2a00c1",t._sentryDebugIdIdentifier="sentry-dbid-7271f14c-79ee-4521-bc6d-dda71a2a00c1")}catch(t){}}();export var SaplingModule; var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"a557b9d5"},(()=>{var t={376:(t,e,n)=>{"use strict";function r(){return!("undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}function i(t,e){return t.require(e)}n.d(e,{l$:()=>i,KV:()=>r}),t=n.hmd(t)},312:(t,e,n)=>{"use strict";n.d(e,{ph:()=>l,yW:()=>c});var r=n(376),i=n(458);t=n.hmd(t);const o=(0,i.Rf)(),a={nowSeconds:()=>Date.now()/1e3};const s=(0,r.KV)()?function(){try{return(0,r.l$)(t,"perf_hooks").performance}catch(t){return}}():function(){const{performance:t}=o;if(!t||!t.now)return;return{now:()=>t.now(),timeOrigin:Date.now()-t.now()}}(),u=void 0===s?a:{nowSeconds:()=>(s.timeOrigin+s.now())/1e3},c=a.nowSeconds.bind(a),l=u.nowSeconds.bind(u);let f;(()=>{const{performance:t}=o;if(!t||!t.now)return void(f="none");const e=36e5,n=t.now(),r=Date.now(),i=t.timeOrigin?Math.abs(t.timeOrigin+n-r):e,a=i<e,s=t.timing&&t.timing.navigationStart,u="number"==typeof s?Math.abs(s+n-r):e;a||u<e?i<=u?(f="timeOrigin",t.timeOrigin):f="navigationStart":f="dateNow"})()},458:(t,e,n)=>{"use strict";function r(t){return t&&t.Math==Math?t:void 0}n.d(e,{Rf:()=>o,YO:()=>a,n2:()=>i});const i="object"==typeof globalThis&&r(globalThis)||"object"==typeof window&&r(window)||"object"==typeof self&&r(self)||"object"==typeof n.g&&r(n.g)||function(){return this}()||{};function o(){return i}function a(t,e,n){const r=n||i,o=r.__SENTRY__=r.__SENTRY__||{};return o[t]||(o[t]=e())}},721:function(t,e){!function(t){"use strict";function e(){}function n(t,e,n,r,i){for(var o=0,a=e.length,s=0,u=0;o<a;o++){var c=e[o];if(c.removed){if(c.value=t.join(r.slice(u,u+c.count)),u+=c.count,o&&e[o-1].added){var l=e[o-1];e[o-1]=e[o],e[o]=l}}else{if(!c.added&&i){var f=n.slice(s,s+c.count);f=f.map((function(t,e){var n=r[u+e];return n.length>t.length?n:t})),c.value=t.join(f)}else c.value=t.join(n.slice(s,s+c.count));s+=c.count,c.added||(u+=c.count)}}var p=e[a-1];return a>1&&"string"==typeof p.value&&(p.added||p.removed)&&t.equals("",p.value)&&(e[a-2].value+=p.value,e.pop()),e}function r(t){return{newPos:t.newPos,components:t.components.slice(0)}}e.prototype={diff:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=i.callback;"function"==typeof i&&(o=i,i={}),this.options=i;var a=this;function s(t){return o?(setTimeout((function(){o(void 0,t)}),0),!0):t}t=this.castInput(t),e=this.castInput(e),t=this.removeEmpty(this.tokenize(t));var u=(e=this.removeEmpty(this.tokenize(e))).length,c=t.length,l=1,f=u+c,p=[{newPos:-1,components:[]}],d=this.extractCommon(p[0],e,t,0);if(p[0].newPos+1>=u&&d+1>=c)return s([{value:this.join(e),count:e.length}]);function h(){for(var i=-1*l;i<=l;i+=2){var o=void 0,f=p[i-1],d=p[i+1],h=(d?d.newPos:0)-i;f&&(p[i-1]=void 0);var g=f&&f.newPos+1<u,v=d&&0<=h&&h<c;if(g||v){if(!g||v&&f.newPos<d.newPos?(o=r(d),a.pushComponent(o.components,void 0,!0)):((o=f).newPos++,a.pushComponent(o.components,!0,void 0)),h=a.extractCommon(o,e,t,i),o.newPos+1>=u&&h+1>=c)return s(n(a,o.components,e,t,a.useLongestToken));p[i]=o}else p[i]=void 0}l++}if(o)!function t(){setTimeout((function(){if(l>f)return o();h()||t()}),0)}();else for(;l<=f;){var g=h();if(g)return g}},pushComponent:function(t,e,n){var r=t[t.length-1];r&&r.added===e&&r.removed===n?t[t.length-1]={count:r.count+1,added:e,removed:n}:t.push({count:1,added:e,removed:n})},extractCommon:function(t,e,n,r){for(var i=e.length,o=n.length,a=t.newPos,s=a-r,u=0;a+1<i&&s+1<o&&this.equals(e[a+1],n[s+1]);)a++,s++,u++;return u&&t.components.push({count:u}),t.newPos=a,s},equals:function(t,e){return this.options.comparator?this.options.comparator(t,e):t===e||this.options.ignoreCase&&t.toLowerCase()===e.toLowerCase()},removeEmpty:function(t){for(var e=[],n=0;n<t.length;n++)t[n]&&e.push(t[n]);return e},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};var i=new e;function o(t,e,n){return i.diff(t,e,n)}function a(t,e){if("function"==typeof t)e.callback=t;else if(t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}var s=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,u=/\S/,c=new e;function l(t,e,n){return n=a(n,{ignoreWhitespace:!0}),c.diff(t,e,n)}function f(t,e,n){return c.diff(t,e,n)}c.equals=function(t,e){return this.options.ignoreCase&&(t=t.toLowerCase(),e=e.toLowerCase()),t===e||this.options.ignoreWhitespace&&!u.test(t)&&!u.test(e)},c.tokenize=function(t){for(var e=t.split(/(\s+|[()[\]{}'"]|\b)/),n=0;n<e.length-1;n++)!e[n+1]&&e[n+2]&&s.test(e[n])&&s.test(e[n+2])&&(e[n]+=e[n+2],e.splice(n+1,2),n--);return e};var p=new e;function d(t,e,n){return p.diff(t,e,n)}function h(t,e,n){var r=a(n,{ignoreWhitespace:!0});return p.diff(t,e,r)}p.tokenize=function(t){var e=[],n=t.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var i=n[r];r%2&&!this.options.newlineIsToken?e[e.length-1]+=i:(this.options.ignoreWhitespace&&(i=i.trim()),e.push(i))}return e};var g=new e;function v(t,e,n){return g.diff(t,e,n)}g.tokenize=function(t){return t.split(/(\S.+?[.!?])(?=\s+|$)/)};var y=new e;function m(t,e,n){return y.diff(t,e,n)}function b(t){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},b(t)}function D(t){return w(t)||x(t)||E()}function w(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}function x(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function E(){throw new TypeError("Invalid attempt to spread non-iterable instance")}y.tokenize=function(t){return t.split(/([{}:;,]|\s+)/)};var A=Object.prototype.toString,_=new e;function S(t,e,n){return _.diff(t,e,n)}function C(t,e,n,r,i){var o,a;for(e=e||[],n=n||[],r&&(t=r(i,t)),o=0;o<e.length;o+=1)if(e[o]===t)return n[o];if("[object Array]"===A.call(t)){for(e.push(t),a=new Array(t.length),n.push(a),o=0;o<t.length;o+=1)a[o]=C(t[o],e,n,r,i);return e.pop(),n.pop(),a}if(t&&t.toJSON&&(t=t.toJSON()),"object"===b(t)&&null!==t){e.push(t),a={},n.push(a);var s,u=[];for(s in t)t.hasOwnProperty(s)&&u.push(s);for(u.sort(),o=0;o<u.length;o+=1)a[s=u[o]]=C(t[s],e,n,r,s);e.pop(),n.pop()}else a=t;return a}_.useLongestToken=!0,_.tokenize=p.tokenize,_.castInput=function(t){var e=this.options,n=e.undefinedReplacement,r=e.stringifyReplacer,i=void 0===r?function(t,e){return void 0===e?n:e}:r;return"string"==typeof t?t:JSON.stringify(C(t,null,null,i),i," ")},_.equals=function(t,n){return e.prototype.equals.call(_,t.replace(/,([\r\n])/g,"$1"),n.replace(/,([\r\n])/g,"$1"))};var k=new e;function O(t,e,n){return k.diff(t,e,n)}function T(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.split(/\r\n|[\n\v\f\r\x85]/),r=t.match(/\r\n|[\n\v\f\r\x85]/g)||[],i=[],o=0;function a(){var t={};for(i.push(t);o<n.length;){var r=n[o];if(/^(\-\-\-|\+\+\+|@@)\s/.test(r))break;var a=/^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(r);a&&(t.index=a[1]),o++}for(s(t),s(t),t.hunks=[];o<n.length;){var c=n[o];if(/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(c))break;if(/^@@/.test(c))t.hunks.push(u());else{if(c&&e.strict)throw new Error("Unknown line "+(o+1)+" "+JSON.stringify(c));o++}}}function s(t){var e=/^(---|\+\+\+)\s+(.*)$/.exec(n[o]);if(e){var r="---"===e[1]?"old":"new",i=e[2].split("\t",2),a=i[0].replace(/\\\\/g,"\\");/^".*"$/.test(a)&&(a=a.substr(1,a.length-2)),t[r+"FileName"]=a,t[r+"Header"]=(i[1]||"").trim(),o++}}function u(){for(var t=o,i=n[o++].split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/),a={oldStart:+i[1],oldLines:+i[2]||1,newStart:+i[3],newLines:+i[4]||1,lines:[],linedelimiters:[]},s=0,u=0;o<n.length&&!(0===n[o].indexOf("--- ")&&o+2<n.length&&0===n[o+1].indexOf("+++ ")&&0===n[o+2].indexOf("@@"));o++){var c=0==n[o].length&&o!=n.length-1?" ":n[o][0];if("+"!==c&&"-"!==c&&" "!==c&&"\\"!==c)break;a.lines.push(n[o]),a.linedelimiters.push(r[o]||"\n"),"+"===c?s++:"-"===c?u++:" "===c&&(s++,u++)}if(s||1!==a.newLines||(a.newLines=0),u||1!==a.oldLines||(a.oldLines=0),e.strict){if(s!==a.newLines)throw new Error("Added line count did not match for hunk at line "+(t+1));if(u!==a.oldLines)throw new Error("Removed line count did not match for hunk at line "+(t+1))}return a}for(;o<n.length;)a();return i}function F(t,e,n){var r=!0,i=!1,o=!1,a=1;return function s(){if(r&&!o){if(i?a++:r=!1,t+a<=n)return a;o=!0}if(!i)return o||(r=!0),e<=t-a?-a++:(i=!0,s())}}function j(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof e&&(e=T(e)),Array.isArray(e)){if(e.length>1)throw new Error("applyPatch only works with a single input.");e=e[0]}var r,i,o=t.split(/\r\n|[\n\v\f\r\x85]/),a=t.match(/\r\n|[\n\v\f\r\x85]/g)||[],s=e.hunks,u=n.compareLine||function(t,e,n,r){return e===r},c=0,l=n.fuzzFactor||0,f=0,p=0;function d(t,e){for(var n=0;n<t.lines.length;n++){var r=t.lines[n],i=r.length>0?r[0]:" ",a=r.length>0?r.substr(1):r;if(" "===i||"-"===i){if(!u(e+1,o[e],i,a)&&++c>l)return!1;e++}}return!0}for(var h=0;h<s.length;h++){for(var g=s[h],v=o.length-g.oldLines,y=0,m=p+g.oldStart-1,b=F(m,f,v);void 0!==y;y=b())if(d(g,m+y)){g.offset=p+=y;break}if(void 0===y)return!1;f=g.offset+g.oldStart+g.oldLines}for(var D=0,w=0;w<s.length;w++){var x=s[w],E=x.oldStart+x.offset+D-1;D+=x.newLines-x.oldLines,E<0&&(E=0);for(var A=0;A<x.lines.length;A++){var _=x.lines[A],S=_.length>0?_[0]:" ",C=_.length>0?_.substr(1):_,k=x.linedelimiters[A];if(" "===S)E++;else if("-"===S)o.splice(E,1),a.splice(E,1);else if("+"===S)o.splice(E,0,C),a.splice(E,0,k),E++;else if("\\"===S){var O=x.lines[A-1]?x.lines[A-1][0]:null;"+"===O?r=!0:"-"===O&&(i=!0)}}}if(r)for(;!o[o.length-1];)o.pop(),a.pop();else i&&(o.push(""),a.push("\n"));for(var j=0;j<o.length-1;j++)o[j]=o[j]+a[j];return o.join("")}function L(t,e){"string"==typeof t&&(t=T(t));var n=0;function r(){var i=t[n++];if(!i)return e.complete();e.loadFile(i,(function(t,n){if(t)return e.complete(t);var o=j(n,i,e);e.patched(i,o,(function(t){if(t)return e.complete(t);r()}))}))}r()}function I(t,e,n,r,i,o,a){a||(a={}),void 0===a.context&&(a.context=4);var s=d(n,r,a);function u(t){return t.map((function(t){return" "+t}))}s.push({value:"",lines:[]});for(var c=[],l=0,f=0,p=[],h=1,g=1,v=function(t){var e=s[t],i=e.lines||e.value.replace(/\n$/,"").split("\n");if(e.lines=i,e.added||e.removed){var o;if(!l){var d=s[t-1];l=h,f=g,d&&(p=a.context>0?u(d.lines.slice(-a.context)):[],l-=p.length,f-=p.length)}(o=p).push.apply(o,D(i.map((function(t){return(e.added?"+":"-")+t})))),e.added?g+=i.length:h+=i.length}else{if(l)if(i.length<=2*a.context&&t<s.length-2){var v;(v=p).push.apply(v,D(u(i)))}else{var y,m=Math.min(i.length,a.context);(y=p).push.apply(y,D(u(i.slice(0,m))));var b={oldStart:l,oldLines:h-l+m,newStart:f,newLines:g-f+m,lines:p};if(t>=s.length-2&&i.length<=a.context){var w=/\n$/.test(n),x=/\n$/.test(r),E=0==i.length&&p.length>b.oldLines;!w&&E&&p.splice(b.oldLines,0,"\"),(w||E)&&x||p.push("\")}c.push(b),l=0,f=0,p=[]}h+=i.length,g+=i.length}},y=0;y<s.length;y++)v(y);return{oldFileName:t,newFileName:e,oldHeader:i,newHeader:o,hunks:c}}function N(t,e,n,r,i,o,a){var s=I(t,e,n,r,i,o,a),u=[];t==e&&u.push("Index: "+t),u.push("==================================================================="),u.push("--- "+s.oldFileName+(void 0===s.oldHeader?"":"\t"+s.oldHeader)),u.push("+++ "+s.newFileName+(void 0===s.newHeader?"":"\t"+s.newHeader));for(var c=0;c<s.hunks.length;c++){var l=s.hunks[c];u.push("@@ -"+l.oldStart+","+l.oldLines+" +"+l.newStart+","+l.newLines+" @@"),u.push.apply(u,l.lines)}return u.join("\n")+"\n"}function B(t,e,n,r,i,o){return N(t,t,e,n,r,i,o)}function R(t,e){return t.length===e.length&&P(t,e)}function P(t,e){if(e.length>t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function M(t){var e=nt(t.lines),n=e.oldLines,r=e.newLines;void 0!==n?t.oldLines=n:delete t.oldLines,void 0!==r?t.newLines=r:delete t.newLines}function H(t,e,n){t=q(t,n),e=q(e,n);var r={};(t.index||e.index)&&(r.index=t.index||e.index),(t.newFileName||e.newFileName)&&(U(t)?U(e)?(r.oldFileName=z(r,t.oldFileName,e.oldFileName),r.newFileName=z(r,t.newFileName,e.newFileName),r.oldHeader=z(r,t.oldHeader,e.oldHeader),r.newHeader=z(r,t.newHeader,e.newHeader)):(r.oldFileName=t.oldFileName,r.newFileName=t.newFileName,r.oldHeader=t.oldHeader,r.newHeader=t.newHeader):(r.oldFileName=e.oldFileName||t.oldFileName,r.newFileName=e.newFileName||t.newFileName,r.oldHeader=e.oldHeader||t.oldHeader,r.newHeader=e.newHeader||t.newHeader)),r.hunks=[];for(var i=0,o=0,a=0,s=0;i<t.hunks.length||o<e.hunks.length;){var u=t.hunks[i]||{oldStart:1/0},c=e.hunks[o]||{oldStart:1/0};if(W(u,c))r.hunks.push(G(u,a)),i++,s+=u.newLines-u.oldLines;else if(W(c,u))r.hunks.push(G(c,s)),o++,a+=c.newLines-c.oldLines;else{var l={oldStart:Math.min(u.oldStart,c.oldStart),oldLines:0,newStart:Math.min(u.newStart+a,c.oldStart+s),newLines:0,lines:[]};Y(l,u.oldStart,u.lines,c.oldStart,c.lines),o++,i++,r.hunks.push(l)}}return r}function q(t,e){if("string"==typeof t){if(/^@@/m.test(t)||/^Index:/m.test(t))return T(t)[0];if(!e)throw new Error("Must provide a base reference or pass in a patch");return I(void 0,void 0,e,t)}return t}function U(t){return t.newFileName&&t.newFileName!==t.oldFileName}function z(t,e,n){return e===n?e:(t.conflict=!0,{mine:e,theirs:n})}function W(t,e){return t.oldStart<e.oldStart&&t.oldStart+t.oldLines<e.oldStart}function G(t,e){return{oldStart:t.oldStart,oldLines:t.oldLines,newStart:t.newStart+e,newLines:t.newLines,lines:t.lines}}function Y(t,e,n,r,i){var o={offset:e,lines:n,index:0},a={offset:r,lines:i,index:0};for(X(t,o,a),X(t,a,o);o.index<o.lines.length&&a.index<a.lines.length;){var s=o.lines[o.index],u=a.lines[a.index];if("-"!==s[0]&&"+"!==s[0]||"-"!==u[0]&&"+"!==u[0])if("+"===s[0]&&" "===u[0]){var c;(c=t.lines).push.apply(c,D(Q(o)))}else if("+"===u[0]&&" "===s[0]){var l;(l=t.lines).push.apply(l,D(Q(a)))}else"-"===s[0]&&" "===u[0]?V(t,o,a):"-"===u[0]&&" "===s[0]?V(t,a,o,!0):s===u?(t.lines.push(s),o.index++,a.index++):J(t,Q(o),Q(a));else $(t,o,a)}K(t,o),K(t,a),M(t)}function $(t,e,n){var r=Q(e),i=Q(n);if(tt(r)&&tt(i)){var o,a;if(P(r,i)&&et(n,r,r.length-i.length))return void(o=t.lines).push.apply(o,D(r));if(P(i,r)&&et(e,i,i.length-r.length))return void(a=t.lines).push.apply(a,D(i))}else if(R(r,i)){var s;return void(s=t.lines).push.apply(s,D(r))}J(t,r,i)}function V(t,e,n,r){var i,o=Q(e),a=Z(n,o);a.merged?(i=t.lines).push.apply(i,D(a.merged)):J(t,r?a:o,r?o:a)}function J(t,e,n){t.conflict=!0,t.lines.push({conflict:!0,mine:e,theirs:n})}function X(t,e,n){for(;e.offset<n.offset&&e.index<e.lines.length;){var r=e.lines[e.index++];t.lines.push(r),e.offset++}}function K(t,e){for(;e.index<e.lines.length;){var n=e.lines[e.index++];t.lines.push(n)}}function Q(t){for(var e=[],n=t.lines[t.index][0];t.index<t.lines.length;){var r=t.lines[t.index];if("-"===n&&"+"===r[0]&&(n="+"),n!==r[0])break;e.push(r),t.index++}return e}function Z(t,e){for(var n=[],r=[],i=0,o=!1,a=!1;i<e.length&&t.index<t.lines.length;){var s=t.lines[t.index],u=e[i];if("+"===u[0])break;if(o=o||" "!==s[0],r.push(u),i++,"+"===s[0])for(a=!0;"+"===s[0];)n.push(s),s=t.lines[++t.index];u.substr(1)===s.substr(1)?(n.push(s),t.index++):a=!0}if("+"===(e[i]||"")[0]&&o&&(a=!0),a)return n;for(;i<e.length;)r.push(e[i++]);return{merged:r,changes:n}}function tt(t){return t.reduce((function(t,e){return t&&"-"===e[0]}),!0)}function et(t,e,n){for(var r=0;r<n;r++){var i=e[e.length-n+r].substr(1);if(t.lines[t.index+r]!==" "+i)return!1}return t.index+=n,!0}function nt(t){var e=0,n=0;return t.forEach((function(t){if("string"!=typeof t){var r=nt(t.mine),i=nt(t.theirs);void 0!==e&&(r.oldLines===i.oldLines?e+=r.oldLines:e=void 0),void 0!==n&&(r.newLines===i.newLines?n+=r.newLines:n=void 0)}else void 0===n||"+"!==t[0]&&" "!==t[0]||n++,void 0===e||"-"!==t[0]&&" "!==t[0]||e++})),{oldLines:e,newLines:n}}function rt(t){for(var e,n,r=[],i=0;i<t.length;i++)n=(e=t[i]).added?1:e.removed?-1:0,r.push([n,e.value]);return r}function it(t){for(var e=[],n=0;n<t.length;n++){var r=t[n];r.added?e.push("<ins>"):r.removed&&e.push("<del>"),e.push(ot(r.value)),r.added?e.push("</ins>"):r.removed&&e.push("</del>")}return e.join("")}function ot(t){var e=t;return e=(e=(e=(e=e.replace(/&/g,"&")).replace(/</g,"<")).replace(/>/g,">")).replace(/"/g,""")}k.tokenize=function(t){return t.slice()},k.join=k.removeEmpty=function(t){return t},t.Diff=e,t.diffChars=o,t.diffWords=l,t.diffWordsWithSpace=f,t.diffLines=d,t.diffTrimmedLines=h,t.diffSentences=v,t.diffCss=m,t.diffJson=S,t.diffArrays=O,t.structuredPatch=I,t.createTwoFilesPatch=N,t.createPatch=B,t.applyPatch=j,t.applyPatches=L,t.parsePatch=T,t.merge=H,t.convertChangesToDMP=rt,t.convertChangesToXML=it,t.canonicalize=C,Object.defineProperty(t,"__esModule",{value:!0})}(e)},934:t=>{"use strict";t.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}},563:function(t,e){var n;!function(e,n){"use strict";"object"==typeof t.exports?t.exports=e.document?n(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return n(t)}:n(e)}("undefined"!=typeof window?window:this,(function(r,i){"use strict";var o=[],a=Object.getPrototypeOf,s=o.slice,u=o.flat?function(t){return o.flat.call(t)}:function(t){return o.concat.apply([],t)},c=o.push,l=o.indexOf,f={},p=f.toString,d=f.hasOwnProperty,h=d.toString,g=h.call(Object),v={},y=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType&&"function"!=typeof t.item},m=function(t){return null!=t&&t===t.window},b=r.document,D={type:!0,src:!0,nonce:!0,noModule:!0};function w(t,e,n){var r,i,o=(n=n||b).createElement("script");if(o.text=t,e)for(r in D)(i=e[r]||e.getAttribute&&e.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function x(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?f[p.call(t)]||"object":typeof t}var E="3.6.4",A=function(t,e){return new A.fn.init(t,e)};function _(t){var e=!!t&&"length"in t&&t.length,n=x(t);return!y(t)&&!m(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}A.fn=A.prototype={jquery:E,constructor:A,length:0,toArray:function(){return s.call(this)},get:function(t){return null==t?s.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=A.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return A.each(this,t)},map:function(t){return this.pushStack(A.map(this,(function(e,n){return t.call(e,n,e)})))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(A.grep(this,(function(t,e){return(e+1)%2})))},odd:function(){return this.pushStack(A.grep(this,(function(t,e){return e%2})))},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n<e?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:c,sort:o.sort,splice:o.splice},A.extend=A.fn.extend=function(){var t,e,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[s]||{},s++),"object"==typeof a||y(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(t=arguments[s]))for(e in t)r=t[e],"__proto__"!==e&&a!==r&&(c&&r&&(A.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[e],o=i&&!Array.isArray(n)?[]:i||A.isPlainObject(n)?n:{},i=!1,a[e]=A.extend(c,o,r)):void 0!==r&&(a[e]=r));return a},A.extend({expando:"jQuery"+(E+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isPlainObject:function(t){var e,n;return!(!t||"[object Object]"!==p.call(t))&&(!(e=a(t))||"function"==typeof(n=d.call(e,"constructor")&&e.constructor)&&h.call(n)===g)},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t,e,n){w(t,{nonce:e&&e.nonce},n)},each:function(t,e){var n,r=0;if(_(t))for(n=t.length;r<n&&!1!==e.call(t[r],r,t[r]);r++);else for(r in t)if(!1===e.call(t[r],r,t[r]))break;return t},makeArray:function(t,e){var n=e||[];return null!=t&&(_(Object(t))?A.merge(n,"string"==typeof t?[t]:t):c.call(n,t)),n},inArray:function(t,e,n){return null==e?-1:l.call(e,t,n)},merge:function(t,e){for(var n=+e.length,r=0,i=t.length;r<n;r++)t[i++]=e[r];return t.length=i,t},grep:function(t,e,n){for(var r=[],i=0,o=t.length,a=!n;i<o;i++)!e(t[i],i)!==a&&r.push(t[i]);return r},map:function(t,e,n){var r,i,o=0,a=[];if(_(t))for(r=t.length;o<r;o++)null!=(i=e(t[o],o,n))&&a.push(i);else for(o in t)null!=(i=e(t[o],o,n))&&a.push(i);return u(a)},guid:1,support:v}),"function"==typeof Symbol&&(A.fn[Symbol.iterator]=o[Symbol.iterator]),A.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(t,e){f["[object "+e+"]"]=e.toLowerCase()}));var S=function(t){var e,n,r,i,o,a,s,u,c,l,f,p,d,h,g,v,y,m,b,D="sizzle"+1*new Date,w=t.document,x=0,E=0,A=ut(),_=ut(),S=ut(),C=ut(),k=function(t,e){return t===e&&(f=!0),0},O={}.hasOwnProperty,T=[],F=T.pop,j=T.push,L=T.push,I=T.slice,N=function(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",R="[\\x20\\t\\r\\n\\f]",P="(?:\\\\[\\da-fA-F]{1,6}"+R+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",M="\\["+R+"*("+P+")(?:"+R+"*([*^$|!~]?=)"+R+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+P+"))|)"+R+"*\\]",H=":("+P+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+M+")*)|.*)\\)|)",q=new RegExp(R+"+","g"),U=new RegExp("^"+R+"+|((?:^|[^\\\\])(?:\\\\.)*)"+R+"+$","g"),z=new RegExp("^"+R+"*,"+R+"*"),W=new RegExp("^"+R+"*([>+~]|"+R+")"+R+"*"),G=new RegExp(R+"|>"),Y=new RegExp(H),$=new RegExp("^"+P+"$"),V={ID:new RegExp("^#("+P+")"),CLASS:new RegExp("^\\.("+P+")"),TAG:new RegExp("^("+P+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+H),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+R+"*(even|odd|(([+-]|)(\\d*)n|)"+R+"*(?:([+-]|)"+R+"*(\\d+)|))"+R+"*\\)|)","i"),bool:new RegExp("^(?:"+B+")$","i"),needsContext:new RegExp("^"+R+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+R+"*((?:-\\d)?\\d*)"+R+"*\\)|)(?=[^-]|$)","i")},J=/HTML$/i,X=/^(?:input|select|textarea|button)$/i,K=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,tt=/[+~]/,et=new RegExp("\\\\[\\da-fA-F]{1,6}"+R+"?|\\\\([^\\r\\n\\f])","g"),nt=function(t,e){var n="0x"+t.slice(1)-65536;return e||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},rt=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,it=function(t,e){return e?"\0"===t?"\ufffd":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},ot=function(){p()},at=Dt((function(t){return!0===t.disabled&&"fieldset"===t.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{L.apply(T=I.call(w.childNodes),w.childNodes),T[w.childNodes.length].nodeType}catch(t){L={apply:T.length?function(t,e){j.apply(t,I.call(e))}:function(t,e){for(var n=t.length,r=0;t[n++]=e[r++];);t.length=n-1}}}function st(t,e,r,i){var o,s,c,l,f,h,y,m=e&&e.ownerDocument,w=e?e.nodeType:9;if(r=r||[],"string"!=typeof t||!t||1!==w&&9!==w&&11!==w)return r;if(!i&&(p(e),e=e||d,g)){if(11!==w&&(f=Z.exec(t)))if(o=f[1]){if(9===w){if(!(c=e.getElementById(o)))return r;if(c.id===o)return r.push(c),r}else if(m&&(c=m.getElementById(o))&&b(e,c)&&c.id===o)return r.push(c),r}else{if(f[2])return L.apply(r,e.getElementsByTagName(t)),r;if((o=f[3])&&n.getElementsByClassName&&e.getElementsByClassName)return L.apply(r,e.getElementsByClassName(o)),r}if(n.qsa&&!C[t+" "]&&(!v||!v.test(t))&&(1!==w||"object"!==e.nodeName.toLowerCase())){if(y=t,m=e,1===w&&(G.test(t)||W.test(t))){for((m=tt.test(t)&&yt(e.parentNode)||e)===e&&n.scope||((l=e.getAttribute("id"))?l=l.replace(rt,it):e.setAttribute("id",l=D)),s=(h=a(t)).length;s--;)h[s]=(l?"#"+l:":scope")+" "+bt(h[s]);y=h.join(",")}try{return L.apply(r,m.querySelectorAll(y)),r}catch(e){C(t,!0)}finally{l===D&&e.removeAttribute("id")}}}return u(t.replace(U,"$1"),e,r,i)}function ut(){var t=[];return function e(n,i){return t.push(n+" ")>r.cacheLength&&delete e[t.shift()],e[n+" "]=i}}function ct(t){return t[D]=!0,t}function lt(t){var e=d.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function ft(t,e){for(var n=t.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=e}function pt(t,e){var n=e&&t,r=n&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function dt(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function ht(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function gt(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&at(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function vt(t){return ct((function(e){return e=+e,ct((function(n,r){for(var i,o=t([],n.length,e),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))}))}))}function yt(t){return t&&void 0!==t.getElementsByTagName&&t}for(e in n=st.support={},o=st.isXML=function(t){var e=t&&t.namespaceURI,n=t&&(t.ownerDocument||t).documentElement;return!J.test(e||n&&n.nodeName||"HTML")},p=st.setDocument=function(t){var e,i,a=t?t.ownerDocument||t:w;return a!=d&&9===a.nodeType&&a.documentElement?(h=(d=a).documentElement,g=!o(d),w!=d&&(i=d.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",ot,!1):i.attachEvent&&i.attachEvent("onunload",ot)),n.scope=lt((function(t){return h.appendChild(t).appendChild(d.createElement("div")),void 0!==t.querySelectorAll&&!t.querySelectorAll(":scope fieldset div").length})),n.cssHas=lt((function(){try{return d.querySelector(":has(*,:jqfake)"),!1}catch(t){return!0}})),n.attributes=lt((function(t){return t.className="i",!t.getAttribute("className")})),n.getElementsByTagName=lt((function(t){return t.appendChild(d.createComment("")),!t.getElementsByTagName("*").length})),n.getElementsByClassName=Q.test(d.getElementsByClassName),n.getById=lt((function(t){return h.appendChild(t).id=D,!d.getElementsByName||!d.getElementsByName(D).length})),n.getById?(r.filter.ID=function(t){var e=t.replace(et,nt);return function(t){return t.getAttribute("id")===e}},r.find.ID=function(t,e){if(void 0!==e.getElementById&&g){var n=e.getElementById(t);return n?[n]:[]}}):(r.filter.ID=function(t){var e=t.replace(et,nt);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},r.find.ID=function(t,e){if(void 0!==e.getElementById&&g){var n,r,i,o=e.getElementById(t);if(o){if((n=o.getAttributeNode("id"))&&n.value===t)return[o];for(i=e.getElementsByName(t),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===t)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):n.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,r=[],i=0,o=e.getElementsByTagName(t);if("*"===t){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&g)return e.getElementsByClassName(t)},y=[],v=[],(n.qsa=Q.test(d.querySelectorAll))&&(lt((function(t){var e;h.appendChild(t).innerHTML="<a id='"+D+"'></a><select id='"+D+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+R+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||v.push("\\["+R+"*(?:value|"+B+")"),t.querySelectorAll("[id~="+D+"-]").length||v.push("~="),(e=d.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||v.push("\\["+R+"*name"+R+"*="+R+"*(?:''|\"\")"),t.querySelectorAll(":checked").length||v.push(":checked"),t.querySelectorAll("a#"+D+"+*").length||v.push(".#.+[+~]"),t.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")})),lt((function(t){t.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var e=d.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&v.push("name"+R+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),h.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),v.push(",.*:")}))),(n.matchesSelector=Q.test(m=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&<((function(t){n.disconnectedMatch=m.call(t,"*"),m.call(t,"[s!='']:x"),y.push("!=",H)})),n.cssHas||v.push(":has"),v=v.length&&new RegExp(v.join("|")),y=y.length&&new RegExp(y.join("|")),e=Q.test(h.compareDocumentPosition),b=e||Q.test(h.contains)?function(t,e){var n=9===t.nodeType&&t.documentElement||t,r=e&&e.parentNode;return t===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):t.compareDocumentPosition&&16&t.compareDocumentPosition(r)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},k=e?function(t,e){if(t===e)return f=!0,0;var r=!t.compareDocumentPosition-!e.compareDocumentPosition;return r||(1&(r=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!n.sortDetached&&e.compareDocumentPosition(t)===r?t==d||t.ownerDocument==w&&b(w,t)?-1:e==d||e.ownerDocument==w&&b(w,e)?1:l?N(l,t)-N(l,e):0:4&r?-1:1)}:function(t,e){if(t===e)return f=!0,0;var n,r=0,i=t.parentNode,o=e.parentNode,a=[t],s=[e];if(!i||!o)return t==d?-1:e==d?1:i?-1:o?1:l?N(l,t)-N(l,e):0;if(i===o)return pt(t,e);for(n=t;n=n.parentNode;)a.unshift(n);for(n=e;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?pt(a[r],s[r]):a[r]==w?-1:s[r]==w?1:0},d):d},st.matches=function(t,e){return st(t,null,null,e)},st.matchesSelector=function(t,e){if(p(t),n.matchesSelector&&g&&!C[e+" "]&&(!y||!y.test(e))&&(!v||!v.test(e)))try{var r=m.call(t,e);if(r||n.disconnectedMatch||t.document&&11!==t.document.nodeType)return r}catch(t){C(e,!0)}return st(e,d,null,[t]).length>0},st.contains=function(t,e){return(t.ownerDocument||t)!=d&&p(t),b(t,e)},st.attr=function(t,e){(t.ownerDocument||t)!=d&&p(t);var i=r.attrHandle[e.toLowerCase()],o=i&&O.call(r.attrHandle,e.toLowerCase())?i(t,e,!g):void 0;return void 0!==o?o:n.attributes||!g?t.getAttribute(e):(o=t.getAttributeNode(e))&&o.specified?o.value:null},st.escape=function(t){return(t+"").replace(rt,it)},st.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},st.uniqueSort=function(t){var e,r=[],i=0,o=0;if(f=!n.detectDuplicates,l=!n.sortStable&&t.slice(0),t.sort(k),f){for(;e=t[o++];)e===t[o]&&(i=r.push(o));for(;i--;)t.splice(r[i],1)}return l=null,t},i=st.getText=function(t){var e,n="",r=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=i(t)}else if(3===o||4===o)return t.nodeValue}else for(;e=t[r++];)n+=i(e);return n},r=st.selectors={cacheLength:50,createPseudo:ct,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(et,nt),t[3]=(t[3]||t[4]||t[5]||"").replace(et,nt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||st.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&st.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return V.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&Y.test(n)&&(e=a(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(et,nt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=A[t+" "];return e||(e=new RegExp("(^|"+R+")"+t+"("+R+"|$)"))&&A(t,(function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,e,n){return function(r){var i=st.attr(r,t);return null==i?"!="===e:!e||(i+="","="===e?i===n:"!="===e?i!==n:"^="===e?n&&0===i.indexOf(n):"*="===e?n&&i.indexOf(n)>-1:"$="===e?n&&i.slice(-n.length)===n:"~="===e?(" "+i.replace(q," ")+" ").indexOf(n)>-1:"|="===e&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,r,i){var o="nth"!==t.slice(0,3),a="last"!==t.slice(-4),s="of-type"===e;return 1===r&&0===i?function(t){return!!t.parentNode}:function(e,n,u){var c,l,f,p,d,h,g=o!==a?"nextSibling":"previousSibling",v=e.parentNode,y=s&&e.nodeName.toLowerCase(),m=!u&&!s,b=!1;if(v){if(o){for(;g;){for(p=e;p=p[g];)if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===t&&!h&&"nextSibling"}return!0}if(h=[a?v.firstChild:v.lastChild],a&&m){for(b=(d=(c=(l=(f=(p=v)[D]||(p[D]={}))[p.uniqueID]||(f[p.uniqueID]={}))[t]||[])[0]===x&&c[1])&&c[2],p=d&&v.childNodes[d];p=++d&&p&&p[g]||(b=d=0)||h.pop();)if(1===p.nodeType&&++b&&p===e){l[t]=[x,d,b];break}}else if(m&&(b=d=(c=(l=(f=(p=e)[D]||(p[D]={}))[p.uniqueID]||(f[p.uniqueID]={}))[t]||[])[0]===x&&c[1]),!1===b)for(;(p=++d&&p&&p[g]||(b=d=0)||h.pop())&&((s?p.nodeName.toLowerCase()!==y:1!==p.nodeType)||!++b||(m&&((l=(f=p[D]||(p[D]={}))[p.uniqueID]||(f[p.uniqueID]={}))[t]=[x,b]),p!==e)););return(b-=i)===r||b%r==0&&b/r>=0}}},PSEUDO:function(t,e){var n,i=r.pseudos[t]||r.setFilters[t.toLowerCase()]||st.error("unsupported pseudo: "+t);return i[D]?i(e):i.length>1?(n=[t,t,"",e],r.setFilters.hasOwnProperty(t.toLowerCase())?ct((function(t,n){for(var r,o=i(t,e),a=o.length;a--;)t[r=N(t,o[a])]=!(n[r]=o[a])})):function(t){return i(t,0,n)}):i}},pseudos:{not:ct((function(t){var e=[],n=[],r=s(t.replace(U,"$1"));return r[D]?ct((function(t,e,n,i){for(var o,a=r(t,null,i,[]),s=t.length;s--;)(o=a[s])&&(t[s]=!(e[s]=o))})):function(t,i,o){return e[0]=t,r(e,null,o,n),e[0]=null,!n.pop()}})),has:ct((function(t){return function(e){return st(t,e).length>0}})),contains:ct((function(t){return t=t.replace(et,nt),function(e){return(e.textContent||i(e)).indexOf(t)>-1}})),lang:ct((function(t){return $.test(t||"")||st.error("unsupported lang: "+t),t=t.replace(et,nt).toLowerCase(),function(e){var n;do{if(n=g?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===h},focus:function(t){return t===d.activeElement&&(!d.hasFocus||d.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:gt(!1),disabled:gt(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!r.pseudos.empty(t)},header:function(t){return K.test(t.nodeName)},input:function(t){return X.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:vt((function(){return[0]})),last:vt((function(t,e){return[e-1]})),eq:vt((function(t,e,n){return[n<0?n+e:n]})),even:vt((function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t})),odd:vt((function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t})),lt:vt((function(t,e,n){for(var r=n<0?n+e:n>e?e:n;--r>=0;)t.push(r);return t})),gt:vt((function(t,e,n){for(var r=n<0?n+e:n;++r<e;)t.push(r);return t}))}},r.pseudos.nth=r.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[e]=dt(e);for(e in{submit:!0,reset:!0})r.pseudos[e]=ht(e);function mt(){}function bt(t){for(var e=0,n=t.length,r="";e<n;e++)r+=t[e].value;return r}function Dt(t,e,n){var r=e.dir,i=e.next,o=i||r,a=n&&"parentNode"===o,s=E++;return e.first?function(e,n,i){for(;e=e[r];)if(1===e.nodeType||a)return t(e,n,i);return!1}:function(e,n,u){var c,l,f,p=[x,s];if(u){for(;e=e[r];)if((1===e.nodeType||a)&&t(e,n,u))return!0}else for(;e=e[r];)if(1===e.nodeType||a)if(l=(f=e[D]||(e[D]={}))[e.uniqueID]||(f[e.uniqueID]={}),i&&i===e.nodeName.toLowerCase())e=e[r]||e;else{if((c=l[o])&&c[0]===x&&c[1]===s)return p[2]=c[2];if(l[o]=p,p[2]=t(e,n,u))return!0}return!1}}function wt(t){return t.length>1?function(e,n,r){for(var i=t.length;i--;)if(!t[i](e,n,r))return!1;return!0}:t[0]}function xt(t,e,n,r,i){for(var o,a=[],s=0,u=t.length,c=null!=e;s<u;s++)(o=t[s])&&(n&&!n(o,r,i)||(a.push(o),c&&e.push(s)));return a}function Et(t,e,n,r,i,o){return r&&!r[D]&&(r=Et(r)),i&&!i[D]&&(i=Et(i,o)),ct((function(o,a,s,u){var c,l,f,p=[],d=[],h=a.length,g=o||function(t,e,n){for(var r=0,i=e.length;r<i;r++)st(t,e[r],n);return n}(e||"*",s.nodeType?[s]:s,[]),v=!t||!o&&e?g:xt(g,p,t,s,u),y=n?i||(o?t:h||r)?[]:a:v;if(n&&n(v,y,s,u),r)for(c=xt(y,d),r(c,[],s,u),l=c.length;l--;)(f=c[l])&&(y[d[l]]=!(v[d[l]]=f));if(o){if(i||t){if(i){for(c=[],l=y.length;l--;)(f=y[l])&&c.push(v[l]=f);i(null,y=[],c,u)}for(l=y.length;l--;)(f=y[l])&&(c=i?N(o,f):p[l])>-1&&(o[c]=!(a[c]=f))}}else y=xt(y===a?y.splice(h,y.length):y),i?i(null,a,y,u):L.apply(a,y)}))}function At(t){for(var e,n,i,o=t.length,a=r.relative[t[0].type],s=a||r.relative[" "],u=a?1:0,l=Dt((function(t){return t===e}),s,!0),f=Dt((function(t){return N(e,t)>-1}),s,!0),p=[function(t,n,r){var i=!a&&(r||n!==c)||((e=n).nodeType?l(t,n,r):f(t,n,r));return e=null,i}];u<o;u++)if(n=r.relative[t[u].type])p=[Dt(wt(p),n)];else{if((n=r.filter[t[u].type].apply(null,t[u].matches))[D]){for(i=++u;i<o&&!r.relative[t[i].type];i++);return Et(u>1&&wt(p),u>1&&bt(t.slice(0,u-1).concat({value:" "===t[u-2].type?"*":""})).replace(U,"$1"),n,u<i&&At(t.slice(u,i)),i<o&&At(t=t.slice(i)),i<o&&bt(t))}p.push(n)}return wt(p)}return mt.prototype=r.filters=r.pseudos,r.setFilters=new mt,a=st.tokenize=function(t,e){var n,i,o,a,s,u,c,l=_[t+" "];if(l)return e?0:l.slice(0);for(s=t,u=[],c=r.preFilter;s;){for(a in n&&!(i=z.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),n=!1,(i=W.exec(s))&&(n=i.shift(),o.push({value:n,type:i[0].replace(U," ")}),s=s.slice(n.length)),r.filter)!(i=V[a].exec(s))||c[a]&&!(i=c[a](i))||(n=i.shift(),o.push({value:n,type:a,matches:i}),s=s.slice(n.length));if(!n)break}return e?s.length:s?st.error(t):_(t,u).slice(0)},s=st.compile=function(t,e){var n,i=[],o=[],s=S[t+" "];if(!s){for(e||(e=a(t)),n=e.length;n--;)(s=At(e[n]))[D]?i.push(s):o.push(s);s=S(t,function(t,e){var n=e.length>0,i=t.length>0,o=function(o,a,s,u,l){var f,h,v,y=0,m="0",b=o&&[],D=[],w=c,E=o||i&&r.find.TAG("*",l),A=x+=null==w?1:Math.random()||.1,_=E.length;for(l&&(c=a==d||a||l);m!==_&&null!=(f=E[m]);m++){if(i&&f){for(h=0,a||f.ownerDocument==d||(p(f),s=!g);v=t[h++];)if(v(f,a||d,s)){u.push(f);break}l&&(x=A)}n&&((f=!v&&f)&&y--,o&&b.push(f))}if(y+=m,n&&m!==y){for(h=0;v=e[h++];)v(b,D,a,s);if(o){if(y>0)for(;m--;)b[m]||D[m]||(D[m]=F.call(u));D=xt(D)}L.apply(u,D),l&&!o&&D.length>0&&y+e.length>1&&st.uniqueSort(u)}return l&&(x=A,c=w),b};return n?ct(o):o}(o,i)),s.selector=t}return s},u=st.select=function(t,e,n,i){var o,u,c,l,f,p="function"==typeof t&&t,d=!i&&a(t=p.selector||t);if(n=n||[],1===d.length){if((u=d[0]=d[0].slice(0)).length>2&&"ID"===(c=u[0]).type&&9===e.nodeType&&g&&r.relative[u[1].type]){if(!(e=(r.find.ID(c.matches[0].replace(et,nt),e)||[])[0]))return n;p&&(e=e.parentNode),t=t.slice(u.shift().value.length)}for(o=V.needsContext.test(t)?0:u.length;o--&&(c=u[o],!r.relative[l=c.type]);)if((f=r.find[l])&&(i=f(c.matches[0].replace(et,nt),tt.test(u[0].type)&&yt(e.parentNode)||e))){if(u.splice(o,1),!(t=i.length&&bt(u)))return L.apply(n,i),n;break}}return(p||s(t,d))(i,e,!g,n,!e||tt.test(t)&&yt(e.parentNode)||e),n},n.sortStable=D.split("").sort(k).join("")===D,n.detectDuplicates=!!f,p(),n.sortDetached=lt((function(t){return 1&t.compareDocumentPosition(d.createElement("fieldset"))})),lt((function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")}))||ft("type|href|height|width",(function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)})),n.attributes&<((function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")}))||ft("value",(function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue})),lt((function(t){return null==t.getAttribute("disabled")}))||ft(B,(function(t,e,n){var r;if(!n)return!0===t[e]?e.toLowerCase():(r=t.getAttributeNode(e))&&r.specified?r.value:null})),st}(r);A.find=S,A.expr=S.selectors,A.expr[":"]=A.expr.pseudos,A.uniqueSort=A.unique=S.uniqueSort,A.text=S.getText,A.isXMLDoc=S.isXML,A.contains=S.contains,A.escapeSelector=S.escape;var C=function(t,e,n){for(var r=[],i=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(i&&A(t).is(n))break;r.push(t)}return r},k=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},O=A.expr.match.needsContext;function T(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}var F=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(t,e,n){return y(e)?A.grep(t,(function(t,r){return!!e.call(t,r,t)!==n})):e.nodeType?A.grep(t,(function(t){return t===e!==n})):"string"!=typeof e?A.grep(t,(function(t){return l.call(e,t)>-1!==n})):A.filter(e,t,n)}A.filter=function(t,e,n){var r=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===r.nodeType?A.find.matchesSelector(r,t)?[r]:[]:A.find.matches(t,A.grep(e,(function(t){return 1===t.nodeType})))},A.fn.extend({find:function(t){var e,n,r=this.length,i=this;if("string"!=typeof t)return this.pushStack(A(t).filter((function(){for(e=0;e<r;e++)if(A.contains(i[e],this))return!0})));for(n=this.pushStack([]),e=0;e<r;e++)A.find(t,i[e],n);return r>1?A.uniqueSort(n):n},filter:function(t){return this.pushStack(j(this,t||[],!1))},not:function(t){return this.pushStack(j(this,t||[],!0))},is:function(t){return!!j(this,"string"==typeof t&&O.test(t)?A(t):t||[],!1).length}});var L,I=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(A.fn.init=function(t,e,n){var r,i;if(!t)return this;if(n=n||L,"string"==typeof t){if(!(r="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:I.exec(t))||!r[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(r[1]){if(e=e instanceof A?e[0]:e,A.merge(this,A.parseHTML(r[1],e&&e.nodeType?e.ownerDocument||e:b,!0)),F.test(r[1])&&A.isPlainObject(e))for(r in e)y(this[r])?this[r](e[r]):this.attr(r,e[r]);return this}return(i=b.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):y(t)?void 0!==n.ready?n.ready(t):t(A):A.makeArray(t,this)}).prototype=A.fn,L=A(b);var N=/^(?:parents|prev(?:Until|All))/,B={children:!0,contents:!0,next:!0,prev:!0};function R(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}A.fn.extend({has:function(t){var e=A(t,this),n=e.length;return this.filter((function(){for(var t=0;t<n;t++)if(A.contains(this,e[t]))return!0}))},closest:function(t,e){var n,r=0,i=this.length,o=[],a="string"!=typeof t&&A(t);if(!O.test(t))for(;r<i;r++)for(n=this[r];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&A.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?A.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?l.call(A(t),this[0]):l.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(A.uniqueSort(A.merge(this.get(),A(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),A.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return C(t,"parentNode")},parentsUntil:function(t,e,n){return C(t,"parentNode",n)},next:function(t){return R(t,"nextSibling")},prev:function(t){return R(t,"previousSibling")},nextAll:function(t){return C(t,"nextSibling")},prevAll:function(t){return C(t,"previousSibling")},nextUntil:function(t,e,n){return C(t,"nextSibling",n)},prevUntil:function(t,e,n){return C(t,"previousSibling",n)},siblings:function(t){return k((t.parentNode||{}).firstChild,t)},children:function(t){return k(t.firstChild)},contents:function(t){return null!=t.contentDocument&&a(t.contentDocument)?t.contentDocument:(T(t,"template")&&(t=t.content||t),A.merge([],t.childNodes))}},(function(t,e){A.fn[t]=function(n,r){var i=A.map(this,e,n);return"Until"!==t.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=A.filter(r,i)),this.length>1&&(B[t]||A.uniqueSort(i),N.test(t)&&i.reverse()),this.pushStack(i)}}));var P=/[^\x20\t\r\n\f]+/g;function M(t){return t}function H(t){throw t}function q(t,e,n,r){var i;try{t&&y(i=t.promise)?i.call(t).done(e).fail(n):t&&y(i=t.then)?i.call(t,e,n):e.apply(void 0,[t].slice(r))}catch(t){n.apply(void 0,[t])}}A.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return A.each(t.match(P)||[],(function(t,n){e[n]=!0})),e}(t):A.extend({},t);var e,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||t.once,r=e=!0;a.length;s=-1)for(n=a.shift();++s<o.length;)!1===o[s].apply(n[0],n[1])&&t.stopOnFalse&&(s=o.length,n=!1);t.memory||(n=!1),e=!1,i&&(o=n?[]:"")},c={add:function(){return o&&(n&&!e&&(s=o.length-1,a.push(n)),function e(n){A.each(n,(function(n,r){y(r)?t.unique&&c.has(r)||o.push(r):r&&r.length&&"string"!==x(r)&&e(r)}))}(arguments),n&&!e&&u()),this},remove:function(){return A.each(arguments,(function(t,e){for(var n;(n=A.inArray(e,o,n))>-1;)o.splice(n,1),n<=s&&s--})),this},has:function(t){return t?A.inArray(t,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||e||(o=n=""),this},locked:function(){return!!i},fireWith:function(t,n){return i||(n=[t,(n=n||[]).slice?n.slice():n],a.push(n),e||u()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},A.extend({Deferred:function(t){var e=[["notify","progress",A.Callbacks("memory"),A.Callbacks("memory"),2],["resolve","done",A.Callbacks("once memory"),A.Callbacks("once memory"),0,"resolved"],["reject","fail",A.Callbacks("once memory"),A.Callbacks("once memory"),1,"rejected"]],n="pending",i={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},catch:function(t){return i.then(null,t)},pipe:function(){var t=arguments;return A.Deferred((function(n){A.each(e,(function(e,r){var i=y(t[r[4]])&&t[r[4]];o[r[1]]((function(){var t=i&&i.apply(this,arguments);t&&y(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[t]:arguments)}))})),t=null})).promise()},then:function(t,n,i){var o=0;function a(t,e,n,i){return function(){var s=this,u=arguments,c=function(){var r,c;if(!(t<o)){if((r=n.apply(s,u))===e.promise())throw new TypeError("Thenable self-resolution");c=r&&("object"==typeof r||"function"==typeof r)&&r.then,y(c)?i?c.call(r,a(o,e,M,i),a(o,e,H,i)):(o++,c.call(r,a(o,e,M,i),a(o,e,H,i),a(o,e,M,e.notifyWith))):(n!==M&&(s=void 0,u=[r]),(i||e.resolveWith)(s,u))}},l=i?c:function(){try{c()}catch(r){A.Deferred.exceptionHook&&A.Deferred.exceptionHook(r,l.stackTrace),t+1>=o&&(n!==H&&(s=void 0,u=[r]),e.rejectWith(s,u))}};t?l():(A.Deferred.getStackHook&&(l.stackTrace=A.Deferred.getStackHook()),r.setTimeout(l))}}return A.Deferred((function(r){e[0][3].add(a(0,r,y(i)?i:M,r.notifyWith)),e[1][3].add(a(0,r,y(t)?t:M)),e[2][3].add(a(0,r,y(n)?n:H))})).promise()},promise:function(t){return null!=t?A.extend(t,i):i}},o={};return A.each(e,(function(t,r){var a=r[2],s=r[5];i[r[1]]=a.add,s&&a.add((function(){n=s}),e[3-t][2].disable,e[3-t][3].disable,e[0][2].lock,e[0][3].lock),a.add(r[3].fire),o[r[0]]=function(){return o[r[0]+"With"](this===o?void 0:this,arguments),this},o[r[0]+"With"]=a.fireWith})),i.promise(o),t&&t.call(o,o),o},when:function(t){var e=arguments.length,n=e,r=Array(n),i=s.call(arguments),o=A.Deferred(),a=function(t){return function(n){r[t]=this,i[t]=arguments.length>1?s.call(arguments):n,--e||o.resolveWith(r,i)}};if(e<=1&&(q(t,o.done(a(n)).resolve,o.reject,!e),"pending"===o.state()||y(i[n]&&i[n].then)))return o.then();for(;n--;)q(i[n],a(n),o.reject);return o.promise()}});var U=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;A.Deferred.exceptionHook=function(t,e){r.console&&r.console.warn&&t&&U.test(t.name)&&r.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},A.readyException=function(t){r.setTimeout((function(){throw t}))};var z=A.Deferred();function W(){b.removeEventListener("DOMContentLoaded",W),r.removeEventListener("load",W),A.ready()}A.fn.ready=function(t){return z.then(t).catch((function(t){A.readyException(t)})),this},A.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--A.readyWait:A.isReady)||(A.isReady=!0,!0!==t&&--A.readyWait>0||z.resolveWith(b,[A]))}}),A.ready.then=z.then,"complete"===b.readyState||"loading"!==b.readyState&&!b.documentElement.doScroll?r.setTimeout(A.ready):(b.addEventListener("DOMContentLoaded",W),r.addEventListener("load",W));var G=function(t,e,n,r,i,o,a){var s=0,u=t.length,c=null==n;if("object"===x(n))for(s in i=!0,n)G(t,e,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,y(r)||(a=!0),c&&(a?(e.call(t,r),e=null):(c=e,e=function(t,e,n){return c.call(A(t),n)})),e))for(;s<u;s++)e(t[s],n,a?r:r.call(t[s],s,e(t[s],n)));return i?t:c?e.call(t):u?e(t[0],n):o},Y=/^-ms-/,$=/-([a-z])/g;function V(t,e){return e.toUpperCase()}function J(t){return t.replace(Y,"ms-").replace($,V)}var X=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};function K(){this.expando=A.expando+K.uid++}K.uid=1,K.prototype={cache:function(t){var e=t[this.expando];return e||(e={},X(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,n){var r,i=this.cache(t);if("string"==typeof e)i[J(e)]=n;else for(r in e)i[J(r)]=e[r];return i},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][J(e)]},access:function(t,e,n){return void 0===e||e&&"string"==typeof e&&void 0===n?this.get(t,e):(this.set(t,e,n),void 0!==n?n:e)},remove:function(t,e){var n,r=t[this.expando];if(void 0!==r){if(void 0!==e){n=(e=Array.isArray(e)?e.map(J):(e=J(e))in r?[e]:e.match(P)||[]).length;for(;n--;)delete r[e[n]]}(void 0===e||A.isEmptyObject(r))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!A.isEmptyObject(e)}};var Q=new K,Z=new K,tt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,et=/[A-Z]/g;function nt(t,e,n){var r;if(void 0===n&&1===t.nodeType)if(r="data-"+e.replace(et,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(r))){try{n=function(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:tt.test(t)?JSON.parse(t):t)}(n)}catch(t){}Z.set(t,e,n)}else n=void 0;return n}A.extend({hasData:function(t){return Z.hasData(t)||Q.hasData(t)},data:function(t,e,n){return Z.access(t,e,n)},removeData:function(t,e){Z.remove(t,e)},_data:function(t,e,n){return Q.access(t,e,n)},_removeData:function(t,e){Q.remove(t,e)}}),A.fn.extend({data:function(t,e){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===t){if(this.length&&(i=Z.get(o),1===o.nodeType&&!Q.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&0===(r=a[n].name).indexOf("data-")&&(r=J(r.slice(5)),nt(o,r,i[r]));Q.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof t?this.each((function(){Z.set(this,t)})):G(this,(function(e){var n;if(o&&void 0===e)return void 0!==(n=Z.get(o,t))||void 0!==(n=nt(o,t))?n:void 0;this.each((function(){Z.set(this,t,e)}))}),null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each((function(){Z.remove(this,t)}))}}),A.extend({queue:function(t,e,n){var r;if(t)return e=(e||"fx")+"queue",r=Q.get(t,e),n&&(!r||Array.isArray(n)?r=Q.access(t,e,A.makeArray(n)):r.push(n)),r||[]},dequeue:function(t,e){e=e||"fx";var n=A.queue(t,e),r=n.length,i=n.shift(),o=A._queueHooks(t,e);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===e&&n.unshift("inprogress"),delete o.stop,i.call(t,(function(){A.dequeue(t,e)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return Q.get(t,n)||Q.access(t,n,{empty:A.Callbacks("once memory").add((function(){Q.remove(t,[e+"queue",n])}))})}}),A.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?A.queue(this[0],t):void 0===e?this:this.each((function(){var n=A.queue(this,t,e);A._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&A.dequeue(this,t)}))},dequeue:function(t){return this.each((function(){A.dequeue(this,t)}))},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,r=1,i=A.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";a--;)(n=Q.get(o[a],t+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(e)}});var rt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,it=new RegExp("^(?:([+-])=|)("+rt+")([a-z%]*)$","i"),ot=["Top","Right","Bottom","Left"],at=b.documentElement,st=function(t){return A.contains(t.ownerDocument,t)},ut={composed:!0};at.getRootNode&&(st=function(t){return A.contains(t.ownerDocument,t)||t.getRootNode(ut)===t.ownerDocument});var ct=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&st(t)&&"none"===A.css(t,"display")};function lt(t,e,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return A.css(t,e,"")},u=s(),c=n&&n[3]||(A.cssNumber[e]?"":"px"),l=t.nodeType&&(A.cssNumber[e]||"px"!==c&&+u)&&it.exec(A.css(t,e));if(l&&l[3]!==c){for(u/=2,c=c||l[3],l=+u||1;a--;)A.style(t,e,l+c),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),l/=o;l*=2,A.style(t,e,l+c),n=n||[]}return n&&(l=+l||+u||0,i=n[1]?l+(n[1]+1)*n[2]:+n[2],r&&(r.unit=c,r.start=l,r.end=i)),i}var ft={};function pt(t){var e,n=t.ownerDocument,r=t.nodeName,i=ft[r];return i||(e=n.body.appendChild(n.createElement(r)),i=A.css(e,"display"),e.parentNode.removeChild(e),"none"===i&&(i="block"),ft[r]=i,i)}function dt(t,e){for(var n,r,i=[],o=0,a=t.length;o<a;o++)(r=t[o]).style&&(n=r.style.display,e?("none"===n&&(i[o]=Q.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&ct(r)&&(i[o]=pt(r))):"none"!==n&&(i[o]="none",Q.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(t[o].style.display=i[o]);return t}A.fn.extend({show:function(){return dt(this,!0)},hide:function(){return dt(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each((function(){ct(this)?A(this).show():A(this).hide()}))}});var ht,gt,vt=/^(?:checkbox|radio)$/i,yt=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,mt=/^$|^module$|\/(?:java|ecma)script/i;ht=b.createDocumentFragment().appendChild(b.createElement("div")),(gt=b.createElement("input")).setAttribute("type","radio"),gt.setAttribute("checked","checked"),gt.setAttribute("name","t"),ht.appendChild(gt),v.checkClone=ht.cloneNode(!0).cloneNode(!0).lastChild.checked,ht.innerHTML="<textarea>x</textarea>",v.noCloneChecked=!!ht.cloneNode(!0).lastChild.defaultValue,ht.innerHTML="<option></option>",v.option=!!ht.lastChild;var bt={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function Dt(t,e){var n;return n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&T(t,e)?A.merge([t],n):n}function wt(t,e){for(var n=0,r=t.length;n<r;n++)Q.set(t[n],"globalEval",!e||Q.get(e[n],"globalEval"))}bt.tbody=bt.tfoot=bt.colgroup=bt.caption=bt.thead,bt.th=bt.td,v.option||(bt.optgroup=bt.option=[1,"<select multiple='multiple'>","</select>"]);var xt=/<|&#?\w+;/;function Et(t,e,n,r,i){for(var o,a,s,u,c,l,f=e.createDocumentFragment(),p=[],d=0,h=t.length;d<h;d++)if((o=t[d])||0===o)if("object"===x(o))A.merge(p,o.nodeType?[o]:o);else if(xt.test(o)){for(a=a||f.appendChild(e.createElement("div")),s=(yt.exec(o)||["",""])[1].toLowerCase(),u=bt[s]||bt._default,a.innerHTML=u[1]+A.htmlPrefilter(o)+u[2],l=u[0];l--;)a=a.lastChild;A.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(e.createTextNode(o));for(f.textContent="",d=0;o=p[d++];)if(r&&A.inArray(o,r)>-1)i&&i.push(o);else if(c=st(o),a=Dt(f.appendChild(o),"script"),c&&wt(a),n)for(l=0;o=a[l++];)mt.test(o.type||"")&&n.push(o);return f}var At=/^([^.]*)(?:\.(.+)|)/;function _t(){return!0}function St(){return!1}function Ct(t,e){return t===function(){try{return b.activeElement}catch(t){}}()==("focus"===e)}function kt(t,e,n,r,i,o){var a,s;if("object"==typeof e){for(s in"string"!=typeof n&&(r=r||n,n=void 0),e)kt(t,s,n,r,e[s],o);return t}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=St;else if(!i)return t;return 1===o&&(a=i,i=function(t){return A().off(t),a.apply(this,arguments)},i.guid=a.guid||(a.guid=A.guid++)),t.each((function(){A.event.add(this,e,i,r,n)}))}function Ot(t,e,n){n?(Q.set(t,e,!1),A.event.add(t,e,{namespace:!1,handler:function(t){var r,i,o=Q.get(this,e);if(1&t.isTrigger&&this[e]){if(o.length)(A.event.special[e]||{}).delegateType&&t.stopPropagation();else if(o=s.call(arguments),Q.set(this,e,o),r=n(this,e),this[e](),o!==(i=Q.get(this,e))||r?Q.set(this,e,!1):i={},o!==i)return t.stopImmediatePropagation(),t.preventDefault(),i&&i.value}else o.length&&(Q.set(this,e,{value:A.event.trigger(A.extend(o[0],A.Event.prototype),o.slice(1),this)}),t.stopImmediatePropagation())}})):void 0===Q.get(t,e)&&A.event.add(t,e,_t)}A.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,c,l,f,p,d,h,g,v=Q.get(t);if(X(t))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&A.find.matchesSelector(at,i),n.guid||(n.guid=A.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(e){return void 0!==A&&A.event.triggered!==e.type?A.event.dispatch.apply(t,arguments):void 0}),c=(e=(e||"").match(P)||[""]).length;c--;)d=g=(s=At.exec(e[c])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=A.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=A.event.special[d]||{},l=A.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&A.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,l),l.handler.guid||(l.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,l):p.push(l),A.event.global[d]=!0)},remove:function(t,e,n,r,i){var o,a,s,u,c,l,f,p,d,h,g,v=Q.hasData(t)&&Q.get(t);if(v&&(u=v.events)){for(c=(e=(e||"").match(P)||[""]).length;c--;)if(d=g=(s=At.exec(e[c])||[])[1],h=(s[2]||"").split(".").sort(),d){for(f=A.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;o--;)l=p[o],!i&&g!==l.origType||n&&n.guid!==l.guid||s&&!s.test(l.namespace)||r&&r!==l.selector&&("**"!==r||!l.selector)||(p.splice(o,1),l.selector&&p.delegateCount--,f.remove&&f.remove.call(t,l));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(t,h,v.handle)||A.removeEvent(t,d,v.handle),delete u[d])}else for(d in u)A.event.remove(t,d+e[c],n,r,!0);A.isEmptyObject(u)&&Q.remove(t,"handle events")}},dispatch:function(t){var e,n,r,i,o,a,s=new Array(arguments.length),u=A.event.fix(t),c=(Q.get(this,"events")||Object.create(null))[u.type]||[],l=A.event.special[u.type]||{};for(s[0]=u,e=1;e<arguments.length;e++)s[e]=arguments[e];if(u.delegateTarget=this,!l.preDispatch||!1!==l.preDispatch.call(this,u)){for(a=A.event.handlers.call(this,u,c),e=0;(i=a[e++])&&!u.isPropagationStopped();)for(u.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!u.isImmediatePropagationStopped();)u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((A.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,u),u.result}},handlers:function(t,e){var n,r,i,o,a,s=[],u=e.delegateCount,c=t.target;if(u&&c.nodeType&&!("click"===t.type&&t.button>=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==t.type||!0!==c.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=e[n]).selector+" "]&&(a[i]=r.needsContext?A(i,this).index(c)>-1:A.find(i,this,null,[c]).length),a[i]&&o.push(r);o.length&&s.push({elem:c,handlers:o})}return c=this,u<e.length&&s.push({elem:c,handlers:e.slice(u)}),s},addProp:function(t,e){Object.defineProperty(A.Event.prototype,t,{enumerable:!0,configurable:!0,get:y(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(t){return t[A.expando]?t:new A.Event(t)},special:{load:{noBubble:!0},click:{setup:function(t){var e=this||t;return vt.test(e.type)&&e.click&&T(e,"input")&&Ot(e,"click",_t),!1},trigger:function(t){var e=this||t;return vt.test(e.type)&&e.click&&T(e,"input")&&Ot(e,"click"),!0},_default:function(t){var e=t.target;return vt.test(e.type)&&e.click&&T(e,"input")&&Q.get(e,"click")||T(e,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},A.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},A.Event=function(t,e){if(!(this instanceof A.Event))return new A.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?_t:St,this.target=t.target&&3===t.target.nodeType?t.target.parentNode:t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget):this.type=t,e&&A.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[A.expando]=!0},A.Event.prototype={constructor:A.Event,isDefaultPrevented:St,isPropagationStopped:St,isImmediatePropagationStopped:St,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=_t,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=_t,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=_t,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},A.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},A.event.addProp),A.each({focus:"focusin",blur:"focusout"},(function(t,e){A.event.special[t]={setup:function(){return Ot(this,t,Ct),!1},trigger:function(){return Ot(this,t),!0},_default:function(e){return Q.get(e.target,t)},delegateType:e}})),A.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(t,e){A.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,r=t.relatedTarget,i=t.handleObj;return r&&(r===this||A.contains(this,r))||(t.type=i.origType,n=i.handler.apply(this,arguments),t.type=e),n}}})),A.fn.extend({on:function(t,e,n,r){return kt(this,t,e,n,r)},one:function(t,e,n,r){return kt(this,t,e,n,r,1)},off:function(t,e,n){var r,i;if(t&&t.preventDefault&&t.handleObj)return r=t.handleObj,A(t.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof t){for(i in t)this.off(i,e,t[i]);return this}return!1!==e&&"function"!=typeof e||(n=e,e=void 0),!1===n&&(n=St),this.each((function(){A.event.remove(this,t,n,e)}))}});var Tt=/<script|<style|<link/i,Ft=/checked\s*(?:[^=]|=\s*.checked.)/i,jt=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Lt(t,e){return T(t,"table")&&T(11!==e.nodeType?e:e.firstChild,"tr")&&A(t).children("tbody")[0]||t}function It(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Nt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Bt(t,e){var n,r,i,o,a,s;if(1===e.nodeType){if(Q.hasData(t)&&(s=Q.get(t).events))for(i in Q.remove(e,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)A.event.add(e,i,s[i][n]);Z.hasData(t)&&(o=Z.access(t),a=A.extend({},o),Z.set(e,a))}}function Rt(t,e){var n=e.nodeName.toLowerCase();"input"===n&&vt.test(t.type)?e.checked=t.checked:"input"!==n&&"textarea"!==n||(e.defaultValue=t.defaultValue)}function Pt(t,e,n,r){e=u(e);var i,o,a,s,c,l,f=0,p=t.length,d=p-1,h=e[0],g=y(h);if(g||p>1&&"string"==typeof h&&!v.checkClone&&Ft.test(h))return t.each((function(i){var o=t.eq(i);g&&(e[0]=h.call(this,i,o.html())),Pt(o,e,n,r)}));if(p&&(o=(i=Et(e,t[0].ownerDocument,!1,t,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(s=(a=A.map(Dt(i,"script"),It)).length;f<p;f++)c=i,f!==d&&(c=A.clone(c,!0,!0),s&&A.merge(a,Dt(c,"script"))),n.call(t[f],c,f);if(s)for(l=a[a.length-1].ownerDocument,A.map(a,Nt),f=0;f<s;f++)c=a[f],mt.test(c.type||"")&&!Q.access(c,"globalEval")&&A.contains(l,c)&&(c.src&&"module"!==(c.type||"").toLowerCase()?A._evalUrl&&!c.noModule&&A._evalUrl(c.src,{nonce:c.nonce||c.getAttribute("nonce")},l):w(c.textContent.replace(jt,""),c,l))}return t}function Mt(t,e,n){for(var r,i=e?A.filter(e,t):t,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||A.cleanData(Dt(r)),r.parentNode&&(n&&st(r)&&wt(Dt(r,"script")),r.parentNode.removeChild(r));return t}A.extend({htmlPrefilter:function(t){return t},clone:function(t,e,n){var r,i,o,a,s=t.cloneNode(!0),u=st(t);if(!(v.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||A.isXMLDoc(t)))for(a=Dt(s),r=0,i=(o=Dt(t)).length;r<i;r++)Rt(o[r],a[r]);if(e)if(n)for(o=o||Dt(t),a=a||Dt(s),r=0,i=o.length;r<i;r++)Bt(o[r],a[r]);else Bt(t,s);return(a=Dt(s,"script")).length>0&&wt(a,!u&&Dt(t,"script")),s},cleanData:function(t){for(var e,n,r,i=A.event.special,o=0;void 0!==(n=t[o]);o++)if(X(n)){if(e=n[Q.expando]){if(e.events)for(r in e.events)i[r]?A.event.remove(n,r):A.removeEvent(n,r,e.handle);n[Q.expando]=void 0}n[Z.expando]&&(n[Z.expando]=void 0)}}}),A.fn.extend({detach:function(t){return Mt(this,t,!0)},remove:function(t){return Mt(this,t)},text:function(t){return G(this,(function(t){return void 0===t?A.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)}))}),null,t,arguments.length)},append:function(){return Pt(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Lt(this,t).appendChild(t)}))},prepend:function(){return Pt(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Lt(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return Pt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return Pt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)}))},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(A.cleanData(Dt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return A.clone(this,t,e)}))},html:function(t){return G(this,(function(t){var e=this[0]||{},n=0,r=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Tt.test(t)&&!bt[(yt.exec(t)||["",""])[1].toLowerCase()]){t=A.htmlPrefilter(t);try{for(;n<r;n++)1===(e=this[n]||{}).nodeType&&(A.cleanData(Dt(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)}),null,t,arguments.length)},replaceWith:function(){var t=[];return Pt(this,arguments,(function(e){var n=this.parentNode;A.inArray(this,t)<0&&(A.cleanData(Dt(this)),n&&n.replaceChild(e,this))}),t)}}),A.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(t,e){A.fn[t]=function(t){for(var n,r=[],i=A(t),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),A(i[a])[e](n),c.apply(r,n.get());return this.pushStack(r)}}));var Ht=new RegExp("^("+rt+")(?!px)[a-z%]+$","i"),qt=/^--/,Ut=function(t){var e=t.ownerDocument.defaultView;return e&&e.opener||(e=r),e.getComputedStyle(t)},zt=function(t,e,n){var r,i,o={};for(i in e)o[i]=t.style[i],t.style[i]=e[i];for(i in r=n.call(t),e)t.style[i]=o[i];return r},Wt=new RegExp(ot.join("|"),"i"),Gt="[\\x20\\t\\r\\n\\f]",Yt=new RegExp("^"+Gt+"+|((?:^|[^\\\\])(?:\\\\.)*)"+Gt+"+$","g");function $t(t,e,n){var r,i,o,a,s=qt.test(e),u=t.style;return(n=n||Ut(t))&&(a=n.getPropertyValue(e)||n[e],s&&a&&(a=a.replace(Yt,"$1")||void 0),""!==a||st(t)||(a=A.style(t,e)),!v.pixelBoxStyles()&&Ht.test(a)&&Wt.test(e)&&(r=u.width,i=u.minWidth,o=u.maxWidth,u.minWidth=u.maxWidth=u.width=a,a=n.width,u.width=r,u.minWidth=i,u.maxWidth=o)),void 0!==a?a+"":a}function Vt(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}!function(){function t(){if(l){c.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",at.appendChild(c).appendChild(l);var t=r.getComputedStyle(l);n="1%"!==t.top,u=12===e(t.marginLeft),l.style.right="60%",a=36===e(t.right),i=36===e(t.width),l.style.position="absolute",o=12===e(l.offsetWidth/3),at.removeChild(c),l=null}}function e(t){return Math.round(parseFloat(t))}var n,i,o,a,s,u,c=b.createElement("div"),l=b.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",v.clearCloneStyle="content-box"===l.style.backgroundClip,A.extend(v,{boxSizingReliable:function(){return t(),i},pixelBoxStyles:function(){return t(),a},pixelPosition:function(){return t(),n},reliableMarginLeft:function(){return t(),u},scrollboxSize:function(){return t(),o},reliableTrDimensions:function(){var t,e,n,i;return null==s&&(t=b.createElement("table"),e=b.createElement("tr"),n=b.createElement("div"),t.style.cssText="position:absolute;left:-11111px;border-collapse:separate",e.style.cssText="border:1px solid",e.style.height="1px",n.style.height="9px",n.style.display="block",at.appendChild(t).appendChild(e).appendChild(n),i=r.getComputedStyle(e),s=parseInt(i.height,10)+parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10)===e.offsetHeight,at.removeChild(t)),s}}))}();var Jt=["Webkit","Moz","ms"],Xt=b.createElement("div").style,Kt={};function Qt(t){var e=A.cssProps[t]||Kt[t];return e||(t in Xt?t:Kt[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),n=Jt.length;n--;)if((t=Jt[n]+e)in Xt)return t}(t)||t)}var Zt=/^(none|table(?!-c[ea]).+)/,te={position:"absolute",visibility:"hidden",display:"block"},ee={letterSpacing:"0",fontWeight:"400"};function ne(t,e,n){var r=it.exec(e);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):e}function re(t,e,n,r,i,o){var a="width"===e?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=A.css(t,n+ot[a],!0,i)),r?("content"===n&&(u-=A.css(t,"padding"+ot[a],!0,i)),"margin"!==n&&(u-=A.css(t,"border"+ot[a]+"Width",!0,i))):(u+=A.css(t,"padding"+ot[a],!0,i),"padding"!==n?u+=A.css(t,"border"+ot[a]+"Width",!0,i):s+=A.css(t,"border"+ot[a]+"Width",!0,i));return!r&&o>=0&&(u+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-o-u-s-.5))||0),u}function ie(t,e,n){var r=Ut(t),i=(!v.boxSizingReliable()||n)&&"border-box"===A.css(t,"boxSizing",!1,r),o=i,a=$t(t,e,r),s="offset"+e[0].toUpperCase()+e.slice(1);if(Ht.test(a)){if(!n)return a;a="auto"}return(!v.boxSizingReliable()&&i||!v.reliableTrDimensions()&&T(t,"tr")||"auto"===a||!parseFloat(a)&&"inline"===A.css(t,"display",!1,r))&&t.getClientRects().length&&(i="border-box"===A.css(t,"boxSizing",!1,r),(o=s in t)&&(a=t[s])),(a=parseFloat(a)||0)+re(t,e,n||(i?"border":"content"),o,r,a)+"px"}function oe(t,e,n,r,i){return new oe.prototype.init(t,e,n,r,i)}A.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=$t(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(t,e,n,r){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var i,o,a,s=J(e),u=qt.test(e),c=t.style;if(u||(e=Qt(s)),a=A.cssHooks[e]||A.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(t,!1,r))?i:c[e];"string"===(o=typeof n)&&(i=it.exec(n))&&i[1]&&(n=lt(t,e,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(A.cssNumber[s]?"":"px")),v.clearCloneStyle||""!==n||0!==e.indexOf("background")||(c[e]="inherit"),a&&"set"in a&&void 0===(n=a.set(t,n,r))||(u?c.setProperty(e,n):c[e]=n))}},css:function(t,e,n,r){var i,o,a,s=J(e);return qt.test(e)||(e=Qt(s)),(a=A.cssHooks[e]||A.cssHooks[s])&&"get"in a&&(i=a.get(t,!0,n)),void 0===i&&(i=$t(t,e,r)),"normal"===i&&e in ee&&(i=ee[e]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),A.each(["height","width"],(function(t,e){A.cssHooks[e]={get:function(t,n,r){if(n)return!Zt.test(A.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?ie(t,e,r):zt(t,te,(function(){return ie(t,e,r)}))},set:function(t,n,r){var i,o=Ut(t),a=!v.scrollboxSize()&&"absolute"===o.position,s=(a||r)&&"border-box"===A.css(t,"boxSizing",!1,o),u=r?re(t,e,r,s,o):0;return s&&a&&(u-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(o[e])-re(t,e,"border",!1,o)-.5)),u&&(i=it.exec(n))&&"px"!==(i[3]||"px")&&(t.style[e]=n,n=A.css(t,e)),ne(0,n,u)}}})),A.cssHooks.marginLeft=Vt(v.reliableMarginLeft,(function(t,e){if(e)return(parseFloat($t(t,"marginLeft"))||t.getBoundingClientRect().left-zt(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),A.each({margin:"",padding:"",border:"Width"},(function(t,e){A.cssHooks[t+e]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[t+ot[r]+e]=o[r]||o[r-2]||o[0];return i}},"margin"!==t&&(A.cssHooks[t+e].set=ne)})),A.fn.extend({css:function(t,e){return G(this,(function(t,e,n){var r,i,o={},a=0;if(Array.isArray(e)){for(r=Ut(t),i=e.length;a<i;a++)o[e[a]]=A.css(t,e[a],!1,r);return o}return void 0!==n?A.style(t,e,n):A.css(t,e)}),t,e,arguments.length>1)}}),A.Tween=oe,oe.prototype={constructor:oe,init:function(t,e,n,r,i,o){this.elem=t,this.prop=n,this.easing=i||A.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=o||(A.cssNumber[n]?"":"px")},cur:function(){var t=oe.propHooks[this.prop];return t&&t.get?t.get(this):oe.propHooks._default.get(this)},run:function(t){var e,n=oe.propHooks[this.prop];return this.options.duration?this.pos=e=A.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):oe.propHooks._default.set(this),this}},oe.prototype.init.prototype=oe.prototype,oe.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=A.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){A.fx.step[t.prop]?A.fx.step[t.prop](t):1!==t.elem.nodeType||!A.cssHooks[t.prop]&&null==t.elem.style[Qt(t.prop)]?t.elem[t.prop]=t.now:A.style(t.elem,t.prop,t.now+t.unit)}}},oe.propHooks.scrollTop=oe.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},A.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},A.fx=oe.prototype.init,A.fx.step={};var ae,se,ue=/^(?:toggle|show|hide)$/,ce=/queueHooks$/;function le(){se&&(!1===b.hidden&&r.requestAnimationFrame?r.requestAnimationFrame(le):r.setTimeout(le,A.fx.interval),A.fx.tick())}function fe(){return r.setTimeout((function(){ae=void 0})),ae=Date.now()}function pe(t,e){var n,r=0,i={height:t};for(e=e?1:0;r<4;r+=2-e)i["margin"+(n=ot[r])]=i["padding"+n]=t;return e&&(i.opacity=i.width=t),i}function de(t,e,n){for(var r,i=(he.tweeners[e]||[]).concat(he.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,e,t))return r}function he(t,e,n){var r,i,o=0,a=he.prefilters.length,s=A.Deferred().always((function(){delete u.elem})),u=function(){if(i)return!1;for(var e=ae||fe(),n=Math.max(0,c.startTime+c.duration-e),r=1-(n/c.duration||0),o=0,a=c.tweens.length;o<a;o++)c.tweens[o].run(r);return s.notifyWith(t,[c,r,n]),r<1&&a?n:(a||s.notifyWith(t,[c,1,0]),s.resolveWith(t,[c]),!1)},c=s.promise({elem:t,props:A.extend({},e),opts:A.extend(!0,{specialEasing:{},easing:A.easing._default},n),originalProperties:e,originalOptions:n,startTime:ae||fe(),duration:n.duration,tweens:[],createTween:function(e,n){var r=A.Tween(t,c.opts,e,n,c.opts.specialEasing[e]||c.opts.easing);return c.tweens.push(r),r},stop:function(e){var n=0,r=e?c.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)c.tweens[n].run(1);return e?(s.notifyWith(t,[c,1,0]),s.resolveWith(t,[c,e])):s.rejectWith(t,[c,e]),this}}),l=c.props;for(!function(t,e){var n,r,i,o,a;for(n in t)if(i=e[r=J(n)],o=t[n],Array.isArray(o)&&(i=o[1],o=t[n]=o[0]),n!==r&&(t[r]=o,delete t[n]),(a=A.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete t[r],o)n in t||(t[n]=o[n],e[n]=i);else e[r]=i}(l,c.opts.specialEasing);o<a;o++)if(r=he.prefilters[o].call(c,t,l,c.opts))return y(r.stop)&&(A._queueHooks(c.elem,c.opts.queue).stop=r.stop.bind(r)),r;return A.map(l,de,c),y(c.opts.start)&&c.opts.start.call(t,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),A.fx.timer(A.extend(u,{elem:t,anim:c,queue:c.opts.queue})),c}A.Animation=A.extend(he,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return lt(n.elem,t,it.exec(e),n),n}]},tweener:function(t,e){y(t)?(e=t,t=["*"]):t=t.match(P);for(var n,r=0,i=t.length;r<i;r++)n=t[r],he.tweeners[n]=he.tweeners[n]||[],he.tweeners[n].unshift(e)},prefilters:[function(t,e,n){var r,i,o,a,s,u,c,l,f="width"in e||"height"in e,p=this,d={},h=t.style,g=t.nodeType&&ct(t),v=Q.get(t,"fxshow");for(r in n.queue||(null==(a=A._queueHooks(t,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always((function(){p.always((function(){a.unqueued--,A.queue(t,"fx").length||a.empty.fire()}))}))),e)if(i=e[r],ue.test(i)){if(delete e[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||A.style(t,r)}if((u=!A.isEmptyObject(e))||!A.isEmptyObject(d))for(r in f&&1===t.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(c=v&&v.display)&&(c=Q.get(t,"display")),"none"===(l=A.css(t,"display"))&&(c?l=c:(dt([t],!0),c=t.style.display||c,l=A.css(t,"display"),dt([t]))),("inline"===l||"inline-block"===l&&null!=c)&&"none"===A.css(t,"float")&&(u||(p.done((function(){h.display=c})),null==c&&(l=h.display,c="none"===l?"":l)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always((function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]}))),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=Q.access(t,"fxshow",{display:c}),o&&(v.hidden=!g),g&&dt([t],!0),p.done((function(){for(r in g||dt([t]),Q.remove(t,"fxshow"),d)A.style(t,r,d[r])}))),u=de(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(t,e){e?he.prefilters.unshift(t):he.prefilters.push(t)}}),A.speed=function(t,e,n){var r=t&&"object"==typeof t?A.extend({},t):{complete:n||!n&&e||y(t)&&t,duration:t,easing:n&&e||e&&!y(e)&&e};return A.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in A.fx.speeds?r.duration=A.fx.speeds[r.duration]:r.duration=A.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){y(r.old)&&r.old.call(this),r.queue&&A.dequeue(this,r.queue)},r},A.fn.extend({fadeTo:function(t,e,n,r){return this.filter(ct).css("opacity",0).show().end().animate({opacity:e},t,n,r)},animate:function(t,e,n,r){var i=A.isEmptyObject(t),o=A.speed(e,n,r),a=function(){var e=he(this,A.extend({},t),o);(i||Q.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(t,e,n){var r=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=void 0),e&&this.queue(t||"fx",[]),this.each((function(){var e=!0,i=null!=t&&t+"queueHooks",o=A.timers,a=Q.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&ce.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=t&&o[i].queue!==t||(o[i].anim.stop(n),e=!1,o.splice(i,1));!e&&n||A.dequeue(this,t)}))},finish:function(t){return!1!==t&&(t=t||"fx"),this.each((function(){var e,n=Q.get(this),r=n[t+"queue"],i=n[t+"queueHooks"],o=A.timers,a=r?r.length:0;for(n.finish=!0,A.queue(this,t,[]),i&&i.stop&&i.stop.call(this,!0),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;e<a;e++)r[e]&&r[e].finish&&r[e].finish.call(this);delete n.finish}))}}),A.each(["toggle","show","hide"],(function(t,e){var n=A.fn[e];A.fn[e]=function(t,r,i){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(pe(e,!0),t,r,i)}})),A.each({slideDown:pe("show"),slideUp:pe("hide"),slideToggle:pe("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(t,e){A.fn[t]=function(t,n,r){return this.animate(e,t,n,r)}})),A.timers=[],A.fx.tick=function(){var t,e=0,n=A.timers;for(ae=Date.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||A.fx.stop(),ae=void 0},A.fx.timer=function(t){A.timers.push(t),A.fx.start()},A.fx.interval=13,A.fx.start=function(){se||(se=!0,le())},A.fx.stop=function(){se=null},A.fx.speeds={slow:600,fast:200,_default:400},A.fn.delay=function(t,e){return t=A.fx&&A.fx.speeds[t]||t,e=e||"fx",this.queue(e,(function(e,n){var i=r.setTimeout(e,t);n.stop=function(){r.clearTimeout(i)}}))},function(){var t=b.createElement("input"),e=b.createElement("select").appendChild(b.createElement("option"));t.type="checkbox",v.checkOn=""!==t.value,v.optSelected=e.selected,(t=b.createElement("input")).value="t",t.type="radio",v.radioValue="t"===t.value}();var ge,ve=A.expr.attrHandle;A.fn.extend({attr:function(t,e){return G(this,A.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each((function(){A.removeAttr(this,t)}))}}),A.extend({attr:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?A.prop(t,e,n):(1===o&&A.isXMLDoc(t)||(i=A.attrHooks[e.toLowerCase()]||(A.expr.match.bool.test(e)?ge:void 0)),void 0!==n?null===n?void A.removeAttr(t,e):i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:(t.setAttribute(e,n+""),n):i&&"get"in i&&null!==(r=i.get(t,e))?r:null==(r=A.find.attr(t,e))?void 0:r)},attrHooks:{type:{set:function(t,e){if(!v.radioValue&&"radio"===e&&T(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,r=0,i=e&&e.match(P);if(i&&1===t.nodeType)for(;n=i[r++];)t.removeAttribute(n)}}),ge={set:function(t,e,n){return!1===e?A.removeAttr(t,n):t.setAttribute(n,n),n}},A.each(A.expr.match.bool.source.match(/\w+/g),(function(t,e){var n=ve[e]||A.find.attr;ve[e]=function(t,e,r){var i,o,a=e.toLowerCase();return r||(o=ve[a],ve[a]=i,i=null!=n(t,e,r)?a:null,ve[a]=o),i}}));var ye=/^(?:input|select|textarea|button)$/i,me=/^(?:a|area)$/i;function be(t){return(t.match(P)||[]).join(" ")}function De(t){return t.getAttribute&&t.getAttribute("class")||""}function we(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(P)||[]}A.fn.extend({prop:function(t,e){return G(this,A.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[A.propFix[t]||t]}))}}),A.extend({prop:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&A.isXMLDoc(t)||(e=A.propFix[e]||e,i=A.propHooks[e]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:t[e]=n:i&&"get"in i&&null!==(r=i.get(t,e))?r:t[e]},propHooks:{tabIndex:{get:function(t){var e=A.find.attr(t,"tabindex");return e?parseInt(e,10):ye.test(t.nodeName)||me.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),v.optSelected||(A.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),A.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){A.propFix[this.toLowerCase()]=this})),A.fn.extend({addClass:function(t){var e,n,r,i,o,a;return y(t)?this.each((function(e){A(this).addClass(t.call(this,e,De(this)))})):(e=we(t)).length?this.each((function(){if(r=De(this),n=1===this.nodeType&&" "+be(r)+" "){for(o=0;o<e.length;o++)i=e[o],n.indexOf(" "+i+" ")<0&&(n+=i+" ");a=be(n),r!==a&&this.setAttribute("class",a)}})):this},removeClass:function(t){var e,n,r,i,o,a;return y(t)?this.each((function(e){A(this).removeClass(t.call(this,e,De(this)))})):arguments.length?(e=we(t)).length?this.each((function(){if(r=De(this),n=1===this.nodeType&&" "+be(r)+" "){for(o=0;o<e.length;o++)for(i=e[o];n.indexOf(" "+i+" ")>-1;)n=n.replace(" "+i+" "," ");a=be(n),r!==a&&this.setAttribute("class",a)}})):this:this.attr("class","")},toggleClass:function(t,e){var n,r,i,o,a=typeof t,s="string"===a||Array.isArray(t);return y(t)?this.each((function(n){A(this).toggleClass(t.call(this,n,De(this),e),e)})):"boolean"==typeof e&&s?e?this.addClass(t):this.removeClass(t):(n=we(t),this.each((function(){if(s)for(o=A(this),i=0;i<n.length;i++)r=n[i],o.hasClass(r)?o.removeClass(r):o.addClass(r);else void 0!==t&&"boolean"!==a||((r=De(this))&&Q.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",r||!1===t?"":Q.get(this,"__className__")||""))})))},hasClass:function(t){var e,n,r=0;for(e=" "+t+" ";n=this[r++];)if(1===n.nodeType&&(" "+be(De(n))+" ").indexOf(e)>-1)return!0;return!1}});var xe=/\r/g;A.fn.extend({val:function(t){var e,n,r,i=this[0];return arguments.length?(r=y(t),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?t.call(this,n,A(this).val()):t)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=A.map(i,(function(t){return null==t?"":t+""}))),(e=A.valHooks[this.type]||A.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,i,"value")||(this.value=i))}))):i?(e=A.valHooks[i.type]||A.valHooks[i.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(xe,""):null==n?"":n:void 0}}),A.extend({valHooks:{option:{get:function(t){var e=A.find.attr(t,"value");return null!=e?e:be(A.text(t))}},select:{get:function(t){var e,n,r,i=t.options,o=t.selectedIndex,a="select-one"===t.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!T(n.parentNode,"optgroup"))){if(e=A(n).val(),a)return e;s.push(e)}return s},set:function(t,e){for(var n,r,i=t.options,o=A.makeArray(e),a=i.length;a--;)((r=i[a]).selected=A.inArray(A.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(t.selectedIndex=-1),o}}}}),A.each(["radio","checkbox"],(function(){A.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=A.inArray(A(t).val(),e)>-1}},v.checkOn||(A.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})})),v.focusin="onfocusin"in r;var Ee=/^(?:focusinfocus|focusoutblur)$/,Ae=function(t){t.stopPropagation()};A.extend(A.event,{trigger:function(t,e,n,i){var o,a,s,u,c,l,f,p,h=[n||b],g=d.call(t,"type")?t.type:t,v=d.call(t,"namespace")?t.namespace.split("."):[];if(a=p=s=n=n||b,3!==n.nodeType&&8!==n.nodeType&&!Ee.test(g+A.event.triggered)&&(g.indexOf(".")>-1&&(v=g.split("."),g=v.shift(),v.sort()),c=g.indexOf(":")<0&&"on"+g,(t=t[A.expando]?t:new A.Event(g,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=v.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=n),e=null==e?[t]:A.makeArray(e,[t]),f=A.event.special[g]||{},i||!f.trigger||!1!==f.trigger.apply(n,e))){if(!i&&!f.noBubble&&!m(n)){for(u=f.delegateType||g,Ee.test(u+g)||(a=a.parentNode);a;a=a.parentNode)h.push(a),s=a;s===(n.ownerDocument||b)&&h.push(s.defaultView||s.parentWindow||r)}for(o=0;(a=h[o++])&&!t.isPropagationStopped();)p=a,t.type=o>1?u:f.bindType||g,(l=(Q.get(a,"events")||Object.create(null))[t.type]&&Q.get(a,"handle"))&&l.apply(a,e),(l=c&&a[c])&&l.apply&&X(a)&&(t.result=l.apply(a,e),!1===t.result&&t.preventDefault());return t.type=g,i||t.isDefaultPrevented()||f._default&&!1!==f._default.apply(h.pop(),e)||!X(n)||c&&y(n[g])&&!m(n)&&((s=n[c])&&(n[c]=null),A.event.triggered=g,t.isPropagationStopped()&&p.addEventListener(g,Ae),n[g](),t.isPropagationStopped()&&p.removeEventListener(g,Ae),A.event.triggered=void 0,s&&(n[c]=s)),t.result}},simulate:function(t,e,n){var r=A.extend(new A.Event,n,{type:t,isSimulated:!0});A.event.trigger(r,null,e)}}),A.fn.extend({trigger:function(t,e){return this.each((function(){A.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var n=this[0];if(n)return A.event.trigger(t,e,n,!0)}}),v.focusin||A.each({focus:"focusin",blur:"focusout"},(function(t,e){var n=function(t){A.event.simulate(e,t.target,A.event.fix(t))};A.event.special[e]={setup:function(){var r=this.ownerDocument||this.document||this,i=Q.access(r,e);i||r.addEventListener(t,n,!0),Q.access(r,e,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=Q.access(r,e)-1;i?Q.access(r,e,i):(r.removeEventListener(t,n,!0),Q.remove(r,e))}}}));var _e=r.location,Se={guid:Date.now()},Ce=/\?/;A.parseXML=function(t){var e,n;if(!t||"string"!=typeof t)return null;try{e=(new r.DOMParser).parseFromString(t,"text/xml")}catch(t){}return n=e&&e.getElementsByTagName("parsererror")[0],e&&!n||A.error("Invalid XML: "+(n?A.map(n.childNodes,(function(t){return t.textContent})).join("\n"):t)),e};var ke=/\[\]$/,Oe=/\r?\n/g,Te=/^(?:submit|button|image|reset|file)$/i,Fe=/^(?:input|select|textarea|keygen)/i;function je(t,e,n,r){var i;if(Array.isArray(e))A.each(e,(function(e,i){n||ke.test(t)?r(t,i):je(t+"["+("object"==typeof i&&null!=i?e:"")+"]",i,n,r)}));else if(n||"object"!==x(e))r(t,e);else for(i in e)je(t+"["+i+"]",e[i],n,r)}A.param=function(t,e){var n,r=[],i=function(t,e){var n=y(e)?e():e;r[r.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!A.isPlainObject(t))A.each(t,(function(){i(this.name,this.value)}));else for(n in t)je(n,t[n],e,i);return r.join("&")},A.fn.extend({serialize:function(){return A.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=A.prop(this,"elements");return t?A.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!A(this).is(":disabled")&&Fe.test(this.nodeName)&&!Te.test(t)&&(this.checked||!vt.test(t))})).map((function(t,e){var n=A(this).val();return null==n?null:Array.isArray(n)?A.map(n,(function(t){return{name:e.name,value:t.replace(Oe,"\r\n")}})):{name:e.name,value:n.replace(Oe,"\r\n")}})).get()}});var Le=/%20/g,Ie=/#.*$/,Ne=/([?&])_=[^&]*/,Be=/^(.*?):[ \t]*([^\r\n]*)$/gm,Re=/^(?:GET|HEAD)$/,Pe=/^\/\//,Me={},He={},qe="*/".concat("*"),Ue=b.createElement("a");function ze(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var r,i=0,o=e.toLowerCase().match(P)||[];if(y(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(t[r]=t[r]||[]).unshift(n)):(t[r]=t[r]||[]).push(n)}}function We(t,e,n,r){var i={},o=t===He;function a(s){var u;return i[s]=!0,A.each(t[s]||[],(function(t,s){var c=s(e,n,r);return"string"!=typeof c||o||i[c]?o?!(u=c):void 0:(e.dataTypes.unshift(c),a(c),!1)})),u}return a(e.dataTypes[0])||!i["*"]&&a("*")}function Ge(t,e){var n,r,i=A.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((i[n]?t:r||(r={}))[n]=e[n]);return r&&A.extend(!0,t,r),t}Ue.href=_e.href,A.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:_e.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(_e.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":qe,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":A.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Ge(Ge(t,A.ajaxSettings),e):Ge(A.ajaxSettings,t)},ajaxPrefilter:ze(Me),ajaxTransport:ze(He),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var n,i,o,a,s,u,c,l,f,p,d=A.ajaxSetup({},e),h=d.context||d,g=d.context&&(h.nodeType||h.jquery)?A(h):A.event,v=A.Deferred(),y=A.Callbacks("once memory"),m=d.statusCode||{},D={},w={},x="canceled",E={readyState:0,getResponseHeader:function(t){var e;if(c){if(!a)for(a={};e=Be.exec(o);)a[e[1].toLowerCase()+" "]=(a[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=a[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return c?o:null},setRequestHeader:function(t,e){return null==c&&(t=w[t.toLowerCase()]=w[t.toLowerCase()]||t,D[t]=e),this},overrideMimeType:function(t){return null==c&&(d.mimeType=t),this},statusCode:function(t){var e;if(t)if(c)E.always(t[E.status]);else for(e in t)m[e]=[m[e],t[e]];return this},abort:function(t){var e=t||x;return n&&n.abort(e),_(0,e),this}};if(v.promise(E),d.url=((t||d.url||_e.href)+"").replace(Pe,_e.protocol+"//"),d.type=e.method||e.type||d.method||d.type,d.dataTypes=(d.dataType||"*").toLowerCase().match(P)||[""],null==d.crossDomain){u=b.createElement("a");try{u.href=d.url,u.href=u.href,d.crossDomain=Ue.protocol+"//"+Ue.host!=u.protocol+"//"+u.host}catch(t){d.crossDomain=!0}}if(d.data&&d.processData&&"string"!=typeof d.data&&(d.data=A.param(d.data,d.traditional)),We(Me,d,e,E),c)return E;for(f in(l=A.event&&d.global)&&0==A.active++&&A.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Re.test(d.type),i=d.url.replace(Ie,""),d.hasContent?d.data&&d.processData&&0===(d.contentType||"").indexOf("application/x-www-form-urlencoded")&&(d.data=d.data.replace(Le,"+")):(p=d.url.slice(i.length),d.data&&(d.processData||"string"==typeof d.data)&&(i+=(Ce.test(i)?"&":"?")+d.data,delete d.data),!1===d.cache&&(i=i.replace(Ne,"$1"),p=(Ce.test(i)?"&":"?")+"_="+Se.guid+++p),d.url=i+p),d.ifModified&&(A.lastModified[i]&&E.setRequestHeader("If-Modified-Since",A.lastModified[i]),A.etag[i]&&E.setRequestHeader("If-None-Match",A.etag[i])),(d.data&&d.hasContent&&!1!==d.contentType||e.contentType)&&E.setRequestHeader("Content-Type",d.contentType),E.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+qe+"; q=0.01":""):d.accepts["*"]),d.headers)E.setRequestHeader(f,d.headers[f]);if(d.beforeSend&&(!1===d.beforeSend.call(h,E,d)||c))return E.abort();if(x="abort",y.add(d.complete),E.done(d.success),E.fail(d.error),n=We(He,d,e,E)){if(E.readyState=1,l&&g.trigger("ajaxSend",[E,d]),c)return E;d.async&&d.timeout>0&&(s=r.setTimeout((function(){E.abort("timeout")}),d.timeout));try{c=!1,n.send(D,_)}catch(t){if(c)throw t;_(-1,t)}}else _(-1,"No Transport");function _(t,e,a,u){var f,p,b,D,w,x=e;c||(c=!0,s&&r.clearTimeout(s),n=void 0,o=u||"",E.readyState=t>0?4:0,f=t>=200&&t<300||304===t,a&&(D=function(t,e,n){for(var r,i,o,a,s=t.contents,u=t.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=t.mimeType||e.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||t.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(d,E,a)),!f&&A.inArray("script",d.dataTypes)>-1&&A.inArray("json",d.dataTypes)<0&&(d.converters["text script"]=function(){}),D=function(t,e,n,r){var i,o,a,s,u,c={},l=t.dataTypes.slice();if(l[1])for(a in t.converters)c[a.toLowerCase()]=t.converters[a];for(o=l.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!u&&r&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),u=o,o=l.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=c[u+" "+o]||c["* "+o]))for(i in c)if((s=i.split(" "))[1]===o&&(a=c[u+" "+s[0]]||c["* "+s[0]])){!0===a?a=c[i]:!0!==c[i]&&(o=s[0],l.unshift(s[1]));break}if(!0!==a)if(a&&t.throws)e=a(e);else try{e=a(e)}catch(t){return{state:"parsererror",error:a?t:"No conversion from "+u+" to "+o}}}return{state:"success",data:e}}(d,D,E,f),f?(d.ifModified&&((w=E.getResponseHeader("Last-Modified"))&&(A.lastModified[i]=w),(w=E.getResponseHeader("etag"))&&(A.etag[i]=w)),204===t||"HEAD"===d.type?x="nocontent":304===t?x="notmodified":(x=D.state,p=D.data,f=!(b=D.error))):(b=x,!t&&x||(x="error",t<0&&(t=0))),E.status=t,E.statusText=(e||x)+"",f?v.resolveWith(h,[p,x,E]):v.rejectWith(h,[E,x,b]),E.statusCode(m),m=void 0,l&&g.trigger(f?"ajaxSuccess":"ajaxError",[E,d,f?p:b]),y.fireWith(h,[E,x]),l&&(g.trigger("ajaxComplete",[E,d]),--A.active||A.event.trigger("ajaxStop")))}return E},getJSON:function(t,e,n){return A.get(t,e,n,"json")},getScript:function(t,e){return A.get(t,void 0,e,"script")}}),A.each(["get","post"],(function(t,e){A[e]=function(t,n,r,i){return y(n)&&(i=i||r,r=n,n=void 0),A.ajax(A.extend({url:t,type:e,dataType:i,data:n,success:r},A.isPlainObject(t)&&t))}})),A.ajaxPrefilter((function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")})),A._evalUrl=function(t,e,n){return A.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){A.globalEval(t,e,n)}})},A.fn.extend({wrapAll:function(t){var e;return this[0]&&(y(t)&&(t=t.call(this[0])),e=A(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t})).append(this)),this},wrapInner:function(t){return y(t)?this.each((function(e){A(this).wrapInner(t.call(this,e))})):this.each((function(){var e=A(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)}))},wrap:function(t){var e=y(t);return this.each((function(n){A(this).wrapAll(e?t.call(this,n):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){A(this).replaceWith(this.childNodes)})),this}}),A.expr.pseudos.hidden=function(t){return!A.expr.pseudos.visible(t)},A.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},A.ajaxSettings.xhr=function(){try{return new r.XMLHttpRequest}catch(t){}};var Ye={0:200,1223:204},$e=A.ajaxSettings.xhr();v.cors=!!$e&&"withCredentials"in $e,v.ajax=$e=!!$e,A.ajaxTransport((function(t){var e,n;if(v.cors||$e&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];for(a in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);e=function(t){return function(){e&&(e=n=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===t?s.abort():"error"===t?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Ye[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=e(),n=s.onerror=s.ontimeout=e("error"),void 0!==s.onabort?s.onabort=n:s.onreadystatechange=function(){4===s.readyState&&r.setTimeout((function(){e&&n()}))},e=e("abort");try{s.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}})),A.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),A.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return A.globalEval(t),t}}}),A.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),A.ajaxTransport("script",(function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(r,i){e=A("<script>").attr(t.scriptAttrs||{}).prop({charset:t.scriptCharset,src:t.url}).on("load error",n=function(t){e.remove(),n=null,t&&i("error"===t.type?404:200,t.type)}),b.head.appendChild(e[0])},abort:function(){n&&n()}}}));var Ve,Je=[],Xe=/(=)\?(?=&|$)|\?\?/;A.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Je.pop()||A.expando+"_"+Se.guid++;return this[t]=!0,t}}),A.ajaxPrefilter("json jsonp",(function(t,e,n){var i,o,a,s=!1!==t.jsonp&&(Xe.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Xe.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=y(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Xe,"$1"+i):!1!==t.jsonp&&(t.url+=(Ce.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||A.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=r[i],r[i]=function(){a=arguments},n.always((function(){void 0===o?A(r).removeProp(i):r[i]=o,t[i]&&(t.jsonpCallback=e.jsonpCallback,Je.push(i)),a&&y(o)&&o(a[0]),a=o=void 0})),"script"})),v.createHTMLDocument=((Ve=b.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ve.childNodes.length),A.parseHTML=function(t,e,n){return"string"!=typeof t?[]:("boolean"==typeof e&&(n=e,e=!1),e||(v.createHTMLDocument?((r=(e=b.implementation.createHTMLDocument("")).createElement("base")).href=b.location.href,e.head.appendChild(r)):e=b),o=!n&&[],(i=F.exec(t))?[e.createElement(i[1])]:(i=Et([t],e,o),o&&o.length&&A(o).remove(),A.merge([],i.childNodes)));var r,i,o},A.fn.load=function(t,e,n){var r,i,o,a=this,s=t.indexOf(" ");return s>-1&&(r=be(t.slice(s)),t=t.slice(0,s)),y(e)?(n=e,e=void 0):e&&"object"==typeof e&&(i="POST"),a.length>0&&A.ajax({url:t,type:i||"GET",dataType:"html",data:e}).done((function(t){o=arguments,a.html(r?A("<div>").append(A.parseHTML(t)).find(r):t)})).always(n&&function(t,e){a.each((function(){n.apply(this,o||[t.responseText,e,t])}))}),this},A.expr.pseudos.animated=function(t){return A.grep(A.timers,(function(e){return t===e.elem})).length},A.offset={setOffset:function(t,e,n){var r,i,o,a,s,u,c=A.css(t,"position"),l=A(t),f={};"static"===c&&(t.style.position="relative"),s=l.offset(),o=A.css(t,"top"),u=A.css(t,"left"),("absolute"===c||"fixed"===c)&&(o+u).indexOf("auto")>-1?(a=(r=l.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),y(e)&&(e=e.call(t,n,A.extend({},s))),null!=e.top&&(f.top=e.top-s.top+a),null!=e.left&&(f.left=e.left-s.left+i),"using"in e?e.using.call(t,f):l.css(f)}},A.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each((function(e){A.offset.setOffset(this,t,e)}));var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,n,r=this[0],i={top:0,left:0};if("fixed"===A.css(r,"position"))e=r.getBoundingClientRect();else{for(e=this.offset(),n=r.ownerDocument,t=r.offsetParent||n.documentElement;t&&(t===n.body||t===n.documentElement)&&"static"===A.css(t,"position");)t=t.parentNode;t&&t!==r&&1===t.nodeType&&((i=A(t).offset()).top+=A.css(t,"borderTopWidth",!0),i.left+=A.css(t,"borderLeftWidth",!0))}return{top:e.top-i.top-A.css(r,"marginTop",!0),left:e.left-i.left-A.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent;t&&"static"===A.css(t,"position");)t=t.offsetParent;return t||at}))}}),A.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(t,e){var n="pageYOffset"===e;A.fn[t]=function(r){return G(this,(function(t,r,i){var o;if(m(t)?o=t:9===t.nodeType&&(o=t.defaultView),void 0===i)return o?o[e]:t[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):t[r]=i}),t,r,arguments.length)}})),A.each(["top","left"],(function(t,e){A.cssHooks[e]=Vt(v.pixelPosition,(function(t,n){if(n)return n=$t(t,e),Ht.test(n)?A(t).position()[e]+"px":n}))})),A.each({Height:"height",Width:"width"},(function(t,e){A.each({padding:"inner"+t,content:e,"":"outer"+t},(function(n,r){A.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return G(this,(function(e,n,i){var o;return m(e)?0===r.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(o=e.documentElement,Math.max(e.body["scroll"+t],o["scroll"+t],e.body["offset"+t],o["offset"+t],o["client"+t])):void 0===i?A.css(e,n,s):A.style(e,n,i,s)}),e,a?i:void 0,a)}}))})),A.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(t,e){A.fn[e]=function(t){return this.on(e,t)}})),A.fn.extend({bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,r){return this.on(e,t,n,r)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)},hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),A.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(t,e){A.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}));var Ke=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;A.proxy=function(t,e){var n,r,i;if("string"==typeof e&&(n=t[e],e=t,t=n),y(t))return r=s.call(arguments,2),i=function(){return t.apply(e||this,r.concat(s.call(arguments)))},i.guid=t.guid=t.guid||A.guid++,i},A.holdReady=function(t){t?A.readyWait++:A.ready(!0)},A.isArray=Array.isArray,A.parseJSON=JSON.parse,A.nodeName=T,A.isFunction=y,A.isWindow=m,A.camelCase=J,A.type=x,A.now=Date.now,A.isNumeric=function(t){var e=A.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},A.trim=function(t){return null==t?"":(t+"").replace(Ke,"$1")},void 0===(n=function(){return A}.apply(e,[]))||(t.exports=n);var Qe=r.jQuery,Ze=r.$;return A.noConflict=function(t){return r.$===A&&(r.$=Ze),t&&r.jQuery===A&&(r.jQuery=Qe),A},void 0===i&&(r.jQuery=r.$=A),A}))},974:function(t,e,n){var r;t=n.nmd(t),function(){var i,o="Expected a function",a="__lodash_hash_undefined__",s="__lodash_placeholder__",u=16,c=32,l=64,f=128,p=256,d=1/0,h=9007199254740991,g=NaN,v=4294967295,y=[["ary",f],["bind",1],["bindKey",2],["curry",8],["curryRight",u],["flip",512],["partial",c],["partialRight",l],["rearg",p]],m="[object Arguments]",b="[object Array]",D="[object Boolean]",w="[object Date]",x="[object Error]",E="[object Function]",A="[object GeneratorFunction]",_="[object Map]",S="[object Number]",C="[object Object]",k="[object Promise]",O="[object RegExp]",T="[object Set]",F="[object String]",j="[object Symbol]",L="[object WeakMap]",I="[object ArrayBuffer]",N="[object DataView]",B="[object Float32Array]",R="[object Float64Array]",P="[object Int8Array]",M="[object Int16Array]",H="[object Int32Array]",q="[object Uint8Array]",U="[object Uint8ClampedArray]",z="[object Uint16Array]",W="[object Uint32Array]",G=/\b__p \+= '';/g,Y=/\b(__p \+=) '' \+/g,$=/(__e\(.*?\)|\b__t\)) \+\n'';/g,V=/&(?:amp|lt|gt|quot|#39);/g,J=/[&<>"']/g,X=RegExp(V.source),K=RegExp(J.source),Q=/<%-([\s\S]+?)%>/g,Z=/<%([\s\S]+?)%>/g,tt=/<%=([\s\S]+?)%>/g,et=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nt=/^\w*$/,rt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,it=/[\\^$.*+?()[\]{}|]/g,ot=RegExp(it.source),at=/^\s+/,st=/\s/,ut=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ct=/\{\n\/\* \[wrapped with (.+)\] \*/,lt=/,? & /,ft=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,pt=/[()=,{}\[\]\/\s]/,dt=/\\(\\)?/g,ht=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,gt=/\w*$/,vt=/^[-+]0x[0-9a-f]+$/i,yt=/^0b[01]+$/i,mt=/^\[object .+?Constructor\]$/,bt=/^0o[0-7]+$/i,Dt=/^(?:0|[1-9]\d*)$/,wt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,xt=/($^)/,Et=/['\n\r\u2028\u2029\\]/g,At="\\ud800-\\udfff",_t="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",St="\\u2700-\\u27bf",Ct="a-z\\xdf-\\xf6\\xf8-\\xff",kt="A-Z\\xc0-\\xd6\\xd8-\\xde",Ot="\\ufe0e\\ufe0f",Tt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ft="['\u2019]",jt="["+At+"]",Lt="["+Tt+"]",It="["+_t+"]",Nt="\\d+",Bt="["+St+"]",Rt="["+Ct+"]",Pt="[^"+At+Tt+Nt+St+Ct+kt+"]",Mt="\\ud83c[\\udffb-\\udfff]",Ht="[^"+At+"]",qt="(?:\\ud83c[\\udde6-\\uddff]){2}",Ut="[\\ud800-\\udbff][\\udc00-\\udfff]",zt="["+kt+"]",Wt="\\u200d",Gt="(?:"+Rt+"|"+Pt+")",Yt="(?:"+zt+"|"+Pt+")",$t="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Vt="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Jt="(?:"+It+"|"+Mt+")"+"?",Xt="["+Ot+"]?",Kt=Xt+Jt+("(?:"+Wt+"(?:"+[Ht,qt,Ut].join("|")+")"+Xt+Jt+")*"),Qt="(?:"+[Bt,qt,Ut].join("|")+")"+Kt,Zt="(?:"+[Ht+It+"?",It,qt,Ut,jt].join("|")+")",te=RegExp(Ft,"g"),ee=RegExp(It,"g"),ne=RegExp(Mt+"(?="+Mt+")|"+Zt+Kt,"g"),re=RegExp([zt+"?"+Rt+"+"+$t+"(?="+[Lt,zt,"$"].join("|")+")",Yt+"+"+Vt+"(?="+[Lt,zt+Gt,"$"].join("|")+")",zt+"?"+Gt+"+"+$t,zt+"+"+Vt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Nt,Qt].join("|"),"g"),ie=RegExp("["+Wt+At+_t+Ot+"]"),oe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ae=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],se=-1,ue={};ue[B]=ue[R]=ue[P]=ue[M]=ue[H]=ue[q]=ue[U]=ue[z]=ue[W]=!0,ue[m]=ue[b]=ue[I]=ue[D]=ue[N]=ue[w]=ue[x]=ue[E]=ue[_]=ue[S]=ue[C]=ue[O]=ue[T]=ue[F]=ue[L]=!1;var ce={};ce[m]=ce[b]=ce[I]=ce[N]=ce[D]=ce[w]=ce[B]=ce[R]=ce[P]=ce[M]=ce[H]=ce[_]=ce[S]=ce[C]=ce[O]=ce[T]=ce[F]=ce[j]=ce[q]=ce[U]=ce[z]=ce[W]=!0,ce[x]=ce[E]=ce[L]=!1;var le={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},fe=parseFloat,pe=parseInt,de="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,he="object"==typeof self&&self&&self.Object===Object&&self,ge=de||he||Function("return this")(),ve=e&&!e.nodeType&&e,ye=ve&&t&&!t.nodeType&&t,me=ye&&ye.exports===ve,be=me&&de.process,De=function(){try{var t=ye&&ye.require&&ye.require("util").types;return t||be&&be.binding&&be.binding("util")}catch(t){}}(),we=De&&De.isArrayBuffer,xe=De&&De.isDate,Ee=De&&De.isMap,Ae=De&&De.isRegExp,_e=De&&De.isSet,Se=De&&De.isTypedArray;function Ce(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function ke(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}function Oe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Te(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Fe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function je(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function Le(t,e){return!!(null==t?0:t.length)&&ze(t,e,0)>-1}function Ie(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function Ne(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function Be(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function Re(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function Pe(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function Me(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var He=$e("length");function qe(t,e,n){var r;return n(t,(function(t,n,i){if(e(t,n,i))return r=n,!1})),r}function Ue(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function ze(t,e,n){return e==e?function(t,e,n){var r=n-1,i=t.length;for(;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):Ue(t,Ge,n)}function We(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function Ge(t){return t!=t}function Ye(t,e){var n=null==t?0:t.length;return n?Xe(t,e)/n:g}function $e(t){return function(e){return null==e?i:e[t]}}function Ve(t){return function(e){return null==t?i:t[e]}}function Je(t,e,n,r,i){return i(t,(function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)})),n}function Xe(t,e){for(var n,r=-1,o=t.length;++r<o;){var a=e(t[r]);a!==i&&(n=n===i?a:n+a)}return n}function Ke(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Qe(t){return t?t.slice(0,vn(t)+1).replace(at,""):t}function Ze(t){return function(e){return t(e)}}function tn(t,e){return Ne(e,(function(e){return t[e]}))}function en(t,e){return t.has(e)}function nn(t,e){for(var n=-1,r=t.length;++n<r&&ze(e,t[n],0)>-1;);return n}function rn(t,e){for(var n=t.length;n--&&ze(e,t[n],0)>-1;);return n}var on=Ve({\u00c0:"A",\u00c1:"A",\u00c2:"A",\u00c3:"A",\u00c4:"A",\u00c5:"A",\u00e0:"a",\u00e1:"a",\u00e2:"a",\u00e3:"a",\u00e4:"a",\u00e5:"a",\u00c7:"C",\u00e7:"c",\u00d0:"D",\u00f0:"d",\u00c8:"E",\u00c9:"E",\u00ca:"E",\u00cb:"E",\u00e8:"e",\u00e9:"e",\u00ea:"e",\u00eb:"e",\u00cc:"I",\u00cd:"I",\u00ce:"I",\u00cf:"I",\u00ec:"i",\u00ed:"i",\u00ee:"i",\u00ef:"i",\u00d1:"N",\u00f1:"n",\u00d2:"O",\u00d3:"O",\u00d4:"O",\u00d5:"O",\u00d6:"O",\u00d8:"O",\u00f2:"o",\u00f3:"o",\u00f4:"o",\u00f5:"o",\u00f6:"o",\u00f8:"o",\u00d9:"U",\u00da:"U",\u00db:"U",\u00dc:"U",\u00f9:"u",\u00fa:"u",\u00fb:"u",\u00fc:"u",\u00dd:"Y",\u00fd:"y",\u00ff:"y",\u00c6:"Ae",\u00e6:"ae",\u00de:"Th",\u00fe:"th",\u00df:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010a:"C",\u010c:"C",\u0107:"c",\u0109:"c",\u010b:"c",\u010d:"c",\u010e:"D",\u0110:"D",\u010f:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011a:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011b:"e",\u011c:"G",\u011e:"G",\u0120:"G",\u0122:"G",\u011d:"g",\u011f:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012a:"I",\u012c:"I",\u012e:"I",\u0130:"I",\u0129:"i",\u012b:"i",\u012d:"i",\u012f:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013b:"L",\u013d:"L",\u013f:"L",\u0141:"L",\u013a:"l",\u013c:"l",\u013e:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014a:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014b:"n",\u014c:"O",\u014e:"O",\u0150:"O",\u014d:"o",\u014f:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015a:"S",\u015c:"S",\u015e:"S",\u0160:"S",\u015b:"s",\u015d:"s",\u015f:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016a:"U",\u016c:"U",\u016e:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016b:"u",\u016d:"u",\u016f:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017b:"Z",\u017d:"Z",\u017a:"z",\u017c:"z",\u017e:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017f:"s"}),an=Ve({"&":"&","<":"<",">":">",'"':""","'":"'"});function sn(t){return"\\"+le[t]}function un(t){return ie.test(t)}function cn(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function ln(t,e){return function(n){return t(e(n))}}function fn(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n];a!==e&&a!==s||(t[n]=s,o[i++]=n)}return o}function pn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function dn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function hn(t){return un(t)?function(t){var e=ne.lastIndex=0;for(;ne.test(t);)++e;return e}(t):He(t)}function gn(t){return un(t)?function(t){return t.match(ne)||[]}(t):function(t){return t.split("")}(t)}function vn(t){for(var e=t.length;e--&&st.test(t.charAt(e)););return e}var yn=Ve({"&":"&","<":"<",">":">",""":'"',"'":"'"});var mn=function t(e){var n,r=(e=null==e?ge:mn.defaults(ge.Object(),e,mn.pick(ge,ae))).Array,st=e.Date,At=e.Error,_t=e.Function,St=e.Math,Ct=e.Object,kt=e.RegExp,Ot=e.String,Tt=e.TypeError,Ft=r.prototype,jt=_t.prototype,Lt=Ct.prototype,It=e["__core-js_shared__"],Nt=jt.toString,Bt=Lt.hasOwnProperty,Rt=0,Pt=(n=/[^.]+$/.exec(It&&It.keys&&It.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Mt=Lt.toString,Ht=Nt.call(Ct),qt=ge._,Ut=kt("^"+Nt.call(Bt).replace(it,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),zt=me?e.Buffer:i,Wt=e.Symbol,Gt=e.Uint8Array,Yt=zt?zt.allocUnsafe:i,$t=ln(Ct.getPrototypeOf,Ct),Vt=Ct.create,Jt=Lt.propertyIsEnumerable,Xt=Ft.splice,Kt=Wt?Wt.isConcatSpreadable:i,Qt=Wt?Wt.iterator:i,Zt=Wt?Wt.toStringTag:i,ne=function(){try{var t=po(Ct,"defineProperty");return t({},"",{}),t}catch(t){}}(),ie=e.clearTimeout!==ge.clearTimeout&&e.clearTimeout,le=st&&st.now!==ge.Date.now&&st.now,de=e.setTimeout!==ge.setTimeout&&e.setTimeout,he=St.ceil,ve=St.floor,ye=Ct.getOwnPropertySymbols,be=zt?zt.isBuffer:i,De=e.isFinite,He=Ft.join,Ve=ln(Ct.keys,Ct),bn=St.max,Dn=St.min,wn=st.now,xn=e.parseInt,En=St.random,An=Ft.reverse,_n=po(e,"DataView"),Sn=po(e,"Map"),Cn=po(e,"Promise"),kn=po(e,"Set"),On=po(e,"WeakMap"),Tn=po(Ct,"create"),Fn=On&&new On,jn={},Ln=Mo(_n),In=Mo(Sn),Nn=Mo(Cn),Bn=Mo(kn),Rn=Mo(On),Pn=Wt?Wt.prototype:i,Mn=Pn?Pn.valueOf:i,Hn=Pn?Pn.toString:i;function qn(t){if(ns(t)&&!Ga(t)&&!(t instanceof Gn)){if(t instanceof Wn)return t;if(Bt.call(t,"__wrapped__"))return Ho(t)}return new Wn(t)}var Un=function(){function t(){}return function(e){if(!es(e))return{};if(Vt)return Vt(e);t.prototype=e;var n=new t;return t.prototype=i,n}}();function zn(){}function Wn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=i}function Gn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=v,this.__views__=[]}function Yn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function $n(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Vn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Jn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Vn;++e<n;)this.add(t[e])}function Xn(t){var e=this.__data__=new $n(t);this.size=e.size}function Kn(t,e){var n=Ga(t),r=!n&&Wa(t),i=!n&&!r&&Ja(t),o=!n&&!r&&!i&&ls(t),a=n||r||i||o,s=a?Ke(t.length,Ot):[],u=s.length;for(var c in t)!e&&!Bt.call(t,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Do(c,u))||s.push(c);return s}function Qn(t){var e=t.length;return e?t[Jr(0,e-1)]:i}function Zn(t,e){return Bo(Ti(t),ur(e,0,t.length))}function tr(t){return Bo(Ti(t))}function er(t,e,n){(n!==i&&!qa(t[e],n)||n===i&&!(e in t))&&ar(t,e,n)}function nr(t,e,n){var r=t[e];Bt.call(t,e)&&qa(r,n)&&(n!==i||e in t)||ar(t,e,n)}function rr(t,e){for(var n=t.length;n--;)if(qa(t[n][0],e))return n;return-1}function ir(t,e,n,r){return dr(t,(function(t,i,o){e(r,t,n(t),o)})),r}function or(t,e){return t&&Fi(e,js(e),t)}function ar(t,e,n){"__proto__"==e&&ne?ne(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function sr(t,e){for(var n=-1,o=e.length,a=r(o),s=null==t;++n<o;)a[n]=s?i:Cs(t,e[n]);return a}function ur(t,e,n){return t==t&&(n!==i&&(t=t<=n?t:n),e!==i&&(t=t>=e?t:e)),t}function cr(t,e,n,r,o,a){var s,u=1&e,c=2&e,l=4&e;if(n&&(s=o?n(t,r,o,a):n(t)),s!==i)return s;if(!es(t))return t;var f=Ga(t);if(f){if(s=function(t){var e=t.length,n=new t.constructor(e);e&&"string"==typeof t[0]&&Bt.call(t,"index")&&(n.index=t.index,n.input=t.input);return n}(t),!u)return Ti(t,s)}else{var p=vo(t),d=p==E||p==A;if(Ja(t))return Ai(t,u);if(p==C||p==m||d&&!o){if(s=c||d?{}:mo(t),!u)return c?function(t,e){return Fi(t,go(t),e)}(t,function(t,e){return t&&Fi(e,Ls(e),t)}(s,t)):function(t,e){return Fi(t,ho(t),e)}(t,or(s,t))}else{if(!ce[p])return o?t:{};s=function(t,e,n){var r=t.constructor;switch(e){case I:return _i(t);case D:case w:return new r(+t);case N:return function(t,e){var n=e?_i(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case B:case R:case P:case M:case H:case q:case U:case z:case W:return Si(t,n);case _:return new r;case S:case F:return new r(t);case O:return function(t){var e=new t.constructor(t.source,gt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case T:return new r;case j:return i=t,Mn?Ct(Mn.call(i)):{}}var i}(t,p,u)}}a||(a=new Xn);var h=a.get(t);if(h)return h;a.set(t,s),ss(t)?t.forEach((function(r){s.add(cr(r,e,n,r,t,a))})):rs(t)&&t.forEach((function(r,i){s.set(i,cr(r,e,n,i,t,a))}));var g=f?i:(l?c?oo:io:c?Ls:js)(t);return Oe(g||t,(function(r,i){g&&(r=t[i=r]),nr(s,i,cr(r,e,n,i,t,a))})),s}function lr(t,e,n){var r=n.length;if(null==t)return!r;for(t=Ct(t);r--;){var o=n[r],a=e[o],s=t[o];if(s===i&&!(o in t)||!a(s))return!1}return!0}function fr(t,e,n){if("function"!=typeof t)throw new Tt(o);return jo((function(){t.apply(i,n)}),e)}function pr(t,e,n,r){var i=-1,o=Le,a=!0,s=t.length,u=[],c=e.length;if(!s)return u;n&&(e=Ne(e,Ze(n))),r?(o=Ie,a=!1):e.length>=200&&(o=en,a=!1,e=new Jn(e));t:for(;++i<s;){var l=t[i],f=null==n?l:n(l);if(l=r||0!==l?l:0,a&&f==f){for(var p=c;p--;)if(e[p]===f)continue t;u.push(l)}else o(e,f,r)||u.push(l)}return u}qn.templateSettings={escape:Q,evaluate:Z,interpolate:tt,variable:"",imports:{_:qn}},qn.prototype=zn.prototype,qn.prototype.constructor=qn,Wn.prototype=Un(zn.prototype),Wn.prototype.constructor=Wn,Gn.prototype=Un(zn.prototype),Gn.prototype.constructor=Gn,Yn.prototype.clear=function(){this.__data__=Tn?Tn(null):{},this.size=0},Yn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Yn.prototype.get=function(t){var e=this.__data__;if(Tn){var n=e[t];return n===a?i:n}return Bt.call(e,t)?e[t]:i},Yn.prototype.has=function(t){var e=this.__data__;return Tn?e[t]!==i:Bt.call(e,t)},Yn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Tn&&e===i?a:e,this},$n.prototype.clear=function(){this.__data__=[],this.size=0},$n.prototype.delete=function(t){var e=this.__data__,n=rr(e,t);return!(n<0)&&(n==e.length-1?e.pop():Xt.call(e,n,1),--this.size,!0)},$n.prototype.get=function(t){var e=this.__data__,n=rr(e,t);return n<0?i:e[n][1]},$n.prototype.has=function(t){return rr(this.__data__,t)>-1},$n.prototype.set=function(t,e){var n=this.__data__,r=rr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Vn.prototype.clear=function(){this.size=0,this.__data__={hash:new Yn,map:new(Sn||$n),string:new Yn}},Vn.prototype.delete=function(t){var e=lo(this,t).delete(t);return this.size-=e?1:0,e},Vn.prototype.get=function(t){return lo(this,t).get(t)},Vn.prototype.has=function(t){return lo(this,t).has(t)},Vn.prototype.set=function(t,e){var n=lo(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Jn.prototype.add=Jn.prototype.push=function(t){return this.__data__.set(t,a),this},Jn.prototype.has=function(t){return this.__data__.has(t)},Xn.prototype.clear=function(){this.__data__=new $n,this.size=0},Xn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Xn.prototype.get=function(t){return this.__data__.get(t)},Xn.prototype.has=function(t){return this.__data__.has(t)},Xn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof $n){var r=n.__data__;if(!Sn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Vn(r)}return n.set(t,e),this.size=n.size,this};var dr=Ii(wr),hr=Ii(xr,!0);function gr(t,e){var n=!0;return dr(t,(function(t,r,i){return n=!!e(t,r,i)})),n}function vr(t,e,n){for(var r=-1,o=t.length;++r<o;){var a=t[r],s=e(a);if(null!=s&&(u===i?s==s&&!cs(s):n(s,u)))var u=s,c=a}return c}function yr(t,e){var n=[];return dr(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}function mr(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=bo),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?mr(s,e-1,n,r,i):Be(i,s):r||(i[i.length]=s)}return i}var br=Ni(),Dr=Ni(!0);function wr(t,e){return t&&br(t,e,js)}function xr(t,e){return t&&Dr(t,e,js)}function Er(t,e){return je(e,(function(e){return Qa(t[e])}))}function Ar(t,e){for(var n=0,r=(e=Di(e,t)).length;null!=t&&n<r;)t=t[Po(e[n++])];return n&&n==r?t:i}function _r(t,e,n){var r=e(t);return Ga(t)?r:Be(r,n(t))}function Sr(t){return null==t?t===i?"[object Undefined]":"[object Null]":Zt&&Zt in Ct(t)?function(t){var e=Bt.call(t,Zt),n=t[Zt];try{t[Zt]=i;var r=!0}catch(t){}var o=Mt.call(t);r&&(e?t[Zt]=n:delete t[Zt]);return o}(t):function(t){return Mt.call(t)}(t)}function Cr(t,e){return t>e}function kr(t,e){return null!=t&&Bt.call(t,e)}function Or(t,e){return null!=t&&e in Ct(t)}function Tr(t,e,n){for(var o=n?Ie:Le,a=t[0].length,s=t.length,u=s,c=r(s),l=1/0,f=[];u--;){var p=t[u];u&&e&&(p=Ne(p,Ze(e))),l=Dn(p.length,l),c[u]=!n&&(e||a>=120&&p.length>=120)?new Jn(u&&p):i}p=t[0];var d=-1,h=c[0];t:for(;++d<a&&f.length<l;){var g=p[d],v=e?e(g):g;if(g=n||0!==g?g:0,!(h?en(h,v):o(f,v,n))){for(u=s;--u;){var y=c[u];if(!(y?en(y,v):o(t[u],v,n)))continue t}h&&h.push(v),f.push(g)}}return f}function Fr(t,e,n){var r=null==(t=Oo(t,e=Di(e,t)))?t:t[Po(Ko(e))];return null==r?i:Ce(r,t,n)}function jr(t){return ns(t)&&Sr(t)==m}function Lr(t,e,n,r,o){return t===e||(null==t||null==e||!ns(t)&&!ns(e)?t!=t&&e!=e:function(t,e,n,r,o,a){var s=Ga(t),u=Ga(e),c=s?b:vo(t),l=u?b:vo(e),f=(c=c==m?C:c)==C,p=(l=l==m?C:l)==C,d=c==l;if(d&&Ja(t)){if(!Ja(e))return!1;s=!0,f=!1}if(d&&!f)return a||(a=new Xn),s||ls(t)?no(t,e,n,r,o,a):function(t,e,n,r,i,o,a){switch(n){case N:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case I:return!(t.byteLength!=e.byteLength||!o(new Gt(t),new Gt(e)));case D:case w:case S:return qa(+t,+e);case x:return t.name==e.name&&t.message==e.message;case O:case F:return t==e+"";case _:var s=cn;case T:var u=1&r;if(s||(s=pn),t.size!=e.size&&!u)return!1;var c=a.get(t);if(c)return c==e;r|=2,a.set(t,e);var l=no(s(t),s(e),r,i,o,a);return a.delete(t),l;case j:if(Mn)return Mn.call(t)==Mn.call(e)}return!1}(t,e,c,n,r,o,a);if(!(1&n)){var h=f&&Bt.call(t,"__wrapped__"),g=p&&Bt.call(e,"__wrapped__");if(h||g){var v=h?t.value():t,y=g?e.value():e;return a||(a=new Xn),o(v,y,n,r,a)}}if(!d)return!1;return a||(a=new Xn),function(t,e,n,r,o,a){var s=1&n,u=io(t),c=u.length,l=io(e),f=l.length;if(c!=f&&!s)return!1;var p=c;for(;p--;){var d=u[p];if(!(s?d in e:Bt.call(e,d)))return!1}var h=a.get(t),g=a.get(e);if(h&&g)return h==e&&g==t;var v=!0;a.set(t,e),a.set(e,t);var y=s;for(;++p<c;){var m=t[d=u[p]],b=e[d];if(r)var D=s?r(b,m,d,e,t,a):r(m,b,d,t,e,a);if(!(D===i?m===b||o(m,b,n,r,a):D)){v=!1;break}y||(y="constructor"==d)}if(v&&!y){var w=t.constructor,x=e.constructor;w==x||!("constructor"in t)||!("constructor"in e)||"function"==typeof w&&w instanceof w&&"function"==typeof x&&x instanceof x||(v=!1)}return a.delete(t),a.delete(e),v}(t,e,n,r,o,a)}(t,e,n,r,Lr,o))}function Ir(t,e,n,r){var o=n.length,a=o,s=!r;if(null==t)return!a;for(t=Ct(t);o--;){var u=n[o];if(s&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<a;){var c=(u=n[o])[0],l=t[c],f=u[1];if(s&&u[2]){if(l===i&&!(c in t))return!1}else{var p=new Xn;if(r)var d=r(l,f,c,t,e,p);if(!(d===i?Lr(f,l,3,r,p):d))return!1}}return!0}function Nr(t){return!(!es(t)||(e=t,Pt&&Pt in e))&&(Qa(t)?Ut:mt).test(Mo(t));var e}function Br(t){return"function"==typeof t?t:null==t?iu:"object"==typeof t?Ga(t)?Ur(t[0],t[1]):qr(t):du(t)}function Rr(t){if(!_o(t))return Ve(t);var e=[];for(var n in Ct(t))Bt.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Pr(t){if(!es(t))return function(t){var e=[];if(null!=t)for(var n in Ct(t))e.push(n);return e}(t);var e=_o(t),n=[];for(var r in t)("constructor"!=r||!e&&Bt.call(t,r))&&n.push(r);return n}function Mr(t,e){return t<e}function Hr(t,e){var n=-1,i=$a(t)?r(t.length):[];return dr(t,(function(t,r,o){i[++n]=e(t,r,o)})),i}function qr(t){var e=fo(t);return 1==e.length&&e[0][2]?Co(e[0][0],e[0][1]):function(n){return n===t||Ir(n,t,e)}}function Ur(t,e){return xo(t)&&So(e)?Co(Po(t),e):function(n){var r=Cs(n,t);return r===i&&r===e?ks(n,t):Lr(e,r,3)}}function zr(t,e,n,r,o){t!==e&&br(e,(function(a,s){if(o||(o=new Xn),es(a))!function(t,e,n,r,o,a,s){var u=To(t,n),c=To(e,n),l=s.get(c);if(l)return void er(t,n,l);var f=a?a(u,c,n+"",t,e,s):i,p=f===i;if(p){var d=Ga(c),h=!d&&Ja(c),g=!d&&!h&&ls(c);f=c,d||h||g?Ga(u)?f=u:Va(u)?f=Ti(u):h?(p=!1,f=Ai(c,!0)):g?(p=!1,f=Si(c,!0)):f=[]:os(c)||Wa(c)?(f=u,Wa(u)?f=ms(u):es(u)&&!Qa(u)||(f=mo(c))):p=!1}p&&(s.set(c,f),o(f,c,r,a,s),s.delete(c));er(t,n,f)}(t,e,s,n,zr,r,o);else{var u=r?r(To(t,s),a,s+"",t,e,o):i;u===i&&(u=a),er(t,s,u)}}),Ls)}function Wr(t,e){var n=t.length;if(n)return Do(e+=e<0?n:0,n)?t[e]:i}function Gr(t,e,n){e=e.length?Ne(e,(function(t){return Ga(t)?function(e){return Ar(e,1===t.length?t[0]:t)}:t})):[iu];var r=-1;e=Ne(e,Ze(co()));var i=Hr(t,(function(t,n,i){var o=Ne(e,(function(e){return e(t)}));return{criteria:o,index:++r,value:t}}));return function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(i,(function(t,e){return function(t,e,n){var r=-1,i=t.criteria,o=e.criteria,a=i.length,s=n.length;for(;++r<a;){var u=Ci(i[r],o[r]);if(u)return r>=s?u:u*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}))}function Yr(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var a=e[r],s=Ar(t,a);n(s,a)&&ti(o,Di(a,t),s)}return o}function $r(t,e,n,r){var i=r?We:ze,o=-1,a=e.length,s=t;for(t===e&&(e=Ti(e)),n&&(s=Ne(t,Ze(n)));++o<a;)for(var u=0,c=e[o],l=n?n(c):c;(u=i(s,l,u,r))>-1;)s!==t&&Xt.call(s,u,1),Xt.call(t,u,1);return t}function Vr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;Do(i)?Xt.call(t,i,1):pi(t,i)}}return t}function Jr(t,e){return t+ve(En()*(e-t+1))}function Xr(t,e){var n="";if(!t||e<1||e>h)return n;do{e%2&&(n+=t),(e=ve(e/2))&&(t+=t)}while(e);return n}function Kr(t,e){return Lo(ko(t,e,iu),t+"")}function Qr(t){return Qn(qs(t))}function Zr(t,e){var n=qs(t);return Bo(n,ur(e,0,n.length))}function ti(t,e,n,r){if(!es(t))return t;for(var o=-1,a=(e=Di(e,t)).length,s=a-1,u=t;null!=u&&++o<a;){var c=Po(e[o]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(o!=s){var f=u[c];(l=r?r(f,c,u):i)===i&&(l=es(f)?f:Do(e[o+1])?[]:{})}nr(u,c,l),u=u[c]}return t}var ei=Fn?function(t,e){return Fn.set(t,e),t}:iu,ni=ne?function(t,e){return ne(t,"toString",{configurable:!0,enumerable:!1,value:eu(e),writable:!0})}:iu;function ri(t){return Bo(qs(t))}function ii(t,e,n){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var a=r(o);++i<o;)a[i]=t[i+e];return a}function oi(t,e){var n;return dr(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function ai(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=t[o];null!==a&&!cs(a)&&(n?a<=e:a<e)?r=o+1:i=o}return i}return si(t,e,iu,n)}function si(t,e,n,r){var o=0,a=null==t?0:t.length;if(0===a)return 0;for(var s=(e=n(e))!=e,u=null===e,c=cs(e),l=e===i;o<a;){var f=ve((o+a)/2),p=n(t[f]),d=p!==i,h=null===p,g=p==p,v=cs(p);if(s)var y=r||g;else y=l?g&&(r||d):u?g&&d&&(r||!h):c?g&&d&&!h&&(r||!v):!h&&!v&&(r?p<=e:p<e);y?o=f+1:a=f}return Dn(a,4294967294)}function ui(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n],s=e?e(a):a;if(!n||!qa(s,u)){var u=s;o[i++]=0===a?0:a}}return o}function ci(t){return"number"==typeof t?t:cs(t)?g:+t}function li(t){if("string"==typeof t)return t;if(Ga(t))return Ne(t,li)+"";if(cs(t))return Hn?Hn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function fi(t,e,n){var r=-1,i=Le,o=t.length,a=!0,s=[],u=s;if(n)a=!1,i=Ie;else if(o>=200){var c=e?null:Xi(t);if(c)return pn(c);a=!1,i=en,u=new Jn}else u=e?[]:s;t:for(;++r<o;){var l=t[r],f=e?e(l):l;if(l=n||0!==l?l:0,a&&f==f){for(var p=u.length;p--;)if(u[p]===f)continue t;e&&u.push(f),s.push(l)}else i(u,f,n)||(u!==s&&u.push(f),s.push(l))}return s}function pi(t,e){return null==(t=Oo(t,e=Di(e,t)))||delete t[Po(Ko(e))]}function di(t,e,n,r){return ti(t,e,n(Ar(t,e)),r)}function hi(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?ii(t,r?0:o,r?o+1:i):ii(t,r?o+1:0,r?i:o)}function gi(t,e){var n=t;return n instanceof Gn&&(n=n.value()),Re(e,(function(t,e){return e.func.apply(e.thisArg,Be([t],e.args))}),n)}function vi(t,e,n){var i=t.length;if(i<2)return i?fi(t[0]):[];for(var o=-1,a=r(i);++o<i;)for(var s=t[o],u=-1;++u<i;)u!=o&&(a[o]=pr(a[o]||s,t[u],e,n));return fi(mr(a,1),e,n)}function yi(t,e,n){for(var r=-1,o=t.length,a=e.length,s={};++r<o;){var u=r<a?e[r]:i;n(s,t[r],u)}return s}function mi(t){return Va(t)?t:[]}function bi(t){return"function"==typeof t?t:iu}function Di(t,e){return Ga(t)?t:xo(t,e)?[t]:Ro(bs(t))}var wi=Kr;function xi(t,e,n){var r=t.length;return n=n===i?r:n,!e&&n>=r?t:ii(t,e,n)}var Ei=ie||function(t){return ge.clearTimeout(t)};function Ai(t,e){if(e)return t.slice();var n=t.length,r=Yt?Yt(n):new t.constructor(n);return t.copy(r),r}function _i(t){var e=new t.constructor(t.byteLength);return new Gt(e).set(new Gt(t)),e}function Si(t,e){var n=e?_i(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Ci(t,e){if(t!==e){var n=t!==i,r=null===t,o=t==t,a=cs(t),s=e!==i,u=null===e,c=e==e,l=cs(e);if(!u&&!l&&!a&&t>e||a&&s&&c&&!u&&!l||r&&s&&c||!n&&c||!o)return 1;if(!r&&!a&&!l&&t<e||l&&n&&o&&!r&&!a||u&&n&&o||!s&&o||!c)return-1}return 0}function ki(t,e,n,i){for(var o=-1,a=t.length,s=n.length,u=-1,c=e.length,l=bn(a-s,0),f=r(c+l),p=!i;++u<c;)f[u]=e[u];for(;++o<s;)(p||o<a)&&(f[n[o]]=t[o]);for(;l--;)f[u++]=t[o++];return f}function Oi(t,e,n,i){for(var o=-1,a=t.length,s=-1,u=n.length,c=-1,l=e.length,f=bn(a-u,0),p=r(f+l),d=!i;++o<f;)p[o]=t[o];for(var h=o;++c<l;)p[h+c]=e[c];for(;++s<u;)(d||o<a)&&(p[h+n[s]]=t[o++]);return p}function Ti(t,e){var n=-1,i=t.length;for(e||(e=r(i));++n<i;)e[n]=t[n];return e}function Fi(t,e,n,r){var o=!n;n||(n={});for(var a=-1,s=e.length;++a<s;){var u=e[a],c=r?r(n[u],t[u],u,n,t):i;c===i&&(c=t[u]),o?ar(n,u,c):nr(n,u,c)}return n}function ji(t,e){return function(n,r){var i=Ga(n)?ke:ir,o=e?e():{};return i(n,t,co(r,2),o)}}function Li(t){return Kr((function(e,n){var r=-1,o=n.length,a=o>1?n[o-1]:i,s=o>2?n[2]:i;for(a=t.length>3&&"function"==typeof a?(o--,a):i,s&&wo(n[0],n[1],s)&&(a=o<3?i:a,o=1),e=Ct(e);++r<o;){var u=n[r];u&&t(e,u,r,a)}return e}))}function Ii(t,e){return function(n,r){if(null==n)return n;if(!$a(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=Ct(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Ni(t){return function(e,n,r){for(var i=-1,o=Ct(e),a=r(e),s=a.length;s--;){var u=a[t?s:++i];if(!1===n(o[u],u,o))break}return e}}function Bi(t){return function(e){var n=un(e=bs(e))?gn(e):i,r=n?n[0]:e.charAt(0),o=n?xi(n,1).join(""):e.slice(1);return r[t]()+o}}function Ri(t){return function(e){return Re(Qs(Ws(e).replace(te,"")),t,"")}}function Pi(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Un(t.prototype),r=t.apply(n,e);return es(r)?r:n}}function Mi(t){return function(e,n,r){var o=Ct(e);if(!$a(e)){var a=co(n,3);e=js(e),n=function(t){return a(o[t],t,o)}}var s=t(e,n,r);return s>-1?o[a?e[s]:s]:i}}function Hi(t){return ro((function(e){var n=e.length,r=n,a=Wn.prototype.thru;for(t&&e.reverse();r--;){var s=e[r];if("function"!=typeof s)throw new Tt(o);if(a&&!u&&"wrapper"==so(s))var u=new Wn([],!0)}for(r=u?r:n;++r<n;){var c=so(s=e[r]),l="wrapper"==c?ao(s):i;u=l&&Eo(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[so(l[0])].apply(u,l[3]):1==s.length&&Eo(s)?u[c]():u.thru(s)}return function(){var t=arguments,r=t[0];if(u&&1==t.length&&Ga(r))return u.plant(r).value();for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}}))}function qi(t,e,n,o,a,s,u,c,l,p){var d=e&f,h=1&e,g=2&e,v=24&e,y=512&e,m=g?i:Pi(t);return function f(){for(var b=arguments.length,D=r(b),w=b;w--;)D[w]=arguments[w];if(v)var x=uo(f),E=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(D,x);if(o&&(D=ki(D,o,a,v)),s&&(D=Oi(D,s,u,v)),b-=E,v&&b<p){var A=fn(D,x);return Vi(t,e,qi,f.placeholder,n,D,A,c,l,p-b)}var _=h?n:this,S=g?_[t]:t;return b=D.length,c?D=function(t,e){var n=t.length,r=Dn(e.length,n),o=Ti(t);for(;r--;){var a=e[r];t[r]=Do(a,n)?o[a]:i}return t}(D,c):y&&b>1&&D.reverse(),d&&l<b&&(D.length=l),this&&this!==ge&&this instanceof f&&(S=m||Pi(S)),S.apply(_,D)}}function Ui(t,e){return function(n,r){return function(t,e,n,r){return wr(t,(function(t,i,o){e(r,n(t),i,o)})),r}(n,t,e(r),{})}}function zi(t,e){return function(n,r){var o;if(n===i&&r===i)return e;if(n!==i&&(o=n),r!==i){if(o===i)return r;"string"==typeof n||"string"==typeof r?(n=li(n),r=li(r)):(n=ci(n),r=ci(r)),o=t(n,r)}return o}}function Wi(t){return ro((function(e){return e=Ne(e,Ze(co())),Kr((function(n){var r=this;return t(e,(function(t){return Ce(t,r,n)}))}))}))}function Gi(t,e){var n=(e=e===i?" ":li(e)).length;if(n<2)return n?Xr(e,t):e;var r=Xr(e,he(t/hn(e)));return un(e)?xi(gn(r),0,t).join(""):r.slice(0,t)}function Yi(t){return function(e,n,o){return o&&"number"!=typeof o&&wo(e,n,o)&&(n=o=i),e=hs(e),n===i?(n=e,e=0):n=hs(n),function(t,e,n,i){for(var o=-1,a=bn(he((e-t)/(n||1)),0),s=r(a);a--;)s[i?a:++o]=t,t+=n;return s}(e,n,o=o===i?e<n?1:-1:hs(o),t)}}function $i(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=ys(e),n=ys(n)),t(e,n)}}function Vi(t,e,n,r,o,a,s,u,f,p){var d=8&e;e|=d?c:l,4&(e&=~(d?l:c))||(e&=-4);var h=[t,e,o,d?a:i,d?s:i,d?i:a,d?i:s,u,f,p],g=n.apply(i,h);return Eo(t)&&Fo(g,h),g.placeholder=r,Io(g,t,e)}function Ji(t){var e=St[t];return function(t,n){if(t=ys(t),(n=null==n?0:Dn(gs(n),292))&&De(t)){var r=(bs(t)+"e").split("e");return+((r=(bs(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Xi=kn&&1/pn(new kn([,-0]))[1]==d?function(t){return new kn(t)}:cu;function Ki(t){return function(e){var n=vo(e);return n==_?cn(e):n==T?dn(e):function(t,e){return Ne(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Qi(t,e,n,a,d,h,g,v){var y=2&e;if(!y&&"function"!=typeof t)throw new Tt(o);var m=a?a.length:0;if(m||(e&=-97,a=d=i),g=g===i?g:bn(gs(g),0),v=v===i?v:gs(v),m-=d?d.length:0,e&l){var b=a,D=d;a=d=i}var w=y?i:ao(t),x=[t,e,n,a,d,b,D,h,g,v];if(w&&function(t,e){var n=t[1],r=e[1],i=n|r,o=i<131,a=r==f&&8==n||r==f&&n==p&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!o&&!a)return t;1&r&&(t[2]=e[2],i|=1&n?0:4);var u=e[3];if(u){var c=t[3];t[3]=c?ki(c,u,e[4]):u,t[4]=c?fn(t[3],s):e[4]}(u=e[5])&&(c=t[5],t[5]=c?Oi(c,u,e[6]):u,t[6]=c?fn(t[5],s):e[6]);(u=e[7])&&(t[7]=u);r&f&&(t[8]=null==t[8]?e[8]:Dn(t[8],e[8]));null==t[9]&&(t[9]=e[9]);t[0]=e[0],t[1]=i}(x,w),t=x[0],e=x[1],n=x[2],a=x[3],d=x[4],!(v=x[9]=x[9]===i?y?0:t.length:bn(x[9]-m,0))&&24&e&&(e&=-25),e&&1!=e)E=8==e||e==u?function(t,e,n){var o=Pi(t);return function a(){for(var s=arguments.length,u=r(s),c=s,l=uo(a);c--;)u[c]=arguments[c];var f=s<3&&u[0]!==l&&u[s-1]!==l?[]:fn(u,l);return(s-=f.length)<n?Vi(t,e,qi,a.placeholder,i,u,f,i,i,n-s):Ce(this&&this!==ge&&this instanceof a?o:t,this,u)}}(t,e,v):e!=c&&33!=e||d.length?qi.apply(i,x):function(t,e,n,i){var o=1&e,a=Pi(t);return function e(){for(var s=-1,u=arguments.length,c=-1,l=i.length,f=r(l+u),p=this&&this!==ge&&this instanceof e?a:t;++c<l;)f[c]=i[c];for(;u--;)f[c++]=arguments[++s];return Ce(p,o?n:this,f)}}(t,e,n,a);else var E=function(t,e,n){var r=1&e,i=Pi(t);return function e(){return(this&&this!==ge&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,n);return Io((w?ei:Fo)(E,x),t,e)}function Zi(t,e,n,r){return t===i||qa(t,Lt[n])&&!Bt.call(r,n)?e:t}function to(t,e,n,r,o,a){return es(t)&&es(e)&&(a.set(e,t),zr(t,e,i,to,a),a.delete(e)),t}function eo(t){return os(t)?i:t}function no(t,e,n,r,o,a){var s=1&n,u=t.length,c=e.length;if(u!=c&&!(s&&c>u))return!1;var l=a.get(t),f=a.get(e);if(l&&f)return l==e&&f==t;var p=-1,d=!0,h=2&n?new Jn:i;for(a.set(t,e),a.set(e,t);++p<u;){var g=t[p],v=e[p];if(r)var y=s?r(v,g,p,e,t,a):r(g,v,p,t,e,a);if(y!==i){if(y)continue;d=!1;break}if(h){if(!Me(e,(function(t,e){if(!en(h,e)&&(g===t||o(g,t,n,r,a)))return h.push(e)}))){d=!1;break}}else if(g!==v&&!o(g,v,n,r,a)){d=!1;break}}return a.delete(t),a.delete(e),d}function ro(t){return Lo(ko(t,i,Yo),t+"")}function io(t){return _r(t,js,ho)}function oo(t){return _r(t,Ls,go)}var ao=Fn?function(t){return Fn.get(t)}:cu;function so(t){for(var e=t.name+"",n=jn[e],r=Bt.call(jn,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function uo(t){return(Bt.call(qn,"placeholder")?qn:t).placeholder}function co(){var t=qn.iteratee||ou;return t=t===ou?Br:t,arguments.length?t(arguments[0],arguments[1]):t}function lo(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function fo(t){for(var e=js(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,So(i)]}return e}function po(t,e){var n=function(t,e){return null==t?i:t[e]}(t,e);return Nr(n)?n:i}var ho=ye?function(t){return null==t?[]:(t=Ct(t),je(ye(t),(function(e){return Jt.call(t,e)})))}:vu,go=ye?function(t){for(var e=[];t;)Be(e,ho(t)),t=$t(t);return e}:vu,vo=Sr;function yo(t,e,n){for(var r=-1,i=(e=Di(e,t)).length,o=!1;++r<i;){var a=Po(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&ts(i)&&Do(a,i)&&(Ga(t)||Wa(t))}function mo(t){return"function"!=typeof t.constructor||_o(t)?{}:Un($t(t))}function bo(t){return Ga(t)||Wa(t)||!!(Kt&&t&&t[Kt])}function Do(t,e){var n=typeof t;return!!(e=null==e?h:e)&&("number"==n||"symbol"!=n&&Dt.test(t))&&t>-1&&t%1==0&&t<e}function wo(t,e,n){if(!es(n))return!1;var r=typeof e;return!!("number"==r?$a(n)&&Do(e,n.length):"string"==r&&e in n)&&qa(n[e],t)}function xo(t,e){if(Ga(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!cs(t))||(nt.test(t)||!et.test(t)||null!=e&&t in Ct(e))}function Eo(t){var e=so(t),n=qn[e];if("function"!=typeof n||!(e in Gn.prototype))return!1;if(t===n)return!0;var r=ao(n);return!!r&&t===r[0]}(_n&&vo(new _n(new ArrayBuffer(1)))!=N||Sn&&vo(new Sn)!=_||Cn&&vo(Cn.resolve())!=k||kn&&vo(new kn)!=T||On&&vo(new On)!=L)&&(vo=function(t){var e=Sr(t),n=e==C?t.constructor:i,r=n?Mo(n):"";if(r)switch(r){case Ln:return N;case In:return _;case Nn:return k;case Bn:return T;case Rn:return L}return e});var Ao=It?Qa:yu;function _o(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Lt)}function So(t){return t==t&&!es(t)}function Co(t,e){return function(n){return null!=n&&(n[t]===e&&(e!==i||t in Ct(n)))}}function ko(t,e,n){return e=bn(e===i?t.length-1:e,0),function(){for(var i=arguments,o=-1,a=bn(i.length-e,0),s=r(a);++o<a;)s[o]=i[e+o];o=-1;for(var u=r(e+1);++o<e;)u[o]=i[o];return u[e]=n(s),Ce(t,this,u)}}function Oo(t,e){return e.length<2?t:Ar(t,ii(e,0,-1))}function To(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Fo=No(ei),jo=de||function(t,e){return ge.setTimeout(t,e)},Lo=No(ni);function Io(t,e,n){var r=e+"";return Lo(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(ut,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return Oe(y,(function(n){var r="_."+n[0];e&n[1]&&!Le(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(ct);return e?e[1].split(lt):[]}(r),n)))}function No(t){var e=0,n=0;return function(){var r=wn(),o=16-(r-n);if(n=r,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(i,arguments)}}function Bo(t,e){var n=-1,r=t.length,o=r-1;for(e=e===i?r:e;++n<e;){var a=Jr(n,o),s=t[a];t[a]=t[n],t[n]=s}return t.length=e,t}var Ro=function(t){var e=Na(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(rt,(function(t,n,r,i){e.push(r?i.replace(dt,"$1"):n||t)})),e}));function Po(t){if("string"==typeof t||cs(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Mo(t){if(null!=t){try{return Nt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Ho(t){if(t instanceof Gn)return t.clone();var e=new Wn(t.__wrapped__,t.__chain__);return e.__actions__=Ti(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var qo=Kr((function(t,e){return Va(t)?pr(t,mr(e,1,Va,!0)):[]})),Uo=Kr((function(t,e){var n=Ko(e);return Va(n)&&(n=i),Va(t)?pr(t,mr(e,1,Va,!0),co(n,2)):[]})),zo=Kr((function(t,e){var n=Ko(e);return Va(n)&&(n=i),Va(t)?pr(t,mr(e,1,Va,!0),i,n):[]}));function Wo(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:gs(n);return i<0&&(i=bn(r+i,0)),Ue(t,co(e,3),i)}function Go(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=r-1;return n!==i&&(o=gs(n),o=n<0?bn(r+o,0):Dn(o,r-1)),Ue(t,co(e,3),o,!0)}function Yo(t){return(null==t?0:t.length)?mr(t,1):[]}function $o(t){return t&&t.length?t[0]:i}var Vo=Kr((function(t){var e=Ne(t,mi);return e.length&&e[0]===t[0]?Tr(e):[]})),Jo=Kr((function(t){var e=Ko(t),n=Ne(t,mi);return e===Ko(n)?e=i:n.pop(),n.length&&n[0]===t[0]?Tr(n,co(e,2)):[]})),Xo=Kr((function(t){var e=Ko(t),n=Ne(t,mi);return(e="function"==typeof e?e:i)&&n.pop(),n.length&&n[0]===t[0]?Tr(n,i,e):[]}));function Ko(t){var e=null==t?0:t.length;return e?t[e-1]:i}var Qo=Kr(Zo);function Zo(t,e){return t&&t.length&&e&&e.length?$r(t,e):t}var ta=ro((function(t,e){var n=null==t?0:t.length,r=sr(t,e);return Vr(t,Ne(e,(function(t){return Do(t,n)?+t:t})).sort(Ci)),r}));function ea(t){return null==t?t:An.call(t)}var na=Kr((function(t){return fi(mr(t,1,Va,!0))})),ra=Kr((function(t){var e=Ko(t);return Va(e)&&(e=i),fi(mr(t,1,Va,!0),co(e,2))})),ia=Kr((function(t){var e=Ko(t);return e="function"==typeof e?e:i,fi(mr(t,1,Va,!0),i,e)}));function oa(t){if(!t||!t.length)return[];var e=0;return t=je(t,(function(t){if(Va(t))return e=bn(t.length,e),!0})),Ke(e,(function(e){return Ne(t,$e(e))}))}function aa(t,e){if(!t||!t.length)return[];var n=oa(t);return null==e?n:Ne(n,(function(t){return Ce(e,i,t)}))}var sa=Kr((function(t,e){return Va(t)?pr(t,e):[]})),ua=Kr((function(t){return vi(je(t,Va))})),ca=Kr((function(t){var e=Ko(t);return Va(e)&&(e=i),vi(je(t,Va),co(e,2))})),la=Kr((function(t){var e=Ko(t);return e="function"==typeof e?e:i,vi(je(t,Va),i,e)})),fa=Kr(oa);var pa=Kr((function(t){var e=t.length,n=e>1?t[e-1]:i;return n="function"==typeof n?(t.pop(),n):i,aa(t,n)}));function da(t){var e=qn(t);return e.__chain__=!0,e}function ha(t,e){return e(t)}var ga=ro((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,o=function(e){return sr(e,t)};return!(e>1||this.__actions__.length)&&r instanceof Gn&&Do(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:ha,args:[o],thisArg:i}),new Wn(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(i),t}))):this.thru(o)}));var va=ji((function(t,e,n){Bt.call(t,n)?++t[n]:ar(t,n,1)}));var ya=Mi(Wo),ma=Mi(Go);function ba(t,e){return(Ga(t)?Oe:dr)(t,co(e,3))}function Da(t,e){return(Ga(t)?Te:hr)(t,co(e,3))}var wa=ji((function(t,e,n){Bt.call(t,n)?t[n].push(e):ar(t,n,[e])}));var xa=Kr((function(t,e,n){var i=-1,o="function"==typeof e,a=$a(t)?r(t.length):[];return dr(t,(function(t){a[++i]=o?Ce(e,t,n):Fr(t,e,n)})),a})),Ea=ji((function(t,e,n){ar(t,n,e)}));function Aa(t,e){return(Ga(t)?Ne:Hr)(t,co(e,3))}var _a=ji((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]}));var Sa=Kr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&wo(t,e[0],e[1])?e=[]:n>2&&wo(e[0],e[1],e[2])&&(e=[e[0]]),Gr(t,mr(e,1),[])})),Ca=le||function(){return ge.Date.now()};function ka(t,e,n){return e=n?i:e,e=t&&null==e?t.length:e,Qi(t,f,i,i,i,i,e)}function Oa(t,e){var n;if("function"!=typeof e)throw new Tt(o);return t=gs(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=i),n}}var Ta=Kr((function(t,e,n){var r=1;if(n.length){var i=fn(n,uo(Ta));r|=c}return Qi(t,r,e,n,i)})),Fa=Kr((function(t,e,n){var r=3;if(n.length){var i=fn(n,uo(Fa));r|=c}return Qi(e,r,t,n,i)}));function ja(t,e,n){var r,a,s,u,c,l,f=0,p=!1,d=!1,h=!0;if("function"!=typeof t)throw new Tt(o);function g(e){var n=r,o=a;return r=a=i,f=e,u=t.apply(o,n)}function v(t){var n=t-l;return l===i||n>=e||n<0||d&&t-f>=s}function y(){var t=Ca();if(v(t))return m(t);c=jo(y,function(t){var n=e-(t-l);return d?Dn(n,s-(t-f)):n}(t))}function m(t){return c=i,h&&r?g(t):(r=a=i,u)}function b(){var t=Ca(),n=v(t);if(r=arguments,a=this,l=t,n){if(c===i)return function(t){return f=t,c=jo(y,e),p?g(t):u}(l);if(d)return Ei(c),c=jo(y,e),g(l)}return c===i&&(c=jo(y,e)),u}return e=ys(e)||0,es(n)&&(p=!!n.leading,s=(d="maxWait"in n)?bn(ys(n.maxWait)||0,e):s,h="trailing"in n?!!n.trailing:h),b.cancel=function(){c!==i&&Ei(c),f=0,r=l=a=c=i},b.flush=function(){return c===i?u:m(Ca())},b}var La=Kr((function(t,e){return fr(t,1,e)})),Ia=Kr((function(t,e,n){return fr(t,ys(e)||0,n)}));function Na(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new Tt(o);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Na.Cache||Vn),n}function Ba(t){if("function"!=typeof t)throw new Tt(o);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Na.Cache=Vn;var Ra=wi((function(t,e){var n=(e=1==e.length&&Ga(e[0])?Ne(e[0],Ze(co())):Ne(mr(e,1),Ze(co()))).length;return Kr((function(r){for(var i=-1,o=Dn(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return Ce(t,this,r)}))})),Pa=Kr((function(t,e){var n=fn(e,uo(Pa));return Qi(t,c,i,e,n)})),Ma=Kr((function(t,e){var n=fn(e,uo(Ma));return Qi(t,l,i,e,n)})),Ha=ro((function(t,e){return Qi(t,p,i,i,i,e)}));function qa(t,e){return t===e||t!=t&&e!=e}var Ua=$i(Cr),za=$i((function(t,e){return t>=e})),Wa=jr(function(){return arguments}())?jr:function(t){return ns(t)&&Bt.call(t,"callee")&&!Jt.call(t,"callee")},Ga=r.isArray,Ya=we?Ze(we):function(t){return ns(t)&&Sr(t)==I};function $a(t){return null!=t&&ts(t.length)&&!Qa(t)}function Va(t){return ns(t)&&$a(t)}var Ja=be||yu,Xa=xe?Ze(xe):function(t){return ns(t)&&Sr(t)==w};function Ka(t){if(!ns(t))return!1;var e=Sr(t);return e==x||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!os(t)}function Qa(t){if(!es(t))return!1;var e=Sr(t);return e==E||e==A||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Za(t){return"number"==typeof t&&t==gs(t)}function ts(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=h}function es(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function ns(t){return null!=t&&"object"==typeof t}var rs=Ee?Ze(Ee):function(t){return ns(t)&&vo(t)==_};function is(t){return"number"==typeof t||ns(t)&&Sr(t)==S}function os(t){if(!ns(t)||Sr(t)!=C)return!1;var e=$t(t);if(null===e)return!0;var n=Bt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Nt.call(n)==Ht}var as=Ae?Ze(Ae):function(t){return ns(t)&&Sr(t)==O};var ss=_e?Ze(_e):function(t){return ns(t)&&vo(t)==T};function us(t){return"string"==typeof t||!Ga(t)&&ns(t)&&Sr(t)==F}function cs(t){return"symbol"==typeof t||ns(t)&&Sr(t)==j}var ls=Se?Ze(Se):function(t){return ns(t)&&ts(t.length)&&!!ue[Sr(t)]};var fs=$i(Mr),ps=$i((function(t,e){return t<=e}));function ds(t){if(!t)return[];if($a(t))return us(t)?gn(t):Ti(t);if(Qt&&t[Qt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Qt]());var e=vo(t);return(e==_?cn:e==T?pn:qs)(t)}function hs(t){return t?(t=ys(t))===d||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function gs(t){var e=hs(t),n=e%1;return e==e?n?e-n:e:0}function vs(t){return t?ur(gs(t),0,v):0}function ys(t){if("number"==typeof t)return t;if(cs(t))return g;if(es(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=es(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Qe(t);var n=yt.test(t);return n||bt.test(t)?pe(t.slice(2),n?2:8):vt.test(t)?g:+t}function ms(t){return Fi(t,Ls(t))}function bs(t){return null==t?"":li(t)}var Ds=Li((function(t,e){if(_o(e)||$a(e))Fi(e,js(e),t);else for(var n in e)Bt.call(e,n)&&nr(t,n,e[n])})),ws=Li((function(t,e){Fi(e,Ls(e),t)})),xs=Li((function(t,e,n,r){Fi(e,Ls(e),t,r)})),Es=Li((function(t,e,n,r){Fi(e,js(e),t,r)})),As=ro(sr);var _s=Kr((function(t,e){t=Ct(t);var n=-1,r=e.length,o=r>2?e[2]:i;for(o&&wo(e[0],e[1],o)&&(r=1);++n<r;)for(var a=e[n],s=Ls(a),u=-1,c=s.length;++u<c;){var l=s[u],f=t[l];(f===i||qa(f,Lt[l])&&!Bt.call(t,l))&&(t[l]=a[l])}return t})),Ss=Kr((function(t){return t.push(i,to),Ce(Ns,i,t)}));function Cs(t,e,n){var r=null==t?i:Ar(t,e);return r===i?n:r}function ks(t,e){return null!=t&&yo(t,e,Or)}var Os=Ui((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Mt.call(e)),t[e]=n}),eu(iu)),Ts=Ui((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Mt.call(e)),Bt.call(t,e)?t[e].push(n):t[e]=[n]}),co),Fs=Kr(Fr);function js(t){return $a(t)?Kn(t):Rr(t)}function Ls(t){return $a(t)?Kn(t,!0):Pr(t)}var Is=Li((function(t,e,n){zr(t,e,n)})),Ns=Li((function(t,e,n,r){zr(t,e,n,r)})),Bs=ro((function(t,e){var n={};if(null==t)return n;var r=!1;e=Ne(e,(function(e){return e=Di(e,t),r||(r=e.length>1),e})),Fi(t,oo(t),n),r&&(n=cr(n,7,eo));for(var i=e.length;i--;)pi(n,e[i]);return n}));var Rs=ro((function(t,e){return null==t?{}:function(t,e){return Yr(t,e,(function(e,n){return ks(t,n)}))}(t,e)}));function Ps(t,e){if(null==t)return{};var n=Ne(oo(t),(function(t){return[t]}));return e=co(e),Yr(t,n,(function(t,n){return e(t,n[0])}))}var Ms=Ki(js),Hs=Ki(Ls);function qs(t){return null==t?[]:tn(t,js(t))}var Us=Ri((function(t,e,n){return e=e.toLowerCase(),t+(n?zs(e):e)}));function zs(t){return Ks(bs(t).toLowerCase())}function Ws(t){return(t=bs(t))&&t.replace(wt,on).replace(ee,"")}var Gs=Ri((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Ys=Ri((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),$s=Bi("toLowerCase");var Vs=Ri((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}));var Js=Ri((function(t,e,n){return t+(n?" ":"")+Ks(e)}));var Xs=Ri((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Ks=Bi("toUpperCase");function Qs(t,e,n){return t=bs(t),(e=n?i:e)===i?function(t){return oe.test(t)}(t)?function(t){return t.match(re)||[]}(t):function(t){return t.match(ft)||[]}(t):t.match(e)||[]}var Zs=Kr((function(t,e){try{return Ce(t,i,e)}catch(t){return Ka(t)?t:new At(t)}})),tu=ro((function(t,e){return Oe(e,(function(e){e=Po(e),ar(t,e,Ta(t[e],t))})),t}));function eu(t){return function(){return t}}var nu=Hi(),ru=Hi(!0);function iu(t){return t}function ou(t){return Br("function"==typeof t?t:cr(t,1))}var au=Kr((function(t,e){return function(n){return Fr(n,t,e)}})),su=Kr((function(t,e){return function(n){return Fr(t,n,e)}}));function uu(t,e,n){var r=js(e),i=Er(e,r);null!=n||es(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=Er(e,js(e)));var o=!(es(n)&&"chain"in n&&!n.chain),a=Qa(t);return Oe(i,(function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__);return(n.__actions__=Ti(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,Be([this.value()],arguments))})})),t}function cu(){}var lu=Wi(Ne),fu=Wi(Fe),pu=Wi(Me);function du(t){return xo(t)?$e(Po(t)):function(t){return function(e){return Ar(e,t)}}(t)}var hu=Yi(),gu=Yi(!0);function vu(){return[]}function yu(){return!1}var mu=zi((function(t,e){return t+e}),0),bu=Ji("ceil"),Du=zi((function(t,e){return t/e}),1),wu=Ji("floor");var xu,Eu=zi((function(t,e){return t*e}),1),Au=Ji("round"),_u=zi((function(t,e){return t-e}),0);return qn.after=function(t,e){if("function"!=typeof e)throw new Tt(o);return t=gs(t),function(){if(--t<1)return e.apply(this,arguments)}},qn.ary=ka,qn.assign=Ds,qn.assignIn=ws,qn.assignInWith=xs,qn.assignWith=Es,qn.at=As,qn.before=Oa,qn.bind=Ta,qn.bindAll=tu,qn.bindKey=Fa,qn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Ga(t)?t:[t]},qn.chain=da,qn.chunk=function(t,e,n){e=(n?wo(t,e,n):e===i)?1:bn(gs(e),0);var o=null==t?0:t.length;if(!o||e<1)return[];for(var a=0,s=0,u=r(he(o/e));a<o;)u[s++]=ii(t,a,a+=e);return u},qn.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i},qn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],i=t;i--;)e[i-1]=arguments[i];return Be(Ga(n)?Ti(n):[n],mr(e,1))},qn.cond=function(t){var e=null==t?0:t.length,n=co();return t=e?Ne(t,(function(t){if("function"!=typeof t[1])throw new Tt(o);return[n(t[0]),t[1]]})):[],Kr((function(n){for(var r=-1;++r<e;){var i=t[r];if(Ce(i[0],this,n))return Ce(i[1],this,n)}}))},qn.conforms=function(t){return function(t){var e=js(t);return function(n){return lr(n,t,e)}}(cr(t,1))},qn.constant=eu,qn.countBy=va,qn.create=function(t,e){var n=Un(t);return null==e?n:or(n,e)},qn.curry=function t(e,n,r){var o=Qi(e,8,i,i,i,i,i,n=r?i:n);return o.placeholder=t.placeholder,o},qn.curryRight=function t(e,n,r){var o=Qi(e,u,i,i,i,i,i,n=r?i:n);return o.placeholder=t.placeholder,o},qn.debounce=ja,qn.defaults=_s,qn.defaultsDeep=Ss,qn.defer=La,qn.delay=Ia,qn.difference=qo,qn.differenceBy=Uo,qn.differenceWith=zo,qn.drop=function(t,e,n){var r=null==t?0:t.length;return r?ii(t,(e=n||e===i?1:gs(e))<0?0:e,r):[]},qn.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?ii(t,0,(e=r-(e=n||e===i?1:gs(e)))<0?0:e):[]},qn.dropRightWhile=function(t,e){return t&&t.length?hi(t,co(e,3),!0,!0):[]},qn.dropWhile=function(t,e){return t&&t.length?hi(t,co(e,3),!0):[]},qn.fill=function(t,e,n,r){var o=null==t?0:t.length;return o?(n&&"number"!=typeof n&&wo(t,e,n)&&(n=0,r=o),function(t,e,n,r){var o=t.length;for((n=gs(n))<0&&(n=-n>o?0:o+n),(r=r===i||r>o?o:gs(r))<0&&(r+=o),r=n>r?0:vs(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},qn.filter=function(t,e){return(Ga(t)?je:yr)(t,co(e,3))},qn.flatMap=function(t,e){return mr(Aa(t,e),1)},qn.flatMapDeep=function(t,e){return mr(Aa(t,e),d)},qn.flatMapDepth=function(t,e,n){return n=n===i?1:gs(n),mr(Aa(t,e),n)},qn.flatten=Yo,qn.flattenDeep=function(t){return(null==t?0:t.length)?mr(t,d):[]},qn.flattenDepth=function(t,e){return(null==t?0:t.length)?mr(t,e=e===i?1:gs(e)):[]},qn.flip=function(t){return Qi(t,512)},qn.flow=nu,qn.flowRight=ru,qn.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},qn.functions=function(t){return null==t?[]:Er(t,js(t))},qn.functionsIn=function(t){return null==t?[]:Er(t,Ls(t))},qn.groupBy=wa,qn.initial=function(t){return(null==t?0:t.length)?ii(t,0,-1):[]},qn.intersection=Vo,qn.intersectionBy=Jo,qn.intersectionWith=Xo,qn.invert=Os,qn.invertBy=Ts,qn.invokeMap=xa,qn.iteratee=ou,qn.keyBy=Ea,qn.keys=js,qn.keysIn=Ls,qn.map=Aa,qn.mapKeys=function(t,e){var n={};return e=co(e,3),wr(t,(function(t,r,i){ar(n,e(t,r,i),t)})),n},qn.mapValues=function(t,e){var n={};return e=co(e,3),wr(t,(function(t,r,i){ar(n,r,e(t,r,i))})),n},qn.matches=function(t){return qr(cr(t,1))},qn.matchesProperty=function(t,e){return Ur(t,cr(e,1))},qn.memoize=Na,qn.merge=Is,qn.mergeWith=Ns,qn.method=au,qn.methodOf=su,qn.mixin=uu,qn.negate=Ba,qn.nthArg=function(t){return t=gs(t),Kr((function(e){return Wr(e,t)}))},qn.omit=Bs,qn.omitBy=function(t,e){return Ps(t,Ba(co(e)))},qn.once=function(t){return Oa(2,t)},qn.orderBy=function(t,e,n,r){return null==t?[]:(Ga(e)||(e=null==e?[]:[e]),Ga(n=r?i:n)||(n=null==n?[]:[n]),Gr(t,e,n))},qn.over=lu,qn.overArgs=Ra,qn.overEvery=fu,qn.overSome=pu,qn.partial=Pa,qn.partialRight=Ma,qn.partition=_a,qn.pick=Rs,qn.pickBy=Ps,qn.property=du,qn.propertyOf=function(t){return function(e){return null==t?i:Ar(t,e)}},qn.pull=Qo,qn.pullAll=Zo,qn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?$r(t,e,co(n,2)):t},qn.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?$r(t,e,i,n):t},qn.pullAt=ta,qn.range=hu,qn.rangeRight=gu,qn.rearg=Ha,qn.reject=function(t,e){return(Ga(t)?je:yr)(t,Ba(co(e,3)))},qn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=co(e,3);++r<o;){var a=t[r];e(a,r,t)&&(n.push(a),i.push(r))}return Vr(t,i),n},qn.rest=function(t,e){if("function"!=typeof t)throw new Tt(o);return Kr(t,e=e===i?e:gs(e))},qn.reverse=ea,qn.sampleSize=function(t,e,n){return e=(n?wo(t,e,n):e===i)?1:gs(e),(Ga(t)?Zn:Zr)(t,e)},qn.set=function(t,e,n){return null==t?t:ti(t,e,n)},qn.setWith=function(t,e,n,r){return r="function"==typeof r?r:i,null==t?t:ti(t,e,n,r)},qn.shuffle=function(t){return(Ga(t)?tr:ri)(t)},qn.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&wo(t,e,n)?(e=0,n=r):(e=null==e?0:gs(e),n=n===i?r:gs(n)),ii(t,e,n)):[]},qn.sortBy=Sa,qn.sortedUniq=function(t){return t&&t.length?ui(t):[]},qn.sortedUniqBy=function(t,e){return t&&t.length?ui(t,co(e,2)):[]},qn.split=function(t,e,n){return n&&"number"!=typeof n&&wo(t,e,n)&&(e=n=i),(n=n===i?v:n>>>0)?(t=bs(t))&&("string"==typeof e||null!=e&&!as(e))&&!(e=li(e))&&un(t)?xi(gn(t),0,n):t.split(e,n):[]},qn.spread=function(t,e){if("function"!=typeof t)throw new Tt(o);return e=null==e?0:bn(gs(e),0),Kr((function(n){var r=n[e],i=xi(n,0,e);return r&&Be(i,r),Ce(t,this,i)}))},qn.tail=function(t){var e=null==t?0:t.length;return e?ii(t,1,e):[]},qn.take=function(t,e,n){return t&&t.length?ii(t,0,(e=n||e===i?1:gs(e))<0?0:e):[]},qn.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?ii(t,(e=r-(e=n||e===i?1:gs(e)))<0?0:e,r):[]},qn.takeRightWhile=function(t,e){return t&&t.length?hi(t,co(e,3),!1,!0):[]},qn.takeWhile=function(t,e){return t&&t.length?hi(t,co(e,3)):[]},qn.tap=function(t,e){return e(t),t},qn.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new Tt(o);return es(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),ja(t,e,{leading:r,maxWait:e,trailing:i})},qn.thru=ha,qn.toArray=ds,qn.toPairs=Ms,qn.toPairsIn=Hs,qn.toPath=function(t){return Ga(t)?Ne(t,Po):cs(t)?[t]:Ti(Ro(bs(t)))},qn.toPlainObject=ms,qn.transform=function(t,e,n){var r=Ga(t),i=r||Ja(t)||ls(t);if(e=co(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:es(t)&&Qa(o)?Un($t(t)):{}}return(i?Oe:wr)(t,(function(t,r,i){return e(n,t,r,i)})),n},qn.unary=function(t){return ka(t,1)},qn.union=na,qn.unionBy=ra,qn.unionWith=ia,qn.uniq=function(t){return t&&t.length?fi(t):[]},qn.uniqBy=function(t,e){return t&&t.length?fi(t,co(e,2)):[]},qn.uniqWith=function(t,e){return e="function"==typeof e?e:i,t&&t.length?fi(t,i,e):[]},qn.unset=function(t,e){return null==t||pi(t,e)},qn.unzip=oa,qn.unzipWith=aa,qn.update=function(t,e,n){return null==t?t:di(t,e,bi(n))},qn.updateWith=function(t,e,n,r){return r="function"==typeof r?r:i,null==t?t:di(t,e,bi(n),r)},qn.values=qs,qn.valuesIn=function(t){return null==t?[]:tn(t,Ls(t))},qn.without=sa,qn.words=Qs,qn.wrap=function(t,e){return Pa(bi(e),t)},qn.xor=ua,qn.xorBy=ca,qn.xorWith=la,qn.zip=fa,qn.zipObject=function(t,e){return yi(t||[],e||[],nr)},qn.zipObjectDeep=function(t,e){return yi(t||[],e||[],ti)},qn.zipWith=pa,qn.entries=Ms,qn.entriesIn=Hs,qn.extend=ws,qn.extendWith=xs,uu(qn,qn),qn.add=mu,qn.attempt=Zs,qn.camelCase=Us,qn.capitalize=zs,qn.ceil=bu,qn.clamp=function(t,e,n){return n===i&&(n=e,e=i),n!==i&&(n=(n=ys(n))==n?n:0),e!==i&&(e=(e=ys(e))==e?e:0),ur(ys(t),e,n)},qn.clone=function(t){return cr(t,4)},qn.cloneDeep=function(t){return cr(t,5)},qn.cloneDeepWith=function(t,e){return cr(t,5,e="function"==typeof e?e:i)},qn.cloneWith=function(t,e){return cr(t,4,e="function"==typeof e?e:i)},qn.conformsTo=function(t,e){return null==e||lr(t,e,js(e))},qn.deburr=Ws,qn.defaultTo=function(t,e){return null==t||t!=t?e:t},qn.divide=Du,qn.endsWith=function(t,e,n){t=bs(t),e=li(e);var r=t.length,o=n=n===i?r:ur(gs(n),0,r);return(n-=e.length)>=0&&t.slice(n,o)==e},qn.eq=qa,qn.escape=function(t){return(t=bs(t))&&K.test(t)?t.replace(J,an):t},qn.escapeRegExp=function(t){return(t=bs(t))&&ot.test(t)?t.replace(it,"\\$&"):t},qn.every=function(t,e,n){var r=Ga(t)?Fe:gr;return n&&wo(t,e,n)&&(e=i),r(t,co(e,3))},qn.find=ya,qn.findIndex=Wo,qn.findKey=function(t,e){return qe(t,co(e,3),wr)},qn.findLast=ma,qn.findLastIndex=Go,qn.findLastKey=function(t,e){return qe(t,co(e,3),xr)},qn.floor=wu,qn.forEach=ba,qn.forEachRight=Da,qn.forIn=function(t,e){return null==t?t:br(t,co(e,3),Ls)},qn.forInRight=function(t,e){return null==t?t:Dr(t,co(e,3),Ls)},qn.forOwn=function(t,e){return t&&wr(t,co(e,3))},qn.forOwnRight=function(t,e){return t&&xr(t,co(e,3))},qn.get=Cs,qn.gt=Ua,qn.gte=za,qn.has=function(t,e){return null!=t&&yo(t,e,kr)},qn.hasIn=ks,qn.head=$o,qn.identity=iu,qn.includes=function(t,e,n,r){t=$a(t)?t:qs(t),n=n&&!r?gs(n):0;var i=t.length;return n<0&&(n=bn(i+n,0)),us(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&ze(t,e,n)>-1},qn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:gs(n);return i<0&&(i=bn(r+i,0)),ze(t,e,i)},qn.inRange=function(t,e,n){return e=hs(e),n===i?(n=e,e=0):n=hs(n),function(t,e,n){return t>=Dn(e,n)&&t<bn(e,n)}(t=ys(t),e,n)},qn.invoke=Fs,qn.isArguments=Wa,qn.isArray=Ga,qn.isArrayBuffer=Ya,qn.isArrayLike=$a,qn.isArrayLikeObject=Va,qn.isBoolean=function(t){return!0===t||!1===t||ns(t)&&Sr(t)==D},qn.isBuffer=Ja,qn.isDate=Xa,qn.isElement=function(t){return ns(t)&&1===t.nodeType&&!os(t)},qn.isEmpty=function(t){if(null==t)return!0;if($a(t)&&(Ga(t)||"string"==typeof t||"function"==typeof t.splice||Ja(t)||ls(t)||Wa(t)))return!t.length;var e=vo(t);if(e==_||e==T)return!t.size;if(_o(t))return!Rr(t).length;for(var n in t)if(Bt.call(t,n))return!1;return!0},qn.isEqual=function(t,e){return Lr(t,e)},qn.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:i)?n(t,e):i;return r===i?Lr(t,e,i,n):!!r},qn.isError=Ka,qn.isFinite=function(t){return"number"==typeof t&&De(t)},qn.isFunction=Qa,qn.isInteger=Za,qn.isLength=ts,qn.isMap=rs,qn.isMatch=function(t,e){return t===e||Ir(t,e,fo(e))},qn.isMatchWith=function(t,e,n){return n="function"==typeof n?n:i,Ir(t,e,fo(e),n)},qn.isNaN=function(t){return is(t)&&t!=+t},qn.isNative=function(t){if(Ao(t))throw new At("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Nr(t)},qn.isNil=function(t){return null==t},qn.isNull=function(t){return null===t},qn.isNumber=is,qn.isObject=es,qn.isObjectLike=ns,qn.isPlainObject=os,qn.isRegExp=as,qn.isSafeInteger=function(t){return Za(t)&&t>=-9007199254740991&&t<=h},qn.isSet=ss,qn.isString=us,qn.isSymbol=cs,qn.isTypedArray=ls,qn.isUndefined=function(t){return t===i},qn.isWeakMap=function(t){return ns(t)&&vo(t)==L},qn.isWeakSet=function(t){return ns(t)&&"[object WeakSet]"==Sr(t)},qn.join=function(t,e){return null==t?"":He.call(t,e)},qn.kebabCase=Gs,qn.last=Ko,qn.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=gs(n))<0?bn(r+o,0):Dn(o,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,o):Ue(t,Ge,o,!0)},qn.lowerCase=Ys,qn.lowerFirst=$s,qn.lt=fs,qn.lte=ps,qn.max=function(t){return t&&t.length?vr(t,iu,Cr):i},qn.maxBy=function(t,e){return t&&t.length?vr(t,co(e,2),Cr):i},qn.mean=function(t){return Ye(t,iu)},qn.meanBy=function(t,e){return Ye(t,co(e,2))},qn.min=function(t){return t&&t.length?vr(t,iu,Mr):i},qn.minBy=function(t,e){return t&&t.length?vr(t,co(e,2),Mr):i},qn.stubArray=vu,qn.stubFalse=yu,qn.stubObject=function(){return{}},qn.stubString=function(){return""},qn.stubTrue=function(){return!0},qn.multiply=Eu,qn.nth=function(t,e){return t&&t.length?Wr(t,gs(e)):i},qn.noConflict=function(){return ge._===this&&(ge._=qt),this},qn.noop=cu,qn.now=Ca,qn.pad=function(t,e,n){t=bs(t);var r=(e=gs(e))?hn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return Gi(ve(i),n)+t+Gi(he(i),n)},qn.padEnd=function(t,e,n){t=bs(t);var r=(e=gs(e))?hn(t):0;return e&&r<e?t+Gi(e-r,n):t},qn.padStart=function(t,e,n){t=bs(t);var r=(e=gs(e))?hn(t):0;return e&&r<e?Gi(e-r,n)+t:t},qn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),xn(bs(t).replace(at,""),e||0)},qn.random=function(t,e,n){if(n&&"boolean"!=typeof n&&wo(t,e,n)&&(e=n=i),n===i&&("boolean"==typeof e?(n=e,e=i):"boolean"==typeof t&&(n=t,t=i)),t===i&&e===i?(t=0,e=1):(t=hs(t),e===i?(e=t,t=0):e=hs(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var o=En();return Dn(t+o*(e-t+fe("1e-"+((o+"").length-1))),e)}return Jr(t,e)},qn.reduce=function(t,e,n){var r=Ga(t)?Re:Je,i=arguments.length<3;return r(t,co(e,4),n,i,dr)},qn.reduceRight=function(t,e,n){var r=Ga(t)?Pe:Je,i=arguments.length<3;return r(t,co(e,4),n,i,hr)},qn.repeat=function(t,e,n){return e=(n?wo(t,e,n):e===i)?1:gs(e),Xr(bs(t),e)},qn.replace=function(){var t=arguments,e=bs(t[0]);return t.length<3?e:e.replace(t[1],t[2])},qn.result=function(t,e,n){var r=-1,o=(e=Di(e,t)).length;for(o||(o=1,t=i);++r<o;){var a=null==t?i:t[Po(e[r])];a===i&&(r=o,a=n),t=Qa(a)?a.call(t):a}return t},qn.round=Au,qn.runInContext=t,qn.sample=function(t){return(Ga(t)?Qn:Qr)(t)},qn.size=function(t){if(null==t)return 0;if($a(t))return us(t)?hn(t):t.length;var e=vo(t);return e==_||e==T?t.size:Rr(t).length},qn.snakeCase=Vs,qn.some=function(t,e,n){var r=Ga(t)?Me:oi;return n&&wo(t,e,n)&&(e=i),r(t,co(e,3))},qn.sortedIndex=function(t,e){return ai(t,e)},qn.sortedIndexBy=function(t,e,n){return si(t,e,co(n,2))},qn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=ai(t,e);if(r<n&&qa(t[r],e))return r}return-1},qn.sortedLastIndex=function(t,e){return ai(t,e,!0)},qn.sortedLastIndexBy=function(t,e,n){return si(t,e,co(n,2),!0)},qn.sortedLastIndexOf=function(t,e){if(null==t?0:t.length){var n=ai(t,e,!0)-1;if(qa(t[n],e))return n}return-1},qn.startCase=Js,qn.startsWith=function(t,e,n){return t=bs(t),n=null==n?0:ur(gs(n),0,t.length),e=li(e),t.slice(n,n+e.length)==e},qn.subtract=_u,qn.sum=function(t){return t&&t.length?Xe(t,iu):0},qn.sumBy=function(t,e){return t&&t.length?Xe(t,co(e,2)):0},qn.template=function(t,e,n){var r=qn.templateSettings;n&&wo(t,e,n)&&(e=i),t=bs(t),e=xs({},e,r,Zi);var o,a,s=xs({},e.imports,r.imports,Zi),u=js(s),c=tn(s,u),l=0,f=e.interpolate||xt,p="__p += '",d=kt((e.escape||xt).source+"|"+f.source+"|"+(f===tt?ht:xt).source+"|"+(e.evaluate||xt).source+"|$","g"),h="//# sourceURL="+(Bt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++se+"]")+"\n";t.replace(d,(function(e,n,r,i,s,u){return r||(r=i),p+=t.slice(l,u).replace(Et,sn),n&&(o=!0,p+="' +\n__e("+n+") +\n'"),s&&(a=!0,p+="';\n"+s+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+e.length,e})),p+="';\n";var g=Bt.call(e,"variable")&&e.variable;if(g){if(pt.test(g))throw new At("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(a?p.replace(G,""):p).replace(Y,"$1").replace($,"$1;"),p="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var v=Zs((function(){return _t(u,h+"return "+p).apply(i,c)}));if(v.source=p,Ka(v))throw v;return v},qn.times=function(t,e){if((t=gs(t))<1||t>h)return[];var n=v,r=Dn(t,v);e=co(e),t-=v;for(var i=Ke(r,e);++n<t;)e(n);return i},qn.toFinite=hs,qn.toInteger=gs,qn.toLength=vs,qn.toLower=function(t){return bs(t).toLowerCase()},qn.toNumber=ys,qn.toSafeInteger=function(t){return t?ur(gs(t),-9007199254740991,h):0===t?t:0},qn.toString=bs,qn.toUpper=function(t){return bs(t).toUpperCase()},qn.trim=function(t,e,n){if((t=bs(t))&&(n||e===i))return Qe(t);if(!t||!(e=li(e)))return t;var r=gn(t),o=gn(e);return xi(r,nn(r,o),rn(r,o)+1).join("")},qn.trimEnd=function(t,e,n){if((t=bs(t))&&(n||e===i))return t.slice(0,vn(t)+1);if(!t||!(e=li(e)))return t;var r=gn(t);return xi(r,0,rn(r,gn(e))+1).join("")},qn.trimStart=function(t,e,n){if((t=bs(t))&&(n||e===i))return t.replace(at,"");if(!t||!(e=li(e)))return t;var r=gn(t);return xi(r,nn(r,gn(e))).join("")},qn.truncate=function(t,e){var n=30,r="...";if(es(e)){var o="separator"in e?e.separator:o;n="length"in e?gs(e.length):n,r="omission"in e?li(e.omission):r}var a=(t=bs(t)).length;if(un(t)){var s=gn(t);a=s.length}if(n>=a)return t;var u=n-hn(r);if(u<1)return r;var c=s?xi(s,0,u).join(""):t.slice(0,u);if(o===i)return c+r;if(s&&(u+=c.length-u),as(o)){if(t.slice(u).search(o)){var l,f=c;for(o.global||(o=kt(o.source,bs(gt.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var p=l.index;c=c.slice(0,p===i?u:p)}}else if(t.indexOf(li(o),u)!=u){var d=c.lastIndexOf(o);d>-1&&(c=c.slice(0,d))}return c+r},qn.unescape=function(t){return(t=bs(t))&&X.test(t)?t.replace(V,yn):t},qn.uniqueId=function(t){var e=++Rt;return bs(t)+e},qn.upperCase=Xs,qn.upperFirst=Ks,qn.each=ba,qn.eachRight=Da,qn.first=$o,uu(qn,(xu={},wr(qn,(function(t,e){Bt.call(qn.prototype,e)||(xu[e]=t)})),xu),{chain:!1}),qn.VERSION="4.17.21",Oe(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){qn[t].placeholder=qn})),Oe(["drop","take"],(function(t,e){Gn.prototype[t]=function(n){n=n===i?1:bn(gs(n),0);var r=this.__filtered__&&!e?new Gn(this):this.clone();return r.__filtered__?r.__takeCount__=Dn(n,r.__takeCount__):r.__views__.push({size:Dn(n,v),type:t+(r.__dir__<0?"Right":"")}),r},Gn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),Oe(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Gn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:co(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),Oe(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Gn.prototype[t]=function(){return this[n](1).value()[0]}})),Oe(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Gn.prototype[t]=function(){return this.__filtered__?new Gn(this):this[n](1)}})),Gn.prototype.compact=function(){return this.filter(iu)},Gn.prototype.find=function(t){return this.filter(t).head()},Gn.prototype.findLast=function(t){return this.reverse().find(t)},Gn.prototype.invokeMap=Kr((function(t,e){return"function"==typeof t?new Gn(this):this.map((function(n){return Fr(n,t,e)}))})),Gn.prototype.reject=function(t){return this.filter(Ba(co(t)))},Gn.prototype.slice=function(t,e){t=gs(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Gn(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==i&&(n=(e=gs(e))<0?n.dropRight(-e):n.take(e-t)),n)},Gn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Gn.prototype.toArray=function(){return this.take(v)},wr(Gn.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),o=qn[r?"take"+("last"==e?"Right":""):e],a=r||/^find/.test(e);o&&(qn.prototype[e]=function(){var e=this.__wrapped__,s=r?[1]:arguments,u=e instanceof Gn,c=s[0],l=u||Ga(e),f=function(t){var e=o.apply(qn,Be([t],s));return r&&p?e[0]:e};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var p=this.__chain__,d=!!this.__actions__.length,h=a&&!p,g=u&&!d;if(!a&&l){e=g?e:new Gn(this);var v=t.apply(e,s);return v.__actions__.push({func:ha,args:[f],thisArg:i}),new Wn(v,p)}return h&&g?t.apply(this,s):(v=this.thru(f),h?r?v.value()[0]:v.value():v)})})),Oe(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Ft[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);qn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(Ga(i)?i:[],t)}return this[n]((function(n){return e.apply(Ga(n)?n:[],t)}))}})),wr(Gn.prototype,(function(t,e){var n=qn[e];if(n){var r=n.name+"";Bt.call(jn,r)||(jn[r]=[]),jn[r].push({name:e,func:n})}})),jn[qi(i,2).name]=[{name:"wrapper",func:i}],Gn.prototype.clone=function(){var t=new Gn(this.__wrapped__);return t.__actions__=Ti(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Ti(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Ti(this.__views__),t},Gn.prototype.reverse=function(){if(this.__filtered__){var t=new Gn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Gn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Ga(t),r=e<0,i=n?t.length:0,o=function(t,e,n){var r=-1,i=n.length;for(;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=Dn(e,t+a);break;case"takeRight":t=bn(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,s=o.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,f=l.length,p=0,d=Dn(u,this.__takeCount__);if(!n||!r&&i==u&&d==u)return gi(t,this.__actions__);var h=[];t:for(;u--&&p<d;){for(var g=-1,v=t[c+=e];++g<f;){var y=l[g],m=y.iteratee,b=y.type,D=m(v);if(2==b)v=D;else if(!D){if(1==b)continue t;break t}}h[p++]=v}return h},qn.prototype.at=ga,qn.prototype.chain=function(){return da(this)},qn.prototype.commit=function(){return new Wn(this.value(),this.__chain__)},qn.prototype.next=function(){this.__values__===i&&(this.__values__=ds(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?i:this.__values__[this.__index__++]}},qn.prototype.plant=function(t){for(var e,n=this;n instanceof zn;){var r=Ho(n);r.__index__=0,r.__values__=i,e?o.__wrapped__=r:e=r;var o=r;n=n.__wrapped__}return o.__wrapped__=t,e},qn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Gn){var e=t;return this.__actions__.length&&(e=new Gn(this)),(e=e.reverse()).__actions__.push({func:ha,args:[ea],thisArg:i}),new Wn(e,this.__chain__)}return this.thru(ea)},qn.prototype.toJSON=qn.prototype.valueOf=qn.prototype.value=function(){return gi(this.__wrapped__,this.__actions__)},qn.prototype.first=qn.prototype.head,Qt&&(qn.prototype[Qt]=function(){return this}),qn}();ge._=mn,(r=function(){return mn}.call(e,n,e,t))===i||(t.exports=r)}.call(this)},938:(t,e)=>{"use strict";var n=Object.prototype.hasOwnProperty;function r(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(t){return null}}function i(t){try{return encodeURIComponent(t)}catch(t){return null}}e.stringify=function(t,e){e=e||"";var r,o,a=[];for(o in"string"!=typeof e&&(e="?"),t)if(n.call(t,o)){if((r=t[o])||null!=r&&!isNaN(r)||(r=""),o=i(o),r=i(r),null===o||null===r)continue;a.push(o+"="+r)}return a.length?e+a.join("&"):""},e.parse=function(t){for(var e,n=/([^=?#&]+)=?([^&]*)/g,i={};e=n.exec(t);){var o=r(e[1]),a=r(e[2]);null===o||null===a||o in i||(i[o]=a)}return i}},588:t=>{var e=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof y?e:y,a=Object.create(o.prototype),s=new T(r||[]);return i(a,"_invoke",{value:S(t,n,s)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var p="suspendedStart",d="suspendedYield",h="executing",g="completed",v={};function y(){}function m(){}function b(){}var D={};c(D,a,(function(){return this}));var w=Object.getPrototypeOf,x=w&&w(w(F([])));x&&x!==n&&r.call(x,a)&&(D=x);var E=b.prototype=y.prototype=Object.create(D);function A(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function n(i,o,a,s){var u=f(t[i],t,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(l).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function S(t,e,n){var r=p;return function(i,o){if(r===h)throw new Error("Generator is already running");if(r===g){if("throw"===i)throw o;return j()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=C(a,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===p)throw r=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var u=f(t,e,n);if("normal"===u.type){if(r=n.done?g:d,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=g,n.method="throw",n.arg=u.arg)}}}function C(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function F(t){if(t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}return{next:j}}function j(){return{value:e,done:!0}}return m.prototype=b,i(E,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:m,configurable:!0}),m.displayName=c(b,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,c(t,u,"GeneratorFunction")),t.prototype=Object.create(E),t},t.awrap=function(t){return{__await:t}},A(_.prototype),c(_.prototype,s,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new _(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},A(E),c(E,u,"Generator"),c(E,a,(function(){return this})),c(E,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=F,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;O(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:F(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},461:t=>{"use strict";t.exports=function(t,e){if(e=e.split(":")[0],!(t=+t))return!1;switch(e){case"http":case"ws":return 80!==t;case"https":case"wss":return 443!==t;case"ftp":return 21!==t;case"gopher":return 70!==t;case"file":return!1}return 0!==t}},283:(t,e,n)=>{"use strict";var r=n(158),i=n(271);t.exports=r.bind(null,i)},158:t=>{"use strict";function e(t){return t>=55296&&t<=56319}function n(t){return t>=56320&&t<=57343}t.exports=function(t,r,i){if("string"!=typeof r)throw new Error("Input must be string");for(var o,a,s=r.length,u=0,c=0;c<s;c+=1){if(o=r.charCodeAt(c),a=r[c],e(o)&&n(r.charCodeAt(c+1))&&(a+=r[c+=1]),(u+=t(a))===i)return r.slice(0,c+1);if(u>i)return r.slice(0,c-a.length+1)}return r}},137:(t,e,n)=>{"use strict";var r=n(461),i=n(938),o=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,a=/[\n\r\t]/g,s=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,u=/:\d+$/,c=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,l=/^[a-zA-Z]:/;function f(t){return(t||"").toString().replace(o,"")}var p=[["#","hash"],["?","query"],function(t,e){return g(e.protocol)?t.replace(/\\/g,"/"):t},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],d={hash:1,query:1};function h(t){var e,r=("undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}).location||{},i={},o=typeof(t=t||r);if("blob:"===t.protocol)i=new y(unescape(t.pathname),{});else if("string"===o)for(e in i=new y(t,{}),d)delete i[e];else if("object"===o){for(e in t)e in d||(i[e]=t[e]);void 0===i.slashes&&(i.slashes=s.test(t.href))}return i}function g(t){return"file:"===t||"ftp:"===t||"http:"===t||"https:"===t||"ws:"===t||"wss:"===t}function v(t,e){t=(t=f(t)).replace(a,""),e=e||{};var n,r=c.exec(t),i=r[1]?r[1].toLowerCase():"",o=!!r[2],s=!!r[3],u=0;return o?s?(n=r[2]+r[3]+r[4],u=r[2].length+r[3].length):(n=r[2]+r[4],u=r[2].length):s?(n=r[3]+r[4],u=r[3].length):n=r[4],"file:"===i?u>=2&&(n=n.slice(2)):g(i)?n=r[4]:i?o&&(n=n.slice(2)):u>=2&&g(e.protocol)&&(n=r[4]),{protocol:i,slashes:o||g(i),slashesCount:u,rest:n}}function y(t,e,n){if(t=(t=f(t)).replace(a,""),!(this instanceof y))return new y(t,e,n);var o,s,u,c,d,m,b=p.slice(),D=typeof e,w=this,x=0;for("object"!==D&&"string"!==D&&(n=e,e=null),n&&"function"!=typeof n&&(n=i.parse),o=!(s=v(t||"",e=h(e))).protocol&&!s.slashes,w.slashes=s.slashes||o&&e.slashes,w.protocol=s.protocol||e.protocol||"",t=s.rest,("file:"===s.protocol&&(2!==s.slashesCount||l.test(t))||!s.slashes&&(s.protocol||s.slashesCount<2||!g(w.protocol)))&&(b[3]=[/(.*)/,"pathname"]);x<b.length;x++)"function"!=typeof(c=b[x])?(u=c[0],m=c[1],u!=u?w[m]=t:"string"==typeof u?~(d="@"===u?t.lastIndexOf(u):t.indexOf(u))&&("number"==typeof c[2]?(w[m]=t.slice(0,d),t=t.slice(d+c[2])):(w[m]=t.slice(d),t=t.slice(0,d))):(d=u.exec(t))&&(w[m]=d[1],t=t.slice(0,d.index)),w[m]=w[m]||o&&c[3]&&e[m]||"",c[4]&&(w[m]=w[m].toLowerCase())):t=c(t,w);n&&(w.query=n(w.query)),o&&e.slashes&&"/"!==w.pathname.charAt(0)&&(""!==w.pathname||""!==e.pathname)&&(w.pathname=function(t,e){if(""===t)return e;for(var n=(e||"/").split("/").slice(0,-1).concat(t.split("/")),r=n.length,i=n[r-1],o=!1,a=0;r--;)"."===n[r]?n.splice(r,1):".."===n[r]?(n.splice(r,1),a++):a&&(0===r&&(o=!0),n.splice(r,1),a--);return o&&n.unshift(""),"."!==i&&".."!==i||n.push(""),n.join("/")}(w.pathname,e.pathname)),"/"!==w.pathname.charAt(0)&&g(w.protocol)&&(w.pathname="/"+w.pathname),r(w.port,w.protocol)||(w.host=w.hostname,w.port=""),w.username=w.password="",w.auth&&(~(d=w.auth.indexOf(":"))?(w.username=w.auth.slice(0,d),w.username=encodeURIComponent(decodeURIComponent(w.username)),w.password=w.auth.slice(d+1),w.password=encodeURIComponent(decodeURIComponent(w.password))):w.username=encodeURIComponent(decodeURIComponent(w.auth)),w.auth=w.password?w.username+":"+w.password:w.username),w.origin="file:"!==w.protocol&&g(w.protocol)&&w.host?w.protocol+"//"+w.host:"null",w.href=w.toString()}y.prototype={set:function(t,e,n){var o=this;switch(t){case"query":"string"==typeof e&&e.length&&(e=(n||i.parse)(e)),o[t]=e;break;case"port":o[t]=e,r(e,o.protocol)?e&&(o.host=o.hostname+":"+e):(o.host=o.hostname,o[t]="");break;case"hostname":o[t]=e,o.port&&(e+=":"+o.port),o.host=e;break;case"host":o[t]=e,u.test(e)?(e=e.split(":"),o.port=e.pop(),o.hostname=e.join(":")):(o.hostname=e,o.port="");break;case"protocol":o.protocol=e.toLowerCase(),o.slashes=!n;break;case"pathname":case"hash":if(e){var a="pathname"===t?"/":"#";o[t]=e.charAt(0)!==a?a+e:e}else o[t]=e;break;case"username":case"password":o[t]=encodeURIComponent(e);break;case"auth":var s=e.indexOf(":");~s?(o.username=e.slice(0,s),o.username=encodeURIComponent(decodeURIComponent(o.username)),o.password=e.slice(s+1),o.password=encodeURIComponent(decodeURIComponent(o.password))):o.username=encodeURIComponent(decodeURIComponent(e))}for(var c=0;c<p.length;c++){var l=p[c];l[4]&&(o[l[1]]=o[l[1]].toLowerCase())}return o.auth=o.password?o.username+":"+o.password:o.username,o.origin="file:"!==o.protocol&&g(o.protocol)&&o.host?o.protocol+"//"+o.host:"null",o.href=o.toString(),o},toString:function(t){t&&"function"==typeof t||(t=i.stringify);var e,n=this,r=n.host,o=n.protocol;o&&":"!==o.charAt(o.length-1)&&(o+=":");var a=o+(n.protocol&&n.slashes||g(n.protocol)?"//":"");return n.username?(a+=n.username,n.password&&(a+=":"+n.password),a+="@"):n.password?(a+=":"+n.password,a+="@"):"file:"!==n.protocol&&g(n.protocol)&&!r&&"/"!==n.pathname&&(a+="@"),(":"===r[r.length-1]||u.test(n.hostname)&&!n.port)&&(r+=":"),a+=r+n.pathname,(e="object"==typeof n.query?t(n.query):n.query)&&(a+="?"!==e.charAt(0)?"?"+e:e),n.hash&&(a+=n.hash),a}},y.extractProtocol=v,y.location=h,y.trimLeft=f,y.qs=i,t.exports=y},271:t=>{"use strict";function e(t){return t>=55296&&t<=56319}function n(t){return t>=56320&&t<=57343}t.exports=function(t){if("string"!=typeof t)throw new Error("Input must be string");for(var r=t.length,i=0,o=null,a=null,s=0;s<r;s++)n(o=t.charCodeAt(s))?null!=a&&e(a)?i+=1:i+=3:o<=127?i+=1:o>=128&&o<=2047?i+=2:o>=2048&&o<=65535&&(i+=3),a=o;return i}},580:(t,e,n)=>{"use strict";var r;n.r(e),n.d(e,{SaplingModule:()=>If});var i=new Uint8Array(16);function o(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}const a=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const s=function(t){return"string"==typeof t&&a.test(t)};for(var u=[],c=0;c<256;++c)u.push((c+256).toString(16).substr(1));const l=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(u[t[e+0]]+u[t[e+1]]+u[t[e+2]]+u[t[e+3]]+"-"+u[t[e+4]]+u[t[e+5]]+"-"+u[t[e+6]]+u[t[e+7]]+"-"+u[t[e+8]]+u[t[e+9]]+"-"+u[t[e+10]]+u[t[e+11]]+u[t[e+12]]+u[t[e+13]]+u[t[e+14]]+u[t[e+15]]).toLowerCase();if(!s(n))throw TypeError("Stringified UUID is invalid");return n};const f=function(t,e,n){var r=(t=t||{}).random||(t.rng||o)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(var i=0;i<16;++i)e[n+i]=r[i];return e}return l(r)},p="@font-face {\n font-family: 'icomoon';\n src: url(data:application/font-woff;base64,d09GRgABAAAAAAYkAAsAAAAABdgAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABCAAAAGAAAABgDxIM5GNtYXAAAAFoAAAAXAAAAFzwrfDAZ2FzcAAAAcQAAAAIAAAACAAAABBnbHlmAAABzAAAAggAAAIIgIUPmmhlYWQAAAPUAAAANgAAADYbiHinaGhlYQAABAwAAAAkAAAAJAe0A8hobXR4AAAEMAAAABwAAAAcESUAkmxvY2EAAARMAAAAEAAAABAA4AF0bWF4cAAABFwAAAAgAAAAIAAMAD9uYW1lAAAEfAAAAYYAAAGGmUoJ+3Bvc3QAAAYEAAAAIAAAACAAAwAAAAMDSQGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAA8HEDwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEAEAAAAAMAAgAAgAEAAEAIPAN8HH//f//AAAAAAAg8Azwcf/9//8AAf/jD/gPlQADAAEAAAAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAEUAUQO7AvgAJAAAARQGBwEOASMiJicBLgE1NDY/AT4BMzIWHwEBPgEzMhYfAR4BFQO7CAj+FAcVCgsVB/7jCAgICE4IFAsKFQioAXYIFQoLFAhOCAgCcwoVB/4UCAgICAEdBxULChUHTggICAioAXcICAgITgcVCwAAAQA/AD8C5gLmADwAACUUBg8BDgEjIiYvAQcOASMiJi8BLgE1NDY/AScuATU0Nj8BPgEzMhYfATc+ATMyFh8BHgEVFAYPARceARUC5gkHTggUCwsUCKioBxULChUHTggICAioqAgICAhOBxUKCxUHqKgIFAsLFAhOBwkJB6ioBwnDChUHTggICAioqAgICAhOBxUKCxUHqKgIFAsLFAhOBwkJB6ioBwkJB04IFAsLFAioqAcVCwAAAAQADv/AA/IDwAADABUAIQAvAAAJASEBNSIGBwEGFjMhMjYnMQEuASMxExQGIyImNTQ2MzIWJyImPQE0NjMyFh0BFAYCAAGt/KYBrREfDf5LGSUzA2YzJRn+Sw0fEUAlGxslJRsbJUAbJSUbGyUlA2P8qQNXXRYX/JksQEAsA2cXFvzAGyUlGxslJWUlG8AbJSUbwBslAAAAAQAAAAEAAKB25qVfDzz1AAsEAAAAAADcO5oVAAAAANw7mhUAAP/AA/IDwAAAAAgAAgAAAAAAAAABAAADwP/AAAAEAAAAAAAD8gABAAAAAAAAAAAAAAAAAAAABwQAAAAAAAAAAAAAAAIAAAAEAABFAyUAPwQAAA4AAAAAAAoAFAAeAFwAuAEEAAEAAAAHAD0ABAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAOAK4AAQAAAAAAAQAHAAAAAQAAAAAAAgAHAGAAAQAAAAAAAwAHADYAAQAAAAAABAAHAHUAAQAAAAAABQALABUAAQAAAAAABgAHAEsAAQAAAAAACgAaAIoAAwABBAkAAQAOAAcAAwABBAkAAgAOAGcAAwABBAkAAwAOAD0AAwABBAkABAAOAHwAAwABBAkABQAWACAAAwABBAkABgAOAFIAAwABBAkACgA0AKRpY29tb29uAGkAYwBvAG0AbwBvAG5WZXJzaW9uIDEuMABWAGUAcgBzAGkAbwBuACAAMQAuADBpY29tb29uAGkAYwBvAG0AbwBvAG5pY29tb29uAGkAYwBvAG0AbwBvAG5SZWd1bGFyAFIAZQBnAHUAbABhAHJpY29tb29uAGkAYwBvAG0AbwBvAG5Gb250IGdlbmVyYXRlZCBieSBJY29Nb29uLgBGAG8AbgB0ACAAZwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABJAGMAbwBNAG8AbwBuAC4AAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA);\n font-weight: normal;\n font-style: normal;\n}\n\n/* need icon-sapling- because sites like trello use icomoon too */\n[class^=\"icon-sapling-\"], [class*=\" icon-sapling-\"] {\n /* use !important to prevent issues with browser extensions that change fonts */\n font-family: 'icomoon' !important;\n speak: none;\n font-style: normal;\n font-weight: normal;\n font-variant: normal;\n text-transform: none;\n line-height: 1;\n\n /* Better Font Rendering =========== */\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.icon-sapling-accept:before {\n font-family: 'icomoon' !important;\n content: \"\\f00c\";\n}\n.icon-sapling-close:before {\n font-family: 'icomoon' !important;\n content: \"\\f00d\";\n}\n.icon-sapling-remove:before {\n font-family: 'icomoon' !important;\n content: \"\\f00d\";\n}\n.icon-sapling-reject:before {\n font-family: 'icomoon' !important;\n content: \"\\f00d\";\n}\n";var d=n(137),h={SENTRY_DSN:"https://c1aab70fab174e668864c166c00749ac@o137760.ingest.sentry.io/4504958473404416",WEBSITE_URL:"https://sapling.ai",API_URL:"https://api.sapling.ai",WEBSITE_HOSTNAME:new d("https://sapling.ai").hostname,API_HOSTNAME:new d("https://api.sapling.ai").hostname,MODE:"SDK",AI_DETECT_ANYWHERE_EXTENSION:!1,CONTROL_ELEMENT:"sapling-controls-sdk"},g=n(137),v="",y="";function m(){return v}function b(){return y}var D=n(283),w=n.n(D),x=n(934),E=n.n(x),A=n(563),S=E()();function C(t){return" ".repeat(t.length)}function k(t){return t.replace(/\u00A0/g," ").replace(/\u200B/g," ").replace(/\u00A9/g," ").replace(/\u00AE/g," ").replace(/ /g," ").replace(S,C)}function O(t){return"scroll"===A(t).css("overflow-y")||"auto"===A(t).css("overflow-y")||A(t).is("textarea")||U(t)}function T(t){var e=[];e.push(t);for(var n=A(t).parentsUntil("body"),r=0;r<n.length;r+=1){var i=n[r];O(i)&&e.push(i)}return e}function F(t){for(var e=t,n=A(t).parentsUntil("body"),r=t.clientHeight,i=t.clientWidth,o=0;o<n.length;o+=1){var a=n[o],s=a.clientWidth,u=a.clientHeight;if(0!==s&&0!==u)if((u<r||s<i)&&(r=u,i=s,e=a),"absolute"===window.getComputedStyle(a).position)break}return e}function j(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=t;if(r.firstChild&&n)return r.firstChild;if(r.nextSibling)return r.nextSibling;for(var i=r.parentNode;null===e||i!==e;){if(i.nextSibling)return i.nextSibling;i=i.parentNode}return null}function L(t){return!!t.tagName&&["script","style","xml"].includes(t.tagName.toLowerCase())}function I(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];if(e>n)return null;for(var a=t,s=e;null!==a;){if(i&&A(a).is("br")){if(n===s)return{domElement:a,indexSum:s,domOffset:s}}else if(a.nodeType===Node.TEXT_NODE){var u=a.data.length,c=n-s;if(c<u||o&&c===u)return{domElement:a,domOffset:c,indexSum:s};s+=u}a=j(a,r,!L(a))}return null}function N(t,e,n){for(var r=t,i=0;null!==r;){if(r===e)return i+n;r.nodeType===Node.TEXT_NODE&&(i+=r.data.length),r=j(r,t,!L(r))}return null}function B(t,e){if(!e)return null;var n=N(t,e.startContainer,e.startOffset),r=N(t,e.endContainer,e.endOffset);return null===n||null===r?null:[n,r]}function R(t){var e=getComputedStyle(t).position,n=t.getBoundingClientRect(),r={position:e,left:n.left,top:n.top,height:n.height,width:n.width};"static"!==e&&"relative"!==e||(r.position="absolute");var i=m();(i.endsWith("messenger.com")||i.endsWith("twitter.com")||i.endsWith("workplaceoptions.com"))&&(r.left-=1);var o=function(t){for(var e=t.parentElement;null!==e;){if("static"!==getComputedStyle(e).position)return e;e=e.parentElement}return null}(t);if(o){var a=o.getBoundingClientRect();r.left-=a.left-(o.scrollLeft||0),r.top-=a.top-(o.scrollTop||0)}else{var s=t.ownerDocument,u=s.defaultView||s.parentWindow,c=u.pageXOffset,l=u.pageYOffset;void 0!==c&&(r.top+=l),void 0!==l&&(r.top+=c)}return{frameDimensions:r,nonstaticParent:o}}function P(t){return!m().includes("gladly.")&&("true"===t.getAttribute("data-slate-editor")||A("[data-slate-leaf]",t).length>0)}function M(t){var e=t.tagName.toLowerCase();return("input"===e||"lightning-input-field"===e)&&"text"===t.getAttribute("type").toLowerCase()}function H(t){return A(t).attr("sapling-id")||A(t).data("sapling-id")}function q(t,e){return e||(e=f()),A(t).attr("sapling-id",e),A(t).data("sapling-id",e),e}function U(t){return A(t).attr("sapling-textarea-id")||A(t).data("sapling-textarea-id")}function z(t,e){return e||(e=f()),A(t).attr("sapling-textarea-id",e),A(t).data("sapling-textarea-id",e),e}function W(t){try{var e=getComputedStyle(t).zIndex;return isNaN(e)?W(t.parentElement):parseInt(e)}catch(t){return 0}}function G(t){return t<0?"rgb(0,0,0)":(t<=50?(e=Math.floor(225*t/50),n=225):(e=225,n=Math.floor(225*(100-t)/50)),"rgb("+e+","+n+",0)");var e,n}var Y=n(563);function $(t){return!!t.shadowRoot}function V(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return"TEXTAREA"===t.tagName||e&&M(t)}function J(t){return t.isContentEditable&&"TEXTAREA"!==t.tagName}function X(t,e,n,r){for(var i,o=0;i=t[o];++o)e(i)&&r&&n.push(i),$(i)&&X(i.shadowRoot.querySelectorAll("*"),e,n,!0)}function K(t){var e=[];return X(document.querySelectorAll("*"),t,e,!1),e}function Q(t){if((t.ownerDocument||document).contains(t))return!0;var e=function(t){return K((function(e){return e.contains(t)}))}(t);return e.length>0}function Z(t){var e=t.path||t.composedPath&&t.composedPath();return e.length<1?t.target:e[0]}function tt(t){var e=null;if(t.hasFocus&&t.hasFocus())for(e=t.activeElement;$(e);)e=e.shadowRoot.activeElement;return e}var et=n(563);function nt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return rt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rt(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var it={},ot={},at={},st=[],ut=[];function ct(t){ut.push(t)}function lt(t){st.push(t)}function ft(t,e,n,r,i){var o=n?ot:it,a={};t in o&&(a=o[t]),"domElement"in a||(a.domElement=e);var s=[];r in a&&(s=a[r]),s.push(i),a[r]=s,o[t]=a}function pt(t,e){var n=e?ot:it;if(t in n){var r=n[t];"intervals"in r&&r.intervals.forEach((function(t){clearInterval(t)})),"eventListeners"in r&&r.eventListeners.forEach((function(t){t.element.removeEventListener(t.event,t.handler,t.options)})),"jqueryObservers"in r&&r.jqueryObservers.forEach((function(t){et(t).off()})),"resizeObservers"in r&&r.resizeObservers.forEach((function(t){t.observer.unobserve(t.container)})),"mutationObservers"in r&&r.mutationObservers.forEach((function(t){t.disconnect()})),delete n[t]}}function dt(){st.forEach((function(t){t.disconnect()})),st=[],ut.forEach((function(t){t.element.removeEventListener(t.event,t.handler,t.options)})),ut=[],Object.keys(it).forEach((function(t){pt(t,!1)})),Object.keys(ot).forEach((function(t){pt(t,!0)})),function(){for(var t=0,e=Object.entries(at);t<e.length;t++){var n=nt(e[t],2);(r=(n[0],n[1]))&&(r.shadowHost&&r.shadowHost.remove(),r.badge&&r.badge.removeUIElements(),r.annotationsOverlay&&r.annotationsOverlay.removeUIElements())}var r}()}function ht(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;try{var i={};i.action=t,i.data=e,Je(i,(function(t){t&&t.status?(n&&t.success&&n(t.data),r&&!t.success&&r(t.data)):r&&r({message:"Error contacting background script."})}),r)}catch(e){"makeToolbarIconInactive"!==t&&dt()}}var gt=n(563);function vt(t){return vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vt(t)}function yt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function mt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?yt(Object(n),!0).forEach((function(e){bt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):yt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function bt(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==vt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==vt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===vt(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Dt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e={language:Le(),browserLanguage:window.navigator.language,hostname:m(),pathname:b(),frame_hostname:window.location.hostname,frame_pathname:window.location.pathname};if(t){var n=gt("[sapling-id=".concat(t,"]")).attr("id");e.is_sapling_textbox="sapling-embedded-editable"===n,e.is_enabled=e.is_enabled||e.is_sapling_textbox}return e}function wt(t,e,n,r,i,o){ht("request/GET_AI_DETECTION_SCORES",{html:w()(t,8e3),sessionId:n,context:mt(mt({},Dt()),r)},i,o)}function xt(t,e,n,r,i,o,a){ht("request/POST_TONE_FEEDBACK",{html:w()(t,5e4),toneData:e,textType:n,score:r,sessionId:i,context:Dt()},o,a)}function Et(t,e){ht("request/SEND_EVENT",{context:mt(mt({},Dt(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null)),e),eventAction:t})}function At(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];ht("request/POST_EDIT",{editHash:t,context:mt(mt({},Dt(n)),r),action:i?"hover":e?"accept":"reject",sessionId:n})}function _t(t){ht("request/POST_CHAT_EVENT",{context:t})}function St(t){ht("request/POST_CHAT_TURN",{context:t})}function Ct(t,e,n,r){ht("request/SELECT_SNIPPET",{snippetId:t,mode:e,context:Dt(),queryTerms:n,queryCount:r})}var kt=n(563),Ot=null,Tt=null,Ft=null,jt=null,Lt=null,It=null,Nt=null,Bt="en",Rt=!0,Pt=!0,Mt=!1,Ht=!0,qt=!1,Ut=!0,zt="free",Wt=null,Gt=null,Yt=null,$t=null,Vt=null,Jt=null,Xt="\\",Kt=!1,Qt=!1,Zt=!1,te=!1,ee=!1,ne=["en","zh","de","es","fr","he","it","jp","ja","ko","pt","ar","nl","pl","ru","sv","tl","no","hi","cs","da","el","et","fa","fi","hr","hu","id","lt","lv","ro","sk","sl","sr","th","tr","uk","vi"];function re(t,e,n,r,i,o,a){var s=m(),u="crioenabled".concat(s),c="completeEnabled-".concat(s),l="badgeEnabled-".concat(s),f="toneEnabled-".concat(s),p="aiDetectEnabled-".concat(s),d="rephraseEnabled-".concat(s),h="advancedEditsEnabled-".concat(s),g={};g[u]=t,g[c]=e,g[l]=n,g[f]=r,g[p]=i,g[d]=o,g[h]=a;var v,y,b;Ve(g),v=t,y=e,ht("request/POST_SETTINGS",{context:b=Dt(),settings:[{hostname:b.hostname,enabled:v,completeEnabled:y}]})}function ie(t){return new Promise((function(e){!function(t,e,n){ht("request/GET_USER",{ignoreCache:t},e,n)}(t,(function(t){oe(t),e()}),(function(){e()}))}))}function oe(t){Rt=t.is_anonymous,Pt=t.email_confirmed,Mt=t.suggest,Jt=t.shortcuts.complete,Xt=t.shortcuts.snippet,Ht=t.snippets,qt=t.annotations,Ut=t.power_button,Bt=t.lang,Object.hasOwn(t,"popup_editor")&&t.popup_editor,Object.hasOwn(t,"check_inputs")&&(Kt=t.check_inputs),Object.hasOwn(t,"rephrase")&&(Qt=t.rephrase),Object.hasOwn(t,"tone")&&(Zt=t.tone),Object.hasOwn(t,"ai_detect")&&(te=t.ai_detect),Object.hasOwn(t,"multiFillin")&&(ee=t.multiFillin);var e=t.subscription;e&&(zt=e.tier,Wt=e.end_datetime),!0}function ae(){return Rt}function se(){return Pt}function ue(){return"free"!==zt}function ce(){return zt}function le(){return Mt}function fe(){return Ht}function pe(){return"SDK"===h.MODE?Sapling.advancedEdits.advanced_edits:qt}function de(){return Jt}function he(){return Xt}function ge(){if(!Wt)return Wt;var t=new Date,e=new Date(Wt);if(e.getTime()-t.getTime()<0)return null;var n=Math.round(Math.abs((e.getTime()-t.getTime())/864e5));return Math.max(n,1)}function ve(t){var e=t.tagName.toLowerCase();return!!("textarea"===e||"lightning-textarea"===e||Kt&&M(t))}function ye(){return!1!==$t}function me(){return"SDK"===h.MODE||(null!==Yt?Yt:!(!ue()||!0!==Ot)||!1!==Ot&&ye())}function be(){return"SDK"===h.MODE||(null!==Yt?Yt:!(!ue()||!0!==Nt)||!1!==Nt&&ye())}function De(t){return"SDK"===h.MODE||!!me()&&("true"!==kt(t).attr("sapling-ignore")&&("To"!==kt(t).attr("aria-label")&&"Cc"!==kt(t).attr("aria-label")&&"Bcc"!==kt(t).attr("aria-label")&&(!m().includes("github.com")||"false"!==kt(t).attr("spellcheck"))))}function we(){return"SDK"===h.MODE?Sapling.autocomplete:!!m().includes("sapling.ai")||(null!==Yt?Yt:!(!ue()||!1===Tt))}function xe(t){return!!we()&&(("SDK"===h.MODE||"true"!==kt(t).attr("sapling-ignore"))&&("off"!==kt(t).attr("autocomplete")&&"false"!==kt(t).attr("autocomplete")))}function Ee(){return null!==Gt?Gt:!(ye()||me()||we()||ue())}function Ae(){return _e()&&Qt}function _e(){return!1!==It}function Se(){return"SDK"===h.MODE||Ie()&&te&&Ce()}function Ce(){return"SDK"!==h.MODE&&!1!==Lt}function ke(){return"SDK"===h.MODE?Sapling.toneEnabled:Oe()&&Ie()&&Zt}function Oe(){return"SDK"!==h.MODE&&!1!==jt}function Te(){return"SDK"===h.MODE?Sapling.statusBadge:!1!==Ft&&!0!==Vt}function Fe(){return"SDK"===h.MODE||Kt}function je(t){ne.includes(t)&&(Bt=t),function(t){ht("request/POST_SETTINGS",{context:Dt(),settings:[{lang:t}]})}(Bt)}function Le(){return Bt}function Ie(){return!ae()&&(!!se()&&!!ue())}var Ne=n(563);function Be(t){return Be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Be(t)}function Re(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Pe(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Re(Object(n),!0).forEach((function(e){Me(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Re(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Me(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==Be(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Be(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Be(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var He=null;function qe(t){var e=t.sentence.substring(t.start,t.end),n={offset:t.start+t.sentence_start,text:e},r={offset:t.end+t.sentence_start,text:e},i=t;return i.replacement_text=t.replacement,i.original_text=e,i.start=n,i.end=r,i.replacement_text=t.replacement,"Advanced Edit"===t.general_error_type&&(i.category=t.error_type),i}function Ue(t){var e=t.type,n=t.url,r=t.contentType,i=t.dataType,o=t.data,a=t.xhrFields,s=t.success,u=t.error,c=Date.now();Ne.ajax({type:e,url:n,contentType:r||"application/json",dataType:i||"json",data:o,xhrFields:a||{},success:s||function(){},error:u||function(){},complete:function(t){return function(t){var e=t.startTime,n=t.status,r=t.url;if(!Sapling.telemetryEndpoint)return;var i={status:n,latency:Date.now()-e,url:r};try{Ne.ajax({type:"post",url:Sapling.telemetryEndpoint,contentType:"application/json",dataType:"json",data:JSON.stringify(i)})}catch(t){}}({startTime:c,status:t.status,url:n,data:o})}})}function ze(t){if(Sapling.key){var e={version:"TODO",source:"SDK"};e.hostname=m(),e.pathname=b();var n={name:t,key:Sapling.key,event_properties:e},r="".concat(Sapling.endpointHostname).concat(Sapling.saplingPathPrefix,"/api/v1/events");try{Ue({type:"post",url:r,contentType:"application/json",dataType:"json",data:JSON.stringify(n)})}catch(t){}}}function We(t,e,n,r){var i,o=m(),a="".concat(Sapling.endpointHostname).concat(Sapling.saplingPathPrefix).concat(Sapling.editPathname);i=!!(Sapling.freemium||o===h.WEBSITE_HOSTNAME&&Sapling.editPathname.endsWith("edits_nk"));var s={key:Sapling.key,session_id:Sapling.sessionId,user_id:Sapling.userId,is_anon_user:Sapling.isAnonUser,text:t,noformat:!0,lang:Sapling.lang,variety:Sapling.variety,advanced_edits:Sapling.advancedEdits,operations:Sapling.operations,freemium:Sapling.freemium,context:e};Sapling.appearance.compact||(s.sdk_extended=!0),Sapling.freemium&&Sapling.userPropertiesLoaded&&!Ie()&&delete s.advanced_edits,null!==Sapling.userData&&(s.userData=Sapling.userData),null!==Sapling.neuralSpellcheck&&(s.neural_spellcheck=Sapling.neuralSpellcheck),null!==Sapling.medical&&(s.medical=Sapling.medical),Ue({type:"post",url:a,contentType:"application/json",dataType:"json",data:JSON.stringify(s),xhrFields:{withCredentials:i},success:function(t){var e;e=t.edits&&t.edits[0]&&t.edits[0].error_type?function(t){for(var e=[],n=0;n<t.length;n++){var r=qe(t[n]);e.push(r)}return e}(t.edits):t,n({data:{edits:e},status:!0,success:!0})},error:function(t){r(t.responseJSON)}})}var Ge={"assets/sapling-176x176.svg":"https://sapling.ai/static/img/logos/sapling-176x176.svg","fa-chart-column-solid.svg":"https://sapling.ai/static/img/fa/fa-chart-column-solid.svg","assets/fa-spinner-solid.svg":"https://sapling.ai/static/img/fa/fa-spinner-solid.svg","assets/fa-chart-column-solid.svg":"https://sapling.ai/static/img/fa/fa-chart-column-solid.svg","assets/xmark-solid.svg":"https://sapling.ai/static/img/xmark-solid.svg","assets/spinner-solid.svg":"https://sapling.ai/static/img/spinner-solid.svg","assets/thumbs-up-regular.svg":"https://sapling.ai/static/img/thumbs-up-regular.svg","assets/thumbs-down-regular.svg":"https://sapling.ai/static/img/thumbs-down-regular.svg","assets/power.svg":"https://sapling.ai/static/img/power.svg"};function Ye(t){return"SDK"!==h.MODE?chrome.runtime.getURL(t):t in Ge?Ge[t]:t}function $e(){var t,e;"SDK"===h.MODE&&(Sapling.userToggle&&(t=Ge["assets/power.svg"],(e=document.createElement("link")).rel="preload",e.as="image",e.href=t,document.head.appendChild(e)))}function Ve(t){"SDK"!==h.MODE&&chrome.storage.sync.set(t)}function Je(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if("SDK"===h.MODE){var r=t.data,i=t.action,o=Pe(Pe({},{version:"TODO",source:"SDK"}),r.context);"request/GET_EDITS"===i?We(r.html,o,e,n):"request/GET_COMPLETION"===i?function(t,e,n,r){var i={query:t,context:e,session_id:Sapling.sessionId,user_id:Sapling.userId,is_anon_user:Sapling.isAnonUser,lang:"en",key:Sapling.key};Ue({type:"post",url:"".concat(Sapling.endpointHostname).concat(Sapling.saplingPathPrefix).concat(Sapling.completePathname),contentType:"application/json",dataType:"json",data:JSON.stringify(i),success:function(t){n({data:{completion:t},status:!0,success:!0})},error:function(t){r(t.responseJSON)}})}(r.query,o,e,n):"request/GET_SHORTCUT_SNIPPETS"===i&&Sapling.snippets?function(t,e){if(He)t({data:He,status:!0,success:!0});else{var n=(new Date).getTimezoneOffset();Ue({type:"get",url:"".concat(Sapling.endpointHostname).concat(Sapling.saplingPathPrefix,"/snippets/shortcut_snippets?timeZoneOffset=").concat(n),contentType:"application/json",xhrFields:{withCredentials:!0},success:function(e){He=e.snippets,t({data:He,status:!0,success:!0})},error:function(t){e(t.responseJSON)}})}}(e,n):"request/GET_STATISTICS"===i?function(t,e,n,r){var i={text:t,context:e,session_id:Sapling.sessionId,user_id:Sapling.userId,is_anon_user:Sapling.isAnonUser,key:Sapling.key};Ue({type:"post",url:"".concat(Sapling.endpointHostname).concat(Sapling.saplingPathPrefix).concat(Sapling.statisticsPathname),contentType:"application/json",dataType:"json",data:JSON.stringify(i),success:function(t){n({data:{statistics:t},status:!0,success:!0})},error:function(t){r(t.responseJSON)}})}(r.html,o,e,n):"request/POST_EDIT"===i?function(t,e,n){if("accept"===e||"reject"===e){var r={context:n,session_id:Sapling.sessionId,user_id:Sapling.userId,is_anon_user:Sapling.isAnonUser,key:Sapling.key};Ue({type:"post",url:"".concat(Sapling.endpointHostname).concat(Sapling.saplingPathPrefix,"/api/v1/edits/").concat(t,"/").concat(e),contentType:"application/json",dataType:"json",data:JSON.stringify(r)})}}(r.editHash,r.action,o):"request/GET_AI_DETECTION_SCORES"===i?function(t,e,n,r){var i={text:t,context:e,session_id:Sapling.sessionId,user_id:Sapling.userId,is_anon_user:Sapling.isAnonUser,lang:"en",key:Sapling.key};Ue({type:"post",url:"".concat(Sapling.endpointHostname).concat(Sapling.saplingPathPrefix).concat(Sapling.aiDetectPathname),contentType:"application/json",dataType:"json",data:JSON.stringify(i),success:function(t){n({data:{aidetect:t},status:!0,success:!0})},error:function(t){r(t.responseJSON)}})}(r.html,o,e,n):"request/GET_TONE"===i?function(t,e,n,r){var i={text:t,context:e,session_id:Sapling.sessionId,user_id:Sapling.userId,is_anon_user:Sapling.isAnonUser,lang:"en",key:Sapling.key};Ue({type:"post",url:"".concat(Sapling.endpointHostname).concat(Sapling.saplingPathPrefix).concat(Sapling.tonePathname),contentType:"application/json",dataType:"json",data:JSON.stringify(i),success:function(t){n({data:{tone:t},status:!0,success:!0})},error:function(t){r(t.responseJSON)}})}(r.html,o,e,n):"request/POST_TONE_FEEDBACK"===i?function(t,e,n,r,i,o,a){var s={html:t,text_type:n,tone_percentage:parseInt(100*e[0]),tone_name:e[1],score:r,context:i,session_id:Sapling.sessionId,user_id:Sapling.userId,is_anon_user:Sapling.isAnonUser,lang:"en",key:Sapling.key};Ue({type:"post",url:"".concat(Sapling.endpointHostname).concat(Sapling.saplingPathPrefix).concat(Sapling.toneFeedbackPathname),contentType:"application/json",dataType:"json",data:JSON.stringify(s),success:function(t){o({data:{tone:t},status:!0,success:!0})},error:function(t){a(t.responseJSON)}})}(r.html,r.toneData,r.textType,r.score,o,e,n):"request/GET_USER"===i&&Ue({type:"get",url:"".concat(Sapling.endpointHostname).concat(Sapling.saplingPathPrefix,"/users/me"),contentType:"application/json",xhrFields:{withCredentials:!0},success:function(t){oe(t),Sapling.userPropertiesLoaded=!0},error:function(t){}})}else chrome.runtime.sendMessage(t,(function(t){chrome.runtime.lastError&&n&&n({message:chrome.runtime.lastError}),e&&e(t)}))}function Xe(t){return new Promise((function(e,n){Je(t,(function(t){e(t)}),(function(t){n(t)}))}))}function Ke(){try{return window.self!==window.top}catch(t){return!0}}function Qe(t,e){t.on("load",(function(){setTimeout(e,500)}));var n=t.get(0);try{n&&n.contentWindow&&"complete"===n.contentWindow.document.readyState&&setTimeout(e,500)}catch(t){setTimeout(e,500)}}function Ze(t){var e,n=t.ownerDocument;if((e=n.defaultView||n.parentWindow).self===e.top)return{x:0,y:0};for(var r=document.getElementsByTagName("iframe"),i=0;i<r.length;i++)if(r[i].contentWindow===e){var o=r[i].getBoundingClientRect();return{x:o.x,y:o.y}}return{x:0,y:0}}var tn=n(721),en=n(563),nn={};function rn(t){var e=U(t);nn[e]=nn[e]||{};var n=nn[e].overlayDomElement;if(n&&!Q(n)&&(n.remove(),n=null),!n){for(var r=t.nextSibling;r&&r.nodeType===Node.ELEMENT_NODE&&U(r);){var i=r;r=r.nextSibling,i.remove()}(n=document.createElement("div")).setAttribute("contenteditable",!0),"SDK"===h.MODE&&n.setAttribute("sapling-ignore",!0),z(n,e),en(t).after(n),nn[e].overlayDomElement=n,nn[e].textArea=t}var o=R(t).frameDimensions,a=o.width,s=o.height;if("content-box"===en(t).css("box-sizing")){var u=parseInt(en(t).css("padding-left"))||0,c=parseInt(en(t).css("padding-right"))||0,l=parseInt(en(t).css("padding-top"))||0,f=parseInt(en(t).css("padding-bottom"))||0;a=a-u-c-(parseInt(en(t).css("border-left-width"))||0)-(parseInt(en(t).css("border-right-width"))||0),s=s-l-f-(parseInt(en(t).css("border-top-width"))||0)-(parseInt(en(t).css("border-bottom-width"))||0)}var p=document.defaultView.getComputedStyle(t);return en(n).css({"z-index":p.getPropertyValue("z-index"),spellcheck:!1,"font-style":en(t).css("font-style"),"font-weight":en(t).css("font-weight"),"font-size":en(t).css("font-size"),"font-family":en(t).css("font-family"),"text-align":en(t).css("text-align"),"line-height":en(t).css("line-height"),"letter-spacing":en(t).css("letter-spacing"),"word-spacing":en(t).css("word-spacing"),color:"transparent",opacity:0,background:en(t).css("background"),"overflow-x":en(t).css("overflowX"),"overflow-y":en(t).css("overflowY"),"background-color":"transparent","white-space":en(t).css("whiteSpace"),"pointer-events":"none","border-top-width":en(t).css("border-top-width"),"border-top-style":en(t).css("border-top-style"),"border-top-color":"transparent","border-left-width":en(t).css("border-left-width"),"border-left-style":en(t).css("border-left-style"),"border-left-color":"transparent","box-sizing":en(t).css("boxSizing"),padding:en(t).css("padding"),"padding-top":en(t).css("padding-top"),"padding-left":en(t).css("padding-left"),overflow:en(t).css("overflow"),display:en(t).css("display"),position:o.position,left:o.left,top:o.top,height:s,width:a}),"input"===t.nodeName.toLowerCase()&&en(n).css({display:"flex","align-items":"center","white-space":"nowrap",overflow:"hidden","text-overflow":"clip"}),"linkedin.com"===m()&&en(t).css({"line-height":p.getPropertyValue("line-height")}),n}function on(t){return t in nn?nn[t].textArea:null}function an(t,e){if(t in nn){var n=nn[t].overlayDomElement,r=n.firstChild,i=n.textContent,o="".concat(e,"\n");if(i!==o)if(Math.abs(o.length-i.length)>250)n.textContent=o;else if(r&&r.nodeType===Node.TEXT_NODE)for(var a=(0,tn.diffChars)(i,o),s=0,u=0;u<a.length;u+=1){var c=a[u],l=c.value.length,f=n.textContent;if(c.added)r.insertData(s,c.value),s+=l;else{if(c.value!==f.substr(s,l)){n.textContent=o;break}c.removed?r.deleteData(s,l):s+=l}}else n.textContent=o}}function sn(t){if(t in nn){var e=nn[t],n=e.textArea,r=e.overlayDomElement;r.scrollTop=n.scrollTop,r.scrollLeft=n.scrollLeft,Ou(H(r))}}function un(t){if(t in nn){var e=nn[t],n=e.textArea,r=e.overlayDomElement,i=R(n).frameDimensions;en(r).css({left:i.left,top:i.top,height:i.height,width:i.width}),Ou(H(r))}}function cn(t){var e=U(t);e&&function(t){t in nn&&(nn[t].overlayDomElement.remove(),delete nn[t])}(e)}function ln(t){var e=window.getSelection();e.removeAllRanges(),e.addRange(t),window.getSelection().setBaseAndExtent(t.startContainer,t.startOffset,t.endContainer,t.endOffset)}function fn(t,e,n,r){t.focus();var i=t.value;t.selectionStart=e,t.selectionEnd=n;var o,a=i.slice(0,e)+r+i.slice(n),s=m();try{s.endsWith("overleaf.com")||document.execCommand("insertText",!1,r)}catch(t){}(o=t)&&o.parentElement&&o.parentElement.parentElement&&o.parentElement.parentElement.classList.contains("CodeMirror")||t.value!==a&&(t.value=a),t.selectionStart=e,t.selectionEnd=e,t.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!1})),document.body.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0,cancelable:!0}))}function pn(t,e,n,r){if(P(r))dn(t,e);else{ln(t),m().includes("gladly.")&&setTimeout((function(){ln(t)}),10);var i=new DataTransfer;i.setData("text/plain",e),n&&i.setData("text/html","<meta charset='utf-8'>".concat(n));var o=new InputEvent("beforeinput",{inputType:"insertFromPaste",dataTransfer:i,bubbles:!0,cancelable:!0,isComposing:!1}),a=r.innerText;setTimeout((function(){t.startContainer.dispatchEvent(o),o.defaultPrevented&&a!==r.innerText||(document.body.dataset.saplingSnippetInsert=!0,document.execCommand("paste"),delete document.body.dataset.saplingSnippetInsert)}),100),document.body.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0,cancelable:!0}))}}function dn(t,e){var n={inputType:"insertReplacementText",data:e,bubbles:!0,cancelable:!1};ln(t),setTimeout((function(){t.startContainer.dispatchEvent(new InputEvent("beforeinput",n))}),0)}function hn(t){var e=window.getSelection();if("function"==typeof e.setBaseAndExtent)e.setBaseAndExtent(t.endContainer,t.endOffset,t.endContainer,t.endOffset);else{var n=document.createRange();n.setStart(t.endContainer,t.endOffset),e.addRange(n)}}function gn(t,e,n){if(P(n))dn(t,e);else{var r=m();if(r.endsWith("facebook.com")||r.endsWith("messenger.com")||r.endsWith("whatsapp.com")||r.endsWith("workplace.com")||r.endsWith("instagram.com")||(i=n.getAttribute("class"))&&i.includes("DraftEditor"))!function(t,e){ln(t);var n={inputType:"insertText",data:e,bubbles:!0,cancelable:!1};ln(t),document.body.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0,cancelable:!0})),setTimeout((function(){var r=t.startContainer,i=t.startOffset,o=t.endContainer,a=t.endOffset;r===o?r.replaceData(i,a-i,e):(t.deleteContents(),r.insertData(i,e)),t.startContainer.dispatchEvent(new InputEvent("input",n)),document.body.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0,cancelable:!0}))}),50)}(t,e);else{var i,o=t.startContainer,a=t.startOffset,s=t.endContainer,u=t.endOffset,c=new StaticRange({startContainer:o,startOffset:a,endContainer:s,endOffset:u});ln(t);var l={inputType:"insertText",data:e,bubbles:!0,cancelable:!1,targetRanges:[c]};t.startContainer.dispatchEvent(new InputEvent("beforeinput",l)),hn(t),document.body.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0,cancelable:!0})),o===s?o.replaceData(a,u-a,e):(t.deleteContents(),o.insertData(a,e)),t.startContainer.dispatchEvent(new InputEvent("input",l)),document.body.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0,cancelable:!0})),(function(t){return A(t).is('[class*="PSPDFKit"]')}(n)||function(t){return A(t).is('[class*="mce-content-body"]')}(n))&&(n.blur(),n.focus())}}}var vn=n(563),yn=864e5;function mn(t,e,n,r,i,o,a,s){var u=arguments.length>8&&void 0!==arguments[8]&&arguments[8];if(!Ke()){var c,l=vn("sapling-popup-controls");0===l.length?((c=document.createElement("sapling-popup-controls")).attachShadow({mode:"open"}),vn("html").append(c)):(l.is(":last-child")||l.appendTo("html"),c=l[0]);var f=c.shadowRoot;vn(".sapling-tooltip-container",f)[0]?(vn(".sapling-tooltip-button-primary",f).off("mousedown"),vn(".sapling-tooltip-button-secondary",f).off("mousedown"),vn(".sapling-tooltip-container",f).off("blur")):function(t){vn(t).prepend(vn('\n<style type="text/css">\n\n.sapling-tooltip-container {\n position: absolute;\n z-index: 2147483647 !important;\n}\n\n.sapling-tooltip {\n position: absolute;\n padding: 10px;\n width: 220px;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n border: 1px solid #eee;\n border-radius: 5px;\n background-color: #FFF;\n box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);\n font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;\n}\n\n.sapling-tooltip-icon {\n margin-top: 5px;\n width: 30px;\n height: 30px;\n background-size: cover;\n background-image: url("'.concat(Ye("assets/sapling-176x176.svg"),'");\n background-repeat: no-repeat;\n}\n\n.sapling-tooltip-title {\n font-size: 16px;\n font-weight: 600;\n}\n\n.sapling-tooltip-body {\n font-size: 14px;\n line-height: 18px;\n}\n\n.sapling-tooltip-body{\n margin-top: 10px;\n text-align: center;\n}\n\n.sapling-tooltip-title {\n margin-top: 5px;\n text-align: center;\n}\n\n.sapling-tooltip-button-container {\n margin-top: 10px;\n display: flex;\n flex-direction: column;\n width: 100%;\n justify-content: center;\n align-items: center;\n}\n\n.sapling-tooltip-button {\n font-size: 16px;\n padding: 6px;\n margin: 5px;\n width: 140px;\n border-radius: 5px;\n display: flex;\n justify-content: center;\n align-items: center;\n text-align: center;\n color: #FFF;\n transition: all .15s ease;\n user-select: none;\n}\n\n.sapling-tooltip-button:hover {\n transform: translateY(-1px);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.32);\n}\n\n.sapling-tooltip-button:active {\n transform: translateY(0px);\n}\n\n.sapling-tooltip-button-primary {\n background-color: #3f51b5;\n}\n\n.sapling-tooltip-button-secondary {\n background-color: #999;\n}\n</style>'))),vn(t).append(vn('\n<div class="sapling-tooltip-container">\n <div class="sapling-tooltip">\n <div class="sapling-tooltip-icon"> </div>\n <div class="sapling-tooltip-title"></div>\n <div class="sapling-tooltip-body"></div>\n <div class="sapling-tooltip-button-container">\n <div class="sapling-tooltip-button sapling-tooltip-button-primary"></div>\n <div class="sapling-tooltip-button sapling-tooltip-button-secondary"></div>\n <div>\n </div>\n</div>'))}(f);var p=t.top,d=t.left,h=window.innerHeight+window.scrollY,g=window.innerWidth+window.scrollX;null!==p&&p+190>h&&(p=h-190,t.top=Math.max(p,0)),null!==d&&d+250>g&&(d=g-250,t.left=Math.max(d,0)),vn(".sapling-tooltip-container",f).css(t),e?vn(".sapling-tooltip-icon",f).show():vn(".sapling-tooltip-icon",f).hide(),vn(".sapling-tooltip-title",f).html(n),vn(".sapling-tooltip-body",f).html(r),vn(".sapling-tooltip-button-primary",f).text(i),o?vn(".sapling-tooltip-button-secondary",f).text(o):vn(".sapling-tooltip-button-secondary",f).hide(),u&&vn(".sapling-tooltip-container",f).attr("tabindex",-1).on("blur",(function(){vn(this).hide()})),vn(".sapling-tooltip-button-primary",f).on("mousedown",(function(t){1===t.which&&(t.preventDefault(),t.stopPropagation(),vn(".sapling-tooltip-container",f).hide(),a&&a())})),vn(".sapling-tooltip-button-secondary",f).on("mousedown",(function(t){1===t.which&&(t.preventDefault(),t.stopPropagation(),vn(".sapling-tooltip-container",f).hide(),s&&s())})),u?vn(".sapling-tooltip-container",f).show().focus():vn(".sapling-tooltip-container",f).show()}}function bn(){var t,e;ae()&&(t=["ToolTipLogin"],e=function(t){var e=(new Date).getTime(),n=e-yn;(!t.ToolTipLogin||t.ToolTipLogin<n)&&mn({right:8,bottom:8,top:"",left:""},!0,"Are you signed in?","For full access to Sapling, make sure you are on your team's enterprise plan.","Sign in","Cancel",(function(){var t="".concat(h.WEBSITE_URL,"/user/sign-in");window.open(t),Ve({ToolTipLogin:e})}),(function(){Ve({ToolTipLogin:e})}))},"SDK"!==h.MODE&&chrome.storage.sync.get(t,e))}var Dn=n(458);function wn(){const t=Dn.n2,e=t.crypto||t.msCrypto;if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");const n=e&&e.getRandomValues?()=>e.getRandomValues(new Uint8Array(1))[0]:()=>16*Math.random();return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(t=>(t^(15&n())>>t/4).toString(16)))}var xn=n(312);const En="Sentry Logger ",An=["debug","info","warn","error","log","assert","trace"];function _n(t){if(!("console"in Dn.n2))return t();const e=Dn.n2.console,n={};An.forEach((t=>{const r=e[t]&&e[t].__sentry_original__;t in e&&r&&(n[t]=e[t],e[t]=r)}));try{return t()}finally{Object.keys(n).forEach((t=>{e[t]=n[t]}))}}function Sn(){let t=!1;const e={enable:()=>{t=!0},disable:()=>{t=!1}};return"undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?An.forEach((n=>{e[n]=(...e)=>{t&&_n((()=>{Dn.n2.console[n](`${En}[${n}]:`,...e)}))}})):An.forEach((t=>{e[t]=()=>{}})),e}let Cn;Cn="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?(0,Dn.YO)("logger",Sn):Sn();const kn="production",On=Object.prototype.toString;function Tn(t,e){return On.call(t)===`[object ${e}]`}function Fn(t){return Tn(t,"Object")}function jn(t){return Boolean(t&&t.then&&"function"==typeof t.then)}var Ln;!function(t){t[t.PENDING=0]="PENDING";t[t.RESOLVED=1]="RESOLVED";t[t.REJECTED=2]="REJECTED"}(Ln||(Ln={}));class In{__init(){this._state=Ln.PENDING}__init2(){this._handlers=[]}constructor(t){In.prototype.__init.call(this),In.prototype.__init2.call(this),In.prototype.__init3.call(this),In.prototype.__init4.call(this),In.prototype.__init5.call(this),In.prototype.__init6.call(this);try{t(this._resolve,this._reject)}catch(t){this._reject(t)}}then(t,e){return new In(((n,r)=>{this._handlers.push([!1,e=>{if(t)try{n(t(e))}catch(t){r(t)}else n(e)},t=>{if(e)try{n(e(t))}catch(t){r(t)}else r(t)}]),this._executeHandlers()}))}catch(t){return this.then((t=>t),t)}finally(t){return new In(((e,n)=>{let r,i;return this.then((e=>{i=!1,r=e,t&&t()}),(e=>{i=!0,r=e,t&&t()})).then((()=>{i?n(r):e(r)}))}))}__init3(){this._resolve=t=>{this._setResult(Ln.RESOLVED,t)}}__init4(){this._reject=t=>{this._setResult(Ln.REJECTED,t)}}__init5(){this._setResult=(t,e)=>{this._state===Ln.PENDING&&(jn(e)?e.then(this._resolve,this._reject):(this._state=t,this._value=e,this._executeHandlers()))}}__init6(){this._executeHandlers=()=>{if(this._state===Ln.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach((t=>{t[0]||(this._state===Ln.RESOLVED&&t[1](this._value),this._state===Ln.REJECTED&&t[2](this._value),t[0]=!0)}))}}}function Nn(t){return Bn(t,new Map)}function Bn(t,e){if(Fn(t)){const n=e.get(t);if(void 0!==n)return n;const r={};e.set(t,r);for(const n of Object.keys(t))void 0!==t[n]&&(r[n]=Bn(t[n],e));return r}if(Array.isArray(t)){const n=e.get(t);if(void 0!==n)return n;const r=[];return e.set(t,r),t.forEach((t=>{r.push(Bn(t,e))})),r}return t}function Rn(t){const e=(0,xn.ph)(),n={sid:wn(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(t){return Nn({sid:`${t.sid}`,init:t.init,started:new Date(1e3*t.started).toISOString(),timestamp:new Date(1e3*t.timestamp).toISOString(),status:t.status,errors:t.errors,did:"number"==typeof t.did||"string"==typeof t.did?`${t.did}`:void 0,duration:t.duration,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}(n)};return t&&Pn(n,t),n}function Pn(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),t.did||e.did||(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||(0,xn.ph)(),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=32===e.sid.length?e.sid:wn()),void 0!==e.init&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),"number"==typeof e.started&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if("number"==typeof e.duration)t.duration=e.duration;else{const e=t.timestamp-t.started;t.duration=e>=0?e:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),"number"==typeof e.errors&&(t.errors=e.errors),e.status&&(t.status=e.status)}class Mn{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}static clone(t){const e=new Mn;return t&&(e._breadcrumbs=[...t._breadcrumbs],e._tags={...t._tags},e._extra={...t._extra},e._contexts={...t._contexts},e._user=t._user,e._level=t._level,e._span=t._span,e._session=t._session,e._transactionName=t._transactionName,e._fingerprint=t._fingerprint,e._eventProcessors=[...t._eventProcessors],e._requestSession=t._requestSession,e._attachments=[...t._attachments],e._sdkProcessingMetadata={...t._sdkProcessingMetadata}),e}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{},this._session&&Pn(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,e){return this._tags={...this._tags,[t]:e},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,e){return this._extra={...this._extra,[t]:e},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,e){return null===e?delete this._contexts[t]:this._contexts[t]=e,this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const t=this.getSpan();return t&&t.transaction}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;if("function"==typeof t){const e=t(this);return e instanceof Mn?e:this}return t instanceof Mn?(this._tags={...this._tags,...t._tags},this._extra={...this._extra,...t._extra},this._contexts={...this._contexts,...t._contexts},t._user&&Object.keys(t._user).length&&(this._user=t._user),t._level&&(this._level=t._level),t._fingerprint&&(this._fingerprint=t._fingerprint),t._requestSession&&(this._requestSession=t._requestSession)):Fn(t)&&(this._tags={...this._tags,...t.tags},this._extra={...this._extra,...t.extra},this._contexts={...this._contexts,...t.contexts},t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint),t.requestSession&&(this._requestSession=t.requestSession)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}addBreadcrumb(t,e){const n="number"==typeof e?e:100;if(n<=0)return this;const r={timestamp:(0,xn.yW)(),...t};return this._breadcrumbs=[...this._breadcrumbs,r].slice(-n),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(t,e={}){if(this._extra&&Object.keys(this._extra).length&&(t.extra={...this._extra,...t.extra}),this._tags&&Object.keys(this._tags).length&&(t.tags={...this._tags,...t.tags}),this._user&&Object.keys(this._user).length&&(t.user={...this._user,...t.user}),this._contexts&&Object.keys(this._contexts).length&&(t.contexts={...this._contexts,...t.contexts}),this._level&&(t.level=this._level),this._transactionName&&(t.transaction=this._transactionName),this._span){t.contexts={trace:this._span.getTraceContext(),...t.contexts};const e=this._span.transaction;if(e){t.sdkProcessingMetadata={dynamicSamplingContext:e.getDynamicSamplingContext(),...t.sdkProcessingMetadata};const n=e.name;n&&(t.tags={transaction:n,...t.tags})}}return this._applyFingerprint(t),t.breadcrumbs=[...t.breadcrumbs||[],...this._breadcrumbs],t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...this._sdkProcessingMetadata},this._notifyEventProcessors([...Hn(),...this._eventProcessors],t,e)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}_notifyEventProcessors(t,e,n,r=0){return new In(((i,o)=>{const a=t[r];if(null===e||"function"!=typeof a)i(e);else{const s=a({...e},n);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.id&&null===s&&Cn.log(`Event processor "${a.id}" dropped event`),jn(s)?s.then((e=>this._notifyEventProcessors(t,e,n,r+1).then(i))).then(null,o):this._notifyEventProcessors(t,s,n,r+1).then(i).then(null,o)}}))}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((t=>{t(this)})),this._notifyingListeners=!1)}_applyFingerprint(t){var e;t.fingerprint=t.fingerprint?(e=t.fingerprint,Array.isArray(e)?e:[e]):[],this._fingerprint&&(t.fingerprint=t.fingerprint.concat(this._fingerprint)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}}function Hn(){return(0,Dn.YO)("globalEventProcessors",(()=>[]))}const qn=4,Un=100;class zn{constructor(t,e=new Mn,n=qn){this._version=n,this._stack=[{scope:e}],t&&this.bindClient(t)}isOlderThan(t){return this._version<t}bindClient(t){this.getStackTop().client=t,t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){const t=Mn.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:t}),t}popScope(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}withScope(t){const e=this.pushScope();try{t(e)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(t,e){const n=this._lastEventId=e&&e.event_id?e.event_id:wn(),r=new Error("Sentry syntheticException");return this._withClient(((i,o)=>{i.captureException(t,{originalException:t,syntheticException:r,...e,event_id:n},o)})),n}captureMessage(t,e,n){const r=this._lastEventId=n&&n.event_id?n.event_id:wn(),i=new Error(t);return this._withClient(((o,a)=>{o.captureMessage(t,e,{originalException:t,syntheticException:i,...n,event_id:r},a)})),r}captureEvent(t,e){const n=e&&e.event_id?e.event_id:wn();return t.type||(this._lastEventId=n),this._withClient(((r,i)=>{r.captureEvent(t,{...e,event_id:n},i)})),n}lastEventId(){return this._lastEventId}addBreadcrumb(t,e){const{scope:n,client:r}=this.getStackTop();if(!r)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:o=Un}=r.getOptions&&r.getOptions()||{};if(o<=0)return;const a={timestamp:(0,xn.yW)(),...t},s=i?_n((()=>i(a,e))):a;null!==s&&(r.emit&&r.emit("beforeAddBreadcrumb",s,e),n.addBreadcrumb(s,o))}setUser(t){this.getScope().setUser(t)}setTags(t){this.getScope().setTags(t)}setExtras(t){this.getScope().setExtras(t)}setTag(t,e){this.getScope().setTag(t,e)}setExtra(t,e){this.getScope().setExtra(t,e)}setContext(t,e){this.getScope().setContext(t,e)}configureScope(t){const{scope:e,client:n}=this.getStackTop();n&&t(e)}run(t){const e=Gn(this);try{t(this)}finally{Gn(e)}}getIntegration(t){const e=this.getClient();if(!e)return null;try{return e.getIntegration(t)}catch(e){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Cn.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,e){const n=this._callExtensionMethod("startTransaction",t,e);return"undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){const t=this.getStackTop().scope,e=t.getSession();e&&function(t,e){let n={};e?n={status:e}:"ok"===t.status&&(n={status:"exited"}),Pn(t,n)}(e),this._sendSessionUpdate(),t.setSession()}startSession(t){const{scope:e,client:n}=this.getStackTop(),{release:r,environment:i=kn}=n&&n.getOptions()||{},{userAgent:o}=Dn.n2.navigator||{},a=Rn({release:r,environment:i,user:e.getUser(),...o&&{userAgent:o},...t}),s=e.getSession&&e.getSession();return s&&"ok"===s.status&&Pn(s,{status:"exited"}),this.endSession(),e.setSession(a),a}shouldSendDefaultPii(){const t=this.getClient(),e=t&&t.getOptions();return Boolean(e&&e.sendDefaultPii)}_sendSessionUpdate(){const{scope:t,client:e}=this.getStackTop(),n=t.getSession();n&&e&&e.captureSession&&e.captureSession(n)}_withClient(t){const{scope:e,client:n}=this.getStackTop();n&&t(n,e)}_callExtensionMethod(t,...e){const n=Wn().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[t])return n.extensions[t].apply(this,e);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Cn.warn(`Extension method ${t} couldn't be found, doing nothing.`)}}function Wn(){return Dn.n2.__SENTRY__=Dn.n2.__SENTRY__||{extensions:{},hub:void 0},Dn.n2}function Gn(t){const e=Wn(),n=Vn(e);return Jn(e,t),n}function Yn(t=Wn()){return $n(t)&&!Vn(t).isOlderThan(qn)||Jn(t,new zn),Vn(t)}function $n(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function Vn(t){return(0,Dn.YO)("hub",(()=>new zn),t)}function Jn(t,e){if(!t)return!1;return(t.__SENTRY__=t.__SENTRY__||{}).hub=e,!0}function Xn(t,e){return function(){const t=Wn();if(t.__SENTRY__&&t.__SENTRY__.acs){const e=t.__SENTRY__.acs.getCurrentHub();if(e)return e}return Yn(t)}().captureException(t,{captureContext:e})}function Kn(){if("chrome-extension:"===window.location.protocol){if("#saplingpopup"===window.location.hash)return!0}else{if("ms-browser-extension:"===window.location.protocol)return!0;if("moz-extension:"===window.location.protocol)return!0}return!1}var Qn=n(563);function Zn(){return Zn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=rr(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Zn.apply(this,arguments)}function tr(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&er(t,e)}function er(t,e){return er=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},er(t,e)}function nr(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=rr(t);if(e){var i=rr(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===ir(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function rr(t){return rr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},rr(t)}function ir(t){return ir="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ir(t)}function or(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ar(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(i=r.key,o=void 0,o=function(t,e){if("object"!==ir(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==ir(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===ir(o)?o:String(o)),r)}var i,o}function sr(t,e,n){return e&&ar(t.prototype,e),n&&ar(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var ur=function(){return"SDK"===h.MODE&&Sapling.customStyles&&Sapling.customStyles.badgeTooltipLeft?"tooltiptext-left":""},cr=function(){function t(e){or(this,t),this.elem=null,this.badgeDashboard=e}return sr(t,[{key:"shouldShow",value:function(){return!0}},{key:"refreshState",value:function(){this.shouldShow()?this.elem.show():this.elem.hide()}}]),t}(),lr=function(t){tr(n,t);var e=nr(n);function n(){return or(this,n),e.apply(this,arguments)}return sr(n,[{key:"getName",value:function(){return"SignInButton"}},{key:"shouldShow",value:function(){return"SDK"!==h.MODE&&ae()}},{key:"createElement",value:function(){return this.elem=Qn('<a target="_blank" href="'.concat(h.WEBSITE_URL,'/user/sign-in">\n <div class="sapling-dashboard-icon sapling-button-profile">\n <span class="tooltiptext ').concat(ur(),' caret-mid">Sign in</span>\n </div>\n </a>')),this.elem}}]),n}(cr),fr=function(t){tr(n,t);var e=nr(n);function n(){return or(this,n),e.apply(this,arguments)}return sr(n,[{key:"getName",value:function(){return"SearchSnippetButton"}},{key:"shouldShow",value:function(){return"SDK"!==h.MODE&&(!Kn()&&(!ae()&&fe()))}},{key:"createElement",value:function(){var t=this;return this.elem=Qn('<div class="sapling-dashboard-icon sapling-button-search">\n <span class="tooltiptext '.concat(ur(),' caret-mid">Search Snippets</span>\n </div>')),this.elem.on("mousedown",(function(e){if(1===e.which){e.preventDefault(),e.stopPropagation();var n=t.badgeDashboard.parentContainer,r=n,i=U(n);i&&(r=on(i)),r.focus(),Je({action:"snippet-control",data:{mode:"insert"}})}})),this.elem}}]),n}(cr),pr=function(t){tr(n,t);var e=nr(n);function n(){return or(this,n),e.apply(this,arguments)}return sr(n,[{key:"getName",value:function(){return"AddSnippetButton"}},{key:"shouldShow",value:function(){return"SDK"!==h.MODE&&(!ae()&&fe())}},{key:"createElement",value:function(){var t=this;return this.elem=Qn('<div class="sapling-dashboard-icon sapling-button-snippets">\n <span class="tooltiptext '.concat(ur(),' caret-mid">Add Snippet</span>\n </div>')),this.elem.on("mousedown",(function(e){if(1===e.which){e.preventDefault(),e.stopPropagation();var n=t.badgeDashboard.parentContainer.textContent;n=btoa(unescape(encodeURIComponent(n)));var r=Qn.param({preload:n}),i="".concat(h.WEBSITE_URL,"/snippets/new?").concat(r);window.open(i)}})),this.elem}}]),n}(cr),dr=function(t){tr(n,t);var e=nr(n);function n(){return or(this,n),e.apply(this,arguments)}return sr(n,[{key:"getName",value:function(){return"AddSuggestionButton"}},{key:"shouldShow",value:function(){return"SDK"!==h.MODE&&(!ae&&(!!ue()&&le()))}},{key:"createElement",value:function(){var t=this;return this.elem=Qn('<div class="sapling-dashboard-icon sapling-button-suggest">\n <span class="tooltiptext '.concat(ur(),' caret-mid">Add Suggestion</span>\n </div>')),this.elem.on("mousedown",(function(e){if(1===e.which){e.preventDefault(),e.stopPropagation();var n=Qn(t.badgeDashboard.parentContainer).text().trim();n=btoa(unescape(encodeURIComponent(n)));var r=Qn.param({preload:n}),i="".concat(h.WEBSITE_URL,"/suggest/new?").concat(r);window.open(i)}})),this.elem}}]),n}(cr),hr=function(t){tr(n,t);var e=nr(n);function n(){return or(this,n),e.apply(this,arguments)}return sr(n,[{key:"getName",value:function(){return"AnnotationsButton"}},{key:"shouldShow",value:function(){return"SDK"===h.MODE?pe():!Kn()&&(!ae()&&pe())}},{key:"updateIcon",value:function(){var t="Show Annotations";this.badgeDashboard.containerInfo&&this.badgeDashboard.containerInfo.annotationsOverlay&&this.badgeDashboard.containerInfo.annotationsOverlay.summaryAnnotations&&this.badgeDashboard.containerInfo.annotationsOverlay.summaryAnnotations.summaryVisible()&&(t="Hide Annotations"),Qn(this.elem).find(".tooltiptext").html(t)}},{key:"createElement",value:function(){var t=this;return this.elem=Qn('<div class="sapling-dashboard-icon sapling-button-annotations">\n <span class="tooltiptext '.concat(ur(),' caret-mid">Show Annotations</span>\n </div>')),this.elem.on("mousedown",(function(e){1===e.which&&(e.preventDefault(),e.stopPropagation(),t.badgeDashboard.containerInfo.annotationsOverlay.toggleSummaryAnnotations(),t.updateIcon())})),this.elem}}]),n}(cr),gr=function(t){tr(n,t);var e=nr(n);function n(){return or(this,n),e.apply(this,arguments)}return sr(n,[{key:"getName",value:function(){return"ToneButton"}},{key:"shouldShow",value:function(){return ke()}},{key:"updateIcon",value:function(){var t=this.badgeDashboard.containerInfo.toneOverlay;if(t){var e=t.getTopTone(),n="Show Tone";Qn(t.toneOverlay).is(".visible")?n="Hide Tone":e&&(Qn(this.elem).find(".top-tone-emoji").html(e[2]),n="".concat(e[1]," tone<br/>See More"),Qn(this.elem).css({backgroundSize:0})),Qn(this.elem).find(".tooltiptext").html(n)}}},{key:"createElement",value:function(){var t=this;return this.elem=Qn('<div class="sapling-dashboard-icon sapling-button-tone">\n <span class="top-tone-emoji">\u{1f610}</span>\n <span class="tooltiptext '.concat(ur(),' caret-mid">Show Tone</span>\n </div>')),this.elem.on("mousedown",(function(e){1===e.which&&(e.preventDefault(),e.stopPropagation(),t.badgeDashboard.containerInfo.toneOverlay&&t.badgeDashboard.containerInfo.toneOverlay.toggleVisibility(),t.updateIcon())})),this.elem}}]),n}(cr),vr=function(t){tr(n,t);var e=nr(n);function n(t){var r;return or(this,n),(r=e.call(this,t)).isThrottled=!1,r}return sr(n,[{key:"getName",value:function(){return"ThrottleButton"}},{key:"shouldShow",value:function(){return this.isThrottled}},{key:"createElement",value:function(){return this.elem=Qn('<a target="_blank" href="'.concat(h.WEBSITE_URL,'/usage-limits">\n <div class="sapling-dashboard-icon sapling-button-throttled">\n <span class="tooltiptext ').concat(ur(),' caret-mid">Usage limit exceeded</span>\n </div>\n </a>')),this.elem}}]),n}(cr),yr=[lr,fr,pr,dr,hr,vr,gr,function(t){tr(n,t);var e=nr(n);function n(){return or(this,n),e.apply(this,arguments)}return sr(n,[{key:"getName",value:function(){return"PowerButton"}},{key:"shouldShow",value:function(){return"SDK"===h.MODE?Sapling.userToggle:Ut}},{key:"refreshState",value:function(){var t,e=m(),r="off";"SDK"===h.MODE?Sapling.userToggleEnabled?(r="off",t="Disable grammar checking"):(r="on",t="Enable grammar checking"):t="Turn ".concat(r," Sapling for ").concat(e);var i=Qn(this.elem).find(".tooltiptext").html(i);i.text(t),Zn(rr(n.prototype),"refreshState",this).call(this)}},{key:"createElement",value:function(){var t=this,e=m();return this.elem=Qn('<div class="sapling-dashboard-icon sapling-button-power">\n <span class="tooltiptext '.concat(ur(),' caret-mid">Turn off Sapling for ').concat(e,"</span>\n </div>")),this.elem.on("mousedown",(function(e){if(1===e.which){e.preventDefault(),e.stopPropagation();var n,r,i,o,a,s,u=t.elem.offset();t.badgeDashboard.hide(),n=Sapling.userToggleEnabled,r=u.top-60,i=u.left-110,o="Sapling",a="Disable",s="Keep Enabled","SDK"===h.MODE&&(o="grammar checking"),n||(a="Enable",s="Keep Disabled"),mn({top:r,left:i,right:"",bottom:""},!1,"".concat(a," ").concat(o),"".concat(a," ").concat(o," on pages of site: <b>").concat(m(),"</b>?"),a,s,(function(){"SDK"===h.MODE?(Sapling.setUserToggleEnabled(!n),ze(n?"sdk-disable":"sdk-enable")):re(!n,!n)}),null,!0)}})),this.elem}}]),n}(cr)],mr=n(563);function br(t){return br="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},br(t)}function Dr(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return wr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wr(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function wr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function xr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(i=r.key,o=void 0,o=function(t,e){if("object"!==br(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==br(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===br(o)?o:String(o)),r)}var i,o}var Er=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.parentContainer=null,this.popupControls=null,this.popupControlsJq=null,this.shadowRoot=null,this.shadowRootJq=null,this.containerId=null,this.containerInfo=null,this.badgeDashContainer=null,this.badgeDash=null,this.buttons={}}var e,n,r;return e=t,(n=[{key:"createPopupContainer",value:function(){var t;this.popupControls||(0===mr("sapling-popup-controls").length?((t=document.createElement("sapling-popup-controls")).attachShadow({mode:"open"}),mr("html").append(t)):t=mr("sapling-popup-controls")[0],this.popupControls=t,this.popupControlsJq=mr(t),this.shadowRoot=t.shadowRoot,this.shadowRootJq=mr(this.shadowRoot))}},{key:"createDashboardContainer",value:function(){var t=this,e=this.popupControls.shadowRoot;if(!this.badgeDashContainer){var n=mr('\n<style type="text/css">\n\n.sapling-badge-dash-container {\n position: absolute;\n z-index: 2147483647 !important;\n}\n\n.sapling-badge-dash {\n position: relative;\n height: 34px;\n bottom: 2px;\n right: 2px;\n display: flex;\n flex-direction: row-reverse;\n align-items: center;\n padding-right: 5px;\n background-color: #FFFFFF;\n border-radius: 16px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.32);\n}\n\n.connectivity-error .sapling-badge-dash {\n background-color: #FFCCCC;\n}\n\n.sapling-dashboard-icon {\n width: 24px;\n height: 24px;\n background-color: #3f51b5;\n border-radius: 50%;\n margin-left: 5px;\n position: relative;\n transition: all .15s ease;\n}\n\n.sapling-dashboard-icon:hover {\n transform: translateY(-1px);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.32);\n}\n\n.sapling-button-count {\n position: absolute;\n width: 24px;\n height: 24px;\n color: #fff;\n font-weight: 600;\n font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;\n font-size: 12px;\n line-height: 24px;\n text-align: center;\n user-select: none;\n}\n\n.sapling-button-logo {\n position: absolute;\n width: 24px;\n height: 24px;\n background-size: cover;\n background-image: url("'.concat(Ye("assets/sapling-176x176.svg"),'");\n background-repeat: no-repeat;\n}\n\n.sapling-button-profile {\n background-size: 10px 10px;\n background-position: center center;\n background-image: url("').concat(Ye("assets/profile.svg"),'");\n background-repeat: no-repeat;\n cursor: pointer;\n}\n\n.sapling-button-snippets {\n background-size: 12px 12px;\n background-position: center center;\n background-image: url("').concat(Ye("assets/scissor.svg"),'");\n background-repeat: no-repeat;\n cursor: pointer;\n}\n\n.sapling-button-suggest {\n background-size: 12px 12px;\n background-position: center center;\n background-image: url("').concat(Ye("assets/chat-plus.svg"),'");\n background-repeat: no-repeat;\n cursor: pointer;\n}\n\n.sapling-button-search {\n background-size: 12px 12px;\n background-position: center center;\n background-image: url("').concat(Ye("assets/magnifying-glass.svg"),'");\n background-repeat: no-repeat;\n cursor: pointer;\n}\n\n.sapling-button-annotations {\n background-size: 12px 12px;\n background-position: center center;\n background-image: url("').concat(Ye("assets/fa-chart-column-solid.svg"),'");\n background-repeat: no-repeat;\n cursor: pointer;\n}\n\n.sapling-button-tone {\n background-size: 12px 12px;\n background-position: center center;\n background-image: url("').concat(Ye("assets/face-flushed-regular.svg"),'");\n background-repeat: no-repeat;\n cursor: pointer;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.sapling-button-tone:hover .tooltiptext {\n visibility: visible;\n width: 140px;\n margin-left: -77px;\n transition-delay: 400ms;\n}\n\n.sapling-button-tone .top-tone-emoji {\n font-size: 18px;\n margin-top: 2px;\n}\n\n.sapling-button-tone .tooltiptext {\n text-transform: capitalize;\n}\n\n.sapling-button-throttled {\n background-color: orange;\n background-size: 16px 16px;\n background-position: center center;\n background-image: url("').concat(Ye("assets/throttled.svg"),'");\n background-repeat: no-repeat;\n cursor: pointer;\n}\n\n.sapling-button-feedback {\n background-size: 13px 13px;\n background-position: center center;\n background-image: url("').concat(Ye("assets/feedback.svg"),'");\n background-repeat: no-repeat;\n cursor: pointer;\n}\n\n.sapling-button-power {\n background-size: 12px 12px;\n background-position: center center;\n background-image: url("').concat(Ye("assets/power.svg"),'");\n background-repeat: no-repeat;\n cursor: pointer;\n}\n\n.sapling-button-edit-count:hover .tooltiptext {\n visibility: visible;\n width: 80px;\n transition-delay: 400ms;\n}\n\n#tooltiptext-right {\n margin-left: -80px\n}\n\n.sapling-button-profile:hover .tooltiptext {\n visibility: visible;\n width: 60px;\n margin-left: -37px;\n transition-delay: 400ms;\n}\n\n.sapling-button-search:hover .tooltiptext {\n visibility: visible;\n width: 95px;\n\n margin-left: -55px;\n transition-delay: 400ms;\n}\n\n.sapling-button-snippets:hover .tooltiptext {\n visibility: visible;\n width: 80px;\n margin-left: -47px;\n transition-delay: 400ms;\n}\n\n.sapling-button-suggest:hover .tooltiptext {\n visibility: visible;\n width: 100px;\n margin-left: -57px;\n transition-delay: 400ms;\n}\n\n.sapling-button-annotations:hover .tooltiptext {\n visibility: visible;\n width: 140px;\n margin-left: -77px;\n transition-delay: 200ms;\n}\n\n.sapling-button-throttled:hover .tooltiptext {\n visibility: visible;\n width: 140px;\n margin-left: -77px;\n transition-delay: 200ms;\n}\n\n.sapling-button-feedback:hover .tooltiptext {\n visibility: visible;\n width: 140px;\n margin-left: -77px;\n transition-delay: 400ms;\n}\n\n.sapling-button-power:hover .tooltiptext {\n visibility: visible;\n width: 120px;\n margin-left: -67px;\n transition-delay: 400ms;\n}\n\n.tooltiptext {\n width: 0;\n visibility: hidden;\n font-size: 12px;\n font-family: \'Helvetica\', \'Arial\', sans-serif;\n background-color: black;\n color: #fff;\n text-align: center;\n padding: 7px;\n border-radius: 7px;\n user-select: none;\n pointer-events: none;\n\n position: absolute;\n z-index: 1;\n bottom: 120%;\n left: 50%;\n margin-top: -10px;\n z-index: 1;\n}\n\n.tooltiptext.tooltiptext-left {\n right: 0;\n left: auto;\n}\n\n.caret-right::after {\n content: " ";\n position: absolute;\n top: 100%;\n left: 85%;\n margin-left: -4px;\n border-width: 4px;\n border-style: solid;\n border-color: black transparent transparent transparent;\n}\n\n.caret-mid::after {\n content: " ";\n position: absolute;\n top: 100%;\n left: 50%;\n margin-left: -4px;\n border-width: 4px;\n border-style: solid;\n border-color: black transparent transparent transparent;\n}\n\n.tooltiptext-left.caret-mid::after {\n left: auto;\n right: 5%;\n}\n\n</style>'));mr(e).prepend(n),this.badgeDashContainer=mr('<div class="sapling-badge-dash-container" style="display: none;"></div>'),this.badgeDash=mr('<div class="sapling-badge-dash"></div>'),this.badgeDashContainer.append(this.badgeDash);var r,i=Dr(yr);try{for(i.s();!(r=i.n()).done;){var o=new(0,r.value)(this),a=o.createElement();this.badgeDash.append(a),this.buttons[o.getName()]=o,o.refreshState()}}catch(t){i.e(t)}finally{i.f()}this.badgeDash.hover(null,(function(){t.hide()})),this.shadowRootJq.append(this.badgeDashContainer)}}},{key:"createUIElements",value:function(){this.createPopupContainer(),this.createDashboardContainer()}},{key:"show",value:function(t,e,n,r){if(this.parentContainer=t,this.popupControlsJq.is(":last-child")||this.popupControlsJq.appendTo("html"),n!==this.containerId){this.containerId=n,this.containerInfo=r,this.badgeDashContainer.containerId=n;for(var i=!0,o=0,a=Object.values(this.buttons);o<a.length;o++){var s=a[o];s.refreshState(),s.shouldShow()&&(i=!1)}if(!i){var u=e.badge[0].getBoundingClientRect(),c=u.right+window.scrollX-this.badgeDashContainer.width()+6,l=u.bottom+window.scrollY-this.badgeDashContainer.height()+6;if("SDK"===h.MODE){var f=Ze(t);c+=f.x,l+=f.y}l=Math.max(l,20),c=Math.max(c,0),this.badgeDashContainer.css({left:c,top:l}),this.buttons.EditCountButton&&this.buttons.EditCountButton.setEditCount(e.editCount),this.buttons.ToneButton&&this.buttons.ToneButton.updateIcon(),this.buttons.AnnotationsButton&&this.buttons.AnnotationsButton.updateIcon(),this.badgeDashContainer.show()}}}},{key:"hide",value:function(){this.badgeDashContainer&&(this.badgeDashContainer.hide(),this.containerId=null)}}])&&xr(e.prototype,n),r&&xr(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Ar=n(563);function _r(t){return _r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_r(t)}function Sr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(i=r.key,o=void 0,o=function(t,e){if("object"!==_r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==_r(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===_r(o)?o:String(o)),r)}var i,o}var Cr=null,kr=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.showSpinner=this.regularShowSpinner,this.hideSpinner=this.regularHideSpinner,this.parentContainer=null,this.containerId=null,this.containerInfo=null,this.badgeShadowHost=null,this.badge=null,this.badgeSpinner=null,this.badgeContainer=null,this.hostname=m(),this.pathname=b(),this.editCount=0}var e,n,r;return e=t,(n=[{key:"firefoxShowSpinner",value:function(){this.isEnabled()&&(this.badge.hide(),this.badgeSpinner.show())}},{key:"firefoxHideSpinner",value:function(){this.isEnabled()&&(this.badge.show(),this.badgeSpinner.hide())}},{key:"regularShowSpinner",value:function(){this.isEnabled()&&(this.badge.stop().fadeOut(300),this.badgeSpinner.stop().fadeIn(300))}},{key:"regularHideSpinner",value:function(){this.isEnabled()&&(this.badge.stop().fadeIn(300),this.badgeSpinner.stop().fadeOut(300))}},{key:"createUIElements",value:function(t,e,n,r){if(this.isEnabled()&&(this.parentContainer=t,this.containerId=n,this.containerInfo=r,"outlook.live.com"===this.hostname?(this.badgeShadowHost&&!Q(this.badgeShadowHost)&&(this.badgeShadowHost.remove(),this.badgeShadowHost=null),this.badgeShadowHost||(this.badgeShadowHost=document.createElement("div"),this.badgeShadowHost.setAttribute("is-sapling-overlay",!0),this.badgeShadowHost.attachShadow({mode:"open"}),Ar(t.parentNode.parentNode).append(this.badgeShadowHost),Ar(this.badgeShadowHost).css({"pointer-events":"none",position:"sticky",bottom:"0px"}))):this.badgeShadowHost=e,!this.badgeContainer)){var i=this.badgeShadowHost.shadowRoot;Cr||(Cr=new Er).createUIElements();var o="2px";"outlook.live.com"===this.hostname&&(o="100px");var a=2,s=8,u=8,c="#3f51b5",l="#990000";if((Ar(t).height()<24||Ar(t).width()<140)&&(s=6,u=4,a=1),"SDK"===h.MODE){if(Sapling.appearance.customCSS){var f=Ar('<style type="text/css">'.concat(Sapling.appearance.customCSS,"</style>"));Ar(i).prepend(f)}Sapling.appearance.variables.badgeSize&&(s=Sapling.appearance.variables.badgeSize),Sapling.appearance.variables.badgeMargin&&(u=Sapling.appearance.variables.badgeMargin),Sapling.appearance.variables.badgeColor&&(c=Sapling.appearance.variables.badgeColor),Sapling.appearance.variables.badgeErrorColor&&(l=Sapling.appearance.variables.badgeErrorColor)}var p=Ar(function(t,e,n,r,i,o){return'\n<style type="text/css">\n.sapling-badge-container {\n position: absolute;\n bottom: '.concat(t,";\n right: 0px;\n font-family: 'Helvetica', 'Arial', sans-serif;\n}\n\n.sapling-status-container {\n position: absolute;\n bottom: ").concat(e,"px;\n right: ").concat(e,"px;\n}\n\n.sapling-badge {\n position: absolute;\n width: ").concat(n,"px;\n height: ").concat(n,"px;\n bottom: ").concat(r,"px;\n right: ").concat(r,"px;\n text-align: center;\n border-radius: 50%;\n}\n\n.errors {\n background-color: ").concat(o,";\n}\n\n.no-errors {\n background-color: ").concat(i,";\n}\n\n.connectivity-error .sapling-badge {\n background-color: ").concat(o,";\n}\n\n.throttled-error .sapling-badge {\n background-color: orange;\n}\n\n.sapling-badge-spinner {\n position: absolute;\n width: ").concat(n-4,"px;\n height: ").concat(n-4,"px;\n border: ").concat(Math.floor(n/4),"px solid ").concat(i,";\n bottom: ").concat(r,"px;\n right: ").concat(r,"px;\n border-top: ").concat(Math.floor(n/4),"px solid rgba(0,0,0,0);\n border-radius: 50%;\n animation: rotation 2s infinite linear;\n}\n\n.connectivity-error .sapling-badge-spinner {\n border: 2px solid ").concat(o,";\n border-top: 2px solid rgba(0,0,0,0);\n}\n\n.sapling-badge-hud {\n position: absolute;\n top: -22px;\n left: -42px;\n transition: all 0.25s;\n}\n\n.sapling-tone-hud {\n cursor: pointer;\n pointer-events: initial;\n display: flex;\n transition: all 0.25s;\n}\n\n@keyframes rotation {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n</style>")}(o,a,s,u,c,l));Ar(i).prepend(p),this.badgeContainer=Ar('<div class="sapling-badge-container"></div>');var d=Ar('<div class="sapling-status-container"></div>');this.badge=Ar('<div class="sapling-badge no-errors"></div>'),this.badgeSpinner=Ar('<div class="sapling-badge-spinner" style="display: none;"> </div>'),this.headsUpContainer=Ar('<div class="sapling-badge-hud" style=""></div>'),this.badgeContainer.append(d),d.append(this.headsUpContainer),d.append(this.badge),d.append(this.badgeSpinner),Ar(i).append(this.badgeContainer)}}},{key:"removeUIElements",value:function(){this.badgeShadowHost&&this.badgeShadowHost.remove()}},{key:"isEnabled",value:function(){return!!Te()&&!["notion.so","trello.com"].includes(this.hostname)&&!this.pathname.includes("wp-admin")}},{key:"updateBadgeCount",value:function(t){this.isEnabled()&&(0===t?(this.badge.removeClass("errors"),this.badge.addClass("no-errors")):(this.badge.removeClass("no-errors"),this.badge.addClass("errors")),this.badgeContainer&&(this.badgeContainer.removeClass("connectivity-error"),this.hideSpinner(),this.editCount=t,this.containerId===Cr.badgeDashContainer.containerId&&Cr.buttons.EditCountButton&&Cr.buttons.EditCountButton.setEditCount(t)))}},{key:"showErrorState",value:function(){this.badgeContainer&&this.badgeContainer.addClass("connectivity-error"),this.badgeDashboard&&this.badgeDashboard.buttons&&this.badgeDashboard.buttons.EditCountButton&&this.badgeDashboard.buttons.EditCountButton.setToolTipText("Check your internet and firewall settings.")}},{key:"showThrottledState",value:function(){this.hideSpinner(),this.badgeContainer.addClass("throttled-error"),Cr.buttons.ThrottleButton&&(Cr.buttons.ThrottleButton.isThrottled=!0,Cr.buttons.ThrottleButton.refreshState())}},{key:"showBadgeDashboard",value:function(){Cr.show(this.parentContainer,this,this.containerId,this.containerInfo)}}])&&Sr(e.prototype,n),r&&Sr(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Or(t,e){var n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset;return t.isPointInRange(n,r)&&t.isPointInRange(i,o)}function Tr(t,e){var n=e.endContainer,r=e.endOffset;return t.isPointInRange(n,r)}function Fr(t,e){var n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset;return t.isPointInRange(n,r)||t.isPointInRange(i,o)}function jr(t,e){return Fr(t,e)||Fr(e,t)}function Lr(t,e){return e<=(t.nodeType===Node.TEXT_NODE?t.length:t.childNodes.length)}function Ir(t){var e=t.startContainer,n=t.startOffset,r=t.endContainer,i=t.endOffset;return!!e&&!!r&&e.ownerDocument===r.ownerDocument&&Lr(e,n)&&Lr(r,i)}function Nr(t){return!!["TEXTAREA","INPUT"].includes(t.nodeName)||!!t.isContentEditable}function Br(){return!!["TEXTAREA","INPUT"].includes(document.activeElement.nodeName)||!!document.activeElement.isContentEditable}var Rr=n(563);function Pr(t){return Pr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pr(t)}function Mr(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Hr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Hr(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Hr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function qr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ur(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(i=r.key,o=void 0,o=function(t,e){if("object"!==Pr(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Pr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===Pr(o)?o:String(o)),r)}var i,o}function zr(t,e,n){return e&&Ur(t.prototype,e),n&&Ur(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var Wr=32,Gr=void 0===Gr?null:Gr,Yr=void 0===Yr?null:Yr;function $r(){if((!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&!Br())return!1;var t=getSelection();return t.rangeCount&&!t.isCollapsed&&t.getRangeAt(0)}var Vr=function(){function t(e){qr(this,t),this.shadowHost=e,this.rephraseButton=null,this.rephraseShortcut=null,this.rephraseSpinner=null,this.rephraseWand=null}return zr(t,[{key:"createUIElements",value:function(){var e=this;Ae()&&(this.rephraseButton||(Rr(this.shadowHost.shadowRoot).find(".sapling-rephrase-button").remove(),ht("request/GET_REPHRASE_SHORTCUT",{},(function(n){e.rephraseShortcut=n.shortcut,e.rephraseButton=Rr('\n <div class="sapling-rephrase-button">\n '.concat('<style type="text/css">\n .sapling-rephrase-button {\n z-index: 2147483646 !important;\n position: absolute;\n display: flex;\n width: '.concat(Wr,"px;\n height: ").concat(Wr,"px;\n margin: 0;\n padding: 0;\n justify-content: center;\n align-items: center;\n border-radius: ").concat(Wr/2,"px;\n background-color: #303f9f;\n box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);\n cursor: pointer;\n }\n .sapling-rephrase-button img {\n transform: scale(0.5);\n fill: #fff;\n }\n .sapling-rephrase-spinner {\n padding: 8px;\n animation-name: spin;\n animation-duration: 1500ms;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n }\n @keyframes spin {\n from {\n transform:rotate(0deg);\n }\n to {\n transform:rotate(360deg);\n }\n }\n</style>"),"\n ").concat("<style>/* From badge controls */\n.sapling-rephrase-button:hover .tooltiptext, .sapling-rephrase-type:hover .tooltiptext {\n display: block;\n transition-delay: 500ms;\n}\n.tooltiptext {\n z-index: 2147483647;\n display: none;\n\n width: 80px;\n\n position: absolute;\n bottom: 100%;\n left: 50%;\n\n margin-bottom: -3px;\n padding: 7px;\n\n font-size: 12px;\n font-family: 'Helvetica', 'Arial', sans-serif;\n background-color: black;\n color: #fff;\n text-align: center;\n border-radius: 7px;\n user-select: none;\n pointer-events: none;\n\n}\n\n.caret-right::after {\n content: \" \";\n position: absolute;\n top: 100%;\n left: 85%;\n margin-left: -4px;\n border-width: 4px;\n border-style: solid;\n border-color: black transparent transparent transparent;\n}\n\n.caret-mid::after {\n content: \" \";\n position: absolute;\n top: 100%;\n left: 50%;\n margin-left: -4px;\n border-width: 4px;\n border-style: solid;\n border-color: black transparent transparent transparent;\n}\n\n.shortcut-key {\n display: inline-block;\n background-color: #555;\n color: #fff;\n font-family: monospace;\n padding: 0.2em;\n border-radius: 0.2em;\n}\n</style>",'\n <div style="margin-left: -47px; margin-bottom: 3px;" class="tooltiptext caret-mid">\n Rephrase').concat(e.rephraseShortcut?' <span class="shortcut-key">'+e.rephraseShortcut+"</span>":"",'\n </div>\n <img class="sapling-rephrase-wand" src="').concat(Ye("assets/fa-wand-magic-sparkles-solid.svg"),'" />\n <img class="sapling-rephrase-spinner" src="').concat(Ye("assets/fa-spinner-solid-white.svg"),'" />\n </div>\n ')),e.rephraseWand=e.rephraseButton.find(".sapling-rephrase-wand").first(),e.rephraseSpinner=e.rephraseButton.find(".sapling-rephrase-spinner").first(),e.rephraseSpinner.hide();var r=e.shadowHost.shadowRoot;Rr(r).append(e.rephraseButton),e.rephraseButton.get(0).addEventListener("mousedown",(function(t){1===t.which&&(Gr.toggleControls(),t.preventDefault(),t.stopPropagation())})),t.positionButton()}),(function(t){}))))}},{key:"show",value:function(){var e=this;setTimeout((function(){var n=$r();n&&n.toString().trim()&&(t.positionButton(),e.rephraseButton.fadeIn(50))}),200)}},{key:"hide",value:function(){this.rephraseButton&&this.rephraseButton.hide()}}],[{key:"positionButton",value:function(){var t=$r();if(t&&t.toString().trim()){var e=function(){var t=document.activeElement;if(!Nr(t))return null;for(;t.parentElement;){var e=t.parentElement;if(!Nr(e))break;t=e}return t}();if(e){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect();n.top>r.top-Wr?Rr("sapling-rephrase-button").css({left:r.x+r.width+5+window.scrollX,top:r.y+window.scrollY,position:"absolute"}):Rr("sapling-rephrase-button").css({left:r.x+r.width+5+window.scrollX,top:r.y-5-Wr+window.scrollY,position:"absolute"})}}}}]),t}(),Jr=function(){function t(e){qr(this,t),this.shadowHost=e,this.activeRange=null,this.rephraseContainer=null,this.rephraseCandidatesContainer=null,this.rephraseStatusMessage=null,this.rephraseType="paraphrase",this.toneMapping="straightforward"}return zr(t,[{key:"setRephraseType",value:function(t){var e=Rr(t).attr("data-rephrase-type");this.rephraseType=e,Rr(t).parent().find(".sapling-rephrase-type-active").removeClass("sapling-rephrase-type-active"),Rr(t).addClass("sapling-rephrase-type-active"),this.queryAndUpdate()}},{key:"setToneMapping",value:function(t){var e=Rr(t).attr("data-tone-mapping");this.toneMapping=e,Rr(t).parent().find(".sapling-tone-mapping-active").removeClass("sapling-tone-mapping-active"),Rr(t).addClass("sapling-tone-mapping-active"),this.queryAndUpdate()}},{key:"createUIElements",value:function(){if(Ae()&&!this.rephraseContainer){Rr(this.shadowHost.shadowRoot).find(".sapling-rephrase-container").remove(),this.rephraseContainer=Rr('\n <div class="sapling-rephrase-container" style="display: none;">\n '.concat('<style type="text/css">\n.sapling-rephrase-container {\n z-index: 2147483646;\n display: block;\n max-width: 500px;\n min-width: 300px;\n margin: 0;\n padding: 0;\n border: 1px solid rgba(0, 0, 93, 0.1);\n border-radius: 0.5em;\n background-color: #fff;\n box-shadow: 5px 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);\n font-size: .875rem;\n font-weight: 500;\n font-family: roboto, helvetica, arial;\n}\n.sapling-rephrase-candidates {\n}\n.sapling-rephrase-candidate {\n display: block;\n padding: 0.8em;\n border-bottom: 1px solid #c5cae9;\n background-color: #fff;\n color: #3f51b5;\n pointer-events: auto;\n cursor: pointer;\n}\n.sapling-rephrase-candidate:hover {\n background-color: #e8eaf6;\n}\n.sapling-rephrase-status-bar {\n display: flex;\n justify-content: space-between;\n text-align: right;\n background-color: #e8eaf6;\n color: #5c6bc0;\n font-size: 0.9em;\n padding: 0.4em;\n}\n.sapling-rephrase-types {\n display: block;\n padding: 0.4em 0.6em;\n border-bottom: 1px solid #ccc;\n pointer-events: auto;\n}\n.sapling-rephrase-type {\n display: inline-block;\n height: 16px;\n width: 16px;\n opacity: 0.9;\n padding: 0.4em;\n border: 1px solid #fff;\n border-radius: 0.2em;\n cursor: pointer;\n}\n.sapling-rephrase-type img {\n height: 16px;\n width: 16px;\n}\n.candidate-copy-icon {\n display: inline-block;\n visibility: hidden;\n opacity: 0.5;\n height: 15px;\n width: 15px;\n float: right;\n cursor: pointer;\n}\n.sapling-rephrase-candidate:hover .candidate-copy-icon {\n visibility: visible;\n color: #c5cae9;\n}\n.sapling-rephrase-type:hover {\n background-color: #c5cae9;\n}\n.sapling-rephrase-type-paraphrase {\n}\n.sapling-rephrase-type-formal {\n}\n.sapling-rephrase-type-informal {\n}\n.sapling-rephrase-type-split {\n}\n.sapling-rephrase-type-active {\n border: 1px solid #7986cb;\n background-color: #c5cae9;\n}\n.sapling-rephrase-type .tooltiptext {\n margin-left: -47px !important;\n margin-bottom: 5px;\n}\n.sapling-rephrase-status-message {\n display: inline-block;\n font-size: 9pt;\n}\n\n.dropdown-menu {\n display: none;\n position: absolute;\n top: 28px;\n left: -2px;\n margin: 0;\n padding: 3px;\n background-color: #fff;\n border: 1px solid #eee;\n border-radius: 3px;\n font: 10pt "San Francisco", "Segoe UI", arial;\n box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);\n}\n.dropdown-menu li {\n display: block;\n padding: 5px;\n margin: 0;\n border-radius: 2px;\n}\n.dropdown-menu li:hover {\n background-color: #eee;\n}\n.sapling-rephrase-type {\n position: relative;\n}\n.sapling-rephrase-type-active .dropdown-menu {\n list-style-type: none;\n}\n.sapling-rephrase-type-active:hover .dropdown-menu {\n display: block;\n}\n.sapling-tone-mapping-active {\n background-color: #eee;\n}\n</style>',"\n ").concat("<style>/* From badge controls */\n.sapling-rephrase-button:hover .tooltiptext, .sapling-rephrase-type:hover .tooltiptext {\n display: block;\n transition-delay: 500ms;\n}\n.tooltiptext {\n z-index: 2147483647;\n display: none;\n\n width: 80px;\n\n position: absolute;\n bottom: 100%;\n left: 50%;\n\n margin-bottom: -3px;\n padding: 7px;\n\n font-size: 12px;\n font-family: 'Helvetica', 'Arial', sans-serif;\n background-color: black;\n color: #fff;\n text-align: center;\n border-radius: 7px;\n user-select: none;\n pointer-events: none;\n\n}\n\n.caret-right::after {\n content: \" \";\n position: absolute;\n top: 100%;\n left: 85%;\n margin-left: -4px;\n border-width: 4px;\n border-style: solid;\n border-color: black transparent transparent transparent;\n}\n\n.caret-mid::after {\n content: \" \";\n position: absolute;\n top: 100%;\n left: 50%;\n margin-left: -4px;\n border-width: 4px;\n border-style: solid;\n border-color: black transparent transparent transparent;\n}\n\n.shortcut-key {\n display: inline-block;\n background-color: #555;\n color: #fff;\n font-family: monospace;\n padding: 0.2em;\n border-radius: 0.2em;\n}\n</style>",'\n <div class="sapling-rephrase-types">\n <div class="sapling-rephrase-type sapling-rephrase-type-paraphrase" data-rephrase-type="paraphrase" title="Paraphrase">\n <div style="margin-left: -176px" class="tooltiptext caret-mid">Paraphrase</div>\n <img src="').concat(Ye("assets/fa-rotate-solid.svg"),'" />\n </div>\n <div class="sapling-rephrase-type sapling-rephrase-type-formal" data-rephrase-type="informal_to_formal" title="Formal">\n <img src="').concat(Ye("assets/fa-black-tie.svg"),'" />\n <div style="margin-left: -141px" class="tooltiptext caret-mid">Make formal</div>\n </div>\n \x3c!--<div class="sapling-rephrase-type sapling-rephrase-type-informal" data-rephrase-type="formal_to_informal" title="Informal">\n <img src="').concat(Ye("assets/fa-shirt-solid.svg"),'" />\n </div>--\x3e\n <div class="sapling-rephrase-type sapling-rephrase-type-split" data-rephrase-type="sentence_split" title="Split">\n <img src="').concat(Ye("assets/fa-scissors-solid.svg"),'" />\n <div style="margin-left: -107px" class="tooltiptext caret-mid">Split</div>\n </div>\n <div class="sapling-rephrase-type sapling-rephrase-type-tone" data-rephrase-type="switch_tone" title="Tone">\n <div class="dropdown-toggle">\n <img src="').concat(Ye("assets/fa-smile-solid.svg"),'" />\n <div style="margin-left: -74px" class="tooltiptext caret-mid">Switch Tone</div>\n <div class="dropdown-menu-wrapper">\n <ul class="dropdown-menu">\n <li class="sapling-tone-mapping" data-tone-mapping="straightforward">Straightforward</li>\n <li class="sapling-tone-mapping" data-tone-mapping="confident">Confident</li>\n <li class="sapling-tone-mapping" data-tone-mapping="friendly">Friendly</li>\n <li class="sapling-tone-mapping" data-tone-mapping="empathetic">Empathetic</li>\n </ul>\n </div>\n </div>\n </div>\n </div>\n <div class="sapling-rephrase-candidates">\n </div>\n <div class="sapling-rephrase-status-bar">\n <div style="display: flex"><img src="').concat(Ye("assets/sapling-logo-small-white.svg"),'" style="height: 16px" /></div>\n <div class="sapling-rephrase-status-message"></div>\n </div>\n </div>\n '));var t=this.shadowHost.shadowRoot;Rr(t).append(this.rephraseContainer),this.rephraseCandidatesContainer=this.rephraseContainer.find(".sapling-rephrase-candidates").first(),this.rephraseStatusMessage=this.rephraseContainer.find(".sapling-rephrase-status-message").first(),this.rephraseSpinner=this.rephraseContainer.find(".sapling-rephrase-spinner").first(),Gr=this,this.rephraseContainer.find(".sapling-rephrase-type").each((function(t,e){Rr(e).attr("data-rephrase-type")===Gr.rephraseType?Rr(e).addClass("sapling-rephrase-type-active"):Rr(e).removeClass("sapling-rephrase-type-active");Rr(e).on("mousedown",{el:e},(function(t){t.preventDefault(),t.stopPropagation(),Gr.setRephraseType(t.data.el)}))})),this.rephraseContainer.find(".sapling-tone-mapping").each((function(t,e){Rr(e).attr("data-tone-mapping")===Gr.toneMapping?Rr(e).addClass("sapling-tone-mapping-active"):Rr(e).removeClass("sapling-tone-mapping-active");Rr(e).on("mousedown",{el:e},(function(t){t.preventDefault(),t.stopPropagation(),Gr.setToneMapping(t.data.el)}))})),this.showControls()}}},{key:"positionControls",value:function(){if(this.activeRange){var t=this.activeRange.getBoundingClientRect(),e=Rr("sapling-rephrase-controls").height();t.y<window.innerHeight-e||t.y<e/2?Rr("sapling-rephrase-controls").css({left:t.x+window.scrollX,top:t.y+t.height+window.scrollY,position:"absolute"}):Rr("sapling-rephrase-controls").css({left:t.x+window.scrollX,top:t.y-e+window.scrollY-2,position:"absolute"})}}},{key:"showControls",value:function(){this.activeRange=$r(),this.activeRange&&this.activeRange.toString().trim()&&(this.queryAndUpdate(),this.rephraseContainer.show(),this.positionControls())}},{key:"hideControls",value:function(){this.activeRange=null,this.rephraseContainer&&this.rephraseContainer.hide()}},{key:"toggleControls",value:function(){this.rephraseContainer&&(this.rephraseContainer.is(":visible")?this.hideControls():this.showControls())}},{key:"loadingOn",value:function(){this.setStatus("Loading suggestions..."),this.rephraseCandidatesContainer.html(""),Yr.rephraseWand.hide(),Yr.rephraseSpinner.show()}},{key:"loadingOff",value:function(){this.setStatus("Ready."),Yr.rephraseSpinner.hide(),Yr.rephraseWand.show()}},{key:"queryAndUpdate",value:function(){var t=this;this.loadingOn();var e,n,r,i,o,a,s=this.activeRange.toString();e=s,n=this.rephraseType,r={tone_mapping:this.toneMapping},i="TODO-SESSION-ID",o=function(e){t.updateCandidates(e.rephrases.results),t.loadingOff()},a=function(e){t.loadingOff(),e&&s.length>250?t.setStatus("Error: selected text too long"):t.setStatus("Unexpected error")},ht("request/GET_REPHRASE",{html:w()(e,256),mapping:n,metadata:r,sessionId:i,context:Dt()},o,a)}},{key:"updateCandidates",value:function(e){var n=this;this.rephraseCandidatesContainer.html("");var r,i=Mr(e);try{var o=function(){var e=r.value,i=Rr('<div class="sapling-rephrase-candidate" data-candidate-hash="'.concat(e.hash,'">\n <span>').concat(e.replacement,'</span>\n <img class="candidate-copy-icon" src="').concat(Ye("assets/fa-copy-regular.svg"),'" title="Copy" />\n </div>'));i.find(".candidate-copy-icon").first().mousedown((function(e){t.copyCandidate(i,e)})),n.rephraseCandidatesContainer.append(i)};for(i.s();!(r=i.n()).done;)o()}catch(t){i.e(t)}finally{i.f()}this.rephraseCandidatesContainer.find(".sapling-rephrase-candidate").each((function(t,e){var n=e.innerText;e.addEventListener("mousedown",(function(t){Gr.acceptCandidate(n,document.activeElement,Rr(e).attr("data-candidate-hash")),t.preventDefault(),t.stopPropagation()}))})),this.positionControls()}},{key:"acceptCandidate",value:function(t,e,n){if(this.activeRange){var r=this.activeRange,i=U(e),o=H(e)||i;i?fn(e,r.startOffset,r.endOffset,t):gn(r,t,e),function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];ht("request/POST_REPHRASE",{rephraseHash:t,context:mt(mt({},Dt(n)),r),action:i?"hover":e?"accept":"reject",sessionId:n})}(n,!0,o,{}),this.hideControls()}}},{key:"setStatus",value:function(t){this.rephraseStatusMessage.text(t)}}],[{key:"copyCandidate",value:function(t,e){e.preventDefault(),e.stopPropagation(),function(t){function e(e){e.clipboardData.setData("text/html",t),e.clipboardData.setData("text/plain",t),e.preventDefault()}document.addEventListener("copy",e),document.execCommand("copy"),document.removeEventListener("copy",e)}(t[0].querySelector("span").innerText),Gr.setStatus("Text copied.")}}]),t}();function Xr(){return[Gr,Yr]}function Kr(){Gr&&Gr.hideControls(),Yr&&Yr.hide()}function Qr(t,e){return Yr||(Yr=new Vr(e)).createUIElements(),Gr||(Gr=new Jr(t)).createUIElements(),[Gr,Yr]}var Zr=n(563);function ti(t){return ti="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ti(t)}function ei(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||oi(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ni(){ni=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function c(t,e,n,i){var o=e&&e.prototype instanceof p?e:p,a=Object.create(o.prototype),s=new _(i||[]);return r(a,"_invoke",{value:w(t,n,s)}),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function p(){}function d(){}function h(){}var g={};u(g,o,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(S([])));y&&y!==e&&n.call(y,o)&&(g=y);var m=h.prototype=p.prototype=Object.create(g);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function D(t,e){function i(r,o,a,s){var u=l(t[r],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==ti(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,s)}),(function(t){i("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return i("throw",t,a,s)}))}s(u.arg)}var o;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){i(t,n,e,r)}))}return o=o?o.then(r,r):r()}})}function w(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return C()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=x(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function x(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=l(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,f;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function S(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return d.prototype=h,r(m,"constructor",{value:h,configurable:!0}),r(h,"constructor",{value:d,configurable:!0}),d.displayName=u(h,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,u(t,s,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(D.prototype),u(D.prototype,a,(function(){return this})),t.AsyncIterator=D,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new D(c(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(m),u(m,s,"Generator"),u(m,o,(function(){return this})),u(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=S,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),A(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function ri(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function ii(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){ri(o,r,i,a,s,"next",t)}function s(t){ri(o,r,i,a,s,"throw",t)}a(void 0)}))}}function oi(t,e){if(t){if("string"==typeof t)return ai(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ai(t,e):void 0}}function ai(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function si(t){Zr(t).find("*").each((function(t,e){var n,r=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=oi(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(e.attributes);try{for(r.s();!(n=r.n()).done;){var i=n.value;"data-sapling-ignore"!==i.name&&e.removeAttribute(i.name)}}catch(t){r.e(t)}finally{r.f()}}))}function ui(t){if("textarea"===t.type)return t.value;var e=t.cloneNode(!0);Zr(e).find("script").remove(),Zr(e).find("style").remove(),Zr(e).find("xml").remove(),function(t){Zr(t).find(".gmail_quote").remove(),Zr(t).find(".gmail_attr").remove()}(e);for(var n=e.firstChild;null!==n;){var r=n.nodeType;if(r!==Node.TEXT_NODE&&r!==Node.ELEMENT_NODE){var i=n;if(i.nextSibling)n=i.nextSibling;else{var o=i.parentNode;if(o)for(;o!==e;){if(o.nextSibling){n=o.nextSibling;break}o=o.parentNode}else n=null}i.remove()}else n=j(n,e)}return si(e),k(e.innerHTML||"")}function ci(t,e,n,r,i,o){var a=n,s=r,u=I(a,s,i.startIndex+e,t,!1,!1);if(null===u)return[a,s];var c=u.domElement,l=u.domOffset,f=I(a=c,s=u.indexSum,i.endIndex+e,t,!1,!0);if(null===f)return[a,s];var p=f.domElement,d=f.domOffset;a=p,s=f.indexSum;var h=function(t,e,n,r,i,o){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=document.createRange();if(s.setStart(e,n),s.setEnd(r,i),!Oa(s,o))return null;return function(t,e,n,r){var i=r,o=H(t);if(!(o in Qs))return;if(n.editId in Qs[o].edits){if(Oa(Qs[o].edits[n.editId].editRange,n,!1))return void(i&&delete i[n.editId])}if(i)for(var a=0,s=Object.keys(i);a<s.length;a++){var u=s[a],c=i[u],l=c.edit,f=c.editRange;if(jr(f,e)){if(f.toString()===e.toString()){l.editId in Qs[o].edits&&!Qs[o].edits[u].isHover&&hu(o,l.editId),delete i[u];break}hu(o,u),delete i[u]}}n.editId in Qs[o].edits?(Qs[o].edits[n.editId].edit=n,Qs[o].edits[n.editId].editRange=e):Qs[o].edits[n.editId]={editRange:e,edit:n,domElements:[],isHover:!1};du(o,n.editId)}(t,s,o,a)}(t,c,l,p,d,i,o);return h&&(a=h,s=i.startIndex+e),[a,s]}function li(t,e,n){return fi.apply(this,arguments)}function fi(){return(fi=ii(ni().mark((function t(e,n,r){var i,o;return ni().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=I(e,0,n,e,!1,!1)){t.next=3;break}return t.abrupt("return",[]);case 3:if(o=I(i.domElement,i.indexSum,r,e,!1,!0)){t.next=6;break}return t.abrupt("return",[]);case 6:return t.next=8,Du(e,i.domElement,i.domOffset,o.domElement,o.domOffset);case 8:return t.abrupt("return",t.sent);case 9:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function pi(t,e,n,r){return di.apply(this,arguments)}function di(){return(di=ii(ni().mark((function t(e,n,r,i){var o,a,s,u,c,l,f,p,d;return ni().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("SDK"!==h.MODE||Sapling.edits){t.next=2;break}return t.abrupt("return");case 2:return o=Object.keys(n).map((function(t){return n[t]})).sort((function(t,e){return t.sortId-e.sortId})),t.next=5,li(e,r,r+i);case 5:a=t.sent,s=e,u=0,c=1,l=0;case 10:if(!(l<o.length)){t.next=23;break}if(f=o[l],p=ci(e,r,s,u,f,a),d=ei(p,2),s=d[0],u=d[1],++c%10!=0){t.next=20;break}return t.next=20,new Promise((function(t){return setTimeout(t,0)}));case 20:l+=1,t.next=10;break;case 23:return a&&gu(e,Object.keys(a)),t.abrupt("return",!0);case 25:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var hi=n(563);function gi(t,e){var n=function(t){for(var e=t&&t.parentNode;e;){if("[object ShadowRoot]"===e.toString())return e;e=e.parentNode}return!1}(t);return(n?e&&!function(t,e){for(var n=e.parentNode||e.host;null!=n;){if(n===t)return!0;n=n.parentNode||n.host}return!1}(e.contentDocument,n)?e.contentDocument:n:e?e.contentDocument:window).getSelection().getRangeAt(0)}function vi(t){var e,n=function(t){for(var e=null,n=t;n&&"IFRAME"===n.nodeName;){e=n;var r=n.contentDocument;if(r||(r=Y(n).contents()[0]),!r)return{deepestIframe:null,deepFocusedElement:null};n=tt(r)}return{deepestIframe:e,deepFocusedElement:n}}(t),r=n.deepestIframe,i=n.deepFocusedElement;if(!i)return null;"true"===i.getAttribute("contenteditable")||""===i.getAttribute("contenteditable")||"plaintext-only"===i.getAttribute("contenteditable")?e={deepestIframe:r,isContentEditable:!0,isTextarea:!1,element:i,range:gi(i,r)}:e=V(i)?{deepestIframe:r,isContentEditable:!1,isTextarea:!0,element:i,start:i.selectionStart,end:i.selectionEnd}:{deepestIframe:r,isContentEditable:!1,isTextarea:!1,element:i};return e}function yi(t){var e=window.getSelection();e.getRangeAt&&e.rangeCount&&function(t,e){var n=t.startContainer,r=t.startOffset,i=t.endContainer,o=t.endOffset,a={inputType:"insertText",data:e,bubbles:!0,cancelable:!1,targetRanges:[new StaticRange({startContainer:n,startOffset:r,endContainer:i,endOffset:o})]};t.startContainer.dispatchEvent(new InputEvent("beforeinput",a)),n===i?n.replaceData(r,o-r,e):n.insertData(r,e),t.selectNodeContents(i),t.collapse(!1)}(e.getRangeAt(0),t)}function mi(t){if("TEXTAREA"===t.nodeName||"INPUT"===t.nodeName){var e=function(t,e,n){if(!Di)throw new Error("textarea-caret-position#getCaretCoordinates should only be called in a browser");var r=n&&n.debug||!1;if(r){var i=document.querySelector("#input-textarea-caret-position-mirror-div");i&&i.parentNode.removeChild(i)}var o=document.createElement("div");o.id="input-textarea-caret-position-mirror-div",document.body.appendChild(o);var a=o.style,s=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,u="INPUT"===t.nodeName;a.whiteSpace="pre-wrap",u||(a.wordWrap="break-word");a.position="absolute",r||(a.visibility="hidden");bi.forEach((function(t){if(u&&"lineHeight"===t)if("border-box"===s.boxSizing){var e=parseInt(s.height),n=parseInt(s.paddingTop)+parseInt(s.paddingBottom)+parseInt(s.borderTopWidth)+parseInt(s.borderBottomWidth),r=n+parseInt(s.lineHeight);a.lineHeight=e>r?e-n+"px":e===r?s.lineHeight:0}else a.lineHeight=s.height;else a[t]=s[t]})),wi?t.scrollHeight>parseInt(s.height)&&(a.overflowY="scroll"):a.overflow="hidden";o.textContent=t.value.substring(0,e),u&&(o.textContent=o.textContent.replace(/\s/g,"\xa0"));var c=document.createElement("span");c.textContent=t.value.substring(e)||".",o.appendChild(c);var l={top:c.offsetTop+parseInt(s.borderTopWidth),left:c.offsetLeft+parseInt(s.borderLeftWidth),height:parseInt(s.fontSize)};r?c.style.backgroundColor="#aaa":document.body.removeChild(o);return l}(t,t.selectionEnd),n=t.getBoundingClientRect();return{left:n.left+e.left-hi(t).scrollLeft(),top:n.top+e.top-hi(t).scrollTop(),height:e.height}}var r=t.getRootNode().getSelection().getRangeAt(0);if(0===r.startOffset){r=r.cloneRange();try{r.setEnd(r.startContainer,1)}catch(t){var i=r.startContainer.getBoundingClientRect(),o=hi(r.startContainer),a=parseInt(o.css("padding-top"))+parseInt(o.css("border-top-width"))+parseInt(o.css("font-size")),s=parseInt(o.css("padding-left"))+parseInt(o.css("border-left-width"));return{left:i.left+s,top:i.top,height:a}}}var u=r.getBoundingClientRect();if(0===u.x&&0===u.y){var c=document.createTextNode("\ufeff");r.insertNode(c),u=r.getBoundingClientRect(),c.remove()}return u}var bi=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"],Di="undefined"!=typeof window,wi=Di&&null!=window.mozInnerScreenX;var xi=n(563),Ei=["fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","fontFamily","textAlign","textTransform","letterSpacing","wordSpacing","tabSize"];function Ai(t,e){var n=getComputedStyle(t);xi(Ei).each((function(t,r){e.style[r]=n[r]}))}var _i=n(563);function Si(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Ci(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ci(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ci(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var ki=null,Oi="",Ti="",Fi=null;function ji(){_i("sapling-complete").length&&(ki=_i("sapling-complete")[0].shadowRoot,_i("#sapling-complete-div-box",ki).css("visibility","hidden"),_i(ki).text(""),Fi=null)}function Li(t){var e=[],n=0;if("TEXTAREA"===t.nodeName)e=t.value.split("\n"),n=t.selectionEnd;else{if("function"!=typeof t.getRootNode().getSelection)return[e,n];var r=t.getRootNode().getSelection(),i=r.anchorNode;if(!i)return[e,n];e=i.textContent.split("\n"),n=r.focusOffset}return[e,n]}function Ii(t){for(var e=Si(Li(t),2),n=e[0],r=e[1],i=0,o="",a=0;a<n.length;a++){if(""!==o?o+=" "+n[a]:o=n[a],i+n[a].length>=r)return o;i+=n[a].length+1}return""}function Ni(){try{return ki=_i("sapling-complete")[0].shadowRoot,_i(ki).find("span").first().attr("completion-hash")}catch(t){return""}}function Bi(t,e){var n=function(t){if(O(t))return t;for(var e=A(t).parentsUntil("body"),n=0;n<e.length;n+=1){var r=e[n];if(O(r))return r}return null}(e);if(null!==n){var r=m(),i=_i(n).css("overflow");_i(n).css("overflow","hidden"),"messenger.com"!==r&&"facebook.com"!==r||_i("html").attr("style","overflow: hidden !important;"),t(),_i(n).css("overflow",i),"facebook.com"===r&&_i("html").attr("style","")}else t()}function Ri(t,e,n){if(""!==e){var r=Ni();n&&"query"in n&&(Oi=n.query,Ti=n.model_version,r=n.hash);var i=_i("sapling-complete");ki=i[0].shadowRoot;var o=de();o||(o="`");var a='<span title="Hit the backtick or tab key to use Sapling\'s completion." style="margin-left: 1em; background: #ccc; font-weight: 500; border-radius: 0.2em; line-height: 0.6em; padding: 0 0.4em 0 0.3em;">'.concat(o,"</span>");ki.innerHTML='\n <style type="text/css">\n #sapling-complete-div {\n margin: 0;\n padding: 0;\n\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n\n color: #3f51b5;\n opacity: 0.5;\n\n -webkit-user-select: none; /* Safari */\n -moz-user-select: none; /* Firefox */\n -ms-user-select: none; /* IE10+/Edge */\n user-select: none; /* Standard */\n }\n #sapling-complete-div-box {\n z-index: 2147483647 !important;\n display: table;\n margin: 0;\n padding: 0;\n }\n </style>\n '+'<div id="sapling-complete-div-box"><div id="sapling-complete-div"><span completion-hash="'.concat(r,'">').concat(e.replace(" "," "),"</span>").concat(a,"</div></div>");var s=_i("#sapling-complete-div",ki),u=mi(t);if(void 0!==u){if(Fi=vi(t),"TEXTAREA"===t.nodeName)Ai(t,s[0]);else{for(var c=t.getRootNode().getSelection().anchorNode;c.nodeType===Node.TEXT_NODE;)c=c.parentNode;Ai(c,s[0])}var l=_i("#sapling-complete-div-box",ki);l.offset({top:u.top+window.scrollY,left:u.left+window.scrollX});var f=t.getBoundingClientRect(),p=l.offset().left+l.width()-(f.left+f.width);p>0?s.css("max-width",l.width()-p):s.css("max-width",""),Bi((function(){l.css("visibility","visible")}),t)}}else ji()}function Pi(){try{ki=_i("sapling-complete")[0].shadowRoot}catch(t){return""}return _i(ki).find("span").first().text().replace(/\u00A0/g," ")}function Mi(t){Ri(t,Pi().substring(1))}function Hi(t,e){var n,r=t.key,i=de();if("Tab"===r||"ArrowRight"===r||!i&&"`"===r||i&&r===i){if(!function(t,e){if(!t||!e)return!1;if(t.isContentEditable){var n=t.range,r=e.range;return n.startContainer===r.startContainer&&n.startOffset===r.startOffset&&n.endContainer===r.endContainer&&n.endOffset===r.endOffset}return!!t.isTextarea&&t.start===e.start&&t.end===e.end}(vi(e),Fi))return;var o=Pi();if(""===o&&"chatTextArea"!==e.getAttribute("id"))return;if(t.preventDefault(),P(e)){var a={inputType:"insertText",data:o,bubbles:!0,cancelable:!1},s=window.getSelection().getRangeAt(0);setTimeout((function(){s.startContainer.dispatchEvent(new InputEvent("beforeinput",a))}),100)}else e.className.includes("ck-editor")?yi(o):(n=o,document.execCommand("insertText",!1,n));var u=Ni(),c=H(t.target);ji(),function(t,e,n,r){ht("request/POST_COMPLETION",{completionHash:t,context:mt(mt({},Dt(n)),r),action:"accept",sessionId:n})}(u,0,c,{query:Oi,completion:o,model_version:Ti})}}var qi=!0;function Ui(t){qi=t}function zi(){ht("makeToolbarIconActive")}function Wi(){ht("makeToolbarIconInactive")}function Gi(t){ht("updateToolbarIconEditCount",{editCount:t})}function Yi(){ht("updateToolbarIconDisconnected")}var $i=n(974),Vi=n.n($i),Ji=n(137);new Ji("https://sapling.ai").hostname,new Ji("https://api.sapling.ai").hostname;n(137);var Xi,Ki=n(563),Qi=null;function Zi(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(Ki("#slidecheck").attr("disabled",Ee()),Ki("#slidecheck").attr("checked",me()),Ki("#advanced-edits-slidecheck").attr("disabled",Ee()),Ki("#advanced-edits-slidecheck").attr("checked",be()),Ki("#complete-slidecheck").attr("disabled",!ue()),Ki("#complete-slidecheck").attr("checked",we()),Ki("#badge-slidecheck").attr("checked",Te()),Ki("#tone-slidecheck").attr("checked",Oe()),Ki("#ai-detect-slidecheck").attr("checked",Ce()),Ki("#rephrase-slidecheck").attr("checked",_e()),Ki("#lang-select").val(Le()),t)return ae()?Ki("#subscription-banner").html('Daily limit exceeded for <a href="https://sapling.ai/integrations" target="_blank">premium domain</a>.<br/> Do you need to <a href="https://sapling.ai/user/sign-in">sign in</a>?'):Ki("#subscription-banner").html('Daily limit exceeded for <a href="https://sapling.ai/integrations" target="_blank">premium domain</a>.<br/> Contact <a href="https://sapling.ai/contact" target="_blank">Sapling Sales</a> to subscribe.'),Ki("#subscription-banner").css({"font-weight":"500",border:"2px solid #555"}),void Ki("#subscription-banner").show();me()||we()?zi():Wi()}function to(t){if(ue()){var e=ge();null===e?(t.html("<strong>".concat(ce().toUpperCase(),"</strong>")),t.css({"background-color":"#deefde",border:"0"}),Ki("#team-premium-banner").hide()):(e<=1?t.html('<a target="_blank" href="https://sapling.ai/plans"><strong'.concat(ce().toUpperCase(),"</strong></a> (<strong>1 day</strong> left)")):t.html('<a target="_blank" href="https://sapling.ai/plans"><strong>'.concat(ce().toUpperCase(),"</strong></a> (<strong>").concat(e," days</strong> left)")),t.css({"background-color":"#fff3cd",color:"#856404",border:"1px solid #ffeeba"})),t.show()}else se()?(t.html('<a target="_blank" href="https://sapling.ai/plans"><strong>Upgrade</strong></a> or sign in to see premium edits.'),t.css({"background-color":"#fff3cd",border:"0",color:"#856404"})):ae()||se()?(t.html('<strong><a target="_blank" href="'.concat(h.WEBSITE_URL,'/user/register">Sign up</a></strong>')),t.css({"background-color":"#fff3cd",border:"0",color:"#856404"})):(t.html("<strong>Please confirm your email using the link in email we sent you.</strong>"),t.css({"background-color":"#fff3cd",border:"0",color:"#856404"})),t.show()}Vi().debounce((function(){Qi.postMessage(Xi.innerHTML)}),200,{leading:!1,trailing:!0});var eo=n(563);function no(t){return no="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},no(t)}function ro(){ro=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function c(t,e,n,i){var o=e&&e.prototype instanceof p?e:p,a=Object.create(o.prototype),s=new _(i||[]);return r(a,"_invoke",{value:w(t,n,s)}),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function p(){}function d(){}function h(){}var g={};u(g,o,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(S([])));y&&y!==e&&n.call(y,o)&&(g=y);var m=h.prototype=p.prototype=Object.create(g);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function D(t,e){function i(r,o,a,s){var u=l(t[r],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==no(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,s)}),(function(t){i("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return i("throw",t,a,s)}))}s(u.arg)}var o;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){i(t,n,e,r)}))}return o=o?o.then(r,r):r()}})}function w(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return C()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=x(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function x(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=l(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,f;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function S(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return d.prototype=h,r(m,"constructor",{value:h,configurable:!0}),r(h,"constructor",{value:d,configurable:!0}),d.displayName=u(h,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,u(t,s,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(D.prototype),u(D.prototype,a,(function(){return this})),t.AsyncIterator=D,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new D(c(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(m),u(m,s,"Generator"),u(m,o,(function(){return this})),u(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=S,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),A(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function io(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}var oo=new Set;function ao(t,e,n,r){var i;return i=[],Object.keys(Ho).forEach((function(t){var e=Ho[t];Object.keys(e).forEach((function(t){i.push(e[t])}))})),Object.keys(qo).forEach((function(t){i.push(qo[t])})),i.filter((function(t){return t.isLoading})).length>0&&function(t){var e=Qs[t];if(!e||!e.badge)return;e.badge.showSpinner()}(r),ht("makeToolbarIconLoading"),function(t){var e=Qs[t];if(!e)return;if(!e.annotationsOverlay)return;e.annotationsOverlay.queryAndUpdate()}(r),function(t,e,n,r){ht("request/GET_EDITS",{html:w()(t,2097152),sessionId:e,context:Dt()},n,r)}(t,r,function(){var t,i=(t=ro().mark((function t(i){var o,a;return ro().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(o=i.edits).includes("throttled")){t.next=7;break}return bn(),ht("makeToolbarIconThrottled"),iu(r),"sapling-embedded-editable"===n.id&&Zi(!0),t.abrupt("return");case 7:return Vo(r,e),Go(),a=0,t.next=12,Jo(n,r,e,o);case 12:a=eu(n),Ui(!0),a>0&&!oo.has(r)&&(Et("edits_applied",{num_edits:a},r),oo.add(r)),qi&&("sapling-embedded-editable"===n.id?zi():Gi(a)),ru(r),au(r),ou(r);case 19:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){io(o,r,i,a,s,"next",t)}function s(t){io(o,r,i,a,s,"throw",t)}a(void 0)}))});return function(t){return i.apply(this,arguments)}}(),(function(t){Ui(!1),Yi(),ru(r),function(t){var e=Qs[t];if(!e)return;if(!e.badge)return;e.badge.showErrorState()}(r)}))}function so(t,e){if(function(){if(!_i("sapling-complete").length){var t=_i("<sapling-complete></sapling-complete>");t.css({display:"inline",width:0,height:0});var e=t[0];e.attachShadow({mode:"open"}),ki=e.shadowRoot,_i("html").append(t)}}(),ji(),!function(t){for(var e=Si(Li(t),2),n=e[0],r=e[1],i=0,o=0;o<n.length;o++){var a=i+n[o].length;if(i<=r&&a>r)return!0;i=a+1}return!1}(t=eo(t)[0])){var n=Ii(t);eo.trim(n)&&function(t,e,n,r){ht("request/GET_COMPLETION",{query:t.slice(-300),sessionId:e,context:Dt()},n,r)}(n,e,(function(e){if(Ii(t)===n){var r=e.completion;eo.trim(r.output)&&Ri(t,r.output,r)}else ji()}),(function(){Ui(!1),Yi()}))}}function uo(t,e,n,r){var i={hidden:document.hidden};return Object.assign(i,r),function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=Dt();Object.assign(o,i),ht("request/GET_SUGGEST",{query:t.slice(-300),multiquery:e,context:o},n,r)}(t,e,(function(t){n(t)}),(function(){}),i)}function co(t,e,n){!function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=Dt();Object.assign(i,r),ht("request/GET_MATCH_SUGGEST",{inp:t.slice(-300),context:i},e,n)}(t,(function(t){e(t)}),(function(){}),n)}function lo(t,e,n){if(!n.isPointInRange(t,e))return null;var r=n.cloneRange();return r.setEnd(t,e),r.toString().length}function fo(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=document.createRange();if(n.selectNodeContents(t),e)return t.selectionStart;if(!t.getRootNode().getSelection)return 0;var r=t.getRootNode().getSelection(),i=null,o=null;return r.anchorNode&&(i=lo(r.anchorNode,r.anchorOffset,n)),r.focusNode&&(o=lo(r.focusNode,r.focusOffset,n)),i&&o?Math.min(i,o):i||o}var po=n(563);function ho(t){return ho="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ho(t)}function go(){go=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function c(t,e,n,i){var o=e&&e.prototype instanceof p?e:p,a=Object.create(o.prototype),s=new _(i||[]);return r(a,"_invoke",{value:w(t,n,s)}),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function p(){}function d(){}function h(){}var g={};u(g,o,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(S([])));y&&y!==e&&n.call(y,o)&&(g=y);var m=h.prototype=p.prototype=Object.create(g);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function D(t,e){function i(r,o,a,s){var u=l(t[r],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==ho(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,s)}),(function(t){i("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return i("throw",t,a,s)}))}s(u.arg)}var o;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){i(t,n,e,r)}))}return o=o?o.then(r,r):r()}})}function w(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return C()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=x(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function x(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=l(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,f;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function S(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return d.prototype=h,r(m,"constructor",{value:h,configurable:!0}),r(h,"constructor",{value:d,configurable:!0}),d.displayName=u(h,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,u(t,s,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(D.prototype),u(D.prototype,a,(function(){return this})),t.AsyncIterator=D,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new D(c(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(m),u(m,s,"Generator"),u(m,o,(function(){return this})),u(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=S,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),A(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function vo(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function yo(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){vo(o,r,i,a,s,"next",t)}function s(t){vo(o,r,i,a,s,"throw",t)}a(void 0)}))}}var mo=4e3,bo=2e3,Do=8,wo=[new RegExp("[\\s\\S]{0,".concat(mo,"}</div>"),"imy"),new RegExp("[\\s\\S]{0,".concat(mo,"}</p>"),"imy"),new RegExp("[\\s\\S]{0,".concat(mo,"}<br ?/?>"),"imy"),new RegExp("[\\s\\S]{0,".concat(mo,"}(\\.|\\?|!)(?=[^>]*(<|$))"),"imy")];function xo(t,e){if(t.length-e<=bo)return t.length;for(var n=0;n<wo.length;n+=1){wo[n].lastIndex=e;var r=t.match(wo[n]);if(r)return e+r[0].length}return e+mo}function Eo(t){var e=0,n=null;if(0===t.length)return e;for(n=0;n<t.length;n+=1)e=(e<<5)-e+t.charCodeAt(n),e|=0;return e}function Ao(t){return _o.apply(this,arguments)}function _o(){return(_o=yo(go().mark((function t(e){var n,r,i,o,a,s,u;return go().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=[],r=0,i=0,o=0;case 4:if(!(r<e.length)){t.next=17;break}if(a=xo(e,r),s=e.substring(r,a),u=po("<span>".concat(s,"</span>")).text().length,n.push({html:s,htmlLength:s.length,htmlOffset:r,htmlHash:Eo(s),textOffset:i,textLength:u}),r=a,i+=u,++o%25!=0){t.next=15;break}return t.next=15,new Promise((function(t){return setTimeout(t,50)}));case 15:t.next=4;break;case 17:return t.abrupt("return",n);case 18:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function So(t,e){var n=I(t,0,e.textOffset,t,!1,!1),r=document.createRange();return r.selectNodeContents(n.domElement),r.getBoundingClientRect().top}function Co(t,e){var n=window.innerHeight/2;t.sort((function(t,r){var i=So(e,t),o=So(e,r);return Math.abs(i-n)-Math.abs(o-n)}));for(var r=0;r<t.length;r+=1){var i=t[r];i.priority=r<Do?r:100}return t}function ko(t,e){t.sort((function(t,n){return Math.abs(t.textOffset-e)-Math.abs(n.textOffset-e)}));for(var n=0;n<t.length;n+=1){var r=t[n];r.priority=n<Do?n:100}return t}function Oo(t,e){return To.apply(this,arguments)}function To(){return(To=yo(go().mark((function t(e,n){var r,i;return go().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=fo(n)||0,t.next=3,Ao(e);case 3:if(0!==(i=t.sent).length){t.next=6;break}return t.abrupt("return",[]);case 6:return t.abrupt("return",ko(i,r));case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Fo(t,e){return jo.apply(this,arguments)}function jo(){return(jo=yo(go().mark((function t(e,n){var r;return go().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Ao(e);case 2:if(0!==(r=t.sent).length){t.next=5;break}return t.abrupt("return",[]);case 5:return t.abrupt("return",Co(r,n));case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Lo=n(563);function Io(t){return Io="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Io(t)}function No(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Bo(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Bo(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Bo(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Ro(){Ro=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function c(t,e,n,i){var o=e&&e.prototype instanceof p?e:p,a=Object.create(o.prototype),s=new _(i||[]);return r(a,"_invoke",{value:w(t,n,s)}),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function p(){}function d(){}function h(){}var g={};u(g,o,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(S([])));y&&y!==e&&n.call(y,o)&&(g=y);var m=h.prototype=p.prototype=Object.create(g);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function D(t,e){function i(r,o,a,s){var u=l(t[r],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==Io(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,s)}),(function(t){i("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return i("throw",t,a,s)}))}s(u.arg)}var o;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){i(t,n,e,r)}))}return o=o?o.then(r,r):r()}})}function w(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return C()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=x(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function x(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=l(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,f;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function S(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return d.prototype=h,r(m,"constructor",{value:h,configurable:!0}),r(h,"constructor",{value:d,configurable:!0}),d.displayName=u(h,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,u(t,s,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(D.prototype),u(D.prototype,a,(function(){return this})),t.AsyncIterator=D,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new D(c(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(m),u(m,s,"Generator"),u(m,o,(function(){return this})),u(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=S,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),A(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function Po(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function Mo(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){Po(o,r,i,a,s,"next",t)}function s(t){Po(o,r,i,a,s,"throw",t)}a(void 0)}))}}var Ho={},qo={},Uo=1,zo=15e3;function Wo(t,e){if(t in Ho){var n=Ho[t];e in n&&(n[e].isLoading&&(qo[e]=n[e]),delete n[e])}}function Go(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=[];Object.keys(Ho).forEach((function(t){var n=Ho[t];Object.keys(n).forEach((function(t){e.push(n[t])}))}));var n=(new Date).getTime(),r=e.filter((function(t){return!t.isComplete})),i=e.filter((function(t){return t.isLoading&&n-t.requestTime<zo}));r.sort((function(e,n){if(t&&e.containerId!==n.containerId){if(e.containerId===t)return-1;if(e.containerId===t)return 1}return e.priority-n.priority}));var o=[];Object.keys(qo).forEach((function(t){o.push(qo[t])}));var a=o.filter((function(t){return t.isLoading&&n-t.requestTime<zo})),s=i.length+a.length;if(s<Uo)for(var u=Math.min(r.length,Uo-s),c=0;c<u;c+=1){var l=r[c];l.requestTime=(new Date).getTime(),l.isLoading=!0,l.htmlHash in qo?(l.requestObj=qo[l.htmlHash].requestObj,delete qo[l.htmlHash]):(l.requestObj=l.requestFunction(),l.requestTime=n)}}function Yo(t,e){return $o.apply(this,arguments)}function $o(){return($o=Mo(Ro().mark((function t(e,n){var r,i,o,a,s,u,c;return Ro().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=(r=ui(e)).replace(/\u00A0/g," ").replace(/\u200B/g," ").replace(/\uFEFF/g," "),i=H(e),!n){t.next=9;break}return t.next=6,Fo(r,e);case 6:o=t.sent,t.next=12;break;case 9:return t.next=11,Oo(r,e);case 11:o=t.sent;case 12:Ho[i]=Ho[i]||{},a=Ho[i],s={},u=Ro().mark((function t(){var n,r,u,l;return Ro().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=o[c],r=Lo("<span>".concat(n.html,"</span>")).text(),0!==r.replace(/(\r\n\t|\n|\r\t)/gm,"").trim().length){t.next=5;break}return t.abrupt("return","continue");case 5:if(s[n.htmlHash]=s[n.htmlHash]||[],s[n.htmlHash].push([n.textOffset,n.textLength]),!(n.htmlHash in a)){t.next=18;break}if((u=a[n.htmlHash]).priority=n.priority,!("edits"in u)){t.next=15;break}return t.next=13,pi(e,u.edits,n.textOffset,n.textLength);case 13:t.next=16;break;case 15:u.isComplete=!1;case 16:t.next=20;break;case 18:l=function(){return ao(n.html,n.htmlHash,e,i)},a[n.htmlHash]={requestFunction:l,containerId:i,priority:n.priority,hash:n.htmlHash,requestTime:null};case 20:case"end":return t.stop()}}),t)})),c=0;case 17:if(!(c<o.length)){t.next=25;break}return t.delegateYield(u(),"t0",19);case 19:if("continue"!==t.t0){t.next=22;break}return t.abrupt("continue",22);case 22:c++,t.next=17;break;case 25:Object.keys(a).forEach((function(t){t in s?a[t].textOffsets=s[t]:Wo(i,t)}));case 26:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Vo(t,e){t in Ho&&e in Ho[t]&&(Ho[t][e].isLoading=!1,Ho[t][e].isComplete=!0),e in qo&&delete qo[e]}function Jo(t,e,n,r){return Xo.apply(this,arguments)}function Xo(){return(Xo=Mo(Ro().mark((function t(e,n,r,i){var o,a,s,u,c,l,f,p,d,h,g;return Ro().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(o={},a=0,s=0;s<i.length;s+=1)u=i[s],c="".concat(u.id,":").concat(u.start.offset),o[c]={sortId:a,editId:c,editHash:u.id,startIndex:u.start.offset,endIndex:u.end.offset,startText:u.start.text,endText:u.end.text,originalText:u.original_text,replacementText:u.replacement_text,replacementContext:u.replacement_context,premium:u.premium,fillin:u.replacement_text&&u.replacement_text.includes("SAPLING_FILLIN"),description:u.description,requireLogin:u.require_login,category:u.category,generalErrorType:u.general_error_type,difficulty:u.difficulty},a+=1;if(!Ho[n]||!(r in Ho[n])){t.next=15;break}(l=Ho[n][r]).edits=o,f=l.textOffsets,p=0;case 8:if(!(p<f.length)){t.next=15;break}return d=No(f[p],2),h=d[0],g=d[1],t.next=12,pi(e,o,h,g);case 12:p+=1,t.next=8;break;case 15:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Ko=n(563);function Qo(t){return Qo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qo(t)}function Zo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(i=r.key,o=void 0,o=function(t,e){if("object"!==Qo(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Qo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===Qo(o)?o:String(o)),r)}var i,o}var ta=new WeakMap,ea="\n<style>\n .sapling-ai-detect-select-button::after {\n content: 'Run AI Detection';\n position: absolute;\n display: none;\n background-color: #333;\n color: #fff;\n padding: 5px;\n border-radius: 5px;\n width: 150px;\n left: 50%;\n transform: translateX(-50%);\n bottom: -100%;\n text-align: center;\n }\n\n .sapling-ai-detect-select-button:hover::after {\n display: block;\n }\n\n .sapling-ai-detect-select-button {\n opacity: 0.5;\n }\n\n .sapling-ai-detect-select-button:hover {\n opacity: 1;\n }\n\n .sapling-ai-detect-select-content {\n width: 80vw;\n min-height: 40vh;\n max-height: 90vh;\n background: white;\n border-radius: 20px;\n position: fixed;\n overflow: hidden;\n top: 5vh;\n left: 10vw;\n z-index: 9999;\n box-shadow: 0 1px 2px 0 rgb(65 69 73 / 30%), 0 3px 6px 2px rgb(65 69 73 / 15%);\n font: 9pt helvetica, arial;\n display: flex;\n flex-direction: column;\n }\n\n .sapling-ai-detect-select-content-header {\n background-color: #e8eaf6;\n color: #5c6bc0;\n font: 14pt helvetica, arial;\n padding: 8px;\n border-bottom: 1px solid #ccc;\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n\n .sapling-ai-detect-select-content-header .left {\n display: flex;\n align-items: center;\n }\n\n .sapling-ai-detect-select-content-header .left img {\n height: 20px;\n padding: 5px 10px;\n border-right: 1px solid #ccc;\n padding-right: 20px;\n margin-right: 20px;\n }\n\n .sapling-ai-detect-select-content-header .right {\n display: flex;\n align-items: center;\n padding: 5px 10px;\n }\n\n .sapling-ai-detect-select-content-header .right img {\n height: 16px;\n width: 16px;\n vertical-align: middle;\n }\n\n .sapling-ai-detect-select-content-header #subscription-banner {\n padding: 5px 10px;\n margin: 0 15px;\n font-size: 10pt;\n border-radius: 5px;\n }\n\n .sapling-ai-detect-select-content-header #subscription-banner a {\n text-decoration: none;\n }\n\n .sapling-ai-detect-select-header-button {\n cursor: pointer;\n padding: 0 5px;\n }\n\n .sapling-ai-detect-select-content-body {\n display: flex;\n flex-grow: 1;\n position: relative;\n overflow: hidden;\n justify-content: center;\n }\n\n .sapling-ai-detect-select-content-body .hidden {\n display: none;\n }\n\n .sapling-ai-detect-select-overall {\n flex-basis: 35%;\n flex-shrink: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n }\n\n .sapling-ai-detect-select-overall .overall-score {\n font-size: 35pt;\n }\n\n .sapling-ai-detect-select-overall .overall-message {\n text-align: center;\n font-size: 12pt;\n color: #555;\n margin: 15px;\n }\n\n .sapling-ai-detect-select-score-string {\n overflow: scroll;\n font-size: 10pt;\n padding: 20px;\n width: 100%;\n }\n\n .sapling-ai-detect-select-score-string .score-strings {\n padding: 5px;\n text-align: justify;\n border: 1px solid #999;\n color: #333;\n }\n\n .sapling-ai-detect-select-sentences {\n padding: 20px 40px;\n font-size: 12pt;\n overflow: scroll;\n max-height: 65vh;\n color: #333;\n }\n\n .sapling-ai-detect-select-sentences .sentence-row {\n display: flex;\n margin: 15px 0;\n }\n\n .sapling-ai-detect-select-sentences .sentence-row .sentence-text {\n flex-basis: 85%;\n margin-right: 15px;\n }\n\n .sapling-ai-detect-select-error.hidden, .sapling-ai-detect-select-waiting.hidden {\n display: none;\n }\n\n .sapling-ai-detect-select-error {\n color: red;\n }\n\n .sapling-ai-detect-select-error,\n .sapling-ai-detect-select-waiting,\n .sapling-ai-detect-select-premium {\n color: #333;\n position: absolute;\n height: 100%;\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: 12pt;\n top: 0;\n left: 0;\n text-align: center;\n background: white;\n }\n\n .sapling-ai-detect-select-premium a {\n padding: 5px 15px;\n margin: 10px;\n background-color: #535f99;\n color: white;\n text-transform: capitalize;\n text-decoration: none;\n border-radius: 5px;\n }\n\n .sapling-ai-detect-select-spinner {\n transition: all 0.25s;\n transform: rotate(0deg);\n right: 30px;\n opacity: 0;\n }\n\n .sapling-ai-detect-select-spinner.sapling-loading {\n transform: rotate(0deg);\n animation: rotation 3s linear infinite;\n opacity: 1;\n }\n\n @keyframes rotation {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n }\n\n .sapling-ai-detect-select-analysis-mode {\n margin-left: 10px;\n font-size: 12pt;\n border: 1px solid #5c6bc0;\n padding: 5px 10px;\n border-radius: 10px;\n cursor: pointer;\n transition: all 0.25s;\n }\n\n .sapling-ai-detect-select-analysis-mode.inactive {\n opacity: 0.5;\n }\n\n .sapling-ai-detect-select-analysis-mode:hover {\n background-color: #5c6bc0;\n color: white;\n }\n\n .sapling-ai-detect-select-edit-recheck {\n display: block;\n margin: 5px auto;\n margin-top: -10px;\n width: 100%;\n border: none;\n border-radius: 5px;\n padding: 5px;\n background-color: #535f99;\n color: white;\n font-size: 10pt;\n cursor: pointer;\n }\n</style>\n",na=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.shadowHost=e,this.contentShadowHost=n,this.aiDetectSelectButton=null,this.aiDetectSelectContent=null,this.assetUrls={"xmark-solid":Ye("assets/xmark-solid.svg"),"spinner-solid":Ye("assets/spinner-solid.svg"),"thumbs-up-regular":Ye("assets/thumbs-up-regular.svg"),"thumbs-down-regular":Ye("assets/thumbs-down-regular.svg"),"sapling-logo-horizontal":Ye("assets/sapling-logo-horizontal.png"),"fa-hand-sparkles-solid":Ye("assets/fa-hand-sparkles-solid.svg")}}var e,n,r;return e=t,n=[{key:"positionButton",value:function(){var t=window.getSelection();if(t&&t.rangeCount&&t.toString().trim()){var e=t.getRangeAt(0).getBoundingClientRect(),n=Ae()?15:0;Ko(this.aiDetectSelectButton).css({left:Math.min(e.right+10+n,window.innerWidth-50),top:Math.max(e.top-10+n,50)+window.scrollY,background:"#e8eaf6",padding:"12px 10px 7px 10px",position:"absolute",cursor:"pointer",borderRadius:"35px",border:"2px solid #535f99",zIndex:9998})}}},{key:"_getAIDetectionScores",value:function(t,e){var n,r=this;if(Ko(this.aiDetectSelectContent).find(".sapling-ai-detect-select-error").addClass("hidden"),!Se())return Ko(this.aiDetectSelectContent).find(".sapling-ai-detect-select-waiting").addClass("hidden"),void Ko(this.aiDetectSelectContent).find(".sapling-ai-detect-select-premium").removeClass("hidden");Ko(this.loadingIndicator).addClass("sapling-loading"),t=t.trim(),this.lastQueryText=t,"chat.openai.com"==window.location.hostname&&(e.openai_model=null===(n=document.querySelectorAll(".items-center.sm\\:justify-center span")[0])||void 0===n?void 0:n.innerText),wt(t,0,window.location.href,e,(function(t){Ko(r.loadingIndicator).removeClass("sapling-loading"),Ko(r.aiDetectSelectContent).find(".sapling-ai-detect-select-waiting").addClass("hidden");var n,i=t.aidetect,o=i.score,a=i.sentence_scores,s=i.score_string,u=i.hash;n=(o*=100)>90?"Highly likely composed by AI.":o>70?"Significant chance of AI authorship.":o>50?"Toss-up: might be AI-generated.":o>25?"Low likelihood of AI creation.":o>10?"Minimal signs of AI origin.":"Unlikely AI-authored; appears human-written.",Ko(r.aiDetectSelectContent).find(".sapling-ai-detect-select-overall").html('\n <b class="overall-score" style="color: '.concat(G(o),'">\n ').concat(o.toFixed(2),'%\n </b>\n <div class="overall-message">').concat(n,'</div>\n <div>\n <a href="https://sapling.ai/ai-content-detector/').concat(u,'" target="__blank" style="color: #535f99;" title="Use to share a detailed link to this AI Detection analysis. Link will expire in 3 days.">\n Sapling AI Detection certificate</a>\n </div>\n ')),Ko(r.aiDetectSelectContent).find(".sapling-ai-detect-select-score-string .score-strings").addClass("has-backend-response").html("".concat(s));var c=document.createRange();c.selectNodeContents(r.scoreStrings),c.collapse(!1);var l=window.getSelection();l.removeAllRanges(),l.addRange(c),Ko(r.aiDetectSelectContent).find(".sapling-ai-detect-select-sentences").html(""),a.forEach((function(t){var e=t.score,n=t.sentence,i=(e*=100)>=0?"".concat(e.toFixed(2),"%"):"n/a";Ko(r.aiDetectSelectContent).find(".sapling-ai-detect-select-sentences").append('\n <div class="sentence-row">\n <div class="sentence-text">'.concat(n,'</div>\n <div class="sentence-score" style="color: ').concat(G(e),'">').concat(i,"</div>\n </div>\n "))})),Et("ai_detect_select_processed_".concat(e.source.toLowerCase().replace(/\s+/g,"_")))}),(function(t){Ko(r.loadingIndicator).removeClass("sapling-loading"),Ko(r.aiDetectSelectContent).find(".sapling-ai-detect-select-error").removeClass("hidden")}))}},{key:"createUIElements",value:function(){var t=this;this.aiDetectSelectButton||(Ko(this.shadowHost.shadowRoot).find(".sapling-ai-detect-select-button").remove(),this.aiDetectSelectButton=Ko('\n <div class="sapling-ai-detect-select-button">\n <img src="'.concat(this.assetUrls["fa-hand-sparkles-solid"],'" style="height: 20px" />\n </div>\n ')),this.aiDetectSelectButton.hide(),Ko(this.shadowHost.shadowRoot).append(ea),Ko(this.shadowHost.shadowRoot).append(this.aiDetectSelectButton),Ko(this.contentShadowHost.shadowRoot).append(ea),this.aiDetectSelectContent=Ko('\n <div class="sapling-ai-detect-select-content">\n <div class="sapling-ai-detect-select-content-header">\n <div class="left">\n <img src="'.concat(this.assetUrls["sapling-logo-horizontal"],'" style="height: 20px" />\n <span style="margin-right: 10px;">AI Detector</span>\n <span class="sapling-ai-detect-select-analysis-mode" id="sapling-ai-detect-select-overall-analysis">\n Overall Analysis\n </span>\n <span class="sapling-ai-detect-select-analysis-mode inactive" id="sapling-ai-detect-select-sentence-analysis">\n Sentence-level Analysis\n </span>\n <span id="subscription-banner"></span>\n </div>\n <div class="right"></div>\n </div>\n <div class="sapling-ai-detect-select-content-body">\n <div class="sapling-ai-detect-select-overall">\n </div>\n <div class="sapling-ai-detect-select-score-string">\n <button class="sapling-ai-detect-select-edit-recheck">\n Re-check edited text\n </button>\n </div>\n <div class="sapling-ai-detect-select-sentences hidden">\n </div>\n <div class="sapling-ai-detect-select-error hidden">\n An unknown error has occurred.<br/>Please try again in some time, or contact support@sapling.ai\n </div>\n <div class="sapling-ai-detect-select-premium hidden">\n Please <a href="https://sapling.ai/pricing" target="_blank">subscribe</a> to access the AI Detection feature.\n </div>\n <div class="sapling-ai-detect-select-waiting">\n Processing your text, please wait...\n </div>\n </div>\n </div>\n ')),this.aiDetectSelectContent.hide(),Ko(this.contentShadowHost.shadowRoot).append(this.aiDetectSelectContent),this.aiDetectSelectContent[0].addEventListener("mousedown",(function(t){t.stopPropagation()})),this.aiDetectSelectContent[0].addEventListener("contextmenu",(function(t){t.stopPropagation()})),this.loadingIndicator=document.createElement("div"),Ko(this.loadingIndicator).html('<img src="'.concat(this.assetUrls["spinner-solid"],'" />')),Ko(this.loadingIndicator).addClass("sapling-ai-detect-select-spinner"),Ko(this.loadingIndicator).addClass("sapling-ai-detect-select-header-button"),Ko(this.aiDetectSelectContent).find(".right").append(this.loadingIndicator),this.cancelButton=document.createElement("div"),Ko(this.cancelButton).html('<img src="'.concat(this.assetUrls["xmark-solid"],'" />')),Ko(this.cancelButton).addClass("sapling-ai-detect-select-cancel"),Ko(this.cancelButton).addClass("sapling-ai-detect-select-header-button"),Ko(this.cancelButton).on("click",(function(){t.hide()})),Ko(this.aiDetectSelectContent).find(".right").append(this.cancelButton),Ko(document).keyup((function(e){"Escape"===e.key&&t.hide()})),this.scoreStrings=document.createElement("div"),Ko(this.scoreStrings).addClass("score-strings"),Ko(this.scoreStrings).attr("sapling-ignore","true"),Ko(this.scoreStrings).attr("contenteditable","true"),this.scoreStringsObserver=new MutationObserver((function(e,n){Ko(t.scoreStrings).is(".has-backend-response")?Ko(t.scoreStrings).removeClass("has-backend-response"):Ko(t.aiDetectSelectContent).find(".score-strings")[0].innerText.replace(/\n+/g,"\n\n")!=t.lastQueryText&&Ko(t.scoreStrings).find("span").css("background-color","white")})),this.scoreStringsObserver.observe(this.scoreStrings,{attributes:!0,childList:!0,subtree:!0,characterData:!0}),Ko(this.aiDetectSelectContent).find(".sapling-ai-detect-select-score-string").append(this.scoreStrings),this.aiDetectSelectButton[0].addEventListener("mousedown",(function(e){e.preventDefault(),Ko(t.aiDetectSelectContent).fadeIn(50),t._getAIDetectionScores(t._getSelectedText(),{source:"selected text"}),Et("ai_detect_select_overlay_visible_selected_text")})),Ko(this.aiDetectSelectContent).on("click",".sapling-ai-detect-select-edit-recheck",(function(e){t._getAIDetectionScores(Ko(t.aiDetectSelectContent).find(".score-strings")[0].innerText.replace(/\n+/g,"\n\n"),{source:"edited text"})})),Ko(this.aiDetectSelectContent).on("click",".sapling-ai-detect-select-analysis-mode",(function(e){Ko(t.aiDetectSelectContent).find(".sapling-ai-detect-select-analysis-mode").addClass("inactive"),Ko(e.target).removeClass("inactive"),Ko(e.target).is("#sapling-ai-detect-select-overall-analysis")?(Ko(t.aiDetectSelectContent).find(".sapling-ai-detect-select-overall").removeClass("hidden"),Ko(t.aiDetectSelectContent).find(".sapling-ai-detect-select-score-string").removeClass("hidden"),Ko(t.aiDetectSelectContent).find(".sapling-ai-detect-select-sentences").addClass("hidden")):(Ko(t.aiDetectSelectContent).find(".sapling-ai-detect-select-overall").addClass("hidden"),Ko(t.aiDetectSelectContent).find(".sapling-ai-detect-select-score-string").addClass("hidden"),Ko(t.aiDetectSelectContent).find(".sapling-ai-detect-select-sentences").removeClass("hidden"))})),to(Ko(this.aiDetectSelectContent).find("#subscription-banner")))}},{key:"_getSelectedText",value:function(){return document.getSelection().toString().replace(/\n+/g,"\n\n")}},{key:"showContent",value:function(t,e){Ko(this.aiDetectSelectContent).fadeIn(50),Ko(this.aiDetectSelectContent).find(".sapling-ai-detect-select-waiting").removeClass("hidden"),this._getAIDetectionScores(t.replace(/\n+/g,"\n\n").trim(),{source:e}),Et("ai_detect_select_overlay_visible_".concat(e.toLowerCase().replace(/\s+/g,"_")))}},{key:"show",value:function(){var t=this,e=this._getSelectedText().trim();!e||e.split(" ").length<50||setTimeout((function(){t.positionButton(),t.aiDetectSelectButton.fadeIn(50)}),200)}},{key:"hide",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.aiDetectSelectButton&&setTimeout((function(){t.aiDetectSelectButton.hide(),e||(t.aiDetectSelectContent.fadeOut(250),Ko(t.aiDetectSelectContent).find(".sapling-ai-detect-select-waiting").removeClass("hidden"),Ko(t.aiDetectSelectContent).find(".sapling-ai-detect-select-overall").html(""),Ko(t.aiDetectSelectContent).find(".sapling-ai-detect-select-sentences").html(""),Ko(t.aiDetectSelectContent).find(".sapling-ai-detect-select-score-string .score-strings").html(""))}),200)}}],n&&Zo(e.prototype,n),r&&Zo(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ra(){if(Se()){var t=function(){var t,e,n;if(Ko("sapling-ai-detect-controls").length)t=Ko("sapling-ai-detect-controls")[0],e=Ko("sapling-ai-detect-button")[0],n=ta.get(t);else{t=Ko("<sapling-ai-detect-controls></sapling-ai-detect-controls>")[0],e=Ko("<sapling-ai-detect-button></sapling-ai-detect-button>")[0];try{t.attachShadow({mode:"open"}),e.attachShadow({mode:"open"})}catch(t){return{aiDetectHost:null,buttonHost:null,aiDetectSelectButton:null}}Ko("html").append(t),Ko("html").append(e),n=new na(e,t),ta.set(t,n),n.createUIElements()}return{aiDetectHost:t,buttonHost:e,aiDetectSelectButton:n}}(),e=t.aiDetectSelectButton;if(e)"chat.openai.com"===window.location.hostname&&function(t){Ko(document.body).append("\n <style>\n .sapling-run-ai-detection-button {\n position: absolute;\n border: 2px solid #535f99;\n border-radius: 5px;\n width: 100%;\n font-size: 10pt;\n text-align: center;\n color: #535f99;\n top: 110%;\n background: white;\n cursor: pointer;\n transition: all 0.25s;\n }\n\n .sapling-run-ai-detection-button:hover {\n color: white;\n background: #535f99;\n }\n </style>\n "),setInterval((function(){document.querySelectorAll(".group.w-full.text-token-text-primary.bg-gray-50").forEach((function(e){if(e.querySelectorAll(".text-gray-400.flex button.rounded-md")&&!ia.get(e)){var n=e.innerText.replace(/^chatgpt\s+/i,"");if(!(n.trim().split(" ").length<50)){ia.set(e,n);var r=e.querySelector(".text-gray-400.flex");Ko(r).append('\n <div class="sapling-run-ai-detection-button">Detect AI</div>\n ');var i=document.createElement("div");Ko(i).html("Detect AI"),Ko(i).addClass("sapling-run-ai-detection-button"),Ko(i).on("click",(function(){n=e.querySelector(".markdown").innerText.replace(/^chatgpt\s+/i,""),t.showContent(n,"chat.openai.com generated")})),Ko(r).append(i)}}}))}),1e3)}(e)}}var ia=new WeakMap;var oa=n(563);function aa(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||sa(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sa(t,e){if(t){if("string"==typeof t)return ua(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ua(t,e):void 0}}function ua(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ca(t,e){var n=Fu(t);if(n){var r=n.edits,i=n.textAreaId,o=n.containerDomElement;if(r){var a=r[e];if(a){var s=a.edit,u=a.editRange,c=s.replacementText,l={is_premium:s.premium};At(s.editHash,!0,t,l),i?function(t,e,n){t in nn&&fn(nn[t].textArea,e.startOffset,e.endOffset,n)}(i,u,c):gn(u,c,o),hu(t,e)}}ma(),Au()}}function la(t,e){var n=Fu(t);if(n){var r=n.edits;if(r){var i=r[e];if(i){var o=i.edit,a={is_premium:o.premium};At(o.editHash,!1,t,a),function(t,e){if(t in Ho)for(var n=Ho[t],r=Object.keys(n),i=0;i<r.length;i+=1){var o=r[i];n[o].edits&&delete n[o].edits[e]}}(t,e),hu(t,e)}}ma(),Au(),ru(t)}}function fa(){if(oa("sapling-rephrase-controls").length)return[oa("sapling-rephrase-controls")[0],oa("sapling-rephrase-button")[0]];var t=oa("<sapling-rephrase-controls></sapling-rephrase-controls>");t.css({zIndex:"2147483647",font:'11pt "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif',position:"absolute"});var e=t[0],n=oa("<sapling-rephrase-button></sapling-rephrase-button>")[0];return e.attachShadow({mode:"open"}),n.attachShadow({mode:"open"}),oa("html").append(e),oa("html").append(n),[e,n]}function pa(){var t=oa("sapling-rephrase-controls")[0],e=oa("sapling-rephrase-button")[0];if(t&&e&&t.shadowRoot&&e.shadowRoot){var n=aa(Qr(t,e),2),r=n[0],i=n[1];r.hideControls(),$r()||i.hide()}}function da(){if(Ae()){var t=aa(fa(),2),e=Qr(t[0],t[1])[1];if(Br())$r()?e.show():e.hide();else e.hide()}}var ha=n(563),ga=null,va=500,ya=null;function ma(){ha("#active-edit",ya).removeAttr("id"),ha("#active-edit",ya).removeAttr("sapling-edit-id"),ha("#active-edit",ya).removeAttr("sapling-container-id"),ha(h.CONTROL_ELEMENT).remove(),Au()}function ba(t,e){!function(t,e){ca(t,e)}(t,e.editId)}function Da(t,e){la(t,e.editId)}function wa(t){!function(t){var e=Qs[t];if(!e)return;if(!e.annotationsOverlay)return;e.annotationsOverlay.hideEdits()}(t),ma()}function xa(){window.open("".concat(h.WEBSITE_URL,"/plans#trial_pro_edit_click"))}function Ea(){window.open("".concat("https://sapling.ai","/user/sign-in#edit_click"))}function Aa(t,e){if(e.category&&("SDK"===h.MODE&&Sapling.autoShowAdvancedEdits||ha("#snooze-row",ya).show(),ha("#type-text",ya).html(e.category.replace(/_/g," ")),ha(".icon-sapling-type",ya).addClass(e.category),"voice"!==e.category&&"hard_to_read"!==e.category||(ha("#text-row",ya).hide(),ha("#accept-row",ya).hide()),e.description)){ha("#description-text",ya).text(e.description);var n=Math.min(e.description.length,35)/35*220;ha("#description-text",ya).css("min-width",n),ha("#description-row",ya).css("display","flex")}}function _a(){(function(){if(Zs&&Zs.containerId in Qs){var t=Qs[Zs.containerId].edits;if(!(Zs.editId in t))return!0;var e=t[Zs.editId].editRange;if(!Q(e.startContainer)||!Q(e.endContainer))return!0}return!1})()&&ma()}function Sa(t,e,n,r){var i,o;clearTimeout(ga),ha("#active-edit",ya).removeAttr("id"),function(){if(!ha(h.CONTROL_ELEMENT).length){var t=document.createElement(h.CONTROL_ELEMENT);ha(t).css({zIndex:"2147483647",font:'12pt "Helvetica Neue", Helvetica, Arial, sans-serif',position:"absolute",textAlign:"center"}),ha("html").append(t),t.attachShadow({mode:"open"}),ya=t.shadowRoot,ha(h.CONTROL_ELEMENT).hide();var e="Ignore",n="Accept",r='<style type="text/css">\n\n#sapling-edit-controls {\n border-radius: 6px;\n}\n\n.edit-controls-row {\n overflow: hidden;\n}\n\n#accept-text, #ignore-text, #snooze-text {\n line-height: 2em;\n}\n\n.icon-sapling-accept, .icon-sapling-reject {\n width: 36px;\n}\n\n#accept-button, #ignore-button, #explanations, #snooze-button {\n background-color: #fff;\n align-items: center;\n justify-content: left;\n width: 100%;\n}\n\n#accept-text, #snooze-text, .icon-sapling-accept {\n color: #6C3082;\n}\n\n#ignore-row,\n#description-row,\n#snooze-row {\n border-top: 0.5px solid #ECECEC;\n}\n\n#accept-button:hover, #ignore-button:hover, #explanations:hover, #snooze-button:hover {\n background-color: #ECECEC;\n}\n\n#accept-button:focus, #ignore-button:focus, #explanations:focus, #snooze-button:focus {\n outline: none;\n background-color: #ECECEC;\n}\n#accept-button:active, #ignore-button:active, #explanations:active, #snooze-button:active {\n background-color: #DDD;\n}\n\n.icon-sapling-description {\n padding: 0px 8px 0px 4px;\n display: flex;\n align-items: center;\n}\n\n.icon-sapling-description:before {\n font-family: \'icomoon\' !important;\n color: #ffc107;\n content: "\\f071";\n}\n#description-row {\n padding: 8px;\n}\n#description-text {\n margin-left: 2px;\n}\n </style>',i="";"SDK"===h.MODE&&(e=Sapling.appearance.variables.ignoreText,n=Sapling.appearance.variables.acceptText,Sapling.appearance.compact||(r='<style type="text/css">\n\n#sapling-edit-controls #type-row,\n#sapling-edit-controls #text-row,\n#sapling-edit-controls #description-row {\n display: flex;\n}\n\n#sapling-edit-controls {\n position: relative;\n padding: 15px 20px;\n border-radius: 10px;\n min-width: 210px;\n box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12);\n}\n\n#accept-row,\n#ignore-row {\n border: none;\n position: absolute;\n bottom: 15px;\n user-select: none;\n}\n\n#accept-row {\n left: 20px;\n}\n\n#ignore-row {\n right: 20px;\n}\n\n.icon-sapling-accept,\n.icon-sapling-reject {\n width: 24px;\n}\n\n.icon-sapling-accept,\n#accept-text {\n color: white;\n}\n\n#accept-text,\n#ignore-text {\n padding: 0px;\n padding-right: 8px;\n padding-left: 4px;\n}\n\n#accept-button,\n#ignore-button {\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 33px;\n padding: 7px 5px;\n border-radius: 10px;\n transition: all .15s ease;\n}\n\n#accept-button {\n border: none;\n background-color: #6C3082;\n}\n\n#accept-button:hover,\n#ignore-button:hover {\n transform: translateY(-1px);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.32);\n max-height: none;\n}\n\n#accept-button:active,\n#ignore-button:active {\n transform: translateY(0px);\n}\n\n#ignore-button {\n border: 1px solid #A9A9A9;\n background-color: transparent;\n color: #657786;\n}\n\n#description-text {\n font-size: 0.9em;\n line-height: 1.5em;\n color: #666;\n margin-bottom: 50px;\n}\n\n </style>'),Sapling.appearance.customCSS&&(i=Sapling.appearance.customCSS)),ha(ya).html("\n ".concat('<style type="text/css">\n#sapling-edit-controls {\n z-index: 2147483647 !important;\n background-color: #fff;\n color: #333;\n border: 0.5px solid #ECECEC;\n overflow: hidden;\n}\n.edit-controls-row {\n max-width: 500px;\n display: flex;\n}\n#explanations {\n font-size: 14px;\n color: #8f8f8f;\n padding: 7px 12px 0px 12px;\n}\n#accept-button, #ignore-button {\n line-height: 1.1em;\n}\n#accept-button, #ignore-button, #explanations, #snooze-button {\n cursor: pointer;\n}\n\n#premium-button {\n cursor: pointer;\n background-color: #ffc107;\n}\n#premium-button:hover {\n background-color: #ffb006;\n}\n#accept-button {\n float: left;\n}\n\n.sapling-right-arrow {\n color:red;\n}\n\n.icon-sapling-right-arrow {\n background-image: url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="sapling-right-arrow"><polygon points="8.59,16.59 13.17,12 8.59,7.41 10,6 16,12 10,18 8.59,16.59" fill="%23A9A9A9"/><polygon points="3,13 13,13 13,11 3,11" fill="%23A9A9A9"/></svg>\');\n background-size: 24px 24px;\n background-position: center;\n background-repeat: no-repeat;\n width: 24px;\n height: 24px;\n margin-left: 5px;\n}\n\n.icon-sapling-accept, .icon-sapling-reject {\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 16px;\n}\n\n#snooze-text {\n font-size: 14px;\n}\n#accept-button, #ignore-button, #premium-button, #snooze-button {\n display: flex;\n}\n#ignore-text, #snooze-text, .icon-sapling-reject {\n color: #A9A9A9;\n}\n\n#accept-text, #ignore-text, #snooze-text {\n display: table-cell;\n text-align: left;\n white-space: nowrap;\n padding-right: 8px;\n}\n#description-row {\n display: flex;\n font-size: 12px;\n color: #8f8f8f;\n}\n\n#description-text {\n flex-grow: 1;\n width: min-content;\n text-align: left;\n}\n#premium-text {\n padding: 4px 8px 4px 8px;\n line-height: 1.2em;\n font-size: 90%;\n color: #fff;\n}\n\n.advanced-edit {\n color: #d4af37;\n text-decoration: none;\n}\n.register-edit {\n color: #6C3082;\n text-decoration: none;\n font-weight: 500;\n}\n/* need icon-sapling- because sites like trello use icomoon too */\n[class^="icon-sapling-"], [class*=" icon-sapling-"] {\n /* use !important to prevent issues with browser extensions that change fonts */\n font-family: \'icomoon\' !important;\n speak: none;\n font-style: normal;\n font-weight: normal;\n font-variant: normal;\n text-transform: none;\n line-height: 1;\n\n /* Better Font Rendering =========== */\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n#type-row,\n#text-row,\n#description-row,\n#snooze-row,\n#premium-banner-row\n{\n display: none;\n}\n\n.icon-sapling-accept:before {\n font-family: \'icomoon\' !important;\n content: "\\f00c";\n}\n.icon-sapling-close:before {\n font-family: \'icomoon\' !important;\n content: "\\f00d";\n}\n.icon-sapling-remove:before {\n font-family: \'icomoon\' !important;\n content: "\\f00d";\n}\n.icon-sapling-reject:before {\n font-family: \'icomoon\' !important;\n content: "\\f00d";\n}\n\n#type-row,\n#text-row {\n margin-bottom: 10px;\n}\n\n#type-text {\n text-transform: uppercase;\n font-size: 10px;\n color: #A9A9A9;\n}\n\n#original-text-row,\n#replacement-text-row,\n#text-row {\n align-items: center;\n}\n\n#original-text-row,\n#replacement-text-row {\n max-width: 200px;\n word-wrap: break-word;\n}\n\n#text-row {\n justify-content: flex-start;\n}\n\n#description-text:empty {\n margin-bottom: 40px;\n}\n\n.icon-sapling-type {\n border-radius: 50%;\n display: inline-block;\n vertical-align: middle;\n}\n\n.grammar,\n.spelling,\n.punctuation,\n.fluency,\n.other,\n.voice,\n.adverbs,\n.simplifications,\n.hard_to_read,\n.qualifiers,\n.profanity,\n.dei\n{\n width: 6px;\n height: 6px;\n margin: 3px;\n background-color: #6C3082;\n}\n\n </style>',"\n ").concat(r,'\n <style type="text/css">\n ').concat(i,'\n </style>\n <div id="sapling-edit-controls">\n\n <div id="type-row">\n <div class="icon-sapling-type"></div>\n <div id="type-text"></div>\n </div>\n\n <div id="text-row">\n <div id="original-text-row">\n <div class="icon-sapling-original-text"></div>\n <div id="original-text"></div>\n </div>\n\n <div class="icon-sapling-right-arrow"></div>\n\n <div id="replacement-text-row">\n <div class="icon-sapling-replacement-text"></div>\n <div id="replacement-text"></div>\n </div>\n </div>\n\n <div id="accept-row" class="edit-controls-row">\n <div id="accept-button" tabindex="0">\n <div class="icon-sapling-accept"></div>\n <div id="accept-text">').concat(n,'</div>\n </div>\n </div>\n\n <div id="ignore-row" class="edit-controls-row">\n <div id="ignore-button" tabindex="0">\n <div class="icon-sapling-reject"></div>\n <div id="ignore-text">').concat(e,'</div>\n </div>\n </div>\n\n <div id="description-row" class="edit-controls-row">\n <div class="icon-sapling-description"></div>\n <div id="description-text"></div>\n </div>\n\n <div id="snooze-row" class="edit-controls-row">\n <div id="snooze-button" tabindex="0">\n <div class="icon-sapling-reject"></div>\n <div id="snooze-text">Hide Advanced Edits</div>\n </div>\n </div>\n\n <div id="premium-banner-row" class="edit-controls-row">\n <div id="premium-button" tabindex="0">\n <div id="premium-text">\n Your trial ends in 1 day\n </div>\n </div>\n </div>\n\n <span id="hide-control" tabindex="0"></span>\n </div>')),ha("#hide-control",ya).focus((function(t){t.preventDefault(),t.stopPropagation();var e=Tu(ha(h.CONTROL_ELEMENT).attr("sapling-container-id")),n=U(e);n&&(e=on(n)),ma(),e.focus()}))}}(),ha("#accept-button",ya).off("click mousedown keyup"),ha("#ignore-button",ya).off("click mousedown keyup"),ha("#snooze-button",ya).off("click mousedown keyup"),ha("#premium-button",ya).off("click mousedown keyup"),ha("#type-text",ya).html(""),ha("#description-text",ya).html(""),ha("#snooze-row",ya).hide(),ha("#accept-row",ya).show(),ha("#ignore-row",ya).show(),ha("#text-row",ya).hide(),ha("#description-row",ya).hide(),ha(".icon-sapling-type",ya).attr("class","icon-sapling-type"),"SDK"!==h.MODE||Sapling.appearance.compact||(ha("#text-row",ya).css("display","flex"),ha("#description-row",ya).show()),"SDK"===h.MODE?function(t,e){var n=e.replacementText,r=e.originalText;""===e.replacementText?n="<del> ".concat(e.originalText," </del>"):r="<del> ".concat(e.originalText," </del>");var i=ha("#accept-button",ya);i.click((function(){return ba(t,e)})),i.keyup((function(n){"Enter"===n.key?ba(t,e):"ArrowDown"===n.key&&ha("#ignore-button",ya).focus()})),ha("#type-text",ya).html(e.generalErrorType),ha("#original-text",ya).html(r),ha("#replacement-text",ya).html(n),ha("#description-text",ya).html(e.description);var o=e.generalErrorType;o&&(o=o.split(" ")[0].split("/")[0].toLowerCase()),ha(".icon-sapling-type",ya).addClass(o),e.premium&&null==e.replacementText&&(ae()?(n="[Sign in to see premium edit]",i.off("click").click(Ea),i.off("keyup")):se()||(n="[Confirm email to see premium edit]",i.off("click").click(Ea),i.off("keyup")),n="[Pro Edit: Only in Sapling Pro]",i.off("click").click(xa),i.off("keyup")),Sapling.appearance.compact?ha("#accept-text",ya).html(n):ha("#accept-text",ya).html(Sapling.appearance.variables.acceptText),Aa(0,e)}(t,e):function(t,e){var n=e.replacementText;""===e.replacementText&&(n="<del> ".concat(e.originalText," </del>"));var r=ha("#accept-button",ya);r.click((function(){return ba(t,e)})),r.keyup((function(n){"Enter"===n.key?ba(t,e):"ArrowDown"===n.key&&ha("#ignore-button",ya).focus()})),m()===h.WEBSITE_HOSTNAME||(ae()&&(e.requireLogin||e.premium)?(n="[Sign in to see premium edit]",r.off("click").click(Ea),r.off("keyup")):e.premium&&(se()?ue()||(n="[Pro Edit: Only in Sapling Pro]",r.off("click").click(xa),r.off("keyup")):(n="[Confirm email to see premium edit]",r.off("click").click(Ea),r.off("keyup")))),ha("#accept-text",ya).html(n),Aa(0,e)}(t,e),function(t,e){ha("#accept-button",ya).mousedown((function(t){t.stopPropagation(),t.preventDefault()})),ha("#ignore-button",ya).mousedown((function(t){t.stopPropagation(),t.preventDefault()})),ha("#snooze-button",ya).mousedown((function(t){t.stopPropagation(),t.preventDefault()})),ha("#premium-button",ya).mousedown((function(t){t.stopPropagation(),t.preventDefault()})),ha("#ignore-button",ya).click((function(){return Da(t,e)})),ha("#premium-button",ya).click(xa),ha("#snooze-button",ya).click((function(){return wa(t)})),ha("#ignore-button",ya).keyup((function(n){"Enter"===n.key?(Da(t,e),Tu(t).focus()):"ArrowUp"===n.key&&ha("#accept-button",ya).focus()}))}(t,e),i=e.premium,null!==(o=ge())&&i&&o<4?(1===o?ha("#premium-text",ya).html("Your trial ends in 1 day"):o<4&&ha("#premium-text",ya).html("Your trial ends in ".concat(o," days")),ha("#premium-banner-row",ya).show()):ha("#premium-banner-row",ya).hide(),ha(h.CONTROL_ELEMENT).attr("sapling-edit-id",e.editId),ha(h.CONTROL_ELEMENT).attr("sapling-container-id",t);var a=n[0];if(ha(a).attr("id","active-edit"),a){var s=a.getBoundingClientRect(),u=s.left-18;u=Math.min(u,window.innerWidth+window.scrollX-ha(h.CONTROL_ELEMENT).width()-16),u=Math.max(u,8);for(var c=s.top+ha(a).height(),l=1;l<n.length;l++){var f=n[l],p=f.getBoundingClientRect().top+ha(f).height();p>c&&(c=p)}var d=c+window.scrollY;if(d+ha(h.CONTROL_ELEMENT).height()>window.innerHeight+window.scrollY){var g=s.top-ha(h.CONTROL_ELEMENT).height()+window.scrollY;g>=0&&(d=g)}if("SDK"===h.MODE){var v=Ze(a);u+=v.x,d+=v.y}var y=function(t){var e,n=F(t),r={height:(e=n).clientHeight,width:e.clientWidth},i=A(n).offset();return{top:i.top,bottom:i.top+r.height,left:i.left,right:i.left+r.width}}(F(r));ha(h.CONTROL_ELEMENT).data("bounds",y),ha(h.CONTROL_ELEMENT).data("defaultHeight",ha(h.CONTROL_ELEMENT).outerHeight()),ha(h.CONTROL_ELEMENT).data("defaultOrigin",{left:u,top:d}),ha(h.CONTROL_ELEMENT).css({left:u,top:d}),ha(h.CONTROL_ELEMENT).fadeIn(200),Et("hover_on",{is_premium:e.premium},t),function(){var t=oa(h.CONTROL_ELEMENT).attr("sapling-container-id"),e=oa(h.CONTROL_ELEMENT).attr("sapling-edit-id"),n=Fu(t);if(n){var r=n.edits;if(r){var i=r[e];if(i){var o=i.edit,a={is_premium:o.premium};At(o.editHash,null,t,a,!0)}}}}()}}function Ca(){ga&&(clearTimeout(ga),ga=null),ga=setTimeout(ma,va)}function ka(t){return t.match(/^[0-9a-z]+$/)}function Oa(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=k(t.toString()),i=k(e.startText),o=k(e.endText),a=r.substring(0,i.length),s=r.substring(r.length-o.length);if(a!==i||s!==o)return n&&"Incorrect inner text |".concat(a,"|!=|").concat(i,"||").concat(s,"|!=|").concat(o,"|"),!1;if(function(t,e){return!(void 0===t||t.length<=e||0===e)&&ka(k(t.substr(e,1)))&&ka(k(t.substr(e-1,1)))}(t.endContainer.data,t.endOffset)){var u=Le();return u&&(u=u.toLowerCase()),"jp"===u||"zh"===u||"ko"===u||"ar"===u}return!0}var Ta={voice:{"background-image":"linear-gradient(to right, rgba(22, 112, 49, 0.8), rgb(22, 112, 49, 0.8))","background-color":"rgba(22, 112, 49, 0.2)"},adverbs:{"background-image":"linear-gradient(to right, rgba(0, 170, 193, 0.8), rgba(0, 170, 193, 0.8))","background-color":"rgba(0, 170, 193, 0.2)"},simplifications:{"background-image":"linear-gradient(to right, rgba(51, 146, 255, 0.8),rgba(51, 146, 255, 0.8))","background-color":"rgba(51, 146, 255, 0.2)"},qualifiers:{"background-image":"linear-gradient(to right, rgba(35, 62, 143, 0.8),rgba(35, 62, 143, 0.8))","background-color":"rgba(35, 62, 143, 0.2)"},dei:{"background-image":"linear-gradient(to right, rgba(111, 39, 153, 0.8),rgba(111, 39, 153, 0.8))","background-color":"rgba(111, 39, 153, 0.2)"},profanity:{"background-image":"linear-gradient(to right, rgba(111, 39, 153, 0.8),rgba(111, 39, 153, 0.8))","background-color":"rgba(111, 39, 153, 0.2)"},hard_to_read:{"background-image":"linear-gradient(to right, rgba(255, 0, 0, 0.2), rgba(255, 0, 0, 0.2))","background-image2":"linear-gradient(to right, rgba(255, 255, 50, 0.4), rgba(255, 255, 50, 0.4))","background-color":"rgba(255, 100, 100, 0.2)","background-color2":"rgba(255, 255, 200, 0.2)"}};function Fa(){return'<style type="text/css">\n .sapling-edit {\n position: absolute;\n box-sizing: content-box;\n display: inline;\n min-width: 0.5em;\n opacity: 0.85;\n background-position: 0px calc(100% + 1px);\n background-repeat: no-repeat;\n background-size: calc(100% + 1px) 2px;\n border-bottom: 2px solid transparent;\n background-image: linear-gradient(to right, #ff0000, #ff0000);\n }\n\n .sapling-edit:hover {\n background-color: #ffb2b2;\n background-image: linear-gradient(to right, #ffb2b2, #ffb2b2);\n -webkit-transition: background-color 200ms linear;\n -ms-transition: background-color 200ms linear;\n transition: background-color 200ms linear;\n }\n</style>'}var ja=n(563);function La(t){return La="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},La(t)}function Ia(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(i=r.key,o=void 0,o=function(t,e){if("object"!==La(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==La(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===La(o)?o:String(o)),r)}var i,o}var Na=function(){function t(e,n,r,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.draggableJq=e,this.dragJq=n||e,this.ignoreJqSelector=r,this.ignoreScroll=i,this.dragMove=this.dragMove.bind(this),this.dragMouseUp=this.dragMouseUp.bind(this),this.dragMouseDown=this.dragMouseDown.bind(this),this.posX=0,this.posY=0,this.dragJq.on("mousedown",this.dragMouseDown),window.addEventListener("mouseup",this.dragMouseUp,!1)}var e,n,r;return e=t,(n=[{key:"dragMove",value:function(t){var e=t.clientY+this.posY,n=t.clientX+this.posX;this.ignoreScroll||(e+=window.scrollY,n+=window.scrollX),this.draggableJq.css({top:e,left:n,bottom:"",right:""})}},{key:"dragMouseUp",value:function(){window.removeEventListener("mousemove",this.dragMove,!0),this.dragJq.css({cursor:"grab"})}},{key:"dragMouseDown",value:function(t){if(!this.ignoreJqSelector||!ja(t.target).is(this.ignoreJqSelector)){t.preventDefault();var e=this.draggableJq[0].getBoundingClientRect();this.posX=e.left-t.clientX,this.posY=e.top-t.clientY,window.addEventListener("mousemove",this.dragMove,!0),this.dragJq.css({cursor:"grabbing"})}}}])&&Ia(e.prototype,n),r&&Ia(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Ba=n(563);function Ra(t){return Ra="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ra(t)}function Pa(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||Ma(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ma(t,e){if(t){if("string"==typeof t)return Ha(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ha(t,e):void 0}}function Ha(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function qa(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(i=r.key,o=void 0,o=function(t,e){if("object"!==Ra(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Ra(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===Ra(o)?o:String(o)),r)}var i,o}var Ua=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.containerId=e,this.annotationsOverlay=n,this.summaryWrapper=null,this.summaryList=null,this.annotationsSpinner=null,this.annotationsError=null,this.shadowRoot=null,this.summaryAnnotationsContainer=null,this.summaryDragger=null,this.annotationsCache=[],this.statisticsCache={}}var e,n,r;return e=t,n=[{key:"handleDismiss",value:function(t){1===t.which&&this.annotationsOverlay.hideSummaryAnnotations()}},{key:"maybeEmbedSaplingSummaryAnnotations",value:function(){var t=Ba("sapling-summary-annotations");if(t.length&&(this.summaryAnnotationsContainer||(this.summaryAnnotationsContainer=t.first(),this.shadowRoot=this.summaryAnnotationsContainer[0].shadowRoot)),!this.summaryAnnotationsContainer){this.summaryAnnotationsContainer=Ba("<sapling-summary-annotations>\n </sapling-summary-annotations>");var e="\n ".concat('<style type="text/css">\n\n/* Structures */\n\n.summary-annotations-wrapper {\n width: 400px;\n min-height: 80px;\n opacity: 0.9;\n background-color: #fff;\n box-shadow: 0 1px 2px 0 rgb(65 69 73 / 30%), 0 3px 6px 2px rgb(65 69 73 / 15%);\n border-radius: 8px;\n font: 9pt helvetica, arial;\n}\n\n.annotations-dismiss {\n cursor: pointer;\n margin-left: auto;\n position: absolute;\n right: 0px;\n top: -1px;\n width: 1.5em;\n height: 1.5em;\n line-height: 1.5em;\n text-align: center;\n user-select: none;\n font-size: 14px;\n font-weight: 700;\n border-radius: 50%;\n color: rgba(110, 115, 128, 0.95);\n transition: all .15s ease;\n}\n\n.summary-annotations {\n display: block;\n padding: 0.5em;\n padding-bottom: 0;\n}\n.sapling-summary-annotation {\n background-color: #eef;\n padding: 5px;\n border-radius: 5px;\n margin-bottom: 0.5em;\n}\n.sapling-annotation-count {\n display: inline-block;\n padding: 5px 10px;\n border-radius: 3px;\n background-color: #6200ea;\n color: #fff;\n font-weight: bold;\n}\n\n\n/* begin toggle css */\n\n.sapling-annotation-toggle.switch {\n position: relative;\n display: inline-block;\n width: 28px;\n height: 18px;\n border-radius: 3px;\n}\n\n.sapling-annotation-toggle.switch input {\n opacity: 0;\n width: 0;\n height: 0;\n}\n\n.sapling-annotation-toggle .slider {\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: #ccc;\n -webkit-transition: .4s;\n transition: .4s;\n border-radius: 3px;\n}\n\n.sapling-annotation-toggle .slider:before {\n position: absolute;\n content: "";\n height: 10px;\n width: 10px;\n left: 4px;\n bottom: 4px;\n background-color: white;\n -webkit-transition: .4s;\n transition: .4s;\n border-radius: 3px;\n}\n\n.sapling-annotation-toggle input:checked + .slider {\n background-color: #6200ea;\n}\n\n.sapling-annotation-toggle input:focus + .slider {\n box-shadow: 0 0 1px #2196F3;\n}\n\n.sapling-annotation-toggle input:checked + .slider:before {\n -webkit-transform: translateX(10px);\n -ms-transform: translateX(10px);\n transform: translateX(10px);\n}\n\n/* end toggle css */\n\n.sapling-annotation-toggle-row {\n width: 200px;\n margin-bottom: 10px;\n padding-left: 5px;\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.sapling-annotation-explanation .toggle-text {\n left-margin: 5px;\n cursor: pointer;\n padding-left: 4px;\n padding-top: 8px;\n padding-bottom: 8px;\n padding-right: 8px;\n}\n\n.sapling-annotation-type {\n display: inline-block;\n padding: 5px 10px;\n border-radius: 3px;\n align-items:center;\n color: #fff;\n font-weight:bold;\n}\n.sapling-annotation-explanation {\n display: inline;\n padding: 5px;\n line-height: 1.5em;\n}\n.sapling-annotations-error {\n padding: 0.2em 0.4em;\n background-color: #ffebee;\n text-align: right;\n color: #d32f2f;\n}\n\n\n/* Spinner */\n\n.sapling-annotations-spinner {\n position: absolute;\n right: 5px;\n bottom: 5px;\n display: inline-block;\n}\n.sapling-annotations-spinner img {\n display: block;\n height: 12px;\n width: 12px;\n\n animation-name: spin;\n animation-duration: 1500ms;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n}\n@keyframes spin {\n from {\n transform:rotate(0deg);\n }\n to {\n transform:rotate(360deg);\n }\n}\n\n/* Statistics */\n\ndiv.dl-cols {\n display: grid;\n padding: 1em 1em 0.5em 1em;\n grid-template-columns: max-content auto;\n}\ndl {\n display: grid;\n grid-template-columns: max-content auto;\n margin: 0;\n line-height: 1.5;\n}\ndt {\n font-weight: bold;\n grid-column-start: 1;\n}\ndd {\n grid-column-start: 2;\n}\ndl + dl {\n margin-left: 4em;\n}\n</style>','\n <div class="summary-annotations-wrapper">\n <span class="annotations-dismiss">\xd7</span>\n <div class="dl-cols">\n <dl>\n <dt>Characters</dt>\n <dd class="summary-chars">-</dd>\n <dt >Words</dt>\n <dd class="summary-words">-</dd>\n <dt>Sentences</dt>\n <dd class="summary-sentences">-</dd>\n </dl>\n <dl>\n <dt>Readability (Grade)</dt>\n <dd class="summary-readability">-</dd>\n <dt>Reading Time (min)</dt>\n <dd class="summary-reading_time_min">- min</dd>\n <dt> </dt>\n <dd> </dd>\n </dl>\n </div>\n <div class="summary-annotations">\n </div>\n <div class="sapling-annotations-error"></div>\n <div class="sapling-annotations-spinner" style=""><img src="').concat(Ye("assets/fa-spinner-solid.svg"),'" /></div>\n </div>');this.summaryAnnotationsContainer[0].attachShadow({mode:"open"}),this.shadowRoot=this.summaryAnnotationsContainer[0].shadowRoot,Ba(this.shadowRoot).html(e),Ba("html").append(this.summaryAnnotationsContainer)}this.summaryWrapper=Ba(this.shadowRoot).find(".summary-annotations-wrapper").first(),this.summaryList=Ba(this.shadowRoot).find(".summary-annotations").first(),this.annotationsSpinner=Ba(this.shadowRoot).find(".sapling-annotations-spinner").first(),this.annotationsError=Ba(this.summaryWrapper).find(".sapling-annotations-error").first(),Ba(this.summaryWrapper).find(".annotations-dismiss").on("mousedown",this.handleDismiss.bind(this)),this.annotationsError.hide(),this.summaryDragger=new Na(this.summaryWrapper,this.summaryWrapper,null,!1)}},{key:"summaryVisible",value:function(){return this.summaryAnnotationsContainer.attr("container-id")===this.containerId}},{key:"showSummary",value:function(t){this.summaryAnnotationsContainer&&(this.updateAnnotationsDOM(),this.summaryAnnotationsContainer.attr("container-id",this.containerId),this.updateToggle(t),this.summaryAnnotationsContainer.show())}},{key:"hideSummary",value:function(){this.summaryAnnotationsContainer&&(this.summaryAnnotationsContainer.hide(),this.summaryAnnotationsContainer.attr("container-id",""))}},{key:"buildSummaryElement",value:function(t,e,n){var r=Ta[t]["background-color"].replace("0.2)","1.0)"),i=t.replaceAll(" ","-"),o=t.replaceAll("_"," ");return"dei"===o&&(o="DEI"),Ba('\n <div class="sapling-summary-annotation">\n <span class="sapling-annotation-count">'.concat(e,'</span>\n <span class="sapling-annotation-type ').concat(i,'" style="background-color: ').concat(r,';">').concat(o,'</span>\n <span class="sapling-annotation-explanation">\n ').concat(n,"\n </span>\n </div>\n "))}},{key:"setSummaryAnnotations",value:function(t){this.annotationsCache=t,this.summaryVisible()&&this.updateAnnotationsDOM()}},{key:"setStatistics",value:function(t){this.statisticsCache=t,this.summaryVisible()&&this.updateAnnotationsDOM()}},{key:"updateAnnotationsDOM",value:function(){if(this.summaryWrapper)for(var t=0,e=Object.entries(this.statisticsCache);t<e.length;t++){var n=Pa(e[t],2),r=n[0],i=n[1];this.summaryWrapper.find(".summary-".concat(r)).text(i)}this.clear(),this.annotationsError.hide();var o,a=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Ma(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(this.annotationsCache);try{for(a.s();!(o=a.n()).done;){var s=o.value,u=this.buildSummaryElement(s.type,s.count,s.explanation);this.summaryList.append(u)}}catch(t){a.e(t)}finally{a.f()}"SDK"===h.MODE&&Sapling.freemium&&!Ie()||(this.summaryList.append(Ba('\n <div>\n <label class="sapling-annotation-toggle-row">\n <div class="sapling-annotation-toggle switch">\n <input type="checkbox">\n <span class="slider"></span>\n </div>\n <span class="sapling-annotation-explanation">\n <span class="toggle-text">Hide Advanced Edits</span>\n </span>\n </label>\n </div>\n ')),Ba("input",this.summaryList).change(this.editsToggled.bind(this)))}},{key:"editsToggled",value:function(t){var e=t.currentTarget.checked;this.updateToggle(e),e?this.annotationsOverlay.showEdits():this.annotationsOverlay.hideEdits()}},{key:"updateToggle",value:function(t){Ba("input",this.summaryList).prop("checked",t),t?Ba(".toggle-text",this.summaryList).text("Advanced Edits Shown"):Ba(".toggle-text",this.summaryList).text("Advanced Edits Hidden")}},{key:"clear",value:function(){this.summaryList&&this.summaryList.html("")}},{key:"setErrorStatus",value:function(t){this.annotationsError.text(t),this.annotationsError.show()}},{key:"showSpinner",value:function(){this.annotationsSpinner&&this.annotationsSpinner.show()}},{key:"hideSpinner",value:function(){this.annotationsSpinner&&this.annotationsSpinner.hide()}}],n&&qa(e.prototype,n),r&&qa(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),za=n(563);function Wa(t){return Wa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wa(t)}function Ga(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Ya(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ya(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Ya(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function $a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(i=r.key,o=void 0,o=function(t,e){if("object"!==Wa(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Wa(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===Wa(o)?o:String(o)),r)}var i,o}var Va=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.containerId=e,this.shadowHost=n,this.annotationsContainer=null,this.summaryAnnotations=null,this.annotationsAlwaysVisible=!1,this.editsVisible=!0,this.annotationEditInfos={},this.lastQueryText=null}var e,n,r;return e=t,(n=[{key:"createUIElements",value:function(){if(pe()){be()||(this.editsVisible=!1);var t=this.shadowHost.shadowRoot;this.annotationsContainer=za(".sapling-annotations-container",t),this.annotationsContainer.length||(this.annotationsContainer=za('\n <div class="sapling-annotations-container">\n </div>\n ')),za(t).append(this.annotationsContainer),this.summaryAnnotations||(this.summaryAnnotations=new Ua(this.containerId,this),this.summaryAnnotations.maybeEmbedSaplingSummaryAnnotations()),this.hideSummaryAnnotations(),"SDK"===h.MODE&&Sapling.autoShowAdvancedEdits&&(this.annotationsAlwaysVisible=!0)}}},{key:"positionAnnotations",value:function(){var t=this.shadowHost.getBoundingClientRect(),e=this.summaryAnnotations.summaryWrapper,n=t.left+window.scrollX+t.width-e.width()-6,r=t.bottom+window.scrollY-e.height()-25;r=Math.max(r,20),n=Math.max(n,0),e.css({position:"absolute",left:n,top:r})}},{key:"updateAnnotationSummary",value:function(){for(var t={},e=0,n=Object.values(this.annotationEditInfos);e<n.length;e++){var r=n[e],i=r.edit.category;if(i){var o=r.edit.description;t[i]||(t[i]={type:i,count:0,explanation:o}),t[i].count++}}this.summaryAnnotations.setSummaryAnnotations(Object.values(t)),this.positionAnnotations(),this.summaryAnnotations.updateToggle(this.editsVisible)}},{key:"updateAnnotationForOverlay",value:function(t,e){this.annotationEditInfos[t]=e;var n,r=Ga(e.domElements);try{for(r.s();!(n=r.n()).done;){var i=n.value;this.annotationsAlwaysVisible||this.editsVisible?za(i).show():za(i).hide()}}catch(t){r.e(t)}finally{r.f()}}},{key:"clearAnnotationForOverlay",value:function(t){delete this.annotationEditInfos[t]}},{key:"queryAndUpdate",value:function(){var t=this;if(pe()){this.summaryAnnotations.showSpinner();var e=za(this.shadowHost).prevAll("[sapling-id],[sapling-textarea-id]").first()[0];if(void 0!==e&&e){var n=e.innerHTML.trim();if(n&&this.lastQueryText!==n){this.lastQueryText=n;var r=za(this.shadowHost).prev().attr("sapling-id");r||(r=za(this.shadowHost).prev().attr("sapling-textarea-id")),function(t,e,n,r,i){ht("request/GET_STATISTICS",{html:w()(t,5e4),sessionId:n,context:Dt()},r,i)}(n,0,r,(function(e){t.summaryAnnotations.setStatistics(e.statistics)}),(function(e){e&&t.setErrorStatus(e.toString())})),this.summaryAnnotations.hideSpinner()}else this.summaryAnnotations.hideSpinner()}else this.summaryAnnotations.hideSpinner()}}},{key:"toggleSummaryAnnotations",value:function(){this.summaryAnnotations.summaryVisible()?this.hideSummaryAnnotations():this.showSummaryAnnotations()}},{key:"showEdits",value:function(){this.editsVisible=!0;for(var t=0,e=Object.values(this.annotationEditInfos);t<e.length;t++){var n,r=Ga(e[t].domElements);try{for(r.s();!(n=r.n()).done;){var i=n.value;za(i).show()}}catch(t){r.e(t)}finally{r.f()}}this.summaryAnnotations.updateToggle(this.editsVisible)}},{key:"hideEdits",value:function(){if(this.editsVisible=!1,!this.annotationsAlwaysVisible){for(var t=0,e=Object.values(this.annotationEditInfos);t<e.length;t++){var n,r=Ga(e[t].domElements);try{for(r.s();!(n=r.n()).done;){var i=n.value;za(i).hide()}}catch(t){r.e(t)}finally{r.f()}}this.summaryAnnotations.updateToggle(this.editsVisible)}}},{key:"showSummaryAnnotations",value:function(){this.summaryAnnotations.showSummary(this.editsVisible),this.positionAnnotations()}},{key:"hideSummaryAnnotations",value:function(){this.summaryAnnotations.hideSummary()}},{key:"removeUIElements",value:function(){this.shadowHost&&this.shadowHost.remove(),this.annotationEditInfos={}}}])&&$a(e.prototype,n),r&&$a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Ja=n(563);function Xa(t){return Xa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xa(t)}function Ka(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Za(r.key),r)}}function Qa(t,e,n){return(e=Za(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Za(t){var e=function(t,e){if("object"!==Xa(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Xa(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Xa(e)?e:String(e)}var ts="\n .sapling-utility-overlay {\n background-color: rgba(255, 255, 255, 0.9);\n border-radius: 20px;\n display: none;\n position: absolute;\n z-index: 999;\n box-shadow: 0 1px 2px 0 rgb(65 69 73 / 30%), 0 3px 6px 2px rgb(65 69 73 / 15%);\n border-radius: 8px;\n font: 9pt helvetica, arial;\n flex-direction: column;\n }\n\n .sapling-utility-overlay.sapling-utility-empty .sapling-utility-empty-message {\n display: block;\n }\n\n .sapling-utility-overlay.sapling-utility-empty .sapling-utility-data {\n display: none;\n }\n\n .sapling-utility-empty-message {\n display: none;\n padding: 10px;\n }\n\n .sapling-utility-overlay.visible {\n display: flex;\n }\n\n .sapling-utility-sentence-overlays {\n display: none;\n z-index: 999;\n }\n\n .sapling-utility-sentence-overlays.visible {\n display: inherit;\n }\n\n .sapling-utility-sentence-overlays.sapling-loading {\n opacity: 0.5;\n transition: all 0.25s;\n }\n\n .sapling-utility-header-button {\n position: absolute;\n top: 10px;\n cursor: pointer;\n width: 12px;\n }\n\n .sapling-utility-overlay-cancel {\n right: 10px;\n }\n\n .sapling-utility-overlay-drag {\n right: 30px;\n }\n\n .sapling-utility-overlay-spinner {\n transform: rotate(0deg);\n right: 30px;\n opacity: 0;\n }\n\n .sapling-utility-overlay-spinner.sapling-loading {\n transform: rotate(0deg);\n animation: rotation 3s linear infinite;\n opacity: 1;\n }\n\n @keyframes rotation {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n }\n\n .utility-overlay-header {\n background-color: #e8eaf6;\n color: #5c6bc0;\n font-size: 14px;\n padding: 8px;\n border-bottom: 1px solid #ccc;\n display: flex;\n align-items: center;\n cursor: grab;\n }\n\n .sapling-utility-data {\n padding: 8px;\n padding-top: 4px;\n }\n\n .sapling-utility-data-row {\n padding: 4px;\n padding-left: 0;\n display: flex;\n width: 100%;\n justify-content: space-between;\n }\n\n .sapling-utility-data-row span {\n margin-right: 4px;\n }\n\n .sapling-utility-beta {\n background-color: rgba(92, 107, 192, 0.5);\n color: #fff;\n padding: 2px;\n border-radius: 2px;\n text-transform: uppercase;\n font-size: 9px;\n margin-left: 8px;\n }\n",es=function(){function t(e,n,r){var i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.containerId=n,this.shadowHost=e,this.badge=r,this.queryAndUpdate=_.debounce((function(){return i._queryAndUpdate()}),100),this.inDOM=document.documentElement.contains(this.shadowHost),this.overlayDragger=null,this.queryEl=null,this.hudEl=null,this.assetUrls={"xmark-solid":Ye("assets/xmark-solid.svg"),"spinner-solid":Ye("assets/spinner-solid.svg"),"thumbs-up-regular":Ye("assets/thumbs-up-regular.svg"),"thumbs-down-regular":Ye("assets/thumbs-down-regular.svg")};var o=this.utilityName().toLowerCase().replace(/\s+/g,"-");if(Ja("sapling-".concat(o,"-overlays-container")).length){var a=Ja("sapling-".concat(o,"-overlays-container")).first();this.utilityContainerShadowRoot=Ja(a[0].shadowRoot)}else{var s=document.createElement("sapling-".concat(o,"-overlays-container"));Ja("html").append(Ja(s)),s.attachShadow({mode:"open"}),this.utilityContainerShadowRoot=Ja(s.shadowRoot),Ja(this.utilityContainerShadowRoot).append("\n <style>".concat(ts).concat(this.utilityCSS(),"</style>\n "))}this._setupStyleMutationObserver(),this._setupContainerRemovedObserver()}var e,n,r;return e=t,(n=[{key:"utilityName",value:function(){throw new Error("Method not implemented.")}},{key:"renderUtilityData",value:function(){throw new Error("Method not implemented")}},{key:"utilityCSS",value:function(){return""}},{key:"isBeta",value:function(){return!0}},{key:"isUtilityEnabled",value:function(){throw new Error("Method not implemented")}},{key:"getUtilityData",value:function(t,e,n,r,i){throw new Error("Method not implemented")}},{key:"updateHud",value:function(t){var e=this,n=t.hudEmoji,r=t.hudWarning,i=t.hudTitle;if(null!=n||null!=r?(null==this.hudEl&&(this.hudEl=document.createElement("div"),Ja(this.hudEl).addClass("sapling-tone-hud"),Ja(this.hudEl).attr("style","opacity: 0")),i?Ja(this.hudEl).attr("title",i):Ja(this.hudEl).attr("title",""),Ja(this.hudEl).html(""),Ja(this.hudEl).append(n),Ja(this.hudEl).append(r)):this.hudEl=null,Ja(this.badge.headsUpContainer).html(this.hudEl),this.hudEl){Ja(this.hudEl).on("click",(function(){e.toggleVisibility()}));var o=this.hudEl.getBoundingClientRect(),a=o.height,s=o.width,u=this.badge.badge[0].getBoundingClientRect().width;Ja(this.badge.headsUpContainer).css({left:"".concat(-12-Math.max(u,8)-s,"px"),top:"".concat(-.9*a,"px")}),Ja(this.hudEl).attr("style","opacity: 1")}}},{key:"_setupStyleMutationObserver",value:function(){var t=this;new MutationObserver((function(e){t.renderUtilityData()})).observe(this.shadowHost,{attributes:!0,attributeOldValue:!0,attributeFilter:["style"],childList:!0,subtree:!0})}},{key:"_setupContainerRemovedObserver",value:function(){var t=this;Ja(this.shadowHost).parent(),setInterval((function(){t.inDOM&&!document.documentElement.contains(t.shadowHost)&&t.toggleVisibility()}),50)}},{key:"createUIElements",value:function(){var t=this;this.utilityOverlay||(this.utilityOverlay=document.createElement("div"),Ja(this.utilityOverlay).addClass("sapling-utility-overlay"),Ja(this.utilityOverlay).addClass("sapling-utility-empty"),Ja(this.utilityOverlay).attr("id","utility-overlay-".concat(this.containerId)),this.cancelButton=document.createElement("div"),Ja(this.cancelButton).html('<img src="'.concat(this.assetUrls["xmark-solid"],'" />')),Ja(this.cancelButton).addClass("sapling-utility-overlay-cancel"),Ja(this.cancelButton).addClass("sapling-utility-header-button"),Ja(this.cancelButton).on("click",(function(){t.toggleVisibility()})),this.loadingIndicator=document.createElement("div"),Ja(this.loadingIndicator).html('<img src="'.concat(this.assetUrls["spinner-solid"],'" />')),Ja(this.loadingIndicator).addClass("sapling-utility-header-button"),Ja(this.loadingIndicator).addClass("sapling-utility-overlay-spinner"),this.overlayHeader=document.createElement("div"),Ja(this.overlayHeader).addClass("utility-overlay-header"),Ja(this.overlayHeader).html("\n ".concat(this.utilityName(),"\n ").concat(this.isBeta()?'<span class="sapling-utility-beta">beta</span>':null,"\n ")),this.overlayDragger=new Na(Ja(this.utilityOverlay),Ja(this.overlayHeader),null),Ja(this.utilityOverlay).append(this.overlayHeader),Ja(this.utilityOverlay).append(this.loadingIndicator),Ja(this.utilityOverlay).append(this.cancelButton),Ja(this.utilityOverlay).append('<div class="sapling-utility-data"></div>'),Ja(this.utilityOverlay).append('<div class="sapling-utility-empty-message">Waiting for text...</div>'),Ja(this.utilityContainerShadowRoot).append(this.utilityOverlay),this.sentenceOverlays=document.createElement("div"),Ja(this.sentenceOverlays).addClass("sapling-utility-sentence-overlays"),Ja(this.sentenceOverlays).attr("id","utility-sentence-overlay-".concat(this.containerId)),Ja(this.shadowHost.shadowRoot).append("<style>".concat(ts).concat(this.utilityCSS(),"</style>")),Ja(this.shadowHost.shadowRoot).append(this.sentenceOverlays))}},{key:"updateOverlayPosition",value:function(){var t=this.shadowHost.getBoundingClientRect(),e=t.bottom,n=t.right,r=e-2*this.constructor.HEIGHT-this.constructor.PADDING+window.scrollY,i=n-this.constructor.WIDTH-this.constructor.PADDING+window.scrollX,o=Math.max(W(this.shadowHost.parentNode),9999);Ja(this.utilityOverlay).css({zIndex:o});var a=getComputedStyle(this.shadowHost).fontSize;Ja(this.sentenceOverlays).css({zIndex:o,fontSize:a}),Ja(this.utilityOverlay).css({top:r,left:i,width:this.constructor.WIDTH,minHeight:this.constructor.HEIGHT}),this.updateSentenceOverlayPosition()}},{key:"updateSentenceOverlayPosition",value:function(){var t=this.shadowHost.getBoundingClientRect();Ja(this.sentenceOverlays).css({position:"absolute",top:0,left:0,width:"".concat(t.width,"px"),height:"".concat(t.height,"px"),pointerEvents:"none"})}},{key:"toggleVisibility",value:function(){if(this.updateOverlayPosition(),Ja(this.utilityOverlay).toggleClass("visible"),Ja(this.sentenceOverlays).toggleClass("visible"),this.inDOM=Ja(this.utilityOverlay).is(".visible"),Ja(this.utilityOverlay).is(".visible")){var t=this.utilityName().toLowerCase().replace(/\s+/g,"_");Et("".concat(t,"_overlay_visible"))}}},{key:"initForCheckOnce",value:function(){this.showOverlay(),this.hideOnTextChange()}},{key:"showOverlay",value:function(){this.updateOverlayPosition(),Ja(this.utilityOverlay).addClass("visible"),Ja(this.sentenceOverlays).addClass("visible"),this.inDOM=!0}},{key:"hideOnTextChange",value:function(){var t=this;this.textChangeCheckInterval=setInterval((function(){t._getQueryText()!==t.lastQueryText&&(Ja(t.sentenceOverlays).html(""),clearInterval(t.textChangeCheckInterval))}),500)}},{key:"getTextNodes",value:function(t,e){var n=this;t.nodeType!==Node.TEXT_NODE?t.childNodes.forEach((function(t){return n.getTextNodes(t,e)})):e.push({node:t,text:t.data})}},{key:"_getQueryText",value:function(){if(this.queryEl=Ja(this.shadowHost).prevAll("[sapling-id],[sapling-textarea-id],[contenteditable]").first()[0],void 0===this.queryEl||!this.queryEl)return null;var t=this.queryEl.innerHTML;return this.queryEl.innerText.trim()?t:(this.resetUIElements(),null)}},{key:"_queryAndUpdate",value:function(){var t=this,e=this._getQueryText();null!=e&&(this.lastQueryText!=e?this.isUtilityEnabled()&&(this.lastQueryText=e,Ja(this.loadingIndicator).addClass("sapling-loading"),Ja(this.sentenceOverlays).addClass("sapling-loading"),this.getUtilityData(e,"en",this.containerId,(function(e){Ja(t.utilityOverlay).removeClass("sapling-utility-empty"),t.renderUtilityData(),Ja(t.loadingIndicator).removeClass("sapling-loading"),Ja(t.sentenceOverlays).removeClass("sapling-loading")}),(function(e){Ja(t.loadingIndicator).removeClass("sapling-loading"),Ja(t.sentenceOverlays).removeClass("sapling-loading")}))):this.renderUtilityData())}},{key:"removeUIElements",value:function(){Ja(this.utilityOverlay).remove()}},{key:"resetUIElements",value:function(){Ja(this.sentenceOverlays).html(""),Ja(this.utilityOverlay).addClass("sapling-utility-empty"),this.hudEl=null,Ja(this.badge.headsUpContainer).html(this.hudEl)}},{key:"_getRanges",value:function(t,e){for(var n=0,r=0,i=0,o=[];r<t.length&&n<e.length;){for(var a=t[r],s=e[n].text.indexOf(a[0],i);s<0;){if(i=0,++n===e.length)return[];s=e[n].text.indexOf(a[0],i)}var u=n;i=s;for(var c=Math.max(0,a.length-(e[n].text.length-i)),l=i+a.length;c;){if(++n===e.length)return[];l=c,c=Math.max(0,c-e[n].text.length)}var f=n;o.push({startingTextIndex:u,startingOffset:s,endingTextIndex:f,endingOffset:l,sentenceIndex:r}),l<e[n].text.length-1?i=l:(i=0,n++),r++}return o}}])&&Ka(e.prototype,n),r&&Ka(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ns(t){switch(t){case"admiring":case"amused":case"approving":case"confident":case"eager":case"excited":case"grateful":case"joyful":case"loving":case"optimistic":case"relieved":return"joy";case"angry":case"annoyed":case"repulsed":case"disappointed":case"disapproving":return"anger";case"aware":case"neutral":case"sympathetic":return"neutral";case"confused":case"curious":case"surprised":return"surprise";case"fearful":return"fear";case"embarassed":case"mournful":case"remorseful":case"sad":case"worried":return"sadness"}return"neutral"}function rs(t){switch(ns(t)){case"joy":case"neutral":case"surprise":case"fear":case"sadness":return"#535f99";case"anger":return"red"}}Qa(es,"WIDTH",300),Qa(es,"HEIGHT",50),Qa(es,"PADDING",15);var is=n(563);function os(t){return os="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},os(t)}function as(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return ss(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ss(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function ss(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function us(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(i=r.key,o=void 0,o=function(t,e){if("object"!==os(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==os(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===os(o)?o:String(o)),r)}var i,o}function cs(){return cs="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ps(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},cs.apply(this,arguments)}function ls(t,e){return ls=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ls(t,e)}function fs(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=ps(t);if(e){var i=ps(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===os(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function ps(t){return ps=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ps(t)}var ds='\n .sapling-utility-data-row .tone-feedback {\n display: flex;\n justify-content: space-between;\n width: 60px;\n height: 20px;\n }\n\n .sapling-utility-data-row.hide-feedback-buttons .tone-feedback {\n display: none;\n }\n\n .sapling-utility-data-row .tone-feedback.feedback-recorded {\n font-size: 8px;\n text-transform: uppercase;\n text-align: center;\n color: #999;\n line-height: 10px;\n }\n\n .tone-feedback-button img:hover, .tone-feedback-button img.selected {\n opacity: 0.5;\n }\n\n .tone-feedback-button img:active {\n opacity: 1;\n }\n\n .sapling-utility-data-row .tone-name {\n text-transform: capitalize;\n }\n\n .tone-sentence-feedback.feedback-recorded {\n display: none !important;\n }\n\n .tone-sentence-feedback {\n right: -4.75em;\n top: 0px;\n display: none;\n width: 74px;\n height: 38px;\n justify-content: space-between;\n background: white;\n padding: 5px;\n border: 2px solid #535f99;\n border-radius: 5px;\n align-items: center;\n box-sizing: border-box;\n flex-direction: column;\n margin-left: 4px;\n padding-top: 3px;\n }\n\n .tone-sentence-feedback:before {\n content: "";\n position: absolute;\n top: 4px;\n left: 0.9em;\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n border-right: 6px solid #535f99;\n }\n\n .tone-sentence-feedback.hide-feedback-buttons {\n justify-content: center;\n }\n\n .tone-sentence-feedback-title {\n text-transform: uppercase;\n font-size: 8px;\n width: 74px;\n text-align: center;\n }\n\n .tone-sentence-feedback-button-container {\n display: flex;\n width: 100%;\n justify-content: space-around;\n }\n\n .hide-feedback-buttons .tone-sentence-feedback-button-container {\n display: none;\n }\n\n .tone-feedback-button {\n display: flex;\n align-items: center;\n }\n\n .tone-feedback-button img {\n width: 15px;\n opacity: 0.25;\n cursor: pointer;\n padding: 1px;\n }\n\n .tone-feedback-button img:hover, .tone-feedback-button img.selected {\n opacity: 0.5;\n }\n\n .tone-feedback-button img:active {\n opacity: 1;\n }\n',hs=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ls(t,e)}(o,t);var e,n,r,i=fs(o);function o(t,e,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this,t,e,n)).topTone=null,r.toneData=null,r.feedbackDisplayClass="SDK"!==h.MODE||Sapling.toneFeedbackEnabled?"":"hide-feedback-buttons",r}return e=o,n=[{key:"utilityName",value:function(){return"Tone"}},{key:"utilityCSS",value:function(){return"".concat(ds)}},{key:"isBeta",value:function(){return!0}},{key:"isUtilityEnabled",value:function(){return ke()}},{key:"getUtilityData",value:function(t,e,n,r,i){var o=this;!function(t,e,n,r,i){ht("request/GET_TONE",{html:w()(t,25e3),sessionId:n,context:Dt()},r,i)}(t,0,n,(function(t){o.toneData=t.tone,r(t)}),(function(t){i(t)}))}},{key:"_updateToneHud",value:function(t,e){var n,r=null,i=null;t.length>0&&(this.topTone=t[0],"neutral"!==this.topTone[1].toLowerCase()&&(r='<span style="padding-top: 0.1rem;">'.concat(this.topTone[2],"</span>")));var o,a=as(e);try{for(a.s();!(o=a.n()).done;)"anger"===ns(o.value[0][1])&&(n="Angry sentence detected",i='\n <div style="margin-left: 3px; transform: rotate(10deg); padding-top: 0.15rem;">\n <svg fill="red" height="1em" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 512">\x3c!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path d="M64 64c0-17.7-14.3-32-32-32S0 46.3 0 64V320c0 17.7 14.3 32 32 32s32-14.3 32-32V64zM32 480a40 40 0 1 0 0-80 40 40 0 1 0 0 80z"/></svg>\n </div>\n ')}catch(t){a.e(t)}finally{a.f()}this.updateHud({hudEmoji:r,hudWarning:i,hudTitle:n})}},{key:"createUIElements",value:function(){var t=this;cs(ps(o.prototype),"createUIElements",this).call(this),is(this.utilityOverlay).on("click",".tone-feedback-button img",(function(e){var n=is(e.target),r=is(n).is(".selected");is(n).parents(".tone-feedback").find("img").removeClass("selected"),r||is(n).addClass("selected");var i=JSON.parse(is(n).parents(".sapling-tone-data-row").attr("data-tone")),o=is(n).is(".thumbs-up")?1:-1;xt(t.lastQueryText,i,"overall",o,t.containerId,(function(t){is(n).parents(".tone-feedback").addClass("feedback-recorded").html("Feedback recorded")}),(function(t){is(n).parents(".tone-feedback").addClass("feedback-recorded").html("Feedback recorded")}))}))}},{key:"renderUtilityData",value:function(){var t=this,e=this.toneData,n=this.queryEl;if(e&&n){var r=e.overall,i=e.sents,o=e.results;if(r){var a=r.filter((function(t){return t[0]>.05})).sort((function(t,e){return e[0]-t[0]}));this._updateToneHud(a,o);var s,u="",c=as(a);try{for(c.s();!(s=c.n()).done;){var l=s.value,f=5*Math.round(100*l[0]/5);u+='\n <div class="sapling-utility-data-row '.concat(this.feedbackDisplayClass,"\" data-tone='").concat(JSON.stringify(l),'\'>\n <div>\n <span class="tone-emoji">').concat(l[2],'</span>\n <span class="tone-name">').concat(l[1],' -</span>\n <span class="tone-percentage">').concat(f,'%</span>\n </div>\n <div class="tone-feedback">\n <span class="tone-feedback-button"><img class="thumbs-up" src="').concat(this.assetUrls["thumbs-up-regular"],'" /></span>\n <span class="tone-feedback-button"><img class="thumbs-down" src="').concat(this.assetUrls["thumbs-down-regular"],'" /></span>\n </div>\n </div>\n ')}}catch(t){c.e(t)}finally{c.f()}is(this.utilityOverlay).find(".sapling-utility-data").html(u),this.updateSentenceOverlayPosition();var p=this.shadowHost.getBoundingClientRect(),d=document.createElement("sapling-sentence-tones"),h=[];this.getTextNodes(n,h);for(var g=this._getRanges(i,h),v=function(){var e=g[y],n=e.startingTextIndex,r=e.startingOffset,a=e.endingTextIndex,s=e.endingOffset,u=e.sentenceIndex,c=i[u],l="."===c.slice(-1)?5:0,f=m().includes("zendesk")?8:0,v=document.createRange();v.setStart(h[n].node,r),v.setEnd(h[a].node,s);var b=v.getClientRects(),D=b.item(b.length-1),w=document.createElement("div");is(w).css({position:"absolute",pointerEvents:"auto",left:"".concat(D.x-p.x+D.width-l,"px"),top:"".concat(D.y-p.y-10+f,"px"),width:"20px",height:"20px",cursor:"pointer",opacity:.5,display:"flex"}),is(w).attr("data-sentence",c),is(w).attr("data-tone",JSON.stringify(o[y][0])),w.innerHTML="\n ".concat(o[y][0][2],'\n <div class="tone-sentence-feedback ').concat(t.feedbackDisplayClass,'">\n <div class="tone-sentence-feedback-title">').concat(o[y][0][1],'</div>\n <div class="tone-sentence-feedback-button-container">\n <div class="tone-feedback-button"><img class="thumbs-up" src="').concat(t.assetUrls["thumbs-up-regular"],'" /></div>\n <div class="tone-feedback-button"><img class="thumbs-down" src="').concat(t.assetUrls["thumbs-down-regular"],'" /></div>\n </div>\n </div>\n '),w.rects=[];var x,E={},A=as(b);try{for(A.s();!(x=A.n()).done;){var _=x.value;if(!E.hasOwnProperty(JSON.stringify(_))){E[JSON.stringify(_)]=1;var S=rs(o[y][0][1].toLowerCase()),C=document.createElement("div");is(C).css({position:"absolute",left:"".concat(_.x-p.x-1,"px"),top:"".concat(_.y-p.y-1,"px"),width:"".concat(_.width+2,"px"),height:"".concat(_.height+2,"px"),backgroundColor:S,border:"1px solid black",borderRadius:"5px",cursor:"pointer",opacity:.1}),is(d).append(C),w.rects.push(C)}}}catch(t){A.e(t)}finally{A.f()}is(d).append(w),w.addEventListener("mouseenter",(function(){is(w).css({opacity:1}),is(w).find(".tone-sentence-feedback").css({display:"flex"}),w.rects.forEach((function(t){return t.style.opacity=.25}))})),w.addEventListener("mouseleave",(function(){is(w).css({opacity:.75}),is(w).find(".tone-sentence-feedback").css({display:"none"}),w.rects.forEach((function(t){return t.style.opacity=.1}))})),is(w).on("click",".tone-feedback-button img",(function(e){var n=is(e.target),r=is(n).is(".selected");is(n).parents(".tone-sentence-feedback").find("img").removeClass("selected"),r||is(n).addClass("selected");var i=JSON.parse(is(w).attr("data-tone")),o=is(n).is(".thumbs-up")?1:-1;xt(c,i,"sentence",o,t.containerId,(function(t){is(n).parents(".tone-sentence-feedback").addClass("feedback-recorded")}),(function(t){is(n).parents(".tone-sentence-feedback").addClass("feedback-recorded")}))}))},y=0;y<g.length;y++)v();is(this.sentenceOverlays).html("<style>".concat(ds,"</style>")),is(this.sentenceOverlays).append(d)}}}},{key:"getTopTone",value:function(){return this.topTone}}],n&&us(e.prototype,n),r&&us(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(es),gs=n(563);function vs(t){return vs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vs(t)}function ys(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return ms(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ms(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function ms(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function bs(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(i=r.key,o=void 0,o=function(t,e){if("object"!==vs(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==vs(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===vs(o)?o:String(o)),r)}var i,o}function Ds(){return Ds="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Es(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Ds.apply(this,arguments)}function ws(t,e){return ws=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ws(t,e)}function xs(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Es(t);if(e){var i=Es(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===vs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function Es(t){return Es=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Es(t)}var As=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ws(t,e)}(o,t);var e,n,r,i=xs(o);function o(t,e,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this,t,e,n)).aiDetectionData=null,r}return e=o,n=[{key:"utilityName",value:function(){return"AI Detect"}},{key:"utilityCSS",value:function(){return"".concat("\n\n")}},{key:"isBeta",value:function(){return!0}},{key:"isUtilityEnabled",value:function(){return Se()}},{key:"getUtilityData",value:function(t,e,n,r,i){var o=this;wt(t,0,n,{source:"sdk"},(function(t){o.aiDetectionData=t.aidetect,r(t)}),(function(t){i(t)}))}},{key:"createUIElements",value:function(){Ds(Es(o.prototype),"createUIElements",this).call(this)}},{key:"renderUtilityData",value:function(){var t=this.aiDetectionData,e=this.queryEl;if(t&&e){var n=this.aiDetectionData,r=n.score,i=n.sentence_scores;if(r){var o='\n <div class="sapling-utility-data-row">\n Percentage fake: '.concat((100*r).toFixed(2),"%\n </div>\n ");gs(this.utilityOverlay).find(".sapling-utility-data").html(o),this.updateSentenceOverlayPosition();var a=this.shadowHost.getBoundingClientRect(),s=document.createElement("sapling-sentence-ai-detections"),u=[];this.getTextNodes(e,u);for(var c=i.map((function(t){return t.sentence})),l=this._getRanges(c,u),f=function(){var t=l[p],e=t.startingTextIndex,n=t.startingOffset,r=t.endingTextIndex,o=t.endingOffset,c=t.sentenceIndex,f=i[c],d=document.createRange();d.setStart(u[e].node,n),d.setEnd(u[r].node,o);var h,g=d.getClientRects(),v=[],y={},m=ys(g);try{for(m.s();!(h=m.n()).done;){var b=h.value;if(!y.hasOwnProperty(JSON.stringify(b))){y[JSON.stringify(b)]=1;var D="rgba(255, 0, 0, ".concat(f.score,")"),w=document.createElement("div");gs(w).css({position:"absolute",left:"".concat(b.x-a.x-1,"px"),top:"".concat(b.y-a.y-1,"px"),width:"".concat(b.width+2,"px"),height:"".concat(b.height+2,"px"),backgroundColor:D,border:"1px solid black",borderRadius:"5px",cursor:"pointer",opacity:.1}),gs(s).append(w),v.push(w)}}}catch(t){m.e(t)}finally{m.f()}v.forEach((function(t){t.addEventListener("mouseenter",(function(){v.forEach((function(t){return t.style.opacity=.25}))}))})),v.forEach((function(t){t.addEventListener("mouseleave",(function(){v.forEach((function(t){return t.style.opacity=.1}))}))}))},p=0;p<l.length;p++)f();gs(this.sentenceOverlays).html("<style>".concat("\n\n","</style>")),gs(this.sentenceOverlays).append(s)}}}}],n&&bs(e.prototype,n),r&&bs(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(es);function _s(t){for(var e,n,r,i,o=t[0],a=1;a<t.length;a++)e=o,n=t[a],r=void 0,i=void 0,r=e.editRange,i=n.editRange,o=Or(r,i)?n:Or(i,r)||Tr(r,i)?e:Tr(i,r)?n:e;return o}function Ss(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||ks(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Cs(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=ks(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function ks(t,e){if(t){if("string"==typeof t)return Os(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Os(t,e):void 0}}function Os(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Ts=!0,Fs=null,js=[],Ls=null,Is=!1;function Ns(){Fs&&(Fs.removeEventListener("keydown",Ms),Fs.removeEventListener("paste",Hs),Fs=null),js=[],Ls=null,Is=!1,document.removeEventListener("selectionchange",Rs)}function Bs(t,e,n){if(Ns(),ee){for(var r=[],i=0,o=Object.values(n);i<o.length;i++){var a=o[i];e.edit.originalText===a.edit.originalText&&e.edit.editId!==a.edit.editId&&r.push(a.editRange)}r.length&&function(t,e,n){if(Ts=!0,Is=!1,js=[],ve(Fs=t)){Ls=[e.startOffset,e.endOffset];var r,i=Cs(n);try{for(i.s();!(r=i.n()).done;){var o=r.value;js.push([o.startOffset,o.endOffset])}}catch(t){i.e(t)}finally{i.f()}}else{if(null===(Ls=B(Fs,e)))return void(Fs=null);var a,s=Cs(n);try{for(s.s();!(a=s.n()).done;){var u=a.value,c=B(Fs,u);null!==c&&js.push(c)}}catch(t){s.e(t)}finally{s.f()}}js.sort((function(t,e){return e[0]-t[0]})),Fs.addEventListener("keydown",Ms),Fs.addEventListener("paste",Hs),document.addEventListener("selectionchange",Rs)}(t,e.editRange,r)}}function Rs(t){if(ve(Fs)){var e=Ls[0],n=Ls[1];n++;var r=Fs,i=r.selectionStart,o=r.selectionEnd;if(e<=i&&i<=n||e<=o&&o<=n)return}else{var a=window.getSelection();if(a){var s=a.getRangeAt(0),u=Ls[0],c=Ls[1];c++;var l=B(Fs,s);if(u<=l[0]&&l[0]<=c||u<=l[1]&&l[1]<=c)return}}Ns()}function Ps(t,e){for(var n=t.length,r=Ls[1]-Ls[0],i=0;i<js.length;i++)Ls[0]<=js[i][0]&&(Ts?(js[i][0]-=r,js[i][1]-=r,e||(js[i][0]+=n,js[i][1]+=n)):e?(js[i][0]--,js[i][1]--):(js[i][0]+=n,js[i][1]+=n));for(var o=0;o<js.length;o++){var a=Ss(js[o],2),s=a[0],u=a[1],c=void 0;if(!ve(Fs)){c=document.createRange();var l=I(Fs,0,s,Fs),f=I(Fs,0,u,Fs);c.setStart(l.domElement,l.domOffset),c.setEnd(f.domElement,f.domOffset)}if(Ts){var p="",d=-r;e||(d+=(p=t).length),ve(Fs)?fn(Fs,s,u,p):gn(c,p,Fs),js[o][1]+=d,Ls[0]>s&&(Ls[0]+=d,Ls[1]+=d);for(var h=0;h<o;h++)js[h][0]+=d,js[h][1]+=d}else{if(e){if(ve(Fs)&&u>s)fn(Fs,u-1,u,""),js[o][1]--;else if(c.toString().length){var g=I(Fs,0,u-1,Fs);c.setStart(g.domElement,g.domOffset),gn(c,"",Fs),js[o][1]--}for(var v=0;v<o;v++)js[v][0]--,js[v][1]--}else{ve(Fs)?fn(Fs,u,u,t):(c.collapse(),gn(c,t,Fs)),js[o][1]+=n;for(var y=0;y<o;y++)js[y][0]+=n,js[y][1]+=n}Ls[0]>js[o][0]&&(e?(Ls[0]--,Ls[1]--):(Ls[0]+=n,Ls[1]+=n))}}if(Ts&&(Ts=!1,Ls[1]=Ls[0]),e?Ls[1]--:Ls[1]+=n,ve(Fs))Fs.selectionStart=Ls[1],Fs.selectionEnd=Ls[1];else{var m=document.createRange(),b=I(Fs,0,Ls[0],Fs),D=I(Fs,0,Ls[1],Fs);m.setStart(b.domElement,b.domOffset),m.setEnd(D.domElement,D.domOffset),hn(m)}setTimeout((function(){return document.addEventListener("selectionchange",Rs)}),0)}function Ms(t){var e=t.key;if(1===e.length||"Backspace"===e){document.removeEventListener("selectionchange",Rs);var n="Backspace"===e;setTimeout((function(){Is||Ps(e,n)}),10)}}function Hs(t){Is=!0,document.removeEventListener("selectionchange",Rs);var e=(t.clipboardData||window.clipboardData).getData("text");setTimeout((function(){Ps(e,!1),Is=!1}),10)}var qs=n(563);function Us(t){return Us="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Us(t)}function zs(){zs=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function c(t,e,n,i){var o=e&&e.prototype instanceof p?e:p,a=Object.create(o.prototype),s=new _(i||[]);return r(a,"_invoke",{value:w(t,n,s)}),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function p(){}function d(){}function h(){}var g={};u(g,o,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(S([])));y&&y!==e&&n.call(y,o)&&(g=y);var m=h.prototype=p.prototype=Object.create(g);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function D(t,e){function i(r,o,a,s){var u=l(t[r],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==Us(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,s)}),(function(t){i("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return i("throw",t,a,s)}))}s(u.arg)}var o;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){i(t,n,e,r)}))}return o=o?o.then(r,r):r()}})}function w(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return C()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=x(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function x(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=l(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,f;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function S(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return d.prototype=h,r(m,"constructor",{value:h,configurable:!0}),r(h,"constructor",{value:d,configurable:!0}),d.displayName=u(h,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,u(t,s,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(D.prototype),u(D.prototype,a,(function(){return this})),t.AsyncIterator=D,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new D(c(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(m),u(m,s,"Generator"),u(m,o,(function(){return this})),u(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=S,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),A(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function Ws(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||Xs(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Gs(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function Ys(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function $s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ys(Object(n),!0).forEach((function(e){Vs(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ys(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Vs(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==Us(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Us(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Us(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Js(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Xs(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Xs(t,e){if(t){if("string"==typeof t)return Ks(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ks(t,e):void 0}}function Ks(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Qs={},Zs=null,tu={};function eu(t){var e=H(t);if(e){var n=Qs[e];if(n)return Object.keys(n.edits).length}return 0}function nu(t){if(Qs[t]){var e=Qs[t],n=e.shadowHost,r=e.badge,i=e.annotationsOverlay,o=e.toneOverlay,a=e.aiDetectOverlay;n&&n.remove(),r&&r.removeUIElements(),i&&i.removeUIElements(),o&&o.removeUIElements(),a&&a.removeUIElements()}}function ru(t){var e=Qs[t];if(e&&e.badge){var n=Object.keys(e.edits).length||0;e.badge.updateBadgeCount(n)}}function iu(t){var e=Qs[t];e&&e.badge&&e.badge.showThrottledState()}function ou(t){var e=Qs[t];e&&e.annotationsOverlay&&e.annotationsOverlay.updateAnnotationSummary()}function au(t){var e=Qs[t];e&&e.toneOverlay&&e.toneOverlay.queryAndUpdate()}function su(t,e,n){if(n&&!tu[t]){var r=new MutationObserver((function(t){!function(t,e){var n,r=Js(e);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(qs(i.target).hasClass("notion-text-block"))return void uu(t)}}catch(t){r.e(t)}finally{r.f()}}(e,t)}));r.observe(n,{attributes:!0,attributeFilter:["style"],childList:!0,subtree:!0}),tu[t]=r,ft(t,e,!1,"mutationObservers",r)}}function uu(t){if(!("SDK"!==h.MODE&&t.hasAttribute("sapling-ignore")||qs(t).parents(".codex-editor").length)){var e=H(t);if(e){var n=Qs[e]||{edits:{}},r=n.shadowHost,i=n.badge;if(r&&!Q(r)&&(r.remove(),r=null),!r){var o=t;if(qs(t).is("td")&&t.parentNode)o=t.parentNode.parentNode;else for(var a=o.nextSibling;a&&a.nodeType===Node.ELEMENT_NODE&&a.getAttribute("is-sapling-overlay");){var s=a;a=a.nextSibling,s.remove()}(r=document.createElement("div")).setAttribute("is-sapling-overlay",!0),qs(r).css({"pointer-events":"none"}),qs(o).after(r),r.attachShadow({mode:"open"});var u=document.createElement("div");if(qs(u).addClass("tag-container"),qs(u).css({position:"absolute"}),qs(r.shadowRoot).prepend(Fa),r.shadowRoot.appendChild(u),i||(i=new kr).createUIElements(t,r,e,n),n.badge=i,!n.annotationsOverlay&&pe()&&(n.annotationsOverlay=new Va(e,r),n.annotationsOverlay.createUIElements()),!n.toneOverlay&&ke()&&(n.toneOverlay=new hs(r,e,i),n.toneOverlay.createUIElements()),n.shadowHost=r,n.overlayDomElement=u,n.containerDomElement=t,n.textAreaId=U(t),"notion.so"===m())su(e,t,R(t).nonstaticParent)}var c,l=R(t).frameDimensions;qs(r).css({overflow:"hidden","padding-bottom":"2px","z-index":document.defaultView.getComputedStyle(t).getPropertyValue("z-index"),position:l.position,left:l.left,top:l.top,height:l.height,width:l.width}),n.annotationsOverlay&&n.annotationsOverlay.queryAndUpdate(),n.toneOverlay&&n.toneOverlay.queryAndUpdate(),n.aiDetectOverlay&&n.aiDetectOverlay.queryAndUpdate(),Ai(t,r),Qs[e]=n,c=n,at[e]=c}}}function cu(t,e){if(!(null!=qs(e.containerDomElement).attr("sapling-figma-text-id")))return t;var n=qs(e.containerDomElement).data("figma-zoom");return $s($s({},t),{},{left:t.left*n,right:t.right*n,top:t.top*n,bottom:t.bottom*n,width:t.width*n,height:t.height*n})}function lu(t,e){var n=t.premium;if(t.category in Ta){var r="background-image";return"hard_to_read"===t.category&&"hard"===t.difficulty&&(r="background-image2"),Ta[t.category][r]}return n?e?"linear-gradient(to right, rgba(255, 214, 51, 0.15), rgba(255, 214, 51, 0.15))":"linear-gradient(to right, #eeb122, #ffd633)":e?"linear-gradient(to right, rgba(255, 0, 0, 0.15), rgba(255, 0, 0, 0.15))":"linear-gradient(to right, #ff0000, #ff0000)"}function fu(t,e){var n=t.premium;if(e){if(t.category in Ta){var r="background-color";return"hard_to_read"===t.category&&"hard"===t.difficulty&&(r="background-color2"),Ta[t.category][r]}return n?"#eeb122":"#ff0000"}return""}function pu(t,e){if(!t.edit.fillin){t.isHover=e;var n={opacity:.85,transition:"","background-color":fu(t.edit,e),"background-image":lu(t.edit,e),"-webkit-transition":"","-ms-transition":""};e&&(n={"background-color":fu(t.edit,e),"background-image":lu(t.edit,e)},t.edit.category||(n.opacity=.15,n.transition="background-color 200ms linear",n["-webkit-transition"]="background-color 200ms linear",n["-ms-transition"]="background-color 200ms linear")),t.domElements.forEach((function(t){qs(t).css(n)}))}}function du(t,e){var n=Qs[t],r=n.edits[e],i=n.edits[e].editRange;if(!r.edit.category||n.annotationsOverlay){var o=function(t,e){for(var n=e.shadowHost.getBoundingClientRect(),r=[],i=t.getClientRects(),o=0;o<i.length;o+=1){var a=cu(i[o],e);r.push({left:a.left-n.left,top:a.top-n.top,height:a.height,width:a.width})}return r}(i,n),a=o.length-r.domElements.length;if(a>0)for(var s=0;s<a;s++){var u=document.createElement("span");u.classList.add("sapling-edit"),u.setAttribute("sapling-edit-id",e),u.setAttribute("sapling-container-id",t),n.overlayDomElement.appendChild(u),r.domElements.push(u)}else if(a<0)for(var c=0;c>a;c--){r.domElements.pop().remove()}for(var l=0;l<o.length;l+=1){var f=o[l],p=r.domElements[l];qs(p).css({left:f.left,top:f.top,height:f.height,width:f.width}),r.edit.fillin?qs(p).css({border:"1px solid #6f68f7","border-radius":"0.4em"}):r.edit.annotation?r.edit.annotationStyle&&qs(p).css(r.edit.annotationStyle):qs(p).css({"background-image":lu(r.edit,!1)})}r.edit.category&&n.annotationsOverlay&&n.annotationsOverlay.updateAnnotationForOverlay(e,r),r.isHover&&pu(r,!0)}}function hu(t,e){var n=Qs[t],r=n.edits,i=n.annotationsOverlay;r[e].domElements.forEach((function(t){return t.remove()})),r[e].isHover&&Ca(),delete r[e],i&&i.clearAnnotationForOverlay(e)}function gu(t,e){for(var n=H(t),r=0;r<e.length;r+=1)hu(n,e[r])}function vu(t,e,n){for(var r=0,i=0;i<n.length;i+=1){var o=n[i],a=o.textContent.length;if(o.contains(e))return r+t;r+=a}return null}function yu(t,e,n,r,i){var o=t.startContainer,a=t.startOffset,s=t.endContainer,u=t.endOffset;if(!Q(e)||!Q(r))return null;if(null!==n){var c=I(e,0,n,r,!1,!1);c&&(o=c.domElement,a=c.domOffset)}if(null!==i){var l=I(e,0,i,r,!1,!0);l&&(s=l.domElement,u=l.domOffset)}var f=document.createRange();return!Q(o)||!Q(s)||o.length<=a||s.length<=u||a<0||u<0?null:(f.setStart(o,a),f.setEnd(s,u),f)}function mu(t,e){if(t in Qs){var n=e.removedNodes;if(0!==n.length){var r=Qs[t].edits;Object.keys(r).forEach((function(i){var o=r[i],a=o.edit,s=o.editRange,u=vu(s.startOffset,s.startContainer,n),c=vu(s.endOffset,s.endContainer,n);if(null!==u||null!==c){var l=e.previousSibling||e.target,f=yu(s,l,u,e.target,c);if(f&&Oa(f,a,!1))r[i].editRange=f,du(t,i);else{var p=e.target.textContent.length-function(t){for(var e=0,n=t.previousSibling;n;)e+=n.textContent.length,n=n.previousSibling;for(var r=t.nextSibling;r;)e+=r.textContent.length,r=r.nextSibling;for(var i=0;i<t.removedNodes.length;i+=1)e+=t.removedNodes[i].textContent.length;return e}(e),d=yu(s,l,u+p,e.target,c+p);d&&Oa(d,a,!1)&&(r[i].editRange=d,du(t,i))}}}))}}}function bu(t,e){if(t in Qs){var n=Qs[t].edits;Object.keys(n).forEach((function(r){var i=n[r],o=i.edit,a=i.editRange;if(a.startContainer===e.target){if(Ir(a)){var s=a.cloneRange();if(Oa(s,o,!1))return void(n[r].editRange=s)}var u=e.target.length-e.oldValue.length,c=a.startOffset+u,l=a.endOffset;if(a.endContainer===e.target&&(l+=u),c>=0&&c<=a.startContainer.length&&l>=0&&l<=a.endContainer.length){var f=document.createRange();f.setStart(a.startContainer,c),f.setEnd(a.endContainer,l),Oa(f,o,!1)&&(n[r].editRange=f,du(t,r))}Ir(n[r].editRange)||hu(t,r)}}))}}function Du(t,e,n,r,i){return wu.apply(this,arguments)}function wu(){var t;return t=zs().mark((function t(e,n,r,i,o){var a,s,u,c,l,f,p,d,h;return zs().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((a=document.createRange()).setStart(n,r),a.setEnd(i,o),!((s=H(e))in Qs)){t.next=22;break}u=Qs[s].edits,c={},l=Object.entries(u),f=0,p=0;case 10:if(!(p<l.length)){t.next=21;break}if(d=l[p][0],Q((h=l[p][1].editRange).startContainer)&&Q(h.endContainer)&&jr(h,a)&&(c[d]=u[d]),++f%100!=0){t.next=18;break}return t.next=18,new Promise((function(t){return setTimeout(t,50)}));case 18:p++,t.next=10;break;case 21:return t.abrupt("return",c);case 22:return t.abrupt("return",null);case 23:case"end":return t.stop()}}),t)})),wu=function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){Gs(o,r,i,a,s,"next",t)}function s(t){Gs(o,r,i,a,s,"throw",t)}a(void 0)}))},wu.apply(this,arguments)}function xu(t,e){var n=Qs[t];if(!n||!n.badge||!n.badge.badge)return!1;var r=n.badge.badge[0].getBoundingClientRect(),i=r.top,o=r.bottom,a=r.left,s=r.right;return a<=e.clientX&&e.clientX<=s&&i<=e.clientY&&e.clientY<=o}function Eu(t,e,n){var r=null,i=Z(n);if(i){var o=H(i);o?r=o:qs(i).parents().each((function(t,e){var n=H(e);return!n||(r=n,!1)}))}if(!r||r===e)for(var a=t.getClientRects(),s=Qs[e],u=0;u<a.length;u+=1){var c=cu(a[u],s);if(c.top<=n.clientY&&c.bottom>=n.clientY&&c.left<=n.clientX&&c.right>=n.clientX)return!0}return!1}function Au(){if(Zs){if(Zs.containerId in Qs){var t=Qs[Zs.containerId].edits;if(Zs.editId in t)pu(t[Zs.editId],!1)}Zs=null}}function _u(t,e,n,r,i){var o=n.edit,a=n.domElements;if(n.edit.category){if(!r)return!1;if(!r.annotationsAlwaysVisible&&!r.editsVisible)return!1}else if(n.edit.fillin)return!1;return Zs&&t===Zs.editId||(Au(),pu(n,!0),Zs={editId:t,containerId:e},Sa(e,o,a,i)),!0}function Su(t){var e=qs(h.CONTROL_ELEMENT).get(0);if(!e)return!1;for(var n=e.getClientRects(),r=0;r<n.length;r+=1){var i=n[r];if(i.top<=t.clientY&&i.top+i.height>=t.clientY&&i.left<=t.clientX&&i.left+i.width>=t.clientX)return!0}return!1}function Cu(t){var e=Ws(Xr(),2),n=e[0];e[1];if(ve(t)){var r=H(t);Qs[r].edits;if(n&&n.hideControls(),r in Qs){var i=Qs[r].edits;Object.keys(i).forEach((function(e){var n=i[e],r=n.editRange,o=!1,a=fo(t,!0);r.startOffset+2<=a&&a+2<=r.endOffset&&(o=!0),o&&n.edit.fillin&&(t.setSelectionRange(r.startOffset,r.endOffset),Bs(t,n,i))}))}}else{var o=H(t),a=Qs[o],s=a.edits;a.annotationsOverlay;n&&n.hideControls();var u=t.getRootNode().getSelection(),c=u.rangeCount&&u.getRangeAt(0);if(!c)return;Object.keys(s).forEach((function(e){var n=s[e],r=n.editRange,i=!1,o=!1;if(1!==r.compareBoundaryPoints(Range.START_TO_START,c)&&(i=!0),-1!==r.compareBoundaryPoints(Range.END_TO_END,c)&&(o=!0),i&&o&&n.edit.fillin){var a=window.getSelection();a.removeAllRanges(),a.addRange(r),Bs(t,n,s)}}))}}function ku(t){var e=!1,n=H(t),r=Qs[n];if(r){var i=r.edits,o=r.overlayDomElement,a=r.annotationsOverlay;if(i){var s=[];if(ve(t))for(var u=0,c=Object.values(i);u<c.length;u++){var l=c[u],f=l.editRange,p=!1,d=fo(t,!0);f.startOffset<=d&&d<=f.endOffset&&(p=!0),p&&s.push(l)}else{var h;try{h=t.getRootNode().getSelection()}catch(t){return}var g=h.rangeCount&&h.getRangeAt(0);if(!g)return;for(var v=0,y=Object.values(i);v<y.length;v++){var m=y[v],b=m.editRange,D=!1,w=!1;1!==b.compareBoundaryPoints(Range.START_TO_START,g)&&(D=!0),-1!==b.compareBoundaryPoints(Range.END_TO_END,g)&&(w=!0),D&&w&&s.push(m)}}if(s.length){e=!0;var x=_s(s),E=_u(x.edit.editId,n,x,a,o);e=e||E}e||Ca()}}}function Ou(t){if(t in Qs){var e=Qs[t].edits;Object.keys(e).forEach((function(e){du(t,e)}))}}function Tu(t){return t in Qs?Qs[t].containerDomElement:null}function Fu(t){return Qs[t]}var ju=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some((function(t,r){return t[0]===e&&(n=r,!0)})),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),r=this.__entries__[n];return r&&r[1]},e.prototype.set=function(e,n){var r=t(this.__entries__,e);~r?this.__entries__[r][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,r=t(n,e);~r&&n.splice(r,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];t.call(e,i[1],i[0])}},e}()}(),Lu="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,Iu=void 0!==n.g&&n.g.Math===Math?n.g:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Nu="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(Iu):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},Bu=2;var Ru=["top","right","bottom","left","width","height","size","weight"],Pu="undefined"!=typeof MutationObserver,Mu=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var n=!1,r=!1,i=0;function o(){n&&(n=!1,t()),r&&s()}function a(){Nu(o)}function s(){var t=Date.now();if(n){if(t-i<Bu)return;r=!0}else n=!0,r=!1,setTimeout(a,e);i=t}return s}(this.refresh.bind(this),20)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter((function(t){return t.gatherActive(),t.hasActive()}));return t.forEach((function(t){return t.broadcastActive()})),t.length>0},t.prototype.connect_=function(){Lu&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Pu?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){Lu&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;Ru.some((function(t){return!!~n.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),Hu=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},qu=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||Iu},Uu=Vu(0,0,0,0);function zu(t){return parseFloat(t)||0}function Wu(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce((function(e,n){return e+zu(t["border-"+n+"-width"])}),0)}function Gu(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return Uu;var r=qu(t).getComputedStyle(t),i=function(t){for(var e={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var i=r[n],o=t["padding-"+i];e[i]=zu(o)}return e}(r),o=i.left+i.right,a=i.top+i.bottom,s=zu(r.width),u=zu(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==e&&(s-=Wu(r,"left","right")+o),Math.round(u+a)!==n&&(u-=Wu(r,"top","bottom")+a)),!function(t){return t===qu(t).document.documentElement}(t)){var c=Math.round(s+o)-e,l=Math.round(u+a)-n;1!==Math.abs(c)&&(s-=c),1!==Math.abs(l)&&(u-=l)}return Vu(i.left,i.top,s,u)}var Yu="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof qu(t).SVGGraphicsElement}:function(t){return t instanceof qu(t).SVGElement&&"function"==typeof t.getBBox};function $u(t){return Lu?Yu(t)?function(t){var e=t.getBBox();return Vu(0,0,e.width,e.height)}(t):Gu(t):Uu}function Vu(t,e,n,r){return{x:t,y:e,width:n,height:r}}var Ju=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Vu(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=$u(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),Xu=function(t,e){var n,r,i,o,a,s,u,c=(r=(n=e).x,i=n.y,o=n.width,a=n.height,s="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,u=Object.create(s.prototype),Hu(u,{x:r,y:i,width:o,height:a,top:i,right:r+o,bottom:a+i,left:r}),u);Hu(this,{target:t,contentRect:c})},Ku=function(){function t(t,e,n){if(this.activeObservations_=[],this.observations_=new ju,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=n}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof qu(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new Ju(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof qu(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new Xu(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),Qu="undefined"!=typeof WeakMap?new WeakMap:new ju,Zu=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=Mu.getInstance(),r=new Ku(e,n,this);Qu.set(this,r)};["observe","unobserve","disconnect"].forEach((function(t){Zu.prototype[t]=function(){var e;return(e=Qu.get(this))[t].apply(e,arguments)}}));const tc=void 0!==Iu.ResizeObserver?Iu.ResizeObserver:Zu;n(563);function ec(t){return ec="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ec(t)}function nc(){nc=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function c(t,e,n,i){var o=e&&e.prototype instanceof p?e:p,a=Object.create(o.prototype),s=new _(i||[]);return r(a,"_invoke",{value:w(t,n,s)}),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function p(){}function d(){}function h(){}var g={};u(g,o,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(S([])));y&&y!==e&&n.call(y,o)&&(g=y);var m=h.prototype=p.prototype=Object.create(g);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function D(t,e){function i(r,o,a,s){var u=l(t[r],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==ec(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,s)}),(function(t){i("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return i("throw",t,a,s)}))}s(u.arg)}var o;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){i(t,n,e,r)}))}return o=o?o.then(r,r):r()}})}function w(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return C()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=x(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function x(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=l(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,f;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function S(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return d.prototype=h,r(m,"constructor",{value:h,configurable:!0}),r(h,"constructor",{value:d,configurable:!0}),d.displayName=u(h,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,u(t,s,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(D.prototype),u(D.prototype,a,(function(){return this})),t.AsyncIterator=D,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new D(c(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(m),u(m,s,"Generator"),u(m,o,(function(){return this})),u(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=S,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),A(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function rc(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function ic(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){rc(o,r,i,a,s,"next",t)}function s(t){rc(o,r,i,a,s,"throw",t)}a(void 0)}))}}function oc(t,e){return ac.apply(this,arguments)}function ac(){return(ac=ic(nc().mark((function t(e,n){var r,i,o,a,s,u,c;return nc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r={},n&&(o=n.getRootNode().getSelection()))for(i=o.anchorNode||o.focusNode;i&&i.nodeType!==Node.ELEMENT_NODE&&i.parentElement;)i=i.parentElement;if(i=i||n){for(a=window.getComputedStyle(i),s=0,u=["font-family","font-style","font-weight","color","line-height","letter-spacing","word-spacing"];s<u.length;s++)(c=u[s])in a&&(r[c]=a[c]);"font-size"in a&&(a["font-size"].startsWith("0")||(r["font-size"]=a["font-size"]))}return t.next=6,Xe({action:"copy-snippet",html:e,fontStyle:r});case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var sc=n(563);function uc(){uc=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function c(t,e,n,i){var o=e&&e.prototype instanceof p?e:p,a=Object.create(o.prototype),s=new _(i||[]);return r(a,"_invoke",{value:w(t,n,s)}),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function p(){}function d(){}function h(){}var g={};u(g,o,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(S([])));y&&y!==e&&n.call(y,o)&&(g=y);var m=h.prototype=p.prototype=Object.create(g);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function D(t,e){function i(r,o,a,s){var u=l(t[r],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==lc(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,s)}),(function(t){i("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return i("throw",t,a,s)}))}s(u.arg)}var o;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){i(t,n,e,r)}))}return o=o?o.then(r,r):r()}})}function w(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return C()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=x(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function x(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=l(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,f;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function S(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return d.prototype=h,r(m,"constructor",{value:h,configurable:!0}),r(h,"constructor",{value:d,configurable:!0}),d.displayName=u(h,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,u(t,s,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(D.prototype),u(D.prototype,a,(function(){return this})),t.AsyncIterator=D,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new D(c(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(m),u(m,s,"Generator"),u(m,o,(function(){return this})),u(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=S,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),A(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function cc(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function lc(t){return lc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lc(t)}function fc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(i=r.key,o=void 0,o=function(t,e){if("object"!==lc(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==lc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===lc(o)?o:String(o)),r)}var i,o}var pc=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Enter","Tab"]),dc=new Set(["ArrowUp","ArrowDown","Enter","Escape"]),hc=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.children={},this.end=!1}var e,n,r;return e=t,n=[{key:"insert",value:function(e){for(var n=this,r=0;r<e.length;r++)n.children[e[r]]||(n.children[e[r]]=new t),n=n.children[e[r]],r===e.length-1&&(n.end=!0)}},{key:"contains",value:function(t){for(var e=this,n=0;n<t.length;n++){if(!e.children[t[n]])return 0;e=e.children[t[n]]}return e.end?2:1}}],n&&fc(e.prototype,n),r&&fc(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),gc="\\",vc=!1,yc=new hc,mc={},bc=[];function Dc(){var t;t=function(t){!function(t){if(t){for(var e=new hc,n={},r=0;r<t.length;r++){var i=t[r],o=i.shortcut;if(o){var a=o.toLowerCase();e.insert(a),n[a]=i}}yc=e,mc=n}}(t)},ht("request/GET_SHORTCUT_SNIPPETS",{},t,(function(t){}));var e=he();null!=e&&(gc=e)}function wc(t){vc&&t?(vc=!1,Je({action:"snippet-control"})):bc=[]}function xc(){var t;return t=uc().mark((function t(e){var n,r,i,o,a,s;return uc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=bc.join(""),bc=[],r=mc[n],"true"!==e.getAttribute("contenteditable")&&""!==e.getAttribute("contenteditable")&&"plaintext-only"!==e.getAttribute("contenteditable")){t.next=17;break}if(i=gi(e,null),o=Math.max(0,i.startOffset-n.length+1),i.setStart(i.startContainer,o),""===r.rich_text){t.next=14;break}return t.next=10,Xe({action:"cache-clipboard"});case 10:return t.next=12,oc(r.rich_text,e);case 12:pn(i,r.plain_text,r.rich_text,e),Je({action:"pop-cached-clipboard"});case 14:Ct(r.id,"shortcut",n,0),t.next=18;break;case 17:"textarea"===e.nodeName.toLowerCase()&&(a=Math.max(0,e.selectionStart-n.length+1),s=a+r.plain_text.length,fn(e,a,e.selectionEnd,r.plain_text),e.setSelectionRange(s,s),Ct(r.id,"shortcut",n,0));case 18:case"end":return t.stop()}}),t)})),xc=function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){cc(o,r,i,a,s,"next",t)}function s(t){cc(o,r,i,a,s,"throw",t)}a(void 0)}))},xc.apply(this,arguments)}function Ec(){if(vc){var t,e=bc.join("");if(t=e.length,t,e.startsWith(gc))Je({action:"snippet-control",data:{query:e.substring(gc.length)}});else vc=!1,Je({action:"snippet-control",data:{show:!1}})}}function Ac(t,e){if(e.length>1)return!1;bc.push(e.toLowerCase());var n=yc.contains(bc);if(2===n)return function(t){xc.apply(this,arguments)}(t),!0;if(bc.join("")===gc){var r=mi(t),i=r.top,o=r.top+r.height+10,a=r.left,s=sc(window).height();Ke()?Je({action:"get-iframe-bounding-rect",href:window.location.href,name:window.name,x:a,y:o,caretY:i,frameIds:[]}):function(t,e,n,r){var i={top:"",bottom:"",left:t};n-e<300?i.bottom=n-r+10:i.top=e,Je({action:"snippet-control",data:{coordinates:i,mode:"inline",show:!0}}),vc=!0,Ec()}(a,o,s,i)}else Ec();if(1===n);else if(0===n&&!vc)for(;;){var u=bc.indexOf(" ");if(!(u>=0))return!1;if(0===(bc=bc.slice(u+1,bc.length)).length)return!1;if(0!==yc.contains(bc))return!1}}var _c=n(563);function Sc(t,e,n){t.observe(_c("#chatLog")[0],e),t.observe(_c("#chatTextArea")[0],e),n&&n()}function Cc(){var t;0===_c("sapling-chat-controls").length?((t=document.createElement("sapling-chat-controls")).attachShadow({mode:"open"}),_c("#chatInput").after(t)):t=_c("sapling-chat-controls")[0];var e=t.shadowRoot;_c(".sapling-chat-container",e)[0]||(_c(e).prepend(_c('\n<style type="text/css">\n.sapling-chat-container{\n}\n.sapling-chat-suggestion{\n width: 305px;\n margin: 5px;\n border: 1px solid rgba(82, 95, 153, 0.8);\n color: rgba(82, 95, 153, 0.8);\n background-color: #fff;\n border-radius: 5px;\n padding-left: 10px;\n padding-right: 10px;\n padding-top: 5px;\n padding-bottom: 5px;\n user-select: none;\n font-family: Helvetica, Arial, sans-serif;\n font-size: 12px;\n transition: all .15s ease;\n}\n.sapling-chat-suggestion:hover {\n transform: translateY(-1px);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.32);\n}\n.sapling-chat-suggestion:active {\n transform: translateY(0px);\n background-color: rgba(82, 95, 153, 0.5);\n}\n.sapling-chat-suggestion .sapling-suggestion-send img {\n z-index: 10;\n width: 20px;\n height: 20px;\n position: absolute;\n top: 0px; right: 0px;\n padding-top: 5px; padding-right: 5px;\n color: rgba(82, 95, 153, 0.8);\n visibility: hidden;\n}\n.sapling-chat-suggestion:hover .sapling-suggestion-send img {\n visibility: visible;\n}\n</style>')),_c(e).append(_c("\n<div class='sapling-chat-container'>\n</div>\n")))}function kc(t){for(var e=_c("#chatLog div"),n=[],r=function(){var r=_c(e[i]);if(r.hasClass("agentMessage"));else if(r.hasClass("chasitorMessage")){var o=_c(".messageText",r).text();o||(o=r.text()),n.push(o),t&&(_c(r).off("click"),_c(r).css("cursor","pointer"),_c(r).on("click",(function(){return t(o)})))}},i=0;i<e.length;i+=1)r();return n}function Oc(t,e){fn(_c("#chatTextArea")[0],0,0,t);try{_c("#chatInputSend").click()}catch(t){}e(U(_c("#chatTextArea")),_c("#chatTextArea")[0].value)}function Tc(t){fn(_c("#chatTextArea")[0],0,0,t)}function Fc(){return!!location.hostname.endsWith("salesforce.com")&&("/liveagent/chatlog.apexp"===location.pathname&&!!_c("#chatLog")[0])}function jc(){return _c("#chatTextArea")[0]?{sessionId:U(_c("#chatTextArea"))}:""}var Lc=n(563);function Ic(t){return function(t){if(Array.isArray(t))return Bc(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Nc(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Nc(t,e){if(t){if("string"==typeof t)return Bc(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Bc(t,e):void 0}}function Bc(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}window.log_last_mutated=void 0===window.log_last_mutated?new Date:window.log_last_mutated,window.sendEvent=Et;var Rc,Pc=null,Mc=null,Hc=null,qc=null,Uc=null,zc=3e3,Wc=null,Gc=null,Yc=null,$c=!1,Vc=void 0===Vc?null:Vc,Jc=void 0===Jc?"":Jc,Xc=void 0===Xc?"":Xc,Kc=void 0===Kc?null:Kc,Qc=void 0!==Qc&&Qc,Zc=void 0===Zc?null:Zc;window.lastResponseTimestamp="undefined"==typeof lastResponseTimestamp?null:lastResponseTimestamp;var tl=3;function el(t){for(var e=t.split(" "),n=new Set,r=0;r<=e.length&&(n.add(e.slice(r,r+tl).join(" ")),!(r+tl>=e.length));r++);return n}function nl(){var t=[];return new Date-log_last_mutated>6e4&&t.push({id:"helper-still-connected",doc:"Are we still connected?",confidence:null}),t}function rl(t){log_last_mutated=new Date;var e,n=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Nc(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;if("childList"===r.type){return ll(),void sl()}if("attributes"===r.type&&"disabled"===r.attributeName)return void yl()}}catch(t){n.e(t)}finally{n.f()}}function il(t){Zc&&(Zc.agent_message=t,function(t){var e=t.suggestion_id,n=t.index,r=(t.helper,t.suggest_text),i=t.agent_message,o=t.confidence,a=t.quick_send,s=el(r),u=el(i),c=new Set(Ic(s).filter((function(t){return u.has(t)}))),l=Hc(),f={hostname:m(),pathname:b(),suggest_index:n,confidence:o,frame_hostname:window.location.hostname,frame_pathname:window.location.pathname,ng_size:tl,ng_select:s.size,ng_sent:u.size,ng_overlap:c.size,quick_send:a,click_query:Qc};Object.assign(f,l),p={context:f,suggestion_id:e,action:"send"},ht("request/POST_SUGGESTION_EVENT",p),Zc=null,Qc=!1;var p}(Zc))}function ol(t){var e=t.suggestion_id,n=t.index,r=t.helper,i=t.confidence,o=t.quick_send,a=Hc(),s={hostname:m(),pathname:b(),suggest_index:n,confidence:i,frame_hostname:window.location.hostname,frame_pathname:window.location.pathname,quick_send:o,click_query:Qc,helper:r};Object.assign(s,a),ht("request/POST_SUGGESTION_SELECT",{suggestionId:e,context:s}),o?(Zc=null,Qc=!1):Zc=t}function al(t){var e=t.split(":");return 3600*parseInt(e[0])+60*parseInt(e[1])+parseInt(e[2])}var sl=Vi().debounce((function(){Wc(_t)}),300);function ul(){return{inpEl:null,inp:""}}function cl(t){for(var e=null,n=null,r=null,i=null,o=Lc("#chatLog div"),a=0;a<o.length;a+=1){var s=Lc(o[a]);s.hasClass("agentMessage")?(r=e,e="agent",i=n,n=Lc(".timestamp",s).text()):s.hasClass("chasitorMessage")&&(r=e,e="visitor",i=n,n=Lc(".timestamp",s).text())}if(n!==lastResponseTimestamp&&(lastResponseTimestamp=n,"agent"===e&&"visitor"===r)){var u=al(n)-al(i),c=Hc(),l={hostname:m(),pathname:b(),frame_hostname:window.location.hostname,frame_pathname:window.location.pathname,response_time:u,action:"agent_response"};Object.assign(l,c),Et("chat_event",l,""),t(l)}}var ll=Vi().debounce((function(){var t=Hc(),e=Pc((function(e){Qc=!0,uo(e,null,vl,t)}),St),n=e[e.length-1];e&&n&&n!==Jc&&(Jc=n,yl(),$c=!1,hl(),Qc=!1,uo(n,e,vl,t))}),200);var fl=Vi().debounce((function(){var t=Hc(),e=Yc(),n=(e.inpEl,e.inp);n&&n!==Xc&&(Xc=n,$c=!1,Qc=!1,co(n,vl,t))}),200);function pl(t,e,n){var r=t.doc,i=t.id;if(i!==Kc){var o=Gc().shadowRoot,a=Lc("<div class='sapling-chat-suggestion'>".concat(r,"</div>"));if("confidence"in t&&null!==t.confidence){var s=t.confidence.toFixed(2),u="low";s>.25&&(u="med"),s>.75&&(u="high");var c=Lc('<div class="sapling-suggestion-conf sapling-conf-'.concat(u,'">').concat(s,"</div>"));a.append(c)}n?Lc(".sapling-helper-container",o).append(a):Lc(".sapling-chat-container",o).append(a),a.on("mousedown",(function(o){1===o.which&&(log_last_mutated=new Date,Kc=i,yl(),Mc(r),ol({suggestion_id:i,index:e,helper:n,suggest_text:r,agent_message:r,confidence:t.confidence,quick_send:!1}))}))}else Kc=null}function dl(t){for(var e=new Set,n=[],r=0;r<t.length;r++)e.has(t[r].doc)||(e.add(t[r].doc),n.push(t[r]));return n}function hl(){if(!$c){var t=Gc();if(null===t&&Uc(),null!==(t=Gc())){var e=qc();if(e.length){var n=t.shadowRoot;0===Lc(".sapling-response-wrapper-close",n).length&&Lc(".sapling-response-wrapper",n).prepend('<div class="sapling-response-wrapper-close">×</div>'),Lc(".sapling-response-wrapper-close",n).click(yl),Lc(".sapling-helper-container",n).html(""),e=dl(e);for(var r=0;r<e.length;r++)pl(e[r],r,!0)}}}}function gl(){var t=Lc("sapling-chat-controls");return t.length?t[0]:null}function vl(t){if(t.length){var e=Gc().shadowRoot;0===Lc(".sapling-response-wrapper-close",e).length&&Lc(".sapling-response-wrapper",e).prepend('<div class="sapling-response-wrapper-close">×</div>'),Lc(".sapling-response-wrapper-close",e).click(yl),Lc(".sapling-chat-container",e).html(""),t=dl(t);for(var n=0;n<Math.min(3,t.length);n+=1)pl(t[n],n,!1);var r={num_responses:t.length,hidden:document.hidden},i=Hc();Object.assign(r,i),Et("show_suggest_responses",r,"")}}function yl(){$c=!0;var t=Gc();if(null!==t){var e=t.shadowRoot;Lc(".sapling-chat-suggestion",e).remove(),Lc(".sapling-response-wrapper-close",e).remove()}}function ml(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;if(le()&&((e=location.hostname)&&(e.includes("chat.cloudhumans.com")||e.includes("zendesk.com")||e.includes("ujet.co")||e.includes("force.com")||e.includes("connect.aws")||e.includes("awsapps")||e.includes("amazonaws.com")||e.includes("salesiq.zoho.com")||e.includes("intercom.com")||e.includes("agent.")||e.includes("sapling.ai")||e.includes("kustomer")||e.includes("gorgias")||e.includes("bliss.")))&&!(n<1)){"function"!=typeof shouldInitializeChatObserverOverride&&setTimeout((function(){ml(t,n-1)}),1e3);if(null!==Vc&&Vc.disconnect(),("function"==typeof shouldInitializeChatObserverOverride?shouldInitializeChatObserverOverride:Fc)()){var r="function"==typeof getLastClientChatMessagesOverride?getLastClientChatMessagesOverride:kc,i="function"==typeof injectChatResponseOverride?injectChatResponseOverride:Oc,o="function"==typeof editChatResponseOverride?editChatResponseOverride:Tc,a="function"==typeof observeChatEventsOverride?observeChatEventsOverride:Sc;Uc="function"==typeof injectChatUIOverride?injectChatUIOverride:Cc;var s="function"==typeof getContextOverride?getContextOverride:jc,u="function"==typeof getHelperResponsesOverride?getHelperResponsesOverride:nl,c="function"==typeof getResponseTimeHelperOverride?getResponseTimeHelperOverride:cl,l="function"==typeof getResponseWrapperOverride?getResponseWrapperOverride:gl,f="function"==typeof getInpOverride?getInpOverride:ul;Pc=r,function(e){return i(e,t)},Mc=function(t){return o(t)},Hc=s,qc=u,Wc=c,Gc=l,Yc=f,null==Vc&&(Vc=new MutationObserver(rl)),Uc(),a(Vc,{attributes:!0,childList:!0,characterData:!0,subtree:!0},ll,il),ll(),clearInterval(Rc),Rc=setInterval(hl,zc);var p=Yc(),d=p.inpEl;p.inp;d&&Lc(d).on("input",fl)}}}var bl=n(563);function Dl(t){return Dl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dl(t)}function wl(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return xl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xl(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function xl(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function El(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Al(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==Dl(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Dl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Dl(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var _l,Sl,Cl={},kl={},Ol={};function Tl(t,e){(_l=t,Sl=e,m().includes("figma.com"))&&(bl((function(){bl('div[name="propertiesPanelContainer"]').css("z-index",1)})),function(t,e){try{var n=document.getElementsByTagName("head")[0];if(!n)return!1;var r=document.getElementById(e);if(r)return[!1,r];var i=document.createElement("script");return i.setAttribute("type","text/javascript"),i.setAttribute("src",t),i.setAttribute("id",e),n.appendChild(i),i.remove(),!0}catch(t){return Xn(t),!1}}(Ye("/generated/figma-module.js"),"sapling-figma-extension-page-script")&&(window.addEventListener("sapling-figma-text-nodes-updated",(function(t){Fl(t.detail.figmaTextNodes)})),window.addEventListener("sapling-figma-viewport-updated",(function(t){var e,n;e=t.detail.figmaViewport,n=t.detail.figmaTextNodes,kl=e,Fl(n)}))))}function Fl(t){kl.viewportBounds&&kl.zoom&&t&&(Object.keys(Cl).filter((function(e){0===t.filter((function(t){return t.figmaId===e})).length&&(Cl[e].overlayDomElement.remove(),delete Cl[e])})),t.forEach((function(t){return function(t){var e=t.figmaId;Cl.hasOwnProperty(e)||(Cl[e]=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?El(Object(n),!0).forEach((function(e){Al(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):El(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t));var n=function(t){var e=t.figmaId,n=t.characters,r=t.textBounds,i=t.style;if(!Cl.hasOwnProperty(e))return;var o=Cl[e].overlayDomElement;if(!o){(o=document.createElement("div")).setAttribute("contenteditable",!0),bl(o).attr("id","sapling-figma-text-".concat(e)),bl(o).attr("sapling-figma-text-id",e),bl(o).data("sapling-figma-text-id",e),document.getElementsByTagName("body")[0].appendChild(o),Cl[e].overlayDomElement=o,o.addEventListener("input",(function(t){window.dispatchEvent(new CustomEvent("sapling-figma-edit-accepted",{detail:{figmaId:e,updatedText:jl(o.innerHTML)}}))}))}var a=kl.canvasRect.top,s=kl.canvasRect.left,u=kl.viewportBounds.y,c=kl.viewportBounds.x,l=kl.zoom;bl(o).data("figma-zoom",l);var f=r.y,p=r.x,d=r.width,h=r.height,g=s+(p-c)*l,v=a+(f-u)*l,y=d*l,m=h*l,b=i.textAlignHorizontal,D=i.textAlignVertical,w=i.paragraphSpacing,x=i.paragraphIndent,E=i.listSpacing,A=i.textSegments,_=w,S=E;o.innerHTML="";var C=document.createElement("span");function k(t,e){var n=new RegExp("[".concat(e.join(""),"]"),"g");return t.split(n)}bl(C).css({zoom:l}),Ou(bl(o).attr("sapling-id"));var O,T,F,j=String.fromCodePoint(8232),L=k(n.trim(),["\n",j]),I=0,N=0,B=wl(L);try{for(B.s();!(F=B.n()).done;){var R=F.value;T=0===R.length;var P=document.createElement("div"),M="NONE"!==(O=A[N]).listOptions.type,H={};M||(H["text-indent"]="".concat(x,"px")),0===I||(M?"NONE"!==A[N-1].listOptions.type?H["margin-top"]="".concat(_,"px"):H["margin-top"]="".concat(S,"px"):H["margin-top"]="".concat(_,"px"));var q=O.lineHeight,U="inherit";"PERCENT"===q.unit?U=Math.trunc(q.value)/100:"PIXELS"===q.unit&&(U="".concat(q.value-1,"px")),H["line-height"]=U,bl(P).css(H),T&&bl(P).attr("sapling-figma-empty-line",!0);for(var z=I+R.length;T||I<z&&O;){var W=document.createElement("span"),G=O,Y=G.characters,$=G.start,V=G.end,J=G.fontName,X=G.fontSize,K=G.fontWeight,Q=G.letterSpacing,Z=G.textCase,tt=J.family.split(" ").join("+")+":wght@".concat(K);Ol.hasOwnProperty(tt)||(document.getElementsByTagName("head")[0].innerHTML+='<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family='.concat(tt,'" />'),Ol[tt]=1);var et=X,nt="inherit";"UPPER"===Z||"LOWER"===Z?nt=Z.toLowerCase()+"case":"TITLE"===Z&&(nt="capitalize");var rt="inherit";"PERCENT"===Q.unit?rt="".concat(Math.trunc(100*Q.value)/1e4,"em"):"PIXELS"===Q.unit&&(rt="".concat(Q.value,"px")),bl(W).css({"font-family":J.family,"font-style":J.style,"font-size":"".concat(et,"px"),"text-transform":nt,"letter-spacing":rt,"font-weight":K});var it=I-$,ot=it+(Math.min(V,z)-I);W.textContent=Y.slice(it,ot),T&&(W.textContent="-"),P.appendChild(W),I=Math.min(z,V),z>=V?N++:I++,O=A[N],T=!1}C.appendChild(P)}}catch(t){B.e(t)}finally{B.f()}o.appendChild(C);var at="flex-start",st=b.toLowerCase();"CENTER"===b?at="center":"RIGHT"===b?at="flex-end":"JUSTIFIED"===b&&(st="justify");var ut="flex-start";"CENTER"===D?ut="center":"BOTTOM"===D&&(ut="flex-end");return bl(o).css({spellcheck:!1,color:"red",opacity:0,"pointer-events":"none",position:"fixed",top:"".concat(v,"px"),left:"".concat(g,"px"),height:"".concat(m,"px"),width:"".concat(y,"px"),"text-align":st,display:"flex","justify-content":at,"align-items":ut}),_l(o),uu(o),o}(t);Sl({saplingId:bl(n).attr("sapling-id"),editable:n})}(t)})))}function jl(t){var e,n="",r=wl((new DOMParser).parseFromString(t,"text/html").firstChild.lastChild.firstChild.children);try{for(r.s();!(e=r.n()).done;){var i=e.value;i.attributes.hasOwnProperty("sapling-figma-empty-line")?n+="\n":n+=i.textContent+"\n"}}catch(t){r.e(t)}finally{r.f()}return n.trimEnd()}var Ll=n(563);function Il(t){return Il="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Il(t)}function Nl(){Nl=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function c(t,e,n,i){var o=e&&e.prototype instanceof p?e:p,a=Object.create(o.prototype),s=new _(i||[]);return r(a,"_invoke",{value:w(t,n,s)}),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function p(){}function d(){}function h(){}var g={};u(g,o,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(S([])));y&&y!==e&&n.call(y,o)&&(g=y);var m=h.prototype=p.prototype=Object.create(g);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function D(t,e){function i(r,o,a,s){var u=l(t[r],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==Il(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,s)}),(function(t){i("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return i("throw",t,a,s)}))}s(u.arg)}var o;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){i(t,n,e,r)}))}return o=o?o.then(r,r):r()}})}function w(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return C()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=x(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function x(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=l(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,f;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function S(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return d.prototype=h,r(m,"constructor",{value:h,configurable:!0}),r(h,"constructor",{value:d,configurable:!0}),d.displayName=u(h,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,u(t,s,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(D.prototype),u(D.prototype,a,(function(){return this})),t.AsyncIterator=D,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new D(c(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(m),u(m,s,"Generator"),u(m,o,(function(){return this})),u(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=S,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),A(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function Bl(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Rl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Rl(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rl(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Pl(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}var Ml={},Hl={},ql={};function Ul(t){return zl.apply(this,arguments)}function zl(){var t;return t=Nl().mark((function t(e){var n,r,i,o;return Nl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.saplingId,r=e.editable,i=e.useVisibleText,"SDK"!==h.MODE){t.next=6;break}if(Sapling.userToggleEnabled){t.next=4;break}return t.abrupt("return");case 4:t.next=8;break;case 6:if(De(r)||"sapling-embedded-editable"===r.id){t.next=8;break}return t.abrupt("return");case 8:if(o=H(r)){t.next=11;break}return t.abrupt("return");case 11:if(au(o),!ql[n]){t.next=14;break}return t.abrupt("return");case 14:return ql[n]=!0,t.next=17,Yo(r,i||!1);case 17:Go(n),delete ql[n];case 19:case"end":return t.stop()}}),t)})),zl=function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){Pl(o,r,i,a,s,"next",t)}function s(t){Pl(o,r,i,a,s,"throw",t)}a(void 0)}))},zl.apply(this,arguments)}function Wl(t){xe(t.editable)&&(t.hasOwnProperty("saplingId")?so(t.editable,t.saplingId):so(t.editable,t.textAreaId))}var Gl=Vi().wrap(Vi().memoize((function(){return Vi().debounce(Ul,250,{leading:!1,trailing:!0})}),Vi().property("id")),(function(t,e){return t(e)(e)})),Yl=Vi().wrap(Vi().memoize((function(){return Vi().debounce(Wl,50,{leading:!1,trailing:!0})}),Vi().property("id")),(function(t,e){return t(e)(e)})),$l=Vi().wrap(Vi().memoize((function(){return Vi().debounce(ku,20,{leading:!1,trailing:!0})}),Vi().property("id")),(function(t,e){return t(e)(e)}));function Vl(t){if("characterData"!==t.type)return!1;var e=t.target.data.replace(/\u00A0/g," "),n=t.oldValue.replace(/\u00A0/g," ");if(!e.startsWith(n))return!1;var r=e.substring(n.length);return!!Pi().startsWith(r)}var Jl=Vi().wrap(Vi().memoize((function(){return Vi().debounce((function(t){!function(t){if(t in Qs){var e=Qs[t].edits;Object.keys(e).forEach((function(n){var r=e[n];Oa(r.editRange,r.edit,!1)||hu(t,n)}))}}(t),Ou(t),_a()}),50,{leading:!1,trailing:!0})})),(function(t,e){return t(e)(e)}));function Xl(t,e){Ll(t).on("focus click keyup",(function(n){"keyup"===n.type?"ArrowLeft"!==n.key&&"ArrowRight"!==n.key&&"ArrowUp"!==n.key&&"ArrowDown"!==n.key||Gl({saplingId:e,editable:t}):(Gl({saplingId:e,editable:t}),"focus"===n.type&&Dc())})),ft(e,t,!1,"jqueryObservers",t)}function Kl(t,e){for(var n=T(t),r=0;r<n.length;r+=1){var i=n[r];Ll(i).on("scroll",(function(){Ou(e),Gl({saplingId:e,editable:t,useVisibleText:!0}),ma()})),ft(e,t,!1,"jqueryObservers",i)}}function Ql(t,e){var n=new MutationObserver((function(n){!function(t,e,n){for(var r=!1,i=0;i<n.length;i+=1){var o=n[i];if(Gl({saplingId:e,editable:t}),"characterData"!==o.type||r){if("childList"===o.type)mu(e,o),U(t)||(Vl(o)?Mi(t):(ji(),Yl({saplingId:e,editable:t})));else if("attributes"===o.type&&"contenteditable"===o.attributeName){var a=t.getAttribute("contenteditable");"DIV"!==t.tagName||U(t)||"true"===a||""===a||"plaintext-only"===a||Zl(t,!1)}}else bu(e,o),U(t)||(Vl(o)?Mi(t):(ji(),Yl({saplingId:e,editable:t}))),r=!0}Jl(e)}(t,e,n)}));n.observe(t,{attributes:!0,childList:!0,characterData:!0,subtree:!0,characterDataOldValue:!0}),ft(e,t,!1,"mutationObservers",n)}function Zl(t,e){var n=t.getAttribute("sapling-input-id");n&&(nu(n),pt(n,e));var r=H(t);if(nu(r),e){var i=U(t);i&&(pt(i,e),cn(t)),delete Hl[i]}else r&&(pt(r,e),function(t){t in Qs&&(Qs[t].overlayDomElement.remove(),Qs[t].summaryAnnotationsContainer&&Qs[t].summaryAnnotationsContainer.removeUIElements(),delete Qs[t])}(r),function(t){t in Ho&&delete Ho[t]}(r)),delete Ml[r];(function(t){return Zs&&Zs.containerId===t})(r)&&ma(),Kr()}var tf=Vi().throttle((function(t){Object.keys(Ml).forEach((function(t){var e,n=Ml[t];void 0===n||n.classList.contains("wysihtml5-editor")||(Q(n)?(uu(e=n),Ou(H(e)),document.activeElement===n&&Pi()&&Ri(n,Pi())):Zl(n,!0))})),Object.keys(Hl).forEach((function(t){var e=Hl[t];void 0!==e&&(Q(e)?uu(rn(e)):Zl(e,!0))}))}),30,{leading:!1,trailing:!0}),ef=new tc((function(t){requestAnimationFrame((function(){tf(t)}))}));function nf(t){var e=Z(t);if(void 0!==e){var n,r=U(e);if(r)an(r,e.value),"input"===t.type&&(n=t.data,Pi().startsWith(n)?Mi(e):(ji(),Yl({textAreaId:r,editable:e})))}}function rf(t){var e=U(t),n={passive:!0,once:!1};t.addEventListener("input",nf,n),ft(e,t,!0,"eventListeners",{element:t,event:"input",handler:nf,options:n}),t.addEventListener("keyup",nf,n),ft(e,t,!0,"eventListeners",{element:t,event:"keyup",handler:nf,options:n})}function of(t,e){for(var n=T(t),r=0;r<n.length;r+=1){var i=n[r];U(i)===e?Ll(i).on("scroll",(function(){sn(e)})):Ll(i).on("scroll",(function(){un(e)})),ft(e,t,!0,"jqueryObservers",i)}}var af=function(){setTimeout(pa,100)};function sf(t){if("SDK"===h.MODE||De(t)||xe(t)||"sapling-embedded-editable"===t.id){var e=H(t);if(!e||!(e in Ml)){var n=q(t,e);Ml[n]=t,uu(t),Ql(t,n),ef.observe(t),ft(n,t,!1,"resizeObservers",{container:t,observer:ef}),uf(n,t,!1),Xl(t,n),cf(n,t,!1),Kl(t,n),hf(t),Ul({saplingId:n,editable:t,useVisibleText:!1})}}}function uf(t,e,n){Ll(e).on("keypress",(function(t){if(Ac(e,t.key))return!1}));var r=xe(e);Ll(e).on("keydown",(function(t){if("Tab"===t.key){if(!!ha(h.CONTROL_ELEMENT).attr("sapling-edit-id")&&(ha("#accept-button",ya).focus(),!0))return!1}else{if(!(n=t.key,vc&&dc.has(n)?(Je({action:"snippet-control",data:{key:n}}),!1):("Backspace"===n?(bc.pop(),Ec()):pc.has(n)&&(bc=[]),!0)))return!1;$l(e)}var n;r&&(P(e),Hi(t,e)),Ae()&&af()})),ft(t,e,n,"jqueryObservers",e)}function cf(t,e,n){Ll(e).on("click",(function(t){Cu(e)})),ft(t,e,n,"eventListeners",{element:e,event:"click",handler:Cu})}function lf(t){if(De(t)||xe(t)){var e=Ll(t).attr("onfocus");if(!e||!e.includes("(this).hide()")){var n=U(t);if(n&&n in Hl)an(n,t.value);else{var r=z(t);Hl[r]=t;var i=rn(t);rf(t),ef.observe(t),ft(r,t,!0,"resizeObservers",{container:t,observer:ef}),of(t,r),uf(n,t,!0),cf(n,t,!0),an(r,t.value),sn(r),sf(i),q(t,H(i))}}}}var ff=Vi().throttle((function(t){for(var e=null,n=0,r=Object.entries(Qs);n<r.length;n++){var i=Ws(r[n],2),o=i[0],a=i[1],s=a.edits,u=a.overlayDomElement,c=a.annotationsOverlay;if(s){for(var l=[],f=0,p=Object.values(s);f<p.length;f++){var d=p[f],h=d.edit,g=d.editRange,v=d.isHover;if(!h.fillin){if(v&&Su(t)){l=[d];break}Eu(g,o,t)&&l.push(d)}}if(l.length)e={editInfo:_s(l),containerId:o,overlayDomElement:u,annotationsOverlay:c};xu(o,t)&&a.badge.showBadgeDashboard()}}var y=!1;if(e){var m=e,b=m.editInfo,D=m.containerId,w=m.overlayDomElement,x=m.annotationsOverlay;y=_u(b.edit.editId,D,b,x,w)}y?clearTimeout(ga):Ca()}),100,{leading:!1,trailing:!0});function pf(t,e){for(var n=0;n<t.length;n+=1){if(t[n].id===e)return!0}return!1}function df(t){var e=t.path;e&&(wc(pf(e,"sapling-snippet-controls")),(pf(e,"accept-button")||pf(e,"ignore-button")||pf(e,"explanations"))&&t.preventDefault())}function hf(t){if(document!==t.ownerDocument&&"SDK"===h.MODE){Sapling.injectCSS(t.ownerDocument);var e={passive:!0};t.ownerDocument.addEventListener("mousemove",ff,e),ct({element:document,event:"mousemove",handler:ff,options:e}),t.ownerDocument.addEventListener("mousedown",df,{}),ct({element:document,event:"mousedown",handler:df,options:{}})}}function gf(t){wc();var e=Z(t);"true"===e.getAttribute("contenteditable")||""===e.getAttribute("contenteditable")||"plaintext-only"===e.getAttribute("contenteditable")?sf(e):ve(e)&&lf(e),Object.keys(it).forEach((function(t){Q(it[t].domElement)||pt(t,!1)})),Object.keys(ot).forEach((function(t){Q(ot[t].domElement)||pt(t,!0)}))}function vf(){var t={passive:!0};document.addEventListener("selectionchange",af,t),ct({element:document,event:"selectionchange",handler:af,options:t}),document.addEventListener("selectionchange",da,t),ct({element:document,event:"selectionchange",handler:da,options:t})}function yf(t){return!!(Ll(t).is(":focus")||""!==t.textContent&&Ll(t).is(":visible"))}function mf(t){for(var e=0;e<t.length;e+=1){var n=t[e];if("childList"===n.type){for(var r=0;r<n.addedNodes.length;r+=1){var i=n.addedNodes[r];"IFRAME"===i.tagName?Qe(Ll(i),(function(){ht("init/NEW_IFRAME_LOADED")})):Ll("iframe",i).each((function(t,e){Qe(Ll(e),(function(){ht("init/NEW_IFRAME_LOADED")}))}))}for(var o=0;o<n.removedNodes.length;o+=1){var a=n.removedNodes[o];if(a.nodeType===Node.ELEMENT_NODE&&(J(a)||ve(a)))Zl(a,ve(a))}}}}function bf(){if(m().includes(h.WEBSITE_HOSTNAME)){var t=document.getElementById("logout-button");t&&t.addEventListener("click",(function(){ht("request/LOGOUT_USER",{},(function(){ie(!0)}),(function(){ie(!0)}))}));var e=document.getElementById("login-button");e&&e.addEventListener("click",(function(){var t,e;ht("request/CLEAR_USER",t,e)}))}}function Df(){if(h.AI_DETECT_ANYWHERE_EXTENSION)return ra(),void vf();var t;if(function(){"SDK"!==h.MODE&&(m(),Ll("iframe").each((function(t,e){try{Qe(Ll(e),(function(){return ht("init/NEW_IFRAME_LOADED")}))}catch(t){}})));var t=document.body;if(t){if("SDK"!==h.MODE){var e=new MutationObserver(mf);e.observe(t,{attributes:!1,childList:!0,subtree:!0}),lt(e)}ef.observe(t),lt(ef)}}(),t={passive:!0},document.addEventListener("mousemove",ff,t),ct({element:document,event:"mousemove",handler:ff,options:t}),document.addEventListener("mousedown",df,{}),ct({element:document,event:"mousedown",handler:df,options:{}}),"SDK"!==h.MODE){bf(),function(){var t={passive:!0};document.addEventListener("focusin",gf,t),ct({element:document,event:"focusin",handler:gf,options:t}),document.addEventListener("focusout",ji,t),ct({element:document,event:"focusout",handler:ji,options:t}),document.addEventListener("focusout",Kr,t),ct({element:document,event:"focusout",handler:Kr,options:t})}(),vf(),function(){var t="textarea";Fe()&&(t='textarea,input[type="text"]'),Ll(t).each((function(t,e){yf(e)&&lf(e)})),Ll("[contenteditable=true], [contenteditable=plaintext-only]").each((function(t,e){yf(e)&&sf(e)}));var e=K((function(t){return V(t,Fe())}));Ll(e).each((function(t,e){yf(e)&&lf(e)}));var n=K(J);Ll(n).each((function(t,e){yf(e)&&sf(e)}))}(),Tl(sf,Ul),Dc();try{ml(an)}catch(t){}}}function wf(t){var e=H(t);e&&e in Ml||(e=q(t),Ml[e]=t,ef.observe(t),ft(e,t,!1,"resizeObservers",{container:t,observer:ef}),Xl(t,e),cf(e,t,!1),Kl(t,e),hf(t)),uu(t),Ul({saplingId:e,editable:t,useVisibleText:!1})}function xf(t){var e=U(t);e&&e in Hl||(e=z(t),Hl[e]=t,rf(t),ef.observe(t),ft(e,t,!0,"resizeObservers",{container:t,observer:ef}),of(t,e),uf(e,t,!0),cf(e,t,!0),sn(e)),an(e,t.value),wf(rn(t))}function Ef(t,e){localStorage.setItem(t,e);var n=new Date;n.setTime(n.getTime()+31536e6),document.cookie="".concat(t,"=").concat(e,"; expires=").concat(n.toUTCString())}function Af(t){var e=document.cookie.split("; ").find((function(e){return e.trim().startsWith(t)}));if(e){var n=e.split("=")[1];if(n&&n.trim().length>0)return n}var r=localStorage.getItem(t);return r&&r.trim().length>0?r:null}var _f=n(563);function Sf(t){return Sf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sf(t)}function Cf(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return kf(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kf(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kf(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Of={advancedEdits:{advanced_edits:!1},aiDetectPathname:"/api/v1/aidetect",annotationsEnabled:!1,autocomplete:!1,autoShowAdvancedEdits:!1,autoShowAnnotations:!1,checkButton:!1,completePathname:"/api/v1/complete",editActionPathname:"",editPathname:"/api/v1/edits",endpointHostname:"https://api.sapling.ai",edits:!0,ignoreText:"Ignore",isAnonUser:!1,lang:"en",lightningCompat:!1,lightningCompatLeft:0,lightningCompatTop:0,medical:null,mode:"prod",neuralSpellcheck:null,operations:[],saplingPathPrefix:"",shadowRoot:!0,snippets:!1,statisticsPathname:"/api/v1/statistics",statusBadge:!0,toneEnabled:!1,toneFeedbackEnabled:!1,toneFeedbackPathname:"/api/v1/tone/feedback",tonePathname:"/api/v1/tone",userData:null,userId:"",userToggle:!1,userToggleEnabled:null,variety:null,telemetryEndpoint:null,freemium:!1,customStyles:{},appearance:{compact:!0,variables:{acceptText:"Accept",ignoreText:"Ignore",badgeSize:null,badgeMargin:null,badgeColor:null,badgeErrorColor:null},customCSS:""}};function Tf(t,e){for(var n={},r=0,i=Object.entries(t);r<i.length;r++){var o=Cf(i[r],2),a=o[0],s=o[1];a in e?"object"===Sf(s)&&"object"===Sf(e[a])?n[a]=Tf(s,e[a]):n[a]=e[a]:n[a]=s}return n}function Ff(t){var e=t.createElement("style");e.textContent=p,t.head.appendChild(e)}function jf(t){Sapling.userToggleEnabled=t,Ef("sapling-sdk-user-toggle-enabled",t),t?function(){for(var t=0,e=Object.entries(Ml);t<e.length;t++){var n=Bl(e[t],2);Ul({saplingId:n[0],editable:n[1],useVisibleText:!1})}for(var r=0,i=Object.entries(Hl);r<i.length;r++){var o=Bl(i[r],2);an(o[0],o[1].value)}}():function(){for(var t=0,e=Object.entries(Qs);t<e.length;t++){for(var n=Ws(e[t],2),r=(n[0],n[1]),i=0,o=Object.entries(r.edits);i<o.length;i++){var a,s=Ws(o[i],2),u=(s[0],Js(s[1].domElements));try{for(u.s();!(a=u.n()).done;)a.value.remove()}catch(t){u.e(t)}finally{u.f()}}r.edits={}}}()}var Lf={};window&&void 0===window.Sapling&&(Lf.init=function(t){for(var e,n,r=Tf(Of,t),i=0,o=Object.entries(r);i<o.length;i++){var a=Cf(o[i],2),s=a[0],u=a[1];Sapling[s]=u}if(t.userId||(Sapling.userId=function(){var t="sapling-sdk-anon-user-id",e=Af(t);return e&&"null"!=e||(e="anon-".concat(f())),Ef(t,e),e}(),Sapling.isAnonUser=!0),Sapling.freemium&&ie(!0),Sapling.saplingPathPrefix.length&&!Sapling.saplingPathPrefix.startsWith("/")&&(Sapling.saplingPathPrefix="/".concat(Sapling.saplingPathPrefix)),je(t.lang),"key"in t&&("dev"===Sapling.mode||t.key&&t.key.includes("."))&&(Sapling.key=t.key),Sapling.sessionId=f(),e=window.location.href,n=new g(e),v=n.hostname||window.location.hostname,y=n.pathname||window.location.pathname,Df(),ze("sdk-init"),"headers"in t&&_f.ajaxSetup({beforeSend:function(e){for(var n=0,r=Object.entries(t.headers);n<r.length;n++){var i=Cf(r[n],2),o=i[0],a=i[1];e.setRequestHeader(o,a)}}}),Sapling.autoShowAnnotations&&(Sapling.autoShowAdvancedEdits=!0),Sapling.annotationsEnabled&&(Sapling.advancedEdits.advanced_edits=!0),Sapling.userToggle){if(null===Sapling.userToggleEnabled){var c=Af("sapling-sdk-user-toggle-enabled");if(null!==c){var l="true"===String(c).toLowerCase();Sapling.userToggleEnabled=l}}}else Sapling.userToggleEnabled=!0;Sapling.setUserToggleEnabled=jf,Sapling.injectCSS=Ff,Ff(document),$e()},Lf.observe=function(t){if(!t)throw new Error("Sapling.observe must be called on a DOM element.");if("textarea"===t.nodeName.toLowerCase())lf(t);else if("input"===t.nodeName.toLowerCase()){if("text"!==t.type)throw new Error('Sapling.observe must be called on input of type="text".');lf(t)}else if("lightning-textarea"===t.nodeName.toLowerCase()||"lightning-input-field"===t.nodeName.toLowerCase())Sapling.lightningCompat=!0,lf(t);else{if("true"!==t.getAttribute("contenteditable")&&""!==t.getAttribute("contenteditable")&&"plaintext-only"!==t.getAttribute("contenteditable"))throw new Error("Sapling.observe must be called on textarea, contenteditable, or input.");sf(t)}},Lf.unobserve=function(t){if(!t)throw new Error("Sapling.unobserve must be called on a DOM element.");if("textarea"===t.nodeName.toLowerCase())Zl(t,!0);else if("input"===t.nodeName.toLowerCase())Zl(t,!0);else if("lightning-textarea"===t.nodeName.toLowerCase()||"lightning-input-field"===t.nodeName.toLowerCase())Zl(t);else{if("true"!==t.getAttribute("contenteditable")&&""!==t.getAttribute("contenteditable")&&"plaintext-only"!==t.getAttribute("contenteditable"))throw new Error("Sapling.unobserve must be called on textarea, contenteditable, or input.");Zl(t,!1)}},Lf.checkOnce=function(t){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{aiDetect:!1}).aiDetect;if(!t)throw new Error("Sapling.checkOnce must be called on a DOM element.");if("textarea"===t.nodeName.toLowerCase())xf(t);else if("input"===t.nodeName.toLowerCase()){if("text"!==t.type)throw new Error('Sapling.checkOnce must be called on input of type="text".');xf(t)}else if("lightning-textarea"===t.nodeName.toLowerCase()||"lightning-input-field"===t.nodeName.toLowerCase())Sapling.lightningCompat=!0,xf(t);else{if("true"!==t.getAttribute("contenteditable")&&""!==t.getAttribute("contenteditable")&&"plaintext-only"!==t.getAttribute("contenteditable"))throw new Error("Sapling.checkOnce must be called on textarea, contenteditable, or input.");wf(t)}if(e){var n=function(t){var e=H(t);if(e){var n=Qs[e]||{edits:{}},r=n.shadowHost,i=n.badge;return n.aiDetectOverlay||(n.aiDetectOverlay=new As(r,e,i),n.aiDetectOverlay.createUIElements()),{containerId:e,aiDetectOverlay:n.aiDetectOverlay}}}(t),r=n.containerId,i=n.aiDetectOverlay;!function(t){var e=Qs[t];e&&e.aiDetectOverlay&&e.aiDetectOverlay.queryAndUpdate()}(r),i.initForCheckOnce()}},window.Sapling=Lf);var If=Lf}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={id:r,loaded:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.hmd=t=>((t=Object.create(t)).children||(t.children=[]),Object.defineProperty(t,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+t.id)}}),t),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),n(588);var r=n(580);SaplingModule=r})();
|
|
2
2
|
//# sourceMappingURL=main-bundle.js.map
|