@ckeditor/ckeditor5-ai 46.0.1-alpha.11 → 46.0.1-alpha.13

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/build/ai.js CHANGED
@@ -2,4 +2,4 @@
2
2
  /*!
3
3
  * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
4
4
  * For licensing, see LICENSE.md.
5
- */(()=>{var e={168:e=>{"use strict";e.exports=function(e){return e[1]}},181:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(168),i=n.n(r),o=n(433),s=n.n(o)()(i());s.push([e.id,":root{--ck-ai-dropdown-view-width:250px;--ck-ai-dropdown-view-list-max-height:250px}.ck.ck-ai-commands-search{width:var(--ck-ai-dropdown-view-width)}.ck.ck-ai-commands-search>.ck-labeled-field-view{padding:var(--ck-spacing-large)}.ck.ck-ai-commands-search>.ck-labeled-field-view .ck-input{min-width:unset}.ck.ck-ai-commands-search>.ck-search__results{border-top:1px solid var(--ck-color-base-border)}.ck.ck-ai-commands-search>.ck-search__results>.ck-list{max-height:var(--ck-ai-dropdown-view-list-max-height);overflow:auto}",""]);const a=s},237:e=>{"use strict";e.exports=CKEditor5.dll},262:e=>{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},311:(e,t,n)=>{e.exports=n(237)("./src/ui.js")},331:(e,t,n)=>{e.exports=n(237)("./src/clipboard.js")},355:(e,t,n)=>{e.exports=n(237)("./src/icons.js")},357:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},369:function(e){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({17:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,r){void 0===r&&(r=!1);var i=e.getVersionPrecision(t),o=e.getVersionPrecision(n),s=Math.max(i,o),a=0,c=e.map([t,n],function(t){var n=s-e.getVersionPrecision(t),r=t+new Array(n+1).join(".0");return e.map(r.split("."),function(e){return new Array(20-e.length).join("0")+e}).reverse()});for(r&&(a=s-Math.min(i,o)),s-=1;s>=a;){if(c[0][s]>c[1][s])return 1;if(c[0][s]===c[1][s]){if(s===a)return 0;s-=1}else if(c[0][s]<c[1][s])return-1}},e.map=function(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)r.push(t(e[n]));return r},e.find=function(e,t){var n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){var i=e[n];if(t(i,n))return i}},e.assign=function(e){for(var t,n,r=e,i=arguments.length,o=new Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];if(Object.assign)return Object.assign.apply(Object,[e].concat(o));var a=function(){var e=o[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach(function(t){r[t]=e[t]})};for(t=0,n=o.length;t<n;t+=1)a();return e},e.getBrowserAlias=function(e){return r.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return r.BROWSER_MAP[e]||""},e}();t.default=i,e.exports=t.default},18:function(e,t,n){"use strict";t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(91))&&r.__esModule?r:{default:r},o=n(18);function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(){}var t,n,r;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,r=[{key:"BROWSER_MAP",get:function(){return o.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return o.ENGINE_MAP}},{key:"OS_MAP",get:function(){return o.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return o.PLATFORMS_MAP}}],(n=null)&&s(t.prototype,n),r&&s(t,r),e}();t.default=a,e.exports=t.default},91:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=c(n(92)),i=c(n(93)),o=c(n(94)),s=c(n(95)),a=c(n(17));function c(e){return e&&e.__esModule?e:{default:e}}var u=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=a.default.find(r.default,function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=a.default.find(i.default,function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=a.default.find(o.default,function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=a.default.find(s.default,function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return a.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},r=0,i={},o=0;if(Object.keys(e).forEach(function(t){var s=e[t];"string"==typeof s?(i[t]=s,o+=1):"object"==typeof s&&(n[t]=s,r+=1)}),r>0){var s=Object.keys(n),c=a.default.find(s,function(e){return t.isOS(e)});if(c){var u=this.satisfies(n[c]);if(void 0!==u)return u}var d=a.default.find(s,function(e){return t.isPlatform(e)});if(d){var l=this.satisfies(n[d]);if(void 0!==l)return l}}if(o>0){var h=Object.keys(i),f=a.default.find(h,function(e){return t.isBrowser(e,!0)});if(void 0!==f)return this.compareVersion(i[f])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=a.default.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(a.default.compareVersions(i,n,r))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some(function(e){return t.is(e)})},e}();t.default=u,e.exports=t.default},92:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=/version\/(\d+(\.?_?\d+)+)/i,s=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=s,e.exports=t.default},93:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),s=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:o.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=i.default.getWindowsVersionName(t);return{name:o.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:o.OS_MAP.iOS},n=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=i.default.getMacOSVersionName(t),r={name:o.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:o.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=i.default.getAndroidVersionName(t),r={name:o.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:o.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:o.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:o.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:o.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.PlayStation4,version:t}}}];t.default=s,e.exports=t.default},94:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),s=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:o.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}}];t.default=s,e.exports=t.default},95:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),s=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:o.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:o.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:o.ENGINE_MAP.Trident},n=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:o.ENGINE_MAP.Presto},n=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:o.ENGINE_MAP.Gecko},n=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:o.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:o.ENGINE_MAP.WebKit},n=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=s,e.exports=t.default}})},379:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(168),i=n.n(r),o=n(433),s=n.n(o)()(i());s.push([e.id,":root{--ck-ai-form-submit-button-text-color:var(--ck-color-text);--ck-ai-form-submit-button-border-color:transparent;--ck-ai-form-submit-button-disabled-border-color:transparent;--ck-ai-toolbar-button-hover-color:var(--ck-color-text);--ck-color-ai-selection:rgba(31,176,255,.3)}.ck-ai-assistant-ui_theme{--ck-color-button-default-hover-background:#f3ecff;--ck-color-button-default-active-background:#f3ecff;--ck-color-button-on-background:#f3ecff;--ck-color-button-on-hover-background:#f3ecff;--ck-color-button-on-active-background:#f3ecff;--ck-color-button-on-disabled-background:#f3ecff;--ck-color-button-on-color:#743ccd;--ck-color-button-action-background:#743ccd;--ck-color-button-action-hover-background:#6c34c9;--ck-color-button-action-active-background:#6c34c9;--ck-color-button-action-disabled-background:#ba9de6;--ck-color-list-button-hover-background:#f3ecff;--ck-ai-form-content-background:#f9f9f9;--ck-ai-form-submit-button-text-color:var(--ck-color-button-on-color);--ck-ai-form-submit-button-border-color:var(--ck-color-button-action-background);--ck-ai-form-submit-button-disabled-border-color:var(--ck-color-button-action-disabled-background);--ck-ai-toolbar-button-hover-color:var(--ck-color-button-on-color);--ck-color-ai-selection:#e2d6f5}.ck-ai-assistant-button:hover,.ck-ai-commands-dropdown>.ck-button:hover{color:var(--ck-ai-toolbar-button-hover-color)}.ck span.ck-fake-ai-selection{background:var(--ck-color-ai-selection)}.ck .ck-widget.ck-fake-ai-selection{outline-color:var(--ck-color-ai-selection)}.ck span.ck-fake-ai-selection-candidate{background:var(--ck-color-ai-selection)}.ck .ck-fake-ai-selection_collapsed{border-right:1px solid var(--ck-color-base-text);height:100%;margin-right:-1px;outline:1px solid hsla(0,0%,100%,.5)}.ck.ck-content.ck-ai-form__content-field h2{font-size:1.3em}.ck.ck-content.ck-ai-form__content-field h3{font-size:1.2em}.ck.ck-content.ck-ai-form__content-field h4,.ck.ck-content.ck-ai-form__content-field h5,.ck.ck-content.ck-ai-form__content-field h6{font-size:1.1em}.ck.ck-content.ck-ai-form__content-field h2,.ck.ck-content.ck-ai-form__content-field h3,.ck.ck-content.ck-ai-form__content-field h4,.ck.ck-content.ck-ai-form__content-field h5,.ck.ck-content.ck-ai-form__content-field h6,.ck.ck-content.ck-ai-form__content-field ol,.ck.ck-content.ck-ai-form__content-field p,.ck.ck-content.ck-ai-form__content-field ul{line-height:1.7em;margin-block-end:.5em;margin-block-start:.5em}.ck.ck-content.ck-ai-form__content-field>:first-child{margin-top:0}.ck.ck-content.ck-ai-form__content-field>:last-child{margin-bottom:0}",""]);const a=s},433:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n}).join("")},t.i=function(e,n,r,i,o){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(r)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(s[c]=!0)}for(var u=0;u<e.length;u++){var d=[].concat(e[u]);r&&s[d[0]]||(void 0!==o&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=o),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),i&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=i):d[4]="".concat(i)),t.push(d))}},t}},545:e=>{"use strict";var t,n=(t=[],function(e,n){return t[e]=n,t.filter(Boolean).join("\n")});function r(e,t,r,i){var o;if(r)o="";else{o="",i.supports&&(o+="@supports (".concat(i.supports,") {")),i.media&&(o+="@media ".concat(i.media," {"));var s=void 0!==i.layer;s&&(o+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),o+=i.css,s&&(o+="}"),i.media&&(o+="}"),i.supports&&(o+="}")}if(e.styleSheet)e.styleSheet.cssText=n(t,o);else{var a=document.createTextNode(o),c=e.childNodes;c[t]&&e.removeChild(c[t]),c.length?e.insertBefore(a,c[t]):e.appendChild(a)}}var i={singleton:null,singletonCounter:0};e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=i.singletonCounter++,n=i.singleton||(i.singleton=e.insertStyleElement(e));return{update:function(e){r(n,t,!1,e)},remove:function(e){r(n,t,!0,e)}}}},584:(e,t,n)=>{e.exports=n(237)("./src/utils.js")},667:e=>{"use strict";e.exports=function(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}},673:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var o={},s=[],a=0;a<e.length;a++){var c=e[a],u=r.base?c[0]+r.base:c[0],d=o[u]||0,l="".concat(u," ").concat(d);o[u]=d+1;var h=n(l),f={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==h)t[h].references++,t[h].updater(f);else{var p=i(f,r);r.byIndex=a,t.splice(a,0,{identifier:l,updater:p,references:1})}s.push(l)}return s}function i(e,t){var n=t.domAPI(t);n.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,i){var o=r(e=e||[],i=i||{});return function(e){e=e||[];for(var s=0;s<o.length;s++){var a=n(o[s]);t[a].references--}for(var c=r(e,i),u=0;u<o.length;u++){var d=n(o[u]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}o=c}}},676:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(168),i=n.n(r),o=n(433),s=n.n(o)()(i());s.push([e.id,":root{--ck-ai-form-view-width:600px;--ck-ai-form-content-height:175px;--ck-ai-form-content-background:#fafafa;--ck-ai-form-history-font-size:.9em;--ck-ai-form-error-background:var(--ck-color-light-red)}.ck .ck-ai-form{max-width:100%;width:var(--ck-ai-form-view-width)}@media screen and (max-width:600px){.ck .ck-ai-form{--ck-ai-form-view-width:100vw}}.ck .ck-ai-form .ck-ai-form-content{padding:var(--ck-spacing-large);width:100%}.ck .ck-ai-form .ck-ai-form-content .ck-input{width:100%}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area-wrapper{border:1px solid var(--ck-color-base-border);border-radius:2px;max-height:var(--ck-ai-form-content-height);overflow-y:auto;width:100%}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area-wrapper:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area{background-color:var(--ck-ai-form-content-background);display:flex}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area.ck-ai-form__content-area--processing{--ck-color-text:var(--ck-color-input-disabled-text);background-color:var(--ck-color-input-disabled-background)}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field{box-sizing:content-box;min-height:calc(var(--ck-line-height-base)*var(--ck-font-size-base));padding:var(--ck-spacing-tiny) var(--ck-spacing-medium);white-space:normal;width:100%}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field{padding-right:0}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field{padding-left:0}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field>*{color:inherit;white-space:normal}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-spinner-container{margin-right:var(--ck-spacing-medium)}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-spinner-container{margin-left:var(--ck-spacing-medium)}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button-wrapper{display:flex;flex-direction:column-reverse;padding-left:2px}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button{bottom:1px;min-height:unset;min-width:unset;padding:4px;position:sticky;right:1px}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button svg{--ck-icon-size:16px}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button.ck-ai-form__copy-button--copied{color:inherit}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__toolbar{border:none;margin-bottom:calc(var(--ck-spacing-medium)*2);margin-top:var(--ck-spacing-medium);padding:0}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__loader{align-items:center;display:flex}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__loader .ck-spinner{box-sizing:border-box}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete{display:flex;justify-content:space-between}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view{flex-grow:1}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit{border-color:var(--ck-ai-form-submit-button-border-color);color:var(--ck-ai-form-submit-button-text-color)}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit{margin-left:var(--ck-spacing-medium)}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit{margin-right:var(--ck-spacing-medium)}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit.ck-disabled{border-color:var(--ck-ai-form-submit-button-disabled-border-color)}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view .ck-ai-form__toggle-history{bottom:var(--ck-spacing-small);font-size:var(--ck-font-size-tiny);min-height:unset;min-width:unset;padding:4px;position:absolute;top:var(--ck-spacing-small)}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view .ck-ai-form__toggle-history{right:var(--ck-spacing-medium)}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view .ck-ai-form__toggle-history{left:var(--ck-spacing-medium)}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-textarea{padding-right:30px}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-textarea{padding-left:30px}@media screen and (max-width:600px){.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-textarea{--ck-input-width:auto}}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto;grid-column-gap:0;grid-row-gap:0}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>span{grid-area:1/1/2/2}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-button{background:none;font-size:var(--ck-ai-form-history-font-size);grid-area:1/2/2/3;justify-self:start;margin:var(--ck-spacing-medium) 0 0;min-height:auto;padding:0}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-button .ck-button__label{line-height:inherit}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-button .ck-button__label:hover{text-decoration:underline}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-list{grid-area:2/1/3/3}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-list .ck-list__item .ck-button .ck-button__label{font-size:var(--ck-ai-form-history-font-size);line-height:var(--ck-line-height-base);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ck .ck-ai-form .ck-ai-form__error{align-items:center;background-color:var(--ck-ai-form-error-background);border-radius:2px;color:var(--ck-color-base-text);display:flex;justify-content:center;margin-bottom:var(--ck-spacing-medium);padding:var(--ck-spacing-medium)}",""]);const a=s},782:(e,t,n)=>{e.exports=n(237)("./src/core.js")},783:(e,t,n)=>{e.exports=n(237)("./src/engine.js")}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{AIAdapter:()=>w,AIAssistant:()=>qe,AIAssistantUI:()=>Ne,AIRequestError:()=>b,AITextAdapter:()=>We,AWSTextAdapter:()=>ac,OpenAITextAdapter:()=>Qe,ShowAIAssistantCommand:()=>E,getDefaultAICommands:()=>He});var e=n(782),t=n(355),i=n(584),o=n(311);function s(e,t){const n=(0,t.t)("Other");return e.length?"groupId"in e[0]?e:[{groupId:"_ungrouppedCommands",groupLabel:n,order:1/0,commands:e}]:[{groupId:"_ungrouppedCommands",groupLabel:n,order:1/0,commands:[]}]}var a=n(331),c=n(783);const u=l;function d(){const e=["3213384WiTdQJ","model","resultRange","getFirstRange","lowest","ck-ai-assistant-ui_theme","addClass","get","getColumnIndexes","fire","isCollapsed","_getTableRowCountFromContent","for","8rbALpZ","ck-fake-ai-selection_collapsed","data","element","map","showFakeVisualSelection","getChildren","1346940cwOAFE","isAtEnd","3qVunNk","setSelection","TableUtils","_createEmptyTableRows","isPremiumPlugin","length","createSelection","updateMarker","push","insertContentBelow","parse","editor","markerToElement","3767795GXEfBX","ai.useTheme","join","config","createPositionAt","start","_getDefaultInsertBelowPosition","editingDowncast","document","canEditAt","ck-fake-ai-selection","isContent","AIAssistantEditing","getRange","table","last","forEach","insertContent","pluginName","selection","getRows","from","has","2360SvFoMO","once","getChild","_resetContentOfSelectedTableCells","markerToHighlight","isOfficialPlugin","getRanges","filter","fromCharCode","hideFakeVisualSelection","off","href","7352676qEGfDO","_prepareTableInsertBelowPosition","first","createPositionAfter","ai-ui","contentInsertion","paste","plugins","removeMarker","1240001ZmYnOG","createRange","span","getLastPosition","afterInit","end","markers","_getAISelection","editing","addMarker","154llzoxl","insertRows","getSelectedTableCells","schema","DataTransfer","getSelectedBlocks","text/html","findAncestor","pop","_pasteHTMLUsingClipboard","conversion","change","setData","markerRange","49570Kxiayl","init","getLastMatchingPosition","244AxcHEZ","createUIElement","getRowIndexes","getMarkersGroup","deleteContent"];return(d=function(){return e})()}function l(e,t){const n=d();return(l=function(e,t){return n[e-=181]})(e,t)}!function(e){const t=l,n=e();for(;;)try{if(462086===-parseInt(t(191))/1*(parseInt(t(239))/2)+-parseInt(t(266))/3*(-parseInt(t(244))/4)+-parseInt(t(279))/5+-parseInt(t(264))/6+-parseInt(t(212))/7*(-parseInt(t(257))/8)+parseInt(t(203))/9+-parseInt(t(236))/10*(parseInt(t(222))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(d);const h=globalThis[u(226)],f=u(207);class p extends e.Plugin{static get[u(186)](){return u(291)}static get[u(196)](){return!0}static get[u(270)](){return!0}[u(237)](){const e=u,{editor:t}=this,n=[e(289)];t[e(282)][e(251)](e(280))&&n[e(274)](e(249)),t[e(232)][e(256)](e(286))[e(195)]({model:f,view:{classes:n,priority:12}}),t[e(232)][e(256)](e(286))[e(278)]({model:f,view:(t,{writer:n})=>{const r=e;if(!t[r(235)][r(254)])return null;const i=n[r(240)](r(214));return n[r(250)]([r(289),r(258)],i),i}})}[u(216)](){!async function(e){const t=g([81,85,90,109,114,68,65,74,98,104,75,69,52,86,77,70,73,112,71,55,48,54,57,110,79,116,89,101,87,56,108,113,99,84,76,121,88,49,50,107,51,67,103,82,102,115,72,117,105,53,120,111,66,78,80,83,100,97,118,106,122,119]),n=window[g([68,97,116,101])][g([110,111,119])](),r=e[g([101,100,105,116,111,114])],o=new(window[g([80,114,111,109,105,115,101])])(e=>{r[g([111,110,99,101])](g([114,101,97,100,121]),e)}),s={[g([107,116,121])]:g([69,67]),[g([117,115,101])]:g([115,105,103]),[g([99,114,118])]:g([80,45,50,53,54]),[g([120])]:g([105,67,106,79,67,118,68,70,73,54,108,81,72,72,84,49,56,106,86,119,82,102,107,102,72,81,50,97,95,77,121,109,84,51,53,76,81,86,111,70,83,65,73]),[g([121])]:g([107,88,73,121,74,52,101,118,116,67,69,70,82,109,120,75,83,85,112,75,57,102,68,87,52,53,57,118,88,79,118,86,114,104,102,54,117,81,65,101,79,105,111]),[g([97,108,103])]:g([69,83,50,53,54])},a=r[g([99,111,110,102,105,103])][g([103,101,116])](g([108,105,99,101,110,115,101,75,101,121]));function c(e){const t=[new(window[g([80,114,111,109,105,115,101])])(e=>setTimeout(e,605900)),o[g([116,104,101,110])](()=>new(window[g([80,114,111,109,105,115,101])])(e=>{let t=0;r[g([109,111,100,101,108])][g([111,110])](g([97,112,112,108,121,79,112,101,114,97,116,105,111,110]),(n,r)=>{r[0][g([105,115,68,111,99,117,109,101,110,116,79,112,101,114,97,116,105,111,110])]&&t++,504==t&&(e(),n[g([111,102,102])]())})}))];return window[g([80,114,111,109,105,115,101])][g([114,97,99,101])](t)[g([116,104,101,110])](()=>e)}function u(e){return e[g([115,116,97,114,116,115,87,105,116,104])](g([101,121]))?JSON[g([112,97,114,115,101])](d(e)):null}function d(e){return window[g([97,116,111,98])](e[g([114,101,112,108,97,99,101])](/-/g,g([43]))[g([114,101,112,108,97,99,101])](/_/g,g([47])))}function h(e){let t=5381;function n(e){for(let n=0;n<e[g([108,101,110,103,116,104])];n++){const r=e[g([99,104,97,114,67,111,100,101,65,116])](n);t=(t<<5)+t+r,t&=t}}return function e(t){Array[g([105,115,65,114,114,97,121])](t)?t[g([102,111,114,69,97,99,104])](e):t&&typeof t==g([111,98,106,101,99,116])?Object[g([101,110,116,114,105,101,115])](t)[g([115,111,114,116])]()[g([102,111,114,69,97,99,104])](([t,r])=>{n(t),e(r)}):n(window[g([83,116,114,105,110,103])](t))}(e),t>>>0}function f(e){return e[g([116,111,83,116,114,105,110,103])](16)[g([112,97,100,83,116,97,114,116])](8,g([48]))}function p(e){return e[g([115,112,108,105,116])]("")[g([114,101,118,101,114,115,101])]()[g([106,111,105,110])]("")}function m(){}function g(e){const t=l;return e[t(261)](e=>String[t(199)](e))[t(281)]("")}!function(e){const n=function(){const e=window[g([83,116,114,105,110,103])](window[g([112,101,114,102,111,114,109,97,110,99,101])][g([110,111,119])]())[g([114,101,112,108,97,99,101])](g([46]),"");let n=g([81]);for(let r=0;r<e[g([108,101,110,103,116,104])];r+=2){let i=window[g([112,97,114,115,101,73,110,116])](e[g([115,117,98,115,116,114,105,110,103])](r,r+2));i>=t[g([108,101,110,103,116,104])]&&(i-=t[g([108,101,110,103,116,104])]),n+=t[i]}return n}();r[n]=g([97,105,76,105,99,101,110,115,101,75,101,121])+e,e!=g([86,97,108,105,100])&&async function(){await o,r[g([109,111,100,101,108])][g([99,104,97,110,103,101])]=m,r[g([109,111,100,101,108])][g([101,110,113,117,101,117,101,67,104,97,110,103,101])]=m,r[g([101,110,97,98,108,101,82,101,97,100,79,110,108,121,77,111,100,101])](g([109,111,100,101,108]))}()}(await async function(){let e,t=null,m=null;try{return a==g([71,80,76])?g([78,111,116,65,108,108,111,119,101,100]):(e=function(){const e=a[g([115,112,108,105,116])](g([46]));return 3!=e[g([108,101,110,103,116,104])]?null:t(e[1]);function t(e){const t=u(e);return t&&n()?t:null;function n(){const e=t[g([106,116,105])],n=window[g([112,97,114,115,101,73,110,116])](e[g([115,117,98,115,116,114,105,110,103])](e[g([108,101,110,103,116,104])]-8),16),r={...t,[g([106,116,105])]:e[g([115,117,98,115,116,114,105,110,103])](0,e[g([108,101,110,103,116,104])]-8)};return delete r[g([118,99])],h(r)==n}}}(),e?(e[g([117,115,97,103,101,69,110,100,112,111,105,110,116])]&&(m=function(e,t){return new(window[g([80,114,111,109,105,115,101])])(c=>{if(s())return c(g([86,97,108,105,100]));a(),r[g([100,101,99,111,114,97,116,101])](g([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]));let u=!1;const d=(0,i.uid)();function l(e){return!!e&&(typeof e===g([111,98,106,101,99,116])||typeof e===g([102,117,110,99,116,105,111,110]))&&typeof e[g([116,104,101,110])]===g([102,117,110,99,116,105,111,110])&&typeof e[g([99,97,116,99,104])]===g([102,117,110,99,116,105,111,110])}function m(r){a(r)[g([116,104,101,110])](e=>e&&e[g([115,116,97,116,117,115])]==g([111,107])?f(h(d+t))!=e[g([118,101,114,105,102,105,99,97,116,105,111,110])]?g([85,115,97,103,101,76,105,109,105,116]):g([86,97,108,105,100]):g([85,115,97,103,101,76,105,109,105,116]))[g([116,104,101,110])](e=>(o(),e),()=>{const e=s();return null==e?(o(),g([86,97,108,105,100])):g(n-e>6048e5?[85,115,97,103,101,76,105,109,105,116]:[86,97,108,105,100])})[g([116,104,101,110])](c)[g([99,97,116,99,104])](()=>{c(g([85,115,97,103,101,76,105,109,105,116]))});const i=36e5;function o(){const t=g([108,108,99,116,45])+f(h(e)),r=p(f(window[g([77,97,116,104])][g([99,101,105,108])](n/i)));window[g([108,111,99,97,108,83,116,111,114,97,103,101])][g([115,101,116,73,116,101,109])](t,r)}function s(){const t=g([108,108,99,116,45])+f(h(e)),n=window[g([108,111,99,97,108,83,116,111,114,97,103,101])][g([103,101,116,73,116,101,109])](t);return n?window[g([112,97,114,115,101,73,110,116])](p(n),16)*i:null}function a(e){return new(window[g([80,114,111,109,105,115,101])])((t,n)=>{e[g([116,104,101,110])](t,n),window[g([115,101,116,84,105,109,101,111,117,116])](n,12e4)})}}r[g([111,110])](g([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),(t,n)=>{if(n[0]!=e)return c(g([85,115,97,103,101,76,105,109,105,116]));n[1]={...n[1],[g([114,101,113,117,101,115,116,73,100])]:d}},{[g([112,114,105,111,114,105,116,121])]:g([104,105,103,104])}),r[g([111,110])](g([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),e=>{l(e[g([114,101,116,117,114,110])])&&(u=!0,m(e[g([114,101,116,117,114,110])]))},{[g([112,114,105,111,114,105,116,121])]:g([108,111,119])}),o[g([116,104,101,110])](()=>{u||c(g([85,115,97,103,101,76,105,109,105,116]))})});function s(){return r[g([101,100,105,116,105,110,103])][g([118,105,101,119])][g([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]==g([97,117,116,111])}function a(){r[g([101,100,105,116,105,110,103])][g([118,105,101,119])][g([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]=g([97,117,116,111])}}(e[g([117,115,97,103,101,69,110,100,112,111,105,110,116])],e[g([106,116,105])])),await async function(){let e=!0;try{const r=a[g([115,112,108,105,116])](g([46])),[i,o,s]=r;return t(i),await n(i,o,s),e}catch{return!1}function t(t){const n=u(t);n&&n[g([97,108,103])]==g([69,83,50,53,54])||(e=!1)}async function n(t,n,r){const i=window[g([85,105,110,116,56,65,114,114,97,121])][g([102,114,111,109])](d(r),e=>e[g([99,104,97,114,67,111,100,101,65,116])](0)),o=(new(window[g([84,101,120,116,69,110,99,111,100,101,114])]))[g([101,110,99,111,100,101])](t+g([46])+n),a=window[g([99,114,121,112,116,111])][g([115,117,98,116,108,101])];if(!a)return;const c=await a[g([105,109,112,111,114,116,75,101,121])](g([106,119,107]),s,{[g([110,97,109,101])]:g([69,67,68,83,65]),[g([110,97,109,101,100,67,117,114,118,101])]:g([80,45,50,53,54])},!1,[g([118,101,114,105,102,121])]);await a[g([118,101,114,105,102,121])]({[g([110,97,109,101])]:g([69,67,68,83,65]),[g([104,97,115,104])]:{[g([110,97,109,101])]:g([83,72,65,45,50,53,54])}},c,i,o)||(e=!1)}}()?function(){const t=e[g([102,101,97,116,117,114,101,115])];return!(!t||!t[g([105,110,99,108,117,100,101,115])](g([42]))&&!t[g([105,110,99,108,117,100,101,115])](g([65,73])))}()?function(){const t=[g([101,118,97,108,117,97,116,105,111,110]),g([116,114,105,97,108])][g([105,110,99,108,117,100,101,115])](e[g([108,105,99,101,110,115,101,84,121,112,101])])?n/1e3:1754611200;return e[g([101,120,112])]<t}()?g([69,120,112,105,114,101,100]):function(){const t=l,n=e[g([108,105,99,101,110,115,101,100,72,111,115,116,115])];if(!n||0==n[g([108,101,110,103,116,104])])return!0;const{hostname:r}=new URL(window[g([108,111,99,97,116,105,111,110])][t(202)]);if(n[g([105,110,99,108,117,100,101,115])](r))return!0;const i=r[g([115,112,108,105,116])](g([46]));return n[g([102,105,108,116,101,114])](e=>e[g([105,110,99,108,117,100,101,115])](g([42])))[g([109,97,112])](e=>e[g([115,112,108,105,116])](g([46])))[g([102,105,108,116,101,114])](e=>e[g([108,101,110,103,116,104])]<=i[g([108,101,110,103,116,104])])[g([109,97,112])](e=>Array(i[g([108,101,110,103,116,104])]-e[g([108,101,110,103,116,104])])[g([102,105,108,108])](e[0]===g([42])?g([42]):"")[g([99,111,110,99,97,116])](e))[g([115,111,109,101])](e=>i[g([101,118,101,114,121])]((t,n)=>e[n]===t||e[n]===g([42])))}()?(e[g([108,105,99,101,110,115,101,84,121,112,101])]==g([101,118,97,108,117,97,116,105,111,110])&&(t=c(g([69,118,97,108,117,97,116,105,111,110,76,105,109,105,116]))),e[g([108,105,99,101,110,115,101,84,121,112,101])]==g([116,114,105,97,108])&&(t=c(g([84,114,105,97,108,76,105,109,105,116]))),await(t&&m?new(window[g([80,114,111,109,105,115,101])])((e,n)=>{t[g([116,104,101,110])](e,n),m[g([116,104,101,110])](t=>{t!=g([86,97,108,105,100])&&e(t)},n)}):t||m||g([86,97,108,105,100]))):g([68,111,109,97,105,110,76,105,109,105,116]):g([78,111,116,65,108,108,111,119,101,100]):g([73,110,118,97,108,105,100])):g([73,110,118,97,108,105,100]))}catch{return g([73,110,118,97,108,105,100])}}())}(this)}[u(262)](){const e=u,t=this[e(277)][e(245)];t[e(233)](n=>{const r=e,i=t[r(287)][r(187)][r(197)]();let o=0;for(const e of i){const i=f+":"+o;if(t[r(218)][r(190)](i))n[r(273)](i,{range:e});else if(e[r(284)][r(265)]){const o=e[r(284)][r(238)](({item:e})=>!t[r(225)][r(290)](e),{boundaries:e});n[r(221)](i,{usingOperation:!1,affectsData:!1,range:n[r(213)](o,e[r(217)])})}else n[r(221)](i,{usingOperation:!1,affectsData:!1,range:e});o++}})}[u(200)](){const e=u,t=this[e(277)][e(245)],n=Array[e(189)](this[e(277)][e(245)][e(218)][e(242)](f));n[e(271)]&&t[e(233)](t=>{const r=e;n[r(184)](e=>{t[r(211)](e)})})}[u(185)](e,t){const n=u,r=this[n(219)](),i=t||r[n(247)]();this[n(277)][n(245)][n(288)](i)&&this[n(277)][n(245)][n(233)](o=>{const s=n;this[s(200)](),t||this[s(194)](o,r),this[s(231)]({insertAt:i,writer:o,html:e})})}[u(275)](e){const t=u,{model:n}=this[t(277)],r=this[t(219)]();n[t(233)](()=>{const n=t,i=this[n(204)](e,r)||this[n(285)](r);this[n(185)](e,i)})}[u(219)](){const e=u,t=this[e(277)][e(245)],n=Array[e(189)](t[e(218)][e(242)](f))[e(261)](t=>t[e(181)]());return t[e(272)](n)}[u(231)]({writer:e,html:t,insertAt:n}){const r=u,{view:i}=this[r(277)][r(220)],o=this[r(277)][r(210)][r(251)](a.ClipboardPipeline),s=new h;s[r(234)](r(228),t);const d=new ClipboardEvent(r(209),{clipboardData:s}),l=new c.ViewDocumentDomEventData(i,d,{dataTransfer:new c.ViewDataTransfer(s)});e[r(267)](n);const f=(t,n)=>{const i=r;n[i(246)]&&e[i(267)](n[i(246)])};o[r(192)](r(208),f,{priority:r(248)}),i[r(287)][r(253)](r(209),l),o[r(201)](r(208),f)}[u(285)](e){const t=u,{model:n}=this[t(277)],r=Array[t(189)](e[t(227)]());return r[t(271)]?n[t(206)](r[t(230)]()):e[t(215)]()}[u(204)](e,t){const n=u,{model:r,plugins:i}=this[n(277)];if(i[n(190)](n(268))){const o=i[n(251)](n(268))[n(224)](t);if(o[n(271)]){const t=this[n(255)](e),i=this[n(269)](o,t);return r[n(283)](i,0)}}return null}[u(255)](e){const t=u,n=this[t(277)][t(210)][t(251)](t(268)),r=this[t(277)][t(259)][t(276)](e),i=Array[t(189)](r[t(263)]())[t(198)](e=>e.is(t(260),t(182)));let o=0;return i[t(184)](e=>{o+=n[t(188)](e)}),o}[u(269)](e,t){const n=u,r=this[n(277)][n(210)][n(251)](n(268)),i=r[n(241)](e),o=r[n(252)](e),s=i[n(183)]+1,a=o[n(205)],c=e[0][n(229)](n(182));for(let e=0;e<t;e++)r[n(223)](c,{at:s});return c[n(193)](s)[n(193)](a)}[u(194)](e,t){const n=u,{plugins:r}=this[n(277)],{model:i}=e;r[n(190)](n(268))&&r[n(251)](n(268))[n(224)](t)[n(271)]&&i[n(243)](t)}}var m=y;function g(){var e=["203AeOpnX","796240MjqUyy","afterInit","39RELysP","name","isOfficialPlugin","aiadapter-text-adapter-not-set","pluginName","972VfSaFC","176656LfarMA","131034gdWVuD","AIAdapter","3356265iIRVPi","4123664amQztT","isPremiumPlugin","10390nzHeqr","AIRequestError","textAdapter","28818lCqdcS"];return(g=function(){return e})()}function y(e,t){var n=g();return(y=function(e,t){return n[e-=136]})(e,t)}!function(e){for(var t=y,n=e();;)try{if(467193===parseInt(t(141))/1+-parseInt(t(150))/2*(parseInt(t(154))/3)+-parseInt(t(152))/4+parseInt(t(144))/5+parseInt(t(142))/6*(parseInt(t(151))/7)+-parseInt(t(145))/8+parseInt(t(140))/9*(-parseInt(t(147))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(g);class w extends e.Plugin{static get[m(139)](){return m(143)}static get[m(137)](){return!0}static get[m(146)](){return!0}[m(153)](){var e=m;if(!this[e(149)])throw new i.CKEditorError(e(138),null)}}class b extends Error{constructor(e){var t=m;super(e),this[t(136)]=t(148)}}function v(e,t,n){const r=e.t;switch(t){case"Edit or review":return r("Edit or review");case"Improve writing":return r("Improve writing");case"Make shorter":return r("Make shorter");case"Make longer":return r("Make longer");case"Simplify language":return r("Simplify language");case"Generate from selection":return r("Generate from selection");case"Summarize":return r("Summarize");case"Continue":return r("Continue");case"Change tone":return r("Change tone");case"Professional":return r("Professional");case"Casual":return r("Casual");case"Direct":return r("Direct");case"Confident":return r("Confident");case"Friendly":return r("Friendly");case"Change style":return r("Change style");case"Business":return r("Business");case"Legal":return r("Legal");case"Journalism":return r("Journalism");case"Poetic":return r("Poetic");case"Translate":return r("Translate");case"English":return r("English");case"Spanish":return r("Spanish");case"German":return r("German");case"Portuguese":return r("Portuguese");case"French":return r("French");case"Simplified Chinese":return r("Simplified Chinese");case"Hindi":return r("Hindi");case"Arabic":return r("Arabic");case"AI Assistant":return r("AI Assistant");case"AI Commands":return r("AI Commands");case"Ask AI to edit or generate":return r("Ask AI to edit or generate");case"Ask AI to improve generated text":return r("Ask AI to improve generated text");case"Copy":return r("Copy");case"Submit":return r("Submit");case"Insert below":return r("Insert below");case"Try again":return r("Try again");case"Stop":return r("Stop");case"AI is writing...":return r("AI is writing...");case"AI is writing":return r("AI is writing");case"Generated content: %0":return r("Generated content: %0",n);case"Error during AI content generation: %0":return r("Error during AI content generation: %0",n);case"History":return r("History");case"Empty history":return r("Empty history");case"Ask AI and your prompts will be listed here for you to use later.":return r("Ask AI and your prompts will be listed here for you to use later.");case"Prompt history":return r("Prompt history");case"Clear":return r("Clear");case"AI_REPLACE_CONTENT":return r({id:"AI_REPLACE_CONTENT",string:"Replace"});case"AI_INSERT_CONTENT":return r({id:"AI_INSERT_CONTENT",string:"Insert"});case"AI_ERROR_GET_HEADERS":return r({id:"AI_ERROR_GET_HEADERS",string:"Preparing request headers failed"});case"AI_ERROR_GET_PARAMETERS":return r({id:"AI_ERROR_GET_PARAMETERS",string:"Preparing request parameters failed"});case"AI_ERROR_UNSUPPORTED_MODEL":return r({id:"AI_ERROR_UNSUPPORTED_MODEL",string:'The requested AI model ("%0") is not supported'},n);case"AI_ERROR_CONTEXT_LENGTH":return r({id:"AI_ERROR_CONTEXT_LENGTH",string:"Selected content is too long"});case"AI_ERROR_MODERATION":return r({id:"AI_ERROR_MODERATION",string:"Requested query does not pass moderation rules"});case"AI_ERROR_FAILED":return r({id:"AI_ERROR_FAILED",string:"Failed to communicate with the AI service"});default:return t}}function k(e,t){const n=A();return(k=function(e,t){return n[e-=235]})(e,t)}const S=k;!function(e){const t=k,n=e();for(;;)try{if(575792===-parseInt(t(272))/1+parseInt(t(262))/2*(parseInt(t(237))/3)+parseInt(t(253))/4+-parseInt(t(268))/5*(parseInt(t(244))/6)+-parseInt(t(278))/7+parseInt(t(259))/8*(-parseInt(t(277))/9)+-parseInt(t(275))/10*(-parseInt(t(264))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(A);class E extends e.Command{[S(252)];constructor(e,t){const n=S;super(e),this[n(252)]=t,this[n(235)](n(247),[]),this.on(n(260),(e,t,r)=>{const i=n;this[i(258)]&&(this[i(247)]=I(this[i(252)],r))}),this[n(235)](n(239),!1),this.on(n(245),(e,t,r)=>{const i=n;this[i(247)]=r?I(this[i(252)],this[i(239)]):[]})}[S(266)](){const e=S,t=this[e(270)][e(236)];this[e(239)]=function(t){const n=e,r=t[n(257)][n(240)];return r[n(263)]?0!==[...r[n(261)]()][n(267)]&&![...r[n(261)]()][0][n(269)]:!!t[n(251)](r[n(241)]())}(t);const n=t[e(257)][e(240)],r=this[e(270)][e(271)][e(276)](e(265));for(const t of n[e(254)]())for(const n of t[e(248)]())if(n.is(e(249))&&r[e(256)](n[e(238)]))return void(this[e(258)]=!1);this[e(258)]=!0}[S(243)](e="",t="",n=S(250)){const r=S;this[r(270)][r(273)][r(276)](Ne)[r(242)](e,t,n)}}function A(){const e=["document","isEnabled","7704InxAQv","change:_hasContext","getSelectedBlocks","46SOeGZj","isCollapsed","11xeBzjd","ai.aiAssistant.disabledElements","refresh","length","5PRbkCY","isEmpty","editor","config","823231sHGrtX","plugins","requiresContent","15489130wOYPDm","get","5967WvzbYq","4375462qocwwI","from","set","model","145989tzkezn","name","_hasContext","selection","getFirstRange","showUI","execute","4698294KEpnkm","change:isEnabled","add","enabledCommandsIds","getItems","element","custom","hasContent","_commandDefinitions","3109780ClWgMd","getRanges","values","includes"];return(A=function(){return e})()}function I(e,t){const n=S,r=new Set;for(const i of e[n(255)]())(t||!1===i[n(274)])&&r[n(246)](i.id);return Array[n(279)](r)}const x=R;function _(){const e=["once","serializeToString","previousContext","from","670908JUFfWI","childNodes","currentResponse","reverse","initialContext","trim","createElement","domConverter","length","_stripMarkdownSyntax","reset","toModel","1726735Qhydim","custom","nodeType","parseFromString","```html","remove","finally","textAdapter","then","isRendered","setContentOf","get","previousActionId","_handleQuery","mainAction","editor","exec","stopProcessing","editing","set","isProcessing","element","submitPrompt","currentContext","processor","previousLabel","listenTo","name","substring","message","_domParser","abort","3685182LWEBbY","catch","<h1></h1>","makeRequest","ai.aiAssistant.preserveComments","config","render","startsWith","6112512jUEqvh","innerHTML","stringify","endsWith","3194ISsDVS","set:currentContext","_parseAndNormalizeContent","1050588vRhICl","push","querySelector","prompt","_xmlSerializer","markers","_sanitizationContainer","_normalizeResponseHeadings","previousQuery","tryAgainEvent","value","clear","htmlProcessor","viewToDom","_isH1TagSupportEnabled","```","div","view","updateView","finishProcessing","data","startProcessing","document","rename","stopListening","text/html","handleError","body","match","ELEMENT_NODE","_sanitizeHTML","destroy","2191527IbLxNL","94usOwjg","toView"];return(_=function(){return e})()}function R(e,t){const n=_();return(R=function(e,t){return n[e-=391]})(e,t)}!function(e){const t=R,n=e();for(;;)try{if(403056===parseInt(t(451))/1*(parseInt(t(487))/2)+parseInt(t(486))/3+parseInt(t(395))/4+-parseInt(t(407))/5+parseInt(t(439))/6+-parseInt(t(454))/7+-parseInt(t(447))/8)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(_);const C=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,"is");class P extends((0,i.ObservableMixin)()){[x(422)];[x(414)];[x(471)];[x(460)];[x(437)];[x(458)];constructor(e,t,n){const r=x;super(),this[r(422)]=e,this[r(414)]=t,this[r(460)]=document[r(401)](r(470)),this[r(437)]=new DOMParser,this[r(458)]=new XMLSerializer,this[r(471)]=n,this[r(426)]({initialContext:"",currentContext:"",currentResponse:"",previousContext:void 0,previousQuery:void 0,previousLabel:void 0,isProcessing:!1}),this.on(r(452),(e,t,n)=>{const i=r;this[i(471)][i(464)]=this[i(484)](n)}),this[r(433)](this[r(471)],r(429),(e,t)=>{const n=r,i=this[n(430)]||this[n(399)];this[n(420)](t,i,n(408))}),this[r(433)](this[r(471)],r(463),()=>{const e=r;this[e(471)][e(457)]=this[e(432)],this[e(420)](this[e(462)],this[e(393)],this[e(419)],this[e(432)])}),this[r(433)](this[r(471)],r(424),()=>{this[r(424)]()})}[x(485)](){this[x(478)]()}async[x(472)]({actionId:e,query:t,htmlContent:n,label:r,mainActionLabel:i}){const o=x;this[o(471)][o(457)]=r,this[o(471)][o(421)]=i,this[o(399)]=n,t&&(this[o(471)][o(416)]?this[o(420)](t,n,e,r):this[o(471)][o(391)](o(445),()=>{this[o(420)](t,n,e,r)}))}[x(424)](){const e=x;this[e(427)]&&(this[e(427)]=!1,this[e(471)][e(473)](),this[e(414)][e(438)]())}[x(405)](){const e=x;this[e(399)]="",this[e(430)]="",this[e(397)]="",this[e(393)]="",this[e(462)]="",this[e(432)]="",this[e(419)]=void 0,this[e(471)][e(405)](),this[e(424)]()}async[x(420)](e,t,n,r){const i=x;return this[i(427)]=!0,this[i(471)][i(475)](),this[i(393)]=t,this[i(462)]=e,this[i(432)]=r||e,this[i(419)]=n,new Promise(r=>{const o=i;this[o(414)][o(442)]({query:e,context:t,onData:e=>{const t=o;this[t(397)]=e,this[t(430)]=this[t(453)](this[t(397)])},actionId:n})[o(415)](()=>{const e=o;!this[e(430)]&&this[e(397)]&&(this[e(430)]=this[e(453)](this[e(397)],!0))})[o(440)](e=>{const t=o;e instanceof b?this[t(471)][t(480)](e[t(436)]):this[t(471)][t(480)](),r()})[o(413)](()=>{this[o(424)](),r()})})}[x(453)](e,t=!1){const n=x,r=C[n(423)](e);e=r?e[n(435)](r[1][n(403)]):e[n(403)]<100&&!t?"":this[n(404)](e);const i=this[n(437)][n(410)](e,n(479));if(r){const e=Array[n(394)](i[n(481)][n(396)]);e[n(398)]();for(const t of e){if(t[n(409)]==Node[n(483)])break;t[n(412)]()}}const o=this[n(422)][n(474)][n(431)][n(488)](this[n(458)][n(392)](i[n(481)]));this[n(468)]()||this[n(461)](o);const s=this[n(422)][n(444)][n(418)](n(443)),a=this[n(422)][n(474)][n(406)](o);return s||a[n(459)][n(465)](),this[n(422)][n(474)][n(449)](a)}[x(461)](e){const t=x,n=new c.ViewUpcastWriter(this[t(422)][t(425)][t(471)][t(476)]),r=new c.Matcher({name:/^h[1-5]$/}),i=[];let o=!1;for(const n of e)n.is(t(428))&&r[t(482)](n)&&(i[t(455)](n),"h1"==n[t(434)]&&(o=!0));if(o)for(const e of i)n[t(477)]("h"+(parseInt(e[t(434)][1])+1),e)}[x(468)](){const e=x,{data:t,editing:n}=this[e(422)],r=t[e(466)][e(488)](e(441)),i=t[e(488)](t[e(406)](r));return!!n[e(471)][e(402)][e(467)](i)[e(456)]("h1")}[x(484)](e){const t=x;return this[t(422)][t(425)][t(471)][t(402)][t(417)](this[t(460)],e),this[t(460)][t(448)]}[x(404)](e){const t=x,n=e[t(400)]();return n[t(446)](t(411))?n[t(450)](t(469))?n[t(435)](7,n[t(403)]-3):n[t(435)](7):e}}const T=M;function M(e,t){const n=O();return(M=function(e,t){return n[e-=155]})(e,t)}function O(){const e=["toUpperCase","REPLACE","items","ck-hidden","5492675KERiSU","81IcNAuO","ck-ai-form__toolbar","948818pDVNPn","replaceButton","bindTemplate","Try again","1364jtnCKz","6NImQgZ","tryAgainButton","_CONTENT","set","replace","bind","extendTemplate","mainAction","3624hJPXwP","locale","ck-button-action","_createButton","Insert below","3068303ejEEAA","13791904fVCEEJ","label","Stop","insert","isVisible","stopButton","2DrnKzZ","1185130QlBXNb","AI_","insertButton","8824695xmJAZL","addMany"];return(O=function(){return e})()}!function(e){const t=M,n=e();for(;;)try{if(909250===-parseInt(t(182))/1*(-parseInt(t(157))/2)+parseInt(t(170))/3*(parseInt(t(161))/4)+parseInt(t(192))/5+-parseInt(t(162))/6*(-parseInt(t(175))/7)+-parseInt(t(176))/8+parseInt(t(155))/9*(-parseInt(t(183))/10)+parseInt(t(186))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(O);const L={REPLACE:T(166),INSERT:T(179)};class $ extends o.ToolbarView{constructor(e){const t=T;super(e),this[t(165)](t(180),!1),this[t(165)](t(169),L[t(189)]),this[t(158)]=this[t(173)]("",t(172)),this[t(158)][t(167)](t(177)).to(this,t(169),n=>v(e,t(184)+n[t(188)]()+t(164))),this[t(185)]=this[t(173)](v(e,t(174))),this[t(163)]=this[t(173)](v(e,t(160))),this[t(181)]=this[t(173)](v(e,t(178)));const n=this[t(159)];this[t(168)]({attributes:{class:[t(156),n.if(t(180),t(191),e=>!e)]}}),this[t(190)][t(187)]([this[t(158)],this[t(185)],this[t(163)],this[t(181)]])}[T(173)](e,t){const n=T,r=new o.ButtonView(this[n(171)]);return r[n(165)]({label:e,class:t||"",isVisible:!0,withText:!0}),r}}const N=U;function D(){const e=["2565704XMepXH","text/plain","lastElementChild"," ck-ai-form__copy-button--copied","clipboard","ck-ai-form__content-area-wrapper","remove","isVisible","<span>[</span>","22338569VkfNGG","icon","ck-ai-form__content-area","querySelector","ck-hidden","element","bind","116GPqsMd","loaderView","18711kyiFTW","removeAllRanges",".ck-ai-form__loader","ClipboardItem","left","addRange","isProcessing","203arEjxW","scrollHeight","-9999px","copy","mousedown","text/html","absolute","execute","Copy","render","isEnabled","setStartAfter","createElement","body","_createCopyButton","ck-ai-form__loader","ck-content","value","setContent","bindTemplate","182870ejlAaH","ck-ai-form__content-area--processing","ck-ai-form__copy-button-wrapper","contentFieldView","setEndBefore","setTemplate","2787288VmxnWI","_copyHTMLToClipboard","locale","13CVydTM","class","ck-ai-form__content-field","innerHTML","<span>]</span>","execCommand","createRange","getSelection","change:value","style","ck-reset_all-excluded","AI is writing...","6330LERWbL","smooth","textContent","div","appendChild","89785FNDPOp","copyButtonView","set","wheel","position","firstElementChild","change:isProcessing","scrollTo","write","ck-ai-form__copy-button","_createLoader","appendLoader","listenTo","focus","79416LKGhCH"];return(D=function(){return e})()}function U(e,t){const n=D();return(U=function(e,t){return n[e-=442]})(e,t)}!function(e){const t=U,n=e();for(;;)try{if(771413===parseInt(t(452))/1*(-parseInt(t(443))/2)+-parseInt(t(449))/3+-parseInt(t(500))/4*(parseInt(t(469))/5)+-parseInt(t(483))/6*(-parseInt(t(509))/7)+-parseInt(t(484))/8+-parseInt(t(502))/9*(-parseInt(t(464))/10)+parseInt(t(493))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(D);class F extends o.View{[N(446)];[N(470)];constructor(e,t=""){const n=N;super(e),this[n(471)]({value:null,isVisible:!1,isProcessing:!1});const r=this[n(442)];this[n(446)]=new B(e,t),this[n(470)]=this[n(523)](),this[n(448)]({tag:n(467),attributes:{class:["ck",n(489),r.if(n(491),n(497),e=>!e)],tabindex:"-1"},children:[{tag:n(467),attributes:{class:["ck",n(495),r.if(n(508),n(444))]},children:[this[n(446)],{tag:n(467),attributes:{class:["ck",n(445)]},children:[this[n(470)]]}]}]})}[N(518)](){const e=N;super[e(518)](),this[e(526)]&&this[e(446)][e(527)](this[e(526)]);let t=!1;this.on(e(460),(n,r,i)=>{const o=e,s=!this[o(446)][o(498)][o(496)](o(504));this[o(446)][o(527)](i),this[o(508)]&&s&&!t&&this[o(498)][o(476)]({top:this[o(498)][o(510)],behavior:o(465)})}),this.on(e(475),(n,r,i)=>{const o=e;t=!1,i?(this[o(526)]=null,this[o(446)][o(480)]()):this[o(526)]||this[o(446)][o(527)]("")}),this[e(481)](this[e(498)],e(472),()=>{t=!0}),this[e(481)](this[e(498)],e(513),()=>{t=!0})}[N(482)](){const e=N;this[e(498)][e(482)]()}[N(523)](){const e=N,n=this[e(451)],r=new o.ButtonView(this[e(451)]),i=e(478);return r[e(471)]({label:v(n,e(517)),icon:t.IconCopy,class:i,tooltip:!0}),r[e(499)](e(491)).to(this,e(526),e=>!!e),r[e(499)](e(519)).to(this,e(508),e=>!e),r.on(e(516),()=>{const n=e;this[n(450)](this[n(446)][n(498)]),r[n(494)]=t.IconCheck,r[n(453)]=i+n(487),this[n(482)](),setTimeout(()=>{const e=n;r[e(494)]=t.IconCopy,r[e(453)]=i},1e3)}),r}[N(450)](e){const t=N,{window:n,document:r}=i.global;if(n[t(505)]){const{Blob:r,ClipboardItem:i}=n,o=[new i({"text/html":new r([e[t(455)]],{type:t(514)}),"text/plain":new r([e[t(466)]||""],{type:t(485)})})];navigator[t(488)][t(477)](o)}else{const i=r[t(521)](t(467));i[t(461)][t(473)]=t(515),i[t(461)][t(506)]=t(511),i[t(455)]=t(492)+e[t(455)]+t(456),r[t(522)][t(468)](i);const o=r[t(458)]();o[t(520)](i[t(474)]),o[t(447)](i[t(486)]);const s=n[t(459)]();s[t(503)](),s[t(507)](o),r[t(457)](t(512)),i[t(490)]()}}}class B extends o.View{constructor(e,t=""){const n=N;super(e),this[n(501)]=this[n(479)](),this[n(448)]({tag:n(467),attributes:{class:["ck",n(525),t,n(462),n(454)]}})}[N(527)](e){const t=N;this[t(498)][t(455)]=e}[N(480)](){const e=N;this[e(498)][e(468)](this[e(501)][e(498)])}[N(479)](){const e=N,t=new o.View,n=this[e(451)],r=new o.SpinnerView;return r[e(491)]=!0,t[e(448)]({tag:e(467),attributes:{class:["ck",e(524)]},children:[r,{text:v(n,e(463))}]}),t[e(518)](),t}}function j(e,t){const n=q();return(j=function(e,t){return n[e-=462]})(e,t)}function q(){const e=["bindTemplate","71220HwcNvT","7gYlOGY","2334764KCQqPc","6716370awuxHu","10103286kUNxWo","144Fbdmtc","div","set","1521421AcuSLU","setTemplate","2460069XSzJNY","10djlnSp","ck-ai-form__error","text","content","5850712MSgNUN"];return(q=function(){return e})()}!function(e){const t=j,n=e();for(;;)try{if(917997===-parseInt(t(462))/1+-parseInt(t(476))/2*(-parseInt(t(471))/3)+parseInt(t(473))/4*(-parseInt(t(465))/5)+parseInt(t(475))/6*(parseInt(t(472))/7)+-parseInt(t(469))/8+parseInt(t(464))/9+parseInt(t(474))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(q);class H extends o.View{constructor(e,n=""){const r=j;super(e);const i=new o.IconView,s=this[r(470)];this[r(478)](r(467),n),i[r(468)]=t.IconError,this[r(463)]({tag:r(477),attributes:{class:["ck",r(466)]},children:[i,{text:s.to(r(467))}]})}}function z(){const e=["window","maxRows","isEnabled","minRows","2148IxEVFe","9vREhfu","fieldView","_createSubmitButton","element","13196dPsOcr","20RwfYNT","rtl","bind","queryView","keystrokes","History","requestAnimationFrame","render","showHistoryButtonView","2193aQspMJ","isVisible","children","update","right","329315NJxbTP","value","focusFirst","ck-ai-form__submit","focus","submit","950XkprCy","ck-ai-form__toggle-history","isOn","target","focusLast","isEmpty","focusCycler","focusableChildren","excludeScrollbarsAndBorders","60VDxuTk","left","fieldWrapperChildren","add","Submit","128713RKPinw","execute","style","resultsView","fire","620933zNTQoL","locale","1822zZJSQV","width","filteredView","uiLanguageDirection","1685596SDeBfz","_createShowHistoryButton","set","submitButtonView","4636024qVMWio","enter"];return(z=function(){return e})()}const V=G;function G(e,t){const n=z();return(G=function(e,t){return n[e-=493]})(e,t)}!function(e){const t=G,n=e();for(;;)try{if(338824===parseInt(t(531))/1+-parseInt(t(533))/2*(-parseInt(t(501))/3)+parseInt(t(552))/4*(parseInt(t(512))/5)+-parseInt(t(521))/6*(-parseInt(t(506))/7)+-parseInt(t(541))/8*(parseInt(t(548))/9)+parseInt(t(553))/10*(parseInt(t(537))/11)+-parseInt(t(547))/12*(parseInt(t(526))/13))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(z);class W extends o.AutocompleteView{[V(540)];[V(500)];constructor(e,t){const n=V;super(e,t),this[n(495)][n(549)][n(546)]=1,this[n(495)][n(549)][n(544)]=3,this[n(540)]=this[n(550)](),this[n(500)]=this[n(538)](),this[n(519)][n(524)](this[n(500)],1),this[n(519)][n(524)](this[n(540)])}[V(499)](){const e=V;super[e(499)](),this[e(495)][e(523)][e(524)](this[e(500)]),this[e(503)][e(524)](this[e(540)]),this[e(496)][e(539)](e(542),(t,n)=>{const r=e;t[r(515)]==this[r(495)][r(549)][r(551)]&&(this[r(511)](),n())})}[V(550)](){const e=V,n=new o.ButtonView(this[e(532)]),r=this[e(532)];return n[e(539)]({icon:t.IconSubmit,label:v(r,e(525)),isVisible:!0,tooltip:!0,class:e(509)}),n.on(e(527),()=>{this[e(511)]()}),n[e(494)](e(545)).to(this[e(495)][e(549)],e(517),this,e(545),(e,t)=>!e&&t),n}[V(538)](){const e=V,n=new o.ButtonView(this[e(532)]),r=this[e(529)],s=this[e(532)];n[e(539)]({label:v(s,e(497)),withText:!1,icon:t.IconHistory,tooltip:!0,tooltipPosition:"sw",class:e(513)}),n[e(494)](e(514)).to(r,e(502)),n[e(494)](e(545)).to(this,e(545)),n.on(e(527),()=>{const t=e;r[t(502)]=!r[t(502)],r[t(502)]?this[t(535)][t(510)]():this[t(510)]()});const a=()=>{const t=e;i.global[t(543)][t(498)](()=>{const e=t;if((0,i.isVisible)(this[e(551)])){const t=new i.Rect(this[e(495)][e(549)][e(551)]),r=t[e(534)],o=e(493)===s[e(536)]?e(522):e(505);t[e(520)](),n[e(551)][e(528)][o]=r-t[e(534)]+1+"px"}})};return this[e(495)][e(549)].on(e(504),a),this.on(e(499),a),n}[V(511)](){const e=V,t=this[e(495)][e(549)][e(551)][e(507)];this[e(530)](e(511),t)}[V(510)](e){const t=V;-1===e?this[t(518)][t(516)]():this[t(518)][t(508)]()}}const K=Y;function Y(e,t){const n=J();return(Y=function(e,t){return n[e-=470]})(e,t)}function J(){const e=["historyGroupView","Prompt history","6597ZZUPEd","_createClearHistoryButton","803505RagxTu","items","2850300gKqOsa","set","2152822MFquzf","Clear","filter","380JDHltH","children","471903qPZzvt","13182768zJhdWk","clearHistory","57880RfacCh","fire","add","18vgByxF","delegate","7828DleACX","clearHistoryButton","locale","execute","label","length"];return(J=function(){return e})()}!function(e){const t=Y,n=e();for(;;)try{if(982708===-parseInt(t(494))/1+-parseInt(t(496))/2+-parseInt(t(476))/3+parseInt(t(484))/4*(-parseInt(t(474))/5)+-parseInt(t(482))/6*(-parseInt(t(471))/7)+-parseInt(t(477))/8+parseInt(t(492))/9*(parseInt(t(479))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(J);class Q extends o.ListView{[K(490)];[K(485)];constructor(e){const t=K;super(e),this[t(485)]=this[t(493)](),this[t(490)]=new o.ListItemGroupView,this[t(490)][t(475)][t(481)](this[t(485)],1),this[t(490)][t(488)]=v(e,t(491)),this[t(490)][t(495)][t(483)](t(487)).to(this),this[t(495)][t(481)](this[t(490)])}[K(473)](){const e=K;let t=0;for(const n of this[e(495)])t+=n[e(495)][e(489)];return{resultsCount:t,totalItemsCount:t}}[K(493)](){const e=K,t=this[e(486)],n=new o.ButtonView(this[e(486)]);return n[e(470)]({label:"("+v(t,e(472))+")",withText:!0}),n.on(e(487),()=>this[e(480)](e(478))),n}}const Z={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"};function X(e){if(null==e)return"";if("string"==typeof e)return e;if(Array.isArray(e))return e.map(X).join(",");const t=String(e);return"0"===t&&Object.is(Number(e),-0)?"-0":t}function ee(e){return function(e){return e.replace(/&(?:amp|lt|gt|quot|#(0+)?39);/g,e=>Z[e]||"'")}(X(e))}function te(e,t){const n=ne();return(te=function(e,t){return n[e-=494]})(e,t)}function ne(){const e=["add","8kVqhEd","2290tlkSjC","3827082STYVXS","fire","29684655riAyXI","26052hJMZik","prompt","443995hpaGDc","locale","children","set","36sbzSRi","2GqcnEC","7784466GGFlfW","37458OnlEZW","1828869haFIhT","execute"];return(ne=function(){return e})()}!function(e){const t=te,n=e();for(;;)try{if(680714===-parseInt(t(501))/1+-parseInt(t(508))/2*(parseInt(t(498))/3)+-parseInt(t(507))/4*(parseInt(t(503))/5)+parseInt(t(509))/6+parseInt(t(511))/7*(-parseInt(t(496))/8)+-parseInt(t(510))/9*(parseInt(t(497))/10)+parseInt(t(500))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ne);class re extends o.ListItemView{constructor(e){const t=te;super();const n=new o.ButtonLabelView,r=new o.ButtonView(this[t(504)],n);this[t(505)][t(495)](r),r[t(506)]({label:e[t(502)],withText:!0}),r.on(t(494),()=>{const n=t;this[n(499)](n(494),{value:ee(e[n(502)])})})}}const ie=oe;function oe(e,t){const n=ce();return(oe=function(e,t){return n[e-=308]})(e,t)}!function(e){const t=oe,n=e();for(;;)try{if(163917===-parseInt(t(327))/1*(-parseInt(t(331))/2)+parseInt(t(329))/3+parseInt(t(313))/4*(-parseInt(t(315))/5)+-parseInt(t(318))/6+parseInt(t(324))/7+-parseInt(t(320))/8*(-parseInt(t(308))/9)+-parseInt(t(311))/10*(-parseInt(t(309))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ce);const se=ie(316);class ae extends i.Collection{constructor(){const e=ie;super(),this[e(333)](),this.on(e(332),(t,n)=>{const r=e,i=ue(n[r(328)]);for(const e of this)if(e!=n&&ue(e[r(328)])===i){this[r(322)](e);break}this[r(321)]>20&&this[r(322)](this[r(317)]),this[r(334)]()}),this.on(e(322),()=>{this[e(334)]()})}[ie(333)](){const e=ie,t=sessionStorage[e(312)](se)||"[]";this[e(319)](JSON[e(330)](t))}[ie(334)](){const e=ie;sessionStorage[e(325)](se,JSON[e(314)](this[e(310)](e=>e)))}}function ce(){const e=["955968ewGNsR","parse","104DRqUqJ","add","_loadFromSessionStorage","_saveToSessionStorage","11205ISacyp","257939kgnQbr","map","20yYAKOL","getItem","929468TpMTAq","stringify","5MlTKey","CKEditor/AIFormView/PromptHistory","last","1320516SzMzGc","addMany","16bOwbKr","length","remove","trim","444626rcDJvU","setItem","toLowerCase","3554MJEBSQ","prompt"];return(ce=function(){return e})()}function ue(e){const t=ie;return e[t(326)]()[t(323)]()}const de={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function le(e){return X(e).replace(/[&<>"']/g,e=>de[e])}const he=pe;function fe(){const e=["insertButton","focusTracker","4332525DECxgd","isProcessing","prompt","bindTo","items","div","locale","startProcessing","AI_ERROR_FAILED","ck-ai-form-content","38643KflfEu","finishProcessing","label","focusFirst","13666626AoaCyb","listenTo","high","add","tryAgainEvent","373460OSpmpC","stopButton","5226872MDYicM","clearHistory","focus","_promptHistory","submitPrompt","keystrokes","replaceButton","execute","_createToolbar","_focusables","553221BuLMtl","9200946clxTJZ","_createPromptView","search","shift + tab","toolbar","render","chain","setTemplate","tryAgainButton","_createHistoryView","value","7pcADnf","element","handleError","historyGroupView","text","Empty history","copyButtonView","createCollection","isEnabled","mainAction","tab","replaceContent","queryView","delegate","isVisible","focusCycler","20YXCYLP","bind","clear","errorView","Ask AI to improve generated text","fire","stopProcessing","ck-ai-form","focusLast","reset","trim","promptView","ck-hidden","contentArea","submit","isError","fieldView","REPLACE","set","Ask AI to edit or generate","Ask AI and your prompts will be listed here for you to use later.","insertContentBelow","4HCTPcK","bindTemplate"];return(fe=function(){return e})()}function pe(e,t){const n=fe();return(pe=function(e,t){return n[e-=370]})(e,t)}!function(e){const t=pe,n=e();for(;;)try{if(880611===-parseInt(t(449))/1+-parseInt(t(373))/2+-parseInt(t(385))/3*(parseInt(t(435))/4)+-parseInt(t(439))/5+parseInt(t(386))/6*(-parseInt(t(397))/7)+parseInt(t(375))/8+parseInt(t(453))/9*(parseInt(t(413))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(fe);class me extends o.View{[he(438)];[he(380)];[he(426)];[he(390)];[he(424)];[he(416)];[he(384)];[he(412)];[he(378)];constructor(e,t,n=""){const r=he;super(e),this[r(431)](r(405),!0),this[r(431)](r(440),!1),this[r(431)](r(441),""),this[r(431)](r(396),""),this[r(431)](r(428),!1),this[r(431)](r(406),L[r(430)]),this[r(378)]=new ae,this[r(416)]=new H(e),this[r(426)]=new F(e,n),this[r(426)][r(414)](r(440)).to(this),this[r(426)][r(414)](r(396)).to(this),this[r(390)]=this[r(383)](),this[r(390)][r(414)](r(406)).to(this),this[r(424)]=this[r(387)](),this[r(438)]=new i.FocusTracker,this[r(380)]=new i.KeystrokeHandler,this[r(384)]=this[r(404)]([this[r(426)],this[r(426)][r(403)],this[r(390)],this[r(424)]]),this[r(412)]=new o.FocusCycler({focusables:this[r(384)],focusTracker:this[r(438)],keystrokeHandler:this[r(380)],actions:{focusPrevious:r(389),focusNext:r(407)}}),this[r(412)][r(392)](this[r(424)][r(412)]),this[r(424)][r(409)][r(429)][r(414)](r(396)).to(this,r(441));const s=this[r(436)];this[r(393)]({tag:r(444),attributes:{class:["ck",r(420),t],tabindex:"-1"},children:[{tag:r(444),attributes:{class:["ck",r(448)]},children:[{tag:r(444),attributes:{class:[s.if(r(428),r(425),e=>!e)]},children:[this[r(416)]]},this[r(426)],this[r(390)],this[r(424)]]}]})}[he(391)](){const e=he;super[e(391)](),this[e(438)][e(371)](this[e(426)][e(398)]),this[e(438)][e(371)](this[e(426)][e(403)][e(398)]),this[e(438)][e(371)](this[e(390)][e(398)]),this[e(438)][e(371)](this[e(424)][e(398)]),this[e(380)][e(454)](this[e(398)])}[he(377)](e=1){const t=he;-1===e?this[t(412)][t(421)]():this[t(412)][t(452)]()}[he(422)](){const e=he;this[e(441)]="",this[e(396)]="",this[e(428)]=!1,this[e(424)][e(422)](),this[e(426)][e(411)]=!1,this[e(390)][e(411)]=!1}[he(387)](){const e=he,t=this[e(445)],n=new W(t,{queryView:{label:v(t,e(432)),creator:o.createLabeledTextarea,showIcon:!1,showResetButton:!1},infoView:{text:{noSearchableItems:{primary:v(t,e(402)),secondary:v(t,e(433))}}},filteredView:this[e(395)](),queryMinChars:1/0,resetOnBlur:!1});return n[e(414)](e(405)).to(this,e(405),this,e(440),(e,t)=>e&&!t),this[e(454)](n,e(427),(t,n)=>{const r=e;this[r(441)]=n;const i=le(n);this[r(418)](r(379),i),n[r(423)]()&&this[r(378)][r(371)]({prompt:i},0)},{priority:e(370)}),n}[he(395)](){const e=he,t=new Q(this[e(445)]);return t[e(400)][e(443)][e(442)](this[e(378)]).as(re),t.on(e(376),()=>{const t=e;this[t(378)][t(415)](),this[t(424)][t(388)](""),this[t(424)][t(377)]()}),t}[he(383)](){const e=he,t=new $(this[e(445)]);return t[e(381)][e(414)](e(405)).to(this,e(405),this,e(440),this,e(396),(e,t,n)=>e&&!t&&!!n),t[e(381)][e(410)](e(382)).to(this,e(408)),t[e(437)][e(414)](e(405)).to(this,e(405),this,e(440),this,e(396),(e,t,n)=>e&&!t&&!!n),t[e(437)][e(410)](e(382)).to(this,e(434)),t[e(394)][e(414)](e(405)).to(this,e(405),this,e(440),(e,t)=>e&&!t),t[e(394)][e(410)](e(382)).to(this,e(372)),t[e(374)][e(414)](e(405)).to(this,e(440)),t[e(374)][e(410)](e(382)).to(this,e(419)),t}[he(446)](){const e=he;this[e(396)]="",this[e(428)]=!1,this[e(440)]=!0,this[e(426)][e(411)]=!0,this[e(390)][e(411)]=!0,this[e(426)][e(377)]()}[he(450)](){const e=he,t=this[e(445)];this[e(440)]=!1,this[e(441)]="",this[e(424)][e(422)](),this[e(396)]&&(this[e(424)][e(409)][e(451)]=v(t,e(417)))}[he(399)](e){const t=he,n=this[t(445)];this[t(450)](),this[t(428)]=!0,this[t(416)][t(401)]=e||v(n,t(447)),this[t(396)]||(this[t(426)][t(411)]=!1)}}var ge=n(673),ye=n.n(ge),we=n(545),be=n.n(we),ve=n(262),ke=n.n(ve),Se=n(667),Ee=n.n(Se),Ae=n(357),Ie=n.n(Ae),xe=n(379),_e={attributes:{"data-cke":!0}};_e.setAttributes=Ee(),_e.insert=ke().bind(null,"head"),_e.domAPI=be(),_e.insertStyleElement=Ie();ye()(xe.A,_e);xe.A&&xe.A.locals&&xe.A.locals;var Re=n(181),Ce={attributes:{"data-cke":!0}};Ce.setAttributes=Ee(),Ce.insert=ke().bind(null,"head"),Ce.domAPI=be(),Ce.insertStyleElement=Ie();ye()(Re.A,Ce);Re.A&&Re.A.locals&&Re.A.locals;var Pe=n(676),Te={attributes:{"data-cke":!0}};Te.setAttributes=Ee(),Te.insert=ke().bind(null,"head"),Te.domAPI=be(),Te.insertStyleElement=Ie();ye()(Pe.A,Te);Pe.A&&Pe.A.locals&&Pe.A.locals;const Me=Le;function Oe(){const e=["AIAssistant","text","wasMoved","copy","currentContext","order","show","addMany","EDITOR_TOP_SIDE","document","update","_onExecute","4826190JOyQcH","errorView","text/html","menuitemcheckbox","aiLicenseKeyExpired","usageLimit","featureNotAllowed","reset","_licenseKeyCheckInterval","isOn","push","media","editor","showAIAssistant","getData","804728YZxPeu","replaceContent","componentFactory","fieldView","2324292OTEjzo","add","forEach","set","from","getSelectedBlocks","menuBar:aiCommands","command:","execute","values","tableOfContents","items","<p>","model","_getResolvedCommandsDefinitions","_showLicenseError","editing","aiLicenseKeyTrialLimit","aiLicenseKeyUsageLimit","requires","bind","aiCommands","AI Assistant","DataTransfer","ai-commands-config-order-collision","hideFakeVisualSelection","_aiAdapter","aiLicenseKeyEvaluationLimit","getLimitElement","isPremiumPlugin","custom","_uiCssClasses","Generated content: %0","groupLabel","commands","hideUI","_commandDefinitions","</p>","_getMenuBarGroupButtons","207565yOSKjd","schema","ck-ai-assistant-ui","getRanges","menuBar:aiAssistant","promptView","menuView","ai.aiAssistant.commands","render","invalid","hide","isFlat","change","requiresContent","once","comment","source","sort","1036886mMWjgX","destroy","updatePosition","view","plugins","change:enabledCommandsIds","ai.useTheme","listenTo","8Fuckel","isOfficialPlugin","buttons","_createAIAssistantUIButton","showUI","Error during AI content generation: %0","textAdapter","updateView","contentArea","queryView","licenseKey","AIAssistantUI","children","polite","includes","init","rawHtml","prompt","enabledCommandsIds","REPLACE","insertContentBelow","_aiAssistantController","2167431EDaIPt","buttonView","_forceMarkersCopy","define","_dialog","evaluationLimit","domainLimit","focus","aiLicenseKeyNotAllowed","change:value"," ck-ai-assistant-ui_theme","INSERT","config","map","expired","insertContent","aiLicenseKeyDomainLimit","splice","setSelection","change:isError","ai.aiAssistant.disabledElements","filter","isCollapsed","replace","menuPanelClass","_formView","locale","body","AI Commands","pluginName","isEnabled","get","_populateMenuBarMenu","groupId","delegate","_initView","8661898APqAUh","AI is writing","ck-ai-commands-dropdown ","trim","ai.aiAssistant.contentAreaCssClass","showFakeVisualSelection","_initAriaAiStatusChangeAnnouncements","aiLicenseKeyValid","change:isProcessing","fire","label","aiLicenseKeyInvalid","length","ck-ai-assistant-button ","announce","selection","panelView","trialLimit","aiAssistant","getSelectedElement"];return(Oe=function(){return e})()}function Le(e,t){const n=Oe();return(Le=function(e,t){return n[e-=132]})(e,t)}!function(e){const t=Le,n=e();for(;;)try{if(410431===-parseInt(t(199))/1+parseInt(t(260))/2+-parseInt(t(290))/3+-parseInt(t(203))/4+-parseInt(t(242))/5+parseInt(t(184))/6+parseInt(t(152))/7*(parseInt(t(268))/8))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Oe);const $e=globalThis[Me(226)];class Ne extends e.Plugin{[Me(278)];[Me(192)];[Me(294)];[Me(141)];[Me(229)];[Me(289)];[Me(234)]="";static get[Me(145)](){return Me(279)}static get[Me(269)](){return!0}static get[Me(232)](){return!0}static get[Me(222)](){return[a.ClipboardMarkersUtils,p,w,o.Dialog]}constructor(e){const t=Me;super(e),e[t(302)][t(293)](t(136),[t(195),t(284),t(213)]),e[t(302)][t(293)](t(156),""),e[t(302)][t(293)](t(266),!0),this[t(234)]=t(244)+(e[t(302)][t(147)](t(266))?t(300):"")}[Me(283)](){const e=Me,{editor:n}=this;this[e(229)]=n[e(264)][e(147)](w),this[e(294)]=n[e(264)][e(147)](o.Dialog),this[e(141)]=null,this[e(239)]=this[e(217)]();const r=new E(n,Array[e(207)](this[e(239)][e(212)]()));n[e(237)][e(204)](e(197),r),n.ui[e(201)][e(204)](e(224),i=>{const a=e,c=(0,o.createDropdown)(i);return c[a(206)]({class:a(154)+this[a(234)]}),c[a(291)][a(206)]({label:v(i,a(144)),icon:t.IconMagicWand,tooltip:!0}),c.on(a(211),e=>this[a(183)](e[a(258)].id)),(0,o.addMenuToDropdown)(c,n.ui[a(263)][a(143)],function(e){const t=a,n=s(e[t(302)][t(147)](t(249)),e[t(142)]),r=Ue(e,n)[t(137)](e=>e[t(237)][t(164)]);return 1===r[t(164)]?Ue(e,r[0][t(237)])[t(303)](e=>({id:e.id,label:e[t(162)]})):r[t(303)](n=>{const r=t,{groupId:i,groupLabel:o,commands:s}=n;return{id:i,menu:o||i,children:Ue(e,s)[r(303)](e=>({id:e.id,label:e[r(162)]}))}})}(n),{ariaLabel:v(i,a(144))}),c[a(248)][a(140)]=a(154)+this[a(234)],r.on(a(265),u),c[a(248)][a(256)](a(250),u),c;function u(){const e=a;c[e(146)]=r[e(286)][e(164)]>0;for(const t of c[e(248)][e(270)])t[e(146)]=r[e(286)][e(282)](t.id)}}),n.ui[e(201)][e(204)](e(209),i=>{const a=e,c=new o.MenuBarMenuView(i);c[a(291)][a(206)]({label:v(i,a(144)),icon:t.IconMagicWand}),c[a(223)](a(146)).to(r,a(286),e=>e[a(164)]>0);const u=s(n[a(302)][a(147)](a(249)),i);return this[a(148)](r,c,u,e=>this[a(183)](e)),c}),n.ui[e(201)][e(204)](e(170),()=>{const t=e,n=this[t(271)](o.ButtonView);return n[t(206)]({tooltip:!0,class:t(165)+this[t(234)]}),n}),n.ui[e(201)][e(204)](e(246),()=>{const t=e,n=this[t(271)](o.MenuBarMenuListItemButtonView);return n[t(206)]({role:t(187)}),n}),this[e(278)]=this[e(196)][e(302)][e(147)](e(278));const i=this[e(196)];this[e(192)]=setInterval(()=>{const t=e;let n;for(const e in i){const r=e,o=i[r];if(t(159)==o||t(163)==o||t(188)==o||t(132)==o||t(298)==o||t(230)==o||t(220)==o||t(221)==o){delete i[r],n=o,clearInterval(this[t(192)]),this[t(192)]=void 0;break}}t(163)==n&&i[t(218)](t(251)),t(188)==n&&i[t(218)](t(304)),t(132)==n&&i[t(218)](t(296)),t(298)==n&&i[t(218)](t(190),t(172)),t(230)==n&&i[t(218)](t(295)),t(220)==n&&i[t(218)](t(169)),t(221)==n&&i[t(218)](t(189))},1e3)}[Me(261)](){const e=Me;super[e(261)](),this[e(192)]&&clearInterval(this[e(192)])}[Me(272)](e="",n="",r=Me(233)){const i=Me,s=this[i(196)],u=s[i(219)][i(263)],d=s[i(264)][i(147)](p),l=s[i(264)][i(147)](a.ClipboardMarkersUtils);d[i(157)]();const h=new $e,f=new ClipboardEvent(i(175),{clipboardData:h}),m=new c.ViewDataTransfer(h),g=new c.ViewDocumentDomEventData(u,f,{dataTransfer:m});l[i(292)](i(257),()=>{const e=i;u[e(181)][e(161)](e(175),g)}),this[i(141)]||(this[i(151)](),this[i(289)]=new P(s,this[i(229)][i(274)],this[i(141)]));let y=m[i(198)](i(186));const w=s[i(216)][i(181)][i(167)],b=Array[i(207)](w[i(245)]());1===b[i(164)]&&b[0][i(253)]&&!w[i(171)]()&&""!==y[i(139)](/&nbsp;/g,"")[i(155)]()&&(y=i(215)+y+i(240)),this[i(289)][i(275)]({actionId:r,query:e,htmlContent:y,label:n,mainActionLabel:L[s[i(216)][i(181)][i(167)][i(138)]?i(301):i(287)]}),i(170)!==this[i(294)].id?this[i(294)][i(178)]({id:i(170),icon:t.IconRobotPencil,title:v(this[i(196)][i(142)],i(225)),content:this[i(141)],position:o.DialogViewPosition[i(180)],onShow:()=>{const e=i;this[e(141)][e(297)]()},onHide:()=>{const e=i;this[e(289)][e(191)](),d[e(228)]()}}):this[i(294)][i(263)][i(174)]||this[i(294)][i(263)][i(262)]()}[Me(238)](){const e=Me;this[e(294)][e(252)]()}[Me(217)](){const e=Me,t=new Map,n=s(this[e(196)][e(302)][e(147)](e(249)),this[e(196)][e(142)]);for(const r of n)for(const n of r[e(237)])t[e(206)](n.id,{...n,groupId:r[e(149)],groupLabel:r[e(236)]||r[e(149)]});return t}[Me(271)](e){const n=Me,r=this[n(196)],i=r[n(237)][n(147)](n(197)),o=new e(r[n(142)]);return o[n(206)]({label:v(r[n(142)],n(225)),icon:t.IconRobotPencil,isToggleable:!0}),o[n(223)](n(146)).to(i),o[n(223)](n(193)).to(this[n(294)],"id",e=>n(170)===e),this[n(267)](o,n(211),()=>{const e=n;o[e(193)]?this[e(238)]():i[e(211)]()}),o}[Me(151)](){const e=Me,t=this[e(196)][e(264)][e(147)](p);this[e(141)]=new me(this[e(196)][e(142)],this[e(234)],this[e(196)][e(302)][e(147)](e(156))),this[e(141)].on(e(299),()=>{const t=e;this[t(294)][t(263)][t(174)]||this[t(294)][t(263)][t(262)]()}),this[e(141)][e(247)][e(277)][e(202)].on(e(182),()=>{const t=e;this[t(294)][t(263)][t(174)]||this[t(294)][t(263)][t(262)]()}),this[e(267)](this[e(141)],e(200),()=>{const n=e;t[n(305)](this[n(289)][n(176)]),this[n(238)]()}),this[e(267)](this[e(141)],e(288),()=>{const n=e;t[n(288)](this[n(289)][n(176)]),this[n(238)]()}),this[e(158)]()}[Me(158)](){const e=Me,{locale:t,ui:{ariaLiveAnnouncer:n}}=this[e(196)];this[e(141)][e(276)].on(e(160),(r,i,o)=>{const s=e,a=this[s(289)][s(176)];o?n[s(166)](v(t,s(153))):a&&n[s(166)](v(t,s(235),a),{politeness:s(281),isUnsafeHTML:!0})}),this[e(141)].on(e(135),(r,i,o)=>{const s=e;if(o){const e=this[s(141)][s(185)][s(173)];n[s(166)](v(t,s(273),e))}})}[Me(183)](e){const t=Me,n=this[t(239)][t(147)](e),r=this[t(196)],o=r[t(216)][t(181)][t(167)],s=r[t(237)][t(147)](t(197)),a=r[t(264)][t(147)](p),c=("_ungrouppedCommands"!==n[t(149)]?n[t(236)]+": ":"")+n[t(162)];if(!1!==n[t(255)]&&o[t(138)]){const e=(0,i.first)(o[t(208)]())||r[t(216)][t(243)][t(231)](o);r[t(216)][t(254)](n=>{n[t(134)](e,"in")})}a[t(157)](),s[t(211)](n[t(285)],c,t(210)+e)}[Me(148)](e,t,n,r){const i=Me,s=this[i(196)],a=s[i(142)],c=new o.MenuBarMenuListView(a),u=Ue(s,n)[i(137)](e=>e[i(237)][i(164)]);1===u[i(164)]?this[i(241)]({command:e,commands:u[0][i(237)],parentMenuView:t,onExecute:r})[i(205)](e=>c[i(214)][i(204)](e)):u[i(205)](({groupId:n,groupLabel:s,commands:u})=>{const d=i,l=new o.MenuBarMenuListItemView(a,t),h=new o.MenuBarMenuView(a),f=new o.MenuBarMenuListView(a),p=this[d(241)]({command:e,commands:u,parentMenuView:h,onExecute:r});h[d(291)][d(206)]({label:s||n}),h[d(150)](d(211)).to(t),f[d(214)][d(179)](p),h[d(168)][d(280)][d(204)](f),l[d(280)][d(204)](h),c[d(214)][d(204)](l)}),t[i(168)][i(280)][i(204)](c)}[Me(241)]({command:e,commands:t,parentMenuView:n,onExecute:r}){const i=Me,s=this[i(196)],a=s[i(142)];return Ue(s,t)[i(303)](t=>{const s=i,c=new o.MenuBarMenuListItemView(a,n),u=new o.MenuBarMenuListItemButtonView(a);return u[s(206)]({label:t[s(162)]}),u[s(150)](s(211)).to(n),u.on(s(211),()=>r(t.id)),u[s(223)](s(146)).to(e,s(286),e=>e[s(282)](t.id)),c[s(280)][s(204)](u),c})}}function De(e,t){const n=Me;return void 0!==e[n(177)]&&void 0===t[n(177)]?1:void 0===e[n(177)]&&void 0!==t[n(177)]?-1:void 0!==e[n(177)]&&void 0!==t[n(177)]?e[n(177)]-t[n(177)]:0}function Ue(e,t){const n=Me;t[n(259)](De);const r={},o=[];for(const s of t)if(void 0!==s[n(177)]){if(s[n(177)]in r)throw new i.CKEditorError(n(227),e,{conflictingDefinitions:[s,r[s[n(177)]]]});r[s[n(177)]]=s,o[n(133)](s[n(177)],0,s)}else o[n(194)](s);return o}function Fe(e,t){const n=Be();return(Fe=function(e,t){return n[e-=145]})(e,t)}function Be(){const e=["Improve writing","set","friendly","translateGerman","Summarize","groupId","legal","Improve this content by using descriptive language and inserting more information and more detailed explanations.","get","changeStyle","Fix spelling mistakes, use proper grammar and apply good writing practices. Do not lose the original meaning.","Make longer","AIAssistant","filter","Professional","Change tone","German","Make shorter","makeShorter","isPremiumPlugin","Translate the content to German language.","Translate the content to Spanish language.","412klpOOR","Rewrite this content as a poem using poetic techniques without losing the original meaning.","Translate the content to English language.","Translate the content to Hindi language.","simplifyLanguage","Continue","casual","Improve using friendly, comforting language, to convey understanding and empathy.","Casual","makeLonger","English","Translate the content to Simplified Chinese language.","confident","Rewrite this content as a business professional with formal language.","Translate the content to Arabic language.","French","config","Business","Start with the provided content and write at the end of it continuing this topic. Keep the added part short.","Change style","includes","Simplify language","isOfficialPlugin","translateChinese","Rewrite this content as a legal professional using valid legal terminology.","Legal","editOrReview","Direct","direct","translateFrench","professional","17345LNGigX","Simplified Chinese","translatePortuguese","improveWriting","translateHindi","Edit or review","2672eiPZrV","pluginName","push","find","Hindi","Improve using casual, informal language to convey a casual conversation with a real person.","summarize","Friendly","changeTone","ai.aiAssistant.removeCommands","journalism","translate","Translate the content to French language.","Improve using polished, formal, and respectful language to convey professional expertise and competence.","23219mlOlmw","translateArabic","1000732bOScCv","business","generate","define","Confident","4041576wYMcOO","Journalism","Rewrite this content as a journalist using engaging language to convey the importance of the information.","continue","translateEnglish","ai.aiAssistant.extraCommandGroups","39422601dZzhVW","Generate from selection","Summarize this content into one paragraph of text. Include only the key ideas and conclusions. Keep it short. Do not keep original text formatting.","Simplify the writing style of this content and reduce the complexity, so that the content is easy to understand.","locale","8823858lMndWy","Poetic","concat","Spanish","Improve using direct language, using only the essential information.","Remove any repetitive, redundant, or non-essential writing in this content without changing the meaning or losing any key information.","ai.aiAssistant.commands","translateSpanish","2287604rOQmYL","Arabic","commands","10rPnyTP","Translate the content to Portuguese language.","requires","Portuguese","Improve using compelling, optimistic language to convey confidence in the writing.","Translate","poetic","ai.aiAssistant.preserveComments","forEach"];return(Be=function(){return e})()}const je=Fe;!function(e){const t=Fe,n=e();for(;;)try{if(883105===-parseInt(t(216))/1+-parseInt(t(240))/2+-parseInt(t(221))/3+parseInt(t(163))/4*(parseInt(t(194))/5)+-parseInt(t(232))/6+parseInt(t(214))/7*(parseInt(t(200))/8)+-parseInt(t(227))/9*(-parseInt(t(243))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Be);class qe extends e.Plugin{static get[je(245)](){return[Ne,p]}static get[je(201)](){return je(153)}static get[je(185)](){return!0}static get[je(160)](){return!0}constructor(e){const t=je;super(e);const n=e[t(179)],r=e[t(231)];n[t(219)](t(250),!0),n[t(219)](t(238),He(r)),n[t(219)](t(226),[]),n[t(219)](t(209),[]);let i=s(n[t(149)](t(238)),r);const o=n[t(149)](t(226)),a=n[t(149)](t(209));o[t(251)](e=>{const n=t,r=i[n(203)](t=>t[n(146)]===e[n(146)]);r?r[n(242)]=r[n(242)][n(234)](e[n(242)]):i[n(202)](e)}),i=i[t(154)](e=>!a[t(183)](e[t(146)])),i[t(251)](e=>{const n=t;e[n(242)]=e[n(242)][n(154)](e=>!a[n(183)](e.id))}),n[t(253)](t(238),i)}}function He(e){const t=je;return[{groupId:t(189),groupLabel:v(e,t(199)),commands:[{id:t(197),label:v(e,t(252)),prompt:t(151)},{id:t(159),label:v(e,t(158)),prompt:t(237)},{id:t(172),label:v(e,t(152)),prompt:t(148)},{id:t(167),label:v(e,t(184)),prompt:t(230)}]},{groupId:t(218),groupLabel:v(e,t(228)),commands:[{id:t(206),label:v(e,t(145)),prompt:t(229)},{id:t(224),label:v(e,t(168)),prompt:t(181)}]},{groupId:t(208),groupLabel:v(e,t(156)),commands:[{id:t(193),label:v(e,t(155)),prompt:t(213)},{id:t(169),label:v(e,t(171)),prompt:t(205)},{id:t(191),label:v(e,t(190)),prompt:t(236)},{id:t(175),label:v(e,t(220)),prompt:t(247)},{id:t(254),label:v(e,t(207)),prompt:t(170)}]},{groupId:t(150),groupLabel:v(e,t(182)),commands:[{id:t(217),label:v(e,t(180)),prompt:t(176)},{id:t(147),label:v(e,t(188)),prompt:t(187)},{id:t(210),label:v(e,t(222)),prompt:t(223)},{id:t(249),label:v(e,t(233)),prompt:t(164)}]},{groupId:t(211),groupLabel:v(e,t(248)),commands:[{id:t(225),label:v(e,t(173)),prompt:t(165)},{id:t(239),label:v(e,t(235)),prompt:t(162)},{id:t(196),label:v(e,t(246)),prompt:t(244)},{id:t(255),label:v(e,t(157)),prompt:t(161)},{id:t(192),label:v(e,t(178)),prompt:t(212)},{id:t(186),label:v(e,t(195)),prompt:t(174)},{id:t(198),label:v(e,t(204)),prompt:t(166)},{id:t(215),label:v(e,t(241)),prompt:t(177)}]}]}const ze=Ve;function Ve(e,t){const n=Ge();return(Ve=function(e,t){return n[e-=308]})(e,t)}function Ge(){const e=["119spMsJs","3459306LwSGIl","name","sendRequest","get","abort","application/json","_prepareRequestHeaders","250338mxtzSL","error","object","106teELDw","init","makeRequest","textAdapter","requires","plugins","_prepareRequestParameters","catch","AI_ERROR_GET_PARAMETERS","AbortError","aitextadapter-send-request-failed","reject","editor","13295STsSoC","1644QSUHWm","AI_ERROR_GET_HEADERS","abortController","signal","10972152GiKcWk","assign","13234077CECobr","1840RRlctW","43352570vehgph","aborted","locale","resolve"];return(Ge=function(){return e})()}!function(e){const t=Ve,n=e();for(;;)try{if(941767===parseInt(t(343))/1*(parseInt(t(327))/2)+parseInt(t(333))/3+-parseInt(t(320))/4*(parseInt(t(319))/5)+-parseInt(t(340))/6*(parseInt(t(332))/7)+-parseInt(t(324))/8+-parseInt(t(326))/9+parseInt(t(328))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ge);class We extends e.Plugin{[ze(322)];static get[ze(310)](){return[w]}constructor(e){const t=ze;super(e),this[t(322)]=new AbortController}[ze(344)](){const e=ze;this[e(318)][e(311)][e(336)](w)[e(309)]=this}[ze(337)](){const e=ze;this[e(322)][e(323)][e(329)]||(this[e(322)][e(337)](),this[e(322)]=new AbortController)}async[ze(308)](e){const t=ze;return this[t(335)](e)[t(313)](e=>{const n=t;if(e instanceof b)return Promise[n(317)](e);if(n(315)==e[n(334)])return Promise[n(331)]();throw console[n(341)](e),new i.CKEditorError(n(316),null)})}async[ze(339)](e,t){const n=ze,r=this[n(318)][n(330)],i={"Content-Type":n(338)};if(n(342)==typeof e)Object[n(325)](i,e);else if(e)try{const r=await e(t);Object[n(325)](i,r)}catch{return Promise[n(317)](new b(v(r,n(321))))}return i}async[ze(312)](e,t){const n=ze,r=this[n(318)][n(330)];if(n(342)==typeof e)return e;try{return await e(t)}catch{return Promise[n(317)](new b(v(r,n(314))))}}}function Ke(){const e=["POST","reject","Your task is to execute the instruction using the provided HTML content. Follow the instruction closely. Your answer must be a properly formatted HTML code. Do not add any additional remarks or notes. Do not act like a chatbot or a real person.","7919020xPSxMB","signal","choices","body","ai.openAI.requestParameters","locale","_apiUrl","replace","AI_ERROR_MODERATION","pluginName","gpt-4o","config","2701062Nchucg","data: ","_requestParameters","prepareMessages","content","\nYou must keep the text formatting.\n\nContent:\n","ai.openAI.requestHeaders","parse","_cleanUpData","550437mETtYS","abortController","Your task is to generate HTML content accordingly to the given instruction. Never include <img> tag in your response even if asked for. Your answer must be a well-structured and properly formatted HTML code. Answer only with the generated HTML content. Do not add any additional remarks or notes. Do not act like a chatbot or a real person.","45979NwLXfW","1824242FdpcqF","delta","https://api.openai.com/v1/chat/completions","editor","811521rpcPqD","json","_prepareRequestHeaders","10BNZktx","user","_requestHeaders","40THflEN","define","Instruction:\n","stream","_isBufferIncomplete","_readStreamableResponse","filter","get","getReader","read","length","message","context_length_exceeded","decode","map","stringify","ai.openAI.apiUrl","join","[DONE]","resolve","AI_ERROR_CONTEXT_LENGTH","8LKcVAy","OpenAITextAdapter","split","system","Moderation","text","_readStaticResponse","1167410VcdsiJ","sendRequest","includes","_prepareRequestParameters"];return(Ke=function(){return e})()}const Ye=Je;function Je(e,t){const n=Ke();return(Je=function(e,t){return n[e-=319]})(e,t)}!function(e){const t=Je,n=e();for(;;)try{if(247905===-parseInt(t(337))/1*(-parseInt(t(345))/2)+-parseInt(t(334))/3*(parseInt(t(369))/4)+parseInt(t(376))/5+-parseInt(t(325))/6+parseInt(t(338))/7+-parseInt(t(348))/8*(parseInt(t(342))/9)+parseInt(t(383))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ke);class Qe extends We{[Ye(319)];[Ye(347)];[Ye(327)];static get[Ye(322)](){return Ye(370)}constructor(e){const t=Ye;super(e),e[t(324)][t(349)](t(364),t(340)),e[t(324)][t(355)](t(387))||e[t(324)][t(349)](t(387),{model:t(323),temperature:1,top_p:1,stream:!0}),this[t(319)]=e[t(324)][t(355)](t(364)),this[t(347)]=e[t(324)][t(355)](t(331))||{},this[t(327)]=e[t(324)][t(355)](t(387))}async[Ye(377)]({query:e,context:t,onData:n,actionId:r}){const i=Ye,o=this[i(341)][i(388)],s=await this[i(328)](e,t,r),a=await this[i(344)](this[i(347)],r),c=await this[i(379)](this[i(327)],r),u={messages:s,...c},d={method:i(380),headers:a,body:JSON[i(363)](u),signal:this[i(335)][i(384)]},l=await fetch(this[i(319)],d);if(l.ok)return c[i(351)]?await this[i(353)](l,n):await this[i(375)](l,n),Promise[i(367)]();{const e=await l[i(374)]();return e[i(378)](i(360))?Promise[i(381)](new b(v(o,i(368)))):e[i(378)](i(373))?Promise[i(381)](new b(v(o,i(321)))):Promise[i(381)](new Error(e))}}async[Ye(328)](e,t,n){const r=Ye;let i,o;return t?(i=r(382),o=r(350)+e+r(330)+t):(i=r(336),o=e),[{role:r(372),content:i},{role:r(346),content:o}]}async[Ye(353)](e,t){const n=Ye,r=e[n(386)][n(356)](),i=new TextDecoder;let o="",s="",a="",c=!1;for(;!c;){const{done:e,value:u}=await r[n(357)](),d=o+i[n(361)](u);let l="";c=e;try{l=this[n(333)](d),o=""}catch{o=d;continue}s+=l,!c&&this[n(352)](s)||s&&(a+=s,s="",t(a))}return Promise[n(367)]()}async[Ye(375)](e,t){const n=Ye;return t((await e[n(343)]())[n(385)][0][n(359)][n(329)]),Promise[n(367)]()}[Ye(352)](e){const t=Ye,n=e[t(371)]("<")[t(358)]!==e[t(371)](">")[t(358)],r=e[t(358)]<30;return n&&r}[Ye(333)](e){const t=Ye;return e[t(371)](/\n(?![^{]*\})/g)[t(362)](e=>e[t(320)](t(326),""))[t(354)](e=>e&&e[t(358)]>0&&t(366)!==e)[t(362)](e=>{const n=t,{choices:r}=JSON[n(332)](e);if(r[0]?.[n(339)]?.[n(329)])return r[0][n(339)][n(329)]})[t(354)](e=>e)[t(365)]("")}}var Ze,Xe,et,tt;!function(e){e.HEADER="header",e.QUERY="query"}(Ze||(Ze={})),function(e){e.HEADER="header",e.QUERY="query"}(Xe||(Xe={})),function(e){e.HTTP="http",e.HTTPS="https"}(et||(et={})),function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"}(tt||(tt={}));var nt;!function(e){e[e.HEADER=0]="HEADER",e[e.TRAILER=1]="TRAILER"}(nt||(nt={}));const rt="__smithy_context";var it,ot;!function(e){e.PROFILE="profile",e.SSO_SESSION="sso-session",e.SERVICES="services"}(it||(it={})),function(e){e.HTTP_0_9="http/0.9",e.HTTP_1_0="http/1.0",e.TDS_8_0="tds/8.0"}(ot||(ot={}));class st{constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.slice(-1)?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){const t=new st({...e,headers:{...e.headers}});var n;return t.query&&(t.query=(n=t.query,Object.keys(n).reduce((e,t)=>{const r=n[t];return{...e,[t]:Array.isArray(r)?[...r]:r}},{}))),t}static isInstance(e){if(!e)return!1;const t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers}clone(){return st.clone(this)}}class at{constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers}}const ct={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},ut=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{if(!st.isInstance(n.request))return t(n);const{request:r}=n,{handlerProtocol:i=""}=e.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!r.headers[":authority"])delete r.headers.host,r.headers[":authority"]=r.hostname+(r.port?":"+r.port:"");else if(!r.headers.host){let e=r.hostname;null!=r.port&&(e+=`:${r.port}`),r.headers.host=e}return t(n)})(e),ct)}}),dt={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},lt="X-Amzn-Trace-Id",ht={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},ft=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{const{request:r}=n;if(!st.isInstance(r)||"node"!==e.runtime)return t(n);const i=Object.keys(r.headers??{}).find(e=>e.toLowerCase()===lt.toLowerCase())??lt;if(r.headers.hasOwnProperty(i))return t(n);const o=process.env.AWS_LAMBDA_FUNCTION_NAME,s=process.env._X_AMZN_TRACE_ID,a=e=>"string"==typeof e&&e.length>0;return a(o)&&a(s)&&(r.headers[lt]=s),t({...n,request:r})})(e),ht)}}),pt=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t};const mt=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),gt=e=>mt.test(e)||e.startsWith("[")&&e.endsWith("]"),yt=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),wt=(e,t=!1)=>{if(!t)return yt.test(e);const n=e.split(".");for(const e of n)if(!wt(e))return!1;return!0},bt={},vt="endpoints";function kt(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${kt(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(kt).join(", ")})`:JSON.stringify(e,null,2)}class St extends Error{constructor(e){super(e),this.name="EndpointError"}}const Et=(e,t)=>(e=>{const t=e.split("."),n=[];for(const r of t){const t=r.indexOf("[");if(-1!==t){if(r.indexOf("]")!==r.length-1)throw new St(`Path: '${e}' does not end with ']'`);const i=r.slice(t+1,-1);if(Number.isNaN(parseInt(i)))throw new St(`Invalid array index: '${i}' in path: '${e}'`);0!==t&&n.push(r.slice(0,t)),n.push(i)}else n.push(r)}return n})(t).reduce((n,r)=>{if("object"!=typeof n)throw new St(`Index '${r}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(n)?n[parseInt(r)]:n[r]},e),At={[et.HTTP]:80,[et.HTTPS]:443},It={booleanEquals:(e,t)=>e===t,getAttr:Et,isSet:e=>null!=e,isValidHostLabel:wt,not:e=>!e,parseURL:e=>{const t=(()=>{try{if(e instanceof URL)return e;if("object"==typeof e&&"hostname"in e){const{hostname:t,port:n,protocol:r="",path:i="",query:o={}}=e,s=new URL(`${r}//${t}${n?`:${n}`:""}${i}`);return s.search=Object.entries(o).map(([e,t])=>`${e}=${t}`).join("&"),s}return new URL(e)}catch(e){return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const n=t.href,{host:r,hostname:i,pathname:o,protocol:s,search:a}=t;if(a)return null;const c=s.slice(0,-1);if(!Object.values(et).includes(c))return null;const u=gt(i);return{scheme:c,authority:`${r}${n.includes(`${r}:${At[c]}`)||"string"==typeof e&&e.includes(`${r}:${At[c]}`)?`:${At[c]}`:""}`,path:o,normalizedPath:o.endsWith("/")?o:`${o}/`,isIp:u}},stringEquals:(e,t)=>e===t,substring:(e,t,n,r)=>t>=n||e.length<n?null:r?e.substring(e.length-n,e.length-t):e.substring(t,n),uriEncode:e=>encodeURIComponent(e).replace(/[!*'()]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)},xt=(e,t)=>{const n=[],r={...t.endpointParams,...t.referenceRecord};let i=0;for(;i<e.length;){const t=e.indexOf("{",i);if(-1===t){n.push(e.slice(i));break}n.push(e.slice(i,t));const o=e.indexOf("}",t);if(-1===o){n.push(e.slice(t));break}"{"===e[t+1]&&"}"===e[o+1]&&(n.push(e.slice(t+1,o)),i=o+2);const s=e.substring(t+1,o);if(s.includes("#")){const[e,t]=s.split("#");n.push(Et(r[e],t))}else n.push(r[s]);i=o+1}return n.join("")},_t=(e,t,n)=>{if("string"==typeof e)return xt(e,n);if(e.fn)return Rt(e,n);if(e.ref)return(({ref:e},t)=>({...t.endpointParams,...t.referenceRecord}[e]))(e,n);throw new St(`'${t}': ${String(e)} is not a string, function or reference.`)},Rt=({fn:e,argv:t},n)=>{const r=t.map(e=>["boolean","number"].includes(typeof e)?e:_t(e,"arg",n)),i=e.split(".");return i[0]in bt&&null!=i[1]?bt[i[0]][i[1]](...r):It[e](...r)},Ct=({assign:e,...t},n)=>{if(e&&e in n.referenceRecord)throw new St(`'${e}' is already defined in Reference Record.`);const r=Rt(t,n);return n.logger?.debug?.(`${vt} evaluateCondition: ${kt(t)} = ${kt(r)}`),{result:""===r||!!r,...null!=e&&{toAssign:{name:e,value:r}}}},Pt=(e=[],t)=>{const n={};for(const r of e){const{result:e,toAssign:i}=Ct(r,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!e)return{result:e};i&&(n[i.name]=i.value,t.logger?.debug?.(`${vt} assign: ${i.name} := ${kt(i.value)}`))}return{result:!0,referenceRecord:n}},Tt=(e,t)=>Object.entries(e).reduce((e,[n,r])=>({...e,[n]:r.map(e=>{const r=_t(e,"Header value entry",t);if("string"!=typeof r)throw new St(`Header '${n}' value '${r}' is not a string`);return r})}),{}),Mt=(e,t)=>{if(Array.isArray(e))return e.map(e=>Mt(e,t));switch(typeof e){case"string":return xt(e,t);case"object":if(null===e)throw new St(`Unexpected endpoint property: ${e}`);return Ot(e,t);case"boolean":return e;default:throw new St("Unexpected endpoint property type: "+typeof e)}},Ot=(e,t)=>Object.entries(e).reduce((e,[n,r])=>({...e,[n]:Mt(r,t)}),{}),Lt=(e,t)=>{const n=_t(e,"Endpoint URL",t);if("string"==typeof n)try{return new URL(n)}catch(e){throw console.error(`Failed to construct URL with ${n}`,e),e}throw new St("Endpoint URL must be a string, got "+typeof n)},$t=(e,t)=>{const{conditions:n,endpoint:r}=e,{result:i,referenceRecord:o}=Pt(n,t);if(!i)return;const s={...t,referenceRecord:{...t.referenceRecord,...o}},{url:a,properties:c,headers:u}=r;return t.logger?.debug?.(`${vt} Resolving endpoint from template: ${kt(r)}`),{...null!=u&&{headers:Tt(u,s)},...null!=c&&{properties:Ot(c,s)},url:Lt(a,s)}},Nt=(e,t)=>{const{conditions:n,error:r}=e,{result:i,referenceRecord:o}=Pt(n,t);if(i)throw new St(_t(r,"Error",{...t,referenceRecord:{...t.referenceRecord,...o}}))},Dt=(e,t)=>{const{conditions:n,rules:r}=e,{result:i,referenceRecord:o}=Pt(n,t);if(i)return Ut(r,{...t,referenceRecord:{...t.referenceRecord,...o}})},Ut=(e,t)=>{for(const n of e)if("endpoint"===n.type){const e=$t(n,t);if(e)return e}else if("error"===n.type)Nt(n,t);else{if("tree"!==n.type)throw new St(`Unknown endpoint rule: ${n}`);{const e=Dt(n,t);if(e)return e}}throw new St("Rules evaluation failed")},Ft=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!Ft(t))return!1;return!0}return!!wt(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!gt(e)))};let Bt=JSON.parse('{"partitions":[{"id":"aws","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-east-1","name":"aws","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^(us|eu|ap|sa|ca|me|af|il|mx)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"af-south-1":{"description":"Africa (Cape Town)"},"ap-east-1":{"description":"Asia Pacific (Hong Kong)"},"ap-northeast-1":{"description":"Asia Pacific (Tokyo)"},"ap-northeast-2":{"description":"Asia Pacific (Seoul)"},"ap-northeast-3":{"description":"Asia Pacific (Osaka)"},"ap-south-1":{"description":"Asia Pacific (Mumbai)"},"ap-south-2":{"description":"Asia Pacific (Hyderabad)"},"ap-southeast-1":{"description":"Asia Pacific (Singapore)"},"ap-southeast-2":{"description":"Asia Pacific (Sydney)"},"ap-southeast-3":{"description":"Asia Pacific (Jakarta)"},"ap-southeast-4":{"description":"Asia Pacific (Melbourne)"},"ap-southeast-5":{"description":"Asia Pacific (Malaysia)"},"ap-southeast-7":{"description":"Asia Pacific (Thailand)"},"aws-global":{"description":"AWS Standard global region"},"ca-central-1":{"description":"Canada (Central)"},"ca-west-1":{"description":"Canada West (Calgary)"},"eu-central-1":{"description":"Europe (Frankfurt)"},"eu-central-2":{"description":"Europe (Zurich)"},"eu-north-1":{"description":"Europe (Stockholm)"},"eu-south-1":{"description":"Europe (Milan)"},"eu-south-2":{"description":"Europe (Spain)"},"eu-west-1":{"description":"Europe (Ireland)"},"eu-west-2":{"description":"Europe (London)"},"eu-west-3":{"description":"Europe (Paris)"},"il-central-1":{"description":"Israel (Tel Aviv)"},"me-central-1":{"description":"Middle East (UAE)"},"me-south-1":{"description":"Middle East (Bahrain)"},"mx-central-1":{"description":"Mexico (Central)"},"sa-east-1":{"description":"South America (Sao Paulo)"},"us-east-1":{"description":"US East (N. Virginia)"},"us-east-2":{"description":"US East (Ohio)"},"us-west-1":{"description":"US West (N. California)"},"us-west-2":{"description":"US West (Oregon)"}}},{"id":"aws-cn","outputs":{"dnsSuffix":"amazonaws.com.cn","dualStackDnsSuffix":"api.amazonwebservices.com.cn","implicitGlobalRegion":"cn-northwest-1","name":"aws-cn","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^cn\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-cn-global":{"description":"AWS China global region"},"cn-north-1":{"description":"China (Beijing)"},"cn-northwest-1":{"description":"China (Ningxia)"}}},{"id":"aws-us-gov","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-gov-west-1","name":"aws-us-gov","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-gov\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-us-gov-global":{"description":"AWS GovCloud (US) global region"},"us-gov-east-1":{"description":"AWS GovCloud (US-East)"},"us-gov-west-1":{"description":"AWS GovCloud (US-West)"}}},{"id":"aws-iso","outputs":{"dnsSuffix":"c2s.ic.gov","dualStackDnsSuffix":"c2s.ic.gov","implicitGlobalRegion":"us-iso-east-1","name":"aws-iso","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-iso\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-global":{"description":"AWS ISO (US) global region"},"us-iso-east-1":{"description":"US ISO East"},"us-iso-west-1":{"description":"US ISO WEST"}}},{"id":"aws-iso-b","outputs":{"dnsSuffix":"sc2s.sgov.gov","dualStackDnsSuffix":"sc2s.sgov.gov","implicitGlobalRegion":"us-isob-east-1","name":"aws-iso-b","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isob\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-b-global":{"description":"AWS ISOB (US) global region"},"us-isob-east-1":{"description":"US ISOB East (Ohio)"}}},{"id":"aws-iso-e","outputs":{"dnsSuffix":"cloud.adc-e.uk","dualStackDnsSuffix":"cloud.adc-e.uk","implicitGlobalRegion":"eu-isoe-west-1","name":"aws-iso-e","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^eu\\\\-isoe\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-e-global":{"description":"AWS ISOE (Europe) global region"},"eu-isoe-west-1":{"description":"EU ISOE West"}}},{"id":"aws-iso-f","outputs":{"dnsSuffix":"csp.hci.ic.gov","dualStackDnsSuffix":"csp.hci.ic.gov","implicitGlobalRegion":"us-isof-south-1","name":"aws-iso-f","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isof\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-f-global":{"description":"AWS ISOF global region"},"us-isof-east-1":{"description":"US ISOF EAST"},"us-isof-south-1":{"description":"US ISOF SOUTH"}}},{"id":"aws-eusc","outputs":{"dnsSuffix":"amazonaws.eu","dualStackDnsSuffix":"amazonaws.eu","implicitGlobalRegion":"eusc-de-east-1","name":"aws-eusc","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^eusc\\\\-(de)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"eusc-de-east-1":{"description":"EU (Germany)"}}}],"version":"1.1"}'),jt="";const qt={isVirtualHostableS3Bucket:Ft,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[n,r,i,o,s,...a]=t;if("arn"!==n||""===r||""===i||""===a.join(":"))return null;return{partition:r,service:i,region:o,accountId:s,resourceId:a.map(e=>e.split("/")).flat()}},partition:e=>{const{partitions:t}=Bt;for(const n of t){const{regions:t,outputs:r}=n;for(const[n,i]of Object.entries(t))if(n===e)return{...r,...i}}for(const n of t){const{regionRegex:t,outputs:r}=n;if(new RegExp(t).test(e))return{...r}}const n=t.find(e=>"aws"===e.id);if(!n)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...n.outputs}}};function Ht(e,t,n){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=n}bt.aws=qt;const zt=/\d{12}\.ddb/;const Vt="user-agent",Gt="x-amz-user-agent",Wt=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Kt=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g;const Yt=e=>(t,n)=>async r=>{const{request:i}=r;if(!st.isInstance(i))return t(r);const{headers:o}=i,s=n?.userAgent?.map(Jt)||[],a=(await e.defaultUserAgentProvider()).map(Jt);await async function(e,t,n){const r=n.request;if("rpc-v2-cbor"===r?.headers?.["smithy-protocol"]&&Ht(e,"PROTOCOL_RPC_V2_CBOR","M"),"function"==typeof t.retryStrategy){const n=await t.retryStrategy();"function"==typeof n.acquireInitialRetryToken?n.constructor?.name?.includes("Adaptive")?Ht(e,"RETRY_MODE_ADAPTIVE","F"):Ht(e,"RETRY_MODE_STANDARD","E"):Ht(e,"RETRY_MODE_LEGACY","D")}if("function"==typeof t.accountIdEndpointMode){const n=e.endpointV2;switch(String(n?.url?.hostname).match(zt)&&Ht(e,"ACCOUNT_ID_ENDPOINT","O"),await(t.accountIdEndpointMode?.())){case"disabled":Ht(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":Ht(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":Ht(e,"ACCOUNT_ID_MODE_REQUIRED","R")}}const i=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const t=i;t.accountId&&Ht(e,"RESOLVED_ACCOUNT_ID","T");for(const[n,r]of Object.entries(t.$source??{}))Ht(e,n,r)}}(n,e,r);const c=n;a.push(`m/${function(e){let t="";for(const n in e){const r=e[n];if(!(t.length+r.length+1<=1024))break;t.length?t+=","+r:t+=r}return t}(Object.assign({},n.__smithy_context?.features,c.__aws_sdk_context?.features))}`);const u=e?.customUserAgent?.map(Jt)||[],d=await e.userAgentAppId();d&&a.push(Jt([`app/${d}`]));const l=(jt?[jt]:[]).concat([...a,...s,...u]).join(" "),h=[...a.filter(e=>e.startsWith("aws-sdk-")),...u].join(" ");return"browser"!==e.runtime?(h&&(o[Gt]=o[Gt]?`${o[Vt]} ${h}`:h),o[Vt]=l):o[Gt]=l,t({...r,request:i})},Jt=e=>{const t=e[0].split("/").map(e=>e.replace(Wt,"-")).join("/"),n=e[1]?.replace(Kt,"-"),r=t.indexOf("/"),i=t.substring(0,r);let o=t.substring(r+1);return"api"===i&&(o=o.toLowerCase()),[i,o,n].filter(e=>e&&e.length>0).reduce((e,t,n)=>{switch(n){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}},"")},Qt={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0};var Zt;!function(e){e.ENV="env",e.CONFIG="shared config entry"}(Zt||(Zt={}));const Xt=e=>e[rt]||(e[rt]={}),en=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t},tn=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips")),nn=e=>tn(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e;const rn=(e,t)=>(n,r)=>async i=>{const o=((e,t)=>{if(!t||0===t.length)return e;const n=[];for(const r of t)for(const t of e)t.schemeId.split("#")[1]===r&&n.push(t);for(const t of e)n.find(({schemeId:e})=>e===t.schemeId)||n.push(t);return n})(e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,r,i.input)),e.authSchemePreference?await e.authSchemePreference():[]),s=function(e){const t=new Map;for(const n of e)t.set(n.schemeId,n);return t}(e.httpAuthSchemes),a=Xt(r),c=[];for(const n of o){const i=s.get(n.schemeId);if(!i){c.push(`HttpAuthScheme \`${n.schemeId}\` was not enabled for this service.`);continue}const o=i.identityProvider(await t.identityProviderConfigProvider(e));if(!o){c.push(`HttpAuthScheme \`${n.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:u={},signingProperties:d={}}=n.propertiesExtractor?.(e,r)||{};n.identityProperties=Object.assign(n.identityProperties||{},u),n.signingProperties=Object.assign(n.signingProperties||{},d),a.selectedHttpAuthScheme={httpAuthOption:n,identity:await o(n.identityProperties),signer:i.signer};break}if(!a.selectedHttpAuthScheme)throw new Error(c.join("\n"));return n(i)},on={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"};class sn{constructor(e){this.authSchemes=new Map;for(const[t,n]of Object.entries(e))void 0!==n&&this.authSchemes.set(t,n)}getIdentityProvider(e){return this.authSchemes.get(e)}}const an=e=>e=>{throw e},cn=(e,t)=>{},un={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},dn=e=>({applyToStack:e=>{e.addRelativeTo((e,t)=>async n=>{if(!st.isInstance(n.request))return e(n);const r=Xt(t).selectedHttpAuthScheme;if(!r)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:i={}},identity:o,signer:s}=r,a=await e({...n,request:await s.sign(n.request,o,i)}).catch((s.errorHandler||an)(i));return(s.successHandler||cn)(a.response,i),a},un)}}),ln="content-length";const hn={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},fn=e=>({applyToStack:t=>{var n;t.add((n=e.bodyLengthChecker,e=>async t=>{const r=t.request;if(st.isInstance(r)){const{body:e,headers:t}=r;if(e&&-1===Object.keys(t).map(e=>e.toLowerCase()).indexOf(ln))try{const t=n(e);r.headers={...r.headers,[ln]:String(t)}}catch(e){}}return e({...t,request:r})}),hn)}});const pn=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,mn=/(\d+\.){3}\d+/,gn=/\.\./,yn=e=>pn.test(e)&&!mn.test(e)&&!gn.test(e),wn=e=>{const[t,n,r,,,i]=e.split(":"),o="arn"===t&&e.split(":").length>=6,s=Boolean(o&&n&&r&&i);if(o&&!s)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return s},bn=(e,t,n)=>{const r=async()=>{const r=n[e]??n[t];return"function"==typeof r?r():r};return"credentialScope"===e||"CredentialScope"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.credentialScope??e?.CredentialScope}:"accountId"===e||"AccountId"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.accountId??e?.AccountId}:"endpoint"===e||"endpoint"===t?async()=>{if(!1===n.isCustomEndpoint)return;const e=await r();if(e&&"object"==typeof e){if("url"in e)return e.url.href;if("hostname"in e){const{protocol:t,hostname:n,port:r,path:i}=e;return`${t}//${n}${r?":"+r:""}${i}`}}return e}:r},vn=async e=>{};const kn=e=>{if("string"==typeof e)return kn(new URL(e));const{hostname:t,pathname:n,port:r,protocol:i,search:o}=e;let s;return o&&(s=function(e){const t={};if(e=e.replace(/^\?/,""))for(const n of e.split("&")){let[e,r=null]=n.split("=");e=decodeURIComponent(e),r&&(r=decodeURIComponent(r)),e in t?Array.isArray(t[e])?t[e].push(r):t[e]=[t[e],r]:t[e]=r}return t}(o)),{hostname:t,port:r?parseInt(r):void 0,protocol:i,path:n,query:s}},Sn=e=>"object"==typeof e?"url"in e?kn(e.url):e:kn(e),En=async(e,t,n)=>{const r={},i=t?.getEndpointParameterInstructions?.()||{};for(const[t,o]of Object.entries(i))switch(o.type){case"staticContextParams":r[t]=o.value;break;case"contextParams":r[t]=e[o.name];break;case"clientContextParams":case"builtInParams":r[t]=await bn(o.name,t,n)();break;case"operationContextParams":r[t]=o.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(o))}return 0===Object.keys(i).length&&Object.assign(r,n),"s3"===String(n.serviceId).toLowerCase()&&await(async e=>{const t=e?.Bucket||"";if("string"==typeof e.Bucket&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),wn(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!yn(t)||-1!==t.indexOf(".")&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e})(r),r},An=({config:e,instructions:t})=>(n,r)=>async i=>{e.isCustomEndpoint&&function(e,t,n){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=n}(r,"ENDPOINT_OVERRIDE","N");const o=await(async(e,t,n,r)=>{if(!n.isCustomEndpoint){let e;e=n.serviceConfiguredEndpoint?await n.serviceConfiguredEndpoint():await vn(n.serviceId),e&&(n.endpoint=()=>Promise.resolve(Sn(e)),n.isCustomEndpoint=!0)}const i=await En(e,t,n);if("function"!=typeof n.endpointProvider)throw new Error("config.endpointProvider is not set.");return n.endpointProvider(i,r)})(i.input,{getEndpointParameterInstructions:()=>t},{...e},r);r.endpointV2=o,r.authSchemes=o.properties?.authSchemes;const s=r.authSchemes?.[0];if(s){r.signing_region=s.signingRegion,r.signing_service=s.signingName;const e=Xt(r),t=e?.selectedHttpAuthScheme?.httpAuthOption;t&&(t.signingProperties=Object.assign(t.signingProperties||{},{signing_region:s.signingRegion,signingRegion:s.signingRegion,signing_service:s.signingName,signingName:s.signingName,signingRegionSet:s.signingRegionSet},s.properties))}return n({...i})},In=(e,t)=>(t.find(([t])=>t.match(e))||[void 0,void 0])[1],xn={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},_n={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function Rn(e,t,n){return{applyToStack:r=>{r.add(((e,t)=>(n,r)=>async i=>{const{response:o}=await n(i);try{return{response:o,output:await t(o,e)}}catch(e){if(Object.defineProperty(e,"$response",{value:o}),!("$metadata"in e)){const t="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{e.message+="\n "+t}catch(e){r.logger&&"NoOpLogger"!==r.logger?.constructor?.name?r.logger?.warn?.(t):console.warn(t)}void 0!==e.$responseBodyText&&e.$response&&(e.$response.body=e.$responseBodyText);try{if(at.isInstance(o)){const{headers:t={}}=o,n=Object.entries(t);e.$metadata={httpStatusCode:o.statusCode,requestId:In(/^x-[\w-]+-request-?id$/,n),extendedRequestId:In(/^x-[\w-]+-id-2$/,n),cfId:In(/^x-[\w-]+-cf-id$/,n)}}}catch(e){}}throw e}})(e,n),xn),r.add(((e,t)=>(n,r)=>async i=>{const o=e,s=r.endpointV2?.url&&o.urlParser?async()=>o.urlParser(r.endpointV2.url):o.endpoint;if(!s)throw new Error("No valid endpoint provider available.");const a=await t(i.input,{...e,endpoint:s});return n({...i,request:a})})(e,t),_n)}}}const Cn={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:_n.name},Pn=(e,t)=>({applyToStack:n=>{n.addRelativeTo(An({config:e,instructions:t}),Cn)}});var Tn;!function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(Tn||(Tn={}));const Mn=Tn.STANDARD,On=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Ln=["TimeoutError","RequestTimeout","RequestTimeoutException"],$n=[500,502,503,504],Nn=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],Dn=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],Un=e=>429===e.$metadata?.httpStatusCode||On.includes(e.name)||1==e.$retryable?.throttling,Fn=(e,t=0)=>(e=>e.$metadata?.clockSkewCorrected)(e)||Ln.includes(e.name)||Nn.includes(e?.code||"")||Dn.includes(e?.code||"")||$n.includes(e.$metadata?.httpStatusCode||0)||(e=>{const t=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);return!!(e&&e instanceof TypeError)&&t.has(e.message)})(e)||void 0!==e.cause&&t<=10&&Fn(e.cause,t+1);class Bn{constructor(e){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=e?.beta??.7,this.minCapacity=e?.minCapacity??1,this.minFillRate=e?.minFillRate??.5,this.scaleConstant=e?.scaleConstant??.4,this.smooth=e?.smooth??.8;const t=this.getCurrentTimeInSeconds();this.lastThrottleTime=t,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(e){if(this.enabled){if(this.refillTokenBucket(),e>this.currentCapacity){const t=(e-this.currentCapacity)/this.fillRate*1e3;await new Promise(e=>Bn.setTimeoutFn(e,t))}this.currentCapacity=this.currentCapacity-e}}refillTokenBucket(){const e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp)return void(this.lastTimestamp=e);const t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}updateClientSendingRate(e){let t;if(this.updateMeasuredRate(),Un(e)){const e=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=e,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(e),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());const n=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(n)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const e=this.getCurrentTimeInSeconds(),t=Math.floor(2*e)/2;if(this.requestCount++,t>this.lastTxRateBucket){const e=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(e*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}}Bn.setTimeoutFn=setTimeout;const jn=100,qn=2e4,Hn="amz-sdk-invocation-id",zn="amz-sdk-request",Vn=({retryDelay:e,retryCount:t,retryCost:n})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(qn,e),getRetryCost:()=>n});class Gn{constructor(e){this.maxAttempts=e,this.mode=Tn.STANDARD,this.capacity=500,this.retryBackoffStrategy=(()=>{let e=jn;return{computeNextBackoffDelay:t=>Math.floor(Math.min(qn,Math.random()*2**t*e)),setDelayBase:t=>{e=t}}})(),this.maxAttemptsProvider="function"==typeof e?e:async()=>e}async acquireInitialRetryToken(e){return Vn({retryDelay:jn,retryCount:0})}async refreshRetryTokenForRetry(e,t){const n=await this.getMaxAttempts();if(this.shouldRetry(e,t,n)){const n=t.errorType;this.retryBackoffStrategy.setDelayBase("THROTTLING"===n?500:jn);const r=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),i=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,r):r,o=this.getCapacityCost(n);return this.capacity-=o,Vn({retryDelay:i,retryCount:e.getRetryCount()+1,retryCost:o})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(500,this.capacity+(e.getRetryCost()??1))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(e){return console.warn("Max attempts provider could not resolve. Using default of 3"),3}}shouldRetry(e,t,n){return e.getRetryCount()+1<n&&this.capacity>=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return"TRANSIENT"===e?10:5}isRetryableError(e){return"THROTTLING"===e||"TRANSIENT"===e}}class Wn{constructor(e,t){this.maxAttemptsProvider=e,this.mode=Tn.ADAPTIVE;const{rateLimiter:n}=t??{};this.rateLimiter=n??new Bn,this.standardRetryStrategy=new Gn(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){return this.rateLimiter.updateClientSendingRate(t),this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}const Kn={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Yn;const Jn=new Uint8Array(16);function Qn(){if(!Yn&&(Yn="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Yn))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Yn(Jn)}const Zn=[];for(let e=0;e<256;++e)Zn.push((e+256).toString(16).slice(1));function Xn(e,t=0){return Zn[e[t+0]]+Zn[e[t+1]]+Zn[e[t+2]]+Zn[e[t+3]]+"-"+Zn[e[t+4]]+Zn[e[t+5]]+"-"+Zn[e[t+6]]+Zn[e[t+7]]+"-"+Zn[e[t+8]]+Zn[e[t+9]]+"-"+Zn[e[t+10]]+Zn[e[t+11]]+Zn[e[t+12]]+Zn[e[t+13]]+Zn[e[t+14]]+Zn[e[t+15]]}const er=function(e,t,n){if(Kn.randomUUID&&!t&&!e)return Kn.randomUUID();const r=(e=e||{}).random||(e.rng||Qn)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return Xn(r)},tr=e=>e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):"string"==typeof e?new Error(e):new Error(`AWS SDK error wrapper for ${e}`);const nr=(e,t)=>{const n=[];if(e&&n.push(e),t)for(const e of t)n.push(e);return n},rr=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,ir=()=>{let e=[],t=[],n=!1;const r=new Set,i=n=>(e.forEach(e=>{n.add(e.middleware,{...e})}),t.forEach(e=>{n.addRelativeTo(e.middleware,{...e})}),n.identifyOnResolve?.(a.identifyOnResolve()),n),o=e=>{const t=[];return e.before.forEach(e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...o(e))}),t.push(e),e.after.reverse().forEach(e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...o(e))}),t},s=(n=!1)=>{const r=[],i=[],s={};e.forEach(e=>{const t={...e,before:[],after:[]};for(const e of nr(t.name,t.aliases))s[e]=t;r.push(t)}),t.forEach(e=>{const t={...e,before:[],after:[]};for(const e of nr(t.name,t.aliases))s[e]=t;i.push(t)}),i.forEach(e=>{if(e.toMiddleware){const t=s[e.toMiddleware];if(void 0===t){if(n)return;throw new Error(`${e.toMiddleware} is not found when adding ${rr(e.name,e.aliases)} middleware ${e.relation} ${e.toMiddleware}`)}"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}});const a=(c=r,c.sort((e,t)=>or[t.step]-or[e.step]||sr[t.priority||"normal"]-sr[e.priority||"normal"])).map(o).reduce((e,t)=>(e.push(...t),e),[]);var c;return a},a={add:(t,n={})=>{const{name:i,override:o,aliases:s}=n,a={step:"initialize",priority:"normal",middleware:t,...n},c=nr(i,s);if(c.length>0){if(c.some(e=>r.has(e))){if(!o)throw new Error(`Duplicate middleware name '${rr(i,s)}'`);for(const t of c){const n=e.findIndex(e=>e.name===t||e.aliases?.some(e=>e===t));if(-1===n)continue;const r=e[n];if(r.step!==a.step||a.priority!==r.priority)throw new Error(`"${rr(r.name,r.aliases)}" middleware with ${r.priority} priority in ${r.step} step cannot be overridden by "${rr(i,s)}" middleware with ${a.priority} priority in ${a.step} step.`);e.splice(n,1)}}for(const e of c)r.add(e)}e.push(a)},addRelativeTo:(e,n)=>{const{name:i,override:o,aliases:s}=n,a={middleware:e,...n},c=nr(i,s);if(c.length>0){if(c.some(e=>r.has(e))){if(!o)throw new Error(`Duplicate middleware name '${rr(i,s)}'`);for(const e of c){const n=t.findIndex(t=>t.name===e||t.aliases?.some(t=>t===e));if(-1===n)continue;const r=t[n];if(r.toMiddleware!==a.toMiddleware||r.relation!==a.relation)throw new Error(`"${rr(r.name,r.aliases)}" middleware ${r.relation} "${r.toMiddleware}" middleware cannot be overridden by "${rr(i,s)}" middleware ${a.relation} "${a.toMiddleware}" middleware.`);t.splice(n,1)}}for(const e of c)r.add(e)}t.push(a)},clone:()=>i(ir()),use:e=>{e.applyToStack(a)},remove:n=>"string"==typeof n?(n=>{let i=!1;const o=e=>{const t=nr(e.name,e.aliases);if(t.includes(n)){i=!0;for(const e of t)r.delete(e);return!1}return!0};return e=e.filter(o),t=t.filter(o),i})(n):(n=>{let i=!1;const o=e=>{if(e.middleware===n){i=!0;for(const t of nr(e.name,e.aliases))r.delete(t);return!1}return!0};return e=e.filter(o),t=t.filter(o),i})(n),removeByTag:n=>{let i=!1;const o=e=>{const{tags:t,name:o,aliases:s}=e;if(t&&t.includes(n)){const e=nr(o,s);for(const t of e)r.delete(t);return i=!0,!1}return!0};return e=e.filter(o),t=t.filter(o),i},concat:e=>{const t=i(ir());return t.use(e),t.identifyOnResolve(n||t.identifyOnResolve()||(e.identifyOnResolve?.()??!1)),t},applyToStack:i,identify:()=>s(!0).map(e=>{const t=e.step??e.relation+" "+e.toMiddleware;return rr(e.name,e.aliases)+" - "+t}),identifyOnResolve:e=>("boolean"==typeof e&&(n=e),n),resolve:(e,t)=>{for(const n of s().map(e=>e.middleware).reverse())e=n(e,t);return n&&console.log(a.identify()),e}};return a},or={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},sr={high:3,normal:2,low:1};class ar{constructor(e){this.config=e,this.middlewareStack=ir()}send(e,t,n){const r="function"!=typeof t?t:void 0,i="function"==typeof t?t:n;let o;if(void 0===r&&!0===this.config.cacheMiddleware){this.handlers||(this.handlers=new WeakMap);const t=this.handlers;t.has(e.constructor)?o=t.get(e.constructor):(o=e.resolveMiddleware(this.middlewareStack,this.config,r),t.set(e.constructor,o))}else delete this.handlers,o=e.resolveMiddleware(this.middlewareStack,this.config,r);if(!i)return o(e).then(e=>e.output);o(e).then(e=>i(null,e.output),e=>i(e)).catch(()=>{})}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}const cr={},ur=new Array(64);for(let e=0,t="A".charCodeAt(0),n="Z".charCodeAt(0);e+t<=n;e++){const n=String.fromCharCode(e+t);cr[n]=e,ur[e]=n}for(let e=0,t="a".charCodeAt(0),n="z".charCodeAt(0);e+t<=n;e++){const n=String.fromCharCode(e+t),r=e+26;cr[n]=r,ur[r]=n}for(let e=0;e<10;e++){cr[e.toString(10)]=e+52;const t=e.toString(10),n=e+52;cr[t]=n,ur[n]=t}cr["+"]=62,ur[62]="+",cr["/"]=63,ur[63]="/";const dr=e=>{let t=e.length/4*3;"=="===e.slice(-2)?t-=2:"="===e.slice(-1)&&t--;const n=new ArrayBuffer(t),r=new DataView(n);for(let t=0;t<e.length;t+=4){let n=0,i=0;for(let r=t,o=t+3;r<=o;r++)if("="!==e[r]){if(!(e[r]in cr))throw new TypeError(`Invalid character ${e[r]} in base64 string.`);n|=cr[e[r]]<<6*(o-r),i+=6}else n>>=6;const o=t/4*3;n>>=i%8;const s=Math.floor(i/8);for(let e=0;e<s;e++){const t=8*(s-e-1);r.setUint8(o+e,(n&255<<t)>>t)}}return new Uint8Array(n)},lr=e=>(new TextEncoder).encode(e);function hr(e){let t;t="string"==typeof e?lr(e):e;const n="object"==typeof t&&"number"==typeof t.length,r="object"==typeof t&&"number"==typeof t.byteOffset&&"number"==typeof t.byteLength;if(!n&&!r)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let i="";for(let e=0;e<t.length;e+=3){let n=0,r=0;for(let i=e,o=Math.min(e+3,t.length);i<o;i++)n|=t[i]<<8*(o-i-1),r+=8;const o=Math.ceil(r/6);n<<=6*o-r;for(let e=1;e<=o;e++){const t=6*(o-e);i+=ur[(n&63<<t)>>t]}i+="==".slice(0,4-o)}return i}const fr=e=>{if("string"==typeof e)return e;if("object"!=typeof e||"number"!=typeof e.byteOffset||"number"!=typeof e.byteLength)throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)};class pr extends Uint8Array{static fromString(e,t="utf-8"){if("string"==typeof e)return function(e,t){return"base64"===t?pr.mutate(dr(e)):pr.mutate(lr(e))}(e,t);throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,pr.prototype),e}transformToString(e="utf-8"){return function(e,t="utf-8"){return"base64"===t?hr(e):fr(e)}(this,e)}}"function"==typeof ReadableStream&&ReadableStream;const mr=e=>encodeURIComponent(e).replace(/[!'()*]/g,gr),gr=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function yr(e,t){return new Request(e,t)}function wr(e=0){return new Promise((t,n)=>{e&&setTimeout(()=>{const t=new Error(`Request did not complete within ${e} ms`);t.name="TimeoutError",n(t)},e)})}const br={supported:void 0};class vr{static create(e){return"function"==typeof e?.handle?e:new vr(e)}constructor(e){"function"==typeof e?this.configProvider=e().then(e=>e||{}):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),void 0===br.supported&&(br.supported=Boolean("undefined"!=typeof Request&&"keepalive"in yr("https://[::1]")))}destroy(){}async handle(e,{abortSignal:t,requestTimeout:n}={}){this.config||(this.config=await this.configProvider);const r=n??this.config.requestTimeout,i=!0===this.config.keepAlive,o=this.config.credentials;if(t?.aborted){const e=new Error("Request aborted");return e.name="AbortError",Promise.reject(e)}let s=e.path;const a=function(e){const t=[];for(let n of Object.keys(e).sort()){const r=e[n];if(n=mr(n),Array.isArray(r))for(let e=0,i=r.length;e<i;e++)t.push(`${n}=${mr(r[e])}`);else{let e=n;(r||"string"==typeof r)&&(e+=`=${mr(r)}`),t.push(e)}}return t.join("&")}(e.query||{});a&&(s+=`?${a}`),e.fragment&&(s+=`#${e.fragment}`);let c="";if(null!=e.username||null!=e.password){c=`${e.username??""}:${e.password??""}@`}const{port:u,method:d}=e,l=`${e.protocol}//${c}${e.hostname}${u?`:${u}`:""}${s}`,h="GET"===d||"HEAD"===d?void 0:e.body,f={body:h,headers:new Headers(e.headers),method:d,credentials:o};this.config?.cache&&(f.cache=this.config.cache),h&&(f.duplex="half"),"undefined"!=typeof AbortController&&(f.signal=t),br.supported&&(f.keepalive=i),"function"==typeof this.config.requestInit&&Object.assign(f,this.config.requestInit(e));let p=()=>{};const m=yr(l,f),g=[fetch(m).then(e=>{const t=e.headers,n={};for(const e of t.entries())n[e[0]]=e[1];return null!=e.body?{response:new at({headers:n,reason:e.statusText,statusCode:e.status,body:e.body})}:e.blob().then(t=>({response:new at({headers:n,reason:e.statusText,statusCode:e.status,body:t})}))}),wr(r)];return t&&g.push(new Promise((e,n)=>{const r=()=>{const e=new Error("Request aborted");e.name="AbortError",n(e)};if("function"==typeof t.addEventListener){const e=t;e.addEventListener("abort",r,{once:!0}),p=()=>e.removeEventListener("abort",r)}else t.onabort=r})),Promise.race(g).finally(p)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then(n=>(n[e]=t,n))}httpHandlerConfigs(){return this.config??{}}}const kr=async e=>"function"==typeof Blob&&e instanceof Blob||"Blob"===e.constructor?.name?void 0!==Blob.prototype.arrayBuffer?new Uint8Array(await e.arrayBuffer()):async function(e){const t=await function(e){return new Promise((t,n)=>{const r=new FileReader;r.onloadend=()=>{if(2!==r.readyState)return n(new Error("Reader aborted too early"));const e=r.result??"",i=e.indexOf(","),o=i>-1?i+1:e.length;t(e.substring(o))},r.onabort=()=>n(new Error("Read aborted")),r.onerror=()=>n(r.error),r.readAsDataURL(e)})}(e),n=dr(t);return new Uint8Array(n)}(e):async function(e){const t=[],n=e.getReader();let r=!1,i=0;for(;!r;){const{done:e,value:o}=await n.read();o&&(t.push(o),i+=o.length),r=e}const o=new Uint8Array(i);let s=0;for(const e of t)o.set(e,s),s+=e.length;return o}(e);const Sr={},Er={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),Sr[e]=t,Er[t]=e}function Ar(e){if(e.length%2!=0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2){const r=e.slice(n,n+2).toLowerCase();if(!(r in Er))throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`);t[n/2]=Er[r]}return t}function Ir(e){let t="";for(let n=0;n<e.byteLength;n++)t+=Sr[e[n]];return t}const xr=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return pr.mutate(e);if(!e)return pr.mutate(new Uint8Array);const n=t.streamCollector(e);return pr.mutate(await n)};class _r{constructor(){this.middlewareStack=ir()}static classBuilder(){return new Rr}resolveMiddlewareWithContext(e,t,n,{middlewareFn:r,clientName:i,commandName:o,inputFilterSensitiveLog:s,outputFilterSensitiveLog:a,smithyContext:c,additionalContext:u,CommandCtor:d}){for(const i of r.bind(this)(d,e,t,n))this.middlewareStack.use(i);const l=e.concat(this.middlewareStack),{logger:h}=t,f={logger:h,clientName:i,commandName:o,inputFilterSensitiveLog:s,outputFilterSensitiveLog:a,[rt]:{commandInstance:this,...c},...u},{requestHandler:p}=t;return l.resolve(e=>p.handle(e.request,n||{}),f)}}class Rr{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=e=>e,this._outputFilterSensitiveLog=e=>e,this._serializer=null,this._deserializer=null}init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,t,n={}){return this._smithyContext={service:e,operation:t,...n},this}c(e={}){return this._additionalContext=e,this}n(e,t){return this._clientName=e,this._commandName=t,this}f(e=e=>e,t=e=>e){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=t,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}sc(e){return this._operationSchema=e,this._smithyContext.operationSchema=e,this}build(){const e=this;let t;return t=class extends _r{static getEndpointParameterInstructions(){return e._ep}constructor(...[t]){super(),this.serialize=e._serializer,this.deserialize=e._deserializer,this.input=t??{},e._init(this),this.schema=e._operationSchema}resolveMiddleware(n,r,i){return this.resolveMiddlewareWithContext(n,r,i,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog,outputFilterSensitiveLog:e._outputFilterSensitiveLog,smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}const Cr="***SensitiveInformation***";class Pr extends Error{constructor(e){super(e.message),Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}static isInstance(e){if(!e)return!1;const t=e;return Pr.prototype.isPrototypeOf(t)||Boolean(t.$fault)&&Boolean(t.$metadata)&&("client"===t.$fault||"server"===t.$fault)}static[Symbol.hasInstance](e){if(!e)return!1;const t=e;return this===Pr?Pr.isInstance(e):!!Pr.isInstance(e)&&(t.name&&this.name?this.prototype.isPrototypeOf(e)||t.name===this.name:this.prototype.isPrototypeOf(e))}}const Tr=(e,t={})=>{Object.entries(t).filter(([,e])=>void 0!==e).forEach(([t,n])=>{null!=e[t]&&""!==e[t]||(e[t]=n)});const n=e.message||e.Message||"UnknownError";return e.message=n,delete e.Message,e},Mr=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),Or=e=>{switch(e){case"standard":case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},Lr=e=>Object.assign((e=>{const t=[];for(const n in tt){const r=tt[n];void 0!==e[r]&&t.push({algorithmId:()=>r,checksumConstructor:()=>e[r]})}return{addChecksumAlgorithm(e){t.push(e)},checksumAlgorithms:()=>t}})(e),(e=>({setRetryStrategy(t){e.retryStrategy=t},retryStrategy:()=>e.retryStrategy}))(e)),$r=e=>null!=e;class Nr{trace(){}debug(){}info(){}warn(){}error(){}}function Dr(e,t,n){let r,i,o;if(void 0===t&&void 0===n)r={},o=e;else{if(r=e,"function"==typeof t)return i=t,o=n,Fr(r,i,o);o=t}for(const e of Object.keys(o))Array.isArray(o[e])?Br(r,null,o,e):r[e]=o[e];return r}const Ur=(e,t)=>{const n={};for(const r in t)Br(n,e,t,r);return n},Fr=(e,t,n)=>Dr(e,Object.entries(n).reduce((e,[n,r])=>(Array.isArray(r)?e[n]=r:e[n]="function"==typeof r?[t,r()]:[t,r],e),{})),Br=(e,t,n,r)=>{if(null!==t){let i=n[r];"function"==typeof i&&(i=[,i]);const[o=jr,s=qr,a=r]=i;return void(("function"==typeof o&&o(t[a])||"function"!=typeof o&&o)&&(e[r]=s(t[a])))}let[i,o]=n[r];if("function"==typeof o){let t;const n=void 0===i&&null!=(t=o()),s="function"==typeof i&&!!i(void 0)||"function"!=typeof i&&!!i;n?e[r]=t:s&&(e[r]=o())}else{const t=void 0===i&&null!=o,n="function"==typeof i&&!!i(o)||"function"!=typeof i&&!!i;(t||n)&&(e[r]=o)}},jr=e=>null!=e,qr=e=>e,Hr=(Math.ceil(2**127*(2-2**-23)),e=>{if(null!=e){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}}),zr=e=>Vr(e,32),Vr=(e,t)=>{const n=Hr(e);if(void 0!==n&&Gr(n,t)!==n)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return n},Gr=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},Wr=e=>{if(null!=e){if("string"==typeof e)return e;if(["boolean","number","bigint"].includes(typeof e))return Yr.warn(Kr(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)}},Kr=e=>String(new TypeError(e).stack||e).split("\n").slice(0,5).filter(e=>!e.includes("stackTraceWarning")).join("\n"),Yr={warn:console.warn},Jr=e=>e?.body instanceof ReadableStream,Qr=e=>void 0!==e.acquireInitialRetryToken&&void 0!==e.refreshRetryTokenForRetry&&void 0!==e.recordSuccess,Zr=e=>{const t={error:e,errorType:Xr(e)},n=ni(e.$response);return n&&(t.retryAfterHint=n),t},Xr=e=>Un(e)?"THROTTLING":Fn(e)?"TRANSIENT":(e=>{if(void 0!==e.$metadata?.httpStatusCode){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!Fn(e)}return!1})(e)?"SERVER_ERROR":"CLIENT_ERROR",ei={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},ti=e=>({applyToStack:t=>{t.add((e=>(t,n)=>async r=>{let i=await e.retryStrategy();const o=await e.maxAttempts();if(!Qr(i))return i?.mode&&(n.userAgent=[...n.userAgent||[],["cfg/retry-mode",i.mode]]),i.retry(t,r);{let e=await i.acquireInitialRetryToken(n.partition_id),s=new Error,a=0,c=0;const{request:u}=r,d=st.isInstance(u);for(d&&(u.headers[Hn]=er());;)try{d&&(u.headers[zn]=`attempt=${a+1}; max=${o}`);const{response:n,output:s}=await t(r);return i.recordSuccess(e),s.$metadata.attempts=a+1,s.$metadata.totalRetryDelay=c,{response:n,output:s}}catch(t){const r=Zr(t);if(s=tr(t),d&&Jr(u))throw(n.logger instanceof Nr?console:n.logger)?.warn("An error was encountered in a non-retryable streaming request."),s;try{e=await i.refreshRetryTokenForRetry(e,r)}catch(e){throw s.$metadata||(s.$metadata={}),s.$metadata.attempts=a+1,s.$metadata.totalRetryDelay=c,s}a=e.getRetryCount();const o=e.getRetryDelay();c+=o,await new Promise(e=>setTimeout(e,o))}}})(e),ei)}}),ni=e=>{if(!at.isInstance(e))return;const t=Object.keys(e.headers).find(e=>"retry-after"===e.toLowerCase());if(!t)return;const n=e.headers[t],r=Number(n);if(!Number.isNaN(r))return new Date(1e3*r);return new Date(n)};const ri=(ii=3e5,e=>oi(e)&&e.expiration.getTime()-Date.now()<ii);var ii;const oi=e=>void 0!==e.expiration,si=e=>"string"==typeof e?lr(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),ai="X-Amz-Date",ci="X-Amz-Signature",ui="X-Amz-Security-Token",di="authorization",li=ai.toLowerCase(),hi=[di,li,"date"],fi=ci.toLowerCase(),pi="x-amz-content-sha256",mi=ui.toLowerCase(),gi={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},yi=/^proxy-/,wi=/^sec-/,bi="AWS4-HMAC-SHA256",vi="AWS4-HMAC-SHA256-PAYLOAD",ki="aws4_request",Si={},Ei=[],Ai=(e,t,n)=>`${e}/${t}/${n}/${ki}`,Ii=(e,t,n)=>{const r=new e(t);return r.update(si(n)),r.digest()},xi=({headers:e},t,n)=>{const r={};for(const i of Object.keys(e).sort()){if(null==e[i])continue;const o=i.toLowerCase();(o in gi||t?.has(o)||yi.test(o)||wi.test(o))&&(!n||n&&!n.has(o))||(r[o]=e[i].trim().replace(/\s+/g," "))}return r},_i=async({headers:e,body:t},n)=>{for(const t of Object.keys(e))if(t.toLowerCase()===pi)return e[t];if(null==t)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof t||ArrayBuffer.isView(t)||(r=t,"function"==typeof ArrayBuffer&&r instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(r))){const e=new n;return e.update(si(t)),Ir(await e.digest())}var r;return"UNSIGNED-PAYLOAD"};class Ri{format(e){const t=[];for(const n of Object.keys(e)){const r=lr(n);t.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(e[n]))}const n=new Uint8Array(t.reduce((e,t)=>e+t.byteLength,0));let r=0;for(const e of t)n.set(e,r),r+=e.byteLength;return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":const r=new Uint8Array(9);return r[0]=5,r.set(e.value.bytes,1),r;case"binary":const i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);const o=new Uint8Array(i.buffer);return o.set(e.value,3),o;case"string":const s=lr(e.value),a=new DataView(new ArrayBuffer(3+s.byteLength));a.setUint8(0,7),a.setUint16(1,s.byteLength,!1);const c=new Uint8Array(a.buffer);return c.set(s,3),c;case"timestamp":const u=new Uint8Array(9);return u[0]=8,u.set(Ti.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!Pi.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const d=new Uint8Array(17);return d[0]=9,d.set(Ar(e.value.replace(/\-/g,"")),1),d}}}var Ci;!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(Ci||(Ci={}));const Pi=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Ti{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let n=7,r=Math.abs(Math.round(e));n>-1&&r>0;n--,r/=256)t[n]=r;return e<0&&Mi(t),new Ti(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&Mi(e),parseInt(Ir(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function Mi(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}const Oi=e=>{e=st.clone(e);for(const t of Object.keys(e.headers))hi.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},Li=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e;class $i{constructor({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:o=!0}){this.service=r,this.sha256=i,this.uriEscapePath=o,this.applyChecksum="boolean"!=typeof e||e,this.regionProvider=en(n),this.credentialProvider=en(t)}createCanonicalRequest(e,t,n){const r=Object.keys(t).sort();return`${e.method}\n${this.getCanonicalPath(e)}\n${(({query:e={}})=>{const t=[],n={};for(const r of Object.keys(e)){if(r.toLowerCase()===fi)continue;const i=mr(r);t.push(i);const o=e[r];"string"==typeof o?n[i]=`${i}=${mr(o)}`:Array.isArray(o)&&(n[i]=o.slice(0).reduce((e,t)=>e.concat([`${i}=${mr(t)}`]),[]).sort().join("&"))}return t.sort().map(e=>n[e]).filter(e=>e).join("&")})(e)}\n${r.map(e=>`${e}:${t[e]}`).join("\n")}\n\n${r.join(";")}\n${n}`}async createStringToSign(e,t,n,r){const i=new this.sha256;i.update(si(n));return`${r}\n${e}\n${t}\n${Ir(await i.digest())}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const t=[];for(const n of e.split("/"))0!==n?.length&&"."!==n&&(".."===n?t.pop():t.push(n));const n=`${e?.startsWith("/")?"/":""}${t.join("/")}${t.length>0&&e?.endsWith("/")?"/":""}`;return mr(n).replace(/%2F/g,"/")}return e}validateResolvedCredentials(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw new Error("Resolved credential object is not valid")}formatDate(e){const t=(n=e,Li(n).toISOString().replace(/\.\d{3}Z$/,"Z")).replace(/[\-:]/g,"");var n;return{longDate:t,shortDate:t.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(";")}}class Ni extends $i{constructor({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:o=!0}){super({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:o}),this.headerFormatter=new Ri}async presign(e,t={}){const{signingDate:n=new Date,expiresIn:r=3600,unsignableHeaders:i,unhoistableHeaders:o,signableHeaders:s,hoistableHeaders:a,signingRegion:c,signingService:u}=t,d=await this.credentialProvider();this.validateResolvedCredentials(d);const l=c??await this.regionProvider(),{longDate:h,shortDate:f}=this.formatDate(n);if(r>604800)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const p=Ai(f,l,u??this.service),m=((e,t={})=>{const{headers:n,query:r={}}=st.clone(e);for(const e of Object.keys(n)){const i=e.toLowerCase();("x-amz-"===i.slice(0,6)&&!t.unhoistableHeaders?.has(i)||t.hoistableHeaders?.has(i))&&(r[e]=n[e],delete n[e])}return{...e,headers:n,query:r}})(Oi(e),{unhoistableHeaders:o,hoistableHeaders:a});d.sessionToken&&(m.query[ui]=d.sessionToken),m.query["X-Amz-Algorithm"]=bi,m.query["X-Amz-Credential"]=`${d.accessKeyId}/${p}`,m.query[ai]=h,m.query["X-Amz-Expires"]=r.toString(10);const g=xi(m,i,s);return m.query["X-Amz-SignedHeaders"]=this.getCanonicalHeaderList(g),m.query[ci]=await this.getSignature(h,p,this.getSigningKey(d,l,f,u),this.createCanonicalRequest(m,g,await _i(e,this.sha256))),m}async sign(e,t){return"string"==typeof e?this.signString(e,t):e.headers&&e.payload?this.signEvent(e,t):e.message?this.signMessage(e,t):this.signRequest(e,t)}async signEvent({headers:e,payload:t},{signingDate:n=new Date,priorSignature:r,signingRegion:i,signingService:o}){const s=i??await this.regionProvider(),{shortDate:a,longDate:c}=this.formatDate(n),u=Ai(a,s,o??this.service),d=await _i({headers:{},body:t},this.sha256),l=new this.sha256;l.update(e);const h=Ir(await l.digest()),f=[vi,c,u,r,h,d].join("\n");return this.signString(f,{signingDate:n,signingRegion:s,signingService:o})}async signMessage(e,{signingDate:t=new Date,signingRegion:n,signingService:r}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:n,signingService:r,priorSignature:e.priorSignature}).then(t=>({message:e.message,signature:t}))}async signString(e,{signingDate:t=new Date,signingRegion:n,signingService:r}={}){const i=await this.credentialProvider();this.validateResolvedCredentials(i);const o=n??await this.regionProvider(),{shortDate:s}=this.formatDate(t),a=new this.sha256(await this.getSigningKey(i,o,s,r));return a.update(si(e)),Ir(await a.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:n,unsignableHeaders:r,signingRegion:i,signingService:o}={}){const s=await this.credentialProvider();this.validateResolvedCredentials(s);const a=i??await this.regionProvider(),c=Oi(e),{longDate:u,shortDate:d}=this.formatDate(t),l=Ai(d,a,o??this.service);c.headers[li]=u,s.sessionToken&&(c.headers[mi]=s.sessionToken);const h=await _i(c,this.sha256);!((e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1})(pi,c.headers)&&this.applyChecksum&&(c.headers[pi]=h);const f=xi(c,r,n),p=await this.getSignature(u,l,this.getSigningKey(s,a,d,o),this.createCanonicalRequest(c,f,h));return c.headers[di]=`${bi} Credential=${s.accessKeyId}/${l}, SignedHeaders=${this.getCanonicalHeaderList(f)}, Signature=${p}`,c}async getSignature(e,t,n,r){const i=await this.createStringToSign(e,t,r,bi),o=new this.sha256(await n);return o.update(si(i)),Ir(await o.digest())}getSigningKey(e,t,n,r){return(async(e,t,n,r,i)=>{const o=`${n}:${r}:${i}:${Ir(await Ii(e,t.secretAccessKey,t.accessKeyId))}:${t.sessionToken}`;if(o in Si)return Si[o];for(Ei.push(o);Ei.length>50;)delete Si[Ei.shift()];let s=`AWS4${t.secretAccessKey}`;for(const t of[n,r,i,ki])s=await Ii(e,s,t);return Si[o]=s})(this.sha256,e,n,t,r||this.service)}}const Di=e=>{let t,n=e.credentials,r=!!e.credentials;Object.defineProperty(e,"credentials",{set(i){i&&i!==n&&i!==t&&(r=!0),n=i;const o=function(e,{credentials:t,credentialDefaultProvider:n}){let r;r=t?t?.memoized?t:((e,t,n)=>{if(void 0===e)return;const r="function"!=typeof e?async()=>Promise.resolve(e):e;let i,o,s,a=!1;const c=async e=>{o||(o=r(e));try{i=await o,s=!0,a=!1}finally{o=void 0}return i};return void 0===t?async e=>(s&&!e?.forceRefresh||(i=await c(e)),i):async e=>(s&&!e?.forceRefresh||(i=await c(e)),a?i:n(i)?t(i)?(await c(e),i):i:(a=!0,i))})(t,ri,oi):n?pt(n(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")};return r.memoized=!0,r}(e,{credentials:n,credentialDefaultProvider:e.credentialDefaultProvider}),s=function(e,t){if(t.configBound)return t;const n=async n=>t({...n,callerClientConfig:e});return n.memoized=t.memoized,n.configBound=!0,n}(e,o);r&&!s.attributed?(t=async e=>s(e).then(e=>function(e,t,n){return e.$source||(e.$source={}),e.$source[t]=n,e}(e,"CREDENTIALS_CODE","e")),t.memoized=s.memoized,t.configBound=s.configBound,t.attributed=!0):t=s},get:()=>t,enumerable:!0,configurable:!0}),e.credentials=n;const{signingEscapePath:i=!0,systemClockOffset:o=e.systemClockOffset||0,sha256:s}=e;let a;a=e.signer?pt(e.signer):e.regionInfoProvider?()=>pt(e.region)().then(async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t]).then(([t,n])=>{const{signingRegion:r,signingService:o}=t;e.signingRegion=e.signingRegion||r||n,e.signingName=e.signingName||o||e.serviceId;const a={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:s,uriEscapePath:i};return new(e.signerConstructor||Ni)(a)}):async t=>{const n=(t=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await pt(e.region)(),properties:{}},t)).signingRegion,r=t.signingName;e.signingRegion=e.signingRegion||n,e.signingName=e.signingName||r||e.serviceId;const o={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:s,uriEscapePath:i};return new(e.signerConstructor||Ni)(o)};return Object.assign(e,{systemClockOffset:o,signingEscapePath:i,signer:a})};const Ui=async(e,t,n)=>({operation:Xt(t).operation,region:await en(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const Fi=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"bedrock",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},Bi={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},ji="3.823.0";var qi="undefined"!=typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:e=>(new TextEncoder).encode(e);function Hi(e){return e instanceof Uint8Array?e:"string"==typeof e?qi(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function zi(e){return"string"==typeof e?0===e.length:0===e.byteLength}var Vi={name:"SHA-256"},Gi={name:"HMAC",hash:Vi},Wi=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85]);const Ki={};function Yi(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:Ki}var Ji=function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!zi(e)){var t=Hi(e),n=new Uint8Array(this.toHash.byteLength+t.byteLength);n.set(this.toHash,0),n.set(t,this.toHash.byteLength),this.toHash=n}},e.prototype.digest=function(){var e=this;return this.key?this.key.then(function(t){return Yi().crypto.subtle.sign(Gi,t,e.toHash).then(function(e){return new Uint8Array(e)})}):zi(this.toHash)?Promise.resolve(Wi):Promise.resolve().then(function(){return Yi().crypto.subtle.digest(Vi,e.toHash)}).then(function(e){return Promise.resolve(new Uint8Array(e))})},e.prototype.reset=function(){var e=this;this.toHash=new Uint8Array(0),this.secret&&void 0!==this.secret&&(this.key=new Promise(function(t,n){Yi().crypto.subtle.importKey("raw",Hi(e.secret),Gi,!1,["sign"]).then(t,n)}),this.key.catch(function(){}))},e}();function Qi(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}c((r=r.apply(e,t||[])).next())})}function Zi(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}Object.create;function Xi(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}Object.create;"function"==typeof SuppressedError&&SuppressedError;var eo=64,to=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),no=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],ro=Math.pow(2,53)-1,io=function(){function e(){this.state=Int32Array.from(no),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>ro)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===eo&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%eo>=56){for(var r=this.bufferLength;r<eo;r++)t.setUint8(r,0);this.hashBuffer(),this.bufferLength=0}for(r=this.bufferLength;r<56;r++)t.setUint8(r,0);t.setUint32(56,Math.floor(e/4294967296),!0),t.setUint32(60,e),this.hashBuffer(),this.finished=!0}var i=new Uint8Array(32);for(r=0;r<8;r++)i[4*r]=this.state[r]>>>24&255,i[4*r+1]=this.state[r]>>>16&255,i[4*r+2]=this.state[r]>>>8&255,i[4*r+3]=this.state[r]>>>0&255;return i},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],r=t[1],i=t[2],o=t[3],s=t[4],a=t[5],c=t[6],u=t[7],d=0;d<eo;d++){if(d<16)this.temp[d]=(255&e[4*d])<<24|(255&e[4*d+1])<<16|(255&e[4*d+2])<<8|255&e[4*d+3];else{var l=this.temp[d-2],h=(l>>>17|l<<15)^(l>>>19|l<<13)^l>>>10,f=((l=this.temp[d-15])>>>7|l<<25)^(l>>>18|l<<14)^l>>>3;this.temp[d]=(h+this.temp[d-7]|0)+(f+this.temp[d-16]|0)}var p=(((s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+(s&a^~s&c)|0)+(u+(to[d]+this.temp[d]|0)|0)|0,m=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&r^n&i^r&i)|0;u=c,c=a,a=s,s=o+p|0,o=i,i=r,r=n,n=p+m|0}t[0]+=n,t[1]+=r,t[2]+=i,t[3]+=o,t[4]+=s,t[5]+=a,t[6]+=c,t[7]+=u},e}(),oo=function(){function e(e){this.secret=e,this.hash=new io,this.reset()}return e.prototype.update=function(e){if(!zi(e)&&!this.error)try{this.hash.update(Hi(e))}catch(e){this.error=e}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return Qi(this,void 0,void 0,function(){return Zi(this,function(e){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new io,this.secret){this.outer=new io;var e=function(e){var t=Hi(e);if(t.byteLength>eo){var n=new io;n.update(t),t=n.digest()}var r=new Uint8Array(eo);return r.set(t),r}(this.secret),t=new Uint8Array(eo);t.set(e);for(var n=0;n<eo;n++)e[n]^=54,t[n]^=92;this.hash.update(e),this.outer.update(t);for(n=0;n<e.byteLength;n++)e[n]=0}},e}();var so=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function ao(e){return e&&so.every(function(t){return"function"==typeof e[t]})}var co=function(){function e(e){!function(e){return!(!function(e){return"object"==typeof e&&"object"==typeof e.crypto&&"function"==typeof e.crypto.getRandomValues}(e)||"object"!=typeof e.crypto.subtle)&&ao(e.crypto.subtle)}(Yi())?this.hash=new oo(e):this.hash=new Ji(e)}return e.prototype.update=function(e,t){this.hash.update(Hi(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}(),uo=n(369),lo=n.n(uo);const ho=({serviceId:e,clientVersion:t})=>async n=>{const r="undefined"!=typeof window&&window?.navigator?.userAgent?lo().parse(window.navigator.userAgent):void 0,i=[["aws-sdk-js",t],["ua","2.1"],[`os/${r?.os?.name||"other"}`,r?.os?.version],["lang/js"],["md/browser",`${r?.browser?.name??"unknown"}_${r?.browser?.version??"unknown"}`]];e&&i.push([`api/${e}`,t]);const o=await(n?.userAgentAppId?.());return o&&i.push([`app/${o}`]),i};!function(){function e(){this.crc32=new po}e.prototype.update=function(e){zi(e)||this.crc32.update(Hi(e))},e.prototype.digest=function(){return Qi(this,void 0,void 0,function(){return Zi(this,function(e){return[2,(t=this.crc32.digest(),new Uint8Array([(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t]))];var t})})},e.prototype.reset=function(){this.crc32=new po}}();var fo,po=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,n;try{for(var r=Xi(e),i=r.next();!i.done;i=r.next()){var o=i.value;this.checksum=this.checksum>>>8^mo[255&(this.checksum^o)]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(4294967295^this.checksum)>>>0},e}(),mo=function(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),n=0;n<e.length;)t[n]=e[n],n+=1;return t}return Uint32Array.from(e)}([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);class go{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let n=7,r=Math.abs(Math.round(e));n>-1&&r>0;n--,r/=256)t[n]=r;return e<0&&yo(t),new go(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&yo(e),parseInt(Ir(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function yo(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}class wo{constructor(e,t){this.toUtf8=e,this.fromUtf8=t}format(e){const t=[];for(const n of Object.keys(e)){const r=this.fromUtf8(n);t.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(e[n]))}const n=new Uint8Array(t.reduce((e,t)=>e+t.byteLength,0));let r=0;for(const e of t)n.set(e,r),r+=e.byteLength;return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":const r=new Uint8Array(9);return r[0]=5,r.set(e.value.bytes,1),r;case"binary":const i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);const o=new Uint8Array(i.buffer);return o.set(e.value,3),o;case"string":const s=this.fromUtf8(e.value),a=new DataView(new ArrayBuffer(3+s.byteLength));a.setUint8(0,7),a.setUint16(1,s.byteLength,!1);const c=new Uint8Array(a.buffer);return c.set(s,3),c;case"timestamp":const u=new Uint8Array(9);return u[0]=8,u.set(go.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!Ro.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const d=new Uint8Array(17);return d[0]=9,d.set(Ar(e.value.replace(/\-/g,"")),1),d}}parse(e){const t={};let n=0;for(;n<e.byteLength;){const r=e.getUint8(n++),i=this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,r));switch(n+=r,e.getUint8(n++)){case 0:t[i]={type:bo,value:!0};break;case 1:t[i]={type:bo,value:!1};break;case 2:t[i]={type:vo,value:e.getInt8(n++)};break;case 3:t[i]={type:ko,value:e.getInt16(n,!1)},n+=2;break;case 4:t[i]={type:So,value:e.getInt32(n,!1)},n+=4;break;case 5:t[i]={type:Eo,value:new go(new Uint8Array(e.buffer,e.byteOffset+n,8))},n+=8;break;case 6:const r=e.getUint16(n,!1);n+=2,t[i]={type:Ao,value:new Uint8Array(e.buffer,e.byteOffset+n,r)},n+=r;break;case 7:const o=e.getUint16(n,!1);n+=2,t[i]={type:Io,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,o))},n+=o;break;case 8:t[i]={type:xo,value:new Date(new go(new Uint8Array(e.buffer,e.byteOffset+n,8)).valueOf())},n+=8;break;case 9:const s=new Uint8Array(e.buffer,e.byteOffset+n,16);n+=16,t[i]={type:_o,value:`${Ir(s.subarray(0,4))}-${Ir(s.subarray(4,6))}-${Ir(s.subarray(6,8))}-${Ir(s.subarray(8,10))}-${Ir(s.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return t}}!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(fo||(fo={}));const bo="boolean",vo="byte",ko="short",So="integer",Eo="long",Ao="binary",Io="string",xo="timestamp",_o="uuid",Ro=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Co{constructor(e,t){this.headerMarshaller=new wo(e,t),this.messageBuffer=[],this.isEndOfStream=!1}feed(e){this.messageBuffer.push(this.decode(e))}endOfStream(){this.isEndOfStream=!0}getMessage(){const e=this.messageBuffer.pop(),t=this.isEndOfStream;return{getMessage:()=>e,isEndOfStream:()=>t}}getAvailableMessages(){const e=this.messageBuffer;this.messageBuffer=[];const t=this.isEndOfStream;return{getMessages:()=>e,isEndOfStream:()=>t}}encode({headers:e,body:t}){const n=this.headerMarshaller.format(e),r=n.byteLength+t.byteLength+16,i=new Uint8Array(r),o=new DataView(i.buffer,i.byteOffset,i.byteLength),s=new po;return o.setUint32(0,r,!1),o.setUint32(4,n.byteLength,!1),o.setUint32(8,s.update(i.subarray(0,8)).digest(),!1),i.set(n,12),i.set(t,n.byteLength+12),o.setUint32(r-4,s.update(i.subarray(8,r-4)).digest(),!1),i}decode(e){const{headers:t,body:n}=function({byteLength:e,byteOffset:t,buffer:n}){if(e<16)throw new Error("Provided message too short to accommodate event stream message overhead");const r=new DataView(n,t,e),i=r.getUint32(0,!1);if(e!==i)throw new Error("Reported message length does not match received message length");const o=r.getUint32(4,!1),s=r.getUint32(8,!1),a=r.getUint32(e-4,!1),c=(new po).update(new Uint8Array(n,t,8));if(s!==c.digest())throw new Error(`The prelude checksum specified in the message (${s}) does not match the calculated CRC32 checksum (${c.digest()})`);if(c.update(new Uint8Array(n,t+8,e-12)),a!==c.digest())throw new Error(`The message checksum (${c.digest()}) did not match the expected value of ${a}`);return{headers:new DataView(n,t+8+4,o),body:new Uint8Array(n,t+8+4+o,i-o-16)}}(e);return{headers:this.headerMarshaller.parse(t),body:n}}formatHeaders(e){return this.headerMarshaller.format(e)}}class Po{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.decoder.decode(e);yield t}}}class To{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=this.options.encoder.encode(e);yield t}this.options.includeEndFrame&&(yield new Uint8Array(0))}}class Mo{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=await this.options.deserializer(e);void 0!==t&&(yield t)}}}class Oo{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.serializer(e);yield t}}}function Lo(e,t){return async function(n){const{value:r}=n.headers[":message-type"];if("error"===r){const e=new Error(n.headers[":error-message"].value||"UnknownError");throw e.name=n.headers[":error-code"].value,e}if("exception"===r){const r=n.headers[":exception-type"].value,i={[r]:n},o=await e(i);if(o.$unknown){const e=new Error(t(n.body));throw e.name=r,e}throw o[r]}if("event"===r){const t={[n.headers[":event-type"].value]:n},r=await e(t);if(r.$unknown)return;return r}throw Error(`Unrecognizable event type: ${n.headers[":event-type"].value}`)}}class $o{constructor({utf8Encoder:e,utf8Decoder:t}){this.eventStreamCodec=new Co(e,t),this.utfEncoder=e}deserialize(e,t){const n=function(e){let t=0,n=0,r=null,i=null;const o=e=>{if("number"!=typeof e)throw new Error("Attempted to allocate an event message where size was not a number: "+e);t=e,n=4,r=new Uint8Array(e),new DataView(r.buffer).setUint32(0,e,!1)};return{[Symbol.asyncIterator]:async function*(){const s=e[Symbol.asyncIterator]();for(;;){const{value:e,done:a}=await s.next();if(a){if(!t)return;if(t!==n)throw new Error("Truncated event message received.");return void(yield r)}const c=e.length;let u=0;for(;u<c;){if(!r){const t=c-u;i||(i=new Uint8Array(4));const r=Math.min(4-n,t);if(i.set(e.slice(u,u+r),n),n+=r,u+=r,n<4)break;o(new DataView(i.buffer).getUint32(0,!1)),i=null}const s=Math.min(t-n,c-u);r.set(e.slice(u,u+s),n),n+=s,u+=s,t&&t===n&&(yield r,r=null,t=0,n=0)}}}}}(e);return new Mo({messageStream:new Po({inputStream:n,decoder:this.eventStreamCodec}),deserializer:Lo(t,this.utfEncoder)})}serialize(e,t){return new To({messageStream:new Oo({inputStream:e,serializer:t}),encoder:this.eventStreamCodec,includeEndFrame:!0})}}class No{constructor({utf8Encoder:e,utf8Decoder:t}){this.universalMarshaller=new $o({utf8Decoder:t,utf8Encoder:e})}deserialize(e,t){const n=Do(e)?(r=e,{[Symbol.asyncIterator]:async function*(){const e=r.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t)return;yield n}}finally{e.releaseLock()}}}):e;var r;return this.universalMarshaller.deserialize(n,t)}serialize(e,t){const n=this.universalMarshaller.serialize(e,t);return"function"==typeof ReadableStream?(e=>{const t=e[Symbol.asyncIterator]();return new ReadableStream({async pull(e){const{done:n,value:r}=await t.next();if(n)return e.close();e.enqueue(r)}})})(n):n}}const Do=e=>"function"==typeof ReadableStream&&e instanceof ReadableStream,Uo=e=>new No(e),Fo="function"==typeof TextEncoder?new TextEncoder:null,Bo=e=>{if("string"==typeof e){if(Fo)return Fo.encode(e).byteLength;let t=e.length;for(let n=t-1;n>=0;n--){const r=e.charCodeAt(n);r>127&&r<=2047?t++:r>2047&&r<=65535&&(t+=2),r>=56320&&r<=57343&&n--}return t}if("number"==typeof e.byteLength)return e.byteLength;if("number"==typeof e.size)return e.size;throw new Error(`Body Length computation failed for ${e}`)},jo=e=>new Date(Date.now()+e),qo=e=>at.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,Ho=(e,t)=>{const n=Date.parse(e);return((e,t)=>Math.abs(jo(t).getTime()-e)>=3e5)(n,t)?n-Date.now():t},zo=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t};class Vo{async sign(e,t,n){if(!st.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const r=await(async e=>{const t=zo("context",e.context),n=zo("config",e.config),r=t.endpointV2?.properties?.authSchemes?.[0],i=zo("signer",n.signer),o=await i(r),s=e?.signingRegion,a=e?.signingRegionSet,c=e?.signingName;return{config:n,signer:o,signingRegion:s,signingRegionSet:a,signingName:c}})(n),{config:i,signer:o}=r;let{signingRegion:s,signingName:a}=r;const c=n.context;if(c?.authSchemes?.length){const[e,t]=c.authSchemes;"sigv4a"===e?.name&&"sigv4"===t?.name&&(s=t?.signingRegion??s,a=t?.signingName??a)}return await o.sign(e,{signingDate:jo(i.systemClockOffset),signingRegion:s,signingService:a})}errorHandler(e){return t=>{const n=t.ServerTime??qo(t.$response);if(n){const r=zo("config",e.config),i=r.systemClockOffset;r.systemClockOffset=Ho(n,r.systemClockOffset);r.systemClockOffset!==i&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const n=qo(e);if(n){const e=zo("config",t.config);e.systemClockOffset=Ho(n,e.systemClockOffset)}}}const Go="required",Wo="fn",Ko="argv",Yo="ref",Jo=!0,Qo="isSet",Zo="booleanEquals",Xo="error",es="endpoint",ts="tree",ns="PartitionResult",rs={[Go]:!1,type:"String"},is={[Go]:!0,default:!1,type:"Boolean"},os={[Yo]:"Endpoint"},ss={[Wo]:Zo,[Ko]:[{[Yo]:"UseFIPS"},!0]},as={[Wo]:Zo,[Ko]:[{[Yo]:"UseDualStack"},!0]},cs={},us={[Wo]:"getAttr",[Ko]:[{[Yo]:ns},"supportsFIPS"]},ds={[Wo]:Zo,[Ko]:[!0,{[Wo]:"getAttr",[Ko]:[{[Yo]:ns},"supportsDualStack"]}]},ls=[ss],hs=[as],fs=[{[Yo]:"Region"}],ps={version:"1.0",parameters:{Region:rs,UseDualStack:is,UseFIPS:is,Endpoint:rs},rules:[{conditions:[{[Wo]:Qo,[Ko]:[os]}],rules:[{conditions:ls,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Xo},{rules:[{conditions:hs,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Xo},{endpoint:{url:os,properties:cs,headers:cs},type:es}],type:ts}],type:ts},{rules:[{conditions:[{[Wo]:Qo,[Ko]:fs}],rules:[{conditions:[{[Wo]:"aws.partition",[Ko]:fs,assign:ns}],rules:[{conditions:[ss,as],rules:[{conditions:[{[Wo]:Zo,[Ko]:[Jo,us]},ds],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:cs,headers:cs},type:es}],type:ts}],type:ts},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Xo}],type:ts},{conditions:ls,rules:[{conditions:[{[Wo]:Zo,[Ko]:[us,Jo]}],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dnsSuffix}",properties:cs,headers:cs},type:es}],type:ts}],type:ts},{error:"FIPS is enabled but this partition does not support FIPS",type:Xo}],type:ts},{conditions:hs,rules:[{conditions:[ds],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:cs,headers:cs},type:es}],type:ts}],type:ts},{error:"DualStack is enabled but this partition does not support DualStack",type:Xo}],type:ts},{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dnsSuffix}",properties:cs,headers:cs},type:es}],type:ts}],type:ts}],type:ts},{error:"Invalid Configuration: Missing Region",type:Xo}],type:ts}]},ms=new class{constructor({size:e,params:t}){this.data=new Map,this.parameters=[],this.capacity=e??50,t&&(this.parameters=t)}get(e,t){const n=this.hash(e);if(!1===n)return t();if(!this.data.has(n)){if(this.data.size>this.capacity+10){const e=this.data.keys();let t=0;for(;;){const{value:n,done:r}=e.next();if(this.data.delete(n),r||++t>10)break}}this.data.set(n,t())}return this.data.get(n)}size(){return this.data.size}hash(e){let t="";const{parameters:n}=this;if(0===n.length)return!1;for(const r of n){const n=String(e[r]??"");if(n.includes("|;"))return!1;t+=n+"|;"}return t}}({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),gs=(e,t={})=>ms.get(e,()=>((e,t)=>{const{endpointParams:n,logger:r}=t,{parameters:i,rules:o}=e;t.logger?.debug?.(`${vt} Initial EndpointParams: ${kt(n)}`);const s=Object.entries(i).filter(([,e])=>null!=e.default).map(([e,t])=>[e,t.default]);if(s.length>0)for(const[e,t]of s)n[e]=n[e]??t;const a=Object.entries(i).filter(([,e])=>e.required).map(([e])=>e);for(const e of a)if(null==n[e])throw new St(`Missing required parameter: '${e}'`);const c=Ut(o,{endpointParams:n,logger:r,referenceRecord:{}});return t.logger?.debug?.(`${vt} Resolved endpoint: ${kt(c)}`),c})(ps,{endpointParams:e,logger:t.logger}));bt.aws=qt;Error;const ys=["in-region","cross-region","mobile","standard","legacy"],ws=()=>{const e="undefined"!=typeof window&&window?.navigator?.userAgent?lo().parse(window.navigator.userAgent):void 0,t=e?.platform?.type;return"tablet"===t||"mobile"===t},bs=e=>{const t=(({defaultsMode:e}={})=>((e,t,n)=>{let r,i,o,s=!1;const a=async()=>{i||(i=e());try{r=await i,o=!0,s=!1}finally{i=void 0}return r};return void 0===t?async e=>(o&&!e?.forceRefresh||(r=await a()),r):async e=>(o&&!e?.forceRefresh||(r=await a()),s?r:n&&!n(r)?(s=!0,r):t(r)?(await a(),r):r)})(async()=>{const t="function"==typeof e?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(ws()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(t?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${ys.join(", ")}, got ${t}`)}}))(e),n=()=>t().then(Or),r=(e=>({apiVersion:"2023-09-30",base64Decoder:e?.base64Decoder??dr,base64Encoder:e?.base64Encoder??hr,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??gs,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Fi,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Vo}],logger:e?.logger??new Nr,serviceId:e?.serviceId??"Bedrock Runtime",urlParser:e?.urlParser??kn,utf8Decoder:e?.utf8Decoder??lr,utf8Encoder:e?.utf8Encoder??fr}))(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??Bo,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??ho({serviceId:r.serviceId,clientVersion:ji}),eventStreamPayloadHandlerProvider:e?.eventStreamPayloadHandlerProvider??(()=>{return{handle:(e="event stream request is not supported in browser.",()=>{throw new Error(e)})};var e}),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??Uo,maxAttempts:e?.maxAttempts??3,region:e?.region??(i="Region is missing",()=>Promise.reject(i)),requestHandler:vr.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||Mn),sha256:e?.sha256??co,streamCollector:e?.streamCollector??kr,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(false)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(false))};var i},vs=(e,t)=>{const n=Object.assign((e=>({setRegion(t){e.region=t},region:()=>e.region}))(e),Lr(e),(e=>({setHttpHandler(t){e.httpHandler=t},httpHandler:()=>e.httpHandler,updateHttpClientConfig(t,n){e.httpHandler?.updateHttpClientConfig(t,n)},httpHandlerConfigs:()=>e.httpHandler.httpHandlerConfigs()}))(e),(e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex(t=>t.schemeId===e.schemeId);-1===n?t.push(e):t.splice(n,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider:()=>n,setCredentials(e){r=e},credentials:()=>r}})(e));return t.forEach(e=>e.configure(n)),Object.assign(e,{region:n.region()},(r=n,Object.assign((e=>{const t={};return e.checksumAlgorithms().forEach(e=>{t[e.algorithmId()]=e.checksumConstructor()}),t})(r),(e=>{const t={};return t.retryStrategy=e.retryStrategy(),t})(r))),{httpHandler:n.httpHandler()},(e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}))(n));var r};class ks extends ar{config;constructor(...[e]){const t=bs(e||{});super(t),this.initConfig=t;const n=(e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"bedrock"}))(t),r=function(e){const t=pt(e.userAgentAppId??void 0),{customUserAgent:n}=e;return Object.assign(e,{customUserAgent:"string"==typeof n?[[n]]:n,userAgentAppId:async()=>{const n=await t();if(!function(e){return void 0===e||"string"==typeof e&&e.length<=50}(n)){const t="NoOpLogger"!==e.logger?.constructor?.name&&e.logger?e.logger:console;"string"!=typeof n?t?.warn("userAgentAppId must be a string or undefined."):n.length>50&&t?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return n}})}(n),i=(e=>{const{retryStrategy:t,retryMode:n,maxAttempts:r}=e,i=en(r??3);return Object.assign(e,{maxAttempts:i,retryStrategy:async()=>t||(await en(n)()===Tn.ADAPTIVE?new Wn(i):new Gn(i))})})(r),o=(e=>{const{region:t,useFipsEndpoint:n}=e;if(!t)throw new Error("Region is missing");return Object.assign(e,{region:async()=>{if("string"==typeof t)return nn(t);const e=await t();return nn(e)},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!tn(e)||("function"!=typeof n?Promise.resolve(!!n):n())}})})(i),s=(e=>{const t=e.tls??!0,{endpoint:n,useDualstackEndpoint:r,useFipsEndpoint:i}=e,o=null!=n?async()=>Sn(await en(n)()):void 0,s=!!n,a=Object.assign(e,{endpoint:o,tls:t,isCustomEndpoint:s,useDualstackEndpoint:en(r??!1),useFipsEndpoint:en(i??!1)});let c;return a.serviceConfiguredEndpoint=async()=>(e.serviceId&&!c&&(c=vn(e.serviceId)),c),a})(o);var a;const c=(e=>{const t=Di(e);return Object.assign(t,{authSchemePreference:en(e.authSchemePreference??[])})})((a=s,Object.assign(a,{eventStreamMarshaller:a.eventStreamSerdeProvider(a)}))),u=function(e){const t=e.signer,n=e.signer,r=Object.assign(e,{eventSigner:t,messageSigner:n}),i=r.eventStreamPayloadHandlerProvider(r);return Object.assign(r,{eventStreamPayloadHandler:i})}(c),d=vs(u,e?.extensions||[]);var l;this.config=d,this.middlewareStack.use((l=this.config,{applyToStack:e=>{e.add(Yt(l),Qt)}})),this.middlewareStack.use(ti(this.config)),this.middlewareStack.use(fn(this.config)),this.middlewareStack.use(ut(this.config)),this.middlewareStack.use((this.config,{applyToStack:e=>{e.add((e,t)=>async n=>{try{const r=await e(n),{clientName:i,commandName:o,logger:s,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:u}=a,d=c??t.inputFilterSensitiveLog,l=u??t.outputFilterSensitiveLog,{$metadata:h,...f}=r.output;return s?.info?.({clientName:i,commandName:o,input:d(n.input),output:l(f),metadata:h}),r}catch(e){const{clientName:r,commandName:i,logger:o,dynamoDbDocumentClientOptions:s={}}=t,{overrideInputFilterSensitiveLog:a}=s,c=a??t.inputFilterSensitiveLog;throw o?.error?.({clientName:r,commandName:i,input:c(n.input),error:e,metadata:e.$metadata}),e}},dt)}})),this.middlewareStack.use(ft(this.config)),this.middlewareStack.use(((e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:r=>{r.addRelativeTo(rn(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),on)}}))(this.config,{httpAuthSchemeParametersProvider:Ui,identityProviderConfigProvider:async e=>new sn({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(dn(this.config))}destroy(){super.destroy()}}class Ss extends Pr{constructor(e){super(e),Object.setPrototypeOf(this,Ss.prototype)}}class Es extends Ss{name="AccessDeniedException";$fault="client";constructor(e){super({name:"AccessDeniedException",$fault:"client",...e}),Object.setPrototypeOf(this,Es.prototype)}}var As;!function(e){e.visit=(e,t)=>void 0!==e.s3OutputDataConfig?t.s3OutputDataConfig(e.s3OutputDataConfig):t._(e.$unknown[0],e.$unknown[1])}(As||(As={}));class Is extends Ss{name="InternalServerException";$fault="server";constructor(e){super({name:"InternalServerException",$fault:"server",...e}),Object.setPrototypeOf(this,Is.prototype)}}class xs extends Ss{name="ThrottlingException";$fault="client";constructor(e){super({name:"ThrottlingException",$fault:"client",...e}),Object.setPrototypeOf(this,xs.prototype)}}class _s extends Ss{name="ValidationException";$fault="client";constructor(e){super({name:"ValidationException",$fault:"client",...e}),Object.setPrototypeOf(this,_s.prototype)}}class Rs extends Ss{name="ConflictException";$fault="client";constructor(e){super({name:"ConflictException",$fault:"client",...e}),Object.setPrototypeOf(this,Rs.prototype)}}class Cs extends Ss{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,Cs.prototype)}}class Ps extends Ss{name="ServiceQuotaExceededException";$fault="client";constructor(e){super({name:"ServiceQuotaExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,Ps.prototype)}}class Ts extends Ss{name="ServiceUnavailableException";$fault="server";constructor(e){super({name:"ServiceUnavailableException",$fault:"server",...e}),Object.setPrototypeOf(this,Ts.prototype)}}var Ms;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):t._(e.$unknown[0],e.$unknown[1])}(Ms||(Ms={}));var Os;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):t._(e.$unknown[0],e.$unknown[1])}(Os||(Os={}));var Ls;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):void 0!==e.s3Location?t.s3Location(e.s3Location):t._(e.$unknown[0],e.$unknown[1])}(Ls||(Ls={}));var $s;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):t._(e.$unknown[0],e.$unknown[1])}($s||($s={}));var Ns;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):t._(e.$unknown[0],e.$unknown[1])}(Ns||(Ns={}));var Ds,Us;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):void 0!==e.s3Location?t.s3Location(e.s3Location):t._(e.$unknown[0],e.$unknown[1])}(Ds||(Ds={})),function(e){e.visit=(e,t)=>void 0!==e.reasoningText?t.reasoningText(e.reasoningText):void 0!==e.redactedContent?t.redactedContent(e.redactedContent):t._(e.$unknown[0],e.$unknown[1])}(Us||(Us={}));var Fs,Bs;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):void 0!==e.s3Location?t.s3Location(e.s3Location):t._(e.$unknown[0],e.$unknown[1])}(Fs||(Fs={})),function(e){e.visit=(e,t)=>void 0!==e.json?t.json(e.json):void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):void 0!==e.document?t.document(e.document):void 0!==e.video?t.video(e.video):t._(e.$unknown[0],e.$unknown[1])}(Bs||(Bs={}));var js;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):void 0!==e.document?t.document(e.document):void 0!==e.video?t.video(e.video):void 0!==e.toolUse?t.toolUse(e.toolUse):void 0!==e.toolResult?t.toolResult(e.toolResult):void 0!==e.guardContent?t.guardContent(e.guardContent):void 0!==e.cachePoint?t.cachePoint(e.cachePoint):void 0!==e.reasoningContent?t.reasoningContent(e.reasoningContent):t._(e.$unknown[0],e.$unknown[1])}(js||(js={}));var qs,Hs,zs,Vs,Gs,Ws;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):t._(e.$unknown[0],e.$unknown[1])}(qs||(qs={})),function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.guardContent?t.guardContent(e.guardContent):void 0!==e.cachePoint?t.cachePoint(e.cachePoint):t._(e.$unknown[0],e.$unknown[1])}(Hs||(Hs={})),function(e){e.visit=(e,t)=>void 0!==e.auto?t.auto(e.auto):void 0!==e.any?t.any(e.any):void 0!==e.tool?t.tool(e.tool):t._(e.$unknown[0],e.$unknown[1])}(zs||(zs={})),function(e){e.visit=(e,t)=>void 0!==e.json?t.json(e.json):t._(e.$unknown[0],e.$unknown[1])}(Vs||(Vs={})),function(e){e.visit=(e,t)=>void 0!==e.toolSpec?t.toolSpec(e.toolSpec):void 0!==e.cachePoint?t.cachePoint(e.cachePoint):t._(e.$unknown[0],e.$unknown[1])}(Gs||(Gs={})),function(e){e.visit=(e,t)=>void 0!==e.message?t.message(e.message):t._(e.$unknown[0],e.$unknown[1])}(Ws||(Ws={}));class Ks extends Ss{name="ModelErrorException";$fault="client";originalStatusCode;resourceName;constructor(e){super({name:"ModelErrorException",$fault:"client",...e}),Object.setPrototypeOf(this,Ks.prototype),this.originalStatusCode=e.originalStatusCode,this.resourceName=e.resourceName}}class Ys extends Ss{name="ModelNotReadyException";$fault="client";$retryable={};constructor(e){super({name:"ModelNotReadyException",$fault:"client",...e}),Object.setPrototypeOf(this,Ys.prototype)}}class Js extends Ss{name="ModelTimeoutException";$fault="client";constructor(e){super({name:"ModelTimeoutException",$fault:"client",...e}),Object.setPrototypeOf(this,Js.prototype)}}var Qs,Zs,Xs,ea;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.redactedContent?t.redactedContent(e.redactedContent):void 0!==e.signature?t.signature(e.signature):t._(e.$unknown[0],e.$unknown[1])}(Qs||(Qs={})),function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.toolUse?t.toolUse(e.toolUse):void 0!==e.reasoningContent?t.reasoningContent(e.reasoningContent):t._(e.$unknown[0],e.$unknown[1])}(Zs||(Zs={})),function(e){e.visit=(e,t)=>void 0!==e.toolUse?t.toolUse(e.toolUse):t._(e.$unknown[0],e.$unknown[1])}(Xs||(Xs={}));class ta extends Ss{name="ModelStreamErrorException";$fault="client";originalStatusCode;originalMessage;constructor(e){super({name:"ModelStreamErrorException",$fault:"client",...e}),Object.setPrototypeOf(this,ta.prototype),this.originalStatusCode=e.originalStatusCode,this.originalMessage=e.originalMessage}}!function(e){e.visit=(e,t)=>void 0!==e.messageStart?t.messageStart(e.messageStart):void 0!==e.contentBlockStart?t.contentBlockStart(e.contentBlockStart):void 0!==e.contentBlockDelta?t.contentBlockDelta(e.contentBlockDelta):void 0!==e.contentBlockStop?t.contentBlockStop(e.contentBlockStop):void 0!==e.messageStop?t.messageStop(e.messageStop):void 0!==e.metadata?t.metadata(e.metadata):void 0!==e.internalServerException?t.internalServerException(e.internalServerException):void 0!==e.modelStreamErrorException?t.modelStreamErrorException(e.modelStreamErrorException):void 0!==e.validationException?t.validationException(e.validationException):void 0!==e.throttlingException?t.throttlingException(e.throttlingException):void 0!==e.serviceUnavailableException?t.serviceUnavailableException(e.serviceUnavailableException):t._(e.$unknown[0],e.$unknown[1])}(ea||(ea={}));var na,ra,ia;!function(e){e.visit=(e,t)=>void 0!==e.chunk?t.chunk(e.chunk):t._(e.$unknown[0],e.$unknown[1])}(na||(na={})),function(e){e.visit=(e,t)=>void 0!==e.chunk?t.chunk(e.chunk):void 0!==e.internalServerException?t.internalServerException(e.internalServerException):void 0!==e.modelStreamErrorException?t.modelStreamErrorException(e.modelStreamErrorException):void 0!==e.validationException?t.validationException(e.validationException):void 0!==e.throttlingException?t.throttlingException(e.throttlingException):void 0!==e.modelTimeoutException?t.modelTimeoutException(e.modelTimeoutException):void 0!==e.serviceUnavailableException?t.serviceUnavailableException(e.serviceUnavailableException):t._(e.$unknown[0],e.$unknown[1])}(ra||(ra={})),function(e){e.visit=(e,t)=>void 0!==e.chunk?t.chunk(e.chunk):void 0!==e.internalServerException?t.internalServerException(e.internalServerException):void 0!==e.modelStreamErrorException?t.modelStreamErrorException(e.modelStreamErrorException):void 0!==e.validationException?t.validationException(e.validationException):void 0!==e.throttlingException?t.throttlingException(e.throttlingException):void 0!==e.modelTimeoutException?t.modelTimeoutException(e.modelTimeoutException):void 0!==e.serviceUnavailableException?t.serviceUnavailableException(e.serviceUnavailableException):t._(e.$unknown[0],e.$unknown[1])}(ia||(ia={}));const oa=e=>({...e,...e.body&&{body:Cr}}),sa=e=>({...e,...e.body&&{body:Cr}}),aa=e=>({...e,...e.body&&{body:Cr}}),ca=e=>({...e,...e.body&&{body:"STREAMING_CONTENT"}}),ua=(e,t)=>((e,t)=>xr(e,t).then(e=>t.utf8Encoder(e)))(e,t).then(e=>{if(e.length)try{return JSON.parse(e)}catch(t){throw"SyntaxError"===t?.name&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}return{}}),da=async(e,t)=>{const n=await ua(e,t);return n.message=n.message??n.Message,n};function la(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function ha(e,t){return new fa(e,t)}class fa{constructor(e,t){this.input=e,this.context=t,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:e,protocol:t="https",port:n,path:r}=await this.context.endpoint();this.path=r;for(const e of this.resolvePathStack)e(this.path);return new st({protocol:t,hostname:this.hostname||e,port:n,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(e){return this.hostname=e,this}bp(e){return this.resolvePathStack.push(t=>{this.path=`${t?.endsWith("/")?t.slice(0,-1):t||""}`+e}),this}p(e,t,n,r){return this.resolvePathStack.push(i=>{this.path=((e,t,n,r,i,o)=>{if(null==t||void 0===t[n])throw new Error("No value provided for input HTTP label: "+n+".");{const t=r();if(t.length<=0)throw new Error("Empty value provided for input HTTP label: "+n+".");e=e.replace(i,o?t.split("/").map(e=>la(e)).join("/"):la(t))}return e})(i,this.input,e,t,n,r)}),this}h(e){return this.headers=e,this}q(e){return this.query=e,this}b(e){return this.body=e,this}m(e){return this.method=e,this}}const pa=async(e,t)=>{const n=ha(e,t),r=Dr({},$r,{[Va]:e[za]||"application/octet-stream",[Ha]:e[Ha],[tc]:e[Ya],[Za]:e[Ga],[Xa]:e[Wa],[ec]:e[Ka]});let i;return n.bp("/model/{modelId}/invoke"),n.p("modelId",()=>e.modelId,"{modelId}",!1),void 0!==e.body&&(i=e.body),n.m("POST").h(r).b(i),n.build()},ma=async(e,t)=>{const n=ha(e,t),r=Dr({},$r,{[Va]:e[za]||"application/octet-stream",[Ja]:e[Ha],[tc]:e[Ya],[Za]:e[Ga],[Xa]:e[Wa],[ec]:e[Ka]});let i;return n.bp("/model/{modelId}/invoke-with-response-stream"),n.p("modelId",()=>e.modelId,"{modelId}",!1),void 0!==e.body&&(i=e.body),n.m("POST").h(r).b(i),n.build()},ga=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return wa(e,t);const n=Dr({$metadata:qa(e),[za]:[,e.headers[Va]],[Ka]:[,e.headers[ec]]}),r=await xr(e.body,t);return n.body=r,n},ya=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return wa(e,t);const n=Dr({$metadata:qa(e),[za]:[,e.headers[Qa]],[Ka]:[,e.headers[ec]]}),r=e.body;return n.body=Oa(r,t),n},wa=async(e,t)=>{const n={...e,body:await da(e.body,t)},r=((e,t)=>{const n=(e,t)=>Object.keys(e).find(e=>e.toLowerCase()===t.toLowerCase()),r=e=>{let t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},i=n(e.headers,"x-amzn-errortype");if(void 0!==i)return r(e.headers[i]);if(t&&"object"==typeof t){const e=n(t,"code");if(e&&void 0!==t[e])return r(t[e]);if(void 0!==t.__type)return r(t.__type)}})(e,n.body);switch(r){case"AccessDeniedException":case"com.amazonaws.bedrockruntime#AccessDeniedException":throw await ka(n,t);case"InternalServerException":case"com.amazonaws.bedrockruntime#InternalServerException":throw await Ea(n,t);case"ResourceNotFoundException":case"com.amazonaws.bedrockruntime#ResourceNotFoundException":throw await Ra(n,t);case"ServiceQuotaExceededException":case"com.amazonaws.bedrockruntime#ServiceQuotaExceededException":throw await Ca(n,t);case"ThrottlingException":case"com.amazonaws.bedrockruntime#ThrottlingException":throw await Ta(n,t);case"ValidationException":case"com.amazonaws.bedrockruntime#ValidationException":throw await Ma(n,t);case"ModelErrorException":case"com.amazonaws.bedrockruntime#ModelErrorException":throw await Aa(n,t);case"ModelNotReadyException":case"com.amazonaws.bedrockruntime#ModelNotReadyException":throw await Ia(n,t);case"ModelTimeoutException":case"com.amazonaws.bedrockruntime#ModelTimeoutException":throw await _a(n,t);case"ServiceUnavailableException":case"com.amazonaws.bedrockruntime#ServiceUnavailableException":throw await Pa(n,t);case"ModelStreamErrorException":case"com.amazonaws.bedrockruntime#ModelStreamErrorException":throw await xa(n,t);case"ConflictException":case"com.amazonaws.bedrockruntime#ConflictException":throw await Sa(n,t);default:const i=n.body;return ba({output:e,parsedBody:i,errorCode:r})}},ba=(va=Ss,({output:e,parsedBody:t,errorCode:n})=>{(({output:e,parsedBody:t,exceptionCtor:n,errorCode:r})=>{const i=Mr(e),o=i.httpStatusCode?i.httpStatusCode+"":void 0,s=new n({name:t?.code||t?.Code||r||o||"UnknownError",$fault:"client",$metadata:i});throw Tr(s,t)})({output:e,parsedBody:t,exceptionCtor:va,errorCode:n})});var va;const ka=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const o=new Es({$metadata:qa(e),...n});return Tr(o,e.body)},Sa=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const o=new Rs({$metadata:qa(e),...n});return Tr(o,e.body)},Ea=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const o=new Is({$metadata:qa(e),...n});return Tr(o,e.body)},Aa=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr,originalStatusCode:zr,resourceName:Wr});Object.assign(n,i);const o=new Ks({$metadata:qa(e),...n});return Tr(o,e.body)},Ia=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const o=new Ys({$metadata:qa(e),...n});return Tr(o,e.body)},xa=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr,originalMessage:Wr,originalStatusCode:zr});Object.assign(n,i);const o=new ta({$metadata:qa(e),...n});return Tr(o,e.body)},_a=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const o=new Js({$metadata:qa(e),...n});return Tr(o,e.body)},Ra=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const o=new Cs({$metadata:qa(e),...n});return Tr(o,e.body)},Ca=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const o=new Ps({$metadata:qa(e),...n});return Tr(o,e.body)},Pa=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const o=new Ts({$metadata:qa(e),...n});return Tr(o,e.body)},Ta=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const o=new xs({$metadata:qa(e),...n});return Tr(o,e.body)},Ma=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const o=new _s({$metadata:qa(e),...n});return Tr(o,e.body)},Oa=(e,t)=>t.eventStreamMarshaller.deserialize(e,async n=>null!=n.chunk?{chunk:await Da(n.chunk,t)}:null!=n.internalServerException?{internalServerException:await La(n.internalServerException,t)}:null!=n.modelStreamErrorException?{modelStreamErrorException:await $a(n.modelStreamErrorException,t)}:null!=n.validationException?{validationException:await Ba(n.validationException,t)}:null!=n.throttlingException?{throttlingException:await Fa(n.throttlingException,t)}:null!=n.modelTimeoutException?{modelTimeoutException:await Na(n.modelTimeoutException,t)}:null!=n.serviceUnavailableException?{serviceUnavailableException:await Ua(n.serviceUnavailableException,t)}:{$unknown:e}),La=async(e,t)=>{const n={...e,body:await ua(e.body,t)};return Ea(n,t)},$a=async(e,t)=>{const n={...e,body:await ua(e.body,t)};return xa(n,t)},Na=async(e,t)=>{const n={...e,body:await ua(e.body,t)};return _a(n,t)},Da=async(e,t)=>{const n={},r=await ua(e.body,t);return Object.assign(n,ja(r,t)),n},Ua=async(e,t)=>{const n={...e,body:await ua(e.body,t)};return Pa(n,t)},Fa=async(e,t)=>{const n={...e,body:await ua(e.body,t)};return Ta(n,t)},Ba=async(e,t)=>{const n={...e,body:await ua(e.body,t)};return Ma(n,t)},ja=(e,t)=>Ur(e,{bytes:t.base64Decoder}),qa=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),Ha="accept",za="contentType",Va="content-type",Ga="guardrailIdentifier",Wa="guardrailVersion",Ka="performanceConfigLatency",Ya="trace",Ja="x-amzn-bedrock-accept",Qa="x-amzn-bedrock-content-type",Za="x-amzn-bedrock-guardrailidentifier",Xa="x-amzn-bedrock-guardrailversion",ec="x-amzn-bedrock-performanceconfig-latency",tc="x-amzn-bedrock-trace";class nc extends(_r.classBuilder().ep(Bi).m(function(e,t,n,r){return[Rn(n,this.serialize,this.deserialize),Pn(n,e.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","InvokeModelWithResponseStream",{eventStream:{output:!0}}).n("BedrockRuntimeClient","InvokeModelWithResponseStreamCommand").f(aa,ca).ser(ma).de(ya).build()){}class rc extends(_r.classBuilder().ep(Bi).m(function(e,t,n,r){return[Rn(n,this.serialize,this.deserialize),Pn(n,e.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","InvokeModel",{}).n("BedrockRuntimeClient","InvokeModelCommand").f(oa,sa).ser(pa).de(ga).build()){}const ic=oc;function oc(e,t){const n=sc();return(oc=function(e,t){return n[e-=274]})(e,t)}function sc(){const e=["getReader","data","filter","application/json","_processProxyRequest","\n\nAssistant:","5614994ueEoUD","<<SYS>>\n","utf-8","get","config","AWSTextAdapter","_readAsyncIterableResponse","test","completions","AI_ERROR_UNSUPPORTED_MODEL","ai.aws.apiUrl","completion","\nYou must keep the text formatting.\n\nContent:\n","_requestParameters","2434RnyOGG","_getGeneratedText","signal","1394OYvgsR","2926920eifOkb","abortController","anthropic.claude","2779152NsdYPu","preparePrompt","length","ai.aws.requestParameters","getModelFamily","Your task is to generate HTML content accordingly to the given instruction. Never include <img> tag in your response even if asked for. Your answer must be a well-structured and properly formatted HTML code. Answer only with the generated HTML content. Do not add any additional remarks or notes. Do not act like a chatbot or a real person.","\n<</SYS>>\n[INST]\n","json","_requestHeaders","Your task is to execute the instruction using the provided HTML content. Follow the instruction closely. Your answer must be a properly formatted HTML code. Do not add any additional remarks or notes. Do not act like a chatbot or a real person.","1158496oEmYeO","bytes","\n[/INST]","_readStreamableResponse","ai.aws.bedrockClientConfig","generation","chunk","body","7159026OfSdsw","locale","generations","ai.aws.requestHeaders","ai21.j2","_apiUrl","sendRequest","pluginName","_prepareRequestParameters","_readStaticResponse","parse","resolve","read","decode","Instruction:\n","cohere.command","split","_bedrockClientConfig","send","map","3015848gWadGV","anthropic.claude-v2","define","join","bedrock-2023-05-31","POST","_prepareRequestHeaders","text","_processAWSRequest","Human:\n","meta.llama","editor","stringify"];return(sc=function(){return e})()}!function(e){const t=oc,n=e();for(;;)try{if(872904===parseInt(t(281))/1*(-parseInt(t(284))/2)+parseInt(t(288))/3+parseInt(t(298))/4+parseInt(t(285))/5+parseInt(t(306))/6+-parseInt(t(345))/7+parseInt(t(326))/8)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(sc);class ac extends We{[ic(311)];[ic(296)];[ic(323)];[ic(280)];static get[ic(313)](){return ic(350)}constructor(e){const t=ic;super(e),e[t(349)][t(348)](t(291))||e[t(349)][t(328)](t(291),{model:t(327),max_tokens_to_sample:2e3,temperature:1,top_p:1,top_k:250,anthropic_version:t(330),stream:!0}),this[t(311)]=e[t(349)][t(348)](t(277)),this[t(323)]=e[t(349)][t(348)](t(302)),this[t(296)]=e[t(349)][t(348)](t(309)),this[t(280)]=e[t(349)][t(348)](t(291))}async[ic(312)]({query:e,context:t,onData:n,actionId:r}){const i=ic,{model:o,stream:s,...a}=await this[i(314)](this[i(280)],r),c={prompt:await this[i(289)](e,t,o,r),...a};this[i(311)]?await this[i(343)](c,o,s,n,r):await this[i(334)](c,o,s,n)}async[ic(289)](e,t,n,r){const i=ic;let o,s;return t?(o=i(297),s=i(320)+e+i(279)+t):(o=i(293),s=e),i(336)==this[i(292)](n)?i(346)+o+i(294)+s+i(300):i(335)+o+"\n"+s+i(344)}[ic(292)](e){const t=ic;if(/^anthropic\.claude/[t(274)](e))return t(287);if(/^ai21\.j2/[t(274)](e))return t(310);if(/^cohere\.command/[t(274)](e))return t(321);if(/^meta\.llama/[t(274)](e))return t(336);throw new b(v(this[t(337)][t(307)],t(276),e))}async[ic(343)](e,t,n,r,i){const o=ic,s={method:o(331),headers:await this[o(332)](this[o(296)],i),body:JSON[o(338)]({...e,model:t,stream:n}),signal:this[o(286)][o(283)]},a=await fetch(this[o(311)],s);n?await this[o(301)](a,t,r):await this[o(315)](a,t,r)}async[ic(334)](e,t,n,r){const i=ic,o=new ks(this[i(323)]),s={body:JSON[i(338)](e),contentType:i(342),accept:i(342),modelId:t};let a;if(n){const e=new nc(s);a=await o[i(324)](e,{abortSignal:this[i(286)][i(283)]}),await this[i(351)](a,t,r)}else{const e=new rc(s);a=await o[i(324)](e,{abortSignal:this[i(286)][i(283)]}),await this[i(315)](a,t,r)}}async[ic(351)](e,t,n){const r=ic,i=e[r(305)],o=new TextDecoder(r(347));let s="";for await(const e of i)if(e[r(304)]){const i=o[r(319)](e[r(304)][r(299)]),a=JSON[r(316)](i);s+=this[r(282)](a,t),n(s)}return Promise[r(317)]()}async[ic(301)](e,t,n){const r=ic,i=e[r(305)],o=new TextDecoder(r(347)),s=i[r(339)]();let a="",c="",u=!1;for(;!u;){const{done:e,value:i}=await s[r(318)]();if(u=e,u)break;const d=(a+o[r(319)](i))[r(322)]("\n")[r(325)](e=>{const t=r;try{return a="",JSON[t(316)](e)}catch{return a=e,null}})[r(341)](e=>null!==e);d[r(290)]&&(c+=d[r(325)](e=>this[r(282)](e,t))[r(329)](""),n(c))}return Promise[r(317)]()}async[ic(315)](e,t,n){const r=ic;let i;return i=e instanceof Response?await e[r(295)]():JSON[r(316)](new TextDecoder(r(347))[r(319)](e[r(305)])),n(this[r(282)](i,t)),Promise[r(317)]()}[ic(282)](e,t){const n=ic;switch(this[n(292)](t)){case n(287):return e[n(278)];case n(310):return e[n(275)][0][n(340)][n(333)];case n(321):return e[n(308)][0][n(333)];case n(336):return e[n(303)]}}}function cc(){var e=["1053484xyHXgQ","2uGEcnL","8JkHVNe","393508DlPBRL","2861934QdIsEQ","3121713fgyrDf","9Mzslnc","16602Fxafap","2452015rykVDr","6690070fmFopr"];return(cc=function(){return e})()}function uc(e,t){var n=cc();return(uc=function(e,t){return n[e-=254]})(e,t)}!function(e){for(var t=uc,n=e();;)try{if(283245===parseInt(t(255))/1+-parseInt(t(263))/2*(-parseInt(t(259))/3)+-parseInt(t(262))/4+-parseInt(t(260))/5+-parseInt(t(256))/6+-parseInt(t(257))/7*(-parseInt(t(254))/8)+-parseInt(t(258))/9*(-parseInt(t(261))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(cc)})(),(window.CKEditor5=window.CKEditor5||{}).ai=r})();
5
+ */(()=>{var e={168:e=>{"use strict";e.exports=function(e){return e[1]}},181:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(168),i=n.n(r),o=n(433),s=n.n(o)()(i());s.push([e.id,":root{--ck-ai-dropdown-view-width:250px;--ck-ai-dropdown-view-list-max-height:250px}.ck.ck-ai-commands-search{width:var(--ck-ai-dropdown-view-width)}.ck.ck-ai-commands-search>.ck-labeled-field-view{padding:var(--ck-spacing-large)}.ck.ck-ai-commands-search>.ck-labeled-field-view .ck-input{min-width:unset}.ck.ck-ai-commands-search>.ck-search__results{border-top:1px solid var(--ck-color-base-border)}.ck.ck-ai-commands-search>.ck-search__results>.ck-list{max-height:var(--ck-ai-dropdown-view-list-max-height);overflow:auto}",""]);const a=s},237:e=>{"use strict";e.exports=CKEditor5.dll},262:e=>{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},311:(e,t,n)=>{e.exports=n(237)("./src/ui.js")},331:(e,t,n)=>{e.exports=n(237)("./src/clipboard.js")},355:(e,t,n)=>{e.exports=n(237)("./src/icons.js")},357:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},369:function(e){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({17:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,r){void 0===r&&(r=!1);var i=e.getVersionPrecision(t),o=e.getVersionPrecision(n),s=Math.max(i,o),a=0,c=e.map([t,n],function(t){var n=s-e.getVersionPrecision(t),r=t+new Array(n+1).join(".0");return e.map(r.split("."),function(e){return new Array(20-e.length).join("0")+e}).reverse()});for(r&&(a=s-Math.min(i,o)),s-=1;s>=a;){if(c[0][s]>c[1][s])return 1;if(c[0][s]===c[1][s]){if(s===a)return 0;s-=1}else if(c[0][s]<c[1][s])return-1}},e.map=function(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)r.push(t(e[n]));return r},e.find=function(e,t){var n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){var i=e[n];if(t(i,n))return i}},e.assign=function(e){for(var t,n,r=e,i=arguments.length,o=new Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];if(Object.assign)return Object.assign.apply(Object,[e].concat(o));var a=function(){var e=o[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach(function(t){r[t]=e[t]})};for(t=0,n=o.length;t<n;t+=1)a();return e},e.getBrowserAlias=function(e){return r.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return r.BROWSER_MAP[e]||""},e}();t.default=i,e.exports=t.default},18:function(e,t,n){"use strict";t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast","Pale Moon":"pale_moon",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",pale_moon:"Pale Moon",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv",bot:"bot"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(91))&&r.__esModule?r:{default:r},o=n(18);function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(){}var t,n,r;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,r=[{key:"BROWSER_MAP",get:function(){return o.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return o.ENGINE_MAP}},{key:"OS_MAP",get:function(){return o.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return o.PLATFORMS_MAP}}],(n=null)&&s(t.prototype,n),r&&s(t,r),e}();t.default=a,e.exports=t.default},91:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=c(n(92)),i=c(n(93)),o=c(n(94)),s=c(n(95)),a=c(n(17));function c(e){return e&&e.__esModule?e:{default:e}}var u=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=a.default.find(r.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=a.default.find(i.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=a.default.find(o.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=a.default.find(s.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return a.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},r=0,i={},o=0;if(Object.keys(e).forEach(function(t){var s=e[t];"string"==typeof s?(i[t]=s,o+=1):"object"==typeof s&&(n[t]=s,r+=1)}),r>0){var s=Object.keys(n),c=a.default.find(s,function(e){return t.isOS(e)});if(c){var u=this.satisfies(n[c]);if(void 0!==u)return u}var d=a.default.find(s,function(e){return t.isPlatform(e)});if(d){var l=this.satisfies(n[d]);if(void 0!==l)return l}}if(o>0){var h=Object.keys(i),f=a.default.find(h,function(e){return t.isBrowser(e,!0)});if(void 0!==f)return this.compareVersion(i[f])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=a.default.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(a.default.compareVersions(i,n,r))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some(function(e){return t.is(e)})},e}();t.default=u,e.exports=t.default},92:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=/version\/(\d+(\.?_?\d+)+)/i,s=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/PaleMoon/i],describe:function(e){var t={name:"Pale Moon"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=s,e.exports=t.default},93:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),s=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:o.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=i.default.getWindowsVersionName(t);return{name:o.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:o.OS_MAP.iOS},n=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=i.default.getMacOSVersionName(t),r={name:o.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:o.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=i.default.getAndroidVersionName(t),r={name:o.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:o.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:o.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:o.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:o.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.PlayStation4,version:t}}}];t.default=s,e.exports=t.default},94:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),s=[{test:[/googlebot/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:o.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/Nokia/i],describe:function(e){var t=i.default.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,e),n={type:o.PLATFORMS_MAP.mobile,vendor:"Nokia"};return t&&(n.model=t),n}},{test:[/[^-]mobi/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}}];t.default=s,e.exports=t.default},95:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),s=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:o.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:o.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:o.ENGINE_MAP.Trident},n=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:o.ENGINE_MAP.Presto},n=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:o.ENGINE_MAP.Gecko},n=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:o.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:o.ENGINE_MAP.WebKit},n=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=s,e.exports=t.default}})},379:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(168),i=n.n(r),o=n(433),s=n.n(o)()(i());s.push([e.id,":root{--ck-ai-form-submit-button-text-color:var(--ck-color-text);--ck-ai-form-submit-button-border-color:transparent;--ck-ai-form-submit-button-disabled-border-color:transparent;--ck-ai-toolbar-button-hover-color:var(--ck-color-text);--ck-color-ai-selection:rgba(31,176,255,.3)}.ck-ai-assistant-ui_theme{--ck-color-button-default-hover-background:#f3ecff;--ck-color-button-default-active-background:#f3ecff;--ck-color-button-on-background:#f3ecff;--ck-color-button-on-hover-background:#f3ecff;--ck-color-button-on-active-background:#f3ecff;--ck-color-button-on-disabled-background:#f3ecff;--ck-color-button-on-color:#743ccd;--ck-color-button-action-background:#743ccd;--ck-color-button-action-hover-background:#6c34c9;--ck-color-button-action-active-background:#6c34c9;--ck-color-button-action-disabled-background:#ba9de6;--ck-color-list-button-hover-background:#f3ecff;--ck-ai-form-content-background:#f9f9f9;--ck-ai-form-submit-button-text-color:var(--ck-color-button-on-color);--ck-ai-form-submit-button-border-color:var(--ck-color-button-action-background);--ck-ai-form-submit-button-disabled-border-color:var(--ck-color-button-action-disabled-background);--ck-ai-toolbar-button-hover-color:var(--ck-color-button-on-color);--ck-color-ai-selection:#e2d6f5}.ck-ai-assistant-button:hover,.ck-ai-commands-dropdown>.ck-button:hover{color:var(--ck-ai-toolbar-button-hover-color)}.ck span.ck-fake-ai-selection{background:var(--ck-color-ai-selection)}.ck .ck-widget.ck-fake-ai-selection{outline-color:var(--ck-color-ai-selection)}.ck span.ck-fake-ai-selection-candidate{background:var(--ck-color-ai-selection)}.ck .ck-fake-ai-selection_collapsed{border-right:1px solid var(--ck-color-base-text);height:100%;margin-right:-1px;outline:1px solid hsla(0,0%,100%,.5)}.ck.ck-content.ck-ai-form__content-field h2{font-size:1.3em}.ck.ck-content.ck-ai-form__content-field h3{font-size:1.2em}.ck.ck-content.ck-ai-form__content-field h4,.ck.ck-content.ck-ai-form__content-field h5,.ck.ck-content.ck-ai-form__content-field h6{font-size:1.1em}.ck.ck-content.ck-ai-form__content-field h2,.ck.ck-content.ck-ai-form__content-field h3,.ck.ck-content.ck-ai-form__content-field h4,.ck.ck-content.ck-ai-form__content-field h5,.ck.ck-content.ck-ai-form__content-field h6,.ck.ck-content.ck-ai-form__content-field ol,.ck.ck-content.ck-ai-form__content-field p,.ck.ck-content.ck-ai-form__content-field ul{line-height:1.7em;margin-block-end:.5em;margin-block-start:.5em}.ck.ck-content.ck-ai-form__content-field>:first-child{margin-top:0}.ck.ck-content.ck-ai-form__content-field>:last-child{margin-bottom:0}",""]);const a=s},433:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n}).join("")},t.i=function(e,n,r,i,o){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(r)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(s[c]=!0)}for(var u=0;u<e.length;u++){var d=[].concat(e[u]);r&&s[d[0]]||(void 0!==o&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=o),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),i&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=i):d[4]="".concat(i)),t.push(d))}},t}},545:e=>{"use strict";var t,n=(t=[],function(e,n){return t[e]=n,t.filter(Boolean).join("\n")});function r(e,t,r,i){var o;if(r)o="";else{o="",i.supports&&(o+="@supports (".concat(i.supports,") {")),i.media&&(o+="@media ".concat(i.media," {"));var s=void 0!==i.layer;s&&(o+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),o+=i.css,s&&(o+="}"),i.media&&(o+="}"),i.supports&&(o+="}")}if(e.styleSheet)e.styleSheet.cssText=n(t,o);else{var a=document.createTextNode(o),c=e.childNodes;c[t]&&e.removeChild(c[t]),c.length?e.insertBefore(a,c[t]):e.appendChild(a)}}var i={singleton:null,singletonCounter:0};e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=i.singletonCounter++,n=i.singleton||(i.singleton=e.insertStyleElement(e));return{update:function(e){r(n,t,!1,e)},remove:function(e){r(n,t,!0,e)}}}},584:(e,t,n)=>{e.exports=n(237)("./src/utils.js")},667:e=>{"use strict";e.exports=function(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}},673:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var o={},s=[],a=0;a<e.length;a++){var c=e[a],u=r.base?c[0]+r.base:c[0],d=o[u]||0,l="".concat(u," ").concat(d);o[u]=d+1;var h=n(l),f={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==h)t[h].references++,t[h].updater(f);else{var p=i(f,r);r.byIndex=a,t.splice(a,0,{identifier:l,updater:p,references:1})}s.push(l)}return s}function i(e,t){var n=t.domAPI(t);n.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,i){var o=r(e=e||[],i=i||{});return function(e){e=e||[];for(var s=0;s<o.length;s++){var a=n(o[s]);t[a].references--}for(var c=r(e,i),u=0;u<o.length;u++){var d=n(o[u]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}o=c}}},676:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(168),i=n.n(r),o=n(433),s=n.n(o)()(i());s.push([e.id,":root{--ck-ai-form-view-width:600px;--ck-ai-form-content-height:175px;--ck-ai-form-content-background:#fafafa;--ck-ai-form-history-font-size:.9em;--ck-ai-form-error-background:var(--ck-color-light-red)}.ck .ck-ai-form{max-width:100%;width:var(--ck-ai-form-view-width)}@media screen and (max-width:600px){.ck .ck-ai-form{--ck-ai-form-view-width:100vw}}.ck .ck-ai-form .ck-ai-form-content{padding:var(--ck-spacing-large);width:100%}.ck .ck-ai-form .ck-ai-form-content .ck-input{width:100%}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area-wrapper{border:1px solid var(--ck-color-base-border);border-radius:2px;max-height:var(--ck-ai-form-content-height);overflow-y:auto;width:100%}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area-wrapper:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area{background-color:var(--ck-ai-form-content-background);display:flex}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area.ck-ai-form__content-area--processing{--ck-color-text:var(--ck-color-input-disabled-text);background-color:var(--ck-color-input-disabled-background)}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field{box-sizing:content-box;min-height:calc(var(--ck-line-height-base)*var(--ck-font-size-base));padding:var(--ck-spacing-tiny) var(--ck-spacing-medium);white-space:normal;width:100%}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field{padding-right:0}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field{padding-left:0}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__content-field>*{color:inherit;white-space:normal}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-spinner-container{margin-right:var(--ck-spacing-medium)}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-spinner-container{margin-left:var(--ck-spacing-medium)}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button-wrapper{display:flex;flex-direction:column-reverse;padding-left:2px}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button{bottom:1px;min-height:unset;min-width:unset;padding:4px;position:sticky;right:1px}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button svg{--ck-icon-size:16px}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__content-area .ck-ai-form__copy-button.ck-ai-form__copy-button--copied{color:inherit}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__toolbar{border:none;margin-bottom:calc(var(--ck-spacing-medium)*2);margin-top:var(--ck-spacing-medium);padding:0}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__loader{align-items:center;display:flex}.ck .ck-ai-form .ck-ai-form-content .ck-ai-form__loader .ck-spinner{box-sizing:border-box}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete{display:flex;justify-content:space-between}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view{flex-grow:1}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit{border-color:var(--ck-ai-form-submit-button-border-color);color:var(--ck-ai-form-submit-button-text-color)}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit{margin-left:var(--ck-spacing-medium)}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit{margin-right:var(--ck-spacing-medium)}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck.ck-ai-form__submit.ck-disabled{border-color:var(--ck-ai-form-submit-button-disabled-border-color)}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view .ck-ai-form__toggle-history{bottom:var(--ck-spacing-small);font-size:var(--ck-font-size-tiny);min-height:unset;min-width:unset;padding:4px;position:absolute;top:var(--ck-spacing-small)}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view .ck-ai-form__toggle-history{right:var(--ck-spacing-medium)}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete>.ck-labeled-field-view .ck-ai-form__toggle-history{left:var(--ck-spacing-medium)}[dir=ltr] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-textarea{padding-right:30px}[dir=rtl] .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-textarea{padding-left:30px}@media screen and (max-width:600px){.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-textarea{--ck-input-width:auto}}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto;grid-column-gap:0;grid-row-gap:0}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>span{grid-area:1/1/2/2}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-button{background:none;font-size:var(--ck-ai-form-history-font-size);grid-area:1/2/2/3;justify-self:start;margin:var(--ck-spacing-medium) 0 0;min-height:auto;padding:0}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-button .ck-button__label{line-height:inherit}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-button .ck-button__label:hover{text-decoration:underline}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-list{grid-area:2/1/3/3}.ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-search__results .ck-list .ck-list__group>.ck-list .ck-list__item .ck-button .ck-button__label{font-size:var(--ck-ai-form-history-font-size);line-height:var(--ck-line-height-base);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ck .ck-ai-form .ck-ai-form__error{align-items:center;background-color:var(--ck-ai-form-error-background);border-radius:2px;color:var(--ck-color-base-text);display:flex;justify-content:center;margin-bottom:var(--ck-spacing-medium);padding:var(--ck-spacing-medium)}",""]);const a=s},782:(e,t,n)=>{e.exports=n(237)("./src/core.js")},783:(e,t,n)=>{e.exports=n(237)("./src/engine.js")}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{AIAdapter:()=>w,AIAssistant:()=>qe,AIAssistantUI:()=>Ne,AIRequestError:()=>b,AITextAdapter:()=>We,AWSTextAdapter:()=>ac,OpenAITextAdapter:()=>Qe,ShowAIAssistantCommand:()=>E,getDefaultAICommands:()=>He});var e=n(782),t=n(355),i=n(584),o=n(311);function s(e,t){const n=(0,t.t)("Other");return e.length?"groupId"in e[0]?e:[{groupId:"_ungrouppedCommands",groupLabel:n,order:1/0,commands:e}]:[{groupId:"_ungrouppedCommands",groupLabel:n,order:1/0,commands:[]}]}var a=n(331),c=n(783);const u=d;function d(e,t){const n=f();return(d=function(e,t){return n[e-=121]})(e,t)}!function(e){const t=d,n=e();for(;;)try{if(154265===-parseInt(t(211))/1*(parseInt(t(136))/2)+parseInt(t(200))/3*(parseInt(t(192))/4)+-parseInt(t(169))/5*(parseInt(t(207))/6)+-parseInt(t(229))/7*(parseInt(t(154))/8)+-parseInt(t(170))/9*(parseInt(t(126))/10)+parseInt(t(215))/11+parseInt(t(195))/12)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(f);const l=globalThis[u(140)],h=u(227);function f(){const e=["parse","off","paste","DataTransfer","has","getRowIndexes","deleteContent","markerRange","_getTableRowCountFromContent","data","selection","showFakeVisualSelection","init","setData","element","findAncestor","afterInit","202568JdfOmg","_getAISelection","markers","insertRows","hideFakeVisualSelection","createRange","pop","ck-fake-ai-selection","addMarker","span","createPositionAt","contentInsertion","editing","getRange","getSelectedTableCells","40YmslbR","9jUIGMb","end","length","getChildren","isPremiumPlugin","editor","isContent","plugins","get","TableUtils","canEditAt","config","document","_pasteHTMLUsingClipboard","ai.useTheme","removeMarker","fromCharCode","setSelection","forEach","text/html","push","getRanges","111224ZbLKpp","pluginName","_getDefaultInsertBelowPosition","4471692mainYd","AIAssistantEditing","map","createSelection","getFirstRange","6vugjMr","table","lowest","join","isOfficialPlugin","isAtEnd","markerToHighlight","159006JewTCl","conversion","fire","first","16249ihyJVx","change","isCollapsed","_createEmptyTableRows","2221395RWKhZw","href","resultRange","model","start","getLastPosition","_resetContentOfSelectedTableCells","getRows","createUIElement","ck-fake-ai-selection_collapsed","_prepareTableInsertBelowPosition","editingDowncast","ai-ui","filter","21OxrPrH","addClass","insertContent","ck-ai-assistant-ui_theme","last","createPositionAfter","schema","updateMarker","for","1717130nDcvPe","insertContentBelow","from","getChild","getSelectedBlocks","once","getMarkersGroup","getLastMatchingPosition","getColumnIndexes","markerToElement","2QreoTL"];return(f=function(){return e})()}class p extends e.Plugin{static get[u(193)](){return u(196)}static get[u(204)](){return!0}static get[u(174)](){return!0}[u(149)](){const e=u,{editor:t}=this,n=[e(161)];t[e(181)][e(178)](e(184))&&n[e(190)](e(232)),t[e(208)][e(125)](e(226))[e(206)]({model:h,view:{classes:n,priority:12}}),t[e(208)][e(125)](e(226))[e(135)]({model:h,view:(t,{writer:n})=>{const r=e;if(!t[r(144)][r(213)])return null;const i=n[r(223)](r(163));return n[r(230)]([r(161),r(224)],i),i}})}[u(153)](){!async function(e){const t=g([76,79,80,49,74,122,77,105,89,69,73,87,110,98,57,104,82,121,50,52,86,115,72,66,67,75,48,100,120,101,84,88,54,106,51,118,55,65,112,78,107,114,99,109,113,81,56,111,97,83,116,119,108,90,117,70,102,103,85,68,53,71]),n=window[g([68,97,116,101])][g([110,111,119])](),r=e[g([101,100,105,116,111,114])],o=new(window[g([80,114,111,109,105,115,101])])(e=>{r[g([111,110,99,101])](g([114,101,97,100,121]),e)}),s={[g([107,116,121])]:g([69,67]),[g([117,115,101])]:g([115,105,103]),[g([99,114,118])]:g([80,45,50,53,54]),[g([120])]:g([105,67,106,79,67,118,68,70,73,54,108,81,72,72,84,49,56,106,86,119,82,102,107,102,72,81,50,97,95,77,121,109,84,51,53,76,81,86,111,70,83,65,73]),[g([121])]:g([107,88,73,121,74,52,101,118,116,67,69,70,82,109,120,75,83,85,112,75,57,102,68,87,52,53,57,118,88,79,118,86,114,104,102,54,117,81,65,101,79,105,111]),[g([97,108,103])]:g([69,83,50,53,54])},a=r[g([99,111,110,102,105,103])][g([103,101,116])](g([108,105,99,101,110,115,101,75,101,121]));function c(e){const t=[new(window[g([80,114,111,109,105,115,101])])(e=>setTimeout(e,605900)),o[g([116,104,101,110])](()=>new(window[g([80,114,111,109,105,115,101])])(e=>{let t=0;r[g([109,111,100,101,108])][g([111,110])](g([97,112,112,108,121,79,112,101,114,97,116,105,111,110]),(n,r)=>{r[0][g([105,115,68,111,99,117,109,101,110,116,79,112,101,114,97,116,105,111,110])]&&t++,504==t&&(e(),n[g([111,102,102])]())})}))];return window[g([80,114,111,109,105,115,101])][g([114,97,99,101])](t)[g([116,104,101,110])](()=>e)}function u(e){return e[g([115,116,97,114,116,115,87,105,116,104])](g([101,121]))?JSON[g([112,97,114,115,101])](l(e)):null}function l(e){return window[g([97,116,111,98])](e[g([114,101,112,108,97,99,101])](/-/g,g([43]))[g([114,101,112,108,97,99,101])](/_/g,g([47])))}function h(e){let t=5381;function n(e){for(let n=0;n<e[g([108,101,110,103,116,104])];n++){const r=e[g([99,104,97,114,67,111,100,101,65,116])](n);t=(t<<5)+t+r,t&=t}}return function e(t){Array[g([105,115,65,114,114,97,121])](t)?t[g([102,111,114,69,97,99,104])](e):t&&typeof t==g([111,98,106,101,99,116])?Object[g([101,110,116,114,105,101,115])](t)[g([115,111,114,116])]()[g([102,111,114,69,97,99,104])](([t,r])=>{n(t),e(r)}):n(window[g([83,116,114,105,110,103])](t))}(e),t>>>0}function f(e){return e[g([116,111,83,116,114,105,110,103])](16)[g([112,97,100,83,116,97,114,116])](8,g([48]))}function p(e){return e[g([115,112,108,105,116])]("")[g([114,101,118,101,114,115,101])]()[g([106,111,105,110])]("")}function m(){}function g(e){const t=d;return e[t(197)](e=>String[t(186)](e))[t(203)]("")}!function(e){const n=function(){const e=window[g([83,116,114,105,110,103])](window[g([112,101,114,102,111,114,109,97,110,99,101])][g([110,111,119])]())[g([114,101,112,108,97,99,101])](g([46]),"");let n=g([76]);for(let r=0;r<e[g([108,101,110,103,116,104])];r+=2){let i=window[g([112,97,114,115,101,73,110,116])](e[g([115,117,98,115,116,114,105,110,103])](r,r+2));i>=t[g([108,101,110,103,116,104])]&&(i-=t[g([108,101,110,103,116,104])]),n+=t[i]}return n}();r[n]=g([97,105,76,105,99,101,110,115,101,75,101,121])+e,e!=g([86,97,108,105,100])&&async function(){await o,r[g([109,111,100,101,108])][g([99,104,97,110,103,101])]=m,r[g([109,111,100,101,108])][g([101,110,113,117,101,117,101,67,104,97,110,103,101])]=m,r[g([101,110,97,98,108,101,82,101,97,100,79,110,108,121,77,111,100,101])](g([109,111,100,101,108]))}()}(await async function(){let e,t=null,m=null;try{return a==g([71,80,76])?g([78,111,116,65,108,108,111,119,101,100]):(e=function(){const e=a[g([115,112,108,105,116])](g([46]));return 3!=e[g([108,101,110,103,116,104])]?null:t(e[1]);function t(e){const t=u(e);return t&&n()?t:null;function n(){const e=t[g([106,116,105])],n=window[g([112,97,114,115,101,73,110,116])](e[g([115,117,98,115,116,114,105,110,103])](e[g([108,101,110,103,116,104])]-8),16),r={...t,[g([106,116,105])]:e[g([115,117,98,115,116,114,105,110,103])](0,e[g([108,101,110,103,116,104])]-8)};return delete r[g([118,99])],h(r)==n}}}(),e?(e[g([117,115,97,103,101,69,110,100,112,111,105,110,116])]&&(m=function(e,t){return new(window[g([80,114,111,109,105,115,101])])(c=>{if(s())return c(g([86,97,108,105,100]));a(),r[g([100,101,99,111,114,97,116,101])](g([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]));let u=!1;const d=(0,i.uid)();function l(e){return!!e&&(typeof e===g([111,98,106,101,99,116])||typeof e===g([102,117,110,99,116,105,111,110]))&&typeof e[g([116,104,101,110])]===g([102,117,110,99,116,105,111,110])&&typeof e[g([99,97,116,99,104])]===g([102,117,110,99,116,105,111,110])}function m(r){a(r)[g([116,104,101,110])](e=>e&&e[g([115,116,97,116,117,115])]==g([111,107])?f(h(d+t))!=e[g([118,101,114,105,102,105,99,97,116,105,111,110])]?g([85,115,97,103,101,76,105,109,105,116]):g([86,97,108,105,100]):g([85,115,97,103,101,76,105,109,105,116]))[g([116,104,101,110])](e=>(o(),e),()=>{const e=s();return null==e?(o(),g([86,97,108,105,100])):g(n-e>6048e5?[85,115,97,103,101,76,105,109,105,116]:[86,97,108,105,100])})[g([116,104,101,110])](c)[g([99,97,116,99,104])](()=>{c(g([85,115,97,103,101,76,105,109,105,116]))});const i=36e5;function o(){const t=g([108,108,99,116,45])+f(h(e)),r=p(f(window[g([77,97,116,104])][g([99,101,105,108])](n/i)));window[g([108,111,99,97,108,83,116,111,114,97,103,101])][g([115,101,116,73,116,101,109])](t,r)}function s(){const t=g([108,108,99,116,45])+f(h(e)),n=window[g([108,111,99,97,108,83,116,111,114,97,103,101])][g([103,101,116,73,116,101,109])](t);return n?window[g([112,97,114,115,101,73,110,116])](p(n),16)*i:null}function a(e){return new(window[g([80,114,111,109,105,115,101])])((t,n)=>{e[g([116,104,101,110])](t,n),window[g([115,101,116,84,105,109,101,111,117,116])](n,12e4)})}}r[g([111,110])](g([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),(t,n)=>{if(n[0]!=e)return c(g([85,115,97,103,101,76,105,109,105,116]));n[1]={...n[1],[g([114,101,113,117,101,115,116,73,100])]:d}},{[g([112,114,105,111,114,105,116,121])]:g([104,105,103,104])}),r[g([111,110])](g([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),e=>{l(e[g([114,101,116,117,114,110])])&&(u=!0,m(e[g([114,101,116,117,114,110])]))},{[g([112,114,105,111,114,105,116,121])]:g([108,111,119])}),o[g([116,104,101,110])](()=>{u||c(g([85,115,97,103,101,76,105,109,105,116]))})});function s(){return r[g([101,100,105,116,105,110,103])][g([118,105,101,119])][g([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]==g([97,117,116,111])}function a(){r[g([101,100,105,116,105,110,103])][g([118,105,101,119])][g([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]=g([97,117,116,111])}}(e[g([117,115,97,103,101,69,110,100,112,111,105,110,116])],e[g([106,116,105])])),await async function(){let e=!0;try{const r=a[g([115,112,108,105,116])](g([46])),[i,o,s]=r;return t(i),await n(i,o,s),e}catch{return!1}function t(t){const n=u(t);n&&n[g([97,108,103])]==g([69,83,50,53,54])||(e=!1)}async function n(t,n,r){const i=window[g([85,105,110,116,56,65,114,114,97,121])][g([102,114,111,109])](l(r),e=>e[g([99,104,97,114,67,111,100,101,65,116])](0)),o=(new(window[g([84,101,120,116,69,110,99,111,100,101,114])]))[g([101,110,99,111,100,101])](t+g([46])+n),a=window[g([99,114,121,112,116,111])][g([115,117,98,116,108,101])];if(!a)return;const c=await a[g([105,109,112,111,114,116,75,101,121])](g([106,119,107]),s,{[g([110,97,109,101])]:g([69,67,68,83,65]),[g([110,97,109,101,100,67,117,114,118,101])]:g([80,45,50,53,54])},!1,[g([118,101,114,105,102,121])]);await a[g([118,101,114,105,102,121])]({[g([110,97,109,101])]:g([69,67,68,83,65]),[g([104,97,115,104])]:{[g([110,97,109,101])]:g([83,72,65,45,50,53,54])}},c,i,o)||(e=!1)}}()?function(){const t=e[g([102,101,97,116,117,114,101,115])];return!(!t||!t[g([105,110,99,108,117,100,101,115])](g([42]))&&!t[g([105,110,99,108,117,100,101,115])](g([65,73])))}()?function(){const t=[g([101,118,97,108,117,97,116,105,111,110]),g([116,114,105,97,108])][g([105,110,99,108,117,100,101,115])](e[g([108,105,99,101,110,115,101,84,121,112,101])])?n/1e3:1754784e3;return e[g([101,120,112])]<t}()?g([69,120,112,105,114,101,100]):function(){const t=d,n=e[g([108,105,99,101,110,115,101,100,72,111,115,116,115])];if(!n||0==n[g([108,101,110,103,116,104])])return!0;const{hostname:r}=new URL(window[g([108,111,99,97,116,105,111,110])][t(216)]);if(n[g([105,110,99,108,117,100,101,115])](r))return!0;const i=r[g([115,112,108,105,116])](g([46]));return n[g([102,105,108,116,101,114])](e=>e[g([105,110,99,108,117,100,101,115])](g([42])))[g([109,97,112])](e=>e[g([115,112,108,105,116])](g([46])))[g([102,105,108,116,101,114])](e=>e[g([108,101,110,103,116,104])]<=i[g([108,101,110,103,116,104])])[g([109,97,112])](e=>Array(i[g([108,101,110,103,116,104])]-e[g([108,101,110,103,116,104])])[g([102,105,108,108])](e[0]===g([42])?g([42]):"")[g([99,111,110,99,97,116])](e))[g([115,111,109,101])](e=>i[g([101,118,101,114,121])]((t,n)=>e[n]===t||e[n]===g([42])))}()?(e[g([108,105,99,101,110,115,101,84,121,112,101])]==g([101,118,97,108,117,97,116,105,111,110])&&(t=c(g([69,118,97,108,117,97,116,105,111,110,76,105,109,105,116]))),e[g([108,105,99,101,110,115,101,84,121,112,101])]==g([116,114,105,97,108])&&(t=c(g([84,114,105,97,108,76,105,109,105,116]))),await(t&&m?new(window[g([80,114,111,109,105,115,101])])((e,n)=>{t[g([116,104,101,110])](e,n),m[g([116,104,101,110])](t=>{t!=g([86,97,108,105,100])&&e(t)},n)}):t||m||g([86,97,108,105,100]))):g([68,111,109,97,105,110,76,105,109,105,116]):g([78,111,116,65,108,108,111,119,101,100]):g([73,110,118,97,108,105,100])):g([73,110,118,97,108,105,100]))}catch{return g([73,110,118,97,108,105,100])}}())}(this)}[u(148)](){const e=u,t=this[e(175)][e(218)];t[e(212)](n=>{const r=e,i=t[r(182)][r(147)][r(191)]();let o=0;for(const e of i){const i=h+":"+o;if(t[r(156)][r(141)](i))n[r(124)](i,{range:e});else if(e[r(219)][r(205)]){const o=e[r(219)][r(133)](({item:e})=>!t[r(123)][r(176)](e),{boundaries:e});n[r(162)](i,{usingOperation:!1,affectsData:!1,range:n[r(159)](o,e[r(171)])})}else n[r(162)](i,{usingOperation:!1,affectsData:!1,range:e});o++}})}[u(158)](){const e=u,t=this[e(175)][e(218)],n=Array[e(128)](this[e(175)][e(218)][e(156)][e(132)](h));n[e(172)]&&t[e(212)](t=>{const r=e;n[r(188)](e=>{t[r(185)](e)})})}[u(231)](e,t){const n=u,r=this[n(155)](),i=t||r[n(199)]();this[n(175)][n(218)][n(180)](i)&&this[n(175)][n(218)][n(212)](o=>{const s=n;this[s(158)](),t||this[s(221)](o,r),this[s(183)]({insertAt:i,writer:o,html:e})})}[u(127)](e){const t=u,{model:n}=this[t(175)],r=this[t(155)]();n[t(212)](()=>{const n=t,i=this[n(225)](e,r)||this[n(194)](r);this[n(231)](e,i)})}[u(155)](){const e=u,t=this[e(175)][e(218)],n=Array[e(128)](t[e(156)][e(132)](h))[e(197)](t=>t[e(167)]());return t[e(198)](n)}[u(183)]({writer:e,html:t,insertAt:n}){const r=u,{view:i}=this[r(175)][r(166)],o=this[r(175)][r(177)][r(178)](a.ClipboardPipeline),s=new l;s[r(150)](r(189),t);const d=new ClipboardEvent(r(139),{clipboardData:s}),h=new c.ViewDocumentDomEventData(i,d,{dataTransfer:new c.ViewDataTransfer(s)});e[r(187)](n);const f=(t,n)=>{const i=r;n[i(217)]&&e[i(187)](n[i(217)])};o[r(131)](r(165),f,{priority:r(202)}),i[r(182)][r(209)](r(139),h),o[r(138)](r(165),f)}[u(194)](e){const t=u,{model:n}=this[t(175)],r=Array[t(128)](e[t(130)]());return r[t(172)]?n[t(122)](r[t(160)]()):e[t(220)]()}[u(225)](e,t){const n=u,{model:r,plugins:i}=this[n(175)];if(i[n(141)](n(179))){const o=i[n(178)](n(179))[n(168)](t);if(o[n(172)]){const t=this[n(145)](e),i=this[n(214)](o,t);return r[n(164)](i,0)}}return null}[u(145)](e){const t=u,n=this[t(175)][t(177)][t(178)](t(179)),r=this[t(175)][t(146)][t(137)](e),i=Array[t(128)](r[t(173)]())[t(228)](e=>e.is(t(151),t(201)));let o=0;return i[t(188)](e=>{o+=n[t(222)](e)}),o}[u(214)](e,t){const n=u,r=this[n(175)][n(177)][n(178)](n(179)),i=r[n(142)](e),o=r[n(134)](e),s=i[n(121)]+1,a=o[n(210)],c=e[0][n(152)](n(201));for(let e=0;e<t;e++)r[n(157)](c,{at:s});return c[n(129)](s)[n(129)](a)}[u(221)](e,t){const n=u,{plugins:r}=this[n(175)],{model:i}=e;r[n(141)](n(179))&&r[n(178)](n(179))[n(168)](t)[n(172)]&&i[n(143)](t)}}var m=y;function g(){var e=["203AeOpnX","796240MjqUyy","afterInit","39RELysP","name","isOfficialPlugin","aiadapter-text-adapter-not-set","pluginName","972VfSaFC","176656LfarMA","131034gdWVuD","AIAdapter","3356265iIRVPi","4123664amQztT","isPremiumPlugin","10390nzHeqr","AIRequestError","textAdapter","28818lCqdcS"];return(g=function(){return e})()}function y(e,t){var n=g();return(y=function(e,t){return n[e-=136]})(e,t)}!function(e){for(var t=y,n=e();;)try{if(467193===parseInt(t(141))/1+-parseInt(t(150))/2*(parseInt(t(154))/3)+-parseInt(t(152))/4+parseInt(t(144))/5+parseInt(t(142))/6*(parseInt(t(151))/7)+-parseInt(t(145))/8+parseInt(t(140))/9*(-parseInt(t(147))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(g);class w extends e.Plugin{static get[m(139)](){return m(143)}static get[m(137)](){return!0}static get[m(146)](){return!0}[m(153)](){var e=m;if(!this[e(149)])throw new i.CKEditorError(e(138),null)}}class b extends Error{constructor(e){var t=m;super(e),this[t(136)]=t(148)}}function v(e,t,n){const r=e.t;switch(t){case"Edit or review":return r("Edit or review");case"Improve writing":return r("Improve writing");case"Make shorter":return r("Make shorter");case"Make longer":return r("Make longer");case"Simplify language":return r("Simplify language");case"Generate from selection":return r("Generate from selection");case"Summarize":return r("Summarize");case"Continue":return r("Continue");case"Change tone":return r("Change tone");case"Professional":return r("Professional");case"Casual":return r("Casual");case"Direct":return r("Direct");case"Confident":return r("Confident");case"Friendly":return r("Friendly");case"Change style":return r("Change style");case"Business":return r("Business");case"Legal":return r("Legal");case"Journalism":return r("Journalism");case"Poetic":return r("Poetic");case"Translate":return r("Translate");case"English":return r("English");case"Spanish":return r("Spanish");case"German":return r("German");case"Portuguese":return r("Portuguese");case"French":return r("French");case"Simplified Chinese":return r("Simplified Chinese");case"Hindi":return r("Hindi");case"Arabic":return r("Arabic");case"AI Assistant":return r("AI Assistant");case"AI Commands":return r("AI Commands");case"Ask AI to edit or generate":return r("Ask AI to edit or generate");case"Ask AI to improve generated text":return r("Ask AI to improve generated text");case"Copy":return r("Copy");case"Submit":return r("Submit");case"Insert below":return r("Insert below");case"Try again":return r("Try again");case"Stop":return r("Stop");case"AI is writing...":return r("AI is writing...");case"AI is writing":return r("AI is writing");case"Generated content: %0":return r("Generated content: %0",n);case"Error during AI content generation: %0":return r("Error during AI content generation: %0",n);case"History":return r("History");case"Empty history":return r("Empty history");case"Ask AI and your prompts will be listed here for you to use later.":return r("Ask AI and your prompts will be listed here for you to use later.");case"Prompt history":return r("Prompt history");case"Clear":return r("Clear");case"AI_REPLACE_CONTENT":return r({id:"AI_REPLACE_CONTENT",string:"Replace"});case"AI_INSERT_CONTENT":return r({id:"AI_INSERT_CONTENT",string:"Insert"});case"AI_ERROR_GET_HEADERS":return r({id:"AI_ERROR_GET_HEADERS",string:"Preparing request headers failed"});case"AI_ERROR_GET_PARAMETERS":return r({id:"AI_ERROR_GET_PARAMETERS",string:"Preparing request parameters failed"});case"AI_ERROR_UNSUPPORTED_MODEL":return r({id:"AI_ERROR_UNSUPPORTED_MODEL",string:'The requested AI model ("%0") is not supported'},n);case"AI_ERROR_CONTEXT_LENGTH":return r({id:"AI_ERROR_CONTEXT_LENGTH",string:"Selected content is too long"});case"AI_ERROR_MODERATION":return r({id:"AI_ERROR_MODERATION",string:"Requested query does not pass moderation rules"});case"AI_ERROR_FAILED":return r({id:"AI_ERROR_FAILED",string:"Failed to communicate with the AI service"});default:return t}}function k(e,t){const n=A();return(k=function(e,t){return n[e-=235]})(e,t)}const S=k;!function(e){const t=k,n=e();for(;;)try{if(575792===-parseInt(t(272))/1+parseInt(t(262))/2*(parseInt(t(237))/3)+parseInt(t(253))/4+-parseInt(t(268))/5*(parseInt(t(244))/6)+-parseInt(t(278))/7+parseInt(t(259))/8*(-parseInt(t(277))/9)+-parseInt(t(275))/10*(-parseInt(t(264))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(A);class E extends e.Command{[S(252)];constructor(e,t){const n=S;super(e),this[n(252)]=t,this[n(235)](n(247),[]),this.on(n(260),(e,t,r)=>{const i=n;this[i(258)]&&(this[i(247)]=I(this[i(252)],r))}),this[n(235)](n(239),!1),this.on(n(245),(e,t,r)=>{const i=n;this[i(247)]=r?I(this[i(252)],this[i(239)]):[]})}[S(266)](){const e=S,t=this[e(270)][e(236)];this[e(239)]=function(t){const n=e,r=t[n(257)][n(240)];return r[n(263)]?0!==[...r[n(261)]()][n(267)]&&![...r[n(261)]()][0][n(269)]:!!t[n(251)](r[n(241)]())}(t);const n=t[e(257)][e(240)],r=this[e(270)][e(271)][e(276)](e(265));for(const t of n[e(254)]())for(const n of t[e(248)]())if(n.is(e(249))&&r[e(256)](n[e(238)]))return void(this[e(258)]=!1);this[e(258)]=!0}[S(243)](e="",t="",n=S(250)){const r=S;this[r(270)][r(273)][r(276)](Ne)[r(242)](e,t,n)}}function A(){const e=["document","isEnabled","7704InxAQv","change:_hasContext","getSelectedBlocks","46SOeGZj","isCollapsed","11xeBzjd","ai.aiAssistant.disabledElements","refresh","length","5PRbkCY","isEmpty","editor","config","823231sHGrtX","plugins","requiresContent","15489130wOYPDm","get","5967WvzbYq","4375462qocwwI","from","set","model","145989tzkezn","name","_hasContext","selection","getFirstRange","showUI","execute","4698294KEpnkm","change:isEnabled","add","enabledCommandsIds","getItems","element","custom","hasContent","_commandDefinitions","3109780ClWgMd","getRanges","values","includes"];return(A=function(){return e})()}function I(e,t){const n=S,r=new Set;for(const i of e[n(255)]())(t||!1===i[n(274)])&&r[n(246)](i.id);return Array[n(279)](r)}const _=R;function x(){const e=["once","serializeToString","previousContext","from","670908JUFfWI","childNodes","currentResponse","reverse","initialContext","trim","createElement","domConverter","length","_stripMarkdownSyntax","reset","toModel","1726735Qhydim","custom","nodeType","parseFromString","```html","remove","finally","textAdapter","then","isRendered","setContentOf","get","previousActionId","_handleQuery","mainAction","editor","exec","stopProcessing","editing","set","isProcessing","element","submitPrompt","currentContext","processor","previousLabel","listenTo","name","substring","message","_domParser","abort","3685182LWEBbY","catch","<h1></h1>","makeRequest","ai.aiAssistant.preserveComments","config","render","startsWith","6112512jUEqvh","innerHTML","stringify","endsWith","3194ISsDVS","set:currentContext","_parseAndNormalizeContent","1050588vRhICl","push","querySelector","prompt","_xmlSerializer","markers","_sanitizationContainer","_normalizeResponseHeadings","previousQuery","tryAgainEvent","value","clear","htmlProcessor","viewToDom","_isH1TagSupportEnabled","```","div","view","updateView","finishProcessing","data","startProcessing","document","rename","stopListening","text/html","handleError","body","match","ELEMENT_NODE","_sanitizeHTML","destroy","2191527IbLxNL","94usOwjg","toView"];return(x=function(){return e})()}function R(e,t){const n=x();return(R=function(e,t){return n[e-=391]})(e,t)}!function(e){const t=R,n=e();for(;;)try{if(403056===parseInt(t(451))/1*(parseInt(t(487))/2)+parseInt(t(486))/3+parseInt(t(395))/4+-parseInt(t(407))/5+parseInt(t(439))/6+-parseInt(t(454))/7+-parseInt(t(447))/8)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(x);const C=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,"is");class P extends((0,i.ObservableMixin)()){[_(422)];[_(414)];[_(471)];[_(460)];[_(437)];[_(458)];constructor(e,t,n){const r=_;super(),this[r(422)]=e,this[r(414)]=t,this[r(460)]=document[r(401)](r(470)),this[r(437)]=new DOMParser,this[r(458)]=new XMLSerializer,this[r(471)]=n,this[r(426)]({initialContext:"",currentContext:"",currentResponse:"",previousContext:void 0,previousQuery:void 0,previousLabel:void 0,isProcessing:!1}),this.on(r(452),(e,t,n)=>{const i=r;this[i(471)][i(464)]=this[i(484)](n)}),this[r(433)](this[r(471)],r(429),(e,t)=>{const n=r,i=this[n(430)]||this[n(399)];this[n(420)](t,i,n(408))}),this[r(433)](this[r(471)],r(463),()=>{const e=r;this[e(471)][e(457)]=this[e(432)],this[e(420)](this[e(462)],this[e(393)],this[e(419)],this[e(432)])}),this[r(433)](this[r(471)],r(424),()=>{this[r(424)]()})}[_(485)](){this[_(478)]()}async[_(472)]({actionId:e,query:t,htmlContent:n,label:r,mainActionLabel:i}){const o=_;this[o(471)][o(457)]=r,this[o(471)][o(421)]=i,this[o(399)]=n,t&&(this[o(471)][o(416)]?this[o(420)](t,n,e,r):this[o(471)][o(391)](o(445),()=>{this[o(420)](t,n,e,r)}))}[_(424)](){const e=_;this[e(427)]&&(this[e(427)]=!1,this[e(471)][e(473)](),this[e(414)][e(438)]())}[_(405)](){const e=_;this[e(399)]="",this[e(430)]="",this[e(397)]="",this[e(393)]="",this[e(462)]="",this[e(432)]="",this[e(419)]=void 0,this[e(471)][e(405)](),this[e(424)]()}async[_(420)](e,t,n,r){const i=_;return this[i(427)]=!0,this[i(471)][i(475)](),this[i(393)]=t,this[i(462)]=e,this[i(432)]=r||e,this[i(419)]=n,new Promise(r=>{const o=i;this[o(414)][o(442)]({query:e,context:t,onData:e=>{const t=o;this[t(397)]=e,this[t(430)]=this[t(453)](this[t(397)])},actionId:n})[o(415)](()=>{const e=o;!this[e(430)]&&this[e(397)]&&(this[e(430)]=this[e(453)](this[e(397)],!0))})[o(440)](e=>{const t=o;e instanceof b?this[t(471)][t(480)](e[t(436)]):this[t(471)][t(480)](),r()})[o(413)](()=>{this[o(424)](),r()})})}[_(453)](e,t=!1){const n=_,r=C[n(423)](e);e=r?e[n(435)](r[1][n(403)]):e[n(403)]<100&&!t?"":this[n(404)](e);const i=this[n(437)][n(410)](e,n(479));if(r){const e=Array[n(394)](i[n(481)][n(396)]);e[n(398)]();for(const t of e){if(t[n(409)]==Node[n(483)])break;t[n(412)]()}}const o=this[n(422)][n(474)][n(431)][n(488)](this[n(458)][n(392)](i[n(481)]));this[n(468)]()||this[n(461)](o);const s=this[n(422)][n(444)][n(418)](n(443)),a=this[n(422)][n(474)][n(406)](o);return s||a[n(459)][n(465)](),this[n(422)][n(474)][n(449)](a)}[_(461)](e){const t=_,n=new c.ViewUpcastWriter(this[t(422)][t(425)][t(471)][t(476)]),r=new c.Matcher({name:/^h[1-5]$/}),i=[];let o=!1;for(const n of e)n.is(t(428))&&r[t(482)](n)&&(i[t(455)](n),"h1"==n[t(434)]&&(o=!0));if(o)for(const e of i)n[t(477)]("h"+(parseInt(e[t(434)][1])+1),e)}[_(468)](){const e=_,{data:t,editing:n}=this[e(422)],r=t[e(466)][e(488)](e(441)),i=t[e(488)](t[e(406)](r));return!!n[e(471)][e(402)][e(467)](i)[e(456)]("h1")}[_(484)](e){const t=_;return this[t(422)][t(425)][t(471)][t(402)][t(417)](this[t(460)],e),this[t(460)][t(448)]}[_(404)](e){const t=_,n=e[t(400)]();return n[t(446)](t(411))?n[t(450)](t(469))?n[t(435)](7,n[t(403)]-3):n[t(435)](7):e}}const M=T;function T(e,t){const n=O();return(T=function(e,t){return n[e-=155]})(e,t)}function O(){const e=["toUpperCase","REPLACE","items","ck-hidden","5492675KERiSU","81IcNAuO","ck-ai-form__toolbar","948818pDVNPn","replaceButton","bindTemplate","Try again","1364jtnCKz","6NImQgZ","tryAgainButton","_CONTENT","set","replace","bind","extendTemplate","mainAction","3624hJPXwP","locale","ck-button-action","_createButton","Insert below","3068303ejEEAA","13791904fVCEEJ","label","Stop","insert","isVisible","stopButton","2DrnKzZ","1185130QlBXNb","AI_","insertButton","8824695xmJAZL","addMany"];return(O=function(){return e})()}!function(e){const t=T,n=e();for(;;)try{if(909250===-parseInt(t(182))/1*(-parseInt(t(157))/2)+parseInt(t(170))/3*(parseInt(t(161))/4)+parseInt(t(192))/5+-parseInt(t(162))/6*(-parseInt(t(175))/7)+-parseInt(t(176))/8+parseInt(t(155))/9*(-parseInt(t(183))/10)+parseInt(t(186))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(O);const L={REPLACE:M(166),INSERT:M(179)};class $ extends o.ToolbarView{constructor(e){const t=M;super(e),this[t(165)](t(180),!1),this[t(165)](t(169),L[t(189)]),this[t(158)]=this[t(173)]("",t(172)),this[t(158)][t(167)](t(177)).to(this,t(169),n=>v(e,t(184)+n[t(188)]()+t(164))),this[t(185)]=this[t(173)](v(e,t(174))),this[t(163)]=this[t(173)](v(e,t(160))),this[t(181)]=this[t(173)](v(e,t(178)));const n=this[t(159)];this[t(168)]({attributes:{class:[t(156),n.if(t(180),t(191),e=>!e)]}}),this[t(190)][t(187)]([this[t(158)],this[t(185)],this[t(163)],this[t(181)]])}[M(173)](e,t){const n=M,r=new o.ButtonView(this[n(171)]);return r[n(165)]({label:e,class:t||"",isVisible:!0,withText:!0}),r}}const N=U;function D(){const e=["2565704XMepXH","text/plain","lastElementChild"," ck-ai-form__copy-button--copied","clipboard","ck-ai-form__content-area-wrapper","remove","isVisible","<span>[</span>","22338569VkfNGG","icon","ck-ai-form__content-area","querySelector","ck-hidden","element","bind","116GPqsMd","loaderView","18711kyiFTW","removeAllRanges",".ck-ai-form__loader","ClipboardItem","left","addRange","isProcessing","203arEjxW","scrollHeight","-9999px","copy","mousedown","text/html","absolute","execute","Copy","render","isEnabled","setStartAfter","createElement","body","_createCopyButton","ck-ai-form__loader","ck-content","value","setContent","bindTemplate","182870ejlAaH","ck-ai-form__content-area--processing","ck-ai-form__copy-button-wrapper","contentFieldView","setEndBefore","setTemplate","2787288VmxnWI","_copyHTMLToClipboard","locale","13CVydTM","class","ck-ai-form__content-field","innerHTML","<span>]</span>","execCommand","createRange","getSelection","change:value","style","ck-reset_all-excluded","AI is writing...","6330LERWbL","smooth","textContent","div","appendChild","89785FNDPOp","copyButtonView","set","wheel","position","firstElementChild","change:isProcessing","scrollTo","write","ck-ai-form__copy-button","_createLoader","appendLoader","listenTo","focus","79416LKGhCH"];return(D=function(){return e})()}function U(e,t){const n=D();return(U=function(e,t){return n[e-=442]})(e,t)}!function(e){const t=U,n=e();for(;;)try{if(771413===parseInt(t(452))/1*(-parseInt(t(443))/2)+-parseInt(t(449))/3+-parseInt(t(500))/4*(parseInt(t(469))/5)+-parseInt(t(483))/6*(-parseInt(t(509))/7)+-parseInt(t(484))/8+-parseInt(t(502))/9*(-parseInt(t(464))/10)+parseInt(t(493))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(D);class F extends o.View{[N(446)];[N(470)];constructor(e,t=""){const n=N;super(e),this[n(471)]({value:null,isVisible:!1,isProcessing:!1});const r=this[n(442)];this[n(446)]=new B(e,t),this[n(470)]=this[n(523)](),this[n(448)]({tag:n(467),attributes:{class:["ck",n(489),r.if(n(491),n(497),e=>!e)],tabindex:"-1"},children:[{tag:n(467),attributes:{class:["ck",n(495),r.if(n(508),n(444))]},children:[this[n(446)],{tag:n(467),attributes:{class:["ck",n(445)]},children:[this[n(470)]]}]}]})}[N(518)](){const e=N;super[e(518)](),this[e(526)]&&this[e(446)][e(527)](this[e(526)]);let t=!1;this.on(e(460),(n,r,i)=>{const o=e,s=!this[o(446)][o(498)][o(496)](o(504));this[o(446)][o(527)](i),this[o(508)]&&s&&!t&&this[o(498)][o(476)]({top:this[o(498)][o(510)],behavior:o(465)})}),this.on(e(475),(n,r,i)=>{const o=e;t=!1,i?(this[o(526)]=null,this[o(446)][o(480)]()):this[o(526)]||this[o(446)][o(527)]("")}),this[e(481)](this[e(498)],e(472),()=>{t=!0}),this[e(481)](this[e(498)],e(513),()=>{t=!0})}[N(482)](){const e=N;this[e(498)][e(482)]()}[N(523)](){const e=N,n=this[e(451)],r=new o.ButtonView(this[e(451)]),i=e(478);return r[e(471)]({label:v(n,e(517)),icon:t.IconCopy,class:i,tooltip:!0}),r[e(499)](e(491)).to(this,e(526),e=>!!e),r[e(499)](e(519)).to(this,e(508),e=>!e),r.on(e(516),()=>{const n=e;this[n(450)](this[n(446)][n(498)]),r[n(494)]=t.IconCheck,r[n(453)]=i+n(487),this[n(482)](),setTimeout(()=>{const e=n;r[e(494)]=t.IconCopy,r[e(453)]=i},1e3)}),r}[N(450)](e){const t=N,{window:n,document:r}=i.global;if(n[t(505)]){const{Blob:r,ClipboardItem:i}=n,o=[new i({"text/html":new r([e[t(455)]],{type:t(514)}),"text/plain":new r([e[t(466)]||""],{type:t(485)})})];navigator[t(488)][t(477)](o)}else{const i=r[t(521)](t(467));i[t(461)][t(473)]=t(515),i[t(461)][t(506)]=t(511),i[t(455)]=t(492)+e[t(455)]+t(456),r[t(522)][t(468)](i);const o=r[t(458)]();o[t(520)](i[t(474)]),o[t(447)](i[t(486)]);const s=n[t(459)]();s[t(503)](),s[t(507)](o),r[t(457)](t(512)),i[t(490)]()}}}class B extends o.View{constructor(e,t=""){const n=N;super(e),this[n(501)]=this[n(479)](),this[n(448)]({tag:n(467),attributes:{class:["ck",n(525),t,n(462),n(454)]}})}[N(527)](e){const t=N;this[t(498)][t(455)]=e}[N(480)](){const e=N;this[e(498)][e(468)](this[e(501)][e(498)])}[N(479)](){const e=N,t=new o.View,n=this[e(451)],r=new o.SpinnerView;return r[e(491)]=!0,t[e(448)]({tag:e(467),attributes:{class:["ck",e(524)]},children:[r,{text:v(n,e(463))}]}),t[e(518)](),t}}function j(e,t){const n=q();return(j=function(e,t){return n[e-=462]})(e,t)}function q(){const e=["bindTemplate","71220HwcNvT","7gYlOGY","2334764KCQqPc","6716370awuxHu","10103286kUNxWo","144Fbdmtc","div","set","1521421AcuSLU","setTemplate","2460069XSzJNY","10djlnSp","ck-ai-form__error","text","content","5850712MSgNUN"];return(q=function(){return e})()}!function(e){const t=j,n=e();for(;;)try{if(917997===-parseInt(t(462))/1+-parseInt(t(476))/2*(-parseInt(t(471))/3)+parseInt(t(473))/4*(-parseInt(t(465))/5)+parseInt(t(475))/6*(parseInt(t(472))/7)+-parseInt(t(469))/8+parseInt(t(464))/9+parseInt(t(474))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(q);class H extends o.View{constructor(e,n=""){const r=j;super(e);const i=new o.IconView,s=this[r(470)];this[r(478)](r(467),n),i[r(468)]=t.IconError,this[r(463)]({tag:r(477),attributes:{class:["ck",r(466)]},children:[i,{text:s.to(r(467))}]})}}function z(){const e=["window","maxRows","isEnabled","minRows","2148IxEVFe","9vREhfu","fieldView","_createSubmitButton","element","13196dPsOcr","20RwfYNT","rtl","bind","queryView","keystrokes","History","requestAnimationFrame","render","showHistoryButtonView","2193aQspMJ","isVisible","children","update","right","329315NJxbTP","value","focusFirst","ck-ai-form__submit","focus","submit","950XkprCy","ck-ai-form__toggle-history","isOn","target","focusLast","isEmpty","focusCycler","focusableChildren","excludeScrollbarsAndBorders","60VDxuTk","left","fieldWrapperChildren","add","Submit","128713RKPinw","execute","style","resultsView","fire","620933zNTQoL","locale","1822zZJSQV","width","filteredView","uiLanguageDirection","1685596SDeBfz","_createShowHistoryButton","set","submitButtonView","4636024qVMWio","enter"];return(z=function(){return e})()}const V=G;function G(e,t){const n=z();return(G=function(e,t){return n[e-=493]})(e,t)}!function(e){const t=G,n=e();for(;;)try{if(338824===parseInt(t(531))/1+-parseInt(t(533))/2*(-parseInt(t(501))/3)+parseInt(t(552))/4*(parseInt(t(512))/5)+-parseInt(t(521))/6*(-parseInt(t(506))/7)+-parseInt(t(541))/8*(parseInt(t(548))/9)+parseInt(t(553))/10*(parseInt(t(537))/11)+-parseInt(t(547))/12*(parseInt(t(526))/13))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(z);class W extends o.AutocompleteView{[V(540)];[V(500)];constructor(e,t){const n=V;super(e,t),this[n(495)][n(549)][n(546)]=1,this[n(495)][n(549)][n(544)]=3,this[n(540)]=this[n(550)](),this[n(500)]=this[n(538)](),this[n(519)][n(524)](this[n(500)],1),this[n(519)][n(524)](this[n(540)])}[V(499)](){const e=V;super[e(499)](),this[e(495)][e(523)][e(524)](this[e(500)]),this[e(503)][e(524)](this[e(540)]),this[e(496)][e(539)](e(542),(t,n)=>{const r=e;t[r(515)]==this[r(495)][r(549)][r(551)]&&(this[r(511)](),n())})}[V(550)](){const e=V,n=new o.ButtonView(this[e(532)]),r=this[e(532)];return n[e(539)]({icon:t.IconSubmit,label:v(r,e(525)),isVisible:!0,tooltip:!0,class:e(509)}),n.on(e(527),()=>{this[e(511)]()}),n[e(494)](e(545)).to(this[e(495)][e(549)],e(517),this,e(545),(e,t)=>!e&&t),n}[V(538)](){const e=V,n=new o.ButtonView(this[e(532)]),r=this[e(529)],s=this[e(532)];n[e(539)]({label:v(s,e(497)),withText:!1,icon:t.IconHistory,tooltip:!0,tooltipPosition:"sw",class:e(513)}),n[e(494)](e(514)).to(r,e(502)),n[e(494)](e(545)).to(this,e(545)),n.on(e(527),()=>{const t=e;r[t(502)]=!r[t(502)],r[t(502)]?this[t(535)][t(510)]():this[t(510)]()});const a=()=>{const t=e;i.global[t(543)][t(498)](()=>{const e=t;if((0,i.isVisible)(this[e(551)])){const t=new i.Rect(this[e(495)][e(549)][e(551)]),r=t[e(534)],o=e(493)===s[e(536)]?e(522):e(505);t[e(520)](),n[e(551)][e(528)][o]=r-t[e(534)]+1+"px"}})};return this[e(495)][e(549)].on(e(504),a),this.on(e(499),a),n}[V(511)](){const e=V,t=this[e(495)][e(549)][e(551)][e(507)];this[e(530)](e(511),t)}[V(510)](e){const t=V;-1===e?this[t(518)][t(516)]():this[t(518)][t(508)]()}}const K=J;function J(e,t){const n=Y();return(J=function(e,t){return n[e-=470]})(e,t)}function Y(){const e=["historyGroupView","Prompt history","6597ZZUPEd","_createClearHistoryButton","803505RagxTu","items","2850300gKqOsa","set","2152822MFquzf","Clear","filter","380JDHltH","children","471903qPZzvt","13182768zJhdWk","clearHistory","57880RfacCh","fire","add","18vgByxF","delegate","7828DleACX","clearHistoryButton","locale","execute","label","length"];return(Y=function(){return e})()}!function(e){const t=J,n=e();for(;;)try{if(982708===-parseInt(t(494))/1+-parseInt(t(496))/2+-parseInt(t(476))/3+parseInt(t(484))/4*(-parseInt(t(474))/5)+-parseInt(t(482))/6*(-parseInt(t(471))/7)+-parseInt(t(477))/8+parseInt(t(492))/9*(parseInt(t(479))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Y);class Q extends o.ListView{[K(490)];[K(485)];constructor(e){const t=K;super(e),this[t(485)]=this[t(493)](),this[t(490)]=new o.ListItemGroupView,this[t(490)][t(475)][t(481)](this[t(485)],1),this[t(490)][t(488)]=v(e,t(491)),this[t(490)][t(495)][t(483)](t(487)).to(this),this[t(495)][t(481)](this[t(490)])}[K(473)](){const e=K;let t=0;for(const n of this[e(495)])t+=n[e(495)][e(489)];return{resultsCount:t,totalItemsCount:t}}[K(493)](){const e=K,t=this[e(486)],n=new o.ButtonView(this[e(486)]);return n[e(470)]({label:"("+v(t,e(472))+")",withText:!0}),n.on(e(487),()=>this[e(480)](e(478))),n}}const Z={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"};function X(e){if(null==e)return"";if("string"==typeof e)return e;if(Array.isArray(e))return e.map(X).join(",");const t=String(e);return"0"===t&&Object.is(Number(e),-0)?"-0":t}function ee(e){return function(e){return e.replace(/&(?:amp|lt|gt|quot|#(0+)?39);/g,e=>Z[e]||"'")}(X(e))}function te(e,t){const n=ne();return(te=function(e,t){return n[e-=494]})(e,t)}function ne(){const e=["add","8kVqhEd","2290tlkSjC","3827082STYVXS","fire","29684655riAyXI","26052hJMZik","prompt","443995hpaGDc","locale","children","set","36sbzSRi","2GqcnEC","7784466GGFlfW","37458OnlEZW","1828869haFIhT","execute"];return(ne=function(){return e})()}!function(e){const t=te,n=e();for(;;)try{if(680714===-parseInt(t(501))/1+-parseInt(t(508))/2*(parseInt(t(498))/3)+-parseInt(t(507))/4*(parseInt(t(503))/5)+parseInt(t(509))/6+parseInt(t(511))/7*(-parseInt(t(496))/8)+-parseInt(t(510))/9*(parseInt(t(497))/10)+parseInt(t(500))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ne);class re extends o.ListItemView{constructor(e){const t=te;super();const n=new o.ButtonLabelView,r=new o.ButtonView(this[t(504)],n);this[t(505)][t(495)](r),r[t(506)]({label:e[t(502)],withText:!0}),r.on(t(494),()=>{const n=t;this[n(499)](n(494),{value:ee(e[n(502)])})})}}const ie=oe;function oe(e,t){const n=ce();return(oe=function(e,t){return n[e-=308]})(e,t)}!function(e){const t=oe,n=e();for(;;)try{if(163917===-parseInt(t(327))/1*(-parseInt(t(331))/2)+parseInt(t(329))/3+parseInt(t(313))/4*(-parseInt(t(315))/5)+-parseInt(t(318))/6+parseInt(t(324))/7+-parseInt(t(320))/8*(-parseInt(t(308))/9)+-parseInt(t(311))/10*(-parseInt(t(309))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ce);const se=ie(316);class ae extends i.Collection{constructor(){const e=ie;super(),this[e(333)](),this.on(e(332),(t,n)=>{const r=e,i=ue(n[r(328)]);for(const e of this)if(e!=n&&ue(e[r(328)])===i){this[r(322)](e);break}this[r(321)]>20&&this[r(322)](this[r(317)]),this[r(334)]()}),this.on(e(322),()=>{this[e(334)]()})}[ie(333)](){const e=ie,t=sessionStorage[e(312)](se)||"[]";this[e(319)](JSON[e(330)](t))}[ie(334)](){const e=ie;sessionStorage[e(325)](se,JSON[e(314)](this[e(310)](e=>e)))}}function ce(){const e=["955968ewGNsR","parse","104DRqUqJ","add","_loadFromSessionStorage","_saveToSessionStorage","11205ISacyp","257939kgnQbr","map","20yYAKOL","getItem","929468TpMTAq","stringify","5MlTKey","CKEditor/AIFormView/PromptHistory","last","1320516SzMzGc","addMany","16bOwbKr","length","remove","trim","444626rcDJvU","setItem","toLowerCase","3554MJEBSQ","prompt"];return(ce=function(){return e})()}function ue(e){const t=ie;return e[t(326)]()[t(323)]()}const de={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function le(e){return X(e).replace(/[&<>"']/g,e=>de[e])}const he=pe;function fe(){const e=["insertButton","focusTracker","4332525DECxgd","isProcessing","prompt","bindTo","items","div","locale","startProcessing","AI_ERROR_FAILED","ck-ai-form-content","38643KflfEu","finishProcessing","label","focusFirst","13666626AoaCyb","listenTo","high","add","tryAgainEvent","373460OSpmpC","stopButton","5226872MDYicM","clearHistory","focus","_promptHistory","submitPrompt","keystrokes","replaceButton","execute","_createToolbar","_focusables","553221BuLMtl","9200946clxTJZ","_createPromptView","search","shift + tab","toolbar","render","chain","setTemplate","tryAgainButton","_createHistoryView","value","7pcADnf","element","handleError","historyGroupView","text","Empty history","copyButtonView","createCollection","isEnabled","mainAction","tab","replaceContent","queryView","delegate","isVisible","focusCycler","20YXCYLP","bind","clear","errorView","Ask AI to improve generated text","fire","stopProcessing","ck-ai-form","focusLast","reset","trim","promptView","ck-hidden","contentArea","submit","isError","fieldView","REPLACE","set","Ask AI to edit or generate","Ask AI and your prompts will be listed here for you to use later.","insertContentBelow","4HCTPcK","bindTemplate"];return(fe=function(){return e})()}function pe(e,t){const n=fe();return(pe=function(e,t){return n[e-=370]})(e,t)}!function(e){const t=pe,n=e();for(;;)try{if(880611===-parseInt(t(449))/1+-parseInt(t(373))/2+-parseInt(t(385))/3*(parseInt(t(435))/4)+-parseInt(t(439))/5+parseInt(t(386))/6*(-parseInt(t(397))/7)+parseInt(t(375))/8+parseInt(t(453))/9*(parseInt(t(413))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(fe);class me extends o.View{[he(438)];[he(380)];[he(426)];[he(390)];[he(424)];[he(416)];[he(384)];[he(412)];[he(378)];constructor(e,t,n=""){const r=he;super(e),this[r(431)](r(405),!0),this[r(431)](r(440),!1),this[r(431)](r(441),""),this[r(431)](r(396),""),this[r(431)](r(428),!1),this[r(431)](r(406),L[r(430)]),this[r(378)]=new ae,this[r(416)]=new H(e),this[r(426)]=new F(e,n),this[r(426)][r(414)](r(440)).to(this),this[r(426)][r(414)](r(396)).to(this),this[r(390)]=this[r(383)](),this[r(390)][r(414)](r(406)).to(this),this[r(424)]=this[r(387)](),this[r(438)]=new i.FocusTracker,this[r(380)]=new i.KeystrokeHandler,this[r(384)]=this[r(404)]([this[r(426)],this[r(426)][r(403)],this[r(390)],this[r(424)]]),this[r(412)]=new o.FocusCycler({focusables:this[r(384)],focusTracker:this[r(438)],keystrokeHandler:this[r(380)],actions:{focusPrevious:r(389),focusNext:r(407)}}),this[r(412)][r(392)](this[r(424)][r(412)]),this[r(424)][r(409)][r(429)][r(414)](r(396)).to(this,r(441));const s=this[r(436)];this[r(393)]({tag:r(444),attributes:{class:["ck",r(420),t],tabindex:"-1"},children:[{tag:r(444),attributes:{class:["ck",r(448)]},children:[{tag:r(444),attributes:{class:[s.if(r(428),r(425),e=>!e)]},children:[this[r(416)]]},this[r(426)],this[r(390)],this[r(424)]]}]})}[he(391)](){const e=he;super[e(391)](),this[e(438)][e(371)](this[e(426)][e(398)]),this[e(438)][e(371)](this[e(426)][e(403)][e(398)]),this[e(438)][e(371)](this[e(390)][e(398)]),this[e(438)][e(371)](this[e(424)][e(398)]),this[e(380)][e(454)](this[e(398)])}[he(377)](e=1){const t=he;-1===e?this[t(412)][t(421)]():this[t(412)][t(452)]()}[he(422)](){const e=he;this[e(441)]="",this[e(396)]="",this[e(428)]=!1,this[e(424)][e(422)](),this[e(426)][e(411)]=!1,this[e(390)][e(411)]=!1}[he(387)](){const e=he,t=this[e(445)],n=new W(t,{queryView:{label:v(t,e(432)),creator:o.createLabeledTextarea,showIcon:!1,showResetButton:!1},infoView:{text:{noSearchableItems:{primary:v(t,e(402)),secondary:v(t,e(433))}}},filteredView:this[e(395)](),queryMinChars:1/0,resetOnBlur:!1});return n[e(414)](e(405)).to(this,e(405),this,e(440),(e,t)=>e&&!t),this[e(454)](n,e(427),(t,n)=>{const r=e;this[r(441)]=n;const i=le(n);this[r(418)](r(379),i),n[r(423)]()&&this[r(378)][r(371)]({prompt:i},0)},{priority:e(370)}),n}[he(395)](){const e=he,t=new Q(this[e(445)]);return t[e(400)][e(443)][e(442)](this[e(378)]).as(re),t.on(e(376),()=>{const t=e;this[t(378)][t(415)](),this[t(424)][t(388)](""),this[t(424)][t(377)]()}),t}[he(383)](){const e=he,t=new $(this[e(445)]);return t[e(381)][e(414)](e(405)).to(this,e(405),this,e(440),this,e(396),(e,t,n)=>e&&!t&&!!n),t[e(381)][e(410)](e(382)).to(this,e(408)),t[e(437)][e(414)](e(405)).to(this,e(405),this,e(440),this,e(396),(e,t,n)=>e&&!t&&!!n),t[e(437)][e(410)](e(382)).to(this,e(434)),t[e(394)][e(414)](e(405)).to(this,e(405),this,e(440),(e,t)=>e&&!t),t[e(394)][e(410)](e(382)).to(this,e(372)),t[e(374)][e(414)](e(405)).to(this,e(440)),t[e(374)][e(410)](e(382)).to(this,e(419)),t}[he(446)](){const e=he;this[e(396)]="",this[e(428)]=!1,this[e(440)]=!0,this[e(426)][e(411)]=!0,this[e(390)][e(411)]=!0,this[e(426)][e(377)]()}[he(450)](){const e=he,t=this[e(445)];this[e(440)]=!1,this[e(441)]="",this[e(424)][e(422)](),this[e(396)]&&(this[e(424)][e(409)][e(451)]=v(t,e(417)))}[he(399)](e){const t=he,n=this[t(445)];this[t(450)](),this[t(428)]=!0,this[t(416)][t(401)]=e||v(n,t(447)),this[t(396)]||(this[t(426)][t(411)]=!1)}}var ge=n(673),ye=n.n(ge),we=n(545),be=n.n(we),ve=n(262),ke=n.n(ve),Se=n(667),Ee=n.n(Se),Ae=n(357),Ie=n.n(Ae),_e=n(379),xe={attributes:{"data-cke":!0}};xe.setAttributes=Ee(),xe.insert=ke().bind(null,"head"),xe.domAPI=be(),xe.insertStyleElement=Ie();ye()(_e.A,xe);_e.A&&_e.A.locals&&_e.A.locals;var Re=n(181),Ce={attributes:{"data-cke":!0}};Ce.setAttributes=Ee(),Ce.insert=ke().bind(null,"head"),Ce.domAPI=be(),Ce.insertStyleElement=Ie();ye()(Re.A,Ce);Re.A&&Re.A.locals&&Re.A.locals;var Pe=n(676),Me={attributes:{"data-cke":!0}};Me.setAttributes=Ee(),Me.insert=ke().bind(null,"head"),Me.domAPI=be(),Me.insertStyleElement=Ie();ye()(Pe.A,Me);Pe.A&&Pe.A.locals&&Pe.A.locals;const Te=Le;function Oe(){const e=["AIAssistant","text","wasMoved","copy","currentContext","order","show","addMany","EDITOR_TOP_SIDE","document","update","_onExecute","4826190JOyQcH","errorView","text/html","menuitemcheckbox","aiLicenseKeyExpired","usageLimit","featureNotAllowed","reset","_licenseKeyCheckInterval","isOn","push","media","editor","showAIAssistant","getData","804728YZxPeu","replaceContent","componentFactory","fieldView","2324292OTEjzo","add","forEach","set","from","getSelectedBlocks","menuBar:aiCommands","command:","execute","values","tableOfContents","items","<p>","model","_getResolvedCommandsDefinitions","_showLicenseError","editing","aiLicenseKeyTrialLimit","aiLicenseKeyUsageLimit","requires","bind","aiCommands","AI Assistant","DataTransfer","ai-commands-config-order-collision","hideFakeVisualSelection","_aiAdapter","aiLicenseKeyEvaluationLimit","getLimitElement","isPremiumPlugin","custom","_uiCssClasses","Generated content: %0","groupLabel","commands","hideUI","_commandDefinitions","</p>","_getMenuBarGroupButtons","207565yOSKjd","schema","ck-ai-assistant-ui","getRanges","menuBar:aiAssistant","promptView","menuView","ai.aiAssistant.commands","render","invalid","hide","isFlat","change","requiresContent","once","comment","source","sort","1036886mMWjgX","destroy","updatePosition","view","plugins","change:enabledCommandsIds","ai.useTheme","listenTo","8Fuckel","isOfficialPlugin","buttons","_createAIAssistantUIButton","showUI","Error during AI content generation: %0","textAdapter","updateView","contentArea","queryView","licenseKey","AIAssistantUI","children","polite","includes","init","rawHtml","prompt","enabledCommandsIds","REPLACE","insertContentBelow","_aiAssistantController","2167431EDaIPt","buttonView","_forceMarkersCopy","define","_dialog","evaluationLimit","domainLimit","focus","aiLicenseKeyNotAllowed","change:value"," ck-ai-assistant-ui_theme","INSERT","config","map","expired","insertContent","aiLicenseKeyDomainLimit","splice","setSelection","change:isError","ai.aiAssistant.disabledElements","filter","isCollapsed","replace","menuPanelClass","_formView","locale","body","AI Commands","pluginName","isEnabled","get","_populateMenuBarMenu","groupId","delegate","_initView","8661898APqAUh","AI is writing","ck-ai-commands-dropdown ","trim","ai.aiAssistant.contentAreaCssClass","showFakeVisualSelection","_initAriaAiStatusChangeAnnouncements","aiLicenseKeyValid","change:isProcessing","fire","label","aiLicenseKeyInvalid","length","ck-ai-assistant-button ","announce","selection","panelView","trialLimit","aiAssistant","getSelectedElement"];return(Oe=function(){return e})()}function Le(e,t){const n=Oe();return(Le=function(e,t){return n[e-=132]})(e,t)}!function(e){const t=Le,n=e();for(;;)try{if(410431===-parseInt(t(199))/1+parseInt(t(260))/2+-parseInt(t(290))/3+-parseInt(t(203))/4+-parseInt(t(242))/5+parseInt(t(184))/6+parseInt(t(152))/7*(parseInt(t(268))/8))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Oe);const $e=globalThis[Te(226)];class Ne extends e.Plugin{[Te(278)];[Te(192)];[Te(294)];[Te(141)];[Te(229)];[Te(289)];[Te(234)]="";static get[Te(145)](){return Te(279)}static get[Te(269)](){return!0}static get[Te(232)](){return!0}static get[Te(222)](){return[a.ClipboardMarkersUtils,p,w,o.Dialog]}constructor(e){const t=Te;super(e),e[t(302)][t(293)](t(136),[t(195),t(284),t(213)]),e[t(302)][t(293)](t(156),""),e[t(302)][t(293)](t(266),!0),this[t(234)]=t(244)+(e[t(302)][t(147)](t(266))?t(300):"")}[Te(283)](){const e=Te,{editor:n}=this;this[e(229)]=n[e(264)][e(147)](w),this[e(294)]=n[e(264)][e(147)](o.Dialog),this[e(141)]=null,this[e(239)]=this[e(217)]();const r=new E(n,Array[e(207)](this[e(239)][e(212)]()));n[e(237)][e(204)](e(197),r),n.ui[e(201)][e(204)](e(224),i=>{const a=e,c=(0,o.createDropdown)(i);return c[a(206)]({class:a(154)+this[a(234)]}),c[a(291)][a(206)]({label:v(i,a(144)),icon:t.IconMagicWand,tooltip:!0}),c.on(a(211),e=>this[a(183)](e[a(258)].id)),(0,o.addMenuToDropdown)(c,n.ui[a(263)][a(143)],function(e){const t=a,n=s(e[t(302)][t(147)](t(249)),e[t(142)]),r=Ue(e,n)[t(137)](e=>e[t(237)][t(164)]);return 1===r[t(164)]?Ue(e,r[0][t(237)])[t(303)](e=>({id:e.id,label:e[t(162)]})):r[t(303)](n=>{const r=t,{groupId:i,groupLabel:o,commands:s}=n;return{id:i,menu:o||i,children:Ue(e,s)[r(303)](e=>({id:e.id,label:e[r(162)]}))}})}(n),{ariaLabel:v(i,a(144))}),c[a(248)][a(140)]=a(154)+this[a(234)],r.on(a(265),u),c[a(248)][a(256)](a(250),u),c;function u(){const e=a;c[e(146)]=r[e(286)][e(164)]>0;for(const t of c[e(248)][e(270)])t[e(146)]=r[e(286)][e(282)](t.id)}}),n.ui[e(201)][e(204)](e(209),i=>{const a=e,c=new o.MenuBarMenuView(i);c[a(291)][a(206)]({label:v(i,a(144)),icon:t.IconMagicWand}),c[a(223)](a(146)).to(r,a(286),e=>e[a(164)]>0);const u=s(n[a(302)][a(147)](a(249)),i);return this[a(148)](r,c,u,e=>this[a(183)](e)),c}),n.ui[e(201)][e(204)](e(170),()=>{const t=e,n=this[t(271)](o.ButtonView);return n[t(206)]({tooltip:!0,class:t(165)+this[t(234)]}),n}),n.ui[e(201)][e(204)](e(246),()=>{const t=e,n=this[t(271)](o.MenuBarMenuListItemButtonView);return n[t(206)]({role:t(187)}),n}),this[e(278)]=this[e(196)][e(302)][e(147)](e(278));const i=this[e(196)];this[e(192)]=setInterval(()=>{const t=e;let n;for(const e in i){const r=e,o=i[r];if(t(159)==o||t(163)==o||t(188)==o||t(132)==o||t(298)==o||t(230)==o||t(220)==o||t(221)==o){delete i[r],n=o,clearInterval(this[t(192)]),this[t(192)]=void 0;break}}t(163)==n&&i[t(218)](t(251)),t(188)==n&&i[t(218)](t(304)),t(132)==n&&i[t(218)](t(296)),t(298)==n&&i[t(218)](t(190),t(172)),t(230)==n&&i[t(218)](t(295)),t(220)==n&&i[t(218)](t(169)),t(221)==n&&i[t(218)](t(189))},1e3)}[Te(261)](){const e=Te;super[e(261)](),this[e(192)]&&clearInterval(this[e(192)])}[Te(272)](e="",n="",r=Te(233)){const i=Te,s=this[i(196)],u=s[i(219)][i(263)],d=s[i(264)][i(147)](p),l=s[i(264)][i(147)](a.ClipboardMarkersUtils);d[i(157)]();const h=new $e,f=new ClipboardEvent(i(175),{clipboardData:h}),m=new c.ViewDataTransfer(h),g=new c.ViewDocumentDomEventData(u,f,{dataTransfer:m});l[i(292)](i(257),()=>{const e=i;u[e(181)][e(161)](e(175),g)}),this[i(141)]||(this[i(151)](),this[i(289)]=new P(s,this[i(229)][i(274)],this[i(141)]));let y=m[i(198)](i(186));const w=s[i(216)][i(181)][i(167)],b=Array[i(207)](w[i(245)]());1===b[i(164)]&&b[0][i(253)]&&!w[i(171)]()&&""!==y[i(139)](/&nbsp;/g,"")[i(155)]()&&(y=i(215)+y+i(240)),this[i(289)][i(275)]({actionId:r,query:e,htmlContent:y,label:n,mainActionLabel:L[s[i(216)][i(181)][i(167)][i(138)]?i(301):i(287)]}),i(170)!==this[i(294)].id?this[i(294)][i(178)]({id:i(170),icon:t.IconRobotPencil,title:v(this[i(196)][i(142)],i(225)),content:this[i(141)],position:o.DialogViewPosition[i(180)],onShow:()=>{const e=i;this[e(141)][e(297)]()},onHide:()=>{const e=i;this[e(289)][e(191)](),d[e(228)]()}}):this[i(294)][i(263)][i(174)]||this[i(294)][i(263)][i(262)]()}[Te(238)](){const e=Te;this[e(294)][e(252)]()}[Te(217)](){const e=Te,t=new Map,n=s(this[e(196)][e(302)][e(147)](e(249)),this[e(196)][e(142)]);for(const r of n)for(const n of r[e(237)])t[e(206)](n.id,{...n,groupId:r[e(149)],groupLabel:r[e(236)]||r[e(149)]});return t}[Te(271)](e){const n=Te,r=this[n(196)],i=r[n(237)][n(147)](n(197)),o=new e(r[n(142)]);return o[n(206)]({label:v(r[n(142)],n(225)),icon:t.IconRobotPencil,isToggleable:!0}),o[n(223)](n(146)).to(i),o[n(223)](n(193)).to(this[n(294)],"id",e=>n(170)===e),this[n(267)](o,n(211),()=>{const e=n;o[e(193)]?this[e(238)]():i[e(211)]()}),o}[Te(151)](){const e=Te,t=this[e(196)][e(264)][e(147)](p);this[e(141)]=new me(this[e(196)][e(142)],this[e(234)],this[e(196)][e(302)][e(147)](e(156))),this[e(141)].on(e(299),()=>{const t=e;this[t(294)][t(263)][t(174)]||this[t(294)][t(263)][t(262)]()}),this[e(141)][e(247)][e(277)][e(202)].on(e(182),()=>{const t=e;this[t(294)][t(263)][t(174)]||this[t(294)][t(263)][t(262)]()}),this[e(267)](this[e(141)],e(200),()=>{const n=e;t[n(305)](this[n(289)][n(176)]),this[n(238)]()}),this[e(267)](this[e(141)],e(288),()=>{const n=e;t[n(288)](this[n(289)][n(176)]),this[n(238)]()}),this[e(158)]()}[Te(158)](){const e=Te,{locale:t,ui:{ariaLiveAnnouncer:n}}=this[e(196)];this[e(141)][e(276)].on(e(160),(r,i,o)=>{const s=e,a=this[s(289)][s(176)];o?n[s(166)](v(t,s(153))):a&&n[s(166)](v(t,s(235),a),{politeness:s(281),isUnsafeHTML:!0})}),this[e(141)].on(e(135),(r,i,o)=>{const s=e;if(o){const e=this[s(141)][s(185)][s(173)];n[s(166)](v(t,s(273),e))}})}[Te(183)](e){const t=Te,n=this[t(239)][t(147)](e),r=this[t(196)],o=r[t(216)][t(181)][t(167)],s=r[t(237)][t(147)](t(197)),a=r[t(264)][t(147)](p),c=("_ungrouppedCommands"!==n[t(149)]?n[t(236)]+": ":"")+n[t(162)];if(!1!==n[t(255)]&&o[t(138)]){const e=(0,i.first)(o[t(208)]())||r[t(216)][t(243)][t(231)](o);r[t(216)][t(254)](n=>{n[t(134)](e,"in")})}a[t(157)](),s[t(211)](n[t(285)],c,t(210)+e)}[Te(148)](e,t,n,r){const i=Te,s=this[i(196)],a=s[i(142)],c=new o.MenuBarMenuListView(a),u=Ue(s,n)[i(137)](e=>e[i(237)][i(164)]);1===u[i(164)]?this[i(241)]({command:e,commands:u[0][i(237)],parentMenuView:t,onExecute:r})[i(205)](e=>c[i(214)][i(204)](e)):u[i(205)](({groupId:n,groupLabel:s,commands:u})=>{const d=i,l=new o.MenuBarMenuListItemView(a,t),h=new o.MenuBarMenuView(a),f=new o.MenuBarMenuListView(a),p=this[d(241)]({command:e,commands:u,parentMenuView:h,onExecute:r});h[d(291)][d(206)]({label:s||n}),h[d(150)](d(211)).to(t),f[d(214)][d(179)](p),h[d(168)][d(280)][d(204)](f),l[d(280)][d(204)](h),c[d(214)][d(204)](l)}),t[i(168)][i(280)][i(204)](c)}[Te(241)]({command:e,commands:t,parentMenuView:n,onExecute:r}){const i=Te,s=this[i(196)],a=s[i(142)];return Ue(s,t)[i(303)](t=>{const s=i,c=new o.MenuBarMenuListItemView(a,n),u=new o.MenuBarMenuListItemButtonView(a);return u[s(206)]({label:t[s(162)]}),u[s(150)](s(211)).to(n),u.on(s(211),()=>r(t.id)),u[s(223)](s(146)).to(e,s(286),e=>e[s(282)](t.id)),c[s(280)][s(204)](u),c})}}function De(e,t){const n=Te;return void 0!==e[n(177)]&&void 0===t[n(177)]?1:void 0===e[n(177)]&&void 0!==t[n(177)]?-1:void 0!==e[n(177)]&&void 0!==t[n(177)]?e[n(177)]-t[n(177)]:0}function Ue(e,t){const n=Te;t[n(259)](De);const r={},o=[];for(const s of t)if(void 0!==s[n(177)]){if(s[n(177)]in r)throw new i.CKEditorError(n(227),e,{conflictingDefinitions:[s,r[s[n(177)]]]});r[s[n(177)]]=s,o[n(133)](s[n(177)],0,s)}else o[n(194)](s);return o}function Fe(e,t){const n=Be();return(Fe=function(e,t){return n[e-=145]})(e,t)}function Be(){const e=["Improve writing","set","friendly","translateGerman","Summarize","groupId","legal","Improve this content by using descriptive language and inserting more information and more detailed explanations.","get","changeStyle","Fix spelling mistakes, use proper grammar and apply good writing practices. Do not lose the original meaning.","Make longer","AIAssistant","filter","Professional","Change tone","German","Make shorter","makeShorter","isPremiumPlugin","Translate the content to German language.","Translate the content to Spanish language.","412klpOOR","Rewrite this content as a poem using poetic techniques without losing the original meaning.","Translate the content to English language.","Translate the content to Hindi language.","simplifyLanguage","Continue","casual","Improve using friendly, comforting language, to convey understanding and empathy.","Casual","makeLonger","English","Translate the content to Simplified Chinese language.","confident","Rewrite this content as a business professional with formal language.","Translate the content to Arabic language.","French","config","Business","Start with the provided content and write at the end of it continuing this topic. Keep the added part short.","Change style","includes","Simplify language","isOfficialPlugin","translateChinese","Rewrite this content as a legal professional using valid legal terminology.","Legal","editOrReview","Direct","direct","translateFrench","professional","17345LNGigX","Simplified Chinese","translatePortuguese","improveWriting","translateHindi","Edit or review","2672eiPZrV","pluginName","push","find","Hindi","Improve using casual, informal language to convey a casual conversation with a real person.","summarize","Friendly","changeTone","ai.aiAssistant.removeCommands","journalism","translate","Translate the content to French language.","Improve using polished, formal, and respectful language to convey professional expertise and competence.","23219mlOlmw","translateArabic","1000732bOScCv","business","generate","define","Confident","4041576wYMcOO","Journalism","Rewrite this content as a journalist using engaging language to convey the importance of the information.","continue","translateEnglish","ai.aiAssistant.extraCommandGroups","39422601dZzhVW","Generate from selection","Summarize this content into one paragraph of text. Include only the key ideas and conclusions. Keep it short. Do not keep original text formatting.","Simplify the writing style of this content and reduce the complexity, so that the content is easy to understand.","locale","8823858lMndWy","Poetic","concat","Spanish","Improve using direct language, using only the essential information.","Remove any repetitive, redundant, or non-essential writing in this content without changing the meaning or losing any key information.","ai.aiAssistant.commands","translateSpanish","2287604rOQmYL","Arabic","commands","10rPnyTP","Translate the content to Portuguese language.","requires","Portuguese","Improve using compelling, optimistic language to convey confidence in the writing.","Translate","poetic","ai.aiAssistant.preserveComments","forEach"];return(Be=function(){return e})()}const je=Fe;!function(e){const t=Fe,n=e();for(;;)try{if(883105===-parseInt(t(216))/1+-parseInt(t(240))/2+-parseInt(t(221))/3+parseInt(t(163))/4*(parseInt(t(194))/5)+-parseInt(t(232))/6+parseInt(t(214))/7*(parseInt(t(200))/8)+-parseInt(t(227))/9*(-parseInt(t(243))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Be);class qe extends e.Plugin{static get[je(245)](){return[Ne,p]}static get[je(201)](){return je(153)}static get[je(185)](){return!0}static get[je(160)](){return!0}constructor(e){const t=je;super(e);const n=e[t(179)],r=e[t(231)];n[t(219)](t(250),!0),n[t(219)](t(238),He(r)),n[t(219)](t(226),[]),n[t(219)](t(209),[]);let i=s(n[t(149)](t(238)),r);const o=n[t(149)](t(226)),a=n[t(149)](t(209));o[t(251)](e=>{const n=t,r=i[n(203)](t=>t[n(146)]===e[n(146)]);r?r[n(242)]=r[n(242)][n(234)](e[n(242)]):i[n(202)](e)}),i=i[t(154)](e=>!a[t(183)](e[t(146)])),i[t(251)](e=>{const n=t;e[n(242)]=e[n(242)][n(154)](e=>!a[n(183)](e.id))}),n[t(253)](t(238),i)}}function He(e){const t=je;return[{groupId:t(189),groupLabel:v(e,t(199)),commands:[{id:t(197),label:v(e,t(252)),prompt:t(151)},{id:t(159),label:v(e,t(158)),prompt:t(237)},{id:t(172),label:v(e,t(152)),prompt:t(148)},{id:t(167),label:v(e,t(184)),prompt:t(230)}]},{groupId:t(218),groupLabel:v(e,t(228)),commands:[{id:t(206),label:v(e,t(145)),prompt:t(229)},{id:t(224),label:v(e,t(168)),prompt:t(181)}]},{groupId:t(208),groupLabel:v(e,t(156)),commands:[{id:t(193),label:v(e,t(155)),prompt:t(213)},{id:t(169),label:v(e,t(171)),prompt:t(205)},{id:t(191),label:v(e,t(190)),prompt:t(236)},{id:t(175),label:v(e,t(220)),prompt:t(247)},{id:t(254),label:v(e,t(207)),prompt:t(170)}]},{groupId:t(150),groupLabel:v(e,t(182)),commands:[{id:t(217),label:v(e,t(180)),prompt:t(176)},{id:t(147),label:v(e,t(188)),prompt:t(187)},{id:t(210),label:v(e,t(222)),prompt:t(223)},{id:t(249),label:v(e,t(233)),prompt:t(164)}]},{groupId:t(211),groupLabel:v(e,t(248)),commands:[{id:t(225),label:v(e,t(173)),prompt:t(165)},{id:t(239),label:v(e,t(235)),prompt:t(162)},{id:t(196),label:v(e,t(246)),prompt:t(244)},{id:t(255),label:v(e,t(157)),prompt:t(161)},{id:t(192),label:v(e,t(178)),prompt:t(212)},{id:t(186),label:v(e,t(195)),prompt:t(174)},{id:t(198),label:v(e,t(204)),prompt:t(166)},{id:t(215),label:v(e,t(241)),prompt:t(177)}]}]}const ze=Ve;function Ve(e,t){const n=Ge();return(Ve=function(e,t){return n[e-=308]})(e,t)}function Ge(){const e=["119spMsJs","3459306LwSGIl","name","sendRequest","get","abort","application/json","_prepareRequestHeaders","250338mxtzSL","error","object","106teELDw","init","makeRequest","textAdapter","requires","plugins","_prepareRequestParameters","catch","AI_ERROR_GET_PARAMETERS","AbortError","aitextadapter-send-request-failed","reject","editor","13295STsSoC","1644QSUHWm","AI_ERROR_GET_HEADERS","abortController","signal","10972152GiKcWk","assign","13234077CECobr","1840RRlctW","43352570vehgph","aborted","locale","resolve"];return(Ge=function(){return e})()}!function(e){const t=Ve,n=e();for(;;)try{if(941767===parseInt(t(343))/1*(parseInt(t(327))/2)+parseInt(t(333))/3+-parseInt(t(320))/4*(parseInt(t(319))/5)+-parseInt(t(340))/6*(parseInt(t(332))/7)+-parseInt(t(324))/8+-parseInt(t(326))/9+parseInt(t(328))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ge);class We extends e.Plugin{[ze(322)];static get[ze(310)](){return[w]}constructor(e){const t=ze;super(e),this[t(322)]=new AbortController}[ze(344)](){const e=ze;this[e(318)][e(311)][e(336)](w)[e(309)]=this}[ze(337)](){const e=ze;this[e(322)][e(323)][e(329)]||(this[e(322)][e(337)](),this[e(322)]=new AbortController)}async[ze(308)](e){const t=ze;return this[t(335)](e)[t(313)](e=>{const n=t;if(e instanceof b)return Promise[n(317)](e);if(n(315)==e[n(334)])return Promise[n(331)]();throw console[n(341)](e),new i.CKEditorError(n(316),null)})}async[ze(339)](e,t){const n=ze,r=this[n(318)][n(330)],i={"Content-Type":n(338)};if(n(342)==typeof e)Object[n(325)](i,e);else if(e)try{const r=await e(t);Object[n(325)](i,r)}catch{return Promise[n(317)](new b(v(r,n(321))))}return i}async[ze(312)](e,t){const n=ze,r=this[n(318)][n(330)];if(n(342)==typeof e)return e;try{return await e(t)}catch{return Promise[n(317)](new b(v(r,n(314))))}}}function Ke(){const e=["POST","reject","Your task is to execute the instruction using the provided HTML content. Follow the instruction closely. Your answer must be a properly formatted HTML code. Do not add any additional remarks or notes. Do not act like a chatbot or a real person.","7919020xPSxMB","signal","choices","body","ai.openAI.requestParameters","locale","_apiUrl","replace","AI_ERROR_MODERATION","pluginName","gpt-4o","config","2701062Nchucg","data: ","_requestParameters","prepareMessages","content","\nYou must keep the text formatting.\n\nContent:\n","ai.openAI.requestHeaders","parse","_cleanUpData","550437mETtYS","abortController","Your task is to generate HTML content accordingly to the given instruction. Never include <img> tag in your response even if asked for. Your answer must be a well-structured and properly formatted HTML code. Answer only with the generated HTML content. Do not add any additional remarks or notes. Do not act like a chatbot or a real person.","45979NwLXfW","1824242FdpcqF","delta","https://api.openai.com/v1/chat/completions","editor","811521rpcPqD","json","_prepareRequestHeaders","10BNZktx","user","_requestHeaders","40THflEN","define","Instruction:\n","stream","_isBufferIncomplete","_readStreamableResponse","filter","get","getReader","read","length","message","context_length_exceeded","decode","map","stringify","ai.openAI.apiUrl","join","[DONE]","resolve","AI_ERROR_CONTEXT_LENGTH","8LKcVAy","OpenAITextAdapter","split","system","Moderation","text","_readStaticResponse","1167410VcdsiJ","sendRequest","includes","_prepareRequestParameters"];return(Ke=function(){return e})()}const Je=Ye;function Ye(e,t){const n=Ke();return(Ye=function(e,t){return n[e-=319]})(e,t)}!function(e){const t=Ye,n=e();for(;;)try{if(247905===-parseInt(t(337))/1*(-parseInt(t(345))/2)+-parseInt(t(334))/3*(parseInt(t(369))/4)+parseInt(t(376))/5+-parseInt(t(325))/6+parseInt(t(338))/7+-parseInt(t(348))/8*(parseInt(t(342))/9)+parseInt(t(383))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ke);class Qe extends We{[Je(319)];[Je(347)];[Je(327)];static get[Je(322)](){return Je(370)}constructor(e){const t=Je;super(e),e[t(324)][t(349)](t(364),t(340)),e[t(324)][t(355)](t(387))||e[t(324)][t(349)](t(387),{model:t(323),temperature:1,top_p:1,stream:!0}),this[t(319)]=e[t(324)][t(355)](t(364)),this[t(347)]=e[t(324)][t(355)](t(331))||{},this[t(327)]=e[t(324)][t(355)](t(387))}async[Je(377)]({query:e,context:t,onData:n,actionId:r}){const i=Je,o=this[i(341)][i(388)],s=await this[i(328)](e,t,r),a=await this[i(344)](this[i(347)],r),c=await this[i(379)](this[i(327)],r),u={messages:s,...c},d={method:i(380),headers:a,body:JSON[i(363)](u),signal:this[i(335)][i(384)]},l=await fetch(this[i(319)],d);if(l.ok)return c[i(351)]?await this[i(353)](l,n):await this[i(375)](l,n),Promise[i(367)]();{const e=await l[i(374)]();return e[i(378)](i(360))?Promise[i(381)](new b(v(o,i(368)))):e[i(378)](i(373))?Promise[i(381)](new b(v(o,i(321)))):Promise[i(381)](new Error(e))}}async[Je(328)](e,t,n){const r=Je;let i,o;return t?(i=r(382),o=r(350)+e+r(330)+t):(i=r(336),o=e),[{role:r(372),content:i},{role:r(346),content:o}]}async[Je(353)](e,t){const n=Je,r=e[n(386)][n(356)](),i=new TextDecoder;let o="",s="",a="",c=!1;for(;!c;){const{done:e,value:u}=await r[n(357)](),d=o+i[n(361)](u);let l="";c=e;try{l=this[n(333)](d),o=""}catch{o=d;continue}s+=l,!c&&this[n(352)](s)||s&&(a+=s,s="",t(a))}return Promise[n(367)]()}async[Je(375)](e,t){const n=Je;return t((await e[n(343)]())[n(385)][0][n(359)][n(329)]),Promise[n(367)]()}[Je(352)](e){const t=Je,n=e[t(371)]("<")[t(358)]!==e[t(371)](">")[t(358)],r=e[t(358)]<30;return n&&r}[Je(333)](e){const t=Je;return e[t(371)](/\n(?![^{]*\})/g)[t(362)](e=>e[t(320)](t(326),""))[t(354)](e=>e&&e[t(358)]>0&&t(366)!==e)[t(362)](e=>{const n=t,{choices:r}=JSON[n(332)](e);if(r[0]?.[n(339)]?.[n(329)])return r[0][n(339)][n(329)]})[t(354)](e=>e)[t(365)]("")}}var Ze,Xe,et,tt;!function(e){e.HEADER="header",e.QUERY="query"}(Ze||(Ze={})),function(e){e.HEADER="header",e.QUERY="query"}(Xe||(Xe={})),function(e){e.HTTP="http",e.HTTPS="https"}(et||(et={})),function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"}(tt||(tt={}));var nt;!function(e){e[e.HEADER=0]="HEADER",e[e.TRAILER=1]="TRAILER"}(nt||(nt={}));const rt="__smithy_context";var it,ot;!function(e){e.PROFILE="profile",e.SSO_SESSION="sso-session",e.SERVICES="services"}(it||(it={})),function(e){e.HTTP_0_9="http/0.9",e.HTTP_1_0="http/1.0",e.TDS_8_0="tds/8.0"}(ot||(ot={}));class st{constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.slice(-1)?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){const t=new st({...e,headers:{...e.headers}});var n;return t.query&&(t.query=(n=t.query,Object.keys(n).reduce((e,t)=>{const r=n[t];return{...e,[t]:Array.isArray(r)?[...r]:r}},{}))),t}static isInstance(e){if(!e)return!1;const t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers}clone(){return st.clone(this)}}class at{constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers}}const ct={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},ut=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{if(!st.isInstance(n.request))return t(n);const{request:r}=n,{handlerProtocol:i=""}=e.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!r.headers[":authority"])delete r.headers.host,r.headers[":authority"]=r.hostname+(r.port?":"+r.port:"");else if(!r.headers.host){let e=r.hostname;null!=r.port&&(e+=`:${r.port}`),r.headers.host=e}return t(n)})(e),ct)}}),dt={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},lt="X-Amzn-Trace-Id",ht={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},ft=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{const{request:r}=n;if(!st.isInstance(r)||"node"!==e.runtime)return t(n);const i=Object.keys(r.headers??{}).find(e=>e.toLowerCase()===lt.toLowerCase())??lt;if(r.headers.hasOwnProperty(i))return t(n);const o=process.env.AWS_LAMBDA_FUNCTION_NAME,s=process.env._X_AMZN_TRACE_ID,a=e=>"string"==typeof e&&e.length>0;return a(o)&&a(s)&&(r.headers[lt]=s),t({...n,request:r})})(e),ht)}}),pt=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t};const mt=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),gt=e=>mt.test(e)||e.startsWith("[")&&e.endsWith("]"),yt=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),wt=(e,t=!1)=>{if(!t)return yt.test(e);const n=e.split(".");for(const e of n)if(!wt(e))return!1;return!0},bt={},vt="endpoints";function kt(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${kt(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(kt).join(", ")})`:JSON.stringify(e,null,2)}class St extends Error{constructor(e){super(e),this.name="EndpointError"}}const Et=(e,t)=>(e=>{const t=e.split("."),n=[];for(const r of t){const t=r.indexOf("[");if(-1!==t){if(r.indexOf("]")!==r.length-1)throw new St(`Path: '${e}' does not end with ']'`);const i=r.slice(t+1,-1);if(Number.isNaN(parseInt(i)))throw new St(`Invalid array index: '${i}' in path: '${e}'`);0!==t&&n.push(r.slice(0,t)),n.push(i)}else n.push(r)}return n})(t).reduce((n,r)=>{if("object"!=typeof n)throw new St(`Index '${r}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(n)?n[parseInt(r)]:n[r]},e),At={[et.HTTP]:80,[et.HTTPS]:443},It={booleanEquals:(e,t)=>e===t,getAttr:Et,isSet:e=>null!=e,isValidHostLabel:wt,not:e=>!e,parseURL:e=>{const t=(()=>{try{if(e instanceof URL)return e;if("object"==typeof e&&"hostname"in e){const{hostname:t,port:n,protocol:r="",path:i="",query:o={}}=e,s=new URL(`${r}//${t}${n?`:${n}`:""}${i}`);return s.search=Object.entries(o).map(([e,t])=>`${e}=${t}`).join("&"),s}return new URL(e)}catch(e){return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const n=t.href,{host:r,hostname:i,pathname:o,protocol:s,search:a}=t;if(a)return null;const c=s.slice(0,-1);if(!Object.values(et).includes(c))return null;const u=gt(i);return{scheme:c,authority:`${r}${n.includes(`${r}:${At[c]}`)||"string"==typeof e&&e.includes(`${r}:${At[c]}`)?`:${At[c]}`:""}`,path:o,normalizedPath:o.endsWith("/")?o:`${o}/`,isIp:u}},stringEquals:(e,t)=>e===t,substring:(e,t,n,r)=>t>=n||e.length<n?null:r?e.substring(e.length-n,e.length-t):e.substring(t,n),uriEncode:e=>encodeURIComponent(e).replace(/[!*'()]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)},_t=(e,t)=>{const n=[],r={...t.endpointParams,...t.referenceRecord};let i=0;for(;i<e.length;){const t=e.indexOf("{",i);if(-1===t){n.push(e.slice(i));break}n.push(e.slice(i,t));const o=e.indexOf("}",t);if(-1===o){n.push(e.slice(t));break}"{"===e[t+1]&&"}"===e[o+1]&&(n.push(e.slice(t+1,o)),i=o+2);const s=e.substring(t+1,o);if(s.includes("#")){const[e,t]=s.split("#");n.push(Et(r[e],t))}else n.push(r[s]);i=o+1}return n.join("")},xt=(e,t,n)=>{if("string"==typeof e)return _t(e,n);if(e.fn)return Rt(e,n);if(e.ref)return(({ref:e},t)=>({...t.endpointParams,...t.referenceRecord}[e]))(e,n);throw new St(`'${t}': ${String(e)} is not a string, function or reference.`)},Rt=({fn:e,argv:t},n)=>{const r=t.map(e=>["boolean","number"].includes(typeof e)?e:xt(e,"arg",n)),i=e.split(".");return i[0]in bt&&null!=i[1]?bt[i[0]][i[1]](...r):It[e](...r)},Ct=({assign:e,...t},n)=>{if(e&&e in n.referenceRecord)throw new St(`'${e}' is already defined in Reference Record.`);const r=Rt(t,n);return n.logger?.debug?.(`${vt} evaluateCondition: ${kt(t)} = ${kt(r)}`),{result:""===r||!!r,...null!=e&&{toAssign:{name:e,value:r}}}},Pt=(e=[],t)=>{const n={};for(const r of e){const{result:e,toAssign:i}=Ct(r,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!e)return{result:e};i&&(n[i.name]=i.value,t.logger?.debug?.(`${vt} assign: ${i.name} := ${kt(i.value)}`))}return{result:!0,referenceRecord:n}},Mt=(e,t)=>Object.entries(e).reduce((e,[n,r])=>({...e,[n]:r.map(e=>{const r=xt(e,"Header value entry",t);if("string"!=typeof r)throw new St(`Header '${n}' value '${r}' is not a string`);return r})}),{}),Tt=(e,t)=>{if(Array.isArray(e))return e.map(e=>Tt(e,t));switch(typeof e){case"string":return _t(e,t);case"object":if(null===e)throw new St(`Unexpected endpoint property: ${e}`);return Ot(e,t);case"boolean":return e;default:throw new St("Unexpected endpoint property type: "+typeof e)}},Ot=(e,t)=>Object.entries(e).reduce((e,[n,r])=>({...e,[n]:Tt(r,t)}),{}),Lt=(e,t)=>{const n=xt(e,"Endpoint URL",t);if("string"==typeof n)try{return new URL(n)}catch(e){throw console.error(`Failed to construct URL with ${n}`,e),e}throw new St("Endpoint URL must be a string, got "+typeof n)},$t=(e,t)=>{const{conditions:n,endpoint:r}=e,{result:i,referenceRecord:o}=Pt(n,t);if(!i)return;const s={...t,referenceRecord:{...t.referenceRecord,...o}},{url:a,properties:c,headers:u}=r;return t.logger?.debug?.(`${vt} Resolving endpoint from template: ${kt(r)}`),{...null!=u&&{headers:Mt(u,s)},...null!=c&&{properties:Ot(c,s)},url:Lt(a,s)}},Nt=(e,t)=>{const{conditions:n,error:r}=e,{result:i,referenceRecord:o}=Pt(n,t);if(i)throw new St(xt(r,"Error",{...t,referenceRecord:{...t.referenceRecord,...o}}))},Dt=(e,t)=>{const{conditions:n,rules:r}=e,{result:i,referenceRecord:o}=Pt(n,t);if(i)return Ut(r,{...t,referenceRecord:{...t.referenceRecord,...o}})},Ut=(e,t)=>{for(const n of e)if("endpoint"===n.type){const e=$t(n,t);if(e)return e}else if("error"===n.type)Nt(n,t);else{if("tree"!==n.type)throw new St(`Unknown endpoint rule: ${n}`);{const e=Dt(n,t);if(e)return e}}throw new St("Rules evaluation failed")},Ft=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!Ft(t))return!1;return!0}return!!wt(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!gt(e)))};let Bt=JSON.parse('{"partitions":[{"id":"aws","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-east-1","name":"aws","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^(us|eu|ap|sa|ca|me|af|il|mx)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"af-south-1":{"description":"Africa (Cape Town)"},"ap-east-1":{"description":"Asia Pacific (Hong Kong)"},"ap-northeast-1":{"description":"Asia Pacific (Tokyo)"},"ap-northeast-2":{"description":"Asia Pacific (Seoul)"},"ap-northeast-3":{"description":"Asia Pacific (Osaka)"},"ap-south-1":{"description":"Asia Pacific (Mumbai)"},"ap-south-2":{"description":"Asia Pacific (Hyderabad)"},"ap-southeast-1":{"description":"Asia Pacific (Singapore)"},"ap-southeast-2":{"description":"Asia Pacific (Sydney)"},"ap-southeast-3":{"description":"Asia Pacific (Jakarta)"},"ap-southeast-4":{"description":"Asia Pacific (Melbourne)"},"ap-southeast-5":{"description":"Asia Pacific (Malaysia)"},"ap-southeast-7":{"description":"Asia Pacific (Thailand)"},"aws-global":{"description":"AWS Standard global region"},"ca-central-1":{"description":"Canada (Central)"},"ca-west-1":{"description":"Canada West (Calgary)"},"eu-central-1":{"description":"Europe (Frankfurt)"},"eu-central-2":{"description":"Europe (Zurich)"},"eu-north-1":{"description":"Europe (Stockholm)"},"eu-south-1":{"description":"Europe (Milan)"},"eu-south-2":{"description":"Europe (Spain)"},"eu-west-1":{"description":"Europe (Ireland)"},"eu-west-2":{"description":"Europe (London)"},"eu-west-3":{"description":"Europe (Paris)"},"il-central-1":{"description":"Israel (Tel Aviv)"},"me-central-1":{"description":"Middle East (UAE)"},"me-south-1":{"description":"Middle East (Bahrain)"},"mx-central-1":{"description":"Mexico (Central)"},"sa-east-1":{"description":"South America (Sao Paulo)"},"us-east-1":{"description":"US East (N. Virginia)"},"us-east-2":{"description":"US East (Ohio)"},"us-west-1":{"description":"US West (N. California)"},"us-west-2":{"description":"US West (Oregon)"}}},{"id":"aws-cn","outputs":{"dnsSuffix":"amazonaws.com.cn","dualStackDnsSuffix":"api.amazonwebservices.com.cn","implicitGlobalRegion":"cn-northwest-1","name":"aws-cn","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^cn\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-cn-global":{"description":"AWS China global region"},"cn-north-1":{"description":"China (Beijing)"},"cn-northwest-1":{"description":"China (Ningxia)"}}},{"id":"aws-us-gov","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-gov-west-1","name":"aws-us-gov","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-gov\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-us-gov-global":{"description":"AWS GovCloud (US) global region"},"us-gov-east-1":{"description":"AWS GovCloud (US-East)"},"us-gov-west-1":{"description":"AWS GovCloud (US-West)"}}},{"id":"aws-iso","outputs":{"dnsSuffix":"c2s.ic.gov","dualStackDnsSuffix":"c2s.ic.gov","implicitGlobalRegion":"us-iso-east-1","name":"aws-iso","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-iso\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-global":{"description":"AWS ISO (US) global region"},"us-iso-east-1":{"description":"US ISO East"},"us-iso-west-1":{"description":"US ISO WEST"}}},{"id":"aws-iso-b","outputs":{"dnsSuffix":"sc2s.sgov.gov","dualStackDnsSuffix":"sc2s.sgov.gov","implicitGlobalRegion":"us-isob-east-1","name":"aws-iso-b","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isob\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-b-global":{"description":"AWS ISOB (US) global region"},"us-isob-east-1":{"description":"US ISOB East (Ohio)"}}},{"id":"aws-iso-e","outputs":{"dnsSuffix":"cloud.adc-e.uk","dualStackDnsSuffix":"cloud.adc-e.uk","implicitGlobalRegion":"eu-isoe-west-1","name":"aws-iso-e","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^eu\\\\-isoe\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-e-global":{"description":"AWS ISOE (Europe) global region"},"eu-isoe-west-1":{"description":"EU ISOE West"}}},{"id":"aws-iso-f","outputs":{"dnsSuffix":"csp.hci.ic.gov","dualStackDnsSuffix":"csp.hci.ic.gov","implicitGlobalRegion":"us-isof-south-1","name":"aws-iso-f","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isof\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-f-global":{"description":"AWS ISOF global region"},"us-isof-east-1":{"description":"US ISOF EAST"},"us-isof-south-1":{"description":"US ISOF SOUTH"}}},{"id":"aws-eusc","outputs":{"dnsSuffix":"amazonaws.eu","dualStackDnsSuffix":"amazonaws.eu","implicitGlobalRegion":"eusc-de-east-1","name":"aws-eusc","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^eusc\\\\-(de)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"eusc-de-east-1":{"description":"EU (Germany)"}}}],"version":"1.1"}'),jt="";const qt={isVirtualHostableS3Bucket:Ft,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[n,r,i,o,s,...a]=t;if("arn"!==n||""===r||""===i||""===a.join(":"))return null;return{partition:r,service:i,region:o,accountId:s,resourceId:a.map(e=>e.split("/")).flat()}},partition:e=>{const{partitions:t}=Bt;for(const n of t){const{regions:t,outputs:r}=n;for(const[n,i]of Object.entries(t))if(n===e)return{...r,...i}}for(const n of t){const{regionRegex:t,outputs:r}=n;if(new RegExp(t).test(e))return{...r}}const n=t.find(e=>"aws"===e.id);if(!n)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...n.outputs}}};function Ht(e,t,n){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=n}bt.aws=qt;const zt=/\d{12}\.ddb/;const Vt="user-agent",Gt="x-amz-user-agent",Wt=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Kt=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g;const Jt=e=>(t,n)=>async r=>{const{request:i}=r;if(!st.isInstance(i))return t(r);const{headers:o}=i,s=n?.userAgent?.map(Yt)||[],a=(await e.defaultUserAgentProvider()).map(Yt);await async function(e,t,n){const r=n.request;if("rpc-v2-cbor"===r?.headers?.["smithy-protocol"]&&Ht(e,"PROTOCOL_RPC_V2_CBOR","M"),"function"==typeof t.retryStrategy){const n=await t.retryStrategy();"function"==typeof n.acquireInitialRetryToken?n.constructor?.name?.includes("Adaptive")?Ht(e,"RETRY_MODE_ADAPTIVE","F"):Ht(e,"RETRY_MODE_STANDARD","E"):Ht(e,"RETRY_MODE_LEGACY","D")}if("function"==typeof t.accountIdEndpointMode){const n=e.endpointV2;switch(String(n?.url?.hostname).match(zt)&&Ht(e,"ACCOUNT_ID_ENDPOINT","O"),await(t.accountIdEndpointMode?.())){case"disabled":Ht(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":Ht(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":Ht(e,"ACCOUNT_ID_MODE_REQUIRED","R")}}const i=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const t=i;t.accountId&&Ht(e,"RESOLVED_ACCOUNT_ID","T");for(const[n,r]of Object.entries(t.$source??{}))Ht(e,n,r)}}(n,e,r);const c=n;a.push(`m/${function(e){let t="";for(const n in e){const r=e[n];if(!(t.length+r.length+1<=1024))break;t.length?t+=","+r:t+=r}return t}(Object.assign({},n.__smithy_context?.features,c.__aws_sdk_context?.features))}`);const u=e?.customUserAgent?.map(Yt)||[],d=await e.userAgentAppId();d&&a.push(Yt([`app/${d}`]));const l=(jt?[jt]:[]).concat([...a,...s,...u]).join(" "),h=[...a.filter(e=>e.startsWith("aws-sdk-")),...u].join(" ");return"browser"!==e.runtime?(h&&(o[Gt]=o[Gt]?`${o[Vt]} ${h}`:h),o[Vt]=l):o[Gt]=l,t({...r,request:i})},Yt=e=>{const t=e[0].split("/").map(e=>e.replace(Wt,"-")).join("/"),n=e[1]?.replace(Kt,"-"),r=t.indexOf("/"),i=t.substring(0,r);let o=t.substring(r+1);return"api"===i&&(o=o.toLowerCase()),[i,o,n].filter(e=>e&&e.length>0).reduce((e,t,n)=>{switch(n){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}},"")},Qt={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0};var Zt;!function(e){e.ENV="env",e.CONFIG="shared config entry"}(Zt||(Zt={}));const Xt=e=>e[rt]||(e[rt]={}),en=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t},tn=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips")),nn=e=>tn(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e;const rn=(e,t)=>(n,r)=>async i=>{const o=((e,t)=>{if(!t||0===t.length)return e;const n=[];for(const r of t)for(const t of e)t.schemeId.split("#")[1]===r&&n.push(t);for(const t of e)n.find(({schemeId:e})=>e===t.schemeId)||n.push(t);return n})(e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,r,i.input)),e.authSchemePreference?await e.authSchemePreference():[]),s=function(e){const t=new Map;for(const n of e)t.set(n.schemeId,n);return t}(e.httpAuthSchemes),a=Xt(r),c=[];for(const n of o){const i=s.get(n.schemeId);if(!i){c.push(`HttpAuthScheme \`${n.schemeId}\` was not enabled for this service.`);continue}const o=i.identityProvider(await t.identityProviderConfigProvider(e));if(!o){c.push(`HttpAuthScheme \`${n.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:u={},signingProperties:d={}}=n.propertiesExtractor?.(e,r)||{};n.identityProperties=Object.assign(n.identityProperties||{},u),n.signingProperties=Object.assign(n.signingProperties||{},d),a.selectedHttpAuthScheme={httpAuthOption:n,identity:await o(n.identityProperties),signer:i.signer};break}if(!a.selectedHttpAuthScheme)throw new Error(c.join("\n"));return n(i)},on={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"};class sn{constructor(e){this.authSchemes=new Map;for(const[t,n]of Object.entries(e))void 0!==n&&this.authSchemes.set(t,n)}getIdentityProvider(e){return this.authSchemes.get(e)}}const an=e=>e=>{throw e},cn=(e,t)=>{},un={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},dn=e=>({applyToStack:e=>{e.addRelativeTo((e,t)=>async n=>{if(!st.isInstance(n.request))return e(n);const r=Xt(t).selectedHttpAuthScheme;if(!r)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:i={}},identity:o,signer:s}=r,a=await e({...n,request:await s.sign(n.request,o,i)}).catch((s.errorHandler||an)(i));return(s.successHandler||cn)(a.response,i),a},un)}}),ln="content-length";const hn={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},fn=e=>({applyToStack:t=>{var n;t.add((n=e.bodyLengthChecker,e=>async t=>{const r=t.request;if(st.isInstance(r)){const{body:e,headers:t}=r;if(e&&-1===Object.keys(t).map(e=>e.toLowerCase()).indexOf(ln))try{const t=n(e);r.headers={...r.headers,[ln]:String(t)}}catch(e){}}return e({...t,request:r})}),hn)}});const pn=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,mn=/(\d+\.){3}\d+/,gn=/\.\./,yn=e=>pn.test(e)&&!mn.test(e)&&!gn.test(e),wn=e=>{const[t,n,r,,,i]=e.split(":"),o="arn"===t&&e.split(":").length>=6,s=Boolean(o&&n&&r&&i);if(o&&!s)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return s},bn=(e,t,n)=>{const r=async()=>{const r=n[e]??n[t];return"function"==typeof r?r():r};return"credentialScope"===e||"CredentialScope"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.credentialScope??e?.CredentialScope}:"accountId"===e||"AccountId"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.accountId??e?.AccountId}:"endpoint"===e||"endpoint"===t?async()=>{if(!1===n.isCustomEndpoint)return;const e=await r();if(e&&"object"==typeof e){if("url"in e)return e.url.href;if("hostname"in e){const{protocol:t,hostname:n,port:r,path:i}=e;return`${t}//${n}${r?":"+r:""}${i}`}}return e}:r},vn=async e=>{};const kn=e=>{if("string"==typeof e)return kn(new URL(e));const{hostname:t,pathname:n,port:r,protocol:i,search:o}=e;let s;return o&&(s=function(e){const t={};if(e=e.replace(/^\?/,""))for(const n of e.split("&")){let[e,r=null]=n.split("=");e=decodeURIComponent(e),r&&(r=decodeURIComponent(r)),e in t?Array.isArray(t[e])?t[e].push(r):t[e]=[t[e],r]:t[e]=r}return t}(o)),{hostname:t,port:r?parseInt(r):void 0,protocol:i,path:n,query:s}},Sn=e=>"object"==typeof e?"url"in e?kn(e.url):e:kn(e),En=async(e,t,n)=>{const r={},i=t?.getEndpointParameterInstructions?.()||{};for(const[t,o]of Object.entries(i))switch(o.type){case"staticContextParams":r[t]=o.value;break;case"contextParams":r[t]=e[o.name];break;case"clientContextParams":case"builtInParams":r[t]=await bn(o.name,t,n)();break;case"operationContextParams":r[t]=o.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(o))}return 0===Object.keys(i).length&&Object.assign(r,n),"s3"===String(n.serviceId).toLowerCase()&&await(async e=>{const t=e?.Bucket||"";if("string"==typeof e.Bucket&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),wn(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!yn(t)||-1!==t.indexOf(".")&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e})(r),r},An=({config:e,instructions:t})=>(n,r)=>async i=>{e.isCustomEndpoint&&function(e,t,n){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=n}(r,"ENDPOINT_OVERRIDE","N");const o=await(async(e,t,n,r)=>{if(!n.isCustomEndpoint){let e;e=n.serviceConfiguredEndpoint?await n.serviceConfiguredEndpoint():await vn(n.serviceId),e&&(n.endpoint=()=>Promise.resolve(Sn(e)),n.isCustomEndpoint=!0)}const i=await En(e,t,n);if("function"!=typeof n.endpointProvider)throw new Error("config.endpointProvider is not set.");return n.endpointProvider(i,r)})(i.input,{getEndpointParameterInstructions:()=>t},{...e},r);r.endpointV2=o,r.authSchemes=o.properties?.authSchemes;const s=r.authSchemes?.[0];if(s){r.signing_region=s.signingRegion,r.signing_service=s.signingName;const e=Xt(r),t=e?.selectedHttpAuthScheme?.httpAuthOption;t&&(t.signingProperties=Object.assign(t.signingProperties||{},{signing_region:s.signingRegion,signingRegion:s.signingRegion,signing_service:s.signingName,signingName:s.signingName,signingRegionSet:s.signingRegionSet},s.properties))}return n({...i})},In=(e,t)=>(t.find(([t])=>t.match(e))||[void 0,void 0])[1],_n={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},xn={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function Rn(e,t,n){return{applyToStack:r=>{r.add(((e,t)=>(n,r)=>async i=>{const{response:o}=await n(i);try{return{response:o,output:await t(o,e)}}catch(e){if(Object.defineProperty(e,"$response",{value:o}),!("$metadata"in e)){const t="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{e.message+="\n "+t}catch(e){r.logger&&"NoOpLogger"!==r.logger?.constructor?.name?r.logger?.warn?.(t):console.warn(t)}void 0!==e.$responseBodyText&&e.$response&&(e.$response.body=e.$responseBodyText);try{if(at.isInstance(o)){const{headers:t={}}=o,n=Object.entries(t);e.$metadata={httpStatusCode:o.statusCode,requestId:In(/^x-[\w-]+-request-?id$/,n),extendedRequestId:In(/^x-[\w-]+-id-2$/,n),cfId:In(/^x-[\w-]+-cf-id$/,n)}}}catch(e){}}throw e}})(e,n),_n),r.add(((e,t)=>(n,r)=>async i=>{const o=e,s=r.endpointV2?.url&&o.urlParser?async()=>o.urlParser(r.endpointV2.url):o.endpoint;if(!s)throw new Error("No valid endpoint provider available.");const a=await t(i.input,{...e,endpoint:s});return n({...i,request:a})})(e,t),xn)}}}const Cn={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:xn.name},Pn=(e,t)=>({applyToStack:n=>{n.addRelativeTo(An({config:e,instructions:t}),Cn)}});var Mn;!function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(Mn||(Mn={}));const Tn=Mn.STANDARD,On=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Ln=["TimeoutError","RequestTimeout","RequestTimeoutException"],$n=[500,502,503,504],Nn=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],Dn=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],Un=e=>429===e.$metadata?.httpStatusCode||On.includes(e.name)||1==e.$retryable?.throttling,Fn=(e,t=0)=>(e=>e.$metadata?.clockSkewCorrected)(e)||Ln.includes(e.name)||Nn.includes(e?.code||"")||Dn.includes(e?.code||"")||$n.includes(e.$metadata?.httpStatusCode||0)||(e=>{const t=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);return!!(e&&e instanceof TypeError)&&t.has(e.message)})(e)||void 0!==e.cause&&t<=10&&Fn(e.cause,t+1);class Bn{constructor(e){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=e?.beta??.7,this.minCapacity=e?.minCapacity??1,this.minFillRate=e?.minFillRate??.5,this.scaleConstant=e?.scaleConstant??.4,this.smooth=e?.smooth??.8;const t=this.getCurrentTimeInSeconds();this.lastThrottleTime=t,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(e){if(this.enabled){if(this.refillTokenBucket(),e>this.currentCapacity){const t=(e-this.currentCapacity)/this.fillRate*1e3;await new Promise(e=>Bn.setTimeoutFn(e,t))}this.currentCapacity=this.currentCapacity-e}}refillTokenBucket(){const e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp)return void(this.lastTimestamp=e);const t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}updateClientSendingRate(e){let t;if(this.updateMeasuredRate(),Un(e)){const e=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=e,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(e),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());const n=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(n)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const e=this.getCurrentTimeInSeconds(),t=Math.floor(2*e)/2;if(this.requestCount++,t>this.lastTxRateBucket){const e=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(e*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}}Bn.setTimeoutFn=setTimeout;const jn=100,qn=2e4,Hn="amz-sdk-invocation-id",zn="amz-sdk-request",Vn=({retryDelay:e,retryCount:t,retryCost:n})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(qn,e),getRetryCost:()=>n});class Gn{constructor(e){this.maxAttempts=e,this.mode=Mn.STANDARD,this.capacity=500,this.retryBackoffStrategy=(()=>{let e=jn;return{computeNextBackoffDelay:t=>Math.floor(Math.min(qn,Math.random()*2**t*e)),setDelayBase:t=>{e=t}}})(),this.maxAttemptsProvider="function"==typeof e?e:async()=>e}async acquireInitialRetryToken(e){return Vn({retryDelay:jn,retryCount:0})}async refreshRetryTokenForRetry(e,t){const n=await this.getMaxAttempts();if(this.shouldRetry(e,t,n)){const n=t.errorType;this.retryBackoffStrategy.setDelayBase("THROTTLING"===n?500:jn);const r=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),i=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,r):r,o=this.getCapacityCost(n);return this.capacity-=o,Vn({retryDelay:i,retryCount:e.getRetryCount()+1,retryCost:o})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(500,this.capacity+(e.getRetryCost()??1))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(e){return console.warn("Max attempts provider could not resolve. Using default of 3"),3}}shouldRetry(e,t,n){return e.getRetryCount()+1<n&&this.capacity>=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return"TRANSIENT"===e?10:5}isRetryableError(e){return"THROTTLING"===e||"TRANSIENT"===e}}class Wn{constructor(e,t){this.maxAttemptsProvider=e,this.mode=Mn.ADAPTIVE;const{rateLimiter:n}=t??{};this.rateLimiter=n??new Bn,this.standardRetryStrategy=new Gn(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){return this.rateLimiter.updateClientSendingRate(t),this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}const Kn={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Jn;const Yn=new Uint8Array(16);function Qn(){if(!Jn&&(Jn="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Jn))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Jn(Yn)}const Zn=[];for(let e=0;e<256;++e)Zn.push((e+256).toString(16).slice(1));function Xn(e,t=0){return Zn[e[t+0]]+Zn[e[t+1]]+Zn[e[t+2]]+Zn[e[t+3]]+"-"+Zn[e[t+4]]+Zn[e[t+5]]+"-"+Zn[e[t+6]]+Zn[e[t+7]]+"-"+Zn[e[t+8]]+Zn[e[t+9]]+"-"+Zn[e[t+10]]+Zn[e[t+11]]+Zn[e[t+12]]+Zn[e[t+13]]+Zn[e[t+14]]+Zn[e[t+15]]}const er=function(e,t,n){if(Kn.randomUUID&&!t&&!e)return Kn.randomUUID();const r=(e=e||{}).random||(e.rng||Qn)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return Xn(r)},tr=e=>e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):"string"==typeof e?new Error(e):new Error(`AWS SDK error wrapper for ${e}`);const nr=(e,t)=>{const n=[];if(e&&n.push(e),t)for(const e of t)n.push(e);return n},rr=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,ir=()=>{let e=[],t=[],n=!1;const r=new Set,i=n=>(e.forEach(e=>{n.add(e.middleware,{...e})}),t.forEach(e=>{n.addRelativeTo(e.middleware,{...e})}),n.identifyOnResolve?.(a.identifyOnResolve()),n),o=e=>{const t=[];return e.before.forEach(e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...o(e))}),t.push(e),e.after.reverse().forEach(e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...o(e))}),t},s=(n=!1)=>{const r=[],i=[],s={};e.forEach(e=>{const t={...e,before:[],after:[]};for(const e of nr(t.name,t.aliases))s[e]=t;r.push(t)}),t.forEach(e=>{const t={...e,before:[],after:[]};for(const e of nr(t.name,t.aliases))s[e]=t;i.push(t)}),i.forEach(e=>{if(e.toMiddleware){const t=s[e.toMiddleware];if(void 0===t){if(n)return;throw new Error(`${e.toMiddleware} is not found when adding ${rr(e.name,e.aliases)} middleware ${e.relation} ${e.toMiddleware}`)}"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}});const a=(c=r,c.sort((e,t)=>or[t.step]-or[e.step]||sr[t.priority||"normal"]-sr[e.priority||"normal"])).map(o).reduce((e,t)=>(e.push(...t),e),[]);var c;return a},a={add:(t,n={})=>{const{name:i,override:o,aliases:s}=n,a={step:"initialize",priority:"normal",middleware:t,...n},c=nr(i,s);if(c.length>0){if(c.some(e=>r.has(e))){if(!o)throw new Error(`Duplicate middleware name '${rr(i,s)}'`);for(const t of c){const n=e.findIndex(e=>e.name===t||e.aliases?.some(e=>e===t));if(-1===n)continue;const r=e[n];if(r.step!==a.step||a.priority!==r.priority)throw new Error(`"${rr(r.name,r.aliases)}" middleware with ${r.priority} priority in ${r.step} step cannot be overridden by "${rr(i,s)}" middleware with ${a.priority} priority in ${a.step} step.`);e.splice(n,1)}}for(const e of c)r.add(e)}e.push(a)},addRelativeTo:(e,n)=>{const{name:i,override:o,aliases:s}=n,a={middleware:e,...n},c=nr(i,s);if(c.length>0){if(c.some(e=>r.has(e))){if(!o)throw new Error(`Duplicate middleware name '${rr(i,s)}'`);for(const e of c){const n=t.findIndex(t=>t.name===e||t.aliases?.some(t=>t===e));if(-1===n)continue;const r=t[n];if(r.toMiddleware!==a.toMiddleware||r.relation!==a.relation)throw new Error(`"${rr(r.name,r.aliases)}" middleware ${r.relation} "${r.toMiddleware}" middleware cannot be overridden by "${rr(i,s)}" middleware ${a.relation} "${a.toMiddleware}" middleware.`);t.splice(n,1)}}for(const e of c)r.add(e)}t.push(a)},clone:()=>i(ir()),use:e=>{e.applyToStack(a)},remove:n=>"string"==typeof n?(n=>{let i=!1;const o=e=>{const t=nr(e.name,e.aliases);if(t.includes(n)){i=!0;for(const e of t)r.delete(e);return!1}return!0};return e=e.filter(o),t=t.filter(o),i})(n):(n=>{let i=!1;const o=e=>{if(e.middleware===n){i=!0;for(const t of nr(e.name,e.aliases))r.delete(t);return!1}return!0};return e=e.filter(o),t=t.filter(o),i})(n),removeByTag:n=>{let i=!1;const o=e=>{const{tags:t,name:o,aliases:s}=e;if(t&&t.includes(n)){const e=nr(o,s);for(const t of e)r.delete(t);return i=!0,!1}return!0};return e=e.filter(o),t=t.filter(o),i},concat:e=>{const t=i(ir());return t.use(e),t.identifyOnResolve(n||t.identifyOnResolve()||(e.identifyOnResolve?.()??!1)),t},applyToStack:i,identify:()=>s(!0).map(e=>{const t=e.step??e.relation+" "+e.toMiddleware;return rr(e.name,e.aliases)+" - "+t}),identifyOnResolve:e=>("boolean"==typeof e&&(n=e),n),resolve:(e,t)=>{for(const n of s().map(e=>e.middleware).reverse())e=n(e,t);return n&&console.log(a.identify()),e}};return a},or={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},sr={high:3,normal:2,low:1};class ar{constructor(e){this.config=e,this.middlewareStack=ir()}send(e,t,n){const r="function"!=typeof t?t:void 0,i="function"==typeof t?t:n;let o;if(void 0===r&&!0===this.config.cacheMiddleware){this.handlers||(this.handlers=new WeakMap);const t=this.handlers;t.has(e.constructor)?o=t.get(e.constructor):(o=e.resolveMiddleware(this.middlewareStack,this.config,r),t.set(e.constructor,o))}else delete this.handlers,o=e.resolveMiddleware(this.middlewareStack,this.config,r);if(!i)return o(e).then(e=>e.output);o(e).then(e=>i(null,e.output),e=>i(e)).catch(()=>{})}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}const cr={},ur=new Array(64);for(let e=0,t="A".charCodeAt(0),n="Z".charCodeAt(0);e+t<=n;e++){const n=String.fromCharCode(e+t);cr[n]=e,ur[e]=n}for(let e=0,t="a".charCodeAt(0),n="z".charCodeAt(0);e+t<=n;e++){const n=String.fromCharCode(e+t),r=e+26;cr[n]=r,ur[r]=n}for(let e=0;e<10;e++){cr[e.toString(10)]=e+52;const t=e.toString(10),n=e+52;cr[t]=n,ur[n]=t}cr["+"]=62,ur[62]="+",cr["/"]=63,ur[63]="/";const dr=e=>{let t=e.length/4*3;"=="===e.slice(-2)?t-=2:"="===e.slice(-1)&&t--;const n=new ArrayBuffer(t),r=new DataView(n);for(let t=0;t<e.length;t+=4){let n=0,i=0;for(let r=t,o=t+3;r<=o;r++)if("="!==e[r]){if(!(e[r]in cr))throw new TypeError(`Invalid character ${e[r]} in base64 string.`);n|=cr[e[r]]<<6*(o-r),i+=6}else n>>=6;const o=t/4*3;n>>=i%8;const s=Math.floor(i/8);for(let e=0;e<s;e++){const t=8*(s-e-1);r.setUint8(o+e,(n&255<<t)>>t)}}return new Uint8Array(n)},lr=e=>(new TextEncoder).encode(e);function hr(e){let t;t="string"==typeof e?lr(e):e;const n="object"==typeof t&&"number"==typeof t.length,r="object"==typeof t&&"number"==typeof t.byteOffset&&"number"==typeof t.byteLength;if(!n&&!r)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let i="";for(let e=0;e<t.length;e+=3){let n=0,r=0;for(let i=e,o=Math.min(e+3,t.length);i<o;i++)n|=t[i]<<8*(o-i-1),r+=8;const o=Math.ceil(r/6);n<<=6*o-r;for(let e=1;e<=o;e++){const t=6*(o-e);i+=ur[(n&63<<t)>>t]}i+="==".slice(0,4-o)}return i}const fr=e=>{if("string"==typeof e)return e;if("object"!=typeof e||"number"!=typeof e.byteOffset||"number"!=typeof e.byteLength)throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)};class pr extends Uint8Array{static fromString(e,t="utf-8"){if("string"==typeof e)return function(e,t){return"base64"===t?pr.mutate(dr(e)):pr.mutate(lr(e))}(e,t);throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,pr.prototype),e}transformToString(e="utf-8"){return function(e,t="utf-8"){return"base64"===t?hr(e):fr(e)}(this,e)}}"function"==typeof ReadableStream&&ReadableStream;const mr=e=>encodeURIComponent(e).replace(/[!'()*]/g,gr),gr=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function yr(e,t){return new Request(e,t)}function wr(e=0){return new Promise((t,n)=>{e&&setTimeout(()=>{const t=new Error(`Request did not complete within ${e} ms`);t.name="TimeoutError",n(t)},e)})}const br={supported:void 0};class vr{static create(e){return"function"==typeof e?.handle?e:new vr(e)}constructor(e){"function"==typeof e?this.configProvider=e().then(e=>e||{}):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),void 0===br.supported&&(br.supported=Boolean("undefined"!=typeof Request&&"keepalive"in yr("https://[::1]")))}destroy(){}async handle(e,{abortSignal:t,requestTimeout:n}={}){this.config||(this.config=await this.configProvider);const r=n??this.config.requestTimeout,i=!0===this.config.keepAlive,o=this.config.credentials;if(t?.aborted){const e=new Error("Request aborted");return e.name="AbortError",Promise.reject(e)}let s=e.path;const a=function(e){const t=[];for(let n of Object.keys(e).sort()){const r=e[n];if(n=mr(n),Array.isArray(r))for(let e=0,i=r.length;e<i;e++)t.push(`${n}=${mr(r[e])}`);else{let e=n;(r||"string"==typeof r)&&(e+=`=${mr(r)}`),t.push(e)}}return t.join("&")}(e.query||{});a&&(s+=`?${a}`),e.fragment&&(s+=`#${e.fragment}`);let c="";if(null!=e.username||null!=e.password){c=`${e.username??""}:${e.password??""}@`}const{port:u,method:d}=e,l=`${e.protocol}//${c}${e.hostname}${u?`:${u}`:""}${s}`,h="GET"===d||"HEAD"===d?void 0:e.body,f={body:h,headers:new Headers(e.headers),method:d,credentials:o};this.config?.cache&&(f.cache=this.config.cache),h&&(f.duplex="half"),"undefined"!=typeof AbortController&&(f.signal=t),br.supported&&(f.keepalive=i),"function"==typeof this.config.requestInit&&Object.assign(f,this.config.requestInit(e));let p=()=>{};const m=yr(l,f),g=[fetch(m).then(e=>{const t=e.headers,n={};for(const e of t.entries())n[e[0]]=e[1];return null!=e.body?{response:new at({headers:n,reason:e.statusText,statusCode:e.status,body:e.body})}:e.blob().then(t=>({response:new at({headers:n,reason:e.statusText,statusCode:e.status,body:t})}))}),wr(r)];return t&&g.push(new Promise((e,n)=>{const r=()=>{const e=new Error("Request aborted");e.name="AbortError",n(e)};if("function"==typeof t.addEventListener){const e=t;e.addEventListener("abort",r,{once:!0}),p=()=>e.removeEventListener("abort",r)}else t.onabort=r})),Promise.race(g).finally(p)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then(n=>(n[e]=t,n))}httpHandlerConfigs(){return this.config??{}}}const kr=async e=>"function"==typeof Blob&&e instanceof Blob||"Blob"===e.constructor?.name?void 0!==Blob.prototype.arrayBuffer?new Uint8Array(await e.arrayBuffer()):async function(e){const t=await function(e){return new Promise((t,n)=>{const r=new FileReader;r.onloadend=()=>{if(2!==r.readyState)return n(new Error("Reader aborted too early"));const e=r.result??"",i=e.indexOf(","),o=i>-1?i+1:e.length;t(e.substring(o))},r.onabort=()=>n(new Error("Read aborted")),r.onerror=()=>n(r.error),r.readAsDataURL(e)})}(e),n=dr(t);return new Uint8Array(n)}(e):async function(e){const t=[],n=e.getReader();let r=!1,i=0;for(;!r;){const{done:e,value:o}=await n.read();o&&(t.push(o),i+=o.length),r=e}const o=new Uint8Array(i);let s=0;for(const e of t)o.set(e,s),s+=e.length;return o}(e);const Sr={},Er={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),Sr[e]=t,Er[t]=e}function Ar(e){if(e.length%2!=0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2){const r=e.slice(n,n+2).toLowerCase();if(!(r in Er))throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`);t[n/2]=Er[r]}return t}function Ir(e){let t="";for(let n=0;n<e.byteLength;n++)t+=Sr[e[n]];return t}const _r=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return pr.mutate(e);if(!e)return pr.mutate(new Uint8Array);const n=t.streamCollector(e);return pr.mutate(await n)};class xr{constructor(){this.middlewareStack=ir()}static classBuilder(){return new Rr}resolveMiddlewareWithContext(e,t,n,{middlewareFn:r,clientName:i,commandName:o,inputFilterSensitiveLog:s,outputFilterSensitiveLog:a,smithyContext:c,additionalContext:u,CommandCtor:d}){for(const i of r.bind(this)(d,e,t,n))this.middlewareStack.use(i);const l=e.concat(this.middlewareStack),{logger:h}=t,f={logger:h,clientName:i,commandName:o,inputFilterSensitiveLog:s,outputFilterSensitiveLog:a,[rt]:{commandInstance:this,...c},...u},{requestHandler:p}=t;return l.resolve(e=>p.handle(e.request,n||{}),f)}}class Rr{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=e=>e,this._outputFilterSensitiveLog=e=>e,this._serializer=null,this._deserializer=null}init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,t,n={}){return this._smithyContext={service:e,operation:t,...n},this}c(e={}){return this._additionalContext=e,this}n(e,t){return this._clientName=e,this._commandName=t,this}f(e=e=>e,t=e=>e){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=t,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}sc(e){return this._operationSchema=e,this._smithyContext.operationSchema=e,this}build(){const e=this;let t;return t=class extends xr{static getEndpointParameterInstructions(){return e._ep}constructor(...[t]){super(),this.serialize=e._serializer,this.deserialize=e._deserializer,this.input=t??{},e._init(this),this.schema=e._operationSchema}resolveMiddleware(n,r,i){return this.resolveMiddlewareWithContext(n,r,i,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog,outputFilterSensitiveLog:e._outputFilterSensitiveLog,smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}const Cr="***SensitiveInformation***";class Pr extends Error{constructor(e){super(e.message),Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}static isInstance(e){if(!e)return!1;const t=e;return Pr.prototype.isPrototypeOf(t)||Boolean(t.$fault)&&Boolean(t.$metadata)&&("client"===t.$fault||"server"===t.$fault)}static[Symbol.hasInstance](e){if(!e)return!1;const t=e;return this===Pr?Pr.isInstance(e):!!Pr.isInstance(e)&&(t.name&&this.name?this.prototype.isPrototypeOf(e)||t.name===this.name:this.prototype.isPrototypeOf(e))}}const Mr=(e,t={})=>{Object.entries(t).filter(([,e])=>void 0!==e).forEach(([t,n])=>{null!=e[t]&&""!==e[t]||(e[t]=n)});const n=e.message||e.Message||"UnknownError";return e.message=n,delete e.Message,e},Tr=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),Or=e=>{switch(e){case"standard":case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},Lr=e=>Object.assign((e=>{const t=[];for(const n in tt){const r=tt[n];void 0!==e[r]&&t.push({algorithmId:()=>r,checksumConstructor:()=>e[r]})}return{addChecksumAlgorithm(e){t.push(e)},checksumAlgorithms:()=>t}})(e),(e=>({setRetryStrategy(t){e.retryStrategy=t},retryStrategy:()=>e.retryStrategy}))(e)),$r=e=>null!=e;class Nr{trace(){}debug(){}info(){}warn(){}error(){}}function Dr(e,t,n){let r,i,o;if(void 0===t&&void 0===n)r={},o=e;else{if(r=e,"function"==typeof t)return i=t,o=n,Fr(r,i,o);o=t}for(const e of Object.keys(o))Array.isArray(o[e])?Br(r,null,o,e):r[e]=o[e];return r}const Ur=(e,t)=>{const n={};for(const r in t)Br(n,e,t,r);return n},Fr=(e,t,n)=>Dr(e,Object.entries(n).reduce((e,[n,r])=>(Array.isArray(r)?e[n]=r:e[n]="function"==typeof r?[t,r()]:[t,r],e),{})),Br=(e,t,n,r)=>{if(null!==t){let i=n[r];"function"==typeof i&&(i=[,i]);const[o=jr,s=qr,a=r]=i;return void(("function"==typeof o&&o(t[a])||"function"!=typeof o&&o)&&(e[r]=s(t[a])))}let[i,o]=n[r];if("function"==typeof o){let t;const n=void 0===i&&null!=(t=o()),s="function"==typeof i&&!!i(void 0)||"function"!=typeof i&&!!i;n?e[r]=t:s&&(e[r]=o())}else{const t=void 0===i&&null!=o,n="function"==typeof i&&!!i(o)||"function"!=typeof i&&!!i;(t||n)&&(e[r]=o)}},jr=e=>null!=e,qr=e=>e,Hr=(Math.ceil(2**127*(2-2**-23)),e=>{if(null!=e){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}}),zr=e=>Vr(e,32),Vr=(e,t)=>{const n=Hr(e);if(void 0!==n&&Gr(n,t)!==n)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return n},Gr=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},Wr=e=>{if(null!=e){if("string"==typeof e)return e;if(["boolean","number","bigint"].includes(typeof e))return Jr.warn(Kr(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)}},Kr=e=>String(new TypeError(e).stack||e).split("\n").slice(0,5).filter(e=>!e.includes("stackTraceWarning")).join("\n"),Jr={warn:console.warn},Yr=e=>e?.body instanceof ReadableStream,Qr=e=>void 0!==e.acquireInitialRetryToken&&void 0!==e.refreshRetryTokenForRetry&&void 0!==e.recordSuccess,Zr=e=>{const t={error:e,errorType:Xr(e)},n=ni(e.$response);return n&&(t.retryAfterHint=n),t},Xr=e=>Un(e)?"THROTTLING":Fn(e)?"TRANSIENT":(e=>{if(void 0!==e.$metadata?.httpStatusCode){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!Fn(e)}return!1})(e)?"SERVER_ERROR":"CLIENT_ERROR",ei={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},ti=e=>({applyToStack:t=>{t.add((e=>(t,n)=>async r=>{let i=await e.retryStrategy();const o=await e.maxAttempts();if(!Qr(i))return i?.mode&&(n.userAgent=[...n.userAgent||[],["cfg/retry-mode",i.mode]]),i.retry(t,r);{let e=await i.acquireInitialRetryToken(n.partition_id),s=new Error,a=0,c=0;const{request:u}=r,d=st.isInstance(u);for(d&&(u.headers[Hn]=er());;)try{d&&(u.headers[zn]=`attempt=${a+1}; max=${o}`);const{response:n,output:s}=await t(r);return i.recordSuccess(e),s.$metadata.attempts=a+1,s.$metadata.totalRetryDelay=c,{response:n,output:s}}catch(t){const r=Zr(t);if(s=tr(t),d&&Yr(u))throw(n.logger instanceof Nr?console:n.logger)?.warn("An error was encountered in a non-retryable streaming request."),s;try{e=await i.refreshRetryTokenForRetry(e,r)}catch(e){throw s.$metadata||(s.$metadata={}),s.$metadata.attempts=a+1,s.$metadata.totalRetryDelay=c,s}a=e.getRetryCount();const o=e.getRetryDelay();c+=o,await new Promise(e=>setTimeout(e,o))}}})(e),ei)}}),ni=e=>{if(!at.isInstance(e))return;const t=Object.keys(e.headers).find(e=>"retry-after"===e.toLowerCase());if(!t)return;const n=e.headers[t],r=Number(n);if(!Number.isNaN(r))return new Date(1e3*r);return new Date(n)};const ri=(ii=3e5,e=>oi(e)&&e.expiration.getTime()-Date.now()<ii);var ii;const oi=e=>void 0!==e.expiration,si=e=>"string"==typeof e?lr(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),ai="X-Amz-Date",ci="X-Amz-Signature",ui="X-Amz-Security-Token",di="authorization",li=ai.toLowerCase(),hi=[di,li,"date"],fi=ci.toLowerCase(),pi="x-amz-content-sha256",mi=ui.toLowerCase(),gi={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},yi=/^proxy-/,wi=/^sec-/,bi="AWS4-HMAC-SHA256",vi="AWS4-HMAC-SHA256-PAYLOAD",ki="aws4_request",Si={},Ei=[],Ai=(e,t,n)=>`${e}/${t}/${n}/${ki}`,Ii=(e,t,n)=>{const r=new e(t);return r.update(si(n)),r.digest()},_i=({headers:e},t,n)=>{const r={};for(const i of Object.keys(e).sort()){if(null==e[i])continue;const o=i.toLowerCase();(o in gi||t?.has(o)||yi.test(o)||wi.test(o))&&(!n||n&&!n.has(o))||(r[o]=e[i].trim().replace(/\s+/g," "))}return r},xi=async({headers:e,body:t},n)=>{for(const t of Object.keys(e))if(t.toLowerCase()===pi)return e[t];if(null==t)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof t||ArrayBuffer.isView(t)||(r=t,"function"==typeof ArrayBuffer&&r instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(r))){const e=new n;return e.update(si(t)),Ir(await e.digest())}var r;return"UNSIGNED-PAYLOAD"};class Ri{format(e){const t=[];for(const n of Object.keys(e)){const r=lr(n);t.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(e[n]))}const n=new Uint8Array(t.reduce((e,t)=>e+t.byteLength,0));let r=0;for(const e of t)n.set(e,r),r+=e.byteLength;return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":const r=new Uint8Array(9);return r[0]=5,r.set(e.value.bytes,1),r;case"binary":const i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);const o=new Uint8Array(i.buffer);return o.set(e.value,3),o;case"string":const s=lr(e.value),a=new DataView(new ArrayBuffer(3+s.byteLength));a.setUint8(0,7),a.setUint16(1,s.byteLength,!1);const c=new Uint8Array(a.buffer);return c.set(s,3),c;case"timestamp":const u=new Uint8Array(9);return u[0]=8,u.set(Mi.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!Pi.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const d=new Uint8Array(17);return d[0]=9,d.set(Ar(e.value.replace(/\-/g,"")),1),d}}}var Ci;!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(Ci||(Ci={}));const Pi=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Mi{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let n=7,r=Math.abs(Math.round(e));n>-1&&r>0;n--,r/=256)t[n]=r;return e<0&&Ti(t),new Mi(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&Ti(e),parseInt(Ir(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function Ti(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}const Oi=e=>{e=st.clone(e);for(const t of Object.keys(e.headers))hi.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},Li=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e;class $i{constructor({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:o=!0}){this.service=r,this.sha256=i,this.uriEscapePath=o,this.applyChecksum="boolean"!=typeof e||e,this.regionProvider=en(n),this.credentialProvider=en(t)}createCanonicalRequest(e,t,n){const r=Object.keys(t).sort();return`${e.method}\n${this.getCanonicalPath(e)}\n${(({query:e={}})=>{const t=[],n={};for(const r of Object.keys(e)){if(r.toLowerCase()===fi)continue;const i=mr(r);t.push(i);const o=e[r];"string"==typeof o?n[i]=`${i}=${mr(o)}`:Array.isArray(o)&&(n[i]=o.slice(0).reduce((e,t)=>e.concat([`${i}=${mr(t)}`]),[]).sort().join("&"))}return t.sort().map(e=>n[e]).filter(e=>e).join("&")})(e)}\n${r.map(e=>`${e}:${t[e]}`).join("\n")}\n\n${r.join(";")}\n${n}`}async createStringToSign(e,t,n,r){const i=new this.sha256;i.update(si(n));return`${r}\n${e}\n${t}\n${Ir(await i.digest())}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const t=[];for(const n of e.split("/"))0!==n?.length&&"."!==n&&(".."===n?t.pop():t.push(n));const n=`${e?.startsWith("/")?"/":""}${t.join("/")}${t.length>0&&e?.endsWith("/")?"/":""}`;return mr(n).replace(/%2F/g,"/")}return e}validateResolvedCredentials(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw new Error("Resolved credential object is not valid")}formatDate(e){const t=(n=e,Li(n).toISOString().replace(/\.\d{3}Z$/,"Z")).replace(/[\-:]/g,"");var n;return{longDate:t,shortDate:t.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(";")}}class Ni extends $i{constructor({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:o=!0}){super({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:o}),this.headerFormatter=new Ri}async presign(e,t={}){const{signingDate:n=new Date,expiresIn:r=3600,unsignableHeaders:i,unhoistableHeaders:o,signableHeaders:s,hoistableHeaders:a,signingRegion:c,signingService:u}=t,d=await this.credentialProvider();this.validateResolvedCredentials(d);const l=c??await this.regionProvider(),{longDate:h,shortDate:f}=this.formatDate(n);if(r>604800)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const p=Ai(f,l,u??this.service),m=((e,t={})=>{const{headers:n,query:r={}}=st.clone(e);for(const e of Object.keys(n)){const i=e.toLowerCase();("x-amz-"===i.slice(0,6)&&!t.unhoistableHeaders?.has(i)||t.hoistableHeaders?.has(i))&&(r[e]=n[e],delete n[e])}return{...e,headers:n,query:r}})(Oi(e),{unhoistableHeaders:o,hoistableHeaders:a});d.sessionToken&&(m.query[ui]=d.sessionToken),m.query["X-Amz-Algorithm"]=bi,m.query["X-Amz-Credential"]=`${d.accessKeyId}/${p}`,m.query[ai]=h,m.query["X-Amz-Expires"]=r.toString(10);const g=_i(m,i,s);return m.query["X-Amz-SignedHeaders"]=this.getCanonicalHeaderList(g),m.query[ci]=await this.getSignature(h,p,this.getSigningKey(d,l,f,u),this.createCanonicalRequest(m,g,await xi(e,this.sha256))),m}async sign(e,t){return"string"==typeof e?this.signString(e,t):e.headers&&e.payload?this.signEvent(e,t):e.message?this.signMessage(e,t):this.signRequest(e,t)}async signEvent({headers:e,payload:t},{signingDate:n=new Date,priorSignature:r,signingRegion:i,signingService:o}){const s=i??await this.regionProvider(),{shortDate:a,longDate:c}=this.formatDate(n),u=Ai(a,s,o??this.service),d=await xi({headers:{},body:t},this.sha256),l=new this.sha256;l.update(e);const h=Ir(await l.digest()),f=[vi,c,u,r,h,d].join("\n");return this.signString(f,{signingDate:n,signingRegion:s,signingService:o})}async signMessage(e,{signingDate:t=new Date,signingRegion:n,signingService:r}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:n,signingService:r,priorSignature:e.priorSignature}).then(t=>({message:e.message,signature:t}))}async signString(e,{signingDate:t=new Date,signingRegion:n,signingService:r}={}){const i=await this.credentialProvider();this.validateResolvedCredentials(i);const o=n??await this.regionProvider(),{shortDate:s}=this.formatDate(t),a=new this.sha256(await this.getSigningKey(i,o,s,r));return a.update(si(e)),Ir(await a.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:n,unsignableHeaders:r,signingRegion:i,signingService:o}={}){const s=await this.credentialProvider();this.validateResolvedCredentials(s);const a=i??await this.regionProvider(),c=Oi(e),{longDate:u,shortDate:d}=this.formatDate(t),l=Ai(d,a,o??this.service);c.headers[li]=u,s.sessionToken&&(c.headers[mi]=s.sessionToken);const h=await xi(c,this.sha256);!((e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1})(pi,c.headers)&&this.applyChecksum&&(c.headers[pi]=h);const f=_i(c,r,n),p=await this.getSignature(u,l,this.getSigningKey(s,a,d,o),this.createCanonicalRequest(c,f,h));return c.headers[di]=`${bi} Credential=${s.accessKeyId}/${l}, SignedHeaders=${this.getCanonicalHeaderList(f)}, Signature=${p}`,c}async getSignature(e,t,n,r){const i=await this.createStringToSign(e,t,r,bi),o=new this.sha256(await n);return o.update(si(i)),Ir(await o.digest())}getSigningKey(e,t,n,r){return(async(e,t,n,r,i)=>{const o=`${n}:${r}:${i}:${Ir(await Ii(e,t.secretAccessKey,t.accessKeyId))}:${t.sessionToken}`;if(o in Si)return Si[o];for(Ei.push(o);Ei.length>50;)delete Si[Ei.shift()];let s=`AWS4${t.secretAccessKey}`;for(const t of[n,r,i,ki])s=await Ii(e,s,t);return Si[o]=s})(this.sha256,e,n,t,r||this.service)}}const Di=e=>{let t,n=e.credentials,r=!!e.credentials;Object.defineProperty(e,"credentials",{set(i){i&&i!==n&&i!==t&&(r=!0),n=i;const o=function(e,{credentials:t,credentialDefaultProvider:n}){let r;r=t?t?.memoized?t:((e,t,n)=>{if(void 0===e)return;const r="function"!=typeof e?async()=>Promise.resolve(e):e;let i,o,s,a=!1;const c=async e=>{o||(o=r(e));try{i=await o,s=!0,a=!1}finally{o=void 0}return i};return void 0===t?async e=>(s&&!e?.forceRefresh||(i=await c(e)),i):async e=>(s&&!e?.forceRefresh||(i=await c(e)),a?i:n(i)?t(i)?(await c(e),i):i:(a=!0,i))})(t,ri,oi):n?pt(n(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")};return r.memoized=!0,r}(e,{credentials:n,credentialDefaultProvider:e.credentialDefaultProvider}),s=function(e,t){if(t.configBound)return t;const n=async n=>t({...n,callerClientConfig:e});return n.memoized=t.memoized,n.configBound=!0,n}(e,o);r&&!s.attributed?(t=async e=>s(e).then(e=>function(e,t,n){return e.$source||(e.$source={}),e.$source[t]=n,e}(e,"CREDENTIALS_CODE","e")),t.memoized=s.memoized,t.configBound=s.configBound,t.attributed=!0):t=s},get:()=>t,enumerable:!0,configurable:!0}),e.credentials=n;const{signingEscapePath:i=!0,systemClockOffset:o=e.systemClockOffset||0,sha256:s}=e;let a;a=e.signer?pt(e.signer):e.regionInfoProvider?()=>pt(e.region)().then(async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t]).then(([t,n])=>{const{signingRegion:r,signingService:o}=t;e.signingRegion=e.signingRegion||r||n,e.signingName=e.signingName||o||e.serviceId;const a={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:s,uriEscapePath:i};return new(e.signerConstructor||Ni)(a)}):async t=>{const n=(t=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await pt(e.region)(),properties:{}},t)).signingRegion,r=t.signingName;e.signingRegion=e.signingRegion||n,e.signingName=e.signingName||r||e.serviceId;const o={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:s,uriEscapePath:i};return new(e.signerConstructor||Ni)(o)};return Object.assign(e,{systemClockOffset:o,signingEscapePath:i,signer:a})};const Ui=async(e,t,n)=>({operation:Xt(t).operation,region:await en(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const Fi=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"bedrock",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},Bi={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},ji="3.823.0";var qi="undefined"!=typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:e=>(new TextEncoder).encode(e);function Hi(e){return e instanceof Uint8Array?e:"string"==typeof e?qi(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function zi(e){return"string"==typeof e?0===e.length:0===e.byteLength}var Vi={name:"SHA-256"},Gi={name:"HMAC",hash:Vi},Wi=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85]);const Ki={};function Ji(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:Ki}var Yi=function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!zi(e)){var t=Hi(e),n=new Uint8Array(this.toHash.byteLength+t.byteLength);n.set(this.toHash,0),n.set(t,this.toHash.byteLength),this.toHash=n}},e.prototype.digest=function(){var e=this;return this.key?this.key.then(function(t){return Ji().crypto.subtle.sign(Gi,t,e.toHash).then(function(e){return new Uint8Array(e)})}):zi(this.toHash)?Promise.resolve(Wi):Promise.resolve().then(function(){return Ji().crypto.subtle.digest(Vi,e.toHash)}).then(function(e){return Promise.resolve(new Uint8Array(e))})},e.prototype.reset=function(){var e=this;this.toHash=new Uint8Array(0),this.secret&&void 0!==this.secret&&(this.key=new Promise(function(t,n){Ji().crypto.subtle.importKey("raw",Hi(e.secret),Gi,!1,["sign"]).then(t,n)}),this.key.catch(function(){}))},e}();function Qi(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}c((r=r.apply(e,t||[])).next())})}function Zi(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}Object.create;function Xi(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}Object.create;"function"==typeof SuppressedError&&SuppressedError;var eo=64,to=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),no=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],ro=Math.pow(2,53)-1,io=function(){function e(){this.state=Int32Array.from(no),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>ro)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===eo&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%eo>=56){for(var r=this.bufferLength;r<eo;r++)t.setUint8(r,0);this.hashBuffer(),this.bufferLength=0}for(r=this.bufferLength;r<56;r++)t.setUint8(r,0);t.setUint32(56,Math.floor(e/4294967296),!0),t.setUint32(60,e),this.hashBuffer(),this.finished=!0}var i=new Uint8Array(32);for(r=0;r<8;r++)i[4*r]=this.state[r]>>>24&255,i[4*r+1]=this.state[r]>>>16&255,i[4*r+2]=this.state[r]>>>8&255,i[4*r+3]=this.state[r]>>>0&255;return i},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],r=t[1],i=t[2],o=t[3],s=t[4],a=t[5],c=t[6],u=t[7],d=0;d<eo;d++){if(d<16)this.temp[d]=(255&e[4*d])<<24|(255&e[4*d+1])<<16|(255&e[4*d+2])<<8|255&e[4*d+3];else{var l=this.temp[d-2],h=(l>>>17|l<<15)^(l>>>19|l<<13)^l>>>10,f=((l=this.temp[d-15])>>>7|l<<25)^(l>>>18|l<<14)^l>>>3;this.temp[d]=(h+this.temp[d-7]|0)+(f+this.temp[d-16]|0)}var p=(((s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+(s&a^~s&c)|0)+(u+(to[d]+this.temp[d]|0)|0)|0,m=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&r^n&i^r&i)|0;u=c,c=a,a=s,s=o+p|0,o=i,i=r,r=n,n=p+m|0}t[0]+=n,t[1]+=r,t[2]+=i,t[3]+=o,t[4]+=s,t[5]+=a,t[6]+=c,t[7]+=u},e}(),oo=function(){function e(e){this.secret=e,this.hash=new io,this.reset()}return e.prototype.update=function(e){if(!zi(e)&&!this.error)try{this.hash.update(Hi(e))}catch(e){this.error=e}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return Qi(this,void 0,void 0,function(){return Zi(this,function(e){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new io,this.secret){this.outer=new io;var e=function(e){var t=Hi(e);if(t.byteLength>eo){var n=new io;n.update(t),t=n.digest()}var r=new Uint8Array(eo);return r.set(t),r}(this.secret),t=new Uint8Array(eo);t.set(e);for(var n=0;n<eo;n++)e[n]^=54,t[n]^=92;this.hash.update(e),this.outer.update(t);for(n=0;n<e.byteLength;n++)e[n]=0}},e}();var so=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function ao(e){return e&&so.every(function(t){return"function"==typeof e[t]})}var co=function(){function e(e){!function(e){return!(!function(e){return"object"==typeof e&&"object"==typeof e.crypto&&"function"==typeof e.crypto.getRandomValues}(e)||"object"!=typeof e.crypto.subtle)&&ao(e.crypto.subtle)}(Ji())?this.hash=new oo(e):this.hash=new Yi(e)}return e.prototype.update=function(e,t){this.hash.update(Hi(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}(),uo=n(369),lo=n.n(uo);const ho=({serviceId:e,clientVersion:t})=>async n=>{const r="undefined"!=typeof window&&window?.navigator?.userAgent?lo().parse(window.navigator.userAgent):void 0,i=[["aws-sdk-js",t],["ua","2.1"],[`os/${r?.os?.name||"other"}`,r?.os?.version],["lang/js"],["md/browser",`${r?.browser?.name??"unknown"}_${r?.browser?.version??"unknown"}`]];e&&i.push([`api/${e}`,t]);const o=await(n?.userAgentAppId?.());return o&&i.push([`app/${o}`]),i};!function(){function e(){this.crc32=new po}e.prototype.update=function(e){zi(e)||this.crc32.update(Hi(e))},e.prototype.digest=function(){return Qi(this,void 0,void 0,function(){return Zi(this,function(e){return[2,(t=this.crc32.digest(),new Uint8Array([(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t]))];var t})})},e.prototype.reset=function(){this.crc32=new po}}();var fo,po=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,n;try{for(var r=Xi(e),i=r.next();!i.done;i=r.next()){var o=i.value;this.checksum=this.checksum>>>8^mo[255&(this.checksum^o)]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(4294967295^this.checksum)>>>0},e}(),mo=function(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),n=0;n<e.length;)t[n]=e[n],n+=1;return t}return Uint32Array.from(e)}([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);class go{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let n=7,r=Math.abs(Math.round(e));n>-1&&r>0;n--,r/=256)t[n]=r;return e<0&&yo(t),new go(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&yo(e),parseInt(Ir(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function yo(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}class wo{constructor(e,t){this.toUtf8=e,this.fromUtf8=t}format(e){const t=[];for(const n of Object.keys(e)){const r=this.fromUtf8(n);t.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(e[n]))}const n=new Uint8Array(t.reduce((e,t)=>e+t.byteLength,0));let r=0;for(const e of t)n.set(e,r),r+=e.byteLength;return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":const r=new Uint8Array(9);return r[0]=5,r.set(e.value.bytes,1),r;case"binary":const i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);const o=new Uint8Array(i.buffer);return o.set(e.value,3),o;case"string":const s=this.fromUtf8(e.value),a=new DataView(new ArrayBuffer(3+s.byteLength));a.setUint8(0,7),a.setUint16(1,s.byteLength,!1);const c=new Uint8Array(a.buffer);return c.set(s,3),c;case"timestamp":const u=new Uint8Array(9);return u[0]=8,u.set(go.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!Ro.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const d=new Uint8Array(17);return d[0]=9,d.set(Ar(e.value.replace(/\-/g,"")),1),d}}parse(e){const t={};let n=0;for(;n<e.byteLength;){const r=e.getUint8(n++),i=this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,r));switch(n+=r,e.getUint8(n++)){case 0:t[i]={type:bo,value:!0};break;case 1:t[i]={type:bo,value:!1};break;case 2:t[i]={type:vo,value:e.getInt8(n++)};break;case 3:t[i]={type:ko,value:e.getInt16(n,!1)},n+=2;break;case 4:t[i]={type:So,value:e.getInt32(n,!1)},n+=4;break;case 5:t[i]={type:Eo,value:new go(new Uint8Array(e.buffer,e.byteOffset+n,8))},n+=8;break;case 6:const r=e.getUint16(n,!1);n+=2,t[i]={type:Ao,value:new Uint8Array(e.buffer,e.byteOffset+n,r)},n+=r;break;case 7:const o=e.getUint16(n,!1);n+=2,t[i]={type:Io,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,o))},n+=o;break;case 8:t[i]={type:_o,value:new Date(new go(new Uint8Array(e.buffer,e.byteOffset+n,8)).valueOf())},n+=8;break;case 9:const s=new Uint8Array(e.buffer,e.byteOffset+n,16);n+=16,t[i]={type:xo,value:`${Ir(s.subarray(0,4))}-${Ir(s.subarray(4,6))}-${Ir(s.subarray(6,8))}-${Ir(s.subarray(8,10))}-${Ir(s.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return t}}!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(fo||(fo={}));const bo="boolean",vo="byte",ko="short",So="integer",Eo="long",Ao="binary",Io="string",_o="timestamp",xo="uuid",Ro=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Co{constructor(e,t){this.headerMarshaller=new wo(e,t),this.messageBuffer=[],this.isEndOfStream=!1}feed(e){this.messageBuffer.push(this.decode(e))}endOfStream(){this.isEndOfStream=!0}getMessage(){const e=this.messageBuffer.pop(),t=this.isEndOfStream;return{getMessage:()=>e,isEndOfStream:()=>t}}getAvailableMessages(){const e=this.messageBuffer;this.messageBuffer=[];const t=this.isEndOfStream;return{getMessages:()=>e,isEndOfStream:()=>t}}encode({headers:e,body:t}){const n=this.headerMarshaller.format(e),r=n.byteLength+t.byteLength+16,i=new Uint8Array(r),o=new DataView(i.buffer,i.byteOffset,i.byteLength),s=new po;return o.setUint32(0,r,!1),o.setUint32(4,n.byteLength,!1),o.setUint32(8,s.update(i.subarray(0,8)).digest(),!1),i.set(n,12),i.set(t,n.byteLength+12),o.setUint32(r-4,s.update(i.subarray(8,r-4)).digest(),!1),i}decode(e){const{headers:t,body:n}=function({byteLength:e,byteOffset:t,buffer:n}){if(e<16)throw new Error("Provided message too short to accommodate event stream message overhead");const r=new DataView(n,t,e),i=r.getUint32(0,!1);if(e!==i)throw new Error("Reported message length does not match received message length");const o=r.getUint32(4,!1),s=r.getUint32(8,!1),a=r.getUint32(e-4,!1),c=(new po).update(new Uint8Array(n,t,8));if(s!==c.digest())throw new Error(`The prelude checksum specified in the message (${s}) does not match the calculated CRC32 checksum (${c.digest()})`);if(c.update(new Uint8Array(n,t+8,e-12)),a!==c.digest())throw new Error(`The message checksum (${c.digest()}) did not match the expected value of ${a}`);return{headers:new DataView(n,t+8+4,o),body:new Uint8Array(n,t+8+4+o,i-o-16)}}(e);return{headers:this.headerMarshaller.parse(t),body:n}}formatHeaders(e){return this.headerMarshaller.format(e)}}class Po{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.decoder.decode(e);yield t}}}class Mo{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=this.options.encoder.encode(e);yield t}this.options.includeEndFrame&&(yield new Uint8Array(0))}}class To{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=await this.options.deserializer(e);void 0!==t&&(yield t)}}}class Oo{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.serializer(e);yield t}}}function Lo(e,t){return async function(n){const{value:r}=n.headers[":message-type"];if("error"===r){const e=new Error(n.headers[":error-message"].value||"UnknownError");throw e.name=n.headers[":error-code"].value,e}if("exception"===r){const r=n.headers[":exception-type"].value,i={[r]:n},o=await e(i);if(o.$unknown){const e=new Error(t(n.body));throw e.name=r,e}throw o[r]}if("event"===r){const t={[n.headers[":event-type"].value]:n},r=await e(t);if(r.$unknown)return;return r}throw Error(`Unrecognizable event type: ${n.headers[":event-type"].value}`)}}class $o{constructor({utf8Encoder:e,utf8Decoder:t}){this.eventStreamCodec=new Co(e,t),this.utfEncoder=e}deserialize(e,t){const n=function(e){let t=0,n=0,r=null,i=null;const o=e=>{if("number"!=typeof e)throw new Error("Attempted to allocate an event message where size was not a number: "+e);t=e,n=4,r=new Uint8Array(e),new DataView(r.buffer).setUint32(0,e,!1)};return{[Symbol.asyncIterator]:async function*(){const s=e[Symbol.asyncIterator]();for(;;){const{value:e,done:a}=await s.next();if(a){if(!t)return;if(t!==n)throw new Error("Truncated event message received.");return void(yield r)}const c=e.length;let u=0;for(;u<c;){if(!r){const t=c-u;i||(i=new Uint8Array(4));const r=Math.min(4-n,t);if(i.set(e.slice(u,u+r),n),n+=r,u+=r,n<4)break;o(new DataView(i.buffer).getUint32(0,!1)),i=null}const s=Math.min(t-n,c-u);r.set(e.slice(u,u+s),n),n+=s,u+=s,t&&t===n&&(yield r,r=null,t=0,n=0)}}}}}(e);return new To({messageStream:new Po({inputStream:n,decoder:this.eventStreamCodec}),deserializer:Lo(t,this.utfEncoder)})}serialize(e,t){return new Mo({messageStream:new Oo({inputStream:e,serializer:t}),encoder:this.eventStreamCodec,includeEndFrame:!0})}}class No{constructor({utf8Encoder:e,utf8Decoder:t}){this.universalMarshaller=new $o({utf8Decoder:t,utf8Encoder:e})}deserialize(e,t){const n=Do(e)?(r=e,{[Symbol.asyncIterator]:async function*(){const e=r.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t)return;yield n}}finally{e.releaseLock()}}}):e;var r;return this.universalMarshaller.deserialize(n,t)}serialize(e,t){const n=this.universalMarshaller.serialize(e,t);return"function"==typeof ReadableStream?(e=>{const t=e[Symbol.asyncIterator]();return new ReadableStream({async pull(e){const{done:n,value:r}=await t.next();if(n)return e.close();e.enqueue(r)}})})(n):n}}const Do=e=>"function"==typeof ReadableStream&&e instanceof ReadableStream,Uo=e=>new No(e),Fo="function"==typeof TextEncoder?new TextEncoder:null,Bo=e=>{if("string"==typeof e){if(Fo)return Fo.encode(e).byteLength;let t=e.length;for(let n=t-1;n>=0;n--){const r=e.charCodeAt(n);r>127&&r<=2047?t++:r>2047&&r<=65535&&(t+=2),r>=56320&&r<=57343&&n--}return t}if("number"==typeof e.byteLength)return e.byteLength;if("number"==typeof e.size)return e.size;throw new Error(`Body Length computation failed for ${e}`)},jo=e=>new Date(Date.now()+e),qo=e=>at.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,Ho=(e,t)=>{const n=Date.parse(e);return((e,t)=>Math.abs(jo(t).getTime()-e)>=3e5)(n,t)?n-Date.now():t},zo=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t};class Vo{async sign(e,t,n){if(!st.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const r=await(async e=>{const t=zo("context",e.context),n=zo("config",e.config),r=t.endpointV2?.properties?.authSchemes?.[0],i=zo("signer",n.signer),o=await i(r),s=e?.signingRegion,a=e?.signingRegionSet,c=e?.signingName;return{config:n,signer:o,signingRegion:s,signingRegionSet:a,signingName:c}})(n),{config:i,signer:o}=r;let{signingRegion:s,signingName:a}=r;const c=n.context;if(c?.authSchemes?.length){const[e,t]=c.authSchemes;"sigv4a"===e?.name&&"sigv4"===t?.name&&(s=t?.signingRegion??s,a=t?.signingName??a)}return await o.sign(e,{signingDate:jo(i.systemClockOffset),signingRegion:s,signingService:a})}errorHandler(e){return t=>{const n=t.ServerTime??qo(t.$response);if(n){const r=zo("config",e.config),i=r.systemClockOffset;r.systemClockOffset=Ho(n,r.systemClockOffset);r.systemClockOffset!==i&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const n=qo(e);if(n){const e=zo("config",t.config);e.systemClockOffset=Ho(n,e.systemClockOffset)}}}const Go="required",Wo="fn",Ko="argv",Jo="ref",Yo=!0,Qo="isSet",Zo="booleanEquals",Xo="error",es="endpoint",ts="tree",ns="PartitionResult",rs={[Go]:!1,type:"String"},is={[Go]:!0,default:!1,type:"Boolean"},os={[Jo]:"Endpoint"},ss={[Wo]:Zo,[Ko]:[{[Jo]:"UseFIPS"},!0]},as={[Wo]:Zo,[Ko]:[{[Jo]:"UseDualStack"},!0]},cs={},us={[Wo]:"getAttr",[Ko]:[{[Jo]:ns},"supportsFIPS"]},ds={[Wo]:Zo,[Ko]:[!0,{[Wo]:"getAttr",[Ko]:[{[Jo]:ns},"supportsDualStack"]}]},ls=[ss],hs=[as],fs=[{[Jo]:"Region"}],ps={version:"1.0",parameters:{Region:rs,UseDualStack:is,UseFIPS:is,Endpoint:rs},rules:[{conditions:[{[Wo]:Qo,[Ko]:[os]}],rules:[{conditions:ls,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Xo},{rules:[{conditions:hs,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Xo},{endpoint:{url:os,properties:cs,headers:cs},type:es}],type:ts}],type:ts},{rules:[{conditions:[{[Wo]:Qo,[Ko]:fs}],rules:[{conditions:[{[Wo]:"aws.partition",[Ko]:fs,assign:ns}],rules:[{conditions:[ss,as],rules:[{conditions:[{[Wo]:Zo,[Ko]:[Yo,us]},ds],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:cs,headers:cs},type:es}],type:ts}],type:ts},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Xo}],type:ts},{conditions:ls,rules:[{conditions:[{[Wo]:Zo,[Ko]:[us,Yo]}],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dnsSuffix}",properties:cs,headers:cs},type:es}],type:ts}],type:ts},{error:"FIPS is enabled but this partition does not support FIPS",type:Xo}],type:ts},{conditions:hs,rules:[{conditions:[ds],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:cs,headers:cs},type:es}],type:ts}],type:ts},{error:"DualStack is enabled but this partition does not support DualStack",type:Xo}],type:ts},{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dnsSuffix}",properties:cs,headers:cs},type:es}],type:ts}],type:ts}],type:ts},{error:"Invalid Configuration: Missing Region",type:Xo}],type:ts}]},ms=new class{constructor({size:e,params:t}){this.data=new Map,this.parameters=[],this.capacity=e??50,t&&(this.parameters=t)}get(e,t){const n=this.hash(e);if(!1===n)return t();if(!this.data.has(n)){if(this.data.size>this.capacity+10){const e=this.data.keys();let t=0;for(;;){const{value:n,done:r}=e.next();if(this.data.delete(n),r||++t>10)break}}this.data.set(n,t())}return this.data.get(n)}size(){return this.data.size}hash(e){let t="";const{parameters:n}=this;if(0===n.length)return!1;for(const r of n){const n=String(e[r]??"");if(n.includes("|;"))return!1;t+=n+"|;"}return t}}({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),gs=(e,t={})=>ms.get(e,()=>((e,t)=>{const{endpointParams:n,logger:r}=t,{parameters:i,rules:o}=e;t.logger?.debug?.(`${vt} Initial EndpointParams: ${kt(n)}`);const s=Object.entries(i).filter(([,e])=>null!=e.default).map(([e,t])=>[e,t.default]);if(s.length>0)for(const[e,t]of s)n[e]=n[e]??t;const a=Object.entries(i).filter(([,e])=>e.required).map(([e])=>e);for(const e of a)if(null==n[e])throw new St(`Missing required parameter: '${e}'`);const c=Ut(o,{endpointParams:n,logger:r,referenceRecord:{}});return t.logger?.debug?.(`${vt} Resolved endpoint: ${kt(c)}`),c})(ps,{endpointParams:e,logger:t.logger}));bt.aws=qt;Error;const ys=["in-region","cross-region","mobile","standard","legacy"],ws=()=>{const e="undefined"!=typeof window&&window?.navigator?.userAgent?lo().parse(window.navigator.userAgent):void 0,t=e?.platform?.type;return"tablet"===t||"mobile"===t},bs=e=>{const t=(({defaultsMode:e}={})=>((e,t,n)=>{let r,i,o,s=!1;const a=async()=>{i||(i=e());try{r=await i,o=!0,s=!1}finally{i=void 0}return r};return void 0===t?async e=>(o&&!e?.forceRefresh||(r=await a()),r):async e=>(o&&!e?.forceRefresh||(r=await a()),s?r:n&&!n(r)?(s=!0,r):t(r)?(await a(),r):r)})(async()=>{const t="function"==typeof e?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(ws()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(t?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${ys.join(", ")}, got ${t}`)}}))(e),n=()=>t().then(Or),r=(e=>({apiVersion:"2023-09-30",base64Decoder:e?.base64Decoder??dr,base64Encoder:e?.base64Encoder??hr,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??gs,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Fi,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Vo}],logger:e?.logger??new Nr,serviceId:e?.serviceId??"Bedrock Runtime",urlParser:e?.urlParser??kn,utf8Decoder:e?.utf8Decoder??lr,utf8Encoder:e?.utf8Encoder??fr}))(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??Bo,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??ho({serviceId:r.serviceId,clientVersion:ji}),eventStreamPayloadHandlerProvider:e?.eventStreamPayloadHandlerProvider??(()=>{return{handle:(e="event stream request is not supported in browser.",()=>{throw new Error(e)})};var e}),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??Uo,maxAttempts:e?.maxAttempts??3,region:e?.region??(i="Region is missing",()=>Promise.reject(i)),requestHandler:vr.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||Tn),sha256:e?.sha256??co,streamCollector:e?.streamCollector??kr,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(false)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(false))};var i},vs=(e,t)=>{const n=Object.assign((e=>({setRegion(t){e.region=t},region:()=>e.region}))(e),Lr(e),(e=>({setHttpHandler(t){e.httpHandler=t},httpHandler:()=>e.httpHandler,updateHttpClientConfig(t,n){e.httpHandler?.updateHttpClientConfig(t,n)},httpHandlerConfigs:()=>e.httpHandler.httpHandlerConfigs()}))(e),(e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex(t=>t.schemeId===e.schemeId);-1===n?t.push(e):t.splice(n,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider:()=>n,setCredentials(e){r=e},credentials:()=>r}})(e));return t.forEach(e=>e.configure(n)),Object.assign(e,{region:n.region()},(r=n,Object.assign((e=>{const t={};return e.checksumAlgorithms().forEach(e=>{t[e.algorithmId()]=e.checksumConstructor()}),t})(r),(e=>{const t={};return t.retryStrategy=e.retryStrategy(),t})(r))),{httpHandler:n.httpHandler()},(e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}))(n));var r};class ks extends ar{config;constructor(...[e]){const t=bs(e||{});super(t),this.initConfig=t;const n=(e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"bedrock"}))(t),r=function(e){const t=pt(e.userAgentAppId??void 0),{customUserAgent:n}=e;return Object.assign(e,{customUserAgent:"string"==typeof n?[[n]]:n,userAgentAppId:async()=>{const n=await t();if(!function(e){return void 0===e||"string"==typeof e&&e.length<=50}(n)){const t="NoOpLogger"!==e.logger?.constructor?.name&&e.logger?e.logger:console;"string"!=typeof n?t?.warn("userAgentAppId must be a string or undefined."):n.length>50&&t?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return n}})}(n),i=(e=>{const{retryStrategy:t,retryMode:n,maxAttempts:r}=e,i=en(r??3);return Object.assign(e,{maxAttempts:i,retryStrategy:async()=>t||(await en(n)()===Mn.ADAPTIVE?new Wn(i):new Gn(i))})})(r),o=(e=>{const{region:t,useFipsEndpoint:n}=e;if(!t)throw new Error("Region is missing");return Object.assign(e,{region:async()=>{if("string"==typeof t)return nn(t);const e=await t();return nn(e)},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!tn(e)||("function"!=typeof n?Promise.resolve(!!n):n())}})})(i),s=(e=>{const t=e.tls??!0,{endpoint:n,useDualstackEndpoint:r,useFipsEndpoint:i}=e,o=null!=n?async()=>Sn(await en(n)()):void 0,s=!!n,a=Object.assign(e,{endpoint:o,tls:t,isCustomEndpoint:s,useDualstackEndpoint:en(r??!1),useFipsEndpoint:en(i??!1)});let c;return a.serviceConfiguredEndpoint=async()=>(e.serviceId&&!c&&(c=vn(e.serviceId)),c),a})(o);var a;const c=(e=>{const t=Di(e);return Object.assign(t,{authSchemePreference:en(e.authSchemePreference??[])})})((a=s,Object.assign(a,{eventStreamMarshaller:a.eventStreamSerdeProvider(a)}))),u=function(e){const t=e.signer,n=e.signer,r=Object.assign(e,{eventSigner:t,messageSigner:n}),i=r.eventStreamPayloadHandlerProvider(r);return Object.assign(r,{eventStreamPayloadHandler:i})}(c),d=vs(u,e?.extensions||[]);var l;this.config=d,this.middlewareStack.use((l=this.config,{applyToStack:e=>{e.add(Jt(l),Qt)}})),this.middlewareStack.use(ti(this.config)),this.middlewareStack.use(fn(this.config)),this.middlewareStack.use(ut(this.config)),this.middlewareStack.use((this.config,{applyToStack:e=>{e.add((e,t)=>async n=>{try{const r=await e(n),{clientName:i,commandName:o,logger:s,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:u}=a,d=c??t.inputFilterSensitiveLog,l=u??t.outputFilterSensitiveLog,{$metadata:h,...f}=r.output;return s?.info?.({clientName:i,commandName:o,input:d(n.input),output:l(f),metadata:h}),r}catch(e){const{clientName:r,commandName:i,logger:o,dynamoDbDocumentClientOptions:s={}}=t,{overrideInputFilterSensitiveLog:a}=s,c=a??t.inputFilterSensitiveLog;throw o?.error?.({clientName:r,commandName:i,input:c(n.input),error:e,metadata:e.$metadata}),e}},dt)}})),this.middlewareStack.use(ft(this.config)),this.middlewareStack.use(((e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:r=>{r.addRelativeTo(rn(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),on)}}))(this.config,{httpAuthSchemeParametersProvider:Ui,identityProviderConfigProvider:async e=>new sn({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(dn(this.config))}destroy(){super.destroy()}}class Ss extends Pr{constructor(e){super(e),Object.setPrototypeOf(this,Ss.prototype)}}class Es extends Ss{name="AccessDeniedException";$fault="client";constructor(e){super({name:"AccessDeniedException",$fault:"client",...e}),Object.setPrototypeOf(this,Es.prototype)}}var As;!function(e){e.visit=(e,t)=>void 0!==e.s3OutputDataConfig?t.s3OutputDataConfig(e.s3OutputDataConfig):t._(e.$unknown[0],e.$unknown[1])}(As||(As={}));class Is extends Ss{name="InternalServerException";$fault="server";constructor(e){super({name:"InternalServerException",$fault:"server",...e}),Object.setPrototypeOf(this,Is.prototype)}}class _s extends Ss{name="ThrottlingException";$fault="client";constructor(e){super({name:"ThrottlingException",$fault:"client",...e}),Object.setPrototypeOf(this,_s.prototype)}}class xs extends Ss{name="ValidationException";$fault="client";constructor(e){super({name:"ValidationException",$fault:"client",...e}),Object.setPrototypeOf(this,xs.prototype)}}class Rs extends Ss{name="ConflictException";$fault="client";constructor(e){super({name:"ConflictException",$fault:"client",...e}),Object.setPrototypeOf(this,Rs.prototype)}}class Cs extends Ss{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,Cs.prototype)}}class Ps extends Ss{name="ServiceQuotaExceededException";$fault="client";constructor(e){super({name:"ServiceQuotaExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,Ps.prototype)}}class Ms extends Ss{name="ServiceUnavailableException";$fault="server";constructor(e){super({name:"ServiceUnavailableException",$fault:"server",...e}),Object.setPrototypeOf(this,Ms.prototype)}}var Ts;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):t._(e.$unknown[0],e.$unknown[1])}(Ts||(Ts={}));var Os;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):t._(e.$unknown[0],e.$unknown[1])}(Os||(Os={}));var Ls;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):void 0!==e.s3Location?t.s3Location(e.s3Location):t._(e.$unknown[0],e.$unknown[1])}(Ls||(Ls={}));var $s;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):t._(e.$unknown[0],e.$unknown[1])}($s||($s={}));var Ns;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):t._(e.$unknown[0],e.$unknown[1])}(Ns||(Ns={}));var Ds,Us;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):void 0!==e.s3Location?t.s3Location(e.s3Location):t._(e.$unknown[0],e.$unknown[1])}(Ds||(Ds={})),function(e){e.visit=(e,t)=>void 0!==e.reasoningText?t.reasoningText(e.reasoningText):void 0!==e.redactedContent?t.redactedContent(e.redactedContent):t._(e.$unknown[0],e.$unknown[1])}(Us||(Us={}));var Fs,Bs;!function(e){e.visit=(e,t)=>void 0!==e.bytes?t.bytes(e.bytes):void 0!==e.s3Location?t.s3Location(e.s3Location):t._(e.$unknown[0],e.$unknown[1])}(Fs||(Fs={})),function(e){e.visit=(e,t)=>void 0!==e.json?t.json(e.json):void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):void 0!==e.document?t.document(e.document):void 0!==e.video?t.video(e.video):t._(e.$unknown[0],e.$unknown[1])}(Bs||(Bs={}));var js;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.image?t.image(e.image):void 0!==e.document?t.document(e.document):void 0!==e.video?t.video(e.video):void 0!==e.toolUse?t.toolUse(e.toolUse):void 0!==e.toolResult?t.toolResult(e.toolResult):void 0!==e.guardContent?t.guardContent(e.guardContent):void 0!==e.cachePoint?t.cachePoint(e.cachePoint):void 0!==e.reasoningContent?t.reasoningContent(e.reasoningContent):t._(e.$unknown[0],e.$unknown[1])}(js||(js={}));var qs,Hs,zs,Vs,Gs,Ws;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):t._(e.$unknown[0],e.$unknown[1])}(qs||(qs={})),function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.guardContent?t.guardContent(e.guardContent):void 0!==e.cachePoint?t.cachePoint(e.cachePoint):t._(e.$unknown[0],e.$unknown[1])}(Hs||(Hs={})),function(e){e.visit=(e,t)=>void 0!==e.auto?t.auto(e.auto):void 0!==e.any?t.any(e.any):void 0!==e.tool?t.tool(e.tool):t._(e.$unknown[0],e.$unknown[1])}(zs||(zs={})),function(e){e.visit=(e,t)=>void 0!==e.json?t.json(e.json):t._(e.$unknown[0],e.$unknown[1])}(Vs||(Vs={})),function(e){e.visit=(e,t)=>void 0!==e.toolSpec?t.toolSpec(e.toolSpec):void 0!==e.cachePoint?t.cachePoint(e.cachePoint):t._(e.$unknown[0],e.$unknown[1])}(Gs||(Gs={})),function(e){e.visit=(e,t)=>void 0!==e.message?t.message(e.message):t._(e.$unknown[0],e.$unknown[1])}(Ws||(Ws={}));class Ks extends Ss{name="ModelErrorException";$fault="client";originalStatusCode;resourceName;constructor(e){super({name:"ModelErrorException",$fault:"client",...e}),Object.setPrototypeOf(this,Ks.prototype),this.originalStatusCode=e.originalStatusCode,this.resourceName=e.resourceName}}class Js extends Ss{name="ModelNotReadyException";$fault="client";$retryable={};constructor(e){super({name:"ModelNotReadyException",$fault:"client",...e}),Object.setPrototypeOf(this,Js.prototype)}}class Ys extends Ss{name="ModelTimeoutException";$fault="client";constructor(e){super({name:"ModelTimeoutException",$fault:"client",...e}),Object.setPrototypeOf(this,Ys.prototype)}}var Qs,Zs,Xs,ea;!function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.redactedContent?t.redactedContent(e.redactedContent):void 0!==e.signature?t.signature(e.signature):t._(e.$unknown[0],e.$unknown[1])}(Qs||(Qs={})),function(e){e.visit=(e,t)=>void 0!==e.text?t.text(e.text):void 0!==e.toolUse?t.toolUse(e.toolUse):void 0!==e.reasoningContent?t.reasoningContent(e.reasoningContent):t._(e.$unknown[0],e.$unknown[1])}(Zs||(Zs={})),function(e){e.visit=(e,t)=>void 0!==e.toolUse?t.toolUse(e.toolUse):t._(e.$unknown[0],e.$unknown[1])}(Xs||(Xs={}));class ta extends Ss{name="ModelStreamErrorException";$fault="client";originalStatusCode;originalMessage;constructor(e){super({name:"ModelStreamErrorException",$fault:"client",...e}),Object.setPrototypeOf(this,ta.prototype),this.originalStatusCode=e.originalStatusCode,this.originalMessage=e.originalMessage}}!function(e){e.visit=(e,t)=>void 0!==e.messageStart?t.messageStart(e.messageStart):void 0!==e.contentBlockStart?t.contentBlockStart(e.contentBlockStart):void 0!==e.contentBlockDelta?t.contentBlockDelta(e.contentBlockDelta):void 0!==e.contentBlockStop?t.contentBlockStop(e.contentBlockStop):void 0!==e.messageStop?t.messageStop(e.messageStop):void 0!==e.metadata?t.metadata(e.metadata):void 0!==e.internalServerException?t.internalServerException(e.internalServerException):void 0!==e.modelStreamErrorException?t.modelStreamErrorException(e.modelStreamErrorException):void 0!==e.validationException?t.validationException(e.validationException):void 0!==e.throttlingException?t.throttlingException(e.throttlingException):void 0!==e.serviceUnavailableException?t.serviceUnavailableException(e.serviceUnavailableException):t._(e.$unknown[0],e.$unknown[1])}(ea||(ea={}));var na,ra,ia;!function(e){e.visit=(e,t)=>void 0!==e.chunk?t.chunk(e.chunk):t._(e.$unknown[0],e.$unknown[1])}(na||(na={})),function(e){e.visit=(e,t)=>void 0!==e.chunk?t.chunk(e.chunk):void 0!==e.internalServerException?t.internalServerException(e.internalServerException):void 0!==e.modelStreamErrorException?t.modelStreamErrorException(e.modelStreamErrorException):void 0!==e.validationException?t.validationException(e.validationException):void 0!==e.throttlingException?t.throttlingException(e.throttlingException):void 0!==e.modelTimeoutException?t.modelTimeoutException(e.modelTimeoutException):void 0!==e.serviceUnavailableException?t.serviceUnavailableException(e.serviceUnavailableException):t._(e.$unknown[0],e.$unknown[1])}(ra||(ra={})),function(e){e.visit=(e,t)=>void 0!==e.chunk?t.chunk(e.chunk):void 0!==e.internalServerException?t.internalServerException(e.internalServerException):void 0!==e.modelStreamErrorException?t.modelStreamErrorException(e.modelStreamErrorException):void 0!==e.validationException?t.validationException(e.validationException):void 0!==e.throttlingException?t.throttlingException(e.throttlingException):void 0!==e.modelTimeoutException?t.modelTimeoutException(e.modelTimeoutException):void 0!==e.serviceUnavailableException?t.serviceUnavailableException(e.serviceUnavailableException):t._(e.$unknown[0],e.$unknown[1])}(ia||(ia={}));const oa=e=>({...e,...e.body&&{body:Cr}}),sa=e=>({...e,...e.body&&{body:Cr}}),aa=e=>({...e,...e.body&&{body:Cr}}),ca=e=>({...e,...e.body&&{body:"STREAMING_CONTENT"}}),ua=(e,t)=>((e,t)=>_r(e,t).then(e=>t.utf8Encoder(e)))(e,t).then(e=>{if(e.length)try{return JSON.parse(e)}catch(t){throw"SyntaxError"===t?.name&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}return{}}),da=async(e,t)=>{const n=await ua(e,t);return n.message=n.message??n.Message,n};function la(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function ha(e,t){return new fa(e,t)}class fa{constructor(e,t){this.input=e,this.context=t,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:e,protocol:t="https",port:n,path:r}=await this.context.endpoint();this.path=r;for(const e of this.resolvePathStack)e(this.path);return new st({protocol:t,hostname:this.hostname||e,port:n,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(e){return this.hostname=e,this}bp(e){return this.resolvePathStack.push(t=>{this.path=`${t?.endsWith("/")?t.slice(0,-1):t||""}`+e}),this}p(e,t,n,r){return this.resolvePathStack.push(i=>{this.path=((e,t,n,r,i,o)=>{if(null==t||void 0===t[n])throw new Error("No value provided for input HTTP label: "+n+".");{const t=r();if(t.length<=0)throw new Error("Empty value provided for input HTTP label: "+n+".");e=e.replace(i,o?t.split("/").map(e=>la(e)).join("/"):la(t))}return e})(i,this.input,e,t,n,r)}),this}h(e){return this.headers=e,this}q(e){return this.query=e,this}b(e){return this.body=e,this}m(e){return this.method=e,this}}const pa=async(e,t)=>{const n=ha(e,t),r=Dr({},$r,{[Va]:e[za]||"application/octet-stream",[Ha]:e[Ha],[tc]:e[Ja],[Za]:e[Ga],[Xa]:e[Wa],[ec]:e[Ka]});let i;return n.bp("/model/{modelId}/invoke"),n.p("modelId",()=>e.modelId,"{modelId}",!1),void 0!==e.body&&(i=e.body),n.m("POST").h(r).b(i),n.build()},ma=async(e,t)=>{const n=ha(e,t),r=Dr({},$r,{[Va]:e[za]||"application/octet-stream",[Ya]:e[Ha],[tc]:e[Ja],[Za]:e[Ga],[Xa]:e[Wa],[ec]:e[Ka]});let i;return n.bp("/model/{modelId}/invoke-with-response-stream"),n.p("modelId",()=>e.modelId,"{modelId}",!1),void 0!==e.body&&(i=e.body),n.m("POST").h(r).b(i),n.build()},ga=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return wa(e,t);const n=Dr({$metadata:qa(e),[za]:[,e.headers[Va]],[Ka]:[,e.headers[ec]]}),r=await _r(e.body,t);return n.body=r,n},ya=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return wa(e,t);const n=Dr({$metadata:qa(e),[za]:[,e.headers[Qa]],[Ka]:[,e.headers[ec]]}),r=e.body;return n.body=Oa(r,t),n},wa=async(e,t)=>{const n={...e,body:await da(e.body,t)},r=((e,t)=>{const n=(e,t)=>Object.keys(e).find(e=>e.toLowerCase()===t.toLowerCase()),r=e=>{let t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},i=n(e.headers,"x-amzn-errortype");if(void 0!==i)return r(e.headers[i]);if(t&&"object"==typeof t){const e=n(t,"code");if(e&&void 0!==t[e])return r(t[e]);if(void 0!==t.__type)return r(t.__type)}})(e,n.body);switch(r){case"AccessDeniedException":case"com.amazonaws.bedrockruntime#AccessDeniedException":throw await ka(n,t);case"InternalServerException":case"com.amazonaws.bedrockruntime#InternalServerException":throw await Ea(n,t);case"ResourceNotFoundException":case"com.amazonaws.bedrockruntime#ResourceNotFoundException":throw await Ra(n,t);case"ServiceQuotaExceededException":case"com.amazonaws.bedrockruntime#ServiceQuotaExceededException":throw await Ca(n,t);case"ThrottlingException":case"com.amazonaws.bedrockruntime#ThrottlingException":throw await Ma(n,t);case"ValidationException":case"com.amazonaws.bedrockruntime#ValidationException":throw await Ta(n,t);case"ModelErrorException":case"com.amazonaws.bedrockruntime#ModelErrorException":throw await Aa(n,t);case"ModelNotReadyException":case"com.amazonaws.bedrockruntime#ModelNotReadyException":throw await Ia(n,t);case"ModelTimeoutException":case"com.amazonaws.bedrockruntime#ModelTimeoutException":throw await xa(n,t);case"ServiceUnavailableException":case"com.amazonaws.bedrockruntime#ServiceUnavailableException":throw await Pa(n,t);case"ModelStreamErrorException":case"com.amazonaws.bedrockruntime#ModelStreamErrorException":throw await _a(n,t);case"ConflictException":case"com.amazonaws.bedrockruntime#ConflictException":throw await Sa(n,t);default:const i=n.body;return ba({output:e,parsedBody:i,errorCode:r})}},ba=(va=Ss,({output:e,parsedBody:t,errorCode:n})=>{(({output:e,parsedBody:t,exceptionCtor:n,errorCode:r})=>{const i=Tr(e),o=i.httpStatusCode?i.httpStatusCode+"":void 0,s=new n({name:t?.code||t?.Code||r||o||"UnknownError",$fault:"client",$metadata:i});throw Mr(s,t)})({output:e,parsedBody:t,exceptionCtor:va,errorCode:n})});var va;const ka=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const o=new Es({$metadata:qa(e),...n});return Mr(o,e.body)},Sa=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const o=new Rs({$metadata:qa(e),...n});return Mr(o,e.body)},Ea=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const o=new Is({$metadata:qa(e),...n});return Mr(o,e.body)},Aa=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr,originalStatusCode:zr,resourceName:Wr});Object.assign(n,i);const o=new Ks({$metadata:qa(e),...n});return Mr(o,e.body)},Ia=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const o=new Js({$metadata:qa(e),...n});return Mr(o,e.body)},_a=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr,originalMessage:Wr,originalStatusCode:zr});Object.assign(n,i);const o=new ta({$metadata:qa(e),...n});return Mr(o,e.body)},xa=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const o=new Ys({$metadata:qa(e),...n});return Mr(o,e.body)},Ra=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const o=new Cs({$metadata:qa(e),...n});return Mr(o,e.body)},Ca=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const o=new Ps({$metadata:qa(e),...n});return Mr(o,e.body)},Pa=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const o=new Ms({$metadata:qa(e),...n});return Mr(o,e.body)},Ma=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const o=new _s({$metadata:qa(e),...n});return Mr(o,e.body)},Ta=async(e,t)=>{const n=Dr({}),r=e.body,i=Ur(r,{message:Wr});Object.assign(n,i);const o=new xs({$metadata:qa(e),...n});return Mr(o,e.body)},Oa=(e,t)=>t.eventStreamMarshaller.deserialize(e,async n=>null!=n.chunk?{chunk:await Da(n.chunk,t)}:null!=n.internalServerException?{internalServerException:await La(n.internalServerException,t)}:null!=n.modelStreamErrorException?{modelStreamErrorException:await $a(n.modelStreamErrorException,t)}:null!=n.validationException?{validationException:await Ba(n.validationException,t)}:null!=n.throttlingException?{throttlingException:await Fa(n.throttlingException,t)}:null!=n.modelTimeoutException?{modelTimeoutException:await Na(n.modelTimeoutException,t)}:null!=n.serviceUnavailableException?{serviceUnavailableException:await Ua(n.serviceUnavailableException,t)}:{$unknown:e}),La=async(e,t)=>{const n={...e,body:await ua(e.body,t)};return Ea(n,t)},$a=async(e,t)=>{const n={...e,body:await ua(e.body,t)};return _a(n,t)},Na=async(e,t)=>{const n={...e,body:await ua(e.body,t)};return xa(n,t)},Da=async(e,t)=>{const n={},r=await ua(e.body,t);return Object.assign(n,ja(r,t)),n},Ua=async(e,t)=>{const n={...e,body:await ua(e.body,t)};return Pa(n,t)},Fa=async(e,t)=>{const n={...e,body:await ua(e.body,t)};return Ma(n,t)},Ba=async(e,t)=>{const n={...e,body:await ua(e.body,t)};return Ta(n,t)},ja=(e,t)=>Ur(e,{bytes:t.base64Decoder}),qa=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),Ha="accept",za="contentType",Va="content-type",Ga="guardrailIdentifier",Wa="guardrailVersion",Ka="performanceConfigLatency",Ja="trace",Ya="x-amzn-bedrock-accept",Qa="x-amzn-bedrock-content-type",Za="x-amzn-bedrock-guardrailidentifier",Xa="x-amzn-bedrock-guardrailversion",ec="x-amzn-bedrock-performanceconfig-latency",tc="x-amzn-bedrock-trace";class nc extends(xr.classBuilder().ep(Bi).m(function(e,t,n,r){return[Rn(n,this.serialize,this.deserialize),Pn(n,e.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","InvokeModelWithResponseStream",{eventStream:{output:!0}}).n("BedrockRuntimeClient","InvokeModelWithResponseStreamCommand").f(aa,ca).ser(ma).de(ya).build()){}class rc extends(xr.classBuilder().ep(Bi).m(function(e,t,n,r){return[Rn(n,this.serialize,this.deserialize),Pn(n,e.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","InvokeModel",{}).n("BedrockRuntimeClient","InvokeModelCommand").f(oa,sa).ser(pa).de(ga).build()){}const ic=oc;function oc(e,t){const n=sc();return(oc=function(e,t){return n[e-=274]})(e,t)}function sc(){const e=["getReader","data","filter","application/json","_processProxyRequest","\n\nAssistant:","5614994ueEoUD","<<SYS>>\n","utf-8","get","config","AWSTextAdapter","_readAsyncIterableResponse","test","completions","AI_ERROR_UNSUPPORTED_MODEL","ai.aws.apiUrl","completion","\nYou must keep the text formatting.\n\nContent:\n","_requestParameters","2434RnyOGG","_getGeneratedText","signal","1394OYvgsR","2926920eifOkb","abortController","anthropic.claude","2779152NsdYPu","preparePrompt","length","ai.aws.requestParameters","getModelFamily","Your task is to generate HTML content accordingly to the given instruction. Never include <img> tag in your response even if asked for. Your answer must be a well-structured and properly formatted HTML code. Answer only with the generated HTML content. Do not add any additional remarks or notes. Do not act like a chatbot or a real person.","\n<</SYS>>\n[INST]\n","json","_requestHeaders","Your task is to execute the instruction using the provided HTML content. Follow the instruction closely. Your answer must be a properly formatted HTML code. Do not add any additional remarks or notes. Do not act like a chatbot or a real person.","1158496oEmYeO","bytes","\n[/INST]","_readStreamableResponse","ai.aws.bedrockClientConfig","generation","chunk","body","7159026OfSdsw","locale","generations","ai.aws.requestHeaders","ai21.j2","_apiUrl","sendRequest","pluginName","_prepareRequestParameters","_readStaticResponse","parse","resolve","read","decode","Instruction:\n","cohere.command","split","_bedrockClientConfig","send","map","3015848gWadGV","anthropic.claude-v2","define","join","bedrock-2023-05-31","POST","_prepareRequestHeaders","text","_processAWSRequest","Human:\n","meta.llama","editor","stringify"];return(sc=function(){return e})()}!function(e){const t=oc,n=e();for(;;)try{if(872904===parseInt(t(281))/1*(-parseInt(t(284))/2)+parseInt(t(288))/3+parseInt(t(298))/4+parseInt(t(285))/5+parseInt(t(306))/6+-parseInt(t(345))/7+parseInt(t(326))/8)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(sc);class ac extends We{[ic(311)];[ic(296)];[ic(323)];[ic(280)];static get[ic(313)](){return ic(350)}constructor(e){const t=ic;super(e),e[t(349)][t(348)](t(291))||e[t(349)][t(328)](t(291),{model:t(327),max_tokens_to_sample:2e3,temperature:1,top_p:1,top_k:250,anthropic_version:t(330),stream:!0}),this[t(311)]=e[t(349)][t(348)](t(277)),this[t(323)]=e[t(349)][t(348)](t(302)),this[t(296)]=e[t(349)][t(348)](t(309)),this[t(280)]=e[t(349)][t(348)](t(291))}async[ic(312)]({query:e,context:t,onData:n,actionId:r}){const i=ic,{model:o,stream:s,...a}=await this[i(314)](this[i(280)],r),c={prompt:await this[i(289)](e,t,o,r),...a};this[i(311)]?await this[i(343)](c,o,s,n,r):await this[i(334)](c,o,s,n)}async[ic(289)](e,t,n,r){const i=ic;let o,s;return t?(o=i(297),s=i(320)+e+i(279)+t):(o=i(293),s=e),i(336)==this[i(292)](n)?i(346)+o+i(294)+s+i(300):i(335)+o+"\n"+s+i(344)}[ic(292)](e){const t=ic;if(/^anthropic\.claude/[t(274)](e))return t(287);if(/^ai21\.j2/[t(274)](e))return t(310);if(/^cohere\.command/[t(274)](e))return t(321);if(/^meta\.llama/[t(274)](e))return t(336);throw new b(v(this[t(337)][t(307)],t(276),e))}async[ic(343)](e,t,n,r,i){const o=ic,s={method:o(331),headers:await this[o(332)](this[o(296)],i),body:JSON[o(338)]({...e,model:t,stream:n}),signal:this[o(286)][o(283)]},a=await fetch(this[o(311)],s);n?await this[o(301)](a,t,r):await this[o(315)](a,t,r)}async[ic(334)](e,t,n,r){const i=ic,o=new ks(this[i(323)]),s={body:JSON[i(338)](e),contentType:i(342),accept:i(342),modelId:t};let a;if(n){const e=new nc(s);a=await o[i(324)](e,{abortSignal:this[i(286)][i(283)]}),await this[i(351)](a,t,r)}else{const e=new rc(s);a=await o[i(324)](e,{abortSignal:this[i(286)][i(283)]}),await this[i(315)](a,t,r)}}async[ic(351)](e,t,n){const r=ic,i=e[r(305)],o=new TextDecoder(r(347));let s="";for await(const e of i)if(e[r(304)]){const i=o[r(319)](e[r(304)][r(299)]),a=JSON[r(316)](i);s+=this[r(282)](a,t),n(s)}return Promise[r(317)]()}async[ic(301)](e,t,n){const r=ic,i=e[r(305)],o=new TextDecoder(r(347)),s=i[r(339)]();let a="",c="",u=!1;for(;!u;){const{done:e,value:i}=await s[r(318)]();if(u=e,u)break;const d=(a+o[r(319)](i))[r(322)]("\n")[r(325)](e=>{const t=r;try{return a="",JSON[t(316)](e)}catch{return a=e,null}})[r(341)](e=>null!==e);d[r(290)]&&(c+=d[r(325)](e=>this[r(282)](e,t))[r(329)](""),n(c))}return Promise[r(317)]()}async[ic(315)](e,t,n){const r=ic;let i;return i=e instanceof Response?await e[r(295)]():JSON[r(316)](new TextDecoder(r(347))[r(319)](e[r(305)])),n(this[r(282)](i,t)),Promise[r(317)]()}[ic(282)](e,t){const n=ic;switch(this[n(292)](t)){case n(287):return e[n(278)];case n(310):return e[n(275)][0][n(340)][n(333)];case n(321):return e[n(308)][0][n(333)];case n(336):return e[n(303)]}}}function cc(){var e=["1053484xyHXgQ","2uGEcnL","8JkHVNe","393508DlPBRL","2861934QdIsEQ","3121713fgyrDf","9Mzslnc","16602Fxafap","2452015rykVDr","6690070fmFopr"];return(cc=function(){return e})()}function uc(e,t){var n=cc();return(uc=function(e,t){return n[e-=254]})(e,t)}!function(e){for(var t=uc,n=e();;)try{if(283245===parseInt(t(255))/1+-parseInt(t(263))/2*(-parseInt(t(259))/3)+-parseInt(t(262))/4+-parseInt(t(260))/5+-parseInt(t(256))/6+-parseInt(t(257))/7*(-parseInt(t(254))/8)+-parseInt(t(258))/9*(-parseInt(t(261))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(cc)})(),(window.CKEditor5=window.CKEditor5||{}).ai=r})();