@weavy/uikit-react 21.0.0 → 21.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/changelog.md +16 -0
  2. package/dist/types/blocks/WyChat.d.ts +9 -0
  3. package/dist/types/blocks/WyContext.d.ts +2 -0
  4. package/dist/types/blocks/WyFiles.d.ts +10 -0
  5. package/dist/types/blocks/WyMessenger.d.ts +10 -0
  6. package/dist/types/blocks/WyPosts.d.ts +9 -0
  7. package/dist/types/blocks/index.d.ts +5 -0
  8. package/dist/types/components/WyAttachment.d.ts +9 -0
  9. package/dist/types/components/WyAvatar.d.ts +2 -0
  10. package/dist/types/components/WyBadge.d.ts +2 -0
  11. package/dist/types/components/WyButton.d.ts +2 -0
  12. package/dist/types/components/WyCloudFiles.d.ts +9 -0
  13. package/dist/types/components/WyComment.d.ts +52 -0
  14. package/dist/types/components/WyConversation.d.ts +8 -0
  15. package/dist/types/components/WyConversationList.d.ts +29 -0
  16. package/dist/types/components/WyDropdown.d.ts +5 -0
  17. package/dist/types/components/WyEditor.d.ts +13 -0
  18. package/dist/types/components/WyEmbed.d.ts +8 -0
  19. package/dist/types/components/WyEmpty.d.ts +2 -0
  20. package/dist/types/components/WyFileItem.d.ts +25 -0
  21. package/dist/types/components/WyFileMenu.d.ts +21 -0
  22. package/dist/types/components/WyFileVersions.d.ts +8 -0
  23. package/dist/types/components/WyFilesAppbar.d.ts +29 -0
  24. package/dist/types/components/WyFilesList.d.ts +31 -0
  25. package/dist/types/components/WyIcon.d.ts +2 -0
  26. package/dist/types/components/WyImageGrid.d.ts +8 -0
  27. package/dist/types/components/WyMeetingCard.d.ts +2 -0
  28. package/dist/types/components/WyMessage.d.ts +17 -0
  29. package/dist/types/components/WyOverlay.d.ts +6 -0
  30. package/dist/types/components/WyPdfViewer.d.ts +2 -0
  31. package/dist/types/components/WyPoll.d.ts +14 -0
  32. package/dist/types/components/WyPortal.d.ts +2 -0
  33. package/dist/types/components/WyPost.d.ts +42 -0
  34. package/dist/types/components/WyPresence.d.ts +2 -0
  35. package/dist/types/components/WyPreview.d.ts +11 -0
  36. package/dist/types/components/WyReactions.d.ts +6 -0
  37. package/dist/types/components/WySheet.d.ts +6 -0
  38. package/dist/types/components/WySkeleton.d.ts +2 -0
  39. package/dist/types/components/WySpinner.d.ts +2 -0
  40. package/dist/types/components/WyTyping.d.ts +2 -0
  41. package/dist/types/components/WyUsersSearch.d.ts +8 -0
  42. package/dist/types/components/index.d.ts +34 -0
  43. package/dist/types/hooks/index.d.ts +1 -0
  44. package/dist/types/hooks/useWeavy.d.ts +3 -0
  45. package/dist/types/index.d.ts +4 -0
  46. package/dist/weavy.es5.esm.js +1 -0
  47. package/dist/weavy.es5.umd.cjs +1 -0
  48. package/dist/weavy.esm.js +40148 -0
  49. package/dist/weavy.umd.cjs +2788 -0
  50. package/package.json +7 -4
@@ -0,0 +1 @@
1
+ var _Symbol$metadata,_In$litPropertyMetada,_In$reactiveElementVe,_Ls$litHtmlVersions,_globalThis$litElemen,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_templateObject10,_templateObject11,_templateObject12,_templateObject13,_templateObject14,_templateObject15,_templateObject16,_templateObject17,_templateObject18,_templateObject19,_templateObject20,_templateObject21,_templateObject22,_templateObject23,_templateObject24,_templateObject25,_templateObject26,_templateObject27,_templateObject28,_templateObject29,_templateObject30,_templateObject31,_templateObject32,_templateObject33,_templateObject34,_templateObject35,_templateObject36,_templateObject37,_templateObject38,_templateObject39,_templateObject40,_templateObject41,_templateObject42,_templateObject43,_templateObject44,_templateObject45,_templateObject46,_templateObject47,_templateObject48,_templateObject49,_templateObject50,_templateObject51,_templateObject52,_templateObject53,_templateObject54,_templateObject55,_templateObject56,_templateObject57,_templateObject58,_templateObject59,_templateObject60,_templateObject61,_templateObject62,_templateObject63,_templateObject64,_templateObject65,_templateObject66,_templateObject67,_templateObject68,_templateObject69,_templateObject70,_templateObject71,_templateObject72,_templateObject73,_templateObject74,_templateObject75,_templateObject76,_templateObject77,_templateObject78,_templateObject79,_templateObject80,_templateObject81,_templateObject82,_templateObject83,_templateObject84,_templateObject85,_templateObject86,_templateObject87,_templateObject88,_templateObject89,_templateObject90,_templateObject91,_templateObject92,_templateObject93,_templateObject94,_templateObject95,_templateObject96,_templateObject97,_templateObject98,_templateObject99,_templateObject100,_templateObject101,_templateObject102,_templateObject103,_templateObject104,_templateObject105,_templateObject106,_templateObject107,_templateObject108,_templateObject109,_templateObject110,_templateObject111,_templateObject112,_templateObject113,_templateObject114,_templateObject115,_templateObject116,_templateObject117,_templateObject118,_templateObject119,_templateObject120,_templateObject121,_templateObject122,_templateObject123,_templateObject124,_templateObject125,_templateObject126,_templateObject127,_templateObject128,_templateObject129,_templateObject130,_templateObject131,_templateObject132,_templateObject133,_templateObject134,_templateObject135,_templateObject136,_templateObject137,_templateObject138,_templateObject139,_templateObject140,_templateObject141,_templateObject142,_templateObject143,_templateObject144,_templateObject145,_templateObject146,_templateObject147,_templateObject148,_templateObject149,_templateObject150,_templateObject151,_templateObject152,_templateObject153,_templateObject154,_templateObject155,_templateObject156,_templateObject157,_templateObject158,_templateObject159,_templateObject160,_templateObject161,_templateObject162,_templateObject163,_templateObject164,_templateObject165,_templateObject166,_templateObject167,_templateObject168,_templateObject169,_templateObject170,_templateObject171,_templateObject172,_templateObject173,_templateObject174,_templateObject175,_templateObject176,_templateObject177,_templateObject178,_templateObject179,_templateObject180,_templateObject181,_templateObject182,_templateObject183,_templateObject184,_templateObject185,_templateObject186,_templateObject187,_templateObject188,_templateObject189,_templateObject190,_templateObject191,_templateObject192,_templateObject193,_templateObject194,_templateObject195,_templateObject196,_templateObject197,_templateObject198,_templateObject199,_templateObject200,_templateObject201,_templateObject202,_templateObject203,_templateObject204,_templateObject205,_templateObject206,_templateObject207,_templateObject208,_templateObject209,_templateObject210,_templateObject211,_templateObject212,_templateObject213,_templateObject214,_templateObject215,_templateObject216,_templateObject217,_templateObject218,_templateObject219,_templateObject220,_templateObject221,_templateObject222,_templateObject223,_templateObject224,_templateObject225,_templateObject226,_templateObject227,_templateObject228,_templateObject229,_templateObject230,_templateObject231,_templateObject232,_templateObject233,_templateObject234,_templateObject235,_templateObject236,_templateObject237,_templateObject238,_templateObject239,_templateObject240,_templateObject241,_templateObject242,_templateObject243,_templateObject244,_templateObject245,_templateObject246,_templateObject247,_templateObject248,_templateObject249,_templateObject250,_templateObject251,_templateObject252,_templateObject253,_templateObject254,_templateObject255,_templateObject256,_templateObject257,_templateObject258,_templateObject259,_templateObject260,_templateObject261,_templateObject262,_templateObject263,_templateObject264,_templateObject265,_templateObject266,_templateObject267,_templateObject268,_templateObject269,_templateObject270,_templateObject271,_templateObject272,_templateObject273,_templateObject274,_templateObject275,_templateObject276,_templateObject277,_templateObject278,_templateObject279,_templateObject280,_templateObject281,_templateObject282,_templateObject283,_templateObject284,_templateObject285,_templateObject286,_templateObject287,_templateObject288,_templateObject289,_templateObject290,_templateObject291,_templateObject292,_templateObject293,_templateObject294,_templateObject295,_templateObject296,_templateObject297,_templateObject298,_templateObject299,_templateObject300,_templateObject301,_templateObject302,_templateObject303,_templateObject304,_templateObject305,_templateObject306,_templateObject307,_templateObject308,_templateObject309,_templateObject310,_templateObject311,_templateObject312,_templateObject313,_templateObject314,_templateObject315,_templateObject316,_templateObject317,_templateObject318,_templateObject319,_templateObject320,_templateObject321,_templateObject322,_templateObject323,_templateObject324,_templateObject325,_templateObject326,_templateObject327,_templateObject328,_templateObject329,_templateObject330,_templateObject331,_templateObject332,_templateObject333,_templateObject334,_templateObject335,_templateObject336,_templateObject337,_templateObject338,_templateObject339,_templateObject340,_templateObject341,_templateObject342,_templateObject343,_templateObject344,_templateObject345,_templateObject346,_templateObject347,_templateObject348,_templateObject349,_templateObject350,_templateObject351,_templateObject352,_templateObject353,_templateObject354,_templateObject355,_templateObject356,_templateObject357,_templateObject358,_templateObject359,_templateObject360,_templateObject361,_templateObject362,_templateObject363,_templateObject364,_templateObject365,_templateObject366,_templateObject367,_templateObject368,_templateObject369,_templateObject370,_templateObject371,_templateObject372,_templateObject373,_templateObject374,_templateObject375,_templateObject376,_templateObject377,_templateObject378,_templateObject379,_templateObject380,_templateObject381,_templateObject382,_templateObject383,_templateObject384,_templateObject385,_templateObject386,_templateObject387,_templateObject388,_templateObject389,_templateObject390,_templateObject391,_templateObject392,_templateObject393,_templateObject394,_templateObject395,_templateObject396,_templateObject397,_templateObject398,_templateObject399,_templateObject400,_templateObject401,_templateObject402,_templateObject403,_templateObject404,_templateObject405;var _excluded=["fetchStatus"];function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0)}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}function _wrapNativeSuper(Class){var _cache=typeof Map==="function"?new Map:undefined;_wrapNativeSuper=function _wrapNativeSuper(Class){if(Class===null||!_isNativeFunction(Class))return Class;if(typeof Class!=="function"){throw new TypeError("Super expression must either be null or a function")}if(typeof _cache!=="undefined"){if(_cache.has(Class))return _cache.get(Class);_cache.set(Class,Wrapper)}function Wrapper(){return _construct(Class,arguments,_getPrototypeOf(this).constructor)}Wrapper.prototype=Object.create(Class.prototype,{constructor:{value:Wrapper,enumerable:false,writable:true,configurable:true}});return _setPrototypeOf(Wrapper,Class)};return _wrapNativeSuper(Class)}function _construct(t,e,r){if(_isNativeReflectConstruct())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,e);var p=new(t.bind.apply(t,o));return r&&_setPrototypeOf(p,r.prototype),p}function _isNativeFunction(fn){try{return Function.toString.call(fn).indexOf("[native code]")!==-1}catch(e){return typeof fn==="function"}}function _objectWithoutProperties(source,excluded){if(source==null)return{};var target=_objectWithoutPropertiesLoose(source,excluded);var key,i;if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++){key=sourceSymbolKeys[i];if(excluded.indexOf(key)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(source,key))continue;target[key]=source[key]}}return target}function _objectWithoutPropertiesLoose(source,excluded){if(source==null)return{};var target={};var sourceKeys=Object.keys(source);var key,i;for(i=0;i<sourceKeys.length;i++){key=sourceKeys[i];if(excluded.indexOf(key)>=0)continue;target[key]=source[key]}return target}function _objectDestructuringEmpty(obj){if(obj==null)throw new TypeError("Cannot destructure "+obj)}function _extends(){_extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key]}}}return target};return _extends.apply(this,arguments)}function _get(){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get.bind()}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(arguments.length<3?target:receiver)}return desc.value}}return _get.apply(this,arguments)}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break}return object}function _regeneratorRuntime(){"use strict";_regeneratorRuntime=function _regeneratorRuntime(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{define({},"")}catch(t){define=function define(t,e,r){return t[e]=r}}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,function(){return this});var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t)})})}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){invoke("next",t,i,a)},function(t){invoke("throw",t,i,a)}):e.resolve(h).then(function(t){u.value=t,i(u)},function(t){return invoke("throw",t,i,a)})}a(c.arg)}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r)})}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw new Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done}}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg)}}}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator["return"]&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next};return i.next=i}}throw new TypeError(_typeof(e)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t},e.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},defineIteratorMethods(g),define(g,u,"Generator"),define(g,a,function(){return this}),define(g,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next}return next.done=!0,next}},e.values=values,Context.prototype={constructor:Context,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc)}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function complete(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function finish(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y}},"catch":function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value}catch(error){reject(error);return}if(info.done){resolve(value)}else{Promise.resolve(value).then(_next,_throw)}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}_next(undefined)})}}function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_unsupportedIterableToArray(arr)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(iter){if(typeof Symbol!=="undefined"&&iter[Symbol.iterator]!=null||iter["@@iterator"]!=null)return Array.from(iter)}function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t["return"]&&(u=t["return"](),Object(u)!==u))return}finally{if(o)throw n}}return a}}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}function _createForOfIteratorHelper(o,allowArrayLike){var it=typeof Symbol!=="undefined"&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]}},e:function e(_e8){throw _e8},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var normalCompletion=true,didErr=false,err;return{s:function s(){it=it.call(o)},n:function n(){var step=it.next();normalCompletion=step.done;return step},e:function e(_e9){didErr=true;err=_e9},f:function f(){try{if(!normalCompletion&&it["return"]!=null)it["return"]()}finally{if(didErr)throw err}}}}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e))}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined")}return _assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return self}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t})()}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function")}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o};return _setPrototypeOf(o,p)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){_defineProperty(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function _defineProperty(obj,key,value){key=_toPropertyKey(key);if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true})}else{obj[key]=value}return obj}function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:String(i)}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}import React,{useState,useMemo,useEffect}from"react";var j=function j(r){for(var _len=arguments.length,o=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){o[_key-1]=arguments[_key]}return{strTag:!0,strings:r,values:o}},c=j,R=function R(r){return typeof r!="string"&&"strTag"in r},E=function E(r,o,s){var B=r[0];for(var Q=1;Q<r.length;Q++)B+=o[s?s[Q-1]:Q-1],B+=r[Q];return B},T=function T(r){return R(r)?E(r.strings,r.values):r},p="lit-localize-status";var w=function(){function w(o){var _this=this;_classCallCheck(this,w);this.__litLocalizeEventHandler=function(s){s.detail.status==="ready"&&_this.host.requestUpdate()},this.host=o}_createClass(w,[{key:"hostConnected",value:function hostConnected(){window.addEventListener(p,this.__litLocalizeEventHandler)}},{key:"hostDisconnected",value:function hostDisconnected(){window.removeEventListener(p,this.__litLocalizeEventHandler)}}]);return w}();var $=function $(r){return r.addController(new w(r))},C=$,q=function q(){return function(r,o){return r.addInitializer(C),r}};var y=function(){function y(){var _this2=this;_classCallCheck(this,y);this.settled=!1,this.promise=new Promise(function(o,s){_this2._resolve=o,_this2._reject=s})}_createClass(y,[{key:"resolve",value:function resolve(o){this.settled=!0,this._resolve(o)}},{key:"reject",value:function reject(o){this.settled=!0,this._reject(o)}}]);return y}();var d=[];for(var r=0;r<256;r++)d[r]=(r>>4&15).toString(16)+(r&15).toString(16);function x(r){var o=0,s=8997,B=0,Q=33826,Y=0,J=40164,it=0,nt=52210;for(var ot=0;ot<r.length;ot++)s^=r.charCodeAt(ot),o=s*435,B=Q*435,Y=J*435,it=nt*435,Y+=s<<8,it+=Q<<8,B+=o>>>16,s=o&65535,Y+=B>>>16,Q=B&65535,nt=it+(Y>>>16)&65535,J=Y&65535;return d[nt>>8]+d[nt&255]+d[J>>8]+d[J&255]+d[Q>>8]+d[Q&255]+d[s>>8]+d[s&255]}var F="\x1E",P="h",z="s";function A$1(r,o){return(o?P:z)+x(typeof r=="string"?r:r.join(F))}var S$1=new WeakMap,L=new Map;function V(r,o,s){if(r){var _ref;var B=(_ref=s==null?void 0:s.id)!==null&&_ref!==void 0?_ref:D$1(o),Q=r[B];if(Q){if(typeof Q=="string")return Q;if("strTag"in Q)return E(Q.strings,o.values,Q.values);{var Y=S$1.get(Q);return Y===void 0&&(Y=Q.values,S$1.set(Q,Y)),_objectSpread(_objectSpread({},Q),{},{values:Y.map(function(J){return o.values[J]})})}}}return T(o)}function D$1(r){var o=typeof r=="string"?r:r.strings;var s=L.get(o);return s===void 0&&(s=A$1(o,typeof r!="string"&&!("strTag"in r)),L.set(o,s)),s}function v$1(r){window.dispatchEvent(new CustomEvent(p,{detail:r}))}var b="",h$1,I$1,g,k,M,i=new y;i.resolve();var f=0;var G$1=function G$1(r){return O$1(function(o,s){return V(M,o,s)}),b=I$1=r.sourceLocale,g=new Set(r.targetLocales),g.add(r.sourceLocale),k=r.loadLocale,{getLocale:H,setLocale:N}},H=function H(){return b},N=function N(r){var _h$;if(r===((_h$=h$1)!==null&&_h$!==void 0?_h$:b))return i.promise;if(!g||!k)throw new Error("Internal error");if(!g.has(r))throw new Error("Invalid locale code");f++;var o=f;return h$1=r,i.settled&&(i=new y),v$1({status:"loading",loadingLocale:r}),(r===I$1?Promise.resolve({templates:void 0}):k(r)).then(function(s){f===o&&(b=r,h$1=void 0,M=s.templates,v$1({status:"ready",readyLocale:r}),i.resolve())},function(s){f===o&&(v$1({status:"error",errorLocale:r,errorMessage:s.toString()}),i.reject(s))}),i.promise};var K$1=T,_=!1;function O$1(r){if(_)throw new Error("lit-localize can only be configured once");K$1=r,_=!0}var gf$1=(typeof globalThis==="undefined"?"undefined":_typeof(globalThis))<"u"?globalThis:(typeof window==="undefined"?"undefined":_typeof(window))<"u"?window:(typeof global==="undefined"?"undefined":_typeof(global))<"u"?global:(typeof self==="undefined"?"undefined":_typeof(self))<"u"?self:{};function wf$1(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r["default"]:r}function Ef$1(r){if(r.__esModule)return r;var o=r["default"];if(typeof o=="function"){var s=function B(){return this instanceof B?Reflect.construct(o,arguments,this.constructor):o.apply(this,arguments)};s.prototype=o.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(r).forEach(function(B){var Q=Object.getOwnPropertyDescriptor(r,B);Object.defineProperty(s,B,Q.get?Q:{enumerable:!0,get:function get(){return r[B]}})}),s}var Zi$1=Object.defineProperty,ts$1=function ts$1(r,o,s){return o in r?Zi$1(r,o,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[o]=s},ee=function ee(r,o,s){return ts$1(r,_typeof(o)!="symbol"?o+"":o,s),s},Ne=function Ne(r,o,s){if(!o.has(r))throw TypeError("Cannot "+s)},t$1=function t$1(r,o,s){return Ne(r,o,"read from private field"),s?s.call(r):o.get(r)},I=function I(r,o,s){if(o.has(r))throw TypeError("Cannot add the same private member more than once");o instanceof WeakSet?o.add(r):o.set(r,s)},Z=function Z(r,o,s,B){return Ne(r,o,"write to private field"),B?B.call(r,s):o.set(r,s),s},ge=function ge(r,o,s,B){return{set _(Q){Z(r,o,Q,s)},get _(){return t$1(r,o,B)}}},W=function W(r,o,s){return Ne(r,o,"access private method"),s};function commonjsRequire(r){throw new Error("Could not dynamically require \""+r+"\". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.")}var pdf={exports:{}};var __viteBrowserExternal={},__viteBrowserExternal$1=Object.freeze(Object.defineProperty({__proto__:null,"default":__viteBrowserExternal},Symbol.toStringTag,{value:"Module"})),require$$5=Ef$1(__viteBrowserExternal$1);(function(module,exports){(function(r,o){module.exports=r.pdfjsLib=o()})(globalThis,function(){return function(){var __webpack_modules__=[,function(r,o){var s;Object.defineProperty(o,"__esModule",{value:!0}),o.VerbosityLevel=o.Util=o.UnknownErrorException=o.UnexpectedResponseException=o.TextRenderingMode=o.RenderingIntentFlag=o.PromiseCapability=o.PermissionFlag=o.PasswordResponses=o.PasswordException=o.PageActionEventType=o.OPS=o.MissingPDFException=o.MAX_IMAGE_SIZE_TO_CACHE=o.LINE_FACTOR=o.LINE_DESCENT_FACTOR=o.InvalidPDFException=o.ImageKind=o.IDENTITY_MATRIX=o.FormatError=o.FeatureTest=o.FONT_IDENTITY_MATRIX=o.DocumentActionEventType=o.CMapCompressionType=o.BaseException=o.BASELINE_FACTOR=o.AnnotationType=o.AnnotationReplyType=o.AnnotationPrefix=o.AnnotationMode=o.AnnotationFlag=o.AnnotationFieldFlag=o.AnnotationEditorType=o.AnnotationEditorPrefix=o.AnnotationEditorParamsType=o.AnnotationBorderStyleType=o.AnnotationActionEventType=o.AbortException=void 0,o.assert=qe,o.bytesToString=Qr,o.createValidAbsoluteUrl=ol,o.getModificationDate=jh,o.getUuid=Qh,o.getVerbosityLevel=pr,o.info=$e,o.isArrayBuffer=Cl,o.isArrayEqual=Oh,o.isNodeJS=void 0,o.normalizeUnicode=Xh,o.objectFromMap=$l,o.objectSize=Cr,o.setVerbosityLevel=xr,o.shadow=Te,o.string32=nl,o.stringToBytes=Es,o.stringToPDFString=Xi,o.stringToUTF8String=Ke,o.unreachable=Ps,o.utf8StringToString=ta,o.warn=_r;var B=(typeof process==="undefined"?"undefined":_typeof(process))=="object"&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&process.type!=="browser");o.isNodeJS=B;var Q=[1,0,0,1,0,0];o.IDENTITY_MATRIX=Q;var Y=[1e-3,0,0,1e-3,0,0];o.FONT_IDENTITY_MATRIX=Y;var J=1e7;o.MAX_IMAGE_SIZE_TO_CACHE=J;var it=1.35;o.LINE_FACTOR=it;var nt=0.35;o.LINE_DESCENT_FACTOR=nt;var ot=nt/it;o.BASELINE_FACTOR=ot;var dt={ANY:1,DISPLAY:2,PRINT:4,SAVE:8,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OPLIST:256};o.RenderingIntentFlag=dt;var Mt={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3};o.AnnotationMode=Mt;var Ot="pdfjs_internal_editor_";o.AnnotationEditorPrefix=Ot;var Qt={DISABLE:-1,NONE:0,FREETEXT:3,STAMP:13,INK:15};o.AnnotationEditorType=Qt;var Ut={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23};o.AnnotationEditorParamsType=Ut;var te={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048};o.PermissionFlag=te;var qt={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4};o.TextRenderingMode=qt;var ie={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3};o.ImageKind=ie;var re={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26};o.AnnotationType=re;var ne={GROUP:"Group",REPLY:"R"};o.AnnotationReplyType=ne;var ae={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512};o.AnnotationFlag=ae;var Bt={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:16777216,RICHTEXT:33554432,RADIOSINUNISON:33554432,COMMITONSELCHANGE:67108864};o.AnnotationFieldFlag=Bt;var Wt={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5};o.AnnotationBorderStyleType=Wt;var oe={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"};o.AnnotationActionEventType=oe;var ve={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"};o.DocumentActionEventType=ve;var _e={O:"PageOpen",C:"PageClose"};o.PageActionEventType=_e;var Xe={ERRORS:0,WARNINGS:1,INFOS:5};o.VerbosityLevel=Xe;var He={NONE:0,BINARY:1};o.CMapCompressionType=He;var ro={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91};o.OPS=ro;var Xo={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};o.PasswordResponses=Xo;var Se=Xe.WARNINGS;function xr(ia){Number.isInteger(ia)&&(Se=ia)}function pr(){return Se}function $e(ia){Se>=Xe.INFOS&&console.log("Info: ".concat(ia))}function _r(ia){Se>=Xe.WARNINGS&&console.log("Warning: ".concat(ia))}function Ps(ia){throw new Error(ia)}function qe(ia,fe){ia||Ps(fe)}function bl(ia){switch(ia==null?void 0:ia.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function ol(ia){var fe=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;var Me=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;if(!ia)return null;try{if(Me&&typeof ia=="string"){if(Me.addDefaultProtocol&&ia.startsWith("www.")){var rn=ia.match(/\./g);(rn==null?void 0:rn.length)>=2&&(ia="http://".concat(ia))}if(Me.tryConvertEncoding)try{ia=Ke(ia)}catch(_unused){}}var kr=fe?new URL(ia,fe):new URL(ia);if(bl(kr))return kr}catch(_unused2){}return null}function Te(ia,fe,Me){var kr=arguments.length>3&&arguments[3]!==undefined?arguments[3]:!1;return Object.defineProperty(ia,fe,{value:Me,enumerable:!kr,configurable:!0,writable:!1}),Me}var pe=function(){function ia(fe,Me){this.constructor===ia&&Ps("Cannot initialize BaseException."),this.message=fe,this.name=Me}return ia.prototype=new Error,ia.constructor=ia,ia}();o.BaseException=pe;var ue=function(_pe){_inherits(ue,_pe);function ue(fe,Me){var _this3;_classCallCheck(this,ue);_this3=_callSuper(this,ue,[fe,"PasswordException"]),_this3.code=Me;return _this3}return _createClass(ue)}(pe);o.PasswordException=ue;var se=function(_pe2){_inherits(se,_pe2);function se(fe,Me){var _this4;_classCallCheck(this,se);_this4=_callSuper(this,se,[fe,"UnknownErrorException"]),_this4.details=Me;return _this4}return _createClass(se)}(pe);o.UnknownErrorException=se;var be=function(_pe3){_inherits(be,_pe3);function be(fe){_classCallCheck(this,be);return _callSuper(this,be,[fe,"InvalidPDFException"])}return _createClass(be)}(pe);o.InvalidPDFException=be;var Ae=function(_pe4){_inherits(Ae,_pe4);function Ae(fe){_classCallCheck(this,Ae);return _callSuper(this,Ae,[fe,"MissingPDFException"])}return _createClass(Ae)}(pe);o.MissingPDFException=Ae;var ze=function(_pe5){_inherits(ze,_pe5);function ze(fe,Me){var _this5;_classCallCheck(this,ze);_this5=_callSuper(this,ze,[fe,"UnexpectedResponseException"]),_this5.status=Me;return _this5}return _createClass(ze)}(pe);o.UnexpectedResponseException=ze;var pi=function(_pe6){_inherits(pi,_pe6);function pi(fe){_classCallCheck(this,pi);return _callSuper(this,pi,[fe,"FormatError"])}return _createClass(pi)}(pe);o.FormatError=pi;var io=function(_pe7){_inherits(io,_pe7);function io(fe){_classCallCheck(this,io);return _callSuper(this,io,[fe,"AbortException"])}return _createClass(io)}(pe);o.AbortException=io;function Qr(ia){(_typeof(ia)!="object"||(ia==null?void 0:ia.length)===void 0)&&Ps("Invalid argument for bytesToString");var fe=ia.length,Me=8192;if(fe<Me)return String.fromCharCode.apply(null,ia);var kr=[];for(var rn=0;rn<fe;rn+=Me){var Oe=Math.min(rn+Me,fe),wi=ia.subarray(rn,Oe);kr.push(String.fromCharCode.apply(null,wi))}return kr.join("")}function Es(ia){typeof ia!="string"&&Ps("Invalid argument for stringToBytes");var fe=ia.length,Me=new Uint8Array(fe);for(var kr=0;kr<fe;++kr)Me[kr]=ia.charCodeAt(kr)&255;return Me}function nl(ia){return String.fromCharCode(ia>>24&255,ia>>16&255,ia>>8&255,ia&255)}function Cr(ia){return Object.keys(ia).length}function $l(ia){var fe=Object.create(null);var _iterator=_createForOfIteratorHelper(ia),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var _step$value=_slicedToArray(_step.value,2),Me=_step$value[0],kr=_step$value[1];fe[Me]=kr}}catch(err){_iterator.e(err)}finally{_iterator.f()}return fe}function _l(){var ia=new Uint8Array(4);return ia[0]=1,new Uint32Array(ia.buffer,0,1)[0]===1}function Ih(){try{return new Function(""),!0}catch(_unused3){return!1}}var Rh=function(){function Rh(){_classCallCheck(this,Rh)}_createClass(Rh,null,[{key:"isLittleEndian",get:function get(){return Te(this,"isLittleEndian",_l())}},{key:"isEvalSupported",get:function get(){return Te(this,"isEvalSupported",Ih())}},{key:"isOffscreenCanvasSupported",get:function get(){return Te(this,"isOffscreenCanvasSupported",(typeof OffscreenCanvas==="undefined"?"undefined":_typeof(OffscreenCanvas))<"u")}},{key:"platform",get:function get(){return(typeof navigator==="undefined"?"undefined":_typeof(navigator))>"u"?Te(this,"platform",{isWin:!1,isMac:!1}):Te(this,"platform",{isWin:navigator.platform.includes("Win"),isMac:navigator.platform.includes("Mac")})}},{key:"isCSSRoundSupported",get:function get(){var fe,Me;return Te(this,"isCSSRoundSupported",(Me=(fe=globalThis.CSS)==null?void 0:fe.supports)==null?void 0:Me.call(fe,"width: round(1.5px, 1px)"))}}]);return Rh}();o.FeatureTest=Rh;var Th=_toConsumableArray(Array(256).keys()).map(function(ia){return ia.toString(16).padStart(2,"0")});var $s=function(){function $s(){_classCallCheck(this,$s)}_createClass($s,null,[{key:"makeHexColor",value:function makeHexColor(fe,Me,kr){return"#".concat(Th[fe]).concat(Th[Me]).concat(Th[kr])}},{key:"scaleMinMax",value:function scaleMinMax(fe,Me){var kr;fe[0]?(fe[0]<0&&(kr=Me[0],Me[0]=Me[1],Me[1]=kr),Me[0]*=fe[0],Me[1]*=fe[0],fe[3]<0&&(kr=Me[2],Me[2]=Me[3],Me[3]=kr),Me[2]*=fe[3],Me[3]*=fe[3]):(kr=Me[0],Me[0]=Me[2],Me[2]=kr,kr=Me[1],Me[1]=Me[3],Me[3]=kr,fe[1]<0&&(kr=Me[2],Me[2]=Me[3],Me[3]=kr),Me[2]*=fe[1],Me[3]*=fe[1],fe[2]<0&&(kr=Me[0],Me[0]=Me[1],Me[1]=kr),Me[0]*=fe[2],Me[1]*=fe[2]),Me[0]+=fe[4],Me[1]+=fe[4],Me[2]+=fe[5],Me[3]+=fe[5]}},{key:"transform",value:function transform(fe,Me){return[fe[0]*Me[0]+fe[2]*Me[1],fe[1]*Me[0]+fe[3]*Me[1],fe[0]*Me[2]+fe[2]*Me[3],fe[1]*Me[2]+fe[3]*Me[3],fe[0]*Me[4]+fe[2]*Me[5]+fe[4],fe[1]*Me[4]+fe[3]*Me[5]+fe[5]]}},{key:"applyTransform",value:function applyTransform(fe,Me){var kr=fe[0]*Me[0]+fe[1]*Me[2]+Me[4],rn=fe[0]*Me[1]+fe[1]*Me[3]+Me[5];return[kr,rn]}},{key:"applyInverseTransform",value:function applyInverseTransform(fe,Me){var kr=Me[0]*Me[3]-Me[1]*Me[2],rn=(fe[0]*Me[3]-fe[1]*Me[2]+Me[2]*Me[5]-Me[4]*Me[3])/kr,Oe=(-fe[0]*Me[1]+fe[1]*Me[0]+Me[4]*Me[1]-Me[5]*Me[0])/kr;return[rn,Oe]}},{key:"getAxialAlignedBoundingBox",value:function getAxialAlignedBoundingBox(fe,Me){var kr=this.applyTransform(fe,Me),rn=this.applyTransform(fe.slice(2,4),Me),Oe=this.applyTransform([fe[0],fe[3]],Me),wi=this.applyTransform([fe[2],fe[1]],Me);return[Math.min(kr[0],rn[0],Oe[0],wi[0]),Math.min(kr[1],rn[1],Oe[1],wi[1]),Math.max(kr[0],rn[0],Oe[0],wi[0]),Math.max(kr[1],rn[1],Oe[1],wi[1])]}},{key:"inverseTransform",value:function inverseTransform(fe){var Me=fe[0]*fe[3]-fe[1]*fe[2];return[fe[3]/Me,-fe[1]/Me,-fe[2]/Me,fe[0]/Me,(fe[2]*fe[5]-fe[4]*fe[3])/Me,(fe[4]*fe[1]-fe[5]*fe[0])/Me]}},{key:"singularValueDecompose2dScale",value:function singularValueDecompose2dScale(fe){var Me=[fe[0],fe[2],fe[1],fe[3]],kr=fe[0]*Me[0]+fe[1]*Me[2],rn=fe[0]*Me[1]+fe[1]*Me[3],Oe=fe[2]*Me[0]+fe[3]*Me[2],wi=fe[2]*Me[1]+fe[3]*Me[3],Jo=(kr+wi)/2,xl=Math.sqrt(Math.pow(kr+wi,2)-4*(kr*wi-Oe*rn))/2,Pd=Jo+xl||1,Dh=Jo-xl||1;return[Math.sqrt(Pd),Math.sqrt(Dh)]}},{key:"normalizeRect",value:function normalizeRect(fe){var Me=fe.slice(0);return fe[0]>fe[2]&&(Me[0]=fe[2],Me[2]=fe[0]),fe[1]>fe[3]&&(Me[1]=fe[3],Me[3]=fe[1]),Me}},{key:"intersect",value:function intersect(fe,Me){var kr=Math.max(Math.min(fe[0],fe[2]),Math.min(Me[0],Me[2])),rn=Math.min(Math.max(fe[0],fe[2]),Math.max(Me[0],Me[2]));if(kr>rn)return null;var Oe=Math.max(Math.min(fe[1],fe[3]),Math.min(Me[1],Me[3])),wi=Math.min(Math.max(fe[1],fe[3]),Math.max(Me[1],Me[3]));return Oe>wi?null:[kr,Oe,rn,wi]}},{key:"bezierBoundingBox",value:function bezierBoundingBox(fe,Me,kr,rn,Oe,wi,Jo,xl){var Pd=[],Dh=[[],[]];var Vh,Ed,Nh,Zh,py,Hh,ke,ye;for(var Ss=0;Ss<2;++Ss){if(Ss===0?(Ed=6*fe-12*kr+6*Oe,Vh=-3*fe+9*kr-9*Oe+3*Jo,Nh=3*kr-3*fe):(Ed=6*Me-12*rn+6*wi,Vh=-3*Me+9*rn-9*wi+3*xl,Nh=3*rn-3*Me),Math.abs(Vh)<1e-12){if(Math.abs(Ed)<1e-12)continue;Zh=-Nh/Ed,0<Zh&&Zh<1&&Pd.push(Zh);continue}ke=Ed*Ed-4*Nh*Vh,ye=Math.sqrt(ke),!(ke<0)&&(py=(-Ed+ye)/(2*Vh),0<py&&py<1&&Pd.push(py),Hh=(-Ed-ye)/(2*Vh),0<Hh&&Hh<1&&Pd.push(Hh))}var Ie=Pd.length,cr;var lr=Ie;for(;Ie--;)Zh=Pd[Ie],cr=1-Zh,Dh[0][Ie]=cr*cr*cr*fe+3*cr*cr*Zh*kr+3*cr*Zh*Zh*Oe+Zh*Zh*Zh*Jo,Dh[1][Ie]=cr*cr*cr*Me+3*cr*cr*Zh*rn+3*cr*Zh*Zh*wi+Zh*Zh*Zh*xl;return Dh[0][lr]=fe,Dh[1][lr]=Me,Dh[0][lr+1]=Jo,Dh[1][lr+1]=xl,Dh[0].length=Dh[1].length=lr+2,[Math.min.apply(Math,_toConsumableArray(Dh[0])),Math.min.apply(Math,_toConsumableArray(Dh[1])),Math.max.apply(Math,_toConsumableArray(Dh[0])),Math.max.apply(Math,_toConsumableArray(Dh[1]))]}}]);return $s}();o.Util=$s;var Dr=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364];function Xi(ia){if(ia[0]>="\xEF"){var Me;if(ia[0]==="\xFE"&&ia[1]==="\xFF"?Me="utf-16be":ia[0]==="\xFF"&&ia[1]==="\xFE"?Me="utf-16le":ia[0]==="\xEF"&&ia[1]==="\xBB"&&ia[2]==="\xBF"&&(Me="utf-8"),Me)try{var kr=new TextDecoder(Me,{fatal:!0}),rn=Es(ia);return kr.decode(rn)}catch(kr){_r("stringToPDFString: \"".concat(kr,"\"."))}}var fe=[];for(var _Me=0,_kr=ia.length;_Me<_kr;_Me++){var _rn=Dr[ia.charCodeAt(_Me)];fe.push(_rn?String.fromCharCode(_rn):ia.charAt(_Me))}return fe.join("")}function Ke(ia){return decodeURIComponent(escape(ia))}function ta(ia){return unescape(encodeURIComponent(ia))}function Cl(ia){return _typeof(ia)=="object"&&(ia==null?void 0:ia.byteLength)!==void 0}function Oh(ia,fe){if(ia.length!==fe.length)return!1;for(var Me=0,kr=ia.length;Me<kr;Me++)if(ia[Me]!==fe[Me])return!1;return!0}function jh(){var ia=arguments.length>0&&arguments[0]!==undefined?arguments[0]:new Date;return[ia.getUTCFullYear().toString(),(ia.getUTCMonth()+1).toString().padStart(2,"0"),ia.getUTCDate().toString().padStart(2,"0"),ia.getUTCHours().toString().padStart(2,"0"),ia.getUTCMinutes().toString().padStart(2,"0"),ia.getUTCSeconds().toString().padStart(2,"0")].join("")}var qh=function(){function qh(){var _this6=this;_classCallCheck(this,qh);I(this,s,!1),this.promise=new Promise(function(fe,Me){_this6.resolve=function(kr){Z(_this6,s,!0),fe(kr)},_this6.reject=function(kr){Z(_this6,s,!0),Me(kr)}})}_createClass(qh,[{key:"settled",get:function get(){return t$1(this,s)}}]);return qh}();s=new WeakMap,o.PromiseCapability=qh;var Bh=null,Jh=null;function Xh(ia){return Bh||(Bh=/([\xA0\xB5\u037E\u0EB3\u2000-\u200A\u202F\u2126\uFB00-\uFB04\uFB06\uFB20-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBA1\uFBA4-\uFBA9\uFBAE-\uFBB1\uFBD3-\uFBDC\uFBDE-\uFBE7\uFBEA-\uFBF8\uFBFC\uFBFD\uFC00-\uFC5D\uFC64-\uFCF1\uFCF5-\uFD3D\uFD88\uFDF4\uFDFA\uFDFB\uFE71\uFE77\uFE79\uFE7B\uFE7D]+)|(\uFB05+)/g,Jh=new Map([["\uFB05","\u017Ft"]])),ia.replaceAll(Bh,function(fe,Me,kr){return Me?Me.normalize("NFKC"):Jh.get(kr)})}function Qh(){if((typeof crypto==="undefined"?"undefined":_typeof(crypto))<"u"&&typeof(crypto==null?void 0:crypto.randomUUID)=="function")return crypto.randomUUID();var ia=new Uint8Array(32);if((typeof crypto==="undefined"?"undefined":_typeof(crypto))<"u"&&typeof(crypto==null?void 0:crypto.getRandomValues)=="function")crypto.getRandomValues(ia);else for(var fe=0;fe<32;fe++)ia[fe]=Math.floor(Math.random()*255);return Qr(ia)}var Kh="pdfjs_internal_id_";o.AnnotationPrefix=Kh},function(__unused_webpack_module,exports,__w_pdfjs_require__){var At,rt,h,M,_he,X,Ee,U,k,g,L,O,x,v,y,u,we,w,C,Be,a,l;Object.defineProperty(exports,"__esModule",{value:!0}),exports.RenderTask=exports.PDFWorkerUtil=exports.PDFWorker=exports.PDFPageProxy=exports.PDFDocumentProxy=exports.PDFDocumentLoadingTask=exports.PDFDataRangeTransport=exports.LoopbackPort=exports.DefaultStandardFontDataFactory=exports.DefaultFilterFactory=exports.DefaultCanvasFactory=exports.DefaultCMapReaderFactory=void 0,Object.defineProperty(exports,"SVGGraphics",{enumerable:!0,get:function get(){return _displaySvg.SVGGraphics}}),exports.build=void 0,exports.getDocument=getDocument,exports.version=void 0;var _util=__w_pdfjs_require__(1),_annotation_storage=__w_pdfjs_require__(3),_display_utils=__w_pdfjs_require__(6),_font_loader=__w_pdfjs_require__(9),_displayNode_utils=__w_pdfjs_require__(10),_canvas=__w_pdfjs_require__(11),_worker_options=__w_pdfjs_require__(14),_message_handler=__w_pdfjs_require__(15),_metadata=__w_pdfjs_require__(16),_optional_content_config=__w_pdfjs_require__(17),_transport_stream=__w_pdfjs_require__(18),_displayFetch_stream=__w_pdfjs_require__(19),_displayNetwork=__w_pdfjs_require__(22),_displayNode_stream=__w_pdfjs_require__(23),_displaySvg=__w_pdfjs_require__(24),_xfa_text=__w_pdfjs_require__(25);var DEFAULT_RANGE_CHUNK_SIZE=65536,RENDERING_CANCELLED_TIMEOUT=100,DELAYED_CLEANUP_TIMEOUT=5e3,DefaultCanvasFactory=_util.isNodeJS?_displayNode_utils.NodeCanvasFactory:_display_utils.DOMCanvasFactory;exports.DefaultCanvasFactory=DefaultCanvasFactory;var DefaultCMapReaderFactory=_util.isNodeJS?_displayNode_utils.NodeCMapReaderFactory:_display_utils.DOMCMapReaderFactory;exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory;var DefaultFilterFactory=_util.isNodeJS?_displayNode_utils.NodeFilterFactory:_display_utils.DOMFilterFactory;exports.DefaultFilterFactory=DefaultFilterFactory;var DefaultStandardFontDataFactory=_util.isNodeJS?_displayNode_utils.NodeStandardFontDataFactory:_display_utils.DOMStandardFontDataFactory;exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory;function getDocument(r){var _r$password,_r$length;if(typeof r=="string"||r instanceof URL?r={url:r}:(0,_util.isArrayBuffer)(r)&&(r={data:r}),_typeof(r)!="object")throw new Error("Invalid parameter in getDocument, need parameter object.");if(!r.url&&!r.data&&!r.range)throw new Error("Invalid parameter object: need either .data, .range or .url");var o=new PDFDocumentLoadingTask,s=o.docId,B=r.url?getUrlProp(r.url):null,Q=r.data?getDataProp(r.data):null,Y=r.httpHeaders||null,J=r.withCredentials===!0,it=(_r$password=r.password)!==null&&_r$password!==void 0?_r$password:null,nt=r.range instanceof PDFDataRangeTransport?r.range:null,ot=Number.isInteger(r.rangeChunkSize)&&r.rangeChunkSize>0?r.rangeChunkSize:DEFAULT_RANGE_CHUNK_SIZE;var dt=r.worker instanceof PDFWorker?r.worker:null;var Mt=r.verbosity,Ot=typeof r.docBaseUrl=="string"&&!(0,_display_utils.isDataScheme)(r.docBaseUrl)?r.docBaseUrl:null,Qt=typeof r.cMapUrl=="string"?r.cMapUrl:null,Ut=r.cMapPacked!==!1,te=r.CMapReaderFactory||DefaultCMapReaderFactory,qt=typeof r.standardFontDataUrl=="string"?r.standardFontDataUrl:null,ie=r.StandardFontDataFactory||DefaultStandardFontDataFactory,re=r.stopAtErrors!==!0,ne=Number.isInteger(r.maxImageSize)&&r.maxImageSize>-1?r.maxImageSize:-1,ae=r.isEvalSupported!==!1,Bt=typeof r.isOffscreenCanvasSupported=="boolean"?r.isOffscreenCanvasSupported:!_util.isNodeJS,Wt=Number.isInteger(r.canvasMaxAreaInBytes)?r.canvasMaxAreaInBytes:-1,oe=typeof r.disableFontFace=="boolean"?r.disableFontFace:_util.isNodeJS,ve=r.fontExtraProperties===!0,_e=r.enableXfa===!0,Xe=r.ownerDocument||globalThis.document,He=r.disableRange===!0,ro=r.disableStream===!0,Xo=r.disableAutoFetch===!0,Se=r.pdfBug===!0,xr=nt?nt.length:(_r$length=r.length)!==null&&_r$length!==void 0?_r$length:NaN,pr=typeof r.useSystemFonts=="boolean"?r.useSystemFonts:!_util.isNodeJS&&!oe,$e=typeof r.useWorkerFetch=="boolean"?r.useWorkerFetch:te===_display_utils.DOMCMapReaderFactory&&ie===_display_utils.DOMStandardFontDataFactory&&Qt&&qt&&(0,_display_utils.isValidFetchUrl)(Qt,document.baseURI)&&(0,_display_utils.isValidFetchUrl)(qt,document.baseURI),_r=r.canvasFactory||new DefaultCanvasFactory({ownerDocument:Xe}),Ps=r.filterFactory||new DefaultFilterFactory({docId:s,ownerDocument:Xe}),qe=null;(0,_util.setVerbosityLevel)(Mt);var bl={canvasFactory:_r,filterFactory:Ps};if($e||(bl.cMapReaderFactory=new te({baseUrl:Qt,isCompressed:Ut}),bl.standardFontDataFactory=new ie({baseUrl:qt})),!dt){var pe={verbosity:Mt,port:_worker_options.GlobalWorkerOptions.workerPort};dt=pe.port?PDFWorker.fromPort(pe):new PDFWorker(pe),o._worker=dt}var ol={docId:s,apiVersion:"3.11.174",data:Q,password:it,disableAutoFetch:Xo,rangeChunkSize:ot,length:xr,docBaseUrl:Ot,enableXfa:_e,evaluatorOptions:{maxImageSize:ne,disableFontFace:oe,ignoreErrors:re,isEvalSupported:ae,isOffscreenCanvasSupported:Bt,canvasMaxAreaInBytes:Wt,fontExtraProperties:ve,useSystemFonts:pr,cMapUrl:$e?Qt:null,standardFontDataUrl:$e?qt:null}},Te={ignoreErrors:re,isEvalSupported:ae,disableFontFace:oe,fontExtraProperties:ve,enableXfa:_e,ownerDocument:Xe,disableAutoFetch:Xo,pdfBug:Se,styleElement:qe};return dt.promise.then(function(){if(o.destroyed)throw new Error("Loading aborted");var pe=_fetchDocument(dt,ol),ue=new Promise(function(se){var be;nt?be=new _transport_stream.PDFDataTransportStream({length:xr,initialData:nt.initialData,progressiveDone:nt.progressiveDone,contentDispositionFilename:nt.contentDispositionFilename,disableRange:He,disableStream:ro},nt):Q||(be=function(Ae){return _util.isNodeJS?new _displayNode_stream.PDFNodeStream(Ae):(0,_display_utils.isValidFetchUrl)(Ae.url)?new _displayFetch_stream.PDFFetchStream(Ae):new _displayNetwork.PDFNetworkStream(Ae)}({url:B,length:xr,httpHeaders:Y,withCredentials:J,rangeChunkSize:ot,disableRange:He,disableStream:ro})),se(be)});return Promise.all([pe,ue]).then(function(_ref2){var _ref3=_slicedToArray(_ref2,2),se=_ref3[0],be=_ref3[1];if(o.destroyed)throw new Error("Loading aborted");var Ae=new _message_handler.MessageHandler(s,se,dt.port),ze=new WorkerTransport(Ae,o,be,Te,bl);o._transport=ze,Ae.send("Ready",null)})})["catch"](o._capability.reject),o}function _fetchDocument(_x2,_x3){return _fetchDocument2.apply(this,arguments)}function _fetchDocument2(){_fetchDocument2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee6(r,o){var s;return _regeneratorRuntime().wrap(function _callee6$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:if(!r.destroyed){_context6.next=2;break}throw new Error("Worker was destroyed");case 2:_context6.next=4;return r.messageHandler.sendWithPromise("GetDocRequest",o,o.data?[o.data.buffer]:null);case 4:s=_context6.sent;if(!r.destroyed){_context6.next=7;break}throw new Error("Worker was destroyed");case 7:return _context6.abrupt("return",s);case 8:case"end":return _context6.stop()}},_callee6)}));return _fetchDocument2.apply(this,arguments)}function getUrlProp(r){if(r instanceof URL)return r.href;try{return new URL(r,window.location).href}catch(_unused4){if(_util.isNodeJS&&typeof r=="string")return r}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function getDataProp(r){if(_util.isNodeJS&&(typeof Buffer==="undefined"?"undefined":_typeof(Buffer))<"u"&&r instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(r instanceof Uint8Array&&r.byteLength===r.buffer.byteLength)return r;if(typeof r=="string")return(0,_util.stringToBytes)(r);if(_typeof(r)=="object"&&!isNaN(r==null?void 0:r.length)||(0,_util.isArrayBuffer)(r))return new Uint8Array(r);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}var d=function(){function Em(){_classCallCheck(this,Em);this._capability=new _util.PromiseCapability,this._transport=null,this._worker=null,this.docId="d".concat(ge(Em,At)._++),this.destroyed=!1,this.onPassword=null,this.onProgress=null}_createClass(Em,[{key:"promise",get:function get(){return this._capability.promise}},{key:"destroy",value:function(){var _destroy=_asyncToGenerator(_regeneratorRuntime().mark(function _callee(){var o,s,B;return _regeneratorRuntime().wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:this.destroyed=!0;_context.prev=1;(o=this._worker)!=null&&o.port&&(this._worker._pendingDestroy=!0);_context.next=5;return(s=this._transport)==null?void 0:s.destroy();case 5:_context.next=10;break;case 7:_context.prev=7;_context.t0=_context["catch"](1);throw(B=this._worker)!=null&&B.port&&delete this._worker._pendingDestroy,_context.t0;case 10:this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null);case 11:case"end":return _context.stop()}},_callee,this,[[1,7]])}));function destroy(){return _destroy.apply(this,arguments)}return destroy}()}]);return Em}();At=new WeakMap,I(d,At,0);var PDFDocumentLoadingTask=d;exports.PDFDocumentLoadingTask=PDFDocumentLoadingTask;var PDFDataRangeTransport=function(){function PDFDataRangeTransport(o,s){var B=arguments.length>2&&arguments[2]!==undefined?arguments[2]:!1;var Q=arguments.length>3&&arguments[3]!==undefined?arguments[3]:null;_classCallCheck(this,PDFDataRangeTransport);this.length=o,this.initialData=s,this.progressiveDone=B,this.contentDispositionFilename=Q,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=new _util.PromiseCapability}_createClass(PDFDataRangeTransport,[{key:"addRangeListener",value:function addRangeListener(o){this._rangeListeners.push(o)}},{key:"addProgressListener",value:function addProgressListener(o){this._progressListeners.push(o)}},{key:"addProgressiveReadListener",value:function addProgressiveReadListener(o){this._progressiveReadListeners.push(o)}},{key:"addProgressiveDoneListener",value:function addProgressiveDoneListener(o){this._progressiveDoneListeners.push(o)}},{key:"onDataRange",value:function onDataRange(o,s){var _iterator2=_createForOfIteratorHelper(this._rangeListeners),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var B=_step2.value;B(o,s)}}catch(err){_iterator2.e(err)}finally{_iterator2.f()}}},{key:"onDataProgress",value:function onDataProgress(o,s){var _this7=this;this._readyCapability.promise.then(function(){var _iterator3=_createForOfIteratorHelper(_this7._progressListeners),_step3;try{for(_iterator3.s();!(_step3=_iterator3.n()).done;){var B=_step3.value;B(o,s)}}catch(err){_iterator3.e(err)}finally{_iterator3.f()}})}},{key:"onDataProgressiveRead",value:function onDataProgressiveRead(o){var _this8=this;this._readyCapability.promise.then(function(){var _iterator4=_createForOfIteratorHelper(_this8._progressiveReadListeners),_step4;try{for(_iterator4.s();!(_step4=_iterator4.n()).done;){var s=_step4.value;s(o)}}catch(err){_iterator4.e(err)}finally{_iterator4.f()}})}},{key:"onDataProgressiveDone",value:function onDataProgressiveDone(){var _this9=this;this._readyCapability.promise.then(function(){var _iterator5=_createForOfIteratorHelper(_this9._progressiveDoneListeners),_step5;try{for(_iterator5.s();!(_step5=_iterator5.n()).done;){var o=_step5.value;o()}}catch(err){_iterator5.e(err)}finally{_iterator5.f()}})}},{key:"transportReady",value:function transportReady(){this._readyCapability.resolve()}},{key:"requestDataRange",value:function requestDataRange(o,s){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}},{key:"abort",value:function abort(){}}]);return PDFDataRangeTransport}();exports.PDFDataRangeTransport=PDFDataRangeTransport;var PDFDocumentProxy=function(){function PDFDocumentProxy(o,s){var _this10=this;_classCallCheck(this,PDFDocumentProxy);this._pdfInfo=o,this._transport=s,Object.defineProperty(this,"getJavaScript",{value:function value(){return(0,_display_utils.deprecated)("`PDFDocumentProxy.getJavaScript`, please use `PDFDocumentProxy.getJSActions` instead."),_this10.getJSActions().then(function(B){if(!B)return B;var Q=[];for(var Y in B)Q.push.apply(Q,_toConsumableArray(B[Y]));return Q})}})}_createClass(PDFDocumentProxy,[{key:"annotationStorage",get:function get(){return this._transport.annotationStorage}},{key:"filterFactory",get:function get(){return this._transport.filterFactory}},{key:"numPages",get:function get(){return this._pdfInfo.numPages}},{key:"fingerprints",get:function get(){return this._pdfInfo.fingerprints}},{key:"isPureXfa",get:function get(){return(0,_util.shadow)(this,"isPureXfa",!!this._transport._htmlForXfa)}},{key:"allXfaHtml",get:function get(){return this._transport._htmlForXfa}},{key:"getPage",value:function getPage(o){return this._transport.getPage(o)}},{key:"getPageIndex",value:function getPageIndex(o){return this._transport.getPageIndex(o)}},{key:"getDestinations",value:function getDestinations(){return this._transport.getDestinations()}},{key:"getDestination",value:function getDestination(o){return this._transport.getDestination(o)}},{key:"getPageLabels",value:function getPageLabels(){return this._transport.getPageLabels()}},{key:"getPageLayout",value:function getPageLayout(){return this._transport.getPageLayout()}},{key:"getPageMode",value:function getPageMode(){return this._transport.getPageMode()}},{key:"getViewerPreferences",value:function getViewerPreferences(){return this._transport.getViewerPreferences()}},{key:"getOpenAction",value:function getOpenAction(){return this._transport.getOpenAction()}},{key:"getAttachments",value:function getAttachments(){return this._transport.getAttachments()}},{key:"getJSActions",value:function getJSActions(){return this._transport.getDocJSActions()}},{key:"getOutline",value:function getOutline(){return this._transport.getOutline()}},{key:"getOptionalContentConfig",value:function getOptionalContentConfig(){return this._transport.getOptionalContentConfig()}},{key:"getPermissions",value:function getPermissions(){return this._transport.getPermissions()}},{key:"getMetadata",value:function getMetadata(){return this._transport.getMetadata()}},{key:"getMarkInfo",value:function getMarkInfo(){return this._transport.getMarkInfo()}},{key:"getData",value:function getData(){return this._transport.getData()}},{key:"saveDocument",value:function saveDocument(){return this._transport.saveDocument()}},{key:"getDownloadInfo",value:function getDownloadInfo(){return this._transport.downloadInfoCapability.promise}},{key:"cleanup",value:function cleanup(){var o=arguments.length>0&&arguments[0]!==undefined?arguments[0]:!1;return this._transport.startCleanup(o||this.isPureXfa)}},{key:"destroy",value:function destroy(){return this.loadingTask.destroy()}},{key:"loadingParams",get:function get(){return this._transport.loadingParams}},{key:"loadingTask",get:function get(){return this._transport.loadingTask}},{key:"getFieldObjects",value:function getFieldObjects(){return this._transport.getFieldObjects()}},{key:"hasJSActions",value:function hasJSActions(){return this._transport.hasJSActions()}},{key:"getCalculationOrderIds",value:function getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}]);return PDFDocumentProxy}();exports.PDFDocumentProxy=PDFDocumentProxy;var PDFPageProxy=function(){function PDFPageProxy(o,s,B){var Q=arguments.length>3&&arguments[3]!==undefined?arguments[3]:!1;_classCallCheck(this,PDFPageProxy);I(this,M),I(this,X),I(this,rt,null),I(this,h,!1),this._pageIndex=o,this._pageInfo=s,this._transport=B,this._stats=Q?new _display_utils.StatTimer:null,this._pdfBug=Q,this.commonObjs=B.commonObjs,this.objs=new PDFObjects,this._maybeCleanupAfterRender=!1,this._intentStates=new Map,this.destroyed=!1}_createClass(PDFPageProxy,[{key:"pageNumber",get:function get(){return this._pageIndex+1}},{key:"rotate",get:function get(){return this._pageInfo.rotate}},{key:"ref",get:function get(){return this._pageInfo.ref}},{key:"userUnit",get:function get(){return this._pageInfo.userUnit}},{key:"view",get:function get(){return this._pageInfo.view}},{key:"getViewport",value:function getViewport(){var _ref4=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},o=_ref4.scale,_ref4$rotation=_ref4.rotation,s=_ref4$rotation===void 0?this.rotate:_ref4$rotation,_ref4$offsetX=_ref4.offsetX,B=_ref4$offsetX===void 0?0:_ref4$offsetX,_ref4$offsetY=_ref4.offsetY,Q=_ref4$offsetY===void 0?0:_ref4$offsetY,_ref4$dontFlip=_ref4.dontFlip,Y=_ref4$dontFlip===void 0?!1:_ref4$dontFlip;return new _display_utils.PageViewport({viewBox:this.view,scale:o,rotation:s,offsetX:B,offsetY:Q,dontFlip:Y})}},{key:"getAnnotations",value:function getAnnotations(){var _ref5=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},_ref5$intent=_ref5.intent,o=_ref5$intent===void 0?"display":_ref5$intent;var s=this._transport.getRenderingIntent(o);return this._transport.getAnnotations(this._pageIndex,s.renderingIntent)}},{key:"getJSActions",value:function getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}},{key:"filterFactory",get:function get(){return this._transport.filterFactory}},{key:"isPureXfa",get:function get(){return(0,_util.shadow)(this,"isPureXfa",!!this._transport._htmlForXfa)}},{key:"getXfa",value:function(){var _getXfa=_asyncToGenerator(_regeneratorRuntime().mark(function _callee2(){var o;return _regeneratorRuntime().wrap(function _callee2$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:return _context2.abrupt("return",((o=this._transport._htmlForXfa)==null?void 0:o.children[this._pageIndex])||null);case 1:case"end":return _context2.stop()}},_callee2,this)}));function getXfa(){return _getXfa.apply(this,arguments)}return getXfa}()},{key:"render",value:function render(_ref6){var _this11=this;var o=_ref6.canvasContext,s=_ref6.viewport,_ref6$intent=_ref6.intent,B=_ref6$intent===void 0?"display":_ref6$intent,_ref6$annotationMode=_ref6.annotationMode,Q=_ref6$annotationMode===void 0?_util.AnnotationMode.ENABLE:_ref6$annotationMode,_ref6$transform=_ref6.transform,Y=_ref6$transform===void 0?null:_ref6$transform,_ref6$background=_ref6.background,J=_ref6$background===void 0?null:_ref6$background,_ref6$optionalContent=_ref6.optionalContentConfigPromise,it=_ref6$optionalContent===void 0?null:_ref6$optionalContent,_ref6$annotationCanva=_ref6.annotationCanvasMap,nt=_ref6$annotationCanva===void 0?null:_ref6$annotationCanva,_ref6$pageColors=_ref6.pageColors,ot=_ref6$pageColors===void 0?null:_ref6$pageColors,_ref6$printAnnotation=_ref6.printAnnotationStorage,dt=_ref6$printAnnotation===void 0?null:_ref6$printAnnotation;var Mt,Ot;(Mt=this._stats)==null||Mt.time("Overall");var Qt=this._transport.getRenderingIntent(B,Q,dt);Z(this,h,!1),W(this,X,Ee).call(this),it||(it=this._transport.getOptionalContentConfig());var Ut=this._intentStates.get(Qt.cacheKey);Ut||(Ut=Object.create(null),this._intentStates.set(Qt.cacheKey,Ut)),Ut.streamReaderCancelTimeout&&(clearTimeout(Ut.streamReaderCancelTimeout),Ut.streamReaderCancelTimeout=null);var te=!!(Qt.renderingIntent&_util.RenderingIntentFlag.PRINT);Ut.displayReadyCapability||(Ut.displayReadyCapability=new _util.PromiseCapability,Ut.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(Ot=this._stats)==null||Ot.time("Page Request"),this._pumpOperatorList(Qt));var qt=function qt(ne){var ae,Bt;Ut.renderTasks["delete"](ie),(_this11._maybeCleanupAfterRender||te)&&Z(_this11,h,!0),W(_this11,M,_he).call(_this11,!te),ne?(ie.capability.reject(ne),_this11._abortOperatorList({intentState:Ut,reason:ne instanceof Error?ne:new Error(ne)})):ie.capability.resolve(),(ae=_this11._stats)==null||ae.timeEnd("Rendering"),(Bt=_this11._stats)==null||Bt.timeEnd("Overall")},ie=new InternalRenderTask({callback:qt,params:{canvasContext:o,viewport:s,transform:Y,background:J},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:nt,operatorList:Ut.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!te,pdfBug:this._pdfBug,pageColors:ot});(Ut.renderTasks||(Ut.renderTasks=new Set)).add(ie);var re=ie.task;return Promise.all([Ut.displayReadyCapability.promise,it]).then(function(_ref7){var _ref8=_slicedToArray(_ref7,2),ne=_ref8[0],ae=_ref8[1];var Bt;if(_this11.destroyed){qt();return}(Bt=_this11._stats)==null||Bt.time("Rendering"),ie.initializeGraphics({transparency:ne,optionalContentConfig:ae}),ie.operatorListChanged()})["catch"](qt),re}},{key:"getOperatorList",value:function getOperatorList(){var _ref9=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},_ref9$intent=_ref9.intent,o=_ref9$intent===void 0?"display":_ref9$intent,_ref9$annotationMode=_ref9.annotationMode,s=_ref9$annotationMode===void 0?_util.AnnotationMode.ENABLE:_ref9$annotationMode,_ref9$printAnnotation=_ref9.printAnnotationStorage,B=_ref9$printAnnotation===void 0?null:_ref9$printAnnotation;var Q;function Y(){it.operatorList.lastChunk&&(it.opListReadCapability.resolve(it.operatorList),it.renderTasks["delete"](nt))}var J=this._transport.getRenderingIntent(o,s,B,!0);var it=this._intentStates.get(J.cacheKey);it||(it=Object.create(null),this._intentStates.set(J.cacheKey,it));var nt;return it.opListReadCapability||(nt=Object.create(null),nt.operatorListChanged=Y,it.opListReadCapability=new _util.PromiseCapability,(it.renderTasks||(it.renderTasks=new Set)).add(nt),it.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(Q=this._stats)==null||Q.time("Page Request"),this._pumpOperatorList(J)),it.opListReadCapability.promise}},{key:"streamTextContent",value:function streamTextContent(){var _ref10=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},_ref10$includeMarkedC=_ref10.includeMarkedContent,o=_ref10$includeMarkedC===void 0?!1:_ref10$includeMarkedC,_ref10$disableNormali=_ref10.disableNormalization,s=_ref10$disableNormali===void 0?!1:_ref10$disableNormali;return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:o===!0,disableNormalization:s===!0},{highWaterMark:100,size:function size(B){return B.items.length}})}},{key:"getTextContent",value:function getTextContent(){var o=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};if(this._transport._htmlForXfa)return this.getXfa().then(function(B){return _xfa_text.XfaText.textContent(B)});var s=this.streamTextContent(o);return new Promise(function(B,Q){function Y(){J.read().then(function(_ref11){var _it$items;var nt=_ref11.value,ot=_ref11.done;if(ot){B(it);return}Object.assign(it.styles,nt.styles),(_it$items=it.items).push.apply(_it$items,_toConsumableArray(nt.items)),Y()},Q)}var J=s.getReader(),it={items:[],styles:Object.create(null)};Y()})}},{key:"getStructTree",value:function getStructTree(){return this._transport.getStructTree(this._pageIndex)}},{key:"_destroy",value:function _destroy(){this.destroyed=!0;var o=[];var _iterator6=_createForOfIteratorHelper(this._intentStates.values()),_step6;try{for(_iterator6.s();!(_step6=_iterator6.n()).done;){var s=_step6.value;if(this._abortOperatorList({intentState:s,reason:new Error("Page was destroyed."),force:!0}),!s.opListReadCapability){var _iterator7=_createForOfIteratorHelper(s.renderTasks),_step7;try{for(_iterator7.s();!(_step7=_iterator7.n()).done;){var B=_step7.value;o.push(B.completed),B.cancel()}}catch(err){_iterator7.e(err)}finally{_iterator7.f()}}}}catch(err){_iterator6.e(err)}finally{_iterator6.f()}return this.objs.clear(),Z(this,h,!1),W(this,X,Ee).call(this),Promise.all(o)}},{key:"cleanup",value:function cleanup(){var o=arguments.length>0&&arguments[0]!==undefined?arguments[0]:!1;Z(this,h,!0);var s=W(this,M,_he).call(this,!1);return o&&s&&this._stats&&(this._stats=new _display_utils.StatTimer),s}},{key:"_startRenderPage",value:function _startRenderPage(o,s){var B,Q;var Y=this._intentStates.get(s);Y&&((B=this._stats)==null||B.timeEnd("Page Request"),(Q=Y.displayReadyCapability)==null||Q.resolve(o))}},{key:"_renderPageChunk",value:function _renderPageChunk(o,s){for(var B=0,Q=o.length;B<Q;B++)s.operatorList.fnArray.push(o.fnArray[B]),s.operatorList.argsArray.push(o.argsArray[B]);s.operatorList.lastChunk=o.lastChunk,s.operatorList.separateAnnots=o.separateAnnots;var _iterator8=_createForOfIteratorHelper(s.renderTasks),_step8;try{for(_iterator8.s();!(_step8=_iterator8.n()).done;){var _B=_step8.value;_B.operatorListChanged()}}catch(err){_iterator8.e(err)}finally{_iterator8.f()}o.lastChunk&&W(this,M,_he).call(this,!0)}},{key:"_pumpOperatorList",value:function _pumpOperatorList(_ref12){var _this12=this;var o=_ref12.renderingIntent,s=_ref12.cacheKey,B=_ref12.annotationStorageSerializable;var Q=B.map,Y=B.transfers,J=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:o,cacheKey:s,annotationStorage:Q},Y).getReader(),it=this._intentStates.get(s);it.streamReader=J;var nt=function nt(){J.read().then(function(_ref13){var ot=_ref13.value,dt=_ref13.done;if(dt){it.streamReader=null;return}_this12._transport.destroyed||(_this12._renderPageChunk(ot,it),nt())},function(ot){if(it.streamReader=null,!_this12._transport.destroyed){if(it.operatorList){it.operatorList.lastChunk=!0;var _iterator9=_createForOfIteratorHelper(it.renderTasks),_step9;try{for(_iterator9.s();!(_step9=_iterator9.n()).done;){var dt=_step9.value;dt.operatorListChanged()}}catch(err){_iterator9.e(err)}finally{_iterator9.f()}W(_this12,M,_he).call(_this12,!0)}if(it.displayReadyCapability)it.displayReadyCapability.reject(ot);else if(it.opListReadCapability)it.opListReadCapability.reject(ot);else throw ot}})};nt()}},{key:"_abortOperatorList",value:function _abortOperatorList(_ref14){var _this13=this;var o=_ref14.intentState,s=_ref14.reason,_ref14$force=_ref14.force,B=_ref14$force===void 0?!1:_ref14$force;if(o.streamReader){if(o.streamReaderCancelTimeout&&(clearTimeout(o.streamReaderCancelTimeout),o.streamReaderCancelTimeout=null),!B){if(o.renderTasks.size>0)return;if(s instanceof _display_utils.RenderingCancelledException){var Q=RENDERING_CANCELLED_TIMEOUT;s.extraDelay>0&&s.extraDelay<1e3&&(Q+=s.extraDelay),o.streamReaderCancelTimeout=setTimeout(function(){o.streamReaderCancelTimeout=null,_this13._abortOperatorList({intentState:o,reason:s,force:!0})},Q);return}}if(o.streamReader.cancel(new _util.AbortException(s.message))["catch"](function(){}),o.streamReader=null,!this._transport.destroyed){var _iterator10=_createForOfIteratorHelper(this._intentStates),_step10;try{for(_iterator10.s();!(_step10=_iterator10.n()).done;){var _step10$value=_slicedToArray(_step10.value,2),_Q=_step10$value[0],Y=_step10$value[1];if(Y===o){this._intentStates["delete"](_Q);break}}}catch(err){_iterator10.e(err)}finally{_iterator10.f()}this.cleanup()}}}},{key:"stats",get:function get(){return this._stats}}]);return PDFPageProxy}();rt=new WeakMap,h=new WeakMap,M=new WeakSet,_he=function he(){var _this14=this;var r=arguments.length>0&&arguments[0]!==undefined?arguments[0]:!1;if(W(this,X,Ee).call(this),!t$1(this,h)||this.destroyed)return!1;if(r)return Z(this,rt,setTimeout(function(){Z(_this14,rt,null),W(_this14,M,_he).call(_this14,!1)},DELAYED_CLEANUP_TIMEOUT)),!1;var _iterator11=_createForOfIteratorHelper(this._intentStates.values()),_step11;try{for(_iterator11.s();!(_step11=_iterator11.n()).done;){var _step11$value=_step11.value,o=_step11$value.renderTasks,s=_step11$value.operatorList;if(o.size>0||!s.lastChunk)return!1}}catch(err){_iterator11.e(err)}finally{_iterator11.f()}return this._intentStates.clear(),this.objs.clear(),Z(this,h,!1),!0},X=new WeakSet,Ee=function Ee(){t$1(this,rt)&&(clearTimeout(t$1(this,rt)),Z(this,rt,null))},exports.PDFPageProxy=PDFPageProxy;var LoopbackPort=function(){function LoopbackPort(){_classCallCheck(this,LoopbackPort);I(this,U,new Set),I(this,k,Promise.resolve())}_createClass(LoopbackPort,[{key:"postMessage",value:function postMessage(o,s){var _this15=this;var B={data:structuredClone(o,s?{transfer:s}:null)};t$1(this,k).then(function(){var _iterator12=_createForOfIteratorHelper(t$1(_this15,U)),_step12;try{for(_iterator12.s();!(_step12=_iterator12.n()).done;){var Q=_step12.value;Q.call(_this15,B)}}catch(err){_iterator12.e(err)}finally{_iterator12.f()}})}},{key:"addEventListener",value:function addEventListener(o,s){t$1(this,U).add(s)}},{key:"removeEventListener",value:function removeEventListener(o,s){t$1(this,U)["delete"](s)}},{key:"terminate",value:function terminate(){t$1(this,U).clear()}}]);return LoopbackPort}();U=new WeakMap,k=new WeakMap,exports.LoopbackPort=LoopbackPort;var PDFWorkerUtil={isWorkerDisabled:!1,fallbackWorkerSrc:null,fakeWorkerId:0};exports.PDFWorkerUtil=PDFWorkerUtil;{if(_util.isNodeJS&&typeof commonjsRequire=="function")PDFWorkerUtil.isWorkerDisabled=!0,PDFWorkerUtil.fallbackWorkerSrc="./pdf.worker.js";else if((typeof document==="undefined"?"undefined":_typeof(document))=="object"){var _r2=(g=document==null?void 0:document.currentScript)==null?void 0:g.src;_r2&&(PDFWorkerUtil.fallbackWorkerSrc=_r2.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}PDFWorkerUtil.isSameOrigin=function(r,o){var s;try{if(s=new URL(r),!s.origin||s.origin==="null")return!1}catch(_unused5){return!1}var B=new URL(o,s);return s.origin===B.origin},PDFWorkerUtil.createCDNWrapper=function(r){var o="importScripts(\"".concat(r,"\");");return URL.createObjectURL(new Blob([o]))}}var _PDFWorker=function(){function __PDFWorker(){var _ref15=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},_ref15$name=_ref15.name,r=_ref15$name===void 0?null:_ref15$name,_ref15$port=_ref15.port,o=_ref15$port===void 0?null:_ref15$port,_ref15$verbosity=_ref15.verbosity,s=_ref15$verbosity===void 0?(0,_util.getVerbosityLevel)():_ref15$verbosity;_classCallCheck(this,__PDFWorker);var B;if(this.name=r,this.destroyed=!1,this.verbosity=s,this._readyCapability=new _util.PromiseCapability,this._port=null,this._webWorker=null,this._messageHandler=null,o){if((B=t$1(__PDFWorker,L))!=null&&B.has(o))throw new Error("Cannot use more than one PDFWorker per port.");(t$1(__PDFWorker,L)||Z(__PDFWorker,L,new WeakMap)).set(o,this),this._initializeFromPort(o);return}this._initialize()}_createClass(__PDFWorker,[{key:"promise",get:function get(){return this._readyCapability.promise}},{key:"port",get:function get(){return this._port}},{key:"messageHandler",get:function get(){return this._messageHandler}},{key:"_initializeFromPort",value:function _initializeFromPort(r){this._port=r,this._messageHandler=new _message_handler.MessageHandler("main","worker",r),this._messageHandler.on("ready",function(){}),this._readyCapability.resolve(),this._messageHandler.send("configure",{verbosity:this.verbosity})}},{key:"_initialize",value:function _initialize(){var _this16=this;if(!PDFWorkerUtil.isWorkerDisabled&&!__PDFWorker._mainThreadWorkerMessageHandler){var _r3=__PDFWorker.workerSrc;try{PDFWorkerUtil.isSameOrigin(window.location.href,_r3)||(_r3=PDFWorkerUtil.createCDNWrapper(new URL(_r3,window.location).href));var o=new Worker(_r3),s=new _message_handler.MessageHandler("main","worker",o),B=function B(){o.removeEventListener("error",Q),s.destroy(),o.terminate(),_this16.destroyed?_this16._readyCapability.reject(new Error("Worker was destroyed")):_this16._setupFakeWorker()},Q=function Q(){_this16._webWorker||B()};o.addEventListener("error",Q),s.on("test",function(J){if(o.removeEventListener("error",Q),_this16.destroyed){B();return}J?(_this16._messageHandler=s,_this16._port=o,_this16._webWorker=o,_this16._readyCapability.resolve(),s.send("configure",{verbosity:_this16.verbosity})):(_this16._setupFakeWorker(),s.destroy(),o.terminate())}),s.on("ready",function(J){if(o.removeEventListener("error",Q),_this16.destroyed){B();return}try{Y()}catch(_unused6){_this16._setupFakeWorker()}});var Y=function Y(){var J=new Uint8Array;s.send("test",J,[J.buffer])};Y();return}catch(_unused7){(0,_util.info)("The worker has been disabled.")}}this._setupFakeWorker()}},{key:"_setupFakeWorker",value:function _setupFakeWorker(){var _this17=this;PDFWorkerUtil.isWorkerDisabled||((0,_util.warn)("Setting up fake worker."),PDFWorkerUtil.isWorkerDisabled=!0),__PDFWorker._setupFakeWorkerGlobal.then(function(r){if(_this17.destroyed){_this17._readyCapability.reject(new Error("Worker was destroyed"));return}var o=new LoopbackPort;_this17._port=o;var s="fake".concat(PDFWorkerUtil.fakeWorkerId++),B=new _message_handler.MessageHandler(s+"_worker",s,o);r.setup(B,o);var Q=new _message_handler.MessageHandler(s,s+"_worker",o);_this17._messageHandler=Q,_this17._readyCapability.resolve(),Q.send("configure",{verbosity:_this17.verbosity})})["catch"](function(r){_this17._readyCapability.reject(new Error("Setting up fake worker failed: \"".concat(r.message,"\".")))})}},{key:"destroy",value:function destroy(){var r;this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),(r=t$1(__PDFWorker,L))==null||r["delete"](this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}}],[{key:"fromPort",value:function fromPort(r){var o;if(!(r!=null&&r.port))throw new Error("PDFWorker.fromPort - invalid method signature.");var s=(o=t$1(this,L))==null?void 0:o.get(r.port);if(s){if(s._pendingDestroy)throw new Error("PDFWorker.fromPort - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return s}return new __PDFWorker(r)}},{key:"workerSrc",get:function get(){if(_worker_options.GlobalWorkerOptions.workerSrc)return _worker_options.GlobalWorkerOptions.workerSrc;if(PDFWorkerUtil.fallbackWorkerSrc!==null)return _util.isNodeJS||(0,_display_utils.deprecated)("No \"GlobalWorkerOptions.workerSrc\" specified."),PDFWorkerUtil.fallbackWorkerSrc;throw new Error("No \"GlobalWorkerOptions.workerSrc\" specified.")}},{key:"_mainThreadWorkerMessageHandler",get:function get(){var r;try{return((r=globalThis.pdfjsWorker)==null?void 0:r.WorkerMessageHandler)||null}catch(_unused8){return null}}},{key:"_setupFakeWorkerGlobal",get:function get(){var _this18=this;var loader=function(){var _ref16=_asyncToGenerator(_regeneratorRuntime().mark(function _callee3(){var mainWorkerMessageHandler,worker;return _regeneratorRuntime().wrap(function _callee3$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:mainWorkerMessageHandler=_this18._mainThreadWorkerMessageHandler;if(!mainWorkerMessageHandler){_context3.next=3;break}return _context3.abrupt("return",mainWorkerMessageHandler);case 3:if(!(_util.isNodeJS&&typeof commonjsRequire=="function")){_context3.next=6;break}worker=eval("require")(_this18.workerSrc);return _context3.abrupt("return",worker.WorkerMessageHandler);case 6:_context3.next=8;return(0,_display_utils.loadScript)(_this18.workerSrc);case 8:return _context3.abrupt("return",window.pdfjsWorker.WorkerMessageHandler);case 9:case"end":return _context3.stop()}},_callee3)}));return function loader(){return _ref16.apply(this,arguments)}}();return(0,_util.shadow)(this,"_setupFakeWorkerGlobal",loader())}}]);return __PDFWorker}();L=new WeakMap,I(_PDFWorker,L,void 0);var PDFWorker=_PDFWorker;exports.PDFWorker=PDFWorker;var WorkerTransport=function(){function WorkerTransport(o,s,B,Q,Y){_classCallCheck(this,WorkerTransport);I(this,u),I(this,O,new Map),I(this,x,new Map),I(this,v,new Map),I(this,y,null),this.messageHandler=o,this.loadingTask=s,this.commonObjs=new PDFObjects,this.fontLoader=new _font_loader.FontLoader({ownerDocument:Q.ownerDocument,styleElement:Q.styleElement}),this._params=Q,this.canvasFactory=Y.canvasFactory,this.filterFactory=Y.filterFactory,this.cMapReaderFactory=Y.cMapReaderFactory,this.standardFontDataFactory=Y.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=B,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=new _util.PromiseCapability,this.setupMessageHandler()}_createClass(WorkerTransport,[{key:"annotationStorage",get:function get(){return(0,_util.shadow)(this,"annotationStorage",new _annotation_storage.AnnotationStorage)}},{key:"getRenderingIntent",value:function getRenderingIntent(o){var s=arguments.length>1&&arguments[1]!==undefined?arguments[1]:_util.AnnotationMode.ENABLE;var B=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;var Q=arguments.length>3&&arguments[3]!==undefined?arguments[3]:!1;var Y=_util.RenderingIntentFlag.DISPLAY,J=_annotation_storage.SerializableEmpty;switch(o){case"any":Y=_util.RenderingIntentFlag.ANY;break;case"display":break;case"print":Y=_util.RenderingIntentFlag.PRINT;break;default:(0,_util.warn)("getRenderingIntent - invalid intent: ".concat(o))}switch(s){case _util.AnnotationMode.DISABLE:Y+=_util.RenderingIntentFlag.ANNOTATIONS_DISABLE;break;case _util.AnnotationMode.ENABLE:break;case _util.AnnotationMode.ENABLE_FORMS:Y+=_util.RenderingIntentFlag.ANNOTATIONS_FORMS;break;case _util.AnnotationMode.ENABLE_STORAGE:Y+=_util.RenderingIntentFlag.ANNOTATIONS_STORAGE,J=(Y&_util.RenderingIntentFlag.PRINT&&B instanceof _annotation_storage.PrintAnnotationStorage?B:this.annotationStorage).serializable;break;default:(0,_util.warn)("getRenderingIntent - invalid annotationMode: ".concat(s))}return Q&&(Y+=_util.RenderingIntentFlag.OPLIST),{renderingIntent:Y,cacheKey:"".concat(Y,"_").concat(J.hash),annotationStorageSerializable:J}}},{key:"destroy",value:function destroy(){var _this19=this;var o;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=new _util.PromiseCapability,(o=t$1(this,y))==null||o.reject(new Error("Worker was destroyed during onPassword callback"));var s=[];var _iterator13=_createForOfIteratorHelper(t$1(this,x).values()),_step13;try{for(_iterator13.s();!(_step13=_iterator13.n()).done;){var Q=_step13.value;s.push(Q._destroy())}}catch(err){_iterator13.e(err)}finally{_iterator13.f()}t$1(this,x).clear(),t$1(this,v).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();var B=this.messageHandler.sendWithPromise("Terminate",null);return s.push(B),Promise.all(s).then(function(){var Q;_this19.commonObjs.clear(),_this19.fontLoader.clear(),t$1(_this19,O).clear(),_this19.filterFactory.destroy(),(Q=_this19._networkStream)==null||Q.cancelAllRequests(new _util.AbortException("Worker was terminated.")),_this19.messageHandler&&(_this19.messageHandler.destroy(),_this19.messageHandler=null),_this19.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}},{key:"setupMessageHandler",value:function setupMessageHandler(){var _this20=this;var o=this.messageHandler,s=this.loadingTask;o.on("GetReader",function(B,Q){(0,_util.assert)(_this20._networkStream,"GetReader - no `IPDFStream` instance available."),_this20._fullReader=_this20._networkStream.getFullReader(),_this20._fullReader.onProgress=function(Y){_this20._lastProgress={loaded:Y.loaded,total:Y.total}},Q.onPull=function(){_this20._fullReader.read().then(function(_ref17){var Y=_ref17.value,J=_ref17.done;if(J){Q.close();return}(0,_util.assert)(Y instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),Q.enqueue(new Uint8Array(Y),1,[Y])})["catch"](function(Y){Q.error(Y)})},Q.onCancel=function(Y){_this20._fullReader.cancel(Y),Q.ready["catch"](function(J){if(!_this20.destroyed)throw J})}}),o.on("ReaderHeadersReady",function(B){var Q=new _util.PromiseCapability,Y=_this20._fullReader;return Y.headersReady.then(function(){var J;(!Y.isStreamingSupported||!Y.isRangeSupported)&&(_this20._lastProgress&&((J=s.onProgress)==null||J.call(s,_this20._lastProgress)),Y.onProgress=function(it){var nt;(nt=s.onProgress)==null||nt.call(s,{loaded:it.loaded,total:it.total})}),Q.resolve({isStreamingSupported:Y.isStreamingSupported,isRangeSupported:Y.isRangeSupported,contentLength:Y.contentLength})},Q.reject),Q.promise}),o.on("GetRangeReader",function(B,Q){(0,_util.assert)(_this20._networkStream,"GetRangeReader - no `IPDFStream` instance available.");var Y=_this20._networkStream.getRangeReader(B.begin,B.end);if(!Y){Q.close();return}Q.onPull=function(){Y.read().then(function(_ref18){var J=_ref18.value,it=_ref18.done;if(it){Q.close();return}(0,_util.assert)(J instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),Q.enqueue(new Uint8Array(J),1,[J])})["catch"](function(J){Q.error(J)})},Q.onCancel=function(J){Y.cancel(J),Q.ready["catch"](function(it){if(!_this20.destroyed)throw it})}}),o.on("GetDoc",function(_ref19){var B=_ref19.pdfInfo;_this20._numPages=B.numPages,_this20._htmlForXfa=B.htmlForXfa,delete B.htmlForXfa,s._capability.resolve(new PDFDocumentProxy(B,_this20))}),o.on("DocException",function(B){var Q;switch(B.name){case"PasswordException":Q=new _util.PasswordException(B.message,B.code);break;case"InvalidPDFException":Q=new _util.InvalidPDFException(B.message);break;case"MissingPDFException":Q=new _util.MissingPDFException(B.message);break;case"UnexpectedResponseException":Q=new _util.UnexpectedResponseException(B.message,B.status);break;case"UnknownErrorException":Q=new _util.UnknownErrorException(B.message,B.details);break;default:(0,_util.unreachable)("DocException - expected a valid Error.")}s._capability.reject(Q)}),o.on("PasswordRequest",function(B){if(Z(_this20,y,new _util.PromiseCapability),s.onPassword){var Q=function Q(Y){Y instanceof Error?t$1(_this20,y).reject(Y):t$1(_this20,y).resolve({password:Y})};try{s.onPassword(Q,B.code)}catch(Y){t$1(_this20,y).reject(Y)}}else t$1(_this20,y).reject(new _util.PasswordException(B.message,B.code));return t$1(_this20,y).promise}),o.on("DataLoaded",function(B){var Q;(Q=s.onProgress)==null||Q.call(s,{loaded:B.length,total:B.length}),_this20.downloadInfoCapability.resolve(B)}),o.on("StartRenderPage",function(B){_this20.destroyed||t$1(_this20,x).get(B.pageIndex)._startRenderPage(B.transparency,B.cacheKey)}),o.on("commonobj",function(_ref20){var _ref21=_slicedToArray(_ref20,3),B=_ref21[0],Q=_ref21[1],Y=_ref21[2];var J;if(!_this20.destroyed&&!_this20.commonObjs.has(B))switch(Q){case"Font":var it=_this20._params;if("error"in Y){var dt=Y.error;(0,_util.warn)("Error during font loading: ".concat(dt)),_this20.commonObjs.resolve(B,dt);break}var nt=it.pdfBug&&(J=globalThis.FontInspector)!=null&&J.enabled?function(dt,Mt){return globalThis.FontInspector.fontAdded(dt,Mt)}:null,ot=new _font_loader.FontFaceObject(Y,{isEvalSupported:it.isEvalSupported,disableFontFace:it.disableFontFace,ignoreErrors:it.ignoreErrors,inspectFont:nt});_this20.fontLoader.bind(ot)["catch"](function(dt){return o.sendWithPromise("FontFallback",{id:B})})["finally"](function(){!it.fontExtraProperties&&ot.data&&(ot.data=null),_this20.commonObjs.resolve(B,ot)});break;case"FontPath":case"Image":case"Pattern":_this20.commonObjs.resolve(B,Y);break;default:throw new Error("Got unknown common object type ".concat(Q))}}),o.on("obj",function(_ref22){var _ref23=_slicedToArray(_ref22,4),B=_ref23[0],Q=_ref23[1],Y=_ref23[2],J=_ref23[3];var it;if(_this20.destroyed)return;var nt=t$1(_this20,x).get(Q);if(!nt.objs.has(B))switch(Y){case"Image":if(nt.objs.resolve(B,J),J){var ot;if(J.bitmap){var dt=J.width,Mt=J.height;ot=dt*Mt*4}else ot=((it=J.data)==null?void 0:it.length)||0;ot>_util.MAX_IMAGE_SIZE_TO_CACHE&&(nt._maybeCleanupAfterRender=!0)}break;case"Pattern":nt.objs.resolve(B,J);break;default:throw new Error("Got unknown object type ".concat(Y))}}),o.on("DocProgress",function(B){var Q;_this20.destroyed||(Q=s.onProgress)==null||Q.call(s,{loaded:B.loaded,total:B.total})}),o.on("FetchBuiltInCMap",function(B){return _this20.destroyed?Promise.reject(new Error("Worker was destroyed.")):_this20.cMapReaderFactory?_this20.cMapReaderFactory.fetch(B):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter."))}),o.on("FetchStandardFontData",function(B){return _this20.destroyed?Promise.reject(new Error("Worker was destroyed.")):_this20.standardFontDataFactory?_this20.standardFontDataFactory.fetch(B):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter."))})}},{key:"getData",value:function getData(){return this.messageHandler.sendWithPromise("GetData",null)}},{key:"saveDocument",value:function saveDocument(){var _ref24,_this21=this;var o;this.annotationStorage.size<=0&&(0,_util.warn)("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");var _this$annotationStora=this.annotationStorage.serializable,s=_this$annotationStora.map,B=_this$annotationStora.transfers;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:s,filename:(_ref24=(o=this._fullReader)==null?void 0:o.filename)!==null&&_ref24!==void 0?_ref24:null},B)["finally"](function(){_this21.annotationStorage.resetModified()})}},{key:"getPage",value:function getPage(o){var _this22=this;if(!Number.isInteger(o)||o<=0||o>this._numPages)return Promise.reject(new Error("Invalid page request."));var s=o-1,B=t$1(this,v).get(s);if(B)return B;var Q=this.messageHandler.sendWithPromise("GetPage",{pageIndex:s}).then(function(Y){if(_this22.destroyed)throw new Error("Transport destroyed");var J=new PDFPageProxy(s,Y,_this22,_this22._params.pdfBug);return t$1(_this22,x).set(s,J),J});return t$1(this,v).set(s,Q),Q}},{key:"getPageIndex",value:function getPageIndex(o){return _typeof(o)!="object"||o===null||!Number.isInteger(o.num)||o.num<0||!Number.isInteger(o.gen)||o.gen<0?Promise.reject(new Error("Invalid pageIndex request.")):this.messageHandler.sendWithPromise("GetPageIndex",{num:o.num,gen:o.gen})}},{key:"getAnnotations",value:function getAnnotations(o,s){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:o,intent:s})}},{key:"getFieldObjects",value:function getFieldObjects(){return W(this,u,we).call(this,"GetFieldObjects")}},{key:"hasJSActions",value:function hasJSActions(){return W(this,u,we).call(this,"HasJSActions")}},{key:"getCalculationOrderIds",value:function getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}},{key:"getDestinations",value:function getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}},{key:"getDestination",value:function getDestination(o){return typeof o!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:o})}},{key:"getPageLabels",value:function getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}},{key:"getPageLayout",value:function getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}},{key:"getPageMode",value:function getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}},{key:"getViewerPreferences",value:function getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}},{key:"getOpenAction",value:function getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}},{key:"getAttachments",value:function getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}},{key:"getDocJSActions",value:function getDocJSActions(){return W(this,u,we).call(this,"GetDocJSActions")}},{key:"getPageJSActions",value:function getPageJSActions(o){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:o})}},{key:"getStructTree",value:function getStructTree(o){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:o})}},{key:"getOutline",value:function getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}},{key:"getOptionalContentConfig",value:function getOptionalContentConfig(){return this.messageHandler.sendWithPromise("GetOptionalContentConfig",null).then(function(o){return new _optional_content_config.OptionalContentConfig(o)})}},{key:"getPermissions",value:function getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}},{key:"getMetadata",value:function getMetadata(){var _this23=this;var o="GetMetadata",s=t$1(this,O).get(o);if(s)return s;var B=this.messageHandler.sendWithPromise(o,null).then(function(Q){var _ref25,_ref26;var Y,J;return{info:Q[0],metadata:Q[1]?new _metadata.Metadata(Q[1]):null,contentDispositionFilename:(_ref25=(Y=_this23._fullReader)==null?void 0:Y.filename)!==null&&_ref25!==void 0?_ref25:null,contentLength:(_ref26=(J=_this23._fullReader)==null?void 0:J.contentLength)!==null&&_ref26!==void 0?_ref26:null}});return t$1(this,O).set(o,B),B}},{key:"getMarkInfo",value:function getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}},{key:"startCleanup",value:function(){var _startCleanup=_asyncToGenerator(_regeneratorRuntime().mark(function _callee4(){var o,_iterator14,_step14,s,_args4=arguments;return _regeneratorRuntime().wrap(function _callee4$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:o=_args4.length>0&&_args4[0]!==undefined?_args4[0]:!1;if(this.destroyed){_context4.next=22;break}_context4.next=4;return this.messageHandler.sendWithPromise("Cleanup",null);case 4:_iterator14=_createForOfIteratorHelper(t$1(this,x).values());_context4.prev=5;_iterator14.s();case 7:if((_step14=_iterator14.n()).done){_context4.next=13;break}s=_step14.value;if(s.cleanup()){_context4.next=11;break}throw new Error("startCleanup: Page ".concat(s.pageNumber," is currently rendering."));case 11:_context4.next=7;break;case 13:_context4.next=18;break;case 15:_context4.prev=15;_context4.t0=_context4["catch"](5);_iterator14.e(_context4.t0);case 18:_context4.prev=18;_iterator14.f();return _context4.finish(18);case 21:this.commonObjs.clear(),o||this.fontLoader.clear(),t$1(this,O).clear(),this.filterFactory.destroy(!0);case 22:case"end":return _context4.stop()}},_callee4,this,[[5,15,18,21]])}));function startCleanup(){return _startCleanup.apply(this,arguments)}return startCleanup}()},{key:"loadingParams",get:function get(){var _this$_params=this._params,o=_this$_params.disableAutoFetch,s=_this$_params.enableXfa;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:o,enableXfa:s})}}]);return WorkerTransport}();O=new WeakMap,x=new WeakMap,v=new WeakMap,y=new WeakMap,u=new WeakSet,we=function we(r){var o=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;var s=t$1(this,O).get(r);if(s)return s;var B=this.messageHandler.sendWithPromise(r,o);return t$1(this,O).set(r,B),B};var PDFObjects=function(){function PDFObjects(){_classCallCheck(this,PDFObjects);I(this,C),I(this,w,Object.create(null))}_createClass(PDFObjects,[{key:"get",value:function get(o){var s=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;if(s){var Q=W(this,C,Be).call(this,o);return Q.capability.promise.then(function(){return s(Q.data)}),null}var B=t$1(this,w)[o];if(!(B!=null&&B.capability.settled))throw new Error("Requesting object that isn't resolved yet ".concat(o,"."));return B.data}},{key:"has",value:function has(o){var s=t$1(this,w)[o];return(s==null?void 0:s.capability.settled)||!1}},{key:"resolve",value:function resolve(o){var s=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;var B=W(this,C,Be).call(this,o);B.data=s,B.capability.resolve()}},{key:"clear",value:function clear(){var o;for(var s in t$1(this,w)){var B=t$1(this,w)[s].data;(o=B==null?void 0:B.bitmap)==null||o.close()}Z(this,w,Object.create(null))}}]);return PDFObjects}();w=new WeakMap,C=new WeakSet,Be=function Be(r){var o;return(o=t$1(this,w))[r]||(o[r]={capability:new _util.PromiseCapability,data:null})};var RenderTask=function(){function RenderTask(o){_classCallCheck(this,RenderTask);I(this,a,null),Z(this,a,o),this.onContinue=null}_createClass(RenderTask,[{key:"promise",get:function get(){return t$1(this,a).capability.promise}},{key:"cancel",value:function cancel(){var o=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0;t$1(this,a).cancel(null,o)}},{key:"separateAnnots",get:function get(){var o=t$1(this,a).operatorList.separateAnnots;if(!o)return!1;var _t$=t$1(this,a),s=_t$.annotationCanvasMap;return o.form||o.canvas&&(s==null?void 0:s.size)>0}}]);return RenderTask}();a=new WeakMap,exports.RenderTask=RenderTask;var P=function(){function xm(_ref27){var o=_ref27.callback,s=_ref27.params,B=_ref27.objs,Q=_ref27.commonObjs,Y=_ref27.annotationCanvasMap,J=_ref27.operatorList,it=_ref27.pageIndex,nt=_ref27.canvasFactory,ot=_ref27.filterFactory,_ref27$useRequestAnim=_ref27.useRequestAnimationFrame,dt=_ref27$useRequestAnim===void 0?!1:_ref27$useRequestAnim,_ref27$pdfBug=_ref27.pdfBug,Mt=_ref27$pdfBug===void 0?!1:_ref27$pdfBug,_ref27$pageColors=_ref27.pageColors,Ot=_ref27$pageColors===void 0?null:_ref27$pageColors;_classCallCheck(this,xm);this.callback=o,this.params=s,this.objs=B,this.commonObjs=Q,this.annotationCanvasMap=Y,this.operatorListIdx=null,this.operatorList=J,this._pageIndex=it,this.canvasFactory=nt,this.filterFactory=ot,this._pdfBug=Mt,this.pageColors=Ot,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=dt===!0&&(typeof window==="undefined"?"undefined":_typeof(window))<"u",this.cancelled=!1,this.capability=new _util.PromiseCapability,this.task=new RenderTask(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=s.canvasContext.canvas}_createClass(xm,[{key:"completed",get:function get(){return this.capability.promise["catch"](function(){})}},{key:"initializeGraphics",value:function initializeGraphics(_ref28){var _ref28$transparency=_ref28.transparency,o=_ref28$transparency===void 0?!1:_ref28$transparency,s=_ref28.optionalContentConfig;var B,Q;if(this.cancelled)return;if(this._canvas){if(t$1(xm,l).has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");t$1(xm,l).add(this._canvas)}this._pdfBug&&(B=globalThis.StepperManager)!=null&&B.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());var _this$params=this.params,Y=_this$params.canvasContext,J=_this$params.viewport,it=_this$params.transform,nt=_this$params.background;this.gfx=new _canvas.CanvasGraphics(Y,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:s},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:it,viewport:J,transparency:o,background:nt}),this.operatorListIdx=0,this.graphicsReady=!0,(Q=this.graphicsReadyCallback)==null||Q.call(this)}},{key:"cancel",value:function cancel(){var o=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;var s=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;var B;this.running=!1,this.cancelled=!0,(B=this.gfx)==null||B.endDrawing(),t$1(xm,l)["delete"](this._canvas),this.callback(o||new _display_utils.RenderingCancelledException("Rendering cancelled, page ".concat(this._pageIndex+1),s))}},{key:"operatorListChanged",value:function operatorListChanged(){var o;if(!this.graphicsReady){this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound);return}(o=this.stepper)==null||o.updateOperatorList(this.operatorList),!this.running&&this._continue()}},{key:"_continue",value:function _continue(){this.running=!0,!this.cancelled&&(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}},{key:"_scheduleNext",value:function _scheduleNext(){var _this24=this;this._useRequestAnimationFrame?window.requestAnimationFrame(function(){_this24._nextBound()["catch"](_this24._cancelBound)}):Promise.resolve().then(this._nextBound)["catch"](this._cancelBound)}},{key:"_next",value:function(){var _next2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee5(){return _regeneratorRuntime().wrap(function _callee5$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),t$1(xm,l)["delete"](this._canvas),this.callback())));case 1:case"end":return _context5.stop()}},_callee5,this)}));function _next(){return _next2.apply(this,arguments)}return _next}()}]);return xm}();l=new WeakMap,I(P,l,new WeakSet);var InternalRenderTask=P;var version="3.11.174";exports.version=version;var build="ce8716743";exports.build=build},function(r,o,s){var B,Q,Y,J,it;Object.defineProperty(o,"__esModule",{value:!0}),o.SerializableEmpty=o.PrintAnnotationStorage=o.AnnotationStorage=void 0;var nt=s(1),ot=s(4),dt=s(8);var Mt=Object.freeze({map:null,hash:"",transfers:void 0});o.SerializableEmpty=Mt;var Ot=function(){function Ot(){_classCallCheck(this,Ot);I(this,Y),I(this,B,!1),I(this,Q,new Map),this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}_createClass(Ot,[{key:"getValue",value:function getValue(te,qt){var ie=t$1(this,Q).get(te);return ie===void 0?qt:Object.assign(qt,ie)}},{key:"getRawValue",value:function getRawValue(te){return t$1(this,Q).get(te)}},{key:"remove",value:function remove(te){if(t$1(this,Q)["delete"](te),t$1(this,Q).size===0&&this.resetModified(),typeof this.onAnnotationEditor=="function"){var _iterator15=_createForOfIteratorHelper(t$1(this,Q).values()),_step15;try{for(_iterator15.s();!(_step15=_iterator15.n()).done;){var qt=_step15.value;if(qt instanceof ot.AnnotationEditor)return}}catch(err){_iterator15.e(err)}finally{_iterator15.f()}this.onAnnotationEditor(null)}}},{key:"setValue",value:function setValue(te,qt){var ie=t$1(this,Q).get(te);var re=!1;if(ie!==void 0)for(var _i2=0,_Object$entries=Object.entries(qt);_i2<_Object$entries.length;_i2++){var _Object$entries$_i=_slicedToArray(_Object$entries[_i2],2),ne=_Object$entries$_i[0],ae=_Object$entries$_i[1];ie[ne]!==ae&&(re=!0,ie[ne]=ae)}else re=!0,t$1(this,Q).set(te,qt);re&&W(this,Y,J).call(this),qt instanceof ot.AnnotationEditor&&typeof this.onAnnotationEditor=="function"&&this.onAnnotationEditor(qt.constructor._type)}},{key:"has",value:function has(te){return t$1(this,Q).has(te)}},{key:"getAll",value:function getAll(){return t$1(this,Q).size>0?(0,nt.objectFromMap)(t$1(this,Q)):null}},{key:"setAll",value:function setAll(te){for(var _i3=0,_Object$entries2=Object.entries(te);_i3<_Object$entries2.length;_i3++){var _Object$entries2$_i=_slicedToArray(_Object$entries2[_i3],2),qt=_Object$entries2$_i[0],ie=_Object$entries2$_i[1];this.setValue(qt,ie)}}},{key:"size",get:function get(){return t$1(this,Q).size}},{key:"resetModified",value:function resetModified(){t$1(this,B)&&(Z(this,B,!1),typeof this.onResetModified=="function"&&this.onResetModified())}},{key:"print",get:function get(){return new Qt(this)}},{key:"serializable",get:function get(){if(t$1(this,Q).size===0)return Mt;var te=new Map,qt=new dt.MurmurHash3_64,ie=[],re=Object.create(null);var ne=!1;var _iterator16=_createForOfIteratorHelper(t$1(this,Q)),_step16;try{for(_iterator16.s();!(_step16=_iterator16.n()).done;){var _step16$value=_slicedToArray(_step16.value,2),_ae=_step16$value[0],Bt=_step16$value[1];var Wt=Bt instanceof ot.AnnotationEditor?Bt.serialize(!1,re):Bt;Wt&&(te.set(_ae,Wt),qt.update("".concat(_ae,":").concat(JSON.stringify(Wt))),ne||(ne=!!Wt.bitmap))}}catch(err){_iterator16.e(err)}finally{_iterator16.f()}if(ne){var _iterator17=_createForOfIteratorHelper(te.values()),_step17;try{for(_iterator17.s();!(_step17=_iterator17.n()).done;){var ae=_step17.value;ae.bitmap&&ie.push(ae.bitmap)}}catch(err){_iterator17.e(err)}finally{_iterator17.f()}}return te.size>0?{map:te,hash:qt.hexdigest(),transfers:ie}:Mt}}]);return Ot}();B=new WeakMap,Q=new WeakMap,Y=new WeakSet,J=function J(){t$1(this,B)||(Z(this,B,!0),typeof this.onSetModified=="function"&&this.onSetModified())},o.AnnotationStorage=Ot;var Qt=function(_Ot){_inherits(Qt,_Ot);function Qt(te){var _this25;_classCallCheck(this,Qt);_this25=_callSuper(this,Qt),I(_assertThisInitialized(_this25),it,void 0);var _te$serializable=te.serializable,qt=_te$serializable.map,ie=_te$serializable.hash,re=_te$serializable.transfers,ne=structuredClone(qt,re?{transfer:re}:null);Z(_assertThisInitialized(_this25),it,{map:ne,hash:ie,transfers:re});return _this25}_createClass(Qt,[{key:"print",get:function get(){(0,nt.unreachable)("Should not call PrintAnnotationStorage.print")}},{key:"serializable",get:function get(){return t$1(this,it)}}]);return Qt}(Ot);it=new WeakMap,o.PrintAnnotationStorage=Qt},function(r,o,s){var B,Q,Y,J,it,nt,ot,dt,Mt,Ot,Qt,Ut,te,qt,ie,re,ne,ae,Bt,Wt,oe,ve,_e,Xe,He,ro,Xo,Se,xr,pr,$e,_r;Object.defineProperty(o,"__esModule",{value:!0}),o.AnnotationEditor=void 0;var Ps=s(5),qe=s(1),bl=s(6);var ol=function(){function mm(se){_classCallCheck(this,mm);I(this,ie),I(this,ne),I(this,oe),I(this,_e),I(this,He),I(this,Xo),I(this,xr),I(this,$e),I(this,B,""),I(this,Q,!1),I(this,Y,null),I(this,J,null),I(this,it,null),I(this,nt,!1),I(this,ot,null),I(this,dt,this.focusin.bind(this)),I(this,Mt,this.focusout.bind(this)),I(this,Ot,!1),I(this,Qt,!1),I(this,Ut,!1),ee(this,"_initialOptions",Object.create(null)),ee(this,"_uiManager",null),ee(this,"_focusEventsAllowed",!0),ee(this,"_l10nPromise",null),I(this,te,!1),I(this,qt,mm._zIndex++),this.constructor===mm&&(0,qe.unreachable)("Cannot initialize AnnotationEditor."),this.parent=se.parent,this.id=se.id,this.width=this.height=null,this.pageIndex=se.parent.pageIndex,this.name=se.name,this.div=null,this._uiManager=se.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=se.isCentered,this._structTreeParentId=null;var _this$parent$viewport=this.parent.viewport,be=_this$parent$viewport.rotation,_this$parent$viewport2=_this$parent$viewport.rawDims,Ae=_this$parent$viewport2.pageWidth,ze=_this$parent$viewport2.pageHeight,pi=_this$parent$viewport2.pageX,io=_this$parent$viewport2.pageY;this.rotation=be,this.pageRotation=(360+be-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[Ae,ze],this.pageTranslation=[pi,io];var _this$parentDimension=_slicedToArray(this.parentDimensions,2),Qr=_this$parentDimension[0],Es=_this$parentDimension[1];this.x=se.x/Qr,this.y=se.y/Es,this.isAttachedToDOM=!1,this.deleted=!1}_createClass(mm,[{key:"editorType",get:function get(){return Object.getPrototypeOf(this).constructor._type}},{key:"propertiesToUpdate",get:function get(){return[]}},{key:"_isDraggable",get:function get(){return t$1(this,te)},set:function set(se){var be;Z(this,te,se),(be=this.div)==null||be.classList.toggle("draggable",se)}},{key:"center",value:function center(){var _this$pageDimensions=_slicedToArray(this.pageDimensions,2),se=_this$pageDimensions[0],be=_this$pageDimensions[1];switch(this.parentRotation){case 90:this.x-=this.height*be/(se*2),this.y+=this.width*se/(be*2);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*be/(se*2),this.y-=this.width*se/(be*2);break;default:this.x-=this.width/2,this.y-=this.height/2;break}this.fixAndSetPosition()}},{key:"addCommands",value:function addCommands(se){this._uiManager.addCommands(se)}},{key:"currentLayer",get:function get(){return this._uiManager.currentLayer}},{key:"setInBackground",value:function setInBackground(){this.div.style.zIndex=0}},{key:"setInForeground",value:function setInForeground(){this.div.style.zIndex=t$1(this,qt)}},{key:"setParent",value:function setParent(se){se!==null&&(this.pageIndex=se.pageIndex,this.pageDimensions=se.pageDimensions),this.parent=se}},{key:"focusin",value:function focusin(se){this._focusEventsAllowed&&(t$1(this,Ot)?Z(this,Ot,!1):this.parent.setSelected(this))}},{key:"focusout",value:function focusout(se){var be;if(!this._focusEventsAllowed||!this.isAttachedToDOM)return;var Ae=se.relatedTarget;Ae!=null&&Ae.closest("#".concat(this.id))||(se.preventDefault(),(be=this.parent)!=null&&be.isMultipleSelection||this.commitOrRemove())}},{key:"commitOrRemove",value:function commitOrRemove(){this.isEmpty()?this.remove():this.commit()}},{key:"commit",value:function commit(){this.addToAnnotationStorage()}},{key:"addToAnnotationStorage",value:function addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}},{key:"setAt",value:function setAt(se,be,Ae,ze){var _this$screenToPageTra,_this$screenToPageTra2;var _this$parentDimension2=_slicedToArray(this.parentDimensions,2),pi=_this$parentDimension2[0],io=_this$parentDimension2[1];(_this$screenToPageTra=this.screenToPageTranslation(Ae,ze),_this$screenToPageTra2=_slicedToArray(_this$screenToPageTra,2),Ae=_this$screenToPageTra2[0],ze=_this$screenToPageTra2[1]),this.x=(se+Ae)/pi,this.y=(be+ze)/io,this.fixAndSetPosition()}},{key:"translate",value:function translate(se,be){W(this,ie,re).call(this,this.parentDimensions,se,be)}},{key:"translateInPage",value:function translateInPage(se,be){W(this,ie,re).call(this,this.pageDimensions,se,be),this.div.scrollIntoView({block:"nearest"})}},{key:"drag",value:function drag(se,be){var _this$parentDimension3=_slicedToArray(this.parentDimensions,2),Ae=_this$parentDimension3[0],ze=_this$parentDimension3[1];if(this.x+=se/Ae,this.y+=be/ze,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){var _this$div$getBounding=this.div.getBoundingClientRect(),nl=_this$div$getBounding.x,Cr=_this$div$getBounding.y;this.parent.findNewParent(this,nl,Cr)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}var pi=this.x,io=this.y;var _W$call=W(this,ne,ae).call(this),_W$call2=_slicedToArray(_W$call,2),Qr=_W$call2[0],Es=_W$call2[1];pi+=Qr,io+=Es,this.div.style.left="".concat((100*pi).toFixed(2),"%"),this.div.style.top="".concat((100*io).toFixed(2),"%"),this.div.scrollIntoView({block:"nearest"})}},{key:"fixAndSetPosition",value:function fixAndSetPosition(){var _this$pageDimensions2=_slicedToArray(this.pageDimensions,2),se=_this$pageDimensions2[0],be=_this$pageDimensions2[1];var Ae=this.x,ze=this.y,pi=this.width,io=this.height;switch(pi*=se,io*=be,Ae*=se,ze*=be,this.rotation){case 0:Ae=Math.max(0,Math.min(se-pi,Ae)),ze=Math.max(0,Math.min(be-io,ze));break;case 90:Ae=Math.max(0,Math.min(se-io,Ae)),ze=Math.min(be,Math.max(pi,ze));break;case 180:Ae=Math.min(se,Math.max(pi,Ae)),ze=Math.min(be,Math.max(io,ze));break;case 270:Ae=Math.min(se,Math.max(io,Ae)),ze=Math.max(0,Math.min(be-pi,ze));break}this.x=Ae/=se,this.y=ze/=be;var _W$call3=W(this,ne,ae).call(this),_W$call4=_slicedToArray(_W$call3,2),Qr=_W$call4[0],Es=_W$call4[1];Ae+=Qr,ze+=Es;var nl=this.div.style;nl.left="".concat((100*Ae).toFixed(2),"%"),nl.top="".concat((100*ze).toFixed(2),"%"),this.moveInDOM()}},{key:"screenToPageTranslation",value:function screenToPageTranslation(se,be){var Ae;return W(Ae=mm,Bt,Wt).call(Ae,se,be,this.parentRotation)}},{key:"pageTranslationToScreen",value:function pageTranslationToScreen(se,be){var Ae;return W(Ae=mm,Bt,Wt).call(Ae,se,be,360-this.parentRotation)}},{key:"parentScale",get:function get(){return this._uiManager.viewParameters.realScale}},{key:"parentRotation",get:function get(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}},{key:"parentDimensions",get:function get(){var se=this.parentScale,_this$pageDimensions3=_slicedToArray(this.pageDimensions,2),be=_this$pageDimensions3[0],Ae=_this$pageDimensions3[1],ze=be*se,pi=Ae*se;return qe.FeatureTest.isCSSRoundSupported?[Math.round(ze),Math.round(pi)]:[ze,pi]}},{key:"setDims",value:function setDims(se,be){var Ae;var _this$parentDimension4=_slicedToArray(this.parentDimensions,2),ze=_this$parentDimension4[0],pi=_this$parentDimension4[1];this.div.style.width="".concat((100*se/ze).toFixed(2),"%"),t$1(this,nt)||(this.div.style.height="".concat((100*be/pi).toFixed(2),"%")),(Ae=t$1(this,Y))==null||Ae.classList.toggle("small",se<mm.SMALL_EDITOR_SIZE||be<mm.SMALL_EDITOR_SIZE)}},{key:"fixDims",value:function fixDims(){var se=this.div.style,be=se.height,Ae=se.width,ze=Ae.endsWith("%"),pi=!t$1(this,nt)&&be.endsWith("%");if(ze&&pi)return;var _this$parentDimension5=_slicedToArray(this.parentDimensions,2),io=_this$parentDimension5[0],Qr=_this$parentDimension5[1];ze||(se.width="".concat((100*parseFloat(Ae)/io).toFixed(2),"%")),!t$1(this,nt)&&!pi&&(se.height="".concat((100*parseFloat(be)/Qr).toFixed(2),"%"))}},{key:"getInitialTranslation",value:function getInitialTranslation(){return[0,0]}},{key:"addAltTextButton",value:function(){var _addAltTextButton=_asyncToGenerator(_regeneratorRuntime().mark(function _callee7(){var _this26=this;var se,be;return _regeneratorRuntime().wrap(function _callee7$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:if(!t$1(this,Y)){_context7.next=2;break}return _context7.abrupt("return");case 2:se=Z(this,Y,document.createElement("button"));se.className="altText";_context7.next=6;return mm._l10nPromise.get("editor_alt_text_button_label");case 6:be=_context7.sent;se.textContent=be,se.setAttribute("aria-label",be),se.tabIndex="0",se.addEventListener("contextmenu",bl.noContextMenu),se.addEventListener("pointerdown",function(Ae){return Ae.stopPropagation()}),se.addEventListener("click",function(Ae){Ae.preventDefault(),_this26._uiManager.editAltText(_this26)},{capture:!0}),se.addEventListener("keydown",function(Ae){Ae.target===se&&Ae.key==="Enter"&&(Ae.preventDefault(),_this26._uiManager.editAltText(_this26))}),W(this,xr,pr).call(this),this.div.append(se),mm.SMALL_EDITOR_SIZE||(mm.SMALL_EDITOR_SIZE=Math.min(128,Math.round(se.getBoundingClientRect().width*1.4)));case 8:case"end":return _context7.stop()}},_callee7,this)}));function addAltTextButton(){return _addAltTextButton.apply(this,arguments)}return addAltTextButton}()},{key:"getClientDimensions",value:function getClientDimensions(){return this.div.getBoundingClientRect()}},{key:"altTextData",get:function get(){return{altText:t$1(this,B),decorative:t$1(this,Q)}},set:function set(_ref29){var se=_ref29.altText,be=_ref29.decorative;t$1(this,B)===se&&t$1(this,Q)===be||(Z(this,B,se),Z(this,Q,be),W(this,xr,pr).call(this))}},{key:"render",value:function render(){this.div=document.createElement("div"),this.div.setAttribute("data-editor-rotation",(360-this.rotation)%360),this.div.className=this.name,this.div.setAttribute("id",this.id),this.div.setAttribute("tabIndex",0),this.setInForeground(),this.div.addEventListener("focusin",t$1(this,dt)),this.div.addEventListener("focusout",t$1(this,Mt));var _this$parentDimension6=_slicedToArray(this.parentDimensions,2),se=_this$parentDimension6[0],be=_this$parentDimension6[1];this.parentRotation%180!==0&&(this.div.style.maxWidth="".concat((100*be/se).toFixed(2),"%"),this.div.style.maxHeight="".concat((100*se/be).toFixed(2),"%"));var _this$getInitialTrans=this.getInitialTranslation(),_this$getInitialTrans2=_slicedToArray(_this$getInitialTrans,2),Ae=_this$getInitialTrans2[0],ze=_this$getInitialTrans2[1];return this.translate(Ae,ze),(0,Ps.bindEvents)(this,this.div,["pointerdown"]),this.div}},{key:"pointerdown",value:function pointerdown(se){var be=qe.FeatureTest.platform.isMac;if(se.button!==0||se.ctrlKey&&be){se.preventDefault();return}Z(this,Ot,!0),W(this,$e,_r).call(this,se)}},{key:"moveInDOM",value:function moveInDOM(){var se;(se=this.parent)==null||se.moveEditorInDOM(this)}},{key:"_setParentAndPosition",value:function _setParentAndPosition(se,be,Ae){se.changeParent(this),this.x=be,this.y=Ae,this.fixAndSetPosition()}},{key:"getRect",value:function getRect(se,be){var Ae=this.parentScale,_this$pageDimensions4=_slicedToArray(this.pageDimensions,2),ze=_this$pageDimensions4[0],pi=_this$pageDimensions4[1],_this$pageTranslation=_slicedToArray(this.pageTranslation,2),io=_this$pageTranslation[0],Qr=_this$pageTranslation[1],Es=se/Ae,nl=be/Ae,Cr=this.x*ze,$l=this.y*pi,_l=this.width*ze,Ih=this.height*pi;switch(this.rotation){case 0:return[Cr+Es+io,pi-$l-nl-Ih+Qr,Cr+Es+_l+io,pi-$l-nl+Qr];case 90:return[Cr+nl+io,pi-$l+Es+Qr,Cr+nl+Ih+io,pi-$l+Es+_l+Qr];case 180:return[Cr-Es-_l+io,pi-$l+nl+Qr,Cr-Es+io,pi-$l+nl+Ih+Qr];case 270:return[Cr-nl-Ih+io,pi-$l-Es-_l+Qr,Cr-nl+io,pi-$l-Es+Qr];default:throw new Error("Invalid rotation")}}},{key:"getRectInCurrentCoords",value:function getRectInCurrentCoords(se,be){var _se=_slicedToArray(se,4),Ae=_se[0],ze=_se[1],pi=_se[2],io=_se[3],Qr=pi-Ae,Es=io-ze;switch(this.rotation){case 0:return[Ae,be-io,Qr,Es];case 90:return[Ae,be-ze,Es,Qr];case 180:return[pi,be-ze,Qr,Es];case 270:return[pi,be-io,Es,Qr];default:throw new Error("Invalid rotation")}}},{key:"onceAdded",value:function onceAdded(){}},{key:"isEmpty",value:function isEmpty(){return!1}},{key:"enableEditMode",value:function enableEditMode(){Z(this,Ut,!0)}},{key:"disableEditMode",value:function disableEditMode(){Z(this,Ut,!1)}},{key:"isInEditMode",value:function isInEditMode(){return t$1(this,Ut)}},{key:"shouldGetKeyboardEvents",value:function shouldGetKeyboardEvents(){return!1}},{key:"needsToBeRebuilt",value:function needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}},{key:"rebuild",value:function rebuild(){var se,be;(se=this.div)==null||se.addEventListener("focusin",t$1(this,dt)),(be=this.div)==null||be.addEventListener("focusout",t$1(this,Mt))}},{key:"serialize",value:function serialize(){var se=arguments.length>0&&arguments[0]!==undefined?arguments[0]:!1;var be=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;(0,qe.unreachable)("An editor must be serializable")}},{key:"remove",value:function remove(){var se;this.div.removeEventListener("focusin",t$1(this,dt)),this.div.removeEventListener("focusout",t$1(this,Mt)),this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),(se=t$1(this,Y))==null||se.remove(),Z(this,Y,null),Z(this,J,null)}},{key:"isResizable",get:function get(){return!1}},{key:"makeResizable",value:function makeResizable(){this.isResizable&&(W(this,_e,Xe).call(this),t$1(this,ot).classList.remove("hidden"))}},{key:"select",value:function select(){var se;this.makeResizable(),(se=this.div)==null||se.classList.add("selectedEditor")}},{key:"unselect",value:function unselect(){var se,be,Ae;(se=t$1(this,ot))==null||se.classList.add("hidden"),(be=this.div)==null||be.classList.remove("selectedEditor"),(Ae=this.div)!=null&&Ae.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus()}},{key:"updateParams",value:function updateParams(se,be){}},{key:"disableEditing",value:function disableEditing(){t$1(this,Y)&&(t$1(this,Y).hidden=!0)}},{key:"enableEditing",value:function enableEditing(){t$1(this,Y)&&(t$1(this,Y).hidden=!1)}},{key:"enterInEditMode",value:function enterInEditMode(){}},{key:"contentDiv",get:function get(){return this.div}},{key:"isEditing",get:function get(){return t$1(this,Qt)},set:function set(se){Z(this,Qt,se),this.parent&&(se?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}},{key:"setAspectRatio",value:function setAspectRatio(se,be){Z(this,nt,!0);var Ae=se/be,ze=this.div.style;ze.aspectRatio=Ae,ze.height="auto"}}],[{key:"_defaultLineColor",get:function get(){return(0,qe.shadow)(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}},{key:"deleteAnnotationElement",value:function deleteAnnotationElement(se){var be=new pe({id:se.parent.getNextId(),parent:se.parent,uiManager:se._uiManager});be.annotationElementId=se.annotationElementId,be.deleted=!0,be._uiManager.addToAnnotationStorage(be)}},{key:"initialize",value:function initialize(se){var be=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;if(mm._l10nPromise||(mm._l10nPromise=new Map(["editor_alt_text_button_label","editor_alt_text_edit_button_label","editor_alt_text_decorative_tooltip"].map(function(ze){return[ze,se.get(ze)]}))),be!=null&&be.strings){var _iterator18=_createForOfIteratorHelper(be.strings),_step18;try{for(_iterator18.s();!(_step18=_iterator18.n()).done;){var ze=_step18.value;mm._l10nPromise.set(ze,se.get(ze))}}catch(err){_iterator18.e(err)}finally{_iterator18.f()}}if(mm._borderLineWidth!==-1)return;var Ae=getComputedStyle(document.documentElement);mm._borderLineWidth=parseFloat(Ae.getPropertyValue("--outline-width"))||0}},{key:"updateDefaultParams",value:function updateDefaultParams(se,be){}},{key:"defaultPropertiesToUpdate",get:function get(){return[]}},{key:"isHandlingMimeForPasting",value:function isHandlingMimeForPasting(se){return!1}},{key:"paste",value:function paste(se,be){(0,qe.unreachable)("Not implemented")}},{key:"deserialize",value:function deserialize(se,be,Ae){var ze=new this.prototype.constructor({parent:be,id:be.getNextId(),uiManager:Ae});ze.rotation=se.rotation;var _ze$pageDimensions=_slicedToArray(ze.pageDimensions,2),pi=_ze$pageDimensions[0],io=_ze$pageDimensions[1],_ze$getRectInCurrentC=ze.getRectInCurrentCoords(se.rect,io),_ze$getRectInCurrentC2=_slicedToArray(_ze$getRectInCurrentC,4),Qr=_ze$getRectInCurrentC2[0],Es=_ze$getRectInCurrentC2[1],nl=_ze$getRectInCurrentC2[2],Cr=_ze$getRectInCurrentC2[3];return ze.x=Qr/pi,ze.y=Es/io,ze.width=nl/pi,ze.height=Cr/io,ze}},{key:"MIN_SIZE",get:function get(){return 16}}]);return mm}();B=new WeakMap,Q=new WeakMap,Y=new WeakMap,J=new WeakMap,it=new WeakMap,nt=new WeakMap,ot=new WeakMap,dt=new WeakMap,Mt=new WeakMap,Ot=new WeakMap,Qt=new WeakMap,Ut=new WeakMap,te=new WeakMap,qt=new WeakMap,ie=new WeakSet,re=function re(_ref30,be,Ae){var _this$screenToPageTra3,_this$screenToPageTra4;var _ref31=_slicedToArray(_ref30,2),ue=_ref31[0],se=_ref31[1];(_this$screenToPageTra3=this.screenToPageTranslation(be,Ae),_this$screenToPageTra4=_slicedToArray(_this$screenToPageTra3,2),be=_this$screenToPageTra4[0],Ae=_this$screenToPageTra4[1]),this.x+=be/ue,this.y+=Ae/se,this.fixAndSetPosition()},ne=new WeakSet,ae=function ae(){var _this$parentDimension7=_slicedToArray(this.parentDimensions,2),ue=_this$parentDimension7[0],se=_this$parentDimension7[1],be=ol._borderLineWidth,Ae=be/ue,ze=be/se;switch(this.rotation){case 90:return[-Ae,ze];case 180:return[Ae,ze];case 270:return[Ae,-ze];default:return[-Ae,-ze]}},Bt=new WeakSet,Wt=function Wt(ue,se,be){switch(be){case 90:return[se,-ue];case 180:return[-ue,-se];case 270:return[-se,ue];default:return[ue,se]}},oe=new WeakSet,ve=function ve(ue){switch(ue){case 90:{var _this$pageDimensions5=_slicedToArray(this.pageDimensions,2),se=_this$pageDimensions5[0],be=_this$pageDimensions5[1];return[0,-se/be,be/se,0]}case 180:return[-1,0,0,-1];case 270:{var _this$pageDimensions6=_slicedToArray(this.pageDimensions,2),_se2=_this$pageDimensions6[0],_be=_this$pageDimensions6[1];return[0,_se2/_be,-_be/_se2,0]}default:return[1,0,0,1]}},_e=new WeakSet,Xe=function Xe(){if(t$1(this,ot))return;Z(this,ot,document.createElement("div")),t$1(this,ot).classList.add("resizers");var ue=["topLeft","topRight","bottomRight","bottomLeft"];this._willKeepAspectRatio||ue.push("topMiddle","middleRight","bottomMiddle","middleLeft");for(var _i4=0,_ue=ue;_i4<_ue.length;_i4++){var se=_ue[_i4];var be=document.createElement("div");t$1(this,ot).append(be),be.classList.add("resizer",se),be.addEventListener("pointerdown",W(this,He,ro).bind(this,se)),be.addEventListener("contextmenu",bl.noContextMenu)}this.div.prepend(t$1(this,ot))},He=new WeakSet,ro=function ro(ue,se){var _this27=this;se.preventDefault();var be=qe.FeatureTest.platform.isMac;if(se.button!==0||se.ctrlKey&&be)return;var Ae=W(this,Xo,Se).bind(this,ue),ze=this._isDraggable;this._isDraggable=!1;var pi={passive:!0,capture:!0};window.addEventListener("pointermove",Ae,pi);var io=this.x,Qr=this.y,Es=this.width,nl=this.height,Cr=this.parent.div.style.cursor,$l=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(se.target).cursor;var _l=function _l(){_this27._isDraggable=ze,window.removeEventListener("pointerup",_l),window.removeEventListener("blur",_l),window.removeEventListener("pointermove",Ae,pi),_this27.parent.div.style.cursor=Cr,_this27.div.style.cursor=$l;var Ih=_this27.x,Rh=_this27.y,Th=_this27.width,$s=_this27.height;Ih===io&&Rh===Qr&&Th===Es&&$s===nl||_this27.addCommands({cmd:function cmd(){_this27.width=Th,_this27.height=$s,_this27.x=Ih,_this27.y=Rh;var _this27$parentDimensi=_slicedToArray(_this27.parentDimensions,2),Dr=_this27$parentDimensi[0],Xi=_this27$parentDimensi[1];_this27.setDims(Dr*Th,Xi*$s),_this27.fixAndSetPosition()},undo:function undo(){_this27.width=Es,_this27.height=nl,_this27.x=io,_this27.y=Qr;var _this27$parentDimensi2=_slicedToArray(_this27.parentDimensions,2),Dr=_this27$parentDimensi2[0],Xi=_this27$parentDimensi2[1];_this27.setDims(Dr*Es,Xi*nl),_this27.fixAndSetPosition()},mustExec:!0})};window.addEventListener("pointerup",_l),window.addEventListener("blur",_l)},Xo=new WeakSet,Se=function Se(ue,se){var _Rh,_Rh2;var _this$parentDimension8=_slicedToArray(this.parentDimensions,2),be=_this$parentDimension8[0],Ae=_this$parentDimension8[1],ze=this.x,pi=this.y,io=this.width,Qr=this.height,Es=ol.MIN_SIZE/be,nl=ol.MIN_SIZE/Ae,Cr=function Cr(Me){return Math.round(Me*1e4)/1e4},$l=W(this,oe,ve).call(this,this.rotation),_l=function _l(Me,kr){return[$l[0]*Me+$l[2]*kr,$l[1]*Me+$l[3]*kr]},Ih=W(this,oe,ve).call(this,360-this.rotation),Rh=function Rh(Me,kr){return[Ih[0]*Me+Ih[2]*kr,Ih[1]*Me+Ih[3]*kr]};var Th,$s,Dr=!1,Xi=!1;switch(ue){case"topLeft":Dr=!0,Th=function Th(Me,kr){return[0,0]},$s=function $s(Me,kr){return[Me,kr]};break;case"topMiddle":Th=function Th(Me,kr){return[Me/2,0]},$s=function $s(Me,kr){return[Me/2,kr]};break;case"topRight":Dr=!0,Th=function Th(Me,kr){return[Me,0]},$s=function $s(Me,kr){return[0,kr]};break;case"middleRight":Xi=!0,Th=function Th(Me,kr){return[Me,kr/2]},$s=function $s(Me,kr){return[0,kr/2]};break;case"bottomRight":Dr=!0,Th=function Th(Me,kr){return[Me,kr]},$s=function $s(Me,kr){return[0,0]};break;case"bottomMiddle":Th=function Th(Me,kr){return[Me/2,kr]},$s=function $s(Me,kr){return[Me/2,0]};break;case"bottomLeft":Dr=!0,Th=function Th(Me,kr){return[0,kr]},$s=function $s(Me,kr){return[Me,0]};break;case"middleLeft":Xi=!0,Th=function Th(Me,kr){return[0,kr/2]},$s=function $s(Me,kr){return[Me,kr/2]};break}var Ke=Th(io,Qr),ta=$s(io,Qr);var Cl=_l.apply(void 0,_toConsumableArray(ta));var Oh=Cr(ze+Cl[0]),jh=Cr(pi+Cl[1]);var qh=1,Bh=1,_this$screenToPageTra5=this.screenToPageTranslation(se.movementX,se.movementY),_this$screenToPageTra6=_slicedToArray(_this$screenToPageTra5,2),Jh=_this$screenToPageTra6[0],Xh=_this$screenToPageTra6[1];if((_Rh=Rh(Jh/be,Xh/Ae),_Rh2=_slicedToArray(_Rh,2),Jh=_Rh2[0],Xh=_Rh2[1]),Dr){var Me=Math.hypot(io,Qr);qh=Bh=Math.max(Math.min(Math.hypot(ta[0]-Ke[0]-Jh,ta[1]-Ke[1]-Xh)/Me,1/io,1/Qr),Es/io,nl/Qr)}else Xi?qh=Math.max(Es,Math.min(1,Math.abs(ta[0]-Ke[0]-Jh)))/io:Bh=Math.max(nl,Math.min(1,Math.abs(ta[1]-Ke[1]-Xh)))/Qr;var Qh=Cr(io*qh),Kh=Cr(Qr*Bh);Cl=_l.apply(void 0,_toConsumableArray($s(Qh,Kh)));var ia=Oh-Cl[0],fe=jh-Cl[1];this.width=Qh,this.height=Kh,this.x=ia,this.y=fe,this.setDims(be*Qh,Ae*Kh),this.fixAndSetPosition()},xr=new WeakSet,pr=function(){var _ref32=_asyncToGenerator(_regeneratorRuntime().mark(function _callee8(){var _this28=this;var ue,se,be,Ae,ze;return _regeneratorRuntime().wrap(function _callee8$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:se=t$1(this,Y);if(se){_context8.next=3;break}return _context8.abrupt("return");case 3:if(!(!t$1(this,B)&&!t$1(this,Q))){_context8.next=6;break}se.classList.remove("done"),(ue=t$1(this,J))==null||ue.remove();return _context8.abrupt("return");case 6:ol._l10nPromise.get("editor_alt_text_edit_button_label").then(function(Ae){se.setAttribute("aria-label",Ae)});be=t$1(this,J);if(!be){Z(this,J,be=document.createElement("span")),be.className="tooltip",be.setAttribute("role","tooltip");Ae=be.id="alt-text-tooltip-".concat(this.id);se.setAttribute("aria-describedby",Ae);ze=100;se.addEventListener("mouseenter",function(){Z(_this28,it,setTimeout(function(){Z(_this28,it,null),t$1(_this28,J).classList.add("show"),_this28._uiManager._eventBus.dispatch("reporttelemetry",{source:_this28,details:{type:"editing",subtype:_this28.editorType,data:{action:"alt_text_tooltip"}}})},ze))}),se.addEventListener("mouseleave",function(){var pi;clearTimeout(t$1(_this28,it)),Z(_this28,it,null),(pi=t$1(_this28,J))==null||pi.classList.remove("show")})}se.classList.add("done");if(!t$1(this,Q)){_context8.next=16;break}_context8.next=13;return ol._l10nPromise.get("editor_alt_text_decorative_tooltip");case 13:_context8.t0=_context8.sent;_context8.next=17;break;case 16:_context8.t0=t$1(this,B);case 17:be.innerText=_context8.t0;be.parentNode||se.append(be);case 19:case"end":return _context8.stop()}},_callee8,this)}));return function pr(){return _ref32.apply(this,arguments)}}(),$e=new WeakSet,_r=function _r(ue){var _this29=this;if(!this._isDraggable)return;var se=this._uiManager.isSelected(this);this._uiManager.setUpDragSession();var be,Ae;se&&(be={passive:!0,capture:!0},Ae=function Ae(pi){var _this29$screenToPageT=_this29.screenToPageTranslation(pi.movementX,pi.movementY),_this29$screenToPageT2=_slicedToArray(_this29$screenToPageT,2),io=_this29$screenToPageT2[0],Qr=_this29$screenToPageT2[1];_this29._uiManager.dragSelectedEditors(io,Qr)},window.addEventListener("pointermove",Ae,be));var ze=function ze(){if(window.removeEventListener("pointerup",ze),window.removeEventListener("blur",ze),se&&window.removeEventListener("pointermove",Ae,be),Z(_this29,Ot,!1),!_this29._uiManager.endDragSession()){var pi=qe.FeatureTest.platform.isMac;ue.ctrlKey&&!pi||ue.shiftKey||ue.metaKey&&pi?_this29.parent.toggleSelected(_this29):_this29.parent.setSelected(_this29)}};window.addEventListener("pointerup",ze),window.addEventListener("blur",ze)},I(ol,Bt),ee(ol,"_borderLineWidth",-1),ee(ol,"_colorManager",new Ps.ColorManager),ee(ol,"_zIndex",1),ee(ol,"SMALL_EDITOR_SIZE",0);var Te=ol;o.AnnotationEditor=Te;var pe=function(_Te){_inherits(pe,_Te);function pe(se){var _this30;_classCallCheck(this,pe);_this30=_callSuper(this,pe,[se]),_this30.annotationElementId=se.annotationElementId,_this30.deleted=!0;return _this30}_createClass(pe,[{key:"serialize",value:function serialize(){return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex}}}]);return pe}(Te)},function(r,o,s){var B,Q,Y,J,it,nt,ot,dt,Mt,Ot,Qt,Ut,te,qt,ie,re,ne,ae,Bt,Wt,oe,ve,_e,Xe,He,ro,Xo,Se,xr,pr,$e,_r,Ps,qe,bl,ol,Te,pe,ue,se,be,Ae,ze,pi,io,Qr,Es,nl,Cr,$l,_l,Ih,Rh,Th,$s,Dr,Xi,Ke,ta,Cl,Oh,jh,qh,Bh,Jh,Xh,Qh,Kh,ia,fe,Me,kr;Object.defineProperty(o,"__esModule",{value:!0}),o.KeyboardManager=o.CommandManager=o.ColorManager=o.AnnotationEditorUIManager=void 0,o.bindEvents=wi,o.opacityToHex=Jo;var rn=s(1),Oe=s(6);function wi(ke,ye,Ie){var _iterator19=_createForOfIteratorHelper(Ie),_step19;try{for(_iterator19.s();!(_step19=_iterator19.n()).done;){var cr=_step19.value;ye.addEventListener(cr,ke[cr].bind(ke))}}catch(err){_iterator19.e(err)}finally{_iterator19.f()}}function Jo(ke){return Math.round(Math.min(255,Math.max(1,255*ke))).toString(16).padStart(2,"0")}var xl=function(){function xl(){_classCallCheck(this,xl);I(this,B,0)}_createClass(xl,[{key:"getId",value:function getId(){return"".concat(rn.AnnotationEditorPrefix).concat(ge(this,B)._++)}}]);return xl}();B=new WeakMap;var Pd=function(){function Pd(){_classCallCheck(this,Pd);I(this,it),I(this,Q,(0,rn.getUuid)()),I(this,Y,0),I(this,J,null)}_createClass(Pd,[{key:"getFromFile",value:function(){var _getFromFile=_asyncToGenerator(_regeneratorRuntime().mark(function _callee9(ye){var Ie,cr,lr,Ss;return _regeneratorRuntime().wrap(function _callee9$(_context9){while(1)switch(_context9.prev=_context9.next){case 0:Ie=ye.lastModified,cr=ye.name,lr=ye.size,Ss=ye.type;return _context9.abrupt("return",W(this,it,nt).call(this,"".concat(Ie,"_").concat(cr,"_").concat(lr,"_").concat(Ss),ye));case 2:case"end":return _context9.stop()}},_callee9,this)}));function getFromFile(_x4){return _getFromFile.apply(this,arguments)}return getFromFile}()},{key:"getFromUrl",value:function(){var _getFromUrl=_asyncToGenerator(_regeneratorRuntime().mark(function _callee10(ye){return _regeneratorRuntime().wrap(function _callee10$(_context10){while(1)switch(_context10.prev=_context10.next){case 0:return _context10.abrupt("return",W(this,it,nt).call(this,ye,ye));case 1:case"end":return _context10.stop()}},_callee10,this)}));function getFromUrl(_x5){return _getFromUrl.apply(this,arguments)}return getFromUrl}()},{key:"getFromId",value:function(){var _getFromId=_asyncToGenerator(_regeneratorRuntime().mark(function _callee11(ye){var Ie;return _regeneratorRuntime().wrap(function _callee11$(_context11){while(1)switch(_context11.prev=_context11.next){case 0:t$1(this,J)||Z(this,J,new Map);Ie=t$1(this,J).get(ye);return _context11.abrupt("return",Ie?Ie.bitmap?(Ie.refCounter+=1,Ie):Ie.file?this.getFromFile(Ie.file):this.getFromUrl(Ie.url):null);case 3:case"end":return _context11.stop()}},_callee11,this)}));function getFromId(_x6){return _getFromId.apply(this,arguments)}return getFromId}()},{key:"getSvgUrl",value:function getSvgUrl(ye){var Ie=t$1(this,J).get(ye);return Ie!=null&&Ie.isSvg?Ie.svgUrl:null}},{key:"deleteId",value:function deleteId(ye){t$1(this,J)||Z(this,J,new Map);var Ie=t$1(this,J).get(ye);Ie&&(Ie.refCounter-=1,Ie.refCounter===0&&(Ie.bitmap=null))}},{key:"isValidId",value:function isValidId(ye){return ye.startsWith("image_".concat(t$1(this,Q),"_"))}}],[{key:"_isSVGFittingCanvas",get:function get(){var ye="data:image/svg+xml;charset=UTF-8,<svg viewBox=\"0 0 1 1\" width=\"1\" height=\"1\" xmlns=\"http://www.w3.org/2000/svg\"><rect width=\"1\" height=\"1\" style=\"fill:red;\"/></svg>",Ie=new OffscreenCanvas(1,3).getContext("2d"),cr=new Image;cr.src=ye;var lr=cr.decode().then(function(){return Ie.drawImage(cr,0,0,1,1,0,0,1,3),new Uint32Array(Ie.getImageData(0,0,1,1).data.buffer)[0]===0});return(0,rn.shadow)(this,"_isSVGFittingCanvas",lr)}}]);return Pd}();Q=new WeakMap,Y=new WeakMap,J=new WeakMap,it=new WeakSet,nt=function(){var _ref33=_asyncToGenerator(_regeneratorRuntime().mark(function _callee13(ke,ye){var Ie,cr,lr,_lr,Ss,kl,Wh;return _regeneratorRuntime().wrap(function _callee13$(_context13){while(1)switch(_context13.prev=_context13.next){case 0:t$1(this,J)||Z(this,J,new Map);Ie=t$1(this,J).get(ke);if(!(Ie===null)){_context13.next=4;break}return _context13.abrupt("return",null);case 4:if(!(Ie!=null&&Ie.bitmap)){_context13.next=6;break}return _context13.abrupt("return",(Ie.refCounter+=1,Ie));case 6:_context13.prev=6;Ie||(Ie={bitmap:null,id:"image_".concat(t$1(this,Q),"_").concat(ge(this,Y)._++),refCounter:0,isSvg:!1});if(!(typeof ye=="string")){_context13.next=20;break}Ie.url=ye;_context13.next=12;return fetch(ye);case 12:lr=_context13.sent;if(lr.ok){_context13.next=15;break}throw new Error(lr.statusText);case 15:_context13.next=17;return lr.blob();case 17:cr=_context13.sent;_context13.next=21;break;case 20:cr=Ie.file=ye;case 21:if(!(cr.type==="image/svg+xml")){_context13.next=28;break}_lr=Pd._isSVGFittingCanvas,Ss=new FileReader,kl=new Image,Wh=new Promise(function(zh,Fh){kl.onload=function(){Ie.bitmap=kl,Ie.isSvg=!0,zh()},Ss.onload=_asyncToGenerator(_regeneratorRuntime().mark(function _callee12(){var tu;return _regeneratorRuntime().wrap(function _callee12$(_context12){while(1)switch(_context12.prev=_context12.next){case 0:tu=Ie.svgUrl=Ss.result;_context12.next=3;return _lr;case 3:if(!_context12.sent){_context12.next=7;break}_context12.t0="".concat(tu,"#svgView(preserveAspectRatio(none))");_context12.next=8;break;case 7:_context12.t0=tu;case 8:kl.src=_context12.t0;case 9:case"end":return _context12.stop()}},_callee12)})),kl.onerror=Ss.onerror=Fh});Ss.readAsDataURL(cr);_context13.next=26;return Wh;case 26:_context13.next=31;break;case 28:_context13.next=30;return createImageBitmap(cr);case 30:Ie.bitmap=_context13.sent;case 31:Ie.refCounter=1;_context13.next=37;break;case 34:_context13.prev=34;_context13.t0=_context13["catch"](6);console.error(_context13.t0),Ie=null;case 37:return _context13.abrupt("return",(t$1(this,J).set(ke,Ie),Ie&&t$1(this,J).set(Ie.id,Ie),Ie));case 38:case"end":return _context13.stop()}},_callee13,this,[[6,34]])}));return function nt(_x7,_x8){return _ref33.apply(this,arguments)}}();var Dh=Pd;var Vh=function(){function Vh(){var ye=arguments.length>0&&arguments[0]!==undefined?arguments[0]:128;_classCallCheck(this,Vh);I(this,ot,[]),I(this,dt,!1),I(this,Mt,void 0),I(this,Ot,-1),Z(this,Mt,ye)}_createClass(Vh,[{key:"add",value:function add(_ref35){var ye=_ref35.cmd,Ie=_ref35.undo,cr=_ref35.mustExec,_ref35$type=_ref35.type,lr=_ref35$type===void 0?NaN:_ref35$type,_ref35$overwriteIfSam=_ref35.overwriteIfSameType,Ss=_ref35$overwriteIfSam===void 0?!1:_ref35$overwriteIfSam,_ref35$keepUndo=_ref35.keepUndo,kl=_ref35$keepUndo===void 0?!1:_ref35$keepUndo;if(cr&&ye(),t$1(this,dt))return;var Wh={cmd:ye,undo:Ie,type:lr};if(t$1(this,Ot)===-1){t$1(this,ot).length>0&&(t$1(this,ot).length=0),Z(this,Ot,0),t$1(this,ot).push(Wh);return}if(Ss&&t$1(this,ot)[t$1(this,Ot)].type===lr){kl&&(Wh.undo=t$1(this,ot)[t$1(this,Ot)].undo),t$1(this,ot)[t$1(this,Ot)]=Wh;return}var zh=t$1(this,Ot)+1;zh===t$1(this,Mt)?t$1(this,ot).splice(0,1):(Z(this,Ot,zh),zh<t$1(this,ot).length&&t$1(this,ot).splice(zh)),t$1(this,ot).push(Wh)}},{key:"undo",value:function undo(){t$1(this,Ot)!==-1&&(Z(this,dt,!0),t$1(this,ot)[t$1(this,Ot)].undo(),Z(this,dt,!1),Z(this,Ot,t$1(this,Ot)-1))}},{key:"redo",value:function redo(){t$1(this,Ot)<t$1(this,ot).length-1&&(Z(this,Ot,t$1(this,Ot)+1),Z(this,dt,!0),t$1(this,ot)[t$1(this,Ot)].cmd(),Z(this,dt,!1))}},{key:"hasSomethingToUndo",value:function hasSomethingToUndo(){return t$1(this,Ot)!==-1}},{key:"hasSomethingToRedo",value:function hasSomethingToRedo(){return t$1(this,Ot)<t$1(this,ot).length-1}},{key:"destroy",value:function destroy(){Z(this,ot,null)}}]);return Vh}();ot=new WeakMap,dt=new WeakMap,Mt=new WeakMap,Ot=new WeakMap,o.CommandManager=Vh;var Ed=function(){function Ed(ye){_classCallCheck(this,Ed);I(this,Qt),this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;var Ie=rn.FeatureTest.platform.isMac;var _iterator20=_createForOfIteratorHelper(ye),_step20;try{for(_iterator20.s();!(_step20=_iterator20.n()).done;){var _step20$value=_slicedToArray(_step20.value,3),cr=_step20$value[0],lr=_step20$value[1],_step20$value$=_step20$value[2],Ss=_step20$value$===void 0?{}:_step20$value$;var _iterator21=_createForOfIteratorHelper(cr),_step21;try{for(_iterator21.s();!(_step21=_iterator21.n()).done;){var kl=_step21.value;var Wh=kl.startsWith("mac+");Ie&&Wh?(this.callbacks.set(kl.slice(4),{callback:lr,options:Ss}),this.allKeys.add(kl.split("+").at(-1))):!Ie&&!Wh&&(this.callbacks.set(kl,{callback:lr,options:Ss}),this.allKeys.add(kl.split("+").at(-1)))}}catch(err){_iterator21.e(err)}finally{_iterator21.f()}}}catch(err){_iterator20.e(err)}finally{_iterator20.f()}}_createClass(Ed,[{key:"exec",value:function exec(ye,Ie){if(!this.allKeys.has(Ie.key))return;var cr=this.callbacks.get(W(this,Qt,Ut).call(this,Ie));if(!cr)return;var lr=cr.callback,_cr$options=cr.options,_cr$options$bubbles=_cr$options.bubbles,Ss=_cr$options$bubbles===void 0?!1:_cr$options$bubbles,_cr$options$args=_cr$options.args,kl=_cr$options$args===void 0?[]:_cr$options$args,_cr$options$checker=_cr$options.checker,Wh=_cr$options$checker===void 0?null:_cr$options$checker;Wh&&!Wh(ye,Ie)||(lr.bind.apply(lr,[ye].concat(_toConsumableArray(kl)))(),Ss||(Ie.stopPropagation(),Ie.preventDefault()))}}]);return Ed}();Qt=new WeakSet,Ut=function Ut(ke){ke.altKey&&this.buffer.push("alt"),ke.ctrlKey&&this.buffer.push("ctrl"),ke.metaKey&&this.buffer.push("meta"),ke.shiftKey&&this.buffer.push("shift"),this.buffer.push(ke.key);var ye=this.buffer.join("+");return this.buffer.length=0,ye},o.KeyboardManager=Ed;var Nh=function(){function Pm(){_classCallCheck(this,Pm)}_createClass(Pm,[{key:"_colors",get:function get(){var ye=new Map([["CanvasText",null],["Canvas",null]]);return(0,Oe.getColorValues)(ye),(0,rn.shadow)(this,"_colors",ye)}},{key:"convert",value:function convert(ye){var Ie=(0,Oe.getRGB)(ye);if(!window.matchMedia("(forced-colors: active)").matches)return Ie;var _iterator22=_createForOfIteratorHelper(this._colors),_step22;try{for(_iterator22.s();!(_step22=_iterator22.n()).done;){var _step22$value=_slicedToArray(_step22.value,2),cr=_step22$value[0],lr=_step22$value[1];if(lr.every(function(Ss,kl){return Ss===Ie[kl]}))return Pm._colorsMapping.get(cr)}}catch(err){_iterator22.e(err)}finally{_iterator22.f()}return Ie}},{key:"getHexCode",value:function getHexCode(ye){var _rn$Util;var Ie=this._colors.get(ye);return Ie?(_rn$Util=rn.Util).makeHexColor.apply(_rn$Util,_toConsumableArray(Ie)):ye}}]);return Pm}();ee(Nh,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]));var Zh=Nh;o.ColorManager=Zh;var py=function(){function Cm(ye,Ie,cr,lr,Ss,kl){_classCallCheck(this,Cm);I(this,Es),I(this,Cr),I(this,_l),I(this,Rh),I(this,$s),I(this,Xi),I(this,ta),I(this,Oh),I(this,qh),I(this,Jh),I(this,Qh),I(this,ia),I(this,Me),I(this,te,null),I(this,qt,new Map),I(this,ie,new Map),I(this,re,null),I(this,ne,null),I(this,ae,new Vh),I(this,Bt,0),I(this,Wt,new Set),I(this,oe,null),I(this,ve,null),I(this,_e,new Set),I(this,Xe,null),I(this,He,new xl),I(this,ro,!1),I(this,Xo,!1),I(this,Se,null),I(this,xr,rn.AnnotationEditorType.NONE),I(this,pr,new Set),I(this,$e,null),I(this,_r,this.blur.bind(this)),I(this,Ps,this.focus.bind(this)),I(this,qe,this.copy.bind(this)),I(this,bl,this.cut.bind(this)),I(this,ol,this.paste.bind(this)),I(this,Te,this.keydown.bind(this)),I(this,pe,this.onEditingAction.bind(this)),I(this,ue,this.onPageChanging.bind(this)),I(this,se,this.onScaleChanging.bind(this)),I(this,be,this.onRotationChanging.bind(this)),I(this,Ae,{isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1}),I(this,ze,[0,0]),I(this,pi,null),I(this,io,null),I(this,Qr,null),Z(this,io,ye),Z(this,Qr,Ie),Z(this,re,cr),this._eventBus=lr,this._eventBus._on("editingaction",t$1(this,pe)),this._eventBus._on("pagechanging",t$1(this,ue)),this._eventBus._on("scalechanging",t$1(this,se)),this._eventBus._on("rotationchanging",t$1(this,be)),Z(this,ne,Ss.annotationStorage),Z(this,Xe,Ss.filterFactory),Z(this,$e,kl),this.viewParameters={realScale:Oe.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:0}}_createClass(Cm,[{key:"destroy",value:function destroy(){W(this,Rh,Th).call(this),W(this,Cr,$l).call(this),this._eventBus._off("editingaction",t$1(this,pe)),this._eventBus._off("pagechanging",t$1(this,ue)),this._eventBus._off("scalechanging",t$1(this,se)),this._eventBus._off("rotationchanging",t$1(this,be));var _iterator23=_createForOfIteratorHelper(t$1(this,ie).values()),_step23;try{for(_iterator23.s();!(_step23=_iterator23.n()).done;){var ye=_step23.value;ye.destroy()}}catch(err){_iterator23.e(err)}finally{_iterator23.f()}t$1(this,ie).clear(),t$1(this,qt).clear(),t$1(this,_e).clear(),Z(this,te,null),t$1(this,pr).clear(),t$1(this,ae).destroy(),t$1(this,re).destroy()}},{key:"hcmFilter",get:function get(){return(0,rn.shadow)(this,"hcmFilter",t$1(this,$e)?t$1(this,Xe).addHCMFilter(t$1(this,$e).foreground,t$1(this,$e).background):"none")}},{key:"direction",get:function get(){return(0,rn.shadow)(this,"direction",getComputedStyle(t$1(this,io)).direction)}},{key:"editAltText",value:function editAltText(ye){var Ie;(Ie=t$1(this,re))==null||Ie.editAltText(this,ye)}},{key:"onPageChanging",value:function onPageChanging(_ref36){var ye=_ref36.pageNumber;Z(this,Bt,ye-1)}},{key:"focusMainContainer",value:function focusMainContainer(){t$1(this,io).focus()}},{key:"findParent",value:function findParent(ye,Ie){var _iterator24=_createForOfIteratorHelper(t$1(this,ie).values()),_step24;try{for(_iterator24.s();!(_step24=_iterator24.n()).done;){var cr=_step24.value;var _cr$div$getBoundingCl=cr.div.getBoundingClientRect(),lr=_cr$div$getBoundingCl.x,Ss=_cr$div$getBoundingCl.y,kl=_cr$div$getBoundingCl.width,Wh=_cr$div$getBoundingCl.height;if(ye>=lr&&ye<=lr+kl&&Ie>=Ss&&Ie<=Ss+Wh)return cr}}catch(err){_iterator24.e(err)}finally{_iterator24.f()}return null}},{key:"disableUserSelect",value:function disableUserSelect(){var ye=arguments.length>0&&arguments[0]!==undefined?arguments[0]:!1;t$1(this,Qr).classList.toggle("noUserSelect",ye)}},{key:"addShouldRescale",value:function addShouldRescale(ye){t$1(this,_e).add(ye)}},{key:"removeShouldRescale",value:function removeShouldRescale(ye){t$1(this,_e)["delete"](ye)}},{key:"onScaleChanging",value:function onScaleChanging(_ref37){var ye=_ref37.scale;this.commitOrRemove(),this.viewParameters.realScale=ye*Oe.PixelsPerInch.PDF_TO_CSS_UNITS;var _iterator25=_createForOfIteratorHelper(t$1(this,_e)),_step25;try{for(_iterator25.s();!(_step25=_iterator25.n()).done;){var Ie=_step25.value;Ie.onScaleChanging()}}catch(err){_iterator25.e(err)}finally{_iterator25.f()}}},{key:"onRotationChanging",value:function onRotationChanging(_ref38){var ye=_ref38.pagesRotation;this.commitOrRemove(),this.viewParameters.rotation=ye}},{key:"addToAnnotationStorage",value:function addToAnnotationStorage(ye){!ye.isEmpty()&&t$1(this,ne)&&!t$1(this,ne).has(ye.id)&&t$1(this,ne).setValue(ye.id,ye)}},{key:"blur",value:function blur(){if(!this.hasSelection)return;var _document=document,ye=_document.activeElement;var _iterator26=_createForOfIteratorHelper(t$1(this,pr)),_step26;try{for(_iterator26.s();!(_step26=_iterator26.n()).done;){var Ie=_step26.value;if(Ie.div.contains(ye)){Z(this,Se,[Ie,ye]),Ie._focusEventsAllowed=!1;break}}}catch(err){_iterator26.e(err)}finally{_iterator26.f()}}},{key:"focus",value:function focus(){if(!t$1(this,Se))return;var _t$2=t$1(this,Se),_t$3=_slicedToArray(_t$2,2),ye=_t$3[0],Ie=_t$3[1];Z(this,Se,null),Ie.addEventListener("focusin",function(){ye._focusEventsAllowed=!0},{once:!0}),Ie.focus()}},{key:"addEditListeners",value:function addEditListeners(){W(this,_l,Ih).call(this),W(this,$s,Dr).call(this)}},{key:"removeEditListeners",value:function removeEditListeners(){W(this,Rh,Th).call(this),W(this,Xi,Ke).call(this)}},{key:"copy",value:function copy(ye){var Ie;if(ye.preventDefault(),(Ie=t$1(this,te))==null||Ie.commitOrRemove(),!this.hasSelection)return;var cr=[];var _iterator27=_createForOfIteratorHelper(t$1(this,pr)),_step27;try{for(_iterator27.s();!(_step27=_iterator27.n()).done;){var lr=_step27.value;var Ss=lr.serialize(!0);Ss&&cr.push(Ss)}}catch(err){_iterator27.e(err)}finally{_iterator27.f()}cr.length!==0&&ye.clipboardData.setData("application/pdfjs",JSON.stringify(cr))}},{key:"cut",value:function cut(ye){this.copy(ye),this["delete"]()}},{key:"paste",value:function paste(ye){var _this31=this;ye.preventDefault();var Ie=ye.clipboardData;var _iterator28=_createForOfIteratorHelper(Ie.items),_step28;try{for(_iterator28.s();!(_step28=_iterator28.n()).done;){var _Ss3=_step28.value;var _iterator30=_createForOfIteratorHelper(t$1(this,ve)),_step30;try{for(_iterator30.s();!(_step30=_iterator30.n()).done;){var _kl=_step30.value;if(_kl.isHandlingMimeForPasting(_Ss3.type)){_kl.paste(_Ss3,this.currentLayer);return}}}catch(err){_iterator30.e(err)}finally{_iterator30.f()}}}catch(err){_iterator28.e(err)}finally{_iterator28.f()}var cr=Ie.getData("application/pdfjs");if(!cr)return;try{cr=JSON.parse(cr)}catch(Ss){(0,rn.warn)("paste: \"".concat(Ss.message,"\"."));return}if(!Array.isArray(cr))return;this.unselectAll();var lr=this.currentLayer;try{var Ss=[];var _iterator29=_createForOfIteratorHelper(cr),_step29;try{for(_iterator29.s();!(_step29=_iterator29.n()).done;){var zh=_step29.value;var Fh=lr.deserialize(zh);if(!Fh)return;Ss.push(Fh)}}catch(err){_iterator29.e(err)}finally{_iterator29.f()}var kl=function kl(){for(var _i5=0,_Ss=Ss;_i5<_Ss.length;_i5++){var zh=_Ss[_i5];W(_this31,Qh,Kh).call(_this31,zh)}W(_this31,Me,kr).call(_this31,Ss)},Wh=function Wh(){for(var _i6=0,_Ss2=Ss;_i6<_Ss2.length;_i6++){var zh=_Ss2[_i6];zh.remove()}};this.addCommands({cmd:kl,undo:Wh,mustExec:!0})}catch(Ss){(0,rn.warn)("paste: \"".concat(Ss.message,"\"."))}}},{key:"keydown",value:function keydown(ye){var Ie;(Ie=this.getActive())!=null&&Ie.shouldGetKeyboardEvents()||Cm._keyboardManager.exec(this,ye)}},{key:"onEditingAction",value:function onEditingAction(ye){["undo","redo","delete","selectAll"].includes(ye.name)&&this[ye.name]()}},{key:"setEditingState",value:function setEditingState(ye){ye?(W(this,Es,nl).call(this),W(this,_l,Ih).call(this),W(this,$s,Dr).call(this),W(this,ta,Cl).call(this,{isEditing:t$1(this,xr)!==rn.AnnotationEditorType.NONE,isEmpty:W(this,ia,fe).call(this),hasSomethingToUndo:t$1(this,ae).hasSomethingToUndo(),hasSomethingToRedo:t$1(this,ae).hasSomethingToRedo(),hasSelectedEditor:!1})):(W(this,Cr,$l).call(this),W(this,Rh,Th).call(this),W(this,Xi,Ke).call(this),W(this,ta,Cl).call(this,{isEditing:!1}),this.disableUserSelect(!1))}},{key:"registerEditorTypes",value:function registerEditorTypes(ye){if(!t$1(this,ve)){Z(this,ve,ye);var _iterator31=_createForOfIteratorHelper(t$1(this,ve)),_step31;try{for(_iterator31.s();!(_step31=_iterator31.n()).done;){var Ie=_step31.value;W(this,Oh,jh).call(this,Ie.defaultPropertiesToUpdate)}}catch(err){_iterator31.e(err)}finally{_iterator31.f()}}}},{key:"getId",value:function getId(){return t$1(this,He).getId()}},{key:"currentLayer",get:function get(){return t$1(this,ie).get(t$1(this,Bt))}},{key:"getLayer",value:function getLayer(ye){return t$1(this,ie).get(ye)}},{key:"currentPageIndex",get:function get(){return t$1(this,Bt)}},{key:"addLayer",value:function addLayer(ye){t$1(this,ie).set(ye.pageIndex,ye),t$1(this,ro)?ye.enable():ye.disable()}},{key:"removeLayer",value:function removeLayer(ye){t$1(this,ie)["delete"](ye.pageIndex)}},{key:"updateMode",value:function updateMode(ye){var Ie=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;if(t$1(this,xr)!==ye){if(Z(this,xr,ye),ye===rn.AnnotationEditorType.NONE){this.setEditingState(!1),W(this,Jh,Xh).call(this);return}this.setEditingState(!0),W(this,qh,Bh).call(this),this.unselectAll();var _iterator32=_createForOfIteratorHelper(t$1(this,ie).values()),_step32;try{for(_iterator32.s();!(_step32=_iterator32.n()).done;){var _cr=_step32.value;_cr.updateMode(ye)}}catch(err){_iterator32.e(err)}finally{_iterator32.f()}if(Ie){var _iterator33=_createForOfIteratorHelper(t$1(this,qt).values()),_step33;try{for(_iterator33.s();!(_step33=_iterator33.n()).done;){var cr=_step33.value;if(cr.annotationElementId===Ie){this.setSelected(cr),cr.enterInEditMode();break}}}catch(err){_iterator33.e(err)}finally{_iterator33.f()}}}}},{key:"updateToolbar",value:function updateToolbar(ye){ye!==t$1(this,xr)&&this._eventBus.dispatch("switchannotationeditormode",{source:this,mode:ye})}},{key:"updateParams",value:function updateParams(ye,Ie){if(t$1(this,ve)){if(ye===rn.AnnotationEditorParamsType.CREATE){this.currentLayer.addNewEditor(ye);return}var _iterator34=_createForOfIteratorHelper(t$1(this,pr)),_step34;try{for(_iterator34.s();!(_step34=_iterator34.n()).done;){var cr=_step34.value;cr.updateParams(ye,Ie)}}catch(err){_iterator34.e(err)}finally{_iterator34.f()}var _iterator35=_createForOfIteratorHelper(t$1(this,ve)),_step35;try{for(_iterator35.s();!(_step35=_iterator35.n()).done;){var _cr2=_step35.value;_cr2.updateDefaultParams(ye,Ie)}}catch(err){_iterator35.e(err)}finally{_iterator35.f()}}}},{key:"enableWaiting",value:function enableWaiting(){var ye=arguments.length>0&&arguments[0]!==undefined?arguments[0]:!1;if(t$1(this,Xo)!==ye){Z(this,Xo,ye);var _iterator36=_createForOfIteratorHelper(t$1(this,ie).values()),_step36;try{for(_iterator36.s();!(_step36=_iterator36.n()).done;){var Ie=_step36.value;ye?Ie.disableClick():Ie.enableClick(),Ie.div.classList.toggle("waiting",ye)}}catch(err){_iterator36.e(err)}finally{_iterator36.f()}}}},{key:"getEditors",value:function getEditors(ye){var Ie=[];var _iterator37=_createForOfIteratorHelper(t$1(this,qt).values()),_step37;try{for(_iterator37.s();!(_step37=_iterator37.n()).done;){var cr=_step37.value;cr.pageIndex===ye&&Ie.push(cr)}}catch(err){_iterator37.e(err)}finally{_iterator37.f()}return Ie}},{key:"getEditor",value:function getEditor(ye){return t$1(this,qt).get(ye)}},{key:"addEditor",value:function addEditor(ye){t$1(this,qt).set(ye.id,ye)}},{key:"removeEditor",value:function removeEditor(ye){var Ie;t$1(this,qt)["delete"](ye.id),this.unselect(ye),(!ye.annotationElementId||!t$1(this,Wt).has(ye.annotationElementId))&&((Ie=t$1(this,ne))==null||Ie.remove(ye.id))}},{key:"addDeletedAnnotationElement",value:function addDeletedAnnotationElement(ye){t$1(this,Wt).add(ye.annotationElementId),ye.deleted=!0}},{key:"isDeletedAnnotationElement",value:function isDeletedAnnotationElement(ye){return t$1(this,Wt).has(ye)}},{key:"removeDeletedAnnotationElement",value:function removeDeletedAnnotationElement(ye){t$1(this,Wt)["delete"](ye.annotationElementId),ye.deleted=!1}},{key:"setActiveEditor",value:function setActiveEditor(ye){t$1(this,te)!==ye&&(Z(this,te,ye),ye&&W(this,Oh,jh).call(this,ye.propertiesToUpdate))}},{key:"toggleSelected",value:function toggleSelected(ye){if(t$1(this,pr).has(ye)){t$1(this,pr)["delete"](ye),ye.unselect(),W(this,ta,Cl).call(this,{hasSelectedEditor:this.hasSelection});return}t$1(this,pr).add(ye),ye.select(),W(this,Oh,jh).call(this,ye.propertiesToUpdate),W(this,ta,Cl).call(this,{hasSelectedEditor:!0})}},{key:"setSelected",value:function setSelected(ye){var _iterator38=_createForOfIteratorHelper(t$1(this,pr)),_step38;try{for(_iterator38.s();!(_step38=_iterator38.n()).done;){var Ie=_step38.value;Ie!==ye&&Ie.unselect()}}catch(err){_iterator38.e(err)}finally{_iterator38.f()}t$1(this,pr).clear(),t$1(this,pr).add(ye),ye.select(),W(this,Oh,jh).call(this,ye.propertiesToUpdate),W(this,ta,Cl).call(this,{hasSelectedEditor:!0})}},{key:"isSelected",value:function isSelected(ye){return t$1(this,pr).has(ye)}},{key:"unselect",value:function unselect(ye){ye.unselect(),t$1(this,pr)["delete"](ye),W(this,ta,Cl).call(this,{hasSelectedEditor:this.hasSelection})}},{key:"hasSelection",get:function get(){return t$1(this,pr).size!==0}},{key:"undo",value:function undo(){t$1(this,ae).undo(),W(this,ta,Cl).call(this,{hasSomethingToUndo:t$1(this,ae).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:W(this,ia,fe).call(this)})}},{key:"redo",value:function redo(){t$1(this,ae).redo(),W(this,ta,Cl).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:t$1(this,ae).hasSomethingToRedo(),isEmpty:W(this,ia,fe).call(this)})}},{key:"addCommands",value:function addCommands(ye){t$1(this,ae).add(ye),W(this,ta,Cl).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:W(this,ia,fe).call(this)})}},{key:"delete",value:function _delete(){var _this32=this;if(this.commitOrRemove(),!this.hasSelection)return;var ye=_toConsumableArray(t$1(this,pr)),Ie=function Ie(){var _iterator39=_createForOfIteratorHelper(ye),_step39;try{for(_iterator39.s();!(_step39=_iterator39.n()).done;){var lr=_step39.value;lr.remove()}}catch(err){_iterator39.e(err)}finally{_iterator39.f()}},cr=function cr(){var _iterator40=_createForOfIteratorHelper(ye),_step40;try{for(_iterator40.s();!(_step40=_iterator40.n()).done;){var lr=_step40.value;W(_this32,Qh,Kh).call(_this32,lr)}}catch(err){_iterator40.e(err)}finally{_iterator40.f()}};this.addCommands({cmd:Ie,undo:cr,mustExec:!0})}},{key:"commitOrRemove",value:function commitOrRemove(){var ye;(ye=t$1(this,te))==null||ye.commitOrRemove()}},{key:"hasSomethingToControl",value:function hasSomethingToControl(){return t$1(this,te)||this.hasSelection}},{key:"selectAll",value:function selectAll(){var _iterator41=_createForOfIteratorHelper(t$1(this,pr)),_step41;try{for(_iterator41.s();!(_step41=_iterator41.n()).done;){var ye=_step41.value;ye.commit()}}catch(err){_iterator41.e(err)}finally{_iterator41.f()}W(this,Me,kr).call(this,t$1(this,qt).values())}},{key:"unselectAll",value:function unselectAll(){if(t$1(this,te)){t$1(this,te).commitOrRemove();return}if(this.hasSelection){var _iterator42=_createForOfIteratorHelper(t$1(this,pr)),_step42;try{for(_iterator42.s();!(_step42=_iterator42.n()).done;){var ye=_step42.value;ye.unselect()}}catch(err){_iterator42.e(err)}finally{_iterator42.f()}t$1(this,pr).clear(),W(this,ta,Cl).call(this,{hasSelectedEditor:!1})}}},{key:"translateSelectedEditors",value:function translateSelectedEditors(ye,Ie){var _this33=this;var cr=arguments.length>2&&arguments[2]!==undefined?arguments[2]:!1;if(cr||this.commitOrRemove(),!this.hasSelection)return;t$1(this,ze)[0]+=ye,t$1(this,ze)[1]+=Ie;var _t$4=t$1(this,ze),_t$5=_slicedToArray(_t$4,2),lr=_t$5[0],Ss=_t$5[1],kl=_toConsumableArray(t$1(this,pr));t$1(this,pi)&&clearTimeout(t$1(this,pi)),Z(this,pi,setTimeout(function(){Z(_this33,pi,null),t$1(_this33,ze)[0]=t$1(_this33,ze)[1]=0,_this33.addCommands({cmd:function cmd(){var _iterator43=_createForOfIteratorHelper(kl),_step43;try{for(_iterator43.s();!(_step43=_iterator43.n()).done;){var zh=_step43.value;t$1(_this33,qt).has(zh.id)&&zh.translateInPage(lr,Ss)}}catch(err){_iterator43.e(err)}finally{_iterator43.f()}},undo:function undo(){var _iterator44=_createForOfIteratorHelper(kl),_step44;try{for(_iterator44.s();!(_step44=_iterator44.n()).done;){var zh=_step44.value;t$1(_this33,qt).has(zh.id)&&zh.translateInPage(-lr,-Ss)}}catch(err){_iterator44.e(err)}finally{_iterator44.f()}},mustExec:!1})},1e3));var _iterator45=_createForOfIteratorHelper(kl),_step45;try{for(_iterator45.s();!(_step45=_iterator45.n()).done;){var zh=_step45.value;zh.translateInPage(ye,Ie)}}catch(err){_iterator45.e(err)}finally{_iterator45.f()}}},{key:"setUpDragSession",value:function setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),Z(this,oe,new Map);var _iterator46=_createForOfIteratorHelper(t$1(this,pr)),_step46;try{for(_iterator46.s();!(_step46=_iterator46.n()).done;){var ye=_step46.value;t$1(this,oe).set(ye,{savedX:ye.x,savedY:ye.y,savedPageIndex:ye.pageIndex,newX:0,newY:0,newPageIndex:-1})}}catch(err){_iterator46.e(err)}finally{_iterator46.f()}}}},{key:"endDragSession",value:function endDragSession(){var _this34=this;if(!t$1(this,oe))return!1;this.disableUserSelect(!1);var ye=t$1(this,oe);Z(this,oe,null);var Ie=!1;var _iterator47=_createForOfIteratorHelper(ye),_step47;try{for(_iterator47.s();!(_step47=_iterator47.n()).done;){var _step47$value=_slicedToArray(_step47.value,2),_step47$value$=_step47$value[0],lr=_step47$value$.x,Ss=_step47$value$.y,kl=_step47$value$.pageIndex,Wh=_step47$value[1];Wh.newX=lr,Wh.newY=Ss,Wh.newPageIndex=kl,Ie||(Ie=lr!==Wh.savedX||Ss!==Wh.savedY||kl!==Wh.savedPageIndex)}}catch(err){_iterator47.e(err)}finally{_iterator47.f()}if(!Ie)return!1;var cr=function cr(lr,Ss,kl,Wh){if(t$1(_this34,qt).has(lr.id)){var zh=t$1(_this34,ie).get(Wh);zh?lr._setParentAndPosition(zh,Ss,kl):(lr.pageIndex=Wh,lr.x=Ss,lr.y=kl)}};return this.addCommands({cmd:function cmd(){var _iterator48=_createForOfIteratorHelper(ye),_step48;try{for(_iterator48.s();!(_step48=_iterator48.n()).done;){var _step48$value=_slicedToArray(_step48.value,2),lr=_step48$value[0],_step48$value$=_step48$value[1],Ss=_step48$value$.newX,kl=_step48$value$.newY,Wh=_step48$value$.newPageIndex;cr(lr,Ss,kl,Wh)}}catch(err){_iterator48.e(err)}finally{_iterator48.f()}},undo:function undo(){var _iterator49=_createForOfIteratorHelper(ye),_step49;try{for(_iterator49.s();!(_step49=_iterator49.n()).done;){var _step49$value=_slicedToArray(_step49.value,2),lr=_step49$value[0],_step49$value$=_step49$value[1],Ss=_step49$value$.savedX,kl=_step49$value$.savedY,Wh=_step49$value$.savedPageIndex;cr(lr,Ss,kl,Wh)}}catch(err){_iterator49.e(err)}finally{_iterator49.f()}},mustExec:!0}),!0}},{key:"dragSelectedEditors",value:function dragSelectedEditors(ye,Ie){if(t$1(this,oe)){var _iterator50=_createForOfIteratorHelper(t$1(this,oe).keys()),_step50;try{for(_iterator50.s();!(_step50=_iterator50.n()).done;){var cr=_step50.value;cr.drag(ye,Ie)}}catch(err){_iterator50.e(err)}finally{_iterator50.f()}}}},{key:"rebuild",value:function rebuild(ye){if(ye.parent===null){var Ie=this.getLayer(ye.pageIndex);Ie?(Ie.changeParent(ye),Ie.addOrRebuild(ye)):(this.addEditor(ye),this.addToAnnotationStorage(ye),ye.rebuild())}else ye.parent.addOrRebuild(ye)}},{key:"isActive",value:function isActive(ye){return t$1(this,te)===ye}},{key:"getActive",value:function getActive(){return t$1(this,te)}},{key:"getMode",value:function getMode(){return t$1(this,xr)}},{key:"imageManager",get:function get(){return(0,rn.shadow)(this,"imageManager",new Dh)}}],[{key:"_keyboardManager",get:function get(){var ye=Cm.prototype,Ie=function Ie(Ss){var _document2=document,kl=_document2.activeElement;return kl&&t$1(Ss,io).contains(kl)&&Ss.hasSomethingToControl()},cr=this.TRANSLATE_SMALL,lr=this.TRANSLATE_BIG;return(0,rn.shadow)(this,"_keyboardManager",new Ed([[["ctrl+a","mac+meta+a"],ye.selectAll],[["ctrl+z","mac+meta+z"],ye.undo],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],ye.redo],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],ye["delete"]],[["Escape","mac+Escape"],ye.unselectAll],[["ArrowLeft","mac+ArrowLeft"],ye.translateSelectedEditors,{args:[-cr,0],checker:Ie}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],ye.translateSelectedEditors,{args:[-lr,0],checker:Ie}],[["ArrowRight","mac+ArrowRight"],ye.translateSelectedEditors,{args:[cr,0],checker:Ie}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],ye.translateSelectedEditors,{args:[lr,0],checker:Ie}],[["ArrowUp","mac+ArrowUp"],ye.translateSelectedEditors,{args:[0,-cr],checker:Ie}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],ye.translateSelectedEditors,{args:[0,-lr],checker:Ie}],[["ArrowDown","mac+ArrowDown"],ye.translateSelectedEditors,{args:[0,cr],checker:Ie}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],ye.translateSelectedEditors,{args:[0,lr],checker:Ie}]]))}}]);return Cm}();te=new WeakMap,qt=new WeakMap,ie=new WeakMap,re=new WeakMap,ne=new WeakMap,ae=new WeakMap,Bt=new WeakMap,Wt=new WeakMap,oe=new WeakMap,ve=new WeakMap,_e=new WeakMap,Xe=new WeakMap,He=new WeakMap,ro=new WeakMap,Xo=new WeakMap,Se=new WeakMap,xr=new WeakMap,pr=new WeakMap,$e=new WeakMap,_r=new WeakMap,Ps=new WeakMap,qe=new WeakMap,bl=new WeakMap,ol=new WeakMap,Te=new WeakMap,pe=new WeakMap,ue=new WeakMap,se=new WeakMap,be=new WeakMap,Ae=new WeakMap,ze=new WeakMap,pi=new WeakMap,io=new WeakMap,Qr=new WeakMap,Es=new WeakSet,nl=function nl(){window.addEventListener("focus",t$1(this,Ps)),window.addEventListener("blur",t$1(this,_r))},Cr=new WeakSet,$l=function $l(){window.removeEventListener("focus",t$1(this,Ps)),window.removeEventListener("blur",t$1(this,_r))},_l=new WeakSet,Ih=function Ih(){window.addEventListener("keydown",t$1(this,Te),{capture:!0})},Rh=new WeakSet,Th=function Th(){window.removeEventListener("keydown",t$1(this,Te),{capture:!0})},$s=new WeakSet,Dr=function Dr(){document.addEventListener("copy",t$1(this,qe)),document.addEventListener("cut",t$1(this,bl)),document.addEventListener("paste",t$1(this,ol))},Xi=new WeakSet,Ke=function Ke(){document.removeEventListener("copy",t$1(this,qe)),document.removeEventListener("cut",t$1(this,bl)),document.removeEventListener("paste",t$1(this,ol))},ta=new WeakSet,Cl=function Cl(ke){var _this35=this;Object.entries(ke).some(function(_ref39){var _ref40=_slicedToArray(_ref39,2),ye=_ref40[0],Ie=_ref40[1];return t$1(_this35,Ae)[ye]!==Ie})&&this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(t$1(this,Ae),ke)})},Oh=new WeakSet,jh=function jh(ke){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:ke})},qh=new WeakSet,Bh=function Bh(){if(!t$1(this,ro)){Z(this,ro,!0);var _iterator51=_createForOfIteratorHelper(t$1(this,ie).values()),_step51;try{for(_iterator51.s();!(_step51=_iterator51.n()).done;){var ke=_step51.value;ke.enable()}}catch(err){_iterator51.e(err)}finally{_iterator51.f()}}},Jh=new WeakSet,Xh=function Xh(){if(this.unselectAll(),t$1(this,ro)){Z(this,ro,!1);var _iterator52=_createForOfIteratorHelper(t$1(this,ie).values()),_step52;try{for(_iterator52.s();!(_step52=_iterator52.n()).done;){var ke=_step52.value;ke.disable()}}catch(err){_iterator52.e(err)}finally{_iterator52.f()}}},Qh=new WeakSet,Kh=function Kh(ke){var ye=t$1(this,ie).get(ke.pageIndex);ye?ye.addOrRebuild(ke):this.addEditor(ke)},ia=new WeakSet,fe=function fe(){if(t$1(this,qt).size===0)return!0;if(t$1(this,qt).size===1){var _iterator53=_createForOfIteratorHelper(t$1(this,qt).values()),_step53;try{for(_iterator53.s();!(_step53=_iterator53.n()).done;){var ke=_step53.value;return ke.isEmpty()}}catch(err){_iterator53.e(err)}finally{_iterator53.f()}}return!1},Me=new WeakSet,kr=function kr(ke){t$1(this,pr).clear();var _iterator54=_createForOfIteratorHelper(ke),_step54;try{for(_iterator54.s();!(_step54=_iterator54.n()).done;){var ye=_step54.value;ye.isEmpty()||(t$1(this,pr).add(ye),ye.select())}}catch(err){_iterator54.e(err)}finally{_iterator54.f()}W(this,ta,Cl).call(this,{hasSelectedEditor:!0})},ee(py,"TRANSLATE_SMALL",1),ee(py,"TRANSLATE_BIG",10);var Hh=py;o.AnnotationEditorUIManager=Hh},function(r,o,s){var B,Q,Y,J,it,nt,ot,dt,Mt,Ot,Qt,Ut,te,qt,ie,re,ne,ae,Bt,Wt,oe,ve,_e,Xe,He;Object.defineProperty(o,"__esModule",{value:!0}),o.StatTimer=o.RenderingCancelledException=o.PixelsPerInch=o.PageViewport=o.PDFDateString=o.DOMStandardFontDataFactory=o.DOMSVGFactory=o.DOMFilterFactory=o.DOMCanvasFactory=o.DOMCMapReaderFactory=void 0,o.deprecated=Es,o.getColorValues=Ih,o.getCurrentTransform=Rh,o.getCurrentTransformInverse=Th,o.getFilenameFromUrl=be,o.getPdfFilenameFromUrl=Ae,o.getRGB=_l,o.getXfaPageViewport=$l,o.isDataScheme=ue,o.isPdfFile=se,o.isValidFetchUrl=pi,o.loadScript=Qr,o.noContextMenu=io,o.setLayerDimensions=$s;var ro=s(7),Xo=s(1);var Se="http://www.w3.org/2000/svg",xr=_createClass(function xr(){_classCallCheck(this,xr)});ee(xr,"CSS",96),ee(xr,"PDF",72),ee(xr,"PDF_TO_CSS_UNITS",xr.CSS/xr.PDF);var pr=xr;o.PixelsPerInch=pr;var $e=function(_ro$BaseFilterFactory){_inherits($e,_ro$BaseFilterFactory);function $e(){var _this36;var _ref41=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},Xi=_ref41.docId,_ref41$ownerDocument=_ref41.ownerDocument,Ke=_ref41$ownerDocument===void 0?globalThis.document:_ref41$ownerDocument;_classCallCheck(this,$e);_this36=_callSuper(this,$e),I(_assertThisInitialized(_this36),Ut),I(_assertThisInitialized(_this36),qt),I(_assertThisInitialized(_this36),re),I(_assertThisInitialized(_this36),ae),I(_assertThisInitialized(_this36),Wt),I(_assertThisInitialized(_this36),ve),I(_assertThisInitialized(_this36),Xe),I(_assertThisInitialized(_this36),B,void 0),I(_assertThisInitialized(_this36),Q,void 0),I(_assertThisInitialized(_this36),Y,void 0),I(_assertThisInitialized(_this36),J,void 0),I(_assertThisInitialized(_this36),it,void 0),I(_assertThisInitialized(_this36),nt,void 0),I(_assertThisInitialized(_this36),ot,void 0),I(_assertThisInitialized(_this36),dt,void 0),I(_assertThisInitialized(_this36),Mt,void 0),I(_assertThisInitialized(_this36),Ot,void 0),I(_assertThisInitialized(_this36),Qt,0),Z(_assertThisInitialized(_this36),Y,Xi),Z(_assertThisInitialized(_this36),J,Ke);return _this36}_createClass($e,[{key:"addFilter",value:function addFilter(Xi){if(!Xi)return"none";var Ke=t$1(this,Ut,te).get(Xi);if(Ke)return Ke;var ta,Cl,Oh,jh;if(Xi.length===1){var Xh=Xi[0],Qh=new Array(256);for(var Kh=0;Kh<256;Kh++)Qh[Kh]=Xh[Kh]/255;jh=ta=Cl=Oh=Qh.join(",")}else{var _Xi=_slicedToArray(Xi,3),_Xh=_Xi[0],_Qh=_Xi[1],_Kh=_Xi[2],ia=new Array(256),fe=new Array(256),Me=new Array(256);for(var kr=0;kr<256;kr++)ia[kr]=_Xh[kr]/255,fe[kr]=_Qh[kr]/255,Me[kr]=_Kh[kr]/255;ta=ia.join(","),Cl=fe.join(","),Oh=Me.join(","),jh="".concat(ta).concat(Cl).concat(Oh)}if(Ke=t$1(this,Ut,te).get(jh),Ke)return t$1(this,Ut,te).set(Xi,Ke),Ke;var qh="g_".concat(t$1(this,Y),"_transfer_map_").concat(ge(this,Qt)._++),Bh="url(#".concat(qh,")");t$1(this,Ut,te).set(Xi,Bh),t$1(this,Ut,te).set(jh,Bh);var Jh=W(this,ae,Bt).call(this,qh);return W(this,ve,_e).call(this,ta,Cl,Oh,Jh),Bh}},{key:"addHCMFilter",value:function addHCMFilter(Xi,Ke){var _Xo$Util,_Xo$Util2;var ta;var Cl="".concat(Xi,"-").concat(Ke);if(t$1(this,nt)===Cl)return t$1(this,ot);if(Z(this,nt,Cl),Z(this,ot,"none"),(ta=t$1(this,it))==null||ta.remove(),!Xi||!Ke)return t$1(this,ot);var Oh=W(this,Xe,He).call(this,Xi);Xi=(_Xo$Util=Xo.Util).makeHexColor.apply(_Xo$Util,_toConsumableArray(Oh));var jh=W(this,Xe,He).call(this,Ke);if(Ke=(_Xo$Util2=Xo.Util).makeHexColor.apply(_Xo$Util2,_toConsumableArray(jh)),t$1(this,qt,ie).style.color="",Xi==="#000000"&&Ke==="#ffffff"||Xi===Ke)return t$1(this,ot);var qh=new Array(256);for(var Kh=0;Kh<=255;Kh++){var ia=Kh/255;qh[Kh]=ia<=0.03928?ia/12.92:Math.pow((ia+0.055)/1.055,2.4)}var Bh=qh.join(","),Jh="g_".concat(t$1(this,Y),"_hcm_filter"),Xh=Z(this,dt,W(this,ae,Bt).call(this,Jh));W(this,ve,_e).call(this,Bh,Bh,Bh,Xh),W(this,re,ne).call(this,Xh);var Qh=function Qh(Kh,ia){var fe=Oh[Kh]/255,Me=jh[Kh]/255,kr=new Array(ia+1);for(var rn=0;rn<=ia;rn++)kr[rn]=fe+rn/ia*(Me-fe);return kr.join(",")};return W(this,ve,_e).call(this,Qh(0,5),Qh(1,5),Qh(2,5),Xh),Z(this,ot,"url(#".concat(Jh,")")),t$1(this,ot)}},{key:"addHighlightHCMFilter",value:function addHighlightHCMFilter(Xi,Ke,ta,Cl){var _ref42;var Oh;var jh="".concat(Xi,"-").concat(Ke,"-").concat(ta,"-").concat(Cl);if(t$1(this,Mt)===jh)return t$1(this,Ot);if(Z(this,Mt,jh),Z(this,Ot,"none"),(Oh=t$1(this,dt))==null||Oh.remove(),!Xi||!Ke)return t$1(this,Ot);var _map=[Xi,Ke].map(W(this,Xe,He).bind(this)),_map2=_slicedToArray(_map,2),qh=_map2[0],Bh=_map2[1];var Jh=Math.round(0.2126*qh[0]+0.7152*qh[1]+0.0722*qh[2]),Xh=Math.round(0.2126*Bh[0]+0.7152*Bh[1]+0.0722*Bh[2]),_map3=[ta,Cl].map(W(this,Xe,He).bind(this)),_map4=_slicedToArray(_map3,2),Qh=_map4[0],Kh=_map4[1];Xh<Jh&&(_ref42=[Xh,Jh,Kh,Qh],Jh=_ref42[0],Xh=_ref42[1],Qh=_ref42[2],Kh=_ref42[3],_ref42),t$1(this,qt,ie).style.color="";var ia=function ia(kr,rn,Oe){var wi=new Array(256),Jo=(Xh-Jh)/Oe,xl=kr/255,Pd=(rn-kr)/(255*Oe);var Dh=0;for(var Vh=0;Vh<=Oe;Vh++){var Ed=Math.round(Jh+Vh*Jo),Nh=xl+Vh*Pd;for(var Zh=Dh;Zh<=Ed;Zh++)wi[Zh]=Nh;Dh=Ed+1}for(var _Vh=Dh;_Vh<256;_Vh++)wi[_Vh]=wi[Dh-1];return wi.join(",")},fe="g_".concat(t$1(this,Y),"_hcm_highlight_filter"),Me=Z(this,dt,W(this,ae,Bt).call(this,fe));return W(this,re,ne).call(this,Me),W(this,ve,_e).call(this,ia(Qh[0],Kh[0],5),ia(Qh[1],Kh[1],5),ia(Qh[2],Kh[2],5),Me),Z(this,Ot,"url(#".concat(fe,")")),t$1(this,Ot)}},{key:"destroy",value:function destroy(){var Xi=arguments.length>0&&arguments[0]!==undefined?arguments[0]:!1;Xi&&(t$1(this,ot)||t$1(this,Ot))||(t$1(this,Q)&&(t$1(this,Q).parentNode.parentNode.remove(),Z(this,Q,null)),t$1(this,B)&&(t$1(this,B).clear(),Z(this,B,null)),Z(this,Qt,0))}}]);return $e}(ro.BaseFilterFactory);B=new WeakMap,Q=new WeakMap,Y=new WeakMap,J=new WeakMap,it=new WeakMap,nt=new WeakMap,ot=new WeakMap,dt=new WeakMap,Mt=new WeakMap,Ot=new WeakMap,Qt=new WeakMap,Ut=new WeakSet,te=function te(){return t$1(this,B)||Z(this,B,new Map)},qt=new WeakSet,ie=function ie(){if(!t$1(this,Q)){var Dr=t$1(this,J).createElement("div"),Xi=Dr.style;Xi.visibility="hidden",Xi.contain="strict",Xi.width=Xi.height=0,Xi.position="absolute",Xi.top=Xi.left=0,Xi.zIndex=-1;var Ke=t$1(this,J).createElementNS(Se,"svg");Ke.setAttribute("width",0),Ke.setAttribute("height",0),Z(this,Q,t$1(this,J).createElementNS(Se,"defs")),Dr.append(Ke),Ke.append(t$1(this,Q)),t$1(this,J).body.append(Dr)}return t$1(this,Q)},re=new WeakSet,ne=function ne(Dr){var Xi=t$1(this,J).createElementNS(Se,"feColorMatrix");Xi.setAttribute("type","matrix"),Xi.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),Dr.append(Xi)},ae=new WeakSet,Bt=function Bt(Dr){var Xi=t$1(this,J).createElementNS(Se,"filter");return Xi.setAttribute("color-interpolation-filters","sRGB"),Xi.setAttribute("id",Dr),t$1(this,qt,ie).append(Xi),Xi},Wt=new WeakSet,oe=function oe(Dr,Xi,Ke){var ta=t$1(this,J).createElementNS(Se,Xi);ta.setAttribute("type","discrete"),ta.setAttribute("tableValues",Ke),Dr.append(ta)},ve=new WeakSet,_e=function _e(Dr,Xi,Ke,ta){var Cl=t$1(this,J).createElementNS(Se,"feComponentTransfer");ta.append(Cl),W(this,Wt,oe).call(this,Cl,"feFuncR",Dr),W(this,Wt,oe).call(this,Cl,"feFuncG",Xi),W(this,Wt,oe).call(this,Cl,"feFuncB",Ke)},Xe=new WeakSet,He=function He(Dr){return t$1(this,qt,ie).style.color=Dr,_l(getComputedStyle(t$1(this,qt,ie)).getPropertyValue("color"))},o.DOMFilterFactory=$e;var _r=function(_ro$BaseCanvasFactory){_inherits(_r,_ro$BaseCanvasFactory);function _r(){var _this37;var _ref43=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},_ref43$ownerDocument=_ref43.ownerDocument,Xi=_ref43$ownerDocument===void 0?globalThis.document:_ref43$ownerDocument;_classCallCheck(this,_r);_this37=_callSuper(this,_r),_this37._document=Xi;return _this37}_createClass(_r,[{key:"_createCanvas",value:function _createCanvas(Xi,Ke){var ta=this._document.createElement("canvas");return ta.width=Xi,ta.height=Ke,ta}}]);return _r}(ro.BaseCanvasFactory);o.DOMCanvasFactory=_r;function Ps(_x9){return _Ps.apply(this,arguments)}function _Ps(){_Ps=_asyncToGenerator(_regeneratorRuntime().mark(function _callee14(Dr){var Xi,Ke,_args14=arguments;return _regeneratorRuntime().wrap(function _callee14$(_context14){while(1)switch(_context14.prev=_context14.next){case 0:Xi=_args14.length>1&&_args14[1]!==undefined?_args14[1]:!1;if(!pi(Dr,document.baseURI)){_context14.next=21;break}_context14.next=4;return fetch(Dr);case 4:Ke=_context14.sent;if(Ke.ok){_context14.next=7;break}throw new Error(Ke.statusText);case 7:if(!Xi){_context14.next=15;break}_context14.t1=Uint8Array;_context14.next=11;return Ke.arrayBuffer();case 11:_context14.t2=_context14.sent;_context14.t0=new _context14.t1(_context14.t2);_context14.next=20;break;case 15:_context14.t3=(0,Xo.stringToBytes);_context14.next=18;return Ke.text();case 18:_context14.t4=_context14.sent;_context14.t0=(0,_context14.t3)(_context14.t4);case 20:return _context14.abrupt("return",_context14.t0);case 21:return _context14.abrupt("return",new Promise(function(Ke,ta){var Cl=new XMLHttpRequest;Cl.open("GET",Dr,!0),Xi&&(Cl.responseType="arraybuffer"),Cl.onreadystatechange=function(){if(Cl.readyState===XMLHttpRequest.DONE){if(Cl.status===200||Cl.status===0){var Oh;if(Xi&&Cl.response?Oh=new Uint8Array(Cl.response):!Xi&&Cl.responseText&&(Oh=(0,Xo.stringToBytes)(Cl.responseText)),Oh){Ke(Oh);return}}ta(new Error(Cl.statusText))}},Cl.send(null)}));case 22:case"end":return _context14.stop()}},_callee14)}));return _Ps.apply(this,arguments)}var qe=function(_ro$BaseCMapReaderFac){_inherits(qe,_ro$BaseCMapReaderFac);function qe(){_classCallCheck(this,qe);return _callSuper(this,qe,arguments)}_createClass(qe,[{key:"_fetchData",value:function _fetchData(Xi,Ke){return Ps(Xi,this.isCompressed).then(function(ta){return{cMapData:ta,compressionType:Ke}})}}]);return qe}(ro.BaseCMapReaderFactory);o.DOMCMapReaderFactory=qe;var bl=function(_ro$BaseStandardFontD){_inherits(bl,_ro$BaseStandardFontD);function bl(){_classCallCheck(this,bl);return _callSuper(this,bl,arguments)}_createClass(bl,[{key:"_fetchData",value:function _fetchData(Xi){return Ps(Xi,!0)}}]);return bl}(ro.BaseStandardFontDataFactory);o.DOMStandardFontDataFactory=bl;var ol=function(_ro$BaseSVGFactory){_inherits(ol,_ro$BaseSVGFactory);function ol(){_classCallCheck(this,ol);return _callSuper(this,ol,arguments)}_createClass(ol,[{key:"_createSVG",value:function _createSVG(Xi){return document.createElementNS(Se,Xi)}}]);return ol}(ro.BaseSVGFactory);o.DOMSVGFactory=ol;var Te=function(){function Te(_ref44){var Xi=_ref44.viewBox,Ke=_ref44.scale,ta=_ref44.rotation,_ref44$offsetX=_ref44.offsetX,Cl=_ref44$offsetX===void 0?0:_ref44$offsetX,_ref44$offsetY=_ref44.offsetY,Oh=_ref44$offsetY===void 0?0:_ref44$offsetY,_ref44$dontFlip=_ref44.dontFlip,jh=_ref44$dontFlip===void 0?!1:_ref44$dontFlip;_classCallCheck(this,Te);this.viewBox=Xi,this.scale=Ke,this.rotation=ta,this.offsetX=Cl,this.offsetY=Oh;var qh=(Xi[2]+Xi[0])/2,Bh=(Xi[3]+Xi[1])/2;var Jh,Xh,Qh,Kh;switch(ta%=360,ta<0&&(ta+=360),ta){case 180:Jh=-1,Xh=0,Qh=0,Kh=1;break;case 90:Jh=0,Xh=1,Qh=1,Kh=0;break;case 270:Jh=0,Xh=-1,Qh=-1,Kh=0;break;case 0:Jh=1,Xh=0,Qh=0,Kh=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}jh&&(Qh=-Qh,Kh=-Kh);var ia,fe,Me,kr;Jh===0?(ia=Math.abs(Bh-Xi[1])*Ke+Cl,fe=Math.abs(qh-Xi[0])*Ke+Oh,Me=(Xi[3]-Xi[1])*Ke,kr=(Xi[2]-Xi[0])*Ke):(ia=Math.abs(qh-Xi[0])*Ke+Cl,fe=Math.abs(Bh-Xi[1])*Ke+Oh,Me=(Xi[2]-Xi[0])*Ke,kr=(Xi[3]-Xi[1])*Ke),this.transform=[Jh*Ke,Xh*Ke,Qh*Ke,Kh*Ke,ia-Jh*Ke*qh-Qh*Ke*Bh,fe-Xh*Ke*qh-Kh*Ke*Bh],this.width=Me,this.height=kr}_createClass(Te,[{key:"rawDims",get:function get(){var Xi=this.viewBox;return(0,Xo.shadow)(this,"rawDims",{pageWidth:Xi[2]-Xi[0],pageHeight:Xi[3]-Xi[1],pageX:Xi[0],pageY:Xi[1]})}},{key:"clone",value:function clone(){var _ref45=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},_ref45$scale=_ref45.scale,Xi=_ref45$scale===void 0?this.scale:_ref45$scale,_ref45$rotation=_ref45.rotation,Ke=_ref45$rotation===void 0?this.rotation:_ref45$rotation,_ref45$offsetX=_ref45.offsetX,ta=_ref45$offsetX===void 0?this.offsetX:_ref45$offsetX,_ref45$offsetY=_ref45.offsetY,Cl=_ref45$offsetY===void 0?this.offsetY:_ref45$offsetY,_ref45$dontFlip=_ref45.dontFlip,Oh=_ref45$dontFlip===void 0?!1:_ref45$dontFlip;return new Te({viewBox:this.viewBox.slice(),scale:Xi,rotation:Ke,offsetX:ta,offsetY:Cl,dontFlip:Oh})}},{key:"convertToViewportPoint",value:function convertToViewportPoint(Xi,Ke){return Xo.Util.applyTransform([Xi,Ke],this.transform)}},{key:"convertToViewportRectangle",value:function convertToViewportRectangle(Xi){var Ke=Xo.Util.applyTransform([Xi[0],Xi[1]],this.transform),ta=Xo.Util.applyTransform([Xi[2],Xi[3]],this.transform);return[Ke[0],Ke[1],ta[0],ta[1]]}},{key:"convertToPdfPoint",value:function convertToPdfPoint(Xi,Ke){return Xo.Util.applyInverseTransform([Xi,Ke],this.transform)}}]);return Te}();o.PageViewport=Te;var pe=function(_Xo$BaseException){_inherits(pe,_Xo$BaseException);function pe(Xi){var _this38;var Ke=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;_classCallCheck(this,pe);_this38=_callSuper(this,pe,[Xi,"RenderingCancelledException"]),_this38.extraDelay=Ke;return _this38}return _createClass(pe)}(Xo.BaseException);o.RenderingCancelledException=pe;function ue(Dr){var Xi=Dr.length;var Ke=0;for(;Ke<Xi&&Dr[Ke].trim()==="";)Ke++;return Dr.substring(Ke,Ke+5).toLowerCase()==="data:"}function se(Dr){return typeof Dr=="string"&&/\.pdf$/i.test(Dr)}function be(Dr){var _Dr$split,_Dr$split2;var Xi=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1;return Xi||(_Dr$split=Dr.split(/[#?]/,1),_Dr$split2=_slicedToArray(_Dr$split,1),Dr=_Dr$split2[0],_Dr$split),Dr.substring(Dr.lastIndexOf("/")+1)}function Ae(Dr){var Xi=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"document.pdf";if(typeof Dr!="string")return Xi;if(ue(Dr))return(0,Xo.warn)("getPdfFilenameFromUrl: ignore \"data:\"-URL for performance reasons."),Xi;var Ke=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/,ta=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,Cl=Ke.exec(Dr);var Oh=ta.exec(Cl[1])||ta.exec(Cl[2])||ta.exec(Cl[3]);if(Oh&&(Oh=Oh[0],Oh.includes("%")))try{Oh=ta.exec(decodeURIComponent(Oh))[0]}catch(_unused9){}return Oh||Xi}var ze=function(){function ze(){_classCallCheck(this,ze);ee(this,"started",Object.create(null)),ee(this,"times",[])}_createClass(ze,[{key:"time",value:function time(Xi){Xi in this.started&&(0,Xo.warn)("Timer is already running for ".concat(Xi)),this.started[Xi]=Date.now()}},{key:"timeEnd",value:function timeEnd(Xi){Xi in this.started||(0,Xo.warn)("Timer has not been started for ".concat(Xi)),this.times.push({name:Xi,start:this.started[Xi],end:Date.now()}),delete this.started[Xi]}},{key:"toString",value:function toString(){var Xi=[];var Ke=0;var _iterator55=_createForOfIteratorHelper(this.times),_step55;try{for(_iterator55.s();!(_step55=_iterator55.n()).done;){var ta=_step55.value.name;Ke=Math.max(ta.length,Ke)}}catch(err){_iterator55.e(err)}finally{_iterator55.f()}var _iterator56=_createForOfIteratorHelper(this.times),_step56;try{for(_iterator56.s();!(_step56=_iterator56.n()).done;){var _step56$value=_step56.value,_ta=_step56$value.name,Cl=_step56$value.start,Oh=_step56$value.end;Xi.push("".concat(_ta.padEnd(Ke)," ").concat(Oh-Cl,"ms\n"))}}catch(err){_iterator56.e(err)}finally{_iterator56.f()}return Xi.join("")}}]);return ze}();o.StatTimer=ze;function pi(Dr,Xi){try{var _ref46=Xi?new URL(Dr,Xi):new URL(Dr),Ke=_ref46.protocol;return Ke==="http:"||Ke==="https:"}catch(_unused10){return!1}}function io(Dr){Dr.preventDefault()}function Qr(Dr){var Xi=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1;return new Promise(function(Ke,ta){var Cl=document.createElement("script");Cl.src=Dr,Cl.onload=function(Oh){Xi&&Cl.remove(),Ke(Oh)},Cl.onerror=function(){ta(new Error("Cannot load script at: ".concat(Cl.src)))},(document.head||document.documentElement).append(Cl)})}function Es(Dr){console.log("Deprecated API usage: "+Dr)}var nl;var Cr=function(){function Cr(){_classCallCheck(this,Cr)}_createClass(Cr,null,[{key:"toDateObject",value:function toDateObject(Xi){if(!Xi||typeof Xi!="string")return null;nl||(nl=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));var Ke=nl.exec(Xi);if(!Ke)return null;var ta=parseInt(Ke[1],10);var Cl=parseInt(Ke[2],10);Cl=Cl>=1&&Cl<=12?Cl-1:0;var Oh=parseInt(Ke[3],10);Oh=Oh>=1&&Oh<=31?Oh:1;var jh=parseInt(Ke[4],10);jh=jh>=0&&jh<=23?jh:0;var qh=parseInt(Ke[5],10);qh=qh>=0&&qh<=59?qh:0;var Bh=parseInt(Ke[6],10);Bh=Bh>=0&&Bh<=59?Bh:0;var Jh=Ke[7]||"Z";var Xh=parseInt(Ke[8],10);Xh=Xh>=0&&Xh<=23?Xh:0;var Qh=parseInt(Ke[9],10)||0;return Qh=Qh>=0&&Qh<=59?Qh:0,Jh==="-"?(jh+=Xh,qh+=Qh):Jh==="+"&&(jh-=Xh,qh-=Qh),new Date(Date.UTC(ta,Cl,Oh,jh,qh,Bh))}}]);return Cr}();o.PDFDateString=Cr;function $l(Dr,_ref47){var _ref47$scale=_ref47.scale,Xi=_ref47$scale===void 0?1:_ref47$scale,_ref47$rotation=_ref47.rotation,Ke=_ref47$rotation===void 0?0:_ref47$rotation;var _Dr$attributes$style=Dr.attributes.style,ta=_Dr$attributes$style.width,Cl=_Dr$attributes$style.height,Oh=[0,0,parseInt(ta),parseInt(Cl)];return new Te({viewBox:Oh,scale:Xi,rotation:Ke})}function _l(Dr){if(Dr.startsWith("#")){var Xi=parseInt(Dr.slice(1),16);return[(Xi&16711680)>>16,(Xi&65280)>>8,Xi&255]}return Dr.startsWith("rgb(")?Dr.slice(4,-1).split(",").map(function(Xi){return parseInt(Xi)}):Dr.startsWith("rgba(")?Dr.slice(5,-1).split(",").map(function(Xi){return parseInt(Xi)}).slice(0,3):((0,Xo.warn)("Not a valid color format: \"".concat(Dr,"\"")),[0,0,0])}function Ih(Dr){var Xi=document.createElement("span");Xi.style.visibility="hidden",document.body.append(Xi);var _iterator57=_createForOfIteratorHelper(Dr.keys()),_step57;try{for(_iterator57.s();!(_step57=_iterator57.n()).done;){var Ke=_step57.value;Xi.style.color=Ke;var ta=window.getComputedStyle(Xi).color;Dr.set(Ke,_l(ta))}}catch(err){_iterator57.e(err)}finally{_iterator57.f()}Xi.remove()}function Rh(Dr){var _Dr$getTransform=Dr.getTransform(),Xi=_Dr$getTransform.a,Ke=_Dr$getTransform.b,ta=_Dr$getTransform.c,Cl=_Dr$getTransform.d,Oh=_Dr$getTransform.e,jh=_Dr$getTransform.f;return[Xi,Ke,ta,Cl,Oh,jh]}function Th(Dr){var _Dr$getTransform$inve=Dr.getTransform().invertSelf(),Xi=_Dr$getTransform$inve.a,Ke=_Dr$getTransform$inve.b,ta=_Dr$getTransform$inve.c,Cl=_Dr$getTransform$inve.d,Oh=_Dr$getTransform$inve.e,jh=_Dr$getTransform$inve.f;return[Xi,Ke,ta,Cl,Oh,jh]}function $s(Dr,Xi){var Ke=arguments.length>2&&arguments[2]!==undefined?arguments[2]:!1;var ta=arguments.length>3&&arguments[3]!==undefined?arguments[3]:!0;if(Xi instanceof Te){var _Xi$rawDims=Xi.rawDims,Cl=_Xi$rawDims.pageWidth,Oh=_Xi$rawDims.pageHeight,jh=Dr.style,qh=Xo.FeatureTest.isCSSRoundSupported,Bh="var(--scale-factor) * ".concat(Cl,"px"),Jh="var(--scale-factor) * ".concat(Oh,"px"),Xh=qh?"round(".concat(Bh,", 1px)"):"calc(".concat(Bh,")"),Qh=qh?"round(".concat(Jh,", 1px)"):"calc(".concat(Jh,")");!Ke||Xi.rotation%180===0?(jh.width=Xh,jh.height=Qh):(jh.width=Qh,jh.height=Xh)}ta&&Dr.setAttribute("data-main-rotation",Xi.rotation)}},function(r,o,s){Object.defineProperty(o,"__esModule",{value:!0}),o.BaseStandardFontDataFactory=o.BaseSVGFactory=o.BaseFilterFactory=o.BaseCanvasFactory=o.BaseCMapReaderFactory=void 0;var B=s(1);var Q=function(){function Q(){_classCallCheck(this,Q);this.constructor===Q&&(0,B.unreachable)("Cannot initialize BaseFilterFactory.")}_createClass(Q,[{key:"addFilter",value:function addFilter(dt){return"none"}},{key:"addHCMFilter",value:function addHCMFilter(dt,Mt){return"none"}},{key:"addHighlightHCMFilter",value:function addHighlightHCMFilter(dt,Mt,Ot,Qt){return"none"}},{key:"destroy",value:function destroy(){var dt=arguments.length>0&&arguments[0]!==undefined?arguments[0]:!1}}]);return Q}();o.BaseFilterFactory=Q;var Y=function(){function Y(){_classCallCheck(this,Y);this.constructor===Y&&(0,B.unreachable)("Cannot initialize BaseCanvasFactory.")}_createClass(Y,[{key:"create",value:function create(dt,Mt){if(dt<=0||Mt<=0)throw new Error("Invalid canvas size");var Ot=this._createCanvas(dt,Mt);return{canvas:Ot,context:Ot.getContext("2d")}}},{key:"reset",value:function reset(dt,Mt,Ot){if(!dt.canvas)throw new Error("Canvas is not specified");if(Mt<=0||Ot<=0)throw new Error("Invalid canvas size");dt.canvas.width=Mt,dt.canvas.height=Ot}},{key:"destroy",value:function destroy(dt){if(!dt.canvas)throw new Error("Canvas is not specified");dt.canvas.width=0,dt.canvas.height=0,dt.canvas=null,dt.context=null}},{key:"_createCanvas",value:function _createCanvas(dt,Mt){(0,B.unreachable)("Abstract method `_createCanvas` called.")}}]);return Y}();o.BaseCanvasFactory=Y;var J=function(){function J(_ref48){var _ref48$baseUrl=_ref48.baseUrl,dt=_ref48$baseUrl===void 0?null:_ref48$baseUrl,_ref48$isCompressed=_ref48.isCompressed,Mt=_ref48$isCompressed===void 0?!0:_ref48$isCompressed;_classCallCheck(this,J);this.constructor===J&&(0,B.unreachable)("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=dt,this.isCompressed=Mt}_createClass(J,[{key:"fetch",value:function(){var _fetch=_asyncToGenerator(_regeneratorRuntime().mark(function _callee15(_ref49){var _this39=this;var dt,Mt,Ot;return _regeneratorRuntime().wrap(function _callee15$(_context15){while(1)switch(_context15.prev=_context15.next){case 0:dt=_ref49.name;if(this.baseUrl){_context15.next=3;break}throw new Error("The CMap \"baseUrl\" parameter must be specified, ensure that the \"cMapUrl\" and \"cMapPacked\" API parameters are provided.");case 3:if(dt){_context15.next=5;break}throw new Error("CMap name must be specified.");case 5:Mt=this.baseUrl+dt+(this.isCompressed?".bcmap":""),Ot=this.isCompressed?B.CMapCompressionType.BINARY:B.CMapCompressionType.NONE;return _context15.abrupt("return",this._fetchData(Mt,Ot)["catch"](function(Qt){throw new Error("Unable to load ".concat(_this39.isCompressed?"binary ":"","CMap at: ").concat(Mt))}));case 7:case"end":return _context15.stop()}},_callee15,this)}));function fetch(_x10){return _fetch.apply(this,arguments)}return fetch}()},{key:"_fetchData",value:function _fetchData(dt,Mt){(0,B.unreachable)("Abstract method `_fetchData` called.")}}]);return J}();o.BaseCMapReaderFactory=J;var it=function(){function it(_ref50){var _ref50$baseUrl=_ref50.baseUrl,dt=_ref50$baseUrl===void 0?null:_ref50$baseUrl;_classCallCheck(this,it);this.constructor===it&&(0,B.unreachable)("Cannot initialize BaseStandardFontDataFactory."),this.baseUrl=dt}_createClass(it,[{key:"fetch",value:function(){var _fetch2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee16(_ref51){var dt,Mt;return _regeneratorRuntime().wrap(function _callee16$(_context16){while(1)switch(_context16.prev=_context16.next){case 0:dt=_ref51.filename;if(this.baseUrl){_context16.next=3;break}throw new Error("The standard font \"baseUrl\" parameter must be specified, ensure that the \"standardFontDataUrl\" API parameter is provided.");case 3:if(dt){_context16.next=5;break}throw new Error("Font filename must be specified.");case 5:Mt="".concat(this.baseUrl).concat(dt);return _context16.abrupt("return",this._fetchData(Mt)["catch"](function(Ot){throw new Error("Unable to load font data at: ".concat(Mt))}));case 7:case"end":return _context16.stop()}},_callee16,this)}));function fetch(_x11){return _fetch2.apply(this,arguments)}return fetch}()},{key:"_fetchData",value:function _fetchData(dt){(0,B.unreachable)("Abstract method `_fetchData` called.")}}]);return it}();o.BaseStandardFontDataFactory=it;var nt=function(){function nt(){_classCallCheck(this,nt);this.constructor===nt&&(0,B.unreachable)("Cannot initialize BaseSVGFactory.")}_createClass(nt,[{key:"create",value:function create(dt,Mt){var Ot=arguments.length>2&&arguments[2]!==undefined?arguments[2]:!1;if(dt<=0||Mt<=0)throw new Error("Invalid SVG dimensions");var Qt=this._createSVG("svg:svg");return Qt.setAttribute("version","1.1"),Ot||(Qt.setAttribute("width","".concat(dt,"px")),Qt.setAttribute("height","".concat(Mt,"px"))),Qt.setAttribute("preserveAspectRatio","none"),Qt.setAttribute("viewBox","0 0 ".concat(dt," ").concat(Mt)),Qt}},{key:"createElement",value:function createElement(dt){if(typeof dt!="string")throw new Error("Invalid SVG element type");return this._createSVG(dt)}},{key:"_createSVG",value:function _createSVG(dt){(0,B.unreachable)("Abstract method `_createSVG` called.")}}]);return nt}();o.BaseSVGFactory=nt},function(r,o,s){Object.defineProperty(o,"__esModule",{value:!0}),o.MurmurHash3_64=void 0;var B=s(1);var Q=3285377520,Y=4294901760,J=65535;var it=function(){function it(ot){_classCallCheck(this,it);this.h1=ot?ot&4294967295:Q,this.h2=ot?ot&4294967295:Q}_createClass(it,[{key:"update",value:function update(ot){var dt,Mt;if(typeof ot=="string"){dt=new Uint8Array(ot.length*2),Mt=0;for(var oe=0,ve=ot.length;oe<ve;oe++){var _e=ot.charCodeAt(oe);_e<=255?dt[Mt++]=_e:(dt[Mt++]=_e>>>8,dt[Mt++]=_e&255)}}else if((0,B.isArrayBuffer)(ot))dt=ot.slice(),Mt=dt.byteLength;else throw new Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.");var Ot=Mt>>2,Qt=Mt-Ot*4,Ut=new Uint32Array(dt.buffer,0,Ot);var te=0,qt=0,ie=this.h1,re=this.h2;var ne=3432918353,ae=461845907,Bt=ne&J,Wt=ae&J;for(var _oe=0;_oe<Ot;_oe++)_oe&1?(te=Ut[_oe],te=te*ne&Y|te*Bt&J,te=te<<15|te>>>17,te=te*ae&Y|te*Wt&J,ie^=te,ie=ie<<13|ie>>>19,ie=ie*5+3864292196):(qt=Ut[_oe],qt=qt*ne&Y|qt*Bt&J,qt=qt<<15|qt>>>17,qt=qt*ae&Y|qt*Wt&J,re^=qt,re=re<<13|re>>>19,re=re*5+3864292196);switch(te=0,Qt){case 3:te^=dt[Ot*4+2]<<16;case 2:te^=dt[Ot*4+1]<<8;case 1:te^=dt[Ot*4],te=te*ne&Y|te*Bt&J,te=te<<15|te>>>17,te=te*ae&Y|te*Wt&J,Ot&1?ie^=te:re^=te}this.h1=ie,this.h2=re}},{key:"hexdigest",value:function hexdigest(){var ot=this.h1,dt=this.h2;return ot^=dt>>>1,ot=ot*3981806797&Y|ot*36045&J,dt=dt*4283543511&Y|((dt<<16|ot>>>16)*2950163797&Y)>>>16,ot^=dt>>>1,ot=ot*444984403&Y|ot*60499&J,dt=dt*3301882366&Y|((dt<<16|ot>>>16)*3120437893&Y)>>>16,ot^=dt>>>1,(ot>>>0).toString(16).padStart(8,"0")+(dt>>>0).toString(16).padStart(8,"0")}}]);return it}();o.MurmurHash3_64=it},function(r,o,s){var B;Object.defineProperty(o,"__esModule",{value:!0}),o.FontLoader=o.FontFaceObject=void 0;var Q=s(1);var Y=function(){function Y(_ref52){var _ref52$ownerDocument=_ref52.ownerDocument,nt=_ref52$ownerDocument===void 0?globalThis.document:_ref52$ownerDocument,_ref52$styleElement=_ref52.styleElement,ot=_ref52$styleElement===void 0?null:_ref52$styleElement;_classCallCheck(this,Y);I(this,B,new Set),this._document=nt,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}_createClass(Y,[{key:"addNativeFontFace",value:function addNativeFontFace(nt){this.nativeFontFaces.add(nt),this._document.fonts.add(nt)}},{key:"removeNativeFontFace",value:function removeNativeFontFace(nt){this.nativeFontFaces["delete"](nt),this._document.fonts["delete"](nt)}},{key:"insertRule",value:function insertRule(nt){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));var ot=this.styleElement.sheet;ot.insertRule(nt,ot.cssRules.length)}},{key:"clear",value:function clear(){var _iterator58=_createForOfIteratorHelper(this.nativeFontFaces),_step58;try{for(_iterator58.s();!(_step58=_iterator58.n()).done;){var nt=_step58.value;this._document.fonts["delete"](nt)}}catch(err){_iterator58.e(err)}finally{_iterator58.f()}this.nativeFontFaces.clear(),t$1(this,B).clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}},{key:"loadSystemFont",value:function(){var _loadSystemFont=_asyncToGenerator(_regeneratorRuntime().mark(function _callee17(nt){var ot,dt,Mt,Ot;return _regeneratorRuntime().wrap(function _callee17$(_context17){while(1)switch(_context17.prev=_context17.next){case 0:if(!nt||t$1(this,B).has(nt.loadedName)){_context17.next=15;break}if(!((0,Q.assert)(!this.disableFontFace,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported)){_context17.next=14;break}ot=nt.loadedName,dt=nt.src,Mt=nt.style,Ot=new FontFace(ot,dt,Mt);this.addNativeFontFace(Ot);_context17.prev=4;_context17.next=7;return Ot.load();case 7:t$1(this,B).add(ot);_context17.next=13;break;case 10:_context17.prev=10;_context17.t0=_context17["catch"](4);(0,Q.warn)("Cannot load system font: ".concat(nt.baseFontName,", installing it could help to improve PDF rendering.")),this.removeNativeFontFace(Ot);case 13:return _context17.abrupt("return");case 14:(0,Q.unreachable)("Not implemented: loadSystemFont without the Font Loading API.");case 15:case"end":return _context17.stop()}},_callee17,this,[[4,10]])}));function loadSystemFont(_x12){return _loadSystemFont.apply(this,arguments)}return loadSystemFont}()},{key:"bind",value:function(){var _bind=_asyncToGenerator(_regeneratorRuntime().mark(function _callee18(nt){var _this40=this;var dt,ot;return _regeneratorRuntime().wrap(function _callee18$(_context18){while(1)switch(_context18.prev=_context18.next){case 0:if(!(nt.attached||nt.missingFile&&!nt.systemFontInfo)){_context18.next=2;break}return _context18.abrupt("return");case 2:if(!(nt.attached=!0,nt.systemFontInfo)){_context18.next=6;break}_context18.next=5;return this.loadSystemFont(nt.systemFontInfo);case 5:return _context18.abrupt("return");case 6:if(!this.isFontLoadingAPISupported){_context18.next=19;break}dt=nt.createNativeFontFace();if(!dt){_context18.next=18;break}this.addNativeFontFace(dt);_context18.prev=10;_context18.next=13;return dt.loaded;case 13:_context18.next=18;break;case 15:_context18.prev=15;_context18.t0=_context18["catch"](10);throw(0,Q.warn)("Failed to load font '".concat(dt.family,"': '").concat(_context18.t0,"'.")),nt.disableFontFace=!0,_context18.t0;case 18:return _context18.abrupt("return");case 19:ot=nt.createFontFaceRule();if(!ot){_context18.next=25;break}if(!(this.insertRule(ot),this.isSyncFontLoadingSupported)){_context18.next=23;break}return _context18.abrupt("return");case 23:_context18.next=25;return new Promise(function(dt){var Mt=_this40._queueLoadingCallback(dt);_this40._prepareFontLoadEvent(nt,Mt)});case 25:case"end":return _context18.stop()}},_callee18,this,[[10,15]])}));function bind(_x13){return _bind.apply(this,arguments)}return bind}()},{key:"isFontLoadingAPISupported",get:function get(){var nt;var ot=!!((nt=this._document)!=null&&nt.fonts);return(0,Q.shadow)(this,"isFontLoadingAPISupported",ot)}},{key:"isSyncFontLoadingSupported",get:function get(){var nt=!1;return(Q.isNodeJS||(typeof navigator==="undefined"?"undefined":_typeof(navigator))<"u"&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(nt=!0),(0,Q.shadow)(this,"isSyncFontLoadingSupported",nt)}},{key:"_queueLoadingCallback",value:function _queueLoadingCallback(nt){function ot(){for((0,Q.assert)(!Mt.done,"completeRequest() cannot be called twice."),Mt.done=!0;dt.length>0&&dt[0].done;){var Ot=dt.shift();setTimeout(Ot.callback,0)}}var dt=this.loadingRequests,Mt={done:!1,complete:ot,callback:nt};return dt.push(Mt),Mt}},{key:"_loadTestFont",get:function get(){var nt=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return(0,Q.shadow)(this,"_loadTestFont",nt)}},{key:"_prepareFontLoadEvent",value:function _prepareFontLoadEvent(nt,ot){function dt(Xe,He){return Xe.charCodeAt(He)<<24|Xe.charCodeAt(He+1)<<16|Xe.charCodeAt(He+2)<<8|Xe.charCodeAt(He+3)&255}function Mt(Xe,He,ro,Xo){var Se=Xe.substring(0,He),xr=Xe.substring(He+ro);return Se+Xo+xr}var Ot,Qt;var Ut=this._document.createElement("canvas");Ut.width=1,Ut.height=1;var te=Ut.getContext("2d");var qt=0;function ie(Xe,He){if(++qt>30){(0,Q.warn)("Load test font never loaded."),He();return}if(te.font="30px "+Xe,te.fillText(".",0,20),te.getImageData(0,0,1,1).data[3]>0){He();return}setTimeout(ie.bind(null,Xe,He))}var re="lt".concat(Date.now()).concat(this.loadTestFontId++);var ne=this._loadTestFont;ne=Mt(ne,976,re.length,re);var ae=16,Bt=1482184792;var Wt=dt(ne,ae);for(Ot=0,Qt=re.length-3;Ot<Qt;Ot+=4)Wt=Wt-Bt+dt(re,Ot)|0;Ot<re.length&&(Wt=Wt-Bt+dt(re+"XXX",Ot)|0),ne=Mt(ne,ae,4,(0,Q.string32)(Wt));var oe="url(data:font/opentype;base64,".concat(btoa(ne),");"),ve="@font-face {font-family:\"".concat(re,"\";src:").concat(oe,"}");this.insertRule(ve);var _e=this._document.createElement("div");_e.style.visibility="hidden",_e.style.width=_e.style.height="10px",_e.style.position="absolute",_e.style.top=_e.style.left="0px";for(var _i7=0,_arr=[nt.loadedName,re];_i7<_arr.length;_i7++){var Xe=_arr[_i7];var He=this._document.createElement("span");He.textContent="Hi",He.style.fontFamily=Xe,_e.append(He)}this._document.body.append(_e),ie(re,function(){_e.remove(),ot.complete()})}}]);return Y}();B=new WeakMap,o.FontLoader=Y;var J=function(){function J(nt,_ref53){var _ref53$isEvalSupporte=_ref53.isEvalSupported,ot=_ref53$isEvalSupporte===void 0?!0:_ref53$isEvalSupporte,_ref53$disableFontFac=_ref53.disableFontFace,dt=_ref53$disableFontFac===void 0?!1:_ref53$disableFontFac,_ref53$ignoreErrors=_ref53.ignoreErrors,Mt=_ref53$ignoreErrors===void 0?!1:_ref53$ignoreErrors,_ref53$inspectFont=_ref53.inspectFont,Ot=_ref53$inspectFont===void 0?null:_ref53$inspectFont;_classCallCheck(this,J);this.compiledGlyphs=Object.create(null);for(var Qt in nt)this[Qt]=nt[Qt];this.isEvalSupported=ot!==!1,this.disableFontFace=dt===!0,this.ignoreErrors=Mt===!0,this._inspectFont=Ot}_createClass(J,[{key:"createNativeFontFace",value:function createNativeFontFace(){var nt;if(!this.data||this.disableFontFace)return null;var ot;if(!this.cssFontInfo)ot=new FontFace(this.loadedName,this.data,{});else{var dt={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(dt.style="oblique ".concat(this.cssFontInfo.italicAngle,"deg")),ot=new FontFace(this.cssFontInfo.fontFamily,this.data,dt)}return(nt=this._inspectFont)==null||nt.call(this,this),ot}},{key:"createFontFaceRule",value:function createFontFaceRule(){var nt;if(!this.data||this.disableFontFace)return null;var ot=(0,Q.bytesToString)(this.data),dt="url(data:".concat(this.mimetype,";base64,").concat(btoa(ot),");");var Mt;if(!this.cssFontInfo)Mt="@font-face {font-family:\"".concat(this.loadedName,"\";src:").concat(dt,"}");else{var Ot="font-weight: ".concat(this.cssFontInfo.fontWeight,";");this.cssFontInfo.italicAngle&&(Ot+="font-style: oblique ".concat(this.cssFontInfo.italicAngle,"deg;")),Mt="@font-face {font-family:\"".concat(this.cssFontInfo.fontFamily,"\";").concat(Ot,"src:").concat(dt,"}")}return(nt=this._inspectFont)==null||nt.call(this,this,dt),Mt}},{key:"getPathGenerator",value:function getPathGenerator(nt,ot){if(this.compiledGlyphs[ot]!==void 0)return this.compiledGlyphs[ot];var dt;try{dt=nt.get(this.loadedName+"_path_"+ot)}catch(Mt){if(!this.ignoreErrors)throw Mt;return(0,Q.warn)("getPathGenerator - ignoring character: \"".concat(Mt,"\".")),this.compiledGlyphs[ot]=function(Ot,Qt){}}if(this.isEvalSupported&&Q.FeatureTest.isEvalSupported){var Mt=[];var _iterator59=_createForOfIteratorHelper(dt),_step59;try{for(_iterator59.s();!(_step59=_iterator59.n()).done;){var Ot=_step59.value;var Qt=Ot.args!==void 0?Ot.args.join(","):"";Mt.push("c.",Ot.cmd,"(",Qt,");\n")}}catch(err){_iterator59.e(err)}finally{_iterator59.f()}return this.compiledGlyphs[ot]=new Function("c","size",Mt.join(""))}return this.compiledGlyphs[ot]=function(Mt,Ot){var _iterator60=_createForOfIteratorHelper(dt),_step60;try{for(_iterator60.s();!(_step60=_iterator60.n()).done;){var _Qt=_step60.value;_Qt.cmd==="scale"&&(_Qt.args=[Ot,-Ot]),Mt[_Qt.cmd].apply(Mt,_Qt.args)}}catch(err){_iterator60.e(err)}finally{_iterator60.f()}}}}]);return J}();o.FontFaceObject=J},function(r,o,s){Object.defineProperty(o,"__esModule",{value:!0}),o.NodeStandardFontDataFactory=o.NodeFilterFactory=o.NodeCanvasFactory=o.NodeCMapReaderFactory=void 0;var B=s(7);s(1);var Q=function Q(ot){return new Promise(function(dt,Mt){require$$5.readFile(ot,function(Ot,Qt){if(Ot||!Qt){Mt(new Error(Ot));return}dt(new Uint8Array(Qt))})})};var Y=function(_B$BaseFilterFactory){_inherits(Y,_B$BaseFilterFactory);function Y(){_classCallCheck(this,Y);return _callSuper(this,Y,arguments)}return _createClass(Y)}(B.BaseFilterFactory);o.NodeFilterFactory=Y;var J=function(_B$BaseCanvasFactory){_inherits(J,_B$BaseCanvasFactory);function J(){_classCallCheck(this,J);return _callSuper(this,J,arguments)}_createClass(J,[{key:"_createCanvas",value:function _createCanvas(dt,Mt){return require$$5.createCanvas(dt,Mt)}}]);return J}(B.BaseCanvasFactory);o.NodeCanvasFactory=J;var it=function(_B$BaseCMapReaderFact){_inherits(it,_B$BaseCMapReaderFact);function it(){_classCallCheck(this,it);return _callSuper(this,it,arguments)}_createClass(it,[{key:"_fetchData",value:function _fetchData(dt,Mt){return Q(dt).then(function(Ot){return{cMapData:Ot,compressionType:Mt}})}}]);return it}(B.BaseCMapReaderFactory);o.NodeCMapReaderFactory=it;var nt=function(_B$BaseStandardFontDa){_inherits(nt,_B$BaseStandardFontDa);function nt(){_classCallCheck(this,nt);return _callSuper(this,nt,arguments)}_createClass(nt,[{key:"_fetchData",value:function _fetchData(dt){return Q(dt)}}]);return nt}(B.BaseStandardFontDataFactory);o.NodeStandardFontDataFactory=nt},function(r,o,s){var B,Q,Y,J;Object.defineProperty(o,"__esModule",{value:!0}),o.CanvasGraphics=void 0;var it=s(1),nt=s(6),ot=s(12),dt=s(13);var Mt=16,Ot=100,Qt=4096,Ut=15,te=10,qt=1e3,ie=16;function re(Te,pe){if(Te._removeMirroring)throw new Error("Context is already forwarding operations.");Te.__originalSave=Te.save,Te.__originalRestore=Te.restore,Te.__originalRotate=Te.rotate,Te.__originalScale=Te.scale,Te.__originalTranslate=Te.translate,Te.__originalTransform=Te.transform,Te.__originalSetTransform=Te.setTransform,Te.__originalResetTransform=Te.resetTransform,Te.__originalClip=Te.clip,Te.__originalMoveTo=Te.moveTo,Te.__originalLineTo=Te.lineTo,Te.__originalBezierCurveTo=Te.bezierCurveTo,Te.__originalRect=Te.rect,Te.__originalClosePath=Te.closePath,Te.__originalBeginPath=Te.beginPath,Te._removeMirroring=function(){Te.save=Te.__originalSave,Te.restore=Te.__originalRestore,Te.rotate=Te.__originalRotate,Te.scale=Te.__originalScale,Te.translate=Te.__originalTranslate,Te.transform=Te.__originalTransform,Te.setTransform=Te.__originalSetTransform,Te.resetTransform=Te.__originalResetTransform,Te.clip=Te.__originalClip,Te.moveTo=Te.__originalMoveTo,Te.lineTo=Te.__originalLineTo,Te.bezierCurveTo=Te.__originalBezierCurveTo,Te.rect=Te.__originalRect,Te.closePath=Te.__originalClosePath,Te.beginPath=Te.__originalBeginPath,delete Te._removeMirroring},Te.save=function(){pe.save(),this.__originalSave()},Te.restore=function(){pe.restore(),this.__originalRestore()},Te.translate=function(ue,se){pe.translate(ue,se),this.__originalTranslate(ue,se)},Te.scale=function(ue,se){pe.scale(ue,se),this.__originalScale(ue,se)},Te.transform=function(ue,se,be,Ae,ze,pi){pe.transform(ue,se,be,Ae,ze,pi),this.__originalTransform(ue,se,be,Ae,ze,pi)},Te.setTransform=function(ue,se,be,Ae,ze,pi){pe.setTransform(ue,se,be,Ae,ze,pi),this.__originalSetTransform(ue,se,be,Ae,ze,pi)},Te.resetTransform=function(){pe.resetTransform(),this.__originalResetTransform()},Te.rotate=function(ue){pe.rotate(ue),this.__originalRotate(ue)},Te.clip=function(ue){pe.clip(ue),this.__originalClip(ue)},Te.moveTo=function(ue,se){pe.moveTo(ue,se),this.__originalMoveTo(ue,se)},Te.lineTo=function(ue,se){pe.lineTo(ue,se),this.__originalLineTo(ue,se)},Te.bezierCurveTo=function(ue,se,be,Ae,ze,pi){pe.bezierCurveTo(ue,se,be,Ae,ze,pi),this.__originalBezierCurveTo(ue,se,be,Ae,ze,pi)},Te.rect=function(ue,se,be,Ae){pe.rect(ue,se,be,Ae),this.__originalRect(ue,se,be,Ae)},Te.closePath=function(){pe.closePath(),this.__originalClosePath()},Te.beginPath=function(){pe.beginPath(),this.__originalBeginPath()}}var ne=function(){function ne(pe){_classCallCheck(this,ne);this.canvasFactory=pe,this.cache=Object.create(null)}_createClass(ne,[{key:"getCanvas",value:function getCanvas(pe,ue,se){var be;return this.cache[pe]!==void 0?(be=this.cache[pe],this.canvasFactory.reset(be,ue,se)):(be=this.canvasFactory.create(ue,se),this.cache[pe]=be),be}},{key:"delete",value:function _delete(pe){delete this.cache[pe]}},{key:"clear",value:function clear(){for(var pe in this.cache){var ue=this.cache[pe];this.canvasFactory.destroy(ue),delete this.cache[pe]}}}]);return ne}();function ae(Te,pe,ue,se,be,Ae,ze,pi,io,Qr){var _ref54=(0,nt.getCurrentTransform)(Te),_ref55=_slicedToArray(_ref54,6),Es=_ref55[0],nl=_ref55[1],Cr=_ref55[2],$l=_ref55[3],_l=_ref55[4],Ih=_ref55[5];if(nl===0&&Cr===0){var $s=ze*Es+_l,Dr=Math.round($s),Xi=pi*$l+Ih,Ke=Math.round(Xi),ta=(ze+io)*Es+_l,Cl=Math.abs(Math.round(ta)-Dr)||1,Oh=(pi+Qr)*$l+Ih,jh=Math.abs(Math.round(Oh)-Ke)||1;return Te.setTransform(Math.sign(Es),0,0,Math.sign($l),Dr,Ke),Te.drawImage(pe,ue,se,be,Ae,0,0,Cl,jh),Te.setTransform(Es,nl,Cr,$l,_l,Ih),[Cl,jh]}if(Es===0&&$l===0){var _$s=pi*Cr+_l,_Dr=Math.round(_$s),_Xi2=ze*nl+Ih,_Ke=Math.round(_Xi2),_ta2=(pi+Qr)*Cr+_l,_Cl=Math.abs(Math.round(_ta2)-_Dr)||1,_Oh=(ze+io)*nl+Ih,_jh=Math.abs(Math.round(_Oh)-_Ke)||1;return Te.setTransform(0,Math.sign(nl),Math.sign(Cr),0,_Dr,_Ke),Te.drawImage(pe,ue,se,be,Ae,0,0,_jh,_Cl),Te.setTransform(Es,nl,Cr,$l,_l,Ih),[_jh,_Cl]}Te.drawImage(pe,ue,se,be,Ae,ze,pi,io,Qr);var Rh=Math.hypot(Es,nl),Th=Math.hypot(Cr,$l);return[Rh*io,Th*Qr]}function Bt(Te){var pe=Te.width,ue=Te.height;if(pe>qt||ue>qt)return null;var se=1e3,be=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),Ae=pe+1;var ze=new Uint8Array(Ae*(ue+1)),pi,io,Qr;var Es=pe+7&-8;var nl=new Uint8Array(Es*ue),Cr=0;var _iterator61=_createForOfIteratorHelper(Te.data),_step61;try{for(_iterator61.s();!(_step61=_iterator61.n()).done;){var _Rh4=_step61.value;var _Th=128;for(;_Th>0;)nl[Cr++]=_Rh4&_Th?0:255,_Th>>=1}}catch(err){_iterator61.e(err)}finally{_iterator61.f()}var $l=0;for(Cr=0,nl[Cr]!==0&&(ze[0]=1,++$l),io=1;io<pe;io++)nl[Cr]!==nl[Cr+1]&&(ze[io]=nl[Cr]?2:1,++$l),Cr++;for(nl[Cr]!==0&&(ze[io]=2,++$l),pi=1;pi<ue;pi++){Cr=pi*Es,Qr=pi*Ae,nl[Cr-Es]!==nl[Cr]&&(ze[Qr]=nl[Cr]?1:8,++$l);var Rh=(nl[Cr]?4:0)+(nl[Cr-Es]?8:0);for(io=1;io<pe;io++)Rh=(Rh>>2)+(nl[Cr+1]?4:0)+(nl[Cr-Es+1]?8:0),be[Rh]&&(ze[Qr+io]=be[Rh],++$l),Cr++;if(nl[Cr-Es]!==nl[Cr]&&(ze[Qr+io]=nl[Cr]?2:4,++$l),$l>se)return null}for(Cr=Es*(ue-1),Qr=pi*Ae,nl[Cr]!==0&&(ze[Qr]=8,++$l),io=1;io<pe;io++)nl[Cr]!==nl[Cr+1]&&(ze[Qr+io]=nl[Cr]?4:8,++$l),Cr++;if(nl[Cr]!==0&&(ze[Qr+io]=4,++$l),$l>se)return null;var _l=new Int32Array([0,Ae,-1,0,-Ae,0,0,0,1]),Ih=new Path2D;for(pi=0;$l&&pi<=ue;pi++){var _Rh3=pi*Ae;var Th=_Rh3+pe;for(;_Rh3<Th&&!ze[_Rh3];)_Rh3++;if(_Rh3===Th)continue;Ih.moveTo(_Rh3%Ae,pi);var $s=_Rh3;var Dr=ze[_Rh3];do{var Xi=_l[Dr];do _Rh3+=Xi;while(!ze[_Rh3]);var Ke=ze[_Rh3];Ke!==5&&Ke!==10?(Dr=Ke,ze[_Rh3]=0):(Dr=Ke&51*Dr>>4,ze[_Rh3]&=Dr>>2|Dr<<2),Ih.lineTo(_Rh3%Ae,_Rh3/Ae|0),ze[_Rh3]||--$l}while($s!==_Rh3);--pi}return nl=null,ze=null,function(Rh){Rh.save(),Rh.scale(1/pe,-1/ue),Rh.translate(0,-ue),Rh.fill(Ih),Rh.beginPath(),Rh.restore()}}var Wt=function(){function Wt(pe,ue){_classCallCheck(this,Wt);this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=it.IDENTITY_MATRIX,this.textMatrixScale=1,this.fontMatrix=it.FONT_IDENTITY_MATRIX,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=it.TextRenderingMode.FILL,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.transferMaps="none",this.startNewPathAndClipBox([0,0,pe,ue])}_createClass(Wt,[{key:"clone",value:function clone(){var pe=Object.create(this);return pe.clipBox=this.clipBox.slice(),pe}},{key:"setCurrentPoint",value:function setCurrentPoint(pe,ue){this.x=pe,this.y=ue}},{key:"updatePathMinMax",value:function updatePathMinMax(pe,ue,se){var _it$Util$applyTransfo,_it$Util$applyTransfo2;(_it$Util$applyTransfo=it.Util.applyTransform([ue,se],pe),_it$Util$applyTransfo2=_slicedToArray(_it$Util$applyTransfo,2),ue=_it$Util$applyTransfo2[0],se=_it$Util$applyTransfo2[1]),this.minX=Math.min(this.minX,ue),this.minY=Math.min(this.minY,se),this.maxX=Math.max(this.maxX,ue),this.maxY=Math.max(this.maxY,se)}},{key:"updateRectMinMax",value:function updateRectMinMax(pe,ue){var se=it.Util.applyTransform(ue,pe),be=it.Util.applyTransform(ue.slice(2),pe);this.minX=Math.min(this.minX,se[0],be[0]),this.minY=Math.min(this.minY,se[1],be[1]),this.maxX=Math.max(this.maxX,se[0],be[0]),this.maxY=Math.max(this.maxY,se[1],be[1])}},{key:"updateScalingPathMinMax",value:function updateScalingPathMinMax(pe,ue){it.Util.scaleMinMax(pe,ue),this.minX=Math.min(this.minX,ue[0]),this.maxX=Math.max(this.maxX,ue[1]),this.minY=Math.min(this.minY,ue[2]),this.maxY=Math.max(this.maxY,ue[3])}},{key:"updateCurvePathMinMax",value:function updateCurvePathMinMax(pe,ue,se,be,Ae,ze,pi,io,Qr,Es){var nl=it.Util.bezierBoundingBox(ue,se,be,Ae,ze,pi,io,Qr);if(Es){Es[0]=Math.min(Es[0],nl[0],nl[2]),Es[1]=Math.max(Es[1],nl[0],nl[2]),Es[2]=Math.min(Es[2],nl[1],nl[3]),Es[3]=Math.max(Es[3],nl[1],nl[3]);return}this.updateRectMinMax(pe,nl)}},{key:"getPathBoundingBox",value:function getPathBoundingBox(){var pe=arguments.length>0&&arguments[0]!==undefined?arguments[0]:ot.PathType.FILL;var ue=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;var se=[this.minX,this.minY,this.maxX,this.maxY];if(pe===ot.PathType.STROKE){ue||(0,it.unreachable)("Stroke bounding box must include transform.");var be=it.Util.singularValueDecompose2dScale(ue),Ae=be[0]*this.lineWidth/2,ze=be[1]*this.lineWidth/2;se[0]-=Ae,se[1]-=ze,se[2]+=Ae,se[3]+=ze}return se}},{key:"updateClipFromPath",value:function updateClipFromPath(){var pe=it.Util.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(pe||[0,0,0,0])}},{key:"isEmptyClip",value:function isEmptyClip(){return this.minX===1/0}},{key:"startNewPathAndClipBox",value:function startNewPathAndClipBox(pe){this.clipBox=pe,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}},{key:"getClippedPathBoundingBox",value:function getClippedPathBoundingBox(){var pe=arguments.length>0&&arguments[0]!==undefined?arguments[0]:ot.PathType.FILL;var ue=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;return it.Util.intersect(this.clipBox,this.getPathBoundingBox(pe,ue))}}]);return Wt}();function oe(Te,pe){if((typeof ImageData==="undefined"?"undefined":_typeof(ImageData))<"u"&&pe instanceof ImageData){Te.putImageData(pe,0,0);return}var ue=pe.height,se=pe.width,be=ue%ie,Ae=(ue-be)/ie,ze=be===0?Ae:Ae+1,pi=Te.createImageData(se,ie);var io=0,Qr;var Es=pe.data,nl=pi.data;var Cr,$l,_l,Ih;if(pe.kind===it.ImageKind.GRAYSCALE_1BPP){var Rh=Es.byteLength,Th=new Uint32Array(nl.buffer,0,nl.byteLength>>2),$s=Th.length,Dr=se+7>>3,Xi=4294967295,Ke=it.FeatureTest.isLittleEndian?4278190080:255;for(Cr=0;Cr<ze;Cr++){for(_l=Cr<Ae?ie:be,Qr=0,$l=0;$l<_l;$l++){var ta=Rh-io;var Cl=0;var Oh=ta>Dr?se:ta*8-7,jh=Oh&-8;var qh=0,Bh=0;for(;Cl<jh;Cl+=8)Bh=Es[io++],Th[Qr++]=Bh&128?Xi:Ke,Th[Qr++]=Bh&64?Xi:Ke,Th[Qr++]=Bh&32?Xi:Ke,Th[Qr++]=Bh&16?Xi:Ke,Th[Qr++]=Bh&8?Xi:Ke,Th[Qr++]=Bh&4?Xi:Ke,Th[Qr++]=Bh&2?Xi:Ke,Th[Qr++]=Bh&1?Xi:Ke;for(;Cl<Oh;Cl++)qh===0&&(Bh=Es[io++],qh=128),Th[Qr++]=Bh&qh?Xi:Ke,qh>>=1}for(;Qr<$s;)Th[Qr++]=0;Te.putImageData(pi,0,Cr*ie)}}else if(pe.kind===it.ImageKind.RGBA_32BPP){for($l=0,Ih=se*ie*4,Cr=0;Cr<Ae;Cr++)nl.set(Es.subarray(io,io+Ih)),io+=Ih,Te.putImageData(pi,0,$l),$l+=ie;Cr<ze&&(Ih=se*be*4,nl.set(Es.subarray(io,io+Ih)),Te.putImageData(pi,0,$l))}else if(pe.kind===it.ImageKind.RGB_24BPP)for(_l=ie,Ih=se*_l,Cr=0;Cr<ze;Cr++){for(Cr>=Ae&&(_l=be,Ih=se*_l),Qr=0,$l=Ih;$l--;)nl[Qr++]=Es[io++],nl[Qr++]=Es[io++],nl[Qr++]=Es[io++],nl[Qr++]=255;Te.putImageData(pi,0,Cr*ie)}else throw new Error("bad image kind: ".concat(pe.kind))}function ve(Te,pe){if(pe.bitmap){Te.drawImage(pe.bitmap,0,0);return}var ue=pe.height,se=pe.width,be=ue%ie,Ae=(ue-be)/ie,ze=be===0?Ae:Ae+1,pi=Te.createImageData(se,ie);var io=0;var Qr=pe.data,Es=pi.data;for(var nl=0;nl<ze;nl++){var _ref56;var Cr=nl<Ae?ie:be;(_ref56=(0,dt.convertBlackAndWhiteToRGBA)({src:Qr,srcPos:io,dest:Es,width:se,height:Cr,nonBlackColor:0}),io=_ref56.srcPos),Te.putImageData(pi,0,nl*ie)}}function _e(Te,pe){var ue=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];for(var _i8=0,_ue2=ue;_i8<_ue2.length;_i8++){var se=_ue2[_i8];Te[se]!==void 0&&(pe[se]=Te[se])}Te.setLineDash!==void 0&&(pe.setLineDash(Te.getLineDash()),pe.lineDashOffset=Te.lineDashOffset)}function Xe(Te){if(Te.strokeStyle=Te.fillStyle="#000000",Te.fillRule="nonzero",Te.globalAlpha=1,Te.lineWidth=1,Te.lineCap="butt",Te.lineJoin="miter",Te.miterLimit=10,Te.globalCompositeOperation="source-over",Te.font="10px sans-serif",Te.setLineDash!==void 0&&(Te.setLineDash([]),Te.lineDashOffset=0),!it.isNodeJS){var pe=Te.filter;pe!=="none"&&pe!==""&&(Te.filter="none")}}function He(Te,pe,ue,se){var be=Te.length;for(var Ae=3;Ae<be;Ae+=4){var ze=Te[Ae];if(ze===0)Te[Ae-3]=pe,Te[Ae-2]=ue,Te[Ae-1]=se;else if(ze<255){var pi=255-ze;Te[Ae-3]=Te[Ae-3]*ze+pe*pi>>8,Te[Ae-2]=Te[Ae-2]*ze+ue*pi>>8,Te[Ae-1]=Te[Ae-1]*ze+se*pi>>8}}}function ro(Te,pe,ue){var se=Te.length,be=1/255;for(var Ae=3;Ae<se;Ae+=4){var ze=ue?ue[Te[Ae]]:Te[Ae];pe[Ae]=pe[Ae]*ze*be|0}}function Xo(Te,pe,ue){var se=Te.length;for(var be=3;be<se;be+=4){var Ae=Te[be-3]*77+Te[be-2]*152+Te[be-1]*28;pe[be]=ue?pe[be]*ue[Ae>>8]>>8:pe[be]*Ae>>16}}function Se(Te,pe,ue,se,be,Ae,ze,pi,io,Qr,Es){var nl=!!Ae,Cr=nl?Ae[0]:0,$l=nl?Ae[1]:0,_l=nl?Ae[2]:0,Ih=be==="Luminosity"?Xo:ro,Rh=Math.min(se,Math.ceil(1048576/ue));for(var Th=0;Th<se;Th+=Rh){var $s=Math.min(Rh,se-Th),Dr=Te.getImageData(pi-Qr,Th+(io-Es),ue,$s),Xi=pe.getImageData(pi,Th+io,ue,$s);nl&&He(Dr.data,Cr,$l,_l),Ih(Dr.data,Xi.data,ze),pe.putImageData(Xi,pi,Th+io)}}function xr(Te,pe,ue,se){var be=se[0],Ae=se[1],ze=se[2]-be,pi=se[3]-Ae;ze===0||pi===0||(Se(pe.context,ue,ze,pi,pe.subtype,pe.backdrop,pe.transferMap,be,Ae,pe.offsetX,pe.offsetY),Te.save(),Te.globalAlpha=1,Te.globalCompositeOperation="source-over",Te.setTransform(1,0,0,1,0,0),Te.drawImage(ue.canvas,0,0),Te.restore())}function pr(Te,pe){var ue=it.Util.singularValueDecompose2dScale(Te);ue[0]=Math.fround(ue[0]),ue[1]=Math.fround(ue[1]);var se=Math.fround((globalThis.devicePixelRatio||1)*nt.PixelsPerInch.PDF_TO_CSS_UNITS);return pe!==void 0?pe:ue[0]<=se||ue[1]<=se}var $e=["butt","round","square"],_r=["miter","round","bevel"],Ps={},qe={},bl=function(){function $m(pe,ue,se,be,Ae,_ref57,io,Qr){var ze=_ref57.optionalContentConfig,_ref57$markedContentS=_ref57.markedContentStack,pi=_ref57$markedContentS===void 0?null:_ref57$markedContentS;_classCallCheck(this,$m);I(this,B),I(this,Y),this.ctx=pe,this.current=new Wt(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=ue,this.objs=se,this.canvasFactory=be,this.filterFactory=Ae,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.suspendedCtx=null,this.contentVisible=!0,this.markedContentStack=pi||[],this.optionalContentConfig=ze,this.cachedCanvases=new ne(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=io,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=Qr,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map}_createClass($m,[{key:"getObject",value:function getObject(pe){var ue=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;return typeof pe=="string"?pe.startsWith("g_")?this.commonObjs.get(pe):this.objs.get(pe):ue}},{key:"beginDrawing",value:function beginDrawing(_ref58){var _this$ctx2,_this$ctx3;var pe=_ref58.transform,ue=_ref58.viewport,_ref58$transparency=_ref58.transparency,se=_ref58$transparency===void 0?!1:_ref58$transparency,_ref58$background=_ref58.background,be=_ref58$background===void 0?null:_ref58$background;var Ae=this.ctx.canvas.width,ze=this.ctx.canvas.height,pi=this.ctx.fillStyle;if(this.ctx.fillStyle=be||"#ffffff",this.ctx.fillRect(0,0,Ae,ze),this.ctx.fillStyle=pi,se){var _this$ctx;var io=this.cachedCanvases.getCanvas("transparent",Ae,ze);this.compositeCtx=this.ctx,this.transparentCanvas=io.canvas,this.ctx=io.context,this.ctx.save(),(_this$ctx=this.ctx).transform.apply(_this$ctx,_toConsumableArray((0,nt.getCurrentTransform)(this.compositeCtx)))}this.ctx.save(),Xe(this.ctx),pe&&((_this$ctx2=this.ctx).transform.apply(_this$ctx2,_toConsumableArray(pe)),this.outputScaleX=pe[0],this.outputScaleY=pe[0]),(_this$ctx3=this.ctx).transform.apply(_this$ctx3,_toConsumableArray(ue.transform)),this.viewportScale=ue.scale,this.baseTransform=(0,nt.getCurrentTransform)(this.ctx)}},{key:"executeOperatorList",value:function executeOperatorList(pe,ue,se,be){var Ae=pe.argsArray,ze=pe.fnArray;var pi=ue||0;var io=Ae.length;if(io===pi)return pi;var Qr=io-pi>te&&typeof se=="function",Es=Qr?Date.now()+Ut:0;var nl=0;var Cr=this.commonObjs,$l=this.objs;var _l;for(;;){if(be!==void 0&&pi===be.nextBreakPoint)return be.breakIt(pi,se),pi;if(_l=ze[pi],_l!==it.OPS.dependency)this[_l].apply(this,Ae[pi]);else{var _iterator62=_createForOfIteratorHelper(Ae[pi]),_step62;try{for(_iterator62.s();!(_step62=_iterator62.n()).done;){var Ih=_step62.value;var Rh=Ih.startsWith("g_")?Cr:$l;if(!Rh.has(Ih))return Rh.get(Ih,se),pi}}catch(err){_iterator62.e(err)}finally{_iterator62.f()}}if(pi++,pi===io)return pi;if(Qr&&++nl>te){if(Date.now()>Es)return se(),pi;nl=0}}}},{key:"endDrawing",value:function endDrawing(){W(this,B,Q).call(this),this.cachedCanvases.clear(),this.cachedPatterns.clear();var _iterator63=_createForOfIteratorHelper(this._cachedBitmapsMap.values()),_step63;try{for(_iterator63.s();!(_step63=_iterator63.n()).done;){var pe=_step63.value;var _iterator64=_createForOfIteratorHelper(pe.values()),_step64;try{for(_iterator64.s();!(_step64=_iterator64.n()).done;){var ue=_step64.value;(typeof HTMLCanvasElement==="undefined"?"undefined":_typeof(HTMLCanvasElement))<"u"&&ue instanceof HTMLCanvasElement&&(ue.width=ue.height=0)}}catch(err){_iterator64.e(err)}finally{_iterator64.f()}pe.clear()}}catch(err){_iterator63.e(err)}finally{_iterator63.f()}this._cachedBitmapsMap.clear(),W(this,Y,J).call(this)}},{key:"_scaleImage",value:function _scaleImage(pe,ue){var se=pe.width,be=pe.height;var Ae=Math.max(Math.hypot(ue[0],ue[1]),1),ze=Math.max(Math.hypot(ue[2],ue[3]),1),pi=se,io=be,Qr="prescale1",Es,nl;for(;Ae>2&&pi>1||ze>2&&io>1;){var Cr=pi,$l=io;Ae>2&&pi>1&&(Cr=pi>=16384?Math.floor(pi/2)-1||1:Math.ceil(pi/2),Ae/=pi/Cr),ze>2&&io>1&&($l=io>=16384?Math.floor(io/2)-1||1:Math.ceil(io)/2,ze/=io/$l),Es=this.cachedCanvases.getCanvas(Qr,Cr,$l),nl=Es.context,nl.clearRect(0,0,Cr,$l),nl.drawImage(pe,0,0,pi,io,0,0,Cr,$l),pe=Es.canvas,pi=Cr,io=$l,Qr=Qr==="prescale1"?"prescale2":"prescale1"}return{img:pe,paintWidth:pi,paintHeight:io}}},{key:"_createMaskCanvas",value:function _createMaskCanvas(pe){var ue=this.ctx,se=pe.width,be=pe.height,Ae=this.current.fillColor,ze=this.current.patternFill,pi=(0,nt.getCurrentTransform)(ue);var io,Qr,Es,nl;if((pe.bitmap||pe.data)&&pe.count>1){var Cl=pe.bitmap||pe.data.buffer;Qr=JSON.stringify(ze?pi:[pi.slice(0,4),Ae]),io=this._cachedBitmapsMap.get(Cl),io||(io=new Map,this._cachedBitmapsMap.set(Cl,io));var Oh=io.get(Qr);if(Oh&&!ze){var jh=Math.round(Math.min(pi[0],pi[2])+pi[4]),qh=Math.round(Math.min(pi[1],pi[3])+pi[5]);return{canvas:Oh,offsetX:jh,offsetY:qh}}Es=Oh}Es||(nl=this.cachedCanvases.getCanvas("maskCanvas",se,be),ve(nl.context,pe));var Cr=it.Util.transform(pi,[1/se,0,0,-1/be,0,0]);Cr=it.Util.transform(Cr,[1,0,0,1,0,-be]);var $l=it.Util.applyTransform([0,0],Cr),_l=it.Util.applyTransform([se,be],Cr),Ih=it.Util.normalizeRect([$l[0],$l[1],_l[0],_l[1]]),Rh=Math.round(Ih[2]-Ih[0])||1,Th=Math.round(Ih[3]-Ih[1])||1,$s=this.cachedCanvases.getCanvas("fillCanvas",Rh,Th),Dr=$s.context,Xi=Math.min($l[0],_l[0]),Ke=Math.min($l[1],_l[1]);Dr.translate(-Xi,-Ke),Dr.transform.apply(Dr,_toConsumableArray(Cr)),Es||(Es=this._scaleImage(nl.canvas,(0,nt.getCurrentTransformInverse)(Dr)),Es=Es.img,io&&ze&&io.set(Qr,Es)),Dr.imageSmoothingEnabled=pr((0,nt.getCurrentTransform)(Dr),pe.interpolate),ae(Dr,Es,0,0,Es.width,Es.height,0,0,se,be),Dr.globalCompositeOperation="source-in";var ta=it.Util.transform((0,nt.getCurrentTransformInverse)(Dr),[1,0,0,1,-Xi,-Ke]);return Dr.fillStyle=ze?Ae.getPattern(ue,this,ta,ot.PathType.FILL):Ae,Dr.fillRect(0,0,se,be),io&&!ze&&(this.cachedCanvases["delete"]("fillCanvas"),io.set(Qr,$s.canvas)),{canvas:$s.canvas,offsetX:Math.round(Xi),offsetY:Math.round(Ke)}}},{key:"setLineWidth",value:function setLineWidth(pe){pe!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=pe,this.ctx.lineWidth=pe}},{key:"setLineCap",value:function setLineCap(pe){this.ctx.lineCap=$e[pe]}},{key:"setLineJoin",value:function setLineJoin(pe){this.ctx.lineJoin=_r[pe]}},{key:"setMiterLimit",value:function setMiterLimit(pe){this.ctx.miterLimit=pe}},{key:"setDash",value:function setDash(pe,ue){var se=this.ctx;se.setLineDash!==void 0&&(se.setLineDash(pe),se.lineDashOffset=ue)}},{key:"setRenderingIntent",value:function setRenderingIntent(pe){}},{key:"setFlatness",value:function setFlatness(pe){}},{key:"setGState",value:function setGState(pe){var _iterator65=_createForOfIteratorHelper(pe),_step65;try{for(_iterator65.s();!(_step65=_iterator65.n()).done;){var _step65$value=_slicedToArray(_step65.value,2),ue=_step65$value[0],se=_step65$value[1];switch(ue){case"LW":this.setLineWidth(se);break;case"LC":this.setLineCap(se);break;case"LJ":this.setLineJoin(se);break;case"ML":this.setMiterLimit(se);break;case"D":this.setDash(se[0],se[1]);break;case"RI":this.setRenderingIntent(se);break;case"FL":this.setFlatness(se);break;case"Font":this.setFont(se[0],se[1]);break;case"CA":this.current.strokeAlpha=se;break;case"ca":this.current.fillAlpha=se,this.ctx.globalAlpha=se;break;case"BM":this.ctx.globalCompositeOperation=se;break;case"SMask":this.current.activeSMask=se?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(se);break}}}catch(err){_iterator65.e(err)}finally{_iterator65.f()}}},{key:"inSMaskMode",get:function get(){return!!this.suspendedCtx}},{key:"checkSMaskState",value:function checkSMaskState(){var pe=this.inSMaskMode;this.current.activeSMask&&!pe?this.beginSMaskMode():!this.current.activeSMask&&pe&&this.endSMaskMode()}},{key:"beginSMaskMode",value:function beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");var pe=this.ctx.canvas.width,ue=this.ctx.canvas.height,se="smaskGroupAt"+this.groupLevel,be=this.cachedCanvases.getCanvas(se,pe,ue);this.suspendedCtx=this.ctx,this.ctx=be.context;var Ae=this.ctx;Ae.setTransform.apply(Ae,_toConsumableArray((0,nt.getCurrentTransform)(this.suspendedCtx))),_e(this.suspendedCtx,Ae),re(Ae,this.suspendedCtx),this.setGState([["BM","source-over"],["ca",1],["CA",1]])}},{key:"endSMaskMode",value:function endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),_e(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}},{key:"compose",value:function compose(pe){if(!this.current.activeSMask)return;pe?(pe[0]=Math.floor(pe[0]),pe[1]=Math.floor(pe[1]),pe[2]=Math.ceil(pe[2]),pe[3]=Math.ceil(pe[3])):pe=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];var ue=this.current.activeSMask,se=this.suspendedCtx;xr(se,ue,this.ctx,pe),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}},{key:"save",value:function save(){this.inSMaskMode?(_e(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();var pe=this.current;this.stateStack.push(pe),this.current=pe.clone()}},{key:"restore",value:function restore(){this.stateStack.length===0&&this.inSMaskMode&&this.endSMaskMode(),this.stateStack.length!==0&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),_e(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null)}},{key:"transform",value:function transform(pe,ue,se,be,Ae,ze){this.ctx.transform(pe,ue,se,be,Ae,ze),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}},{key:"constructPath",value:function constructPath(pe,ue,se){var be=this.ctx,Ae=this.current;var ze=Ae.x,pi=Ae.y,io,Qr;var Es=(0,nt.getCurrentTransform)(be),nl=Es[0]===0&&Es[3]===0||Es[1]===0&&Es[2]===0,Cr=nl?se.slice(0):null;for(var $l=0,_l=0,Ih=pe.length;$l<Ih;$l++)switch(pe[$l]|0){case it.OPS.rectangle:ze=ue[_l++],pi=ue[_l++];var Rh=ue[_l++],Th=ue[_l++],$s=ze+Rh,Dr=pi+Th;be.moveTo(ze,pi),Rh===0||Th===0?be.lineTo($s,Dr):(be.lineTo($s,pi),be.lineTo($s,Dr),be.lineTo(ze,Dr)),nl||Ae.updateRectMinMax(Es,[ze,pi,$s,Dr]),be.closePath();break;case it.OPS.moveTo:ze=ue[_l++],pi=ue[_l++],be.moveTo(ze,pi),nl||Ae.updatePathMinMax(Es,ze,pi);break;case it.OPS.lineTo:ze=ue[_l++],pi=ue[_l++],be.lineTo(ze,pi),nl||Ae.updatePathMinMax(Es,ze,pi);break;case it.OPS.curveTo:io=ze,Qr=pi,ze=ue[_l+4],pi=ue[_l+5],be.bezierCurveTo(ue[_l],ue[_l+1],ue[_l+2],ue[_l+3],ze,pi),Ae.updateCurvePathMinMax(Es,io,Qr,ue[_l],ue[_l+1],ue[_l+2],ue[_l+3],ze,pi,Cr),_l+=6;break;case it.OPS.curveTo2:io=ze,Qr=pi,be.bezierCurveTo(ze,pi,ue[_l],ue[_l+1],ue[_l+2],ue[_l+3]),Ae.updateCurvePathMinMax(Es,io,Qr,ze,pi,ue[_l],ue[_l+1],ue[_l+2],ue[_l+3],Cr),ze=ue[_l+2],pi=ue[_l+3],_l+=4;break;case it.OPS.curveTo3:io=ze,Qr=pi,ze=ue[_l+2],pi=ue[_l+3],be.bezierCurveTo(ue[_l],ue[_l+1],ze,pi,ze,pi),Ae.updateCurvePathMinMax(Es,io,Qr,ue[_l],ue[_l+1],ze,pi,ze,pi,Cr),_l+=4;break;case it.OPS.closePath:be.closePath();break}nl&&Ae.updateScalingPathMinMax(Es,Cr),Ae.setCurrentPoint(ze,pi)}},{key:"closePath",value:function closePath(){this.ctx.closePath()}},{key:"stroke",value:function stroke(){var pe=arguments.length>0&&arguments[0]!==undefined?arguments[0]:!0;var ue=this.ctx,se=this.current.strokeColor;ue.globalAlpha=this.current.strokeAlpha,this.contentVisible&&(_typeof(se)=="object"&&se!=null&&se.getPattern?(ue.save(),ue.strokeStyle=se.getPattern(ue,this,(0,nt.getCurrentTransformInverse)(ue),ot.PathType.STROKE),this.rescaleAndStroke(!1),ue.restore()):this.rescaleAndStroke(!0)),pe&&this.consumePath(this.current.getClippedPathBoundingBox()),ue.globalAlpha=this.current.fillAlpha}},{key:"closeStroke",value:function closeStroke(){this.closePath(),this.stroke()}},{key:"fill",value:function fill(){var pe=arguments.length>0&&arguments[0]!==undefined?arguments[0]:!0;var ue=this.ctx,se=this.current.fillColor,be=this.current.patternFill;var Ae=!1;be&&(ue.save(),ue.fillStyle=se.getPattern(ue,this,(0,nt.getCurrentTransformInverse)(ue),ot.PathType.FILL),Ae=!0);var ze=this.current.getClippedPathBoundingBox();this.contentVisible&&ze!==null&&(this.pendingEOFill?(ue.fill("evenodd"),this.pendingEOFill=!1):ue.fill()),Ae&&ue.restore(),pe&&this.consumePath(ze)}},{key:"eoFill",value:function eoFill(){this.pendingEOFill=!0,this.fill()}},{key:"fillStroke",value:function fillStroke(){this.fill(!1),this.stroke(!1),this.consumePath()}},{key:"eoFillStroke",value:function eoFillStroke(){this.pendingEOFill=!0,this.fillStroke()}},{key:"closeFillStroke",value:function closeFillStroke(){this.closePath(),this.fillStroke()}},{key:"closeEOFillStroke",value:function closeEOFillStroke(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()}},{key:"endPath",value:function endPath(){this.consumePath()}},{key:"clip",value:function clip(){this.pendingClip=Ps}},{key:"eoClip",value:function eoClip(){this.pendingClip=qe}},{key:"beginText",value:function beginText(){this.current.textMatrix=it.IDENTITY_MATRIX,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}},{key:"endText",value:function endText(){var pe=this.pendingTextPaths,ue=this.ctx;if(pe===void 0){ue.beginPath();return}ue.save(),ue.beginPath();var _iterator66=_createForOfIteratorHelper(pe),_step66;try{for(_iterator66.s();!(_step66=_iterator66.n()).done;){var se=_step66.value;ue.setTransform.apply(ue,_toConsumableArray(se.transform)),ue.translate(se.x,se.y),se.addToPath(ue,se.fontSize)}}catch(err){_iterator66.e(err)}finally{_iterator66.f()}ue.restore(),ue.clip(),ue.beginPath(),delete this.pendingTextPaths}},{key:"setCharSpacing",value:function setCharSpacing(pe){this.current.charSpacing=pe}},{key:"setWordSpacing",value:function setWordSpacing(pe){this.current.wordSpacing=pe}},{key:"setHScale",value:function setHScale(pe){this.current.textHScale=pe/100}},{key:"setLeading",value:function setLeading(pe){this.current.leading=-pe}},{key:"setFont",value:function setFont(pe,ue){var se;var be=this.commonObjs.get(pe),Ae=this.current;if(!be)throw new Error("Can't find font for ".concat(pe));if(Ae.fontMatrix=be.fontMatrix||it.FONT_IDENTITY_MATRIX,(Ae.fontMatrix[0]===0||Ae.fontMatrix[3]===0)&&(0,it.warn)("Invalid font matrix for font "+pe),ue<0?(ue=-ue,Ae.fontDirection=-1):Ae.fontDirection=1,this.current.font=be,this.current.fontSize=ue,be.isType3Font)return;var ze=be.loadedName||"sans-serif",pi=((se=be.systemFontInfo)==null?void 0:se.css)||"\"".concat(ze,"\", ").concat(be.fallbackName);var io="normal";be.black?io="900":be.bold&&(io="bold");var Qr=be.italic?"italic":"normal";var Es=ue;ue<Mt?Es=Mt:ue>Ot&&(Es=Ot),this.current.fontSizeScale=ue/Es,this.ctx.font="".concat(Qr," ").concat(io," ").concat(Es,"px ").concat(pi)}},{key:"setTextRenderingMode",value:function setTextRenderingMode(pe){this.current.textRenderingMode=pe}},{key:"setTextRise",value:function setTextRise(pe){this.current.textRise=pe}},{key:"moveText",value:function moveText(pe,ue){this.current.x=this.current.lineX+=pe,this.current.y=this.current.lineY+=ue}},{key:"setLeadingMoveText",value:function setLeadingMoveText(pe,ue){this.setLeading(-ue),this.moveText(pe,ue)}},{key:"setTextMatrix",value:function setTextMatrix(pe,ue,se,be,Ae,ze){this.current.textMatrix=[pe,ue,se,be,Ae,ze],this.current.textMatrixScale=Math.hypot(pe,ue),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}},{key:"nextLine",value:function nextLine(){this.moveText(0,this.current.leading)}},{key:"paintChar",value:function paintChar(pe,ue,se,be){var Ae=this.ctx,ze=this.current,pi=ze.font,io=ze.textRenderingMode,Qr=ze.fontSize/ze.fontSizeScale,Es=io&it.TextRenderingMode.FILL_STROKE_MASK,nl=!!(io&it.TextRenderingMode.ADD_TO_PATH_FLAG),Cr=ze.patternFill&&!pi.missingFile;var $l;(pi.disableFontFace||nl||Cr)&&($l=pi.getPathGenerator(this.commonObjs,pe)),pi.disableFontFace||Cr?(Ae.save(),Ae.translate(ue,se),Ae.beginPath(),$l(Ae,Qr),be&&Ae.setTransform.apply(Ae,_toConsumableArray(be)),(Es===it.TextRenderingMode.FILL||Es===it.TextRenderingMode.FILL_STROKE)&&Ae.fill(),(Es===it.TextRenderingMode.STROKE||Es===it.TextRenderingMode.FILL_STROKE)&&Ae.stroke(),Ae.restore()):((Es===it.TextRenderingMode.FILL||Es===it.TextRenderingMode.FILL_STROKE)&&Ae.fillText(pe,ue,se),(Es===it.TextRenderingMode.STROKE||Es===it.TextRenderingMode.FILL_STROKE)&&Ae.strokeText(pe,ue,se)),nl&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:(0,nt.getCurrentTransform)(Ae),x:ue,y:se,fontSize:Qr,addToPath:$l})}},{key:"isFontSubpixelAAEnabled",get:function get(){var _this$cachedCanvases$=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10),pe=_this$cachedCanvases$.context;pe.scale(1.5,1),pe.fillText("I",0,10);var ue=pe.getImageData(0,0,10,10).data;var se=!1;for(var be=3;be<ue.length;be+=4)if(ue[be]>0&&ue[be]<255){se=!0;break}return(0,it.shadow)(this,"isFontSubpixelAAEnabled",se)}},{key:"showText",value:function showText(pe){var ue=this.current,se=ue.font;if(se.isType3Font)return this.showType3Text(pe);var be=ue.fontSize;if(be===0)return;var Ae=this.ctx,ze=ue.fontSizeScale,pi=ue.charSpacing,io=ue.wordSpacing,Qr=ue.fontDirection,Es=ue.textHScale*Qr,nl=pe.length,Cr=se.vertical,$l=Cr?1:-1,_l=se.defaultVMetrics,Ih=be*ue.fontMatrix[0],Rh=ue.textRenderingMode===it.TextRenderingMode.FILL&&!se.disableFontFace&&!ue.patternFill;Ae.save(),Ae.transform.apply(Ae,_toConsumableArray(ue.textMatrix)),Ae.translate(ue.x,ue.y+ue.textRise),Qr>0?Ae.scale(Es,-1):Ae.scale(Es,1);var Th;if(ue.patternFill){Ae.save();var ta=ue.fillColor.getPattern(Ae,this,(0,nt.getCurrentTransformInverse)(Ae),ot.PathType.FILL);Th=(0,nt.getCurrentTransform)(Ae),Ae.restore(),Ae.fillStyle=ta}var $s=ue.lineWidth;var Dr=ue.textMatrixScale;if(Dr===0||$s===0){var _ta3=ue.textRenderingMode&it.TextRenderingMode.FILL_STROKE_MASK;(_ta3===it.TextRenderingMode.STROKE||_ta3===it.TextRenderingMode.FILL_STROKE)&&($s=this.getSinglePixelWidth())}else $s/=Dr;if(ze!==1&&(Ae.scale(ze,ze),$s/=ze),Ae.lineWidth=$s,se.isInvalidPDFjsFont){var _ta4=[];var Cl=0;var _iterator67=_createForOfIteratorHelper(pe),_step67;try{for(_iterator67.s();!(_step67=_iterator67.n()).done;){var Oh=_step67.value;_ta4.push(Oh.unicode),Cl+=Oh.width}}catch(err){_iterator67.e(err)}finally{_iterator67.f()}Ae.fillText(_ta4.join(""),0,0),ue.x+=Cl*Ih*Es,Ae.restore(),this.compose();return}var Xi=0,Ke;for(Ke=0;Ke<nl;++Ke){var _ta5=pe[Ke];if(typeof _ta5=="number"){Xi+=$l*_ta5*be/1e3;continue}var _Cl2=!1;var _Oh2=(_ta5.isSpace?io:0)+pi,jh=_ta5.fontChar,qh=_ta5.accent;var Bh=void 0,Jh=void 0,Xh=_ta5.width;if(Cr){var Kh=_ta5.vmetric||_l,ia=-(_ta5.vmetric?Kh[1]:Xh*0.5)*Ih,fe=Kh[2]*Ih;Xh=Kh?-Kh[0]:Xh,Bh=ia/ze,Jh=(Xi+fe)/ze}else Bh=Xi/ze,Jh=0;if(se.remeasure&&Xh>0){var _Kh2=Ae.measureText(jh).width*1e3/be*ze;if(Xh<_Kh2&&this.isFontSubpixelAAEnabled){var _ia=Xh/_Kh2;_Cl2=!0,Ae.save(),Ae.scale(_ia,1),Bh/=_ia}else Xh!==_Kh2&&(Bh+=(Xh-_Kh2)/2e3*be/ze)}if(this.contentVisible&&(_ta5.isInFont||se.missingFile)){if(Rh&&!qh)Ae.fillText(jh,Bh,Jh);else if(this.paintChar(jh,Bh,Jh,Th),qh){var _Kh3=Bh+be*qh.offset.x/ze,_ia2=Jh-be*qh.offset.y/ze;this.paintChar(qh.fontChar,_Kh3,_ia2,Th)}}var Qh=Cr?Xh*Ih-_Oh2*Qr:Xh*Ih+_Oh2*Qr;Xi+=Qh,_Cl2&&Ae.restore()}Cr?ue.y-=Xi:ue.x+=Xi*Es,Ae.restore(),this.compose()}},{key:"showType3Text",value:function showType3Text(pe){var ue=this.ctx,se=this.current,be=se.font,Ae=se.fontSize,ze=se.fontDirection,pi=be.vertical?1:-1,io=se.charSpacing,Qr=se.wordSpacing,Es=se.textHScale*ze,nl=se.fontMatrix||it.FONT_IDENTITY_MATRIX,Cr=pe.length,$l=se.textRenderingMode===it.TextRenderingMode.INVISIBLE;var _l,Ih,Rh,Th;if(!($l||Ae===0)){for(this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,ue.save(),ue.transform.apply(ue,_toConsumableArray(se.textMatrix)),ue.translate(se.x,se.y),ue.scale(Es,ze),_l=0;_l<Cr;++_l){if(Ih=pe[_l],typeof Ih=="number"){Th=pi*Ih*Ae/1e3,this.ctx.translate(Th,0),se.x+=Th*Es;continue}var $s=(Ih.isSpace?Qr:0)+io,Dr=be.charProcOperatorList[Ih.operatorListId];if(!Dr){(0,it.warn)("Type3 character \"".concat(Ih.operatorListId,"\" is not available."));continue}this.contentVisible&&(this.processingType3=Ih,this.save(),ue.scale(Ae,Ae),ue.transform.apply(ue,_toConsumableArray(nl)),this.executeOperatorList(Dr),this.restore()),Rh=it.Util.applyTransform([Ih.width,0],nl)[0]*Ae+$s,ue.translate(Rh,0),se.x+=Rh*Es}ue.restore(),this.processingType3=null}}},{key:"setCharWidth",value:function setCharWidth(pe,ue){}},{key:"setCharWidthAndBounds",value:function setCharWidthAndBounds(pe,ue,se,be,Ae,ze){this.ctx.rect(se,be,Ae-se,ze-be),this.ctx.clip(),this.endPath()}},{key:"getColorN_Pattern",value:function getColorN_Pattern(pe){var _this41=this;var ue;if(pe[0]==="TilingPattern"){var se=pe[1],be=this.baseTransform||(0,nt.getCurrentTransform)(this.ctx),Ae={createCanvasGraphics:function createCanvasGraphics(ze){return new $m(ze,_this41.commonObjs,_this41.objs,_this41.canvasFactory,_this41.filterFactory,{optionalContentConfig:_this41.optionalContentConfig,markedContentStack:_this41.markedContentStack})}};ue=new ot.TilingPattern(pe,se,this.ctx,Ae,be)}else ue=this._getPattern(pe[1],pe[2]);return ue}},{key:"setStrokeColorN",value:function setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}},{key:"setFillColorN",value:function setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}},{key:"setStrokeRGBColor",value:function setStrokeRGBColor(pe,ue,se){var be=it.Util.makeHexColor(pe,ue,se);this.ctx.strokeStyle=be,this.current.strokeColor=be}},{key:"setFillRGBColor",value:function setFillRGBColor(pe,ue,se){var be=it.Util.makeHexColor(pe,ue,se);this.ctx.fillStyle=be,this.current.fillColor=be,this.current.patternFill=!1}},{key:"_getPattern",value:function _getPattern(pe){var ue=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;var se;return this.cachedPatterns.has(pe)?se=this.cachedPatterns.get(pe):(se=(0,ot.getShadingPattern)(this.getObject(pe)),this.cachedPatterns.set(pe,se)),ue&&(se.matrix=ue),se}},{key:"shadingFill",value:function shadingFill(pe){if(!this.contentVisible)return;var ue=this.ctx;this.save();var se=this._getPattern(pe);ue.fillStyle=se.getPattern(ue,this,(0,nt.getCurrentTransformInverse)(ue),ot.PathType.SHADING);var be=(0,nt.getCurrentTransformInverse)(ue);if(be){var _ue$canvas=ue.canvas,Ae=_ue$canvas.width,ze=_ue$canvas.height,_it$Util$getAxialAlig=it.Util.getAxialAlignedBoundingBox([0,0,Ae,ze],be),_it$Util$getAxialAlig2=_slicedToArray(_it$Util$getAxialAlig,4),pi=_it$Util$getAxialAlig2[0],io=_it$Util$getAxialAlig2[1],Qr=_it$Util$getAxialAlig2[2],Es=_it$Util$getAxialAlig2[3];this.ctx.fillRect(pi,io,Qr-pi,Es-io)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}},{key:"beginInlineImage",value:function beginInlineImage(){(0,it.unreachable)("Should not call beginInlineImage")}},{key:"beginImageData",value:function beginImageData(){(0,it.unreachable)("Should not call beginImageData")}},{key:"paintFormXObjectBegin",value:function paintFormXObjectBegin(pe,ue){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),Array.isArray(pe)&&pe.length===6&&this.transform.apply(this,_toConsumableArray(pe)),this.baseTransform=(0,nt.getCurrentTransform)(this.ctx),ue)){var se=ue[2]-ue[0],be=ue[3]-ue[1];this.ctx.rect(ue[0],ue[1],se,be),this.current.updateRectMinMax((0,nt.getCurrentTransform)(this.ctx),ue),this.clip(),this.endPath()}}},{key:"paintFormXObjectEnd",value:function paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}},{key:"beginGroup",value:function beginGroup(pe){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);var ue=this.ctx;pe.isolated||(0,it.info)("TODO: Support non-isolated groups."),pe.knockout&&(0,it.warn)("Knockout groups not supported.");var se=(0,nt.getCurrentTransform)(ue);if(pe.matrix&&ue.transform.apply(ue,_toConsumableArray(pe.matrix)),!pe.bbox)throw new Error("Bounding box is required.");var be=it.Util.getAxialAlignedBoundingBox(pe.bbox,(0,nt.getCurrentTransform)(ue));var Ae=[0,0,ue.canvas.width,ue.canvas.height];be=it.Util.intersect(be,Ae)||[0,0,0,0];var ze=Math.floor(be[0]),pi=Math.floor(be[1]);var io=Math.max(Math.ceil(be[2])-ze,1),Qr=Math.max(Math.ceil(be[3])-pi,1),Es=1,nl=1;io>Qt&&(Es=io/Qt,io=Qt),Qr>Qt&&(nl=Qr/Qt,Qr=Qt),this.current.startNewPathAndClipBox([0,0,io,Qr]);var Cr="groupAt"+this.groupLevel;pe.smask&&(Cr+="_smask_"+this.smaskCounter++%2);var $l=this.cachedCanvases.getCanvas(Cr,io,Qr),_l=$l.context;_l.scale(1/Es,1/nl),_l.translate(-ze,-pi),_l.transform.apply(_l,_toConsumableArray(se)),pe.smask?this.smaskStack.push({canvas:$l.canvas,context:_l,offsetX:ze,offsetY:pi,scaleX:Es,scaleY:nl,subtype:pe.smask.subtype,backdrop:pe.smask.backdrop,transferMap:pe.smask.transferMap||null,startTransformInverse:null}):(ue.setTransform(1,0,0,1,0,0),ue.translate(ze,pi),ue.scale(Es,nl),ue.save()),_e(ue,_l),this.ctx=_l,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(ue),this.groupLevel++}},{key:"endGroup",value:function endGroup(pe){if(!this.contentVisible)return;this.groupLevel--;var ue=this.ctx,se=this.groupStack.pop();if(this.ctx=se,this.ctx.imageSmoothingEnabled=!1,pe.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{var _this$ctx4;this.ctx.restore();var be=(0,nt.getCurrentTransform)(this.ctx);this.restore(),this.ctx.save(),(_this$ctx4=this.ctx).setTransform.apply(_this$ctx4,_toConsumableArray(be));var Ae=it.Util.getAxialAlignedBoundingBox([0,0,ue.canvas.width,ue.canvas.height],be);this.ctx.drawImage(ue.canvas,0,0),this.ctx.restore(),this.compose(Ae)}}},{key:"beginAnnotation",value:function beginAnnotation(pe,ue,se,be,Ae){var _this$ctx5;if(W(this,B,Q).call(this),Xe(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&(_this$ctx5=this.ctx).setTransform.apply(_this$ctx5,_toConsumableArray(this.baseTransform)),Array.isArray(ue)&&ue.length===4){var ze=ue[2]-ue[0],pi=ue[3]-ue[1];if(Ae&&this.annotationCanvasMap){se=se.slice(),se[4]-=ue[0],se[5]-=ue[1],ue=ue.slice(),ue[0]=ue[1]=0,ue[2]=ze,ue[3]=pi;var _it$Util$singularValu=it.Util.singularValueDecompose2dScale((0,nt.getCurrentTransform)(this.ctx)),_it$Util$singularValu2=_slicedToArray(_it$Util$singularValu,2),io=_it$Util$singularValu2[0],Qr=_it$Util$singularValu2[1],Es=this.viewportScale,nl=Math.ceil(ze*this.outputScaleX*Es),Cr=Math.ceil(pi*this.outputScaleY*Es);this.annotationCanvas=this.canvasFactory.create(nl,Cr);var _this$annotationCanva=this.annotationCanvas,$l=_this$annotationCanva.canvas,_l=_this$annotationCanva.context;this.annotationCanvasMap.set(pe,$l),this.annotationCanvas.savedCtx=this.ctx,this.ctx=_l,this.ctx.save(),this.ctx.setTransform(io,0,0,-Qr,0,pi*Qr),Xe(this.ctx)}else Xe(this.ctx),this.ctx.rect(ue[0],ue[1],ze,pi),this.ctx.clip(),this.endPath()}this.current=new Wt(this.ctx.canvas.width,this.ctx.canvas.height),this.transform.apply(this,_toConsumableArray(se)),this.transform.apply(this,_toConsumableArray(be))}},{key:"endAnnotation",value:function endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),W(this,Y,J).call(this),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}},{key:"paintImageMaskXObject",value:function paintImageMaskXObject(pe){if(!this.contentVisible)return;var ue=pe.count;pe=this.getObject(pe.data,pe),pe.count=ue;var se=this.ctx,be=this.processingType3;if(be&&(be.compiled===void 0&&(be.compiled=Bt(pe)),be.compiled)){be.compiled(se);return}var Ae=this._createMaskCanvas(pe),ze=Ae.canvas;se.save(),se.setTransform(1,0,0,1,0,0),se.drawImage(ze,Ae.offsetX,Ae.offsetY),se.restore(),this.compose()}},{key:"paintImageMaskXObjectRepeat",value:function paintImageMaskXObjectRepeat(pe,ue){var se=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0;var be=arguments.length>3&&arguments[3]!==undefined?arguments[3]:0;var Ae=arguments.length>4?arguments[4]:undefined;var ze=arguments.length>5?arguments[5]:undefined;if(!this.contentVisible)return;pe=this.getObject(pe.data,pe);var pi=this.ctx;pi.save();var io=(0,nt.getCurrentTransform)(pi);pi.transform(ue,se,be,Ae,0,0);var Qr=this._createMaskCanvas(pe);pi.setTransform(1,0,0,1,Qr.offsetX-io[4],Qr.offsetY-io[5]);for(var Es=0,nl=ze.length;Es<nl;Es+=2){var Cr=it.Util.transform(io,[ue,se,be,Ae,ze[Es],ze[Es+1]]),_it$Util$applyTransfo3=it.Util.applyTransform([0,0],Cr),_it$Util$applyTransfo4=_slicedToArray(_it$Util$applyTransfo3,2),$l=_it$Util$applyTransfo4[0],_l=_it$Util$applyTransfo4[1];pi.drawImage(Qr.canvas,$l,_l)}pi.restore(),this.compose()}},{key:"paintImageMaskXObjectGroup",value:function paintImageMaskXObjectGroup(pe){if(!this.contentVisible)return;var ue=this.ctx,se=this.current.fillColor,be=this.current.patternFill;var _iterator68=_createForOfIteratorHelper(pe),_step68;try{for(_iterator68.s();!(_step68=_iterator68.n()).done;){var Ae=_step68.value;var ze=Ae.data,pi=Ae.width,io=Ae.height,Qr=Ae.transform,Es=this.cachedCanvases.getCanvas("maskCanvas",pi,io),nl=Es.context;nl.save();var Cr=this.getObject(ze,Ae);ve(nl,Cr),nl.globalCompositeOperation="source-in",nl.fillStyle=be?se.getPattern(nl,this,(0,nt.getCurrentTransformInverse)(ue),ot.PathType.FILL):se,nl.fillRect(0,0,pi,io),nl.restore(),ue.save(),ue.transform.apply(ue,_toConsumableArray(Qr)),ue.scale(1,-1),ae(ue,Es.canvas,0,0,pi,io,0,-1,1,1),ue.restore()}}catch(err){_iterator68.e(err)}finally{_iterator68.f()}this.compose()}},{key:"paintImageXObject",value:function paintImageXObject(pe){if(!this.contentVisible)return;var ue=this.getObject(pe);if(!ue){(0,it.warn)("Dependent image isn't ready yet");return}this.paintInlineImageXObject(ue)}},{key:"paintImageXObjectRepeat",value:function paintImageXObjectRepeat(pe,ue,se,be){if(!this.contentVisible)return;var Ae=this.getObject(pe);if(!Ae){(0,it.warn)("Dependent image isn't ready yet");return}var ze=Ae.width,pi=Ae.height,io=[];for(var Qr=0,Es=be.length;Qr<Es;Qr+=2)io.push({transform:[ue,0,0,se,be[Qr],be[Qr+1]],x:0,y:0,w:ze,h:pi});this.paintInlineImageXObjectGroup(Ae,io)}},{key:"applyTransferMapsToCanvas",value:function applyTransferMapsToCanvas(pe){return this.current.transferMaps!=="none"&&(pe.filter=this.current.transferMaps,pe.drawImage(pe.canvas,0,0),pe.filter="none"),pe.canvas}},{key:"applyTransferMapsToBitmap",value:function applyTransferMapsToBitmap(pe){if(this.current.transferMaps==="none")return pe.bitmap;var ue=pe.bitmap,se=pe.width,be=pe.height,Ae=this.cachedCanvases.getCanvas("inlineImage",se,be),ze=Ae.context;return ze.filter=this.current.transferMaps,ze.drawImage(ue,0,0),ze.filter="none",Ae.canvas}},{key:"paintInlineImageXObject",value:function paintInlineImageXObject(pe){if(!this.contentVisible)return;var ue=pe.width,se=pe.height,be=this.ctx;if(this.save(),!it.isNodeJS){var pi=be.filter;pi!=="none"&&pi!==""&&(be.filter="none")}be.scale(1/ue,-1/se);var Ae;if(pe.bitmap)Ae=this.applyTransferMapsToBitmap(pe);else if(typeof HTMLElement=="function"&&pe instanceof HTMLElement||!pe.data)Ae=pe;else{var _pi=this.cachedCanvases.getCanvas("inlineImage",ue,se).context;oe(_pi,pe),Ae=this.applyTransferMapsToCanvas(_pi)}var ze=this._scaleImage(Ae,(0,nt.getCurrentTransformInverse)(be));be.imageSmoothingEnabled=pr((0,nt.getCurrentTransform)(be),pe.interpolate),ae(be,ze.img,0,0,ze.paintWidth,ze.paintHeight,0,-se,ue,se),this.compose(),this.restore()}},{key:"paintInlineImageXObjectGroup",value:function paintInlineImageXObjectGroup(pe,ue){if(!this.contentVisible)return;var se=this.ctx;var be;if(pe.bitmap)be=pe.bitmap;else{var Ae=pe.width,ze=pe.height,pi=this.cachedCanvases.getCanvas("inlineImage",Ae,ze).context;oe(pi,pe),be=this.applyTransferMapsToCanvas(pi)}var _iterator69=_createForOfIteratorHelper(ue),_step69;try{for(_iterator69.s();!(_step69=_iterator69.n()).done;){var _Ae=_step69.value;se.save(),se.transform.apply(se,_toConsumableArray(_Ae.transform)),se.scale(1,-1),ae(se,be,_Ae.x,_Ae.y,_Ae.w,_Ae.h,0,-1,1,1),se.restore()}}catch(err){_iterator69.e(err)}finally{_iterator69.f()}this.compose()}},{key:"paintSolidColorImageMask",value:function paintSolidColorImageMask(){this.contentVisible&&(this.ctx.fillRect(0,0,1,1),this.compose())}},{key:"markPoint",value:function markPoint(pe){}},{key:"markPointProps",value:function markPointProps(pe,ue){}},{key:"beginMarkedContent",value:function beginMarkedContent(pe){this.markedContentStack.push({visible:!0})}},{key:"beginMarkedContentProps",value:function beginMarkedContentProps(pe,ue){pe==="OC"?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(ue)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}},{key:"endMarkedContent",value:function endMarkedContent(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}},{key:"beginCompat",value:function beginCompat(){}},{key:"endCompat",value:function endCompat(){}},{key:"consumePath",value:function consumePath(pe){var ue=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(pe);var se=this.ctx;this.pendingClip&&(ue||(this.pendingClip===qe?se.clip("evenodd"):se.clip()),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox),se.beginPath()}},{key:"getSinglePixelWidth",value:function getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){var pe=(0,nt.getCurrentTransform)(this.ctx);if(pe[1]===0&&pe[2]===0)this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(pe[0]),Math.abs(pe[3]));else{var ue=Math.abs(pe[0]*pe[3]-pe[2]*pe[1]),se=Math.hypot(pe[0],pe[2]),be=Math.hypot(pe[1],pe[3]);this._cachedGetSinglePixelWidth=Math.max(se,be)/ue}}return this._cachedGetSinglePixelWidth}},{key:"getScaleForStroking",value:function getScaleForStroking(){if(this._cachedScaleForStroking[0]===-1){var pe=this.current.lineWidth,_this$ctx$getTransfor=this.ctx.getTransform(),ue=_this$ctx$getTransfor.a,se=_this$ctx$getTransfor.b,be=_this$ctx$getTransfor.c,Ae=_this$ctx$getTransfor.d;var ze,pi;if(se===0&&be===0){var io=Math.abs(ue),Qr=Math.abs(Ae);if(io===Qr){if(pe===0)ze=pi=1/io;else{var Es=io*pe;ze=pi=Es<1?1/Es:1}}else if(pe===0)ze=1/io,pi=1/Qr;else{var _Es=io*pe,nl=Qr*pe;ze=_Es<1?1/_Es:1,pi=nl<1?1/nl:1}}else{var _io=Math.abs(ue*Ae-se*be),_Qr=Math.hypot(ue,se),_Es2=Math.hypot(be,Ae);if(pe===0)ze=_Es2/_io,pi=_Qr/_io;else{var _nl=pe*_io;ze=_Es2>_nl?_Es2/_nl:1,pi=_Qr>_nl?_Qr/_nl:1}}this._cachedScaleForStroking[0]=ze,this._cachedScaleForStroking[1]=pi}return this._cachedScaleForStroking}},{key:"rescaleAndStroke",value:function rescaleAndStroke(pe){var ue=this.ctx,se=this.current.lineWidth,_this$getScaleForStro=this.getScaleForStroking(),_this$getScaleForStro2=_slicedToArray(_this$getScaleForStro,2),be=_this$getScaleForStro2[0],Ae=_this$getScaleForStro2[1];if(ue.lineWidth=se||1,be===1&&Ae===1){ue.stroke();return}var ze=ue.getLineDash();if(pe&&ue.save(),ue.scale(be,Ae),ze.length>0){var pi=Math.max(be,Ae);ue.setLineDash(ze.map(function(io){return io/pi})),ue.lineDashOffset/=pi}ue.stroke(),pe&&ue.restore()}},{key:"isContentVisible",value:function isContentVisible(){for(var pe=this.markedContentStack.length-1;pe>=0;pe--)if(!this.markedContentStack[pe].visible)return!1;return!0}}]);return $m}();B=new WeakSet,Q=function Q(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null)},Y=new WeakSet,J=function J(){if(this.pageColors){var Te=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if(Te!=="none"){var pe=this.ctx.filter;this.ctx.filter=Te,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=pe}}};var ol=bl;o.CanvasGraphics=ol;for(var Te in it.OPS)ol.prototype[Te]!==void 0&&(ol.prototype[it.OPS[Te]]=ol.prototype[Te])},function(r,o,s){Object.defineProperty(o,"__esModule",{value:!0}),o.TilingPattern=o.PathType=void 0,o.getShadingPattern=Qt;var B=s(1),Q=s(6);var Y={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};o.PathType=Y;function J(ie,re){if(!re)return;var ne=re[2]-re[0],ae=re[3]-re[1],Bt=new Path2D;Bt.rect(re[0],re[1],ne,ae),ie.clip(Bt)}var it=function(){function it(){_classCallCheck(this,it);this.constructor===it&&(0,B.unreachable)("Cannot initialize BaseShadingPattern.")}_createClass(it,[{key:"getPattern",value:function getPattern(){(0,B.unreachable)("Abstract method `getPattern` called.")}}]);return it}();var nt=function(_it){_inherits(nt,_it);function nt(re){var _this42;_classCallCheck(this,nt);_this42=_callSuper(this,nt),_this42._type=re[1],_this42._bbox=re[2],_this42._colorStops=re[3],_this42._p0=re[4],_this42._p1=re[5],_this42._r0=re[6],_this42._r1=re[7],_this42.matrix=null;return _this42}_createClass(nt,[{key:"_createGradient",value:function _createGradient(re){var ne;this._type==="axial"?ne=re.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):this._type==="radial"&&(ne=re.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));var _iterator70=_createForOfIteratorHelper(this._colorStops),_step70;try{for(_iterator70.s();!(_step70=_iterator70.n()).done;){var ae=_step70.value;ne.addColorStop(ae[0],ae[1])}}catch(err){_iterator70.e(err)}finally{_iterator70.f()}return ne}},{key:"getPattern",value:function getPattern(re,ne,ae,Bt){var Wt;if(Bt===Y.STROKE||Bt===Y.FILL){var oe=ne.current.getClippedPathBoundingBox(Bt,(0,Q.getCurrentTransform)(re))||[0,0,0,0],ve=Math.ceil(oe[2]-oe[0])||1,_e=Math.ceil(oe[3]-oe[1])||1,Xe=ne.cachedCanvases.getCanvas("pattern",ve,_e,!0),He=Xe.context;He.clearRect(0,0,He.canvas.width,He.canvas.height),He.beginPath(),He.rect(0,0,He.canvas.width,He.canvas.height),He.translate(-oe[0],-oe[1]),ae=B.Util.transform(ae,[1,0,0,1,oe[0],oe[1]]),He.transform.apply(He,_toConsumableArray(ne.baseTransform)),this.matrix&&He.transform.apply(He,_toConsumableArray(this.matrix)),J(He,this._bbox),He.fillStyle=this._createGradient(He),He.fill(),Wt=re.createPattern(Xe.canvas,"no-repeat");var ro=new DOMMatrix(ae);Wt.setTransform(ro)}else J(re,this._bbox),Wt=this._createGradient(re);return Wt}}]);return nt}(it);function ot(ie,re,ne,ae,Bt,Wt,oe,ve){var _e=re.coords,Xe=re.colors,He=ie.data,ro=ie.width*4;var Xo;_e[ne+1]>_e[ae+1]&&(Xo=ne,ne=ae,ae=Xo,Xo=Wt,Wt=oe,oe=Xo),_e[ae+1]>_e[Bt+1]&&(Xo=ae,ae=Bt,Bt=Xo,Xo=oe,oe=ve,ve=Xo),_e[ne+1]>_e[ae+1]&&(Xo=ne,ne=ae,ae=Xo,Xo=Wt,Wt=oe,oe=Xo);var Se=(_e[ne]+re.offsetX)*re.scaleX,xr=(_e[ne+1]+re.offsetY)*re.scaleY,pr=(_e[ae]+re.offsetX)*re.scaleX,$e=(_e[ae+1]+re.offsetY)*re.scaleY,_r=(_e[Bt]+re.offsetX)*re.scaleX,Ps=(_e[Bt+1]+re.offsetY)*re.scaleY;if(xr>=Ps)return;var qe=Xe[Wt],bl=Xe[Wt+1],ol=Xe[Wt+2],Te=Xe[oe],pe=Xe[oe+1],ue=Xe[oe+2],se=Xe[ve],be=Xe[ve+1],Ae=Xe[ve+2],ze=Math.round(xr),pi=Math.round(Ps);var io,Qr,Es,nl,Cr,$l,_l,Ih;for(var Rh=ze;Rh<=pi;Rh++){if(Rh<$e){var Ke=Rh<xr?0:(xr-Rh)/(xr-$e);io=Se-(Se-pr)*Ke,Qr=qe-(qe-Te)*Ke,Es=bl-(bl-pe)*Ke,nl=ol-(ol-ue)*Ke}else{var _Ke2=void 0;Rh>Ps?_Ke2=1:$e===Ps?_Ke2=0:_Ke2=($e-Rh)/($e-Ps),io=pr-(pr-_r)*_Ke2,Qr=Te-(Te-se)*_Ke2,Es=pe-(pe-be)*_Ke2,nl=ue-(ue-Ae)*_Ke2}var Th=void 0;Rh<xr?Th=0:Rh>Ps?Th=1:Th=(xr-Rh)/(xr-Ps),Cr=Se-(Se-_r)*Th,$l=qe-(qe-se)*Th,_l=bl-(bl-be)*Th,Ih=ol-(ol-Ae)*Th;var $s=Math.round(Math.min(io,Cr)),Dr=Math.round(Math.max(io,Cr));var Xi=ro*Rh+$s*4;for(var _Ke3=$s;_Ke3<=Dr;_Ke3++)Th=(io-_Ke3)/(io-Cr),Th<0?Th=0:Th>1&&(Th=1),He[Xi++]=Qr-(Qr-$l)*Th|0,He[Xi++]=Es-(Es-_l)*Th|0,He[Xi++]=nl-(nl-Ih)*Th|0,He[Xi++]=255}}function dt(ie,re,ne){var ae=re.coords,Bt=re.colors;var Wt,oe;switch(re.type){case"lattice":var ve=re.verticesPerRow,_e=Math.floor(ae.length/ve)-1,Xe=ve-1;for(Wt=0;Wt<_e;Wt++){var He=Wt*ve;for(var ro=0;ro<Xe;ro++,He++)ot(ie,ne,ae[He],ae[He+1],ae[He+ve],Bt[He],Bt[He+1],Bt[He+ve]),ot(ie,ne,ae[He+ve+1],ae[He+1],ae[He+ve],Bt[He+ve+1],Bt[He+1],Bt[He+ve])}break;case"triangles":for(Wt=0,oe=ae.length;Wt<oe;Wt+=3)ot(ie,ne,ae[Wt],ae[Wt+1],ae[Wt+2],Bt[Wt],Bt[Wt+1],Bt[Wt+2]);break;default:throw new Error("illegal figure")}}var Mt=function(_it2){_inherits(Mt,_it2);function Mt(re){var _this43;_classCallCheck(this,Mt);_this43=_callSuper(this,Mt),_this43._coords=re[2],_this43._colors=re[3],_this43._figures=re[4],_this43._bounds=re[5],_this43._bbox=re[7],_this43._background=re[8],_this43.matrix=null;return _this43}_createClass(Mt,[{key:"_createMeshCanvas",value:function _createMeshCanvas(re,ne,ae){var Bt=Math.floor(this._bounds[0]),Wt=Math.floor(this._bounds[1]),oe=Math.ceil(this._bounds[2])-Bt,ve=Math.ceil(this._bounds[3])-Wt,_e=Math.min(Math.ceil(Math.abs(oe*re[0]*1.1)),3e3),Xe=Math.min(Math.ceil(Math.abs(ve*re[1]*1.1)),3e3),He=oe/_e,ro=ve/Xe,Xo={coords:this._coords,colors:this._colors,offsetX:-Bt,offsetY:-Wt,scaleX:1/He,scaleY:1/ro},Se=_e+2*2,xr=Xe+2*2,pr=ae.getCanvas("mesh",Se,xr,!1),$e=pr.context,_r=$e.createImageData(_e,Xe);if(ne){var Ps=_r.data;for(var qe=0,bl=Ps.length;qe<bl;qe+=4)Ps[qe]=ne[0],Ps[qe+1]=ne[1],Ps[qe+2]=ne[2],Ps[qe+3]=255}var _iterator71=_createForOfIteratorHelper(this._figures),_step71;try{for(_iterator71.s();!(_step71=_iterator71.n()).done;){var _Ps2=_step71.value;dt(_r,_Ps2,Xo)}}catch(err){_iterator71.e(err)}finally{_iterator71.f()}return $e.putImageData(_r,2,2),{canvas:pr.canvas,offsetX:Bt-2*He,offsetY:Wt-2*ro,scaleX:He,scaleY:ro}}},{key:"getPattern",value:function getPattern(re,ne,ae,Bt){J(re,this._bbox);var Wt;if(Bt===Y.SHADING)Wt=B.Util.singularValueDecompose2dScale((0,Q.getCurrentTransform)(re));else if(Wt=B.Util.singularValueDecompose2dScale(ne.baseTransform),this.matrix){var ve=B.Util.singularValueDecompose2dScale(this.matrix);Wt=[Wt[0]*ve[0],Wt[1]*ve[1]]}var oe=this._createMeshCanvas(Wt,Bt===Y.SHADING?null:this._background,ne.cachedCanvases);return Bt!==Y.SHADING&&(re.setTransform.apply(re,_toConsumableArray(ne.baseTransform)),this.matrix&&re.transform.apply(re,_toConsumableArray(this.matrix))),re.translate(oe.offsetX,oe.offsetY),re.scale(oe.scaleX,oe.scaleY),re.createPattern(oe.canvas,"no-repeat")}}]);return Mt}(it);var Ot=function(_it3){_inherits(Ot,_it3);function Ot(){_classCallCheck(this,Ot);return _callSuper(this,Ot,arguments)}_createClass(Ot,[{key:"getPattern",value:function getPattern(){return"hotpink"}}]);return Ot}(it);function Qt(ie){switch(ie[0]){case"RadialAxial":return new nt(ie);case"Mesh":return new Mt(ie);case"Dummy":return new Ot}throw new Error("Unknown IR type: ".concat(ie[0]))}var Ut={COLORED:1,UNCOLORED:2},te=function(){function Mm(re,ne,ae,Bt,Wt){_classCallCheck(this,Mm);this.operatorList=re[2],this.matrix=re[3]||[1,0,0,1,0,0],this.bbox=re[4],this.xstep=re[5],this.ystep=re[6],this.paintType=re[7],this.tilingType=re[8],this.color=ne,this.ctx=ae,this.canvasGraphicsFactory=Bt,this.baseTransform=Wt}_createClass(Mm,[{key:"createPatternCanvas",value:function createPatternCanvas(re){var ne=this.operatorList,ae=this.bbox,Bt=this.xstep,Wt=this.ystep,oe=this.paintType,ve=this.tilingType,_e=this.color,Xe=this.canvasGraphicsFactory;(0,B.info)("TilingType: "+ve);var He=ae[0],ro=ae[1],Xo=ae[2],Se=ae[3],xr=B.Util.singularValueDecompose2dScale(this.matrix),pr=B.Util.singularValueDecompose2dScale(this.baseTransform),$e=[xr[0]*pr[0],xr[1]*pr[1]],_r=this.getSizeAndScale(Bt,this.ctx.canvas.width,$e[0]),Ps=this.getSizeAndScale(Wt,this.ctx.canvas.height,$e[1]),qe=re.cachedCanvases.getCanvas("pattern",_r.size,Ps.size,!0),bl=qe.context,ol=Xe.createCanvasGraphics(bl);ol.groupLevel=re.groupLevel,this.setFillAndStrokeStyleToContext(ol,oe,_e);var Te=He,pe=ro,ue=Xo,se=Se;return He<0&&(Te=0,ue+=Math.abs(He)),ro<0&&(pe=0,se+=Math.abs(ro)),bl.translate(-(_r.scale*Te),-(Ps.scale*pe)),ol.transform(_r.scale,0,0,Ps.scale,0,0),bl.save(),this.clipBbox(ol,Te,pe,ue,se),ol.baseTransform=(0,Q.getCurrentTransform)(ol.ctx),ol.executeOperatorList(ne),ol.endDrawing(),{canvas:qe.canvas,scaleX:_r.scale,scaleY:Ps.scale,offsetX:Te,offsetY:pe}}},{key:"getSizeAndScale",value:function getSizeAndScale(re,ne,ae){re=Math.abs(re);var Bt=Math.max(Mm.MAX_PATTERN_SIZE,ne);var Wt=Math.ceil(re*ae);return Wt>=Bt?Wt=Bt:ae=Wt/re,{scale:ae,size:Wt}}},{key:"clipBbox",value:function clipBbox(re,ne,ae,Bt,Wt){var oe=Bt-ne,ve=Wt-ae;re.ctx.rect(ne,ae,oe,ve),re.current.updateRectMinMax((0,Q.getCurrentTransform)(re.ctx),[ne,ae,Bt,Wt]),re.clip(),re.endPath()}},{key:"setFillAndStrokeStyleToContext",value:function setFillAndStrokeStyleToContext(re,ne,ae){var Bt=re.ctx,Wt=re.current;switch(ne){case Ut.COLORED:var oe=this.ctx;Bt.fillStyle=oe.fillStyle,Bt.strokeStyle=oe.strokeStyle,Wt.fillColor=oe.fillStyle,Wt.strokeColor=oe.strokeStyle;break;case Ut.UNCOLORED:var ve=B.Util.makeHexColor(ae[0],ae[1],ae[2]);Bt.fillStyle=ve,Bt.strokeStyle=ve,Wt.fillColor=ve,Wt.strokeColor=ve;break;default:throw new B.FormatError("Unsupported paint type: ".concat(ne))}}},{key:"getPattern",value:function getPattern(re,ne,ae,Bt){var Wt=ae;Bt!==Y.SHADING&&(Wt=B.Util.transform(Wt,ne.baseTransform),this.matrix&&(Wt=B.Util.transform(Wt,this.matrix)));var oe=this.createPatternCanvas(ne);var ve=new DOMMatrix(Wt);ve=ve.translate(oe.offsetX,oe.offsetY),ve=ve.scale(1/oe.scaleX,1/oe.scaleY);var _e=re.createPattern(oe.canvas,"repeat");return _e.setTransform(ve),_e}}]);return Mm}();ee(te,"MAX_PATTERN_SIZE",3e3);var qt=te;o.TilingPattern=qt},function(r,o,s){Object.defineProperty(o,"__esModule",{value:!0}),o.convertBlackAndWhiteToRGBA=Y,o.convertToRGBA=Q,o.grayToRGBA=it;var B=s(1);function Q(nt){switch(nt.kind){case B.ImageKind.GRAYSCALE_1BPP:return Y(nt);case B.ImageKind.RGB_24BPP:return J(nt)}return null}function Y(_ref59){var nt=_ref59.src,_ref59$srcPos=_ref59.srcPos,ot=_ref59$srcPos===void 0?0:_ref59$srcPos,dt=_ref59.dest,Mt=_ref59.width,Ot=_ref59.height,_ref59$nonBlackColor=_ref59.nonBlackColor,Qt=_ref59$nonBlackColor===void 0?4294967295:_ref59$nonBlackColor,_ref59$inverseDecode=_ref59.inverseDecode,Ut=_ref59$inverseDecode===void 0?!1:_ref59$inverseDecode;var te=B.FeatureTest.isLittleEndian?4278190080:255,_ref60=Ut?[Qt,te]:[te,Qt],_ref61=_slicedToArray(_ref60,2),qt=_ref61[0],ie=_ref61[1],re=Mt>>3,ne=Mt&7,ae=nt.length;dt=new Uint32Array(dt.buffer);var Bt=0;for(var Wt=0;Wt<Ot;Wt++){for(var ve=ot+re;ot<ve;ot++){var _e=ot<ae?nt[ot]:255;dt[Bt++]=_e&128?ie:qt,dt[Bt++]=_e&64?ie:qt,dt[Bt++]=_e&32?ie:qt,dt[Bt++]=_e&16?ie:qt,dt[Bt++]=_e&8?ie:qt,dt[Bt++]=_e&4?ie:qt,dt[Bt++]=_e&2?ie:qt,dt[Bt++]=_e&1?ie:qt}if(ne===0)continue;var oe=ot<ae?nt[ot++]:255;for(var _ve=0;_ve<ne;_ve++)dt[Bt++]=oe&1<<7-_ve?ie:qt}return{srcPos:ot,destPos:Bt}}function J(_ref62){var nt=_ref62.src,_ref62$srcPos=_ref62.srcPos,ot=_ref62$srcPos===void 0?0:_ref62$srcPos,dt=_ref62.dest,_ref62$destPos=_ref62.destPos,Mt=_ref62$destPos===void 0?0:_ref62$destPos,Ot=_ref62.width,Qt=_ref62.height;var Ut=0;var te=nt.length>>2,qt=new Uint32Array(nt.buffer,ot,te);if(B.FeatureTest.isLittleEndian){for(;Ut<te-2;Ut+=3,Mt+=4){var ie=qt[Ut],re=qt[Ut+1],ne=qt[Ut+2];dt[Mt]=ie|4278190080,dt[Mt+1]=ie>>>24|re<<8|4278190080,dt[Mt+2]=re>>>16|ne<<16|4278190080,dt[Mt+3]=ne>>>8|4278190080}for(var _ie=Ut*4,_re=nt.length;_ie<_re;_ie+=3)dt[Mt++]=nt[_ie]|nt[_ie+1]<<8|nt[_ie+2]<<16|4278190080}else{for(;Ut<te-2;Ut+=3,Mt+=4){var _ie2=qt[Ut],_re2=qt[Ut+1],_ne=qt[Ut+2];dt[Mt]=_ie2|255,dt[Mt+1]=_ie2<<24|_re2>>>8|255,dt[Mt+2]=_re2<<16|_ne>>>16|255,dt[Mt+3]=_ne<<8|255}for(var _ie3=Ut*4,_re3=nt.length;_ie3<_re3;_ie3+=3)dt[Mt++]=nt[_ie3]<<24|nt[_ie3+1]<<16|nt[_ie3+2]<<8|255}return{srcPos:ot,destPos:Mt}}function it(nt,ot){if(B.FeatureTest.isLittleEndian)for(var dt=0,Mt=nt.length;dt<Mt;dt++)ot[dt]=nt[dt]*65793|4278190080;else for(var _dt=0,_Mt=nt.length;_dt<_Mt;_dt++)ot[_dt]=nt[_dt]*16843008|255}},function(r,o){Object.defineProperty(o,"__esModule",{value:!0}),o.GlobalWorkerOptions=void 0;var s=Object.create(null);o.GlobalWorkerOptions=s,s.workerPort=null,s.workerSrc=""},function(r,o,s){var B,Q,Y,J,it,nt;Object.defineProperty(o,"__esModule",{value:!0}),o.MessageHandler=void 0;var ot=s(1);var dt={UNKNOWN:0,DATA:1,ERROR:2},Mt={UNKNOWN:0,CANCEL:1,CANCEL_COMPLETE:2,CLOSE:3,ENQUEUE:4,ERROR:5,PULL:6,PULL_COMPLETE:7,START_COMPLETE:8};function Ot(Ut){switch(Ut instanceof Error||_typeof(Ut)=="object"&&Ut!==null||(0,ot.unreachable)("wrapReason: Expected \"reason\" to be a (possibly cloned) Error."),Ut.name){case"AbortException":return new ot.AbortException(Ut.message);case"MissingPDFException":return new ot.MissingPDFException(Ut.message);case"PasswordException":return new ot.PasswordException(Ut.message,Ut.code);case"UnexpectedResponseException":return new ot.UnexpectedResponseException(Ut.message,Ut.status);case"UnknownErrorException":return new ot.UnknownErrorException(Ut.message,Ut.details);default:return new ot.UnknownErrorException(Ut.message,Ut.toString())}}var Qt=function(){function Qt(te,qt,ie){var _this44=this;_classCallCheck(this,Qt);I(this,B),I(this,Y),I(this,it),this.sourceName=te,this.targetName=qt,this.comObj=ie,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),this._onComObjOnMessage=function(re){var ne=re.data;if(ne.targetName!==_this44.sourceName)return;if(ne.stream){W(_this44,Y,J).call(_this44,ne);return}if(ne.callback){var Bt=ne.callbackId,Wt=_this44.callbackCapabilities[Bt];if(!Wt)throw new Error("Cannot resolve callback ".concat(Bt));if(delete _this44.callbackCapabilities[Bt],ne.callback===dt.DATA)Wt.resolve(ne.data);else if(ne.callback===dt.ERROR)Wt.reject(Ot(ne.reason));else throw new Error("Unexpected callback case");return}var ae=_this44.actionHandler[ne.action];if(!ae)throw new Error("Unknown action from worker: ".concat(ne.action));if(ne.callbackId){var _Bt=_this44.sourceName,_Wt=ne.sourceName;new Promise(function(oe){oe(ae(ne.data))}).then(function(oe){ie.postMessage({sourceName:_Bt,targetName:_Wt,callback:dt.DATA,callbackId:ne.callbackId,data:oe})},function(oe){ie.postMessage({sourceName:_Bt,targetName:_Wt,callback:dt.ERROR,callbackId:ne.callbackId,reason:Ot(oe)})});return}if(ne.streamId){W(_this44,B,Q).call(_this44,ne);return}ae(ne.data)},ie.addEventListener("message",this._onComObjOnMessage)}_createClass(Qt,[{key:"on",value:function on(te,qt){var ie=this.actionHandler;if(ie[te])throw new Error("There is already an actionName called \"".concat(te,"\""));ie[te]=qt}},{key:"send",value:function send(te,qt,ie){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:te,data:qt},ie)}},{key:"sendWithPromise",value:function sendWithPromise(te,qt,ie){var re=this.callbackId++,ne=new ot.PromiseCapability;this.callbackCapabilities[re]=ne;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:te,callbackId:re,data:qt},ie)}catch(ae){ne.reject(ae)}return ne.promise}},{key:"sendWithStream",value:function sendWithStream(te,qt,ie,re){var _this45=this;var ne=this.streamId++,ae=this.sourceName,Bt=this.targetName,Wt=this.comObj;return new ReadableStream({start:function start(oe){var ve=new ot.PromiseCapability;return _this45.streamControllers[ne]={controller:oe,startCall:ve,pullCall:null,cancelCall:null,isClosed:!1},Wt.postMessage({sourceName:ae,targetName:Bt,action:te,streamId:ne,data:qt,desiredSize:oe.desiredSize},re),ve.promise},pull:function pull(oe){var ve=new ot.PromiseCapability;return _this45.streamControllers[ne].pullCall=ve,Wt.postMessage({sourceName:ae,targetName:Bt,stream:Mt.PULL,streamId:ne,desiredSize:oe.desiredSize}),ve.promise},cancel:function cancel(oe){(0,ot.assert)(oe instanceof Error,"cancel must have a valid reason");var ve=new ot.PromiseCapability;return _this45.streamControllers[ne].cancelCall=ve,_this45.streamControllers[ne].isClosed=!0,Wt.postMessage({sourceName:ae,targetName:Bt,stream:Mt.CANCEL,streamId:ne,reason:Ot(oe)}),ve.promise}},ie)}},{key:"destroy",value:function destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}]);return Qt}();B=new WeakSet,Q=function Q(Ut){var te=Ut.streamId,qt=this.sourceName,ie=Ut.sourceName,re=this.comObj,ne=this,ae=this.actionHandler[Ut.action],Bt={enqueue:function enqueue(Wt){var oe=arguments.length>1&&arguments[1]!==undefined?arguments[1]:1;var ve=arguments.length>2?arguments[2]:undefined;if(this.isCancelled)return;var _e=this.desiredSize;this.desiredSize-=oe,_e>0&&this.desiredSize<=0&&(this.sinkCapability=new ot.PromiseCapability,this.ready=this.sinkCapability.promise),re.postMessage({sourceName:qt,targetName:ie,stream:Mt.ENQUEUE,streamId:te,chunk:Wt},ve)},close:function close(){this.isCancelled||(this.isCancelled=!0,re.postMessage({sourceName:qt,targetName:ie,stream:Mt.CLOSE,streamId:te}),delete ne.streamSinks[te])},error:function error(Wt){(0,ot.assert)(Wt instanceof Error,"error must have a valid reason"),!this.isCancelled&&(this.isCancelled=!0,re.postMessage({sourceName:qt,targetName:ie,stream:Mt.ERROR,streamId:te,reason:Ot(Wt)}))},sinkCapability:new ot.PromiseCapability,onPull:null,onCancel:null,isCancelled:!1,desiredSize:Ut.desiredSize,ready:null};Bt.sinkCapability.resolve(),Bt.ready=Bt.sinkCapability.promise,this.streamSinks[te]=Bt,new Promise(function(Wt){Wt(ae(Ut.data,Bt))}).then(function(){re.postMessage({sourceName:qt,targetName:ie,stream:Mt.START_COMPLETE,streamId:te,success:!0})},function(Wt){re.postMessage({sourceName:qt,targetName:ie,stream:Mt.START_COMPLETE,streamId:te,reason:Ot(Wt)})})},Y=new WeakSet,J=function J(Ut){var te=Ut.streamId,qt=this.sourceName,ie=Ut.sourceName,re=this.comObj,ne=this.streamControllers[te],ae=this.streamSinks[te];switch(Ut.stream){case Mt.START_COMPLETE:Ut.success?ne.startCall.resolve():ne.startCall.reject(Ot(Ut.reason));break;case Mt.PULL_COMPLETE:Ut.success?ne.pullCall.resolve():ne.pullCall.reject(Ot(Ut.reason));break;case Mt.PULL:if(!ae){re.postMessage({sourceName:qt,targetName:ie,stream:Mt.PULL_COMPLETE,streamId:te,success:!0});break}ae.desiredSize<=0&&Ut.desiredSize>0&&ae.sinkCapability.resolve(),ae.desiredSize=Ut.desiredSize,new Promise(function(Bt){var Wt;Bt((Wt=ae.onPull)==null?void 0:Wt.call(ae))}).then(function(){re.postMessage({sourceName:qt,targetName:ie,stream:Mt.PULL_COMPLETE,streamId:te,success:!0})},function(Bt){re.postMessage({sourceName:qt,targetName:ie,stream:Mt.PULL_COMPLETE,streamId:te,reason:Ot(Bt)})});break;case Mt.ENQUEUE:if((0,ot.assert)(ne,"enqueue should have stream controller"),ne.isClosed)break;ne.controller.enqueue(Ut.chunk);break;case Mt.CLOSE:if((0,ot.assert)(ne,"close should have stream controller"),ne.isClosed)break;ne.isClosed=!0,ne.controller.close(),W(this,it,nt).call(this,ne,te);break;case Mt.ERROR:(0,ot.assert)(ne,"error should have stream controller"),ne.controller.error(Ot(Ut.reason)),W(this,it,nt).call(this,ne,te);break;case Mt.CANCEL_COMPLETE:Ut.success?ne.cancelCall.resolve():ne.cancelCall.reject(Ot(Ut.reason)),W(this,it,nt).call(this,ne,te);break;case Mt.CANCEL:if(!ae)break;new Promise(function(Bt){var Wt;Bt((Wt=ae.onCancel)==null?void 0:Wt.call(ae,Ot(Ut.reason)))}).then(function(){re.postMessage({sourceName:qt,targetName:ie,stream:Mt.CANCEL_COMPLETE,streamId:te,success:!0})},function(Bt){re.postMessage({sourceName:qt,targetName:ie,stream:Mt.CANCEL_COMPLETE,streamId:te,reason:Ot(Bt)})}),ae.sinkCapability.reject(Ot(Ut.reason)),ae.isCancelled=!0,delete this.streamSinks[te];break;default:throw new Error("Unexpected stream case")}},it=new WeakSet,nt=function(){var _ref63=_asyncToGenerator(_regeneratorRuntime().mark(function _callee19(Ut,te){var qt,ie,re;return _regeneratorRuntime().wrap(function _callee19$(_context19){while(1)switch(_context19.prev=_context19.next){case 0:_context19.next=2;return Promise.allSettled([(qt=Ut.startCall)==null?void 0:qt.promise,(ie=Ut.pullCall)==null?void 0:ie.promise,(re=Ut.cancelCall)==null?void 0:re.promise]);case 2:delete this.streamControllers[te];case 3:case"end":return _context19.stop()}},_callee19,this)}));return function nt(_x14,_x15){return _ref63.apply(this,arguments)}}(),o.MessageHandler=Qt},function(r,o,s){var B,Q;Object.defineProperty(o,"__esModule",{value:!0}),o.Metadata=void 0;var Y=s(1);var J=function(){function J(_ref64){var nt=_ref64.parsedData,ot=_ref64.rawData;_classCallCheck(this,J);I(this,B,void 0),I(this,Q,void 0),Z(this,B,nt),Z(this,Q,ot)}_createClass(J,[{key:"getRaw",value:function getRaw(){return t$1(this,Q)}},{key:"get",value:function get(nt){var _t$1$get;return(_t$1$get=t$1(this,B).get(nt))!==null&&_t$1$get!==void 0?_t$1$get:null}},{key:"getAll",value:function getAll(){return(0,Y.objectFromMap)(t$1(this,B))}},{key:"has",value:function has(nt){return t$1(this,B).has(nt)}}]);return J}();B=new WeakMap,Q=new WeakMap,o.Metadata=J},function(r,o,s){var B,Q,Y,J,it,nt,_ot;Object.defineProperty(o,"__esModule",{value:!0}),o.OptionalContentConfig=void 0;var dt=s(1),Mt=s(8);var Ot=Symbol("INTERNAL");var Qt=function(){function Qt(qt,ie){_classCallCheck(this,Qt);I(this,B,!0),this.name=qt,this.intent=ie}_createClass(Qt,[{key:"visible",get:function get(){return t$1(this,B)}},{key:"_setVisible",value:function _setVisible(qt,ie){qt!==Ot&&(0,dt.unreachable)("Internal method `_setVisible` called."),Z(this,B,ie)}}]);return Qt}();B=new WeakMap;var Ut=function(){function Ut(qt){_classCallCheck(this,Ut);if(I(this,nt),I(this,Q,null),I(this,Y,new Map),I(this,J,null),I(this,it,null),this.name=null,this.creator=null,qt!==null){this.name=qt.name,this.creator=qt.creator,Z(this,it,qt.order);var _iterator72=_createForOfIteratorHelper(qt.groups),_step72;try{for(_iterator72.s();!(_step72=_iterator72.n()).done;){var _ie4=_step72.value;t$1(this,Y).set(_ie4.id,new Qt(_ie4.name,_ie4.intent))}}catch(err){_iterator72.e(err)}finally{_iterator72.f()}if(qt.baseState==="OFF"){var _iterator73=_createForOfIteratorHelper(t$1(this,Y).values()),_step73;try{for(_iterator73.s();!(_step73=_iterator73.n()).done;){var ie=_step73.value;ie._setVisible(Ot,!1)}}catch(err){_iterator73.e(err)}finally{_iterator73.f()}}var _iterator74=_createForOfIteratorHelper(qt.on),_step74;try{for(_iterator74.s();!(_step74=_iterator74.n()).done;){var _ie5=_step74.value;t$1(this,Y).get(_ie5)._setVisible(Ot,!0)}}catch(err){_iterator74.e(err)}finally{_iterator74.f()}var _iterator75=_createForOfIteratorHelper(qt.off),_step75;try{for(_iterator75.s();!(_step75=_iterator75.n()).done;){var _ie6=_step75.value;t$1(this,Y).get(_ie6)._setVisible(Ot,!1)}}catch(err){_iterator75.e(err)}finally{_iterator75.f()}Z(this,J,this.getHash())}}_createClass(Ut,[{key:"isVisible",value:function isVisible(qt){if(t$1(this,Y).size===0)return!0;if(!qt)return(0,dt.warn)("Optional content group not defined."),!0;if(qt.type==="OCG")return t$1(this,Y).has(qt.id)?t$1(this,Y).get(qt.id).visible:((0,dt.warn)("Optional content group not found: ".concat(qt.id)),!0);if(qt.type==="OCMD"){if(qt.expression)return W(this,nt,_ot).call(this,qt.expression);if(!qt.policy||qt.policy==="AnyOn"){var _iterator76=_createForOfIteratorHelper(qt.ids),_step76;try{for(_iterator76.s();!(_step76=_iterator76.n()).done;){var ie=_step76.value;if(!t$1(this,Y).has(ie))return(0,dt.warn)("Optional content group not found: ".concat(ie)),!0;if(t$1(this,Y).get(ie).visible)return!0}}catch(err){_iterator76.e(err)}finally{_iterator76.f()}return!1}else if(qt.policy==="AllOn"){var _iterator77=_createForOfIteratorHelper(qt.ids),_step77;try{for(_iterator77.s();!(_step77=_iterator77.n()).done;){var _ie7=_step77.value;if(!t$1(this,Y).has(_ie7))return(0,dt.warn)("Optional content group not found: ".concat(_ie7)),!0;if(!t$1(this,Y).get(_ie7).visible)return!1}}catch(err){_iterator77.e(err)}finally{_iterator77.f()}return!0}else if(qt.policy==="AnyOff"){var _iterator78=_createForOfIteratorHelper(qt.ids),_step78;try{for(_iterator78.s();!(_step78=_iterator78.n()).done;){var _ie8=_step78.value;if(!t$1(this,Y).has(_ie8))return(0,dt.warn)("Optional content group not found: ".concat(_ie8)),!0;if(!t$1(this,Y).get(_ie8).visible)return!0}}catch(err){_iterator78.e(err)}finally{_iterator78.f()}return!1}else if(qt.policy==="AllOff"){var _iterator79=_createForOfIteratorHelper(qt.ids),_step79;try{for(_iterator79.s();!(_step79=_iterator79.n()).done;){var _ie9=_step79.value;if(!t$1(this,Y).has(_ie9))return(0,dt.warn)("Optional content group not found: ".concat(_ie9)),!0;if(t$1(this,Y).get(_ie9).visible)return!1}}catch(err){_iterator79.e(err)}finally{_iterator79.f()}return!0}return(0,dt.warn)("Unknown optional content policy ".concat(qt.policy,".")),!0}return(0,dt.warn)("Unknown group type ".concat(qt.type,".")),!0}},{key:"setVisibility",value:function setVisibility(qt){var ie=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!0;if(!t$1(this,Y).has(qt)){(0,dt.warn)("Optional content group not found: ".concat(qt));return}t$1(this,Y).get(qt)._setVisible(Ot,!!ie),Z(this,Q,null)}},{key:"hasInitialVisibility",get:function get(){return t$1(this,J)===null||this.getHash()===t$1(this,J)}},{key:"getOrder",value:function getOrder(){return t$1(this,Y).size?t$1(this,it)?t$1(this,it).slice():_toConsumableArray(t$1(this,Y).keys()):null}},{key:"getGroups",value:function getGroups(){return t$1(this,Y).size>0?(0,dt.objectFromMap)(t$1(this,Y)):null}},{key:"getGroup",value:function getGroup(qt){return t$1(this,Y).get(qt)||null}},{key:"getHash",value:function getHash(){if(t$1(this,Q)!==null)return t$1(this,Q);var qt=new Mt.MurmurHash3_64;var _iterator80=_createForOfIteratorHelper(t$1(this,Y)),_step80;try{for(_iterator80.s();!(_step80=_iterator80.n()).done;){var _step80$value=_slicedToArray(_step80.value,2),ie=_step80$value[0],re=_step80$value[1];qt.update("".concat(ie,":").concat(re.visible))}}catch(err){_iterator80.e(err)}finally{_iterator80.f()}return Z(this,Q,qt.hexdigest())}}]);return Ut}();Q=new WeakMap,Y=new WeakMap,J=new WeakMap,it=new WeakMap,nt=new WeakSet,_ot=function ot(te){var qt=te.length;if(qt<2)return!0;var ie=te[0];for(var re=1;re<qt;re++){var ne=te[re];var ae=void 0;if(Array.isArray(ne))ae=W(this,nt,_ot).call(this,ne);else if(t$1(this,Y).has(ne))ae=t$1(this,Y).get(ne).visible;else return(0,dt.warn)("Optional content group not found: ".concat(ne)),!0;switch(ie){case"And":if(!ae)return!1;break;case"Or":if(ae)return!0;break;case"Not":return!ae;default:return!0}}return ie==="And"},o.OptionalContentConfig=Ut},function(r,o,s){Object.defineProperty(o,"__esModule",{value:!0}),o.PDFDataTransportStream=void 0;var B=s(1),Q=s(6);var Y=function(){function Y(_ref65,te){var _this46=this;var ot=_ref65.length,dt=_ref65.initialData,_ref65$progressiveDon=_ref65.progressiveDone,Mt=_ref65$progressiveDon===void 0?!1:_ref65$progressiveDon,_ref65$contentDisposi=_ref65.contentDispositionFilename,Ot=_ref65$contentDisposi===void 0?null:_ref65$contentDisposi,_ref65$disableRange=_ref65.disableRange,Qt=_ref65$disableRange===void 0?!1:_ref65$disableRange,_ref65$disableStream=_ref65.disableStream,Ut=_ref65$disableStream===void 0?!1:_ref65$disableStream;_classCallCheck(this,Y);if((0,B.assert)(te,"PDFDataTransportStream - missing required \"pdfDataRangeTransport\" argument."),this._queuedChunks=[],this._progressiveDone=Mt,this._contentDispositionFilename=Ot,(dt==null?void 0:dt.length)>0){var qt=dt instanceof Uint8Array&&dt.byteLength===dt.buffer.byteLength?dt.buffer:new Uint8Array(dt).buffer;this._queuedChunks.push(qt)}this._pdfDataRangeTransport=te,this._isStreamingSupported=!Ut,this._isRangeSupported=!Qt,this._contentLength=ot,this._fullRequestReader=null,this._rangeReaders=[],this._pdfDataRangeTransport.addRangeListener(function(qt,ie){_this46._onReceiveData({begin:qt,chunk:ie})}),this._pdfDataRangeTransport.addProgressListener(function(qt,ie){_this46._onProgress({loaded:qt,total:ie})}),this._pdfDataRangeTransport.addProgressiveReadListener(function(qt){_this46._onReceiveData({chunk:qt})}),this._pdfDataRangeTransport.addProgressiveDoneListener(function(){_this46._onProgressiveDone()}),this._pdfDataRangeTransport.transportReady()}_createClass(Y,[{key:"_onReceiveData",value:function _onReceiveData(_ref66){var ot=_ref66.begin,dt=_ref66.chunk;var Mt=dt instanceof Uint8Array&&dt.byteLength===dt.buffer.byteLength?dt.buffer:new Uint8Array(dt).buffer;if(ot===void 0)this._fullRequestReader?this._fullRequestReader._enqueue(Mt):this._queuedChunks.push(Mt);else{var Ot=this._rangeReaders.some(function(Qt){return Qt._begin!==ot?!1:(Qt._enqueue(Mt),!0)});(0,B.assert)(Ot,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}},{key:"_progressiveDataLength",get:function get(){var _ref67;var ot;return(_ref67=(ot=this._fullRequestReader)==null?void 0:ot._loaded)!==null&&_ref67!==void 0?_ref67:0}},{key:"_onProgress",value:function _onProgress(ot){var dt,Mt,Ot,Qt;ot.total===void 0?(Mt=(dt=this._rangeReaders[0])==null?void 0:dt.onProgress)==null||Mt.call(dt,{loaded:ot.loaded}):(Qt=(Ot=this._fullRequestReader)==null?void 0:Ot.onProgress)==null||Qt.call(Ot,{loaded:ot.loaded,total:ot.total})}},{key:"_onProgressiveDone",value:function _onProgressiveDone(){var ot;(ot=this._fullRequestReader)==null||ot.progressiveDone(),this._progressiveDone=!0}},{key:"_removeRangeReader",value:function _removeRangeReader(ot){var dt=this._rangeReaders.indexOf(ot);dt>=0&&this._rangeReaders.splice(dt,1)}},{key:"getFullReader",value:function getFullReader(){(0,B.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");var ot=this._queuedChunks;return this._queuedChunks=null,new J(this,ot,this._progressiveDone,this._contentDispositionFilename)}},{key:"getRangeReader",value:function getRangeReader(ot,dt){if(dt<=this._progressiveDataLength)return null;var Mt=new it(this,ot,dt);return this._pdfDataRangeTransport.requestDataRange(ot,dt),this._rangeReaders.push(Mt),Mt}},{key:"cancelAllRequests",value:function cancelAllRequests(ot){var dt;(dt=this._fullRequestReader)==null||dt.cancel(ot);var _iterator81=_createForOfIteratorHelper(this._rangeReaders.slice(0)),_step81;try{for(_iterator81.s();!(_step81=_iterator81.n()).done;){var Mt=_step81.value;Mt.cancel(ot)}}catch(err){_iterator81.e(err)}finally{_iterator81.f()}this._pdfDataRangeTransport.abort()}}]);return Y}();o.PDFDataTransportStream=Y;var J=function(){function J(ot,dt){var Mt=arguments.length>2&&arguments[2]!==undefined?arguments[2]:!1;var Ot=arguments.length>3&&arguments[3]!==undefined?arguments[3]:null;_classCallCheck(this,J);this._stream=ot,this._done=Mt||!1,this._filename=(0,Q.isPdfFile)(Ot)?Ot:null,this._queuedChunks=dt||[],this._loaded=0;var _iterator82=_createForOfIteratorHelper(this._queuedChunks),_step82;try{for(_iterator82.s();!(_step82=_iterator82.n()).done;){var Qt=_step82.value;this._loaded+=Qt.byteLength}}catch(err){_iterator82.e(err)}finally{_iterator82.f()}this._requests=[],this._headersReady=Promise.resolve(),ot._fullRequestReader=this,this.onProgress=null}_createClass(J,[{key:"_enqueue",value:function _enqueue(ot){this._done||(this._requests.length>0?this._requests.shift().resolve({value:ot,done:!1}):this._queuedChunks.push(ot),this._loaded+=ot.byteLength)}},{key:"headersReady",get:function get(){return this._headersReady}},{key:"filename",get:function get(){return this._filename}},{key:"isRangeSupported",get:function get(){return this._stream._isRangeSupported}},{key:"isStreamingSupported",get:function get(){return this._stream._isStreamingSupported}},{key:"contentLength",get:function get(){return this._stream._contentLength}},{key:"read",value:function(){var _read=_asyncToGenerator(_regeneratorRuntime().mark(function _callee20(){var ot;return _regeneratorRuntime().wrap(function _callee20$(_context20){while(1)switch(_context20.prev=_context20.next){case 0:if(!(this._queuedChunks.length>0)){_context20.next=2;break}return _context20.abrupt("return",{value:this._queuedChunks.shift(),done:!1});case 2:if(!this._done){_context20.next=4;break}return _context20.abrupt("return",{value:void 0,done:!0});case 4:ot=new B.PromiseCapability;return _context20.abrupt("return",(this._requests.push(ot),ot.promise));case 6:case"end":return _context20.stop()}},_callee20,this)}));function read(){return _read.apply(this,arguments)}return read}()},{key:"cancel",value:function cancel(ot){this._done=!0;var _iterator83=_createForOfIteratorHelper(this._requests),_step83;try{for(_iterator83.s();!(_step83=_iterator83.n()).done;){var dt=_step83.value;dt.resolve({value:void 0,done:!0})}}catch(err){_iterator83.e(err)}finally{_iterator83.f()}this._requests.length=0}},{key:"progressiveDone",value:function progressiveDone(){this._done||(this._done=!0)}}]);return J}();var it=function(){function it(ot,dt,Mt){_classCallCheck(this,it);this._stream=ot,this._begin=dt,this._end=Mt,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_createClass(it,[{key:"_enqueue",value:function _enqueue(ot){if(!this._done){if(this._requests.length===0)this._queuedChunk=ot;else{this._requests.shift().resolve({value:ot,done:!1});var _iterator84=_createForOfIteratorHelper(this._requests),_step84;try{for(_iterator84.s();!(_step84=_iterator84.n()).done;){var dt=_step84.value;dt.resolve({value:void 0,done:!0})}}catch(err){_iterator84.e(err)}finally{_iterator84.f()}this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}},{key:"isStreamingSupported",get:function get(){return!1}},{key:"read",value:function(){var _read2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee21(){var dt,ot;return _regeneratorRuntime().wrap(function _callee21$(_context21){while(1)switch(_context21.prev=_context21.next){case 0:if(!this._queuedChunk){_context21.next=3;break}dt=this._queuedChunk;return _context21.abrupt("return",(this._queuedChunk=null,{value:dt,done:!1}));case 3:if(!this._done){_context21.next=5;break}return _context21.abrupt("return",{value:void 0,done:!0});case 5:ot=new B.PromiseCapability;return _context21.abrupt("return",(this._requests.push(ot),ot.promise));case 7:case"end":return _context21.stop()}},_callee21,this)}));function read(){return _read2.apply(this,arguments)}return read}()},{key:"cancel",value:function cancel(ot){this._done=!0;var _iterator85=_createForOfIteratorHelper(this._requests),_step85;try{for(_iterator85.s();!(_step85=_iterator85.n()).done;){var dt=_step85.value;dt.resolve({value:void 0,done:!0})}}catch(err){_iterator85.e(err)}finally{_iterator85.f()}this._requests.length=0,this._stream._removeRangeReader(this)}}]);return it}()},function(r,o,s){Object.defineProperty(o,"__esModule",{value:!0}),o.PDFFetchStream=void 0;var B=s(1),Q=s(20);function Y(Mt,Ot,Qt){return{method:"GET",headers:Mt,signal:Qt.signal,mode:"cors",credentials:Ot?"include":"same-origin",redirect:"follow"}}function J(Mt){var Ot=new Headers;for(var Qt in Mt){var Ut=Mt[Qt];Ut!==void 0&&Ot.append(Qt,Ut)}return Ot}function it(Mt){return Mt instanceof Uint8Array?Mt.buffer:Mt instanceof ArrayBuffer?Mt:((0,B.warn)("getArrayBuffer - unexpected data format: ".concat(Mt)),new Uint8Array(Mt).buffer)}var nt=function(){function nt(Ot){_classCallCheck(this,nt);this.source=Ot,this.isHttp=/^https?:/i.test(Ot.url),this.httpHeaders=this.isHttp&&Ot.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}_createClass(nt,[{key:"_progressiveDataLength",get:function get(){var _ref68;var Ot;return(_ref68=(Ot=this._fullRequestReader)==null?void 0:Ot._loaded)!==null&&_ref68!==void 0?_ref68:0}},{key:"getFullReader",value:function getFullReader(){return(0,B.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new ot(this),this._fullRequestReader}},{key:"getRangeReader",value:function getRangeReader(Ot,Qt){if(Qt<=this._progressiveDataLength)return null;var Ut=new dt(this,Ot,Qt);return this._rangeRequestReaders.push(Ut),Ut}},{key:"cancelAllRequests",value:function cancelAllRequests(Ot){var Qt;(Qt=this._fullRequestReader)==null||Qt.cancel(Ot);var _iterator86=_createForOfIteratorHelper(this._rangeRequestReaders.slice(0)),_step86;try{for(_iterator86.s();!(_step86=_iterator86.n()).done;){var Ut=_step86.value;Ut.cancel(Ot)}}catch(err){_iterator86.e(err)}finally{_iterator86.f()}}}]);return nt}();o.PDFFetchStream=nt;var ot=function(){function ot(Ot){var _this47=this;_classCallCheck(this,ot);this._stream=Ot,this._reader=null,this._loaded=0,this._filename=null;var Qt=Ot.source;this._withCredentials=Qt.withCredentials||!1,this._contentLength=Qt.length,this._headersCapability=new B.PromiseCapability,this._disableRange=Qt.disableRange||!1,this._rangeChunkSize=Qt.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!Qt.disableStream,this._isRangeSupported=!Qt.disableRange,this._headers=J(this._stream.httpHeaders);var Ut=Qt.url;fetch(Ut,Y(this._headers,this._withCredentials,this._abortController)).then(function(te){if(!(0,Q.validateResponseStatus)(te.status))throw(0,Q.createResponseStatusError)(te.status,Ut);_this47._reader=te.body.getReader(),_this47._headersCapability.resolve();var qt=function qt(ne){return te.headers.get(ne)},_ref69=(0,Q.validateRangeRequestCapabilities)({getResponseHeader:qt,isHttp:_this47._stream.isHttp,rangeChunkSize:_this47._rangeChunkSize,disableRange:_this47._disableRange}),ie=_ref69.allowRangeRequests,re=_ref69.suggestedLength;_this47._isRangeSupported=ie,_this47._contentLength=re||_this47._contentLength,_this47._filename=(0,Q.extractFilenameFromHeader)(qt),!_this47._isStreamingSupported&&_this47._isRangeSupported&&_this47.cancel(new B.AbortException("Streaming is disabled."))})["catch"](this._headersCapability.reject),this.onProgress=null}_createClass(ot,[{key:"headersReady",get:function get(){return this._headersCapability.promise}},{key:"filename",get:function get(){return this._filename}},{key:"contentLength",get:function get(){return this._contentLength}},{key:"isRangeSupported",get:function get(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function get(){return this._isStreamingSupported}},{key:"read",value:function(){var _read3=_asyncToGenerator(_regeneratorRuntime().mark(function _callee22(){var Ot,_yield$this$_reader$r,Qt,Ut;return _regeneratorRuntime().wrap(function _callee22$(_context22){while(1)switch(_context22.prev=_context22.next){case 0:_context22.next=2;return this._headersCapability.promise;case 2:_context22.next=4;return this._reader.read();case 4:_yield$this$_reader$r=_context22.sent;Qt=_yield$this$_reader$r.value;Ut=_yield$this$_reader$r.done;return _context22.abrupt("return",Ut?{value:Qt,done:Ut}:(this._loaded+=Qt.byteLength,(Ot=this.onProgress)==null||Ot.call(this,{loaded:this._loaded,total:this._contentLength}),{value:it(Qt),done:!1}));case 8:case"end":return _context22.stop()}},_callee22,this)}));function read(){return _read3.apply(this,arguments)}return read}()},{key:"cancel",value:function cancel(Ot){var Qt;(Qt=this._reader)==null||Qt.cancel(Ot),this._abortController.abort()}}]);return ot}();var dt=function(){function dt(Ot,Qt,Ut){var _this48=this;_classCallCheck(this,dt);this._stream=Ot,this._reader=null,this._loaded=0;var te=Ot.source;this._withCredentials=te.withCredentials||!1,this._readCapability=new B.PromiseCapability,this._isStreamingSupported=!te.disableStream,this._abortController=new AbortController,this._headers=J(this._stream.httpHeaders),this._headers.append("Range","bytes=".concat(Qt,"-").concat(Ut-1));var qt=te.url;fetch(qt,Y(this._headers,this._withCredentials,this._abortController)).then(function(ie){if(!(0,Q.validateResponseStatus)(ie.status))throw(0,Q.createResponseStatusError)(ie.status,qt);_this48._readCapability.resolve(),_this48._reader=ie.body.getReader()})["catch"](this._readCapability.reject),this.onProgress=null}_createClass(dt,[{key:"isStreamingSupported",get:function get(){return this._isStreamingSupported}},{key:"read",value:function(){var _read4=_asyncToGenerator(_regeneratorRuntime().mark(function _callee23(){var Ot,_yield$this$_reader$r2,Qt,Ut;return _regeneratorRuntime().wrap(function _callee23$(_context23){while(1)switch(_context23.prev=_context23.next){case 0:_context23.next=2;return this._readCapability.promise;case 2:_context23.next=4;return this._reader.read();case 4:_yield$this$_reader$r2=_context23.sent;Qt=_yield$this$_reader$r2.value;Ut=_yield$this$_reader$r2.done;return _context23.abrupt("return",Ut?{value:Qt,done:Ut}:(this._loaded+=Qt.byteLength,(Ot=this.onProgress)==null||Ot.call(this,{loaded:this._loaded}),{value:it(Qt),done:!1}));case 8:case"end":return _context23.stop()}},_callee23,this)}));function read(){return _read4.apply(this,arguments)}return read}()},{key:"cancel",value:function cancel(Ot){var Qt;(Qt=this._reader)==null||Qt.cancel(Ot),this._abortController.abort()}}]);return dt}()},function(r,o,s){Object.defineProperty(o,"__esModule",{value:!0}),o.createResponseStatusError=nt,o.extractFilenameFromHeader=it,o.validateRangeRequestCapabilities=J,o.validateResponseStatus=ot;var B=s(1),Q=s(21),Y=s(6);function J(_ref70){var dt=_ref70.getResponseHeader,Mt=_ref70.isHttp,Ot=_ref70.rangeChunkSize,Qt=_ref70.disableRange;var Ut={allowRangeRequests:!1,suggestedLength:void 0},te=parseInt(dt("Content-Length"),10);return!Number.isInteger(te)||(Ut.suggestedLength=te,te<=2*Ot)||Qt||!Mt||dt("Accept-Ranges")!=="bytes"||(dt("Content-Encoding")||"identity")!=="identity"||(Ut.allowRangeRequests=!0),Ut}function it(dt){var Mt=dt("Content-Disposition");if(Mt){var Ot=(0,Q.getFilenameFromContentDispositionHeader)(Mt);if(Ot.includes("%"))try{Ot=decodeURIComponent(Ot)}catch(_unused12){}if((0,Y.isPdfFile)(Ot))return Ot}return null}function nt(dt,Mt){return dt===404||dt===0&&Mt.startsWith("file:")?new B.MissingPDFException("Missing PDF \""+Mt+"\"."):new B.UnexpectedResponseException("Unexpected server response (".concat(dt,") while retrieving PDF \"").concat(Mt,"\"."),dt)}function ot(dt){return dt===200||dt===206}},function(r,o,s){Object.defineProperty(o,"__esModule",{value:!0}),o.getFilenameFromContentDispositionHeader=Q;var B=s(1);function Q(Y){var J=!0,it=nt("filename\\*","i").exec(Y);if(it){it=it[1];var te=Ot(it);return te=unescape(te),te=Qt(te),te=Ut(te),dt(te)}if(it=Mt(Y),it){var _te=Ut(it);return dt(_te)}if(it=nt("filename","i").exec(Y),it){it=it[1];var _te2=Ot(it);return _te2=Ut(_te2),dt(_te2)}function nt(te,qt){return new RegExp("(?:^|;)\\s*"+te+"\\s*=\\s*([^\";\\s][^;\\s]*|\"(?:[^\"\\\\]|\\\\\"?)+\"?)",qt)}function ot(te,qt){if(te){if(!/^[\x00-\xFF]+$/.test(qt))return qt;try{var ie=new TextDecoder(te,{fatal:!0}),re=(0,B.stringToBytes)(qt);qt=ie.decode(re),J=!1}catch(_unused13){}}return qt}function dt(te){return J&&/[\x80-\xff]/.test(te)&&(te=ot("utf-8",te),J&&(te=ot("iso-8859-1",te))),te}function Mt(te){var qt=[];var ie;var re=nt("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;(ie=re.exec(te))!==null;){var _ie10=ie,_ie11=_slicedToArray(_ie10,4),ae=_ie11[1],Bt=_ie11[2],Wt=_ie11[3];if(ae=parseInt(ae,10),ae in qt){if(ae===0)break;continue}qt[ae]=[Bt,Wt]}var ne=[];for(var _ae2=0;_ae2<qt.length&&_ae2 in qt;++_ae2){var _qt$_ae=_slicedToArray(qt[_ae2],2),_Bt2=_qt$_ae[0],_Wt2=_qt$_ae[1];_Wt2=Ot(_Wt2),_Bt2&&(_Wt2=unescape(_Wt2),_ae2===0&&(_Wt2=Qt(_Wt2))),ne.push(_Wt2)}return ne.join("")}function Ot(te){if(te.startsWith("\"")){var qt=te.slice(1).split("\\\"");for(var ie=0;ie<qt.length;++ie){var re=qt[ie].indexOf("\"");re!==-1&&(qt[ie]=qt[ie].slice(0,re),qt.length=ie+1),qt[ie]=qt[ie].replaceAll(/\\(.)/g,"$1")}te=qt.join("\"")}return te}function Qt(te){var qt=te.indexOf("'");if(qt===-1)return te;var ie=te.slice(0,qt),re=te.slice(qt+1).replace(/^[^']*'/,"");return ot(ie,re)}function Ut(te){return!te.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(te)?te:te.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(qt,ie,re,ne){if(re==="q"||re==="Q")return ne=ne.replaceAll("_"," "),ne=ne.replaceAll(/=([0-9a-fA-F]{2})/g,function(ae,Bt){return String.fromCharCode(parseInt(Bt,16))}),ot(ie,ne);try{ne=atob(ne)}catch(_unused14){}return ot(ie,ne)})}return""}},function(r,o,s){Object.defineProperty(o,"__esModule",{value:!0}),o.PDFNetworkStream=void 0;var B=s(1),Q=s(20);var Y=200,J=206;function it(Ot){var Qt=Ot.response;return typeof Qt!="string"?Qt:(0,B.stringToBytes)(Qt).buffer}var nt=function(){function nt(Qt){var Ut=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,nt);this.url=Qt,this.isHttp=/^https?:/i.test(Qt),this.httpHeaders=this.isHttp&&Ut.httpHeaders||Object.create(null),this.withCredentials=Ut.withCredentials||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}_createClass(nt,[{key:"requestRange",value:function requestRange(Qt,Ut,te){var qt={begin:Qt,end:Ut};for(var ie in te)qt[ie]=te[ie];return this.request(qt)}},{key:"requestFull",value:function requestFull(Qt){return this.request(Qt)}},{key:"request",value:function request(Qt){var Ut=new XMLHttpRequest,te=this.currXhrId++,qt=this.pendingRequests[te]={xhr:Ut};Ut.open("GET",this.url),Ut.withCredentials=this.withCredentials;for(var ie in this.httpHeaders){var re=this.httpHeaders[ie];re!==void 0&&Ut.setRequestHeader(ie,re)}return this.isHttp&&"begin"in Qt&&"end"in Qt?(Ut.setRequestHeader("Range","bytes=".concat(Qt.begin,"-").concat(Qt.end-1)),qt.expectedStatus=J):qt.expectedStatus=Y,Ut.responseType="arraybuffer",Qt.onError&&(Ut.onerror=function(ie){Qt.onError(Ut.status)}),Ut.onreadystatechange=this.onStateChange.bind(this,te),Ut.onprogress=this.onProgress.bind(this,te),qt.onHeadersReceived=Qt.onHeadersReceived,qt.onDone=Qt.onDone,qt.onError=Qt.onError,qt.onProgress=Qt.onProgress,Ut.send(null),te}},{key:"onProgress",value:function onProgress(Qt,Ut){var te;var qt=this.pendingRequests[Qt];qt&&((te=qt.onProgress)==null||te.call(qt,Ut))}},{key:"onStateChange",value:function onStateChange(Qt,Ut){var te,qt,ie;var re=this.pendingRequests[Qt];if(!re)return;var ne=re.xhr;if(ne.readyState>=2&&re.onHeadersReceived&&(re.onHeadersReceived(),delete re.onHeadersReceived),ne.readyState!==4||!(Qt in this.pendingRequests))return;if(delete this.pendingRequests[Qt],ne.status===0&&this.isHttp){(te=re.onError)==null||te.call(re,ne.status);return}var ae=ne.status||Y;if(!(ae===Y&&re.expectedStatus===J)&&ae!==re.expectedStatus){(qt=re.onError)==null||qt.call(re,ne.status);return}var Bt=it(ne);if(ae===J){var Wt=ne.getResponseHeader("Content-Range"),oe=/bytes (\d+)-(\d+)\/(\d+)/.exec(Wt);re.onDone({begin:parseInt(oe[1],10),chunk:Bt})}else Bt?re.onDone({begin:0,chunk:Bt}):(ie=re.onError)==null||ie.call(re,ne.status)}},{key:"getRequestXhr",value:function getRequestXhr(Qt){return this.pendingRequests[Qt].xhr}},{key:"isPendingRequest",value:function isPendingRequest(Qt){return Qt in this.pendingRequests}},{key:"abortRequest",value:function abortRequest(Qt){var Ut=this.pendingRequests[Qt].xhr;delete this.pendingRequests[Qt],Ut.abort()}}]);return nt}();var ot=function(){function ot(Qt){_classCallCheck(this,ot);this._source=Qt,this._manager=new nt(Qt.url,{httpHeaders:Qt.httpHeaders,withCredentials:Qt.withCredentials}),this._rangeChunkSize=Qt.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_createClass(ot,[{key:"_onRangeRequestReaderClosed",value:function _onRangeRequestReaderClosed(Qt){var Ut=this._rangeRequestReaders.indexOf(Qt);Ut>=0&&this._rangeRequestReaders.splice(Ut,1)}},{key:"getFullReader",value:function getFullReader(){return(0,B.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new dt(this._manager,this._source),this._fullRequestReader}},{key:"getRangeReader",value:function getRangeReader(Qt,Ut){var te=new Mt(this._manager,Qt,Ut);return te.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(te),te}},{key:"cancelAllRequests",value:function cancelAllRequests(Qt){var Ut;(Ut=this._fullRequestReader)==null||Ut.cancel(Qt);var _iterator87=_createForOfIteratorHelper(this._rangeRequestReaders.slice(0)),_step87;try{for(_iterator87.s();!(_step87=_iterator87.n()).done;){var te=_step87.value;te.cancel(Qt)}}catch(err){_iterator87.e(err)}finally{_iterator87.f()}}}]);return ot}();o.PDFNetworkStream=ot;var dt=function(){function dt(Qt,Ut){_classCallCheck(this,dt);this._manager=Qt;var te={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=Ut.url,this._fullRequestId=Qt.requestFull(te),this._headersReceivedCapability=new B.PromiseCapability,this._disableRange=Ut.disableRange||!1,this._contentLength=Ut.length,this._rangeChunkSize=Ut.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_createClass(dt,[{key:"_onHeadersReceived",value:function _onHeadersReceived(){var Qt=this._fullRequestId,Ut=this._manager.getRequestXhr(Qt),te=function te(re){return Ut.getResponseHeader(re)},_ref71=(0,Q.validateRangeRequestCapabilities)({getResponseHeader:te,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange}),qt=_ref71.allowRangeRequests,ie=_ref71.suggestedLength;qt&&(this._isRangeSupported=!0),this._contentLength=ie||this._contentLength,this._filename=(0,Q.extractFilenameFromHeader)(te),this._isRangeSupported&&this._manager.abortRequest(Qt),this._headersReceivedCapability.resolve()}},{key:"_onDone",value:function _onDone(Qt){if(Qt&&(this._requests.length>0?this._requests.shift().resolve({value:Qt.chunk,done:!1}):this._cachedChunks.push(Qt.chunk)),this._done=!0,!(this._cachedChunks.length>0)){var _iterator88=_createForOfIteratorHelper(this._requests),_step88;try{for(_iterator88.s();!(_step88=_iterator88.n()).done;){var Ut=_step88.value;Ut.resolve({value:void 0,done:!0})}}catch(err){_iterator88.e(err)}finally{_iterator88.f()}this._requests.length=0}}},{key:"_onError",value:function _onError(Qt){this._storedError=(0,Q.createResponseStatusError)(Qt,this._url),this._headersReceivedCapability.reject(this._storedError);var _iterator89=_createForOfIteratorHelper(this._requests),_step89;try{for(_iterator89.s();!(_step89=_iterator89.n()).done;){var Ut=_step89.value;Ut.reject(this._storedError)}}catch(err){_iterator89.e(err)}finally{_iterator89.f()}this._requests.length=0,this._cachedChunks.length=0}},{key:"_onProgress",value:function _onProgress(Qt){var Ut;(Ut=this.onProgress)==null||Ut.call(this,{loaded:Qt.loaded,total:Qt.lengthComputable?Qt.total:this._contentLength})}},{key:"filename",get:function get(){return this._filename}},{key:"isRangeSupported",get:function get(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function get(){return this._isStreamingSupported}},{key:"contentLength",get:function get(){return this._contentLength}},{key:"headersReady",get:function get(){return this._headersReceivedCapability.promise}},{key:"read",value:function(){var _read5=_asyncToGenerator(_regeneratorRuntime().mark(function _callee24(){var Qt;return _regeneratorRuntime().wrap(function _callee24$(_context24){while(1)switch(_context24.prev=_context24.next){case 0:if(!this._storedError){_context24.next=2;break}throw this._storedError;case 2:if(!(this._cachedChunks.length>0)){_context24.next=4;break}return _context24.abrupt("return",{value:this._cachedChunks.shift(),done:!1});case 4:if(!this._done){_context24.next=6;break}return _context24.abrupt("return",{value:void 0,done:!0});case 6:Qt=new B.PromiseCapability;return _context24.abrupt("return",(this._requests.push(Qt),Qt.promise));case 8:case"end":return _context24.stop()}},_callee24,this)}));function read(){return _read5.apply(this,arguments)}return read}()},{key:"cancel",value:function cancel(Qt){this._done=!0,this._headersReceivedCapability.reject(Qt);var _iterator90=_createForOfIteratorHelper(this._requests),_step90;try{for(_iterator90.s();!(_step90=_iterator90.n()).done;){var Ut=_step90.value;Ut.resolve({value:void 0,done:!0})}}catch(err){_iterator90.e(err)}finally{_iterator90.f()}this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}]);return dt}();var Mt=function(){function Mt(Qt,Ut,te){_classCallCheck(this,Mt);this._manager=Qt;var qt={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=Qt.url,this._requestId=Qt.requestRange(Ut,te,qt),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_createClass(Mt,[{key:"_close",value:function _close(){var Qt;(Qt=this.onClosed)==null||Qt.call(this,this)}},{key:"_onDone",value:function _onDone(Qt){var Ut=Qt.chunk;this._requests.length>0?this._requests.shift().resolve({value:Ut,done:!1}):this._queuedChunk=Ut,this._done=!0;var _iterator91=_createForOfIteratorHelper(this._requests),_step91;try{for(_iterator91.s();!(_step91=_iterator91.n()).done;){var te=_step91.value;te.resolve({value:void 0,done:!0})}}catch(err){_iterator91.e(err)}finally{_iterator91.f()}this._requests.length=0,this._close()}},{key:"_onError",value:function _onError(Qt){this._storedError=(0,Q.createResponseStatusError)(Qt,this._url);var _iterator92=_createForOfIteratorHelper(this._requests),_step92;try{for(_iterator92.s();!(_step92=_iterator92.n()).done;){var Ut=_step92.value;Ut.reject(this._storedError)}}catch(err){_iterator92.e(err)}finally{_iterator92.f()}this._requests.length=0,this._queuedChunk=null}},{key:"_onProgress",value:function _onProgress(Qt){var Ut;this.isStreamingSupported||(Ut=this.onProgress)==null||Ut.call(this,{loaded:Qt.loaded})}},{key:"isStreamingSupported",get:function get(){return!1}},{key:"read",value:function(){var _read6=_asyncToGenerator(_regeneratorRuntime().mark(function _callee25(){var Ut,Qt;return _regeneratorRuntime().wrap(function _callee25$(_context25){while(1)switch(_context25.prev=_context25.next){case 0:if(!this._storedError){_context25.next=2;break}throw this._storedError;case 2:if(!(this._queuedChunk!==null)){_context25.next=5;break}Ut=this._queuedChunk;return _context25.abrupt("return",(this._queuedChunk=null,{value:Ut,done:!1}));case 5:if(!this._done){_context25.next=7;break}return _context25.abrupt("return",{value:void 0,done:!0});case 7:Qt=new B.PromiseCapability;return _context25.abrupt("return",(this._requests.push(Qt),Qt.promise));case 9:case"end":return _context25.stop()}},_callee25,this)}));function read(){return _read6.apply(this,arguments)}return read}()},{key:"cancel",value:function cancel(Qt){this._done=!0;var _iterator93=_createForOfIteratorHelper(this._requests),_step93;try{for(_iterator93.s();!(_step93=_iterator93.n()).done;){var Ut=_step93.value;Ut.resolve({value:void 0,done:!0})}}catch(err){_iterator93.e(err)}finally{_iterator93.f()}this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}]);return Mt}()},function(r,o,s){Object.defineProperty(o,"__esModule",{value:!0}),o.PDFNodeStream=void 0;var B=s(1),Q=s(20);var Y=/^file:\/\/\/[a-zA-Z]:\//;function J(te){var qt=require$$5,ie=qt.parse(te);return ie.protocol==="file:"||ie.host?ie:/^[a-z]:[/\\]/i.test(te)?qt.parse("file:///".concat(te)):(ie.host||(ie.protocol="file:"),ie)}var it=function(){function it(qt){_classCallCheck(this,it);this.source=qt,this.url=J(qt.url),this.isHttp=this.url.protocol==="http:"||this.url.protocol==="https:",this.isFsUrl=this.url.protocol==="file:",this.httpHeaders=this.isHttp&&qt.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}_createClass(it,[{key:"_progressiveDataLength",get:function get(){var _ref72;var qt;return(_ref72=(qt=this._fullRequestReader)==null?void 0:qt._loaded)!==null&&_ref72!==void 0?_ref72:0}},{key:"getFullReader",value:function getFullReader(){return(0,B.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new Qt(this):new Mt(this),this._fullRequestReader}},{key:"getRangeReader",value:function getRangeReader(qt,ie){if(ie<=this._progressiveDataLength)return null;var re=this.isFsUrl?new Ut(this,qt,ie):new Ot(this,qt,ie);return this._rangeRequestReaders.push(re),re}},{key:"cancelAllRequests",value:function cancelAllRequests(qt){var ie;(ie=this._fullRequestReader)==null||ie.cancel(qt);var _iterator94=_createForOfIteratorHelper(this._rangeRequestReaders.slice(0)),_step94;try{for(_iterator94.s();!(_step94=_iterator94.n()).done;){var re=_step94.value;re.cancel(qt)}}catch(err){_iterator94.e(err)}finally{_iterator94.f()}}}]);return it}();o.PDFNodeStream=it;var nt=function(){function nt(qt){_classCallCheck(this,nt);this._url=qt.url,this._done=!1,this._storedError=null,this.onProgress=null;var ie=qt.source;this._contentLength=ie.length,this._loaded=0,this._filename=null,this._disableRange=ie.disableRange||!1,this._rangeChunkSize=ie.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!ie.disableStream,this._isRangeSupported=!ie.disableRange,this._readableStream=null,this._readCapability=new B.PromiseCapability,this._headersCapability=new B.PromiseCapability}_createClass(nt,[{key:"headersReady",get:function get(){return this._headersCapability.promise}},{key:"filename",get:function get(){return this._filename}},{key:"contentLength",get:function get(){return this._contentLength}},{key:"isRangeSupported",get:function get(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function get(){return this._isStreamingSupported}},{key:"read",value:function(){var _read7=_asyncToGenerator(_regeneratorRuntime().mark(function _callee26(){var qt,ie;return _regeneratorRuntime().wrap(function _callee26$(_context26){while(1)switch(_context26.prev=_context26.next){case 0:_context26.next=2;return this._readCapability.promise;case 2:if(!this._done){_context26.next=4;break}return _context26.abrupt("return",{value:void 0,done:!0});case 4:if(!this._storedError){_context26.next=6;break}throw this._storedError;case 6:ie=this._readableStream.read();return _context26.abrupt("return",ie===null?(this._readCapability=new B.PromiseCapability,this.read()):(this._loaded+=ie.length,(qt=this.onProgress)==null||qt.call(this,{loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(ie).buffer,done:!1}));case 8:case"end":return _context26.stop()}},_callee26,this)}));function read(){return _read7.apply(this,arguments)}return read}()},{key:"cancel",value:function cancel(qt){if(!this._readableStream){this._error(qt);return}this._readableStream.destroy(qt)}},{key:"_error",value:function _error(qt){this._storedError=qt,this._readCapability.resolve()}},{key:"_setReadableStream",value:function _setReadableStream(qt){var _this49=this;this._readableStream=qt,qt.on("readable",function(){_this49._readCapability.resolve()}),qt.on("end",function(){qt.destroy(),_this49._done=!0,_this49._readCapability.resolve()}),qt.on("error",function(ie){_this49._error(ie)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new B.AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}]);return nt}();var ot=function(){function ot(qt){_classCallCheck(this,ot);this._url=qt.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=new B.PromiseCapability;var ie=qt.source;this._isStreamingSupported=!ie.disableStream}_createClass(ot,[{key:"isStreamingSupported",get:function get(){return this._isStreamingSupported}},{key:"read",value:function(){var _read8=_asyncToGenerator(_regeneratorRuntime().mark(function _callee27(){var qt,ie;return _regeneratorRuntime().wrap(function _callee27$(_context27){while(1)switch(_context27.prev=_context27.next){case 0:_context27.next=2;return this._readCapability.promise;case 2:if(!this._done){_context27.next=4;break}return _context27.abrupt("return",{value:void 0,done:!0});case 4:if(!this._storedError){_context27.next=6;break}throw this._storedError;case 6:ie=this._readableStream.read();return _context27.abrupt("return",ie===null?(this._readCapability=new B.PromiseCapability,this.read()):(this._loaded+=ie.length,(qt=this.onProgress)==null||qt.call(this,{loaded:this._loaded}),{value:new Uint8Array(ie).buffer,done:!1}));case 8:case"end":return _context27.stop()}},_callee27,this)}));function read(){return _read8.apply(this,arguments)}return read}()},{key:"cancel",value:function cancel(qt){if(!this._readableStream){this._error(qt);return}this._readableStream.destroy(qt)}},{key:"_error",value:function _error(qt){this._storedError=qt,this._readCapability.resolve()}},{key:"_setReadableStream",value:function _setReadableStream(qt){var _this50=this;this._readableStream=qt,qt.on("readable",function(){_this50._readCapability.resolve()}),qt.on("end",function(){qt.destroy(),_this50._done=!0,_this50._readCapability.resolve()}),qt.on("error",function(ie){_this50._error(ie)}),this._storedError&&this._readableStream.destroy(this._storedError)}}]);return ot}();function dt(te,qt){return{protocol:te.protocol,auth:te.auth,host:te.hostname,port:te.port,path:te.path,method:"GET",headers:qt}}var Mt=function(_nt){_inherits(Mt,_nt);function Mt(qt){var _this51;_classCallCheck(this,Mt);_this51=_callSuper(this,Mt,[qt]);var ie=function ie(re){if(re.statusCode===404){var Wt=new B.MissingPDFException("Missing PDF \"".concat(_this51._url,"\"."));_this51._storedError=Wt,_this51._headersCapability.reject(Wt);return}_this51._headersCapability.resolve(),_this51._setReadableStream(re);var ne=function ne(Wt){return _this51._readableStream.headers[Wt.toLowerCase()]},_ref73=(0,Q.validateRangeRequestCapabilities)({getResponseHeader:ne,isHttp:qt.isHttp,rangeChunkSize:_this51._rangeChunkSize,disableRange:_this51._disableRange}),ae=_ref73.allowRangeRequests,Bt=_ref73.suggestedLength;_this51._isRangeSupported=ae,_this51._contentLength=Bt||_this51._contentLength,_this51._filename=(0,Q.extractFilenameFromHeader)(ne)};if(_this51._request=null,_this51._url.protocol==="http:"){var re=require$$5;_this51._request=re.request(dt(_this51._url,qt.httpHeaders),ie)}else{var _re4=require$$5;_this51._request=_re4.request(dt(_this51._url,qt.httpHeaders),ie)}_this51._request.on("error",function(re){_this51._storedError=re,_this51._headersCapability.reject(re)}),_this51._request.end();return _this51}return _createClass(Mt)}(nt);var Ot=function(_ot2){_inherits(Ot,_ot2);function Ot(qt,ie,re){var _this52;_classCallCheck(this,Ot);_this52=_callSuper(this,Ot,[qt]),_this52._httpHeaders={};for(var ae in qt.httpHeaders){var Bt=qt.httpHeaders[ae];Bt!==void 0&&(_this52._httpHeaders[ae]=Bt)}_this52._httpHeaders.Range="bytes=".concat(ie,"-").concat(re-1);var ne=function ne(ae){if(ae.statusCode===404){var _Bt3=new B.MissingPDFException("Missing PDF \"".concat(_this52._url,"\"."));_this52._storedError=_Bt3;return}_this52._setReadableStream(ae)};if(_this52._request=null,_this52._url.protocol==="http:"){var _ae3=require$$5;_this52._request=_ae3.request(dt(_this52._url,_this52._httpHeaders),ne)}else{var _ae4=require$$5;_this52._request=_ae4.request(dt(_this52._url,_this52._httpHeaders),ne)}_this52._request.on("error",function(ae){_this52._storedError=ae}),_this52._request.end();return _this52}return _createClass(Ot)}(ot);var Qt=function(_nt2){_inherits(Qt,_nt2);function Qt(qt){var _this53;_classCallCheck(this,Qt);_this53=_callSuper(this,Qt,[qt]);var ie=decodeURIComponent(_this53._url.path);Y.test(_this53._url.href)&&(ie=ie.replace(/^\//,""));var re=require$$5;re.lstat(ie,function(ne,ae){if(ne){ne.code==="ENOENT"&&(ne=new B.MissingPDFException("Missing PDF \"".concat(ie,"\"."))),_this53._storedError=ne,_this53._headersCapability.reject(ne);return}_this53._contentLength=ae.size,_this53._setReadableStream(re.createReadStream(ie)),_this53._headersCapability.resolve()});return _this53}return _createClass(Qt)}(nt);var Ut=function(_ot3){_inherits(Ut,_ot3);function Ut(qt,ie,re){var _this54;_classCallCheck(this,Ut);_this54=_callSuper(this,Ut,[qt]);var ne=decodeURIComponent(_this54._url.path);Y.test(_this54._url.href)&&(ne=ne.replace(/^\//,""));var ae=require$$5;_this54._setReadableStream(ae.createReadStream(ne,{start:ie,end:re-1}));return _this54}return _createClass(Ut)}(ot)},function(r,o,s){Object.defineProperty(o,"__esModule",{value:!0}),o.SVGGraphics=void 0;var B=s(6),Q=s(1);var Y={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},J="http://www.w3.org/XML/1998/namespace",it="http://www.w3.org/1999/xlink",nt=["butt","round","square"],ot=["miter","round","bevel"],dt=function dt(ae){var Bt=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"";var Wt=arguments.length>2&&arguments[2]!==undefined?arguments[2]:!1;if(URL.createObjectURL&&(typeof Blob==="undefined"?"undefined":_typeof(Blob))<"u"&&!Wt)return URL.createObjectURL(new Blob([ae],{type:Bt}));var oe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var ve="data:".concat(Bt,";base64,");for(var _e=0,Xe=ae.length;_e<Xe;_e+=3){var He=ae[_e]&255,ro=ae[_e+1]&255,Xo=ae[_e+2]&255,Se=He>>2,xr=(He&3)<<4|ro>>4,pr=_e+1<Xe?(ro&15)<<2|Xo>>6:64,$e=_e+2<Xe?Xo&63:64;ve+=oe[Se]+oe[xr]+oe[pr]+oe[$e]}return ve},Mt=function(){var ae=new Uint8Array([137,80,78,71,13,10,26,10]),Bt=12,Wt=new Int32Array(256);for(var Xo=0;Xo<256;Xo++){var Se=Xo;for(var xr=0;xr<8;xr++)Se=Se&1?3988292384^Se>>1&2147483647:Se>>1&2147483647;Wt[Xo]=Se}function oe(Xo,Se,xr){var pr=-1;for(var $e=Se;$e<xr;$e++){var _r=(pr^Xo[$e])&255,Ps=Wt[_r];pr=pr>>>8^Ps}return pr^-1}function ve(Xo,Se,xr,pr){var $e=pr;var _r=Se.length;xr[$e]=_r>>24&255,xr[$e+1]=_r>>16&255,xr[$e+2]=_r>>8&255,xr[$e+3]=_r&255,$e+=4,xr[$e]=Xo.charCodeAt(0)&255,xr[$e+1]=Xo.charCodeAt(1)&255,xr[$e+2]=Xo.charCodeAt(2)&255,xr[$e+3]=Xo.charCodeAt(3)&255,$e+=4,xr.set(Se,$e),$e+=Se.length;var Ps=oe(xr,pr+4,$e);xr[$e]=Ps>>24&255,xr[$e+1]=Ps>>16&255,xr[$e+2]=Ps>>8&255,xr[$e+3]=Ps&255}function _e(Xo,Se,xr){var pr=1,$e=0;for(var _r=Se;_r<xr;++_r)pr=(pr+(Xo[_r]&255))%65521,$e=($e+pr)%65521;return $e<<16|pr}function Xe(Xo){if(!Q.isNodeJS)return He(Xo);try{var _Se=parseInt(process.versions.node)>=8?Xo:Buffer.from(Xo),_xr=require$$5.deflateSync(_Se,{level:9});return _xr instanceof Uint8Array?_xr:new Uint8Array(_xr)}catch(Se){(0,Q.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+Se)}return He(Xo)}function He(Xo){var Se=Xo.length;var xr=65535,pr=Math.ceil(Se/xr),$e=new Uint8Array(2+Se+pr*5+4);var _r=0;$e[_r++]=120,$e[_r++]=156;var Ps=0;for(;Se>xr;)$e[_r++]=0,$e[_r++]=255,$e[_r++]=255,$e[_r++]=0,$e[_r++]=0,$e.set(Xo.subarray(Ps,Ps+xr),_r),_r+=xr,Ps+=xr,Se-=xr;$e[_r++]=1,$e[_r++]=Se&255,$e[_r++]=Se>>8&255,$e[_r++]=~Se&65535&255,$e[_r++]=(~Se&65535)>>8&255,$e.set(Xo.subarray(Ps),_r),_r+=Xo.length-Ps;var qe=_e(Xo,0,Xo.length);return $e[_r++]=qe>>24&255,$e[_r++]=qe>>16&255,$e[_r++]=qe>>8&255,$e[_r++]=qe&255,$e}function ro(Xo,Se,xr,pr){var $e=Xo.width,_r=Xo.height;var Ps,qe,bl;var ol=Xo.data;switch(Se){case Q.ImageKind.GRAYSCALE_1BPP:qe=0,Ps=1,bl=$e+7>>3;break;case Q.ImageKind.RGB_24BPP:qe=2,Ps=8,bl=$e*3;break;case Q.ImageKind.RGBA_32BPP:qe=6,Ps=8,bl=$e*4;break;default:throw new Error("invalid format")}var Te=new Uint8Array((1+bl)*_r);var pe=0,ue=0;for(var io=0;io<_r;++io)Te[pe++]=0,Te.set(ol.subarray(ue,ue+bl),pe),ue+=bl,pe+=bl;if(Se===Q.ImageKind.GRAYSCALE_1BPP&&pr){pe=0;for(var _io2=0;_io2<_r;_io2++){pe++;for(var Qr=0;Qr<bl;Qr++)Te[pe++]^=255}}var se=new Uint8Array([$e>>24&255,$e>>16&255,$e>>8&255,$e&255,_r>>24&255,_r>>16&255,_r>>8&255,_r&255,Ps,qe,0,0,0]),be=Xe(Te),Ae=ae.length+Bt*3+se.length+be.length,ze=new Uint8Array(Ae);var pi=0;return ze.set(ae,pi),pi+=ae.length,ve("IHDR",se,ze,pi),pi+=Bt+se.length,ve("IDATA",be,ze,pi),pi+=Bt+be.length,ve("IEND",new Uint8Array(0),ze,pi),dt(ze,"image/png",xr)}return function(Xo,Se,xr){var pr=Xo.kind===void 0?Q.ImageKind.GRAYSCALE_1BPP:Xo.kind;return ro(Xo,pr,Se,xr)}}();var Ot=function(){function Ot(){_classCallCheck(this,Ot);this.fontSizeScale=1,this.fontWeight=Y.fontWeight,this.fontSize=0,this.textMatrix=Q.IDENTITY_MATRIX,this.fontMatrix=Q.FONT_IDENTITY_MATRIX,this.leading=0,this.textRenderingMode=Q.TextRenderingMode.FILL,this.textMatrixScale=1,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRise=0,this.fillColor=Y.fillColor,this.strokeColor="#000000",this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.lineJoin="",this.lineCap="",this.miterLimit=0,this.dashArray=[],this.dashPhase=0,this.dependencies=[],this.activeClipUrl=null,this.clipGroup=null,this.maskId=""}_createClass(Ot,[{key:"clone",value:function clone(){return Object.create(this)}},{key:"setCurrentPoint",value:function setCurrentPoint(Bt,Wt){this.x=Bt,this.y=Wt}}]);return Ot}();function Qt(ae){var Bt=[];var Wt=[];var _iterator95=_createForOfIteratorHelper(ae),_step95;try{for(_iterator95.s();!(_step95=_iterator95.n()).done;){var oe=_step95.value;if(oe.fn==="save"){Bt.push({fnId:92,fn:"group",items:[]}),Wt.push(Bt),Bt=Bt.at(-1).items;continue}oe.fn==="restore"?Bt=Wt.pop():Bt.push(oe)}}catch(err){_iterator95.e(err)}finally{_iterator95.f()}return Bt}function Ut(ae){if(Number.isInteger(ae))return ae.toString();var Bt=ae.toFixed(10);var Wt=Bt.length-1;if(Bt[Wt]!=="0")return Bt;do Wt--;while(Bt[Wt]==="0");return Bt.substring(0,Bt[Wt]==="."?Wt:Wt+1)}function te(ae){if(ae[4]===0&&ae[5]===0){if(ae[1]===0&&ae[2]===0)return ae[0]===1&&ae[3]===1?"":"scale(".concat(Ut(ae[0])," ").concat(Ut(ae[3]),")");if(ae[0]===ae[3]&&ae[1]===-ae[2]){var Bt=Math.acos(ae[0])*180/Math.PI;return"rotate(".concat(Ut(Bt),")")}}else if(ae[0]===1&&ae[1]===0&&ae[2]===0&&ae[3]===1)return"translate(".concat(Ut(ae[4])," ").concat(Ut(ae[5]),")");return"matrix(".concat(Ut(ae[0])," ").concat(Ut(ae[1])," ").concat(Ut(ae[2])," ").concat(Ut(ae[3])," ").concat(Ut(ae[4])," ").concat(Ut(ae[5]),")")}var qt=0,ie=0,re=0;var ne=function(){function ne(Bt,Wt){var oe=arguments.length>2&&arguments[2]!==undefined?arguments[2]:!1;_classCallCheck(this,ne);(0,B.deprecated)("The SVG back-end is no longer maintained and *may* be removed in the future."),this.svgFactory=new B.DOMSVGFactory,this.current=new Ot,this.transformMatrix=Q.IDENTITY_MATRIX,this.transformStack=[],this.extraStack=[],this.commonObjs=Bt,this.objs=Wt,this.pendingClip=null,this.pendingEOFill=!1,this.embedFonts=!1,this.embeddedFonts=Object.create(null),this.cssStyle=null,this.forceDataSchema=!!oe,this._operatorIdMapping=[];for(var ve in Q.OPS)this._operatorIdMapping[Q.OPS[ve]]=ve}_createClass(ne,[{key:"getObject",value:function getObject(Bt){var Wt=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;return typeof Bt=="string"?Bt.startsWith("g_")?this.commonObjs.get(Bt):this.objs.get(Bt):Wt}},{key:"save",value:function save(){this.transformStack.push(this.transformMatrix);var Bt=this.current;this.extraStack.push(Bt),this.current=Bt.clone()}},{key:"restore",value:function restore(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.pendingClip=null,this.tgrp=null}},{key:"group",value:function group(Bt){this.save(),this.executeOpTree(Bt),this.restore()}},{key:"loadDependencies",value:function loadDependencies(Bt){var _this55=this;var Wt=Bt.fnArray,oe=Bt.argsArray;for(var ve=0,_e=Wt.length;ve<_e;ve++)if(Wt[ve]===Q.OPS.dependency){var _iterator96=_createForOfIteratorHelper(oe[ve]),_step96;try{var _loop=function _loop(){var Xe=_step96.value;var He=Xe.startsWith("g_")?_this55.commonObjs:_this55.objs,ro=new Promise(function(Xo){He.get(Xe,Xo)});_this55.current.dependencies.push(ro)};for(_iterator96.s();!(_step96=_iterator96.n()).done;){_loop()}}catch(err){_iterator96.e(err)}finally{_iterator96.f()}}return Promise.all(this.current.dependencies)}},{key:"transform",value:function transform(Bt,Wt,oe,ve,_e,Xe){var He=[Bt,Wt,oe,ve,_e,Xe];this.transformMatrix=Q.Util.transform(this.transformMatrix,He),this.tgrp=null}},{key:"getSVG",value:function getSVG(Bt,Wt){var _this56=this;this.viewport=Wt;var oe=this._initialize(Wt);return this.loadDependencies(Bt).then(function(){return _this56.transformMatrix=Q.IDENTITY_MATRIX,_this56.executeOpTree(_this56.convertOpList(Bt)),oe})}},{key:"convertOpList",value:function convertOpList(Bt){var Wt=this._operatorIdMapping,oe=Bt.argsArray,ve=Bt.fnArray,_e=[];for(var Xe=0,He=ve.length;Xe<He;Xe++){var ro=ve[Xe];_e.push({fnId:ro,fn:Wt[ro],args:oe[Xe]})}return Qt(_e)}},{key:"executeOpTree",value:function executeOpTree(Bt){var _iterator97=_createForOfIteratorHelper(Bt),_step97;try{for(_iterator97.s();!(_step97=_iterator97.n()).done;){var Wt=_step97.value;var oe=Wt.fn,ve=Wt.fnId,_e=Wt.args;switch(ve|0){case Q.OPS.beginText:this.beginText();break;case Q.OPS.dependency:break;case Q.OPS.setLeading:this.setLeading(_e);break;case Q.OPS.setLeadingMoveText:this.setLeadingMoveText(_e[0],_e[1]);break;case Q.OPS.setFont:this.setFont(_e);break;case Q.OPS.showText:this.showText(_e[0]);break;case Q.OPS.showSpacedText:this.showText(_e[0]);break;case Q.OPS.endText:this.endText();break;case Q.OPS.moveText:this.moveText(_e[0],_e[1]);break;case Q.OPS.setCharSpacing:this.setCharSpacing(_e[0]);break;case Q.OPS.setWordSpacing:this.setWordSpacing(_e[0]);break;case Q.OPS.setHScale:this.setHScale(_e[0]);break;case Q.OPS.setTextMatrix:this.setTextMatrix(_e[0],_e[1],_e[2],_e[3],_e[4],_e[5]);break;case Q.OPS.setTextRise:this.setTextRise(_e[0]);break;case Q.OPS.setTextRenderingMode:this.setTextRenderingMode(_e[0]);break;case Q.OPS.setLineWidth:this.setLineWidth(_e[0]);break;case Q.OPS.setLineJoin:this.setLineJoin(_e[0]);break;case Q.OPS.setLineCap:this.setLineCap(_e[0]);break;case Q.OPS.setMiterLimit:this.setMiterLimit(_e[0]);break;case Q.OPS.setFillRGBColor:this.setFillRGBColor(_e[0],_e[1],_e[2]);break;case Q.OPS.setStrokeRGBColor:this.setStrokeRGBColor(_e[0],_e[1],_e[2]);break;case Q.OPS.setStrokeColorN:this.setStrokeColorN(_e);break;case Q.OPS.setFillColorN:this.setFillColorN(_e);break;case Q.OPS.shadingFill:this.shadingFill(_e[0]);break;case Q.OPS.setDash:this.setDash(_e[0],_e[1]);break;case Q.OPS.setRenderingIntent:this.setRenderingIntent(_e[0]);break;case Q.OPS.setFlatness:this.setFlatness(_e[0]);break;case Q.OPS.setGState:this.setGState(_e[0]);break;case Q.OPS.fill:this.fill();break;case Q.OPS.eoFill:this.eoFill();break;case Q.OPS.stroke:this.stroke();break;case Q.OPS.fillStroke:this.fillStroke();break;case Q.OPS.eoFillStroke:this.eoFillStroke();break;case Q.OPS.clip:this.clip("nonzero");break;case Q.OPS.eoClip:this.clip("evenodd");break;case Q.OPS.paintSolidColorImageMask:this.paintSolidColorImageMask();break;case Q.OPS.paintImageXObject:this.paintImageXObject(_e[0]);break;case Q.OPS.paintInlineImageXObject:this.paintInlineImageXObject(_e[0]);break;case Q.OPS.paintImageMaskXObject:this.paintImageMaskXObject(_e[0]);break;case Q.OPS.paintFormXObjectBegin:this.paintFormXObjectBegin(_e[0],_e[1]);break;case Q.OPS.paintFormXObjectEnd:this.paintFormXObjectEnd();break;case Q.OPS.closePath:this.closePath();break;case Q.OPS.closeStroke:this.closeStroke();break;case Q.OPS.closeFillStroke:this.closeFillStroke();break;case Q.OPS.closeEOFillStroke:this.closeEOFillStroke();break;case Q.OPS.nextLine:this.nextLine();break;case Q.OPS.transform:this.transform(_e[0],_e[1],_e[2],_e[3],_e[4],_e[5]);break;case Q.OPS.constructPath:this.constructPath(_e[0],_e[1]);break;case Q.OPS.endPath:this.endPath();break;case 92:this.group(Wt.items);break;default:(0,Q.warn)("Unimplemented operator ".concat(oe));break}}}catch(err){_iterator97.e(err)}finally{_iterator97.f()}}},{key:"setWordSpacing",value:function setWordSpacing(Bt){this.current.wordSpacing=Bt}},{key:"setCharSpacing",value:function setCharSpacing(Bt){this.current.charSpacing=Bt}},{key:"nextLine",value:function nextLine(){this.moveText(0,this.current.leading)}},{key:"setTextMatrix",value:function setTextMatrix(Bt,Wt,oe,ve,_e,Xe){var He=this.current;He.textMatrix=He.lineMatrix=[Bt,Wt,oe,ve,_e,Xe],He.textMatrixScale=Math.hypot(Bt,Wt),He.x=He.lineX=0,He.y=He.lineY=0,He.xcoords=[],He.ycoords=[],He.tspan=this.svgFactory.createElement("svg:tspan"),He.tspan.setAttributeNS(null,"font-family",He.fontFamily),He.tspan.setAttributeNS(null,"font-size","".concat(Ut(He.fontSize),"px")),He.tspan.setAttributeNS(null,"y",Ut(-He.y)),He.txtElement=this.svgFactory.createElement("svg:text"),He.txtElement.append(He.tspan)}},{key:"beginText",value:function beginText(){var Bt=this.current;Bt.x=Bt.lineX=0,Bt.y=Bt.lineY=0,Bt.textMatrix=Q.IDENTITY_MATRIX,Bt.lineMatrix=Q.IDENTITY_MATRIX,Bt.textMatrixScale=1,Bt.tspan=this.svgFactory.createElement("svg:tspan"),Bt.txtElement=this.svgFactory.createElement("svg:text"),Bt.txtgrp=this.svgFactory.createElement("svg:g"),Bt.xcoords=[],Bt.ycoords=[]}},{key:"moveText",value:function moveText(Bt,Wt){var oe=this.current;oe.x=oe.lineX+=Bt,oe.y=oe.lineY+=Wt,oe.xcoords=[],oe.ycoords=[],oe.tspan=this.svgFactory.createElement("svg:tspan"),oe.tspan.setAttributeNS(null,"font-family",oe.fontFamily),oe.tspan.setAttributeNS(null,"font-size","".concat(Ut(oe.fontSize),"px")),oe.tspan.setAttributeNS(null,"y",Ut(-oe.y))}},{key:"showText",value:function showText(Bt){var Wt=this.current,oe=Wt.font,ve=Wt.fontSize;if(ve===0)return;var _e=Wt.fontSizeScale,Xe=Wt.charSpacing,He=Wt.wordSpacing,ro=Wt.fontDirection,Xo=Wt.textHScale*ro,Se=oe.vertical,xr=Se?1:-1,pr=oe.defaultVMetrics,$e=ve*Wt.fontMatrix[0];var _r=0;var _iterator98=_createForOfIteratorHelper(Bt),_step98;try{for(_iterator98.s();!(_step98=_iterator98.n()).done;){var _bl=_step98.value;if(_bl===null){_r+=ro*He;continue}else if(typeof _bl=="number"){_r+=xr*_bl*ve/1e3;continue}var ol=(_bl.isSpace?He:0)+Xe,Te=_bl.fontChar;var pe=void 0,ue=void 0,se=_bl.width;if(Se){var Ae=void 0;var ze=_bl.vmetric||pr;Ae=_bl.vmetric?ze[1]:se*0.5,Ae=-Ae*$e;var pi=ze[2]*$e;se=ze?-ze[0]:se,pe=Ae/_e,ue=(_r+pi)/_e}else pe=_r/_e,ue=0;(_bl.isInFont||oe.missingFile)&&(Wt.xcoords.push(Wt.x+pe),Se&&Wt.ycoords.push(-Wt.y+ue),Wt.tspan.textContent+=Te);var be=Se?se*$e-ol*ro:se*$e+ol*ro;_r+=be}}catch(err){_iterator98.e(err)}finally{_iterator98.f()}Wt.tspan.setAttributeNS(null,"x",Wt.xcoords.map(Ut).join(" ")),Se?Wt.tspan.setAttributeNS(null,"y",Wt.ycoords.map(Ut).join(" ")):Wt.tspan.setAttributeNS(null,"y",Ut(-Wt.y)),Se?Wt.y-=_r:Wt.x+=_r*Xo,Wt.tspan.setAttributeNS(null,"font-family",Wt.fontFamily),Wt.tspan.setAttributeNS(null,"font-size","".concat(Ut(Wt.fontSize),"px")),Wt.fontStyle!==Y.fontStyle&&Wt.tspan.setAttributeNS(null,"font-style",Wt.fontStyle),Wt.fontWeight!==Y.fontWeight&&Wt.tspan.setAttributeNS(null,"font-weight",Wt.fontWeight);var Ps=Wt.textRenderingMode&Q.TextRenderingMode.FILL_STROKE_MASK;if(Ps===Q.TextRenderingMode.FILL||Ps===Q.TextRenderingMode.FILL_STROKE?(Wt.fillColor!==Y.fillColor&&Wt.tspan.setAttributeNS(null,"fill",Wt.fillColor),Wt.fillAlpha<1&&Wt.tspan.setAttributeNS(null,"fill-opacity",Wt.fillAlpha)):Wt.textRenderingMode===Q.TextRenderingMode.ADD_TO_PATH?Wt.tspan.setAttributeNS(null,"fill","transparent"):Wt.tspan.setAttributeNS(null,"fill","none"),Ps===Q.TextRenderingMode.STROKE||Ps===Q.TextRenderingMode.FILL_STROKE){var bl=1/(Wt.textMatrixScale||1);this._setStrokeAttributes(Wt.tspan,bl)}var qe=Wt.textMatrix;Wt.textRise!==0&&(qe=qe.slice(),qe[5]+=Wt.textRise),Wt.txtElement.setAttributeNS(null,"transform","".concat(te(qe)," scale(").concat(Ut(Xo),", -1)")),Wt.txtElement.setAttributeNS(J,"xml:space","preserve"),Wt.txtElement.append(Wt.tspan),Wt.txtgrp.append(Wt.txtElement),this._ensureTransformGroup().append(Wt.txtElement)}},{key:"setLeadingMoveText",value:function setLeadingMoveText(Bt,Wt){this.setLeading(-Wt),this.moveText(Bt,Wt)}},{key:"addFontStyle",value:function addFontStyle(Bt){if(!Bt.data)throw new Error("addFontStyle: No font data available, ensure that the \"fontExtraProperties\" API parameter is set.");this.cssStyle||(this.cssStyle=this.svgFactory.createElement("svg:style"),this.cssStyle.setAttributeNS(null,"type","text/css"),this.defs.append(this.cssStyle));var Wt=dt(Bt.data,Bt.mimetype,this.forceDataSchema);this.cssStyle.textContent+="@font-face { font-family: \"".concat(Bt.loadedName,"\"; src: url(").concat(Wt,"); }\n")}},{key:"setFont",value:function setFont(Bt){var Wt=this.current,oe=this.commonObjs.get(Bt[0]);var ve=Bt[1];Wt.font=oe,this.embedFonts&&!oe.missingFile&&!this.embeddedFonts[oe.loadedName]&&(this.addFontStyle(oe),this.embeddedFonts[oe.loadedName]=oe),Wt.fontMatrix=oe.fontMatrix||Q.FONT_IDENTITY_MATRIX;var _e="normal";oe.black?_e="900":oe.bold&&(_e="bold");var Xe=oe.italic?"italic":"normal";ve<0?(ve=-ve,Wt.fontDirection=-1):Wt.fontDirection=1,Wt.fontSize=ve,Wt.fontFamily=oe.loadedName,Wt.fontWeight=_e,Wt.fontStyle=Xe,Wt.tspan=this.svgFactory.createElement("svg:tspan"),Wt.tspan.setAttributeNS(null,"y",Ut(-Wt.y)),Wt.xcoords=[],Wt.ycoords=[]}},{key:"endText",value:function endText(){var Bt;var Wt=this.current;Wt.textRenderingMode&Q.TextRenderingMode.ADD_TO_PATH_FLAG&&(Bt=Wt.txtElement)!=null&&Bt.hasChildNodes()&&(Wt.element=Wt.txtElement,this.clip("nonzero"),this.endPath())}},{key:"setLineWidth",value:function setLineWidth(Bt){Bt>0&&(this.current.lineWidth=Bt)}},{key:"setLineCap",value:function setLineCap(Bt){this.current.lineCap=nt[Bt]}},{key:"setLineJoin",value:function setLineJoin(Bt){this.current.lineJoin=ot[Bt]}},{key:"setMiterLimit",value:function setMiterLimit(Bt){this.current.miterLimit=Bt}},{key:"setStrokeAlpha",value:function setStrokeAlpha(Bt){this.current.strokeAlpha=Bt}},{key:"setStrokeRGBColor",value:function setStrokeRGBColor(Bt,Wt,oe){this.current.strokeColor=Q.Util.makeHexColor(Bt,Wt,oe)}},{key:"setFillAlpha",value:function setFillAlpha(Bt){this.current.fillAlpha=Bt}},{key:"setFillRGBColor",value:function setFillRGBColor(Bt,Wt,oe){this.current.fillColor=Q.Util.makeHexColor(Bt,Wt,oe),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}},{key:"setStrokeColorN",value:function setStrokeColorN(Bt){this.current.strokeColor=this._makeColorN_Pattern(Bt)}},{key:"setFillColorN",value:function setFillColorN(Bt){this.current.fillColor=this._makeColorN_Pattern(Bt)}},{key:"shadingFill",value:function shadingFill(Bt){var _this$viewport=this.viewport,Wt=_this$viewport.width,oe=_this$viewport.height,ve=Q.Util.inverseTransform(this.transformMatrix),_Q$Util$getAxialAlign=Q.Util.getAxialAlignedBoundingBox([0,0,Wt,oe],ve),_Q$Util$getAxialAlign2=_slicedToArray(_Q$Util$getAxialAlign,4),_e=_Q$Util$getAxialAlign2[0],Xe=_Q$Util$getAxialAlign2[1],He=_Q$Util$getAxialAlign2[2],ro=_Q$Util$getAxialAlign2[3],Xo=this.svgFactory.createElement("svg:rect");Xo.setAttributeNS(null,"x",_e),Xo.setAttributeNS(null,"y",Xe),Xo.setAttributeNS(null,"width",He-_e),Xo.setAttributeNS(null,"height",ro-Xe),Xo.setAttributeNS(null,"fill",this._makeShadingPattern(Bt)),this.current.fillAlpha<1&&Xo.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().append(Xo)}},{key:"_makeColorN_Pattern",value:function _makeColorN_Pattern(Bt){return Bt[0]==="TilingPattern"?this._makeTilingPattern(Bt):this._makeShadingPattern(Bt)}},{key:"_makeTilingPattern",value:function _makeTilingPattern(Bt){var Wt=Bt[1],oe=Bt[2],ve=Bt[3]||Q.IDENTITY_MATRIX,_Bt$=_slicedToArray(Bt[4],4),_e=_Bt$[0],Xe=_Bt$[1],He=_Bt$[2],ro=_Bt$[3],Xo=Bt[5],Se=Bt[6],xr=Bt[7],pr="shading".concat(re++),_Q$Util$normalizeRect=Q.Util.normalizeRect([].concat(_toConsumableArray(Q.Util.applyTransform([_e,Xe],ve)),_toConsumableArray(Q.Util.applyTransform([He,ro],ve)))),_Q$Util$normalizeRect2=_slicedToArray(_Q$Util$normalizeRect,4),$e=_Q$Util$normalizeRect2[0],_r=_Q$Util$normalizeRect2[1],Ps=_Q$Util$normalizeRect2[2],qe=_Q$Util$normalizeRect2[3],_Q$Util$singularValue=Q.Util.singularValueDecompose2dScale(ve),_Q$Util$singularValue2=_slicedToArray(_Q$Util$singularValue,2),bl=_Q$Util$singularValue2[0],ol=_Q$Util$singularValue2[1],Te=Xo*bl,pe=Se*ol,ue=this.svgFactory.createElement("svg:pattern");ue.setAttributeNS(null,"id",pr),ue.setAttributeNS(null,"patternUnits","userSpaceOnUse"),ue.setAttributeNS(null,"width",Te),ue.setAttributeNS(null,"height",pe),ue.setAttributeNS(null,"x","".concat($e)),ue.setAttributeNS(null,"y","".concat(_r));var se=this.svg,be=this.transformMatrix,Ae=this.current.fillColor,ze=this.current.strokeColor,pi=this.svgFactory.create(Ps-$e,qe-_r);if(this.svg=pi,this.transformMatrix=ve,xr===2){var _Q$Util;var io=(_Q$Util=Q.Util).makeHexColor.apply(_Q$Util,_toConsumableArray(Wt));this.current.fillColor=io,this.current.strokeColor=io}return this.executeOpTree(this.convertOpList(oe)),this.svg=se,this.transformMatrix=be,this.current.fillColor=Ae,this.current.strokeColor=ze,ue.append(pi.childNodes[0]),this.defs.append(ue),"url(#".concat(pr,")")}},{key:"_makeShadingPattern",value:function _makeShadingPattern(Bt){switch(typeof Bt=="string"&&(Bt=this.objs.get(Bt)),Bt[0]){case"RadialAxial":var Wt="shading".concat(re++),oe=Bt[3];var ve;switch(Bt[1]){case"axial":var _e=Bt[4],Xe=Bt[5];ve=this.svgFactory.createElement("svg:linearGradient"),ve.setAttributeNS(null,"id",Wt),ve.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),ve.setAttributeNS(null,"x1",_e[0]),ve.setAttributeNS(null,"y1",_e[1]),ve.setAttributeNS(null,"x2",Xe[0]),ve.setAttributeNS(null,"y2",Xe[1]);break;case"radial":var He=Bt[4],ro=Bt[5],Xo=Bt[6],Se=Bt[7];ve=this.svgFactory.createElement("svg:radialGradient"),ve.setAttributeNS(null,"id",Wt),ve.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),ve.setAttributeNS(null,"cx",ro[0]),ve.setAttributeNS(null,"cy",ro[1]),ve.setAttributeNS(null,"r",Se),ve.setAttributeNS(null,"fx",He[0]),ve.setAttributeNS(null,"fy",He[1]),ve.setAttributeNS(null,"fr",Xo);break;default:throw new Error("Unknown RadialAxial type: ".concat(Bt[1]))}var _iterator99=_createForOfIteratorHelper(oe),_step99;try{for(_iterator99.s();!(_step99=_iterator99.n()).done;){var _e2=_step99.value;var _Xe=this.svgFactory.createElement("svg:stop");_Xe.setAttributeNS(null,"offset",_e2[0]),_Xe.setAttributeNS(null,"stop-color",_e2[1]),ve.append(_Xe)}}catch(err){_iterator99.e(err)}finally{_iterator99.f()}return this.defs.append(ve),"url(#".concat(Wt,")");case"Mesh":return(0,Q.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error("Unknown IR type: ".concat(Bt[0]))}}},{key:"setDash",value:function setDash(Bt,Wt){this.current.dashArray=Bt,this.current.dashPhase=Wt}},{key:"constructPath",value:function constructPath(Bt,Wt){var oe=this.current;var ve=oe.x,_e=oe.y,Xe=[],He=0;var _iterator100=_createForOfIteratorHelper(Bt),_step100;try{for(_iterator100.s();!(_step100=_iterator100.n()).done;){var ro=_step100.value;switch(ro|0){case Q.OPS.rectangle:ve=Wt[He++],_e=Wt[He++];var Xo=Wt[He++],Se=Wt[He++],xr=ve+Xo,pr=_e+Se;Xe.push("M",Ut(ve),Ut(_e),"L",Ut(xr),Ut(_e),"L",Ut(xr),Ut(pr),"L",Ut(ve),Ut(pr),"Z");break;case Q.OPS.moveTo:ve=Wt[He++],_e=Wt[He++],Xe.push("M",Ut(ve),Ut(_e));break;case Q.OPS.lineTo:ve=Wt[He++],_e=Wt[He++],Xe.push("L",Ut(ve),Ut(_e));break;case Q.OPS.curveTo:ve=Wt[He+4],_e=Wt[He+5],Xe.push("C",Ut(Wt[He]),Ut(Wt[He+1]),Ut(Wt[He+2]),Ut(Wt[He+3]),Ut(ve),Ut(_e)),He+=6;break;case Q.OPS.curveTo2:Xe.push("C",Ut(ve),Ut(_e),Ut(Wt[He]),Ut(Wt[He+1]),Ut(Wt[He+2]),Ut(Wt[He+3])),ve=Wt[He+2],_e=Wt[He+3],He+=4;break;case Q.OPS.curveTo3:ve=Wt[He+2],_e=Wt[He+3],Xe.push("C",Ut(Wt[He]),Ut(Wt[He+1]),Ut(ve),Ut(_e),Ut(ve),Ut(_e)),He+=4;break;case Q.OPS.closePath:Xe.push("Z");break}}}catch(err){_iterator100.e(err)}finally{_iterator100.f()}Xe=Xe.join(" "),oe.path&&Bt.length>0&&Bt[0]!==Q.OPS.rectangle&&Bt[0]!==Q.OPS.moveTo?Xe=oe.path.getAttributeNS(null,"d")+Xe:(oe.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().append(oe.path)),oe.path.setAttributeNS(null,"d",Xe),oe.path.setAttributeNS(null,"fill","none"),oe.element=oe.path,oe.setCurrentPoint(ve,_e)}},{key:"endPath",value:function endPath(){var Bt=this.current;if(Bt.path=null,!this.pendingClip)return;if(!Bt.element){this.pendingClip=null;return}var Wt="clippath".concat(qt++),oe=this.svgFactory.createElement("svg:clipPath");oe.setAttributeNS(null,"id",Wt),oe.setAttributeNS(null,"transform",te(this.transformMatrix));var ve=Bt.element.cloneNode(!0);if(this.pendingClip==="evenodd"?ve.setAttributeNS(null,"clip-rule","evenodd"):ve.setAttributeNS(null,"clip-rule","nonzero"),this.pendingClip=null,oe.append(ve),this.defs.append(oe),Bt.activeClipUrl){Bt.clipGroup=null;var _iterator101=_createForOfIteratorHelper(this.extraStack),_step101;try{for(_iterator101.s();!(_step101=_iterator101.n()).done;){var _e=_step101.value;_e.clipGroup=null}}catch(err){_iterator101.e(err)}finally{_iterator101.f()}oe.setAttributeNS(null,"clip-path",Bt.activeClipUrl)}Bt.activeClipUrl="url(#".concat(Wt,")"),this.tgrp=null}},{key:"clip",value:function clip(Bt){this.pendingClip=Bt}},{key:"closePath",value:function closePath(){var Bt=this.current;if(Bt.path){var Wt="".concat(Bt.path.getAttributeNS(null,"d"),"Z");Bt.path.setAttributeNS(null,"d",Wt)}}},{key:"setLeading",value:function setLeading(Bt){this.current.leading=-Bt}},{key:"setTextRise",value:function setTextRise(Bt){this.current.textRise=Bt}},{key:"setTextRenderingMode",value:function setTextRenderingMode(Bt){this.current.textRenderingMode=Bt}},{key:"setHScale",value:function setHScale(Bt){this.current.textHScale=Bt/100}},{key:"setRenderingIntent",value:function setRenderingIntent(Bt){}},{key:"setFlatness",value:function setFlatness(Bt){}},{key:"setGState",value:function setGState(Bt){var _iterator102=_createForOfIteratorHelper(Bt),_step102;try{for(_iterator102.s();!(_step102=_iterator102.n()).done;){var _step102$value=_slicedToArray(_step102.value,2),Wt=_step102$value[0],oe=_step102$value[1];switch(Wt){case"LW":this.setLineWidth(oe);break;case"LC":this.setLineCap(oe);break;case"LJ":this.setLineJoin(oe);break;case"ML":this.setMiterLimit(oe);break;case"D":this.setDash(oe[0],oe[1]);break;case"RI":this.setRenderingIntent(oe);break;case"FL":this.setFlatness(oe);break;case"Font":this.setFont(oe);break;case"CA":this.setStrokeAlpha(oe);break;case"ca":this.setFillAlpha(oe);break;default:(0,Q.warn)("Unimplemented graphic state operator ".concat(Wt));break}}}catch(err){_iterator102.e(err)}finally{_iterator102.f()}}},{key:"fill",value:function fill(){var Bt=this.current;Bt.element&&(Bt.element.setAttributeNS(null,"fill",Bt.fillColor),Bt.element.setAttributeNS(null,"fill-opacity",Bt.fillAlpha),this.endPath())}},{key:"stroke",value:function stroke(){var Bt=this.current;Bt.element&&(this._setStrokeAttributes(Bt.element),Bt.element.setAttributeNS(null,"fill","none"),this.endPath())}},{key:"_setStrokeAttributes",value:function _setStrokeAttributes(Bt){var Wt=arguments.length>1&&arguments[1]!==undefined?arguments[1]:1;var oe=this.current;var ve=oe.dashArray;Wt!==1&&ve.length>0&&(ve=ve.map(function(_e){return Wt*_e})),Bt.setAttributeNS(null,"stroke",oe.strokeColor),Bt.setAttributeNS(null,"stroke-opacity",oe.strokeAlpha),Bt.setAttributeNS(null,"stroke-miterlimit",Ut(oe.miterLimit)),Bt.setAttributeNS(null,"stroke-linecap",oe.lineCap),Bt.setAttributeNS(null,"stroke-linejoin",oe.lineJoin),Bt.setAttributeNS(null,"stroke-width",Ut(Wt*oe.lineWidth)+"px"),Bt.setAttributeNS(null,"stroke-dasharray",ve.map(Ut).join(" ")),Bt.setAttributeNS(null,"stroke-dashoffset",Ut(Wt*oe.dashPhase)+"px")}},{key:"eoFill",value:function eoFill(){var Bt;(Bt=this.current.element)==null||Bt.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}},{key:"fillStroke",value:function fillStroke(){this.stroke(),this.fill()}},{key:"eoFillStroke",value:function eoFillStroke(){var Bt;(Bt=this.current.element)==null||Bt.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}},{key:"closeStroke",value:function closeStroke(){this.closePath(),this.stroke()}},{key:"closeFillStroke",value:function closeFillStroke(){this.closePath(),this.fillStroke()}},{key:"closeEOFillStroke",value:function closeEOFillStroke(){this.closePath(),this.eoFillStroke()}},{key:"paintSolidColorImageMask",value:function paintSolidColorImageMask(){var Bt=this.svgFactory.createElement("svg:rect");Bt.setAttributeNS(null,"x","0"),Bt.setAttributeNS(null,"y","0"),Bt.setAttributeNS(null,"width","1px"),Bt.setAttributeNS(null,"height","1px"),Bt.setAttributeNS(null,"fill",this.current.fillColor),this._ensureTransformGroup().append(Bt)}},{key:"paintImageXObject",value:function paintImageXObject(Bt){var Wt=this.getObject(Bt);if(!Wt){(0,Q.warn)("Dependent image with object ID ".concat(Bt," is not ready yet"));return}this.paintInlineImageXObject(Wt)}},{key:"paintInlineImageXObject",value:function paintInlineImageXObject(Bt,Wt){var oe=Bt.width,ve=Bt.height,_e=Mt(Bt,this.forceDataSchema,!!Wt),Xe=this.svgFactory.createElement("svg:rect");Xe.setAttributeNS(null,"x","0"),Xe.setAttributeNS(null,"y","0"),Xe.setAttributeNS(null,"width",Ut(oe)),Xe.setAttributeNS(null,"height",Ut(ve)),this.current.element=Xe,this.clip("nonzero");var He=this.svgFactory.createElement("svg:image");He.setAttributeNS(it,"xlink:href",_e),He.setAttributeNS(null,"x","0"),He.setAttributeNS(null,"y",Ut(-ve)),He.setAttributeNS(null,"width",Ut(oe)+"px"),He.setAttributeNS(null,"height",Ut(ve)+"px"),He.setAttributeNS(null,"transform","scale(".concat(Ut(1/oe)," ").concat(Ut(-1/ve),")")),Wt?Wt.append(He):this._ensureTransformGroup().append(He)}},{key:"paintImageMaskXObject",value:function paintImageMaskXObject(Bt){var Wt=this.getObject(Bt.data,Bt);if(Wt.bitmap){(0,Q.warn)("paintImageMaskXObject: ImageBitmap support is not implemented, ensure that the `isOffscreenCanvasSupported` API parameter is disabled.");return}var oe=this.current,ve=Wt.width,_e=Wt.height,Xe=oe.fillColor;oe.maskId="mask".concat(ie++);var He=this.svgFactory.createElement("svg:mask");He.setAttributeNS(null,"id",oe.maskId);var ro=this.svgFactory.createElement("svg:rect");ro.setAttributeNS(null,"x","0"),ro.setAttributeNS(null,"y","0"),ro.setAttributeNS(null,"width",Ut(ve)),ro.setAttributeNS(null,"height",Ut(_e)),ro.setAttributeNS(null,"fill",Xe),ro.setAttributeNS(null,"mask","url(#".concat(oe.maskId,")")),this.defs.append(He),this._ensureTransformGroup().append(ro),this.paintInlineImageXObject(Wt,He)}},{key:"paintFormXObjectBegin",value:function paintFormXObjectBegin(Bt,Wt){if(Array.isArray(Bt)&&Bt.length===6&&this.transform(Bt[0],Bt[1],Bt[2],Bt[3],Bt[4],Bt[5]),Wt){var oe=Wt[2]-Wt[0],ve=Wt[3]-Wt[1],_e=this.svgFactory.createElement("svg:rect");_e.setAttributeNS(null,"x",Wt[0]),_e.setAttributeNS(null,"y",Wt[1]),_e.setAttributeNS(null,"width",Ut(oe)),_e.setAttributeNS(null,"height",Ut(ve)),this.current.element=_e,this.clip("nonzero"),this.endPath()}}},{key:"paintFormXObjectEnd",value:function paintFormXObjectEnd(){}},{key:"_initialize",value:function _initialize(Bt){var Wt=this.svgFactory.create(Bt.width,Bt.height),oe=this.svgFactory.createElement("svg:defs");Wt.append(oe),this.defs=oe;var ve=this.svgFactory.createElement("svg:g");return ve.setAttributeNS(null,"transform",te(Bt.transform)),Wt.append(ve),this.svg=ve,Wt}},{key:"_ensureClipGroup",value:function _ensureClipGroup(){if(!this.current.clipGroup){var Bt=this.svgFactory.createElement("svg:g");Bt.setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.append(Bt),this.current.clipGroup=Bt}return this.current.clipGroup}},{key:"_ensureTransformGroup",value:function _ensureTransformGroup(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",te(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().append(this.tgrp):this.svg.append(this.tgrp)),this.tgrp}}]);return ne}();o.SVGGraphics=ne},function(r,o){Object.defineProperty(o,"__esModule",{value:!0}),o.XfaText=void 0;var s=function(){function s(){_classCallCheck(this,s)}_createClass(s,null,[{key:"textContent",value:function textContent(Q){var Y=[],J={items:Y,styles:Object.create(null)};function it(nt){var ot;if(!nt)return;var dt=null;var Mt=nt.name;if(Mt==="#text")dt=nt.value;else if(s.shouldBuildText(Mt))(ot=nt==null?void 0:nt.attributes)!=null&&ot.textContent?dt=nt.attributes.textContent:nt.value&&(dt=nt.value);else return;if(dt!==null&&Y.push({str:dt}),!!nt.children){var _iterator103=_createForOfIteratorHelper(nt.children),_step103;try{for(_iterator103.s();!(_step103=_iterator103.n()).done;){var Ot=_step103.value;it(Ot)}}catch(err){_iterator103.e(err)}finally{_iterator103.f()}}}return it(Q),J}},{key:"shouldBuildText",value:function shouldBuildText(Q){return!(Q==="textarea"||Q==="input"||Q==="option"||Q==="select")}}]);return s}();o.XfaText=s},function(r,o,s){Object.defineProperty(o,"__esModule",{value:!0}),o.TextLayerRenderTask=void 0,o.renderTextLayer=te,o.updateTextLayer=qt;var B=s(1),Q=s(6);var Y=1e5,J=30,it=0.8,nt=new Map;function ot(ie,re){var ne;if(re&&B.FeatureTest.isOffscreenCanvasSupported)ne=new OffscreenCanvas(ie,ie).getContext("2d",{alpha:!1});else{var ae=document.createElement("canvas");ae.width=ae.height=ie,ne=ae.getContext("2d",{alpha:!1})}return ne}function dt(ie,re){var ne=nt.get(ie);if(ne)return ne;var ae=ot(J,re);ae.font="".concat(J,"px ").concat(ie);var Bt=ae.measureText("");var Wt=Bt.fontBoundingBoxAscent,oe=Math.abs(Bt.fontBoundingBoxDescent);if(Wt){var _e=Wt/(Wt+oe);return nt.set(ie,_e),ae.canvas.width=ae.canvas.height=0,_e}ae.strokeStyle="red",ae.clearRect(0,0,J,J),ae.strokeText("g",0,0);var ve=ae.getImageData(0,0,J,J).data;oe=0;for(var _e3=ve.length-1-3;_e3>=0;_e3-=4)if(ve[_e3]>0){oe=Math.ceil(_e3/4/J);break}ae.clearRect(0,0,J,J),ae.strokeText("A",0,J),ve=ae.getImageData(0,0,J,J).data,Wt=0;for(var _e4=0,Xe=ve.length;_e4<Xe;_e4+=4)if(ve[_e4]>0){Wt=J-Math.floor(_e4/4/J);break}if(ae.canvas.width=ae.canvas.height=0,Wt){var _e5=Wt/(Wt+oe);return nt.set(ie,_e5),_e5}return nt.set(ie,it),it}function Mt(ie,re,ne){var ae=document.createElement("span"),Bt={angle:0,canvasWidth:0,hasText:re.str!=="",hasEOL:re.hasEOL,fontSize:0};ie._textDivs.push(ae);var Wt=B.Util.transform(ie._transform,re.transform);var oe=Math.atan2(Wt[1],Wt[0]);var ve=ne[re.fontName];ve.vertical&&(oe+=Math.PI/2);var _e=Math.hypot(Wt[2],Wt[3]),Xe=_e*dt(ve.fontFamily,ie._isOffscreenCanvasSupported);var He,ro;oe===0?(He=Wt[4],ro=Wt[5]-Xe):(He=Wt[4]+Xe*Math.sin(oe),ro=Wt[5]-Xe*Math.cos(oe));var Xo="calc(var(--scale-factor)*",Se=ae.style;ie._container===ie._rootContainer?(Se.left="".concat((100*He/ie._pageWidth).toFixed(2),"%"),Se.top="".concat((100*ro/ie._pageHeight).toFixed(2),"%")):(Se.left="".concat(Xo).concat(He.toFixed(2),"px)"),Se.top="".concat(Xo).concat(ro.toFixed(2),"px)")),Se.fontSize="".concat(Xo).concat(_e.toFixed(2),"px)"),Se.fontFamily=ve.fontFamily,Bt.fontSize=_e,ae.setAttribute("role","presentation"),ae.textContent=re.str,ae.dir=re.dir,ie._fontInspectorEnabled&&(ae.dataset.fontName=re.fontName),oe!==0&&(Bt.angle=oe*(180/Math.PI));var xr=!1;if(re.str.length>1)xr=!0;else if(re.str!==" "&&re.transform[0]!==re.transform[3]){var pr=Math.abs(re.transform[0]),$e=Math.abs(re.transform[3]);pr!==$e&&Math.max(pr,$e)/Math.min(pr,$e)>1.5&&(xr=!0)}xr&&(Bt.canvasWidth=ve.vertical?re.height:re.width),ie._textDivProperties.set(ae,Bt),ie._isReadableStream&&ie._layoutText(ae)}function Ot(ie){var re=ie.div,ne=ie.scale,ae=ie.properties,Bt=ie.ctx,Wt=ie.prevFontSize,oe=ie.prevFontFamily,ve=re.style;var _e="";if(ae.canvasWidth!==0&&ae.hasText){var Xe=ve.fontFamily,He=ae.canvasWidth,ro=ae.fontSize;(Wt!==ro||oe!==Xe)&&(Bt.font="".concat(ro*ne,"px ").concat(Xe),ie.prevFontSize=ro,ie.prevFontFamily=Xe);var _Bt$measureText=Bt.measureText(re.textContent),Xo=_Bt$measureText.width;Xo>0&&(_e="scaleX(".concat(He*ne/Xo,")"))}ae.angle!==0&&(_e="rotate(".concat(ae.angle,"deg) ").concat(_e)),_e.length>0&&(ve.transform=_e)}function Qt(ie){if(ie._canceled)return;var re=ie._textDivs,ne=ie._capability;if(re.length>Y){ne.resolve();return}if(!ie._isReadableStream){var _iterator104=_createForOfIteratorHelper(re),_step104;try{for(_iterator104.s();!(_step104=_iterator104.n()).done;){var ae=_step104.value;ie._layoutText(ae)}}catch(err){_iterator104.e(err)}finally{_iterator104.f()}}ne.resolve()}var Ut=function(){function Ut(_ref74){var _this57=this;var re=_ref74.textContentSource,ne=_ref74.container,ae=_ref74.viewport,Bt=_ref74.textDivs,Wt=_ref74.textDivProperties,oe=_ref74.textContentItemsStr,ve=_ref74.isOffscreenCanvasSupported;_classCallCheck(this,Ut);var _e;this._textContentSource=re,this._isReadableStream=re instanceof ReadableStream,this._container=this._rootContainer=ne,this._textDivs=Bt||[],this._textContentItemsStr=oe||[],this._isOffscreenCanvasSupported=ve,this._fontInspectorEnabled=!!((_e=globalThis.FontInspector)!=null&&_e.enabled),this._reader=null,this._textDivProperties=Wt||new WeakMap,this._canceled=!1,this._capability=new B.PromiseCapability,this._layoutTextParams={prevFontSize:null,prevFontFamily:null,div:null,scale:ae.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:ot(0,ve)};var _ae$rawDims=ae.rawDims,Xe=_ae$rawDims.pageWidth,He=_ae$rawDims.pageHeight,ro=_ae$rawDims.pageX,Xo=_ae$rawDims.pageY;this._transform=[1,0,0,-1,-ro,Xo+He],this._pageWidth=Xe,this._pageHeight=He,(0,Q.setLayerDimensions)(ne,ae),this._capability.promise["finally"](function(){_this57._layoutTextParams=null})["catch"](function(){})}_createClass(Ut,[{key:"promise",get:function get(){return this._capability.promise}},{key:"cancel",value:function cancel(){this._canceled=!0,this._reader&&(this._reader.cancel(new B.AbortException("TextLayer task cancelled."))["catch"](function(){}),this._reader=null),this._capability.reject(new B.AbortException("TextLayer task cancelled."))}},{key:"_processItems",value:function _processItems(re,ne){var _iterator105=_createForOfIteratorHelper(re),_step105;try{for(_iterator105.s();!(_step105=_iterator105.n()).done;){var ae=_step105.value;if(ae.str===void 0){if(ae.type==="beginMarkedContentProps"||ae.type==="beginMarkedContent"){var Bt=this._container;this._container=document.createElement("span"),this._container.classList.add("markedContent"),ae.id!==null&&this._container.setAttribute("id","".concat(ae.id)),Bt.append(this._container)}else ae.type==="endMarkedContent"&&(this._container=this._container.parentNode);continue}this._textContentItemsStr.push(ae.str),Mt(this,ae,ne)}}catch(err){_iterator105.e(err)}finally{_iterator105.f()}}},{key:"_layoutText",value:function _layoutText(re){var ne=this._layoutTextParams.properties=this._textDivProperties.get(re);if(this._layoutTextParams.div=re,Ot(this._layoutTextParams),ne.hasText&&this._container.append(re),ne.hasEOL){var ae=document.createElement("br");ae.setAttribute("role","presentation"),this._container.append(ae)}}},{key:"_render",value:function _render(){var _this58=this;var re=new B.PromiseCapability;var ne=Object.create(null);if(this._isReadableStream){var ae=function ae(){_this58._reader.read().then(function(_ref75){var Bt=_ref75.value,Wt=_ref75.done;if(Wt){re.resolve();return}Object.assign(ne,Bt.styles),_this58._processItems(Bt.items,ne),ae()},re.reject)};this._reader=this._textContentSource.getReader(),ae()}else if(this._textContentSource){var _this$_textContentSou=this._textContentSource,_ae5=_this$_textContentSou.items,Bt=_this$_textContentSou.styles;this._processItems(_ae5,Bt),re.resolve()}else throw new Error("No \"textContentSource\" parameter specified.");re.promise.then(function(){ne=null,Qt(_this58)},this._capability.reject)}}]);return Ut}();o.TextLayerRenderTask=Ut;function te(ie){!ie.textContentSource&&(ie.textContent||ie.textContentStream)&&((0,Q.deprecated)("The TextLayerRender `textContent`/`textContentStream` parameters will be removed in the future, please use `textContentSource` instead."),ie.textContentSource=ie.textContent||ie.textContentStream);var re=ie.container,ne=ie.viewport,ae=getComputedStyle(re),Bt=ae.getPropertyValue("visibility"),Wt=parseFloat(ae.getPropertyValue("--scale-factor"));Bt==="visible"&&(!Wt||Math.abs(Wt-ne.scale)>1e-5)&&console.error("The `--scale-factor` CSS-variable must be set, to the same value as `viewport.scale`, either on the `container`-element itself or higher up in the DOM.");var oe=new Ut(ie);return oe._render(),oe}function qt(_ref76){var ie=_ref76.container,re=_ref76.viewport,ne=_ref76.textDivs,ae=_ref76.textDivProperties,Bt=_ref76.isOffscreenCanvasSupported,_ref76$mustRotate=_ref76.mustRotate,Wt=_ref76$mustRotate===void 0?!0:_ref76$mustRotate,_ref76$mustRescale=_ref76.mustRescale,oe=_ref76$mustRescale===void 0?!0:_ref76$mustRescale;if(Wt&&(0,Q.setLayerDimensions)(ie,{rotation:re.rotation}),oe){var ve=ot(0,Bt),_e={prevFontSize:null,prevFontFamily:null,div:null,scale:re.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:ve};var _iterator106=_createForOfIteratorHelper(ne),_step106;try{for(_iterator106.s();!(_step106=_iterator106.n()).done;){var Xe=_step106.value;_e.properties=ae.get(Xe),_e.div=Xe,Ot(_e)}}catch(err){_iterator106.e(err)}finally{_iterator106.f()}}}},function(r,o,s){var B,Q,Y,J,it,nt,ot,dt,Mt,Ot,Qt,Ut,te,qt,ie,re,ne,ae;Object.defineProperty(o,"__esModule",{value:!0}),o.AnnotationEditorLayer=void 0;var Bt=s(1),Wt=s(4),oe=s(28),ve=s(33),_e=s(6),Xe=s(34);var He=function(){function Am(_ref77){var Se=_ref77.uiManager,xr=_ref77.pageIndex,pr=_ref77.div,$e=_ref77.accessibilityManager,_r=_ref77.annotationLayer,Ps=_ref77.viewport,qe=_ref77.l10n;_classCallCheck(this,Am);I(this,Qt),I(this,te),I(this,ie),I(this,ne),I(this,B,void 0),I(this,Q,!1),I(this,Y,null),I(this,J,this.pointerup.bind(this)),I(this,it,this.pointerdown.bind(this)),I(this,nt,new Map),I(this,ot,!1),I(this,dt,!1),I(this,Mt,!1),I(this,Ot,void 0);var bl=[oe.FreeTextEditor,ve.InkEditor,Xe.StampEditor];if(!Am._initialized){Am._initialized=!0;var _iterator107=_createForOfIteratorHelper(bl),_step107;try{for(_iterator107.s();!(_step107=_iterator107.n()).done;){var ol=_step107.value;ol.initialize(qe)}}catch(err){_iterator107.e(err)}finally{_iterator107.f()}}Se.registerEditorTypes(bl),Z(this,Ot,Se),this.pageIndex=xr,this.div=pr,Z(this,B,$e),Z(this,Y,_r),this.viewport=Ps,t$1(this,Ot).addLayer(this)}_createClass(Am,[{key:"isEmpty",get:function get(){return t$1(this,nt).size===0}},{key:"updateToolbar",value:function updateToolbar(Se){t$1(this,Ot).updateToolbar(Se)}},{key:"updateMode",value:function updateMode(){var Se=arguments.length>0&&arguments[0]!==undefined?arguments[0]:t$1(this,Ot).getMode();W(this,ne,ae).call(this),Se===Bt.AnnotationEditorType.INK?(this.addInkEditorIfNeeded(!1),this.disableClick()):this.enableClick(),Se!==Bt.AnnotationEditorType.NONE&&(this.div.classList.toggle("freeTextEditing",Se===Bt.AnnotationEditorType.FREETEXT),this.div.classList.toggle("inkEditing",Se===Bt.AnnotationEditorType.INK),this.div.classList.toggle("stampEditing",Se===Bt.AnnotationEditorType.STAMP),this.div.hidden=!1)}},{key:"addInkEditorIfNeeded",value:function addInkEditorIfNeeded(Se){if(!(!Se&&t$1(this,Ot).getMode()!==Bt.AnnotationEditorType.INK)){if(!Se){var _iterator108=_createForOfIteratorHelper(t$1(this,nt).values()),_step108;try{for(_iterator108.s();!(_step108=_iterator108.n()).done;){var xr=_step108.value;if(xr.isEmpty()){xr.setInBackground();return}}}catch(err){_iterator108.e(err)}finally{_iterator108.f()}}W(this,te,qt).call(this,{offsetX:0,offsetY:0},!1).setInBackground()}}},{key:"setEditingState",value:function setEditingState(Se){t$1(this,Ot).setEditingState(Se)}},{key:"addCommands",value:function addCommands(Se){t$1(this,Ot).addCommands(Se)}},{key:"enable",value:function enable(){this.div.style.pointerEvents="auto";var Se=new Set;var _iterator109=_createForOfIteratorHelper(t$1(this,nt).values()),_step109;try{for(_iterator109.s();!(_step109=_iterator109.n()).done;){var pr=_step109.value;pr.enableEditing(),pr.annotationElementId&&Se.add(pr.annotationElementId)}}catch(err){_iterator109.e(err)}finally{_iterator109.f()}if(!t$1(this,Y))return;var xr=t$1(this,Y).getEditableAnnotations();var _iterator110=_createForOfIteratorHelper(xr),_step110;try{for(_iterator110.s();!(_step110=_iterator110.n()).done;){var _pr=_step110.value;if(_pr.hide(),t$1(this,Ot).isDeletedAnnotationElement(_pr.data.id)||Se.has(_pr.data.id))continue;var $e=this.deserialize(_pr);$e&&(this.addOrRebuild($e),$e.enableEditing())}}catch(err){_iterator110.e(err)}finally{_iterator110.f()}}},{key:"disable",value:function disable(){var Se;Z(this,Mt,!0),this.div.style.pointerEvents="none";var xr=new Set;var _iterator111=_createForOfIteratorHelper(t$1(this,nt).values()),_step111;try{for(_iterator111.s();!(_step111=_iterator111.n()).done;){var _pr2=_step111.value;if(_pr2.disableEditing(),!_pr2.annotationElementId||_pr2.serialize()!==null){xr.add(_pr2.annotationElementId);continue}(Se=this.getEditableAnnotation(_pr2.annotationElementId))==null||Se.show(),_pr2.remove()}}catch(err){_iterator111.e(err)}finally{_iterator111.f()}if(t$1(this,Y)){var pr=t$1(this,Y).getEditableAnnotations();var _iterator112=_createForOfIteratorHelper(pr),_step112;try{for(_iterator112.s();!(_step112=_iterator112.n()).done;){var $e=_step112.value;var _r=$e.data.id;xr.has(_r)||t$1(this,Ot).isDeletedAnnotationElement(_r)||$e.show()}}catch(err){_iterator112.e(err)}finally{_iterator112.f()}}W(this,ne,ae).call(this),this.isEmpty&&(this.div.hidden=!0),Z(this,Mt,!1)}},{key:"getEditableAnnotation",value:function getEditableAnnotation(Se){var xr;return((xr=t$1(this,Y))==null?void 0:xr.getEditableAnnotation(Se))||null}},{key:"setActiveEditor",value:function setActiveEditor(Se){t$1(this,Ot).getActive()!==Se&&t$1(this,Ot).setActiveEditor(Se)}},{key:"enableClick",value:function enableClick(){this.div.addEventListener("pointerdown",t$1(this,it)),this.div.addEventListener("pointerup",t$1(this,J))}},{key:"disableClick",value:function disableClick(){this.div.removeEventListener("pointerdown",t$1(this,it)),this.div.removeEventListener("pointerup",t$1(this,J))}},{key:"attach",value:function attach(Se){t$1(this,nt).set(Se.id,Se);var xr=Se.annotationElementId;xr&&t$1(this,Ot).isDeletedAnnotationElement(xr)&&t$1(this,Ot).removeDeletedAnnotationElement(Se)}},{key:"detach",value:function detach(Se){var xr;t$1(this,nt)["delete"](Se.id),(xr=t$1(this,B))==null||xr.removePointerInTextLayer(Se.contentDiv),!t$1(this,Mt)&&Se.annotationElementId&&t$1(this,Ot).addDeletedAnnotationElement(Se)}},{key:"remove",value:function remove(Se){var _this59=this;this.detach(Se),t$1(this,Ot).removeEditor(Se),Se.div.contains(document.activeElement)&&setTimeout(function(){t$1(_this59,Ot).focusMainContainer()},0),Se.div.remove(),Se.isAttachedToDOM=!1,t$1(this,dt)||this.addInkEditorIfNeeded(!1)}},{key:"changeParent",value:function changeParent(Se){var xr;Se.parent!==this&&(Se.annotationElementId&&(t$1(this,Ot).addDeletedAnnotationElement(Se.annotationElementId),Wt.AnnotationEditor.deleteAnnotationElement(Se),Se.annotationElementId=null),this.attach(Se),(xr=Se.parent)==null||xr.detach(Se),Se.setParent(this),Se.div&&Se.isAttachedToDOM&&(Se.div.remove(),this.div.append(Se.div)))}},{key:"add",value:function add(Se){if(this.changeParent(Se),t$1(this,Ot).addEditor(Se),this.attach(Se),!Se.isAttachedToDOM){var xr=Se.render();this.div.append(xr),Se.isAttachedToDOM=!0}Se.fixAndSetPosition(),Se.onceAdded(),t$1(this,Ot).addToAnnotationStorage(Se)}},{key:"moveEditorInDOM",value:function moveEditorInDOM(Se){var xr;if(!Se.isAttachedToDOM)return;var _document3=document,pr=_document3.activeElement;Se.div.contains(pr)&&(Se._focusEventsAllowed=!1,setTimeout(function(){Se.div.contains(document.activeElement)?Se._focusEventsAllowed=!0:(Se.div.addEventListener("focusin",function(){Se._focusEventsAllowed=!0},{once:!0}),pr.focus())},0)),Se._structTreeParentId=(xr=t$1(this,B))==null?void 0:xr.moveElementInDOM(this.div,Se.div,Se.contentDiv,!0)}},{key:"addOrRebuild",value:function addOrRebuild(Se){Se.needsToBeRebuilt()?Se.rebuild():this.add(Se)}},{key:"addUndoableEditor",value:function addUndoableEditor(Se){var xr=function xr(){return Se._uiManager.rebuild(Se)},pr=function pr(){Se.remove()};this.addCommands({cmd:xr,undo:pr,mustExec:!1})}},{key:"getNextId",value:function getNextId(){return t$1(this,Ot).getId()}},{key:"pasteEditor",value:function pasteEditor(Se,xr){t$1(this,Ot).updateToolbar(Se),t$1(this,Ot).updateMode(Se);var _W$call5=W(this,ie,re).call(this),pr=_W$call5.offsetX,$e=_W$call5.offsetY,_r=this.getNextId(),Ps=W(this,Qt,Ut).call(this,_objectSpread({parent:this,id:_r,x:pr,y:$e,uiManager:t$1(this,Ot),isCentered:!0},xr));Ps&&this.add(Ps)}},{key:"deserialize",value:function deserialize(Se){var _Se$annotationType;switch((_Se$annotationType=Se.annotationType)!==null&&_Se$annotationType!==void 0?_Se$annotationType:Se.annotationEditorType){case Bt.AnnotationEditorType.FREETEXT:return oe.FreeTextEditor.deserialize(Se,this,t$1(this,Ot));case Bt.AnnotationEditorType.INK:return ve.InkEditor.deserialize(Se,this,t$1(this,Ot));case Bt.AnnotationEditorType.STAMP:return Xe.StampEditor.deserialize(Se,this,t$1(this,Ot))}return null}},{key:"addNewEditor",value:function addNewEditor(){W(this,te,qt).call(this,W(this,ie,re).call(this),!0)}},{key:"setSelected",value:function setSelected(Se){t$1(this,Ot).setSelected(Se)}},{key:"toggleSelected",value:function toggleSelected(Se){t$1(this,Ot).toggleSelected(Se)}},{key:"isSelected",value:function isSelected(Se){return t$1(this,Ot).isSelected(Se)}},{key:"unselect",value:function unselect(Se){t$1(this,Ot).unselect(Se)}},{key:"pointerup",value:function pointerup(Se){var xr=Bt.FeatureTest.platform.isMac;if(!(Se.button!==0||Se.ctrlKey&&xr)&&Se.target===this.div&&t$1(this,ot)){if(Z(this,ot,!1),!t$1(this,Q)){Z(this,Q,!0);return}if(t$1(this,Ot).getMode()===Bt.AnnotationEditorType.STAMP){t$1(this,Ot).unselectAll();return}W(this,te,qt).call(this,Se,!1)}}},{key:"pointerdown",value:function pointerdown(Se){if(t$1(this,ot)){Z(this,ot,!1);return}var xr=Bt.FeatureTest.platform.isMac;if(Se.button!==0||Se.ctrlKey&&xr||Se.target!==this.div)return;Z(this,ot,!0);var pr=t$1(this,Ot).getActive();Z(this,Q,!pr||pr.isEmpty())}},{key:"findNewParent",value:function findNewParent(Se,xr,pr){var $e=t$1(this,Ot).findParent(xr,pr);return $e===null||$e===this?!1:($e.changeParent(Se),!0)}},{key:"destroy",value:function destroy(){var Se,xr;((Se=t$1(this,Ot).getActive())==null?void 0:Se.parent)===this&&(t$1(this,Ot).commitOrRemove(),t$1(this,Ot).setActiveEditor(null));var _iterator113=_createForOfIteratorHelper(t$1(this,nt).values()),_step113;try{for(_iterator113.s();!(_step113=_iterator113.n()).done;){var pr=_step113.value;(xr=t$1(this,B))==null||xr.removePointerInTextLayer(pr.contentDiv),pr.setParent(null),pr.isAttachedToDOM=!1,pr.div.remove()}}catch(err){_iterator113.e(err)}finally{_iterator113.f()}this.div=null,t$1(this,nt).clear(),t$1(this,Ot).removeLayer(this)}},{key:"render",value:function render(_ref78){var Se=_ref78.viewport;this.viewport=Se,(0,_e.setLayerDimensions)(this.div,Se);var _iterator114=_createForOfIteratorHelper(t$1(this,Ot).getEditors(this.pageIndex)),_step114;try{for(_iterator114.s();!(_step114=_iterator114.n()).done;){var xr=_step114.value;this.add(xr)}}catch(err){_iterator114.e(err)}finally{_iterator114.f()}this.updateMode()}},{key:"update",value:function update(_ref79){var Se=_ref79.viewport;t$1(this,Ot).commitOrRemove(),this.viewport=Se,(0,_e.setLayerDimensions)(this.div,{rotation:Se.rotation}),this.updateMode()}},{key:"pageDimensions",get:function get(){var _this$viewport$rawDim=this.viewport.rawDims,Se=_this$viewport$rawDim.pageWidth,xr=_this$viewport$rawDim.pageHeight;return[Se,xr]}}]);return Am}();B=new WeakMap,Q=new WeakMap,Y=new WeakMap,J=new WeakMap,it=new WeakMap,nt=new WeakMap,ot=new WeakMap,dt=new WeakMap,Mt=new WeakMap,Ot=new WeakMap,Qt=new WeakSet,Ut=function Ut(Xo){switch(t$1(this,Ot).getMode()){case Bt.AnnotationEditorType.FREETEXT:return new oe.FreeTextEditor(Xo);case Bt.AnnotationEditorType.INK:return new ve.InkEditor(Xo);case Bt.AnnotationEditorType.STAMP:return new Xe.StampEditor(Xo)}return null},te=new WeakSet,qt=function qt(Xo,Se){var xr=this.getNextId(),pr=W(this,Qt,Ut).call(this,{parent:this,id:xr,x:Xo.offsetX,y:Xo.offsetY,uiManager:t$1(this,Ot),isCentered:Se});return pr&&this.add(pr),pr},ie=new WeakSet,re=function re(){var _this$div$getBounding2=this.div.getBoundingClientRect(),Xo=_this$div$getBounding2.x,Se=_this$div$getBounding2.y,xr=_this$div$getBounding2.width,pr=_this$div$getBounding2.height,$e=Math.max(0,Xo),_r=Math.max(0,Se),Ps=Math.min(window.innerWidth,Xo+xr),qe=Math.min(window.innerHeight,Se+pr),bl=($e+Ps)/2-Xo,ol=(_r+qe)/2-Se,_ref80=this.viewport.rotation%180===0?[bl,ol]:[ol,bl],_ref81=_slicedToArray(_ref80,2),Te=_ref81[0],pe=_ref81[1];return{offsetX:Te,offsetY:pe}},ne=new WeakSet,ae=function ae(){Z(this,dt,!0);var _iterator115=_createForOfIteratorHelper(t$1(this,nt).values()),_step115;try{for(_iterator115.s();!(_step115=_iterator115.n()).done;){var Xo=_step115.value;Xo.isEmpty()&&Xo.remove()}}catch(err){_iterator115.e(err)}finally{_iterator115.f()}Z(this,dt,!1)},ee(He,"_initialized",!1);var ro=He;o.AnnotationEditorLayer=ro},function(r,o,s){var B,Q,Y,J,it,nt,ot,dt,Mt,Ot,Qt,Ut,te,qt,ie,re,ne,ae,Bt,Wt,oe,ve,_e6;Object.defineProperty(o,"__esModule",{value:!0}),o.FreeTextEditor=void 0;var Xe=s(1),He=s(5),ro=s(4),Xo=s(29);var Se=function(_ro$AnnotationEditor){_inherits(fm,_ro$AnnotationEditor);function fm($e){var _this60;_classCallCheck(this,fm);_this60=_callSuper(this,fm,[_objectSpread(_objectSpread({},$e),{},{name:"freeTextEditor"})]),I(_assertThisInitialized(_this60),Ot),I(_assertThisInitialized(_this60),Ut),I(_assertThisInitialized(_this60),qt),I(_assertThisInitialized(_this60),re),I(_assertThisInitialized(_this60),ae),I(_assertThisInitialized(_this60),Wt),I(_assertThisInitialized(_this60),ve),I(_assertThisInitialized(_this60),B,_this60.editorDivBlur.bind(_assertThisInitialized(_this60))),I(_assertThisInitialized(_this60),Q,_this60.editorDivFocus.bind(_assertThisInitialized(_this60))),I(_assertThisInitialized(_this60),Y,_this60.editorDivInput.bind(_assertThisInitialized(_this60))),I(_assertThisInitialized(_this60),J,_this60.editorDivKeydown.bind(_assertThisInitialized(_this60))),I(_assertThisInitialized(_this60),it,void 0),I(_assertThisInitialized(_this60),nt,""),I(_assertThisInitialized(_this60),ot,"".concat(_this60.id,"-editor")),I(_assertThisInitialized(_this60),dt,void 0),I(_assertThisInitialized(_this60),Mt,null),Z(_assertThisInitialized(_this60),it,$e.color||fm._defaultColor||ro.AnnotationEditor._defaultLineColor),Z(_assertThisInitialized(_this60),dt,$e.fontSize||fm._defaultFontSize);return _this60}_createClass(fm,[{key:"updateParams",value:function updateParams($e,_r){switch($e){case Xe.AnnotationEditorParamsType.FREETEXT_SIZE:W(this,Ot,Qt).call(this,_r);break;case Xe.AnnotationEditorParamsType.FREETEXT_COLOR:W(this,Ut,te).call(this,_r);break}}},{key:"propertiesToUpdate",get:function get(){return[[Xe.AnnotationEditorParamsType.FREETEXT_SIZE,t$1(this,dt)],[Xe.AnnotationEditorParamsType.FREETEXT_COLOR,t$1(this,it)]]}},{key:"_translateEmpty",value:function _translateEmpty($e,_r){this._uiManager.translateSelectedEditors($e,_r,!0)}},{key:"getInitialTranslation",value:function getInitialTranslation(){var $e=this.parentScale;return[-fm._internalPadding*$e,-(fm._internalPadding+t$1(this,dt))*$e]}},{key:"rebuild",value:function rebuild(){this.parent&&(_get(_getPrototypeOf(fm.prototype),"rebuild",this).call(this),this.div!==null&&(this.isAttachedToDOM||this.parent.add(this)))}},{key:"enableEditMode",value:function enableEditMode(){this.isInEditMode()||(this.parent.setEditingState(!1),this.parent.updateToolbar(Xe.AnnotationEditorType.FREETEXT),_get(_getPrototypeOf(fm.prototype),"enableEditMode",this).call(this),this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant"),this.editorDiv.addEventListener("keydown",t$1(this,J)),this.editorDiv.addEventListener("focus",t$1(this,Q)),this.editorDiv.addEventListener("blur",t$1(this,B)),this.editorDiv.addEventListener("input",t$1(this,Y)))}},{key:"disableEditMode",value:function disableEditMode(){this.isInEditMode()&&(this.parent.setEditingState(!0),_get(_getPrototypeOf(fm.prototype),"disableEditMode",this).call(this),this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",t$1(this,ot)),this._isDraggable=!0,this.editorDiv.removeEventListener("keydown",t$1(this,J)),this.editorDiv.removeEventListener("focus",t$1(this,Q)),this.editorDiv.removeEventListener("blur",t$1(this,B)),this.editorDiv.removeEventListener("input",t$1(this,Y)),this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freeTextEditing"))}},{key:"focusin",value:function focusin($e){this._focusEventsAllowed&&(_get(_getPrototypeOf(fm.prototype),"focusin",this).call(this,$e),$e.target!==this.editorDiv&&this.editorDiv.focus())}},{key:"onceAdded",value:function onceAdded(){var $e;if(this.width){W(this,ve,_e6).call(this);return}this.enableEditMode(),this.editorDiv.focus(),($e=this._initialOptions)!=null&&$e.isCentered&&this.center(),this._initialOptions=null}},{key:"isEmpty",value:function isEmpty(){return!this.editorDiv||this.editorDiv.innerText.trim()===""}},{key:"remove",value:function remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freeTextEditing")),_get(_getPrototypeOf(fm.prototype),"remove",this).call(this)}},{key:"commit",value:function commit(){var _this61=this;if(!this.isInEditMode())return;_get(_getPrototypeOf(fm.prototype),"commit",this).call(this),this.disableEditMode();var $e=t$1(this,nt),_r=Z(this,nt,W(this,qt,ie).call(this).trimEnd());if($e===_r)return;var Ps=function Ps(qe){if(Z(_this61,nt,qe),!qe){_this61.remove();return}W(_this61,ae,Bt).call(_this61),_this61._uiManager.rebuild(_this61),W(_this61,re,ne).call(_this61)};this.addCommands({cmd:function cmd(){Ps(_r)},undo:function undo(){Ps($e)},mustExec:!1}),W(this,re,ne).call(this)}},{key:"shouldGetKeyboardEvents",value:function shouldGetKeyboardEvents(){return this.isInEditMode()}},{key:"enterInEditMode",value:function enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}},{key:"dblclick",value:function dblclick($e){this.enterInEditMode()}},{key:"keydown",value:function keydown($e){$e.target===this.div&&$e.key==="Enter"&&(this.enterInEditMode(),$e.preventDefault())}},{key:"editorDivKeydown",value:function editorDivKeydown($e){fm._keyboardManager.exec(this,$e)}},{key:"editorDivFocus",value:function editorDivFocus($e){this.isEditing=!0}},{key:"editorDivBlur",value:function editorDivBlur($e){this.isEditing=!1}},{key:"editorDivInput",value:function editorDivInput($e){this.parent.div.classList.toggle("freeTextEditing",this.isEmpty())}},{key:"disableEditing",value:function disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}},{key:"enableEditing",value:function enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}},{key:"render",value:function render(){var _this62=this,_ref82,_ref83,_ref84;if(this.div)return this.div;var $e,_r;this.width&&($e=this.x,_r=this.y),_get(_getPrototypeOf(fm.prototype),"render",this).call(this),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",t$1(this,ot)),this.enableEditing(),ro.AnnotationEditor._l10nPromise.get("editor_free_text2_aria_label").then(function(qe){var bl;return(bl=_this62.editorDiv)==null?void 0:bl.setAttribute("aria-label",qe)}),ro.AnnotationEditor._l10nPromise.get("free_text2_default_content").then(function(qe){var bl;return(bl=_this62.editorDiv)==null?void 0:bl.setAttribute("default-content",qe)}),this.editorDiv.contentEditable=!0;var Ps=this.editorDiv.style;if(Ps.fontSize="calc(".concat(t$1(this,dt),"px * var(--scale-factor))"),Ps.color=t$1(this,it),this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),(0,He.bindEvents)(this,this.div,["dblclick","keydown"]),this.width){var _this$parentDimension9=_slicedToArray(this.parentDimensions,2),qe=_this$parentDimension9[0],bl=_this$parentDimension9[1];if(this.annotationElementId){var _t$6=t$1(this,Mt),ol=_t$6.position;var _this$getInitialTrans3=this.getInitialTranslation(),_this$getInitialTrans4=_slicedToArray(_this$getInitialTrans3,2),Te=_this$getInitialTrans4[0],pe=_this$getInitialTrans4[1];var _this$pageTranslation2=this.pageTranslationToScreen(Te,pe);var _this$pageTranslation3=_slicedToArray(_this$pageTranslation2,2);Te=_this$pageTranslation3[0];pe=_this$pageTranslation3[1];var _this$pageDimensions7=_slicedToArray(this.pageDimensions,2),ue=_this$pageDimensions7[0],se=_this$pageDimensions7[1],_this$pageTranslation4=_slicedToArray(this.pageTranslation,2),be=_this$pageTranslation4[0],Ae=_this$pageTranslation4[1];var ze,pi;switch(this.rotation){case 0:ze=$e+(ol[0]-be)/ue,pi=_r+this.height-(ol[1]-Ae)/se;break;case 90:ze=$e+(ol[0]-be)/ue,pi=_r-(ol[1]-Ae)/se,(_ref82=[pe,-Te],Te=_ref82[0],pe=_ref82[1]);break;case 180:ze=$e-this.width+(ol[0]-be)/ue,pi=_r-(ol[1]-Ae)/se,(_ref83=[-Te,-pe],Te=_ref83[0],pe=_ref83[1]);break;case 270:ze=$e+(ol[0]-be-this.height*se)/ue,pi=_r+(ol[1]-Ae-this.width*ue)/se,(_ref84=[-pe,Te],Te=_ref84[0],pe=_ref84[1]);break}this.setAt(ze*qe,pi*bl,Te,pe)}else this.setAt($e*qe,_r*bl,this.width*qe,this.height*bl);W(this,ae,Bt).call(this),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}},{key:"contentDiv",get:function get(){return this.editorDiv}},{key:"serialize",value:function serialize(){var $e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:!1;if(this.isEmpty())return null;if(this.deleted)return{pageIndex:this.pageIndex,id:this.annotationElementId,deleted:!0};var _r=fm._internalPadding*this.parentScale,Ps=this.getRect(_r,_r),qe=ro.AnnotationEditor._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:t$1(this,it)),bl={annotationType:Xe.AnnotationEditorType.FREETEXT,color:qe,fontSize:t$1(this,dt),value:t$1(this,nt),pageIndex:this.pageIndex,rect:Ps,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return $e?bl:this.annotationElementId&&!W(this,Wt,oe).call(this,bl)?null:(bl.id=this.annotationElementId,bl)}}],[{key:"_keyboardManager",get:function get(){var $e=fm.prototype,_r=function _r(bl){return bl.isEmpty()},Ps=He.AnnotationEditorUIManager.TRANSLATE_SMALL,qe=He.AnnotationEditorUIManager.TRANSLATE_BIG;return(0,Xe.shadow)(this,"_keyboardManager",new He.KeyboardManager([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],$e.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],$e.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],$e._translateEmpty,{args:[-Ps,0],checker:_r}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],$e._translateEmpty,{args:[-qe,0],checker:_r}],[["ArrowRight","mac+ArrowRight"],$e._translateEmpty,{args:[Ps,0],checker:_r}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],$e._translateEmpty,{args:[qe,0],checker:_r}],[["ArrowUp","mac+ArrowUp"],$e._translateEmpty,{args:[0,-Ps],checker:_r}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],$e._translateEmpty,{args:[0,-qe],checker:_r}],[["ArrowDown","mac+ArrowDown"],$e._translateEmpty,{args:[0,Ps],checker:_r}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],$e._translateEmpty,{args:[0,qe],checker:_r}]]))}},{key:"initialize",value:function initialize($e){ro.AnnotationEditor.initialize($e,{strings:["free_text2_default_content","editor_free_text2_aria_label"]});var _r=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(_r.getPropertyValue("--freetext-padding"))}},{key:"updateDefaultParams",value:function updateDefaultParams($e,_r){switch($e){case Xe.AnnotationEditorParamsType.FREETEXT_SIZE:fm._defaultFontSize=_r;break;case Xe.AnnotationEditorParamsType.FREETEXT_COLOR:fm._defaultColor=_r;break}}},{key:"defaultPropertiesToUpdate",get:function get(){return[[Xe.AnnotationEditorParamsType.FREETEXT_SIZE,fm._defaultFontSize],[Xe.AnnotationEditorParamsType.FREETEXT_COLOR,fm._defaultColor||ro.AnnotationEditor._defaultLineColor]]}},{key:"deserialize",value:function deserialize($e,_r,Ps){var _Xe$Util;var qe=null;if($e instanceof Xo.FreeTextAnnotationElement){var _$e=$e,_$e$data=_$e.data,_$e$data$defaultAppea=_$e$data.defaultAppearanceData,ol=_$e$data$defaultAppea.fontSize,Te=_$e$data$defaultAppea.fontColor,pe=_$e$data.rect,ue=_$e$data.rotation,se=_$e$data.id,be=_$e.textContent,Ae=_$e.textPosition,ze=_$e.parent.page.pageNumber;if(!be||be.length===0)return null;qe=$e={annotationType:Xe.AnnotationEditorType.FREETEXT,color:Array.from(Te),fontSize:ol,value:be.join("\n"),position:Ae,pageIndex:ze-1,rect:pe,rotation:ue,id:se,deleted:!1}}var bl=_get(_getPrototypeOf(fm),"deserialize",this).call(this,$e,_r,Ps);return Z(bl,dt,$e.fontSize),Z(bl,it,(_Xe$Util=Xe.Util).makeHexColor.apply(_Xe$Util,_toConsumableArray($e.color))),Z(bl,nt,$e.value),bl.annotationElementId=$e.id||null,Z(bl,Mt,qe),bl}}]);return fm}(ro.AnnotationEditor);B=new WeakMap,Q=new WeakMap,Y=new WeakMap,J=new WeakMap,it=new WeakMap,nt=new WeakMap,ot=new WeakMap,dt=new WeakMap,Mt=new WeakMap,Ot=new WeakSet,Qt=function Qt(pr){var _this63=this;var $e=function $e(Ps){_this63.editorDiv.style.fontSize="calc(".concat(Ps,"px * var(--scale-factor))"),_this63.translate(0,-(Ps-t$1(_this63,dt))*_this63.parentScale),Z(_this63,dt,Ps),W(_this63,re,ne).call(_this63)},_r=t$1(this,dt);this.addCommands({cmd:function cmd(){$e(pr)},undo:function undo(){$e(_r)},mustExec:!0,type:Xe.AnnotationEditorParamsType.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})},Ut=new WeakSet,te=function te(pr){var _this64=this;var $e=t$1(this,it);this.addCommands({cmd:function cmd(){Z(_this64,it,_this64.editorDiv.style.color=pr)},undo:function undo(){Z(_this64,it,_this64.editorDiv.style.color=$e)},mustExec:!0,type:Xe.AnnotationEditorParamsType.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})},qt=new WeakSet,ie=function ie(){var pr=this.editorDiv.getElementsByTagName("div");if(pr.length===0)return this.editorDiv.innerText;var $e=[];var _iterator116=_createForOfIteratorHelper(pr),_step116;try{for(_iterator116.s();!(_step116=_iterator116.n()).done;){var _r=_step116.value;$e.push(_r.innerText.replace(/\r\n?|\n/,""))}}catch(err){_iterator116.e(err)}finally{_iterator116.f()}return $e.join("\n")},re=new WeakSet,ne=function ne(){var _this$parentDimension10=_slicedToArray(this.parentDimensions,2),pr=_this$parentDimension10[0],$e=_this$parentDimension10[1];var _r;if(this.isAttachedToDOM)_r=this.div.getBoundingClientRect();else{var Ps=this.currentLayer,qe=this.div,bl=qe.style.display;qe.style.display="hidden",Ps.div.append(this.div),_r=qe.getBoundingClientRect(),qe.remove(),qe.style.display=bl}this.rotation%180===this.parentRotation%180?(this.width=_r.width/pr,this.height=_r.height/$e):(this.width=_r.height/pr,this.height=_r.width/$e),this.fixAndSetPosition()},ae=new WeakSet,Bt=function Bt(){if(this.editorDiv.replaceChildren(),!!t$1(this,nt)){var _iterator117=_createForOfIteratorHelper(t$1(this,nt).split("\n")),_step117;try{for(_iterator117.s();!(_step117=_iterator117.n()).done;){var pr=_step117.value;var $e=document.createElement("div");$e.append(pr?document.createTextNode(pr):document.createElement("br")),this.editorDiv.append($e)}}catch(err){_iterator117.e(err)}finally{_iterator117.f()}}},Wt=new WeakSet,oe=function oe(pr){var _t$7=t$1(this,Mt),$e=_t$7.value,_r=_t$7.fontSize,Ps=_t$7.color,qe=_t$7.rect,bl=_t$7.pageIndex;return pr.value!==$e||pr.fontSize!==_r||pr.rect.some(function(ol,Te){return Math.abs(ol-qe[Te])>=1})||pr.color.some(function(ol,Te){return ol!==Ps[Te]})||pr.pageIndex!==bl},ve=new WeakSet,_e6=function _e(){var _this65=this;var pr=arguments.length>0&&arguments[0]!==undefined?arguments[0]:!1;if(!this.annotationElementId)return;if(W(this,re,ne).call(this),!pr&&(this.width===0||this.height===0)){setTimeout(function(){return W(_this65,ve,_e6).call(_this65,!0)},0);return}var $e=Se._internalPadding*this.parentScale;t$1(this,Mt).rect=this.getRect($e,$e)},ee(Se,"_freeTextDefaultContent",""),ee(Se,"_internalPadding",0),ee(Se,"_defaultColor",null),ee(Se,"_defaultFontSize",10),ee(Se,"_type","freetext");var xr=Se;o.FreeTextEditor=xr},function(r,o,s){var B,Q,Y,J,it,nt,ot,dt,Mt,Ot,Qt,Ut,te,qt,ie,re,ne,ae,Bt,Wt,oe,ve,_e,Xe,He,ro,Xo,Se,xr,pr,$e,_r,Ps,qe,bl,ol,Te,pe,ue,se,be,Ae,ze,pi,io;Object.defineProperty(o,"__esModule",{value:!0}),o.StampAnnotationElement=o.InkAnnotationElement=o.FreeTextAnnotationElement=o.AnnotationLayer=void 0;var Qr=s(1),Es=s(6),nl=s(3),Cr=s(30),$l=s(31),_l=s(32);var Ih=1e3,Rh=9,Th=new WeakSet;function $s(Hh){return{width:Hh[2]-Hh[0],height:Hh[3]-Hh[1]}}var Dr=function(){function Dr(){_classCallCheck(this,Dr)}_createClass(Dr,null,[{key:"create",value:function create(ke){switch(ke.data.annotationType){case Qr.AnnotationType.LINK:return new ta(ke);case Qr.AnnotationType.TEXT:return new Cl(ke);case Qr.AnnotationType.WIDGET:switch(ke.data.fieldType){case"Tx":return new jh(ke);case"Btn":return ke.data.radioButton?new Jh(ke):ke.data.checkBox?new Bh(ke):new Xh(ke);case"Ch":return new Qh(ke);case"Sig":return new qh(ke)}return new Oh(ke);case Qr.AnnotationType.POPUP:return new Kh(ke);case Qr.AnnotationType.FREETEXT:return new fe(ke);case Qr.AnnotationType.LINE:return new Me(ke);case Qr.AnnotationType.SQUARE:return new kr(ke);case Qr.AnnotationType.CIRCLE:return new rn(ke);case Qr.AnnotationType.POLYLINE:return new Oe(ke);case Qr.AnnotationType.CARET:return new Jo(ke);case Qr.AnnotationType.INK:return new xl(ke);case Qr.AnnotationType.POLYGON:return new wi(ke);case Qr.AnnotationType.HIGHLIGHT:return new Pd(ke);case Qr.AnnotationType.UNDERLINE:return new Dh(ke);case Qr.AnnotationType.SQUIGGLY:return new Vh(ke);case Qr.AnnotationType.STRIKEOUT:return new Ed(ke);case Qr.AnnotationType.STAMP:return new Nh(ke);case Qr.AnnotationType.FILEATTACHMENT:return new Zh(ke);default:return new Ke(ke)}}}]);return Dr}();var Xi=function(){function Lm(ke){var _ref85=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},_ref85$isRenderable=_ref85.isRenderable,ye=_ref85$isRenderable===void 0?!1:_ref85$isRenderable,_ref85$ignoreBorder=_ref85.ignoreBorder,Ie=_ref85$ignoreBorder===void 0?!1:_ref85$ignoreBorder,_ref85$createQuadrila=_ref85.createQuadrilaterals,cr=_ref85$createQuadrila===void 0?!1:_ref85$createQuadrila;_classCallCheck(this,Lm);I(this,B,!1),this.isRenderable=ye,this.data=ke.data,this.layer=ke.layer,this.linkService=ke.linkService,this.downloadManager=ke.downloadManager,this.imageResourcesPath=ke.imageResourcesPath,this.renderForms=ke.renderForms,this.svgFactory=ke.svgFactory,this.annotationStorage=ke.annotationStorage,this.enableScripting=ke.enableScripting,this.hasJSActions=ke.hasJSActions,this._fieldObjects=ke.fieldObjects,this.parent=ke.parent,ye&&(this.container=this._createContainer(Ie)),cr&&this._createQuadrilaterals()}_createClass(Lm,[{key:"hasPopupData",get:function get(){return Lm._hasPopupData(this.data)}},{key:"_createContainer",value:function _createContainer(ke){var ye=this.data,_this$parent=this.parent,Ie=_this$parent.page,cr=_this$parent.viewport,lr=document.createElement("section");lr.setAttribute("data-annotation-id",ye.id),this instanceof Oh||(lr.tabIndex=Ih),lr.style.zIndex=this.parent.zIndex++,this.data.popupRef&&lr.setAttribute("aria-haspopup","dialog"),ye.noRotate&&lr.classList.add("norotate");var _cr$rawDims=cr.rawDims,Ss=_cr$rawDims.pageWidth,kl=_cr$rawDims.pageHeight,Wh=_cr$rawDims.pageX,zh=_cr$rawDims.pageY;if(!ye.rect||this instanceof Kh){var Gh=ye.rotation;return!ye.hasOwnCanvas&&Gh!==0&&this.setRotation(Gh,lr),lr}var _$s2=$s(ye.rect),Fh=_$s2.width,tu=_$s2.height,Uh=Qr.Util.normalizeRect([ye.rect[0],Ie.view[3]-ye.rect[1]+Ie.view[1],ye.rect[2],Ie.view[3]-ye.rect[3]+Ie.view[1]]);if(!ke&&ye.borderStyle.width>0){lr.style.borderWidth="".concat(ye.borderStyle.width,"px");var _Gh=ye.borderStyle.horizontalCornerRadius,eu=ye.borderStyle.verticalCornerRadius;if(_Gh>0||eu>0){var yy="calc(".concat(_Gh,"px * var(--scale-factor)) / calc(").concat(eu,"px * var(--scale-factor))");lr.style.borderRadius=yy}else if(this instanceof Jh){var _yy="calc(".concat(Fh,"px * var(--scale-factor)) / calc(").concat(tu,"px * var(--scale-factor))");lr.style.borderRadius=_yy}switch(ye.borderStyle.style){case Qr.AnnotationBorderStyleType.SOLID:lr.style.borderStyle="solid";break;case Qr.AnnotationBorderStyleType.DASHED:lr.style.borderStyle="dashed";break;case Qr.AnnotationBorderStyleType.BEVELED:(0,Qr.warn)("Unimplemented border style: beveled");break;case Qr.AnnotationBorderStyleType.INSET:(0,Qr.warn)("Unimplemented border style: inset");break;case Qr.AnnotationBorderStyleType.UNDERLINE:lr.style.borderBottomStyle="solid";break}var ru=ye.borderColor||null;ru?(Z(this,B,!0),lr.style.borderColor=Qr.Util.makeHexColor(ru[0]|0,ru[1]|0,ru[2]|0)):lr.style.borderWidth=0}lr.style.left="".concat(100*(Uh[0]-Wh)/Ss,"%"),lr.style.top="".concat(100*(Uh[1]-zh)/kl,"%");var Yh=ye.rotation;return ye.hasOwnCanvas||Yh===0?(lr.style.width="".concat(100*Fh/Ss,"%"),lr.style.height="".concat(100*tu/kl,"%")):this.setRotation(Yh,lr),lr}},{key:"setRotation",value:function setRotation(ke){var ye=arguments.length>1&&arguments[1]!==undefined?arguments[1]:this.container;if(!this.data.rect)return;var _this$parent$viewport3=this.parent.viewport.rawDims,Ie=_this$parent$viewport3.pageWidth,cr=_this$parent$viewport3.pageHeight,_$s3=$s(this.data.rect),lr=_$s3.width,Ss=_$s3.height;var kl,Wh;ke%180===0?(kl=100*lr/Ie,Wh=100*Ss/cr):(kl=100*Ss/Ie,Wh=100*lr/cr),ye.style.width="".concat(kl,"%"),ye.style.height="".concat(Wh,"%"),ye.setAttribute("data-main-rotation",(360-ke)%360)}},{key:"_commonActions",get:function get(){var _this66=this;var ke=function ke(ye,Ie,cr){var lr=cr.detail[ye],Ss=lr[0],kl=lr.slice(1);cr.target.style[Ie]=Cr.ColorConverters["".concat(Ss,"_HTML")](kl),_this66.annotationStorage.setValue(_this66.data.id,_defineProperty({},Ie,Cr.ColorConverters["".concat(Ss,"_rgb")](kl)))};return(0,Qr.shadow)(this,"_commonActions",{display:function display(ye){var Ie=ye.detail.display,cr=Ie%2===1;_this66.container.style.visibility=cr?"hidden":"visible",_this66.annotationStorage.setValue(_this66.data.id,{noView:cr,noPrint:Ie===1||Ie===2})},print:function print(ye){_this66.annotationStorage.setValue(_this66.data.id,{noPrint:!ye.detail.print})},hidden:function hidden(ye){var Ie=ye.detail.hidden;_this66.container.style.visibility=Ie?"hidden":"visible",_this66.annotationStorage.setValue(_this66.data.id,{noPrint:Ie,noView:Ie})},focus:function focus(ye){setTimeout(function(){return ye.target.focus({preventScroll:!1})},0)},userName:function userName(ye){ye.target.title=ye.detail.userName},readonly:function readonly(ye){ye.target.disabled=ye.detail.readonly},required:function required(ye){_this66._setRequired(ye.target,ye.detail.required)},bgColor:function bgColor(ye){ke("bgColor","backgroundColor",ye)},fillColor:function fillColor(ye){ke("fillColor","backgroundColor",ye)},fgColor:function fgColor(ye){ke("fgColor","color",ye)},textColor:function textColor(ye){ke("textColor","color",ye)},borderColor:function borderColor(ye){ke("borderColor","borderColor",ye)},strokeColor:function strokeColor(ye){ke("strokeColor","borderColor",ye)},rotation:function rotation(ye){var Ie=ye.detail.rotation;_this66.setRotation(Ie),_this66.annotationStorage.setValue(_this66.data.id,{rotation:Ie})}})}},{key:"_dispatchEventFromSandbox",value:function _dispatchEventFromSandbox(ke,ye){var Ie=this._commonActions;for(var _i9=0,_Object$keys=Object.keys(ye.detail);_i9<_Object$keys.length;_i9++){var cr=_Object$keys[_i9];var lr=ke[cr]||Ie[cr];lr==null||lr(ye)}}},{key:"_setDefaultPropertiesFromJS",value:function _setDefaultPropertiesFromJS(ke){if(!this.enableScripting)return;var ye=this.annotationStorage.getRawValue(this.data.id);if(!ye)return;var Ie=this._commonActions;for(var _i10=0,_Object$entries3=Object.entries(ye);_i10<_Object$entries3.length;_i10++){var _Object$entries3$_i=_slicedToArray(_Object$entries3[_i10],2),cr=_Object$entries3$_i[0],lr=_Object$entries3$_i[1];var Ss=Ie[cr];if(Ss){var kl={detail:_defineProperty({},cr,lr),target:ke};Ss(kl),delete ye[cr]}}}},{key:"_createQuadrilaterals",value:function _createQuadrilaterals(){if(!this.container)return;var ke=this.data.quadPoints;if(!ke)return;var _this$data$rect=_slicedToArray(this.data.rect,4),ye=_this$data$rect[0],Ie=_this$data$rect[1],cr=_this$data$rect[2],lr=_this$data$rect[3];if(ke.length===1){var _ke$=_slicedToArray(ke[0],3),_ke$$=_ke$[1],eu=_ke$$.x,ru=_ke$$.y,_ke$$2=_ke$[2],yy=_ke$$2.x,wy=_ke$$2.y;if(cr===eu&&lr===ru&&ye===yy&&Ie===wy)return}var Ss=this.container.style;var kl;if(t$1(this,B)){var _eu=Ss.borderColor,_ru=Ss.borderWidth;Ss.borderWidth=0,kl=["url('data:image/svg+xml;utf8,","<svg xmlns=\"http://www.w3.org/2000/svg\""," preserveAspectRatio=\"none\" viewBox=\"0 0 1 1\">","<g fill=\"transparent\" stroke=\"".concat(_eu,"\" stroke-width=\"").concat(_ru,"\">")],this.container.classList.add("hasBorder")}var Wh=cr-ye,zh=lr-Ie,Fh=this.svgFactory,tu=Fh.createElement("svg");tu.classList.add("quadrilateralsContainer"),tu.setAttribute("width",0),tu.setAttribute("height",0);var Uh=Fh.createElement("defs");tu.append(Uh);var Yh=Fh.createElement("clipPath"),Gh="clippath_".concat(this.data.id);Yh.setAttribute("id",Gh),Yh.setAttribute("clipPathUnits","objectBoundingBox"),Uh.append(Yh);var _iterator118=_createForOfIteratorHelper(ke),_step118;try{for(_iterator118.s();!(_step118=_iterator118.n()).done;){var _step118$value=_slicedToArray(_step118.value,3),_step118$value$=_step118$value[1],_eu2=_step118$value$.x,_ru2=_step118$value$.y,_step118$value$2=_step118$value[2],_yy2=_step118$value$2.x,_wy=_step118$value$2.y;var wm=Fh.createElement("rect"),bm=(_yy2-ye)/Wh,_m=(lr-_ru2)/zh,gm=(_eu2-_yy2)/Wh,Sm=(_ru2-_wy)/zh;wm.setAttribute("x",bm),wm.setAttribute("y",_m),wm.setAttribute("width",gm),wm.setAttribute("height",Sm),Yh.append(wm),kl==null||kl.push("<rect vector-effect=\"non-scaling-stroke\" x=\"".concat(bm,"\" y=\"").concat(_m,"\" width=\"").concat(gm,"\" height=\"").concat(Sm,"\"/>"))}}catch(err){_iterator118.e(err)}finally{_iterator118.f()}t$1(this,B)&&(kl.push("</g></svg>')"),Ss.backgroundImage=kl.join("")),this.container.append(tu),this.container.style.clipPath="url(#".concat(Gh,")")}},{key:"_createPopup",value:function _createPopup(){var ke=this.container,ye=this.data;ke.setAttribute("aria-haspopup","dialog");var Ie=new Kh({data:{color:ye.color,titleObj:ye.titleObj,modificationDate:ye.modificationDate,contentsObj:ye.contentsObj,richText:ye.richText,parentRect:ye.rect,borderStyle:0,id:"popup_".concat(ye.id),rotation:ye.rotation},parent:this.parent,elements:[this]});this.parent.div.append(Ie.render())}},{key:"render",value:function render(){(0,Qr.unreachable)("Abstract method `AnnotationElement.render` called")}},{key:"_getElementsByName",value:function _getElementsByName(ke){var ye=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;var Ie=[];if(this._fieldObjects){var cr=this._fieldObjects[ke];if(cr){var _iterator119=_createForOfIteratorHelper(cr),_step119;try{for(_iterator119.s();!(_step119=_iterator119.n()).done;){var _step119$value=_step119.value,lr=_step119$value.page,Ss=_step119$value.id,kl=_step119$value.exportValues;if(lr===-1||Ss===ye)continue;var Wh=typeof kl=="string"?kl:null,zh=document.querySelector("[data-element-id=\"".concat(Ss,"\"]"));if(zh&&!Th.has(zh)){(0,Qr.warn)("_getElementsByName - element not allowed: ".concat(Ss));continue}Ie.push({id:Ss,exportValue:Wh,domElement:zh})}}catch(err){_iterator119.e(err)}finally{_iterator119.f()}}return Ie}var _iterator120=_createForOfIteratorHelper(document.getElementsByName(ke)),_step120;try{for(_iterator120.s();!(_step120=_iterator120.n()).done;){var _cr3=_step120.value;var _lr2=_cr3.exportValue,_Ss4=_cr3.getAttribute("data-element-id");_Ss4!==ye&&Th.has(_cr3)&&Ie.push({id:_Ss4,exportValue:_lr2,domElement:_cr3})}}catch(err){_iterator120.e(err)}finally{_iterator120.f()}return Ie}},{key:"show",value:function show(){var ke;this.container&&(this.container.hidden=!1),(ke=this.popup)==null||ke.maybeShow()}},{key:"hide",value:function hide(){var ke;this.container&&(this.container.hidden=!0),(ke=this.popup)==null||ke.forceHide()}},{key:"getElementsToTriggerPopup",value:function getElementsToTriggerPopup(){return this.container}},{key:"addHighlightArea",value:function addHighlightArea(){var ke=this.getElementsToTriggerPopup();if(Array.isArray(ke)){var _iterator121=_createForOfIteratorHelper(ke),_step121;try{for(_iterator121.s();!(_step121=_iterator121.n()).done;){var ye=_step121.value;ye.classList.add("highlightArea")}}catch(err){_iterator121.e(err)}finally{_iterator121.f()}}else ke.classList.add("highlightArea")}},{key:"_editOnDoubleClick",value:function _editOnDoubleClick(){var _this67=this;var ke=this.annotationEditorType,ye=this.data.id;this.container.addEventListener("dblclick",function(){var Ie;(Ie=_this67.linkService.eventBus)==null||Ie.dispatch("switchannotationeditormode",{source:_this67,mode:ke,editId:ye})})}}],[{key:"_hasPopupData",value:function _hasPopupData(_ref86){var ke=_ref86.titleObj,ye=_ref86.contentsObj,Ie=_ref86.richText;return!!(ke!=null&&ke.str||ye!=null&&ye.str||Ie!=null&&Ie.str)}}]);return Lm}();B=new WeakMap;var Ke=Xi;var ta=function(_Ke4){_inherits(ta,_Ke4);function ta(ke){var _this68;var ye=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;_classCallCheck(this,ta);_this68=_callSuper(this,ta,[ke,{isRenderable:!0,ignoreBorder:!!(ye!=null&&ye.ignoreBorder),createQuadrilaterals:!0}]),I(_assertThisInitialized(_this68),Q),I(_assertThisInitialized(_this68),J),_this68.isTooltipOnly=ke.data.isTooltipOnly;return _this68}_createClass(ta,[{key:"render",value:function render(){var ke=this.data,ye=this.linkService,Ie=document.createElement("a");Ie.setAttribute("data-element-id",ke.id);var cr=!1;return ke.url?(ye.addLinkAttributes(Ie,ke.url,ke.newWindow),cr=!0):ke.action?(this._bindNamedAction(Ie,ke.action),cr=!0):ke.attachment?(this._bindAttachment(Ie,ke.attachment),cr=!0):ke.setOCGState?(W(this,J,it).call(this,Ie,ke.setOCGState),cr=!0):ke.dest?(this._bindLink(Ie,ke.dest),cr=!0):(ke.actions&&(ke.actions.Action||ke.actions["Mouse Up"]||ke.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(Ie,ke),cr=!0),ke.resetForm?(this._bindResetFormAction(Ie,ke.resetForm),cr=!0):this.isTooltipOnly&&!cr&&(this._bindLink(Ie,""),cr=!0)),this.container.classList.add("linkAnnotation"),cr&&this.container.append(Ie),this.container}},{key:"_bindLink",value:function _bindLink(ke,ye){var _this69=this;ke.href=this.linkService.getDestinationHash(ye),ke.onclick=function(){return ye&&_this69.linkService.goToDestination(ye),!1},(ye||ye==="")&&W(this,Q,Y).call(this)}},{key:"_bindNamedAction",value:function _bindNamedAction(ke,ye){var _this70=this;ke.href=this.linkService.getAnchorUrl(""),ke.onclick=function(){return _this70.linkService.executeNamedAction(ye),!1},W(this,Q,Y).call(this)}},{key:"_bindAttachment",value:function _bindAttachment(ke,ye){var _this71=this;ke.href=this.linkService.getAnchorUrl(""),ke.onclick=function(){var Ie;return(Ie=_this71.downloadManager)==null||Ie.openOrDownloadData(_this71.container,ye.content,ye.filename),!1},W(this,Q,Y).call(this)}},{key:"_bindJSAction",value:function _bindJSAction(ke,ye){var _this72=this;ke.href=this.linkService.getAnchorUrl("");var Ie=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);var _loop2=function _loop2(){var cr=_Object$keys2[_i11];var lr=Ie.get(cr);lr&&(ke[lr]=function(){var Ss;return(Ss=_this72.linkService.eventBus)==null||Ss.dispatch("dispatcheventinsandbox",{source:_this72,detail:{id:ye.id,name:cr}}),!1})};for(var _i11=0,_Object$keys2=Object.keys(ye.actions);_i11<_Object$keys2.length;_i11++){_loop2()}ke.onclick||(ke.onclick=function(){return!1}),W(this,Q,Y).call(this)}},{key:"_bindResetFormAction",value:function _bindResetFormAction(ke,ye){var _this73=this;var Ie=ke.onclick;if(Ie||(ke.href=this.linkService.getAnchorUrl("")),W(this,Q,Y).call(this),!this._fieldObjects){(0,Qr.warn)("_bindResetFormAction - \"resetForm\" action not supported, ensure that the `fieldObjects` parameter is provided."),Ie||(ke.onclick=function(){return!1});return}ke.onclick=function(){var cr;Ie==null||Ie();var lr=ye.fields,Ss=ye.refs,kl=ye.include,Wh=[];if(lr.length!==0||Ss.length!==0){var tu=new Set(Ss);var _iterator122=_createForOfIteratorHelper(lr),_step122;try{for(_iterator122.s();!(_step122=_iterator122.n()).done;){var _Uh=_step122.value;var _Yh=_this73._fieldObjects[_Uh]||[];var _iterator124=_createForOfIteratorHelper(_Yh),_step124;try{for(_iterator124.s();!(_step124=_iterator124.n()).done;){var Gh=_step124.value.id;tu.add(Gh)}}catch(err){_iterator124.e(err)}finally{_iterator124.f()}}}catch(err){_iterator122.e(err)}finally{_iterator122.f()}for(var _i12=0,_Object$values=Object.values(_this73._fieldObjects);_i12<_Object$values.length;_i12++){var Uh=_Object$values[_i12];var _iterator123=_createForOfIteratorHelper(Uh),_step123;try{for(_iterator123.s();!(_step123=_iterator123.n()).done;){var Yh=_step123.value;tu.has(Yh.id)===kl&&Wh.push(Yh)}}catch(err){_iterator123.e(err)}finally{_iterator123.f()}}}else for(var _i13=0,_Object$values2=Object.values(_this73._fieldObjects);_i13<_Object$values2.length;_i13++){var _tu=_Object$values2[_i13];Wh.push.apply(Wh,_toConsumableArray(_tu))}var zh=_this73.annotationStorage,Fh=[];for(var _i14=0,_Wh=Wh;_i14<_Wh.length;_i14++){var _tu2=_Wh[_i14];var _Uh2=_tu2.id;switch(Fh.push(_Uh2),_tu2.type){case"text":{var _Gh2=_tu2.defaultValue||"";zh.setValue(_Uh2,{value:_Gh2});break}case"checkbox":case"radiobutton":{var _Gh3=_tu2.defaultValue===_tu2.exportValues;zh.setValue(_Uh2,{value:_Gh3});break}case"combobox":case"listbox":{var _Gh4=_tu2.defaultValue||"";zh.setValue(_Uh2,{value:_Gh4});break}default:continue}var _Yh2=document.querySelector("[data-element-id=\"".concat(_Uh2,"\"]"));if(_Yh2){if(!Th.has(_Yh2)){(0,Qr.warn)("_bindResetFormAction - element not allowed: ".concat(_Uh2));continue}}else continue;_Yh2.dispatchEvent(new Event("resetform"))}return _this73.enableScripting&&((cr=_this73.linkService.eventBus)==null||cr.dispatch("dispatcheventinsandbox",{source:_this73,detail:{id:"app",ids:Fh,name:"ResetForm"}})),!1}}}]);return ta}(Ke);Q=new WeakSet,Y=function Y(){this.container.setAttribute("data-internal-link","")},J=new WeakSet,it=function it(Hh,ke){var _this74=this;Hh.href=this.linkService.getAnchorUrl(""),Hh.onclick=function(){return _this74.linkService.executeSetOCGState(ke),!1},W(this,Q,Y).call(this)};var Cl=function(_Ke5){_inherits(Cl,_Ke5);function Cl(ke){_classCallCheck(this,Cl);return _callSuper(this,Cl,[ke,{isRenderable:!0}])}_createClass(Cl,[{key:"render",value:function render(){this.container.classList.add("textAnnotation");var ke=document.createElement("img");return ke.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",ke.alt="[{{type}} Annotation]",ke.dataset.l10nId="text_annotation_type",ke.dataset.l10nArgs=JSON.stringify({type:this.data.name}),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(ke),this.container}}]);return Cl}(Ke);var Oh=function(_Ke6){_inherits(Oh,_Ke6);function Oh(){_classCallCheck(this,Oh);return _callSuper(this,Oh,arguments)}_createClass(Oh,[{key:"render",value:function render(){return this.data.alternativeText&&(this.container.title=this.data.alternativeText),this.container}},{key:"showElementAndHideCanvas",value:function showElementAndHideCanvas(ke){var ye;this.data.hasOwnCanvas&&(((ye=ke.previousSibling)==null?void 0:ye.nodeName)==="CANVAS"&&(ke.previousSibling.hidden=!0),ke.hidden=!1)}},{key:"_getKeyModifier",value:function _getKeyModifier(ke){var _Qr$FeatureTest$platf=Qr.FeatureTest.platform,ye=_Qr$FeatureTest$platf.isWin,Ie=_Qr$FeatureTest$platf.isMac;return ye&&ke.ctrlKey||Ie&&ke.metaKey}},{key:"_setEventListener",value:function _setEventListener(ke,ye,Ie,cr,lr){var _this75=this;Ie.includes("mouse")?ke.addEventListener(Ie,function(Ss){var kl;(kl=_this75.linkService.eventBus)==null||kl.dispatch("dispatcheventinsandbox",{source:_this75,detail:{id:_this75.data.id,name:cr,value:lr(Ss),shift:Ss.shiftKey,modifier:_this75._getKeyModifier(Ss)}})}):ke.addEventListener(Ie,function(Ss){var kl;if(Ie==="blur"){if(!ye.focused||!Ss.relatedTarget)return;ye.focused=!1}else if(Ie==="focus"){if(ye.focused)return;ye.focused=!0}lr&&((kl=_this75.linkService.eventBus)==null||kl.dispatch("dispatcheventinsandbox",{source:_this75,detail:{id:_this75.data.id,name:cr,value:lr(Ss)}}))})}},{key:"_setEventListeners",value:function _setEventListeners(ke,ye,Ie,cr){var lr,Ss,kl;var _iterator125=_createForOfIteratorHelper(Ie),_step125;try{for(_iterator125.s();!(_step125=_iterator125.n()).done;){var _step125$value=_slicedToArray(_step125.value,2),Wh=_step125$value[0],zh=_step125$value[1];(zh==="Action"||(lr=this.data.actions)!=null&&lr[zh])&&((zh==="Focus"||zh==="Blur")&&(ye||(ye={focused:!1})),this._setEventListener(ke,ye,Wh,zh,cr),zh==="Focus"&&!((Ss=this.data.actions)!=null&&Ss.Blur)?this._setEventListener(ke,ye,"blur","Blur",null):zh==="Blur"&&!((kl=this.data.actions)!=null&&kl.Focus)&&this._setEventListener(ke,ye,"focus","Focus",null))}}catch(err){_iterator125.e(err)}finally{_iterator125.f()}}},{key:"_setBackgroundColor",value:function _setBackgroundColor(ke){var ye=this.data.backgroundColor||null;ke.style.backgroundColor=ye===null?"transparent":Qr.Util.makeHexColor(ye[0],ye[1],ye[2])}},{key:"_setTextStyle",value:function _setTextStyle(ke){var ye=["left","center","right"],Ie=this.data.defaultAppearanceData.fontColor,cr=this.data.defaultAppearanceData.fontSize||Rh,lr=ke.style;var Ss;var kl=2,Wh=function Wh(zh){return Math.round(10*zh)/10};if(this.data.multiLine){var zh=Math.abs(this.data.rect[3]-this.data.rect[1]-kl),Fh=Math.round(zh/(Qr.LINE_FACTOR*cr))||1,tu=zh/Fh;Ss=Math.min(cr,Wh(tu/Qr.LINE_FACTOR))}else{var _zh=Math.abs(this.data.rect[3]-this.data.rect[1]-kl);Ss=Math.min(cr,Wh(_zh/Qr.LINE_FACTOR))}lr.fontSize="calc(".concat(Ss,"px * var(--scale-factor))"),lr.color=Qr.Util.makeHexColor(Ie[0],Ie[1],Ie[2]),this.data.textAlignment!==null&&(lr.textAlign=ye[this.data.textAlignment])}},{key:"_setRequired",value:function _setRequired(ke,ye){ye?ke.setAttribute("required",!0):ke.removeAttribute("required"),ke.setAttribute("aria-required",ye)}}]);return Oh}(Ke);var jh=function(_Oh3){_inherits(jh,_Oh3);function jh(ke){_classCallCheck(this,jh);var ye=ke.renderForms||!ke.data.hasAppearance&&!!ke.data.fieldValue;return _callSuper(this,jh,[ke,{isRenderable:ye}])}_createClass(jh,[{key:"setPropertyOnSiblings",value:function setPropertyOnSiblings(ke,ye,Ie,cr){var lr=this.annotationStorage;var _iterator126=_createForOfIteratorHelper(this._getElementsByName(ke.name,ke.id)),_step126;try{for(_iterator126.s();!(_step126=_iterator126.n()).done;){var Ss=_step126.value;Ss.domElement&&(Ss.domElement[ye]=Ie),lr.setValue(Ss.id,_defineProperty({},cr,Ie))}}catch(err){_iterator126.e(err)}finally{_iterator126.f()}}},{key:"render",value:function render(){var _this76=this;var ke,ye;var Ie=this.annotationStorage,cr=this.data.id;this.container.classList.add("textWidgetAnnotation");var lr=null;if(this.renderForms){var _zh2,_zh3;var Ss=Ie.getValue(cr,{value:this.data.fieldValue});var kl=Ss.value||"";var Wh=Ie.getValue(cr,{charLimit:this.data.maxLen}).charLimit;Wh&&kl.length>Wh&&(kl=kl.slice(0,Wh));var zh=Ss.formattedValue||((ke=this.data.textContent)==null?void 0:ke.join("\n"))||null;zh&&this.data.comb&&(zh=zh.replaceAll(/\s+/g,""));var Fh={userValue:kl,formattedValue:zh,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(lr=document.createElement("textarea"),lr.textContent=(_zh2=zh)!==null&&_zh2!==void 0?_zh2:kl,this.data.doNotScroll&&(lr.style.overflowY="hidden")):(lr=document.createElement("input"),lr.type="text",lr.setAttribute("value",(_zh3=zh)!==null&&_zh3!==void 0?_zh3:kl),this.data.doNotScroll&&(lr.style.overflowX="hidden")),this.data.hasOwnCanvas&&(lr.hidden=!0),Th.add(lr),lr.setAttribute("data-element-id",cr),lr.disabled=this.data.readOnly,lr.name=this.data.fieldName,lr.tabIndex=Ih,this._setRequired(lr,this.data.required),Wh&&(lr.maxLength=Wh),lr.addEventListener("input",function(Uh){Ie.setValue(cr,{value:Uh.target.value}),_this76.setPropertyOnSiblings(lr,"value",Uh.target.value,"value"),Fh.formattedValue=null}),lr.addEventListener("resetform",function(Uh){var _this76$data$defaultF;var Yh=(_this76$data$defaultF=_this76.data.defaultFieldValue)!==null&&_this76$data$defaultF!==void 0?_this76$data$defaultF:"";lr.value=Fh.userValue=Yh,Fh.formattedValue=null});var tu=function tu(Uh){var Yh=Fh.formattedValue;Yh!=null&&(Uh.target.value=Yh),Uh.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){lr.addEventListener("focus",function(Yh){if(Fh.focused)return;var Gh=Yh.target;Fh.userValue&&(Gh.value=Fh.userValue),Fh.lastCommittedValue=Gh.value,Fh.commitKey=1,Fh.focused=!0}),lr.addEventListener("updatefromsandbox",function(Yh){_this76.showElementAndHideCanvas(Yh.target);var Gh={value:function value(eu){var _eu$detail$value;Fh.userValue=(_eu$detail$value=eu.detail.value)!==null&&_eu$detail$value!==void 0?_eu$detail$value:"",Ie.setValue(cr,{value:Fh.userValue.toString()}),eu.target.value=Fh.userValue},formattedValue:function formattedValue(eu){var ru=eu.detail.formattedValue;Fh.formattedValue=ru,ru!=null&&eu.target!==document.activeElement&&(eu.target.value=ru),Ie.setValue(cr,{formattedValue:ru})},selRange:function selRange(eu){var _eu$target;(_eu$target=eu.target).setSelectionRange.apply(_eu$target,_toConsumableArray(eu.detail.selRange))},charLimit:function charLimit(eu){var ru;var yy=eu.detail.charLimit,wy=eu.target;if(yy===0){wy.removeAttribute("maxLength");return}wy.setAttribute("maxLength",yy);var wm=Fh.userValue;!wm||wm.length<=yy||(wm=wm.slice(0,yy),wy.value=Fh.userValue=wm,Ie.setValue(cr,{value:wm}),(ru=_this76.linkService.eventBus)==null||ru.dispatch("dispatcheventinsandbox",{source:_this76,detail:{id:cr,name:"Keystroke",value:wm,willCommit:!0,commitKey:1,selStart:wy.selectionStart,selEnd:wy.selectionEnd}}))}};_this76._dispatchEventFromSandbox(Gh,Yh)}),lr.addEventListener("keydown",function(Yh){var Gh;Fh.commitKey=1;var eu=-1;if(Yh.key==="Escape"?eu=0:Yh.key==="Enter"&&!_this76.data.multiLine?eu=2:Yh.key==="Tab"&&(Fh.commitKey=3),eu===-1)return;var ru=Yh.target.value;Fh.lastCommittedValue!==ru&&(Fh.lastCommittedValue=ru,Fh.userValue=ru,(Gh=_this76.linkService.eventBus)==null||Gh.dispatch("dispatcheventinsandbox",{source:_this76,detail:{id:cr,name:"Keystroke",value:ru,willCommit:!0,commitKey:eu,selStart:Yh.target.selectionStart,selEnd:Yh.target.selectionEnd}}))});var Uh=tu;tu=null,lr.addEventListener("blur",function(Yh){var Gh;if(!Fh.focused||!Yh.relatedTarget)return;Fh.focused=!1;var eu=Yh.target.value;Fh.userValue=eu,Fh.lastCommittedValue!==eu&&((Gh=_this76.linkService.eventBus)==null||Gh.dispatch("dispatcheventinsandbox",{source:_this76,detail:{id:cr,name:"Keystroke",value:eu,willCommit:!0,commitKey:Fh.commitKey,selStart:Yh.target.selectionStart,selEnd:Yh.target.selectionEnd}})),Uh(Yh)}),(ye=this.data.actions)!=null&&ye.Keystroke&&lr.addEventListener("beforeinput",function(Yh){var Gh;Fh.lastCommittedValue=null;var eu=Yh.data,ru=Yh.target,yy=ru.value,wy=ru.selectionStart,wm=ru.selectionEnd;var bm=wy,_m=wm;switch(Yh.inputType){case"deleteWordBackward":{var gm=yy.substring(0,wy).match(/\w*[^\w]*$/);gm&&(bm-=gm[0].length);break}case"deleteWordForward":{var _gm=yy.substring(wy).match(/^[^\w]*\w*/);_gm&&(_m+=_gm[0].length);break}case"deleteContentBackward":wy===wm&&(bm-=1);break;case"deleteContentForward":wy===wm&&(_m+=1);break}Yh.preventDefault(),(Gh=_this76.linkService.eventBus)==null||Gh.dispatch("dispatcheventinsandbox",{source:_this76,detail:{id:cr,name:"Keystroke",value:yy,change:eu||"",willCommit:!1,selStart:bm,selEnd:_m}})}),this._setEventListeners(lr,Fh,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],function(Yh){return Yh.target.value})}if(tu&&lr.addEventListener("blur",tu),this.data.comb){var _Uh3=(this.data.rect[2]-this.data.rect[0])/Wh;lr.classList.add("comb"),lr.style.letterSpacing="calc(".concat(_Uh3,"px * var(--scale-factor) - 1ch)")}}else lr=document.createElement("div"),lr.textContent=this.data.fieldValue,lr.style.verticalAlign="middle",lr.style.display="table-cell";return this._setTextStyle(lr),this._setBackgroundColor(lr),this._setDefaultPropertiesFromJS(lr),this.container.append(lr),this.container}}]);return jh}(Oh);var qh=function(_Oh4){_inherits(qh,_Oh4);function qh(ke){_classCallCheck(this,qh);return _callSuper(this,qh,[ke,{isRenderable:!!ke.data.hasOwnCanvas}])}return _createClass(qh)}(Oh);var Bh=function(_Oh5){_inherits(Bh,_Oh5);function Bh(ke){_classCallCheck(this,Bh);return _callSuper(this,Bh,[ke,{isRenderable:ke.renderForms}])}_createClass(Bh,[{key:"render",value:function render(){var _this77=this;var ke=this.annotationStorage,ye=this.data,Ie=ye.id;var cr=ke.getValue(Ie,{value:ye.exportValue===ye.fieldValue}).value;typeof cr=="string"&&(cr=cr!=="Off",ke.setValue(Ie,{value:cr})),this.container.classList.add("buttonWidgetAnnotation","checkBox");var lr=document.createElement("input");return Th.add(lr),lr.setAttribute("data-element-id",Ie),lr.disabled=ye.readOnly,this._setRequired(lr,this.data.required),lr.type="checkbox",lr.name=ye.fieldName,cr&&lr.setAttribute("checked",!0),lr.setAttribute("exportValue",ye.exportValue),lr.tabIndex=Ih,lr.addEventListener("change",function(Ss){var _Ss$target=Ss.target,kl=_Ss$target.name,Wh=_Ss$target.checked;var _iterator127=_createForOfIteratorHelper(_this77._getElementsByName(kl,Ie)),_step127;try{for(_iterator127.s();!(_step127=_iterator127.n()).done;){var zh=_step127.value;var Fh=Wh&&zh.exportValue===ye.exportValue;zh.domElement&&(zh.domElement.checked=Fh),ke.setValue(zh.id,{value:Fh})}}catch(err){_iterator127.e(err)}finally{_iterator127.f()}ke.setValue(Ie,{value:Wh})}),lr.addEventListener("resetform",function(Ss){var kl=ye.defaultFieldValue||"Off";Ss.target.checked=kl===ye.exportValue}),this.enableScripting&&this.hasJSActions&&(lr.addEventListener("updatefromsandbox",function(Ss){var kl={value:function value(Wh){Wh.target.checked=Wh.detail.value!=="Off",ke.setValue(Ie,{value:Wh.target.checked})}};_this77._dispatchEventFromSandbox(kl,Ss)}),this._setEventListeners(lr,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],function(Ss){return Ss.target.checked})),this._setBackgroundColor(lr),this._setDefaultPropertiesFromJS(lr),this.container.append(lr),this.container}}]);return Bh}(Oh);var Jh=function(_Oh6){_inherits(Jh,_Oh6);function Jh(ke){_classCallCheck(this,Jh);return _callSuper(this,Jh,[ke,{isRenderable:ke.renderForms}])}_createClass(Jh,[{key:"render",value:function render(){var _this78=this;this.container.classList.add("buttonWidgetAnnotation","radioButton");var ke=this.annotationStorage,ye=this.data,Ie=ye.id;var cr=ke.getValue(Ie,{value:ye.fieldValue===ye.buttonValue}).value;typeof cr=="string"&&(cr=cr!==ye.buttonValue,ke.setValue(Ie,{value:cr}));var lr=document.createElement("input");if(Th.add(lr),lr.setAttribute("data-element-id",Ie),lr.disabled=ye.readOnly,this._setRequired(lr,this.data.required),lr.type="radio",lr.name=ye.fieldName,cr&&lr.setAttribute("checked",!0),lr.tabIndex=Ih,lr.addEventListener("change",function(Ss){var _Ss$target2=Ss.target,kl=_Ss$target2.name,Wh=_Ss$target2.checked;var _iterator128=_createForOfIteratorHelper(_this78._getElementsByName(kl,Ie)),_step128;try{for(_iterator128.s();!(_step128=_iterator128.n()).done;){var zh=_step128.value;ke.setValue(zh.id,{value:!1})}}catch(err){_iterator128.e(err)}finally{_iterator128.f()}ke.setValue(Ie,{value:Wh})}),lr.addEventListener("resetform",function(Ss){var kl=ye.defaultFieldValue;Ss.target.checked=kl!=null&&kl===ye.buttonValue}),this.enableScripting&&this.hasJSActions){var Ss=ye.buttonValue;lr.addEventListener("updatefromsandbox",function(kl){var Wh={value:function value(zh){var Fh=Ss===zh.detail.value;var _iterator129=_createForOfIteratorHelper(_this78._getElementsByName(zh.target.name)),_step129;try{for(_iterator129.s();!(_step129=_iterator129.n()).done;){var tu=_step129.value;var Uh=Fh&&tu.id===Ie;tu.domElement&&(tu.domElement.checked=Uh),ke.setValue(tu.id,{value:Uh})}}catch(err){_iterator129.e(err)}finally{_iterator129.f()}}};_this78._dispatchEventFromSandbox(Wh,kl)}),this._setEventListeners(lr,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],function(kl){return kl.target.checked})}return this._setBackgroundColor(lr),this._setDefaultPropertiesFromJS(lr),this.container.append(lr),this.container}}]);return Jh}(Oh);var Xh=function(_ta6){_inherits(Xh,_ta6);function Xh(ke){_classCallCheck(this,Xh);return _callSuper(this,Xh,[ke,{ignoreBorder:ke.data.hasAppearance}])}_createClass(Xh,[{key:"render",value:function render(){var _this79=this;var ke=_get(_getPrototypeOf(Xh.prototype),"render",this).call(this);ke.classList.add("buttonWidgetAnnotation","pushButton"),this.data.alternativeText&&(ke.title=this.data.alternativeText);var ye=ke.lastChild;return this.enableScripting&&this.hasJSActions&&ye&&(this._setDefaultPropertiesFromJS(ye),ye.addEventListener("updatefromsandbox",function(Ie){_this79._dispatchEventFromSandbox({},Ie)})),ke}}]);return Xh}(ta);var Qh=function(_Oh7){_inherits(Qh,_Oh7);function Qh(ke){_classCallCheck(this,Qh);return _callSuper(this,Qh,[ke,{isRenderable:ke.renderForms}])}_createClass(Qh,[{key:"render",value:function render(){var _this80=this;this.container.classList.add("choiceWidgetAnnotation");var ke=this.annotationStorage,ye=this.data.id,Ie=ke.getValue(ye,{value:this.data.fieldValue}),cr=document.createElement("select");Th.add(cr),cr.setAttribute("data-element-id",ye),cr.disabled=this.data.readOnly,this._setRequired(cr,this.data.required),cr.name=this.data.fieldName,cr.tabIndex=Ih;var lr=this.data.combo&&this.data.options.length>0;this.data.combo||(cr.size=this.data.options.length,this.data.multiSelect&&(cr.multiple=!0)),cr.addEventListener("resetform",function(Fh){var tu=_this80.data.defaultFieldValue;var _iterator130=_createForOfIteratorHelper(cr.options),_step130;try{for(_iterator130.s();!(_step130=_iterator130.n()).done;){var Uh=_step130.value;Uh.selected=Uh.value===tu}}catch(err){_iterator130.e(err)}finally{_iterator130.f()}});var _iterator131=_createForOfIteratorHelper(this.data.options),_step131;try{for(_iterator131.s();!(_step131=_iterator131.n()).done;){var _Fh=_step131.value;var tu=document.createElement("option");tu.textContent=_Fh.displayValue,tu.value=_Fh.exportValue,Ie.value.includes(_Fh.exportValue)&&(tu.setAttribute("selected",!0),lr=!1),cr.append(tu)}}catch(err){_iterator131.e(err)}finally{_iterator131.f()}var _Ss5=null;if(lr){var Fh=document.createElement("option");Fh.value=" ",Fh.setAttribute("hidden",!0),Fh.setAttribute("selected",!0),cr.prepend(Fh),_Ss5=function Ss(){Fh.remove(),cr.removeEventListener("input",_Ss5),_Ss5=null},cr.addEventListener("input",_Ss5)}var kl=function kl(Fh){var tu=Fh?"value":"textContent",Uh=cr.options,Yh=cr.multiple;return Yh?Array.prototype.filter.call(Uh,function(Gh){return Gh.selected}).map(function(Gh){return Gh[tu]}):Uh.selectedIndex===-1?null:Uh[Uh.selectedIndex][tu]};var Wh=kl(!1);var zh=function zh(Fh){var tu=Fh.target.options;return Array.prototype.map.call(tu,function(Uh){return{displayValue:Uh.textContent,exportValue:Uh.value}})};return this.enableScripting&&this.hasJSActions?(cr.addEventListener("updatefromsandbox",function(Fh){var tu={value:function value(Uh){_Ss5==null||_Ss5();var Yh=Uh.detail.value,Gh=new Set(Array.isArray(Yh)?Yh:[Yh]);var _iterator132=_createForOfIteratorHelper(cr.options),_step132;try{for(_iterator132.s();!(_step132=_iterator132.n()).done;){var eu=_step132.value;eu.selected=Gh.has(eu.value)}}catch(err){_iterator132.e(err)}finally{_iterator132.f()}ke.setValue(ye,{value:kl(!0)}),Wh=kl(!1)},multipleSelection:function multipleSelection(Uh){cr.multiple=!0},remove:function remove(Uh){var Yh=cr.options,Gh=Uh.detail.remove;Yh[Gh].selected=!1,cr.remove(Gh),Yh.length>0&&Array.prototype.findIndex.call(Yh,function(eu){return eu.selected})===-1&&(Yh[0].selected=!0),ke.setValue(ye,{value:kl(!0),items:zh(Uh)}),Wh=kl(!1)},clear:function clear(Uh){for(;cr.length!==0;)cr.remove(0);ke.setValue(ye,{value:null,items:[]}),Wh=kl(!1)},insert:function insert(Uh){var _Uh$detail$insert=Uh.detail.insert,Yh=_Uh$detail$insert.index,Gh=_Uh$detail$insert.displayValue,eu=_Uh$detail$insert.exportValue,ru=cr.children[Yh],yy=document.createElement("option");yy.textContent=Gh,yy.value=eu,ru?ru.before(yy):cr.append(yy),ke.setValue(ye,{value:kl(!0),items:zh(Uh)}),Wh=kl(!1)},items:function items(Uh){var Yh=Uh.detail.items;for(;cr.length!==0;)cr.remove(0);var _iterator133=_createForOfIteratorHelper(Yh),_step133;try{for(_iterator133.s();!(_step133=_iterator133.n()).done;){var Gh=_step133.value;var eu=Gh.displayValue,ru=Gh.exportValue,yy=document.createElement("option");yy.textContent=eu,yy.value=ru,cr.append(yy)}}catch(err){_iterator133.e(err)}finally{_iterator133.f()}cr.options.length>0&&(cr.options[0].selected=!0),ke.setValue(ye,{value:kl(!0),items:zh(Uh)}),Wh=kl(!1)},indices:function indices(Uh){var Yh=new Set(Uh.detail.indices);var _iterator134=_createForOfIteratorHelper(Uh.target.options),_step134;try{for(_iterator134.s();!(_step134=_iterator134.n()).done;){var Gh=_step134.value;Gh.selected=Yh.has(Gh.index)}}catch(err){_iterator134.e(err)}finally{_iterator134.f()}ke.setValue(ye,{value:kl(!0)}),Wh=kl(!1)},editable:function editable(Uh){Uh.target.disabled=!Uh.detail.editable}};_this80._dispatchEventFromSandbox(tu,Fh)}),cr.addEventListener("input",function(Fh){var tu;var Uh=kl(!0);ke.setValue(ye,{value:Uh}),Fh.preventDefault(),(tu=_this80.linkService.eventBus)==null||tu.dispatch("dispatcheventinsandbox",{source:_this80,detail:{id:ye,name:"Keystroke",value:Wh,changeEx:Uh,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(cr,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],function(Fh){return Fh.target.value})):cr.addEventListener("input",function(Fh){ke.setValue(ye,{value:kl(!0)})}),this.data.combo&&this._setTextStyle(cr),this._setBackgroundColor(cr),this._setDefaultPropertiesFromJS(cr),this.container.append(cr),this.container}}]);return Qh}(Oh);var Kh=function(_Ke7){_inherits(Kh,_Ke7);function Kh(ke){var _this81;_classCallCheck(this,Kh);var ye=ke.data,Ie=ke.elements;_this81=_callSuper(this,Kh,[ke,{isRenderable:Ke._hasPopupData(ye)}]),_this81.elements=Ie;return _this81}_createClass(Kh,[{key:"render",value:function render(){this.container.classList.add("popupAnnotation");var ke=new ia({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open}),ye=[];var _iterator135=_createForOfIteratorHelper(this.elements),_step135;try{for(_iterator135.s();!(_step135=_iterator135.n()).done;){var Ie=_step135.value;Ie.popup=ke,ye.push(Ie.data.id),Ie.addHighlightArea()}}catch(err){_iterator135.e(err)}finally{_iterator135.f()}return this.container.setAttribute("aria-controls",ye.map(function(Ie){return"".concat(Qr.AnnotationPrefix).concat(Ie)}).join(",")),this.container}}]);return Kh}(Ke);var ia=function(){function ia(_ref87){var ke=_ref87.container,ye=_ref87.color,Ie=_ref87.elements,cr=_ref87.titleObj,lr=_ref87.modificationDate,Ss=_ref87.contentsObj,kl=_ref87.richText,Wh=_ref87.parent,zh=_ref87.rect,Fh=_ref87.parentRect,tu=_ref87.open;_classCallCheck(this,ia);I(this,_e),I(this,He),I(this,Xo),I(this,xr),I(this,nt,null),I(this,ot,W(this,_e,Xe).bind(this)),I(this,dt,W(this,xr,pr).bind(this)),I(this,Mt,W(this,Xo,Se).bind(this)),I(this,Ot,W(this,He,ro).bind(this)),I(this,Qt,null),I(this,Ut,null),I(this,te,null),I(this,qt,null),I(this,ie,null),I(this,re,null),I(this,ne,!1),I(this,ae,null),I(this,Bt,null),I(this,Wt,null),I(this,oe,null),I(this,ve,!1);var Uh;Z(this,Ut,ke),Z(this,oe,cr),Z(this,te,Ss),Z(this,Wt,kl),Z(this,ie,Wh),Z(this,Qt,ye),Z(this,Bt,zh),Z(this,re,Fh),Z(this,qt,Ie);var Yh=Es.PDFDateString.toDateObject(lr);Yh&&Z(this,nt,Wh.l10n.get("annotation_date_string",{date:Yh.toLocaleDateString(),time:Yh.toLocaleTimeString()})),this.trigger=Ie.flatMap(function(Gh){return Gh.getElementsToTriggerPopup()});var _iterator136=_createForOfIteratorHelper(this.trigger),_step136;try{for(_iterator136.s();!(_step136=_iterator136.n()).done;){var Gh=_step136.value;Gh.addEventListener("click",t$1(this,Ot)),Gh.addEventListener("mouseenter",t$1(this,Mt)),Gh.addEventListener("mouseleave",t$1(this,dt)),Gh.classList.add("popupTriggerArea")}}catch(err){_iterator136.e(err)}finally{_iterator136.f()}var _iterator137=_createForOfIteratorHelper(Ie),_step137;try{for(_iterator137.s();!(_step137=_iterator137.n()).done;){var _Gh5=_step137.value;(Uh=_Gh5.container)==null||Uh.addEventListener("keydown",t$1(this,ot))}}catch(err){_iterator137.e(err)}finally{_iterator137.f()}t$1(this,Ut).hidden=!0,tu&&W(this,He,ro).call(this)}_createClass(ia,[{key:"render",value:function render(){var _t$9;if(t$1(this,ae))return;var _t$8=t$1(this,ie),ke=_t$8.page.view,_t$8$viewport$rawDims=_t$8.viewport.rawDims,ye=_t$8$viewport$rawDims.pageWidth,Ie=_t$8$viewport$rawDims.pageHeight,cr=_t$8$viewport$rawDims.pageX,lr=_t$8$viewport$rawDims.pageY,Ss=Z(this,ae,document.createElement("div"));if(Ss.className="popup",t$1(this,Qt)){var _Qr$Util,_Qr$Util2;var wy=Ss.style.outlineColor=(_Qr$Util=Qr.Util).makeHexColor.apply(_Qr$Util,_toConsumableArray(t$1(this,Qt)));CSS.supports("background-color","color-mix(in srgb, red 30%, white)")?Ss.style.backgroundColor="color-mix(in srgb, ".concat(wy," 30%, white)"):Ss.style.backgroundColor=(_Qr$Util2=Qr.Util).makeHexColor.apply(_Qr$Util2,_toConsumableArray(t$1(this,Qt).map(function(wm){return Math.floor(0.7*(255-wm)+wm)})))}var kl=document.createElement("span");kl.className="header";var Wh=document.createElement("h1");if(kl.append(Wh),(_t$9=t$1(this,oe),Wh.dir=_t$9.dir,Wh.textContent=_t$9.str),Ss.append(kl),t$1(this,nt)){var _wy2=document.createElement("span");_wy2.classList.add("popupDate"),t$1(this,nt).then(function(wm){_wy2.textContent=wm}),kl.append(_wy2)}var zh=t$1(this,te),Fh=t$1(this,Wt);if(Fh!=null&&Fh.str&&(!(zh!=null&&zh.str)||zh.str===Fh.str))_l.XfaLayer.render({xfaHtml:Fh.html,intent:"richText",div:Ss}),Ss.lastChild.classList.add("richText","popupContent");else{var _wy3=this._formatContents(zh);Ss.append(_wy3)}var tu=!!t$1(this,re),Uh=tu?t$1(this,re):t$1(this,Bt);var _iterator138=_createForOfIteratorHelper(t$1(this,qt)),_step138;try{for(_iterator138.s();!(_step138=_iterator138.n()).done;){var _wy4=_step138.value;if(!Uh||Qr.Util.intersect(_wy4.data.rect,Uh)!==null){Uh=_wy4.data.rect,tu=!0;break}}}catch(err){_iterator138.e(err)}finally{_iterator138.f()}var Yh=Qr.Util.normalizeRect([Uh[0],ke[3]-Uh[1]+ke[1],Uh[2],ke[3]-Uh[3]+ke[1]]),Gh=tu?Uh[2]-Uh[0]+5:0,eu=Yh[0]+Gh,ru=Yh[1],_t$10=t$1(this,Ut),yy=_t$10.style;yy.left="".concat(100*(eu-cr)/ye,"%"),yy.top="".concat(100*(ru-lr)/Ie,"%"),t$1(this,Ut).append(Ss)}},{key:"_formatContents",value:function _formatContents(_ref88){var ke=_ref88.str,ye=_ref88.dir;var Ie=document.createElement("p");Ie.classList.add("popupContent"),Ie.dir=ye;var cr=ke.split(/(?:\r\n?|\n)/);for(var lr=0,Ss=cr.length;lr<Ss;++lr){var kl=cr[lr];Ie.append(document.createTextNode(kl)),lr<Ss-1&&Ie.append(document.createElement("br"))}return Ie}},{key:"forceHide",value:function forceHide(){Z(this,ve,this.isVisible),t$1(this,ve)&&(t$1(this,Ut).hidden=!0)}},{key:"maybeShow",value:function maybeShow(){t$1(this,ve)&&(Z(this,ve,!1),t$1(this,Ut).hidden=!1)}},{key:"isVisible",get:function get(){return t$1(this,Ut).hidden===!1}}]);return ia}();nt=new WeakMap,ot=new WeakMap,dt=new WeakMap,Mt=new WeakMap,Ot=new WeakMap,Qt=new WeakMap,Ut=new WeakMap,te=new WeakMap,qt=new WeakMap,ie=new WeakMap,re=new WeakMap,ne=new WeakMap,ae=new WeakMap,Bt=new WeakMap,Wt=new WeakMap,oe=new WeakMap,ve=new WeakMap,_e=new WeakSet,Xe=function Xe(Hh){Hh.altKey||Hh.shiftKey||Hh.ctrlKey||Hh.metaKey||(Hh.key==="Enter"||Hh.key==="Escape"&&t$1(this,ne))&&W(this,He,ro).call(this)},He=new WeakSet,ro=function ro(){Z(this,ne,!t$1(this,ne)),t$1(this,ne)?(W(this,Xo,Se).call(this),t$1(this,Ut).addEventListener("click",t$1(this,Ot)),t$1(this,Ut).addEventListener("keydown",t$1(this,ot))):(W(this,xr,pr).call(this),t$1(this,Ut).removeEventListener("click",t$1(this,Ot)),t$1(this,Ut).removeEventListener("keydown",t$1(this,ot)))},Xo=new WeakSet,Se=function Se(){t$1(this,ae)||this.render(),this.isVisible?t$1(this,ne)&&t$1(this,Ut).classList.add("focused"):(t$1(this,Ut).hidden=!1,t$1(this,Ut).style.zIndex=parseInt(t$1(this,Ut).style.zIndex)+1e3)},xr=new WeakSet,pr=function pr(){t$1(this,Ut).classList.remove("focused"),!(t$1(this,ne)||!this.isVisible)&&(t$1(this,Ut).hidden=!0,t$1(this,Ut).style.zIndex=parseInt(t$1(this,Ut).style.zIndex)-1e3)};var fe=function(_Ke8){_inherits(fe,_Ke8);function fe(ke){var _this82;_classCallCheck(this,fe);_this82=_callSuper(this,fe,[ke,{isRenderable:!0,ignoreBorder:!0}]),_this82.textContent=ke.data.textContent,_this82.textPosition=ke.data.textPosition,_this82.annotationEditorType=Qr.AnnotationEditorType.FREETEXT;return _this82}_createClass(fe,[{key:"render",value:function render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){var ke=document.createElement("div");ke.classList.add("annotationTextContent"),ke.setAttribute("role","comment");var _iterator139=_createForOfIteratorHelper(this.textContent),_step139;try{for(_iterator139.s();!(_step139=_iterator139.n()).done;){var ye=_step139.value;var Ie=document.createElement("span");Ie.textContent=ye,ke.append(Ie)}}catch(err){_iterator139.e(err)}finally{_iterator139.f()}this.container.append(ke)}return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}}]);return fe}(Ke);o.FreeTextAnnotationElement=fe;var Me=function(_Ke9){_inherits(Me,_Ke9);function Me(ke){var _this83;_classCallCheck(this,Me);_this83=_callSuper(this,Me,[ke,{isRenderable:!0,ignoreBorder:!0}]),I(_assertThisInitialized(_this83),$e,null);return _this83}_createClass(Me,[{key:"render",value:function render(){this.container.classList.add("lineAnnotation");var ke=this.data,_$s4=$s(ke.rect),ye=_$s4.width,Ie=_$s4.height,cr=this.svgFactory.create(ye,Ie,!0),lr=Z(this,$e,this.svgFactory.createElement("svg:line"));return lr.setAttribute("x1",ke.rect[2]-ke.lineCoordinates[0]),lr.setAttribute("y1",ke.rect[3]-ke.lineCoordinates[1]),lr.setAttribute("x2",ke.rect[2]-ke.lineCoordinates[2]),lr.setAttribute("y2",ke.rect[3]-ke.lineCoordinates[3]),lr.setAttribute("stroke-width",ke.borderStyle.width||1),lr.setAttribute("stroke","transparent"),lr.setAttribute("fill","transparent"),cr.append(lr),this.container.append(cr),!ke.popupRef&&this.hasPopupData&&this._createPopup(),this.container}},{key:"getElementsToTriggerPopup",value:function getElementsToTriggerPopup(){return t$1(this,$e)}},{key:"addHighlightArea",value:function addHighlightArea(){this.container.classList.add("highlightArea")}}]);return Me}(Ke);$e=new WeakMap;var kr=function(_Ke10){_inherits(kr,_Ke10);function kr(ke){var _this84;_classCallCheck(this,kr);_this84=_callSuper(this,kr,[ke,{isRenderable:!0,ignoreBorder:!0}]),I(_assertThisInitialized(_this84),_r,null);return _this84}_createClass(kr,[{key:"render",value:function render(){this.container.classList.add("squareAnnotation");var ke=this.data,_$s5=$s(ke.rect),ye=_$s5.width,Ie=_$s5.height,cr=this.svgFactory.create(ye,Ie,!0),lr=ke.borderStyle.width,Ss=Z(this,_r,this.svgFactory.createElement("svg:rect"));return Ss.setAttribute("x",lr/2),Ss.setAttribute("y",lr/2),Ss.setAttribute("width",ye-lr),Ss.setAttribute("height",Ie-lr),Ss.setAttribute("stroke-width",lr||1),Ss.setAttribute("stroke","transparent"),Ss.setAttribute("fill","transparent"),cr.append(Ss),this.container.append(cr),!ke.popupRef&&this.hasPopupData&&this._createPopup(),this.container}},{key:"getElementsToTriggerPopup",value:function getElementsToTriggerPopup(){return t$1(this,_r)}},{key:"addHighlightArea",value:function addHighlightArea(){this.container.classList.add("highlightArea")}}]);return kr}(Ke);_r=new WeakMap;var rn=function(_Ke11){_inherits(rn,_Ke11);function rn(ke){var _this85;_classCallCheck(this,rn);_this85=_callSuper(this,rn,[ke,{isRenderable:!0,ignoreBorder:!0}]),I(_assertThisInitialized(_this85),Ps,null);return _this85}_createClass(rn,[{key:"render",value:function render(){this.container.classList.add("circleAnnotation");var ke=this.data,_$s6=$s(ke.rect),ye=_$s6.width,Ie=_$s6.height,cr=this.svgFactory.create(ye,Ie,!0),lr=ke.borderStyle.width,Ss=Z(this,Ps,this.svgFactory.createElement("svg:ellipse"));return Ss.setAttribute("cx",ye/2),Ss.setAttribute("cy",Ie/2),Ss.setAttribute("rx",ye/2-lr/2),Ss.setAttribute("ry",Ie/2-lr/2),Ss.setAttribute("stroke-width",lr||1),Ss.setAttribute("stroke","transparent"),Ss.setAttribute("fill","transparent"),cr.append(Ss),this.container.append(cr),!ke.popupRef&&this.hasPopupData&&this._createPopup(),this.container}},{key:"getElementsToTriggerPopup",value:function getElementsToTriggerPopup(){return t$1(this,Ps)}},{key:"addHighlightArea",value:function addHighlightArea(){this.container.classList.add("highlightArea")}}]);return rn}(Ke);Ps=new WeakMap;var Oe=function(_Ke12){_inherits(Oe,_Ke12);function Oe(ke){var _this86;_classCallCheck(this,Oe);_this86=_callSuper(this,Oe,[ke,{isRenderable:!0,ignoreBorder:!0}]),I(_assertThisInitialized(_this86),qe,null),_this86.containerClassName="polylineAnnotation",_this86.svgElementName="svg:polyline";return _this86}_createClass(Oe,[{key:"render",value:function render(){this.container.classList.add(this.containerClassName);var ke=this.data,_$s7=$s(ke.rect),ye=_$s7.width,Ie=_$s7.height,cr=this.svgFactory.create(ye,Ie,!0);var lr=[];var _iterator140=_createForOfIteratorHelper(ke.vertices),_step140;try{for(_iterator140.s();!(_step140=_iterator140.n()).done;){var kl=_step140.value;var Wh=kl.x-ke.rect[0],zh=ke.rect[3]-kl.y;lr.push(Wh+","+zh)}}catch(err){_iterator140.e(err)}finally{_iterator140.f()}lr=lr.join(" ");var Ss=Z(this,qe,this.svgFactory.createElement(this.svgElementName));return Ss.setAttribute("points",lr),Ss.setAttribute("stroke-width",ke.borderStyle.width||1),Ss.setAttribute("stroke","transparent"),Ss.setAttribute("fill","transparent"),cr.append(Ss),this.container.append(cr),!ke.popupRef&&this.hasPopupData&&this._createPopup(),this.container}},{key:"getElementsToTriggerPopup",value:function getElementsToTriggerPopup(){return t$1(this,qe)}},{key:"addHighlightArea",value:function addHighlightArea(){this.container.classList.add("highlightArea")}}]);return Oe}(Ke);qe=new WeakMap;var wi=function(_Oe){_inherits(wi,_Oe);function wi(ke){var _this87;_classCallCheck(this,wi);_this87=_callSuper(this,wi,[ke]),_this87.containerClassName="polygonAnnotation",_this87.svgElementName="svg:polygon";return _this87}return _createClass(wi)}(Oe);var Jo=function(_Ke13){_inherits(Jo,_Ke13);function Jo(ke){_classCallCheck(this,Jo);return _callSuper(this,Jo,[ke,{isRenderable:!0,ignoreBorder:!0}])}_createClass(Jo,[{key:"render",value:function render(){return this.container.classList.add("caretAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}]);return Jo}(Ke);var xl=function(_Ke14){_inherits(xl,_Ke14);function xl(ke){var _this88;_classCallCheck(this,xl);_this88=_callSuper(this,xl,[ke,{isRenderable:!0,ignoreBorder:!0}]),I(_assertThisInitialized(_this88),bl,[]),_this88.containerClassName="inkAnnotation",_this88.svgElementName="svg:polyline",_this88.annotationEditorType=Qr.AnnotationEditorType.INK;return _this88}_createClass(xl,[{key:"render",value:function render(){this.container.classList.add(this.containerClassName);var ke=this.data,_$s8=$s(ke.rect),ye=_$s8.width,Ie=_$s8.height,cr=this.svgFactory.create(ye,Ie,!0);var _iterator141=_createForOfIteratorHelper(ke.inkLists),_step141;try{for(_iterator141.s();!(_step141=_iterator141.n()).done;){var lr=_step141.value;var Ss=[];var _iterator142=_createForOfIteratorHelper(lr),_step142;try{for(_iterator142.s();!(_step142=_iterator142.n()).done;){var Wh=_step142.value;var zh=Wh.x-ke.rect[0],Fh=ke.rect[3]-Wh.y;Ss.push("".concat(zh,",").concat(Fh))}}catch(err){_iterator142.e(err)}finally{_iterator142.f()}Ss=Ss.join(" ");var kl=this.svgFactory.createElement(this.svgElementName);t$1(this,bl).push(kl),kl.setAttribute("points",Ss),kl.setAttribute("stroke-width",ke.borderStyle.width||1),kl.setAttribute("stroke","transparent"),kl.setAttribute("fill","transparent"),!ke.popupRef&&this.hasPopupData&&this._createPopup(),cr.append(kl)}}catch(err){_iterator141.e(err)}finally{_iterator141.f()}return this.container.append(cr),this.container}},{key:"getElementsToTriggerPopup",value:function getElementsToTriggerPopup(){return t$1(this,bl)}},{key:"addHighlightArea",value:function addHighlightArea(){this.container.classList.add("highlightArea")}}]);return xl}(Ke);bl=new WeakMap,o.InkAnnotationElement=xl;var Pd=function(_Ke15){_inherits(Pd,_Ke15);function Pd(ke){_classCallCheck(this,Pd);return _callSuper(this,Pd,[ke,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0}])}_createClass(Pd,[{key:"render",value:function render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("highlightAnnotation"),this.container}}]);return Pd}(Ke);var Dh=function(_Ke16){_inherits(Dh,_Ke16);function Dh(ke){_classCallCheck(this,Dh);return _callSuper(this,Dh,[ke,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0}])}_createClass(Dh,[{key:"render",value:function render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("underlineAnnotation"),this.container}}]);return Dh}(Ke);var Vh=function(_Ke17){_inherits(Vh,_Ke17);function Vh(ke){_classCallCheck(this,Vh);return _callSuper(this,Vh,[ke,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0}])}_createClass(Vh,[{key:"render",value:function render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("squigglyAnnotation"),this.container}}]);return Vh}(Ke);var Ed=function(_Ke18){_inherits(Ed,_Ke18);function Ed(ke){_classCallCheck(this,Ed);return _callSuper(this,Ed,[ke,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0}])}_createClass(Ed,[{key:"render",value:function render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("strikeoutAnnotation"),this.container}}]);return Ed}(Ke);var Nh=function(_Ke19){_inherits(Nh,_Ke19);function Nh(ke){_classCallCheck(this,Nh);return _callSuper(this,Nh,[ke,{isRenderable:!0,ignoreBorder:!0}])}_createClass(Nh,[{key:"render",value:function render(){return this.container.classList.add("stampAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}]);return Nh}(Ke);o.StampAnnotationElement=Nh;var Zh=function(_Ke20){_inherits(Zh,_Ke20);function Zh(ke){var _this89;_classCallCheck(this,Zh);var ye;_this89=_callSuper(this,Zh,[ke,{isRenderable:!0}]),I(_assertThisInitialized(_this89),Te),I(_assertThisInitialized(_this89),ol,null);var _this89$data$file=_this89.data.file,Ie=_this89$data$file.filename,cr=_this89$data$file.content;_this89.filename=(0,Es.getFilenameFromUrl)(Ie,!0),_this89.content=cr,(ye=_this89.linkService.eventBus)==null||ye.dispatch("fileattachmentannotation",{source:_assertThisInitialized(_this89),filename:Ie,content:cr});return _this89}_createClass(Zh,[{key:"render",value:function render(){var _this90=this;this.container.classList.add("fileAttachmentAnnotation");var ke=this.container,ye=this.data;var Ie;ye.hasAppearance||ye.fillAlpha===0?Ie=document.createElement("div"):(Ie=document.createElement("img"),Ie.src="".concat(this.imageResourcesPath,"annotation-").concat(/paperclip/i.test(ye.name)?"paperclip":"pushpin",".svg"),ye.fillAlpha&&ye.fillAlpha<1&&(Ie.style="filter: opacity(".concat(Math.round(ye.fillAlpha*100),"%);"))),Ie.addEventListener("dblclick",W(this,Te,pe).bind(this)),Z(this,ol,Ie);var cr=Qr.FeatureTest.platform.isMac;return ke.addEventListener("keydown",function(lr){lr.key==="Enter"&&(cr?lr.metaKey:lr.ctrlKey)&&W(_this90,Te,pe).call(_this90)}),!ye.popupRef&&this.hasPopupData?this._createPopup():Ie.classList.add("popupTriggerArea"),ke.append(Ie),ke}},{key:"getElementsToTriggerPopup",value:function getElementsToTriggerPopup(){return t$1(this,ol)}},{key:"addHighlightArea",value:function addHighlightArea(){this.container.classList.add("highlightArea")}}]);return Zh}(Ke);ol=new WeakMap,Te=new WeakSet,pe=function pe(){var Hh;(Hh=this.downloadManager)==null||Hh.openOrDownloadData(this.container,this.content,this.filename)};var py=function(){function py(_ref89){var ke=_ref89.div,ye=_ref89.accessibilityManager,Ie=_ref89.annotationCanvasMap,cr=_ref89.l10n,lr=_ref89.page,Ss=_ref89.viewport;_classCallCheck(this,py);I(this,Ae),I(this,pi),I(this,ue,null),I(this,se,null),I(this,be,new Map),this.div=ke,Z(this,ue,ye),Z(this,se,Ie),this.l10n=cr,this.page=lr,this.viewport=Ss,this.zIndex=0,this.l10n||(this.l10n=$l.NullL10n)}_createClass(py,[{key:"render",value:function(){var _render2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee28(ke){var ye,Ie,cr,lr,_iterator143,_step143,Ss,kl,Fh,_$s9,_Fh2,tu,Wh,_Fh3,zh;return _regeneratorRuntime().wrap(function _callee28$(_context28){while(1)switch(_context28.prev=_context28.next){case 0:ye=ke.annotations,Ie=this.div;(0,Es.setLayerDimensions)(Ie,this.viewport);cr=new Map,lr={data:null,layer:Ie,linkService:ke.linkService,downloadManager:ke.downloadManager,imageResourcesPath:ke.imageResourcesPath||"",renderForms:ke.renderForms!==!1,svgFactory:new Es.DOMSVGFactory,annotationStorage:ke.annotationStorage||new nl.AnnotationStorage,enableScripting:ke.enableScripting===!0,hasJSActions:ke.hasJSActions,fieldObjects:ke.fieldObjects,parent:this,elements:null};_iterator143=_createForOfIteratorHelper(ye);_context28.prev=4;_iterator143.s();case 6:if((_step143=_iterator143.n()).done){_context28.next=31;break}Ss=_step143.value;if(!Ss.noHTML){_context28.next=10;break}return _context28.abrupt("continue",29);case 10:kl=Ss.annotationType===Qr.AnnotationType.POPUP;if(!kl){_context28.next=18;break}Fh=cr.get(Ss.id);if(Fh){_context28.next=15;break}return _context28.abrupt("continue",29);case 15:lr.elements=Fh;_context28.next=21;break;case 18:_$s9=$s(Ss.rect),_Fh2=_$s9.width,tu=_$s9.height;if(!(_Fh2<=0||tu<=0)){_context28.next=21;break}return _context28.abrupt("continue",29);case 21:lr.data=Ss;Wh=Dr.create(lr);if(Wh.isRenderable){_context28.next=25;break}return _context28.abrupt("continue",29);case 25:if(!kl&&Ss.popupRef){_Fh3=cr.get(Ss.popupRef);_Fh3?_Fh3.push(Wh):cr.set(Ss.popupRef,[Wh])}Wh.annotationEditorType>0&&t$1(this,be).set(Wh.data.id,Wh);zh=Wh.render();Ss.hidden&&(zh.style.visibility="hidden"),W(this,Ae,ze).call(this,zh,Ss.id);case 29:_context28.next=6;break;case 31:_context28.next=36;break;case 33:_context28.prev=33;_context28.t0=_context28["catch"](4);_iterator143.e(_context28.t0);case 36:_context28.prev=36;_iterator143.f();return _context28.finish(36);case 39:W(this,pi,io).call(this);_context28.next=42;return this.l10n.translate(Ie);case 42:case"end":return _context28.stop()}},_callee28,this,[[4,33,36,39]])}));function render(_x16){return _render2.apply(this,arguments)}return render}()},{key:"update",value:function update(_ref90){var ke=_ref90.viewport;var ye=this.div;this.viewport=ke,(0,Es.setLayerDimensions)(ye,{rotation:ke.rotation}),W(this,pi,io).call(this),ye.hidden=!1}},{key:"getEditableAnnotations",value:function getEditableAnnotations(){return Array.from(t$1(this,be).values())}},{key:"getEditableAnnotation",value:function getEditableAnnotation(ke){return t$1(this,be).get(ke)}}]);return py}();ue=new WeakMap,se=new WeakMap,be=new WeakMap,Ae=new WeakSet,ze=function ze(Hh,ke){var ye;var Ie=Hh.firstChild||Hh;Ie.id="".concat(Qr.AnnotationPrefix).concat(ke),this.div.append(Hh),(ye=t$1(this,ue))==null||ye.moveElementInDOM(this.div,Hh,Ie,!1)},pi=new WeakSet,io=function io(){if(!t$1(this,se))return;var Hh=this.div;var _iterator144=_createForOfIteratorHelper(t$1(this,se)),_step144;try{for(_iterator144.s();!(_step144=_iterator144.n()).done;){var _step144$value=_slicedToArray(_step144.value,2),ke=_step144$value[0],ye=_step144$value[1];var Ie=Hh.querySelector("[data-annotation-id=\"".concat(ke,"\"]"));if(!Ie)continue;var cr=Ie.firstChild;cr?cr.nodeName==="CANVAS"?cr.replaceWith(ye):cr.before(ye):Ie.append(ye)}}catch(err){_iterator144.e(err)}finally{_iterator144.f()}t$1(this,se).clear()},o.AnnotationLayer=py},function(r,o){Object.defineProperty(o,"__esModule",{value:!0}),o.ColorConverters=void 0;function s(Y){return Math.floor(Math.max(0,Math.min(1,Y))*255).toString(16).padStart(2,"0")}function B(Y){return Math.max(0,Math.min(255,255*Y))}var Q=function(){function Q(){_classCallCheck(this,Q)}_createClass(Q,null,[{key:"CMYK_G",value:function CMYK_G(_ref91){var _ref92=_slicedToArray(_ref91,4),J=_ref92[0],it=_ref92[1],nt=_ref92[2],ot=_ref92[3];return["G",1-Math.min(1,0.3*J+0.59*nt+0.11*it+ot)]}},{key:"G_CMYK",value:function G_CMYK(_ref93){var _ref94=_slicedToArray(_ref93,1),J=_ref94[0];return["CMYK",0,0,0,1-J]}},{key:"G_RGB",value:function G_RGB(_ref95){var _ref96=_slicedToArray(_ref95,1),J=_ref96[0];return["RGB",J,J,J]}},{key:"G_rgb",value:function G_rgb(_ref97){var _ref98=_slicedToArray(_ref97,1),J=_ref98[0];return J=B(J),[J,J,J]}},{key:"G_HTML",value:function G_HTML(_ref99){var _ref100=_slicedToArray(_ref99,1),J=_ref100[0];var it=s(J);return"#".concat(it).concat(it).concat(it)}},{key:"RGB_G",value:function RGB_G(_ref101){var _ref102=_slicedToArray(_ref101,3),J=_ref102[0],it=_ref102[1],nt=_ref102[2];return["G",0.3*J+0.59*it+0.11*nt]}},{key:"RGB_rgb",value:function RGB_rgb(J){return J.map(B)}},{key:"RGB_HTML",value:function RGB_HTML(J){return"#".concat(J.map(s).join(""))}},{key:"T_HTML",value:function T_HTML(){return"#00000000"}},{key:"T_rgb",value:function T_rgb(){return[null]}},{key:"CMYK_RGB",value:function CMYK_RGB(_ref103){var _ref104=_slicedToArray(_ref103,4),J=_ref104[0],it=_ref104[1],nt=_ref104[2],ot=_ref104[3];return["RGB",1-Math.min(1,J+ot),1-Math.min(1,nt+ot),1-Math.min(1,it+ot)]}},{key:"CMYK_rgb",value:function CMYK_rgb(_ref105){var _ref106=_slicedToArray(_ref105,4),J=_ref106[0],it=_ref106[1],nt=_ref106[2],ot=_ref106[3];return[B(1-Math.min(1,J+ot)),B(1-Math.min(1,nt+ot)),B(1-Math.min(1,it+ot))]}},{key:"CMYK_HTML",value:function CMYK_HTML(J){var it=this.CMYK_RGB(J).slice(1);return this.RGB_HTML(it)}},{key:"RGB_CMYK",value:function RGB_CMYK(_ref107){var _ref108=_slicedToArray(_ref107,3),J=_ref108[0],it=_ref108[1],nt=_ref108[2];var ot=1-J,dt=1-it,Mt=1-nt,Ot=Math.min(ot,dt,Mt);return["CMYK",ot,dt,Mt,Ot]}}]);return Q}();o.ColorConverters=Q},function(r,o){Object.defineProperty(o,"__esModule",{value:!0}),o.NullL10n=void 0,o.getL10nFallback=B;var s={of_pages:"of {{pagesCount}}",page_of_pages:"({{pageNumber}} of {{pagesCount}})",document_properties_kb:"{{size_kb}} KB ({{size_b}} bytes)",document_properties_mb:"{{size_mb}} MB ({{size_b}} bytes)",document_properties_date_string:"{{date}}, {{time}}",document_properties_page_size_unit_inches:"in",document_properties_page_size_unit_millimeters:"mm",document_properties_page_size_orientation_portrait:"portrait",document_properties_page_size_orientation_landscape:"landscape",document_properties_page_size_name_a3:"A3",document_properties_page_size_name_a4:"A4",document_properties_page_size_name_letter:"Letter",document_properties_page_size_name_legal:"Legal",document_properties_page_size_dimension_string:"{{width}} \xD7 {{height}} {{unit}} ({{orientation}})",document_properties_page_size_dimension_name_string:"{{width}} \xD7 {{height}} {{unit}} ({{name}}, {{orientation}})",document_properties_linearized_yes:"Yes",document_properties_linearized_no:"No",additional_layers:"Additional Layers",page_landmark:"Page {{page}}",thumb_page_title:"Page {{page}}",thumb_page_canvas:"Thumbnail of Page {{page}}",find_reached_top:"Reached top of document, continued from bottom",find_reached_bottom:"Reached end of document, continued from top","find_match_count[one]":"{{current}} of {{total}} match","find_match_count[other]":"{{current}} of {{total}} matches","find_match_count_limit[one]":"More than {{limit}} match","find_match_count_limit[other]":"More than {{limit}} matches",find_not_found:"Phrase not found",page_scale_width:"Page Width",page_scale_fit:"Page Fit",page_scale_auto:"Automatic Zoom",page_scale_actual:"Actual Size",page_scale_percent:"{{scale}}%",loading_error:"An error occurred while loading the PDF.",invalid_file_error:"Invalid or corrupted PDF file.",missing_file_error:"Missing PDF file.",unexpected_response_error:"Unexpected server response.",rendering_error:"An error occurred while rendering the page.",annotation_date_string:"{{date}}, {{time}}",printing_not_supported:"Warning: Printing is not fully supported by this browser.",printing_not_ready:"Warning: The PDF is not fully loaded for printing.",web_fonts_disabled:"Web fonts are disabled: unable to use embedded PDF fonts.",free_text2_default_content:"Start typing\u2026",editor_free_text2_aria_label:"Text Editor",editor_ink2_aria_label:"Draw Editor",editor_ink_canvas_aria_label:"User-created image",editor_alt_text_button_label:"Alt text",editor_alt_text_edit_button_label:"Edit alt text",editor_alt_text_decorative_tooltip:"Marked as decorative"};s.print_progress_percent="{{progress}}%";function B(J,it){switch(J){case"find_match_count":J="find_match_count[".concat(it.total===1?"one":"other","]");break;case"find_match_count_limit":J="find_match_count_limit[".concat(it.limit===1?"one":"other","]");break}return s[J]||""}function Q(J,it){return it?J.replaceAll(/\{\{\s*(\w+)\s*\}\}/g,function(nt,ot){return ot in it?it[ot]:"{{"+ot+"}}"}):J}var Y={getLanguage:function getLanguage(){return _asyncToGenerator(_regeneratorRuntime().mark(function _callee29(){return _regeneratorRuntime().wrap(function _callee29$(_context29){while(1)switch(_context29.prev=_context29.next){case 0:return _context29.abrupt("return","en-us");case 1:case"end":return _context29.stop()}},_callee29)}))()},getDirection:function getDirection(){return _asyncToGenerator(_regeneratorRuntime().mark(function _callee30(){return _regeneratorRuntime().wrap(function _callee30$(_context30){while(1)switch(_context30.prev=_context30.next){case 0:return _context30.abrupt("return","ltr");case 1:case"end":return _context30.stop()}},_callee30)}))()},get:function get(J){var _arguments=arguments;return _asyncToGenerator(_regeneratorRuntime().mark(function _callee31(){var it,nt;return _regeneratorRuntime().wrap(function _callee31$(_context31){while(1)switch(_context31.prev=_context31.next){case 0:it=_arguments.length>1&&_arguments[1]!==undefined?_arguments[1]:null;nt=_arguments.length>2&&_arguments[2]!==undefined?_arguments[2]:B(J,it);return _context31.abrupt("return",Q(nt,it));case 3:case"end":return _context31.stop()}},_callee31)}))()},translate:function translate(J){return _asyncToGenerator(_regeneratorRuntime().mark(function _callee32(){return _regeneratorRuntime().wrap(function _callee32$(_context32){while(1)switch(_context32.prev=_context32.next){case 0:case"end":return _context32.stop()}},_callee32)}))()}};o.NullL10n=Y},function(r,o,s){Object.defineProperty(o,"__esModule",{value:!0}),o.XfaLayer=void 0;var B=s(25);var Q=function(){function Q(){_classCallCheck(this,Q)}_createClass(Q,null,[{key:"setupStorage",value:function setupStorage(J,it,nt,ot,dt){var Mt=ot.getValue(it,{value:null});switch(nt.name){case"textarea":if(Mt.value!==null&&(J.textContent=Mt.value),dt==="print")break;J.addEventListener("input",function(Ot){ot.setValue(it,{value:Ot.target.value})});break;case"input":if(nt.attributes.type==="radio"||nt.attributes.type==="checkbox"){if(Mt.value===nt.attributes.xfaOn?J.setAttribute("checked",!0):Mt.value===nt.attributes.xfaOff&&J.removeAttribute("checked"),dt==="print")break;J.addEventListener("change",function(Ot){ot.setValue(it,{value:Ot.target.checked?Ot.target.getAttribute("xfaOn"):Ot.target.getAttribute("xfaOff")})})}else{if(Mt.value!==null&&J.setAttribute("value",Mt.value),dt==="print")break;J.addEventListener("input",function(Ot){ot.setValue(it,{value:Ot.target.value})})}break;case"select":if(Mt.value!==null){J.setAttribute("value",Mt.value);var _iterator145=_createForOfIteratorHelper(nt.children),_step145;try{for(_iterator145.s();!(_step145=_iterator145.n()).done;){var Ot=_step145.value;Ot.attributes.value===Mt.value?Ot.attributes.selected=!0:Ot.attributes.hasOwnProperty("selected")&&delete Ot.attributes.selected}}catch(err){_iterator145.e(err)}finally{_iterator145.f()}}J.addEventListener("input",function(Ot){var Qt=Ot.target.options,Ut=Qt.selectedIndex===-1?"":Qt[Qt.selectedIndex].value;ot.setValue(it,{value:Ut})});break}}},{key:"setAttributes",value:function setAttributes(_ref109){var J=_ref109.html,it=_ref109.element,_ref109$storage=_ref109.storage,nt=_ref109$storage===void 0?null:_ref109$storage,ot=_ref109.intent,dt=_ref109.linkService;var Mt=it.attributes,Ot=J instanceof HTMLAnchorElement;Mt.type==="radio"&&(Mt.name="".concat(Mt.name,"-").concat(ot));for(var _i15=0,_Object$entries4=Object.entries(Mt);_i15<_Object$entries4.length;_i15++){var _Object$entries4$_i=_slicedToArray(_Object$entries4[_i15],2),Qt=_Object$entries4$_i[0],Ut=_Object$entries4$_i[1];if(Ut!=null)switch(Qt){case"class":Ut.length&&J.setAttribute(Qt,Ut.join(" "));break;case"dataId":break;case"id":J.setAttribute("data-element-id",Ut);break;case"style":Object.assign(J.style,Ut);break;case"textContent":J.textContent=Ut;break;default:(!Ot||Qt!=="href"&&Qt!=="newWindow")&&J.setAttribute(Qt,Ut)}}Ot&&dt.addLinkAttributes(J,Mt.href,Mt.newWindow),nt&&Mt.dataId&&this.setupStorage(J,Mt.dataId,it,nt)}},{key:"render",value:function render(J){var it;var nt=J.annotationStorage,ot=J.linkService,dt=J.xfaHtml,Mt=J.intent||"display",Ot=document.createElement(dt.name);dt.attributes&&this.setAttributes({html:Ot,element:dt,intent:Mt,linkService:ot});var Qt=[[dt,-1,Ot]],Ut=J.div;if(Ut.append(Ot),J.viewport){var qt="matrix(".concat(J.viewport.transform.join(","),")");Ut.style.transform=qt}Mt!=="richText"&&Ut.setAttribute("class","xfaLayer xfaFont");var te=[];for(;Qt.length>0;){var _Qt$at=Qt.at(-1),_Qt$at2=_slicedToArray(_Qt$at,3),_qt=_Qt$at2[0],ie=_Qt$at2[1],re=_Qt$at2[2];if(ie+1===_qt.children.length){Qt.pop();continue}var ne=_qt.children[++Qt.at(-1)[1]];if(ne===null)continue;var ae=ne.name;if(ae==="#text"){var Wt=document.createTextNode(ne.value);te.push(Wt),re.append(Wt);continue}var Bt=(it=ne==null?void 0:ne.attributes)!=null&&it.xmlns?document.createElementNS(ne.attributes.xmlns,ae):document.createElement(ae);if(re.append(Bt),ne.attributes&&this.setAttributes({html:Bt,element:ne,storage:nt,intent:Mt,linkService:ot}),ne.children&&ne.children.length>0)Qt.push([ne,-1,Bt]);else if(ne.value){var _Wt3=document.createTextNode(ne.value);B.XfaText.shouldBuildText(ae)&&te.push(_Wt3),Bt.append(_Wt3)}}var _iterator146=_createForOfIteratorHelper(Ut.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea")),_step146;try{for(_iterator146.s();!(_step146=_iterator146.n()).done;){var _qt2=_step146.value;_qt2.setAttribute("readOnly",!0)}}catch(err){_iterator146.e(err)}finally{_iterator146.f()}return{textDivs:te}}},{key:"update",value:function update(J){var it="matrix(".concat(J.viewport.transform.join(","),")");J.div.style.transform=it,J.div.hidden=!1}}]);return Q}();o.XfaLayer=Q},function(r,o,s){var B,Q,Y,J,it,nt,ot,dt,Mt,Ot,Qt,Ut,te,qt,ie,re,ne,ae,Bt,Wt,oe,ve,_e,Xe,He,ro,Xo,Se,xr,pr,$e,_r,Ps,qe,bl,ol,Te,pe,ue,se,be,Ae,ze,pi,io,Qr,Es,nl,Cr,$l,_l,Ih,Rh,Th,$s,Dr,Xi,Ke,ta,Cl,Oh,jh,qh,Bh,Jh,Xh;Object.defineProperty(o,"__esModule",{value:!0}),o.InkEditor=void 0;var Qh=s(1),Kh=s(4),ia=s(29),fe=s(6),Me=s(5);var kr=function(_Kh$AnnotationEditor){_inherits(vm,_Kh$AnnotationEditor);function vm(wi){var _this91;_classCallCheck(this,vm);_this91=_callSuper(this,vm,[_objectSpread(_objectSpread({},wi),{},{name:"inkEditor"})]),I(_assertThisInitialized(_this91),ie),I(_assertThisInitialized(_this91),ne),I(_assertThisInitialized(_this91),Bt),I(_assertThisInitialized(_this91),oe),I(_assertThisInitialized(_this91),_e),I(_assertThisInitialized(_this91),He),I(_assertThisInitialized(_this91),Xo),I(_assertThisInitialized(_this91),xr),I(_assertThisInitialized(_this91),$e),I(_assertThisInitialized(_this91),Ps),I(_assertThisInitialized(_this91),bl),I(_assertThisInitialized(_this91),Te),I(_assertThisInitialized(_this91),ue),I(_assertThisInitialized(_this91),be),I(_assertThisInitialized(_this91),ze),I(_assertThisInitialized(_this91),io),I(_assertThisInitialized(_this91),Es),I(_assertThisInitialized(_this91),Cr),I(_assertThisInitialized(_this91),_l),I(_assertThisInitialized(_this91),ta),I(_assertThisInitialized(_this91),Oh),I(_assertThisInitialized(_this91),qh),I(_assertThisInitialized(_this91),Jh),I(_assertThisInitialized(_this91),B,0),I(_assertThisInitialized(_this91),Q,0),I(_assertThisInitialized(_this91),Y,_this91.canvasPointermove.bind(_assertThisInitialized(_this91))),I(_assertThisInitialized(_this91),J,_this91.canvasPointerleave.bind(_assertThisInitialized(_this91))),I(_assertThisInitialized(_this91),it,_this91.canvasPointerup.bind(_assertThisInitialized(_this91))),I(_assertThisInitialized(_this91),nt,_this91.canvasPointerdown.bind(_assertThisInitialized(_this91))),I(_assertThisInitialized(_this91),ot,new Path2D),I(_assertThisInitialized(_this91),dt,!1),I(_assertThisInitialized(_this91),Mt,!1),I(_assertThisInitialized(_this91),Ot,!1),I(_assertThisInitialized(_this91),Qt,null),I(_assertThisInitialized(_this91),Ut,0),I(_assertThisInitialized(_this91),te,0),I(_assertThisInitialized(_this91),qt,null),_this91.color=wi.color||null,_this91.thickness=wi.thickness||null,_this91.opacity=wi.opacity||null,_this91.paths=[],_this91.bezierPath2D=[],_this91.allRawPaths=[],_this91.currentPath=[],_this91.scaleFactor=1,_this91.translationX=_this91.translationY=0,_this91.x=0,_this91.y=0,_this91._willKeepAspectRatio=!0;return _this91}_createClass(vm,[{key:"updateParams",value:function updateParams(wi,Jo){switch(wi){case Qh.AnnotationEditorParamsType.INK_THICKNESS:W(this,ie,re).call(this,Jo);break;case Qh.AnnotationEditorParamsType.INK_COLOR:W(this,ne,ae).call(this,Jo);break;case Qh.AnnotationEditorParamsType.INK_OPACITY:W(this,Bt,Wt).call(this,Jo);break}}},{key:"propertiesToUpdate",get:function get(){var _this$opacity;return[[Qh.AnnotationEditorParamsType.INK_THICKNESS,this.thickness||vm._defaultThickness],[Qh.AnnotationEditorParamsType.INK_COLOR,this.color||vm._defaultColor||Kh.AnnotationEditor._defaultLineColor],[Qh.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*((_this$opacity=this.opacity)!==null&&_this$opacity!==void 0?_this$opacity:vm._defaultOpacity))]]}},{key:"rebuild",value:function rebuild(){this.parent&&(_get(_getPrototypeOf(vm.prototype),"rebuild",this).call(this),this.div!==null&&(this.canvas||(W(this,ze,pi).call(this),W(this,io,Qr).call(this)),this.isAttachedToDOM||(this.parent.add(this),W(this,Es,nl).call(this)),W(this,Jh,Xh).call(this)))}},{key:"remove",value:function remove(){this.canvas!==null&&(this.isEmpty()||this.commit(),this.canvas.width=this.canvas.height=0,this.canvas.remove(),this.canvas=null,t$1(this,Qt).disconnect(),Z(this,Qt,null),_get(_getPrototypeOf(vm.prototype),"remove",this).call(this))}},{key:"setParent",value:function setParent(wi){!this.parent&&wi?this._uiManager.removeShouldRescale(this):this.parent&&wi===null&&this._uiManager.addShouldRescale(this),_get(_getPrototypeOf(vm.prototype),"setParent",this).call(this,wi)}},{key:"onScaleChanging",value:function onScaleChanging(){var _this$parentDimension11=_slicedToArray(this.parentDimensions,2),wi=_this$parentDimension11[0],Jo=_this$parentDimension11[1],xl=this.width*wi,Pd=this.height*Jo;this.setDimensions(xl,Pd)}},{key:"enableEditMode",value:function enableEditMode(){t$1(this,dt)||this.canvas===null||(_get(_getPrototypeOf(vm.prototype),"enableEditMode",this).call(this),this._isDraggable=!1,this.canvas.addEventListener("pointerdown",t$1(this,nt)))}},{key:"disableEditMode",value:function disableEditMode(){!this.isInEditMode()||this.canvas===null||(_get(_getPrototypeOf(vm.prototype),"disableEditMode",this).call(this),this._isDraggable=!this.isEmpty(),this.div.classList.remove("editing"),this.canvas.removeEventListener("pointerdown",t$1(this,nt)))}},{key:"onceAdded",value:function onceAdded(){this._isDraggable=!this.isEmpty()}},{key:"isEmpty",value:function isEmpty(){return this.paths.length===0||this.paths.length===1&&this.paths[0].length===0}},{key:"commit",value:function commit(){t$1(this,dt)||(_get(_getPrototypeOf(vm.prototype),"commit",this).call(this),this.isEditing=!1,this.disableEditMode(),this.setInForeground(),Z(this,dt,!0),this.div.classList.add("disabled"),W(this,Jh,Xh).call(this,!0),this.makeResizable(),this.parent.addInkEditorIfNeeded(!0),this.moveInDOM(),this.div.focus({preventScroll:!0}))}},{key:"focusin",value:function focusin(wi){this._focusEventsAllowed&&(_get(_getPrototypeOf(vm.prototype),"focusin",this).call(this,wi),this.enableEditMode())}},{key:"canvasPointerdown",value:function canvasPointerdown(wi){wi.button!==0||!this.isInEditMode()||t$1(this,dt)||(this.setInForeground(),wi.preventDefault(),wi.type!=="mouse"&&this.div.focus(),W(this,He,ro).call(this,wi.offsetX,wi.offsetY))}},{key:"canvasPointermove",value:function canvasPointermove(wi){wi.preventDefault(),W(this,Xo,Se).call(this,wi.offsetX,wi.offsetY)}},{key:"canvasPointerup",value:function canvasPointerup(wi){wi.preventDefault(),W(this,be,Ae).call(this,wi)}},{key:"canvasPointerleave",value:function canvasPointerleave(wi){W(this,be,Ae).call(this,wi)}},{key:"isResizable",get:function get(){return!this.isEmpty()&&t$1(this,dt)}},{key:"render",value:function render(){var _this92=this;if(this.div)return this.div;var wi,Jo;this.width&&(wi=this.x,Jo=this.y),_get(_getPrototypeOf(vm.prototype),"render",this).call(this),Kh.AnnotationEditor._l10nPromise.get("editor_ink2_aria_label").then(function(Ed){var Nh;return(Nh=_this92.div)==null?void 0:Nh.setAttribute("aria-label",Ed)});var _W$call6=W(this,oe,ve).call(this),_W$call7=_slicedToArray(_W$call6,4),xl=_W$call7[0],Pd=_W$call7[1],Dh=_W$call7[2],Vh=_W$call7[3];if(this.setAt(xl,Pd,0,0),this.setDims(Dh,Vh),W(this,ze,pi).call(this),this.width){var _this$parentDimension12=_slicedToArray(this.parentDimensions,2),Ed=_this$parentDimension12[0],Nh=_this$parentDimension12[1];this.setAspectRatio(this.width*Ed,this.height*Nh),this.setAt(wi*Ed,Jo*Nh,this.width*Ed,this.height*Nh),Z(this,Ot,!0),W(this,Es,nl).call(this),this.setDims(this.width*Ed,this.height*Nh),W(this,ue,se).call(this),this.div.classList.add("disabled")}else this.div.classList.add("editing"),this.enableEditMode();return W(this,io,Qr).call(this),this.div}},{key:"setDimensions",value:function setDimensions(wi,Jo){var xl=Math.round(wi),Pd=Math.round(Jo);if(t$1(this,Ut)===xl&&t$1(this,te)===Pd)return;Z(this,Ut,xl),Z(this,te,Pd),this.canvas.style.visibility="hidden";var _this$parentDimension13=_slicedToArray(this.parentDimensions,2),Dh=_this$parentDimension13[0],Vh=_this$parentDimension13[1];this.width=wi/Dh,this.height=Jo/Vh,this.fixAndSetPosition(),t$1(this,dt)&&W(this,Cr,$l).call(this,wi,Jo),W(this,Es,nl).call(this),W(this,ue,se).call(this),this.canvas.style.visibility="visible",this.fixDims()}},{key:"serialize",value:function serialize(){if(this.isEmpty())return null;var wi=this.getRect(0,0),Jo=Kh.AnnotationEditor._colorManager.convert(this.ctx.strokeStyle);return{annotationType:Qh.AnnotationEditorType.INK,color:Jo,thickness:this.thickness,opacity:this.opacity,paths:W(this,ta,Cl).call(this,this.scaleFactor/this.parentScale,this.translationX,this.translationY,wi),pageIndex:this.pageIndex,rect:wi,rotation:this.rotation,structTreeParentId:this._structTreeParentId}}}],[{key:"initialize",value:function initialize(wi){Kh.AnnotationEditor.initialize(wi,{strings:["editor_ink_canvas_aria_label","editor_ink2_aria_label"]})}},{key:"updateDefaultParams",value:function updateDefaultParams(wi,Jo){switch(wi){case Qh.AnnotationEditorParamsType.INK_THICKNESS:vm._defaultThickness=Jo;break;case Qh.AnnotationEditorParamsType.INK_COLOR:vm._defaultColor=Jo;break;case Qh.AnnotationEditorParamsType.INK_OPACITY:vm._defaultOpacity=Jo/100;break}}},{key:"defaultPropertiesToUpdate",get:function get(){return[[Qh.AnnotationEditorParamsType.INK_THICKNESS,vm._defaultThickness],[Qh.AnnotationEditorParamsType.INK_COLOR,vm._defaultColor||Kh.AnnotationEditor._defaultLineColor],[Qh.AnnotationEditorParamsType.INK_OPACITY,Math.round(vm._defaultOpacity*100)]]}},{key:"deserialize",value:function deserialize(wi,Jo,xl){var _Qh$Util;var Pd,Dh,Vh;if(wi instanceof ia.InkAnnotationElement)return null;var Ed=_get(_getPrototypeOf(vm),"deserialize",this).call(this,wi,Jo,xl);Ed.thickness=wi.thickness,Ed.color=(_Qh$Util=Qh.Util).makeHexColor.apply(_Qh$Util,_toConsumableArray(wi.color)),Ed.opacity=wi.opacity;var _Ed$pageDimensions=_slicedToArray(Ed.pageDimensions,2),Nh=_Ed$pageDimensions[0],Zh=_Ed$pageDimensions[1],py=Ed.width*Nh,Hh=Ed.height*Zh,ke=Ed.parentScale,ye=wi.thickness/2;Z(Ed,dt,!0),Z(Ed,Ut,Math.round(py)),Z(Ed,te,Math.round(Hh));var Ie=wi.paths,cr=wi.rect,lr=wi.rotation;var _iterator147=_createForOfIteratorHelper(Ie),_step147;try{for(_iterator147.s();!(_step147=_iterator147.n()).done;){var kl=_step147.value.bezier;kl=W(Pd=vm,Xi,Ke).call(Pd,kl,cr,lr);var Wh=[];Ed.paths.push(Wh);var zh=ke*(kl[0]-ye),Fh=ke*(kl[1]-ye);for(var Uh=2,Yh=kl.length;Uh<Yh;Uh+=6){var Gh=ke*(kl[Uh]-ye),eu=ke*(kl[Uh+1]-ye),ru=ke*(kl[Uh+2]-ye),yy=ke*(kl[Uh+3]-ye),wy=ke*(kl[Uh+4]-ye),wm=ke*(kl[Uh+5]-ye);Wh.push([[zh,Fh],[Gh,eu],[ru,yy],[wy,wm]]),zh=wy,Fh=wm}var tu=W(this,Rh,Th).call(this,Wh);Ed.bezierPath2D.push(tu)}}catch(err){_iterator147.e(err)}finally{_iterator147.f()}var Ss=W(Dh=Ed,Oh,jh).call(Dh);return Z(Ed,Q,Math.max(Kh.AnnotationEditor.MIN_SIZE,Ss[2]-Ss[0])),Z(Ed,B,Math.max(Kh.AnnotationEditor.MIN_SIZE,Ss[3]-Ss[1])),W(Vh=Ed,Cr,$l).call(Vh,py,Hh),Ed}}]);return vm}(Kh.AnnotationEditor);B=new WeakMap,Q=new WeakMap,Y=new WeakMap,J=new WeakMap,it=new WeakMap,nt=new WeakMap,ot=new WeakMap,dt=new WeakMap,Mt=new WeakMap,Ot=new WeakMap,Qt=new WeakMap,Ut=new WeakMap,te=new WeakMap,qt=new WeakMap,ie=new WeakSet,re=function re(Oe){var _this93=this;var wi=this.thickness;this.addCommands({cmd:function cmd(){_this93.thickness=Oe,W(_this93,Jh,Xh).call(_this93)},undo:function undo(){_this93.thickness=wi,W(_this93,Jh,Xh).call(_this93)},mustExec:!0,type:Qh.AnnotationEditorParamsType.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0})},ne=new WeakSet,ae=function ae(Oe){var _this94=this;var wi=this.color;this.addCommands({cmd:function cmd(){_this94.color=Oe,W(_this94,ue,se).call(_this94)},undo:function undo(){_this94.color=wi,W(_this94,ue,se).call(_this94)},mustExec:!0,type:Qh.AnnotationEditorParamsType.INK_COLOR,overwriteIfSameType:!0,keepUndo:!0})},Bt=new WeakSet,Wt=function Wt(Oe){var _this95=this;Oe/=100;var wi=this.opacity;this.addCommands({cmd:function cmd(){_this95.opacity=Oe,W(_this95,ue,se).call(_this95)},undo:function undo(){_this95.opacity=wi,W(_this95,ue,se).call(_this95)},mustExec:!0,type:Qh.AnnotationEditorParamsType.INK_OPACITY,overwriteIfSameType:!0,keepUndo:!0})},oe=new WeakSet,ve=function ve(){var Oe=this.parentRotation,_this$parentDimension14=_slicedToArray(this.parentDimensions,2),wi=_this$parentDimension14[0],Jo=_this$parentDimension14[1];switch(Oe){case 90:return[0,Jo,Jo,wi];case 180:return[wi,Jo,wi,Jo];case 270:return[wi,0,Jo,wi];default:return[0,0,wi,Jo]}},_e=new WeakSet,Xe=function Xe(){var Oe=this.ctx,wi=this.color,Jo=this.opacity,xl=this.thickness,Pd=this.parentScale,Dh=this.scaleFactor;Oe.lineWidth=xl*Pd/Dh,Oe.lineCap="round",Oe.lineJoin="round",Oe.miterLimit=10,Oe.strokeStyle="".concat(wi).concat((0,Me.opacityToHex)(Jo))},He=new WeakSet,ro=function ro(Oe,wi){var _this$opacity2,_this96=this;this.canvas.addEventListener("contextmenu",fe.noContextMenu),this.canvas.addEventListener("pointerleave",t$1(this,J)),this.canvas.addEventListener("pointermove",t$1(this,Y)),this.canvas.addEventListener("pointerup",t$1(this,it)),this.canvas.removeEventListener("pointerdown",t$1(this,nt)),this.isEditing=!0,t$1(this,Ot)||(Z(this,Ot,!0),W(this,Es,nl).call(this),this.thickness||(this.thickness=kr._defaultThickness),this.color||(this.color=kr._defaultColor||Kh.AnnotationEditor._defaultLineColor),(_this$opacity2=this.opacity)!==null&&_this$opacity2!==void 0?_this$opacity2:this.opacity=kr._defaultOpacity),this.currentPath.push([Oe,wi]),Z(this,Mt,!1),W(this,_e,Xe).call(this),Z(this,qt,function(){W(_this96,Ps,qe).call(_this96),t$1(_this96,qt)&&window.requestAnimationFrame(t$1(_this96,qt))}),window.requestAnimationFrame(t$1(this,qt))},Xo=new WeakSet,Se=function Se(Oe,wi){var _Dh2,_W;var _this$currentPath$at=this.currentPath.at(-1),_this$currentPath$at2=_slicedToArray(_this$currentPath$at,2),Jo=_this$currentPath$at2[0],xl=_this$currentPath$at2[1];if(this.currentPath.length>1&&Oe===Jo&&wi===xl)return;var Pd=this.currentPath;var Dh=t$1(this,ot);if(Pd.push([Oe,wi]),Z(this,Mt,!0),Pd.length<=2){var _Dh;(_Dh=Dh).moveTo.apply(_Dh,_toConsumableArray(Pd[0])),Dh.lineTo(Oe,wi);return}Pd.length===3&&(Z(this,ot,Dh=new Path2D),(_Dh2=Dh).moveTo.apply(_Dh2,_toConsumableArray(Pd[0]))),(_W=W(this,bl,ol)).call.apply(_W,[this,Dh].concat(_toConsumableArray(Pd.at(-3)),_toConsumableArray(Pd.at(-2)),[Oe,wi]))},xr=new WeakSet,pr=function pr(){var _t$11;if(this.currentPath.length===0)return;var Oe=this.currentPath.at(-1);(_t$11=t$1(this,ot)).lineTo.apply(_t$11,_toConsumableArray(Oe))},$e=new WeakSet,_r=function _r(Oe,wi){var _this97=this;Z(this,qt,null),Oe=Math.min(Math.max(Oe,0),this.canvas.width),wi=Math.min(Math.max(wi,0),this.canvas.height),W(this,Xo,Se).call(this,Oe,wi),W(this,xr,pr).call(this);var Jo;if(this.currentPath.length!==1)Jo=W(this,Te,pe).call(this);else{var Ed=[Oe,wi];Jo=[[Ed,Ed.slice(),Ed.slice(),Ed]]}var xl=t$1(this,ot),Pd=this.currentPath;this.currentPath=[],Z(this,ot,new Path2D);var Dh=function Dh(){_this97.allRawPaths.push(Pd),_this97.paths.push(Jo),_this97.bezierPath2D.push(xl),_this97.rebuild()},Vh=function Vh(){_this97.allRawPaths.pop(),_this97.paths.pop(),_this97.bezierPath2D.pop(),_this97.paths.length===0?_this97.remove():(_this97.canvas||(W(_this97,ze,pi).call(_this97),W(_this97,io,Qr).call(_this97)),W(_this97,Jh,Xh).call(_this97))};this.addCommands({cmd:Dh,undo:Vh,mustExec:!0})},Ps=new WeakSet,qe=function qe(){if(!t$1(this,Mt))return;Z(this,Mt,!1);var Oe=Math.ceil(this.thickness*this.parentScale),wi=this.currentPath.slice(-3),Jo=wi.map(function(Dh){return Dh[0]}),xl=wi.map(function(Dh){return Dh[1]});Math.min.apply(Math,_toConsumableArray(Jo))-Oe,Math.max.apply(Math,_toConsumableArray(Jo))+Oe,Math.min.apply(Math,_toConsumableArray(xl))-Oe,Math.max.apply(Math,_toConsumableArray(xl))+Oe;var Pd=this.ctx;Pd.save(),Pd.clearRect(0,0,this.canvas.width,this.canvas.height);var _iterator148=_createForOfIteratorHelper(this.bezierPath2D),_step148;try{for(_iterator148.s();!(_step148=_iterator148.n()).done;){var Dh=_step148.value;Pd.stroke(Dh)}}catch(err){_iterator148.e(err)}finally{_iterator148.f()}Pd.stroke(t$1(this,ot)),Pd.restore()},bl=new WeakSet,ol=function ol(Oe,wi,Jo,xl,Pd,Dh,Vh){var Ed=(wi+xl)/2,Nh=(Jo+Pd)/2,Zh=(xl+Dh)/2,py=(Pd+Vh)/2;Oe.bezierCurveTo(Ed+2*(xl-Ed)/3,Nh+2*(Pd-Nh)/3,Zh+2*(xl-Zh)/3,py+2*(Pd-py)/3,Zh,py)},Te=new WeakSet,pe=function pe(){var Oe=this.currentPath;if(Oe.length<=2)return[[Oe[0],Oe[0],Oe.at(-1),Oe.at(-1)]];var wi=[];var Jo,_Oe$=_slicedToArray(Oe[0],2),xl=_Oe$[0],Pd=_Oe$[1];for(Jo=1;Jo<Oe.length-2;Jo++){var _Oe$Jo=_slicedToArray(Oe[Jo],2),Hh=_Oe$Jo[0],ke=_Oe$Jo[1],_Oe2=_slicedToArray(Oe[Jo+1],2),ye=_Oe2[0],Ie=_Oe2[1],cr=(Hh+ye)/2,lr=(ke+Ie)/2,Ss=[xl+2*(Hh-xl)/3,Pd+2*(ke-Pd)/3],kl=[cr+2*(Hh-cr)/3,lr+2*(ke-lr)/3];wi.push([[xl,Pd],Ss,kl,[cr,lr]]),(xl=cr,Pd=lr)}var _Oe$Jo2=_slicedToArray(Oe[Jo],2),Dh=_Oe$Jo2[0],Vh=_Oe$Jo2[1],_Oe3=_slicedToArray(Oe[Jo+1],2),Ed=_Oe3[0],Nh=_Oe3[1],Zh=[xl+2*(Dh-xl)/3,Pd+2*(Vh-Pd)/3],py=[Ed+2*(Dh-Ed)/3,Nh+2*(Vh-Nh)/3];return wi.push([[xl,Pd],Zh,py,[Ed,Nh]]),wi},ue=new WeakSet,se=function se(){if(this.isEmpty()){W(this,_l,Ih).call(this);return}W(this,_e,Xe).call(this);var Oe=this.canvas,wi=this.ctx;wi.setTransform(1,0,0,1,0,0),wi.clearRect(0,0,Oe.width,Oe.height),W(this,_l,Ih).call(this);var _iterator149=_createForOfIteratorHelper(this.bezierPath2D),_step149;try{for(_iterator149.s();!(_step149=_iterator149.n()).done;){var Jo=_step149.value;wi.stroke(Jo)}}catch(err){_iterator149.e(err)}finally{_iterator149.f()}},be=new WeakSet,Ae=function Ae(Oe){var _this98=this;this.canvas.removeEventListener("pointerleave",t$1(this,J)),this.canvas.removeEventListener("pointermove",t$1(this,Y)),this.canvas.removeEventListener("pointerup",t$1(this,it)),this.canvas.addEventListener("pointerdown",t$1(this,nt)),setTimeout(function(){_this98.canvas.removeEventListener("contextmenu",fe.noContextMenu)},10),W(this,$e,_r).call(this,Oe.offsetX,Oe.offsetY),this.addToAnnotationStorage(),this.setInBackground()},ze=new WeakSet,pi=function pi(){var _this99=this;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=0,this.canvas.className="inkEditorCanvas",Kh.AnnotationEditor._l10nPromise.get("editor_ink_canvas_aria_label").then(function(Oe){var wi;return(wi=_this99.canvas)==null?void 0:wi.setAttribute("aria-label",Oe)}),this.div.append(this.canvas),this.ctx=this.canvas.getContext("2d")},io=new WeakSet,Qr=function Qr(){var _this100=this;Z(this,Qt,new ResizeObserver(function(Oe){var wi=Oe[0].contentRect;wi.width&&wi.height&&_this100.setDimensions(wi.width,wi.height)})),t$1(this,Qt).observe(this.div)},Es=new WeakSet,nl=function nl(){if(!t$1(this,Ot))return;var _this$parentDimension15=_slicedToArray(this.parentDimensions,2),Oe=_this$parentDimension15[0],wi=_this$parentDimension15[1];this.canvas.width=Math.ceil(this.width*Oe),this.canvas.height=Math.ceil(this.height*wi),W(this,_l,Ih).call(this)},Cr=new WeakSet,$l=function $l(Oe,wi){var Jo=W(this,qh,Bh).call(this),xl=(Oe-Jo)/t$1(this,Q),Pd=(wi-Jo)/t$1(this,B);this.scaleFactor=Math.min(xl,Pd)},_l=new WeakSet,Ih=function Ih(){var Oe=W(this,qh,Bh).call(this)/2;this.ctx.setTransform(this.scaleFactor,0,0,this.scaleFactor,this.translationX*this.scaleFactor+Oe,this.translationY*this.scaleFactor+Oe)},Rh=new WeakSet,Th=function Th(Oe){var wi=new Path2D;for(var Jo=0,xl=Oe.length;Jo<xl;Jo++){var _Oe$Jo3=_slicedToArray(Oe[Jo],4),Pd=_Oe$Jo3[0],Dh=_Oe$Jo3[1],Vh=_Oe$Jo3[2],Ed=_Oe$Jo3[3];Jo===0&&wi.moveTo.apply(wi,_toConsumableArray(Pd)),wi.bezierCurveTo(Dh[0],Dh[1],Vh[0],Vh[1],Ed[0],Ed[1])}return wi},$s=new WeakSet,Dr=function Dr(Oe,wi,Jo){var _wi=_slicedToArray(wi,4),xl=_wi[0],Pd=_wi[1],Dh=_wi[2],Vh=_wi[3];switch(Jo){case 0:for(var Ed=0,Nh=Oe.length;Ed<Nh;Ed+=2)Oe[Ed]+=xl,Oe[Ed+1]=Vh-Oe[Ed+1];break;case 90:for(var _Ed=0,_Nh=Oe.length;_Ed<_Nh;_Ed+=2){var Zh=Oe[_Ed];Oe[_Ed]=Oe[_Ed+1]+xl,Oe[_Ed+1]=Zh+Pd}break;case 180:for(var _Ed2=0,_Nh2=Oe.length;_Ed2<_Nh2;_Ed2+=2)Oe[_Ed2]=Dh-Oe[_Ed2],Oe[_Ed2+1]+=Pd;break;case 270:for(var _Ed3=0,_Nh3=Oe.length;_Ed3<_Nh3;_Ed3+=2){var _Zh=Oe[_Ed3];Oe[_Ed3]=Dh-Oe[_Ed3+1],Oe[_Ed3+1]=Vh-_Zh}break;default:throw new Error("Invalid rotation")}return Oe},Xi=new WeakSet,Ke=function Ke(Oe,wi,Jo){var _wi2=_slicedToArray(wi,4),xl=_wi2[0],Pd=_wi2[1],Dh=_wi2[2],Vh=_wi2[3];switch(Jo){case 0:for(var Ed=0,Nh=Oe.length;Ed<Nh;Ed+=2)Oe[Ed]-=xl,Oe[Ed+1]=Vh-Oe[Ed+1];break;case 90:for(var _Ed4=0,_Nh4=Oe.length;_Ed4<_Nh4;_Ed4+=2){var Zh=Oe[_Ed4];Oe[_Ed4]=Oe[_Ed4+1]-Pd,Oe[_Ed4+1]=Zh-xl}break;case 180:for(var _Ed5=0,_Nh5=Oe.length;_Ed5<_Nh5;_Ed5+=2)Oe[_Ed5]=Dh-Oe[_Ed5],Oe[_Ed5+1]-=Pd;break;case 270:for(var _Ed6=0,_Nh6=Oe.length;_Ed6<_Nh6;_Ed6+=2){var _Zh2=Oe[_Ed6];Oe[_Ed6]=Vh-Oe[_Ed6+1],Oe[_Ed6+1]=Dh-_Zh2}break;default:throw new Error("Invalid rotation")}return Oe},ta=new WeakSet,Cl=function Cl(Oe,wi,Jo,xl){var Pd,Dh;var Vh=[],Ed=this.thickness/2,Nh=Oe*wi+Ed,Zh=Oe*Jo+Ed;var _iterator150=_createForOfIteratorHelper(this.paths),_step150;try{for(_iterator150.s();!(_step150=_iterator150.n()).done;){var py=_step150.value;var Hh=[],ke=[];for(var ye=0,Ie=py.length;ye<Ie;ye++){var _py$ye=_slicedToArray(py[ye],4),cr=_py$ye[0],lr=_py$ye[1],Ss=_py$ye[2],kl=_py$ye[3],Wh=Oe*cr[0]+Nh,zh=Oe*cr[1]+Zh,Fh=Oe*lr[0]+Nh,tu=Oe*lr[1]+Zh,Uh=Oe*Ss[0]+Nh,Yh=Oe*Ss[1]+Zh,Gh=Oe*kl[0]+Nh,eu=Oe*kl[1]+Zh;ye===0&&(Hh.push(Wh,zh),ke.push(Wh,zh)),Hh.push(Fh,tu,Uh,Yh,Gh,eu),ke.push(Fh,tu),ye===Ie-1&&ke.push(Gh,eu)}Vh.push({bezier:W(Pd=kr,$s,Dr).call(Pd,Hh,xl,this.rotation),points:W(Dh=kr,$s,Dr).call(Dh,ke,xl,this.rotation)})}}catch(err){_iterator150.e(err)}finally{_iterator150.f()}return Vh},Oh=new WeakSet,jh=function jh(){var Oe=1/0,wi=-1/0,Jo=1/0,xl=-1/0;var _iterator151=_createForOfIteratorHelper(this.paths),_step151;try{for(_iterator151.s();!(_step151=_iterator151.n()).done;){var Pd=_step151.value;var _iterator152=_createForOfIteratorHelper(Pd),_step152;try{for(_iterator152.s();!(_step152=_iterator152.n()).done;){var _Qh$Util2;var _step152$value=_slicedToArray(_step152.value,4),Dh=_step152$value[0],Vh=_step152$value[1],Ed=_step152$value[2],Nh=_step152$value[3];var Zh=(_Qh$Util2=Qh.Util).bezierBoundingBox.apply(_Qh$Util2,_toConsumableArray(Dh).concat(_toConsumableArray(Vh),_toConsumableArray(Ed),_toConsumableArray(Nh)));Oe=Math.min(Oe,Zh[0]),Jo=Math.min(Jo,Zh[1]),wi=Math.max(wi,Zh[2]),xl=Math.max(xl,Zh[3])}}catch(err){_iterator152.e(err)}finally{_iterator152.f()}}}catch(err){_iterator151.e(err)}finally{_iterator151.f()}return[Oe,Jo,wi,xl]},qh=new WeakSet,Bh=function Bh(){return t$1(this,dt)?Math.ceil(this.thickness*this.parentScale):0},Jh=new WeakSet,Xh=function Xh(){var Oe=arguments.length>0&&arguments[0]!==undefined?arguments[0]:!1;if(this.isEmpty())return;if(!t$1(this,dt)){W(this,ue,se).call(this);return}var wi=W(this,Oh,jh).call(this),Jo=W(this,qh,Bh).call(this);Z(this,Q,Math.max(Kh.AnnotationEditor.MIN_SIZE,wi[2]-wi[0])),Z(this,B,Math.max(Kh.AnnotationEditor.MIN_SIZE,wi[3]-wi[1]));var xl=Math.ceil(Jo+t$1(this,Q)*this.scaleFactor),Pd=Math.ceil(Jo+t$1(this,B)*this.scaleFactor),_this$parentDimension16=_slicedToArray(this.parentDimensions,2),Dh=_this$parentDimension16[0],Vh=_this$parentDimension16[1];this.width=xl/Dh,this.height=Pd/Vh,this.setAspectRatio(xl,Pd);var Ed=this.translationX,Nh=this.translationY;this.translationX=-wi[0],this.translationY=-wi[1],W(this,Es,nl).call(this),W(this,ue,se).call(this),Z(this,Ut,xl),Z(this,te,Pd),this.setDims(xl,Pd);var Zh=Oe?Jo/this.scaleFactor/2:0;this.translate(Ed-this.translationX-Zh,Nh-this.translationY-Zh)},I(kr,Rh),I(kr,$s),I(kr,Xi),ee(kr,"_defaultColor",null),ee(kr,"_defaultOpacity",1),ee(kr,"_defaultThickness",1),ee(kr,"_type","ink");var rn=kr;o.InkEditor=rn},function(r,o,s){var B,Q,Y,J,it,nt,ot,dt,Mt,Ot,Qt,Ut,te,qt,ie,re,ne,ae,Bt,Wt,oe,ve,_e,Xe,He,ro,Xo,Se;Object.defineProperty(o,"__esModule",{value:!0}),o.StampEditor=void 0;var xr=s(1),pr=s(4),$e=s(6),_r=s(29);var Ps=function(_pr$AnnotationEditor){_inherits(Ps,_pr$AnnotationEditor);function Ps(ol){var _this101;_classCallCheck(this,Ps);_this101=_callSuper(this,Ps,[_objectSpread(_objectSpread({},ol),{},{name:"stampEditor"})]),I(_assertThisInitialized(_this101),Qt),I(_assertThisInitialized(_this101),te),I(_assertThisInitialized(_this101),ie),I(_assertThisInitialized(_this101),ne),I(_assertThisInitialized(_this101),Bt),I(_assertThisInitialized(_this101),oe),I(_assertThisInitialized(_this101),_e),I(_assertThisInitialized(_this101),He),I(_assertThisInitialized(_this101),Xo),I(_assertThisInitialized(_this101),B,null),I(_assertThisInitialized(_this101),Q,null),I(_assertThisInitialized(_this101),Y,null),I(_assertThisInitialized(_this101),J,null),I(_assertThisInitialized(_this101),it,null),I(_assertThisInitialized(_this101),nt,null),I(_assertThisInitialized(_this101),ot,null),I(_assertThisInitialized(_this101),dt,null),I(_assertThisInitialized(_this101),Mt,!1),I(_assertThisInitialized(_this101),Ot,!1),Z(_assertThisInitialized(_this101),J,ol.bitmapUrl),Z(_assertThisInitialized(_this101),it,ol.bitmapFile);return _this101}_createClass(Ps,[{key:"remove",value:function remove(){var ol,Te;t$1(this,Q)&&(Z(this,B,null),this._uiManager.imageManager.deleteId(t$1(this,Q)),(ol=t$1(this,nt))==null||ol.remove(),Z(this,nt,null),(Te=t$1(this,ot))==null||Te.disconnect(),Z(this,ot,null)),_get(_getPrototypeOf(Ps.prototype),"remove",this).call(this)}},{key:"rebuild",value:function rebuild(){if(!this.parent){t$1(this,Q)&&W(this,ie,re).call(this);return}_get(_getPrototypeOf(Ps.prototype),"rebuild",this).call(this),this.div!==null&&(t$1(this,Q)&&W(this,ie,re).call(this),this.isAttachedToDOM||this.parent.add(this))}},{key:"onceAdded",value:function onceAdded(){this._isDraggable=!0,this.div.focus()}},{key:"isEmpty",value:function isEmpty(){return!(t$1(this,Y)||t$1(this,B)||t$1(this,J)||t$1(this,it))}},{key:"isResizable",get:function get(){return!0}},{key:"render",value:function render(){if(this.div)return this.div;var ol,Te;if(this.width&&(ol=this.x,Te=this.y),_get(_getPrototypeOf(Ps.prototype),"render",this).call(this),this.div.hidden=!0,t$1(this,B)?W(this,ne,ae).call(this):W(this,ie,re).call(this),this.width){var _this$parentDimension17=_slicedToArray(this.parentDimensions,2),pe=_this$parentDimension17[0],ue=_this$parentDimension17[1];this.setAt(ol*pe,Te*ue,this.width*pe,this.height*ue)}return this.div}},{key:"serialize",value:function serialize(){var ol=arguments.length>0&&arguments[0]!==undefined?arguments[0]:!1;var Te=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;if(this.isEmpty())return null;var pe={annotationType:xr.AnnotationEditorType.STAMP,bitmapId:t$1(this,Q),pageIndex:this.pageIndex,rect:this.getRect(0,0),rotation:this.rotation,isSvg:t$1(this,Mt),structTreeParentId:this._structTreeParentId};if(ol)return pe.bitmapUrl=W(this,He,ro).call(this,!0),pe.accessibilityData=this.altTextData,pe;var _this$altTextData=this.altTextData,ue=_this$altTextData.decorative,se=_this$altTextData.altText;if(!ue&&se&&(pe.accessibilityData={type:"Figure",alt:se}),Te===null)return pe;Te.stamps||(Te.stamps=new Map);var be=t$1(this,Mt)?(pe.rect[2]-pe.rect[0])*(pe.rect[3]-pe.rect[1]):null;if(!Te.stamps.has(t$1(this,Q)))Te.stamps.set(t$1(this,Q),{area:be,serialized:pe}),pe.bitmap=W(this,He,ro).call(this,!1);else if(t$1(this,Mt)){var Ae=Te.stamps.get(t$1(this,Q));be>Ae.area&&(Ae.area=be,Ae.serialized.bitmap.close(),Ae.serialized.bitmap=W(this,He,ro).call(this,!1))}return pe}}],[{key:"initialize",value:function initialize(ol){pr.AnnotationEditor.initialize(ol)}},{key:"supportedTypes",get:function get(){var ol=["apng","avif","bmp","gif","jpeg","png","svg+xml","webp","x-icon"];return(0,xr.shadow)(this,"supportedTypes",ol.map(function(Te){return"image/".concat(Te)}))}},{key:"supportedTypesStr",get:function get(){return(0,xr.shadow)(this,"supportedTypesStr",this.supportedTypes.join(","))}},{key:"isHandlingMimeForPasting",value:function isHandlingMimeForPasting(ol){return this.supportedTypes.includes(ol)}},{key:"paste",value:function paste(ol,Te){Te.pasteEditor(xr.AnnotationEditorType.STAMP,{bitmapFile:ol.getAsFile()})}},{key:"deserialize",value:function deserialize(ol,Te,pe){if(ol instanceof _r.StampAnnotationElement)return null;var ue=_get(_getPrototypeOf(Ps),"deserialize",this).call(this,ol,Te,pe),se=ol.rect,be=ol.bitmapUrl,Ae=ol.bitmapId,ze=ol.isSvg,pi=ol.accessibilityData;Ae&&pe.imageManager.isValidId(Ae)?Z(ue,Q,Ae):Z(ue,J,be),Z(ue,Mt,ze);var _ue$pageDimensions=_slicedToArray(ue.pageDimensions,2),io=_ue$pageDimensions[0],Qr=_ue$pageDimensions[1];return ue.width=(se[2]-se[0])/io,ue.height=(se[3]-se[1])/Qr,pi&&(ue.altTextData=pi),ue}}]);return Ps}(pr.AnnotationEditor);B=new WeakMap,Q=new WeakMap,Y=new WeakMap,J=new WeakMap,it=new WeakMap,nt=new WeakMap,ot=new WeakMap,dt=new WeakMap,Mt=new WeakMap,Ot=new WeakMap,Qt=new WeakSet,Ut=function Ut(bl){var ol=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1;if(!bl){this.remove();return}Z(this,B,bl.bitmap),ol||(Z(this,Q,bl.id),Z(this,Mt,bl.isSvg)),W(this,ne,ae).call(this)},te=new WeakSet,qt=function qt(){Z(this,Y,null),this._uiManager.enableWaiting(!1),t$1(this,nt)&&this.div.focus()},ie=new WeakSet,re=function re(){var _this102=this;if(t$1(this,Q)){this._uiManager.enableWaiting(!0),this._uiManager.imageManager.getFromId(t$1(this,Q)).then(function(ol){return W(_this102,Qt,Ut).call(_this102,ol,!0)})["finally"](function(){return W(_this102,te,qt).call(_this102)});return}if(t$1(this,J)){var ol=t$1(this,J);Z(this,J,null),this._uiManager.enableWaiting(!0),Z(this,Y,this._uiManager.imageManager.getFromUrl(ol).then(function(Te){return W(_this102,Qt,Ut).call(_this102,Te)})["finally"](function(){return W(_this102,te,qt).call(_this102)}));return}if(t$1(this,it)){var _ol=t$1(this,it);Z(this,it,null),this._uiManager.enableWaiting(!0),Z(this,Y,this._uiManager.imageManager.getFromFile(_ol).then(function(Te){return W(_this102,Qt,Ut).call(_this102,Te)})["finally"](function(){return W(_this102,te,qt).call(_this102)}));return}var bl=document.createElement("input");bl.type="file",bl.accept=Ps.supportedTypesStr,Z(this,Y,new Promise(function(ol){bl.addEventListener("change",_asyncToGenerator(_regeneratorRuntime().mark(function _callee33(){var Te;return _regeneratorRuntime().wrap(function _callee33$(_context33){while(1)switch(_context33.prev=_context33.next){case 0:if(!(!bl.files||bl.files.length===0)){_context33.next=4;break}_this102.remove();_context33.next=9;break;case 4:_this102._uiManager.enableWaiting(!0);_context33.next=7;return _this102._uiManager.imageManager.getFromFile(bl.files[0]);case 7:Te=_context33.sent;W(_this102,Qt,Ut).call(_this102,Te);case 9:ol();case 10:case"end":return _context33.stop()}},_callee33)}))),bl.addEventListener("cancel",function(){_this102.remove(),ol()})})["finally"](function(){return W(_this102,te,qt).call(_this102)})),bl.click()},ne=new WeakSet,ae=function ae(){var bl=this.div;var _t$12=t$1(this,B),ol=_t$12.width,Te=_t$12.height;var _this$pageDimensions8=_slicedToArray(this.pageDimensions,2),pe=_this$pageDimensions8[0],ue=_this$pageDimensions8[1],se=0.75;if(this.width)ol=this.width*pe,Te=this.height*ue;else if(ol>se*pe||Te>se*ue){var pi=Math.min(se*pe/ol,se*ue/Te);ol*=pi,Te*=pi}var _this$parentDimension18=_slicedToArray(this.parentDimensions,2),be=_this$parentDimension18[0],Ae=_this$parentDimension18[1];this.setDims(ol*be/pe,Te*Ae/ue),this._uiManager.enableWaiting(!1);var ze=Z(this,nt,document.createElement("canvas"));bl.append(ze),bl.hidden=!1,W(this,_e,Xe).call(this,ol,Te),W(this,Xo,Se).call(this),t$1(this,Ot)||(this.parent.addUndoableEditor(this),Z(this,Ot,!0)),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",subtype:this.editorType,data:{action:"inserted_image"}}}),this.addAltTextButton()},Bt=new WeakSet,Wt=function Wt(bl,ol){var _this103=this;var Te;var _this$parentDimension19=_slicedToArray(this.parentDimensions,2),pe=_this$parentDimension19[0],ue=_this$parentDimension19[1];this.width=bl/pe,this.height=ol/ue,this.setDims(bl,ol),(Te=this._initialOptions)!=null&&Te.isCentered?this.center():this.fixAndSetPosition(),this._initialOptions=null,t$1(this,dt)!==null&&clearTimeout(t$1(this,dt)),Z(this,dt,setTimeout(function(){Z(_this103,dt,null),W(_this103,_e,Xe).call(_this103,bl,ol)},200))},oe=new WeakSet,ve=function ve(bl,ol){var _t$13=t$1(this,B),Te=_t$13.width,pe=_t$13.height;var ue=Te,se=pe,be=t$1(this,B);for(;ue>2*bl||se>2*ol;){var Ae=ue,ze=se;ue>2*bl&&(ue=ue>=16384?Math.floor(ue/2)-1:Math.ceil(ue/2)),se>2*ol&&(se=se>=16384?Math.floor(se/2)-1:Math.ceil(se/2));var pi=new OffscreenCanvas(ue,se);pi.getContext("2d").drawImage(be,0,0,Ae,ze,0,0,ue,se),be=pi.transferToImageBitmap()}return be},_e=new WeakSet,Xe=function Xe(bl,ol){bl=Math.ceil(bl),ol=Math.ceil(ol);var Te=t$1(this,nt);if(!Te||Te.width===bl&&Te.height===ol)return;Te.width=bl,Te.height=ol;var pe=t$1(this,Mt)?t$1(this,B):W(this,oe,ve).call(this,bl,ol),ue=Te.getContext("2d");ue.filter=this._uiManager.hcmFilter,ue.drawImage(pe,0,0,pe.width,pe.height,0,0,bl,ol)},He=new WeakSet,ro=function ro(bl){if(bl){var _t$14;if(t$1(this,Mt)){var Te=this._uiManager.imageManager.getSvgUrl(t$1(this,Q));if(Te)return Te}var ol=document.createElement("canvas");return(_t$14=t$1(this,B),ol.width=_t$14.width,ol.height=_t$14.height),ol.getContext("2d").drawImage(t$1(this,B),0,0),ol.toDataURL()}if(t$1(this,Mt)){var _this$pageDimensions9=_slicedToArray(this.pageDimensions,2),_ol2=_this$pageDimensions9[0],_Te2=_this$pageDimensions9[1],pe=Math.round(this.width*_ol2*$e.PixelsPerInch.PDF_TO_CSS_UNITS),ue=Math.round(this.height*_Te2*$e.PixelsPerInch.PDF_TO_CSS_UNITS),se=new OffscreenCanvas(pe,ue);return se.getContext("2d").drawImage(t$1(this,B),0,0,t$1(this,B).width,t$1(this,B).height,0,0,pe,ue),se.transferToImageBitmap()}return structuredClone(t$1(this,B))},Xo=new WeakSet,Se=function Se(){var _this104=this;Z(this,ot,new ResizeObserver(function(bl){var ol=bl[0].contentRect;ol.width&&ol.height&&W(_this104,Bt,Wt).call(_this104,ol.width,ol.height)})),t$1(this,ot).observe(this.div)},ee(Ps,"_type","stamp");var qe=Ps;o.StampEditor=qe}],__webpack_module_cache__={};function __w_pdfjs_require__(r){var o=__webpack_module_cache__[r];if(o!==void 0)return o.exports;var s=__webpack_module_cache__[r]={exports:{}};return __webpack_modules__[r](s,s.exports,__w_pdfjs_require__),s.exports}var __webpack_exports__={};return function(){var r=__webpack_exports__;Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"AbortException",{enumerable:!0,get:function get(){return o.AbortException}}),Object.defineProperty(r,"AnnotationEditorLayer",{enumerable:!0,get:function get(){return Y.AnnotationEditorLayer}}),Object.defineProperty(r,"AnnotationEditorParamsType",{enumerable:!0,get:function get(){return o.AnnotationEditorParamsType}}),Object.defineProperty(r,"AnnotationEditorType",{enumerable:!0,get:function get(){return o.AnnotationEditorType}}),Object.defineProperty(r,"AnnotationEditorUIManager",{enumerable:!0,get:function get(){return J.AnnotationEditorUIManager}}),Object.defineProperty(r,"AnnotationLayer",{enumerable:!0,get:function get(){return it.AnnotationLayer}}),Object.defineProperty(r,"AnnotationMode",{enumerable:!0,get:function get(){return o.AnnotationMode}}),Object.defineProperty(r,"CMapCompressionType",{enumerable:!0,get:function get(){return o.CMapCompressionType}}),Object.defineProperty(r,"DOMSVGFactory",{enumerable:!0,get:function get(){return B.DOMSVGFactory}}),Object.defineProperty(r,"FeatureTest",{enumerable:!0,get:function get(){return o.FeatureTest}}),Object.defineProperty(r,"GlobalWorkerOptions",{enumerable:!0,get:function get(){return nt.GlobalWorkerOptions}}),Object.defineProperty(r,"ImageKind",{enumerable:!0,get:function get(){return o.ImageKind}}),Object.defineProperty(r,"InvalidPDFException",{enumerable:!0,get:function get(){return o.InvalidPDFException}}),Object.defineProperty(r,"MissingPDFException",{enumerable:!0,get:function get(){return o.MissingPDFException}}),Object.defineProperty(r,"OPS",{enumerable:!0,get:function get(){return o.OPS}}),Object.defineProperty(r,"PDFDataRangeTransport",{enumerable:!0,get:function get(){return s.PDFDataRangeTransport}}),Object.defineProperty(r,"PDFDateString",{enumerable:!0,get:function get(){return B.PDFDateString}}),Object.defineProperty(r,"PDFWorker",{enumerable:!0,get:function get(){return s.PDFWorker}}),Object.defineProperty(r,"PasswordResponses",{enumerable:!0,get:function get(){return o.PasswordResponses}}),Object.defineProperty(r,"PermissionFlag",{enumerable:!0,get:function get(){return o.PermissionFlag}}),Object.defineProperty(r,"PixelsPerInch",{enumerable:!0,get:function get(){return B.PixelsPerInch}}),Object.defineProperty(r,"PromiseCapability",{enumerable:!0,get:function get(){return o.PromiseCapability}}),Object.defineProperty(r,"RenderingCancelledException",{enumerable:!0,get:function get(){return B.RenderingCancelledException}}),Object.defineProperty(r,"SVGGraphics",{enumerable:!0,get:function get(){return s.SVGGraphics}}),Object.defineProperty(r,"UnexpectedResponseException",{enumerable:!0,get:function get(){return o.UnexpectedResponseException}}),Object.defineProperty(r,"Util",{enumerable:!0,get:function get(){return o.Util}}),Object.defineProperty(r,"VerbosityLevel",{enumerable:!0,get:function get(){return o.VerbosityLevel}}),Object.defineProperty(r,"XfaLayer",{enumerable:!0,get:function get(){return ot.XfaLayer}}),Object.defineProperty(r,"build",{enumerable:!0,get:function get(){return s.build}}),Object.defineProperty(r,"createValidAbsoluteUrl",{enumerable:!0,get:function get(){return o.createValidAbsoluteUrl}}),Object.defineProperty(r,"getDocument",{enumerable:!0,get:function get(){return s.getDocument}}),Object.defineProperty(r,"getFilenameFromUrl",{enumerable:!0,get:function get(){return B.getFilenameFromUrl}}),Object.defineProperty(r,"getPdfFilenameFromUrl",{enumerable:!0,get:function get(){return B.getPdfFilenameFromUrl}}),Object.defineProperty(r,"getXfaPageViewport",{enumerable:!0,get:function get(){return B.getXfaPageViewport}}),Object.defineProperty(r,"isDataScheme",{enumerable:!0,get:function get(){return B.isDataScheme}}),Object.defineProperty(r,"isPdfFile",{enumerable:!0,get:function get(){return B.isPdfFile}}),Object.defineProperty(r,"loadScript",{enumerable:!0,get:function get(){return B.loadScript}}),Object.defineProperty(r,"noContextMenu",{enumerable:!0,get:function get(){return B.noContextMenu}}),Object.defineProperty(r,"normalizeUnicode",{enumerable:!0,get:function get(){return o.normalizeUnicode}}),Object.defineProperty(r,"renderTextLayer",{enumerable:!0,get:function get(){return Q.renderTextLayer}}),Object.defineProperty(r,"setLayerDimensions",{enumerable:!0,get:function get(){return B.setLayerDimensions}}),Object.defineProperty(r,"shadow",{enumerable:!0,get:function get(){return o.shadow}}),Object.defineProperty(r,"updateTextLayer",{enumerable:!0,get:function get(){return Q.updateTextLayer}}),Object.defineProperty(r,"version",{enumerable:!0,get:function get(){return s.version}});var o=__w_pdfjs_require__(1),s=__w_pdfjs_require__(2),B=__w_pdfjs_require__(6),Q=__w_pdfjs_require__(26),Y=__w_pdfjs_require__(27),J=__w_pdfjs_require__(5),it=__w_pdfjs_require__(29),nt=__w_pdfjs_require__(14),ot=__w_pdfjs_require__(32)}(),__webpack_exports__}()})})(pdf);var pdfExports=pdf.exports;var pdfjsLib=wf$1(pdfExports);var Sd=function Sd(r,o,s){if(!o.has(r))throw TypeError("Cannot "+s)},h=function h(r,o,s){return Sd(r,o,"read from private field"),s?s.call(r):o.get(r)},S=function S(r,o,s){if(o.has(r))throw TypeError("Cannot add the same private member more than once");o instanceof WeakSet?o.add(r):o.set(r,s)},A=function A(r,o,s,B){return Sd(r,o,"write to private field"),B?B.call(r,s):o.set(r,s),s},ws=function ws(r,o,s,B){return{set _(Q){A(r,o,Q,s)},get _(){return h(r,o,B)}}},D=function D(r,o,s){return Sd(r,o,"access private method"),s},Za=function(){function Za(){_classCallCheck(this,Za);this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}_createClass(Za,[{key:"subscribe",value:function subscribe(r){var _this105=this;return this.listeners.add(r),this.onSubscribe(),function(){_this105.listeners["delete"](r),_this105.onUnsubscribe()}}},{key:"hasListeners",value:function hasListeners(){return this.listeners.size>0}},{key:"onSubscribe",value:function onSubscribe(){}},{key:"onUnsubscribe",value:function onUnsubscribe(){}}]);return Za}(),Aa=(typeof window==="undefined"?"undefined":_typeof(window))>"u"||"Deno"in window;function ei(){}function Jm(r,o){return typeof r=="function"?r(o):r}function Wd(r){return typeof r=="number"&&r>=0&&r!==1/0}function aw(r,o){return Math.max(r+(o||0)-Date.now(),0)}function fy(r,o){var _r$type=r.type,s=_r$type===void 0?"all":_r$type,B=r.exact,Q=r.fetchStatus,Y=r.predicate,J=r.queryKey,it=r.stale;if(J){if(B){if(o.queryHash!==iu(J,o.options))return!1}else if(!zs(o.queryKey,J))return!1}if(s!=="all"){var nt=o.isActive();if(s==="active"&&!nt||s==="inactive"&&nt)return!1}return!(typeof it=="boolean"&&o.isStale()!==it||_typeof(Q)<"u"&&Q!==o.state.fetchStatus||Y&&!Y(o))}function my(r,o){var s=r.exact,B=r.status,Q=r.predicate,Y=r.mutationKey;if(Y){if(!o.options.mutationKey)return!1;if(s){if(Mo(o.options.mutationKey)!==Mo(Y))return!1}else if(!zs(o.options.mutationKey,Y))return!1}return!(B&&o.state.status!==B||Q&&!Q(o))}function iu(r,o){return((o==null?void 0:o.queryKeyHashFn)||Mo)(r)}function Mo(r){return JSON.stringify(r,function(o,s){return qd(s)?Object.keys(s).sort().reduce(function(B,Q){return B[Q]=s[Q],B},{}):s})}function zs(r,o){return r===o?!0:_typeof(r)!=_typeof(o)?!1:r&&o&&_typeof(r)=="object"&&_typeof(o)=="object"?!Object.keys(o).some(function(s){return!zs(r[s],o[s])}):!1}function Rc(r,o){if(r===o)return r;var s=vy(r)&&vy(o);if(s||qd(r)&&qd(o)){var B=s?r:Object.keys(r),Q=B.length,Y=s?o:Object.keys(o),J=Y.length,it=s?[]:{};var nt=0;for(var ot=0;ot<J;ot++){var dt=s?ot:Y[ot];!s&&r[dt]===void 0&&o[dt]===void 0&&B.includes(dt)?(it[dt]=void 0,nt++):(it[dt]=Rc(r[dt],o[dt]),it[dt]===r[dt]&&r[dt]!==void 0&&nt++)}return Q===J&&nt===Q?r:it}return o}function Sl(r,o){if(!o||Object.keys(r).length!==Object.keys(o).length)return!1;for(var s in r)if(r[s]!==o[s])return!1;return!0}function vy(r){return Array.isArray(r)&&r.length===Object.keys(r).length}function qd(r){if(!gy(r))return!1;var o=r.constructor;if(_typeof(o)>"u")return!0;var s=o.prototype;return!(!gy(s)||!s.hasOwnProperty("isPrototypeOf"))}function gy(r){return Object.prototype.toString.call(r)==="[object Object]"}function ev(r){return new Promise(function(o){setTimeout(o,r)})}function Qd(r,o,s){return typeof s.structuralSharing=="function"?s.structuralSharing(r,o):s.structuralSharing!==!1?Rc(r,o):o}function tv(r,o){var s=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0;var B=[].concat(_toConsumableArray(r),[o]);return s&&B.length>s?B.slice(1):B}function rv(r,o){var s=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0;var B=[o].concat(_toConsumableArray(r));return s&&B.length>s?B.slice(0,-1):B}var ho,bn,aa,Zp,iv=(Zp=function(_Za){_inherits(Zp,_Za);function Zp(){var _this106;_classCallCheck(this,Zp);_this106=_callSuper(this,Zp),S(_assertThisInitialized(_this106),ho,void 0),S(_assertThisInitialized(_this106),bn,void 0),S(_assertThisInitialized(_this106),aa,void 0),A(_assertThisInitialized(_this106),aa,function(r){if(!Aa&&window.addEventListener){var o=function o(){return r()};return window.addEventListener("visibilitychange",o,!1),function(){window.removeEventListener("visibilitychange",o)}}});return _this106}_createClass(Zp,[{key:"onSubscribe",value:function onSubscribe(){h(this,bn)||this.setEventListener(h(this,aa))}},{key:"onUnsubscribe",value:function onUnsubscribe(){var r;this.hasListeners()||((r=h(this,bn))==null||r.call(this),A(this,bn,void 0))}},{key:"setEventListener",value:function setEventListener(r){var _this107=this;var o;A(this,aa,r),(o=h(this,bn))==null||o.call(this),A(this,bn,r(function(s){typeof s=="boolean"?_this107.setFocused(s):_this107.onFocus()}))}},{key:"setFocused",value:function setFocused(r){h(this,ho)!==r&&(A(this,ho,r),this.onFocus())}},{key:"onFocus",value:function onFocus(){this.listeners.forEach(function(r){r()})}},{key:"isFocused",value:function isFocused(){var r;return typeof h(this,ho)=="boolean"?h(this,ho):((r=globalThis.document)==null?void 0:r.visibilityState)!=="hidden"}}]);return Zp}(Za),ho=new WeakMap,bn=new WeakMap,aa=new WeakMap,Zp),Pl=new iv,sa,_n,ca,Gp,nv=(Gp=function(_Za2){_inherits(Gp,_Za2);function Gp(){var _this108;_classCallCheck(this,Gp);_this108=_callSuper(this,Gp),S(_assertThisInitialized(_this108),sa,!0),S(_assertThisInitialized(_this108),_n,void 0),S(_assertThisInitialized(_this108),ca,void 0),A(_assertThisInitialized(_this108),ca,function(r){if(!Aa&&window.addEventListener){var o=function o(){return r(!0)},s=function s(){return r(!1)};return window.addEventListener("online",o,!1),window.addEventListener("offline",s,!1),function(){window.removeEventListener("online",o),window.removeEventListener("offline",s)}}});return _this108}_createClass(Gp,[{key:"onSubscribe",value:function onSubscribe(){h(this,_n)||this.setEventListener(h(this,ca))}},{key:"onUnsubscribe",value:function onUnsubscribe(){var r;this.hasListeners()||((r=h(this,_n))==null||r.call(this),A(this,_n,void 0))}},{key:"setEventListener",value:function setEventListener(r){var o;A(this,ca,r),(o=h(this,_n))==null||o.call(this),A(this,_n,r(this.setOnline.bind(this)))}},{key:"setOnline",value:function setOnline(r){h(this,sa)!==r&&(A(this,sa,r),this.listeners.forEach(function(o){o(r)}))}},{key:"isOnline",value:function isOnline(){return h(this,sa)}}]);return Gp}(Za),sa=new WeakMap,_n=new WeakMap,ca=new WeakMap,Gp),Al=new nv;function ov(r){return Math.min(1e3*Math.pow(2,r),3e4)}function rd(r){return(r!==null&&r!==void 0?r:"online")==="online"?Al.isOnline():!0}var sw=_createClass(function sw(r){_classCallCheck(this,sw);this.revert=r==null?void 0:r.revert,this.silent=r==null?void 0:r.silent});function Ad(r){return r instanceof sw}function cw(r){var o=!1,s=0,B=!1,Q,Y,J;var it=new Promise(function(qt,ie){Y=qt,J=ie}),nt=function nt(qt){var ie;B||(Qt(new sw(qt)),(ie=r.abort)==null||ie.call(r))},ot=function ot(){o=!0},dt=function dt(){o=!1},Mt=function Mt(){return!Pl.isFocused()||r.networkMode!=="always"&&!Al.isOnline()},Ot=function Ot(qt){var ie;B||(B=!0,(ie=r.onSuccess)==null||ie.call(r,qt),Q==null||Q(),Y(qt))},Qt=function Qt(qt){var ie;B||(B=!0,(ie=r.onError)==null||ie.call(r,qt),Q==null||Q(),J(qt))},Ut=function Ut(){return new Promise(function(qt){var ie;Q=function Q(re){var ne=B||!Mt();return ne&&qt(re),ne},(ie=r.onPause)==null||ie.call(r)}).then(function(){var qt;Q=void 0,B||(qt=r.onContinue)==null||qt.call(r)})},te=function te(){if(B)return;var qt;try{qt=r.fn()}catch(ie){qt=Promise.reject(ie)}Promise.resolve(qt).then(Ot)["catch"](function(ie){var _r$retry,_r$retryDelay;var re;if(B)return;var ne=(_r$retry=r.retry)!==null&&_r$retry!==void 0?_r$retry:Aa?0:3,ae=(_r$retryDelay=r.retryDelay)!==null&&_r$retryDelay!==void 0?_r$retryDelay:ov,Bt=typeof ae=="function"?ae(s,ie):ae,Wt=ne===!0||typeof ne=="number"&&s<ne||typeof ne=="function"&&ne(s,ie);if(o||!Wt){Qt(ie);return}s++,(re=r.onFail)==null||re.call(r,s,ie),ev(Bt).then(function(){if(Mt())return Ut()}).then(function(){o?Qt(ie):te()})})};return rd(r.networkMode)?te():Ut().then(te),{promise:it,cancel:nt,"continue":function _continue(){return Q!=null&&Q()?it:Promise.resolve()},cancelRetry:ot,continueRetry:dt}}function av(){var r=[],o=0,s=function s(dt){dt()},B=function B(dt){dt()},Q=function Q(dt){return setTimeout(dt,0)};var Y=function Y(dt){Q=dt},J=function J(dt){var Mt;o++;try{Mt=dt()}finally{o--,o||ot()}return Mt},it=function it(dt){o?r.push(dt):Q(function(){s(dt)})},nt=function nt(dt){return function(){for(var _len2=arguments.length,Mt=new Array(_len2),_key2=0;_key2<_len2;_key2++){Mt[_key2]=arguments[_key2]}it(function(){dt.apply(void 0,Mt)})}},ot=function ot(){var dt=r;r=[],dt.length&&Q(function(){B(function(){dt.forEach(function(Mt){s(Mt)})})})};return{batch:J,batchCalls:nt,schedule:it,setNotifyFunction:function setNotifyFunction(dt){s=dt},setBatchNotifyFunction:function setBatchNotifyFunction(dt){B=dt},setScheduler:Y}}var nr=av(),uo,Yp,lw=(Yp=function(){function Yp(){_classCallCheck(this,Yp);S(this,uo,void 0)}_createClass(Yp,[{key:"destroy",value:function destroy(){this.clearGcTimeout()}},{key:"scheduleGc",value:function scheduleGc(){var _this109=this;this.clearGcTimeout(),Wd(this.gcTime)&&A(this,uo,setTimeout(function(){_this109.optionalRemove()},this.gcTime))}},{key:"updateGcTime",value:function updateGcTime(r){this.gcTime=Math.max(this.gcTime||0,r!==null&&r!==void 0?r:Aa?1/0:5*60*1e3)}},{key:"clearGcTimeout",value:function clearGcTimeout(){h(this,uo)&&(clearTimeout(h(this,uo)),A(this,uo,void 0))}}]);return Yp}(),uo=new WeakMap,Yp),la,da,Zr,xn,Gr,Zt,uc,yo,ha,pl,fi,Yi,Xp,sv=(Xp=function(_lw){_inherits(Xp,_lw);function Xp(r){var _this110;_classCallCheck(this,Xp);_this110=_callSuper(this,Xp),S(_assertThisInitialized(_this110),ha),S(_assertThisInitialized(_this110),fi),S(_assertThisInitialized(_this110),la,void 0),S(_assertThisInitialized(_this110),da,void 0),S(_assertThisInitialized(_this110),Zr,void 0),S(_assertThisInitialized(_this110),xn,void 0),S(_assertThisInitialized(_this110),Gr,void 0),S(_assertThisInitialized(_this110),Zt,void 0),S(_assertThisInitialized(_this110),uc,void 0),S(_assertThisInitialized(_this110),yo,void 0),A(_assertThisInitialized(_this110),yo,!1),A(_assertThisInitialized(_this110),uc,r.defaultOptions),D(_assertThisInitialized(_this110),ha,pl).call(_assertThisInitialized(_this110),r.options),A(_assertThisInitialized(_this110),Zt,[]),A(_assertThisInitialized(_this110),Zr,r.cache),_this110.queryKey=r.queryKey,_this110.queryHash=r.queryHash,A(_assertThisInitialized(_this110),la,r.state||cv(_this110.options)),_this110.state=h(_assertThisInitialized(_this110),la),_this110.scheduleGc();return _this110}_createClass(Xp,[{key:"meta",get:function get(){return this.options.meta}},{key:"optionalRemove",value:function optionalRemove(){!h(this,Zt).length&&this.state.fetchStatus==="idle"&&h(this,Zr).remove(this)}},{key:"setData",value:function setData(r,o){var s=Qd(this.state.data,r,this.options);return D(this,fi,Yi).call(this,{data:s,type:"success",dataUpdatedAt:o==null?void 0:o.updatedAt,manual:o==null?void 0:o.manual}),s}},{key:"setState",value:function setState(r,o){D(this,fi,Yi).call(this,{type:"setState",state:r,setStateOptions:o})}},{key:"cancel",value:function cancel(r){var o;var s=h(this,xn);return(o=h(this,Gr))==null||o.cancel(r),s?s.then(ei)["catch"](ei):Promise.resolve()}},{key:"destroy",value:function destroy(){_get(_getPrototypeOf(Xp.prototype),"destroy",this).call(this),this.cancel({silent:!0})}},{key:"reset",value:function reset(){this.destroy(),this.setState(h(this,la))}},{key:"isActive",value:function isActive(){return h(this,Zt).some(function(r){return r.options.enabled!==!1})}},{key:"isDisabled",value:function isDisabled(){return this.getObserversCount()>0&&!this.isActive()}},{key:"isStale",value:function isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||h(this,Zt).some(function(r){return r.getCurrentResult().isStale})}},{key:"isStaleByTime",value:function isStaleByTime(){var r=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0;return this.state.isInvalidated||!this.state.dataUpdatedAt||!aw(this.state.dataUpdatedAt,r)}},{key:"onFocus",value:function onFocus(){var r;var o=h(this,Zt).find(function(s){return s.shouldFetchOnWindowFocus()});o==null||o.refetch({cancelRefetch:!1}),(r=h(this,Gr))==null||r["continue"]()}},{key:"onOnline",value:function onOnline(){var r;var o=h(this,Zt).find(function(s){return s.shouldFetchOnReconnect()});o==null||o.refetch({cancelRefetch:!1}),(r=h(this,Gr))==null||r["continue"]()}},{key:"addObserver",value:function addObserver(r){h(this,Zt).includes(r)||(h(this,Zt).push(r),this.clearGcTimeout(),h(this,Zr).notify({type:"observerAdded",query:this,observer:r}))}},{key:"removeObserver",value:function removeObserver(r){h(this,Zt).includes(r)&&(A(this,Zt,h(this,Zt).filter(function(o){return o!==r})),h(this,Zt).length||(h(this,Gr)&&(h(this,yo)?h(this,Gr).cancel({revert:!0}):h(this,Gr).cancelRetry()),this.scheduleGc()),h(this,Zr).notify({type:"observerRemoved",query:this,observer:r}))}},{key:"getObserversCount",value:function getObserversCount(){return h(this,Zt).length}},{key:"invalidate",value:function invalidate(){this.state.isInvalidated||D(this,fi,Yi).call(this,{type:"invalidate"})}},{key:"fetch",value:function fetch(r,o){var _this111=this;var s,B,Q,Y;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&o!=null&&o.cancelRefetch)this.cancel({silent:!0});else if(h(this,xn))return(s=h(this,Gr))==null||s.continueRetry(),h(this,xn)}if(r&&D(this,ha,pl).call(this,r),!this.options.queryFn){var Ot=h(this,Zt).find(function(Qt){return Qt.options.queryFn});Ot&&D(this,ha,pl).call(this,Ot.options)}var J=new AbortController,it={queryKey:this.queryKey,meta:this.meta},nt=function nt(Ot){Object.defineProperty(Ot,"signal",{enumerable:!0,get:function get(){return A(_this111,yo,!0),J.signal}})};nt(it);var ot=function ot(){return _this111.options.queryFn?(A(_this111,yo,!1),_this111.options.persister?_this111.options.persister(_this111.options.queryFn,it,_this111):_this111.options.queryFn(it)):Promise.reject(new Error("Missing queryFn: '".concat(_this111.options.queryHash,"'")))},dt={fetchOptions:o,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:ot};nt(dt),(B=this.options.behavior)==null||B.onFetch(dt,this),A(this,da,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((Q=dt.fetchOptions)==null?void 0:Q.meta))&&D(this,fi,Yi).call(this,{type:"fetch",meta:(Y=dt.fetchOptions)==null?void 0:Y.meta});var Mt=function Mt(Ot){var Qt,Ut,te,qt;Ad(Ot)&&Ot.silent||D(_this111,fi,Yi).call(_this111,{type:"error",error:Ot}),Ad(Ot)||((Ut=(Qt=h(_this111,Zr).config).onError)==null||Ut.call(Qt,Ot,_this111),(qt=(te=h(_this111,Zr).config).onSettled)==null||qt.call(te,_this111.state.data,Ot,_this111)),_this111.isFetchingOptimistic||_this111.scheduleGc(),_this111.isFetchingOptimistic=!1};return A(this,Gr,cw({fn:dt.fetchFn,abort:J.abort.bind(J),onSuccess:function onSuccess(Ot){var Qt,Ut,te,qt;if(_typeof(Ot)>"u"){Mt(new Error("".concat(_this111.queryHash," data is undefined")));return}_this111.setData(Ot),(Ut=(Qt=h(_this111,Zr).config).onSuccess)==null||Ut.call(Qt,Ot,_this111),(qt=(te=h(_this111,Zr).config).onSettled)==null||qt.call(te,Ot,_this111.state.error,_this111),_this111.isFetchingOptimistic||_this111.scheduleGc(),_this111.isFetchingOptimistic=!1},onError:Mt,onFail:function onFail(Ot,Qt){D(_this111,fi,Yi).call(_this111,{type:"failed",failureCount:Ot,error:Qt})},onPause:function onPause(){D(_this111,fi,Yi).call(_this111,{type:"pause"})},onContinue:function onContinue(){D(_this111,fi,Yi).call(_this111,{type:"continue"})},retry:dt.options.retry,retryDelay:dt.options.retryDelay,networkMode:dt.options.networkMode})),A(this,xn,h(this,Gr).promise),h(this,xn)}}]);return Xp}(lw),la=new WeakMap,da=new WeakMap,Zr=new WeakMap,xn=new WeakMap,Gr=new WeakMap,Zt=new WeakMap,uc=new WeakMap,yo=new WeakMap,ha=new WeakSet,pl=function pl(r){this.options=_objectSpread(_objectSpread({},h(this,uc)),r),this.updateGcTime(this.options.gcTime)},fi=new WeakSet,Yi=function Yi(r){var _this112=this;var o=function o(s){var _r$meta,_r$dataUpdatedAt;switch(r.type){case"failed":return _objectSpread(_objectSpread({},s),{},{fetchFailureCount:r.failureCount,fetchFailureReason:r.error});case"pause":return _objectSpread(_objectSpread({},s),{},{fetchStatus:"paused"});case"continue":return _objectSpread(_objectSpread({},s),{},{fetchStatus:"fetching"});case"fetch":return _objectSpread(_objectSpread({},s),{},{fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(_r$meta=r.meta)!==null&&_r$meta!==void 0?_r$meta:null,fetchStatus:rd(_this112.options.networkMode)?"fetching":"paused"},!s.dataUpdatedAt&&{error:null,status:"pending"});case"success":return _objectSpread(_objectSpread({},s),{},{data:r.data,dataUpdateCount:s.dataUpdateCount+1,dataUpdatedAt:(_r$dataUpdatedAt=r.dataUpdatedAt)!==null&&_r$dataUpdatedAt!==void 0?_r$dataUpdatedAt:Date.now(),error:null,isInvalidated:!1,status:"success"},!r.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null});case"error":var B=r.error;return Ad(B)&&B.revert&&h(_this112,da)?_objectSpread(_objectSpread({},h(_this112,da)),{},{fetchStatus:"idle"}):_objectSpread(_objectSpread({},s),{},{error:B,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:B,fetchStatus:"idle",status:"error"});case"invalidate":return _objectSpread(_objectSpread({},s),{},{isInvalidated:!0});case"setState":return _objectSpread(_objectSpread({},s),r.state)}};this.state=o(this.state),nr.batch(function(){h(_this112,Zt).forEach(function(s){s.onQueryUpdate()}),h(_this112,Zr).notify({query:_this112,type:"updated",action:r})})},Xp);function cv(r){var o=typeof r.initialData=="function"?r.initialData():r.initialData,s=_typeof(o)<"u",B=s?typeof r.initialDataUpdatedAt=="function"?r.initialDataUpdatedAt():r.initialDataUpdatedAt:0;return{data:o,dataUpdateCount:0,dataUpdatedAt:s?B!==null&&B!==void 0?B:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var Mi,Jp,lv=(Jp=function(_Za3){_inherits(Jp,_Za3);function Jp(){var _this113;var r=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,Jp);_this113=_callSuper(this,Jp),S(_assertThisInitialized(_this113),Mi,void 0),_this113.config=r,A(_assertThisInitialized(_this113),Mi,new Map);return _this113}_createClass(Jp,[{key:"build",value:function build(r,o,s){var _o$queryHash;var B=o.queryKey,Q=(_o$queryHash=o.queryHash)!==null&&_o$queryHash!==void 0?_o$queryHash:iu(B,o);var Y=this.get(Q);return Y||(Y=new sv({cache:this,queryKey:B,queryHash:Q,options:r.defaultQueryOptions(o),state:s,defaultOptions:r.getQueryDefaults(B)}),this.add(Y)),Y}},{key:"add",value:function add(r){h(this,Mi).has(r.queryHash)||(h(this,Mi).set(r.queryHash,r),this.notify({type:"added",query:r}))}},{key:"remove",value:function remove(r){var o=h(this,Mi).get(r.queryHash);o&&(r.destroy(),o===r&&h(this,Mi)["delete"](r.queryHash),this.notify({type:"removed",query:r}))}},{key:"clear",value:function clear(){var _this114=this;nr.batch(function(){_this114.getAll().forEach(function(r){_this114.remove(r)})})}},{key:"get",value:function get(r){return h(this,Mi).get(r)}},{key:"getAll",value:function getAll(){return _toConsumableArray(h(this,Mi).values())}},{key:"find",value:function find(r){var o=_objectSpread({exact:!0},r);return this.getAll().find(function(s){return fy(o,s)})}},{key:"findAll",value:function findAll(){var r=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var o=this.getAll();return Object.keys(r).length>0?o.filter(function(s){return fy(r,s)}):o}},{key:"notify",value:function notify(r){var _this115=this;nr.batch(function(){_this115.listeners.forEach(function(o){o(r)})})}},{key:"onFocus",value:function onFocus(){var _this116=this;nr.batch(function(){_this116.getAll().forEach(function(r){r.onFocus()})})}},{key:"onOnline",value:function onOnline(){var _this117=this;nr.batch(function(){_this117.getAll().forEach(function(r){r.onOnline()})})}}]);return Jp}(Za),Mi=new WeakMap,Jp),Oi,yc,Fr,ua,Ii,mn,ew,dv=(ew=function(_lw2){_inherits(ew,_lw2);function ew(r){var _this118;_classCallCheck(this,ew);_this118=_callSuper(this,ew),S(_assertThisInitialized(_this118),Ii),S(_assertThisInitialized(_this118),Oi,void 0),S(_assertThisInitialized(_this118),yc,void 0),S(_assertThisInitialized(_this118),Fr,void 0),S(_assertThisInitialized(_this118),ua,void 0),_this118.mutationId=r.mutationId,A(_assertThisInitialized(_this118),yc,r.defaultOptions),A(_assertThisInitialized(_this118),Fr,r.mutationCache),A(_assertThisInitialized(_this118),Oi,[]),_this118.state=r.state||dw(),_this118.setOptions(r.options),_this118.scheduleGc();return _this118}_createClass(ew,[{key:"setOptions",value:function setOptions(r){this.options=_objectSpread(_objectSpread({},h(this,yc)),r),this.updateGcTime(this.options.gcTime)}},{key:"meta",get:function get(){return this.options.meta}},{key:"addObserver",value:function addObserver(r){h(this,Oi).includes(r)||(h(this,Oi).push(r),this.clearGcTimeout(),h(this,Fr).notify({type:"observerAdded",mutation:this,observer:r}))}},{key:"removeObserver",value:function removeObserver(r){A(this,Oi,h(this,Oi).filter(function(o){return o!==r})),this.scheduleGc(),h(this,Fr).notify({type:"observerRemoved",mutation:this,observer:r})}},{key:"optionalRemove",value:function optionalRemove(){h(this,Oi).length||(this.state.status==="pending"?this.scheduleGc():h(this,Fr).remove(this))}},{key:"continue",value:function _continue(){var _ref111;var r;return(_ref111=(r=h(this,ua))==null?void 0:r["continue"]())!==null&&_ref111!==void 0?_ref111:this.execute(this.state.variables)}},{key:"execute",value:function(){var _execute=_asyncToGenerator(_regeneratorRuntime().mark(function _callee34(r){var _this119=this;var o,s,B,Q,Y,J,it,nt,ot,dt,Mt,Ot,Qt,Ut,te,qt,ie,re,ne,ae,Bt,Wt,ve,oe;return _regeneratorRuntime().wrap(function _callee34$(_context34){while(1)switch(_context34.prev=_context34.next){case 0:Bt=function Bt(){var _this119$options$retr;return A(_this119,ua,cw({fn:function fn(){return _this119.options.mutationFn?_this119.options.mutationFn(r):Promise.reject(new Error("No mutationFn found"))},onFail:function onFail(oe,ve){D(_this119,Ii,mn).call(_this119,{type:"failed",failureCount:oe,error:ve})},onPause:function onPause(){D(_this119,Ii,mn).call(_this119,{type:"pause"})},onContinue:function onContinue(){D(_this119,Ii,mn).call(_this119,{type:"continue"})},retry:(_this119$options$retr=_this119.options.retry)!==null&&_this119$options$retr!==void 0?_this119$options$retr:0,retryDelay:_this119.options.retryDelay,networkMode:_this119.options.networkMode})),h(_this119,ua).promise},Wt=this.state.status==="pending";_context34.prev=1;if(Wt){_context34.next=10;break}D(this,Ii,mn).call(this,{type:"pending",variables:r});_context34.next=6;return(s=(o=h(this,Fr).config).onMutate)==null?void 0:s.call(o,r,this);case 6:_context34.next=8;return(Q=(B=this.options).onMutate)==null?void 0:Q.call(B,r);case 8:ve=_context34.sent;ve!==this.state.context&&D(this,Ii,mn).call(this,{type:"pending",context:ve,variables:r});case 10:_context34.next=12;return Bt();case 12:oe=_context34.sent;_context34.next=15;return(J=(Y=h(this,Fr).config).onSuccess)==null?void 0:J.call(Y,oe,r,this.state.context,this);case 15:_context34.next=17;return(nt=(it=this.options).onSuccess)==null?void 0:nt.call(it,oe,r,this.state.context);case 17:_context34.next=19;return(dt=(ot=h(this,Fr).config).onSettled)==null?void 0:dt.call(ot,oe,null,this.state.variables,this.state.context,this);case 19:_context34.next=21;return(Ot=(Mt=this.options).onSettled)==null?void 0:Ot.call(Mt,oe,null,r,this.state.context);case 21:D(this,Ii,mn).call(this,{type:"success",data:oe});return _context34.abrupt("return",oe);case 25:_context34.prev=25;_context34.t0=_context34["catch"](1);_context34.prev=27;_context34.next=30;return(Ut=(Qt=h(this,Fr).config).onError)==null?void 0:Ut.call(Qt,_context34.t0,r,this.state.context,this);case 30:_context34.next=32;return(qt=(te=this.options).onError)==null?void 0:qt.call(te,_context34.t0,r,this.state.context);case 32:_context34.next=34;return(re=(ie=h(this,Fr).config).onSettled)==null?void 0:re.call(ie,void 0,_context34.t0,this.state.variables,this.state.context,this);case 34:_context34.next=36;return(ae=(ne=this.options).onSettled)==null?void 0:ae.call(ne,void 0,_context34.t0,r,this.state.context);case 36:throw _context34.t0;case 37:_context34.prev=37;D(this,Ii,mn).call(this,{type:"error",error:_context34.t0});return _context34.finish(37);case 40:case"end":return _context34.stop()}},_callee34,this,[[1,25],[27,,37,40]])}));function execute(_x17){return _execute.apply(this,arguments)}return execute}()}]);return ew}(lw),Oi=new WeakMap,yc=new WeakMap,Fr=new WeakMap,ua=new WeakMap,Ii=new WeakSet,mn=function mn(r){var _this120=this;var o=function o(s){switch(r.type){case"failed":return _objectSpread(_objectSpread({},s),{},{failureCount:r.failureCount,failureReason:r.error});case"pause":return _objectSpread(_objectSpread({},s),{},{isPaused:!0});case"continue":return _objectSpread(_objectSpread({},s),{},{isPaused:!1});case"pending":return _objectSpread(_objectSpread({},s),{},{context:r.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!rd(_this120.options.networkMode),status:"pending",variables:r.variables,submittedAt:Date.now()});case"success":return _objectSpread(_objectSpread({},s),{},{data:r.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1});case"error":return _objectSpread(_objectSpread({},s),{},{data:void 0,error:r.error,failureCount:s.failureCount+1,failureReason:r.error,isPaused:!1,status:"error"})}};this.state=o(this.state),nr.batch(function(){h(_this120,Oi).forEach(function(s){s.onMutationUpdate(r)}),h(_this120,Fr).notify({mutation:_this120,type:"updated",action:r})})},ew);function dw(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Yr,pc,po,tw,hv=(tw=function(_Za4){_inherits(tw,_Za4);function tw(){var _this121;var r=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,tw);_this121=_callSuper(this,tw),S(_assertThisInitialized(_this121),Yr,void 0),S(_assertThisInitialized(_this121),pc,void 0),S(_assertThisInitialized(_this121),po,void 0),_this121.config=r,A(_assertThisInitialized(_this121),Yr,[]),A(_assertThisInitialized(_this121),pc,0);return _this121}_createClass(tw,[{key:"build",value:function build(r,o,s){var B=new dv({mutationCache:this,mutationId:++ws(this,pc)._,options:r.defaultMutationOptions(o),state:s});return this.add(B),B}},{key:"add",value:function add(r){h(this,Yr).push(r),this.notify({type:"added",mutation:r})}},{key:"remove",value:function remove(r){A(this,Yr,h(this,Yr).filter(function(o){return o!==r})),this.notify({type:"removed",mutation:r})}},{key:"clear",value:function clear(){var _this122=this;nr.batch(function(){h(_this122,Yr).forEach(function(r){_this122.remove(r)})})}},{key:"getAll",value:function getAll(){return h(this,Yr)}},{key:"find",value:function find(r){var o=_objectSpread({exact:!0},r);return h(this,Yr).find(function(s){return my(o,s)})}},{key:"findAll",value:function findAll(){var r=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return h(this,Yr).filter(function(o){return my(r,o)})}},{key:"notify",value:function notify(r){var _this123=this;nr.batch(function(){_this123.listeners.forEach(function(o){o(r)})})}},{key:"resumePausedMutations",value:function resumePausedMutations(){var _h2,_this124=this;return A(this,po,((_h2=h(this,po))!==null&&_h2!==void 0?_h2:Promise.resolve()).then(function(){var r=h(_this124,Yr).filter(function(o){return o.state.isPaused});return nr.batch(function(){return r.reduce(function(o,s){return o.then(function(){return s["continue"]()["catch"](ei)})},Promise.resolve())})}).then(function(){A(_this124,po,void 0)})),h(this,po)}}]);return tw}(Za),Yr=new WeakMap,pc=new WeakMap,po=new WeakMap,tw);function Kd(r){return{onFetch:function onFetch(o,s){var B=function(){var _ref112=_asyncToGenerator(_regeneratorRuntime().mark(function _callee36(){var Q,Y,J,it,nt,ot,dt,Mt,Ot,Qt,Ut,te,qt,ie,re,ne,ae,Bt,Wt,_Ot$,_ne2,_ae6,_Bt4;return _regeneratorRuntime().wrap(function _callee36$(_context36){while(1)switch(_context36.prev=_context36.next){case 0:ot=o.options,dt=(J=(Y=(Q=o.fetchOptions)==null?void 0:Q.meta)==null?void 0:Y.fetchMore)==null?void 0:J.direction,Mt=((it=o.state.data)==null?void 0:it.pages)||[],Ot=((nt=o.state.data)==null?void 0:nt.pageParams)||[],Qt={pages:[],pageParams:[]};Ut=!1;te=function te(ne){Object.defineProperty(ne,"signal",{enumerable:!0,get:function get(){return o.signal.aborted?Ut=!0:o.signal.addEventListener("abort",function(){Ut=!0}),o.signal}})},qt=o.options.queryFn||function(){return Promise.reject(new Error("Missing queryFn: '".concat(o.options.queryHash,"'")))},ie=function(){var _ref113=_asyncToGenerator(_regeneratorRuntime().mark(function _callee35(ne,ae,Bt){var Wt,oe,ve,_e;return _regeneratorRuntime().wrap(function _callee35$(_context35){while(1)switch(_context35.prev=_context35.next){case 0:if(!Ut){_context35.next=2;break}return _context35.abrupt("return",Promise.reject());case 2:if(!(ae==null&&ne.pages.length)){_context35.next=4;break}return _context35.abrupt("return",Promise.resolve(ne));case 4:Wt={queryKey:o.queryKey,pageParam:ae,direction:Bt?"backward":"forward",meta:o.options.meta};te(Wt);_context35.next=8;return qt(Wt);case 8:oe=_context35.sent;ve=o.options.maxPages;_e=Bt?rv:tv;return _context35.abrupt("return",{pages:_e(ne.pages,oe,ve),pageParams:_e(ne.pageParams,ae,ve)});case 12:case"end":return _context35.stop()}},_callee35)}));return function ie(_x18,_x19,_x20){return _ref113.apply(this,arguments)}}();if(!(dt&&Mt.length)){_context36.next=10;break}ne=dt==="backward",ae=ne?hw:Zd,Bt={pages:Mt,pageParams:Ot},Wt=ae(ot,Bt);_context36.next=7;return ie(Bt,Wt,ne);case 7:re=_context36.sent;_context36.next=23;break;case 10:_context36.next=12;return ie(Qt,(_Ot$=Ot[0])!==null&&_Ot$!==void 0?_Ot$:ot.initialPageParam);case 12:re=_context36.sent;_ne2=r!==null&&r!==void 0?r:Mt.length;_ae6=1;case 15:if(!(_ae6<_ne2)){_context36.next=23;break}_Bt4=Zd(ot,re);_context36.next=19;return ie(re,_Bt4);case 19:re=_context36.sent;case 20:_ae6++;_context36.next=15;break;case 23:return _context36.abrupt("return",re);case 24:case"end":return _context36.stop()}},_callee36)}));return function B(){return _ref112.apply(this,arguments)}}();o.options.persister?o.fetchFn=function(){var Q,Y;return(Y=(Q=o.options).persister)==null?void 0:Y.call(Q,B,{queryKey:o.queryKey,meta:o.options.meta,signal:o.signal},s)}:o.fetchFn=B}}}function Zd(r,_ref114){var o=_ref114.pages,s=_ref114.pageParams;var B=o.length-1;return r.getNextPageParam(o[B],o,s[B],s)}function hw(r,_ref115){var o=_ref115.pages,s=_ref115.pageParams;var B;return(B=r.getPreviousPageParam)==null?void 0:B.call(r,o[0],o,s[0],s)}function uv(r,o){return o?Zd(r,o)!=null:!1}function yv(r,o){return!o||!r.getPreviousPageParam?!1:hw(r,o)!=null}var Ht,kn,Cn,ya,pa,$n,wa,fa,rw,pv=(rw=function(){function rw(){var r=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,rw);S(this,Ht,void 0),S(this,kn,void 0),S(this,Cn,void 0),S(this,ya,void 0),S(this,pa,void 0),S(this,$n,void 0),S(this,wa,void 0),S(this,fa,void 0),A(this,Ht,r.queryCache||new lv),A(this,kn,r.mutationCache||new hv),A(this,Cn,r.defaultOptions||{}),A(this,ya,new Map),A(this,pa,new Map),A(this,$n,0)}_createClass(rw,[{key:"mount",value:function mount(){var _this125=this;ws(this,$n)._++,h(this,$n)===1&&(A(this,wa,Pl.subscribe(function(){Pl.isFocused()&&(_this125.resumePausedMutations(),h(_this125,Ht).onFocus())})),A(this,fa,Al.subscribe(function(){Al.isOnline()&&(_this125.resumePausedMutations(),h(_this125,Ht).onOnline())})))}},{key:"unmount",value:function unmount(){var r,o;ws(this,$n)._--,h(this,$n)===0&&((r=h(this,wa))==null||r.call(this),A(this,wa,void 0),(o=h(this,fa))==null||o.call(this),A(this,fa,void 0))}},{key:"isFetching",value:function isFetching(r){return h(this,Ht).findAll(_objectSpread(_objectSpread({},r),{},{fetchStatus:"fetching"})).length}},{key:"isMutating",value:function isMutating(r){return h(this,kn).findAll(_objectSpread(_objectSpread({},r),{},{status:"pending"})).length}},{key:"getQueryData",value:function getQueryData(r){var o;var s=this.defaultQueryOptions({queryKey:r});return(o=h(this,Ht).get(s.queryHash))==null?void 0:o.state.data}},{key:"ensureQueryData",value:function ensureQueryData(r){var o=this.getQueryData(r.queryKey);return o!==void 0?Promise.resolve(o):this.fetchQuery(r)}},{key:"getQueriesData",value:function getQueriesData(r){return this.getQueryCache().findAll(r).map(function(_ref116){var o=_ref116.queryKey,s=_ref116.state;var B=s.data;return[o,B]})}},{key:"setQueryData",value:function setQueryData(r,o,s){var B=this.defaultQueryOptions({queryKey:r}),Q=h(this,Ht).get(B.queryHash),Y=Q==null?void 0:Q.state.data,J=Jm(o,Y);if(!(_typeof(J)>"u"))return h(this,Ht).build(this,B).setData(J,_objectSpread(_objectSpread({},s),{},{manual:!0}))}},{key:"setQueriesData",value:function setQueriesData(r,o,s){var _this126=this;return nr.batch(function(){return _this126.getQueryCache().findAll(r).map(function(_ref117){var B=_ref117.queryKey;return[B,_this126.setQueryData(B,o,s)]})})}},{key:"getQueryState",value:function getQueryState(r){var o;var s=this.defaultQueryOptions({queryKey:r});return(o=h(this,Ht).get(s.queryHash))==null?void 0:o.state}},{key:"removeQueries",value:function removeQueries(r){var o=h(this,Ht);nr.batch(function(){o.findAll(r).forEach(function(s){o.remove(s)})})}},{key:"resetQueries",value:function resetQueries(r,o){var _this127=this;var s=h(this,Ht),B=_objectSpread({type:"active"},r);return nr.batch(function(){return s.findAll(r).forEach(function(Q){Q.reset()}),_this127.refetchQueries(B,o)})}},{key:"cancelQueries",value:function cancelQueries(){var _this128=this;var r=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var o=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var s=_objectSpread({revert:!0},o),B=nr.batch(function(){return h(_this128,Ht).findAll(r).map(function(Q){return Q.cancel(s)})});return Promise.all(B).then(ei)["catch"](ei)}},{key:"invalidateQueries",value:function invalidateQueries(){var _this129=this;var r=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var o=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};return nr.batch(function(){var _ref118,_r$refetchType;if(h(_this129,Ht).findAll(r).forEach(function(B){B.invalidate()}),r.refetchType==="none")return Promise.resolve();var s=_objectSpread(_objectSpread({},r),{},{type:(_ref118=(_r$refetchType=r.refetchType)!==null&&_r$refetchType!==void 0?_r$refetchType:r.type)!==null&&_ref118!==void 0?_ref118:"active"});return _this129.refetchQueries(s,o)})}},{key:"refetchQueries",value:function refetchQueries(){var _ref119,_this130=this;var r=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var o=arguments.length>1?arguments[1]:undefined;var s=_objectSpread(_objectSpread({},o),{},{cancelRefetch:(_ref119=o==null?void 0:o.cancelRefetch)!==null&&_ref119!==void 0?_ref119:!0}),B=nr.batch(function(){return h(_this130,Ht).findAll(r).filter(function(Q){return!Q.isDisabled()}).map(function(Q){var Y=Q.fetch(void 0,s);return s.throwOnError||(Y=Y["catch"](ei)),Q.state.fetchStatus==="paused"?Promise.resolve():Y})});return Promise.all(B).then(ei)}},{key:"fetchQuery",value:function fetchQuery(r){var o=this.defaultQueryOptions(r);_typeof(o.retry)>"u"&&(o.retry=!1);var s=h(this,Ht).build(this,o);return s.isStaleByTime(o.staleTime)?s.fetch(o):Promise.resolve(s.state.data)}},{key:"prefetchQuery",value:function prefetchQuery(r){return this.fetchQuery(r).then(ei)["catch"](ei)}},{key:"fetchInfiniteQuery",value:function fetchInfiniteQuery(r){return r.behavior=Kd(r.pages),this.fetchQuery(r)}},{key:"prefetchInfiniteQuery",value:function prefetchInfiniteQuery(r){return this.fetchInfiniteQuery(r).then(ei)["catch"](ei)}},{key:"resumePausedMutations",value:function resumePausedMutations(){return h(this,kn).resumePausedMutations()}},{key:"getQueryCache",value:function getQueryCache(){return h(this,Ht)}},{key:"getMutationCache",value:function getMutationCache(){return h(this,kn)}},{key:"getDefaultOptions",value:function getDefaultOptions(){return h(this,Cn)}},{key:"setDefaultOptions",value:function setDefaultOptions(r){A(this,Cn,r)}},{key:"setQueryDefaults",value:function setQueryDefaults(r,o){h(this,ya).set(Mo(r),{queryKey:r,defaultOptions:o})}},{key:"getQueryDefaults",value:function getQueryDefaults(r){var o=_toConsumableArray(h(this,ya).values());var s={};return o.forEach(function(B){zs(r,B.queryKey)&&(s=_objectSpread(_objectSpread({},s),B.defaultOptions))}),s}},{key:"setMutationDefaults",value:function setMutationDefaults(r,o){h(this,pa).set(Mo(r),{mutationKey:r,defaultOptions:o})}},{key:"getMutationDefaults",value:function getMutationDefaults(r){var o=_toConsumableArray(h(this,pa).values());var s={};return o.forEach(function(B){zs(r,B.mutationKey)&&(s=_objectSpread(_objectSpread({},s),B.defaultOptions))}),s}},{key:"defaultQueryOptions",value:function defaultQueryOptions(r){if(r._defaulted)return r;var o=_objectSpread(_objectSpread(_objectSpread(_objectSpread({},h(this,Cn).queries),this.getQueryDefaults(r.queryKey)),r),{},{_defaulted:!0});return o.queryHash||(o.queryHash=iu(o.queryKey,o)),_typeof(o.refetchOnReconnect)>"u"&&(o.refetchOnReconnect=o.networkMode!=="always"),_typeof(o.throwOnError)>"u"&&(o.throwOnError=!!o.suspense),_typeof(o.networkMode)>"u"&&o.persister&&(o.networkMode="offlineFirst"),o}},{key:"defaultMutationOptions",value:function defaultMutationOptions(r){return r!=null&&r._defaulted?r:_objectSpread(_objectSpread(_objectSpread(_objectSpread({},h(this,Cn).mutations),(r==null?void 0:r.mutationKey)&&this.getMutationDefaults(r.mutationKey)),r),{},{_defaulted:!0})}},{key:"clear",value:function clear(){h(this,Ht).clear(),h(this,kn).clear()}}]);return rw}(),Ht=new WeakMap,kn=new WeakMap,Cn=new WeakMap,ya=new WeakMap,pa=new WeakMap,$n=new WeakMap,wa=new WeakMap,fa=new WeakMap,rw),Er,ht,wc,wr,wo,ma,Ti,fc,va,ga,fo,mo,En,ba,vo,bs,mc,Gd,vc,Yd,gc,Xd,bc,Jd,_c,eh,xc,th,kc,rh,ed,yw,iw,uw=(iw=function(_Za5){_inherits(iw,_Za5);function iw(r,o){var _this131;_classCallCheck(this,iw);_this131=_callSuper(this,iw),S(_assertThisInitialized(_this131),vo),S(_assertThisInitialized(_this131),mc),S(_assertThisInitialized(_this131),vc),S(_assertThisInitialized(_this131),gc),S(_assertThisInitialized(_this131),bc),S(_assertThisInitialized(_this131),_c),S(_assertThisInitialized(_this131),xc),S(_assertThisInitialized(_this131),kc),S(_assertThisInitialized(_this131),ed),S(_assertThisInitialized(_this131),Er,void 0),S(_assertThisInitialized(_this131),ht,void 0),S(_assertThisInitialized(_this131),wc,void 0),S(_assertThisInitialized(_this131),wr,void 0),S(_assertThisInitialized(_this131),wo,void 0),S(_assertThisInitialized(_this131),ma,void 0),S(_assertThisInitialized(_this131),Ti,void 0),S(_assertThisInitialized(_this131),fc,void 0),S(_assertThisInitialized(_this131),va,void 0),S(_assertThisInitialized(_this131),ga,void 0),S(_assertThisInitialized(_this131),fo,void 0),S(_assertThisInitialized(_this131),mo,void 0),S(_assertThisInitialized(_this131),En,void 0),S(_assertThisInitialized(_this131),ba,new Set),_this131.options=o,A(_assertThisInitialized(_this131),Er,r),A(_assertThisInitialized(_this131),Ti,null),_this131.bindMethods(),_this131.setOptions(o);return _this131}_createClass(iw,[{key:"bindMethods",value:function bindMethods(){this.refetch=this.refetch.bind(this)}},{key:"onSubscribe",value:function onSubscribe(){this.listeners.size===1&&(h(this,ht).addObserver(this),by(h(this,ht),this.options)?D(this,vo,bs).call(this):this.updateResult(),D(this,bc,Jd).call(this))}},{key:"onUnsubscribe",value:function onUnsubscribe(){this.hasListeners()||this.destroy()}},{key:"shouldFetchOnReconnect",value:function shouldFetchOnReconnect(){return ih(h(this,ht),this.options,this.options.refetchOnReconnect)}},{key:"shouldFetchOnWindowFocus",value:function shouldFetchOnWindowFocus(){return ih(h(this,ht),this.options,this.options.refetchOnWindowFocus)}},{key:"destroy",value:function destroy(){this.listeners=new Set,D(this,_c,eh).call(this),D(this,xc,th).call(this),h(this,ht).removeObserver(this)}},{key:"setOptions",value:function setOptions(r,o){var s=this.options,B=h(this,ht);if(this.options=h(this,Er).defaultQueryOptions(r),_typeof(this.options.enabled)<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");D(this,kc,rh).call(this),Sl(this.options,s)||h(this,Er).getQueryCache().notify({type:"observerOptionsUpdated",query:h(this,ht),observer:this});var Q=this.hasListeners();Q&&_y(h(this,ht),B,this.options,s)&&D(this,vo,bs).call(this),this.updateResult(o),Q&&(h(this,ht)!==B||this.options.enabled!==s.enabled||this.options.staleTime!==s.staleTime)&&D(this,mc,Gd).call(this);var Y=D(this,vc,Yd).call(this);Q&&(h(this,ht)!==B||this.options.enabled!==s.enabled||Y!==h(this,En))&&D(this,gc,Xd).call(this,Y)}},{key:"getOptimisticResult",value:function getOptimisticResult(r){var o=h(this,Er).getQueryCache().build(h(this,Er),r),s=this.createResult(o,r);return fv(this,s)&&(A(this,wr,s),A(this,ma,this.options),A(this,wo,h(this,ht).state)),s}},{key:"getCurrentResult",value:function getCurrentResult(){return h(this,wr)}},{key:"trackResult",value:function trackResult(r){var _this132=this;var o={};return Object.keys(r).forEach(function(s){Object.defineProperty(o,s,{configurable:!1,enumerable:!0,get:function get(){return h(_this132,ba).add(s),r[s]}})}),o}},{key:"getCurrentQuery",value:function getCurrentQuery(){return h(this,ht)}},{key:"refetch",value:function refetch(){var _ref120=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},r=_extends({},(_objectDestructuringEmpty(_ref120),_ref120));return this.fetch(_objectSpread({},r))}},{key:"fetchOptimistic",value:function fetchOptimistic(r){var _this133=this;var o=h(this,Er).defaultQueryOptions(r),s=h(this,Er).getQueryCache().build(h(this,Er),o);return s.isFetchingOptimistic=!0,s.fetch().then(function(){return _this133.createResult(s,o)})}},{key:"fetch",value:function fetch(r){var _r$cancelRefetch,_this134=this;return D(this,vo,bs).call(this,_objectSpread(_objectSpread({},r),{},{cancelRefetch:(_r$cancelRefetch=r.cancelRefetch)!==null&&_r$cancelRefetch!==void 0?_r$cancelRefetch:!0})).then(function(){return _this134.updateResult(),h(_this134,wr)})}},{key:"createResult",value:function createResult(r,o){var s;var B=h(this,ht),Q=this.options,Y=h(this,wr),J=h(this,wo),it=h(this,ma),nt=r!==B?r.state:h(this,wc),ot=r.state;var dt=ot.error,Mt=ot.errorUpdatedAt,Ot=ot.fetchStatus,Qt=ot.status,Ut=!1,te;if(o._optimisticResults){var ae=this.hasListeners(),Bt=!ae&&by(r,o),Wt=ae&&_y(r,B,o,Q);(Bt||Wt)&&(Ot=rd(r.options.networkMode)?"fetching":"paused",ot.dataUpdatedAt||(Qt="pending")),o._optimisticResults==="isRestoring"&&(Ot="idle")}if(o.select&&_typeof(ot.data)<"u"){if(Y&&ot.data===(J==null?void 0:J.data)&&o.select===h(this,fc))te=h(this,va);else try{A(this,fc,o.select),te=o.select(ot.data),te=Qd(Y==null?void 0:Y.data,te,o),A(this,va,te),A(this,Ti,null)}catch(ae){A(this,Ti,ae)}}else te=ot.data;if(_typeof(o.placeholderData)<"u"&&_typeof(te)>"u"&&Qt==="pending"){var _ae7;if(Y!=null&&Y.isPlaceholderData&&o.placeholderData===(it==null?void 0:it.placeholderData))_ae7=Y.data;else if(_ae7=typeof o.placeholderData=="function"?o.placeholderData((s=h(this,ga))==null?void 0:s.state.data,h(this,ga)):o.placeholderData,o.select&&_typeof(_ae7)<"u")try{_ae7=o.select(_ae7),A(this,Ti,null)}catch(Bt){A(this,Ti,Bt)}_typeof(_ae7)<"u"&&(Qt="success",te=Qd(Y==null?void 0:Y.data,_ae7,o),Ut=!0)}h(this,Ti)&&(dt=h(this,Ti),te=h(this,va),Mt=Date.now(),Qt="error");var qt=Ot==="fetching",ie=Qt==="pending",re=Qt==="error",ne=ie&&qt;return{status:Qt,fetchStatus:Ot,isPending:ie,isSuccess:Qt==="success",isError:re,isInitialLoading:ne,isLoading:ne,data:te,dataUpdatedAt:ot.dataUpdatedAt,error:dt,errorUpdatedAt:Mt,failureCount:ot.fetchFailureCount,failureReason:ot.fetchFailureReason,errorUpdateCount:ot.errorUpdateCount,isFetched:ot.dataUpdateCount>0||ot.errorUpdateCount>0,isFetchedAfterMount:ot.dataUpdateCount>nt.dataUpdateCount||ot.errorUpdateCount>nt.errorUpdateCount,isFetching:qt,isRefetching:qt&&!ie,isLoadingError:re&&ot.dataUpdatedAt===0,isPaused:Ot==="paused",isPlaceholderData:Ut,isRefetchError:re&&ot.dataUpdatedAt!==0,isStale:nu(r,o),refetch:this.refetch}}},{key:"updateResult",value:function updateResult(r){var _this135=this;var o=h(this,wr),s=this.createResult(h(this,ht),this.options);if(A(this,wo,h(this,ht).state),A(this,ma,this.options),h(this,wo).data!==void 0&&A(this,ga,h(this,ht)),Sl(s,o))return;A(this,wr,s);var B={},Q=function Q(){if(!o)return!0;var Y=_this135.options.notifyOnChangeProps,J=typeof Y=="function"?Y():Y;if(J==="all"||!J&&!h(_this135,ba).size)return!0;var it=new Set(J!==null&&J!==void 0?J:h(_this135,ba));return _this135.options.throwOnError&&it.add("error"),Object.keys(h(_this135,wr)).some(function(nt){var ot=nt;return h(_this135,wr)[ot]!==o[ot]&&it.has(ot)})};(r==null?void 0:r.listeners)!==!1&&Q()&&(B.listeners=!0),D(this,ed,yw).call(this,_objectSpread(_objectSpread({},B),r))}},{key:"onQueryUpdate",value:function onQueryUpdate(){this.updateResult(),this.hasListeners()&&D(this,bc,Jd).call(this)}}]);return iw}(Za),Er=new WeakMap,ht=new WeakMap,wc=new WeakMap,wr=new WeakMap,wo=new WeakMap,ma=new WeakMap,Ti=new WeakMap,fc=new WeakMap,va=new WeakMap,ga=new WeakMap,fo=new WeakMap,mo=new WeakMap,En=new WeakMap,ba=new WeakMap,vo=new WeakSet,bs=function bs(r){D(this,kc,rh).call(this);var o=h(this,ht).fetch(this.options,r);return r!=null&&r.throwOnError||(o=o["catch"](ei)),o},mc=new WeakSet,Gd=function Gd(){var _this136=this;if(D(this,_c,eh).call(this),Aa||h(this,wr).isStale||!Wd(this.options.staleTime))return;var r=aw(h(this,wr).dataUpdatedAt,this.options.staleTime)+1;A(this,fo,setTimeout(function(){h(_this136,wr).isStale||_this136.updateResult()},r))},vc=new WeakSet,Yd=function Yd(){var _ref121;return(_ref121=typeof this.options.refetchInterval=="function"?this.options.refetchInterval(h(this,ht)):this.options.refetchInterval)!==null&&_ref121!==void 0?_ref121:!1},gc=new WeakSet,Xd=function Xd(r){var _this137=this;D(this,xc,th).call(this),A(this,En,r),!(Aa||this.options.enabled===!1||!Wd(h(this,En))||h(this,En)===0)&&A(this,mo,setInterval(function(){(_this137.options.refetchIntervalInBackground||Pl.isFocused())&&D(_this137,vo,bs).call(_this137)},h(this,En)))},bc=new WeakSet,Jd=function Jd(){D(this,mc,Gd).call(this),D(this,gc,Xd).call(this,D(this,vc,Yd).call(this))},_c=new WeakSet,eh=function eh(){h(this,fo)&&(clearTimeout(h(this,fo)),A(this,fo,void 0))},xc=new WeakSet,th=function th(){h(this,mo)&&(clearInterval(h(this,mo)),A(this,mo,void 0))},kc=new WeakSet,rh=function rh(){var r=h(this,Er).getQueryCache().build(h(this,Er),this.options);if(r===h(this,ht))return;var o=h(this,ht);A(this,ht,r),A(this,wc,r.state),this.hasListeners()&&(o==null||o.removeObserver(this),r.addObserver(this))},ed=new WeakSet,yw=function yw(r){var _this138=this;nr.batch(function(){r.listeners&&_this138.listeners.forEach(function(o){o(h(_this138,wr))}),h(_this138,Er).getQueryCache().notify({query:h(_this138,ht),type:"observerResultsUpdated"})})},iw);function wv(r,o){return o.enabled!==!1&&!r.state.dataUpdatedAt&&!(r.state.status==="error"&&o.retryOnMount===!1)}function by(r,o){return wv(r,o)||r.state.dataUpdatedAt>0&&ih(r,o,o.refetchOnMount)}function ih(r,o,s){if(o.enabled!==!1){var B=typeof s=="function"?s(r):s;return B==="always"||B!==!1&&nu(r,o)}return!1}function _y(r,o,s,B){return s.enabled!==!1&&(r!==o||B.enabled===!1)&&(!s.suspense||r.state.status!=="error")&&nu(r,s)}function nu(r,o){return r.isStaleByTime(o.staleTime)}function fv(r,o){return!Sl(r.getCurrentResult(),o)}var mv=function(_uw){_inherits(mv,_uw);function mv(r,o){_classCallCheck(this,mv);return _callSuper(this,mv,[r,o])}_createClass(mv,[{key:"bindMethods",value:function bindMethods(){_get(_getPrototypeOf(mv.prototype),"bindMethods",this).call(this),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}},{key:"setOptions",value:function setOptions(r,o){_get(_getPrototypeOf(mv.prototype),"setOptions",this).call(this,_objectSpread(_objectSpread({},r),{},{behavior:Kd()}),o)}},{key:"getOptimisticResult",value:function getOptimisticResult(r){return r.behavior=Kd(),_get(_getPrototypeOf(mv.prototype),"getOptimisticResult",this).call(this,r)}},{key:"fetchNextPage",value:function fetchNextPage(r){return this.fetch(_objectSpread(_objectSpread({},r),{},{meta:{fetchMore:{direction:"forward"}}}))}},{key:"fetchPreviousPage",value:function fetchPreviousPage(r){return this.fetch(_objectSpread(_objectSpread({},r),{},{meta:{fetchMore:{direction:"backward"}}}))}},{key:"createResult",value:function createResult(r,o){var s,B,Q,Y;var J=r.state,it=_get(_getPrototypeOf(mv.prototype),"createResult",this).call(this,r,o),nt=it.isFetching,ot=it.isRefetching,dt=nt&&((B=(s=J.fetchMeta)==null?void 0:s.fetchMore)==null?void 0:B.direction)==="forward",Mt=nt&&((Y=(Q=J.fetchMeta)==null?void 0:Q.fetchMore)==null?void 0:Y.direction)==="backward";return _objectSpread(_objectSpread({},it),{},{fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:uv(o,J.data),hasPreviousPage:yv(o,J.data),isFetchingNextPage:dt,isFetchingPreviousPage:Mt,isRefetching:ot&&!dt&&!Mt})}}]);return mv}(uw),Sn,Pn,zr,Ji,_a,wl,Cc,nh,nw,Ye=(nw=function(_Za6){_inherits(nw,_Za6);function nw(r,o){var _this139;_classCallCheck(this,nw);_this139=_callSuper(this,nw),S(_assertThisInitialized(_this139),_a),S(_assertThisInitialized(_this139),Cc),S(_assertThisInitialized(_this139),Sn,void 0),S(_assertThisInitialized(_this139),Pn,void 0),S(_assertThisInitialized(_this139),zr,void 0),S(_assertThisInitialized(_this139),Ji,void 0),A(_assertThisInitialized(_this139),Sn,r),_this139.setOptions(o),_this139.bindMethods(),D(_assertThisInitialized(_this139),_a,wl).call(_assertThisInitialized(_this139));return _this139}_createClass(nw,[{key:"bindMethods",value:function bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}},{key:"setOptions",value:function setOptions(r){var o;var s=this.options;this.options=h(this,Sn).defaultMutationOptions(r),Sl(this.options,s)||h(this,Sn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:h(this,zr),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&Mo(s.mutationKey)!==Mo(this.options.mutationKey)?this.reset():(o=h(this,zr))==null||o.setOptions(this.options)}},{key:"onUnsubscribe",value:function onUnsubscribe(){var r;this.hasListeners()||(r=h(this,zr))==null||r.removeObserver(this)}},{key:"onMutationUpdate",value:function onMutationUpdate(r){D(this,_a,wl).call(this),D(this,Cc,nh).call(this,r)}},{key:"getCurrentResult",value:function getCurrentResult(){return h(this,Pn)}},{key:"reset",value:function reset(){var r;(r=h(this,zr))==null||r.removeObserver(this),A(this,zr,void 0),D(this,_a,wl).call(this),D(this,Cc,nh).call(this)}},{key:"mutate",value:function mutate(r,o){var s;return A(this,Ji,o),(s=h(this,zr))==null||s.removeObserver(this),A(this,zr,h(this,Sn).getMutationCache().build(h(this,Sn),this.options)),h(this,zr).addObserver(this),h(this,zr).execute(r)}}]);return nw}(Za),Sn=new WeakMap,Pn=new WeakMap,zr=new WeakMap,Ji=new WeakMap,_a=new WeakSet,wl=function wl(){var _ref122;var r;var o=(_ref122=(r=h(this,zr))==null?void 0:r.state)!==null&&_ref122!==void 0?_ref122:dw();A(this,Pn,_objectSpread(_objectSpread({},o),{},{isPending:o.status==="pending",isSuccess:o.status==="success",isError:o.status==="error",isIdle:o.status==="idle",mutate:this.mutate,reset:this.reset}))},Cc=new WeakSet,nh=function nh(r){var _this140=this;nr.batch(function(){var o,s,B,Q,Y,J,it,nt;if(h(_this140,Ji)&&_this140.hasListeners()){var ot=h(_this140,Pn).variables,dt=h(_this140,Pn).context;(r==null?void 0:r.type)==="success"?((s=(o=h(_this140,Ji)).onSuccess)==null||s.call(o,r.data,ot,dt),(Q=(B=h(_this140,Ji)).onSettled)==null||Q.call(B,r.data,null,ot,dt)):(r==null?void 0:r.type)==="error"&&((J=(Y=h(_this140,Ji)).onError)==null||J.call(Y,r.error,ot,dt),(nt=(it=h(_this140,Ji)).onSettled)==null||nt.call(it,void 0,r.error,ot,dt))}_this140.listeners.forEach(function(ot){ot(h(_this140,Pn))})})},nw);function vv(r){return _objectSpread({mutationKey:r.options.mutationKey,state:r.state},r.meta&&{meta:r.meta})}function gv(r){return _objectSpread({state:r.state,queryKey:r.queryKey,queryHash:r.queryHash},r.meta&&{meta:r.meta})}function bv(r){return r.state.isPaused}function _v(r){return r.state.status==="success"}function xv(r){var _o$shouldDehydrateMut,_o$shouldDehydrateQue;var o=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var s=(_o$shouldDehydrateMut=o.shouldDehydrateMutation)!==null&&_o$shouldDehydrateMut!==void 0?_o$shouldDehydrateMut:bv,B=r.getMutationCache().getAll().flatMap(function(J){return s(J)?[vv(J)]:[]}),Q=(_o$shouldDehydrateQue=o.shouldDehydrateQuery)!==null&&_o$shouldDehydrateQue!==void 0?_o$shouldDehydrateQue:_v,Y=r.getQueryCache().getAll().flatMap(function(J){return Q(J)?[gv(J)]:[]});return{mutations:B,queries:Y}}function kv(r,o,s){if(_typeof(o)!="object"||o===null)return;var B=r.getMutationCache(),Q=r.getQueryCache(),Y=o.mutations||[],J=o.queries||[];Y.forEach(function(it){var nt;B.build(r,_objectSpread(_objectSpread({},(nt=s==null?void 0:s.defaultOptions)==null?void 0:nt.mutations),{},{mutationKey:it.mutationKey,meta:it.meta}),it.state)}),J.forEach(function(_ref123){var it=_ref123.queryKey,nt=_ref123.state,ot=_ref123.queryHash,dt=_ref123.meta;var Mt;var Ot=Q.get(ot);if(Ot){if(Ot.state.dataUpdatedAt<nt.dataUpdatedAt){var Qt=nt.fetchStatus,_Ut=_objectWithoutProperties(nt,_excluded);Ot.setState(_Ut)}return}Q.build(r,_objectSpread(_objectSpread({},(Mt=s==null?void 0:s.defaultOptions)==null?void 0:Mt.queries),{},{queryKey:it,queryHash:ot,meta:dt}),_objectSpread(_objectSpread({},nt),{},{fetchStatus:"idle"}))})}var La=function(_Error){_inherits(La,_Error);function La(o,s){var _this141;_classCallCheck(this,La);var B=(this instanceof La?this.constructor:void 0).prototype;_this141=_callSuper(this,La,["".concat(o,": Status code '").concat(s,"'")]),_this141.statusCode=s,_this141.__proto__=B;return _this141}return _createClass(La)}(_wrapNativeSuper(Error));var ou=function(_Error2){_inherits(ou,_Error2);function ou(){var _this142;var o=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"A timeout occurred.";_classCallCheck(this,ou);var s=(this instanceof ou?this.constructor:void 0).prototype;_this142=_callSuper(this,ou,[o]),_this142.__proto__=s;return _this142}return _createClass(ou)}(_wrapNativeSuper(Error));var _i=function(_Error3){_inherits(_i,_Error3);function _i(){var _this143;var o=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"An abort occurred.";_classCallCheck(this,_i);var s=(this instanceof _i?this.constructor:void 0).prototype;_this143=_callSuper(this,_i,[o]),_this143.__proto__=s;return _this143}return _createClass(_i)}(_wrapNativeSuper(Error));var Cv=function(_Error4){_inherits(Cv,_Error4);function Cv(o,s){var _this144;_classCallCheck(this,Cv);var B=(this instanceof Cv?this.constructor:void 0).prototype;_this144=_callSuper(this,Cv,[o]),_this144.transport=s,_this144.errorType="UnsupportedTransportError",_this144.__proto__=B;return _this144}return _createClass(Cv)}(_wrapNativeSuper(Error));var $v=function(_Error5){_inherits($v,_Error5);function $v(o,s){var _this145;_classCallCheck(this,$v);var B=(this instanceof $v?this.constructor:void 0).prototype;_this145=_callSuper(this,$v,[o]),_this145.transport=s,_this145.errorType="DisabledTransportError",_this145.__proto__=B;return _this145}return _createClass($v)}(_wrapNativeSuper(Error));var Ev=function(_Error6){_inherits(Ev,_Error6);function Ev(o,s){var _this146;_classCallCheck(this,Ev);var B=(this instanceof Ev?this.constructor:void 0).prototype;_this146=_callSuper(this,Ev,[o]),_this146.transport=s,_this146.errorType="FailedToStartTransportError",_this146.__proto__=B;return _this146}return _createClass(Ev)}(_wrapNativeSuper(Error));var Sv=function(_Error7){_inherits(Sv,_Error7);function Sv(o){var _this147;_classCallCheck(this,Sv);var s=(this instanceof Sv?this.constructor:void 0).prototype;_this147=_callSuper(this,Sv,[o]),_this147.errorType="FailedToNegotiateWithServerError",_this147.__proto__=s;return _this147}return _createClass(Sv)}(_wrapNativeSuper(Error));var Pv=function(_Error8){_inherits(Pv,_Error8);function Pv(o,s){var _this148;_classCallCheck(this,Pv);var B=(this instanceof Pv?this.constructor:void 0).prototype;_this148=_callSuper(this,Pv,[o]),_this148.innerErrors=s,_this148.__proto__=B;return _this148}return _createClass(Pv)}(_wrapNativeSuper(Error));var pw=_createClass(function pw(o,s,B){_classCallCheck(this,pw);this.statusCode=o,this.statusText=s,this.content=B});var id=function(){function id(){_classCallCheck(this,id)}_createClass(id,[{key:"get",value:function get(o,s){return this.send(_objectSpread(_objectSpread({},s),{},{method:"GET",url:o}))}},{key:"post",value:function post(o,s){return this.send(_objectSpread(_objectSpread({},s),{},{method:"POST",url:o}))}},{key:"delete",value:function _delete(o,s){return this.send(_objectSpread(_objectSpread({},s),{},{method:"DELETE",url:o}))}},{key:"getCookieString",value:function getCookieString(o){return""}}]);return id}();var G;(function(r){r[r.Trace=0]="Trace",r[r.Debug=1]="Debug",r[r.Information=2]="Information",r[r.Warning=3]="Warning",r[r.Error=4]="Error",r[r.Critical=5]="Critical",r[r.None=6]="None"})(G||(G={}));var Ns=function(){function Ns(){_classCallCheck(this,Ns)}_createClass(Ns,[{key:"log",value:function log(o,s){}}]);return Ns}();Ns.instance=new Ns;var Av="7.0.14";var er=function(){function er(){_classCallCheck(this,er)}_createClass(er,null,[{key:"isRequired",value:function isRequired(o,s){if(o==null)throw new Error("The '".concat(s,"' argument is required."))}},{key:"isNotEmpty",value:function isNotEmpty(o,s){if(!o||o.match(/^\s*$/))throw new Error("The '".concat(s,"' argument should not be empty."))}},{key:"isIn",value:function isIn(o,s,B){if(!(o in s))throw new Error("Unknown ".concat(B," value: ").concat(o,"."))}}]);return er}();var Xt=function(){function Xt(){_classCallCheck(this,Xt)}_createClass(Xt,null,[{key:"isBrowser",get:function get(){return(typeof window==="undefined"?"undefined":_typeof(window))=="object"&&_typeof(window.document)=="object"}},{key:"isWebWorker",get:function get(){return(typeof self==="undefined"?"undefined":_typeof(self))=="object"&&"importScripts"in self}},{key:"isReactNative",get:function get(){return(typeof window==="undefined"?"undefined":_typeof(window))=="object"&&_typeof(window.document)>"u"}},{key:"isNode",get:function get(){return!this.isBrowser&&!this.isWebWorker&&!this.isReactNative}}]);return Xt}();function Vs(r,o){var s="";return Dc(r)?(s="Binary data of length ".concat(r.byteLength),o&&(s+=". Content: '".concat(Lv(r),"'"))):typeof r=="string"&&(s="String data of length ".concat(r.length),o&&(s+=". Content: '".concat(r,"'"))),s}function Lv(r){var o=new Uint8Array(r);var s="";return o.forEach(function(B){var Q=B<16?"0":"";s+="0x".concat(Q).concat(B.toString(16)," ")}),s.substr(0,s.length-1)}function Dc(r){return r&&(typeof ArrayBuffer==="undefined"?"undefined":_typeof(ArrayBuffer))<"u"&&(r instanceof ArrayBuffer||r.constructor&&r.constructor.name==="ArrayBuffer")}function ww(_x21,_x22,_x23,_x24,_x25,_x26){return _ww.apply(this,arguments)}function _ww(){_ww=_asyncToGenerator(_regeneratorRuntime().mark(function _callee266(r,o,s,B,Q,Y){var J,_Ma11,_Ma12,it,nt,ot,dt;return _regeneratorRuntime().wrap(function _callee266$(_context268){while(1)switch(_context268.prev=_context268.next){case 0:J={},_Ma11=Ma(),_Ma12=_slicedToArray(_Ma11,2),it=_Ma12[0],nt=_Ma12[1];J[it]=nt,r.log(G.Trace,"(".concat(o," transport) sending data. ").concat(Vs(Q,Y.logMessageContent),"."));ot=Dc(Q)?"arraybuffer":"text";_context268.next=5;return s.post(B,{content:Q,headers:_objectSpread(_objectSpread({},J),Y.headers),responseType:ot,timeout:Y.timeout,withCredentials:Y.withCredentials});case 5:dt=_context268.sent;r.log(G.Trace,"(".concat(o," transport) request complete. Response status: ").concat(dt.statusCode,"."));case 7:case"end":return _context268.stop()}},_callee266)}));return _ww.apply(this,arguments)}function Mv(r){return r===void 0?new Ll(G.Information):r===null?Ns.instance:r.log!==void 0?r:new Ll(r)}var Ov=function(){function Ov(o,s){_classCallCheck(this,Ov);this._subject=o,this._observer=s}_createClass(Ov,[{key:"dispose",value:function dispose(){var o=this._subject.observers.indexOf(this._observer);o>-1&&this._subject.observers.splice(o,1),this._subject.observers.length===0&&this._subject.cancelCallback&&this._subject.cancelCallback()["catch"](function(s){})}}]);return Ov}();var Ll=function(){function Ll(o){_classCallCheck(this,Ll);this._minLevel=o,this.out=console}_createClass(Ll,[{key:"log",value:function log(o,s){if(o>=this._minLevel){var B="[".concat((new Date()).toISOString(),"] ").concat(G[o],": ").concat(s);switch(o){case G.Critical:case G.Error:this.out.error(B);break;case G.Warning:this.out.warn(B);break;case G.Information:this.out.info(B);break;default:this.out.log(B);break}}}}]);return Ll}();function Ma(){var r="X-SignalR-User-Agent";return Xt.isNode&&(r="User-Agent"),[r,Iv(Av,Tv(),Dv(),Rv())]}function Iv(r,o,s,B){var Q="Microsoft SignalR/";var Y=r.split(".");return Q+="".concat(Y[0],".").concat(Y[1]),Q+=" (".concat(r,"; "),o&&o!==""?Q+="".concat(o,"; "):Q+="Unknown OS; ",Q+="".concat(s),B?Q+="; ".concat(B):Q+="; Unknown Runtime Version",Q+=")",Q}function Tv(){if(Xt.isNode)switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}else return""}function Rv(){if(Xt.isNode)return process.versions.node}function Dv(){return Xt.isNode?"NodeJS":"Browser"}function xy(r){return r.stack?r.stack:r.message?r.message:"".concat(r)}function Fv(){if((typeof globalThis==="undefined"?"undefined":_typeof(globalThis))<"u")return globalThis;if((typeof self==="undefined"?"undefined":_typeof(self))<"u")return self;if((typeof window==="undefined"?"undefined":_typeof(window))<"u")return window;if((typeof global==="undefined"?"undefined":_typeof(global))<"u")return global;throw new Error("could not find global")}var zv=function(_id){_inherits(zv,_id);function zv(o){var _this149;_classCallCheck(this,zv);if(_this149=_callSuper(this,zv),_this149._logger=o,(typeof fetch==="undefined"?"undefined":_typeof(fetch))>"u"){var s=typeof __webpack_require__=="function"?__non_webpack_require__:require;_this149._jar=new(s("tough-cookie").CookieJar),_this149._fetchType=s("node-fetch"),_this149._fetchType=s("fetch-cookie")(_this149._fetchType,_this149._jar)}else _this149._fetchType=fetch.bind(Fv());if((typeof AbortController==="undefined"?"undefined":_typeof(AbortController))>"u"){var _s2=typeof __webpack_require__=="function"?__non_webpack_require__:require;_this149._abortControllerType=_s2("abort-controller")}else _this149._abortControllerType=AbortController;return _possibleConstructorReturn(_this149)}_createClass(zv,[{key:"send",value:(function(){var _send=_asyncToGenerator(_regeneratorRuntime().mark(function _callee37(o){var _this150=this;var s,B,Q,it,Y,_it4,J;return _regeneratorRuntime().wrap(function _callee37$(_context37){while(1)switch(_context37.prev=_context37.next){case 0:if(!(o.abortSignal&&o.abortSignal.aborted)){_context37.next=2;break}throw new _i;case 2:if(o.method){_context37.next=4;break}throw new Error("No method defined.");case 4:if(o.url){_context37.next=6;break}throw new Error("No url defined.");case 6:s=new this._abortControllerType;o.abortSignal&&(o.abortSignal.onabort=function(){s.abort(),B=new _i});Q=null;if(o.timeout){it=o.timeout;Q=setTimeout(function(){s.abort(),_this150._logger.log(G.Warning,"Timeout from HTTP request."),B=new ou},it)}o.content===""&&(o.content=void 0),o.content&&(o.headers=o.headers||{},Dc(o.content)?o.headers["Content-Type"]="application/octet-stream":o.headers["Content-Type"]="text/plain;charset=UTF-8");_context37.prev=11;_context37.next=14;return this._fetchType(o.url,{body:o.content,cache:"no-cache",credentials:o.withCredentials===!0?"include":"same-origin",headers:_objectSpread({"X-Requested-With":"XMLHttpRequest"},o.headers),method:o.method,mode:"cors",redirect:"follow",signal:s.signal});case 14:Y=_context37.sent;_context37.next=20;break;case 17:_context37.prev=17;_context37.t0=_context37["catch"](11);throw B||(this._logger.log(G.Warning,"Error from HTTP request. ".concat(_context37.t0,".")),_context37.t0);case 20:_context37.prev=20;Q&&clearTimeout(Q),o.abortSignal&&(o.abortSignal.onabort=null);return _context37.finish(20);case 23:if(Y.ok){_context37.next=28;break}_context37.next=26;return ky(Y,"text");case 26:_it4=_context37.sent;throw new La(_it4||Y.statusText,Y.status);case 28:_context37.next=30;return ky(Y,o.responseType);case 30:J=_context37.sent;return _context37.abrupt("return",new pw(Y.status,Y.statusText,J));case 32:case"end":return _context37.stop()}},_callee37,this,[[11,17,20,23]])}));function send(_x27){return _send.apply(this,arguments)}return send}())},{key:"getCookieString",value:function getCookieString(o){var s="";return Xt.isNode&&this._jar&&this._jar.getCookies(o,function(B,Q){return s=Q.join("; ")}),s}}]);return zv}(id);function ky(r,o){var s;switch(o){case"arraybuffer":s=r.arrayBuffer();break;case"text":s=r.text();break;case"blob":case"document":case"json":throw new Error("".concat(o," is not supported."));default:s=r.text();break}return s}var Nv=function(_id2){_inherits(Nv,_id2);function Nv(o){var _this151;_classCallCheck(this,Nv);_this151=_callSuper(this,Nv),_this151._logger=o;return _this151}_createClass(Nv,[{key:"send",value:function send(o){var _this152=this;return o.abortSignal&&o.abortSignal.aborted?Promise.reject(new _i):o.method?o.url?new Promise(function(s,B){var Q=new XMLHttpRequest;Q.open(o.method,o.url,!0),Q.withCredentials=o.withCredentials===void 0?!0:o.withCredentials,Q.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.content===""&&(o.content=void 0),o.content&&(Dc(o.content)?Q.setRequestHeader("Content-Type","application/octet-stream"):Q.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));var Y=o.headers;Y&&Object.keys(Y).forEach(function(J){Q.setRequestHeader(J,Y[J])}),o.responseType&&(Q.responseType=o.responseType),o.abortSignal&&(o.abortSignal.onabort=function(){Q.abort(),B(new _i)}),o.timeout&&(Q.timeout=o.timeout),Q.onload=function(){o.abortSignal&&(o.abortSignal.onabort=null),Q.status>=200&&Q.status<300?s(new pw(Q.status,Q.statusText,Q.response||Q.responseText)):B(new La(Q.response||Q.responseText||Q.statusText,Q.status))},Q.onerror=function(){_this152._logger.log(G.Warning,"Error from HTTP request. ".concat(Q.status,": ").concat(Q.statusText,".")),B(new La(Q.statusText,Q.status))},Q.ontimeout=function(){_this152._logger.log(G.Warning,"Timeout from HTTP request."),B(new ou)},Q.send(o.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}]);return Nv}(id);var Vv=function(_id3){_inherits(Vv,_id3);function Vv(o){var _this153;_classCallCheck(this,Vv);if(_this153=_callSuper(this,Vv),(typeof fetch==="undefined"?"undefined":_typeof(fetch))<"u"||Xt.isNode)_this153._httpClient=new zv(o);else if((typeof XMLHttpRequest==="undefined"?"undefined":_typeof(XMLHttpRequest))<"u")_this153._httpClient=new Nv(o);else throw new Error("No usable HttpClient found.");return _possibleConstructorReturn(_this153)}_createClass(Vv,[{key:"send",value:function send(o){return o.abortSignal&&o.abortSignal.aborted?Promise.reject(new _i):o.method?o.url?this._httpClient.send(o):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}},{key:"getCookieString",value:function getCookieString(o){return this._httpClient.getCookieString(o)}}]);return Vv}(id);var Br=function(){function Br(){_classCallCheck(this,Br)}_createClass(Br,null,[{key:"write",value:function write(o){return"".concat(o).concat(Br.RecordSeparator)}},{key:"parse",value:function parse(o){if(o[o.length-1]!==Br.RecordSeparator)throw new Error("Message is incomplete.");var s=o.split(Br.RecordSeparator);return s.pop(),s}}]);return Br}();Br.RecordSeparatorCode=30;Br.RecordSeparator=String.fromCharCode(Br.RecordSeparatorCode);var Bv=function(){function Bv(){_classCallCheck(this,Bv)}_createClass(Bv,[{key:"writeHandshakeRequest",value:function writeHandshakeRequest(o){return Br.write(JSON.stringify(o))}},{key:"parseHandshakeResponse",value:function parseHandshakeResponse(o){var s,B;if(Dc(o)){var J=new Uint8Array(o),it=J.indexOf(Br.RecordSeparatorCode);if(it===-1)throw new Error("Message is incomplete.");var nt=it+1;s=String.fromCharCode.apply(null,Array.prototype.slice.call(J.slice(0,nt))),B=J.byteLength>nt?J.slice(nt).buffer:null}else{var _J=o,_it5=_J.indexOf(Br.RecordSeparator);if(_it5===-1)throw new Error("Message is incomplete.");var _nt3=_it5+1;s=_J.substring(0,_nt3),B=_J.length>_nt3?_J.substring(_nt3):null}var Q=Br.parse(s),Y=JSON.parse(Q[0]);if(Y.type)throw new Error("Expected a handshake response from the server.");return[B,Y]}}]);return Bv}();var at;(function(r){r[r.Invocation=1]="Invocation",r[r.StreamItem=2]="StreamItem",r[r.Completion=3]="Completion",r[r.StreamInvocation=4]="StreamInvocation",r[r.CancelInvocation=5]="CancelInvocation",r[r.Ping=6]="Ping",r[r.Close=7]="Close"})(at||(at={}));var Hv=function(){function Hv(){_classCallCheck(this,Hv);this.observers=[]}_createClass(Hv,[{key:"next",value:function next(o){var _iterator153=_createForOfIteratorHelper(this.observers),_step153;try{for(_iterator153.s();!(_step153=_iterator153.n()).done;){var s=_step153.value;s.next(o)}}catch(err){_iterator153.e(err)}finally{_iterator153.f()}}},{key:"error",value:function error(o){var _iterator154=_createForOfIteratorHelper(this.observers),_step154;try{for(_iterator154.s();!(_step154=_iterator154.n()).done;){var s=_step154.value;s.error&&s.error(o)}}catch(err){_iterator154.e(err)}finally{_iterator154.f()}}},{key:"complete",value:function complete(){var _iterator155=_createForOfIteratorHelper(this.observers),_step155;try{for(_iterator155.s();!(_step155=_iterator155.n()).done;){var o=_step155.value;o.complete&&o.complete()}}catch(err){_iterator155.e(err)}finally{_iterator155.f()}}},{key:"subscribe",value:function subscribe(o){return this.observers.push(o),new Ov(this,o)}}]);return Hv}();var jv=30*1e3,Uv=15*1e3;var _t;(function(r){r.Disconnected="Disconnected",r.Connecting="Connecting",r.Connected="Connected",r.Disconnecting="Disconnecting",r.Reconnecting="Reconnecting"})(_t||(_t={}));var au=function(){function au(o,s,B,Q){var _this154=this;_classCallCheck(this,au);this._nextKeepAlive=0,this._freezeEventListener=function(){_this154._logger.log(G.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://docs.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},er.isRequired(o,"connection"),er.isRequired(s,"logger"),er.isRequired(B,"protocol"),this.serverTimeoutInMilliseconds=jv,this.keepAliveIntervalInMilliseconds=Uv,this._logger=s,this._protocol=B,this.connection=o,this._reconnectPolicy=Q,this._handshakeProtocol=new Bv,this.connection.onreceive=function(Y){return _this154._processIncomingData(Y)},this.connection.onclose=function(Y){return _this154._connectionClosed(Y)},this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=_t.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:at.Ping})}_createClass(au,[{key:"state",get:function get(){return this._connectionState}},{key:"connectionId",get:function get(){return this.connection&&this.connection.connectionId||null}},{key:"baseUrl",get:function get(){return this.connection.baseUrl||""},set:function set(o){if(this._connectionState!==_t.Disconnected&&this._connectionState!==_t.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!o)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=o}},{key:"start",value:function start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}},{key:"_startWithStateTransitions",value:function(){var _startWithStateTransitions2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee38(){return _regeneratorRuntime().wrap(function _callee38$(_context38){while(1)switch(_context38.prev=_context38.next){case 0:if(!(this._connectionState!==_t.Disconnected)){_context38.next=2;break}return _context38.abrupt("return",Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state.")));case 2:this._connectionState=_t.Connecting,this._logger.log(G.Debug,"Starting HubConnection.");_context38.prev=3;_context38.next=6;return this._startInternal();case 6:Xt.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener);this._connectionState=_t.Connected;this._connectionStarted=!0;this._logger.log(G.Debug,"HubConnection connected successfully.");_context38.next=15;break;case 12:_context38.prev=12;_context38.t0=_context38["catch"](3);return _context38.abrupt("return",(this._connectionState=_t.Disconnected,this._logger.log(G.Debug,"HubConnection failed to start successfully because of error '".concat(_context38.t0,"'.")),Promise.reject(_context38.t0)));case 15:case"end":return _context38.stop()}},_callee38,this,[[3,12]])}));function _startWithStateTransitions(){return _startWithStateTransitions2.apply(this,arguments)}return _startWithStateTransitions}()},{key:"_startInternal",value:function(){var _startInternal2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee39(){var _this155=this;var o,s;return _regeneratorRuntime().wrap(function _callee39$(_context39){while(1)switch(_context39.prev=_context39.next){case 0:this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;o=new Promise(function(s,B){_this155._handshakeResolver=s,_this155._handshakeRejecter=B});_context39.next=4;return this.connection.start(this._protocol.transferFormat);case 4:_context39.prev=4;s={protocol:this._protocol.name,version:this._protocol.version};this._logger.log(G.Debug,"Sending handshake request.");_context39.next=9;return this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(s));case 9:this._logger.log(G.Information,"Using HubProtocol '".concat(this._protocol.name,"'."));this._cleanupTimeout();this._resetTimeoutPeriod();this._resetKeepAliveInterval();_context39.next=15;return o;case 15:if(!this._stopDuringStartError){_context39.next=17;break}throw this._stopDuringStartError;case 17:_context39.t0=this.connection.features.inherentKeepAlive;if(_context39.t0){_context39.next=21;break}_context39.next=21;return this._sendMessage(this._cachedPingMessage);case 21:_context39.next=31;break;case 23:_context39.prev=23;_context39.t1=_context39["catch"](4);this._logger.log(G.Debug,"Hub handshake failed with error '".concat(_context39.t1,"' during start(). Stopping HubConnection."));this._cleanupTimeout();this._cleanupPingTimer();_context39.next=30;return this.connection.stop(_context39.t1);case 30:throw _context39.t1;case 31:case"end":return _context39.stop()}},_callee39,this,[[4,23]])}));function _startInternal(){return _startInternal2.apply(this,arguments)}return _startInternal}()},{key:"stop",value:(function(){var _stop=_asyncToGenerator(_regeneratorRuntime().mark(function _callee40(){var o;return _regeneratorRuntime().wrap(function _callee40$(_context40){while(1)switch(_context40.prev=_context40.next){case 0:o=this._startPromise;this._stopPromise=this._stopInternal();_context40.next=4;return this._stopPromise;case 4:_context40.prev=4;_context40.next=7;return o;case 7:_context40.next=11;break;case 9:_context40.prev=9;_context40.t0=_context40["catch"](4);case 11:case"end":return _context40.stop()}},_callee40,this,[[4,9]])}));function stop(){return _stop.apply(this,arguments)}return stop}())},{key:"_stopInternal",value:function _stopInternal(o){return this._connectionState===_t.Disconnected?(this._logger.log(G.Debug,"Call to HubConnection.stop(".concat(o,") ignored because it is already in the disconnected state.")),Promise.resolve()):this._connectionState===_t.Disconnecting?(this._logger.log(G.Debug,"Call to HttpConnection.stop(".concat(o,") ignored because the connection is already in the disconnecting state.")),this._stopPromise):(this._connectionState=_t.Disconnecting,this._logger.log(G.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(G.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=o||new _i("The connection was stopped before the hub handshake could complete."),this.connection.stop(o)))}},{key:"stream",value:function stream(o){var _this156=this;for(var _len3=arguments.length,s=new Array(_len3>1?_len3-1:0),_key3=1;_key3<_len3;_key3++){s[_key3-1]=arguments[_key3]}var _this$_replaceStreami=this._replaceStreamingParams(s),_this$_replaceStreami2=_slicedToArray(_this$_replaceStreami,2),B=_this$_replaceStreami2[0],Q=_this$_replaceStreami2[1],Y=this._createStreamInvocation(o,s,Q);var J;var it=new Hv;return it.cancelCallback=function(){var nt=_this156._createCancelInvocation(Y.invocationId);return delete _this156._callbacks[Y.invocationId],J.then(function(){return _this156._sendWithProtocol(nt)})},this._callbacks[Y.invocationId]=function(nt,ot){if(ot){it.error(ot);return}else nt&&(nt.type===at.Completion?nt.error?it.error(new Error(nt.error)):it.complete():it.next(nt.item))},J=this._sendWithProtocol(Y)["catch"](function(nt){it.error(nt),delete _this156._callbacks[Y.invocationId]}),this._launchStreams(B,J),it}},{key:"_sendMessage",value:function _sendMessage(o){return this._resetKeepAliveInterval(),this.connection.send(o)}},{key:"_sendWithProtocol",value:function _sendWithProtocol(o){return this._sendMessage(this._protocol.writeMessage(o))}},{key:"send",value:function send(o){for(var _len4=arguments.length,s=new Array(_len4>1?_len4-1:0),_key4=1;_key4<_len4;_key4++){s[_key4-1]=arguments[_key4]}var _this$_replaceStreami3=this._replaceStreamingParams(s),_this$_replaceStreami4=_slicedToArray(_this$_replaceStreami3,2),B=_this$_replaceStreami4[0],Q=_this$_replaceStreami4[1],Y=this._sendWithProtocol(this._createInvocation(o,s,!0,Q));return this._launchStreams(B,Y),Y}},{key:"invoke",value:function invoke(o){var _this157=this;for(var _len5=arguments.length,s=new Array(_len5>1?_len5-1:0),_key5=1;_key5<_len5;_key5++){s[_key5-1]=arguments[_key5]}var _this$_replaceStreami5=this._replaceStreamingParams(s),_this$_replaceStreami6=_slicedToArray(_this$_replaceStreami5,2),B=_this$_replaceStreami6[0],Q=_this$_replaceStreami6[1],Y=this._createInvocation(o,s,!1,Q);return new Promise(function(J,it){_this157._callbacks[Y.invocationId]=function(ot,dt){if(dt){it(dt);return}else ot&&(ot.type===at.Completion?ot.error?it(new Error(ot.error)):J(ot.result):it(new Error("Unexpected message type: ".concat(ot.type))))};var nt=_this157._sendWithProtocol(Y)["catch"](function(ot){it(ot),delete _this157._callbacks[Y.invocationId]});_this157._launchStreams(B,nt)})}},{key:"on",value:function on(o,s){!o||!s||(o=o.toLowerCase(),this._methods[o]||(this._methods[o]=[]),this._methods[o].indexOf(s)===-1&&this._methods[o].push(s))}},{key:"off",value:function off(o,s){if(!o)return;o=o.toLowerCase();var B=this._methods[o];if(B)if(s){var Q=B.indexOf(s);Q!==-1&&(B.splice(Q,1),B.length===0&&delete this._methods[o])}else delete this._methods[o]}},{key:"onclose",value:function onclose(o){o&&this._closedCallbacks.push(o)}},{key:"onreconnecting",value:function onreconnecting(o){o&&this._reconnectingCallbacks.push(o)}},{key:"onreconnected",value:function onreconnected(o){o&&this._reconnectedCallbacks.push(o)}},{key:"_processIncomingData",value:function _processIncomingData(o){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(o=this._processHandshakeResponse(o),this._receivedHandshakeResponse=!0),o){var s=this._protocol.parseMessages(o,this._logger);var _iterator156=_createForOfIteratorHelper(s),_step156;try{for(_iterator156.s();!(_step156=_iterator156.n()).done;){var B=_step156.value;switch(B.type){case at.Invocation:this._invokeClientMethod(B);break;case at.StreamItem:case at.Completion:{var Q=this._callbacks[B.invocationId];if(Q){B.type===at.Completion&&delete this._callbacks[B.invocationId];try{Q(B)}catch(Y){this._logger.log(G.Error,"Stream callback threw error: ".concat(xy(Y)))}}break}case at.Ping:break;case at.Close:{this._logger.log(G.Information,"Close message received from server.");var _Q2=B.error?new Error("Server returned an error on close: "+B.error):void 0;B.allowReconnect===!0?this.connection.stop(_Q2):this._stopPromise=this._stopInternal(_Q2);break}default:this._logger.log(G.Warning,"Invalid message type: ".concat(B.type,"."));break}}}catch(err){_iterator156.e(err)}finally{_iterator156.f()}}this._resetTimeoutPeriod()}},{key:"_processHandshakeResponse",value:function _processHandshakeResponse(o){var s,B;try{var _this$_handshakeProto=this._handshakeProtocol.parseHandshakeResponse(o);var _this$_handshakeProto2=_slicedToArray(_this$_handshakeProto,2);B=_this$_handshakeProto2[0];s=_this$_handshakeProto2[1]}catch(Q){var Y="Error parsing handshake response: "+Q;this._logger.log(G.Error,Y);var J=new Error(Y);throw this._handshakeRejecter(J),J}if(s.error){var Q="Server returned handshake error: "+s.error;this._logger.log(G.Error,Q);var _Y=new Error(Q);throw this._handshakeRejecter(_Y),_Y}else this._logger.log(G.Debug,"Server handshake complete.");return this._handshakeResolver(),B}},{key:"_resetKeepAliveInterval",value:function _resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=(new Date()).getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}},{key:"_resetTimeoutPeriod",value:function _resetTimeoutPeriod(){var _this158=this;if((!this.connection.features||!this.connection.features.inherentKeepAlive)&&(this._timeoutHandle=setTimeout(function(){return _this158.serverTimeout()},this.serverTimeoutInMilliseconds),this._pingServerHandle===void 0)){var o=this._nextKeepAlive-(new Date()).getTime();o<0&&(o=0),this._pingServerHandle=setTimeout(_asyncToGenerator(_regeneratorRuntime().mark(function _callee41(){return _regeneratorRuntime().wrap(function _callee41$(_context41){while(1)switch(_context41.prev=_context41.next){case 0:if(!(_this158._connectionState===_t.Connected)){_context41.next=9;break}_context41.prev=1;_context41.next=4;return _this158._sendMessage(_this158._cachedPingMessage);case 4:_context41.next=9;break;case 6:_context41.prev=6;_context41.t0=_context41["catch"](1);_this158._cleanupPingTimer();case 9:case"end":return _context41.stop()}},_callee41,null,[[1,6]])})),o)}}},{key:"serverTimeout",value:function serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}},{key:"_invokeClientMethod",value:function(){var _invokeClientMethod2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee42(o){var s,B,Q,Y,J,it,nt,_iterator157,_step157,ot,dt;return _regeneratorRuntime().wrap(function _callee42$(_context42){while(1)switch(_context42.prev=_context42.next){case 0:s=o.target.toLowerCase(),B=this._methods[s];if(B){_context42.next=9;break}this._logger.log(G.Warning,"No client method with the name '".concat(s,"' found."));_context42.t0=o.invocationId;if(!_context42.t0){_context42.next=8;break}this._logger.log(G.Warning,"No result given for '".concat(s,"' method and invocation ID '").concat(o.invocationId,"'."));_context42.next=8;return this._sendWithProtocol(this._createCompletionMessage(o.invocationId,"Client didn't provide a result.",null));case 8:return _context42.abrupt("return");case 9:Q=B.slice(),Y=!!o.invocationId;_iterator157=_createForOfIteratorHelper(Q);_context42.prev=11;_iterator157.s();case 13:if((_step157=_iterator157.n()).done){_context42.next=29;break}ot=_step157.value;_context42.prev=15;dt=J;_context42.next=19;return ot.apply(this,o.arguments);case 19:J=_context42.sent;Y&&J&&dt&&(this._logger.log(G.Error,"Multiple results provided for '".concat(s,"'. Sending error to server.")),nt=this._createCompletionMessage(o.invocationId,"Client provided multiple results.",null));it=void 0;_context42.next=27;break;case 24:_context42.prev=24;_context42.t1=_context42["catch"](15);it=_context42.t1,this._logger.log(G.Error,"A callback for the method '".concat(s,"' threw error '").concat(_context42.t1,"'."));case 27:_context42.next=13;break;case 29:_context42.next=34;break;case 31:_context42.prev=31;_context42.t2=_context42["catch"](11);_iterator157.e(_context42.t2);case 34:_context42.prev=34;_iterator157.f();return _context42.finish(34);case 37:if(!nt){_context42.next=42;break}_context42.next=40;return this._sendWithProtocol(nt);case 40:_context42.next=49;break;case 42:if(!Y){_context42.next=48;break}it?nt=this._createCompletionMessage(o.invocationId,"".concat(it),null):J!==void 0?nt=this._createCompletionMessage(o.invocationId,null,J):(this._logger.log(G.Warning,"No result given for '".concat(s,"' method and invocation ID '").concat(o.invocationId,"'.")),nt=this._createCompletionMessage(o.invocationId,"Client didn't provide a result.",null));_context42.next=46;return this._sendWithProtocol(nt);case 46:_context42.next=49;break;case 48:J&&this._logger.log(G.Error,"Result given for '".concat(s,"' method but server is not expecting a result."));case 49:case"end":return _context42.stop()}},_callee42,this,[[11,31,34,37],[15,24]])}));function _invokeClientMethod(_x28){return _invokeClientMethod2.apply(this,arguments)}return _invokeClientMethod}()},{key:"_connectionClosed",value:function _connectionClosed(o){this._logger.log(G.Debug,"HubConnection.connectionClosed(".concat(o,") called while in state ").concat(this._connectionState,".")),this._stopDuringStartError=this._stopDuringStartError||o||new _i("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(o||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===_t.Disconnecting?this._completeClose(o):this._connectionState===_t.Connected&&this._reconnectPolicy?this._reconnect(o):this._connectionState===_t.Connected&&this._completeClose(o)}},{key:"_completeClose",value:function _completeClose(o){var _this159=this;if(this._connectionStarted){this._connectionState=_t.Disconnected,this._connectionStarted=!1,Xt.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(function(s){return s.apply(_this159,[o])})}catch(s){this._logger.log(G.Error,"An onclose callback called with error '".concat(o,"' threw error '").concat(s,"'."))}}}},{key:"_reconnect",value:function(){var _reconnect2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee43(o){var _this160=this;var s,B,Q,Y;return _regeneratorRuntime().wrap(function _callee43$(_context43){while(1)switch(_context43.prev=_context43.next){case 0:s=Date.now();B=0,Q=o!==void 0?o:new Error("Attempting to reconnect due to a unknown error."),Y=this._getNextRetryDelay(B++,0,Q);if(!(Y===null)){_context43.next=5;break}this._logger.log(G.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),this._completeClose(o);return _context43.abrupt("return");case 5:if(!(this._connectionState=_t.Reconnecting,o?this._logger.log(G.Information,"Connection reconnecting because of error '".concat(o,"'.")):this._logger.log(G.Information,"Connection reconnecting."),this._reconnectingCallbacks.length!==0)){_context43.next=10;break}try{this._reconnectingCallbacks.forEach(function(J){return J.apply(_this160,[o])})}catch(J){this._logger.log(G.Error,"An onreconnecting callback called with error '".concat(o,"' threw error '").concat(J,"'."))}if(!(this._connectionState!==_t.Reconnecting)){_context43.next=10;break}this._logger.log(G.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.");return _context43.abrupt("return");case 10:if(!(Y!==null)){_context43.next=36;break}this._logger.log(G.Information,"Reconnect attempt number ".concat(B," will start in ").concat(Y," ms."));_context43.next=14;return new Promise(function(J){_this160._reconnectDelayHandle=setTimeout(J,Y)});case 14:this._reconnectDelayHandle=void 0;if(!(this._connectionState!==_t.Reconnecting)){_context43.next=18;break}this._logger.log(G.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");return _context43.abrupt("return");case 18:_context43.prev=18;_context43.next=21;return this._startInternal();case 21:this._connectionState=_t.Connected;this._logger.log(G.Information,"HubConnection reconnected successfully.");if(!(this._reconnectedCallbacks.length!==0)){_context43.next=25;break}try{this._reconnectedCallbacks.forEach(function(J){return J.apply(_this160,[_this160.connection.connectionId])})}catch(J){this._logger.log(G.Error,"An onreconnected callback called with connectionId '".concat(this.connection.connectionId,"; threw error '").concat(J,"'."))}case 25:return _context43.abrupt("return");case 28:_context43.prev=28;_context43.t0=_context43["catch"](18);if(!(this._logger.log(G.Information,"Reconnect attempt failed because of error '".concat(_context43.t0,"'.")),this._connectionState!==_t.Reconnecting)){_context43.next=33;break}this._logger.log(G.Debug,"Connection moved to the '".concat(this._connectionState,"' from the reconnecting state during reconnect attempt. Done reconnecting.")),this._connectionState===_t.Disconnecting&&this._completeClose();return _context43.abrupt("return");case 33:Q=_context43.t0 instanceof Error?_context43.t0:new Error(_context43.t0.toString()),Y=this._getNextRetryDelay(B++,Date.now()-s,Q);case 34:_context43.next=10;break;case 36:this._logger.log(G.Information,"Reconnect retries have been exhausted after ".concat(Date.now()-s," ms and ").concat(B," failed attempts. Connection disconnecting.")),this._completeClose();case 37:case"end":return _context43.stop()}},_callee43,this,[[18,28]])}));function _reconnect(_x29){return _reconnect2.apply(this,arguments)}return _reconnect}()},{key:"_getNextRetryDelay",value:function _getNextRetryDelay(o,s,B){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:s,previousRetryCount:o,retryReason:B})}catch(Q){return this._logger.log(G.Error,"IRetryPolicy.nextRetryDelayInMilliseconds(".concat(o,", ").concat(s,") threw error '").concat(Q,"'.")),null}}},{key:"_cancelCallbacksWithError",value:function _cancelCallbacksWithError(o){var _this161=this;var s=this._callbacks;this._callbacks={},Object.keys(s).forEach(function(B){var Q=s[B];try{Q(null,o)}catch(Y){_this161._logger.log(G.Error,"Stream 'error' callback called with '".concat(o,"' threw error: ").concat(xy(Y)))}})}},{key:"_cleanupPingTimer",value:function _cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}},{key:"_cleanupTimeout",value:function _cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}},{key:"_createInvocation",value:function _createInvocation(o,s,B,Q){if(B)return Q.length!==0?{arguments:s,streamIds:Q,target:o,type:at.Invocation}:{arguments:s,target:o,type:at.Invocation};{var Y=this._invocationId;return this._invocationId++,Q.length!==0?{arguments:s,invocationId:Y.toString(),streamIds:Q,target:o,type:at.Invocation}:{arguments:s,invocationId:Y.toString(),target:o,type:at.Invocation}}}},{key:"_launchStreams",value:function _launchStreams(o,s){var _this162=this;if(o.length!==0){s||(s=Promise.resolve());var _loop3=function _loop3(B){o[B].subscribe({complete:function complete(){s=s.then(function(){return _this162._sendWithProtocol(_this162._createCompletionMessage(B))})},error:function error(Q){var Y;Q instanceof Error?Y=Q.message:Q&&Q.toString?Y=Q.toString():Y="Unknown error",s=s.then(function(){return _this162._sendWithProtocol(_this162._createCompletionMessage(B,Y))})},next:function next(Q){s=s.then(function(){return _this162._sendWithProtocol(_this162._createStreamItemMessage(B,Q))})}})};for(var B in o){_loop3(B)}}}},{key:"_replaceStreamingParams",value:function _replaceStreamingParams(o){var s=[],B=[];for(var Q=0;Q<o.length;Q++){var Y=o[Q];if(this._isObservable(Y)){var J=this._invocationId;this._invocationId++,s[J]=Y,B.push(J.toString()),o.splice(Q,1)}}return[s,B]}},{key:"_isObservable",value:function _isObservable(o){return o&&o.subscribe&&typeof o.subscribe=="function"}},{key:"_createStreamInvocation",value:function _createStreamInvocation(o,s,B){var Q=this._invocationId;return this._invocationId++,B.length!==0?{arguments:s,invocationId:Q.toString(),streamIds:B,target:o,type:at.StreamInvocation}:{arguments:s,invocationId:Q.toString(),target:o,type:at.StreamInvocation}}},{key:"_createCancelInvocation",value:function _createCancelInvocation(o){return{invocationId:o,type:at.CancelInvocation}}},{key:"_createStreamItemMessage",value:function _createStreamItemMessage(o,s){return{invocationId:o,item:s,type:at.StreamItem}}},{key:"_createCompletionMessage",value:function _createCompletionMessage(o,s,B){return s?{error:s,invocationId:o,type:at.Completion}:{invocationId:o,result:B,type:at.Completion}}}],[{key:"create",value:function create(o,s,B,Q){return new au(o,s,B,Q)}}]);return au}();var Wv=[0,2e3,1e4,3e4,null];var Cy=function(){function Cy(o){_classCallCheck(this,Cy);this._retryDelays=o!==void 0?[].concat(_toConsumableArray(o),[null]):Wv}_createClass(Cy,[{key:"nextRetryDelayInMilliseconds",value:function nextRetryDelayInMilliseconds(o){return this._retryDelays[o.previousRetryCount]}}]);return Cy}();var So=_createClass(function So(){_classCallCheck(this,So)});So.Authorization="Authorization";So.Cookie="Cookie";var qv=function(_id4){_inherits(qv,_id4);function qv(o,s){var _this163;_classCallCheck(this,qv);_this163=_callSuper(this,qv),_this163._innerClient=o,_this163._accessTokenFactory=s;return _this163}_createClass(qv,[{key:"send",value:function(){var _send2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee44(o){var s,B;return _regeneratorRuntime().wrap(function _callee44$(_context44){while(1)switch(_context44.prev=_context44.next){case 0:s=!0;_context44.t0=this._accessTokenFactory&&(!this._accessToken||o.url&&o.url.indexOf("/negotiate?")>0);if(!_context44.t0){_context44.next=7;break}s=!1;_context44.next=6;return this._accessTokenFactory();case 6:this._accessToken=_context44.sent;case 7:this._setAuthorizationHeader(o);_context44.next=10;return this._innerClient.send(o);case 10:B=_context44.sent;if(!(s&&B.statusCode===401&&this._accessTokenFactory)){_context44.next=21;break}_context44.next=14;return this._accessTokenFactory();case 14:this._accessToken=_context44.sent;this._setAuthorizationHeader(o);_context44.next=18;return this._innerClient.send(o);case 18:_context44.t1=_context44.sent;_context44.next=22;break;case 21:_context44.t1=B;case 22:return _context44.abrupt("return",_context44.t1);case 23:case"end":return _context44.stop()}},_callee44,this)}));function send(_x30){return _send2.apply(this,arguments)}return send}()},{key:"_setAuthorizationHeader",value:function _setAuthorizationHeader(o){o.headers||(o.headers={}),this._accessToken?o.headers[So.Authorization]="Bearer ".concat(this._accessToken):this._accessTokenFactory&&o.headers[So.Authorization]&&delete o.headers[So.Authorization]}},{key:"getCookieString",value:function getCookieString(o){return this._innerClient.getCookieString(o)}}]);return qv}(id);var Kt;(function(r){r[r.None=0]="None",r[r.WebSockets=1]="WebSockets",r[r.ServerSentEvents=2]="ServerSentEvents",r[r.LongPolling=4]="LongPolling"})(Kt||(Kt={}));var dr;(function(r){r[r.Text=1]="Text",r[r.Binary=2]="Binary"})(dr||(dr={}));var Qv=function(){function Qv(){_classCallCheck(this,Qv);this._isAborted=!1,this.onabort=null}_createClass(Qv,[{key:"abort",value:function abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}},{key:"signal",get:function get(){return this}},{key:"aborted",get:function get(){return this._isAborted}}]);return Qv}();var $y=function(){function $y(o,s,B){_classCallCheck(this,$y);this._httpClient=o,this._logger=s,this._pollAbort=new Qv,this._options=B,this._running=!1,this.onreceive=null,this.onclose=null}_createClass($y,[{key:"pollAborted",get:function get(){return this._pollAbort.aborted}},{key:"connect",value:function(){var _connect=_asyncToGenerator(_regeneratorRuntime().mark(function _callee45(o,s){var _Ma,_Ma2,B,Q,Y,J,it,nt;return _regeneratorRuntime().wrap(function _callee45$(_context45){while(1)switch(_context45.prev=_context45.next){case 0:if(!(er.isRequired(o,"url"),er.isRequired(s,"transferFormat"),er.isIn(s,dr,"transferFormat"),this._url=o,this._logger.log(G.Trace,"(LongPolling transport) Connecting."),s===dr.Binary&&(typeof XMLHttpRequest==="undefined"?"undefined":_typeof(XMLHttpRequest))<"u"&&typeof new XMLHttpRequest().responseType!="string")){_context45.next=2;break}throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");case 2:_Ma=Ma(),_Ma2=_slicedToArray(_Ma,2),B=_Ma2[0],Q=_Ma2[1],Y=_objectSpread(_defineProperty({},B,Q),this._options.headers),J={abortSignal:this._pollAbort.signal,headers:Y,timeout:1e5,withCredentials:this._options.withCredentials};s===dr.Binary&&(J.responseType="arraybuffer");it="".concat(o,"&_=").concat(Date.now());this._logger.log(G.Trace,"(LongPolling transport) polling: ".concat(it,"."));_context45.next=8;return this._httpClient.get(it,J);case 8:nt=_context45.sent;nt.statusCode!==200?(this._logger.log(G.Error,"(LongPolling transport) Unexpected response code: ".concat(nt.statusCode,".")),this._closeError=new La(nt.statusText||"",nt.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,J);case 10:case"end":return _context45.stop()}},_callee45,this)}));function connect(_x31,_x32){return _connect.apply(this,arguments)}return connect}()},{key:"_poll",value:function(){var _poll2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee46(o,s){var B,Q;return _regeneratorRuntime().wrap(function _callee46$(_context46){while(1)switch(_context46.prev=_context46.next){case 0:_context46.prev=0;case 1:if(!this._running){_context46.next=16;break}_context46.prev=2;B="".concat(o,"&_=").concat(Date.now());this._logger.log(G.Trace,"(LongPolling transport) polling: ".concat(B,"."));_context46.next=7;return this._httpClient.get(B,s);case 7:Q=_context46.sent;Q.statusCode===204?(this._logger.log(G.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):Q.statusCode!==200?(this._logger.log(G.Error,"(LongPolling transport) Unexpected response code: ".concat(Q.statusCode,".")),this._closeError=new La(Q.statusText||"",Q.statusCode),this._running=!1):Q.content?(this._logger.log(G.Trace,"(LongPolling transport) data received. ".concat(Vs(Q.content,this._options.logMessageContent),".")),this.onreceive&&this.onreceive(Q.content)):this._logger.log(G.Trace,"(LongPolling transport) Poll timed out, reissuing.");_context46.next=14;break;case 11:_context46.prev=11;_context46.t0=_context46["catch"](2);this._running?_context46.t0 instanceof ou?this._logger.log(G.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=_context46.t0,this._running=!1):this._logger.log(G.Trace,"(LongPolling transport) Poll errored after shutdown: ".concat(_context46.t0.message));case 14:_context46.next=1;break;case 16:_context46.prev=16;this._logger.log(G.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose();return _context46.finish(16);case 19:case"end":return _context46.stop()}},_callee46,this,[[0,,16,19],[2,11]])}));function _poll(_x33,_x34){return _poll2.apply(this,arguments)}return _poll}()},{key:"send",value:function(){var _send3=_asyncToGenerator(_regeneratorRuntime().mark(function _callee47(o){return _regeneratorRuntime().wrap(function _callee47$(_context47){while(1)switch(_context47.prev=_context47.next){case 0:return _context47.abrupt("return",this._running?ww(this._logger,"LongPolling",this._httpClient,this._url,o,this._options):Promise.reject(new Error("Cannot send until the transport is connected")));case 1:case"end":return _context47.stop()}},_callee47,this)}));function send(_x35){return _send3.apply(this,arguments)}return send}()},{key:"stop",value:function(){var _stop2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee48(){var o,_Ma3,_Ma4,s,B,Q;return _regeneratorRuntime().wrap(function _callee48$(_context48){while(1)switch(_context48.prev=_context48.next){case 0:this._logger.log(G.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();_context48.prev=1;_context48.next=4;return this._receiving;case 4:this._logger.log(G.Trace,"(LongPolling transport) sending DELETE request to ".concat(this._url,"."));o={},_Ma3=Ma(),_Ma4=_slicedToArray(_Ma3,2),s=_Ma4[0],B=_Ma4[1];o[s]=B;Q={headers:_objectSpread(_objectSpread({},o),this._options.headers),timeout:this._options.timeout,withCredentials:this._options.withCredentials};_context48.next=10;return this._httpClient["delete"](this._url,Q);case 10:this._logger.log(G.Trace,"(LongPolling transport) DELETE request sent.");case 11:_context48.prev=11;this._logger.log(G.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose();return _context48.finish(11);case 14:case"end":return _context48.stop()}},_callee48,this,[[1,,11,14]])}));function stop(){return _stop2.apply(this,arguments)}return stop}()},{key:"_raiseOnClose",value:function _raiseOnClose(){if(this.onclose){var o="(LongPolling transport) Firing onclose event.";this._closeError&&(o+=" Error: "+this._closeError),this._logger.log(G.Trace,o),this.onclose(this._closeError)}}}]);return $y}();var Kv=function(){function Kv(o,s,B,Q){_classCallCheck(this,Kv);this._httpClient=o,this._accessToken=s,this._logger=B,this._options=Q,this.onreceive=null,this.onclose=null}_createClass(Kv,[{key:"connect",value:function(){var _connect2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee49(o,s){var _this164=this;return _regeneratorRuntime().wrap(function _callee49$(_context49){while(1)switch(_context49.prev=_context49.next){case 0:return _context49.abrupt("return",(er.isRequired(o,"url"),er.isRequired(s,"transferFormat"),er.isIn(s,dr,"transferFormat"),this._logger.log(G.Trace,"(SSE transport) Connecting."),this._url=o,this._accessToken&&(o+=(o.indexOf("?")<0?"?":"&")+"access_token=".concat(encodeURIComponent(this._accessToken))),new Promise(function(B,Q){var Y=!1;if(s!==dr.Text){Q(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"));return}var J;if(Xt.isBrowser||Xt.isWebWorker)J=new _this164._options.EventSource(o,{withCredentials:_this164._options.withCredentials});else{var it=_this164._httpClient.getCookieString(o),nt={};nt.Cookie=it;var _Ma5=Ma(),_Ma6=_slicedToArray(_Ma5,2),ot=_Ma6[0],dt=_Ma6[1];nt[ot]=dt,J=new _this164._options.EventSource(o,{withCredentials:_this164._options.withCredentials,headers:_objectSpread(_objectSpread({},nt),_this164._options.headers)})}try{J.onmessage=function(it){if(_this164.onreceive)try{_this164._logger.log(G.Trace,"(SSE transport) data received. ".concat(Vs(it.data,_this164._options.logMessageContent),".")),_this164.onreceive(it.data)}catch(nt){_this164._close(nt);return}},J.onerror=function(it){Y?_this164._close():Q(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},J.onopen=function(){_this164._logger.log(G.Information,"SSE connected to ".concat(_this164._url)),_this164._eventSource=J,Y=!0,B()}}catch(it){Q(it);return}})));case 1:case"end":return _context49.stop()}},_callee49,this)}));function connect(_x36,_x37){return _connect2.apply(this,arguments)}return connect}()},{key:"send",value:function(){var _send4=_asyncToGenerator(_regeneratorRuntime().mark(function _callee50(o){return _regeneratorRuntime().wrap(function _callee50$(_context50){while(1)switch(_context50.prev=_context50.next){case 0:return _context50.abrupt("return",this._eventSource?ww(this._logger,"SSE",this._httpClient,this._url,o,this._options):Promise.reject(new Error("Cannot send until the transport is connected")));case 1:case"end":return _context50.stop()}},_callee50,this)}));function send(_x38){return _send4.apply(this,arguments)}return send}()},{key:"stop",value:function stop(){return this._close(),Promise.resolve()}},{key:"_close",value:function _close(o){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(o))}}]);return Kv}();var Zv=function(){function Zv(o,s,B,Q,Y,J){_classCallCheck(this,Zv);this._logger=B,this._accessTokenFactory=s,this._logMessageContent=Q,this._webSocketConstructor=Y,this._httpClient=o,this.onreceive=null,this.onclose=null,this._headers=J}_createClass(Zv,[{key:"connect",value:function(){var _connect3=_asyncToGenerator(_regeneratorRuntime().mark(function _callee51(o,s){var _this165=this;var B;return _regeneratorRuntime().wrap(function _callee51$(_context51){while(1)switch(_context51.prev=_context51.next){case 0:er.isRequired(o,"url"),er.isRequired(s,"transferFormat"),er.isIn(s,dr,"transferFormat"),this._logger.log(G.Trace,"(WebSockets transport) Connecting.");_context51.t0=this._accessTokenFactory;if(!_context51.t0){_context51.next=6;break}_context51.next=5;return this._accessTokenFactory();case 5:B=_context51.sent;case 6:return _context51.abrupt("return",new Promise(function(Q,Y){o=o.replace(/^http/,"ws");var J;var it=_this165._httpClient.getCookieString(o);var nt=!1;if(Xt.isNode||Xt.isReactNative){var ot={},_Ma7=Ma(),_Ma8=_slicedToArray(_Ma7,2),dt=_Ma8[0],Mt=_Ma8[1];ot[dt]=Mt,B&&(ot[So.Authorization]="Bearer ".concat(B)),it&&(ot[So.Cookie]=it),J=new _this165._webSocketConstructor(o,void 0,{headers:_objectSpread(_objectSpread({},ot),_this165._headers)})}else B&&(o+=(o.indexOf("?")<0?"?":"&")+"access_token=".concat(encodeURIComponent(B)));J||(J=new _this165._webSocketConstructor(o)),s===dr.Binary&&(J.binaryType="arraybuffer"),J.onopen=function(ot){_this165._logger.log(G.Information,"WebSocket connected to ".concat(o,".")),_this165._webSocket=J,nt=!0,Q()},J.onerror=function(ot){var dt=null;(typeof ErrorEvent==="undefined"?"undefined":_typeof(ErrorEvent))<"u"&&ot instanceof ErrorEvent?dt=ot.error:dt="There was an error with the transport",_this165._logger.log(G.Information,"(WebSockets transport) ".concat(dt,"."))},J.onmessage=function(ot){if(_this165._logger.log(G.Trace,"(WebSockets transport) data received. ".concat(Vs(ot.data,_this165._logMessageContent),".")),_this165.onreceive)try{_this165.onreceive(ot.data)}catch(dt){_this165._close(dt);return}},J.onclose=function(ot){if(nt)_this165._close(ot);else{var _dt2=null;(typeof ErrorEvent==="undefined"?"undefined":_typeof(ErrorEvent))<"u"&&ot instanceof ErrorEvent?_dt2=ot.error:_dt2="WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",Y(new Error(_dt2))}}}));case 7:case"end":return _context51.stop()}},_callee51,this)}));function connect(_x39,_x40){return _connect3.apply(this,arguments)}return connect}()},{key:"send",value:function send(o){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(G.Trace,"(WebSockets transport) sending data. ".concat(Vs(o,this._logMessageContent),".")),this._webSocket.send(o),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}},{key:"stop",value:function stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}},{key:"_close",value:function _close(o){this._webSocket&&(this._webSocket.onclose=function(){},this._webSocket.onmessage=function(){},this._webSocket.onerror=function(){},this._webSocket.close(),this._webSocket=void 0),this._logger.log(G.Trace,"(WebSockets transport) socket closed."),this.onclose&&(this._isCloseEvent(o)&&(o.wasClean===!1||o.code!==1e3)?this.onclose(new Error("WebSocket closed with status code: ".concat(o.code," (").concat(o.reason||"no reason given",")."))):o instanceof Error?this.onclose(o):this.onclose())}},{key:"_isCloseEvent",value:function _isCloseEvent(o){return o&&typeof o.wasClean=="boolean"&&typeof o.code=="number"}}]);return Zv}();var Ey=100;var Gv=function(){function Gv(o){var s=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,Gv);if(this._stopPromiseResolver=function(){},this.features={},this._negotiateVersion=1,er.isRequired(o,"url"),this._logger=Mv(s.logger),this.baseUrl=this._resolveUrl(o),s=s||{},s.logMessageContent=s.logMessageContent===void 0?!1:s.logMessageContent,typeof s.withCredentials=="boolean"||s.withCredentials===void 0)s.withCredentials=s.withCredentials===void 0?!0:s.withCredentials;else throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");s.timeout=s.timeout===void 0?100*1e3:s.timeout;var B=null,Q=null;if(Xt.isNode&&(typeof require==="undefined"?"undefined":_typeof(require))<"u"){var Y=typeof __webpack_require__=="function"?__non_webpack_require__:require;B=Y("ws"),Q=Y("eventsource")}!Xt.isNode&&(typeof WebSocket==="undefined"?"undefined":_typeof(WebSocket))<"u"&&!s.WebSocket?s.WebSocket=WebSocket:Xt.isNode&&!s.WebSocket&&B&&(s.WebSocket=B),!Xt.isNode&&(typeof EventSource==="undefined"?"undefined":_typeof(EventSource))<"u"&&!s.EventSource?s.EventSource=EventSource:Xt.isNode&&!s.EventSource&&_typeof(Q)<"u"&&(s.EventSource=Q),this._httpClient=new qv(s.httpClient||new Vv(this._logger),s.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=s,this.onreceive=null,this.onclose=null}_createClass(Gv,[{key:"start",value:function(){var _start=_asyncToGenerator(_regeneratorRuntime().mark(function _callee52(o){var s,_s3;return _regeneratorRuntime().wrap(function _callee52$(_context52){while(1)switch(_context52.prev=_context52.next){case 0:if(!(o=o||dr.Binary,er.isIn(o,dr,"transferFormat"),this._logger.log(G.Debug,"Starting connection with transfer format '".concat(dr[o],"'.")),this._connectionState!=="Disconnected")){_context52.next=2;break}return _context52.abrupt("return",Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state.")));case 2:this._connectionState="Connecting";this._startInternalPromise=this._startInternal(o);_context52.next=6;return this._startInternalPromise;case 6:if(!(this._connectionState==="Disconnecting")){_context52.next=14;break}s="Failed to start the HttpConnection before stop() was called.";this._logger.log(G.Error,s);_context52.next=11;return this._stopPromise;case 11:return _context52.abrupt("return",Promise.reject(new _i(s)));case 14:if(!(this._connectionState!=="Connected")){_context52.next=17;break}_s3="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return _context52.abrupt("return",(this._logger.log(G.Error,_s3),Promise.reject(new _i(_s3))));case 17:this._connectionStarted=!0;case 18:case"end":return _context52.stop()}},_callee52,this)}));function start(_x41){return _start.apply(this,arguments)}return start}()},{key:"send",value:function send(o){return this._connectionState!=="Connected"?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new su(this.transport)),this._sendQueue.send(o))}},{key:"stop",value:function(){var _stop3=_asyncToGenerator(_regeneratorRuntime().mark(function _callee53(o){var _this166=this;return _regeneratorRuntime().wrap(function _callee53$(_context53){while(1)switch(_context53.prev=_context53.next){case 0:if(!(this._connectionState==="Disconnected")){_context53.next=2;break}return _context53.abrupt("return",(this._logger.log(G.Debug,"Call to HttpConnection.stop(".concat(o,") ignored because the connection is already in the disconnected state.")),Promise.resolve()));case 2:if(!(this._connectionState==="Disconnecting")){_context53.next=4;break}return _context53.abrupt("return",(this._logger.log(G.Debug,"Call to HttpConnection.stop(".concat(o,") ignored because the connection is already in the disconnecting state.")),this._stopPromise));case 4:this._connectionState="Disconnecting";this._stopPromise=new Promise(function(s){_this166._stopPromiseResolver=s});_context53.next=8;return this._stopInternal(o);case 8:_context53.next=10;return this._stopPromise;case 10:case"end":return _context53.stop()}},_callee53,this)}));function stop(_x42){return _stop3.apply(this,arguments)}return stop}()},{key:"_stopInternal",value:function(){var _stopInternal2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee54(o){return _regeneratorRuntime().wrap(function _callee54$(_context54){while(1)switch(_context54.prev=_context54.next){case 0:this._stopError=o;_context54.prev=1;_context54.next=4;return this._startInternalPromise;case 4:_context54.next=8;break;case 6:_context54.prev=6;_context54.t0=_context54["catch"](1);case 8:if(!this.transport){_context54.next=20;break}_context54.prev=9;_context54.next=12;return this.transport.stop();case 12:_context54.next=17;break;case 14:_context54.prev=14;_context54.t1=_context54["catch"](9);this._logger.log(G.Error,"HttpConnection.transport.stop() threw error '".concat(_context54.t1,"'.")),this._stopConnection();case 17:this.transport=void 0;_context54.next=21;break;case 20:this._logger.log(G.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.");case 21:case"end":return _context54.stop()}},_callee54,this,[[1,6],[9,14]])}));function _stopInternal(_x43){return _stopInternal2.apply(this,arguments)}return _stopInternal}()},{key:"_startInternal",value:function(){var _startInternal3=_asyncToGenerator(_regeneratorRuntime().mark(function _callee55(o){var _this167=this;var s,B,Q,_loop4;return _regeneratorRuntime().wrap(function _callee55$(_context56){while(1)switch(_context56.prev=_context56.next){case 0:s=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;_context56.prev=2;if(!this._options.skipNegotiation){_context56.next=13;break}if(!(this._options.transport===Kt.WebSockets)){_context56.next=10;break}this.transport=this._constructTransport(Kt.WebSockets);_context56.next=8;return this._startTransport(s,o);case 8:_context56.next=11;break;case 10:throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");case 11:_context56.next=21;break;case 13:B=null,Q=0;_loop4=_regeneratorRuntime().mark(function _loop4(){var Y;return _regeneratorRuntime().wrap(function _loop4$(_context55){while(1)switch(_context55.prev=_context55.next){case 0:_context55.next=2;return _this167._getNegotiationResponse(s);case 2:B=_context55.sent;if(!(_this167._connectionState==="Disconnecting"||_this167._connectionState==="Disconnected")){_context55.next=5;break}throw new _i("The connection was stopped during negotiation.");case 5:if(!B.error){_context55.next=7;break}throw new Error(B.error);case 7:if(!B.ProtocolVersion){_context55.next=9;break}throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");case 9:if(B.url&&(s=B.url),B.accessToken){Y=B.accessToken;_this167._accessTokenFactory=function(){return Y},_this167._httpClient._accessToken=Y,_this167._httpClient._accessTokenFactory=void 0}Q++;case 11:case"end":return _context55.stop()}},_loop4)});case 15:return _context56.delegateYield(_loop4(),"t0",16);case 16:if(B.url&&Q<Ey){_context56.next=15;break}case 17:if(!(Q===Ey&&B.url)){_context56.next=19;break}throw new Error("Negotiate redirection limit exceeded.");case 19:_context56.next=21;return this._createTransport(s,this._options.transport,B,o);case 21:this.transport instanceof $y&&(this.features.inherentKeepAlive=!0),this._connectionState==="Connecting"&&(this._logger.log(G.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected");_context56.next=27;break;case 24:_context56.prev=24;_context56.t1=_context56["catch"](2);return _context56.abrupt("return",(this._logger.log(G.Error,"Failed to start the connection: "+_context56.t1),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(_context56.t1)));case 27:case"end":return _context56.stop()}},_callee55,this,[[2,24]])}));function _startInternal(_x44){return _startInternal3.apply(this,arguments)}return _startInternal}()},{key:"_getNegotiationResponse",value:function(){var _getNegotiationResponse2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee56(o){var s,_Ma9,_Ma10,B,Q,Y,J,it,_it6;return _regeneratorRuntime().wrap(function _callee56$(_context57){while(1)switch(_context57.prev=_context57.next){case 0:s={},_Ma9=Ma(),_Ma10=_slicedToArray(_Ma9,2),B=_Ma10[0],Q=_Ma10[1];s[B]=Q;Y=this._resolveNegotiateUrl(o);this._logger.log(G.Debug,"Sending negotiation request: ".concat(Y,"."));_context57.prev=4;_context57.next=7;return this._httpClient.post(Y,{content:"",headers:_objectSpread(_objectSpread({},s),this._options.headers),timeout:this._options.timeout,withCredentials:this._options.withCredentials});case 7:J=_context57.sent;if(!(J.statusCode!==200)){_context57.next=10;break}return _context57.abrupt("return",Promise.reject(new Error("Unexpected status code returned from negotiate '".concat(J.statusCode,"'"))));case 10:it=JSON.parse(J.content);return _context57.abrupt("return",((!it.negotiateVersion||it.negotiateVersion<1)&&(it.connectionToken=it.connectionId),it));case 14:_context57.prev=14;_context57.t0=_context57["catch"](4);_it6="Failed to complete negotiation with the server: "+_context57.t0;return _context57.abrupt("return",(_context57.t0 instanceof La&&_context57.t0.statusCode===404&&(_it6=_it6+" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(G.Error,_it6),Promise.reject(new Sv(_it6))));case 18:case"end":return _context57.stop()}},_callee56,this,[[4,14]])}));function _getNegotiationResponse(_x45){return _getNegotiationResponse2.apply(this,arguments)}return _getNegotiationResponse}()},{key:"_createConnectUrl",value:function _createConnectUrl(o,s){return s?o+(o.indexOf("?")===-1?"?":"&")+"id=".concat(s):o}},{key:"_createTransport",value:function(){var _createTransport2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee57(o,s,B,Q){var Y,J,it,nt,_iterator158,_step158,ot,dt,Ot;return _regeneratorRuntime().wrap(function _callee57$(_context58){while(1)switch(_context58.prev=_context58.next){case 0:Y=this._createConnectUrl(o,B.connectionToken);if(!this._isITransport(s)){_context58.next=8;break}this._logger.log(G.Debug,"Connection was provided an instance of ITransport, using that directly.");this.transport=s;_context58.next=6;return this._startTransport(Y,Q);case 6:this.connectionId=B.connectionId;return _context58.abrupt("return");case 8:J=[],it=B.availableTransports||[];nt=B;_iterator158=_createForOfIteratorHelper(it);_context58.prev=11;_iterator158.s();case 13:if((_step158=_iterator158.n()).done){_context58.next=46;break}ot=_step158.value;dt=this._resolveTransportOrError(ot,s,Q);if(!(dt instanceof Error)){_context58.next=20;break}J.push("".concat(ot.transport," failed:")),J.push(dt);_context58.next=44;break;case 20:if(!this._isITransport(dt)){_context58.next=44;break}if(!(this.transport=dt,!nt)){_context58.next=32;break}_context58.prev=22;_context58.next=25;return this._getNegotiationResponse(o);case 25:nt=_context58.sent;_context58.next=31;break;case 28:_context58.prev=28;_context58.t0=_context58["catch"](22);return _context58.abrupt("return",Promise.reject(_context58.t0));case 31:Y=this._createConnectUrl(o,nt.connectionToken);case 32:_context58.prev=32;_context58.next=35;return this._startTransport(Y,Q);case 35:this.connectionId=nt.connectionId;return _context58.abrupt("return");case 39:_context58.prev=39;_context58.t1=_context58["catch"](32);if(!(this._logger.log(G.Error,"Failed to start the transport '".concat(ot.transport,"': ").concat(_context58.t1)),nt=void 0,J.push(new Ev("".concat(ot.transport," failed: ").concat(_context58.t1),Kt[ot.transport])),this._connectionState!=="Connecting")){_context58.next=44;break}Ot="Failed to select transport before stop() was called.";return _context58.abrupt("return",(this._logger.log(G.Debug,Ot),Promise.reject(new _i(Ot))));case 44:_context58.next=13;break;case 46:_context58.next=51;break;case 48:_context58.prev=48;_context58.t2=_context58["catch"](11);_iterator158.e(_context58.t2);case 51:_context58.prev=51;_iterator158.f();return _context58.finish(51);case 54:return _context58.abrupt("return",J.length>0?Promise.reject(new Pv("Unable to connect to the server with any of the available transports. ".concat(J.join(" ")),J)):Promise.reject(new Error("None of the transports supported by the client are supported by the server.")));case 55:case"end":return _context58.stop()}},_callee57,this,[[11,48,51,54],[22,28],[32,39]])}));function _createTransport(_x46,_x47,_x48,_x49){return _createTransport2.apply(this,arguments)}return _createTransport}()},{key:"_constructTransport",value:function _constructTransport(o){switch(o){case Kt.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new Zv(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case Kt.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new Kv(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case Kt.LongPolling:return new $y(this._httpClient,this._logger,this._options);default:throw new Error("Unknown transport: ".concat(o,"."))}}},{key:"_startTransport",value:function _startTransport(o,s){var _this168=this;return this.transport.onreceive=this.onreceive,this.transport.onclose=function(B){return _this168._stopConnection(B)},this.transport.connect(o,s)}},{key:"_resolveTransportOrError",value:function _resolveTransportOrError(o,s,B){var Q=Kt[o.transport];if(Q==null)return this._logger.log(G.Debug,"Skipping transport '".concat(o.transport,"' because it is not supported by this client.")),new Error("Skipping transport '".concat(o.transport,"' because it is not supported by this client."));if(Yv(s,Q)){if(o.transferFormats.map(function(Y){return dr[Y]}).indexOf(B)>=0){if(Q===Kt.WebSockets&&!this._options.WebSocket||Q===Kt.ServerSentEvents&&!this._options.EventSource)return this._logger.log(G.Debug,"Skipping transport '".concat(Kt[Q],"' because it is not supported in your environment.'")),new Cv("'".concat(Kt[Q],"' is not supported in your environment."),Q);this._logger.log(G.Debug,"Selecting transport '".concat(Kt[Q],"'."));try{return this._constructTransport(Q)}catch(Y){return Y}}else return this._logger.log(G.Debug,"Skipping transport '".concat(Kt[Q],"' because it does not support the requested transfer format '").concat(dr[B],"'.")),new Error("'".concat(Kt[Q],"' does not support ").concat(dr[B],"."));}else return this._logger.log(G.Debug,"Skipping transport '".concat(Kt[Q],"' because it was disabled by the client.")),new $v("'".concat(Kt[Q],"' is disabled by the client."),Q)}},{key:"_isITransport",value:function _isITransport(o){return o&&_typeof(o)=="object"&&"connect"in o}},{key:"_stopConnection",value:function _stopConnection(o){var _this169=this;if(this._logger.log(G.Debug,"HttpConnection.stopConnection(".concat(o,") called while in state ").concat(this._connectionState,".")),this.transport=void 0,o=this._stopError||o,this._stopError=void 0,this._connectionState==="Disconnected"){this._logger.log(G.Debug,"Call to HttpConnection.stopConnection(".concat(o,") was ignored because the connection is already in the disconnected state."));return}if(this._connectionState==="Connecting")throw this._logger.log(G.Warning,"Call to HttpConnection.stopConnection(".concat(o,") was ignored because the connection is still in the connecting state.")),new Error("HttpConnection.stopConnection(".concat(o,") was called while the connection is still in the connecting state."));if(this._connectionState==="Disconnecting"&&this._stopPromiseResolver(),o?this._logger.log(G.Error,"Connection disconnected with error '".concat(o,"'.")):this._logger.log(G.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop()["catch"](function(s){_this169._logger.log(G.Error,"TransportSendQueue.stop() threw error '".concat(s,"'."))}),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(o)}catch(s){this._logger.log(G.Error,"HttpConnection.onclose(".concat(o,") threw error '").concat(s,"'."))}}}},{key:"_resolveUrl",value:function _resolveUrl(o){if(o.lastIndexOf("https://",0)===0||o.lastIndexOf("http://",0)===0)return o;if(!Xt.isBrowser)throw new Error("Cannot resolve '".concat(o,"'."));var s=window.document.createElement("a");return s.href=o,this._logger.log(G.Information,"Normalizing '".concat(o,"' to '").concat(s.href,"'.")),s.href}},{key:"_resolveNegotiateUrl",value:function _resolveNegotiateUrl(o){var s=o.indexOf("?");var B=o.substring(0,s===-1?o.length:s);return B[B.length-1]!=="/"&&(B+="/"),B+="negotiate",B+=s===-1?"":o.substring(s),B.indexOf("negotiateVersion")===-1&&(B+=s===-1?"?":"&",B+="negotiateVersion="+this._negotiateVersion),B}}]);return Gv}();function Yv(r,o){return!r||(o&r)!==0}var su=function(){function su(o){_classCallCheck(this,su);this._transport=o,this._buffer=[],this._executing=!0,this._sendBufferedData=new al,this._transportResult=new al,this._sendLoopPromise=this._sendLoop()}_createClass(su,[{key:"send",value:function send(o){return this._bufferData(o),this._transportResult||(this._transportResult=new al),this._transportResult.promise}},{key:"stop",value:function stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}},{key:"_bufferData",value:function _bufferData(o){if(this._buffer.length&&_typeof(this._buffer[0])!=_typeof(o))throw new Error("Expected data to be of type ".concat(_typeof(this._buffer)," but was of type ").concat(_typeof(o)));this._buffer.push(o),this._sendBufferedData.resolve()}},{key:"_sendLoop",value:function(){var _sendLoop2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee58(){var o,s;return _regeneratorRuntime().wrap(function _callee58$(_context59){while(1)switch(_context59.prev=_context59.next){case 0:_context59.next=2;return this._sendBufferedData.promise;case 2:if(this._executing){_context59.next=5;break}this._transportResult&&this._transportResult.reject("Connection stopped.");return _context59.abrupt("break",21);case 5:this._sendBufferedData=new al;o=this._transportResult;this._transportResult=void 0;s=typeof this._buffer[0]=="string"?this._buffer.join(""):su._concatBuffers(this._buffer);this._buffer.length=0;_context59.prev=10;_context59.next=13;return this._transport.send(s);case 13:o.resolve();_context59.next=19;break;case 16:_context59.prev=16;_context59.t0=_context59["catch"](10);o.reject(_context59.t0);case 19:_context59.next=0;break;case 21:case"end":return _context59.stop()}},_callee58,this,[[10,16]])}));function _sendLoop(){return _sendLoop2.apply(this,arguments)}return _sendLoop}()}],[{key:"_concatBuffers",value:function _concatBuffers(o){var s=o.map(function(Y){return Y.byteLength}).reduce(function(Y,J){return Y+J}),B=new Uint8Array(s);var Q=0;var _iterator159=_createForOfIteratorHelper(o),_step159;try{for(_iterator159.s();!(_step159=_iterator159.n()).done;){var Y=_step159.value;B.set(new Uint8Array(Y),Q),Q+=Y.byteLength}}catch(err){_iterator159.e(err)}finally{_iterator159.f()}return B.buffer}}]);return su}();var al=function(){function al(){var _this170=this;_classCallCheck(this,al);this.promise=new Promise(function(o,s){var _ref125;return _ref125=[o,s],_this170._resolver=_ref125[0],_this170._rejecter=_ref125[1],_ref125})}_createClass(al,[{key:"resolve",value:function resolve(){this._resolver()}},{key:"reject",value:function reject(o){this._rejecter(o)}}]);return al}();var Xv="json";var Jv=function(){function Jv(){_classCallCheck(this,Jv);this.name=Xv,this.version=1,this.transferFormat=dr.Text}_createClass(Jv,[{key:"parseMessages",value:function parseMessages(o,s){if(typeof o!="string")throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!o)return[];s===null&&(s=Ns.instance);var B=Br.parse(o),Q=[];var _iterator160=_createForOfIteratorHelper(B),_step160;try{for(_iterator160.s();!(_step160=_iterator160.n()).done;){var Y=_step160.value;var J=JSON.parse(Y);if(typeof J.type!="number")throw new Error("Invalid payload.");switch(J.type){case at.Invocation:this._isInvocationMessage(J);break;case at.StreamItem:this._isStreamItemMessage(J);break;case at.Completion:this._isCompletionMessage(J);break;case at.Ping:break;case at.Close:break;default:s.log(G.Information,"Unknown message type '"+J.type+"' ignored.");continue}Q.push(J)}}catch(err){_iterator160.e(err)}finally{_iterator160.f()}return Q}},{key:"writeMessage",value:function writeMessage(o){return Br.write(JSON.stringify(o))}},{key:"_isInvocationMessage",value:function _isInvocationMessage(o){this._assertNotEmptyString(o.target,"Invalid payload for Invocation message."),o.invocationId!==void 0&&this._assertNotEmptyString(o.invocationId,"Invalid payload for Invocation message.")}},{key:"_isStreamItemMessage",value:function _isStreamItemMessage(o){if(this._assertNotEmptyString(o.invocationId,"Invalid payload for StreamItem message."),o.item===void 0)throw new Error("Invalid payload for StreamItem message.")}},{key:"_isCompletionMessage",value:function _isCompletionMessage(o){if(o.result&&o.error)throw new Error("Invalid payload for Completion message.");!o.result&&o.error&&this._assertNotEmptyString(o.error,"Invalid payload for Completion message."),this._assertNotEmptyString(o.invocationId,"Invalid payload for Completion message.")}},{key:"_assertNotEmptyString",value:function _assertNotEmptyString(o,s){if(typeof o!="string"||o==="")throw new Error(s)}}]);return Jv}();var eg={trace:G.Trace,debug:G.Debug,info:G.Information,information:G.Information,warn:G.Warning,warning:G.Warning,error:G.Error,critical:G.Critical,none:G.None};function tg(r){var o=eg[r.toLowerCase()];if(_typeof(o)<"u")return o;throw new Error("Unknown log level: ".concat(r))}var rg=function(){function rg(){_classCallCheck(this,rg)}_createClass(rg,[{key:"configureLogging",value:function configureLogging(o){if(er.isRequired(o,"logging"),ig(o))this.logger=o;else if(typeof o=="string"){var s=tg(o);this.logger=new Ll(s)}else this.logger=new Ll(o);return this}},{key:"withUrl",value:function withUrl(o,s){return er.isRequired(o,"url"),er.isNotEmpty(o,"url"),this.url=o,_typeof(s)=="object"?this.httpConnectionOptions=_objectSpread(_objectSpread({},this.httpConnectionOptions),s):this.httpConnectionOptions=_objectSpread(_objectSpread({},this.httpConnectionOptions),{},{transport:s}),this}},{key:"withHubProtocol",value:function withHubProtocol(o){return er.isRequired(o,"protocol"),this.protocol=o,this}},{key:"withAutomaticReconnect",value:function withAutomaticReconnect(o){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return o?Array.isArray(o)?this.reconnectPolicy=new Cy(o):this.reconnectPolicy=o:this.reconnectPolicy=new Cy,this}},{key:"build",value:function build(){var o=this.httpConnectionOptions||{};if(o.logger===void 0&&(o.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");var s=new Gv(this.url,o);return au.create(s,this.logger||Ns.instance,this.protocol||new Jv,this.reconnectPolicy)}}]);return rg}();function ig(r){return r.log!==void 0}var fl=globalThis,nd=fl.ShadowRoot&&(fl.ShadyCSS===void 0||fl.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,cu=Symbol(),Sy=new WeakMap;var fw=function(){function fw(r,o,s){_classCallCheck(this,fw);if(this._$cssResult$=!0,s!==cu)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=r,this.t=o}_createClass(fw,[{key:"styleSheet",get:function get(){var r=this.o;var o=this.t;if(nd&&r===void 0){var s=o!==void 0&&o.length===1;s&&(r=Sy.get(o)),r===void 0&&((this.o=r=new CSSStyleSheet).replaceSync(this.cssText),s&&Sy.set(o,r))}return r}},{key:"toString",value:function toString(){return this.cssText}}]);return fw}();var Fc=function Fc(r){return new fw(typeof r=="string"?r:r+"",void 0,cu)},Be=function Be(r){for(var _len6=arguments.length,o=new Array(_len6>1?_len6-1:0),_key6=1;_key6<_len6;_key6++){o[_key6-1]=arguments[_key6]}var s=r.length===1?r[0]:o.reduce(function(B,Q,Y){return B+function(J){if(J._$cssResult$===!0)return J.cssText;if(typeof J=="number")return J;throw Error("Value passed to 'css' function must be a 'css' function result: "+J+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")}(Q)+r[Y+1]},r[0]);return new fw(s,r,cu)},mw=function mw(r,o){if(nd)r.adoptedStyleSheets=o.map(function(s){return s instanceof CSSStyleSheet?s:s.styleSheet});else{var _iterator161=_createForOfIteratorHelper(o),_step161;try{for(_iterator161.s();!(_step161=_iterator161.n()).done;){var s=_step161.value;var B=document.createElement("style"),Q=fl.litNonce;Q!==void 0&&B.setAttribute("nonce",Q),B.textContent=s.cssText,r.appendChild(B)}}catch(err){_iterator161.e(err)}finally{_iterator161.f()}}},Py=nd?function(r){return r}:function(r){return r instanceof CSSStyleSheet?function(o){var s="";var _iterator162=_createForOfIteratorHelper(o.cssRules),_step162;try{for(_iterator162.s();!(_step162=_iterator162.n()).done;){var B=_step162.value;s+=B.cssText}}catch(err){_iterator162.e(err)}finally{_iterator162.f()}return Fc(s)}(r):r},ng=Object.is,og=Object.defineProperty,ag=Object.getOwnPropertyDescriptor,sg=Object.getOwnPropertyNames,cg=Object.getOwnPropertySymbols,lg=Object.getPrototypeOf,In=globalThis,Ay=In.trustedTypes,dg=Ay?Ay.emptyScript:"",Ld=In.reactiveElementPolyfillSupport,As=function As(r,o){return r},Ml={toAttribute:function toAttribute(r,o){switch(o){case Boolean:r=r?dg:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute:function fromAttribute(r,o){var s=r;switch(o){case Boolean:s=r!==null;break;case Number:s=r===null?null:Number(r);break;case Object:case Array:try{s=JSON.parse(r)}catch(_unused11){s=null}}return s}},lu=function lu(r,o){return!ng(r,o)},Ly={attribute:!0,type:String,converter:Ml,reflect:!1,hasChanged:lu};(_Symbol$metadata=Symbol.metadata)!==null&&_Symbol$metadata!==void 0?_Symbol$metadata:Symbol.metadata=Symbol("metadata"),(_In$litPropertyMetada=In.litPropertyMetadata)!==null&&_In$litPropertyMetada!==void 0?_In$litPropertyMetada:In.litPropertyMetadata=new WeakMap;var ea=function(_HTMLElement){_inherits(ea,_HTMLElement);function ea(){var _this171;_classCallCheck(this,ea);_this171=_callSuper(this,ea),_this171._$Ep=void 0,_this171.isUpdatePending=!1,_this171.hasUpdated=!1,_this171._$Em=null,_this171._$Ev();return _this171}_createClass(ea,[{key:"_$Ev",value:function _$Ev(){var _this172=this;var o;this._$ES=new Promise(function(s){return _this172.enableUpdating=s}),this._$AL=new Map,this._$E_(),this.requestUpdate(),(o=this.constructor.l)==null||o.forEach(function(s){return s(_this172)})}},{key:"addController",value:function addController(o){var _this$_$EO;var s;((_this$_$EO=this._$EO)!==null&&_this$_$EO!==void 0?_this$_$EO:this._$EO=new Set).add(o),this.renderRoot!==void 0&&this.isConnected&&((s=o.hostConnected)==null||s.call(o))}},{key:"removeController",value:function removeController(o){var s;(s=this._$EO)==null||s["delete"](o)}},{key:"_$E_",value:function _$E_(){var o=new Map,s=this.constructor.elementProperties;var _iterator163=_createForOfIteratorHelper(s.keys()),_step163;try{for(_iterator163.s();!(_step163=_iterator163.n()).done;){var B=_step163.value;this.hasOwnProperty(B)&&(o.set(B,this[B]),delete this[B])}}catch(err){_iterator163.e(err)}finally{_iterator163.f()}o.size>0&&(this._$Ep=o)}},{key:"createRenderRoot",value:function createRenderRoot(){var _this$shadowRoot;var o=(_this$shadowRoot=this.shadowRoot)!==null&&_this$shadowRoot!==void 0?_this$shadowRoot:this.attachShadow(this.constructor.shadowRootOptions);return mw(o,this.constructor.elementStyles),o}},{key:"connectedCallback",value:function connectedCallback(){var _this$renderRoot;var o;(_this$renderRoot=this.renderRoot)!==null&&_this$renderRoot!==void 0?_this$renderRoot:this.renderRoot=this.createRenderRoot(),this.enableUpdating(!0),(o=this._$EO)==null||o.forEach(function(s){var B;return(B=s.hostConnected)==null?void 0:B.call(s)})}},{key:"enableUpdating",value:function enableUpdating(o){}},{key:"disconnectedCallback",value:function disconnectedCallback(){var o;(o=this._$EO)==null||o.forEach(function(s){var B;return(B=s.hostDisconnected)==null?void 0:B.call(s)})}},{key:"attributeChangedCallback",value:function attributeChangedCallback(o,s,B){this._$AK(o,B)}},{key:"_$EC",value:function _$EC(o,s){var B;var Q=this.constructor.elementProperties.get(o),Y=this.constructor._$Eu(o,Q);if(Y!==void 0&&Q.reflect===!0){var J=(((B=Q.converter)==null?void 0:B.toAttribute)!==void 0?Q.converter:Ml).toAttribute(s,Q.type);this._$Em=o,J==null?this.removeAttribute(Y):this.setAttribute(Y,J),this._$Em=null}}},{key:"_$AK",value:function _$AK(o,s){var B;var Q=this.constructor,Y=Q._$Eh.get(o);if(Y!==void 0&&this._$Em!==Y){var J=Q.getPropertyOptions(Y),it=typeof J.converter=="function"?{fromAttribute:J.converter}:((B=J.converter)==null?void 0:B.fromAttribute)!==void 0?J.converter:Ml;this._$Em=Y,this[Y]=it.fromAttribute(s,J.type),this._$Em=null}}},{key:"requestUpdate",value:function requestUpdate(o,s,B){if(o!==void 0){var _B2,_B$hasChanged;if((_B2=B)!==null&&_B2!==void 0?_B2:B=this.constructor.getPropertyOptions(o),!((_B$hasChanged=B.hasChanged)!==null&&_B$hasChanged!==void 0?_B$hasChanged:lu)(this[o],s))return;this.P(o,s,B)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}},{key:"P",value:function P(o,s,B){var _this$_$Ej;this._$AL.has(o)||this._$AL.set(o,s),B.reflect===!0&&this._$Em!==o&&((_this$_$Ej=this._$Ej)!==null&&_this$_$Ej!==void 0?_this$_$Ej:this._$Ej=new Set).add(o)}},{key:"_$ET",value:function(){var _$ET2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee59(){var o;return _regeneratorRuntime().wrap(function _callee59$(_context60){while(1)switch(_context60.prev=_context60.next){case 0:this.isUpdatePending=!0;_context60.prev=1;_context60.next=4;return this._$ES;case 4:_context60.next=9;break;case 6:_context60.prev=6;_context60.t0=_context60["catch"](1);Promise.reject(_context60.t0);case 9:o=this.scheduleUpdate();_context60.t1=o!=null;if(!_context60.t1){_context60.next=14;break}_context60.next=14;return o;case 14:return _context60.abrupt("return",!this.isUpdatePending);case 15:case"end":return _context60.stop()}},_callee59,this,[[1,6]])}));function _$ET(){return _$ET2.apply(this,arguments)}return _$ET}()},{key:"scheduleUpdate",value:function scheduleUpdate(){return this.performUpdate()}},{key:"performUpdate",value:function performUpdate(){var o;if(!this.isUpdatePending)return;if(!this.hasUpdated){var _this$renderRoot2;if((_this$renderRoot2=this.renderRoot)!==null&&_this$renderRoot2!==void 0?_this$renderRoot2:this.renderRoot=this.createRenderRoot(),this._$Ep){var _iterator164=_createForOfIteratorHelper(this._$Ep),_step164;try{for(_iterator164.s();!(_step164=_iterator164.n()).done;){var _step164$value=_slicedToArray(_step164.value,2),Y=_step164$value[0],J=_step164$value[1];this[Y]=J}}catch(err){_iterator164.e(err)}finally{_iterator164.f()}this._$Ep=void 0}var Q=this.constructor.elementProperties;if(Q.size>0){var _iterator165=_createForOfIteratorHelper(Q),_step165;try{for(_iterator165.s();!(_step165=_iterator165.n()).done;){var _step165$value=_slicedToArray(_step165.value,2),_Y2=_step165$value[0],_J2=_step165$value[1];_J2.wrapped!==!0||this._$AL.has(_Y2)||this[_Y2]===void 0||this.P(_Y2,this[_Y2],_J2)}}catch(err){_iterator165.e(err)}finally{_iterator165.f()}}}var s=!1;var B=this._$AL;try{s=this.shouldUpdate(B),s?(this.willUpdate(B),(o=this._$EO)==null||o.forEach(function(Q){var Y;return(Y=Q.hostUpdate)==null?void 0:Y.call(Q)}),this.update(B)):this._$EU()}catch(Q){throw s=!1,this._$EU(),Q}s&&this._$AE(B)}},{key:"willUpdate",value:function willUpdate(o){}},{key:"_$AE",value:function _$AE(o){var s;(s=this._$EO)==null||s.forEach(function(B){var Q;return(Q=B.hostUpdated)==null?void 0:Q.call(B)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(o)),this.updated(o)}},{key:"_$EU",value:function _$EU(){this._$AL=new Map,this.isUpdatePending=!1}},{key:"updateComplete",get:function get(){return this.getUpdateComplete()}},{key:"getUpdateComplete",value:function getUpdateComplete(){return this._$ES}},{key:"shouldUpdate",value:function shouldUpdate(o){return!0}},{key:"update",value:function update(o){var _this173=this;this._$Ej&&(this._$Ej=this._$Ej.forEach(function(s){return _this173._$EC(s,_this173[s])})),this._$EU()}},{key:"updated",value:function updated(o){}},{key:"firstUpdated",value:function firstUpdated(o){}}],[{key:"addInitializer",value:function addInitializer(o){var _this$l;this._$Ei(),((_this$l=this.l)!==null&&_this$l!==void 0?_this$l:this.l=[]).push(o)}},{key:"observedAttributes",get:function get(){return this.finalize(),this._$Eh&&_toConsumableArray(this._$Eh.keys())}},{key:"createProperty",value:function createProperty(o){var s=arguments.length>1&&arguments[1]!==undefined?arguments[1]:Ly;if(s.state&&(s.attribute=!1),this._$Ei(),this.elementProperties.set(o,s),!s.noAccessor){var B=Symbol(),Q=this.getPropertyDescriptor(o,B,s);Q!==void 0&&og(this.prototype,o,Q)}}},{key:"getPropertyDescriptor",value:function getPropertyDescriptor(o,s,B){var _ag;var _ref34=(_ag=ag(this.prototype,o))!==null&&_ag!==void 0?_ag:{get:function get(){return this[s]},set:function set(J){this[s]=J}},Q=_ref34.get,Y=_ref34.set;return{get:function get(){return Q==null?void 0:Q.call(this)},set:function set(J){var it=Q==null?void 0:Q.call(this);Y.call(this,J),this.requestUpdate(o,it,B)},configurable:!0,enumerable:!0}}},{key:"getPropertyOptions",value:function getPropertyOptions(o){var _this$elementProperti;return(_this$elementProperti=this.elementProperties.get(o))!==null&&_this$elementProperti!==void 0?_this$elementProperti:Ly}},{key:"_$Ei",value:function _$Ei(){if(this.hasOwnProperty(As("elementProperties")))return;var o=lg(this);o.finalize(),o.l!==void 0&&(this.l=_toConsumableArray(o.l)),this.elementProperties=new Map(o.elementProperties)}},{key:"finalize",value:function finalize(){if(this.hasOwnProperty(As("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(As("properties"))){var s=this.properties,B=[].concat(_toConsumableArray(sg(s)),_toConsumableArray(cg(s)));var _iterator166=_createForOfIteratorHelper(B),_step166;try{for(_iterator166.s();!(_step166=_iterator166.n()).done;){var Q=_step166.value;this.createProperty(Q,s[Q])}}catch(err){_iterator166.e(err)}finally{_iterator166.f()}}var o=this[Symbol.metadata];if(o!==null){var _s4=litPropertyMetadata.get(o);if(_s4!==void 0){var _iterator167=_createForOfIteratorHelper(_s4),_step167;try{for(_iterator167.s();!(_step167=_iterator167.n()).done;){var _step167$value=_slicedToArray(_step167.value,2),_B3=_step167$value[0],_Q3=_step167$value[1];this.elementProperties.set(_B3,_Q3)}}catch(err){_iterator167.e(err)}finally{_iterator167.f()}}}this._$Eh=new Map;var _iterator168=_createForOfIteratorHelper(this.elementProperties),_step168;try{for(_iterator168.s();!(_step168=_iterator168.n()).done;){var _step168$value=_slicedToArray(_step168.value,2),_s5=_step168$value[0],_B4=_step168$value[1];var _Q4=this._$Eu(_s5,_B4);_Q4!==void 0&&this._$Eh.set(_Q4,_s5)}}catch(err){_iterator168.e(err)}finally{_iterator168.f()}this.elementStyles=this.finalizeStyles(this.styles)}},{key:"finalizeStyles",value:function finalizeStyles(o){var s=[];if(Array.isArray(o)){var B=new Set(o.flat(1/0).reverse());var _iterator169=_createForOfIteratorHelper(B),_step169;try{for(_iterator169.s();!(_step169=_iterator169.n()).done;){var Q=_step169.value;s.unshift(Py(Q))}}catch(err){_iterator169.e(err)}finally{_iterator169.f()}}else o!==void 0&&s.push(Py(o));return s}},{key:"_$Eu",value:function _$Eu(o,s){var B=s.attribute;return B===!1?void 0:typeof B=="string"?B:typeof o=="string"?o.toLowerCase():void 0}}]);return ea}(_wrapNativeSuper(HTMLElement));ea.elementStyles=[],ea.shadowRootOptions={mode:"open"},ea[As("elementProperties")]=new Map,ea[As("finalized")]=new Map,Ld==null||Ld({ReactiveElement:ea}),((_In$reactiveElementVe=In.reactiveElementVersions)!==null&&_In$reactiveElementVe!==void 0?_In$reactiveElementVe:In.reactiveElementVersions=[]).push("2.0.4");var Ls=globalThis,Ol=Ls.trustedTypes,My=Ol?Ol.createPolicy("lit-html",{createHTML:function createHTML(r){return r}}):void 0,du="$lit$",en="lit$".concat((Math.random()+"").slice(9),"$"),hu="?"+en,hg="<".concat(hu,">"),Oo=document,Bs=function Bs(){return Oo.createComment("")},Hs=function Hs(r){return r===null||_typeof(r)!="object"&&typeof r!="function"},vw=Array.isArray,gw=function gw(r){return vw(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function"},Md="[ \t\n\f\r]",fs=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Oy=/-->/g,Iy=/>/g,no=RegExp(">|".concat(Md,"(?:([^\\s\"'>=/]+)(").concat(Md,"*=").concat(Md,"*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)"),"g"),Ty=/'/g,Ry=/"/g,bw=/^(?:script|style|textarea|title)$/i,ug=function ug(r){return function(o){for(var _len7=arguments.length,s=new Array(_len7>1?_len7-1:0),_key7=1;_key7<_len7;_key7++){s[_key7-1]=arguments[_key7]}return{_$litType$:r,strings:o,values:s}}},v=ug(1),Ni=Symbol["for"]("lit-noChange"),O=Symbol["for"]("lit-nothing"),Dy=new WeakMap,co=Oo.createTreeWalker(Oo,129);function _w(r,o){if(!Array.isArray(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return My!==void 0?My.createHTML(o):o}var xw=function xw(r,o){var s=r.length-1,B=[];var Q,Y=o===2?"<svg>":"",J=fs;for(var it=0;it<s;it++){var nt=r[it];var ot=void 0,dt=void 0,Mt=-1,Ot=0;for(;Ot<nt.length&&(J.lastIndex=Ot,dt=J.exec(nt),dt!==null);){var _Q5;Ot=J.lastIndex,J===fs?dt[1]==="!--"?J=Oy:dt[1]!==void 0?J=Iy:dt[2]!==void 0?(bw.test(dt[2])&&(Q=RegExp("</"+dt[2],"g")),J=no):dt[3]!==void 0&&(J=no):J===no?dt[0]===">"?(J=(_Q5=Q)!==null&&_Q5!==void 0?_Q5:fs,Mt=-1):dt[1]===void 0?Mt=-2:(Mt=J.lastIndex-dt[2].length,ot=dt[1],J=dt[3]===void 0?no:dt[3]==="\""?Ry:Ty):J===Ry||J===Ty?J=no:J===Oy||J===Iy?J=fs:(J=no,Q=void 0)}var Qt=J===no&&r[it+1].startsWith("/>")?" ":"";Y+=J===fs?nt+hg:Mt>=0?(B.push(ot),nt.slice(0,Mt)+du+nt.slice(Mt)+en+Qt):nt+en+(Mt===-2?it:Qt)}return[_w(r,Y+(r[s]||"<?>")+(o===2?"</svg>":"")),B]};var js=function(){function js(_ref110,B){var o=_ref110.strings,s=_ref110._$litType$;_classCallCheck(this,js);var Q;this.parts=[];var Y=0,J=0;var it=o.length-1,nt=this.parts,_xw=xw(o,s),_xw2=_slicedToArray(_xw,2),ot=_xw2[0],dt=_xw2[1];if(this.el=js.createElement(ot,B),co.currentNode=this.el.content,s===2){var Mt=this.el.content.firstChild;Mt.replaceWith.apply(Mt,_toConsumableArray(Mt.childNodes))}for(;(Q=co.nextNode())!==null&&nt.length<it;){if(Q.nodeType===1){if(Q.hasAttributes()){var _iterator170=_createForOfIteratorHelper(Q.getAttributeNames()),_step170;try{for(_iterator170.s();!(_step170=_iterator170.n()).done;){var _Mt2=_step170.value;if(_Mt2.endsWith(du)){var Ot=dt[J++],Qt=Q.getAttribute(_Mt2).split(en),Ut=/([.?@])?(.*)/.exec(Ot);nt.push({type:1,index:Y,name:Ut[2],strings:Qt,ctor:Ut[1]==="."?Cw:Ut[1]==="?"?$w:Ut[1]==="@"?Ew:zc}),Q.removeAttribute(_Mt2)}else _Mt2.startsWith(en)&&(nt.push({type:6,index:Y}),Q.removeAttribute(_Mt2))}}catch(err){_iterator170.e(err)}finally{_iterator170.f()}}if(bw.test(Q.tagName)){var _Mt3=Q.textContent.split(en),_Ot2=_Mt3.length-1;if(_Ot2>0){Q.textContent=Ol?Ol.emptyScript:"";for(var _Qt2=0;_Qt2<_Ot2;_Qt2++)Q.append(_Mt3[_Qt2],Bs()),co.nextNode(),nt.push({type:2,index:++Y});Q.append(_Mt3[_Ot2],Bs())}}}else if(Q.nodeType===8)if(Q.data===hu)nt.push({type:2,index:Y});else{var _Mt4=-1;for(;(_Mt4=Q.data.indexOf(en,_Mt4+1))!==-1;)nt.push({type:7,index:Y}),_Mt4+=en.length-1}Y++}}_createClass(js,null,[{key:"createElement",value:function createElement(o,s){var B=Oo.createElement("template");return B.innerHTML=o,B}}]);return js}();function Io(r,o){var _s$_$Co;var s=arguments.length>2&&arguments[2]!==undefined?arguments[2]:r;var B=arguments.length>3?arguments[3]:undefined;var Q,Y;if(o===Ni)return o;var J=B!==void 0?(Q=s._$Co)==null?void 0:Q[B]:s._$Cl;var it=Hs(o)?void 0:o._$litDirective$;return(J==null?void 0:J.constructor)!==it&&((Y=J==null?void 0:J._$AO)==null||Y.call(J,!1),it===void 0?J=void 0:(J=new it(r),J._$AT(r,s,B)),B!==void 0?((_s$_$Co=s._$Co)!==null&&_s$_$Co!==void 0?_s$_$Co:s._$Co=[])[B]=J:s._$Cl=J),J!==void 0&&(o=Io(r,J._$AS(r,o.values),J,B)),o}var kw=function(){function kw(o,s){_classCallCheck(this,kw);this._$AV=[],this._$AN=void 0,this._$AD=o,this._$AM=s}_createClass(kw,[{key:"parentNode",get:function get(){return this._$AM.parentNode}},{key:"_$AU",get:function get(){return this._$AM._$AU}},{key:"u",value:function u(o){var _ref124;var _this$_$AD=this._$AD,s=_this$_$AD.el.content,B=_this$_$AD.parts,Q=((_ref124=o==null?void 0:o.creationScope)!==null&&_ref124!==void 0?_ref124:Oo).importNode(s,!0);co.currentNode=Q;var Y=co.nextNode(),J=0,it=0,nt=B[0];for(;nt!==void 0;){if(J===nt.index){var ot=void 0;nt.type===2?ot=new Ga(Y,Y.nextSibling,this,o):nt.type===1?ot=new nt.ctor(Y,nt.name,nt.strings,this,o):nt.type===6&&(ot=new Sw(Y,this,o)),this._$AV.push(ot),nt=B[++it]}J!==(nt==null?void 0:nt.index)&&(Y=co.nextNode(),J++)}return co.currentNode=Oo,Q}},{key:"p",value:function p(o){var s=0;var _iterator171=_createForOfIteratorHelper(this._$AV),_step171;try{for(_iterator171.s();!(_step171=_iterator171.n()).done;){var B=_step171.value;B!==void 0&&(B.strings!==void 0?(B._$AI(o,B,s),s+=B.strings.length-2):B._$AI(o[s])),s++}}catch(err){_iterator171.e(err)}finally{_iterator171.f()}}}]);return kw}();var Ga=function(){function Ga(o,s,B,Q){var _ref126;_classCallCheck(this,Ga);this.type=2,this._$AH=O,this._$AN=void 0,this._$AA=o,this._$AB=s,this._$AM=B,this.options=Q,this._$Cv=(_ref126=Q==null?void 0:Q.isConnected)!==null&&_ref126!==void 0?_ref126:!0}_createClass(Ga,[{key:"_$AU",get:function get(){var _ref127;var o;return(_ref127=(o=this._$AM)==null?void 0:o._$AU)!==null&&_ref127!==void 0?_ref127:this._$Cv}},{key:"parentNode",get:function get(){var o=this._$AA.parentNode;var s=this._$AM;return s!==void 0&&(o==null?void 0:o.nodeType)===11&&(o=s.parentNode),o}},{key:"startNode",get:function get(){return this._$AA}},{key:"endNode",get:function get(){return this._$AB}},{key:"_$AI",value:function _$AI(o){var s=arguments.length>1&&arguments[1]!==undefined?arguments[1]:this;o=Io(this,o,s),Hs(o)?o===O||o==null||o===""?(this._$AH!==O&&this._$AR(),this._$AH=O):o!==this._$AH&&o!==Ni&&this._(o):o._$litType$!==void 0?this.$(o):o.nodeType!==void 0?this.T(o):gw(o)?this.k(o):this._(o)}},{key:"S",value:function S(o){return this._$AA.parentNode.insertBefore(o,this._$AB)}},{key:"T",value:function T(o){this._$AH!==o&&(this._$AR(),this._$AH=this.S(o))}},{key:"_",value:function _(o){this._$AH!==O&&Hs(this._$AH)?this._$AA.nextSibling.data=o:this.T(Oo.createTextNode(o)),this._$AH=o}},{key:"$",value:function $(o){var s;var B=o.values,Q=o._$litType$,Y=typeof Q=="number"?this._$AC(o):(Q.el===void 0&&(Q.el=js.createElement(_w(Q.h,Q.h[0]),this.options)),Q);if(((s=this._$AH)==null?void 0:s._$AD)===Y)this._$AH.p(B);else{var J=new kw(Y,this),it=J.u(this.options);J.p(B),this.T(it),this._$AH=J}}},{key:"_$AC",value:function _$AC(o){var s=Dy.get(o.strings);return s===void 0&&Dy.set(o.strings,s=new js(o)),s}},{key:"k",value:function k(o){vw(this._$AH)||(this._$AH=[],this._$AR());var s=this._$AH;var B,Q=0;var _iterator172=_createForOfIteratorHelper(o),_step172;try{for(_iterator172.s();!(_step172=_iterator172.n()).done;){var Y=_step172.value;Q===s.length?s.push(B=new Ga(this.S(Bs()),this.S(Bs()),this,this.options)):B=s[Q],B._$AI(Y),Q++}}catch(err){_iterator172.e(err)}finally{_iterator172.f()}Q<s.length&&(this._$AR(B&&B._$AB.nextSibling,Q),s.length=Q)}},{key:"_$AR",value:function _$AR(){var o=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this._$AA.nextSibling;var s=arguments.length>1?arguments[1]:undefined;var B;for((B=this._$AP)==null?void 0:B.call(this,!1,!0,s);o&&o!==this._$AB;){var Q=o.nextSibling;o.remove(),o=Q}}},{key:"setConnected",value:function setConnected(o){var s;this._$AM===void 0&&(this._$Cv=o,(s=this._$AP)==null||s.call(this,o))}}]);return Ga}();var zc=function(){function zc(o,s,B,Q,Y){_classCallCheck(this,zc);this.type=1,this._$AH=O,this._$AN=void 0,this.element=o,this.name=s,this._$AM=Q,this.options=Y,B.length>2||B[0]!==""||B[1]!==""?(this._$AH=Array(B.length-1).fill(new String),this.strings=B):this._$AH=O}_createClass(zc,[{key:"tagName",get:function get(){return this.element.tagName}},{key:"_$AU",get:function get(){return this._$AM._$AU}},{key:"_$AI",value:function _$AI(o){var s=arguments.length>1&&arguments[1]!==undefined?arguments[1]:this;var B=arguments.length>2?arguments[2]:undefined;var Q=arguments.length>3?arguments[3]:undefined;var Y=this.strings;var J=!1;if(Y===void 0)o=Io(this,o,s,0),J=!Hs(o)||o!==this._$AH&&o!==Ni,J&&(this._$AH=o);else{var it=o;var nt,ot;for(o=Y[0],nt=0;nt<Y.length-1;nt++){var _ot4;ot=Io(this,it[B+nt],s,nt),ot===Ni&&(ot=this._$AH[nt]),J||(J=!Hs(ot)||ot!==this._$AH[nt]),ot===O?o=O:o!==O&&(o+=((_ot4=ot)!==null&&_ot4!==void 0?_ot4:"")+Y[nt+1]),this._$AH[nt]=ot}}J&&!Q&&this.j(o)}},{key:"j",value:function j(o){o===O?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,o!==null&&o!==void 0?o:"")}}]);return zc}();var Cw=function(_zc){_inherits(Cw,_zc);function Cw(){var _this174;_classCallCheck(this,Cw);_this174=_callSuper(this,Cw,arguments),_this174.type=3;return _this174}_createClass(Cw,[{key:"j",value:function j(o){this.element[this.name]=o===O?void 0:o}}]);return Cw}(zc);var $w=function(_zc2){_inherits($w,_zc2);function $w(){var _this175;_classCallCheck(this,$w);_this175=_callSuper(this,$w,arguments),_this175.type=4;return _this175}_createClass($w,[{key:"j",value:function j(o){this.element.toggleAttribute(this.name,!!o&&o!==O)}}]);return $w}(zc);var Ew=function(_zc3){_inherits(Ew,_zc3);function Ew(o,s,B,Q,Y){var _this176;_classCallCheck(this,Ew);_this176=_callSuper(this,Ew,[o,s,B,Q,Y]),_this176.type=5;return _this176}_createClass(Ew,[{key:"_$AI",value:function _$AI(o){var _Io;var s=arguments.length>1&&arguments[1]!==undefined?arguments[1]:this;if((o=(_Io=Io(this,o,s,0))!==null&&_Io!==void 0?_Io:O)===Ni)return;var B=this._$AH,Q=o===O&&B!==O||o.capture!==B.capture||o.once!==B.once||o.passive!==B.passive,Y=o!==O&&(B===O||Q);Q&&this.element.removeEventListener(this.name,this,B),Y&&this.element.addEventListener(this.name,this,o),this._$AH=o}},{key:"handleEvent",value:function handleEvent(o){var _ref128;var s;typeof this._$AH=="function"?this._$AH.call((_ref128=(s=this.options)==null?void 0:s.host)!==null&&_ref128!==void 0?_ref128:this.element,o):this._$AH.handleEvent(o)}}]);return Ew}(zc);var Sw=function(){function Sw(o,s,B){_classCallCheck(this,Sw);this.element=o,this.type=6,this._$AN=void 0,this._$AM=s,this.options=B}_createClass(Sw,[{key:"_$AU",get:function get(){return this._$AM._$AU}},{key:"_$AI",value:function _$AI(o){Io(this,o)}}]);return Sw}();var yg={P:du,A:en,C:hu,M:1,L:xw,R:kw,D:gw,V:Io,I:Ga,H:zc,N:$w,U:Ew,B:Cw,F:Sw},Od=Ls.litHtmlPolyfillSupport;Od==null||Od(js,Ga),((_Ls$litHtmlVersions=Ls.litHtmlVersions)!==null&&_Ls$litHtmlVersions!==void 0?_Ls$litHtmlVersions:Ls.litHtmlVersions=[]).push("3.1.2");var Pw=function Pw(r,o,s){var _ref129;var B=(_ref129=s==null?void 0:s.renderBefore)!==null&&_ref129!==void 0?_ref129:o;var Q=B._$litPart$;if(Q===void 0){var _ref130;var Y=(_ref130=s==null?void 0:s.renderBefore)!==null&&_ref130!==void 0?_ref130:null;B._$litPart$=Q=new Ga(o.insertBefore(Bs(),Y),Y,void 0,s!==null&&s!==void 0?s:{})}return Q._$AI(r),Q};var le=function(_ea){_inherits(le,_ea);function le(){var _this177;_classCallCheck(this,le);_this177=_callSuper(this,le,arguments),_this177.renderOptions={host:_assertThisInitialized(_this177)},_this177._$Do=void 0;return _this177}_createClass(le,[{key:"createRenderRoot",value:function createRenderRoot(){var _r$renderBefore;var r;var o=_get(_getPrototypeOf(le.prototype),"createRenderRoot",this).call(this);return(_r$renderBefore=(r=this.renderOptions).renderBefore)!==null&&_r$renderBefore!==void 0?_r$renderBefore:r.renderBefore=o.firstChild,o}},{key:"update",value:function update(r){var o=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),_get(_getPrototypeOf(le.prototype),"update",this).call(this,r),this._$Do=Pw(o,this.renderRoot,this.renderOptions)}},{key:"connectedCallback",value:function connectedCallback(){var r;_get(_getPrototypeOf(le.prototype),"connectedCallback",this).call(this),(r=this._$Do)==null||r.setConnected(!0)}},{key:"disconnectedCallback",value:function disconnectedCallback(){var r;_get(_getPrototypeOf(le.prototype),"disconnectedCallback",this).call(this),(r=this._$Do)==null||r.setConnected(!1)}},{key:"render",value:function render(){return Ni}}]);return le}(ea);var ow;le._$litElement$=!0,le.finalized=!0,(ow=globalThis.litElementHydrateSupport)==null||ow.call(globalThis,{LitElement:le});var Id=globalThis.litElementPolyfillSupport;Id==null||Id({LitElement:le});((_globalThis$litElemen=globalThis.litElementVersions)!==null&&_globalThis$litElemen!==void 0?_globalThis$litElemen:globalThis.litElementVersions=[]).push("4.0.4");var de=function de(r){return function(o,s){s!==void 0?s.addInitializer(function(){customElements.define(r,o)}):customElements.define(r,o)}},pg={attribute:!0,type:String,converter:Ml,reflect:!1,hasChanged:lu},wg=function wg(){var r=arguments.length>0&&arguments[0]!==undefined?arguments[0]:pg;var o=arguments.length>1?arguments[1]:undefined;var s=arguments.length>2?arguments[2]:undefined;var B=s.kind,Q=s.metadata;var Y=globalThis.litPropertyMetadata.get(Q);if(Y===void 0&&globalThis.litPropertyMetadata.set(Q,Y=new Map),Y.set(s.name,r),B==="accessor"){var J=s.name;return{set:function set(it){var nt=o.get.call(this);o.set.call(this,it),this.requestUpdate(J,nt,r)},init:function init(it){return it!==void 0&&this.P(J,void 0,r),it}}}if(B==="setter"){var _J3=s.name;return function(it){var nt=this[_J3];o.call(this,it),this.requestUpdate(_J3,nt,r)}}throw Error("Unsupported decorator location: "+B)};function m(r){return function(o,s){return _typeof(s)=="object"?wg(r,o,s):function(B,Q,Y){var J=Q.hasOwnProperty(Y);return Q.constructor.createProperty(Y,J?_objectSpread(_objectSpread({},B),{},{wrapped:!0}):B),J?Object.getOwnPropertyDescriptor(Q,Y):void 0}(r,o,s)}}function K(r){return m(_objectSpread(_objectSpread({},r),{},{state:!0,attribute:!1}))}var fg=function fg(r,o,s){return s.configurable=!0,s.enumerable=!0,Reflect.decorate&&_typeof(o)!="object"&&Object.defineProperty(r,o,s),s};function mg(r){return function(o,s){var _ref131=r!==null&&r!==void 0?r:{},B=_ref131.slot,Q=_ref131.selector,Y="slot"+(B?"[name=".concat(B,"]"):":not([name])");return fg(o,s,{get:function get(){var _ref132;var J;var it=(J=this.renderRoot)==null?void 0:J.querySelector(Y),nt=(_ref132=it==null?void 0:it.assignedElements(r))!==null&&_ref132!==void 0?_ref132:[];return Q===void 0?nt:nt.filter(function(ot){return ot.matches(Q)})}})}}var Nc={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},qn=function qn(r){return function(){for(var _len8=arguments.length,o=new Array(_len8),_key8=0;_key8<_len8;_key8++){o[_key8]=arguments[_key8]}return{_$litDirective$:r,values:o}}};var Qn=function(){function Qn(r){_classCallCheck(this,Qn)}_createClass(Qn,[{key:"_$AU",get:function get(){return this._$AM._$AU}},{key:"_$AT",value:function _$AT(r,o,s){this._$Ct=r,this._$AM=o,this._$Ci=s}},{key:"_$AS",value:function _$AS(r,o){return this.update(r,o)}},{key:"update",value:function update(r,o){return this.render.apply(this,_toConsumableArray(o))}}]);return Qn}();var vg=yg.I,Fy=function Fy(r,o){return o===void 0?(r==null?void 0:r._$litType$)!==void 0:(r==null?void 0:r._$litType$)===o},gg=function gg(r){var o;return((o=r==null?void 0:r._$litType$)==null?void 0:o.h)!=null},bg=function bg(r){return r.strings===void 0},zy=function zy(){return document.createComment("")},ao=function ao(r,o,s){var B;var Q=r._$AA.parentNode,Y=o===void 0?r._$AB:o._$AA;if(s===void 0){var J=Q.insertBefore(zy(),Y),it=Q.insertBefore(zy(),Y);s=new vg(J,it,r,r.options)}else{var _J4=s._$AB.nextSibling,_it7=s._$AM,nt=_it7!==r;if(nt){var ot;(B=s._$AQ)==null||B.call(s,r),s._$AM=r,s._$AP!==void 0&&(ot=r._$AU)!==_it7._$AU&&s._$AP(ot)}if(_J4!==Y||nt){var _ot5=s._$AA;for(;_ot5!==_J4;){var dt=_ot5.nextSibling;Q.insertBefore(_ot5,Y),_ot5=dt}}}return s},oo=function oo(r,o){var s=arguments.length>2&&arguments[2]!==undefined?arguments[2]:r;return r._$AI(o,s),r},_g={},Il=function Il(r){var o=arguments.length>1&&arguments[1]!==undefined?arguments[1]:_g;return r._$AH=o},oh=function oh(r){return r._$AH},Td=function Td(r){var o;(o=r._$AP)==null||o.call(r,!1,!0);var s=r._$AA;var B=r._$AB.nextSibling;for(;s!==B;){var Q=s.nextSibling;s.remove(),s=Q}},xg=function xg(r){r._$AR()},Ny=function Ny(r,o,s){var B=new Map;for(var Q=o;Q<=s;Q++)B.set(r[Q],Q);return B},Lr=qn(function(_Qn){_inherits(_class,_Qn);function _class(r){var _this178;_classCallCheck(this,_class);if(_this178=_callSuper(this,_class,[r]),r.type!==Nc.CHILD)throw Error("repeat() can only be used in text expressions");return _possibleConstructorReturn(_this178)}_createClass(_class,[{key:"dt",value:function dt(r,o,s){var B;s===void 0?s=o:o!==void 0&&(B=o);var Q=[],Y=[];var J=0;var _iterator173=_createForOfIteratorHelper(r),_step173;try{for(_iterator173.s();!(_step173=_iterator173.n()).done;){var it=_step173.value;Q[J]=B?B(it,J):J,Y[J]=s(it,J),J++}}catch(err){_iterator173.e(err)}finally{_iterator173.f()}return{values:Y,keys:Q}}},{key:"render",value:function render(r,o,s){return this.dt(r,o,s).values}},{key:"update",value:function update(r,_ref133){var _this$ut;var _ref134=_slicedToArray(_ref133,3),o=_ref134[0],s=_ref134[1],B=_ref134[2];var Q=oh(r),_this$dt=this.dt(o,s,B),Y=_this$dt.values,J=_this$dt.keys;if(!Array.isArray(Q))return this.ut=J,Y;var it=(_this$ut=this.ut)!==null&&_this$ut!==void 0?_this$ut:this.ut=[],nt=[];var ot,dt,Mt=0,Ot=Q.length-1,Qt=0,Ut=Y.length-1;for(;Mt<=Ot&&Qt<=Ut;)if(Q[Mt]===null)Mt++;else if(Q[Ot]===null)Ot--;else if(it[Mt]===J[Qt])nt[Qt]=oo(Q[Mt],Y[Qt]),Mt++,Qt++;else if(it[Ot]===J[Ut])nt[Ut]=oo(Q[Ot],Y[Ut]),Ot--,Ut--;else if(it[Mt]===J[Ut])nt[Ut]=oo(Q[Mt],Y[Ut]),ao(r,nt[Ut+1],Q[Mt]),Mt++,Ut--;else if(it[Ot]===J[Qt])nt[Qt]=oo(Q[Ot],Y[Qt]),ao(r,Q[Mt],Q[Ot]),Ot--,Qt++;else if(ot===void 0&&(ot=Ny(J,Qt,Ut),dt=Ny(it,Mt,Ot)),ot.has(it[Mt])){if(ot.has(it[Ot])){var te=dt.get(J[Qt]),qt=te!==void 0?Q[te]:null;if(qt===null){var ie=ao(r,Q[Mt]);oo(ie,Y[Qt]),nt[Qt]=ie}else nt[Qt]=oo(qt,Y[Qt]),ao(r,Q[Mt],qt),Q[te]=null;Qt++}else Td(Q[Ot]),Ot--;}else Td(Q[Mt]),Mt++;for(;Qt<=Ut;){var _te3=ao(r,nt[Ut+1]);oo(_te3,Y[Qt]),nt[Qt++]=_te3}for(;Mt<=Ot;){var _te4=Q[Mt++];_te4!==null&&Td(_te4)}return this.ut=J,Il(r,nt),Ni}}]);return _class}(Qn)),Ms=function Ms(r,o){var s;var B=r._$AN;if(B===void 0)return!1;var _iterator174=_createForOfIteratorHelper(B),_step174;try{for(_iterator174.s();!(_step174=_iterator174.n()).done;){var Q=_step174.value;(s=Q._$AO)==null||s.call(Q,o,!1),Ms(Q,o)}}catch(err){_iterator174.e(err)}finally{_iterator174.f()}return!0},Tl=function Tl(r){var o,s;do{if((o=r._$AM)===void 0)break;s=o._$AN,s["delete"](r),r=o}while((s==null?void 0:s.size)===0)},Aw=function Aw(r){for(var o;o=r._$AM;r=o){var s=o._$AN;if(s===void 0)o._$AN=s=new Set;else if(s.has(r))break;s.add(r),$g(o)}};function kg(r){this._$AN!==void 0?(Tl(this),this._$AM=r,Aw(this)):this._$AM=r}function Cg(r){var o=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1;var s=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0;var B=this._$AH,Q=this._$AN;if(Q!==void 0&&Q.size!==0)if(o){if(Array.isArray(B))for(var Y=s;Y<B.length;Y++)Ms(B[Y],!1),Tl(B[Y]);else B!=null&&(Ms(B,!1),Tl(B));}else Ms(this,r)}var $g=function $g(r){var _r$_$AP,_r$_$AQ;r.type==Nc.CHILD&&((_r$_$AP=r._$AP)!==null&&_r$_$AP!==void 0?_r$_$AP:r._$AP=Cg,(_r$_$AQ=r._$AQ)!==null&&_r$_$AQ!==void 0?_r$_$AQ:r._$AQ=kg)};var Eg=function(_Qn2){_inherits(Eg,_Qn2);function Eg(){var _this179;_classCallCheck(this,Eg);_this179=_callSuper(this,Eg,arguments),_this179._$AN=void 0;return _this179}_createClass(Eg,[{key:"_$AT",value:function _$AT(o,s,B){_get(_getPrototypeOf(Eg.prototype),"_$AT",this).call(this,o,s,B),Aw(this),this.isConnected=o._$AU}},{key:"_$AO",value:function _$AO(o){var s=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!0;var B,Q;o!==this.isConnected&&(this.isConnected=o,o?(B=this.reconnected)==null||B.call(this):(Q=this.disconnected)==null||Q.call(this)),s&&(Ms(this,o),Tl(this))}},{key:"setValue",value:function setValue(o){if(bg(this._$Ct))this._$Ct._$AI(o,this);else{var s=_toConsumableArray(this._$Ct._$AH);s[this._$Ci]=o,this._$Ct._$AI(s,this,0)}}},{key:"disconnected",value:function disconnected(){}},{key:"reconnected",value:function reconnected(){}}]);return Eg}(Qn);var Re=function Re(){return new Sg};var Sg=_createClass(function Sg(){_classCallCheck(this,Sg)});var Rd=new WeakMap,Ce=qn(function(_Eg){_inherits(_class2,_Eg);function _class2(){_classCallCheck(this,_class2);return _callSuper(this,_class2,arguments)}_createClass(_class2,[{key:"render",value:function render(r){return O}},{key:"update",value:function update(r,_ref135){var _ref136=_slicedToArray(_ref135,1),o=_ref136[0];var s;var B=o!==this.Y;return B&&this.Y!==void 0&&this.rt(void 0),(B||this.lt!==this.ct)&&(this.Y=o,this.ht=(s=r.options)==null?void 0:s.host,this.rt(this.ct=r.element)),O}},{key:"rt",value:function rt(r){if(typeof this.Y=="function"){var _this$ht;var o=(_this$ht=this.ht)!==null&&_this$ht!==void 0?_this$ht:globalThis;var s=Rd.get(o);s===void 0&&(s=new WeakMap,Rd.set(o,s)),s.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),s.set(this.Y,r),r!==void 0&&this.Y.call(this.ht,r)}else this.Y.value=r}},{key:"lt",get:function get(){var _this$ht2;var r,o;return typeof this.Y=="function"?(r=Rd.get((_this$ht2=this.ht)!==null&&_this$ht2!==void 0?_this$ht2:globalThis))==null?void 0:r.get(this.Y):(o=this.Y)==null?void 0:o.value}},{key:"disconnected",value:function disconnected(){this.lt===this.ct&&this.rt(void 0)}},{key:"reconnected",value:function reconnected(){this.rt(this.ct)}}]);return _class2}(Eg));var Vc="delete",ut=5,ti=1<<ut,mr=ti-1,De={};function ah(){return{value:!1}}function ri(r){r&&(r.value=!0)}function uu(){}function Oa(r){return r.size===void 0&&(r.size=r.__iterate(Lw)),r.size}function Dn(r,o){if(typeof o!="number"){var s=o>>>0;if(""+s!==o||s===4294967295)return NaN;o=s}return o<0?Oa(r)+o:o}function Lw(){return!0}function od(r,o,s){return(r===0&&!Ow(r)||s!==void 0&&r<=-s)&&(o===void 0||s!==void 0&&o>=s)}function Bc(r,o){return Mw(r,o,0)}function ad(r,o){return Mw(r,o,o)}function Mw(r,o,s){return r===void 0?s:Ow(r)?o===1/0?o:Math.max(0,o+r)|0:o===void 0||o===r?r:Math.min(o,r)|0}function Ow(r){return r<0||r===0&&1/r===-1/0}var Iw="@@__IMMUTABLE_ITERABLE__@@";function Mr(r){return!!(r&&r[Iw])}var Tw="@@__IMMUTABLE_KEYED__@@";function wt(r){return!!(r&&r[Tw])}var Rw="@@__IMMUTABLE_INDEXED__@@";function Sr(r){return!!(r&&r[Rw])}function sd(r){return wt(r)||Sr(r)}var It=function It(r){return Mr(r)?r:Hr(r)},hi=function(r){function o(s){return wt(s)?s:Kn(s)}return r&&(o.__proto__=r),o.prototype=Object.create(r&&r.prototype),o.prototype.constructor=o,o}(It),qo=function(r){function o(s){return Sr(s)?s:Ai(s)}return r&&(o.__proto__=r),o.prototype=Object.create(r&&r.prototype),o.prototype.constructor=o,o}(It),Ya=function(r){function o(s){return Mr(s)&&!sd(s)?s:ts(s)}return r&&(o.__proto__=r),o.prototype=Object.create(r&&r.prototype),o.prototype.constructor=o,o}(It);It.Keyed=hi;It.Indexed=qo;It.Set=Ya;var Dw="@@__IMMUTABLE_SEQ__@@";function yu(r){return!!(r&&r[Dw])}var Fw="@@__IMMUTABLE_RECORD__@@";function Xa(r){return!!(r&&r[Fw])}function Wi(r){return Mr(r)||Xa(r)}var Ja="@@__IMMUTABLE_ORDERED__@@";function ki(r){return!!(r&&r[Ja])}var Hc=0,Ci=1,ni=2,sh=typeof Symbol=="function"&&Symbol.iterator,zw="@@iterator",cd=sh||zw,Ue=function Ue(r){this.next=r};Ue.prototype.toString=function(){return"[Iterator]"};Ue.KEYS=Hc;Ue.VALUES=Ci;Ue.ENTRIES=ni;Ue.prototype.inspect=Ue.prototype.toSource=function(){return this.toString()};Ue.prototype[cd]=function(){return this};function ft(r,o,s,B){var Q=r===0?o:r===1?s:[o,s];return B?B.value=Q:B={value:Q,done:!1},B}function Or(){return{value:void 0,done:!0}}function Nw(r){return Array.isArray(r)?!0:!!ld(r)}function Vy(r){return r&&typeof r.next=="function"}function ch(r){var o=ld(r);return o&&o.call(r)}function ld(r){var o=r&&(sh&&r[sh]||r[zw]);if(typeof o=="function")return o}function Pg(r){var o=ld(r);return o&&o===r.entries}function Ag(r){var o=ld(r);return o&&o===r.keys}var es=Object.prototype.hasOwnProperty;function Vw(r){return Array.isArray(r)||typeof r=="string"?!0:r&&_typeof(r)=="object"&&Number.isInteger(r.length)&&r.length>=0&&(r.length===0?Object.keys(r).length===1:r.hasOwnProperty(r.length-1))}var Hr=function(r){function o(s){return s==null?wu():Wi(s)?s.toSeq():Mg(s)}return r&&(o.__proto__=r),o.prototype=Object.create(r&&r.prototype),o.prototype.constructor=o,o.prototype.toSeq=function(){return this},o.prototype.toString=function(){return this.__toString("Seq {","}")},o.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},o.prototype.__iterate=function(s,B){var Q=this._cache;if(Q){for(var Y=Q.length,J=0;J!==Y;){var it=Q[B?Y-++J:J++];if(s(it[1],it[0],this)===!1)break}return J}return this.__iterateUncached(s,B)},o.prototype.__iterator=function(s,B){var Q=this._cache;if(Q){var Y=Q.length,J=0;return new Ue(function(){if(J===Y)return Or();var it=Q[B?Y-++J:J++];return ft(s,it[0],it[1])})}return this.__iteratorUncached(s,B)},o}(It),Kn=function(r){function o(s){return s==null?wu().toKeyedSeq():Mr(s)?wt(s)?s.toSeq():s.fromEntrySeq():Xa(s)?s.toSeq():fu(s)}return r&&(o.__proto__=r),o.prototype=Object.create(r&&r.prototype),o.prototype.constructor=o,o.prototype.toKeyedSeq=function(){return this},o}(Hr),Ai=function(r){function o(s){return s==null?wu():Mr(s)?wt(s)?s.entrySeq():s.toIndexedSeq():Xa(s)?s.toSeq().entrySeq():Bw(s)}return r&&(o.__proto__=r),o.prototype=Object.create(r&&r.prototype),o.prototype.constructor=o,o.of=function(){return o(arguments)},o.prototype.toIndexedSeq=function(){return this},o.prototype.toString=function(){return this.__toString("Seq [","]")},o}(Hr),ts=function(r){function o(s){return(Mr(s)&&!sd(s)?s:Ai(s)).toSetSeq()}return r&&(o.__proto__=r),o.prototype=Object.create(r&&r.prototype),o.prototype.constructor=o,o.of=function(){return o(arguments)},o.prototype.toSetSeq=function(){return this},o}(Hr);Hr.isSeq=yu;Hr.Keyed=Kn;Hr.Set=ts;Hr.Indexed=Ai;Hr.prototype[Dw]=!0;var To=function(r){function o(s){this._array=s,this.size=s.length}return r&&(o.__proto__=r),o.prototype=Object.create(r&&r.prototype),o.prototype.constructor=o,o.prototype.get=function(s,B){return this.has(s)?this._array[Dn(this,s)]:B},o.prototype.__iterate=function(s,B){for(var Q=this._array,Y=Q.length,J=0;J!==Y;){var it=B?Y-++J:J++;if(s(Q[it],it,this)===!1)break}return J},o.prototype.__iterator=function(s,B){var Q=this._array,Y=Q.length,J=0;return new Ue(function(){if(J===Y)return Or();var it=B?Y-++J:J++;return ft(s,it,Q[it])})},o}(Ai),pu=function(r){function o(s){var B=Object.keys(s).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(s):[]);this._object=s,this._keys=B,this.size=B.length}return r&&(o.__proto__=r),o.prototype=Object.create(r&&r.prototype),o.prototype.constructor=o,o.prototype.get=function(s,B){return B!==void 0&&!this.has(s)?B:this._object[s]},o.prototype.has=function(s){return es.call(this._object,s)},o.prototype.__iterate=function(s,B){for(var Q=this._object,Y=this._keys,J=Y.length,it=0;it!==J;){var nt=Y[B?J-++it:it++];if(s(Q[nt],nt,this)===!1)break}return it},o.prototype.__iterator=function(s,B){var Q=this._object,Y=this._keys,J=Y.length,it=0;return new Ue(function(){if(it===J)return Or();var nt=Y[B?J-++it:it++];return ft(s,nt,Q[nt])})},o}(Kn);pu.prototype[Ja]=!0;var Lg=function(r){function o(s){this._collection=s,this.size=s.length||s.size}return r&&(o.__proto__=r),o.prototype=Object.create(r&&r.prototype),o.prototype.constructor=o,o.prototype.__iterateUncached=function(s,B){if(B)return this.cacheResult().__iterate(s,B);var Q=this._collection,Y=ch(Q),J=0;if(Vy(Y))for(var it;!(it=Y.next()).done&&s(it.value,J++,this)!==!1;);return J},o.prototype.__iteratorUncached=function(s,B){if(B)return this.cacheResult().__iterator(s,B);var Q=this._collection,Y=ch(Q);if(!Vy(Y))return new Ue(Or);var J=0;return new Ue(function(){var it=Y.next();return it.done?it:ft(s,J++,it.value)})},o}(Ai),By;function wu(){return By||(By=new To([]))}function fu(r){var o=mu(r);if(o)return o.fromEntrySeq();if(_typeof(r)=="object")return new pu(r);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+r)}function Bw(r){var o=mu(r);if(o)return o;throw new TypeError("Expected Array or collection object of values: "+r)}function Mg(r){var o=mu(r);if(o)return Pg(r)?o.fromEntrySeq():Ag(r)?o.toSetSeq():o;if(_typeof(r)=="object")return new pu(r);throw new TypeError("Expected Array or collection object of values, or keyed object: "+r)}function mu(r){return Vw(r)?new To(r):Nw(r)?new Lg(r):void 0}var Hw="@@__IMMUTABLE_MAP__@@";function vu(r){return!!(r&&r[Hw])}function jw(r){return vu(r)&&ki(r)}function Hy(r){return!!(r&&typeof r.equals=="function"&&typeof r.hashCode=="function")}function vr(r,o){if(r===o||r!==r&&o!==o)return!0;if(!r||!o)return!1;if(typeof r.valueOf=="function"&&typeof o.valueOf=="function"){if(r=r.valueOf(),o=o.valueOf(),r===o||r!==r&&o!==o)return!0;if(!r||!o)return!1}return!!(Hy(r)&&Hy(o)&&r.equals(o))}var ms=typeof Math.imul=="function"&&Math.imul(4294967295,2)===-2?Math.imul:function(r,o){r|=0,o|=0;var s=r&65535,B=o&65535;return s*B+((r>>>16)*B+s*(o>>>16)<<16>>>0)|0};function dd(r){return r>>>1&1073741824|r&3221225471}var Og=Object.prototype.valueOf;function Nr(r){if(r==null)return jy(r);if(typeof r.hashCode=="function")return dd(r.hashCode(r));var o=zg(r);if(o==null)return jy(o);switch(_typeof(o)){case"boolean":return o?1108378657:1108378656;case"number":return Ig(o);case"string":return o.length>Ng?Tg(o):lh(o);case"object":case"function":return Dg(o);case"symbol":return Rg(o);default:if(typeof o.toString=="function")return lh(o.toString());throw new Error("Value type "+_typeof(o)+" cannot be hashed.")}}function jy(r){return r===null?1108378658:(1108378659)}function Ig(r){if(r!==r||r===1/0)return 0;var o=r|0;for(o!==r&&(o^=r*4294967295);r>4294967295;)r/=4294967295,o^=r;return dd(o)}function Tg(r){var o=zd[r];return o===void 0&&(o=lh(r),Fd===Vg&&(Fd=0,zd={}),Fd++,zd[r]=o),o}function lh(r){for(var o=0,s=0;s<r.length;s++)o=31*o+r.charCodeAt(s)|0;return dd(o)}function Rg(r){var o=qy[r];return o!==void 0||(o=Uw(),qy[r]=o),o}function Dg(r){var o;if(dh&&(o=hh.get(r),o!==void 0)||(o=r[so],o!==void 0)||!Wy&&(o=r.propertyIsEnumerable&&r.propertyIsEnumerable[so],o!==void 0||(o=Fg(r),o!==void 0)))return o;if(o=Uw(),dh)hh.set(r,o);else{if(Uy!==void 0&&Uy(r)===!1)throw new Error("Non-extensible objects are not allowed as keys.");if(Wy)Object.defineProperty(r,so,{enumerable:!1,configurable:!1,writable:!1,value:o});else if(r.propertyIsEnumerable!==void 0&&r.propertyIsEnumerable===r.constructor.prototype.propertyIsEnumerable)r.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},r.propertyIsEnumerable[so]=o;else if(r.nodeType!==void 0)r[so]=o;else throw new Error("Unable to set a non-enumerable property on object.")}return o}var Uy=Object.isExtensible,Wy=function(){try{return Object.defineProperty({},"@",{}),!0}catch(_unused15){return!1}}();function Fg(r){if(r&&r.nodeType>0)switch(r.nodeType){case 1:return r.uniqueID;case 9:return r.documentElement&&r.documentElement.uniqueID}}function zg(r){return r.valueOf!==Og&&typeof r.valueOf=="function"?r.valueOf(r):r}function Uw(){var r=++Dd;return Dd&1073741824&&(Dd=0),r}var dh=typeof WeakMap=="function",hh;dh&&(hh=new WeakMap);var qy=Object.create(null),Dd=0,so="__immutablehash__";typeof Symbol=="function"&&(so=Symbol(so));var Ng=16,Vg=255,Fd=0,zd={},hd=function(r){function o(s,B){this._iter=s,this._useKeys=B,this.size=s.size}return r&&(o.__proto__=r),o.prototype=Object.create(r&&r.prototype),o.prototype.constructor=o,o.prototype.get=function(s,B){return this._iter.get(s,B)},o.prototype.has=function(s){return this._iter.has(s)},o.prototype.valueSeq=function(){return this._iter.valueSeq()},o.prototype.reverse=function(){var s=this,B=gu(this,!0);return this._useKeys||(B.valueSeq=function(){return s._iter.toSeq().reverse()}),B},o.prototype.map=function(s,B){var Q=this,Y=Zw(this,s,B);return this._useKeys||(Y.valueSeq=function(){return Q._iter.toSeq().map(s,B)}),Y},o.prototype.__iterate=function(s,B){var Q=this;return this._iter.__iterate(function(Y,J){return s(Y,J,Q)},B)},o.prototype.__iterator=function(s,B){return this._iter.__iterator(s,B)},o}(Kn);hd.prototype[Ja]=!0;var Ww=function(r){function o(s){this._iter=s,this.size=s.size}return r&&(o.__proto__=r),o.prototype=Object.create(r&&r.prototype),o.prototype.constructor=o,o.prototype.includes=function(s){return this._iter.includes(s)},o.prototype.__iterate=function(s,B){var Q=this,Y=0;return B&&Oa(this),this._iter.__iterate(function(J){return s(J,B?Q.size-++Y:Y++,Q)},B)},o.prototype.__iterator=function(s,B){var Q=this,Y=this._iter.__iterator(Ci,B),J=0;return B&&Oa(this),new Ue(function(){var it=Y.next();return it.done?it:ft(s,B?Q.size-++J:J++,it.value,it)})},o}(Ai),qw=function(r){function o(s){this._iter=s,this.size=s.size}return r&&(o.__proto__=r),o.prototype=Object.create(r&&r.prototype),o.prototype.constructor=o,o.prototype.has=function(s){return this._iter.includes(s)},o.prototype.__iterate=function(s,B){var Q=this;return this._iter.__iterate(function(Y){return s(Y,Y,Q)},B)},o.prototype.__iterator=function(s,B){var Q=this._iter.__iterator(Ci,B);return new Ue(function(){var Y=Q.next();return Y.done?Y:ft(s,Y.value,Y.value,Y)})},o}(ts),Qw=function(r){function o(s){this._iter=s,this.size=s.size}return r&&(o.__proto__=r),o.prototype=Object.create(r&&r.prototype),o.prototype.constructor=o,o.prototype.entrySeq=function(){return this._iter.toSeq()},o.prototype.__iterate=function(s,B){var Q=this;return this._iter.__iterate(function(Y){if(Y){Ky(Y);var J=Mr(Y);return s(J?Y.get(1):Y[1],J?Y.get(0):Y[0],Q)}},B)},o.prototype.__iterator=function(s,B){var Q=this._iter.__iterator(Ci,B);return new Ue(function(){for(;;){var Y=Q.next();if(Y.done)return Y;var J=Y.value;if(J){Ky(J);var it=Mr(J);return ft(s,it?J.get(0):J[0],it?J.get(1):J[1],Y)}}})},o}(Kn);Ww.prototype.cacheResult=hd.prototype.cacheResult=qw.prototype.cacheResult=Qw.prototype.cacheResult=xu;function Kw(r){var o=qi(r);return o._iter=r,o.size=r.size,o.flip=function(){return r},o.reverse=function(){var s=r.reverse.apply(this);return s.flip=function(){return r.reverse()},s},o.has=function(s){return r.includes(s)},o.includes=function(s){return r.has(s)},o.cacheResult=xu,o.__iterateUncached=function(s,B){var Q=this;return r.__iterate(function(Y,J){return s(J,Y,Q)!==!1},B)},o.__iteratorUncached=function(s,B){if(s===ni){var Q=r.__iterator(s,B);return new Ue(function(){var Y=Q.next();if(!Y.done){var J=Y.value[0];Y.value[0]=Y.value[1],Y.value[1]=J}return Y})}return r.__iterator(s===Ci?Hc:Ci,B)},o}function Zw(r,o,s){var B=qi(r);return B.size=r.size,B.has=function(Q){return r.has(Q)},B.get=function(Q,Y){var J=r.get(Q,De);return J===De?Y:o.call(s,J,Q,r)},B.__iterateUncached=function(Q,Y){var J=this;return r.__iterate(function(it,nt,ot){return Q(o.call(s,it,nt,ot),nt,J)!==!1},Y)},B.__iteratorUncached=function(Q,Y){var J=r.__iterator(ni,Y);return new Ue(function(){var it=J.next();if(it.done)return it;var nt=it.value,ot=nt[0];return ft(Q,ot,o.call(s,nt[1],ot,r),it)})},B}function gu(r,o){var s=this,B=qi(r);return B._iter=r,B.size=r.size,B.reverse=function(){return r},r.flip&&(B.flip=function(){var Q=Kw(r);return Q.reverse=function(){return r.flip()},Q}),B.get=function(Q,Y){return r.get(o?Q:-1-Q,Y)},B.has=function(Q){return r.has(o?Q:-1-Q)},B.includes=function(Q){return r.includes(Q)},B.cacheResult=xu,B.__iterate=function(Q,Y){var J=this,it=0;return Y&&Oa(r),r.__iterate(function(nt,ot){return Q(nt,o?ot:Y?J.size-++it:it++,J)},!Y)},B.__iterator=function(Q,Y){var J=0;Y&&Oa(r);var it=r.__iterator(ni,!Y);return new Ue(function(){var nt=it.next();if(nt.done)return nt;var ot=nt.value;return ft(Q,o?ot[0]:Y?s.size-++J:J++,ot[1],nt)})},B}function Gw(r,o,s,B){var Q=qi(r);return B&&(Q.has=function(Y){var J=r.get(Y,De);return J!==De&&!!o.call(s,J,Y,r)},Q.get=function(Y,J){var it=r.get(Y,De);return it!==De&&o.call(s,it,Y,r)?it:J}),Q.__iterateUncached=function(Y,J){var it=this,nt=0;return r.__iterate(function(ot,dt,Mt){if(o.call(s,ot,dt,Mt))return nt++,Y(ot,B?dt:nt-1,it)},J),nt},Q.__iteratorUncached=function(Y,J){var it=r.__iterator(ni,J),nt=0;return new Ue(function(){for(;;){var ot=it.next();if(ot.done)return ot;var dt=ot.value,Mt=dt[0],Ot=dt[1];if(o.call(s,Ot,Mt,r))return ft(Y,B?Mt:nt++,Ot,ot)}})},Q}function Bg(r,o,s){var B=Vi().asMutable();return r.__iterate(function(Q,Y){B.update(o.call(s,Q,Y,r),0,function(J){return J+1})}),B.asImmutable()}function Hg(r,o,s){var B=wt(r),Q=(ki(r)?on():Vi()).asMutable();r.__iterate(function(J,it){Q.update(o.call(s,J,it,r),function(nt){return nt=nt||[],nt.push(B?[it,J]:J),nt})});var Y=_u(r);return Q.map(function(J){return Je(r,Y(J))}).asImmutable()}function jg(r,o,s){var B=wt(r),Q=[[],[]];r.__iterate(function(J,it){Q[o.call(s,J,it,r)?1:0].push(B?[it,J]:J)});var Y=_u(r);return Q.map(function(J){return Je(r,Y(J))})}function bu(r,o,s,B){var Q=r.size;if(od(o,s,Q))return r;var Y=Bc(o,Q),J=ad(s,Q);if(Y!==Y||J!==J)return bu(r.toSeq().cacheResult(),o,s,B);var it=J-Y,nt;it===it&&(nt=it<0?0:it);var ot=qi(r);return ot.size=nt===0?nt:r.size&&nt||void 0,!B&&yu(r)&&nt>=0&&(ot.get=function(dt,Mt){return dt=Dn(this,dt),dt>=0&&dt<nt?r.get(dt+Y,Mt):Mt}),ot.__iterateUncached=function(dt,Mt){var Ot=this;if(nt===0)return 0;if(Mt)return this.cacheResult().__iterate(dt,Mt);var Qt=0,Ut=!0,te=0;return r.__iterate(function(qt,ie){if(!(Ut&&(Ut=Qt++<Y)))return te++,dt(qt,B?ie:te-1,Ot)!==!1&&te!==nt}),te},ot.__iteratorUncached=function(dt,Mt){if(nt!==0&&Mt)return this.cacheResult().__iterator(dt,Mt);if(nt===0)return new Ue(Or);var Ot=r.__iterator(dt,Mt),Qt=0,Ut=0;return new Ue(function(){for(;Qt++<Y;)Ot.next();if(++Ut>nt)return Or();var te=Ot.next();return B||dt===Ci||te.done?te:dt===Hc?ft(dt,Ut-1,void 0,te):ft(dt,Ut-1,te.value[1],te)})},ot}function Ug(r,o,s){var B=qi(r);return B.__iterateUncached=function(Q,Y){var J=this;if(Y)return this.cacheResult().__iterate(Q,Y);var it=0;return r.__iterate(function(nt,ot,dt){return o.call(s,nt,ot,dt)&&++it&&Q(nt,ot,J)}),it},B.__iteratorUncached=function(Q,Y){var J=this;if(Y)return this.cacheResult().__iterator(Q,Y);var it=r.__iterator(ni,Y),nt=!0;return new Ue(function(){if(!nt)return Or();var ot=it.next();if(ot.done)return ot;var dt=ot.value,Mt=dt[0],Ot=dt[1];return o.call(s,Ot,Mt,J)?Q===ni?ot:ft(Q,Mt,Ot,ot):(nt=!1,Or())})},B}function Yw(r,o,s,B){var Q=qi(r);return Q.__iterateUncached=function(Y,J){var it=this;if(J)return this.cacheResult().__iterate(Y,J);var nt=!0,ot=0;return r.__iterate(function(dt,Mt,Ot){if(!(nt&&(nt=o.call(s,dt,Mt,Ot))))return ot++,Y(dt,B?Mt:ot-1,it)}),ot},Q.__iteratorUncached=function(Y,J){var it=this;if(J)return this.cacheResult().__iterator(Y,J);var nt=r.__iterator(ni,J),ot=!0,dt=0;return new Ue(function(){var Mt,Ot,Qt;do{if(Mt=nt.next(),Mt.done)return B||Y===Ci?Mt:Y===Hc?ft(Y,dt++,void 0,Mt):ft(Y,dt++,Mt.value[1],Mt);var Ut=Mt.value;Ot=Ut[0],Qt=Ut[1],ot&&(ot=o.call(s,Qt,Ot,it))}while(ot);return Y===ni?Mt:ft(Y,Ot,Qt,Mt)})},Q}function Wg(r,o){var s=wt(r),B=[r].concat(o).map(function(J){return Mr(J)?s&&(J=hi(J)):J=s?fu(J):Bw(Array.isArray(J)?J:[J]),J}).filter(function(J){return J.size!==0});if(B.length===0)return r;if(B.length===1){var Q=B[0];if(Q===r||s&&wt(Q)||Sr(r)&&Sr(Q))return Q}var Y=new To(B);return s?Y=Y.toKeyedSeq():Sr(r)||(Y=Y.toSetSeq()),Y=Y.flatten(!0),Y.size=B.reduce(function(J,it){if(J!==void 0){var nt=it.size;if(nt!==void 0)return J+nt}},0),Y}function Xw(r,o,s){var B=qi(r);return B.__iterateUncached=function(Q,Y){if(Y)return this.cacheResult().__iterate(Q,Y);var J=0,it=!1;function nt(ot,dt){ot.__iterate(function(Mt,Ot){return(!o||dt<o)&&Mr(Mt)?nt(Mt,dt+1):(J++,Q(Mt,s?Ot:J-1,B)===!1&&(it=!0)),!it},Y)}return nt(r,0),J},B.__iteratorUncached=function(Q,Y){if(Y)return this.cacheResult().__iterator(Q,Y);var J=r.__iterator(Q,Y),it=[],nt=0;return new Ue(function(){for(;J;){var ot=J.next();if(ot.done!==!1){J=it.pop();continue}var dt=ot.value;if(Q===ni&&(dt=dt[1]),(!o||it.length<o)&&Mr(dt))it.push(J),J=dt.__iterator(Q,Y);else return s?ot:ft(Q,nt++,dt,ot)}return Or()})},B}function qg(r,o,s){var B=_u(r);return r.toSeq().map(function(Q,Y){return B(o.call(s,Q,Y,r))}).flatten(!0)}function Qg(r,o){var s=qi(r);return s.size=r.size&&r.size*2-1,s.__iterateUncached=function(B,Q){var Y=this,J=0;return r.__iterate(function(it){return(!J||B(o,J++,Y)!==!1)&&B(it,J++,Y)!==!1},Q),J},s.__iteratorUncached=function(B,Q){var Y=r.__iterator(Ci,Q),J=0,it;return new Ue(function(){return(!it||J%2)&&(it=Y.next(),it.done)?it:J%2?ft(B,J++,o):ft(B,J++,it.value,it)})},s}function Ia(r,o,s){o||(o=Jw);var B=wt(r),Q=0,Y=r.toSeq().map(function(J,it){return[it,J,Q++,s?s(J,it,r):J]}).valueSeq().toArray();return Y.sort(function(J,it){return o(J[3],it[3])||J[2]-it[2]}).forEach(B?function(J,it){Y[it].length=2}:function(J,it){Y[it]=J[1]}),B?Kn(Y):Sr(r)?Ai(Y):ts(Y)}function sl(r,o,s){if(o||(o=Jw),s){var B=r.toSeq().map(function(Q,Y){return[Q,s(Q,Y,r)]}).reduce(function(Q,Y){return Qy(o,Q[1],Y[1])?Y:Q});return B&&B[0]}return r.reduce(function(Q,Y){return Qy(o,Q,Y)?Y:Q})}function Qy(r,o,s){var B=r(s,o);return B===0&&s!==o&&(s==null||s!==s)||B>0}function cl(r,o,s,B){var Q=qi(r),Y=new To(s).map(function(J){return J.size});return Q.size=B?Y.max():Y.min(),Q.__iterate=function(J,it){for(var nt=this.__iterator(Ci,it),ot,dt=0;!(ot=nt.next()).done&&J(ot.value,dt++,this)!==!1;);return dt},Q.__iteratorUncached=function(J,it){var nt=s.map(function(Mt){return Mt=It(Mt),ch(it?Mt.reverse():Mt)}),ot=0,dt=!1;return new Ue(function(){var Mt;return dt||(Mt=nt.map(function(Ot){return Ot.next()}),dt=B?Mt.every(function(Ot){return Ot.done}):Mt.some(function(Ot){return Ot.done})),dt?Or():ft(J,ot++,o.apply(null,Mt.map(function(Ot){return Ot.value})))})},Q}function Je(r,o){return r===o?r:yu(r)?o:r.constructor(o)}function Ky(r){if(r!==Object(r))throw new TypeError("Expected [K, V] tuple: "+r)}function _u(r){return wt(r)?hi:Sr(r)?qo:Ya}function qi(r){return Object.create((wt(r)?Kn:Sr(r)?Ai:ts).prototype)}function xu(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):Hr.prototype.cacheResult.call(this)}function Jw(r,o){return r===void 0&&o===void 0?0:r===void 0?1:o===void 0?-1:r>o?1:r<o?-1:0}function Di(r,o){o=o||0;for(var s=Math.max(0,r.length-o),B=new Array(s),Q=0;Q<s;Q++)B[Q]=r[Q+o];return B}function ku(r,o){if(!r)throw new Error(o)}function Vr(r){ku(r!==1/0,"Cannot perform this action with an infinite size.")}function ef(r){if(Vw(r)&&typeof r!="string")return r;if(ki(r))return r.toArray();throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: "+r)}var Kg=Object.prototype.toString;function Zg(r){if(!r||_typeof(r)!="object"||Kg.call(r)!=="[object Object]")return!1;var o=Object.getPrototypeOf(r);if(o===null)return!0;for(var s=o,B=Object.getPrototypeOf(o);B!==null;)s=B,B=Object.getPrototypeOf(s);return s===o}function Fn(r){return _typeof(r)=="object"&&(Wi(r)||Array.isArray(r)||Zg(r))}function Us(r){try{return typeof r=="string"?JSON.stringify(r):String(r)}catch(_unused16){return JSON.stringify(r)}}function Gg(r,o){return Wi(r)?r.has(o):Fn(r)&&es.call(r,o)}function tf(r,o,s){return Wi(r)?r.get(o,s):Gg(r,o)?typeof r.get=="function"?r.get(o):r[o]:s}function Rl(r){if(Array.isArray(r))return Di(r);var o={};for(var s in r)es.call(r,s)&&(o[s]=r[s]);return o}function Yg(r,o){if(!Fn(r))throw new TypeError("Cannot update non-data-structure value: "+r);if(Wi(r)){if(!r.remove)throw new TypeError("Cannot update immutable value without .remove() method: "+r);return r.remove(o)}if(!es.call(r,o))return r;var s=Rl(r);return Array.isArray(s)?s.splice(o,1):delete s[o],s}function Xg(r,o,s){if(!Fn(r))throw new TypeError("Cannot update non-data-structure value: "+r);if(Wi(r)){if(!r.set)throw new TypeError("Cannot update immutable value without .set() method: "+r);return r.set(o,s)}if(es.call(r,o)&&s===r[o])return r;var B=Rl(r);return B[o]=s,B}function rs(r,o,s,B){B||(B=s,s=void 0);var Q=rf(Wi(r),r,ef(o),0,s,B);return Q===De?s:Q}function rf(r,o,s,B,Q,Y){var J=o===De;if(B===s.length){var it=J?Q:o,nt=Y(it);return nt===it?o:nt}if(!J&&!Fn(o))throw new TypeError("Cannot update within non-data-structure value in path ["+s.slice(0,B).map(Us)+"]: "+o);var ot=s[B],dt=J?De:tf(o,ot,De),Mt=rf(dt===De?r:Wi(dt),dt,s,B+1,Q,Y);return Mt===dt?o:Mt===De?Yg(o,ot):Xg(J?r?bi():{}:o,ot,Mt)}function Jg(r,o,s){return rs(r,o,De,function(){return s})}function Cu(r,o){return Jg(this,r,o)}function eb(r,o){return rs(r,o,function(){return De})}function $u(r){return eb(this,r)}function nf(r,o,s,B){return rs(r,[o],s,B)}function Eu(r,o,s){return arguments.length===1?r(this):nf(this,r,o,s)}function Su(r,o,s){return rs(this,r,o,s)}function of(){for(var r=[],o=arguments.length;o--;)r[o]=arguments[o];return sf(this,r)}function af(r){for(var o=[],s=arguments.length-1;s-->0;)o[s]=arguments[s+1];if(typeof r!="function")throw new TypeError("Invalid merger function: "+r);return sf(this,o,r)}function sf(r,o,s){for(var B=[],Q=0;Q<o.length;Q++){var Y=hi(o[Q]);Y.size!==0&&B.push(Y)}return B.length===0?r:r.toSeq().size===0&&!r.__ownerID&&B.length===1?r.constructor(B[0]):r.withMutations(function(J){for(var it=s?function(ot,dt){nf(J,dt,De,function(Mt){return Mt===De?ot:s(Mt,ot,dt)})}:function(ot,dt){J.set(dt,ot)},nt=0;nt<B.length;nt++)B[nt].forEach(it)})}function Pu(r,o,s){return Au(r,o,tb(s))}function Au(r,o,s){if(!Fn(r))throw new TypeError("Cannot merge into non-data-structure value: "+r);if(Wi(r))return typeof s=="function"&&r.mergeWith?r.mergeWith.apply(r,[s].concat(o)):r.merge?r.merge.apply(r,o):r.concat.apply(r,o);for(var B=Array.isArray(r),Q=r,Y=B?qo:hi,J=B?function(nt){Q===r&&(Q=Rl(Q)),Q.push(nt)}:function(nt,ot){var dt=es.call(Q,ot),Mt=dt&&s?s(Q[ot],nt,ot):nt;(!dt||Mt!==Q[ot])&&(Q===r&&(Q=Rl(Q)),Q[ot]=Mt)},it=0;it<o.length;it++)Y(o[it]).forEach(J);return Q}function tb(r){function o(s,B,Q){return Fn(s)&&Fn(B)&&rb(s,B)?Au(s,[B],o):r?r(s,B,Q):B}return o}function rb(r,o){var s=Hr(r),B=Hr(o);return Sr(s)===Sr(B)&&wt(s)===wt(B)}function cf(){for(var r=[],o=arguments.length;o--;)r[o]=arguments[o];return Pu(this,r)}function lf(r){for(var o=[],s=arguments.length-1;s-->0;)o[s]=arguments[s+1];return Pu(this,o,r)}function Lu(r){for(var o=[],s=arguments.length-1;s-->0;)o[s]=arguments[s+1];return rs(this,r,bi(),function(B){return Au(B,o)})}function Mu(r){for(var o=[],s=arguments.length-1;s-->0;)o[s]=arguments[s+1];return rs(this,r,bi(),function(B){return Pu(B,o)})}function jc(r){var o=this.asMutable();return r(o),o.wasAltered()?o.__ensureOwner(this.__ownerID):this}function Uc(){return this.__ownerID?this:this.__ensureOwner(new uu)}function Wc(){return this.__ensureOwner()}function Ou(){return this.__altered}var Vi=function(r){function o(s){return s==null?bi():vu(s)&&!ki(s)?s:bi().withMutations(function(B){var Q=r(s);Vr(Q.size),Q.forEach(function(Y,J){return B.set(J,Y)})})}return r&&(o.__proto__=r),o.prototype=Object.create(r&&r.prototype),o.prototype.constructor=o,o.of=function(){for(var s=[],B=arguments.length;B--;)s[B]=arguments[B];return bi().withMutations(function(Q){for(var Y=0;Y<s.length;Y+=2){if(Y+1>=s.length)throw new Error("Missing value for key: "+s[Y]);Q.set(s[Y],s[Y+1])}})},o.prototype.toString=function(){return this.__toString("Map {","}")},o.prototype.get=function(s,B){return this._root?this._root.get(0,void 0,s,B):B},o.prototype.set=function(s,B){return Yy(this,s,B)},o.prototype.remove=function(s){return Yy(this,s,De)},o.prototype.deleteAll=function(s){var B=It(s);return B.size===0?this:this.withMutations(function(Q){B.forEach(function(Y){return Q.remove(Y)})})},o.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):bi()},o.prototype.sort=function(s){return on(Ia(this,s))},o.prototype.sortBy=function(s,B){return on(Ia(this,B,s))},o.prototype.map=function(s,B){var Q=this;return this.withMutations(function(Y){Y.forEach(function(J,it){Y.set(it,s.call(B,J,it,Q))})})},o.prototype.__iterator=function(s,B){return new ib(this,s,B)},o.prototype.__iterate=function(s,B){var Q=this,Y=0;return this._root&&this._root.iterate(function(J){return Y++,s(J[1],J[0],Q)},B),Y},o.prototype.__ensureOwner=function(s){return s===this.__ownerID?this:s?Iu(this.size,this._root,s,this.__hash):this.size===0?bi():(this.__ownerID=s,this.__altered=!1,this)},o}(hi);Vi.isMap=vu;var yt=Vi.prototype;yt[Hw]=!0;yt[Vc]=yt.remove;yt.removeAll=yt.deleteAll;yt.setIn=Cu;yt.removeIn=yt.deleteIn=$u;yt.update=Eu;yt.updateIn=Su;yt.merge=yt.concat=of;yt.mergeWith=af;yt.mergeDeep=cf;yt.mergeDeepWith=lf;yt.mergeIn=Lu;yt.mergeDeepIn=Mu;yt.withMutations=jc;yt.wasAltered=Ou;yt.asImmutable=Wc;yt["@@transducer/init"]=yt.asMutable=Uc;yt["@@transducer/step"]=function(r,o){return r.set(o[0],o[1])};yt["@@transducer/result"]=function(r){return r.asImmutable()};var Ws=function Ws(r,o){this.ownerID=r,this.entries=o};Ws.prototype.get=function(r,o,s,B){for(var Q=this.entries,Y=0,J=Q.length;Y<J;Y++)if(vr(s,Q[Y][0]))return Q[Y][1];return B};Ws.prototype.update=function(r,o,s,B,Q,Y,J){for(var it=Q===De,nt=this.entries,ot=0,dt=nt.length;ot<dt&&!vr(B,nt[ot][0]);ot++);var Mt=ot<dt;if(Mt?nt[ot][1]===Q:it)return this;if(ri(J),(it||!Mt)&&ri(Y),!(it&&nt.length===1)){if(!Mt&&!it&&nt.length>=lb)return nb(r,nt,B,Q);var Ot=r&&r===this.ownerID,Qt=Ot?nt:Di(nt);return Mt?it?ot===dt-1?Qt.pop():Qt[ot]=Qt.pop():Qt[ot]=[B,Q]:Qt.push([B,Q]),Ot?(this.entries=Qt,this):new Ws(r,Qt)}};var Ta=function Ta(r,o,s){this.ownerID=r,this.bitmap=o,this.nodes=s};Ta.prototype.get=function(r,o,s,B){o===void 0&&(o=Nr(s));var Q=1<<((r===0?o:o>>>r)&mr),Y=this.bitmap;return Y&Q?this.nodes[df(Y&Q-1)].get(r+ut,o,s,B):B};Ta.prototype.update=function(r,o,s,B,Q,Y,J){s===void 0&&(s=Nr(B));var it=(o===0?s:s>>>o)&mr,nt=1<<it,ot=this.bitmap,dt=(ot&nt)!==0;if(!dt&&Q===De)return this;var Mt=df(ot&nt-1),Ot=this.nodes,Qt=dt?Ot[Mt]:void 0,Ut=Tu(Qt,r,o+ut,s,B,Q,Y,J);if(Ut===Qt)return this;if(!dt&&Ut&&Ot.length>=db)return ab(r,Ot,ot,it,Ut);if(dt&&!Ut&&Ot.length===2&&Xy(Ot[Mt^1]))return Ot[Mt^1];if(dt&&Ut&&Ot.length===1&&Xy(Ut))return Ut;var te=r&&r===this.ownerID,qt=dt?Ut?ot:ot^nt:ot|nt,ie=dt?Ut?hf(Ot,Mt,Ut,te):cb(Ot,Mt,te):sb(Ot,Mt,Ut,te);return te?(this.bitmap=qt,this.nodes=ie,this):new Ta(r,qt,ie)};var qs=function qs(r,o,s){this.ownerID=r,this.count=o,this.nodes=s};qs.prototype.get=function(r,o,s,B){o===void 0&&(o=Nr(s));var Q=(r===0?o:o>>>r)&mr,Y=this.nodes[Q];return Y?Y.get(r+ut,o,s,B):B};qs.prototype.update=function(r,o,s,B,Q,Y,J){s===void 0&&(s=Nr(B));var it=(o===0?s:s>>>o)&mr,nt=Q===De,ot=this.nodes,dt=ot[it];if(nt&&!dt)return this;var Mt=Tu(dt,r,o+ut,s,B,Q,Y,J);if(Mt===dt)return this;var Ot=this.count;if(!dt)Ot++;else if(!Mt&&(Ot--,Ot<hb))return ob(r,ot,Ot,it);var Qt=r&&r===this.ownerID,Ut=hf(ot,it,Mt,Qt);return Qt?(this.count=Ot,this.nodes=Ut,this):new qs(r,Ot,Ut)};var Ra=function Ra(r,o,s){this.ownerID=r,this.keyHash=o,this.entries=s};Ra.prototype.get=function(r,o,s,B){for(var Q=this.entries,Y=0,J=Q.length;Y<J;Y++)if(vr(s,Q[Y][0]))return Q[Y][1];return B};Ra.prototype.update=function(r,o,s,B,Q,Y,J){s===void 0&&(s=Nr(B));var it=Q===De;if(s!==this.keyHash)return it?this:(ri(J),ri(Y),Ru(this,r,o,s,[B,Q]));for(var nt=this.entries,ot=0,dt=nt.length;ot<dt&&!vr(B,nt[ot][0]);ot++);var Mt=ot<dt;if(Mt?nt[ot][1]===Q:it)return this;if(ri(J),(it||!Mt)&&ri(Y),it&&dt===2)return new nn(r,this.keyHash,nt[ot^1]);var Ot=r&&r===this.ownerID,Qt=Ot?nt:Di(nt);return Mt?it?ot===dt-1?Qt.pop():Qt[ot]=Qt.pop():Qt[ot]=[B,Q]:Qt.push([B,Q]),Ot?(this.entries=Qt,this):new Ra(r,this.keyHash,Qt)};var nn=function nn(r,o,s){this.ownerID=r,this.keyHash=o,this.entry=s};nn.prototype.get=function(r,o,s,B){return vr(s,this.entry[0])?this.entry[1]:B};nn.prototype.update=function(r,o,s,B,Q,Y,J){var it=Q===De,nt=vr(B,this.entry[0]);if(nt?Q===this.entry[1]:it)return this;if(ri(J),it){ri(Y);return}return nt?r&&r===this.ownerID?(this.entry[1]=Q,this):new nn(r,this.keyHash,[B,Q]):(ri(Y),Ru(this,r,o,Nr(B),[B,Q]))};Ws.prototype.iterate=Ra.prototype.iterate=function(r,o){for(var s=this.entries,B=0,Q=s.length-1;B<=Q;B++)if(r(s[o?Q-B:B])===!1)return!1};Ta.prototype.iterate=qs.prototype.iterate=function(r,o){for(var s=this.nodes,B=0,Q=s.length-1;B<=Q;B++){var Y=s[o?Q-B:B];if(Y&&Y.iterate(r,o)===!1)return!1}};nn.prototype.iterate=function(r,o){return r(this.entry)};var ib=function(r){function o(s,B,Q){this._type=B,this._reverse=Q,this._stack=s._root&&Zy(s._root)}return r&&(o.__proto__=r),o.prototype=Object.create(r&&r.prototype),o.prototype.constructor=o,o.prototype.next=function(){for(var s=this._type,B=this._stack;B;){var Q=B.node,Y=B.index++,J=void 0;if(Q.entry){if(Y===0)return Nd(s,Q.entry)}else if(Q.entries){if(J=Q.entries.length-1,Y<=J)return Nd(s,Q.entries[this._reverse?J-Y:Y])}else if(J=Q.nodes.length-1,Y<=J){var it=Q.nodes[this._reverse?J-Y:Y];if(it){if(it.entry)return Nd(s,it.entry);B=this._stack=Zy(it,B)}continue}B=this._stack=this._stack.__prev}return Or()},o}(Ue);function Nd(r,o){return ft(r,o[0],o[1])}function Zy(r,o){return{node:r,index:0,__prev:o}}function Iu(r,o,s,B){var Q=Object.create(yt);return Q.size=r,Q._root=o,Q.__ownerID=s,Q.__hash=B,Q.__altered=!1,Q}var Gy;function bi(){return Gy||(Gy=Iu(0))}function Yy(r,o,s){var B,Q;if(r._root){var Y=ah(),J=ah();if(B=Tu(r._root,r.__ownerID,0,void 0,o,s,Y,J),!J.value)return r;Q=r.size+(Y.value?s===De?-1:1:0)}else{if(s===De)return r;Q=1,B=new Ws(r.__ownerID,[[o,s]])}return r.__ownerID?(r.size=Q,r._root=B,r.__hash=void 0,r.__altered=!0,r):B?Iu(Q,B):bi()}function Tu(r,o,s,B,Q,Y,J,it){return r?r.update(o,s,B,Q,Y,J,it):Y===De?r:(ri(it),ri(J),new nn(o,B,[Q,Y]))}function Xy(r){return r.constructor===nn||r.constructor===Ra}function Ru(r,o,s,B,Q){if(r.keyHash===B)return new Ra(o,B,[r.entry,Q]);var Y=(s===0?r.keyHash:r.keyHash>>>s)&mr,J=(s===0?B:B>>>s)&mr,it,nt=Y===J?[Ru(r,o,s+ut,B,Q)]:(it=new nn(o,B,Q),Y<J?[r,it]:[it,r]);return new Ta(o,1<<Y|1<<J,nt)}function nb(r,o,s,B){r||(r=new uu);for(var Q=new nn(r,Nr(s),[s,B]),Y=0;Y<o.length;Y++){var J=o[Y];Q=Q.update(r,0,void 0,J[0],J[1])}return Q}function ob(r,o,s,B){for(var Q=0,Y=0,J=new Array(s),it=0,nt=1,ot=o.length;it<ot;it++,nt<<=1){var dt=o[it];dt!==void 0&&it!==B&&(Q|=nt,J[Y++]=dt)}return new Ta(r,Q,J)}function ab(r,o,s,B,Q){for(var Y=0,J=new Array(ti),it=0;s!==0;it++,s>>>=1)J[it]=s&1?o[Y++]:void 0;return J[B]=Q,new qs(r,Y+1,J)}function df(r){return r-=r>>1&1431655765,r=(r&858993459)+(r>>2&858993459),r=r+(r>>4)&252645135,r+=r>>8,r+=r>>16,r&127}function hf(r,o,s,B){var Q=B?r:Di(r);return Q[o]=s,Q}function sb(r,o,s,B){var Q=r.length+1;if(B&&o+1===Q)return r[o]=s,r;for(var Y=new Array(Q),J=0,it=0;it<Q;it++)it===o?(Y[it]=s,J=-1):Y[it]=r[it+J];return Y}function cb(r,o,s){var B=r.length-1;if(s&&o===B)return r.pop(),r;for(var Q=new Array(B),Y=0,J=0;J<B;J++)J===o&&(Y=1),Q[J]=r[J+Y];return Q}var lb=ti/4,db=ti/2,hb=ti/4,uf="@@__IMMUTABLE_LIST__@@";function yf(r){return!!(r&&r[uf])}var zn=function(r){function o(s){var B=ml();if(s==null)return B;if(yf(s))return s;var Q=r(s),Y=Q.size;return Y===0?B:(Vr(Y),Y>0&&Y<ti?Qs(0,Y,ut,null,new Tn(Q.toArray())):B.withMutations(function(J){J.setSize(Y),Q.forEach(function(it,nt){return J.set(nt,it)})}))}return r&&(o.__proto__=r),o.prototype=Object.create(r&&r.prototype),o.prototype.constructor=o,o.of=function(){return this(arguments)},o.prototype.toString=function(){return this.__toString("List [","]")},o.prototype.get=function(s,B){if(s=Dn(this,s),s>=0&&s<this.size){s+=this._origin;var Q=pf(this,s);return Q&&Q.array[s&mr]}return B},o.prototype.set=function(s,B){return ub(this,s,B)},o.prototype.remove=function(s){return this.has(s)?s===0?this.shift():s===this.size-1?this.pop():this.splice(s,1):this},o.prototype.insert=function(s,B){return this.splice(s,0,B)},o.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=ut,this._root=this._tail=this.__hash=void 0,this.__altered=!0,this):ml()},o.prototype.push=function(){var s=arguments,B=this.size;return this.withMutations(function(Q){vn(Q,0,B+s.length);for(var Y=0;Y<s.length;Y++)Q.set(B+Y,s[Y])})},o.prototype.pop=function(){return vn(this,0,-1)},o.prototype.unshift=function(){var s=arguments;return this.withMutations(function(B){vn(B,-s.length);for(var Q=0;Q<s.length;Q++)B.set(Q,s[Q])})},o.prototype.shift=function(){return vn(this,1)},o.prototype.concat=function(){for(var s=arguments,B=[],Q=0;Q<arguments.length;Q++){var Y=s[Q],J=r(typeof Y!="string"&&Nw(Y)?Y:[Y]);J.size!==0&&B.push(J)}return B.length===0?this:this.size===0&&!this.__ownerID&&B.length===1?this.constructor(B[0]):this.withMutations(function(it){B.forEach(function(nt){return nt.forEach(function(ot){return it.push(ot)})})})},o.prototype.setSize=function(s){return vn(this,0,s)},o.prototype.map=function(s,B){var Q=this;return this.withMutations(function(Y){for(var J=0;J<Q.size;J++)Y.set(J,s.call(B,Y.get(J),J,Q))})},o.prototype.slice=function(s,B){var Q=this.size;return od(s,B,Q)?this:vn(this,Bc(s,Q),ad(B,Q))},o.prototype.__iterator=function(s,B){var Q=B?this.size:0,Y=Jy(this,B);return new Ue(function(){var J=Y();return J===Os?Or():ft(s,B?--Q:Q++,J)})},o.prototype.__iterate=function(s,B){for(var Q=B?this.size:0,Y=Jy(this,B),J;(J=Y())!==Os&&s(J,B?--Q:Q++,this)!==!1;);return Q},o.prototype.__ensureOwner=function(s){return s===this.__ownerID?this:s?Qs(this._origin,this._capacity,this._level,this._root,this._tail,s,this.__hash):this.size===0?ml():(this.__ownerID=s,this.__altered=!1,this)},o}(qo);zn.isList=yf;var Nt=zn.prototype;Nt[uf]=!0;Nt[Vc]=Nt.remove;Nt.merge=Nt.concat;Nt.setIn=Cu;Nt.deleteIn=Nt.removeIn=$u;Nt.update=Eu;Nt.updateIn=Su;Nt.mergeIn=Lu;Nt.mergeDeepIn=Mu;Nt.withMutations=jc;Nt.wasAltered=Ou;Nt.asImmutable=Wc;Nt["@@transducer/init"]=Nt.asMutable=Uc;Nt["@@transducer/step"]=function(r,o){return r.push(o)};Nt["@@transducer/result"]=function(r){return r.asImmutable()};var Tn=function Tn(r,o){this.array=r,this.ownerID=o};Tn.prototype.removeBefore=function(r,o,s){if(s===o?1<<o:this.array.length===0)return this;var B=s>>>o&mr;if(B>=this.array.length)return new Tn([],r);var Q=B===0,Y;if(o>0){var J=this.array[B];if(Y=J&&J.removeBefore(r,o-ut,s),Y===J&&Q)return this}if(Q&&!Y)return this;var it=Da(this,r);if(!Q)for(var nt=0;nt<B;nt++)it.array[nt]=void 0;return Y&&(it.array[B]=Y),it};Tn.prototype.removeAfter=function(r,o,s){if(s===(o?1<<o:0)||this.array.length===0)return this;var B=s-1>>>o&mr;if(B>=this.array.length)return this;var Q;if(o>0){var Y=this.array[B];if(Q=Y&&Y.removeAfter(r,o-ut,s),Q===Y&&B===this.array.length-1)return this}var J=Da(this,r);return J.array.splice(B+1),Q&&(J.array[B]=Q),J};var Os={};function Jy(r,o){var s=r._origin,B=r._capacity,Q=Ks(B),Y=r._tail;return J(r._root,r._level,0);function J(ot,dt,Mt){return dt===0?it(ot,Mt):nt(ot,dt,Mt)}function it(ot,dt){var Mt=dt===Q?Y&&Y.array:ot&&ot.array,Ot=dt>s?0:s-dt,Qt=B-dt;return Qt>ti&&(Qt=ti),function(){if(Ot===Qt)return Os;var Ut=o?--Qt:Ot++;return Mt&&Mt[Ut]}}function nt(ot,dt,Mt){var Ot,Qt=ot&&ot.array,Ut=Mt>s?0:s-Mt>>dt,te=(B-Mt>>dt)+1;return te>ti&&(te=ti),function(){for(;;){if(Ot){var qt=Ot();if(qt!==Os)return qt;Ot=null}if(Ut===te)return Os;var ie=o?--te:Ut++;Ot=J(Qt&&Qt[ie],dt-ut,Mt+(ie<<dt))}}}}function Qs(r,o,s,B,Q,Y,J){var it=Object.create(Nt);return it.size=o-r,it._origin=r,it._capacity=o,it._level=s,it._root=B,it._tail=Q,it.__ownerID=Y,it.__hash=J,it.__altered=!1,it}var ep;function ml(){return ep||(ep=Qs(0,0,ut))}function ub(r,o,s){if(o=Dn(r,o),o!==o)return r;if(o>=r.size||o<0)return r.withMutations(function(J){o<0?vn(J,o).set(0,s):vn(J,0,o+1).set(o,s)});o+=r._origin;var B=r._tail,Q=r._root,Y=ah();return o>=Ks(r._capacity)?B=uh(B,r.__ownerID,0,o,s,Y):Q=uh(Q,r.__ownerID,r._level,o,s,Y),Y.value?r.__ownerID?(r._root=Q,r._tail=B,r.__hash=void 0,r.__altered=!0,r):Qs(r._origin,r._capacity,r._level,Q,B):r}function uh(r,o,s,B,Q,Y){var J=B>>>s&mr,it=r&&J<r.array.length;if(!it&&Q===void 0)return r;var nt;if(s>0){var ot=r&&r.array[J],dt=uh(ot,o,s-ut,B,Q,Y);return dt===ot?r:(nt=Da(r,o),nt.array[J]=dt,nt)}return it&&r.array[J]===Q?r:(Y&&ri(Y),nt=Da(r,o),Q===void 0&&J===nt.array.length-1?nt.array.pop():nt.array[J]=Q,nt)}function Da(r,o){return o&&r&&o===r.ownerID?r:new Tn(r?r.array.slice():[],o)}function pf(r,o){if(o>=Ks(r._capacity))return r._tail;if(o<1<<r._level+ut){for(var s=r._root,B=r._level;s&&B>0;)s=s.array[o>>>B&mr],B-=ut;return s}}function vn(r,o,s){o!==void 0&&(o|=0),s!==void 0&&(s|=0);var B=r.__ownerID||new uu,Q=r._origin,Y=r._capacity,J=Q+o,it=s===void 0?Y:s<0?Y+s:Q+s;if(J===Q&&it===Y)return r;if(J>=it)return r.clear();for(var nt=r._level,ot=r._root,dt=0;J+dt<0;)ot=new Tn(ot&&ot.array.length?[void 0,ot]:[],B),nt+=ut,dt+=1<<nt;dt&&(J+=dt,Q+=dt,it+=dt,Y+=dt);for(var Mt=Ks(Y),Ot=Ks(it);Ot>=1<<nt+ut;)ot=new Tn(ot&&ot.array.length?[ot]:[],B),nt+=ut;var Qt=r._tail,Ut=Ot<Mt?pf(r,it-1):Ot>Mt?new Tn([],B):Qt;if(Qt&&Ot>Mt&&J<Y&&Qt.array.length){ot=Da(ot,B);for(var te=ot,qt=nt;qt>ut;qt-=ut){var ie=Mt>>>qt&mr;te=te.array[ie]=Da(te.array[ie],B)}te.array[Mt>>>ut&mr]=Qt}if(it<Y&&(Ut=Ut&&Ut.removeAfter(B,0,it)),J>=Ot)J-=Ot,it-=Ot,nt=ut,ot=null,Ut=Ut&&Ut.removeBefore(B,0,J);else if(J>Q||Ot<Mt){for(dt=0;ot;){var re=J>>>nt&mr;if(re!==Ot>>>nt&mr)break;re&&(dt+=(1<<nt)*re),nt-=ut,ot=ot.array[re]}ot&&J>Q&&(ot=ot.removeBefore(B,nt,J-dt)),ot&&Ot<Mt&&(ot=ot.removeAfter(B,nt,Ot-dt)),dt&&(J-=dt,it-=dt)}return r.__ownerID?(r.size=it-J,r._origin=J,r._capacity=it,r._level=nt,r._root=ot,r._tail=Ut,r.__hash=void 0,r.__altered=!0,r):Qs(J,it,nt,ot,Ut)}function Ks(r){return r<ti?0:r-1>>>ut<<ut}var on=function(r){function o(s){return s==null?_s():jw(s)?s:_s().withMutations(function(B){var Q=hi(s);Vr(Q.size),Q.forEach(function(Y,J){return B.set(J,Y)})})}return r&&(o.__proto__=r),o.prototype=Object.create(r&&r.prototype),o.prototype.constructor=o,o.of=function(){return this(arguments)},o.prototype.toString=function(){return this.__toString("OrderedMap {","}")},o.prototype.get=function(s,B){var Q=this._map.get(s);return Q!==void 0?this._list.get(Q)[1]:B},o.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this.__altered=!0,this):_s()},o.prototype.set=function(s,B){return rp(this,s,B)},o.prototype.remove=function(s){return rp(this,s,De)},o.prototype.__iterate=function(s,B){var Q=this;return this._list.__iterate(function(Y){return Y&&s(Y[1],Y[0],Q)},B)},o.prototype.__iterator=function(s,B){return this._list.fromEntrySeq().__iterator(s,B)},o.prototype.__ensureOwner=function(s){if(s===this.__ownerID)return this;var B=this._map.__ensureOwner(s),Q=this._list.__ensureOwner(s);return s?Du(B,Q,s,this.__hash):this.size===0?_s():(this.__ownerID=s,this.__altered=!1,this._map=B,this._list=Q,this)},o}(Vi);on.isOrderedMap=jw;on.prototype[Ja]=!0;on.prototype[Vc]=on.prototype.remove;function Du(r,o,s,B){var Q=Object.create(on.prototype);return Q.size=r?r.size:0,Q._map=r,Q._list=o,Q.__ownerID=s,Q.__hash=B,Q.__altered=!1,Q}var tp;function _s(){return tp||(tp=Du(bi(),ml()))}function rp(r,o,s){var B=r._map,Q=r._list,Y=B.get(o),J=Y!==void 0,it,nt;if(s===De){if(!J)return r;Q.size>=ti&&Q.size>=B.size*2?(nt=Q.filter(function(ot,dt){return ot!==void 0&&Y!==dt}),it=nt.toKeyedSeq().map(function(ot){return ot[0]}).flip().toMap(),r.__ownerID&&(it.__ownerID=nt.__ownerID=r.__ownerID)):(it=B.remove(o),nt=Y===Q.size-1?Q.pop():Q.set(Y,void 0))}else if(J){if(s===Q.get(Y)[1])return r;it=B,nt=Q.set(Y,[o,s])}else it=B.set(o,Q.size),nt=Q.set(Q.size,[o,s]);return r.__ownerID?(r.size=it.size,r._map=it,r._list=nt,r.__hash=void 0,r.__altered=!0,r):Du(it,nt)}var wf="@@__IMMUTABLE_STACK__@@";function yh(r){return!!(r&&r[wf])}var Fu=function(r){function o(s){return s==null?ll():yh(s)?s:ll().pushAll(s)}return r&&(o.__proto__=r),o.prototype=Object.create(r&&r.prototype),o.prototype.constructor=o,o.of=function(){return this(arguments)},o.prototype.toString=function(){return this.__toString("Stack [","]")},o.prototype.get=function(s,B){var Q=this._head;for(s=Dn(this,s);Q&&s--;)Q=Q.next;return Q?Q.value:B},o.prototype.peek=function(){return this._head&&this._head.value},o.prototype.push=function(){var s=arguments;if(arguments.length===0)return this;for(var B=this.size+arguments.length,Q=this._head,Y=arguments.length-1;Y>=0;Y--)Q={value:s[Y],next:Q};return this.__ownerID?(this.size=B,this._head=Q,this.__hash=void 0,this.__altered=!0,this):xs(B,Q)},o.prototype.pushAll=function(s){if(s=r(s),s.size===0)return this;if(this.size===0&&yh(s))return s;Vr(s.size);var B=this.size,Q=this._head;return s.__iterate(function(Y){B++,Q={value:Y,next:Q}},!0),this.__ownerID?(this.size=B,this._head=Q,this.__hash=void 0,this.__altered=!0,this):xs(B,Q)},o.prototype.pop=function(){return this.slice(1)},o.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):ll()},o.prototype.slice=function(s,B){if(od(s,B,this.size))return this;var Q=Bc(s,this.size),Y=ad(B,this.size);if(Y!==this.size)return r.prototype.slice.call(this,s,B);for(var J=this.size-Q,it=this._head;Q--;)it=it.next;return this.__ownerID?(this.size=J,this._head=it,this.__hash=void 0,this.__altered=!0,this):xs(J,it)},o.prototype.__ensureOwner=function(s){return s===this.__ownerID?this:s?xs(this.size,this._head,s,this.__hash):this.size===0?ll():(this.__ownerID=s,this.__altered=!1,this)},o.prototype.__iterate=function(s,B){var Q=this;if(B)return new To(this.toArray()).__iterate(function(it,nt){return s(it,nt,Q)},B);for(var Y=0,J=this._head;J&&s(J.value,Y++,this)!==!1;)J=J.next;return Y},o.prototype.__iterator=function(s,B){if(B)return new To(this.toArray()).__iterator(s,B);var Q=0,Y=this._head;return new Ue(function(){if(Y){var J=Y.value;return Y=Y.next,ft(s,Q++,J)}return Or()})},o}(qo);Fu.isStack=yh;var gr=Fu.prototype;gr[wf]=!0;gr.shift=gr.pop;gr.unshift=gr.push;gr.unshiftAll=gr.pushAll;gr.withMutations=jc;gr.wasAltered=Ou;gr.asImmutable=Wc;gr["@@transducer/init"]=gr.asMutable=Uc;gr["@@transducer/step"]=function(r,o){return r.unshift(o)};gr["@@transducer/result"]=function(r){return r.asImmutable()};function xs(r,o,s,B){var Q=Object.create(gr);return Q.size=r,Q._head=o,Q.__ownerID=s,Q.__hash=B,Q.__altered=!1,Q}var ip;function ll(){return ip||(ip=xs(0))}var ff="@@__IMMUTABLE_SET__@@";function zu(r){return!!(r&&r[ff])}function mf(r){return zu(r)&&ki(r)}function vf(r,o){if(r===o)return!0;if(!Mr(o)||r.size!==void 0&&o.size!==void 0&&r.size!==o.size||r.__hash!==void 0&&o.__hash!==void 0&&r.__hash!==o.__hash||wt(r)!==wt(o)||Sr(r)!==Sr(o)||ki(r)!==ki(o))return!1;if(r.size===0&&o.size===0)return!0;var s=!sd(r);if(ki(r)){var B=r.entries();return o.every(function(nt,ot){var dt=B.next().value;return dt&&vr(dt[1],nt)&&(s||vr(dt[0],ot))})&&B.next().done}var Q=!1;if(r.size===void 0)if(o.size===void 0)typeof r.cacheResult=="function"&&r.cacheResult();else{Q=!0;var Y=r;r=o,o=Y}var J=!0,it=o.__iterate(function(nt,ot){if(s?!r.has(nt):Q?!vr(nt,r.get(ot,De)):!vr(r.get(ot,De),nt))return J=!1,!1});return J&&r.size===it}function Qo(r,o){var s=function s(B){r.prototype[B]=o[B]};return Object.keys(o).forEach(s),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(o).forEach(s),r}function Dl(r){if(!r||_typeof(r)!="object")return r;if(!Mr(r)){if(!Fn(r))return r;r=Hr(r)}if(wt(r)){var o={};return r.__iterate(function(B,Q){o[Q]=Dl(B)}),o}var s=[];return r.__iterate(function(B){s.push(Dl(B))}),s}var ud=function(r){function o(s){return s==null?ks():zu(s)&&!ki(s)?s:ks().withMutations(function(B){var Q=r(s);Vr(Q.size),Q.forEach(function(Y){return B.add(Y)})})}return r&&(o.__proto__=r),o.prototype=Object.create(r&&r.prototype),o.prototype.constructor=o,o.of=function(){return this(arguments)},o.fromKeys=function(s){return this(hi(s).keySeq())},o.intersect=function(s){return s=It(s).toArray(),s.length?or.intersect.apply(o(s.pop()),s):ks()},o.union=function(s){return s=It(s).toArray(),s.length?or.union.apply(o(s.pop()),s):ks()},o.prototype.toString=function(){return this.__toString("Set {","}")},o.prototype.has=function(s){return this._map.has(s)},o.prototype.add=function(s){return dl(this,this._map.set(s,s))},o.prototype.remove=function(s){return dl(this,this._map.remove(s))},o.prototype.clear=function(){return dl(this,this._map.clear())},o.prototype.map=function(s,B){var Q=this,Y=!1,J=dl(this,this._map.mapEntries(function(it){var nt=it[1],ot=s.call(B,nt,nt,Q);return ot!==nt&&(Y=!0),[ot,ot]},B));return Y?J:this},o.prototype.union=function(){for(var s=[],B=arguments.length;B--;)s[B]=arguments[B];return s=s.filter(function(Q){return Q.size!==0}),s.length===0?this:this.size===0&&!this.__ownerID&&s.length===1?this.constructor(s[0]):this.withMutations(function(Q){for(var Y=0;Y<s.length;Y++)typeof s[Y]=="string"?Q.add(s[Y]):r(s[Y]).forEach(function(J){return Q.add(J)})})},o.prototype.intersect=function(){for(var s=[],B=arguments.length;B--;)s[B]=arguments[B];if(s.length===0)return this;s=s.map(function(Y){return r(Y)});var Q=[];return this.forEach(function(Y){s.every(function(J){return J.includes(Y)})||Q.push(Y)}),this.withMutations(function(Y){Q.forEach(function(J){Y.remove(J)})})},o.prototype.subtract=function(){for(var s=[],B=arguments.length;B--;)s[B]=arguments[B];if(s.length===0)return this;s=s.map(function(Y){return r(Y)});var Q=[];return this.forEach(function(Y){s.some(function(J){return J.includes(Y)})&&Q.push(Y)}),this.withMutations(function(Y){Q.forEach(function(J){Y.remove(J)})})},o.prototype.sort=function(s){return Zs(Ia(this,s))},o.prototype.sortBy=function(s,B){return Zs(Ia(this,B,s))},o.prototype.wasAltered=function(){return this._map.wasAltered()},o.prototype.__iterate=function(s,B){var Q=this;return this._map.__iterate(function(Y){return s(Y,Y,Q)},B)},o.prototype.__iterator=function(s,B){return this._map.__iterator(s,B)},o.prototype.__ensureOwner=function(s){if(s===this.__ownerID)return this;var B=this._map.__ensureOwner(s);return s?this.__make(B,s):this.size===0?this.__empty():(this.__ownerID=s,this._map=B,this)},o}(Ya);ud.isSet=zu;var or=ud.prototype;or[ff]=!0;or[Vc]=or.remove;or.merge=or.concat=or.union;or.withMutations=jc;or.asImmutable=Wc;or["@@transducer/init"]=or.asMutable=Uc;or["@@transducer/step"]=function(r,o){return r.add(o)};or["@@transducer/result"]=function(r){return r.asImmutable()};or.__empty=ks;or.__make=gf;function dl(r,o){return r.__ownerID?(r.size=o.size,r._map=o,r):o===r._map?r:o.size===0?r.__empty():r.__make(o)}function gf(r,o){var s=Object.create(or);return s.size=r?r.size:0,s._map=r,s.__ownerID=o,s}var np;function ks(){return np||(np=gf(bi()))}var yb=function(r){function o(s,B,Q){if(!(this instanceof o))return new o(s,B,Q);if(ku(Q!==0,"Cannot step a Range by 0"),s=s||0,B===void 0&&(B=1/0),Q=Q===void 0?1:Math.abs(Q),B<s&&(Q=-Q),this._start=s,this._end=B,this._step=Q,this.size=Math.max(0,Math.ceil((B-s)/Q-1)+1),this.size===0){if(Vd)return Vd;Vd=this}}return r&&(o.__proto__=r),o.prototype=Object.create(r&&r.prototype),o.prototype.constructor=o,o.prototype.toString=function(){return this.size===0?"Range []":"Range [ "+this._start+"..."+this._end+(this._step!==1?" by "+this._step:"")+" ]"},o.prototype.get=function(s,B){return this.has(s)?this._start+Dn(this,s)*this._step:B},o.prototype.includes=function(s){var B=(s-this._start)/this._step;return B>=0&&B<this.size&&B===Math.floor(B)},o.prototype.slice=function(s,B){return od(s,B,this.size)?this:(s=Bc(s,this.size),B=ad(B,this.size),B<=s?new o(0,0):new o(this.get(s,this._end),this.get(B,this._end),this._step))},o.prototype.indexOf=function(s){var B=s-this._start;if(B%this._step===0){var Q=B/this._step;if(Q>=0&&Q<this.size)return Q}return-1},o.prototype.lastIndexOf=function(s){return this.indexOf(s)},o.prototype.__iterate=function(s,B){for(var Q=this.size,Y=this._step,J=B?this._start+(Q-1)*Y:this._start,it=0;it!==Q&&s(J,B?Q-++it:it++,this)!==!1;)J+=B?-Y:Y;return it},o.prototype.__iterator=function(s,B){var Q=this.size,Y=this._step,J=B?this._start+(Q-1)*Y:this._start,it=0;return new Ue(function(){if(it===Q)return Or();var nt=J;return J+=B?-Y:Y,ft(s,B?Q-++it:it++,nt)})},o.prototype.equals=function(s){return s instanceof o?this._start===s._start&&this._end===s._end&&this._step===s._step:vf(this,s)},o}(Ai),Vd;function bf(r,o,s){for(var B=ef(o),Q=0;Q!==B.length;)if(r=tf(r,B[Q++],De),r===De)return s;return r}function _f(r,o){return bf(this,r,o)}function pb(r,o){return bf(r,o,De)!==De}function wb(r){return pb(this,r)}function xf(){Vr(this.size);var r={};return this.__iterate(function(o,s){r[s]=o}),r}It.isIterable=Mr;It.isKeyed=wt;It.isIndexed=Sr;It.isAssociative=sd;It.isOrdered=ki;It.Iterator=Ue;Qo(It,{toArray:function toArray(){Vr(this.size);var r=new Array(this.size||0),o=wt(this),s=0;return this.__iterate(function(B,Q){r[s++]=o?[Q,B]:B}),r},toIndexedSeq:function toIndexedSeq(){return new Ww(this)},toJS:function toJS(){return Dl(this)},toKeyedSeq:function toKeyedSeq(){return new hd(this,!0)},toMap:function toMap(){return Vi(this.toKeyedSeq())},toObject:xf,toOrderedMap:function toOrderedMap(){return on(this.toKeyedSeq())},toOrderedSet:function toOrderedSet(){return Zs(wt(this)?this.valueSeq():this)},toSet:function toSet(){return ud(wt(this)?this.valueSeq():this)},toSetSeq:function toSetSeq(){return new qw(this)},toSeq:function toSeq(){return Sr(this)?this.toIndexedSeq():wt(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function toStack(){return Fu(wt(this)?this.valueSeq():this)},toList:function toList(){return zn(wt(this)?this.valueSeq():this)},toString:function toString(){return"[Collection]"},__toString:function __toString(r,o){return this.size===0?r+o:r+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+o},concat:function concat(){for(var r=[],o=arguments.length;o--;)r[o]=arguments[o];return Je(this,Wg(this,r))},includes:function includes(r){return this.some(function(o){return vr(o,r)})},entries:function entries(){return this.__iterator(ni)},every:function every(r,o){Vr(this.size);var s=!0;return this.__iterate(function(B,Q,Y){if(!r.call(o,B,Q,Y))return s=!1,!1}),s},filter:function filter(r,o){return Je(this,Gw(this,r,o,!0))},partition:function partition(r,o){return jg(this,r,o)},find:function find(r,o,s){var B=this.findEntry(r,o);return B?B[1]:s},forEach:function forEach(r,o){return Vr(this.size),this.__iterate(o?r.bind(o):r)},join:function join(r){Vr(this.size),r=r!==void 0?""+r:",";var o="",s=!0;return this.__iterate(function(B){s?s=!1:o+=r,o+=B!=null?B.toString():""}),o},keys:function keys(){return this.__iterator(Hc)},map:function map(r,o){return Je(this,Zw(this,r,o))},reduce:function reduce(r,o,s){return op(this,r,o,s,arguments.length<2,!1)},reduceRight:function reduceRight(r,o,s){return op(this,r,o,s,arguments.length<2,!0)},reverse:function reverse(){return Je(this,gu(this,!0))},slice:function slice(r,o){return Je(this,bu(this,r,o,!0))},some:function some(r,o){Vr(this.size);var s=!1;return this.__iterate(function(B,Q,Y){if(r.call(o,B,Q,Y))return s=!0,!1}),s},sort:function sort(r){return Je(this,Ia(this,r))},values:function values(){return this.__iterator(Ci)},butLast:function butLast(){return this.slice(0,-1)},isEmpty:function isEmpty(){return this.size!==void 0?this.size===0:!this.some(function(){return!0})},count:function count(r,o){return Oa(r?this.toSeq().filter(r,o):this)},countBy:function countBy(r,o){return Bg(this,r,o)},equals:function equals(r){return vf(this,r)},entrySeq:function entrySeq(){var r=this;if(r._cache)return new To(r._cache);var o=r.toSeq().map(mb).toIndexedSeq();return o.fromEntrySeq=function(){return r.toSeq()},o},filterNot:function filterNot(r,o){return this.filter(Bd(r),o)},findEntry:function findEntry(r,o,s){var B=s;return this.__iterate(function(Q,Y,J){if(r.call(o,Q,Y,J))return B=[Y,Q],!1}),B},findKey:function findKey(r,o){var s=this.findEntry(r,o);return s&&s[0]},findLast:function findLast(r,o,s){return this.toKeyedSeq().reverse().find(r,o,s)},findLastEntry:function findLastEntry(r,o,s){return this.toKeyedSeq().reverse().findEntry(r,o,s)},findLastKey:function findLastKey(r,o){return this.toKeyedSeq().reverse().findKey(r,o)},first:function first(r){return this.find(Lw,null,r)},flatMap:function flatMap(r,o){return Je(this,qg(this,r,o))},flatten:function flatten(r){return Je(this,Xw(this,r,!0))},fromEntrySeq:function fromEntrySeq(){return new Qw(this)},get:function get(r,o){return this.find(function(s,B){return vr(B,r)},void 0,o)},getIn:_f,groupBy:function groupBy(r,o){return Hg(this,r,o)},has:function has(r){return this.get(r,De)!==De},hasIn:wb,isSubset:function isSubset(r){return r=typeof r.includes=="function"?r:It(r),this.every(function(o){return r.includes(o)})},isSuperset:function isSuperset(r){return r=typeof r.isSubset=="function"?r:It(r),r.isSubset(this)},keyOf:function keyOf(r){return this.findKey(function(o){return vr(o,r)})},keySeq:function keySeq(){return this.toSeq().map(fb).toIndexedSeq()},last:function last(r){return this.toSeq().reverse().first(r)},lastKeyOf:function lastKeyOf(r){return this.toKeyedSeq().reverse().keyOf(r)},max:function max(r){return sl(this,r)},maxBy:function maxBy(r,o){return sl(this,o,r)},min:function min(r){return sl(this,r?ap(r):cp)},minBy:function minBy(r,o){return sl(this,o?ap(o):cp,r)},rest:function rest(){return this.slice(1)},skip:function skip(r){return r===0?this:this.slice(Math.max(0,r))},skipLast:function skipLast(r){return r===0?this:this.slice(0,-Math.max(0,r))},skipWhile:function skipWhile(r,o){return Je(this,Yw(this,r,o,!0))},skipUntil:function skipUntil(r,o){return this.skipWhile(Bd(r),o)},sortBy:function sortBy(r,o){return Je(this,Ia(this,o,r))},take:function take(r){return this.slice(0,Math.max(0,r))},takeLast:function takeLast(r){return this.slice(-Math.max(0,r))},takeWhile:function takeWhile(r,o){return Je(this,Ug(this,r,o))},takeUntil:function takeUntil(r,o){return this.takeWhile(Bd(r),o)},update:function update(r){return r(this)},valueSeq:function valueSeq(){return this.toIndexedSeq()},hashCode:function hashCode(){return this.__hash||(this.__hash=vb(this))}});var hr=It.prototype;hr[Iw]=!0;hr[cd]=hr.values;hr.toJSON=hr.toArray;hr.__toStringMapper=Us;hr.inspect=hr.toSource=function(){return this.toString()};hr.chain=hr.flatMap;hr.contains=hr.includes;Qo(hi,{flip:function flip(){return Je(this,Kw(this))},mapEntries:function mapEntries(r,o){var s=this,B=0;return Je(this,this.toSeq().map(function(Q,Y){return r.call(o,[Y,Q],B++,s)}).fromEntrySeq())},mapKeys:function mapKeys(r,o){var s=this;return Je(this,this.toSeq().flip().map(function(B,Q){return r.call(o,B,Q,s)}).flip())}});var qc=hi.prototype;qc[Tw]=!0;qc[cd]=hr.entries;qc.toJSON=xf;qc.__toStringMapper=function(r,o){return Us(o)+": "+Us(r)};Qo(qo,{toKeyedSeq:function toKeyedSeq(){return new hd(this,!1)},filter:function filter(r,o){return Je(this,Gw(this,r,o,!1))},findIndex:function findIndex(r,o){var s=this.findEntry(r,o);return s?s[0]:-1},indexOf:function indexOf(r){var o=this.keyOf(r);return o===void 0?-1:o},lastIndexOf:function lastIndexOf(r){var o=this.lastKeyOf(r);return o===void 0?-1:o},reverse:function reverse(){return Je(this,gu(this,!1))},slice:function slice(r,o){return Je(this,bu(this,r,o,!1))},splice:function splice(r,o){var s=arguments.length;if(o=Math.max(o||0,0),s===0||s===2&&!o)return this;r=Bc(r,r<0?this.count():this.size);var B=this.slice(0,r);return Je(this,s===1?B:B.concat(Di(arguments,2),this.slice(r+o)))},findLastIndex:function findLastIndex(r,o){var s=this.findLastEntry(r,o);return s?s[0]:-1},first:function first(r){return this.get(0,r)},flatten:function flatten(r){return Je(this,Xw(this,r,!1))},get:function get(r,o){return r=Dn(this,r),r<0||this.size===1/0||this.size!==void 0&&r>this.size?o:this.find(function(s,B){return B===r},void 0,o)},has:function has(r){return r=Dn(this,r),r>=0&&(this.size!==void 0?this.size===1/0||r<this.size:this.indexOf(r)!==-1)},interpose:function interpose(r){return Je(this,Qg(this,r))},interleave:function interleave(){var r=[this].concat(Di(arguments)),o=cl(this.toSeq(),Ai.of,r),s=o.flatten(!0);return o.size&&(s.size=o.size*r.length),Je(this,s)},keySeq:function keySeq(){return yb(0,this.size)},last:function last(r){return this.get(-1,r)},skipWhile:function skipWhile(r,o){return Je(this,Yw(this,r,o,!1))},zip:function zip(){var r=[this].concat(Di(arguments));return Je(this,cl(this,sp,r))},zipAll:function zipAll(){var r=[this].concat(Di(arguments));return Je(this,cl(this,sp,r,!0))},zipWith:function zipWith(r){var o=Di(arguments);return o[0]=this,Je(this,cl(this,r,o))}});var is=qo.prototype;is[Rw]=!0;is[Ja]=!0;Qo(Ya,{get:function get(r,o){return this.has(r)?r:o},includes:function includes(r){return this.has(r)},keySeq:function keySeq(){return this.valueSeq()}});var Fa=Ya.prototype;Fa.has=hr.includes;Fa.contains=Fa.includes;Fa.keys=Fa.values;Qo(Kn,qc);Qo(Ai,is);Qo(ts,Fa);function op(r,o,s,B,Q,Y){return Vr(r.size),r.__iterate(function(J,it,nt){Q?(Q=!1,s=J):s=o.call(B,s,J,it,nt)},Y),s}function fb(r,o){return o}function mb(r,o){return[o,r]}function Bd(r){return function(){return!r.apply(this,arguments)}}function ap(r){return function(){return-r.apply(this,arguments)}}function sp(){return Di(arguments)}function cp(r,o){return r<o?1:r>o?-1:0}function vb(r){if(r.size===1/0)return 0;var o=ki(r),s=wt(r),B=o?1:0,Q=r.__iterate(s?o?function(Y,J){B=31*B+lp(Nr(Y),Nr(J))|0}:function(Y,J){B=B+lp(Nr(Y),Nr(J))|0}:o?function(Y){B=31*B+Nr(Y)|0}:function(Y){B=B+Nr(Y)|0});return gb(Q,B)}function gb(r,o){return o=ms(o,3432918353),o=ms(o<<15|o>>>-15,461845907),o=ms(o<<13|o>>>-13,5),o=(o+3864292196|0)^r,o=ms(o^o>>>16,2246822507),o=ms(o^o>>>13,3266489909),o=dd(o^o>>>16),o}function lp(r,o){return r^o+2654435769+(r<<6)+(r>>2)|0}var Zs=function(r){function o(s){return s==null?ph():mf(s)?s:ph().withMutations(function(B){var Q=Ya(s);Vr(Q.size),Q.forEach(function(Y){return B.add(Y)})})}return r&&(o.__proto__=r),o.prototype=Object.create(r&&r.prototype),o.prototype.constructor=o,o.of=function(){return this(arguments)},o.fromKeys=function(s){return this(hi(s).keySeq())},o.prototype.toString=function(){return this.__toString("OrderedSet {","}")},o}(ud);Zs.isOrderedSet=mf;var Ko=Zs.prototype;Ko[Ja]=!0;Ko.zip=is.zip;Ko.zipWith=is.zipWith;Ko.zipAll=is.zipAll;Ko.__empty=ph;Ko.__make=kf;function kf(r,o){var s=Object.create(Ko);return s.size=r?r.size:0,s._map=r,s.__ownerID=o,s}var dp;function ph(){return dp||(dp=kf(_s()))}function bb(r){if(Xa(r))throw new Error("Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.");if(Wi(r))throw new Error("Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.");if(r===null||_typeof(r)!="object")throw new Error("Can not call `Record` with a non-object as default values. Use a plain javascript object instead.")}var ir=function ir(r,o){var s;bb(r);var B=function B(Y){var J=this;if(Y instanceof B)return Y;if(!(this instanceof B))return new B(Y);if(!s){s=!0;var it=Object.keys(r),nt=Q._indices={};Q._name=o,Q._keys=it,Q._defaultValues=r;for(var ot=0;ot<it.length;ot++){var dt=it[ot];nt[dt]=ot,Q[dt]?(typeof console==="undefined"?"undefined":_typeof(console))=="object"&&console.warn&&console.warn("Cannot define "+Vu(this)+" with property \""+dt+"\" since that property name is part of the Record API."):_b(Q,dt)}}return this.__ownerID=void 0,this._values=zn().withMutations(function(Mt){Mt.setSize(J._keys.length),hi(Y).forEach(function(Ot,Qt){Mt.set(J._indices[Qt],Ot===J._defaultValues[Qt]?void 0:Ot)})}),this},Q=B.prototype=Object.create(st);return Q.constructor=B,o&&(B.displayName=o),B};ir.prototype.toString=function(){for(var r=Vu(this)+" { ",o=this._keys,s,B=0,Q=o.length;B!==Q;B++)s=o[B],r+=(B?", ":"")+s+": "+Us(this.get(s));return r+" }"};ir.prototype.equals=function(r){return this===r||Xa(r)&&za(this).equals(za(r))};ir.prototype.hashCode=function(){return za(this).hashCode()};ir.prototype.has=function(r){return this._indices.hasOwnProperty(r)};ir.prototype.get=function(r,o){if(!this.has(r))return o;var s=this._indices[r],B=this._values.get(s);return B===void 0?this._defaultValues[r]:B};ir.prototype.set=function(r,o){if(this.has(r)){var s=this._values.set(this._indices[r],o===this._defaultValues[r]?void 0:o);if(s!==this._values&&!this.__ownerID)return Nu(this,s)}return this};ir.prototype.remove=function(r){return this.set(r)};ir.prototype.clear=function(){var r=this._values.clear().setSize(this._keys.length);return this.__ownerID?this:Nu(this,r)};ir.prototype.wasAltered=function(){return this._values.wasAltered()};ir.prototype.toSeq=function(){return za(this)};ir.prototype.toJS=function(){return Dl(this)};ir.prototype.entries=function(){return this.__iterator(ni)};ir.prototype.__iterator=function(r,o){return za(this).__iterator(r,o)};ir.prototype.__iterate=function(r,o){return za(this).__iterate(r,o)};ir.prototype.__ensureOwner=function(r){if(r===this.__ownerID)return this;var o=this._values.__ensureOwner(r);return r?Nu(this,o,r):(this.__ownerID=r,this._values=o,this)};ir.isRecord=Xa;ir.getDescriptiveName=Vu;var st=ir.prototype;st[Fw]=!0;st[Vc]=st.remove;st.deleteIn=st.removeIn=$u;st.getIn=_f;st.hasIn=hr.hasIn;st.merge=of;st.mergeWith=af;st.mergeIn=Lu;st.mergeDeep=cf;st.mergeDeepWith=lf;st.mergeDeepIn=Mu;st.setIn=Cu;st.update=Eu;st.updateIn=Su;st.withMutations=jc;st.asMutable=Uc;st.asImmutable=Wc;st[cd]=st.entries;st.toJSON=st.toObject=hr.toObject;st.inspect=st.toSource=function(){return this.toString()};function Nu(r,o,s){var B=Object.create(Object.getPrototypeOf(r));return B._values=o,B.__ownerID=s,B}function Vu(r){return r.constructor.displayName||r.constructor.name||"Record"}function za(r){return fu(r._keys.map(function(o){return[o,r.get(o)]}))}function _b(r,o){try{Object.defineProperty(r,o,{get:function get(){return this.get(o)},set:function set(s){ku(this.__ownerID,"Cannot set on an immutable record."),this.set(o,s)}})}catch(_unused17){}}var xb="10000000-1000-4000-8000-".concat(1e11),kb=function kb(r){return(r^Math.random()*16>>r/4).toString(16)};function Cf(r){return r?kb(Number(r)):xb.replace(/[018]/g,Cf)}function Fl(r,o){return o===void 0||Object.keys(o).length==0?r:r.merge(Object.entries(o))}function Cb(r,o,s){return r.has(o)&&!vr(r.get(o),s)}function $f(r,o){var s=r;return s.key=o,s}var hp=Vi({modalStack:zn(),modalNodes:zn(),closeCallbacks:Vi()});function Hd(r){var o;if(r>=0){var s=(o=this.modalStack.get(r))==null?void 0:o.key,B=this.closeCallbacks.get(s);B!==void 0&&B(),this.modalState=Fl(this.modalState,{modalStack:this.modalStack["delete"](r),modalNodes:this.modalNodes["delete"](r),closeCallbacks:this.closeCallbacks["delete"](s)})}}function $b(r,o,s){var B=this.modalStack.findIndex(function(Q){return Q.key===r});B>=0&&(this.modalState=Fl(this.modalState,{modalStack:this.modalStack.set(B,$f(o,r)),closeCallbacks:s!==void 0?this.closeCallbacks.set(r,s):this.closeCallbacks["delete"](r)}))}var Eb={host:void 0,set modalState(r){Cb(r,"modalStack",this.modalStack)&&this.host.offerState(Vi({modalStack:r.get("modalStack")})),hp=r},get modalState(){return hp},get modalStack(){return this.modalState.get("modalStack")},get modalNodes(){return this.modalState.get("modalNodes")},get closeCallbacks(){return this.modalState.get("closeCallbacks")},attach:function attach(r){this.host===void 0?(this.host=r).addController(this):console.error("You attempted to attach a singleton controller to more than one host.")},hostConnected:function hostConnected(){this.host.offerState(Vi({modalStack:this.modalStack}))},hostUpdated:function hostUpdated(){this.modalState=Fl(this.modalState,{modalNodes:zn(this.host.modalNodes)})},push:function push(r,o){var _this180=this;var s=Cf();return this.modalState=Fl(this.modalState,{modalStack:this.modalStack.push($f(r,s)),closeCallbacks:o!==void 0?this.closeCallbacks.set(s,o):this.closeCallbacks}),{remove:function remove(){return _this180.removeByKey(s)},replace:function replace(B,Q){return $b.call(_this180,s,B,Q)}}},pop:function pop(){Hd.call(this,this.modalStack.size-1)},removeByNode:function removeByNode(r){Hd.call(this,this.modalNodes.indexOf(r))},removeByKey:function removeByKey(r){Hd.call(this,this.modalStack.findIndex(function(o){return o.key===r}))},removeAll:function removeAll(){for(;this.modalStack.size>0;)this.pop()}};var Rn=Eb,Sb=Object.defineProperty,Pb=Object.getOwnPropertyDescriptor,Ef=function Ef(r,o,s,B){for(var Q=B>1?void 0:B?Pb(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&Sb(o,s,Q),Q};var Gs=function(_le){_inherits(Gs,_le);function Gs(){var _this181;_classCallCheck(this,Gs);_this181=_callSuper(this,Gs),_this181.modalStack=zn(),_this181.portalRef=Re(),_this181.removeModal=function(r){r.stopImmediatePropagation(),r.preventDefault();var o=r.composedPath(),s=o.findIndex(function(B){return B===_this181.portalRef.value});if(s<1)console.warn("Could not locate modal portal at appropriate depth in the @removeModal event path");else{var B=o[s-1];Rn.removeByNode(B)}},Rn.attach(_assertThisInitialized(_this181));return _this181}_createClass(Gs,[{key:"modalNodes",get:function get(){var r;return(r=this.portalRef.value)==null?void 0:r.children}},{key:"offerState",value:function offerState(r){vr(this.modalStack,r.get("modalStack"))||(this.modalStack=r.get("modalStack"),this.modalStack.size>0?document.querySelector("body").classList.add("modal-portal-active"):document.querySelector("body").classList.remove("modal-portal-active"))}},{key:"connectedCallback",value:function connectedCallback(){_get(_getPrototypeOf(Gs.prototype),"connectedCallback",this).call(this),this.addEventListener("removeModal",this.removeModal)}},{key:"render",value:function render(){var r;return v(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div id=\"portal\" ",">\n ","\n </div>\n "])),Ce(this.portalRef),Lr((r=this.modalStack)==null?void 0:r.values(),function(o){return o.key},function(o){return v(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<div class=\"modal-node\">","</div>"])),o)}))}}]);return Gs}(le);Gs.styles=Be(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n #portal {\n isolation: isolate;\n }\n "])));Ef([K()],Gs.prototype,"modalStack",2);Gs=Ef([de("modal-portal")],Gs);var Ab=function(_Qn3){_inherits(Ab,_Qn3);function Ab(){_classCallCheck(this,Ab);return _callSuper(this,Ab,arguments)}_createClass(Ab,[{key:"getTemplate",value:function getTemplate(o){return o instanceof Function?o():o}},{key:"render",value:function render(o,s,B){o instanceof Function&&(o=o()),this.modalRegistry?o?this.modalRegistry.replace(this.getTemplate(s),B):(this.modalRegistry.remove(),this.modalRegistry=void 0):o&&(this.modalRegistry=Rn.push(this.getTemplate(s),B))}}]);return Ab}(Qn);var an=qn(Ab),Lb="@charset \"UTF-8\";.wy-light :where(wy-chat),.wy-light :where(wy-files),.wy-light :where(wy-messenger),.wy-light :where(wy-posts),.wy-light :where(wy-portal),:host(.wy-light),:host .wy-light,::slotted(.wy-light){color-scheme:light;--wy-primary: var(--wy-primary-40, #006399);--wy-on-primary: var(--wy-white, #ffffff);--wy-primary-container: var(--wy-primary-90, #cde5ff);--wy-on-primary-container: var(--wy-primary-10, #001d32);--wy-secondary: var(--wy-secondary-40, #3b6a1c);--wy-on-secondary: var(--wy-white, #ffffff);--wy-secondary-container: var(--wy-secondary-90, #bbf294);--wy-on-secondary-container: var(--wy-secondary-10, #0a2100);--wy-tertiary: var(--wy-tertiary-40, #3b6a1c);--wy-on-tertiary: var(--wy-white, #ffffff);--wy-tertiary-container: var(--wy-tertiary-90, #bbf294);--wy-on-tertiary-container: var(--wy-tertiary-10, #0a2100);--wy-error: var(--wy-error-40, #ba1824);--wy-on-error: var(--wy-white, #ffffff);--wy-error-container: var(--wy-error-90, #ffdad7);--wy-on-error-container: var(--wy-error-10, #410004);--wy-warning: var(--wy-warning-70, #afb140);--wy-on-warning: var(--wy-black, #000000);--wy-warning-container: var(--wy-warning-90, #e7e971);--wy-on-warning-container: var(--wy-warning-10, #1c1d00);--wy-background: var(--wy-neutral-99, #fcfcff);--wy-on-background: var(--wy-neutral-10, #1a1c1e);--wy-surface: var(--wy-neutral-99, #fcfcff);--wy-on-surface: var(--wy-neutral-10, #1a1c1e);--wy-surface-variant: var(--wy-neutral-variant-90, #dee3eb);--wy-on-surface-variant: var(--wy-neutral-variant-30, #42474e);--wy-outline: var(--wy-neutral-variant-50, #72777e);--wy-outline-variant: var(--wy-neutral-variant-80, #c2c7ce);--wy-inverse-surface: var(--wy-neutral-20, #2f3033);--wy-on-inverse-surface: var(--wy-neutral-95, #f0f0f4);--wy-inverse-primary: var(--wy-primary-80, #95ccff);--wy-surface-1: var(--wy-surface-1-light, #f1f2f7);--wy-surface-2: var(--wy-surface-2-light, #eaedf3);--wy-surface-3: var(--wy-surface-3-light, #e3e7ee);--wy-surface-4: var(--wy-surface-4-light, #e1e6ed);--wy-surface-5: var(--wy-surface-5-light, #dce2ea);--wy-link: var(--wy-primary-40, #006399);--wy-blue: var(--wy-blue-light, #89a9fc);--wy-indigo: var(--wy-indigo-light, #9185de);--wy-purple: var(--wy-purple-light, #c675b7);--wy-pink: var(--wy-pink-light, #d57194);--wy-red: var(--wy-red-light, #db726c);--wy-orange: var(--wy-orange-light, #e89a3a);--wy-yellow: var(--wy-yellow-light, #afb140);--wy-green: var(--wy-green-light, #00a38b);--wy-teal: var(--wy-teal-light, #00a0a8);--wy-cyan: var(--wy-cyan-light, #0082a1);--wy-gray: var(--wy-gray-light, #76777a);--wy-presence-active: var(--wy-green-light, #00a38b);--wy-code-text: var(--wy-code-text-light, #3b3b3b);--wy-code-variable: var(--wy-code-variable-light, #001080);--wy-code-operator: var(--wy-code-operator-light, #000000);--wy-code-prolog: var(--wy-code-prolog-light, #000080);--wy-code-comment: var(--wy-code-comment-light, #008000);--wy-code-builtin: var(--wy-code-builtin-light, #0070C1);--wy-code-number: var(--wy-code-number-light, #098658);--wy-code-inserted: var(--wy-code-inserted-light, #098658);--wy-code-constant: var(--wy-code-constant-light, #811F3F);--wy-code-hexcode: var(--wy-code-hexcode-light, #811F3F);--wy-code-regex: var(--wy-code-regex-light, #811F3F);--wy-code-char: var(--wy-code-char-light, #811F3F);--wy-code-tag: var(--wy-code-tag-light, #800000);--wy-code-attr-name: var(--wy-code-attr-name-light, #E50000);--wy-code-selector: var(--wy-code-selector-light, #E50000);--wy-code-property: var(--wy-code-property-light, #E50000);--wy-code-deleted: var(--wy-code-deleted-light, #A31515);--wy-code-string: var(--wy-code-string-light, #A31515);--wy-code-changed: var(--wy-code-changed-light, #0451A5);--wy-code-punctuation: var(--wy-code-punctuation-light, #000000);--wy-code-function: var(--wy-code-function-light, #0000FF);--wy-code-keyword: var(--wy-code-keyword-light, #AF00DB);--wy-code-class-name: var(--wy-code-class-name-light, #267F99)}.wy-dark:not(.wy-light) :where(wy-chat),.wy-dark:not(.wy-light) :where(wy-files),.wy-dark:not(.wy-light) :where(wy-messenger),.wy-dark:not(.wy-light) :where(wy-posts),.wy-dark:not(.wy-light) :where(wy-portal),:host(.wy-dark:not(.wy-light)),:host .wy-dark:not(.wy-light),::slotted(.wy-dark:not(.wy-light)){color-scheme:dark;--wy-primary: var(--wy-primary-80, #95ccff);--wy-on-primary: var(--wy-primary-20, #003352);--wy-primary-container: var(--wy-primary-30, #004a75);--wy-on-primary-container: var(--wy-primary-90, #cde5ff);--wy-secondary: var(--wy-secondary-80, #a0d57b);--wy-on-secondary: var(--wy-secondary-20, #163800);--wy-secondary-container: var(--wy-secondary-30, #245103);--wy-on-secondary-container: var(--wy-secondary-90, #bbf294);--wy-tertiary: var(--wy-tertiary-80, #a0d57b);--wy-on-tertiary: var(--wy-tertiary-20, #163800);--wy-tertiary-container: var(--wy-tertiary-30, #245103);--wy-on-tertiary-container: var(--wy-tertiary-90, #bbf294);--wy-error: var(--wy-error-80, #ffb3ae);--wy-on-error: var(--wy-error-20, #68000b);--wy-error-container: var(--wy-error-30, #930014);--wy-on-error-container: var(--wy-error-90, #ffdad7);--wy-warning: var(--wy-warning-90, #e7e971);--wy-on-warning: var(--wy-warning-30, #484a00);--wy-warning-container: var(--wy-warning-50, #7a7c05);--wy-on-warning-container: var(--wy-warning-95, #f5f77d);--wy-background: var(--wy-neutral-10, #1a1c1e);--wy-on-background: var(--wy-neutral-90, #e2e2e5);--wy-surface: var(--wy-neutral-10, #1a1c1e);--wy-on-surface: var(--wy-neutral-90, #e2e2e5);--wy-surface-variant: var(--wy-neutral-variant-30, #42474e);--wy-on-surface-variant: var(--wy-neutral-variant-80, #c2c7ce);--wy-outline: var(--wy-neutral-variant-60, #8c9198);--wy-outline-variant: var(--wy-neutral-variant-30, #42474e);--wy-inverse-surface: var(--wy-neutral-90, #e2e2e5);--wy-on-inverse-surface: var(--wy-neutral-20, #2f3033);--wy-inverse-primary: var(--wy-primary-40, #006399);--wy-surface-1: var(--wy-surface-1-dark, #212427);--wy-surface-2: var(--wy-surface-2-dark, #25292d);--wy-surface-3: var(--wy-surface-3-dark, #292e33);--wy-surface-4: var(--wy-surface-4-dark, #2b3035);--wy-surface-5: var(--wy-surface-5-dark, #2d3338);--wy-link: var(--wy-primary-80, #95ccff);--wy-blue: var(--wy-blue-dark, #b1c5ff);--wy-indigo: var(--wy-indigo-dark, #9185de);--wy-purple: var(--wy-purple-dark, #e38fd3);--wy-pink: var(--wy-pink-dark, #f48bae);--wy-red: var(--wy-red-dark, #db726c);--wy-orange: var(--wy-orange-dark, #e89a3a);--wy-yellow: var(--wy-yellow-dark, #cacc58);--wy-green: var(--wy-green-dark, #00a38b);--wy-teal: var(--wy-teal-dark, #00a0a8);--wy-cyan: var(--wy-cyan-dark, #009dc3);--wy-gray: var(--wy-gray-dark, #909194);--wy-presence-active: var(--wy-green-dark, #00a38b);--wy-code-text: var(--wy-code-text-dark, #cccccc);--wy-code-variable: var(--wy-code-variable-dark, #9CDCFE);--wy-code-operator: var(--wy-code-operator-dark, #d4d4d4);--wy-code-prolog: var(--wy-code-prolog-dark, #569CD6);--wy-code-comment: var(--wy-code-comment-dark, #6a9955);--wy-code-builtin: var(--wy-code-builtin-dark, #4fc1ff);--wy-code-number: var(--wy-code-number-dark, #b5cea8);--wy-code-inserted: var(--wy-code-inserted-dark, #b5cea8);--wy-code-constant: var(--wy-code-constant-dark, #646695);--wy-code-hexcode: var(--wy-code-hexcode-dark, #646695);--wy-code-regex: var(--wy-code-regex-dark, #d16969);--wy-code-char: var(--wy-code-char-dark, #d16969);--wy-code-tag: var(--wy-code-tag-dark, #569cd6);--wy-code-attr-name: var(--wy-code-attr-name-dark, #9cdcfe);--wy-code-selector: var(--wy-code-selector-dark, #9cdcfe);--wy-code-property: var(--wy-code-property-dark, #9cdcfe);--wy-code-deleted: var(--wy-code-deleted-dark, #ce9178);--wy-code-string: var(--wy-code-string-dark, #ce9178);--wy-code-changed: var(--wy-code-changed-dark, #569cd6);--wy-code-punctuation: var(--wy-code-punctuation-dark, #D4D4D4);--wy-code-function: var(--wy-code-function-dark, #569cd6);--wy-code-keyword: var(--wy-code-keyword-dark, #C586C0);--wy-code-class-name: var(--wy-code-class-name-dark, #4ec9b0)}:where(:host,:host>*,[class^=wy-],[class*=\" wy-\"]){box-sizing:border-box;text-align:initial;font-size:var(--wy-font-size-base, var(--wy-font-size, 1em))}:where(:host,:host>*,[class^=wy-],[class*=\" wy-\"]) *:before,:where(:host,:host>*,[class^=wy-],[class*=\" wy-\"]) *:after{box-sizing:inherit}:where(:host,:host>*,[class^=wy-],[class*=\" wy-\"]):where(a),:where(:host,:host>*,[class^=wy-],[class*=\" wy-\"]) *:where(a){text-decoration:var(--wy-link-decoration, none);color:var(--wy-link, var(--wy-primary-40, #006399))}:where(:host,:host>*,[class^=wy-],[class*=\" wy-\"]):where(a):hover,:where(:host,:host>*,[class^=wy-],[class*=\" wy-\"]) *:where(a):hover{text-decoration:var(--wy-link-hover-decoration, unset)}:where(:host,:host>*,[class^=wy-],[class*=\" wy-\"]):where(a):where(:not([href]):not([class])),:where(:host,:host>*,[class^=wy-],[class*=\" wy-\"]):where(a):where(:not([href]):not([class])):hover,:where(:host,:host>*,[class^=wy-],[class*=\" wy-\"]) *:where(a):where(:not([href]):not([class])),:where(:host,:host>*,[class^=wy-],[class*=\" wy-\"]) *:where(a):where(:not([href]):not([class])):hover{text-decoration:none}:where(:host,:host>*,[class^=wy-],[class*=\" wy-\"]):where(p),:where(:host,:host>*,[class^=wy-],[class*=\" wy-\"]) *:where(p){margin-top:0;margin-bottom:calc(1 * var(--wy-rem, 1rem))}:where(:host,:host>*,[class^=wy-],[class*=\" wy-\"]):where(label),:where(:host,:host>*,[class^=wy-],[class*=\" wy-\"]) *:where(label){cursor:inherit}:where(:host,:host>*,[class^=wy-],[class*=\" wy-\"])[hidden],:where(:host,:host>*,[class^=wy-],[class*=\" wy-\"]) *[hidden]{display:none!important}:where(:host,:host>*,[class^=wy-],[class*=\" wy-\"]):where([role=button]),:where(:host,:host>*,[class^=wy-],[class*=\" wy-\"]) *:where([role=button]){cursor:pointer}.wy-scroll-y{overflow-y:auto;touch-action:pan-y,pan-x;will-change:scroll-position,opacity;backface-visibility:hidden;max-height:100%;scroll-padding-top:var(--wy-scrollbar-adjust-top, 0);scroll-padding-bottom:var(--wy-scrollbar-adjust-bottom, 0)}.wy-scroll-y:not(body){-webkit-overflow-scrolling:touch}.wy-scroll-y:not(.wy-scroll-x){overflow-x:hidden;touch-action:pan-y}.wy-scroll-x{overflow-x:auto;touch-action:pan-y,pan-x;will-change:scroll-position,opacity;backface-visibility:hidden;max-width:100%}.wy-scroll-x:not(.wy-scroll-y){overflow-y:hidden;touch-action:pan-x}.wy-scrollbars.wy-scroll-y,.wy-scrollbars .wy-scroll-y{scrollbar-width:thin;scrollbar-color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e)) transparent}@supports (overflow-y: overlay){.wy-scrollbars.wy-scroll-y,.wy-scrollbars .wy-scroll-y{overflow-y:overlay}}.wy-scrollbars.wy-scroll-y::-webkit-scrollbar,.wy-scrollbars .wy-scroll-y::-webkit-scrollbar{height:.625rem;width:.625rem;background:transparent;z-index:999}.wy-scrollbars.wy-scroll-y::-webkit-scrollbar-track,.wy-scrollbars .wy-scroll-y::-webkit-scrollbar-track{background:transparent}.wy-scrollbars.wy-scroll-y::-webkit-scrollbar-thumb,.wy-scrollbars .wy-scroll-y::-webkit-scrollbar-thumb{background-color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e));border:.125rem solid transparent;border-radius:.5rem;background-clip:padding-box;opacity:75%}.wy-scrollbars.wy-scroll-y::-webkit-scrollbar-thumb:hover,.wy-scrollbars .wy-scroll-y::-webkit-scrollbar-thumb:hover{background-color:var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce));opacity:75%}.wy-scrollbars.wy-scroll-y::-webkit-scrollbar-thumb:window-inactive,.wy-scrollbars .wy-scroll-y::-webkit-scrollbar-thumb:window-inactive{background-color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e));opacity:50%}.wy-scrollbars.wy-scroll-y::-webkit-scrollbar-button:vertical:start:single-button,.wy-scrollbars .wy-scroll-y::-webkit-scrollbar-button:vertical:start:single-button{height:var(--wy-scrollbar-adjust-top, 0)}.wy-scrollbars.wy-scroll-y::-webkit-scrollbar-button:vertical:end:single-button,.wy-scrollbars .wy-scroll-y::-webkit-scrollbar-button:vertical:end:single-button{height:var(--wy-scrollbar-adjust-bottom, 0)}.wy-block-scroll{overflow:hidden!important}.wy-scrollbar-detection{position:fixed;top:0;left:0;width:8rem;height:8rem;overflow:scroll;z-index:-99999;pointer-events:none;visibility:hidden}.wy-appbars{backface-visibility:hidden;--wy-component-background-color: var(--wy-surface-1, var(--wy-surface-1-light, #f1f2f7));background-color:var(--wy-component-background-color);box-shadow:var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce)) 0 -1px 0 0 inset}@supports (position: sticky){.wy-appbars{position:sticky;top:0;z-index:1020}}@supports (backdrop-filter: blur(calc(.5 * var(--wy-rem, 1rem)))){.wy-appbars{-webkit-backdrop-filter:blur(calc(.5 * var(--wy-rem, 1rem)));backdrop-filter:blur(calc(.5 * var(--wy-rem, 1rem)))}.wy-appbars>.wy-appbar{-webkit-backdrop-filter:none;backdrop-filter:none}}.wy-appbars>.wy-appbar,.wy-appbars>.wy-toolbar{background-color:transparent;box-shadow:none}.wy-appbar{--wy-component-color: var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e));--wy-component-background-color: var(--wy-surface-1, var(--wy-surface-1-light, #f1f2f7));display:grid;align-items:center;justify-content:space-between;justify-items:center;height:var(--wy-appbar-height, calc(3 * var(--wy-rem, 1rem)));padding:calc(.25 * var(--wy-rem, 1rem));flex:0 0 var(--wy-appbar-height, calc(3 * var(--wy-rem, 1rem)));grid-template-columns:minmax(calc(2.5 * var(--wy-rem, 1rem)),max-content) minmax(0,max-content) minmax(calc(2.5 * var(--wy-rem, 1rem)),max-content);column-gap:calc(.5 * var(--wy-rem, 1rem));line-height:var(--wy-line-height-base, );background-color:var(--wy-component-background-color);color:var(--wy-component-color);box-shadow:var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce)) 0 -1px 0 0 inset}.wy-appbar .wy-badge{align-self:center}.wy-appbar .wy-button{max-height:calc(2.5 * var(--wy-rem, 1rem))}.wy-appbar-buttons,.wy-toolbar-buttons{display:flex;flex:0 0 auto;align-items:center}.wy-toolbar-buttons-last{margin-inline-start:auto}.wy-appbar-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%;color:inherit!important;-webkit-user-select:none;user-select:none}.wy-appbar-text a,.wy-appbar-text a:hover{color:inherit}.wy-appbar-text-trashed{text-decoration:line-through}.wy-toolbars-bottom{position:absolute;z-index:1030;bottom:calc(var(--wy-footerbar-height, calc(4 * var(--wy-rem, 1rem))) / 2);left:0;right:0;min-height:var(--wy-appbar-height, calc(3 * var(--wy-rem, 1rem)));display:flex;flex-direction:column;justify-content:center;justify-items:center}.wy-toolbar{--wy-component-color: var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e));--wy-component-background-color: var(--wy-surface-1, var(--wy-surface-1-light, #f1f2f7));display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;justify-items:center;min-height:var(--wy-appbar-height, calc(3 * var(--wy-rem, 1rem)));padding:calc(.25 * var(--wy-rem, 1rem));flex:1 0 var(--wy-appbar-height, calc(3 * var(--wy-rem, 1rem)));column-gap:calc(.25 * var(--wy-rem, 1rem));line-height:var(--wy-line-height-base, );background-color:var(--wy-component-background-color);color:var(--wy-component-color);box-shadow:var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce)) 0 -1px 0 0 inset}.wy-toolbar-center{margin:0 auto;border-radius:var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)))}.wy-toolbar-center .wy-input{text-align:center}.wy-toolbar-text{margin-left:calc(.25 * var(--wy-rem, 1rem))}.wy-footerbars{padding-bottom:var(--wy-footerbar-height, calc(4 * var(--wy-rem, 1rem)))}.wy-footerbars>.wy-toolbar{box-shadow:none}.wy-footerbar{--wy-component-background-color: var(--wy-surface-1, var(--wy-surface-1-light, #f1f2f7));--wy-component-color: var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e));position:absolute;bottom:0;left:0;right:0;z-index:1020}.wy-footerbar:after{content:\"\";background-color:var(--wy-component-background-color);color:var(--wy-component-color);box-shadow:var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce)) 0 1px 0 0 inset;position:absolute;width:100%;left:0;bottom:0;height:100%;z-index:-1;backface-visibility:hidden}@supports (backdrop-filter: blur(calc(.5 * var(--wy-rem, 1rem)))){.wy-footerbar:after{-webkit-backdrop-filter:blur(calc(.5 * var(--wy-rem, 1rem)));backdrop-filter:blur(calc(.5 * var(--wy-rem, 1rem)))}}.wy-footerbar .wy-buttons{flex-direction:row-reverse}.wy-footerbar .wy-buttons>:not(:last-child){margin:0 0 0 calc(.5 * var(--wy-rem, 1rem))}.wy-footerbar-sticky{position:sticky}.wy-footerbars-fixed .wy-footerbar{position:fixed}.wy-footerbars-fixed .wy-footerbar:after{position:fixed;height:var(--wy-footerbar-height, calc(4 * var(--wy-rem, 1rem)))}.wy-avatar{border-radius:50%}.wy-avatar-img{width:var(--wy-component-avatar-size, calc(2 * var(--wy-rem, 1rem)));height:var(--wy-component-avatar-size, calc(2 * var(--wy-rem, 1rem)))}.wy-avatar-initials{background-color:var(--wy-component-avatar-background-color, var(--wy-primary, var(--wy-primary-40, #006399)));color:var(--wy-component-avatar-color, var(--wy-on-primary, var(--wy-white, #ffffff)));width:var(--wy-component-avatar-size, calc(2 * var(--wy-rem, 1rem)));height:var(--wy-component-avatar-size, calc(2 * var(--wy-rem, 1rem)));display:flex;align-items:center;align-content:center;justify-content:center;justify-items:center;font-size:calc(var(--wy-component-avatar-size, calc(2 * var(--wy-rem, 1rem))))}.wy-avatar-initials>span{font-size:max(8px,var(--wy-avatar-font-size, .382em));font-weight:var(--wy-avatar-font-weight, 600);line-height:1}.wy-avatar-header{padding:calc(1.5 * var(--wy-rem, 1rem));margin-left:auto;margin-right:auto;text-align:center;display:flex;flex-direction:column;justify-content:center;align-items:center}.wy-avatar-presence{position:relative;display:flex}.wy-avatar-group{position:relative;display:inline-flex;flex-shrink:0;width:var(--wy-component-avatar-size, calc(2 * var(--wy-rem, 1rem)));height:var(--wy-component-avatar-size, calc(2 * var(--wy-rem, 1rem)))}.wy-avatar-group wy-avatar:first-child{position:absolute;top:0;left:0;display:unset;-webkit-mask-image:radial-gradient(at bottom right,rgba(0,0,0,0) calc(35% + .125 * var(--wy-rem, 1rem)),rgb(0,0,0) calc(35% + .1875 * var(--wy-rem, 1rem)));mask-image:radial-gradient(at bottom right,#0000 calc(35% + .125 * var(--wy-rem, 1rem)),#000 calc(35% + .1875 * var(--wy-rem, 1rem)))}.wy-avatar-group wy-avatar:last-child{position:absolute;bottom:0;right:0;display:unset}.wy-presence{background-color:var(--wy-component-background-color, transparent);width:calc(.75 * var(--wy-rem, 1rem));height:calc(.75 * var(--wy-rem, 1rem));border-radius:50%;position:absolute;bottom:0;right:-5%;box-sizing:border-box}.wy-presence:not(.wy-presence-active){display:none}.wy-presence:after{content:\"\";position:absolute;width:100%;height:100%;top:0;left:0;border-radius:inherit;background-color:var(--wy-presence-active, var(--wy-green-light, #00a38b));background-clip:content-box;padding:calc(.125 * var(--wy-rem, 1rem));box-sizing:border-box}.wy-presence-away:after{background-color:var(--wy-presence-away, var(, ))}.wy-presence-in-text{position:absolute;top:calc(.375 * var(--wy-rem, 1rem));left:calc(.25 * var(--wy-rem, 1rem));bottom:auto;right:auto}.wy-button{--wy-component-color: var(--wy-primary, var(--wy-primary-40, #006399));color:var(--wy-component-color);background:var(--wy-component-background-color, transparent);padding:var(--wy-btn-padding-y, .5em) var(--wy-btn-padding-x, 1.5em);font-family:var(--wy-btn-font-family, var(--wy-font-family, unset)),inherit;font-size:var(--wy-btn-font-size, var(--wy-font-size-base, 1em));font-weight:var(--wy-btn-font-weight, 400);line-height:var(--wy-btn-line-height, var(--wy-line-height, 1.5));text-align:center;text-decoration:none;vertical-align:middle;cursor:pointer;-webkit-user-select:none;user-select:none;border:var(--wy-btn-border-width, 0) solid var(--wy-btn-border-color, transparent);border-radius:var(--wy-btn-border-radius, 1.25em);display:inline-flex;align-items:center;justify-content:center;gap:calc(.25 * var(--wy-rem, 1rem));position:relative}.wy-button:not(.wy-button-link,:disabled)>*{z-index:3}.wy-button:not(.wy-button-link,:disabled):before{content:\"\";z-index:2;position:absolute;top:0;left:0;width:100%;height:100%;border-radius:inherit;background:var(--wy-component-color);opacity:0%}.wy-button:not(.wy-button-link,:disabled):hover:before{opacity:8%}.wy-button:not(.wy-button-link,:disabled):focus:before,.wy-button:not(.wy-button-link,:disabled):active:before,.wy-button:not(.wy-button-link,:disabled).wy-active:before{opacity:12%}.wy-button:disabled{opacity:var(--wy-opacity-disabled, 38%);cursor:unset;pointer-events:none}.wy-button-icon{--wy-component-color: var(--wy-on-surface-variant, var(--wy-neutral-variant-30, #42474e));width:calc(2.5 * var(--wy-rem, 1rem));height:calc(2.5 * var(--wy-rem, 1rem));padding:calc(.5 * var(--wy-rem, 1rem));line-height:1;border-radius:var(--wy-border-radius-pill, calc(50 * var(--wy-rem, 1rem)));border-width:0;align-items:center;justify-content:center}.wy-button-icon.wy-active{--wy-component-color: var(--wy-primary, var(--wy-primary-40, #006399))}.wy-button-icon-inline{background:var(--wy-component-background-color);color:currentColor;border-radius:var(--wy-border-radius-pill, calc(50 * var(--wy-rem, 1rem)));display:flex;width:auto;background-clip:content-box}.wy-button-inline{border-radius:var(--wy-border-radius-pill, calc(50 * var(--wy-rem, 1rem)));padding:calc(.5 * var(--wy-rem, 1rem)) calc(.75 * var(--wy-rem, 1rem))}.wy-button-primary{--wy-component-background-color: var(--wy-primary, var(--wy-primary-40, #006399));--wy-component-color: var(--wy-on-primary, var(--wy-white, #ffffff))}.wy-button-variant{--wy-component-background-color: var(--wy-surface-variant, var(--wy-neutral-variant-90, #dee3eb));--wy-component-color: var(--wy-on-surface-variant, var(--wy-neutral-variant-30, #42474e))}.wy-button-primary-text{--wy-component-color: var(--wy-primary, var(--wy-primary-40, #006399))}.wy-button-link{padding:0;color:var(--wy-link-color, var(--wy-primary, var(--wy-primary-40, #006399)));text-decoration:var(--wy-link-decoration, none)}.wy-button-link:hover,.wy-button-link:focus{text-decoration:var(--wy-link-hover-decoration, unset)}.wy-buttons{display:flex;align-items:center;flex-wrap:wrap;gap:calc(.5 * var(--wy-rem, 1rem))}.wy-code pre,.wy-content pre{text-wrap:pretty}.wy-code code[class*=language-],.wy-code pre[class*=language-],.wy-content code[class*=language-],.wy-content pre[class*=language-]{color:var(--wy-code-text, var(--wy-code-text-light, #3b3b3b));font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;text-align:left;white-space:pre-wrap;word-spacing:normal;word-break:normal;word-wrap:break-word;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}@media print{.wy-code code[class*=language-],.wy-code pre[class*=language-],.wy-content code[class*=language-],.wy-content pre[class*=language-]{text-shadow:none}}.wy-code pre[class*=language-],.wy-content pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}.wy-code :not(pre)>code[class*=language-],.wy-code pre[class*=language-],.wy-content :not(pre)>code[class*=language-],.wy-content pre[class*=language-]{color:var(--wy-code-text, var(--wy-code-text-light, #3b3b3b));background:var(--wy-background, var(--wy-neutral-99, #fcfcff))}.wy-code :not(pre)>code[class*=language-],.wy-content :not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.wy-code .token.variable,.wy-content .token.variable{color:var(--wy-code-variable, var(--wy-code-variable-light, #001080))}.wy-code .token.operator,.wy-content .token.operator{color:var(--wy-code-operator, var(--wy-code-operator-light, #000000))}.wy-code .token.prolog,.wy-content .token.prolog{color:var(--wy-code-prolog, var(--wy-code-prolog-light, #000080))}.wy-code .token.comment,.wy-content .token.comment{color:var(--wy-code-comment, var(--wy-code-comment-light, #008000))}.wy-code .token.builtin,.wy-content .token.builtin{color:var(--wy-code-builtin, var(--wy-code-builtin-light, #0070C1))}.wy-code .token.number,.wy-content .token.number{color:var(--wy-code-number, var(--wy-code-number-light, #098658))}.wy-code .token.inserted,.wy-content .token.inserted{color:var(--wy-code-inserted, var(--wy-code-inserted-light, #098658))}.wy-code .token.constant,.wy-content .token.constant{color:var(--wy-code-constant, var(--wy-code-constant-light, #811F3F))}.wy-code .token.hexcode,.wy-content .token.hexcode{color:var(--wy-code-hexcode, var(--wy-code-hexcode-light, #811F3F))}.wy-code .token.regex,.wy-content .token.regex{color:var(--wy-code-regex, var(--wy-code-regex-light, #811F3F))}.wy-code .token.char,.wy-content .token.char{color:var(--wy-code-char, var(--wy-code-char-light, #811F3F))}.wy-code .token.tag,.wy-content .token.tag{color:var(--wy-code-tag, var(--wy-code-tag-light, #800000))}.wy-code .token.attr-name,.wy-content .token.attr-name{color:var(--wy-code-attr-name, var(--wy-code-attr-name-light, #E50000))}.wy-code .token.selector,.wy-content .token.selector{color:var(--wy-code-selector, var(--wy-code-selector-light, #E50000))}.wy-code .token.property,.wy-content .token.property{color:var(--wy-code-property, var(--wy-code-property-light, #E50000))}.wy-code .token.deleted,.wy-content .token.deleted{color:var(--wy-code-deleted, var(--wy-code-deleted-light, #A31515))}.wy-code .token.string,.wy-content .token.string{color:var(--wy-code-string, var(--wy-code-string-light, #A31515))}.wy-code .token.changed,.wy-content .token.changed{color:var(--wy-code-changed, var(--wy-code-changed-light, #0451A5))}.wy-code .token.punctuation,.wy-content .token.punctuation{color:var(--wy-code-punctuation, var(--wy-code-punctuation-light, #000000))}.wy-code .token.function,.wy-content .token.function{color:var(--wy-code-function, var(--wy-code-function-light, #0000FF))}.wy-code .token.keyword,.wy-content .token.keyword{color:var(--wy-code-keyword, var(--wy-code-keyword-light, #AF00DB))}.wy-code .token.class-name,.wy-content .token.class-name{color:var(--wy-code-class-name, var(--wy-code-class-name-light, #267F99))}.wy-code .token.important,.wy-code .token.bold,.wy-content .token.important,.wy-content .token.bold{font-weight:700}.wy-code .token.italic,.wy-content .token.italic{font-style:italic}.wy-content{overflow-wrap:break-word;min-width:0}.wy-content :not(pre)>code{overflow-wrap:inherit}.wy-content pre,.wy-content pre>code[class*=language-]{white-space:pre-wrap}.wy-content :last-child{margin-bottom:0}.wy-content:empty{display:none}.wy-hashtag{color:var(--wy-primary, var(--wy-primary-40, #006399))}.wy-mention{font-weight:500}.wy-dropdown,.wy-dropup{position:relative}.wy-dropdown-toggle{white-space:nowrap}.wy-dropdown-menu{--wy-component-background-color: var(--wy-surface-2, var(--wy-surface-2-light, #eaedf3));--wy-component-color: var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e));background-color:var(--wy-component-background-color);color:var(--wy-component-color);position:absolute;z-index:1000;min-width:calc(10 * var(--wy-rem, 1rem));padding:0;margin:0;font-size:var(--wy-font-size-base, var(--wy-font-size, 1em));text-align:left;list-style:none;background-clip:padding-box;border-radius:var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)));box-shadow:var(--wy-shadow-level1, 0 calc(.125 * var(--wy-rem, 1rem)) calc(.125 * var(--wy-rem, 1rem)) 0 rgba(0, 0, 0, .14), 0 calc(.1875 * var(--wy-rem, 1rem)) calc(.0625 * var(--wy-rem, 1rem)) calc(-.125 * var(--wy-rem, 1rem)) rgba(0, 0, 0, .2), 0 calc(.0625 * var(--wy-rem, 1rem)) calc(.3125 * var(--wy-rem, 1rem)) 0 rgba(0, 0, 0, .12));overflow:hidden;display:block}.wy-dropdown-menu[data-bs-popper]{top:100%;left:0;margin-top:calc(.25 * var(--wy-rem, 1rem))}.wy-dropup .wy-dropdown-menu{top:auto;bottom:100%;margin-top:0;margin-bottom:0}[data-bs-toggle=dropdown]~.wy-dropdown-menu:not(.show){display:none}[data-bs-toggle=dropdown]~.wy-dropdown-menu[hidden].show{display:block!important}.wy-dropdown-menu-end{right:0}.wy-dropdown-item{background-color:transparent;color:var(--wy-component-color, var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e)));display:block;width:100%;padding:calc(.75 * var(--wy-rem, 1rem)) calc(1 * var(--wy-rem, 1rem));clear:both;font-family:var(--wy-font-family, unset),inherit;font-size:inherit;font-weight:400;line-height:1;text-align:inherit;text-decoration:none;white-space:nowrap;border:0;gap:calc(.25 * var(--wy-rem, 1rem));cursor:pointer;display:flex;align-items:center}.wy-dropdown-item:hover,.wy-dropdown-item:focus{--wy-component-color: var(--wy-on-surface-variant, var(--wy-neutral-variant-30, #42474e));--wy-component-background-color: var(--wy-surface-variant, var(--wy-neutral-variant-90, #dee3eb));color:var(--wy-component-color);background-color:var(--wy-component-background-color);text-decoration:none}.wy-dropdown-item.wy-active,.wy-dropdown-item:active{--wy-component-color: var(--wy-on-primary-container, var(--wy-primary-10, #001d32));--wy-component-background-color: var(--wy-primary-container, var(--wy-primary-90, #cde5ff));color:var(--wy-component-color);background-color:var(--wy-component-background-color);text-decoration:none}.wy-dropdown-item.wy-disabled,.wy-dropdown-item:disabled{color:var(--wy-component-color);background-color:var(--wy-component-background-color);pointer-events:none;opacity:var(--wy-opacity-disabled, 38%)}.wy-dropdown-item>img,.wy-dropdown-item>wy-icon{margin-right:calc(.5 * var(--wy-rem, 1rem))}.wy-dropdown-item>img,.wy-dropdown-item>img .wy-icon,.wy-dropdown-item>wy-icon,.wy-dropdown-item>wy-icon .wy-icon{color:inherit}.wy-dropdown-item:active>wy-icon,.wy-dropdown-item:active>wy-icon .wy-icon{color:inherit}.wy-dropdown-item.wy-option wy-icon{visibility:hidden}.wy-dropdown-item.wy-option.wy-selected wy-icon{visibility:visible}.wy-dropdown-divider{height:0;margin:0;overflow:hidden;border:none;border-top:1px solid var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce))}.wy-emoji{font-size:1.25em;width:1em;height:1em;vertical-align:-.125em;line-height:1;display:inline-flex;justify-content:center;align-items:center}img.wy-emoji,svg.wy-emoji{vertical-align:-.25em}.wy-empty{display:flex;align-items:center;justify-content:center;flex:1;min-width:0;position:relative}.wy-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;position:relative;width:var(--wy-component-icon-width);height:var(--wy-component-icon-height)}.wy-icon:not([width]),.wy-icon[width=\"24\"]{width:var(--wy-component-icon-width, calc(1.5 * var(--wy-rem, 1rem)))}.wy-icon:not([height]),.wy-icon[height=\"24\"]{height:var(--wy-component-icon-height, calc(1.5 * var(--wy-rem, 1rem)))}.wy-icon-first{margin-left:calc(-.5 * var(--wy-rem, 1rem))}.wy-icon-last{margin-right:calc(-.5 * var(--wy-rem, 1rem))}.wy-icon-padded{margin:16.66666667%}.wy-icon-inline{vertical-align:-.25em}.wy-icon-overlay{position:absolute;bottom:0;right:0;background:var(--wy-component-background-color, var(--wy-background, var(--wy-neutral-99, #fcfcff)));border-radius:50%;border:1px solid var(--wy-component-background-color, var(--wy-background, var(--wy-neutral-99, #fcfcff)))}.wy-icon-stack{display:inline-flex;position:relative;line-height:1}.wy-icon-stack .wy-icon:last-child,.wy-icon-stack>svg:last-child{position:absolute;bottom:0;right:0;background-color:var(--wy-component-background-color, var(--wy-background, var(--wy-neutral-99, #fcfcff)));border-radius:50%;width:calc(var(--wy-component-icon-width) / 2);height:calc(var(--wy-component-icon-height) / 2)}.wy-icon-active-stack{display:inline-flex;position:relative;line-height:1}.wy-icon-active-stack .wy-icon-stack-item{transition:opacity var(--wy-transition, var(--wy-transition-duration, .2s) var(--wy-transition-curve, cubic-bezier(.4, 0, .2, 1)));align-self:center;justify-self:center;margin:auto}.wy-icon-active-stack .wy-icon-stack-item:last-child{position:absolute;opacity:0}.wy-icon-active-stack.wy-active .wy-icon-stack-item:first-child,.wy-active .wy-icon-active-stack .wy-icon-stack-item:first-child{opacity:0}.wy-icon-active-stack.wy-active .wy-icon-stack-item:last-child,.wy-active .wy-icon-active-stack .wy-icon-stack-item:last-child{opacity:1}.wy-icon:not([class*=wy-icon-color-]):not([class*=wy-kind-]):not([data-icon=progress]) *{fill:currentColor}.wy-content-icon{color:var(--wy-component-color, var(--wy-on-surface-variant, var(--wy-neutral-variant-30, #42474e)));border-radius:var(--wy-component-border-radius, var(--wy-border-radius-lg, calc(1.5 * var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem))))));display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:calc(1 * var(--wy-rem, 1rem)) calc(2 * var(--wy-rem, 1rem));margin:auto}.wy-content-icon>.wy-icon-stack,.wy-content-icon>.wy-icon,.wy-content-icon>wy-icon,.wy-content-icon ::slotted(.wy-icon-stack),.wy-content-icon ::slotted(.wy-icon),.wy-content-icon ::slotted(wy-icon){--wy-component-icon-width: calc(4 * var(--wy-rem, 1rem));--wy-component-icon-height: calc(4 * var(--wy-rem, 1rem))}.wy-content-name,.wy-content-meta{padding:calc(1 * var(--wy-rem, 1rem)) calc(2 * var(--wy-rem, 1rem));text-align:center}.wy-icon-color-theme *,.wy-icon-color-theme * *{fill:var(--wy-theme, var(, ))}.wy-icon-color-primary *,.wy-icon-color-primary * *{fill:var(--wy-primary, var(--wy-primary-40, #006399))}.wy-icon-color-secondary *,.wy-icon-color-secondary * *{fill:var(--wy-secondary, var(--wy-secondary-40, #3b6a1c))}.wy-icon-color-tertiary *,.wy-icon-color-tertiary * *{fill:var(--wy-tertiary, var(--wy-tertiary-40, #3b6a1c))}.wy-icon-color-surface *,.wy-icon-color-surface * *{fill:var(--wy-surface, var(--wy-neutral-99, #fcfcff))}.wy-icon-color-surface-variant *,.wy-icon-color-surface-variant * *{fill:var(--wy-surface-variant, var(--wy-neutral-variant-90, #dee3eb))}.wy-icon-color-error *,.wy-icon-color-error * *{fill:var(--wy-error, var(--wy-error-40, #ba1824))}.wy-icon-color-warning *,.wy-icon-color-warning * *{fill:var(--wy-warning, var(--wy-warning-70, #afb140))}.wy-icon-color-blue *,.wy-icon-color-blue * *{fill:var(--wy-blue, var(--wy-blue-light, #89a9fc))}.wy-icon-color-indigo *,.wy-icon-color-indigo * *{fill:var(--wy-indigo, var(--wy-indigo-light, #9185de))}.wy-icon-color-purple *,.wy-icon-color-purple * *{fill:var(--wy-purple, var(--wy-purple-light, #c675b7))}.wy-icon-color-pink *,.wy-icon-color-pink * *{fill:var(--wy-pink, var(--wy-pink-light, #d57194))}.wy-icon-color-red *,.wy-icon-color-red * *{fill:var(--wy-red, var(--wy-red-light, #db726c))}.wy-icon-color-orange *,.wy-icon-color-orange * *{fill:var(--wy-orange, var(--wy-orange-light, #e89a3a))}.wy-icon-color-yellow *,.wy-icon-color-yellow * *{fill:var(--wy-yellow, var(--wy-yellow-light, #afb140))}.wy-icon-color-green *,.wy-icon-color-green * *{fill:var(--wy-green, var(--wy-green-light, #00a38b))}.wy-icon-color-teal *,.wy-icon-color-teal * *{fill:var(--wy-teal, var(--wy-teal-light, #00a0a8))}.wy-icon-color-cyan *,.wy-icon-color-cyan * *{fill:var(--wy-cyan, var(--wy-cyan-light, #0082a1))}.wy-icon-color-gray *,.wy-icon-color-gray * *{fill:var(--wy-gray, var(--wy-gray-light, #76777a))}.wy-icon-color-black *,.wy-icon-color-black * *{fill:var(--wy-black, var(, ))}.wy-icon-color-white *,.wy-icon-color-white * *{fill:var(--wy-white, var(, ))}[class*=wy-kind-],[class*=wy-kind-] *{fill:var(--wy-gray, var(--wy-gray-light, #76777a))}.wy-kind-archive{fill:var(--wy-orange, var(--wy-orange-light, #e89a3a))}.wy-kind-audio *{fill:var(--wy-teal, var(--wy-teal-light, #00a0a8))}.wy-kind-code *{fill:var(--wy-green, var(--wy-green-light, #00a38b))}.wy-kind-document *{fill:var(--wy-blue, var(--wy-blue-light, #89a9fc))}.wy-kind-email *{fill:var(--wy-red, var(--wy-red-light, #db726c))}.wy-kind-presentation *{fill:var(--wy-orange, var(--wy-orange-light, #e89a3a))}.wy-kind-spreadsheet *{fill:var(--wy-green, var(--wy-green-light, #00a38b))}.wy-kind-image *{fill:var(--wy-pink, var(--wy-pink-light, #d57194))}.wy-kind-text *{fill:var(--wy-cyan, var(--wy-cyan-light, #0082a1))}.wy-kind-video *{fill:var(--wy-purple, var(--wy-purple-light, #c675b7))}.wy-ext-pdf *{fill:var(--wy-red, var(--wy-red-light, #db726c))}.wy-kind-text-icon{width:calc(1.25 * var(--wy-rem, 1rem));height:calc(1.25 * var(--wy-rem, 1rem));vertical-align:calc(-.3125 * var(--wy-rem, 1rem))}[data-icon=progress].wy-icon-primary{color:var(--wy-primary, var(--wy-primary-40, #006399))}[data-icon=progress] :first-child{fill:none;stroke:var(--wy-surface-variant, var(--wy-neutral-variant-90, #dee3eb))}[data-icon=progress] :last-child{fill:none;stroke:currentColor}.wy-image-grid{display:flex;flex-wrap:wrap;justify-content:space-evenly;position:relative;border-radius:var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)));overflow:hidden;column-gap:1px;row-gap:1px}.wy-image-grid .wy-image{padding:0;width:50%;position:relative;flex:auto;background-color:inherit;background-clip:content-box}.wy-image-grid .wy-image:first-of-type:not(:nth-last-of-type(2)){flex-basis:100%!important}.wy-image-grid .wy-image-area{display:block;height:100%;cursor:pointer}.wy-image-grid .wy-image-area img{position:absolute;height:100%;width:100%;object-fit:contain}.wy-image-grid .wy-more{position:absolute;line-height:100%;color:var(--wy-white, var(, ));top:0;left:0;bottom:0;right:0;display:flex;align-items:center;justify-content:center;font-size:calc(1.5 * var(--wy-rem, 1rem));background:rgba(0,0,0,var(--wy-opacity-disabled, 38%))}.wy-title{font-style:var(--wy-headings-font-style, unset);font-weight:var(--wy-headings-font-weight, 500);line-height:var(--wy-headings-line-height, var(--wy-line-height, 1.5));margin-top:.5em;margin-bottom:.5em;font-weight:400;font-size:2.5em;line-height:3em}.wy-headline{font-style:var(--wy-headings-font-style, unset);font-weight:var(--wy-headings-font-weight, 500);line-height:var(--wy-headings-line-height, var(--wy-line-height, 1.5));margin-top:.5em;margin-bottom:.5em;font-weight:400;font-size:1.5em;line-height:2em}.wy-label{font-style:var(--wy-headings-font-style, unset);font-weight:var(--wy-headings-font-weight, 500);line-height:var(--wy-headings-line-height, var(--wy-line-height, 1.5));margin-top:0;margin-bottom:0;font-weight:500;font-size:1em;line-height:1.5em}.wy-input{--wy-component-background-color: var(--wy-background, var(--wy-neutral-99, #fcfcff));--wy-component-color: var(--wy-on-background, var(--wy-neutral-10, #1a1c1e));background-color:var(--wy-component-background-color);color:var(--wy-component-color);border:var(--wy-input-border-width, 1px) solid var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce));display:block;width:100%;min-height:calc(2.5 * var(--wy-rem, 1rem));padding:var(--wy-input-padding-y, calc(.4375 * var(--wy-rem, 1rem))) var(--wy-input-padding-x, calc(.75 * var(--wy-rem, 1rem)));font-family:var(--wy-input-font-family, var(--wy-font-family, inherit)),inherit;font-size:var(--wy-input-font-size, var(--wy-font-size-base, 1em));font-weight:var(--wy-input-font-weight, var(--wy-font-weight, unset));line-height:var(--wy-input-line-height, var(--wy-line-height, calc(1.5 * var(--wy-rem, 1rem))));background-clip:padding-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--wy-input-border-radius, var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem))))}.wy-input:focus{--wy-component-color: var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e));color:var(--wy-component-color);border-color:var(--wy-primary, var(--wy-primary-40, #006399));outline:0}.wy-input::placeholder{color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e));opacity:1}.wy-input:disabled{opacity:38%}.wy-input::file-selector-button,.wy-input::-webkit-file-upload-button{color:var(--wy-component-color);background-color:var(--wy-component-background-color);padding:var(--wy-input-padding-y, calc(.4375 * var(--wy-rem, 1rem))) var(--wy-input-padding-x, calc(.75 * var(--wy-rem, 1rem)));margin:calc(-1 * var(--wy-input-padding-y, calc(.4375 * var(--wy-rem, 1rem)))) calc(-1 * var(--wy-input-padding-x, calc(.75 * var(--wy-rem, 1rem))));margin-inline-end:var(--wy-input-padding-x, calc(.75 * var(--wy-rem, 1rem)));pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:var(--wy-input-border-width, 1px);border-radius:0}.wy-input:hover:not(:disabled):not([readonly])::file-selector-button,.wy-input:hover:not(:disabled):not([readonly]) ::-webkit-file-upload-button{background-color:var(--wy-component-background-color)}.wy-input[type=file]{overflow:hidden}.wy-input[type=file]:not(:disabled):not([readonly]){cursor:pointer}.wy-input::-webkit-date-and-time-value{height:calc(var(--wy-input-line-height, var(--wy-line-height, calc(1.5 * var(--wy-rem, 1rem)))) * 1em)}.wy-input[type=search]::-webkit-search-cancel-button{-webkit-appearance:none}.wy-input-filled{--wy-component-background-color: var(--wy-surface-2, var(--wy-surface-2-light, #eaedf3));--wy-component-color: var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e));background-color:var(--wy-component-background-color);color:var(--wy-component-color);border-radius:calc(1.25 * var(--wy-rem, 1rem));border-color:var(--wy-component-background-color)}.wy-input-filled:focus{border-color:var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce))}.wy-input-label{font-style:var(--wy-headings-font-style, unset);font-weight:var(--wy-headings-font-weight, 500);line-height:var(--wy-headings-line-height, var(--wy-line-height, 1.5));margin-top:0;margin-bottom:0;font-weight:500;font-size:1em;line-height:1.5em;display:block;margin-bottom:calc(.5 * var(--wy-rem, 1rem))}.wy-description{margin-top:calc(.25 * var(--wy-rem, 1rem));font-size:var(--wy-font-size-sm, calc(.875 * var(--wy-font-size-base, 1em)))}.wy-is-invalid,.wy-is-invalid:focus{border-color:var(--wy-error, var(--wy-error-40, #ba1824))}.wy-invalid-feedback{margin-top:calc(.25 * var(--wy-rem, 1rem));font-size:var(--wy-font-size-sm, calc(.875 * var(--wy-font-size-base, 1em)));color:var(--wy-error, var(--wy-error-40, #ba1824))}.wy-input-group{position:relative}.wy-input-group>wy-icon{position:absolute;top:0;left:0;z-index:4}.wy-input-group>wy-icon+.wy-input{padding-left:calc(2.5 * var(--wy-rem, 1rem))}.wy-input-group-button-icon{position:absolute;top:0;right:0;z-index:4;border-radius:var(--wy-input-border-radius, var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem))))}.wy-input-group-input-filled~.wy-button-icon{border-radius:calc(1.25 * var(--wy-rem, 1rem))}.wy-input-group-input{padding-right:calc(2.5 * var(--wy-rem, 1rem))}.wy-input-group-input:placeholder-shown~.wy-input-group-button-icon[type=reset]{display:none}.wy-input-group-input:not(:placeholder-shown)~.wy-input-group-button-icon[type=reset]+.wy-input-group-button-icon{display:none}.wy-item{position:relative;display:flex;align-items:center;gap:calc(.5 * var(--wy-rem, 1rem));padding:calc(.25 * var(--wy-rem, 1rem)) calc(.75 * var(--wy-rem, 1rem));text-decoration:none;min-height:calc(3 * var(--wy-rem, 1rem))}.wy-item>.wy-avatar,.wy-item>wy-icon,.wy-item>wy-spinner,.wy-item>.wy-icon-stack{margin-left:calc(-.25 * var(--wy-rem, 1rem))}.wy-item-body{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wy-item-body>*{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wy-item-body+.wy-dropdown,.wy-item-body+.wy-button-icon,.wy-item-body+.wy-item-actions{margin-right:calc(-.5 * var(--wy-rem, 1rem))}.wy-item-body+.wy-emoji{margin-right:calc(.125 * var(--wy-rem, 1rem))}.wy-item-title{color:var(--wy-on-background, var(--wy-neutral-10, #1a1c1e));font-weight:var(--wy-headings-font-weight, 500);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wy-item-text{color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--wy-font-size-sm, calc(.875 * var(--wy-font-size-base, 1em)))}.wy-item-text .wy-icon{width:calc(1.25 * var(--wy-rem, 1rem));height:calc(1.25 * var(--wy-rem, 1rem));vertical-align:calc(-.3125 * var(--wy-rem, 1rem))}.wy-item-actions{--wy-component-background-color: transparent;display:flex;align-items:center;flex:0 0 auto}.wy-item-actions-top{position:absolute;top:calc(.25 * var(--wy-rem, 1rem));right:calc(.25 * var(--wy-rem, 1rem));margin:0!important}.wy-item-actions-bottom{position:absolute;bottom:calc(.25 * var(--wy-rem, 1rem));right:calc(.25 * var(--wy-rem, 1rem));margin:0!important}.wy-item-body:has(+.wy-item-actions-bottom) .wy-item-row:last-child{margin-right:calc(4.5 * var(--wy-rem, 1rem))}.wy-item-body:has(+.wy-item-actions-top) .wy-item-row:first-child{margin-right:calc(2 * var(--wy-rem, 1rem))}.wy-action-label{margin-right:calc(.5 * var(--wy-rem, 1rem));font-style:italic}.wy-item-row{display:flex;align-items:baseline}.wy-item-row:first-child{margin-bottom:calc(.125 * var(--wy-rem, 1rem))}.wy-item-row .wy-item-title,.wy-item-row .wy-item-text{margin-right:auto}.wy-item-row .wy-meta{margin:0 calc(.25 * var(--wy-rem, 1rem));white-space:nowrap}.wy-item-hover{-webkit-user-select:none;user-select:none;cursor:pointer}.wy-item-hover:hover,.wy-item-hover:focus{--wy-component-background-color: var(--wy-surface-2, var(--wy-surface-2-light, #eaedf3));--wy-component-color: var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e));background-color:var(--wy-component-background-color);color:var(--wy-component-color);text-decoration:none}.wy-item-hover:active{--wy-component-background-color: var(--wy-surface-variant, var(--wy-neutral-variant-90, #dee3eb));--wy-component-color: var(--wy-on-surface-variant, var(--wy-neutral-variant-30, #42474e));background-color:var(--wy-component-background-color);color:var(--wy-component-color)}.wy-item-hover.wy-disabled,.wy-item-hover:disabled{opacity:var(--wy-opacity-disabled, 38%);pointer-events:none}.wy-item-hover.wy-active{--wy-component-background-color: var(--wy-primary-container, var(--wy-primary-90, #cde5ff));--wy-component-color: var(--wy-on-primary-container, var(--wy-primary-10, #001d32));background-color:var(--wy-component-background-color);color:var(--wy-component-color);border-color:var(--wy-component-background-color)}.wy-item-trashed{text-decoration:line-through;opacity:var(--wy-opacity-disabled, 38%)}.wy-item-trashed.wy-item-hover:hover{opacity:1}.wy-item-lg{padding:calc(.75 * var(--wy-rem, 1rem));min-height:calc(4.5 * var(--wy-rem, 1rem));gap:calc(.75 * var(--wy-rem, 1rem))}.wy-item-lg>.wy-avatar,.wy-item-lg>wy-icon,.wy-item-lg>.wy-icon-stack{margin-left:0}.wy-list{border-radius:var(--wy-border-radius-sm, calc(.75 * var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)))));display:flex;flex-direction:column;gap:1px;min-width:0}.wy-list .wy-item:not(.wy-item-hover){--wy-component-background-color: var(--wy-background, var(--wy-neutral-99, #fcfcff));--wy-component-color: var(--wy-on-background, var(--wy-neutral-10, #1a1c1e));background-color:var(--wy-component-background-color);color:var(--wy-component-color)}.wy-list .wy-item:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.wy-list .wy-item:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.wy-list-bordered{border:1px solid var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce));gap:0}.wy-list-bordered .wy-item{border-top:1px solid var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce));border-left:none;border-right:none}.wy-list-bordered .wy-item:first-child{border-top:none}.wy-list-bordered .wy-item:last-child{border-bottom:none}.wy-list-bordered .wy-item+.wy-list-bordered .wy-item{border-top-width:0}.wy-messages{padding:calc(1 * var(--wy-rem, 1rem)) calc(1 * var(--wy-rem, 1rem)) calc(1 * var(--wy-rem, 1rem)) calc(.75 * var(--wy-rem, 1rem));flex:1 1 100%}.wy-message-placeholder{opacity:.5}.wy-date-separator{font-size:var(--wy-font-size-xs, calc(.75 * var(--wy-font-size-base, 1em)));pointer-events:none;margin:calc(.5 * var(--wy-rem, 1rem));text-align:center;position:sticky;top:calc(1.5 * var(--wy-rem, 1rem));z-index:10}.wy-date-separator time{background:var(--wy-surface-3, var(--wy-surface-3-light, #e3e7ee));color:var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e));padding:calc(.25 * var(--wy-rem, 1rem)) calc(.5 * var(--wy-rem, 1rem));border-radius:var(--wy-border-radius-sm, calc(.75 * var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)))));display:inline-block}.wy-appbars+.wy-pane-body .wy-date-separator{top:calc(var(--wy-appbar-height, calc(3 * var(--wy-rem, 1rem))) + 1.5 * var(--wy-rem, 1rem))}.wy-message{display:flex;flex-direction:row;align-items:flex-start;margin-bottom:calc(1 * var(--wy-rem, 1rem))}.wy-message .wy-image-grid,.wy-message .wy-attachments{border-radius:var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)))}.wy-message-meta{font-size:var(--wy-font-size-xs, calc(.75 * var(--wy-font-size-base, 1em)));margin:0 0 calc(.25 * var(--wy-rem, 1rem)) calc(.25 * var(--wy-rem, 1rem));color:var(--wy-on-surface-variant, var(--wy-neutral-variant-30, #42474e))}.wy-message-bubble{--wy-component-background-color: var(--wy-surface-variant, var(--wy-neutral-variant-90, #dee3eb));--wy-component-color: var(--wy-on-surface-variant, var(--wy-neutral-variant-30, #42474e));background-color:var(--wy-component-background-color);color:var(--wy-component-color);border-radius:calc(var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem))) + .5 * var(--wy-rem, 1rem));display:flex;flex-direction:column;padding:calc(.75 * var(--wy-rem, 1rem));gap:calc(.75 * var(--wy-rem, 1rem));max-width:min(32 * var(--wy-rem, 1rem),100% - 2 * var(--wy-rem, 1rem))}.wy-message-bubble>div{flex:1 1 100%}.wy-message-bubble .wy-likes,.wy-message-bubble .wy-reactions-line{position:relative;height:0;min-height:0;max-height:0;margin:0 calc(-.75 * var(--wy-rem, 1rem)) calc(-.75 * var(--wy-rem, 1rem));flex:0 0 0}.wy-message-bubble .wy-like-count{background:var(--wy-component-background-color);border-radius:var(--wy-border-radius-pill, calc(50 * var(--wy-rem, 1rem)));color:currentColor}.wy-message-bubble .wy-reactions-line,.wy-message-bubble wy-reactions{display:flex;flex-direction:row-reverse;justify-content:flex-end}.wy-message-author{margin:calc(1.375 * var(--wy-rem, 1rem)) calc(.5 * var(--wy-rem, 1rem)) 0 0}.wy-message-content{display:flex;flex-direction:column;width:100%;align-items:flex-start;flex-wrap:wrap;min-width:0;position:relative}.wy-message-content-row{display:flex;flex-direction:row;align-items:center;max-width:100%}.wy-message-bot .wy-message-bubble{--wy-component-background-color: var(--wy-tertiary-container, var(--wy-tertiary-90, #bbf294));--wy-component-color: var(--wy-on-tertiary-container, var(--wy-tertiary-10, #0a2100));background-color:var(--wy-component-background-color);color:var(--wy-component-color)}.wy-message-me{margin-right:0;margin-left:calc(2.5 * var(--wy-rem, 1rem));align-items:flex-end}.wy-message-me .wy-message-meta{margin:0 calc(.25 * var(--wy-rem, 1rem)) calc(.25 * var(--wy-rem, 1rem)) 0}.wy-message-me .wy-message-content{align-items:flex-end}.wy-message-me .wy-message-content-row{flex-direction:row-reverse}.wy-message-me .wy-message-bubble{--wy-component-background-color: var(--wy-primary-container, var(--wy-primary-90, #cde5ff));--wy-component-color: var(--wy-on-primary-container, var(--wy-primary-10, #001d32));background-color:var(--wy-component-background-color);color:var(--wy-component-color)}.wy-message-me .wy-likes{flex-direction:row-reverse}.wy-message-me .wy-reactions-line,.wy-message-me wy-reactions{display:flex;flex-direction:row}.wy-message-me .wy-reactions-line .wy-dropdown-menu,.wy-message-me wy-reactions .wy-dropdown-menu{right:0}.wy-message-emoji .wy-message-bubble{background:none;padding:0 0 calc(.75 * var(--wy-rem, 1rem))}.wy-message-emoji .wy-content .wy-emoji{width:calc(3 * var(--wy-rem, 1rem));height:calc(3 * var(--wy-rem, 1rem));margin:0}.wy-message-emoji.wy-message-me .wy-content{text-align:end}.wy-readby-status{display:flex;gap:calc(.25 * var(--wy-rem, 1rem));height:calc(1.125 * var(--wy-rem, 1rem));justify-content:flex-end;margin-top:calc(-.125 * var(--wy-rem, 1rem))}.wy-status-pending,.wy-status-sent,.wy-status-delivered{--wy-component-background-color: var(--wy-inverse-primary, var(--wy-primary-80, #95ccff));color:var(--wy-component-background-color)}.wy-message-readmore{justify-self:center;text-align:center}.wy-meta{color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e));font-size:var(--wy-font-size-sm, calc(.875 * var(--wy-font-size-base, 1em)))}.wy-meta-sm{font-size:var(--wy-font-size-xs, calc(.75 * var(--wy-font-size-base, 1em)))}.wy-viewport{position:fixed;top:0;right:0;bottom:0;left:0;z-index:2147483647;pointer-events:none}.wy-overlays{pointer-events:none;width:100%;height:100%;max-width:none;display:flex;align-items:center;justify-content:center;transform-style:preserve-3d;overflow-y:initial;overflow-x:initial;perspective:calc(100 * var(--wy-rem, 1rem));perspective-origin:center center}.wy-overlays .wy-panel:not(.wy-transition){transform:translateZ(calc(-4 * var(--wy-rem, 1rem)))!important}.wy-overlays .wy-panel .wy-controls{position:absolute;border-bottom:none;flex-direction:row;transition:opacity .1s .2s step-end}.wy-overlays .wy-panel .wy-controls wy-icon{color:var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e))}.wy-overlays .wy-panel.wy-loaded .wy-controls{pointer-events:none;opacity:0}.wy-overlays .wy-panel .wy-panel-frame{background-color:transparent}@media (min-width: 768px){.wy-overlays .wy-panel.wy-modal{left:auto;right:auto;top:calc(2 * var(--wy-rem, 1rem));bottom:calc(3.2 * var(--wy-rem, 1rem));margin-left:calc(4 * var(--wy-rem, 1rem));margin-top:auto;margin-right:calc(4 * var(--wy-rem, 1rem));margin-bottom:auto;border-radius:var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)));box-shadow:var(--wy-shadow-level4, 0 calc(1 * var(--wy-rem, 1rem)) calc(2.25 * var(--wy-rem, 1rem)) calc(.125 * var(--wy-rem, 1rem)) rgba(0, 0, 0, .14), 0 calc(.375 * var(--wy-rem, 1rem)) calc(1.875 * var(--wy-rem, 1rem)) calc(.3125 * var(--wy-rem, 1rem)) rgba(0, 0, 0, .12), 0 calc(.5 * var(--wy-rem, 1rem)) calc(.625 * var(--wy-rem, 1rem)) calc(-.3125 * var(--wy-rem, 1rem)) rgba(0, 0, 0, .2));width:calc(32 * var(--wy-rem, 1rem));max-height:calc(32 * var(--wy-rem, 1rem))}.wy-overlays .wy-panel.wy-modal:not(.wy-scroll-y){overflow:hidden}}@media (min-width: 768px){.wy-overlays .wy-panel.wy-modal-full{left:calc(1 * var(--wy-rem, 1rem));top:calc(1 * var(--wy-rem, 1rem));right:calc(1 * var(--wy-rem, 1rem));bottom:calc(1 * var(--wy-rem, 1rem));margin:0;border-radius:var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)));box-shadow:var(--wy-shadow-level4, 0 calc(1 * var(--wy-rem, 1rem)) calc(2.25 * var(--wy-rem, 1rem)) calc(.125 * var(--wy-rem, 1rem)) rgba(0, 0, 0, .14), 0 calc(.375 * var(--wy-rem, 1rem)) calc(1.875 * var(--wy-rem, 1rem)) calc(.3125 * var(--wy-rem, 1rem)) rgba(0, 0, 0, .12), 0 calc(.5 * var(--wy-rem, 1rem)) calc(.625 * var(--wy-rem, 1rem)) calc(-.3125 * var(--wy-rem, 1rem)) rgba(0, 0, 0, .2));width:auto;max-height:none}.wy-overlays .wy-panel.wy-modal-full:not(.wy-scroll-y){overflow:hidden}}.wy-overlays .wy-panel.wy-loading .wy-controls{transition:opacity var(--wy-transition, var(--wy-transition-duration, .2s) var(--wy-transition-curve, cubic-bezier(.4, 0, .2, 1)));opacity:1}tr.wy-pager{pointer-events:none}:not(tr).wy-pager:not(:empty){display:block;text-align:center;margin:calc(1 * var(--wy-rem, 1rem)) auto}tr.wy-pager td{text-align:center;border:0}tr.wy-pager td .wy-spinner{display:inline;margin:calc(1 * var(--wy-rem, 1rem)) auto}.wy-grid .wy-pager{display:flex}.wy-pane{display:flex;flex-direction:column;position:relative;min-height:0;height:100%;flex:1 1 auto}.wy-pane-body{display:flex;flex-direction:column;flex:1}.wy-pane-group{padding:calc(.75 * var(--wy-rem, 1rem))}.wy-pane-background{--wy-component-background-color: var(--wy-background, var(--wy-neutral-99, #fcfcff));--wy-component-color: var(--wy-on-background, var(--wy-neutral-10, #1a1c1e));background-color:var(--wy-component-background-color);color:var(--wy-component-color)}.wy-panels{position:absolute;top:0;right:0;bottom:0;left:0;overscroll-behavior:contain;overflow-y:auto;overflow-x:hidden}.wy-panel{--wy-component-background-color: var(--wy-background, var(--wy-neutral-99, #fcfcff));--wy-component-color: var(--wy-on-background, var(--wy-neutral-10, #1a1c1e));position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;overflow:hidden;background-color:var(--wy-component-background-color);color:var(--wy-component-color);display:flex;flex-direction:column}.wy-panel .wy-controls{top:calc(.25 * var(--wy-rem, 1rem));left:calc(.25 * var(--wy-rem, 1rem));min-width:calc(2.5 * var(--wy-rem, 1rem));width:auto;display:flex;z-index:10000;order:-1;flex-direction:row-reverse;border-bottom:1px solid var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce))}.wy-panel .wy-controls:empty{display:none}.wy-panel .wy-controls wy-icon{color:var(--wy-component-color)}.wy-panel .wy-panel-frame{transition:opacity var(--wy-transition-fast, var(--wy-transition-duration-fast, .1s) var(--wy-transition-curve, cubic-bezier(.4, 0, .2, 1)));transition-delay:.2s;opacity:1}.wy-panel .wy-panel-frame:not([src]){display:none}.wy-panel:not(.wy-loaded) .wy-panel-frame{opacity:0;transition:opacity .2s step-start;transition-delay:.1s}.wy-panel.wy-open{pointer-events:all;z-index:5}.wy-panel.wy-open[data-title]:before{content:attr(data-title);position:absolute;top:0;left:0;right:0;height:var(--wy-appbar-height, calc(3 * var(--wy-rem, 1rem)));padding:calc(.25 * var(--wy-rem, 1rem));opacity:0;pointer-events:none;display:flex;align-items:center;justify-content:center;transition:opacity .1s step-end;transition-delay:.2s;font-family:var(--wy-font-family, unset),inherit;line-height:var(--wy-line-height, 1.5);font-weight:var(--wy-font-weight, unset);background-color:var(--wy-surface-1, var(--wy-surface-1-light, #f1f2f7));color:var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e));box-shadow:var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce)) 0 -1px 0 0 inset;backface-visibility:hidden}@supports (backdrop-filter: blur(calc(.5 * var(--wy-rem, 1rem)))){.wy-panel.wy-open[data-title]:before{-webkit-backdrop-filter:blur(calc(.5 * var(--wy-rem, 1rem)));backdrop-filter:blur(calc(.5 * var(--wy-rem, 1rem)))}}.wy-panel.wy-open:after{content:\"\";position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:none;opacity:0;transition:opacity var(--wy-transition, var(--wy-transition-duration, .2s) var(--wy-transition-curve, cubic-bezier(.4, 0, .2, 1)));transition-duration:0s}.wy-panel.wy-open.wy-loading[data-title]:before{opacity:1}.wy-panel.wy-open.wy-loading:after{transition:opacity var(--wy-transition, var(--wy-transition-duration, .2s) var(--wy-transition-curve, cubic-bezier(.4, 0, .2, 1)));transition-duration:.5s;opacity:1;background-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 24 24' width='24' height='24' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cstyle type='text/css'%3Eg%7Banimation:rotate 2s linear infinite;transform-origin:center center%7Dcircle%7Bstroke-dasharray:1,100;stroke-dashoffset:0;animation:dash 1.5s ease-in-out infinite,color 6s ease-in-out infinite%7D@keyframes rotate%7B100%25%7Btransform:rotate(360deg)%7D%7D@keyframes dash%7B0%25%7Bstroke-dasharray:1,100;stroke-dashoffset:0%7D50%25%7Bstroke-dasharray:44.5,100;stroke-dashoffset:-17.5px%7D100%25%7Bstroke-dasharray:44.5,100;stroke-dashoffset:-62px%7D%7D@keyframes color%7B0%25,100%25%7Bstroke:%23216eb4%7D40%25%7Bstroke:%2328b7cf%7D66%25%7Bstroke:%23216eb4%7D80%25,90%25%7Bstroke:%2328b7cf%7D%7D%3C/style%3E%3Cg%3E%3Ccircle fill='none' cx='12' cy='12' r='11' stroke-linecap='butt' stroke-width='2' /%3E%3C/g%3E%3C/svg%3E\");background-repeat:no-repeat;background-position:50%;background-size:calc(2 * var(--wy-rem, 1rem));background-color:transparent}.wy-panel{opacity:0;visibility:hidden;transition:opacity var(--wy-transition-fast, var(--wy-transition-duration-fast, .1s) var(--wy-transition-curve, cubic-bezier(.4, 0, .2, 1))) .01s,transform var(--wy-transition-fast, var(--wy-transition-duration-fast, .1s) var(--wy-transition-curve, cubic-bezier(.4, 0, .2, 1))) .01s,visibility .01s step-end var(--wy-transition-duration-fast, .1s)}.wy-panel.wy-open{transition:opacity var(--wy-transition, var(--wy-transition-duration, .2s) var(--wy-transition-curve, cubic-bezier(.4, 0, .2, 1))),transform var(--wy-transition, var(--wy-transition-duration, .2s) var(--wy-transition-curve, cubic-bezier(.4, 0, .2, 1))),visibility var(--wy-transition-duration, .2s) step-start;visibility:visible}.wy-panel.wy-open.wy-transition{opacity:1;transform:none}.wy-panel-frame{flex:1 1 100%;border:0}.wy-picker-list{background:var(--wy-component-background-color);color:var(--wy-component-color);border:none}.wy-picker-list>.wy-picker-list-item:first-child,.wy-picker-list>:first-child .wy-picker-list-item{border-top:none}.wy-picker-list>.wy-picker-list-item:last-child,.wy-picker-list>:last-child .wy-picker-list-item{border-bottom:none}.wy-picker-list-item{display:flex;align-items:center;padding:calc(.25 * var(--wy-rem, 1rem)) calc(.5 * var(--wy-rem, 1rem))}.wy-picker-list-item>wy-icon{margin-left:calc(.25 * var(--wy-rem, 1rem));margin-right:calc(.25 * var(--wy-rem, 1rem));flex:0 0 auto}.wy-picker-list-item>button{margin-block-start:auto;flex:0 0 auto}.wy-picker-list-item-title{flex-grow:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wy-main{display:flex;height:calc(100% - var(--wy-appbar-height, calc(3 * var(--wy-rem, 1rem))));min-height:0}@media (max-width: 767.98px){.wy-main{flex-direction:column}}.wy-preview{--wy-component-background-color: var(--wy-background, var(--wy-neutral-99, #fcfcff));--wy-component-color: var(--wy-on-background, var(--wy-neutral-10, #1a1c1e));background-color:var(--wy-component-background-color);color:var(--wy-component-color);display:flex;flex-direction:column;align-items:stretch;justify-content:stretch;position:relative;flex:1 1 100%;min-width:calc(16 * var(--wy-rem, 1rem));min-height:calc(16 * var(--wy-rem, 1rem));max-height:100%;max-width:100%}.wy-preview-swiper{display:flex;flex-direction:row;flex:1 1 100%;align-items:center;justify-content:start;min-width:calc(16 * var(--wy-rem, 1rem));min-height:calc(16 * var(--wy-rem, 1rem));max-height:100%;max-width:100%;overflow-x:scroll;scroll-snap-type:x mandatory;scroll-behavior:auto;overscroll-behavior-x:none;scrollbar-width:none}.wy-preview-swiper::-webkit-scrollbar{display:none}.wy-preview-swiper-disabled{overflow-x:hidden}.wy-preview-area{position:relative;min-width:100%;min-height:100%;width:100%;height:100%;flex:1 1 auto;display:flex;flex-direction:column;scroll-snap-stop:always;scroll-snap-align:center}.wy-nav-prev,.wy-nav-next{--wy-component-background-color: var(--wy-surface-variant, var(--wy-neutral-variant-90, #dee3eb));--wy-component-color: var(--wy-on-surface-variant, var(--wy-neutral-variant-30, #42474e));background-color:var(--wy-component-background-color);position:absolute;top:50%;z-index:1000;border-radius:50%}.wy-nav-prev{left:calc(.5 * var(--wy-rem, 1rem))}.wy-nav-next{right:calc(.5 * var(--wy-rem, 1rem))}.wy-document{--wy-component-background-color: var(--wy-background, );--wy-component-color: var(--wy-on-background, );background-color:var(--wy-component-background-color);color:var(--wy-component-color);align-self:flex-start;padding:calc(2 * var(--wy-rem, 1rem)) calc(3.5 * var(--wy-rem, 1rem));width:100%;min-height:100%;flex:1 0 auto}@media (min-width: 768px){.wy-document{padding:calc(3 * var(--wy-rem, 1rem)) calc(4 * var(--wy-rem, 1rem));margin:calc(2 * var(--wy-rem, 1rem)) auto;border-radius:calc(.125 * var(--wy-rem, 1rem));box-shadow:var(--wy-shadow-level2, 0 calc(.25 * var(--wy-rem, 1rem)) calc(.3125 * var(--wy-rem, 1rem)) 0 rgba(0, 0, 0, .14), 0 calc(.0625 * var(--wy-rem, 1rem)) calc(.625 * var(--wy-rem, 1rem)) 0 rgba(0, 0, 0, .12), 0 calc(.125 * var(--wy-rem, 1rem)) calc(.25 * var(--wy-rem, 1rem)) calc(-.0625 * var(--wy-rem, 1rem)) rgba(0, 0, 0, .2));width:120ch;min-height:170ch;max-width:calc(100% - 3.5 * var(--wy-rem, 1rem))}}.wy-content-code{align-self:flex-start;width:100%;padding:calc(2 * var(--wy-rem, 1rem)) calc(3.5 * var(--wy-rem, 1rem))}.wy-content-iframe{border:0;display:block;width:100%;height:100%;top:0;left:0;flex:1 1 100%}.wy-content-iframe.wy-loaded{--wy-component-background-color: var(--wy-surface-1, var(--wy-surface-1-light, #f1f2f7));--wy-component-color: var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e));background-color:var(--wy-component-background-color);color:var(--wy-component-color)}.wy-content-iframe.wy-loaded~.wy-content-iframe-fallback,.wy-content-iframe.wy-loaded~.wy-spinner,.wy-content-iframe.wy-loaded~wy-spinner{display:none}.wy-content-iframe.wy-loading:not(.wy-loaded){position:absolute;visibility:hidden;z-index:-1;pointer-events:none}.wy-content-iframe.wy-loading:not(.wy-loaded):not(.wy-fallback)~.wy-content-iframe-fallback{display:none}.wy-content-iframe.wy-loading:not(.wy-loaded).wy-fallback~.wy-spinner,.wy-content-iframe.wy-loading:not(.wy-loaded).wy-fallback~wy-spinner{display:none}.wy-content-iframe~.wy-spinner,.wy-content-iframe~wy-spinner{margin:auto}.wy-content-html pre,.wy-content-html code{word-break:break-word;white-space:pre-wrap}.wy-content-image{min-width:0;display:flex;align-items:center;justify-content:center;position:relative;margin:auto;max-height:100%;max-width:100%;transition:transform var(--wy-transition, var(--wy-transition-duration, .2s) var(--wy-transition-curve, cubic-bezier(.4, 0, .2, 1))),transform-origin var(--wy-transition-duration, .2s) step-end}.wy-content-image.wy-zoom{cursor:zoom-out;transition:transform var(--wy-transition, var(--wy-transition-duration, .2s) var(--wy-transition-curve, cubic-bezier(.4, 0, .2, 1))),transform-origin var(--wy-transition-duration, .2s) step-start}.wy-content-image img{min-width:0;min-height:0;width:100%;height:100%}.wy-content-image img:not(.wy-loading-transition):not([data-controller~=image])~.wy-spinner,.wy-content-image img:not(.wy-loading-transition):not([data-controller~=image])~wy-spinner{display:none}.wy-content-image img.wy-loading,.wy-content-image img[data-controller~=image]{transition:opacity .15s ease-out;opacity:0}.wy-content-image img.wy-loading.wy-loaded,.wy-content-image img[data-controller~=image].wy-loaded{opacity:1;transition:opacity .15s ease-out}.wy-content-image img.wy-loading.wy-loaded~img,.wy-content-image img[data-controller~=image].wy-loaded~img{transition-delay:.15s;opacity:0}.wy-content-image img.wy-loading.wy-loaded~.wy-spinner,.wy-content-image img.wy-loading.wy-loaded~wy-spinner,.wy-content-image img[data-controller~=image].wy-loaded~.wy-spinner,.wy-content-image img[data-controller~=image].wy-loaded~wy-spinner{display:none}.wy-content-image img.wy-responsive-image-thumb{position:absolute;z-index:-1}.wy-content-image img~.wy-spinner,.wy-content-image img~wy-spinner{position:absolute}.wy-content-video:not(.wy-error){min-height:0;max-width:100%;max-height:100%;flex:1 1 auto}.wy-content-video,.wy-content-audio{margin:auto}.wy-content-video.wy-loading:not(.wy-loaded),.wy-content-video[data-controller~=media]:not(.wy-loaded),.wy-content-audio.wy-loading:not(.wy-loaded),.wy-content-audio[data-controller~=media]:not(.wy-loaded){visibility:hidden}.wy-content-video.wy-loading.wy-loaded~.wy-spinner,.wy-content-video.wy-loading.wy-loaded~wy-spinner,.wy-content-video[data-controller~=media].wy-loaded~.wy-spinner,.wy-content-video[data-controller~=media].wy-loaded~wy-spinner,.wy-content-audio.wy-loading.wy-loaded~.wy-spinner,.wy-content-audio.wy-loading.wy-loaded~wy-spinner,.wy-content-audio[data-controller~=media].wy-loaded~.wy-spinner,.wy-content-audio[data-controller~=media].wy-loaded~wy-spinner{display:none}.wy-content-video:focus,.wy-content-audio:focus{outline:none}:host(wy-pdf-viewer){--annotation-unfocused-field-background: url(\"data:image/svg+xml;charset=UTF-8,<svg width='1px' height='1px' xmlns='http://www.w3.org/2000/svg'><rect width='100%' height='100%' style='fill:rgba(0, 54, 255, 0.13);'/></svg>\");--input-focus-border-color: Highlight;--input-focus-outline: 1px solid Canvas;--input-unfocused-border-color: transparent;--input-disabled-border-color: transparent;--input-hover-border-color: black;--xfa-unfocused-field-background: url(\"data:image/svg+xml;charset=UTF-8,<svg width='1px' height='1px' xmlns='http://www.w3.org/2000/svg'><rect width='100%' height='100%' style='fill:rgba(0, 54, 255, 0.13);'/></svg>\");--xfa-focus-outline: auto;--focus-outline: solid 2px blue;--hover-outline: dashed 2px blue;--freetext-line-height: 1.35;--freetext-padding: 2px;--editorFreeText-editing-cursor: text;--editorInk-editing-cursor: pointer;--viewer-container-height: 0;--pdfViewer-padding-bottom: 0;--page-margin: calc(2 * var(--wy-rem, 1rem)) auto;--page-border: none;--page-border-image: none;--spreadHorizontalWrapped-margin-LR: -3.5px;--scale-factor: 1}@media (forced-colors: active){:host(wy-pdf-viewer){--input-focus-border-color: CanvasText;--input-unfocused-border-color: ActiveText;--input-disabled-border-color: GrayText;--input-hover-border-color: Highlight}}@media (forced-colors: active){:host(wy-pdf-viewer){--xfa-focus-outline: 2px solid CanvasText}}@media (forced-colors: active){:host(wy-pdf-viewer){--focus-outline: solid 3px ButtonText;--hover-outline: dashed 3px ButtonText}}@media screen and (forced-colors: active){:host(wy-pdf-viewer){--page-border: 1px solid CanvasText;--page-border-image: none;--spreadHorizontalWrapped-margin-LR: 3.5px}}.wy-content-pdf .wy-input[data-pdf-target=pageNumber]{width:calc(3 * var(--wy-rem, 1rem))}.wy-content-pdf .wy-input[data-pdf-target=zoomLevel]{width:calc(5 * var(--wy-rem, 1rem))}.wy-content-pdf .wy-pdf-container{position:absolute;width:100%;height:100%;bottom:0;left:0;overflow-y:auto;max-height:100%;overflow-x:auto;touch-action:pan-y,pan-x;will-change:scroll-position,opacity;backface-visibility:hidden;max-width:100%}.wy-content-pdf .wy-pdf-container:not(body){-webkit-overflow-scrolling:touch}.wy-scrollbars .wy-content-pdf .wy-pdf-container{scrollbar-width:thin;scrollbar-color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e)) transparent}.wy-scrollbars .wy-content-pdf .wy-pdf-container::-webkit-scrollbar{height:.625rem;width:.625rem;background:transparent;z-index:999}.wy-scrollbars .wy-content-pdf .wy-pdf-container::-webkit-scrollbar-track{background:transparent}.wy-scrollbars .wy-content-pdf .wy-pdf-container::-webkit-scrollbar-thumb{background-color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e));border:.125rem solid transparent;border-radius:.5rem;background-clip:padding-box;opacity:75%}.wy-scrollbars .wy-content-pdf .wy-pdf-container::-webkit-scrollbar-thumb:hover{background-color:var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce));opacity:75%}.wy-scrollbars .wy-content-pdf .wy-pdf-container::-webkit-scrollbar-thumb:window-inactive{background-color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e));opacity:50%}@supports (overflow-y: overlay){.wy-scrollbars .wy-content-pdf .wy-pdf-container{overflow-y:overlay}}.wy-content-pdf .textLayer{position:absolute;text-align:initial;left:0;top:0;right:0;bottom:0;overflow:hidden;opacity:.25;line-height:1;-webkit-text-size-adjust:none;-moz-text-size-adjust:none;text-size-adjust:none;forced-color-adjust:none}.wy-content-pdf .textLayer span,.wy-content-pdf .textLayer br{color:transparent;position:absolute;white-space:pre;cursor:text;transform-origin:0% 0%}.wy-content-pdf .textLayer span.markedContent{top:0;height:0}.wy-content-pdf .textLayer .highlight{margin:-1px;padding:1px;background-color:#b400aa;border-radius:4px}.wy-content-pdf .textLayer .highlight.appended{position:initial}.wy-content-pdf .textLayer .highlight.begin{border-radius:4px 0 0 4px}.wy-content-pdf .textLayer .highlight.end{border-radius:0 4px 4px 0}.wy-content-pdf .textLayer .highlight.middle{border-radius:0}.wy-content-pdf .textLayer .highlight.selected{background-color:#006400}.wy-content-pdf .textLayer ::-moz-selection{background:#00f;background:AccentColor}.wy-content-pdf .textLayer ::selection{background:#00f;background:AccentColor}.wy-content-pdf .textLayer br::-moz-selection{background:transparent}.wy-content-pdf .textLayer br::selection{background:transparent}.wy-content-pdf .textLayer .endOfContent{display:block;position:absolute;left:0;top:100%;right:0;bottom:0;z-index:-1;cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none}.wy-content-pdf .textLayer .endOfContent.active{top:0}@media (forced-colors: active){.wy-content-pdf .annotationLayer .textWidgetAnnotation input:required,.wy-content-pdf .annotationLayer .textWidgetAnnotation textarea:required,.wy-content-pdf .annotationLayer .choiceWidgetAnnotation select:required,.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.checkBox input:required,.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.radioButton input:required{outline:1.5px solid selectedItem}}.wy-content-pdf .annotationLayer{position:absolute;top:0;left:0;pointer-events:none;transform-origin:0 0}.wy-content-pdf .annotationLayer section{position:absolute;text-align:initial;pointer-events:auto;box-sizing:border-box;transform-origin:0 0}.wy-content-pdf .annotationLayer .linkAnnotation>a,.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.pushButton>a{position:absolute;font-size:1em;top:0;left:0;width:100%;height:100%}.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.pushButton>canvas{width:100%;height:100%}.wy-content-pdf .annotationLayer .linkAnnotation>a:hover,.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.pushButton>a:hover{opacity:.2;background:#ff0;box-shadow:0 2px 10px #ff0}.wy-content-pdf .annotationLayer .textAnnotation img{position:absolute;cursor:pointer;width:100%;height:100%}.wy-content-pdf .annotationLayer .textWidgetAnnotation input,.wy-content-pdf .annotationLayer .textWidgetAnnotation textarea,.wy-content-pdf .annotationLayer .choiceWidgetAnnotation select,.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.checkBox input,.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.radioButton input{background-image:var(--annotation-unfocused-field-background);border:2px solid var(--input-unfocused-border-color);box-sizing:border-box;font:calc(9px * var(--scale-factor)) sans-serif;height:100%;margin:0;vertical-align:top;width:100%}.wy-content-pdf .annotationLayer .textWidgetAnnotation input:required,.wy-content-pdf .annotationLayer .textWidgetAnnotation textarea:required,.wy-content-pdf .annotationLayer .choiceWidgetAnnotation select:required,.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.checkBox input:required,.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.radioButton input:required{outline:1.5px solid red}.wy-content-pdf .annotationLayer .choiceWidgetAnnotation select option{padding:0}.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.radioButton input{border-radius:50%}.wy-content-pdf .annotationLayer .textWidgetAnnotation textarea{resize:none}.wy-content-pdf .annotationLayer .textWidgetAnnotation input[disabled],.wy-content-pdf .annotationLayer .textWidgetAnnotation textarea[disabled],.wy-content-pdf .annotationLayer .choiceWidgetAnnotation select[disabled],.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.checkBox input[disabled],.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.radioButton input[disabled]{background:none;border:2px solid var(--input-disabled-border-color);cursor:not-allowed}.wy-content-pdf .annotationLayer .textWidgetAnnotation input:hover,.wy-content-pdf .annotationLayer .textWidgetAnnotation textarea:hover,.wy-content-pdf .annotationLayer .choiceWidgetAnnotation select:hover,.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.checkBox input:hover,.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.radioButton input:hover{border:2px solid var(--input-hover-border-color)}.wy-content-pdf .annotationLayer .textWidgetAnnotation input:hover,.wy-content-pdf .annotationLayer .textWidgetAnnotation textarea:hover,.wy-content-pdf .annotationLayer .choiceWidgetAnnotation select:hover,.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.checkBox input:hover{border-radius:2px}.wy-content-pdf .annotationLayer .textWidgetAnnotation input:focus,.wy-content-pdf .annotationLayer .textWidgetAnnotation textarea:focus,.wy-content-pdf .annotationLayer .choiceWidgetAnnotation select:focus{background:none;border:2px solid var(--input-focus-border-color);border-radius:2px;outline:var(--input-focus-outline)}.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.checkBox :focus,.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.radioButton :focus{background-image:none;background-color:transparent}.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.checkBox :focus{border:2px solid var(--input-focus-border-color);border-radius:2px;outline:var(--input-focus-outline)}.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.radioButton :focus{border:2px solid var(--input-focus-border-color);outline:var(--input-focus-outline)}.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after,.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before{background-color:CanvasText;content:\"\";display:block;position:absolute}.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after{height:80%;left:45%;width:1px}.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before{transform:rotate(45deg)}.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after{transform:rotate(-45deg)}.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before{border-radius:50%;height:50%;left:30%;top:20%;width:50%}.wy-content-pdf .annotationLayer .textWidgetAnnotation input.comb{font-family:monospace;padding-left:2px;padding-right:0}.wy-content-pdf .annotationLayer .textWidgetAnnotation input.comb:focus{width:103%}.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.checkBox input,.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.radioButton input{-webkit-appearance:none;-moz-appearance:none;appearance:none}.wy-content-pdf .annotationLayer .popupTriggerArea{height:100%;width:100%}.wy-content-pdf .annotationLayer .popupWrapper{position:absolute;font-size:calc(9px * var(--scale-factor));width:100%;min-width:calc(180px * var(--scale-factor));pointer-events:none}.wy-content-pdf .annotationLayer .popup{position:absolute;max-width:calc(180px * var(--scale-factor));background-color:#ff9;box-shadow:0 calc(2px * var(--scale-factor)) calc(5px * var(--scale-factor)) #888;border-radius:calc(2px * var(--scale-factor));padding:calc(6px * var(--scale-factor));margin-left:calc(5px * var(--scale-factor));cursor:pointer;font:message-box;white-space:normal;word-wrap:break-word;pointer-events:auto}.wy-content-pdf .annotationLayer .popup>*{font-size:calc(9px * var(--scale-factor))}.wy-content-pdf .annotationLayer .popup h1{display:inline-block}.wy-content-pdf .annotationLayer .popupDate{display:inline-block;margin-left:calc(5px * var(--scale-factor))}.wy-content-pdf .annotationLayer .popupContent{border-top:1px solid rgb(51,51,51);margin-top:calc(2px * var(--scale-factor));padding-top:calc(2px * var(--scale-factor))}.wy-content-pdf .annotationLayer .richText>*{white-space:pre-wrap;font-size:calc(9px * var(--scale-factor))}.wy-content-pdf .annotationLayer .highlightAnnotation,.wy-content-pdf .annotationLayer .underlineAnnotation,.wy-content-pdf .annotationLayer .squigglyAnnotation,.wy-content-pdf .annotationLayer .strikeoutAnnotation,.wy-content-pdf .annotationLayer .freeTextAnnotation,.wy-content-pdf .annotationLayer .lineAnnotation svg line,.wy-content-pdf .annotationLayer .squareAnnotation svg rect,.wy-content-pdf .annotationLayer .circleAnnotation svg ellipse,.wy-content-pdf .annotationLayer .polylineAnnotation svg polyline,.wy-content-pdf .annotationLayer .polygonAnnotation svg polygon,.wy-content-pdf .annotationLayer .caretAnnotation,.wy-content-pdf .annotationLayer .inkAnnotation svg polyline,.wy-content-pdf .annotationLayer .stampAnnotation,.wy-content-pdf .annotationLayer .fileAttachmentAnnotation{cursor:pointer}.wy-content-pdf .annotationLayer section svg{position:absolute;width:100%;height:100%}.wy-content-pdf .annotationLayer .annotationTextContent{position:absolute;width:100%;height:100%;opacity:0;color:transparent;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}.wy-content-pdf .annotationLayer .annotationTextContent span{width:100%;display:inline-block}@media (forced-colors: active){.wy-content-pdf .xfaLayer *:required{outline:1.5px solid selectedItem}}.wy-content-pdf .xfaLayer{background-color:transparent}.wy-content-pdf .xfaLayer .highlight{margin:-1px;padding:1px;background-color:#efcbed;border-radius:4px}.wy-content-pdf .xfaLayer .highlight.appended{position:initial}.wy-content-pdf .xfaLayer .highlight.begin{border-radius:4px 0 0 4px}.wy-content-pdf .xfaLayer .highlight.end{border-radius:0 4px 4px 0}.wy-content-pdf .xfaLayer .highlight.middle{border-radius:0}.wy-content-pdf .xfaLayer .highlight.selected{background-color:#cbdfcb}.wy-content-pdf .xfaPage{overflow:hidden;position:relative}.wy-content-pdf .xfaContentarea{position:absolute}.wy-content-pdf .xfaPrintOnly{display:none}.wy-content-pdf .xfaLayer{position:absolute;text-align:initial;top:0;left:0;transform-origin:0 0;line-height:1.2}.wy-content-pdf .xfaLayer *{color:inherit;font:inherit;font-style:inherit;font-weight:inherit;font-kerning:inherit;letter-spacing:-.01px;text-align:inherit;text-decoration:inherit;box-sizing:border-box;background-color:transparent;padding:0;margin:0;pointer-events:auto;line-height:inherit}.wy-content-pdf .xfaLayer *:required{outline:1.5px solid red}.wy-content-pdf .xfaLayer div{pointer-events:none}.wy-content-pdf .xfaLayer svg{pointer-events:none}.wy-content-pdf .xfaLayer svg *{pointer-events:none}.wy-content-pdf .xfaLayer a{color:#00f}.wy-content-pdf .xfaRich li{margin-left:3em}.wy-content-pdf .xfaFont{color:#000;font-weight:400;font-kerning:none;font-size:10px;font-style:normal;letter-spacing:0;text-decoration:none;vertical-align:0}.wy-content-pdf .xfaCaption{overflow:hidden;flex:0 0 auto}.wy-content-pdf .xfaCaptionForCheckButton{overflow:hidden;flex:1 1 auto}.wy-content-pdf .xfaLabel{height:100%;width:100%}.wy-content-pdf .xfaLeft{display:flex;flex-direction:row;align-items:center}.wy-content-pdf .xfaRight{display:flex;flex-direction:row-reverse;align-items:center}.wy-content-pdf .xfaLeft>.xfaCaption,.wy-content-pdf .xfaLeft>.xfaCaptionForCheckButton,.wy-content-pdf .xfaRight>.xfaCaption,.wy-content-pdf .xfaRight>.xfaCaptionForCheckButton{max-height:100%}.wy-content-pdf .xfaTop{display:flex;flex-direction:column;align-items:flex-start}.wy-content-pdf .xfaBottom{display:flex;flex-direction:column-reverse;align-items:flex-start}.wy-content-pdf .xfaTop>.xfaCaption,.wy-content-pdf .xfaTop>.xfaCaptionForCheckButton,.wy-content-pdf .xfaBottom>.xfaCaption,.wy-content-pdf .xfaBottom>.xfaCaptionForCheckButton{width:100%}.wy-content-pdf .xfaBorder{background-color:transparent;position:absolute;pointer-events:none}.wy-content-pdf .xfaWrapped{width:100%;height:100%}.wy-content-pdf .xfaTextfield:focus,.wy-content-pdf .xfaSelect:focus{background-image:none;background-color:transparent;outline:var(--xfa-focus-outline);outline-offset:-1px}.wy-content-pdf .xfaCheckbox:focus,.wy-content-pdf .xfaRadio:focus{outline:var(--xfa-focus-outline)}.wy-content-pdf .xfaTextfield,.wy-content-pdf .xfaSelect{height:100%;width:100%;flex:1 1 auto;border:none;resize:none;background-image:var(--xfa-unfocused-field-background)}.wy-content-pdf .xfaSelect{padding-left:2px;padding-right:2px;padding-inline:2px}.wy-content-pdf .xfaTop>.xfaTextfield,.wy-content-pdf .xfaTop>.xfaSelect,.wy-content-pdf .xfaBottom>.xfaTextfield,.wy-content-pdf .xfaBottom>.xfaSelect{flex:0 1 auto}.wy-content-pdf .xfaButton{cursor:pointer;width:100%;height:100%;border:none;text-align:center}.wy-content-pdf .xfaLink{width:100%;height:100%;position:absolute;top:0;left:0}.wy-content-pdf .xfaCheckbox,.wy-content-pdf .xfaRadio{width:100%;height:100%;flex:0 0 auto;border:none}.wy-content-pdf .xfaRich{white-space:pre-wrap;width:100%;height:100%}.wy-content-pdf .xfaImage{-o-object-position:left top;object-position:left top;-o-object-fit:contain;object-fit:contain;width:100%;height:100%}.wy-content-pdf .xfaLrTb,.wy-content-pdf .xfaRlTb,.wy-content-pdf .xfaTb{display:flex;flex-direction:column;align-items:stretch}.wy-content-pdf .xfaLr{display:flex;flex-direction:row;align-items:stretch}.wy-content-pdf .xfaRl{display:flex;flex-direction:row-reverse;align-items:stretch}.wy-content-pdf .xfaTb>div{justify-content:left}.wy-content-pdf .xfaPosition,.wy-content-pdf .xfaArea{position:relative}.wy-content-pdf .xfaValignMiddle{display:flex;align-items:center}.wy-content-pdf .xfaTable{display:flex;flex-direction:column;align-items:stretch}.wy-content-pdf .xfaTable .xfaRow{display:flex;flex-direction:row;align-items:stretch}.wy-content-pdf .xfaTable .xfaRlRow{display:flex;flex-direction:row-reverse;align-items:stretch;flex:1}.wy-content-pdf .xfaTable .xfaRlRow>div{flex:1}.wy-content-pdf .xfaNonInteractive input,.wy-content-pdf .xfaNonInteractive textarea,.wy-content-pdf .xfaDisabled input,.wy-content-pdf .xfaDisabled textarea,.wy-content-pdf .xfaReadOnly input,.wy-content-pdf .xfaReadOnly textarea{background:initial}@media print{.wy-content-pdf .xfaTextfield,.wy-content-pdf .xfaSelect{background:transparent}.wy-content-pdf .xfaSelect{-webkit-appearance:none;-moz-appearance:none;appearance:none;text-indent:1px;text-overflow:\"\"}}.wy-content-pdf [data-editor-rotation=\"90\"]{transform:rotate(90deg)}.wy-content-pdf [data-editor-rotation=\"180\"]{transform:rotate(180deg)}.wy-content-pdf [data-editor-rotation=\"270\"]{transform:rotate(270deg)}.wy-content-pdf .annotationEditorLayer{background:transparent;position:absolute;top:0;left:0;font-size:calc(100px * var(--scale-factor));transform-origin:0 0;cursor:auto;z-index:20000}.wy-content-pdf .annotationEditorLayer.freeTextEditing{cursor:var(--editorFreeText-editing-cursor)}.wy-content-pdf .annotationEditorLayer.inkEditing{cursor:var(--editorInk-editing-cursor)}.wy-content-pdf .annotationEditorLayer .selectedEditor{outline:var(--focus-outline);resize:none}.wy-content-pdf .annotationEditorLayer .freeTextEditor{position:absolute;background:transparent;border-radius:3px;padding:calc(var(--freetext-padding) * var(--scale-factor));resize:none;width:auto;height:auto;z-index:1;transform-origin:0 0;touch-action:none;cursor:auto}.wy-content-pdf .annotationEditorLayer .freeTextEditor .internal{background:transparent;border:none;top:0;left:0;overflow:visible;white-space:nowrap;resize:none;font:10px sans-serif;line-height:var(--freetext-line-height)}.wy-content-pdf .annotationEditorLayer .freeTextEditor .overlay{position:absolute;display:none;background:transparent;top:0;left:0;width:100%;height:100%}.wy-content-pdf .annotationEditorLayer .freeTextEditor .overlay.enabled{display:block}.wy-content-pdf .annotationEditorLayer .freeTextEditor .internal:empty:before{content:attr(default-content);color:gray}.wy-content-pdf .annotationEditorLayer .freeTextEditor .internal:focus{outline:none}.wy-content-pdf .annotationEditorLayer .inkEditor.disabled{resize:none}.wy-content-pdf .annotationEditorLayer .inkEditor.disabled.selectedEditor{resize:horizontal}.wy-content-pdf .annotationEditorLayer .freeTextEditor:hover:not(.selectedEditor),.wy-content-pdf .annotationEditorLayer .inkEditor:hover:not(.selectedEditor){outline:var(--hover-outline)}.wy-content-pdf .annotationEditorLayer .inkEditor{position:absolute;background:transparent;border-radius:3px;overflow:auto;width:100%;height:100%;z-index:1;transform-origin:0 0;cursor:auto}.wy-content-pdf .annotationEditorLayer .inkEditor.editing{resize:none;cursor:inherit}.wy-content-pdf .annotationEditorLayer .inkEditor .inkEditorCanvas{position:absolute;top:0;left:0;width:100%;height:100%;touch-action:none}.wy-content-pdf [data-main-rotation=\"90\"]{transform:rotate(90deg) translateY(-100%)}.wy-content-pdf [data-main-rotation=\"180\"]{transform:rotate(180deg) translate(-100%,-100%)}.wy-content-pdf [data-main-rotation=\"270\"]{transform:rotate(270deg) translate(-100%)}.wy-content-pdf .pdfViewer{padding-bottom:var(--pdfViewer-padding-bottom)}.wy-content-pdf .pdfViewer .canvasWrapper{overflow:hidden}.wy-content-pdf .pdfViewer .page{direction:ltr;width:816px;height:1056px;margin:var(--page-margin);position:relative;overflow:visible;border:var(--page-border);-o-border-image:var(--page-border-image);border-image:var(--page-border-image);background-clip:content-box;background-color:#fff}.wy-content-pdf .pdfViewer .dummyPage{position:relative;width:0;height:var(--viewer-container-height)}.wy-content-pdf .pdfViewer.removePageBorders .page{margin:0 auto 10px;border:none}.wy-content-pdf .pdfViewer.singlePageView{display:inline-block}.wy-content-pdf .pdfViewer.singlePageView .page{margin:0;border:none}.wy-content-pdf .pdfViewer.scrollHorizontal,.wy-content-pdf .pdfViewer.scrollWrapped,.wy-content-pdf .spread{margin-left:3.5px;margin-right:3.5px;text-align:center}.wy-content-pdf .pdfViewer.scrollHorizontal,.wy-content-pdf .spread{white-space:nowrap}.wy-content-pdf .pdfViewer.removePageBorders,.wy-content-pdf .pdfViewer.scrollHorizontal .spread,.wy-content-pdf .pdfViewer.scrollWrapped .spread{margin-left:0;margin-right:0}.wy-content-pdf .spread .page,.wy-content-pdf .spread .dummyPage,.wy-content-pdf .pdfViewer.scrollHorizontal .page,.wy-content-pdf .pdfViewer.scrollWrapped .page,.wy-content-pdf .pdfViewer.scrollHorizontal .spread,.wy-content-pdf .pdfViewer.scrollWrapped .spread{display:inline-block;vertical-align:middle}.wy-content-pdf .spread .page,.wy-content-pdf .pdfViewer.scrollHorizontal .page,.wy-content-pdf .pdfViewer.scrollWrapped .page{margin-left:var(--spreadHorizontalWrapped-margin-LR);margin-right:var(--spreadHorizontalWrapped-margin-LR)}.wy-content-pdf .pdfViewer.removePageBorders .spread .page,.wy-content-pdf .pdfViewer.removePageBorders.scrollHorizontal .page,.wy-content-pdf .pdfViewer.removePageBorders.scrollWrapped .page{margin-left:5px;margin-right:5px}.wy-content-pdf .pdfViewer .page canvas{margin:0;display:block}.wy-content-pdf .pdfViewer .page canvas[hidden]{display:none}.wy-content-pdf .pdfViewer .page .loadingIcon{position:absolute;display:block;left:0;top:0;right:0;bottom:0}.wy-content-pdf .pdfViewer .page .loadingIcon.notVisible{background:none}.wy-content-pdf .pdfViewer.enablePermissions .textLayer span{-webkit-user-select:none!important;-moz-user-select:none!important;user-select:none!important;cursor:not-allowed}.wy-content-pdf .pdfPresentationMode .pdfViewer{padding-bottom:0}.wy-content-pdf .pdfPresentationMode .spread{margin:0}.wy-content-pdf .pdfPresentationMode .pdfViewer .page{margin:0 auto;border:2px solid transparent}.wy-content-pdf .pdfViewer .page{box-shadow:var(--wy-shadow-level2, 0 calc(.25 * var(--wy-rem, 1rem)) calc(.3125 * var(--wy-rem, 1rem)) 0 rgba(0, 0, 0, .14), 0 calc(.0625 * var(--wy-rem, 1rem)) calc(.625 * var(--wy-rem, 1rem)) 0 rgba(0, 0, 0, .12), 0 calc(.125 * var(--wy-rem, 1rem)) calc(.25 * var(--wy-rem, 1rem)) calc(-.0625 * var(--wy-rem, 1rem)) rgba(0, 0, 0, .2));background-color:var(--wy-white, var(, ))}.wy-content-text{word-break:break-word;white-space:pre-wrap}.wy-likes{display:inline-flex;align-items:center}.wy-like-button{background:var(--wy-component-background-color);color:var(--wy-primary);width:calc(2.5 * var(--wy-rem, 1rem));height:calc(2.5 * var(--wy-rem, 1rem))}.wy-like-count{padding:0 calc(.5 * var(--wy-rem, 1rem));color:var(--wy-outline);font-size:var(--wy-font-size-sm, calc(.875 * var(--wy-font-size-base, 1em)))}.wy-reaction-count{margin:0 calc(.5 * var(--wy-rem, 1rem)) 0 calc(.125 * var(--wy-rem, 1rem));line-height:1;font-size:var(--wy-font-size-sm, calc(.875 * var(--wy-font-size-base, 1em)))}.wy-reaction-menu{padding:calc(.25 * var(--wy-rem, 1rem));font-size:calc(1.125 * var(--wy-rem, 1rem));border-radius:calc(2.5 * var(--wy-rem, 1rem))}.wy-reaction-picker{display:flex}.wy-reaction-picker .wy-reaction-button{color:unset}.wy-reactions{display:inline-flex;align-items:center;column-gap:calc(.1875 * var(--wy-rem, 1rem))}.wy-reactions:empty{display:none}.wy-reactions-line{display:flex;align-items:center}:host(wy-reactions) .wy-emoji{width:calc(1.125 * var(--wy-rem, 1rem));height:calc(1.125 * var(--wy-rem, 1rem));font-size:calc(1.125 * var(--wy-rem, 1rem))}:host(wy-reactions) .wy-emoji:first-child{margin-left:calc(.1875 * var(--wy-rem, 1rem))}:host(wy-reactions) .wy-emoji:last-child{margin-right:calc(.1875 * var(--wy-rem, 1rem))}:host(wy-reactions[small]) .wy-reaction-lineup .wy-emoji,:host(wy-reactions[small]) .wy-reaction-like-button .wy-emoji{width:calc(1.125 * var(--wy-rem, 1rem));height:calc(1.125 * var(--wy-rem, 1rem));font-size:calc(1 * var(--wy-rem, 1rem))}:host(wy-reactions[small]) .wy-reaction-lineup .wy-emoji:first-child,:host(wy-reactions[small]) .wy-reaction-like-button .wy-emoji:first-child{margin-left:calc(.125 * var(--wy-rem, 1rem))}:host(wy-reactions[small]) .wy-reaction-lineup .wy-emoji:last-child,:host(wy-reactions[small]) .wy-reaction-like-button .wy-emoji:last-child{margin-right:calc(.125 * var(--wy-rem, 1rem))}:host(wy-reactions[small]) .wy-reaction-lineup .wy-like-count,:host(wy-reactions[small]) .wy-reaction-like-button .wy-like-count{font-size:var(--wy-font-size-xs, calc(.75 * var(--wy-font-size-base, 1em)))}.wy-table-reactions td:first-child{width:calc(3 * var(--wy-rem, 1rem))}.wy-table-reactions td:nth-child(2){width:100%}.wy-table-reactions tr:last-child td{box-shadow:none}.wy-reaction{font-size:calc(1.125 * var(--wy-rem, 1rem))}.wy-reaction-menu-button,.wy-like-button{background:var(--wy-component-background-color);color:currentColor;border-radius:var(--wy-border-radius-pill, calc(50 * var(--wy-rem, 1rem)));background-clip:content-box}.wy-sheet{--wy-scrollbar-adjust-top: 0;--wy-scrollbar-adjust-bottom: 0;--wy-component-background-color: var(--wy-surface-3, var(--wy-surface-3-light, #e3e7ee));--wy-component-color: var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e));background-color:var(--wy-component-background-color);color:var(--wy-component-color);position:fixed;z-index:1055;display:flex;flex-direction:column;overflow:hidden;bottom:calc(.5 * var(--wy-rem, 1rem));left:calc(.5 * var(--wy-rem, 1rem));right:calc(.5 * var(--wy-rem, 1rem));max-height:max(50vh,50%);min-height:calc(3 * var(--wy-rem, 1rem));margin:calc(.5 * var(--wy-rem, 1rem)) auto;max-width:calc(32 * var(--wy-rem, 1rem));transition:opacity var(--wy-transition, var(--wy-transition-duration, .2s) var(--wy-transition-curve, cubic-bezier(.4, 0, .2, 1)));border-radius:var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)));box-shadow:var(--wy-shadow-level1, 0 calc(.125 * var(--wy-rem, 1rem)) calc(.125 * var(--wy-rem, 1rem)) 0 rgba(0, 0, 0, .14), 0 calc(.1875 * var(--wy-rem, 1rem)) calc(.0625 * var(--wy-rem, 1rem)) calc(-.125 * var(--wy-rem, 1rem)) rgba(0, 0, 0, .2), 0 calc(.0625 * var(--wy-rem, 1rem)) calc(.3125 * var(--wy-rem, 1rem)) 0 rgba(0, 0, 0, .12))}.wy-sheet>.wy-appbars,.wy-sheet>.wy-appbar{border-top-left-radius:inherit;border-top-right-radius:inherit}.wy-sheet-body{overflow:hidden;padding:calc(.5 * var(--wy-rem, 1rem));position:relative;min-height:calc(3 * var(--wy-rem, 1rem))}.wy-sheet-body.wy-scroll-y{overflow-y:auto}.wy-sheet:not(.wy-show){opacity:0;transform:translateY(calc(32 * var(--wy-rem, 1rem)))}.wy-sheet.wy-show{opacity:1;transform:none;transition:transform var(--wy-transition, var(--wy-transition-duration, .2s) var(--wy-transition-curve, cubic-bezier(.4, 0, .2, 1))),opacity var(--wy-transition, var(--wy-transition-duration, .2s) var(--wy-transition-curve, cubic-bezier(.4, 0, .2, 1)));pointer-events:auto}.wy-spinner{align-self:center;justify-self:center;margin:auto}.wy-spinner circle{stroke-dasharray:1,100;stroke-dashoffset:0;transform-origin:center;fill:none!important}.wy-spinner.wy-spin{animation:wy-rotate 1.4s linear infinite}.wy-spinner.wy-spin circle{animation:wy-dash 1.4s ease-in-out infinite,wy-color 2.8s ease-in-out infinite}.wy-spinner.wy-spinner-overlay{position:absolute;left:0;right:0;top:0;bottom:0;margin:auto}@keyframes wy-rotate{to{transform:rotate(360deg)}}@keyframes wy-dash{0%{stroke-dasharray:1,100;stroke-dashoffset:0}50%{stroke-dasharray:44.5,100;stroke-dashoffset:-17.5}to{stroke-dasharray:44.5,100;stroke-dashoffset:-62}}@keyframes wy-color{0%,to{stroke:var(--wy-primary, var(--wy-primary-40, #006399))}25%{stroke:var(--wy-primary, var(--wy-primary-40, #006399))}50%{stroke:transparent}75%{stroke:var(--wy-primary, var(--wy-primary-40, #006399))}}.wy-toasts{position:fixed;left:0;bottom:calc(3.5 * var(--wy-rem, 1rem));right:0;pointer-events:none;display:flex;flex-direction:column;align-items:center;justify-content:center;z-index:1030;gap:calc(1 * var(--wy-rem, 1rem))}.wy-toast{background:var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e));color:var(--wy-surface-2, var(--wy-surface-2-light, #eaedf3));margin:0 0 calc(1 * var(--wy-rem, 1rem));width:calc(16 * var(--wy-rem, 1rem));max-width:calc(100% - 3 * var(--wy-rem, 1rem));gap:calc(.5 * var(--wy-rem, 1rem));display:flex;cursor:pointer;border-radius:var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)));margin-left:auto;margin-right:auto;margin-bottom:calc(.5 * var(--wy-rem, 1rem));padding:calc(.5 * var(--wy-rem, 1rem)) calc(.75 * var(--wy-rem, 1rem));-webkit-user-select:none;user-select:none;box-shadow:var(--wy-shadow-level2, 0 calc(.25 * var(--wy-rem, 1rem)) calc(.3125 * var(--wy-rem, 1rem)) 0 rgba(0, 0, 0, .14), 0 calc(.0625 * var(--wy-rem, 1rem)) calc(.625 * var(--wy-rem, 1rem)) 0 rgba(0, 0, 0, .12), 0 calc(.125 * var(--wy-rem, 1rem)) calc(.25 * var(--wy-rem, 1rem)) calc(-.0625 * var(--wy-rem, 1rem)) rgba(0, 0, 0, .2));position:relative;overflow:hidden;height:auto}.wy-toast.wy-fade{transition:all var(--wy-transition, var(--wy-transition-duration, .2s) var(--wy-transition-curve, cubic-bezier(.4, 0, .2, 1)))}.wy-toast.wy-fade:not(.wy-show){opacity:0;height:0;padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0}.wy-toast-action{position:sticky;top:calc(4.5 * var(--wy-rem, 1rem));bottom:calc(4.5 * var(--wy-rem, 1rem));z-index:990;background-color:var(--wy-primary, var(--wy-primary-40, #006399));color:var(--wy-on-primary, var(--wy-white, #ffffff));padding:calc(.5 * var(--wy-rem, 1rem)) calc(1 * var(--wy-rem, 1rem));border-radius:var(--wy-border-radius-pill, calc(50 * var(--wy-rem, 1rem)));font-size:var(--wy-font-size-xs, calc(.75 * var(--wy-font-size-base, 1em)));width:max-content;align-self:center;text-align:center;box-shadow:none}.wy-toast-primary{background:var(--wy-on-primary-container, var(--wy-primary-10, #001d32));color:var(--wy-primary-container, var(--wy-primary-90, #cde5ff))}.wy-typing-show{font-style:italic;display:none}.wy-typing-active .wy-typing-show{display:block}.wy-typing-active .wy-typing-hide{display:none}.wy-appbar wy-typing{position:relative;padding:0 calc(1.25 * var(--wy-rem, 1rem))}.wy-placeholder{cursor:wait;color:var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce));background:var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce));opacity:.5;animation:wy-placeholder-glow 2s ease-in-out infinite}@keyframes wy-placeholder-glow{50%{opacity:.2}}.wy-meeting{flex:1 1 100%;align-items:flex-start}.wy-meeting-actions{margin-top:calc(.5 * var(--wy-rem, 1rem))}.wy-dragging:after{content:attr(data-drag-title);background-color:#ffffff80;display:flex;justify-content:center;align-items:center;border:calc(.125 * var(--wy-rem, 1rem)) dashed var(--wy-primary, var(--wy-primary-40, #006399));font-weight:700;z-index:10000;position:absolute;top:0;left:0;bottom:0;right:0}.wy-message-editor-top{background-color:var(--wy-component-background-color);color:var(--wy-component-color)}@supports (position: sticky){.wy-message-editor-top{position:sticky;top:0;z-index:1020}}.wy-message-editor-bottom{background-color:var(--wy-component-background-color);color:var(--wy-component-color)}@supports (position: sticky){.wy-message-editor-bottom{position:sticky;bottom:0;z-index:1020}}.wy-message-form .wy-spinner{display:none}.wy-message-form.wy-uploading .wy-spinner{display:block}.wy-message-form.wy-uploading [data-icon=plus]{display:none}.wy-message-form .wy-picker-list:not(:empty){border-top:1px solid var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce))}.wy-message-editor-inputs{display:flex;flex-direction:row;align-items:flex-end;padding:calc(.5 * var(--wy-rem, 1rem)) calc(.25 * var(--wy-rem, 1rem));min-height:calc(3.5 * var(--wy-rem, 1rem))}.wy-message-editor-inputs>:not(:last-child){margin-right:calc(.25 * var(--wy-rem, 1rem))}.wy-message-editor-buttons{flex:1 0 auto}.wy-message-editor-text{flex:1 1 100%;display:flex;flex-direction:column}.wy-message-editor-mention,.wy-message-editor-link{background:#00f;color:#fff}.wy-message-editor .cm-editor,.wy-message-editor-grow:after,.wy-message-editor-grow>textarea,.wy-message-editor-textfield{flex:1 1 100%;max-height:calc(11.25 * var(--wy-rem, 1rem));background-color:var(--wy-background, var(--wy-neutral-99, #fcfcff));color:var(--wy-on-background, var(--wy-neutral-10, #1a1c1e));border-radius:calc(1.25 * var(--wy-rem, 1rem));border:var(--wy-input-border-width, 1px) solid var(--wy-background, var(--wy-neutral-99, #fcfcff))}.wy-message-editor .cm-editor:focus,.wy-message-editor-grow:focus:after,.wy-message-editor-grow>textarea:focus,.wy-message-editor-textfield:focus{border-color:var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce))}.wy-message-editor .cm-editor .cm-content,.wy-message-editor-textcontent{font-family:var(--wy-input-font-family, var(--wy-font-family, inherit)),\xA0inherit;font-size:var(--wy-font-size-base, var(--wy-font-size, 1em));padding:var(--wy-input-padding-y, calc(.4375 * var(--wy-rem, 1rem))) var(--wy-input-padding-x, calc(.75 * var(--wy-rem, 1rem)));min-height:calc(calc(2.5 * var(--wy-rem, 1rem)) - var(--wy-input-border-width, 1px));line-height:calc(1.5 * var(--wy-rem, 1rem))}.wy-message-editor-grow{display:grid}.wy-message-editor-grow:after,.wy-message-editor-grow>textarea{grid-area:1/1/2/2}.wy-message-editor-grow:after{content:attr(data-replicated-value) \" \";white-space:pre-wrap;visibility:hidden}.wy-message-editor-grow>textarea{resize:none;overflow:hidden}.wy-message-editor .cm-scroller{font-family:unset;line-height:1.5}.wy-message-editor .cm-widgetBuffer{vertical-align:unset}.wy-message-editor .cm-placeholder{color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e))}.wy-message-editor .cm-content{caret-color:var(--wy-on-background, var(--wy-neutral-10, #1a1c1e))}.wy-message-editor .cm-editor.cm-focused{--wy-component-color: var(--wy-on-background, var(--wy-neutral-10, #1a1c1e));color:var(--wy-component-color);border-color:var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce));outline:0}.wy-message-editor .cm-editor .cm-scroller{overflow:auto}.wy-scrollbars .wy-message-editor .cm-editor .cm-scroller{scrollbar-width:thin;scrollbar-color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e)) transparent}.wy-scrollbars .wy-message-editor .cm-editor .cm-scroller::-webkit-scrollbar{height:.625rem;width:.625rem;background:transparent;z-index:999}.wy-scrollbars .wy-message-editor .cm-editor .cm-scroller::-webkit-scrollbar-track{background:transparent}.wy-scrollbars .wy-message-editor .cm-editor .cm-scroller::-webkit-scrollbar-thumb{background-color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e));border:.125rem solid transparent;border-radius:.5rem;background-clip:padding-box;opacity:75%}.wy-scrollbars .wy-message-editor .cm-editor .cm-scroller::-webkit-scrollbar-thumb:hover{background-color:var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce));opacity:75%}.wy-scrollbars .wy-message-editor .cm-editor .cm-scroller::-webkit-scrollbar-thumb:window-inactive{background-color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e));opacity:50%}.wy-scrollbars .wy-message-editor .cm-editor .cm-scroller::-webkit-scrollbar-button:vertical:start:single-button{height:calc(.375 * var(--wy-rem, 1rem))}.wy-scrollbars .wy-message-editor .cm-editor .cm-scroller::-webkit-scrollbar-button:vertical:end:single-button{height:calc(.375 * var(--wy-rem, 1rem))}.wy-message-editor .wy-is-invalid+[data-editor-target] .cm-editor,.wy-message-editor .wy-is-invalid .cm-editor{border-color:var(--wy-error, var(--wy-error-40, #ba1824))!important}.wy-message-editor .cm-tooltip.cm-tooltip-autocomplete>ul{font-family:unset;max-height:calc(15 * var(--wy-rem, 1rem))}.wy-message-editor .cm-tooltip.cm-tooltip-autocomplete>ul>li{padding:0}.wy-message-editor .cm-tooltip{border:none;background-clip:padding-box;background-color:var(--wy-surface-2, var(--wy-surface-2-light, #eaedf3));color:var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e));border-radius:var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)));box-shadow:var(--wy-shadow-level1, 0 calc(.125 * var(--wy-rem, 1rem)) calc(.125 * var(--wy-rem, 1rem)) 0 rgba(0, 0, 0, .14), 0 calc(.1875 * var(--wy-rem, 1rem)) calc(.0625 * var(--wy-rem, 1rem)) calc(-.125 * var(--wy-rem, 1rem)) rgba(0, 0, 0, .2), 0 calc(.0625 * var(--wy-rem, 1rem)) calc(.3125 * var(--wy-rem, 1rem)) 0 rgba(0, 0, 0, .12));overflow:hidden;z-index:1000}.wy-message-editor .cm-tooltip-autocomplete ul li[aria-selected]{background:var(--wy-primary-container, var(--wy-primary-90, #cde5ff));color:unset}.wy-message-editor .cm-tooltip-autocomplete .cm-completionLabel{display:none}.wy-message-editor .cm-tooltip-autocomplete .wy-item-hover:hover,.wy-message-editor .cm-tooltip-autocomplete .wy-item-hover:focus{background:var(--wy-surface-variant, var(--wy-neutral-variant-90, #dee3eb))}.wy-message-editor .cm-tooltip-autocomplete .wy-avatar{width:calc(2 * var(--wy-rem, 1rem));height:calc(2 * var(--wy-rem, 1rem))}.wy-card{--wy-component-background-color: var(--wy-surface-1, var(--wy-surface-1-light, #f1f2f7));--wy-component-color: var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e));--wy-component-border-radius: var(--wy-border-radius-lg, calc(1.5 * var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)))));background-color:var(--wy-component-background-color);color:var(--wy-component-color);border-radius:var(--wy-component-border-radius);position:relative;display:flex;flex-direction:column;min-width:0;word-wrap:break-word;background-clip:border-box}.wy-card>hr{margin-right:0;margin-left:0}.wy-card-primary{--wy-component-background-color: var(--wy-primary-container, var(--wy-primary-90, #cde5ff));--wy-component-color: var(--wy-on-primary-container, var(--wy-primary-10, #001d32))}.wy-card-hover{cursor:pointer;-webkit-user-select:none;user-select:none}.wy-card-hover:before{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;border-radius:inherit;background:var(--wy-component-color);opacity:0%}.wy-card-hover:hover:before{opacity:var(--wy-opacity-state-hover, 8%)}.wy-card-hover:focus:before{opacity:var(--wy-opacity-state-focus, 12%)}.wy-card-hover:active:before,.wy-card-hover.wy-active:before{opacity:var(--wy-opacity-state-active, 12%)}.wy-card-actions{position:absolute;top:min(.25 * var(--wy-rem, 1rem),100% - 2.5 * var(--wy-rem, 1rem));right:calc(.25 * var(--wy-rem, 1rem));align-items:center;display:flex}.wy-card-actions>.wy-button-icon,.wy-card-actions>.wy-dropdown>.wy-button-icon{background-clip:content-box}.wy-card-content{flex:1 0 auto;padding-block-end:calc(.5 * var(--wy-rem, 1rem));padding-inline-start:calc(.5 * var(--wy-rem, 1rem));padding-inline-end:calc(.5 * var(--wy-rem, 1rem))}.wy-card-content:first-child,.wy-card-actions+.wy-card-content:nth-child(2){padding-block-start:calc(.5 * var(--wy-rem, 1rem))}.wy-card-top{border-radius:var(--wy-component-border-radius);object-fit:cover;object-position:top center;flex:1 1 100%;max-height:calc(10 * var(--wy-rem, 1rem))}.wy-card-top-image{object-position:50% 38%}.wy-card-trashed{text-decoration:line-through}.wy-card-trashed>*:not(.wy-card-actions){opacity:var(--wy-opacity-disabled, 38%)}.wy-filename{font-size:var(--wy-font-size-sm, calc(.875 * var(--wy-font-size-base, 1em)));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center}.wy-files{width:100%;height:100%;position:relative;color:var(--wy-on-background, var(--wy-neutral-10, #1a1c1e));background-color:var(--wy-background, var(--wy-neutral-99, #fcfcff));display:flex;flex-direction:column;flex:1}@supports (position: sticky){wy-files-appbar{position:sticky;top:0;z-index:1020}}.wy-table-files thead{display:none;text-align:left}.wy-table-files td:nth-child(2){padding:0 var(--wy-table-cell-padding-x, calc(.25 * var(--wy-rem, 1rem)))}.wy-table-files td:nth-child(2),.wy-table-files th:nth-child(2){width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wy-table-files td:nth-child(3),.wy-table-files th:nth-child(3){display:none;width:calc(7 * var(--wy-rem, 1rem));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wy-table-files td:nth-child(4),.wy-table-files th:nth-child(4){display:none;width:calc(7.5 * var(--wy-rem, 1rem));text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wy-table-files td:nth-child(5),.wy-table-files th:nth-child(5){display:none;width:calc(7 * var(--wy-rem, 1rem));text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media (min-width: 576px){.wy-table-files thead{display:table-header-group}.wy-table-files td:nth-child(5),.wy-table-files th:nth-child(5){display:table-cell}}@media (min-width: 768px){.wy-table-files td:nth-child(3),.wy-table-files th:nth-child(3),.wy-table-files td:nth-child(4),.wy-table-files th:nth-child(4){display:table-cell}}.wy-files-thead{text-align:left}@media (max-width: 767.98px){.wy-files-thead{display:none}}.wy-files-td-filename{padding:0 var(--wy-table-cell-padding-x, calc(.25 * var(--wy-rem, 1rem)))}.wy-files-td-filename,.wy-files-th-filename{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wy-files-td-modified,.wy-files-th-modified{width:calc(7 * var(--wy-rem, 1rem));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media (max-width: 991.98px){.wy-files-td-modified,.wy-files-th-modified{display:none}}.wy-files-td-kind,.wy-files-th-kind{width:calc(7.5 * var(--wy-rem, 1rem));text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media (max-width: 991.98px){.wy-files-td-kind,.wy-files-th-kind{display:none}}.wy-files-td-size,.wy-files-th-size{width:calc(7 * var(--wy-rem, 1rem));text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media (min-width: 768px){.wy-files-td-size,.wy-files-th-size{display:none}}.wy-grid{display:grid;grid-auto-flow:dense;grid-template-columns:repeat(auto-fill,minmax(calc(10 * var(--wy-rem, 1rem)),1fr));grid-gap:calc(.75 * var(--wy-rem, 1rem))}.wy-sidebar{--wy-component-background-color: var(--wy-surface-2, var(--wy-surface-2-light, #eaedf3));--wy-component-color: var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e));background:var(--wy-component-background-color);color:var(--wy-component-color);min-width:0;min-height:0;flex-grow:0;flex-shrink:0;flex-basis:calc(18 * var(--wy-rem, 1rem));z-index:10;display:flex;flex-direction:column;transition:flex-basis var(--wy-transition, var(--wy-transition-duration, .2s) var(--wy-transition-curve, cubic-bezier(.4, 0, .2, 1)));position:relative;order:9999}.wy-sidebar>*{transition:opacity var(--wy-transition-fast, var(--wy-transition-duration-fast, .1s) var(--wy-transition-curve, cubic-bezier(.4, 0, .2, 1))) calc(var(--wy-transition-duration, .2s) - var(--wy-transition-duration-fast, .1s));min-width:calc(18 * var(--wy-rem, 1rem))}.wy-sidebar[hidden]{display:flex!important;flex-basis:0}.wy-sidebar[hidden]>*{transition:opacity var(--wy-transition-fast, var(--wy-transition-duration-fast, .1s) var(--wy-transition-curve, cubic-bezier(.4, 0, .2, 1)));opacity:0}@media (min-width: 768px){.wy-sidebar>*{min-width:calc(18 * var(--wy-rem, 1rem))}.wy-sidebar .wy-sidebar-handle{display:none}}@media (max-width: 767.98px){.wy-sidebar{transition:flex-basis var(--wy-transition, var(--wy-transition-duration, .2s) var(--wy-transition-curve, cubic-bezier(.4, 0, .2, 1))),margin-top var(--wy-transition, var(--wy-transition-duration, .2s) var(--wy-transition-curve, cubic-bezier(.4, 0, .2, 1)));border-top-left-radius:var(--wy-border-radius-lg, calc(1.5 * var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)))));border-top-right-radius:var(--wy-border-radius-lg, calc(1.5 * var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)))));flex-basis:50vh}.wy-sidebar:not([hidden]){margin-top:calc(-1 * var(--wy-border-radius-lg, calc(1.5 * var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem))))))}.wy-sidebar:not([hidden]).wy-maximized{flex-basis:calc(100% - var(--wy-appbar-height, calc(3 * var(--wy-rem, 1rem))) * .5);margin-top:calc(-50% + var(--wy-appbar-height, calc(3 * var(--wy-rem, 1rem))) * 2.5 - var(--wy-border-radius-lg, calc(1.5 * var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem))))))}.wy-sidebar:not([hidden]).wy-maximized~* .wy-nav-prev,.wy-sidebar:not([hidden]).wy-maximized~* .wy-nav-next{display:none}.wy-sidebar>*{min-height:var(--wy-appbar-height, calc(3 * var(--wy-rem, 1rem)))}}.wy-sidebar-handle{width:calc(4 * var(--wy-rem, 1rem));background-clip:content-box;background-color:var(--wy-on-surface-variant, var(--wy-neutral-variant-30, #42474e));height:calc(1 * var(--wy-rem, 1rem));border:calc(.375 * var(--wy-rem, 1rem)) solid transparent;position:absolute;top:0;z-index:2;left:50%;margin-left:calc(-2 * var(--wy-rem, 1rem));border-radius:var(--wy-border-radius-pill, calc(50 * var(--wy-rem, 1rem)));cursor:pointer}.wy-table{--wy-component-color: var(--wy-on-background, var(--wy-neutral-10, #1a1c1e));--wy-component-background-color: var(--wy-background, var(--wy-neutral-99, #fcfcff));color:var(--wy-component-color);background-color:var(--wy-component-background-color);table-layout:fixed;width:100%;vertical-align:top;border-collapse:collapse}.wy-table th,.wy-table td{padding:var(--wy-table-cell-padding-y, calc(.25 * var(--wy-rem, 1rem))) var(--wy-table-cell-padding-x, calc(.25 * var(--wy-rem, 1rem)));box-shadow:var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce)) 0 -1px 0 0 inset;line-height:1;vertical-align:middle;height:calc(2.5 * var(--wy-rem, 1rem))}.wy-table th:first-child,.wy-table td:first-child{padding-left:calc(var(--wy-table-cell-padding-x, calc(.25 * var(--wy-rem, 1rem))) * 2)}.wy-table th:last-child,.wy-table td:last-child{padding-right:calc(var(--wy-table-cell-padding-x, calc(.25 * var(--wy-rem, 1rem))) * 2)}.wy-table>tbody{vertical-align:inherit}.wy-table>thead{vertical-align:bottom}.wy-table .wy-table-cell-icon{color:var(--wy-component-color);vertical-align:middle;text-align:center;padding:calc(var(--wy-table-cell-padding-y, calc(.25 * var(--wy-rem, 1rem))) * .5) var(--wy-table-cell-padding-x, calc(.25 * var(--wy-rem, 1rem)));width:calc(calc(2.5 * var(--wy-rem, 1rem)) + var(--wy-table-cell-padding-x, calc(.25 * var(--wy-rem, 1rem))) * 2);font-size:var(--wy-font-size-base, var(--wy-font-size, 1em));font-weight:var(--wy-font-weight-base, );text-transform:none;letter-spacing:normal}.wy-table .wy-table-cell-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.wy-table-hover>tbody>tr:not(.wy-pager):hover>*{--wy-component-color: var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e));--wy-component-background-color: var(--wy-surface-2, var(--wy-surface-2-light, #eaedf3));color:var(--color);background-color:var(--wy-component-background-color);cursor:pointer}.wy-table-trashed th,.wy-table-trashed td{text-decoration:line-through}.wy-table-trashed th:not(:last-child)>*,.wy-table-trashed td:not(:last-child)>*{opacity:var(--wy-opacity-disabled, 38%)}.wy-table-trashed th>a,.wy-table-trashed td>a{color:var(--wy-component-color)}.wy-table-trashed:hover th,.wy-table-trashed:hover td{opacity:1}.wy-table-no-result{text-align:center;padding:calc(1 * var(--wy-rem, 1rem))}.wy-table-sort-link{display:inline-flex;align-items:center;color:var(--wy-link, var(--wy-primary-40, #006399));cursor:pointer}.wy-post{--wy-component-background-color: var(--wy-surface-1, var(--wy-surface-1-light, #f1f2f7));--wy-component-color: var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e));background-color:var(--wy-component-background-color);color:var(--wy-component-color);display:flex;flex-direction:column;position:relative;margin:calc(1 * var(--wy-rem, 1rem)) calc(.75 * var(--wy-rem, 1rem));--wy-component-border-radius: var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)));border-radius:var(--wy-component-border-radius)}.wy-post .wy-image-grid{border-radius:0;margin-bottom:calc(1 * var(--wy-rem, 1rem))}.wy-post .wy-embed{margin-bottom:calc(1 * var(--wy-rem, 1rem))}.wy-post .wy-comments{margin:calc(.5 * var(--wy-rem, 1rem)) calc(.75 * var(--wy-rem, 1rem));border-top:1px solid var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce));padding:calc(.75 * var(--wy-rem, 1rem)) 0 0}.wy-post-body{padding:0 calc(1 * var(--wy-rem, 1rem))}.wy-post-body:empty{display:none}.wy-post-body .wy-content,.wy-post-body .wy-list,.wy-post-body .wy-poll{margin-bottom:calc(1 * var(--wy-rem, 1rem))}.wy-post-footer{display:flex;align-items:center;justify-content:space-between;margin:0 calc(.25 * var(--wy-rem, 1rem)) calc(.25 * var(--wy-rem, 1rem))}.wy-post-footer .wy-meta{margin-right:calc(.5 * var(--wy-rem, 1rem))}.wy-post-dragging:after{content:attr(data-drag-title,\"Drop files here to upload.\");background-color:#ffffff80;display:flex;justify-content:center;align-items:center;border:calc(.125 * var(--wy-rem, 1rem)) dashed var(--wy-primary, var(--wy-primary-40, #006399));font-weight:700;z-index:10000;position:absolute;top:0;left:0;bottom:0;right:0}.wy-poll{flex:1 1 100%;min-width:0}.wy-poll-form{background:var(--wy-component-background-color);color:var(--wy-component-color);padding:calc(.5 * var(--wy-rem, 1rem))}.wy-poll-form:empty{display:none}.wy-poll-form input:not(:first-child){margin-top:calc(.5 * var(--wy-rem, 1rem))}.wy-poll-option{position:relative;background-color:var(--wy-background, var(--wy-neutral-99, #fcfcff));border:1px solid var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce));border-radius:var(--wy-border-radius-sm, calc(.75 * var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)))));margin-bottom:calc(.25 * var(--wy-rem, 1rem));padding:calc(.25 * var(--wy-rem, 1rem)) calc(.5 * var(--wy-rem, 1rem));min-height:calc(2.5 * var(--wy-rem, 1rem));cursor:pointer}.wy-poll-option .wy-progress{position:absolute;top:0;left:0;bottom:0;background-color:var(--wy-primary-container, var(--wy-primary-90, #cde5ff))}.wy-poll-option>:not(.wy-progress){z-index:1}.wy-embed{display:flex;flex-direction:column;word-wrap:break-word}.wy-embed-photo a{display:flex}.wy-embed-photo img{width:100%;height:auto}.wy-embed-photo-sm a{padding:0 calc(1 * var(--wy-rem, 1rem))}.wy-embed-photo-sm img{display:block;margin:0 auto;width:auto;max-width:100%;border-radius:var(--wy-border-radius-sm, calc(.75 * var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)))))}.wy-embed-video{position:relative;display:block;width:100%;padding:0;overflow:hidden}.wy-embed-video:before{display:block;content:\"\";padding-top:56.25%}.wy-embed-video iframe,.wy-embed-video embed,.wy-embed-video object,.wy-embed-video video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.wy-embed-caption{--wy-component-background-color: var(--wy-surface-3, var(--wy-surface-3-light, #e3e7ee));--wy-component-color: var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e));background-color:var(--wy-component-background-color);color:var(--wy-component-color);padding:calc(.5 * var(--wy-rem, 1rem)) calc(1 * var(--wy-rem, 1rem)) calc(1 * var(--wy-rem, 1rem));position:relative}.wy-embed-link{color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e));text-transform:uppercase;font-size:var(--wy-font-size-sm, calc(.875 * var(--wy-font-size-base, 1em)))}.wy-embed-link:after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;content:\"\"}.wy-embed-title{font-weight:var(--wy-headings-font-weight, 500);margin-bottom:calc(.5 * var(--wy-rem, 1rem))}.wy-embed-description{color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e))}.wy-embed-preview a[target=_blank]{pointer-events:none}.wy-embed-preview .wy-embed{display:none;margin:calc(.75 * var(--wy-rem, 1rem));border:1px solid var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce));border-radius:var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)))}.wy-embed-preview .wy-embed:first-child{display:block}.wy-embed-preview .wy-embed-caption{border-bottom-left-radius:var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)));border-bottom-right-radius:var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)))}.wy-embed-preview .wy-embed-actions{display:flex}.wy-embed-actions{display:none;justify-content:space-between;padding:calc(.5 * var(--wy-rem, 1rem)) calc(.25 * var(--wy-rem, 1rem))}.wy-embed-cycle{visibility:hidden}.wy-embed-show-cycle .wy-embed-cycle{visibility:visible}.wy-post-editor{padding:calc(.75 * var(--wy-rem, 1rem))}.wy-post-editor.wy-uploading .wy-icon-active-stack>:first-child{opacity:0}.wy-post-editor.wy-uploading .wy-icon-active-stack>:last-child{opacity:1}.wy-post-editor .wy-picker-list:not(:empty){margin-top:calc(.75 * var(--wy-rem, 1rem));border-top:1px solid var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce))}.wy-post-editor-inputs{display:flex;flex-direction:row;align-items:flex-end;min-height:calc(3.5 * var(--wy-rem, 1rem));flex-wrap:wrap}.wy-post-editor-inputs>:not(:last-child){margin-right:calc(.25 * var(--wy-rem, 1rem))}.wy-post-editor-inputs>:last-child{margin-left:auto}.wy-post-editor-buttons{flex:1 0 auto}.wy-post-editor-text{flex:1 1 100%;display:flex;flex-direction:column}.wy-post-editor-mention,.wy-post-editor-link{background:#00f;color:#fff}.wy-post-editor .cm-editor,.wy-post-editor-grow:after,.wy-post-editor-grow>textarea,.wy-post-editor-textfield{flex:1 1 100%;max-height:calc(11.25 * var(--wy-rem, 1rem));min-height:calc(4 * var(--wy-rem, 1rem));background-color:var(--wy-background, var(--wy-neutral-99, #fcfcff));color:var(--wy-on-background, var(--wy-neutral-10, #1a1c1e));border-radius:var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)));border:var(--wy-input-border-width, 1px) solid var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce));caret-color:var(--wy-primary, var(--wy-primary-40, #006399))}.wy-post-editor .cm-editor:focus,.wy-post-editor-grow:focus:after,.wy-post-editor-grow>textarea:focus,.wy-post-editor-textfield:focus{border-color:var(--wy-primary, var(--wy-primary-40, #006399))}.wy-post-editor .cm-editor .cm-content,.wy-post-editor-textcontent{font-family:var(--wy-input-font-family, var(--wy-font-family, inherit)),inherit;font-size:var(--wy-input-font-size, var(--wy-font-size-base, 1em));padding:var(--wy-input-padding-y, calc(.4375 * var(--wy-rem, 1rem))) var(--wy-input-padding-x, calc(.75 * var(--wy-rem, 1rem)))}.wy-post-editor-grow{display:grid}.wy-post-editor-grow:after,.wy-post-editor-grow>textarea{grid-area:1/1/2/2}.wy-post-editor-grow:after{content:attr(data-replicated-value) \" \";white-space:pre-wrap;visibility:hidden}.wy-post-editor-grow>textarea{resize:none;overflow:hidden}.wy-post-editor .cm-scroller{font-family:unset;line-height:1.5}.wy-post-editor .cm-widgetBuffer{vertical-align:unset}.wy-post-editor .cm-placeholder{color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e))}.wy-post-editor .cm-content{caret-color:var(--wy-on-background, var(--wy-neutral-10, #1a1c1e))}.wy-post-editor .cm-editor.cm-focused{--wy-component-color: var(--wy-on-background, var(--wy-neutral-10, #1a1c1e));color:var(--wy-component-color);border-color:var(--wy-primary, var(--wy-primary-40, #006399));outline:0}.wy-post-editor .cm-editor .cm-scroller{overflow:auto}.wy-scrollbars .wy-post-editor .cm-editor .cm-scroller{scrollbar-width:thin;scrollbar-color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e)) transparent}.wy-scrollbars .wy-post-editor .cm-editor .cm-scroller::-webkit-scrollbar{height:.625rem;width:.625rem;background:transparent;z-index:999}.wy-scrollbars .wy-post-editor .cm-editor .cm-scroller::-webkit-scrollbar-track{background:transparent}.wy-scrollbars .wy-post-editor .cm-editor .cm-scroller::-webkit-scrollbar-thumb{background-color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e));border:.125rem solid transparent;border-radius:.5rem;background-clip:padding-box;opacity:75%}.wy-scrollbars .wy-post-editor .cm-editor .cm-scroller::-webkit-scrollbar-thumb:hover{background-color:var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce));opacity:75%}.wy-scrollbars .wy-post-editor .cm-editor .cm-scroller::-webkit-scrollbar-thumb:window-inactive{background-color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e));opacity:50%}.wy-scrollbars .wy-post-editor .cm-editor .cm-scroller::-webkit-scrollbar-button:vertical:start:single-button{height:calc(.375 * var(--wy-rem, 1rem))}.wy-scrollbars .wy-post-editor .cm-editor .cm-scroller::-webkit-scrollbar-button:vertical:end:single-button{height:calc(.375 * var(--wy-rem, 1rem))}.wy-post-editor .wy-is-invalid+[data-editor-target] .cm-editor,.wy-post-editor .wy-is-invalid .cm-editor{border-color:var(--wy-error, var(--wy-error-40, #ba1824))!important}.wy-post-editor .cm-tooltip.cm-tooltip-autocomplete>ul{font-family:unset;max-height:calc(15 * var(--wy-rem, 1rem))}.wy-post-editor .cm-tooltip.cm-tooltip-autocomplete>ul>li{padding:0}.wy-post-editor .cm-tooltip{border:none;background-clip:padding-box;background-color:var(--wy-surface-2, var(--wy-surface-2-light, #eaedf3));color:var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e));border-radius:var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)));box-shadow:var(--wy-shadow-level1, 0 calc(.125 * var(--wy-rem, 1rem)) calc(.125 * var(--wy-rem, 1rem)) 0 rgba(0, 0, 0, .14), 0 calc(.1875 * var(--wy-rem, 1rem)) calc(.0625 * var(--wy-rem, 1rem)) calc(-.125 * var(--wy-rem, 1rem)) rgba(0, 0, 0, .2), 0 calc(.0625 * var(--wy-rem, 1rem)) calc(.3125 * var(--wy-rem, 1rem)) 0 rgba(0, 0, 0, .12));overflow:hidden;z-index:1000}.wy-post-editor .cm-tooltip-autocomplete ul li[aria-selected]{background:var(--wy-primary-container, var(--wy-primary-90, #cde5ff));color:unset}.wy-post-editor .cm-tooltip-autocomplete .cm-completionLabel{display:none}.wy-post-editor .cm-tooltip-autocomplete .wy-item-hover:hover,.wy-post-editor .cm-tooltip-autocomplete .wy-item-hover:focus{background:var(--wy-surface-variant, var(--wy-neutral-variant-90, #dee3eb))}.wy-post-editor .cm-tooltip-autocomplete .wy-avatar{width:calc(2 * var(--wy-rem, 1rem));height:calc(2 * var(--wy-rem, 1rem))}.wy-comments{padding:calc(.5 * var(--wy-rem, 1rem)) calc(.75 * var(--wy-rem, 1rem)) 0 calc(.75 * var(--wy-rem, 1rem));display:flex;flex-direction:column;gap:calc(1.25 * var(--wy-rem, 1rem))}.wy-comments-count{padding:0 calc(.5 * var(--wy-rem, 1rem));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wy-comment{--wy-component-background-color: var(--wy-surface-3, var(--wy-surface-3-light, #e3e7ee));--wy-component-color: var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e));--wy-component-border-radius: var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)));border-radius:var(--wy-component-border-radius);background-color:var(--wy-component-background-color);color:var(--wy-component-color);display:flex;flex-direction:column;gap:calc(.25 * var(--wy-rem, 1rem));padding:calc(.25 * var(--wy-rem, 1rem));position:relative}.wy-comment .wy-item{padding-left:calc(.75 * var(--wy-rem, 1rem));padding-right:calc(.75 * var(--wy-rem, 1rem))}.wy-comment .wy-item>.wy-avatar,.wy-comment .wy-item>wy-icon,.wy-comment .wy-item>.wy-icon-stack{margin-left:calc(-.25 * var(--wy-rem, 1rem))}.wy-comment .wy-reactions-line{position:absolute;bottom:calc(-1.125 * var(--wy-rem, 1rem));right:calc(.25 * var(--wy-rem, 1rem))}.wy-comment-body{flex:1 0 auto;z-index:1}.wy-comment-body .wy-image-grid,.wy-comment-body .wy-embed,.wy-comment-body .wy-content,.wy-comment-body .wy-list,.wy-comment-body .wy-poll{margin-bottom:calc(1 * var(--wy-rem, 1rem))}.wy-comment-body .wy-image-grid:last-child,.wy-comment-body .wy-embed:last-child,.wy-comment-body .wy-content:last-child,.wy-comment-body .wy-list:last-child,.wy-comment-body .wy-poll:last-child{margin-bottom:0}.wy-comment-content{padding:0 calc(.5 * var(--wy-rem, 1rem)) calc(.5 * var(--wy-rem, 1rem));display:flex;flex-direction:column}.wy-comment-editor .wy-spinner{display:none}.wy-comment-editor.wy-uploading .wy-spinner{display:block}.wy-comment-editor.wy-uploading [data-icon=plus]{display:none}.wy-comment-editor .wy-picker-list:not(:empty){border-top:1px solid var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce))}.wy-comment-editor-bottom{position:sticky;bottom:0;z-index:999;background-color:var(--wy-component-background-color);color:var(--wy-component-color)}.wy-comment-editor-inputs{display:flex;flex-direction:row;align-items:flex-end;padding:calc(.5 * var(--wy-rem, 1rem)) calc(.25 * var(--wy-rem, 1rem));min-height:calc(3.5 * var(--wy-rem, 1rem))}.wy-comment-editor-inputs>:not(:last-child){margin-right:calc(.25 * var(--wy-rem, 1rem))}.wy-comment-editor-buttons{flex:1 0 auto}.wy-comment-editor-text{flex:1 1 100%;display:flex;flex-direction:column}.wy-comment-editor-mention,.wy-comment-editor-link{background:#00f;color:#fff}.wy-comment-editor .cm-editor,.wy-comment-editor-grow:after,.wy-comment-editor-grow>textarea,.wy-comment-editor-textfield{flex:1 1 100%;max-height:calc(11.25 * var(--wy-rem, 1rem));background-color:var(--wy-background, var(--wy-neutral-99, #fcfcff));color:var(--wy-on-background, var(--wy-neutral-10, #1a1c1e));border-radius:calc(1.25 * var(--wy-rem, 1rem));border:var(--wy-input-border-width, 1px) solid var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce))}.wy-comment-editor .cm-editor:focus,.wy-comment-editor-grow:focus:after,.wy-comment-editor-grow>textarea:focus,.wy-comment-editor-textfield:focus{border-color:var(--wy-primary, var(--wy-primary-40, #006399))}.wy-comment-editor .cm-editor .cm-content,.wy-comment-editor-textcontent{font-family:var(--wy-input-font-family, var(--wy-font-family, inherit)),inherit;font-size:var(--wy-input-font-size, var(--wy-font-size-base, 1em));padding:var(--wy-input-padding-y, calc(.4375 * var(--wy-rem, 1rem))) var(--wy-input-padding-x, calc(.75 * var(--wy-rem, 1rem)))}.wy-comment-editor-grow{display:grid}.wy-comment-editor-grow:after,.wy-comment-editor-grow>textarea{grid-area:1/1/2/2}.wy-comment-editor-grow:after{content:attr(data-replicated-value) \" \";white-space:pre-wrap;visibility:hidden}.wy-comment-editor-grow>textarea{resize:none;overflow:hidden}.wy-comment-editor{position:relative}.wy-comment-editor .cm-scroller{font-family:unset;line-height:1.5}.wy-comment-editor .cm-widgetBuffer{vertical-align:unset}.wy-comment-editor .cm-placeholder{color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e))}.wy-comment-editor .cm-content{caret-color:var(--wy-on-background, var(--wy-neutral-10, #1a1c1e))}.wy-comment-editor .cm-editor.cm-focused{--wy-component-color: var(--wy-on-background, var(--wy-neutral-10, #1a1c1e));color:var(--wy-component-color);border-color:var(--wy-primary, var(--wy-primary-40, #006399));outline:0}.wy-comment-editor .cm-editor .cm-scroller{overflow:auto}.wy-scrollbars .wy-comment-editor .cm-editor .cm-scroller{scrollbar-width:thin;scrollbar-color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e)) transparent}.wy-scrollbars .wy-comment-editor .cm-editor .cm-scroller::-webkit-scrollbar{height:.625rem;width:.625rem;background:transparent;z-index:999}.wy-scrollbars .wy-comment-editor .cm-editor .cm-scroller::-webkit-scrollbar-track{background:transparent}.wy-scrollbars .wy-comment-editor .cm-editor .cm-scroller::-webkit-scrollbar-thumb{background-color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e));border:.125rem solid transparent;border-radius:.5rem;background-clip:padding-box;opacity:75%}.wy-scrollbars .wy-comment-editor .cm-editor .cm-scroller::-webkit-scrollbar-thumb:hover{background-color:var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce));opacity:75%}.wy-scrollbars .wy-comment-editor .cm-editor .cm-scroller::-webkit-scrollbar-thumb:window-inactive{background-color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e));opacity:50%}.wy-scrollbars .wy-comment-editor .cm-editor .cm-scroller::-webkit-scrollbar-button:vertical:start:single-button{height:calc(.375 * var(--wy-rem, 1rem))}.wy-scrollbars .wy-comment-editor .cm-editor .cm-scroller::-webkit-scrollbar-button:vertical:end:single-button{height:calc(.375 * var(--wy-rem, 1rem))}.wy-comment-editor .wy-is-invalid+.cm-editor,.wy-comment-editor .wy-is-invalid .cm-editor{border-color:var(--wy-error, var(--wy-error-40, #ba1824))!important}.wy-comment-editor .cm-tooltip.cm-tooltip-autocomplete>ul{font-family:unset;max-height:calc(15 * var(--wy-rem, 1rem))}.wy-comment-editor .cm-tooltip.cm-tooltip-autocomplete>ul>li{padding:0}.wy-comment-editor .cm-tooltip{border:none;background-clip:padding-box;background-color:var(--wy-surface-2, var(--wy-surface-2-light, #eaedf3));color:var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e));border-radius:var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)));box-shadow:var(--wy-shadow-level1, 0 calc(.125 * var(--wy-rem, 1rem)) calc(.125 * var(--wy-rem, 1rem)) 0 rgba(0, 0, 0, .14), 0 calc(.1875 * var(--wy-rem, 1rem)) calc(.0625 * var(--wy-rem, 1rem)) calc(-.125 * var(--wy-rem, 1rem)) rgba(0, 0, 0, .2), 0 calc(.0625 * var(--wy-rem, 1rem)) calc(.3125 * var(--wy-rem, 1rem)) 0 rgba(0, 0, 0, .12));overflow:hidden;z-index:1000}.wy-comment-editor .cm-tooltip-autocomplete ul li[aria-selected]{background:var(--wy-primary-container, var(--wy-primary-90, #cde5ff));color:unset}.wy-comment-editor .cm-tooltip-autocomplete .cm-completionLabel{display:none}.wy-comment-editor .cm-tooltip-autocomplete .wy-item-hover:hover,.wy-comment-editor .cm-tooltip-autocomplete .wy-item-hover:focus{background:var(--wy-surface-variant, var(--wy-neutral-variant-90, #dee3eb))}.wy-comment-editor .cm-tooltip-autocomplete .wy-avatar{width:calc(2 * var(--wy-rem, 1rem));height:calc(2 * var(--wy-rem, 1rem))}.wy-badge{display:inline-block;padding:.35em .65em;font-size:.75em;font-weight:var(--wy-font-weight-bold, );line-height:1;color:var(--wy-on-primary, var(--wy-white, #ffffff));text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:var(--wy-border-radius-pill, calc(50 * var(--wy-rem, 1rem)));background-color:var(--wy-primary, var(--wy-primary-40, #006399))}.wy-badge:empty{display:none}.wy-button{position:relative}.wy-button .wy-badge{font-size:var(--wy-font-size-xs, calc(.75 * var(--wy-font-size-base, 1em)));position:absolute;right:0;top:0;border-radius:calc(1 * var(--wy-rem, 1rem));margin:0;padding:calc(.25 * var(--wy-rem, 1rem));min-width:calc(1 * var(--wy-rem, 1rem));max-width:calc(2 * var(--wy-rem, 1rem));height:calc(1 * var(--wy-rem, 1rem));line-height:calc(.5 * var(--wy-rem, 1rem));display:block;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wy-button .wy-badge:empty{display:none}.wy-conversations{position:relative}.wy-conversation{display:flex;position:relative}.wy-conversation .wy-item-title{font-weight:400}.wy-conversation.wy-unread .wy-item-title{font-weight:700}.wy-conversation.wy-unread .wy-item-text,.wy-conversation.wy-unread .wy-meta{color:var(--wy-on-background, var(--wy-neutral-10, #1a1c1e));font-weight:600}.wy-conversation .wy-item-text .wy-typing-show{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:400}.wy-messenger-conversation{---background-color: var(--wy-background, var(--wy-neutral-99, #fcfcff));---color: var(--wy-on-background, var(--wy-neutral-10, #1a1c1e));background-color:var(---background-color);color:var(---color);overflow-anchor:none;display:flex;flex-direction:column;flex:1 0 min-content;height:100%;width:100%;min-height:0;min-width:0}",Mb=Fc(Lb);var Ob=Object.defineProperty,Ib=Object.getOwnPropertyDescriptor,Tb=function Tb(r,o,s,B){for(var Q=B>1?void 0:B?Ib(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&Ob(o,s,Q),Q};var Ys=function(_Gs){_inherits(Ys,_Gs);function Ys(){var _this182;_classCallCheck(this,Ys);_this182=_callSuper(this,Ys,arguments),_this182.connectedContexts=new Set;return _this182}_createClass(Ys,[{key:"disconnectedCallback",value:function disconnectedCallback(){_get(_getPrototypeOf(Ys.prototype),"disconnectedCallback",this).call(this),Rn.removeAll(),Rn.host=void 0,this.connectedContexts.clear()}}]);return Ys}(Gs);Ys.styles=Mb;Ys=Tb([de("wy-portal")],Ys);function Rb(_ref137){var r=_ref137.storage,_ref137$key=_ref137.key,o=_ref137$key===void 0?"REACT_QUERY_OFFLINE_CACHE":_ref137$key,_ref137$throttleTime=_ref137.throttleTime,s=_ref137$throttleTime===void 0?1e3:_ref137$throttleTime,_ref137$serialize=_ref137.serialize,B=_ref137$serialize===void 0?JSON.stringify:_ref137$serialize,_ref137$deserialize=_ref137.deserialize,Q=_ref137$deserialize===void 0?JSON.parse:_ref137$deserialize,Y=_ref137.retry;if(r){var J=function J(it){try{r.setItem(o,B(it));return}catch(nt){return nt}};return{persistClient:Db(function(it){var nt=it,ot=J(nt),dt=0;for(;ot&&nt;)dt++,nt=Y==null?void 0:Y({persistedClient:nt,error:ot,errorCount:dt}),nt&&(ot=J(nt))},s),restoreClient:function restoreClient(){var it=r.getItem(o);if(it)return Q(it)},removeClient:function removeClient(){r.removeItem(o)}}}return{persistClient:up,restoreClient:function restoreClient(){},removeClient:up}}function Db(r){var o=arguments.length>1&&arguments[1]!==undefined?arguments[1]:100;var s=null,B;return function(){for(var _len9=arguments.length,Q=new Array(_len9),_key9=0;_key9<_len9;_key9++){Q[_key9]=arguments[_key9]}B=Q,s===null&&(s=setTimeout(function(){r.apply(void 0,_toConsumableArray(B)),s=null},o))}}function up(){}var Fb=["added","removed","updated"];function yp(r){return Fb.includes(r)}function zb(_x50){return _zb.apply(this,arguments)}function _zb(){_zb=_asyncToGenerator(_regeneratorRuntime().mark(function _callee267(_ref138){var r,o,_ref138$maxAge,s,_ref138$buster,B,Q,Y,J,it;return _regeneratorRuntime().wrap(function _callee267$(_context269){while(1)switch(_context269.prev=_context269.next){case 0:r=_ref138.queryClient,o=_ref138.persister,_ref138$maxAge=_ref138.maxAge,s=_ref138$maxAge===void 0?1e3*60*60*24:_ref138$maxAge,_ref138$buster=_ref138.buster,B=_ref138$buster===void 0?"":_ref138$buster,Q=_ref138.hydrateOptions;_context269.prev=1;_context269.next=4;return o.restoreClient();case 4:Y=_context269.sent;if(Y)if(Y.timestamp){J=Date.now()-Y.timestamp>s,it=Y.buster!==B;J||it?o.removeClient():kv(r,Y.clientState,Q)}else o.removeClient();_context269.next=11;break;case 8:_context269.prev=8;_context269.t0=_context269["catch"](1);o.removeClient();case 11:case"end":return _context269.stop()}},_callee267,null,[[1,8]])}));return _zb.apply(this,arguments)}function pp(_x51){return _pp.apply(this,arguments)}function _pp(){_pp=_asyncToGenerator(_regeneratorRuntime().mark(function _callee268(_ref139){var r,o,_ref139$buster,s,B,Q;return _regeneratorRuntime().wrap(function _callee268$(_context270){while(1)switch(_context270.prev=_context270.next){case 0:r=_ref139.queryClient,o=_ref139.persister,_ref139$buster=_ref139.buster,s=_ref139$buster===void 0?"":_ref139$buster,B=_ref139.dehydrateOptions;Q={buster:s,timestamp:Date.now(),clientState:xv(r,B)};_context270.next=4;return o.persistClient(Q);case 4:case"end":return _context270.stop()}},_callee268)}));return _pp.apply(this,arguments)}function Nb(r){var o=r.queryClient.getQueryCache().subscribe(function(B){yp(B.type)&&pp(r)}),s=r.queryClient.getMutationCache().subscribe(function(B){yp(B.type)&&pp(r)});return function(){o(),s()}}function zl(r){return Object.prototype.toString.call(r)==="[object Object]"}function Nl(r){if(zl(r)===!1)return!1;var o=r.constructor;if(o===void 0)return!0;var s=o.prototype;return!(zl(s)===!1||Object.prototype.hasOwnProperty.call(s,"isPrototypeOf")===!1)}function Xs(r,o){var s=arguments.length>2&&arguments[2]!==undefined?arguments[2]:!1;r=r||{},o=o||{};var B={};for(var Q in r)Object.prototype.hasOwnProperty.call(r,Q)&&(B[Q]=r[Q]);for(var _Q6 in o)Object.prototype.hasOwnProperty.call(o,_Q6)&&(s&&B[_Q6]&&Nl(B[_Q6])&&Nl(o[_Q6])?B[_Q6]=Xs(B[_Q6],o[_Q6],s):B[_Q6]=o[_Q6]);return B}function Is(r,o){var s=arguments.length>2&&arguments[2]!==undefined?arguments[2]:!1;var B=arguments.length>3&&arguments[3]!==undefined?arguments[3]:!1;if(!B&&(!Nl(r)||!Nl(o))||B&&(!zl(r)||!zl(o)))return!1;var Q=Object.getOwnPropertyNames(r),Y=Object.getOwnPropertyNames(o);if(!s&&Q.length!==Y.length)return!1;for(var J=0;J<Q.length;J++){var it=Q[J],nt=r[it],ot=o[it];if(nt!==ot&&!Is(nt,ot,s))return!1}return!0}function Sf(r){return r.charAt(0).toUpperCase()+r.substring(1).toLowerCase()}var Vb="\\s,.:;\"",Bb=new RegExp("^|[".concat(Vb,"]|$"),"g");function Pf(r){return r.length>0?r.replace(/([a-z\d])([A-Z]+)/g,"$1-$2").replace(/_|\s+/g,"-").toLowerCase():r}function Hb(r){var o=arguments.length>1&&arguments[1]!==undefined?arguments[1]:2;if(!r)return null;var s="";var B=r.split(Bb).filter(function(Q){return Q});return B.length==1?s=B[0]:B.forEach(function(Q){s+=Q.charAt(0)}),s.substring(0,o).toUpperCase()}var jb={credentials:"omit",headers:{"X-Requested-With":"XMLHttpRequest"},redirect:"manual"};function wh(){return((1+Math.random())*65536|0).toString(16).substring(1)}function Ub(r){if(r&&r.ok&&r.body){var o=r.body.getReader();return new ReadableStream({start:function start(s){var B=function B(){return o.read().then(function(_ref140){var Q=_ref140.done,Y=_ref140.value;if(Q){s.close();return}return s.enqueue(Y),B()})};return B()}})}else throw new Error("Could not parse text stream")}var Af=function(_Event){_inherits(Af,_Event);function Af(r,o,s){var _this183;_classCallCheck(this,Af);_this183=_callSuper(this,Af,["context-request",{bubbles:!0,composed:!0}]),_this183.context=r,_this183.callback=o,_this183.subscribe=s!==null&&s!==void 0?s:!1;return _this183}return _createClass(Af)}(_wrapNativeSuper(Event)),$i=function(){function $i(r,o,s,B){var _this184=this;_classCallCheck(this,$i);if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=function(Q,Y){_this184.unsubscribe&&(_this184.unsubscribe!==Y&&(_this184.provided=!1,_this184.unsubscribe()),_this184.subscribe||_this184.unsubscribe()),_this184.value=Q,_this184.host.requestUpdate(),_this184.provided&&!_this184.subscribe||(_this184.provided=!0,_this184.callback&&_this184.callback(Q,Y)),_this184.unsubscribe=Y},this.host=r,o.context!==void 0){var _Q$subscribe;var Q=o;this.context=Q.context,this.callback=Q.callback,this.subscribe=(_Q$subscribe=Q.subscribe)!==null&&_Q$subscribe!==void 0?_Q$subscribe:!1}else this.context=o,this.callback=s,this.subscribe=B!==null&&B!==void 0?B:!1;this.host.addController(this)}_createClass($i,[{key:"hostConnected",value:function hostConnected(){this.dispatchRequest()}},{key:"hostDisconnected",value:function hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}},{key:"dispatchRequest",value:function dispatchRequest(){this.host.dispatchEvent(new Af(this.context,this.t,this.subscribe))}}]);return $i}();var Wb=function(){function Wb(o){var _this185=this;_classCallCheck(this,Wb);this.subscriptions=new Map,this.updateObservers=function(){var _iterator175=_createForOfIteratorHelper(_this185.subscriptions),_step175;try{for(_iterator175.s();!(_step175=_iterator175.n()).done;){var _step175$value=_slicedToArray(_step175.value,2),s=_step175$value[0],B=_step175$value[1].disposer;s(_this185.o,B)}}catch(err){_iterator175.e(err)}finally{_iterator175.f()}},o!==void 0&&(this.value=o)}_createClass(Wb,[{key:"value",get:function get(){return this.o},set:function set(o){this.setValue(o)}},{key:"setValue",value:function setValue(o){var s=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1;var B=s||!Object.is(o,this.o);this.o=o,B&&this.updateObservers()}},{key:"addCallback",value:function addCallback(o,s,B){var _this186=this;if(!B)return void o(this.value);this.subscriptions.has(o)||this.subscriptions.set(o,{disposer:function disposer(){_this186.subscriptions["delete"](o)},consumerHost:s});var _this$subscriptions$g=this.subscriptions.get(o),Q=_this$subscriptions$g.disposer;o(this.value,Q)}},{key:"clearCallbacks",value:function clearCallbacks(){this.subscriptions.clear()}}]);return Wb}();var qb=function(_Event2){_inherits(qb,_Event2);function qb(r){var _this187;_classCallCheck(this,qb);_this187=_callSuper(this,qb,["context-provider",{bubbles:!0,composed:!0}]),_this187.context=r;return _this187}return _createClass(qb)}(_wrapNativeSuper(Event)),Qb=function(_Wb){_inherits(Qb,_Wb);function Qb(r,o,s){var _this188;_classCallCheck(this,Qb);var B,Q;_this188=_callSuper(this,Qb,[o.context!==void 0?o.initialValue:s]),_this188.onContextRequest=function(Y){var J=Y.composedPath()[0];Y.context===_this188.context&&J!==_this188.host&&(Y.stopPropagation(),_this188.addCallback(Y.callback,J,Y.subscribe))},_this188.onProviderRequest=function(Y){var J=Y.composedPath()[0];if(Y.context!==_this188.context||J===_this188.host)return;var it=new Set;var _iterator176=_createForOfIteratorHelper(_this188.subscriptions),_step176;try{for(_iterator176.s();!(_step176=_iterator176.n()).done;){var _step176$value=_slicedToArray(_step176.value,2),nt=_step176$value[0],ot=_step176$value[1].consumerHost;it.has(nt)||(it.add(nt),ot.dispatchEvent(new Af(_this188.context,nt,!0)))}}catch(err){_iterator176.e(err)}finally{_iterator176.f()}Y.stopPropagation()},_this188.host=r,o.context!==void 0?_this188.context=o.context:_this188.context=o,_this188.attachListeners(),(Q=(B=_this188.host).addController)==null||Q.call(B,_assertThisInitialized(_this188));return _this188}_createClass(Qb,[{key:"attachListeners",value:function attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}},{key:"hostConnected",value:function hostConnected(){this.host.dispatchEvent(new qb(this.context))}}]);return Qb}(Wb);function Ge(_ref141){var r=_ref141.context,o=_ref141.subscribe;return function(s,B){_typeof(B)=="object"?B.addInitializer(function(){var _this189=this;new $i(this,{context:r,callback:function callback(Q){_this189[B.name]=Q},subscribe:o})}):s.constructor.addInitializer(function(Q){new $i(Q,{context:r,callback:function callback(Y){Q[B]=Y},subscribe:o})})}}var Kb=function(_Event3){_inherits(Kb,_Event3);function Kb(o){var _this190;_classCallCheck(this,Kb);_this190=_callSuper(this,Kb,["context-provider",{bubbles:!0,composed:!0}]),_this190.context=o;return _this190}return _createClass(Kb)}(_wrapNativeSuper(Event));var fh=function(_Qb){_inherits(fh,_Qb);function fh(o,s,B){var _this191;_classCallCheck(this,fh);s.context!==void 0?_this191=_callSuper(this,fh,[o,s]):_this191=_callSuper(this,fh,[o,s,B]),s.context!==void 0?_this191._context=s.context:_this191._context=s,_this191.isAttached=!0,_this191.host instanceof le||_this191.dispatchWhenConnected();return _possibleConstructorReturn(_this191)}_createClass(fh,[{key:"dispatchWhenConnected",value:function dispatchWhenConnected(){this.isAttached&&(this.host.isConnected?this.host.dispatchEvent(new Kb(this._context)):requestAnimationFrame(this.dispatchWhenConnected))}},{key:"detachListeners",value:function detachListeners(){this.isAttached=!1,this.host.removeEventListener("context-request",this.onContextRequest),this.host.removeEventListener("context-provider",this.onProviderRequest)}}]);return fh}(Qb);var Le=Symbol["for"]("weavy-context");function Zb(r,o){return new fh(r,{context:Le,initialValue:o})}var wp=Zb(document.documentElement);function Gb(r){document.readyState!=="loading"?r():document.addEventListener("DOMContentLoaded",r,{once:!0})}var Bu=function Bu(r){r&&requestAnimationFrame(function(){var o;return(o=r==null?void 0:r.focus)==null?void 0:o.call(r)})};function yn(_x52){return _yn.apply(this,arguments)}function _yn(){_yn=_asyncToGenerator(_regeneratorRuntime().mark(function _callee269(r){var o,s,B,_args213=arguments;return _regeneratorRuntime().wrap(function _callee269$(_context271){while(1)switch(_context271.prev=_context271.next){case 0:o=_args213.length>1&&_args213[1]!==undefined?_args213[1]:"wy-";s=[];for(B=r;B=B.parentElement;)B.matches(":not(:defined)")&&B.localName.startsWith(o)&&(console.log("Waiting for defining",B.localName),s.push(customElements.whenDefined(B.localName)));_context271.next=5;return Promise.all(s);case 5:case"end":return _context271.stop()}},_callee269)}));return _yn.apply(this,arguments)}var Yb=function Yb(r,o){var s;var B=new ResizeObserver(function(){var Q=r.isConnected;Q!==s&&(s=Q,o(Q,r))});return B.observe(r),B},fr=window.navigator.userAgent,Lf=fr.includes("iPad")||fr.includes("Android")&&!fr.includes("Mobi")||!1,Xb=fr.includes("Mobi")||Lf||!1,Jb=!Xb&&!Lf,fp=fr.includes("Windows")?"Windows":fr.includes("Macintosh")?"Mac":fr.includes("iPad")||fr.includes("iPhone")||fr.includes("iPod")?"iOS":fr.includes("Android")?"Android":void 0;fp==="Android"&&fr.includes("; wv")||fp==="iOS"&&fr.includes("Safari");var e1=/Chrome\/[0-9]/.test(fr)&&!/Chromium\/[0-9]/.test(fr)&&!/Edg.*\/[0-9]/.test(fr);var Vl=function(r){return r.JSON="application/json;charset=utf-8",r.FormData="multipart/form-data;charset=utf-8",r.URLEncoded="application/x-www-form-urlencoded;charset=utf-8",r.Text="text/plain;charset=utf-8",r.Auto="",r}(Vl||{});var t1=".wy-light :where(wy-chat),.wy-light :where(wy-files),.wy-light :where(wy-messenger),.wy-light :where(wy-posts),.wy-light :where(wy-portal),:host(.wy-light),:host .wy-light,::slotted(.wy-light){color-scheme:light;--wy-primary: var(--wy-primary-40, #006399);--wy-on-primary: var(--wy-white, #ffffff);--wy-primary-container: var(--wy-primary-90, #cde5ff);--wy-on-primary-container: var(--wy-primary-10, #001d32);--wy-secondary: var(--wy-secondary-40, #3b6a1c);--wy-on-secondary: var(--wy-white, #ffffff);--wy-secondary-container: var(--wy-secondary-90, #bbf294);--wy-on-secondary-container: var(--wy-secondary-10, #0a2100);--wy-tertiary: var(--wy-tertiary-40, #3b6a1c);--wy-on-tertiary: var(--wy-white, #ffffff);--wy-tertiary-container: var(--wy-tertiary-90, #bbf294);--wy-on-tertiary-container: var(--wy-tertiary-10, #0a2100);--wy-error: var(--wy-error-40, #ba1824);--wy-on-error: var(--wy-white, #ffffff);--wy-error-container: var(--wy-error-90, #ffdad7);--wy-on-error-container: var(--wy-error-10, #410004);--wy-warning: var(--wy-warning-70, #afb140);--wy-on-warning: var(--wy-black, #000000);--wy-warning-container: var(--wy-warning-90, #e7e971);--wy-on-warning-container: var(--wy-warning-10, #1c1d00);--wy-background: var(--wy-neutral-99, #fcfcff);--wy-on-background: var(--wy-neutral-10, #1a1c1e);--wy-surface: var(--wy-neutral-99, #fcfcff);--wy-on-surface: var(--wy-neutral-10, #1a1c1e);--wy-surface-variant: var(--wy-neutral-variant-90, #dee3eb);--wy-on-surface-variant: var(--wy-neutral-variant-30, #42474e);--wy-outline: var(--wy-neutral-variant-50, #72777e);--wy-outline-variant: var(--wy-neutral-variant-80, #c2c7ce);--wy-inverse-surface: var(--wy-neutral-20, #2f3033);--wy-on-inverse-surface: var(--wy-neutral-95, #f0f0f4);--wy-inverse-primary: var(--wy-primary-80, #95ccff);--wy-surface-1: var(--wy-surface-1-light, #f1f2f7);--wy-surface-2: var(--wy-surface-2-light, #eaedf3);--wy-surface-3: var(--wy-surface-3-light, #e3e7ee);--wy-surface-4: var(--wy-surface-4-light, #e1e6ed);--wy-surface-5: var(--wy-surface-5-light, #dce2ea);--wy-link: var(--wy-primary-40, #006399);--wy-blue: var(--wy-blue-light, #89a9fc);--wy-indigo: var(--wy-indigo-light, #9185de);--wy-purple: var(--wy-purple-light, #c675b7);--wy-pink: var(--wy-pink-light, #d57194);--wy-red: var(--wy-red-light, #db726c);--wy-orange: var(--wy-orange-light, #e89a3a);--wy-yellow: var(--wy-yellow-light, #afb140);--wy-green: var(--wy-green-light, #00a38b);--wy-teal: var(--wy-teal-light, #00a0a8);--wy-cyan: var(--wy-cyan-light, #0082a1);--wy-gray: var(--wy-gray-light, #76777a);--wy-presence-active: var(--wy-green-light, #00a38b);--wy-code-text: var(--wy-code-text-light, #3b3b3b);--wy-code-variable: var(--wy-code-variable-light, #001080);--wy-code-operator: var(--wy-code-operator-light, #000000);--wy-code-prolog: var(--wy-code-prolog-light, #000080);--wy-code-comment: var(--wy-code-comment-light, #008000);--wy-code-builtin: var(--wy-code-builtin-light, #0070C1);--wy-code-number: var(--wy-code-number-light, #098658);--wy-code-inserted: var(--wy-code-inserted-light, #098658);--wy-code-constant: var(--wy-code-constant-light, #811F3F);--wy-code-hexcode: var(--wy-code-hexcode-light, #811F3F);--wy-code-regex: var(--wy-code-regex-light, #811F3F);--wy-code-char: var(--wy-code-char-light, #811F3F);--wy-code-tag: var(--wy-code-tag-light, #800000);--wy-code-attr-name: var(--wy-code-attr-name-light, #E50000);--wy-code-selector: var(--wy-code-selector-light, #E50000);--wy-code-property: var(--wy-code-property-light, #E50000);--wy-code-deleted: var(--wy-code-deleted-light, #A31515);--wy-code-string: var(--wy-code-string-light, #A31515);--wy-code-changed: var(--wy-code-changed-light, #0451A5);--wy-code-punctuation: var(--wy-code-punctuation-light, #000000);--wy-code-function: var(--wy-code-function-light, #0000FF);--wy-code-keyword: var(--wy-code-keyword-light, #AF00DB);--wy-code-class-name: var(--wy-code-class-name-light, #267F99)}.wy-dark:not(.wy-light) :where(wy-chat),.wy-dark:not(.wy-light) :where(wy-files),.wy-dark:not(.wy-light) :where(wy-messenger),.wy-dark:not(.wy-light) :where(wy-posts),.wy-dark:not(.wy-light) :where(wy-portal),:host(.wy-dark:not(.wy-light)),:host .wy-dark:not(.wy-light),::slotted(.wy-dark:not(.wy-light)){color-scheme:dark;--wy-primary: var(--wy-primary-80, #95ccff);--wy-on-primary: var(--wy-primary-20, #003352);--wy-primary-container: var(--wy-primary-30, #004a75);--wy-on-primary-container: var(--wy-primary-90, #cde5ff);--wy-secondary: var(--wy-secondary-80, #a0d57b);--wy-on-secondary: var(--wy-secondary-20, #163800);--wy-secondary-container: var(--wy-secondary-30, #245103);--wy-on-secondary-container: var(--wy-secondary-90, #bbf294);--wy-tertiary: var(--wy-tertiary-80, #a0d57b);--wy-on-tertiary: var(--wy-tertiary-20, #163800);--wy-tertiary-container: var(--wy-tertiary-30, #245103);--wy-on-tertiary-container: var(--wy-tertiary-90, #bbf294);--wy-error: var(--wy-error-80, #ffb3ae);--wy-on-error: var(--wy-error-20, #68000b);--wy-error-container: var(--wy-error-30, #930014);--wy-on-error-container: var(--wy-error-90, #ffdad7);--wy-warning: var(--wy-warning-90, #e7e971);--wy-on-warning: var(--wy-warning-30, #484a00);--wy-warning-container: var(--wy-warning-50, #7a7c05);--wy-on-warning-container: var(--wy-warning-95, #f5f77d);--wy-background: var(--wy-neutral-10, #1a1c1e);--wy-on-background: var(--wy-neutral-90, #e2e2e5);--wy-surface: var(--wy-neutral-10, #1a1c1e);--wy-on-surface: var(--wy-neutral-90, #e2e2e5);--wy-surface-variant: var(--wy-neutral-variant-30, #42474e);--wy-on-surface-variant: var(--wy-neutral-variant-80, #c2c7ce);--wy-outline: var(--wy-neutral-variant-60, #8c9198);--wy-outline-variant: var(--wy-neutral-variant-30, #42474e);--wy-inverse-surface: var(--wy-neutral-90, #e2e2e5);--wy-on-inverse-surface: var(--wy-neutral-20, #2f3033);--wy-inverse-primary: var(--wy-primary-40, #006399);--wy-surface-1: var(--wy-surface-1-dark, #212427);--wy-surface-2: var(--wy-surface-2-dark, #25292d);--wy-surface-3: var(--wy-surface-3-dark, #292e33);--wy-surface-4: var(--wy-surface-4-dark, #2b3035);--wy-surface-5: var(--wy-surface-5-dark, #2d3338);--wy-link: var(--wy-primary-80, #95ccff);--wy-blue: var(--wy-blue-dark, #b1c5ff);--wy-indigo: var(--wy-indigo-dark, #9185de);--wy-purple: var(--wy-purple-dark, #e38fd3);--wy-pink: var(--wy-pink-dark, #f48bae);--wy-red: var(--wy-red-dark, #db726c);--wy-orange: var(--wy-orange-dark, #e89a3a);--wy-yellow: var(--wy-yellow-dark, #cacc58);--wy-green: var(--wy-green-dark, #00a38b);--wy-teal: var(--wy-teal-dark, #00a0a8);--wy-cyan: var(--wy-cyan-dark, #009dc3);--wy-gray: var(--wy-gray-dark, #909194);--wy-presence-active: var(--wy-green-dark, #00a38b);--wy-code-text: var(--wy-code-text-dark, #cccccc);--wy-code-variable: var(--wy-code-variable-dark, #9CDCFE);--wy-code-operator: var(--wy-code-operator-dark, #d4d4d4);--wy-code-prolog: var(--wy-code-prolog-dark, #569CD6);--wy-code-comment: var(--wy-code-comment-dark, #6a9955);--wy-code-builtin: var(--wy-code-builtin-dark, #4fc1ff);--wy-code-number: var(--wy-code-number-dark, #b5cea8);--wy-code-inserted: var(--wy-code-inserted-dark, #b5cea8);--wy-code-constant: var(--wy-code-constant-dark, #646695);--wy-code-hexcode: var(--wy-code-hexcode-dark, #646695);--wy-code-regex: var(--wy-code-regex-dark, #d16969);--wy-code-char: var(--wy-code-char-dark, #d16969);--wy-code-tag: var(--wy-code-tag-dark, #569cd6);--wy-code-attr-name: var(--wy-code-attr-name-dark, #9cdcfe);--wy-code-selector: var(--wy-code-selector-dark, #9cdcfe);--wy-code-property: var(--wy-code-property-dark, #9cdcfe);--wy-code-deleted: var(--wy-code-deleted-dark, #ce9178);--wy-code-string: var(--wy-code-string-dark, #ce9178);--wy-code-changed: var(--wy-code-changed-dark, #569cd6);--wy-code-punctuation: var(--wy-code-punctuation-dark, #D4D4D4);--wy-code-function: var(--wy-code-function-dark, #569cd6);--wy-code-keyword: var(--wy-code-keyword-dark, #C586C0);--wy-code-class-name: var(--wy-code-class-name-dark, #4ec9b0)}",ns=Fc(t1);function $r(r){return r<0?-1:r===0?0:1}function Ts(r,o,s){return(1-s)*r+s*o}function r1(r,o,s){return s<r?r:s>o?o:s}function Bl(r,o,s){return s<r?r:s>o?o:s}function Hu(r){return r=r%360,r<0&&(r=r+360),r}function i1(r,o){return Hu(o-r)<=180?1:-1}function n1(r,o){return 180-Math.abs(Math.abs(r-o)-180)}function mh(r,o){var s=r[0]*o[0][0]+r[1]*o[0][1]+r[2]*o[0][2],B=r[0]*o[1][0]+r[1]*o[1][1]+r[2]*o[1][2],Q=r[0]*o[2][0]+r[1]*o[2][1]+r[2]*o[2][2];return[s,B,Q]}var o1=[[0.41233895,0.35762064,0.18051042],[0.2126,0.7152,0.0722],[0.01932141,0.11916382,0.95034478]],a1=[[3.2413774792388685,-1.5376652402851851,-0.49885366846268053],[-0.9691452513005321,1.8758853451067872,0.04156585616912061],[0.05562093689691305,-0.20395524564742123,1.0571799111220335]],s1=[95.047,100,108.883];function ju(r,o,s){return(255<<24|(r&255)<<16|(o&255)<<8|s&255)>>>0}function mp(r){var o=Po(r[0]),s=Po(r[1]),B=Po(r[2]);return ju(o,s,B)}function Mf(r){return r>>16&255}function Of(r){return r>>8&255}function If(r){return r&255}function c1(r,o,s){var B=a1,Q=B[0][0]*r+B[0][1]*o+B[0][2]*s,Y=B[1][0]*r+B[1][1]*o+B[1][2]*s,J=B[2][0]*r+B[2][1]*o+B[2][2]*s,it=Po(Q),nt=Po(Y),ot=Po(J);return ju(it,nt,ot)}function l1(r){var o=na(Mf(r)),s=na(Of(r)),B=na(If(r));return mh([o,s,B],o1)}function d1(r){var o=On(r),s=Po(o);return ju(s,s,s)}function vh(r){var o=l1(r)[1];return 116*Tf(o/100)-16}function On(r){return 100*u1((r+16)/116)}function gh(r){return Tf(r/100)*116-16}function na(r){var o=r/255;return o<=0.040449936?o/12.92*100:Math.pow((o+0.055)/1.055,2.4)*100}function Po(r){var o=r/100;var s=0;return o<=31308e-7?s=o*12.92:s=1.055*Math.pow(o,1/2.4)-0.055,r1(0,255,Math.round(s*255))}function h1(){return s1}function Tf(r){var o=0.008856451679035631,s=24389/27;return r>o?Math.pow(r,1/3):(s*r+16)/116}function u1(r){var o=0.008856451679035631,s=24389/27,B=r*r*r;return B>o?B:(116*r-16)/s}var xi=function(){function xi(o,s,B,Q,Y,J,it,nt,ot,dt){_classCallCheck(this,xi);this.n=o,this.aw=s,this.nbb=B,this.ncb=Q,this.c=Y,this.nc=J,this.rgbD=it,this.fl=nt,this.fLRoot=ot,this.z=dt}_createClass(xi,null,[{key:"make",value:function make(){var o=arguments.length>0&&arguments[0]!==undefined?arguments[0]:h1();var s=arguments.length>1&&arguments[1]!==undefined?arguments[1]:200/Math.PI*On(50)/100;var B=arguments.length>2&&arguments[2]!==undefined?arguments[2]:50;var Q=arguments.length>3&&arguments[3]!==undefined?arguments[3]:2;var Y=arguments.length>4&&arguments[4]!==undefined?arguments[4]:!1;var J=o,it=J[0]*0.401288+J[1]*0.650173+J[2]*-0.051461,nt=J[0]*-0.250268+J[1]*1.204414+J[2]*0.045854,ot=J[0]*-2079e-6+J[1]*0.048952+J[2]*0.953127,dt=0.8+Q/10,Mt=dt>=0.9?Ts(0.59,0.69,(dt-0.9)*10):Ts(0.525,0.59,(dt-0.8)*10);var Ot=Y?1:dt*(1-1/3.6*Math.exp((-s-42)/92));Ot=Ot>1?1:Ot<0?0:Ot;var Qt=dt,Ut=[Ot*(100/it)+1-Ot,Ot*(100/nt)+1-Ot,Ot*(100/ot)+1-Ot],te=1/(5*s+1),qt=te*te*te*te,ie=1-qt,re=qt*s+0.1*ie*ie*Math.cbrt(5*s),ne=On(B)/o[1],ae=1.48+Math.sqrt(ne),Bt=0.725/Math.pow(ne,0.2),Wt=Bt,oe=[Math.pow(re*Ut[0]*it/100,0.42),Math.pow(re*Ut[1]*nt/100,0.42),Math.pow(re*Ut[2]*ot/100,0.42)],ve=[400*oe[0]/(oe[0]+27.13),400*oe[1]/(oe[1]+27.13),400*oe[2]/(oe[2]+27.13)],_e=(2*ve[0]+ve[1]+0.05*ve[2])*Bt;return new xi(ne,_e,Bt,Wt,Mt,Qt,Ut,re,Math.pow(re,0.25),ae)}}]);return xi}();xi.DEFAULT=xi.make();var Yt=function(){function Yt(o,s,B,Q,Y,J,it,nt,ot){_classCallCheck(this,Yt);this.hue=o,this.chroma=s,this.j=B,this.q=Q,this.m=Y,this.s=J,this.jstar=it,this.astar=nt,this.bstar=ot}_createClass(Yt,[{key:"distance",value:function distance(o){var s=this.jstar-o.jstar,B=this.astar-o.astar,Q=this.bstar-o.bstar,Y=Math.sqrt(s*s+B*B+Q*Q);return 1.41*Math.pow(Y,0.63)}},{key:"toInt",value:function toInt(){return this.viewed(xi.DEFAULT)}},{key:"viewed",value:function viewed(o){var s=this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100),B=Math.pow(s/Math.pow(1.64-Math.pow(0.29,o.n),0.73),1/0.9),Q=this.hue*Math.PI/180,Y=0.25*(Math.cos(Q+2)+3.8),J=o.aw*Math.pow(this.j/100,1/o.c/o.z),it=Y*(5e4/13)*o.nc*o.ncb,nt=J/o.nbb,ot=Math.sin(Q),dt=Math.cos(Q),Mt=23*(nt+0.305)*B/(23*it+11*B*dt+108*B*ot),Ot=Mt*dt,Qt=Mt*ot,Ut=(460*nt+451*Ot+288*Qt)/1403,te=(460*nt-891*Ot-261*Qt)/1403,qt=(460*nt-220*Ot-6300*Qt)/1403,ie=Math.max(0,27.13*Math.abs(Ut)/(400-Math.abs(Ut))),re=$r(Ut)*(100/o.fl)*Math.pow(ie,1/0.42),ne=Math.max(0,27.13*Math.abs(te)/(400-Math.abs(te))),ae=$r(te)*(100/o.fl)*Math.pow(ne,1/0.42),Bt=Math.max(0,27.13*Math.abs(qt)/(400-Math.abs(qt))),Wt=$r(qt)*(100/o.fl)*Math.pow(Bt,1/0.42),oe=re/o.rgbD[0],ve=ae/o.rgbD[1],_e=Wt/o.rgbD[2],Xe=1.86206786*oe-1.01125463*ve+0.14918677*_e,He=0.38752654*oe+0.62144744*ve-897398e-8*_e,ro=-0.0158415*oe-0.03412294*ve+1.04996444*_e;return c1(Xe,He,ro)}},{key:"xyzInViewingConditions",value:function xyzInViewingConditions(o){var s=this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100),B=Math.pow(s/Math.pow(1.64-Math.pow(0.29,o.n),0.73),1/0.9),Q=this.hue*Math.PI/180,Y=0.25*(Math.cos(Q+2)+3.8),J=o.aw*Math.pow(this.j/100,1/o.c/o.z),it=Y*(5e4/13)*o.nc*o.ncb,nt=J/o.nbb,ot=Math.sin(Q),dt=Math.cos(Q),Mt=23*(nt+0.305)*B/(23*it+11*B*dt+108*B*ot),Ot=Mt*dt,Qt=Mt*ot,Ut=(460*nt+451*Ot+288*Qt)/1403,te=(460*nt-891*Ot-261*Qt)/1403,qt=(460*nt-220*Ot-6300*Qt)/1403,ie=Math.max(0,27.13*Math.abs(Ut)/(400-Math.abs(Ut))),re=$r(Ut)*(100/o.fl)*Math.pow(ie,1/0.42),ne=Math.max(0,27.13*Math.abs(te)/(400-Math.abs(te))),ae=$r(te)*(100/o.fl)*Math.pow(ne,1/0.42),Bt=Math.max(0,27.13*Math.abs(qt)/(400-Math.abs(qt))),Wt=$r(qt)*(100/o.fl)*Math.pow(Bt,1/0.42),oe=re/o.rgbD[0],ve=ae/o.rgbD[1],_e=Wt/o.rgbD[2],Xe=1.86206786*oe-1.01125463*ve+0.14918677*_e,He=0.38752654*oe+0.62144744*ve-897398e-8*_e,ro=-0.0158415*oe-0.03412294*ve+1.04996444*_e;return[Xe,He,ro]}}],[{key:"fromInt",value:function fromInt(o){return Yt.fromIntInViewingConditions(o,xi.DEFAULT)}},{key:"fromIntInViewingConditions",value:function fromIntInViewingConditions(o,s){var B=(o&16711680)>>16,Q=(o&65280)>>8,Y=o&255,J=na(B),it=na(Q),nt=na(Y),ot=0.41233895*J+0.35762064*it+0.18051042*nt,dt=0.2126*J+0.7152*it+0.0722*nt,Mt=0.01932141*J+0.11916382*it+0.95034478*nt,Ot=0.401288*ot+0.650173*dt-0.051461*Mt,Qt=-0.250268*ot+1.204414*dt+0.045854*Mt,Ut=-2079e-6*ot+0.048952*dt+0.953127*Mt,te=s.rgbD[0]*Ot,qt=s.rgbD[1]*Qt,ie=s.rgbD[2]*Ut,re=Math.pow(s.fl*Math.abs(te)/100,0.42),ne=Math.pow(s.fl*Math.abs(qt)/100,0.42),ae=Math.pow(s.fl*Math.abs(ie)/100,0.42),Bt=$r(te)*400*re/(re+27.13),Wt=$r(qt)*400*ne/(ne+27.13),oe=$r(ie)*400*ae/(ae+27.13),ve=(11*Bt+-12*Wt+oe)/11,_e=(Bt+Wt-2*oe)/9,Xe=(20*Bt+20*Wt+21*oe)/20,He=(40*Bt+20*Wt+oe)/20,ro=Math.atan2(_e,ve)*180/Math.PI,Xo=ro<0?ro+360:ro>=360?ro-360:ro,Se=Xo*Math.PI/180,xr=He*s.nbb,pr=100*Math.pow(xr/s.aw,s.c*s.z),$e=4/s.c*Math.sqrt(pr/100)*(s.aw+4)*s.fLRoot,_r=Xo<20.14?Xo+360:Xo,Ps=0.25*(Math.cos(_r*Math.PI/180+2)+3.8),qe=5e4/13*Ps*s.nc*s.ncb*Math.sqrt(ve*ve+_e*_e)/(Xe+0.305),bl=Math.pow(qe,0.9)*Math.pow(1.64-Math.pow(0.29,s.n),0.73),ol=bl*Math.sqrt(pr/100),Te=ol*s.fLRoot,pe=50*Math.sqrt(bl*s.c/(s.aw+4)),ue=(1+100*7e-3)*pr/(1+7e-3*pr),se=1/0.0228*Math.log(1+0.0228*Te),be=se*Math.cos(Se),Ae=se*Math.sin(Se);return new Yt(Xo,ol,pr,$e,Te,pe,ue,be,Ae)}},{key:"fromJch",value:function fromJch(o,s,B){return Yt.fromJchInViewingConditions(o,s,B,xi.DEFAULT)}},{key:"fromJchInViewingConditions",value:function fromJchInViewingConditions(o,s,B,Q){var Y=4/Q.c*Math.sqrt(o/100)*(Q.aw+4)*Q.fLRoot,J=s*Q.fLRoot,it=s/Math.sqrt(o/100),nt=50*Math.sqrt(it*Q.c/(Q.aw+4)),ot=B*Math.PI/180,dt=(1+100*7e-3)*o/(1+7e-3*o),Mt=1/0.0228*Math.log(1+0.0228*J),Ot=Mt*Math.cos(ot),Qt=Mt*Math.sin(ot);return new Yt(B,s,o,Y,J,nt,dt,Ot,Qt)}},{key:"fromUcs",value:function fromUcs(o,s,B){return Yt.fromUcsInViewingConditions(o,s,B,xi.DEFAULT)}},{key:"fromUcsInViewingConditions",value:function fromUcsInViewingConditions(o,s,B,Q){var Y=s,J=B,it=Math.sqrt(Y*Y+J*J),nt=(Math.exp(it*0.0228)-1)/0.0228/Q.fLRoot;var ot=Math.atan2(J,Y)*(180/Math.PI);ot<0&&(ot+=360);var dt=o/(1-(o-100)*7e-3);return Yt.fromJchInViewingConditions(dt,nt,ot,Q)}},{key:"fromXyzInViewingConditions",value:function fromXyzInViewingConditions(o,s,B,Q){var Y=0.401288*o+0.650173*s-0.051461*B,J=-0.250268*o+1.204414*s+0.045854*B,it=-2079e-6*o+0.048952*s+0.953127*B,nt=Q.rgbD[0]*Y,ot=Q.rgbD[1]*J,dt=Q.rgbD[2]*it,Mt=Math.pow(Q.fl*Math.abs(nt)/100,0.42),Ot=Math.pow(Q.fl*Math.abs(ot)/100,0.42),Qt=Math.pow(Q.fl*Math.abs(dt)/100,0.42),Ut=$r(nt)*400*Mt/(Mt+27.13),te=$r(ot)*400*Ot/(Ot+27.13),qt=$r(dt)*400*Qt/(Qt+27.13),ie=(11*Ut+-12*te+qt)/11,re=(Ut+te-2*qt)/9,ne=(20*Ut+20*te+21*qt)/20,ae=(40*Ut+20*te+qt)/20,Bt=Math.atan2(re,ie)*180/Math.PI,Wt=Bt<0?Bt+360:Bt>=360?Bt-360:Bt,oe=Wt*Math.PI/180,ve=ae*Q.nbb,_e=100*Math.pow(ve/Q.aw,Q.c*Q.z),Xe=4/Q.c*Math.sqrt(_e/100)*(Q.aw+4)*Q.fLRoot,He=Wt<20.14?Wt+360:Wt,ro=1/4*(Math.cos(He*Math.PI/180+2)+3.8),Xo=5e4/13*ro*Q.nc*Q.ncb*Math.sqrt(ie*ie+re*re)/(ne+0.305),Se=Math.pow(Xo,0.9)*Math.pow(1.64-Math.pow(0.29,Q.n),0.73),xr=Se*Math.sqrt(_e/100),pr=xr*Q.fLRoot,$e=50*Math.sqrt(Se*Q.c/(Q.aw+4)),_r=(1+100*7e-3)*_e/(1+7e-3*_e),Ps=Math.log(1+0.0228*pr)/0.0228,qe=Ps*Math.cos(oe),bl=Ps*Math.sin(oe);return new Yt(Wt,xr,_e,Xe,pr,$e,_r,qe,bl)}}]);return Yt}();var xe=function(){function xe(){_classCallCheck(this,xe)}_createClass(xe,null,[{key:"sanitizeRadians",value:function sanitizeRadians(o){return(o+Math.PI*8)%(Math.PI*2)}},{key:"trueDelinearized",value:function trueDelinearized(o){var s=o/100;var B=0;return s<=31308e-7?B=s*12.92:B=1.055*Math.pow(s,1/2.4)-0.055,B*255}},{key:"chromaticAdaptation",value:function chromaticAdaptation(o){var s=Math.pow(Math.abs(o),0.42);return $r(o)*400*s/(s+27.13)}},{key:"hueOf",value:function hueOf(o){var s=mh(o,xe.SCALED_DISCOUNT_FROM_LINRGB),B=xe.chromaticAdaptation(s[0]),Q=xe.chromaticAdaptation(s[1]),Y=xe.chromaticAdaptation(s[2]),J=(11*B+-12*Q+Y)/11,it=(B+Q-2*Y)/9;return Math.atan2(it,J)}},{key:"areInCyclicOrder",value:function areInCyclicOrder(o,s,B){var Q=xe.sanitizeRadians(s-o),Y=xe.sanitizeRadians(B-o);return Q<Y}},{key:"intercept",value:function intercept(o,s,B){return(s-o)/(B-o)}},{key:"lerpPoint",value:function lerpPoint(o,s,B){return[o[0]+(B[0]-o[0])*s,o[1]+(B[1]-o[1])*s,o[2]+(B[2]-o[2])*s]}},{key:"setCoordinate",value:function setCoordinate(o,s,B,Q){var Y=xe.intercept(o[Q],s,B[Q]);return xe.lerpPoint(o,Y,B)}},{key:"isBounded",value:function isBounded(o){return 0<=o&&o<=100}},{key:"nthVertex",value:function nthVertex(o,s){var B=xe.Y_FROM_LINRGB[0],Q=xe.Y_FROM_LINRGB[1],Y=xe.Y_FROM_LINRGB[2],J=s%4<=1?0:100,it=s%2===0?0:100;if(s<4){var nt=J,ot=it,dt=(o-nt*Q-ot*Y)/B;return xe.isBounded(dt)?[dt,nt,ot]:[-1,-1,-1]}else if(s<8){var _nt4=J,_ot6=it,_dt3=(o-_ot6*B-_nt4*Y)/Q;return xe.isBounded(_dt3)?[_ot6,_dt3,_nt4]:[-1,-1,-1]}else{var _nt5=J,_ot7=it,_dt4=(o-_nt5*B-_ot7*Q)/Y;return xe.isBounded(_dt4)?[_nt5,_ot7,_dt4]:[-1,-1,-1]}}},{key:"bisectToSegment",value:function bisectToSegment(o,s){var B=[-1,-1,-1],Q=B,Y=0,J=0,it=!1,nt=!0;for(var ot=0;ot<12;ot++){var dt=xe.nthVertex(o,ot);if(dt[0]<0)continue;var Mt=xe.hueOf(dt);if(!it){B=dt,Q=dt,Y=Mt,J=Mt,it=!0;continue}(nt||xe.areInCyclicOrder(Y,Mt,J))&&(nt=!1,xe.areInCyclicOrder(Y,s,Mt)?(Q=dt,J=Mt):(B=dt,Y=Mt))}return[B,Q]}},{key:"midpoint",value:function midpoint(o,s){return[(o[0]+s[0])/2,(o[1]+s[1])/2,(o[2]+s[2])/2]}},{key:"criticalPlaneBelow",value:function criticalPlaneBelow(o){return Math.floor(o-0.5)}},{key:"criticalPlaneAbove",value:function criticalPlaneAbove(o){return Math.ceil(o-0.5)}},{key:"bisectToLimit",value:function bisectToLimit(o,s){var B=xe.bisectToSegment(o,s);var Q=B[0],Y=xe.hueOf(Q),J=B[1];for(var it=0;it<3;it++)if(Q[it]!==J[it]){var nt=-1,ot=255;Q[it]<J[it]?(nt=xe.criticalPlaneBelow(xe.trueDelinearized(Q[it])),ot=xe.criticalPlaneAbove(xe.trueDelinearized(J[it]))):(nt=xe.criticalPlaneAbove(xe.trueDelinearized(Q[it])),ot=xe.criticalPlaneBelow(xe.trueDelinearized(J[it])));for(var dt=0;dt<8&&!(Math.abs(ot-nt)<=1);dt++){var Mt=Math.floor((nt+ot)/2),Ot=xe.CRITICAL_PLANES[Mt],Qt=xe.setCoordinate(Q,Ot,J,it),Ut=xe.hueOf(Qt);xe.areInCyclicOrder(Y,s,Ut)?(J=Qt,ot=Mt):(Q=Qt,Y=Ut,nt=Mt)}}return xe.midpoint(Q,J)}},{key:"inverseChromaticAdaptation",value:function inverseChromaticAdaptation(o){var s=Math.abs(o),B=Math.max(0,27.13*s/(400-s));return $r(o)*Math.pow(B,1/0.42)}},{key:"findResultByJ",value:function findResultByJ(o,s,B){var Q=Math.sqrt(B)*11;var Y=xi.DEFAULT,J=1/Math.pow(1.64-Math.pow(0.29,Y.n),0.73),it=0.25*(Math.cos(o+2)+3.8)*(5e4/13)*Y.nc*Y.ncb,nt=Math.sin(o),ot=Math.cos(o);for(var dt=0;dt<5;dt++){var Mt=Q/100,Ot=s===0||Q===0?0:s/Math.sqrt(Mt),Qt=Math.pow(Ot*J,1/0.9),Ut=Y.aw*Math.pow(Mt,1/Y.c/Y.z)/Y.nbb,te=23*(Ut+0.305)*Qt/(23*it+11*Qt*ot+108*Qt*nt),qt=te*ot,ie=te*nt,re=(460*Ut+451*qt+288*ie)/1403,ne=(460*Ut-891*qt-261*ie)/1403,ae=(460*Ut-220*qt-6300*ie)/1403,Bt=xe.inverseChromaticAdaptation(re),Wt=xe.inverseChromaticAdaptation(ne),oe=xe.inverseChromaticAdaptation(ae),ve=mh([Bt,Wt,oe],xe.LINRGB_FROM_SCALED_DISCOUNT);if(ve[0]<0||ve[1]<0||ve[2]<0)return 0;var _e=xe.Y_FROM_LINRGB[0],Xe=xe.Y_FROM_LINRGB[1],He=xe.Y_FROM_LINRGB[2],ro=_e*ve[0]+Xe*ve[1]+He*ve[2];if(ro<=0)return 0;if(dt===4||Math.abs(ro-B)<2e-3)return ve[0]>100.01||ve[1]>100.01||ve[2]>100.01?0:mp(ve);Q=Q-(ro-B)*Q/(2*ro)}return 0}},{key:"solveToInt",value:function solveToInt(o,s,B){if(s<1e-4||B<1e-4||B>99.9999)return d1(B);o=Hu(o);var Q=o/180*Math.PI,Y=On(B),J=xe.findResultByJ(Q,s,Y);if(J!==0)return J;var it=xe.bisectToLimit(Y,Q);return mp(it)}},{key:"solveToCam",value:function solveToCam(o,s,B){return Yt.fromInt(xe.solveToInt(o,s,B))}}]);return xe}();xe.SCALED_DISCOUNT_FROM_LINRGB=[[0.001200833568784504,0.002389694492170889,2795742885861124e-19],[5891086651375999e-19,0.0029785502573438758,3270666104008398e-19],[10146692491640572e-20,5364214359186694e-19,0.0032979401770712076]];xe.LINRGB_FROM_SCALED_DISCOUNT=[[1373.2198709594231,-1100.4251190754821,-7.278681089101213],[-271.815969077903,559.6580465940733,-32.46047482791194],[1.9622899599665666,-57.173814538844006,308.7233197812385]];xe.Y_FROM_LINRGB=[0.2126,0.7152,0.0722];xe.CRITICAL_PLANES=[0.015176349177441876,0.045529047532325624,0.07588174588720938,0.10623444424209313,0.13658714259697685,0.16693984095186062,0.19729253930674434,0.2276452376616281,0.2579979360165119,0.28835063437139563,0.3188300904430532,0.350925934958123,0.3848314933096426,0.42057480301049466,0.458183274052838,0.4976837250274023,0.5391024159806381,0.5824650784040898,0.6277969426914107,0.6751227633498623,0.7244668422128921,0.775853049866786,0.829304845476233,0.8848452951698498,0.942497089126609,1.0022825574869039,1.0642236851973577,1.1283421258858297,1.1946592148522128,1.2631959812511864,1.3339731595349034,1.407011200216447,1.4823302800086415,1.5599503113873272,1.6398909516233677,1.7221716113234105,1.8068114625156377,1.8938294463134073,1.9832442801866852,2.075074464868551,2.1693382909216234,2.2660538449872063,2.36523901573795,2.4669114995532007,2.5710888059345764,2.6777882626779785,2.7870270208169257,2.898822059350997,3.0131901897720907,3.1301480604002863,3.2497121605402226,3.3718988244681087,3.4967242352587946,3.624204428461639,3.754355295633311,3.887192587735158,4.022731918402185,4.160988767090289,4.301978482107941,4.445716283538092,4.592217266055746,4.741496401646282,4.893568542229298,5.048448422192488,5.20615066083972,5.3666897647573375,5.5300801301023865,5.696336044816294,5.865471690767354,6.037501145825082,6.212438385869475,6.390297286737924,6.571091626112461,6.7548350853498045,6.941541251256611,7.131223617812143,7.323895587840543,7.5195704746346665,7.7182615035334345,7.919981813454504,8.124744458384042,8.332562408825165,8.543448553206703,8.757415699253682,8.974476575321063,9.194643831691977,9.417930041841839,9.644347703669503,9.873909240696694,10.106627003236781,10.342513269534024,10.58158024687427,10.8238400726681,11.069304815507364,11.317986476196008,11.569896988756009,11.825048221409341,12.083451977536606,12.345119996613247,12.610063955123938,12.878295467455942,13.149826086772048,13.42466730586372,13.702830557985108,13.984327217668513,14.269168601521828,14.55736596900856,14.848930523210871,15.143873411576273,15.44220572664832,15.743938506781891,16.04908273684337,16.35764934889634,16.66964922287304,16.985093187232053,17.30399201960269,17.62635644741625,17.95219714852476,18.281524751807332,18.614349837764564,18.95068293910138,19.290534541298456,19.633915083172692,19.98083495742689,20.331304511189067,20.685334046541502,21.042933821039977,21.404114048223256,21.76888489811322,22.137256497705877,22.50923893145328,22.884842241736916,23.264076429332462,23.6469514538663,24.033477234264016,24.42366364919083,24.817520537484558,25.21505769858089,25.61628489293138,26.021211842414342,26.429848230738664,26.842203703840827,27.258287870275353,27.678110301598522,28.10168053274597,28.529008062403893,28.96010235337422,29.39497283293396,29.83362889318845,30.276079891419332,30.722335150426627,31.172403958865512,31.62629557157785,32.08401920991837,32.54558406207592,33.010999283389665,33.4802739966603,33.953417292456834,34.430438229418264,34.911345834551085,35.39614910352207,35.88485700094671,36.37747846067349,36.87402238606382,37.37449765026789,37.87891309649659,38.38727753828926,38.89959975977785,39.41588851594697,39.93615253289054,40.460400508064545,40.98864111053629,41.520882981230194,42.05713473317016,42.597404951718396,43.141702194811224,43.6900349931913,44.24241185063697,44.798841244188324,45.35933162437017,45.92389141541209,46.49252901546552,47.065252796817916,47.64207110610409,48.22299226451468,48.808024568002054,49.3971762874833,49.9904556690408,50.587870934119984,51.189430279724725,51.79514187861014,52.40501387947288,53.0190544071392,53.637271562750364,54.259673423945976,54.88626804504493,55.517063457223934,56.15206766869424,56.79128866487574,57.43473440856916,58.08241284012621,58.734331877617365,59.39049941699807,60.05092333227251,60.715611475655585,61.38457167773311,62.057811747619894,62.7353394731159,63.417162620860914,64.10328893648692,64.79372614476921,65.48848194977529,66.18756403501224,66.89098006357258,67.59873767827808,68.31084450182222,69.02730813691093,69.74813616640164,70.47333615344107,71.20291564160104,71.93688215501312,72.67524319850172,73.41800625771542,74.16517879925733,74.9167682708136,75.67278210128072,76.43322770089146,77.1981124613393,77.96744375590167,78.74122893956174,79.51947534912904,80.30219030335869,81.08938110306934,81.88105503125999,82.67721935322541,83.4778813166706,84.28304815182372,85.09272707154808,85.90692527145302,86.72564993000343,87.54890820862819,88.3767072518277,89.2090541872801,90.04595612594655,90.88742016217518,91.73345337380438,92.58406282226491,93.43925555268066,94.29903859396902,95.16341895893969,96.03240364439274,96.9059996312159,97.78421388448044,98.6670533535366,99.55452497210776];var Jt=function(){function Jt(o){_classCallCheck(this,Jt);this.argb=o;var s=Yt.fromInt(o);this.internalHue=s.hue,this.internalChroma=s.chroma,this.internalTone=vh(o),this.argb=o}_createClass(Jt,[{key:"toInt",value:function toInt(){return this.argb}},{key:"hue",get:function get(){return this.internalHue},set:function set(o){this.setInternalState(xe.solveToInt(o,this.internalChroma,this.internalTone))}},{key:"chroma",get:function get(){return this.internalChroma},set:function set(o){this.setInternalState(xe.solveToInt(this.internalHue,o,this.internalTone))}},{key:"tone",get:function get(){return this.internalTone},set:function set(o){this.setInternalState(xe.solveToInt(this.internalHue,this.internalChroma,o))}},{key:"setInternalState",value:function setInternalState(o){var s=Yt.fromInt(o);this.internalHue=s.hue,this.internalChroma=s.chroma,this.internalTone=vh(o),this.argb=o}},{key:"inViewingConditions",value:function inViewingConditions(o){var s=Yt.fromInt(this.toInt()).xyzInViewingConditions(o),B=Yt.fromXyzInViewingConditions(s[0],s[1],s[2],xi.make());return Jt.from(B.hue,B.chroma,gh(s[1]))}}],[{key:"from",value:function from(o,s,B){return new Jt(xe.solveToInt(o,s,B))}},{key:"fromInt",value:function fromInt(o){return new Jt(o)}}]);return Jt}();var Kr=function(){function Kr(){_classCallCheck(this,Kr)}_createClass(Kr,null,[{key:"harmonize",value:function harmonize(o,s){var B=Jt.fromInt(o),Q=Jt.fromInt(s),Y=n1(B.hue,Q.hue),J=Math.min(Y*0.5,15),it=Hu(B.hue+J*i1(B.hue,Q.hue));return Jt.from(it,B.chroma,B.tone).toInt()}},{key:"hctHue",value:function hctHue(o,s,B){var Q=Kr.cam16Ucs(o,s,B),Y=Yt.fromInt(Q),J=Yt.fromInt(o);return Jt.from(Y.hue,J.chroma,vh(o)).toInt()}},{key:"cam16Ucs",value:function cam16Ucs(o,s,B){var Q=Yt.fromInt(o),Y=Yt.fromInt(s),J=Q.jstar,it=Q.astar,nt=Q.bstar,ot=Y.jstar,dt=Y.astar,Mt=Y.bstar,Ot=J+(ot-J)*B,Qt=it+(dt-it)*B,Ut=nt+(Mt-nt)*B;return Yt.fromUcs(Ot,Qt,Ut).toInt()}}]);return Kr}();var Gt=function(){function Gt(){_classCallCheck(this,Gt)}_createClass(Gt,null,[{key:"ratioOfTones",value:function ratioOfTones(o,s){return o=Bl(0,100,o),s=Bl(0,100,s),Gt.ratioOfYs(On(o),On(s))}},{key:"ratioOfYs",value:function ratioOfYs(o,s){var B=o>s?o:s,Q=B===s?o:s;return(B+5)/(Q+5)}},{key:"lighter",value:function lighter(o,s){if(o<0||o>100)return-1;var B=On(o),Q=s*(B+5)-5,Y=Gt.ratioOfYs(Q,B),J=Math.abs(Y-s);if(Y<s&&J>0.04)return-1;var it=gh(Q)+0.4;return it<0||it>100?-1:it}},{key:"darker",value:function darker(o,s){if(o<0||o>100)return-1;var B=On(o),Q=(B+5)/s-5,Y=Gt.ratioOfYs(B,Q),J=Math.abs(Y-s);if(Y<s&&J>0.04)return-1;var it=gh(Q)-0.4;return it<0||it>100?-1:it}},{key:"lighterUnsafe",value:function lighterUnsafe(o,s){var B=Gt.lighter(o,s);return B<0?100:B}},{key:"darkerUnsafe",value:function darkerUnsafe(o,s){var B=Gt.darker(o,s);return B<0?0:B}}]);return Gt}();var Uu=function(){function Uu(){_classCallCheck(this,Uu)}_createClass(Uu,null,[{key:"isDisliked",value:function isDisliked(o){var s=Math.round(o.hue)>=90&&Math.round(o.hue)<=111,B=Math.round(o.chroma)>16,Q=Math.round(o.tone)<65;return s&&B&&Q}},{key:"fixIfDisliked",value:function fixIfDisliked(o){return Uu.isDisliked(o)?Jt.from(o.hue,o.chroma,70):o}}]);return Uu}();var ce=function(){function ce(o,s,B,Q,Y,J,it,nt){_classCallCheck(this,ce);if(this.name=o,this.palette=s,this.tone=B,this.isBackground=Q,this.background=Y,this.secondBackground=J,this.contrastCurve=it,this.toneDeltaPair=nt,this.hctCache=new Map,!Y&&J)throw new Error("Color ".concat(o," has secondBackgrounddefined, but background is not defined."));if(!Y&&it)throw new Error("Color ".concat(o," has contrastCurvedefined, but background is not defined."));if(Y&&!it)throw new Error("Color ".concat(o," has backgrounddefined, but contrastCurve is not defined."))}_createClass(ce,[{key:"getArgb",value:function getArgb(o){return this.getHct(o).toInt()}},{key:"getHct",value:function getHct(o){var s=this.hctCache.get(o);if(s!=null)return s;var B=this.getTone(o),Q=this.palette(o).getHct(B);return this.hctCache.size>4&&this.hctCache.clear(),this.hctCache.set(o,Q),Q}},{key:"getTone",value:function getTone(o){var s=o.contrastLevel<0;if(this.toneDeltaPair){var B=this.toneDeltaPair(o),Q=B.roleA,Y=B.roleB,J=B.delta,it=B.polarity,nt=B.stayTogether,ot=this.background(o).getTone(o),dt=it==="nearer"||it==="lighter"&&!o.isDark||it==="darker"&&o.isDark,Mt=dt?Q:Y,Ot=dt?Y:Q,Qt=this.name===Mt.name,Ut=o.isDark?1:-1,te=Mt.contrastCurve.getContrast(o.contrastLevel),qt=Ot.contrastCurve.getContrast(o.contrastLevel),ie=Mt.tone(o);var re=Gt.ratioOfTones(ot,ie)>=te?ie:ce.foregroundTone(ot,te);var ne=Ot.tone(o);var ae=Gt.ratioOfTones(ot,ne)>=qt?ne:ce.foregroundTone(ot,qt);return s&&(re=ce.foregroundTone(ot,te),ae=ce.foregroundTone(ot,qt)),(ae-re)*Ut>=J||(ae=Bl(0,100,re+J*Ut),(ae-re)*Ut>=J||(re=Bl(0,100,ae-J*Ut))),50<=re&&re<60?Ut>0?(re=60,ae=Math.max(ae,re+J*Ut)):(re=49,ae=Math.min(ae,re+J*Ut)):50<=ae&&ae<60&&(nt?Ut>0?(re=60,ae=Math.max(ae,re+J*Ut)):(re=49,ae=Math.min(ae,re+J*Ut)):Ut>0?ae=60:ae=49),Qt?re:ae}else{var _B5=this.tone(o);if(this.background==null)return _B5;var _Q7=this.background(o).getTone(o),_Y3=this.contrastCurve.getContrast(o.contrastLevel);if(Gt.ratioOfTones(_Q7,_B5)>=_Y3||(_B5=ce.foregroundTone(_Q7,_Y3)),s&&(_B5=ce.foregroundTone(_Q7,_Y3)),this.isBackground&&50<=_B5&&_B5<60&&(Gt.ratioOfTones(49,_Q7)>=_Y3?_B5=49:_B5=60),this.secondBackground){var _ref142=[this.background,this.secondBackground],_J5=_ref142[0],_it8=_ref142[1],_ref143=[_J5(o).getTone(o),_it8(o).getTone(o)],_nt6=_ref143[0],_ot8=_ref143[1],_ref144=[Math.max(_nt6,_ot8),Math.min(_nt6,_ot8)],_dt5=_ref144[0],_Mt5=_ref144[1];if(Gt.ratioOfTones(_dt5,_B5)>=_Y3&&Gt.ratioOfTones(_Mt5,_B5)>=_Y3)return _B5;var _Ot3=Gt.lighter(_dt5,_Y3),_Qt3=Gt.darker(_Mt5,_Y3),_Ut2=[];return _Ot3!==-1&&_Ut2.push(_Ot3),_Qt3!==-1&&_Ut2.push(_Qt3),ce.tonePrefersLightForeground(_nt6)||ce.tonePrefersLightForeground(_ot8)?_Ot3<0?100:_Ot3:_Ut2.length===1?_Ut2[0]:_Qt3<0?0:_Qt3}return _B5}}}],[{key:"fromPalette",value:function fromPalette(o){var _o$name,_o$isBackground;return new ce((_o$name=o.name)!==null&&_o$name!==void 0?_o$name:"",o.palette,o.tone,(_o$isBackground=o.isBackground)!==null&&_o$isBackground!==void 0?_o$isBackground:!1,o.background,o.secondBackground,o.contrastCurve,o.toneDeltaPair)}},{key:"foregroundTone",value:function foregroundTone(o,s){var B=Gt.lighterUnsafe(o,s),Q=Gt.darkerUnsafe(o,s),Y=Gt.ratioOfTones(B,o),J=Gt.ratioOfTones(Q,o);if(ce.tonePrefersLightForeground(o)){var it=Math.abs(Y-J)<0.1&&Y<s&&J<s;return Y>=s||Y>=J||it?B:Q}else return J>=s||J>=Y?Q:B}},{key:"tonePrefersLightForeground",value:function tonePrefersLightForeground(o){return Math.round(o)<60}},{key:"toneAllowsLightForeground",value:function toneAllowsLightForeground(o){return Math.round(o)<=49}},{key:"enableLightForeground",value:function enableLightForeground(o){return ce.tonePrefersLightForeground(o)&&!ce.toneAllowsLightForeground(o)?49:o}}]);return ce}();var Js;(function(r){r[r.MONOCHROME=0]="MONOCHROME",r[r.NEUTRAL=1]="NEUTRAL",r[r.TONAL_SPOT=2]="TONAL_SPOT",r[r.VIBRANT=3]="VIBRANT",r[r.EXPRESSIVE=4]="EXPRESSIVE",r[r.FIDELITY=5]="FIDELITY",r[r.CONTENT=6]="CONTENT",r[r.RAINBOW=7]="RAINBOW",r[r.FRUIT_SALAD=8]="FRUIT_SALAD"})(Js||(Js={}));var Fe=function(){function Fe(o,s,B,Q){_classCallCheck(this,Fe);this.low=o,this.normal=s,this.medium=B,this.high=Q}_createClass(Fe,[{key:"getContrast",value:function getContrast(o){return o<=-1?this.low:o<0?Ts(this.low,this.normal,(o- -1)/1):o<0.5?Ts(this.normal,this.medium,(o-0)/0.5):o<1?Ts(this.medium,this.high,(o-0.5)/0.5):this.high}}]);return Fe}();var Tr=_createClass(function Tr(o,s,B,Q,Y){_classCallCheck(this,Tr);this.roleA=o,this.roleB=s,this.delta=B,this.polarity=Q,this.stayTogether=Y});function os(r){return r.variant===Js.FIDELITY||r.variant===Js.CONTENT}function Rt(r){return r.variant===Js.MONOCHROME}function y1(r,o,s,B){var Q=s,Y=Jt.from(r,o,s);if(Y.chroma<o){var J=Y.chroma;for(;Y.chroma<o;){Q+=B?-1:1;var it=Jt.from(r,o,Q);if(J>it.chroma||Math.abs(it.chroma-o)<0.4)break;var nt=Math.abs(it.chroma-o),ot=Math.abs(Y.chroma-o);nt<ot&&(Y=it),J=Math.max(J,it.chroma)}}return Q}function p1(r){return xi.make(void 0,void 0,r.isDark?30:80,void 0,void 0)}function Wu(r,o){var s=r.inViewingConditions(p1(o));return ce.tonePrefersLightForeground(r.tone)&&!ce.toneAllowsLightForeground(s.tone)?ce.enableLightForeground(r.tone):ce.enableLightForeground(s.tone)}var U=function(){function U(){_classCallCheck(this,U)}_createClass(U,null,[{key:"highestSurface",value:function highestSurface(o){return o.isDark?U.surfaceBright:U.surfaceDim}}]);return U}();U.contentAccentToneDelta=15;U.primaryPaletteKeyColor=ce.fromPalette({name:"primary_palette_key_color",palette:function palette(r){return r.primaryPalette},tone:function tone(r){return r.primaryPalette.keyColor.tone}});U.secondaryPaletteKeyColor=ce.fromPalette({name:"secondary_palette_key_color",palette:function palette(r){return r.secondaryPalette},tone:function tone(r){return r.secondaryPalette.keyColor.tone}});U.tertiaryPaletteKeyColor=ce.fromPalette({name:"tertiary_palette_key_color",palette:function palette(r){return r.tertiaryPalette},tone:function tone(r){return r.tertiaryPalette.keyColor.tone}});U.neutralPaletteKeyColor=ce.fromPalette({name:"neutral_palette_key_color",palette:function palette(r){return r.neutralPalette},tone:function tone(r){return r.neutralPalette.keyColor.tone}});U.neutralVariantPaletteKeyColor=ce.fromPalette({name:"neutral_variant_palette_key_color",palette:function palette(r){return r.neutralVariantPalette},tone:function tone(r){return r.neutralVariantPalette.keyColor.tone}});U.background=ce.fromPalette({name:"background",palette:function palette(r){return r.neutralPalette},tone:function tone(r){return r.isDark?6:98},isBackground:!0});U.onBackground=ce.fromPalette({name:"on_background",palette:function palette(r){return r.neutralPalette},tone:function tone(r){return r.isDark?90:10},background:function background(r){return U.background},contrastCurve:new Fe(3,3,4.5,7)});U.surface=ce.fromPalette({name:"surface",palette:function palette(r){return r.neutralPalette},tone:function tone(r){return r.isDark?6:98},isBackground:!0});U.surfaceDim=ce.fromPalette({name:"surface_dim",palette:function palette(r){return r.neutralPalette},tone:function tone(r){return r.isDark?6:87},isBackground:!0});U.surfaceBright=ce.fromPalette({name:"surface_bright",palette:function palette(r){return r.neutralPalette},tone:function tone(r){return r.isDark?24:98},isBackground:!0});U.surfaceContainerLowest=ce.fromPalette({name:"surface_container_lowest",palette:function palette(r){return r.neutralPalette},tone:function tone(r){return r.isDark?4:100},isBackground:!0});U.surfaceContainerLow=ce.fromPalette({name:"surface_container_low",palette:function palette(r){return r.neutralPalette},tone:function tone(r){return r.isDark?10:96},isBackground:!0});U.surfaceContainer=ce.fromPalette({name:"surface_container",palette:function palette(r){return r.neutralPalette},tone:function tone(r){return r.isDark?12:94},isBackground:!0});U.surfaceContainerHigh=ce.fromPalette({name:"surface_container_high",palette:function palette(r){return r.neutralPalette},tone:function tone(r){return r.isDark?17:92},isBackground:!0});U.surfaceContainerHighest=ce.fromPalette({name:"surface_container_highest",palette:function palette(r){return r.neutralPalette},tone:function tone(r){return r.isDark?22:90},isBackground:!0});U.onSurface=ce.fromPalette({name:"on_surface",palette:function palette(r){return r.neutralPalette},tone:function tone(r){return r.isDark?90:10},background:function background(r){return U.highestSurface(r)},contrastCurve:new Fe(4.5,7,11,21)});U.surfaceVariant=ce.fromPalette({name:"surface_variant",palette:function palette(r){return r.neutralVariantPalette},tone:function tone(r){return r.isDark?30:90},isBackground:!0});U.onSurfaceVariant=ce.fromPalette({name:"on_surface_variant",palette:function palette(r){return r.neutralVariantPalette},tone:function tone(r){return r.isDark?80:30},background:function background(r){return U.highestSurface(r)},contrastCurve:new Fe(3,4.5,7,11)});U.inverseSurface=ce.fromPalette({name:"inverse_surface",palette:function palette(r){return r.neutralPalette},tone:function tone(r){return r.isDark?90:20}});U.inverseOnSurface=ce.fromPalette({name:"inverse_on_surface",palette:function palette(r){return r.neutralPalette},tone:function tone(r){return r.isDark?20:95},background:function background(r){return U.inverseSurface},contrastCurve:new Fe(4.5,7,11,21)});U.outline=ce.fromPalette({name:"outline",palette:function palette(r){return r.neutralVariantPalette},tone:function tone(r){return r.isDark?60:50},background:function background(r){return U.highestSurface(r)},contrastCurve:new Fe(1.5,3,4.5,7)});U.outlineVariant=ce.fromPalette({name:"outline_variant",palette:function palette(r){return r.neutralVariantPalette},tone:function tone(r){return r.isDark?30:80},background:function background(r){return U.highestSurface(r)},contrastCurve:new Fe(1,1,3,7)});U.shadow=ce.fromPalette({name:"shadow",palette:function palette(r){return r.neutralPalette},tone:function tone(r){return 0}});U.scrim=ce.fromPalette({name:"scrim",palette:function palette(r){return r.neutralPalette},tone:function tone(r){return 0}});U.surfaceTint=ce.fromPalette({name:"surface_tint",palette:function palette(r){return r.primaryPalette},tone:function tone(r){return r.isDark?80:40},isBackground:!0});U.primary=ce.fromPalette({name:"primary",palette:function palette(r){return r.primaryPalette},tone:function tone(r){return Rt(r)?r.isDark?100:0:r.isDark?80:40},isBackground:!0,background:function background(r){return U.highestSurface(r)},contrastCurve:new Fe(3,4.5,7,11),toneDeltaPair:function toneDeltaPair(r){return new Tr(U.primaryContainer,U.primary,15,"nearer",!1)}});U.onPrimary=ce.fromPalette({name:"on_primary",palette:function palette(r){return r.primaryPalette},tone:function tone(r){return Rt(r)?r.isDark?10:90:r.isDark?20:100},background:function background(r){return U.primary},contrastCurve:new Fe(4.5,7,11,21)});U.primaryContainer=ce.fromPalette({name:"primary_container",palette:function palette(r){return r.primaryPalette},tone:function tone(r){return os(r)?Wu(r.sourceColorHct,r):Rt(r)?r.isDark?85:25:r.isDark?30:90},isBackground:!0,background:function background(r){return U.highestSurface(r)},contrastCurve:new Fe(1,1,3,7),toneDeltaPair:function toneDeltaPair(r){return new Tr(U.primaryContainer,U.primary,15,"nearer",!1)}});U.onPrimaryContainer=ce.fromPalette({name:"on_primary_container",palette:function palette(r){return r.primaryPalette},tone:function tone(r){return os(r)?ce.foregroundTone(U.primaryContainer.tone(r),4.5):Rt(r)?r.isDark?0:100:r.isDark?90:10},background:function background(r){return U.primaryContainer},contrastCurve:new Fe(4.5,7,11,21)});U.inversePrimary=ce.fromPalette({name:"inverse_primary",palette:function palette(r){return r.primaryPalette},tone:function tone(r){return r.isDark?40:80},background:function background(r){return U.inverseSurface},contrastCurve:new Fe(3,4.5,7,11)});U.secondary=ce.fromPalette({name:"secondary",palette:function palette(r){return r.secondaryPalette},tone:function tone(r){return r.isDark?80:40},isBackground:!0,background:function background(r){return U.highestSurface(r)},contrastCurve:new Fe(3,4.5,7,11),toneDeltaPair:function toneDeltaPair(r){return new Tr(U.secondaryContainer,U.secondary,15,"nearer",!1)}});U.onSecondary=ce.fromPalette({name:"on_secondary",palette:function palette(r){return r.secondaryPalette},tone:function tone(r){return Rt(r)?r.isDark?10:100:r.isDark?20:100},background:function background(r){return U.secondary},contrastCurve:new Fe(4.5,7,11,21)});U.secondaryContainer=ce.fromPalette({name:"secondary_container",palette:function palette(r){return r.secondaryPalette},tone:function tone(r){var o=r.isDark?30:90;if(Rt(r))return r.isDark?30:85;if(!os(r))return o;var s=y1(r.secondaryPalette.hue,r.secondaryPalette.chroma,o,!r.isDark);return s=Wu(r.secondaryPalette.getHct(s),r),s},isBackground:!0,background:function background(r){return U.highestSurface(r)},contrastCurve:new Fe(1,1,3,7),toneDeltaPair:function toneDeltaPair(r){return new Tr(U.secondaryContainer,U.secondary,15,"nearer",!1)}});U.onSecondaryContainer=ce.fromPalette({name:"on_secondary_container",palette:function palette(r){return r.secondaryPalette},tone:function tone(r){return os(r)?ce.foregroundTone(U.secondaryContainer.tone(r),4.5):r.isDark?90:10},background:function background(r){return U.secondaryContainer},contrastCurve:new Fe(4.5,7,11,21)});U.tertiary=ce.fromPalette({name:"tertiary",palette:function palette(r){return r.tertiaryPalette},tone:function tone(r){return Rt(r)?r.isDark?90:25:r.isDark?80:40},isBackground:!0,background:function background(r){return U.highestSurface(r)},contrastCurve:new Fe(3,4.5,7,11),toneDeltaPair:function toneDeltaPair(r){return new Tr(U.tertiaryContainer,U.tertiary,15,"nearer",!1)}});U.onTertiary=ce.fromPalette({name:"on_tertiary",palette:function palette(r){return r.tertiaryPalette},tone:function tone(r){return Rt(r)?r.isDark?10:90:r.isDark?20:100},background:function background(r){return U.tertiary},contrastCurve:new Fe(4.5,7,11,21)});U.tertiaryContainer=ce.fromPalette({name:"tertiary_container",palette:function palette(r){return r.tertiaryPalette},tone:function tone(r){if(Rt(r))return r.isDark?60:49;if(!os(r))return r.isDark?30:90;var o=Wu(r.tertiaryPalette.getHct(r.sourceColorHct.tone),r),s=r.tertiaryPalette.getHct(o);return Uu.fixIfDisliked(s).tone},isBackground:!0,background:function background(r){return U.highestSurface(r)},contrastCurve:new Fe(1,1,3,7),toneDeltaPair:function toneDeltaPair(r){return new Tr(U.tertiaryContainer,U.tertiary,15,"nearer",!1)}});U.onTertiaryContainer=ce.fromPalette({name:"on_tertiary_container",palette:function palette(r){return r.tertiaryPalette},tone:function tone(r){return Rt(r)?r.isDark?0:100:os(r)?ce.foregroundTone(U.tertiaryContainer.tone(r),4.5):r.isDark?90:10},background:function background(r){return U.tertiaryContainer},contrastCurve:new Fe(4.5,7,11,21)});U.error=ce.fromPalette({name:"error",palette:function palette(r){return r.errorPalette},tone:function tone(r){return r.isDark?80:40},isBackground:!0,background:function background(r){return U.highestSurface(r)},contrastCurve:new Fe(3,4.5,7,11),toneDeltaPair:function toneDeltaPair(r){return new Tr(U.errorContainer,U.error,15,"nearer",!1)}});U.onError=ce.fromPalette({name:"on_error",palette:function palette(r){return r.errorPalette},tone:function tone(r){return r.isDark?20:100},background:function background(r){return U.error},contrastCurve:new Fe(4.5,7,11,21)});U.errorContainer=ce.fromPalette({name:"error_container",palette:function palette(r){return r.errorPalette},tone:function tone(r){return r.isDark?30:90},isBackground:!0,background:function background(r){return U.highestSurface(r)},contrastCurve:new Fe(1,1,3,7),toneDeltaPair:function toneDeltaPair(r){return new Tr(U.errorContainer,U.error,15,"nearer",!1)}});U.onErrorContainer=ce.fromPalette({name:"on_error_container",palette:function palette(r){return r.errorPalette},tone:function tone(r){return r.isDark?90:10},background:function background(r){return U.errorContainer},contrastCurve:new Fe(4.5,7,11,21)});U.primaryFixed=ce.fromPalette({name:"primary_fixed",palette:function palette(r){return r.primaryPalette},tone:function tone(r){return Rt(r)?40:90},isBackground:!0,background:function background(r){return U.highestSurface(r)},contrastCurve:new Fe(1,1,3,7),toneDeltaPair:function toneDeltaPair(r){return new Tr(U.primaryFixed,U.primaryFixedDim,10,"lighter",!0)}});U.primaryFixedDim=ce.fromPalette({name:"primary_fixed_dim",palette:function palette(r){return r.primaryPalette},tone:function tone(r){return Rt(r)?30:80},isBackground:!0,background:function background(r){return U.highestSurface(r)},contrastCurve:new Fe(1,1,3,7),toneDeltaPair:function toneDeltaPair(r){return new Tr(U.primaryFixed,U.primaryFixedDim,10,"lighter",!0)}});U.onPrimaryFixed=ce.fromPalette({name:"on_primary_fixed",palette:function palette(r){return r.primaryPalette},tone:function tone(r){return Rt(r)?100:10},background:function background(r){return U.primaryFixedDim},secondBackground:function secondBackground(r){return U.primaryFixed},contrastCurve:new Fe(4.5,7,11,21)});U.onPrimaryFixedVariant=ce.fromPalette({name:"on_primary_fixed_variant",palette:function palette(r){return r.primaryPalette},tone:function tone(r){return Rt(r)?90:30},background:function background(r){return U.primaryFixedDim},secondBackground:function secondBackground(r){return U.primaryFixed},contrastCurve:new Fe(3,4.5,7,11)});U.secondaryFixed=ce.fromPalette({name:"secondary_fixed",palette:function palette(r){return r.secondaryPalette},tone:function tone(r){return Rt(r)?80:90},isBackground:!0,background:function background(r){return U.highestSurface(r)},contrastCurve:new Fe(1,1,3,7),toneDeltaPair:function toneDeltaPair(r){return new Tr(U.secondaryFixed,U.secondaryFixedDim,10,"lighter",!0)}});U.secondaryFixedDim=ce.fromPalette({name:"secondary_fixed_dim",palette:function palette(r){return r.secondaryPalette},tone:function tone(r){return Rt(r)?70:80},isBackground:!0,background:function background(r){return U.highestSurface(r)},contrastCurve:new Fe(1,1,3,7),toneDeltaPair:function toneDeltaPair(r){return new Tr(U.secondaryFixed,U.secondaryFixedDim,10,"lighter",!0)}});U.onSecondaryFixed=ce.fromPalette({name:"on_secondary_fixed",palette:function palette(r){return r.secondaryPalette},tone:function tone(r){return 10},background:function background(r){return U.secondaryFixedDim},secondBackground:function secondBackground(r){return U.secondaryFixed},contrastCurve:new Fe(4.5,7,11,21)});U.onSecondaryFixedVariant=ce.fromPalette({name:"on_secondary_fixed_variant",palette:function palette(r){return r.secondaryPalette},tone:function tone(r){return Rt(r)?25:30},background:function background(r){return U.secondaryFixedDim},secondBackground:function secondBackground(r){return U.secondaryFixed},contrastCurve:new Fe(3,4.5,7,11)});U.tertiaryFixed=ce.fromPalette({name:"tertiary_fixed",palette:function palette(r){return r.tertiaryPalette},tone:function tone(r){return Rt(r)?40:90},isBackground:!0,background:function background(r){return U.highestSurface(r)},contrastCurve:new Fe(1,1,3,7),toneDeltaPair:function toneDeltaPair(r){return new Tr(U.tertiaryFixed,U.tertiaryFixedDim,10,"lighter",!0)}});U.tertiaryFixedDim=ce.fromPalette({name:"tertiary_fixed_dim",palette:function palette(r){return r.tertiaryPalette},tone:function tone(r){return Rt(r)?30:80},isBackground:!0,background:function background(r){return U.highestSurface(r)},contrastCurve:new Fe(1,1,3,7),toneDeltaPair:function toneDeltaPair(r){return new Tr(U.tertiaryFixed,U.tertiaryFixedDim,10,"lighter",!0)}});U.onTertiaryFixed=ce.fromPalette({name:"on_tertiary_fixed",palette:function palette(r){return r.tertiaryPalette},tone:function tone(r){return Rt(r)?100:10},background:function background(r){return U.tertiaryFixedDim},secondBackground:function secondBackground(r){return U.tertiaryFixed},contrastCurve:new Fe(4.5,7,11,21)});U.onTertiaryFixedVariant=ce.fromPalette({name:"on_tertiary_fixed_variant",palette:function palette(r){return r.tertiaryPalette},tone:function tone(r){return Rt(r)?90:30},background:function background(r){return U.tertiaryFixedDim},secondBackground:function secondBackground(r){return U.tertiaryFixed},contrastCurve:new Fe(3,4.5,7,11)});var Ze=function(){function Ze(o,s,B){_classCallCheck(this,Ze);this.hue=o,this.chroma=s,this.keyColor=B,this.cache=new Map}_createClass(Ze,[{key:"tone",value:function tone(o){var s=this.cache.get(o);return s===void 0&&(s=Jt.from(this.hue,this.chroma,o).toInt(),this.cache.set(o,s)),s}},{key:"getHct",value:function getHct(o){return Jt.fromInt(this.tone(o))}}],[{key:"fromInt",value:function fromInt(o){var s=Jt.fromInt(o);return Ze.fromHct(s)}},{key:"fromHct",value:function fromHct(o){return new Ze(o.hue,o.chroma,o)}},{key:"fromHueAndChroma",value:function fromHueAndChroma(o,s){return new Ze(o,s,Ze.createKeyColor(o,s))}},{key:"createKeyColor",value:function createKeyColor(o,s){var B=Jt.from(o,s,50),Q=Math.abs(B.chroma-s);for(var Y=1;Y<50;Y+=1){if(Math.round(s)===Math.round(B.chroma))return B;var J=Jt.from(o,s,50+Y),it=Math.abs(J.chroma-s);it<Q&&(Q=it,B=J);var nt=Jt.from(o,s,50-Y),ot=Math.abs(nt.chroma-s);ot<Q&&(Q=ot,B=nt)}return B}}]);return Ze}();function vp(r){var o=Mf(r),s=Of(r),B=If(r),Q=[o.toString(16),s.toString(16),B.toString(16)];var _iterator177=_createForOfIteratorHelper(Q.entries()),_step177;try{for(_iterator177.s();!(_step177=_iterator177.n()).done;){var _step177$value=_slicedToArray(_step177.value,2),Y=_step177$value[0],J=_step177$value[1];J.length===1&&(Q[Y]="0"+J)}}catch(err){_iterator177.e(err)}finally{_iterator177.f()}return"#"+Q.join("")}function w1(r){r=r.replace("#","");var o=r.length===3,s=r.length===6,B=r.length===8;if(!o&&!s&&!B)throw new Error("unexpected hex "+r);var Q=0,Y=0,J=0;return o?(Q=Gi(r.slice(0,1).repeat(2)),Y=Gi(r.slice(1,2).repeat(2)),J=Gi(r.slice(2,3).repeat(2))):s?(Q=Gi(r.slice(0,2)),Y=Gi(r.slice(2,4)),J=Gi(r.slice(4,6))):B&&(Q=Gi(r.slice(2,4)),Y=Gi(r.slice(4,6)),J=Gi(r.slice(6,8))),(255<<24|(Q&255)<<16|(Y&255)<<8|J&255)>>>0}function Gi(r){return parseInt(r,16)}function f1(r){var o=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1;var s;var B=(s=r.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+\.{0,1}\d*))?\)$/))==null?void 0:s.slice(1).map(function(nt,ot){return ot===3?Math.round(parseFloat(nt)*255):parseFloat(nt)});if(!B)throw new Error("Could not parse rgba color.");var _B6=_slicedToArray(B,4),Q=_B6[0],Y=_B6[1],J=_B6[2],it=_B6[3];return((o?255:it&255)<<24|(Q&255)<<16|(Y&255)<<8|J&255)>>>0}function m1(r){var o=document.createElement("wy-compute-styles");o.setAttribute("style","color: ".concat(r," !important;")),document.documentElement.append(o);var s=window.getComputedStyle(o).color;return o.remove(),s}function bh(r){return getComputedStyle(r).getPropertyValue("--wy-theme-color")||void 0}function v1(r,o){var s=bh(r);var B=new MutationObserver(function(){var J=bh(r);J!==s&&(console.log("--wy-theme-color changed",J),s=J,o(J))}),Q={attributes:!0,attributeFilter:["class","style"]};var Y=r;for(;Y&&Y!==document;)B.observe(Y,Q),Y=Y.parentNode;return function(){return B.disconnect()}}function _h(){var r;return((r=Array.from(document.head.querySelectorAll("meta[name='theme-color']")).filter(function(o){var s;var B=o.getAttribute("media");return!B||((s=window.matchMedia(B))==null?void 0:s.matches)}).pop())==null?void 0:r.getAttribute("content"))||void 0}function g1(r){var o=Array.from(document.head.querySelectorAll("meta[name='theme-color']"));if(!o)return function(){};var s=_h();var B=function B(){var it=_h();it!==s&&(console.log("meta theme-color changed",it),s=it,r(it))},Q=new MutationObserver(B),Y={attributes:!0,attributeFilter:["content"]},J=[];return o.forEach(function(it){Q.observe(it,Y);var nt=it.getAttribute("media");if(nt){var ot=window.matchMedia(nt);ot.addEventListener("change",B),J.push(ot)}}),function(){Q.disconnect(),J.forEach(function(it){return it.removeEventListener("change",B)})}}var vs=[],b1=16;function _1(r){var o=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1;var s;if(vs.some(function(Bt){return Bt.seedColor===r})){var Bt=(s=vs.find(function(Wt){return Wt.seedColor===r}))==null?void 0:s.colors;if(Bt)return Bt}var B=[];o&&B.push("--wy-theme-color:".concat(r,";"));var Q=r;!r.startsWith("#")&&!r.startsWith("rgb")&&(Q=m1(r),console.log("computed color",r));var Y=r.startsWith("#")?w1(Q):f1(Q),J=Jt.fromInt(Y),it=J.hue,nt=J.chroma,ot=Math.max(48,nt),dt=Math.min(ot,84),Mt=360/16,Ot=27.4,Qt=-8,Ut=(it+360-Ot-Qt+Mt/2)%Mt+Ot+Qt-Mt/2,te={primary:Ze.fromHueAndChroma(it,ot),secondary:Ze.fromHueAndChroma(it,ot/3),tertiary:Ze.fromHueAndChroma(it+60,ot/2),neutral:Ze.fromHueAndChroma(it,Math.min(nt/12,4)),"neutral-variant":Ze.fromHueAndChroma(it,Math.min(nt/6,8)),error:Ze.fromHueAndChroma(Ut,84),warning:Ze.fromHueAndChroma(Ut+4*Mt,dt),red:Ze.fromHueAndChroma(Ut,dt),"deep-orange":Ze.fromHueAndChroma(Ut+1*Mt,dt),orange:Ze.fromHueAndChroma(Ut+2*Mt,dt),amber:Ze.fromHueAndChroma(Ut+3*Mt,dt),yellow:Ze.fromHueAndChroma(Ut+4*Mt,dt),lime:Ze.fromHueAndChroma(Ut+5*Mt,dt),"light-green":Ze.fromHueAndChroma(Ut+6*Mt,dt),green:Ze.fromHueAndChroma(Ut+7*Mt,dt),teal:Ze.fromHueAndChroma(Ut+8*Mt,dt),cyan:Ze.fromHueAndChroma(Ut+9*Mt,dt),"light-blue":Ze.fromHueAndChroma(Ut+10*Mt,dt),blue:Ze.fromHueAndChroma(Ut+11*Mt,dt),indigo:Ze.fromHueAndChroma(Ut+12*Mt,dt),"deep-purple":Ze.fromHueAndChroma(Ut+13*Mt,dt),purple:Ze.fromHueAndChroma(Ut+14*Mt,dt),pink:Ze.fromHueAndChroma(Ut+15*Mt,dt),gray:Ze.fromHueAndChroma(it,4)},qt={99:99,95:95,90:90,80:80,70:70,60:60,50:50,40:40,30:30,20:20,10:10},ie={primary:qt,secondary:qt,tertiary:qt,neutral:qt,"neutral-variant":qt,error:qt,warning:qt,blue:{light:70,dark:80},indigo:{light:60,dark:60},purple:{light:60,dark:70},pink:{light:60,dark:70},red:{light:60,dark:60},orange:{light:70,dark:70},yellow:{light:70,dark:80},green:{light:60,dark:60},teal:{light:60,dark:60},cyan:{light:50,dark:60},gray:{light:50,dark:60}};for(var _Bt5 in ie){var Wt=ie[_Bt5];for(var oe in Wt){var ve=vp(te[_Bt5].tone(Wt[oe]));B.push("--wy-".concat(_Bt5,"-").concat(oe,":").concat(ve,";"))}}var re={light:te.primary.tone(40),dark:te.primary.tone(80)},ne={light:te.neutral.tone(99),dark:te.neutral.tone(10)},ae={"surface-1":{light:Kr.cam16Ucs(ne.light,re.light,0.05),dark:Kr.cam16Ucs(ne.dark,re.dark,0.05)},"surface-2":{light:Kr.cam16Ucs(ne.light,re.light,0.08),dark:Kr.cam16Ucs(ne.dark,re.dark,0.08)},"surface-3":{light:Kr.cam16Ucs(ne.light,re.light,0.11),dark:Kr.cam16Ucs(ne.dark,re.dark,0.11)},"surface-4":{light:Kr.cam16Ucs(ne.light,re.light,0.12),dark:Kr.cam16Ucs(ne.dark,re.dark,0.12)},"surface-5":{light:Kr.cam16Ucs(ne.light,re.light,0.14),dark:Kr.cam16Ucs(ne.dark,re.dark,0.14)}};for(var _Bt6 in ae){var _Wt4=ae[_Bt6];for(var _oe2 in _Wt4){var _ve2=vp(_Wt4[_oe2]);B.push("--wy-".concat(_Bt6,"-").concat(_oe2,":").concat(_ve2,";"))}}return vs.unshift({seedColor:r,colors:B}),vs.length=Math.min(vs.length,b1),B}var x1=function x1(r){if(nd)document.adoptedStyleSheets=r.map(function(o){return o instanceof CSSStyleSheet?o:o.styleSheet});else{var _iterator178=_createForOfIteratorHelper(r),_step178;try{for(_iterator178.s();!(_step178=_iterator178.n()).done;){var o=_step178.value;var s=document.createElement("style"),B=global.litNonce;B!==void 0&&s.setAttribute("nonce",B),s.textContent=o.cssText,(document.head||document.documentElement).appendChild(s)}}catch(err){_iterator178.e(err)}finally{_iterator178.f()}}};function Ro(r){if(r)try{return new URL(r,window.location.toString())}catch(_unused18){console.warn("Invalid url: ",r)}}var gp="en";var zt=function(_Error9){_inherits(zt,_Error9);function zt(){var _this192;_classCallCheck(this,zt);_this192=_callSuper(this,zt,["Instance destroyed"]),_this192.name="DestroyError";return _this192}return _createClass(zt)}(_wrapNativeSuper(Error));var xa,$c,Ec,Sc,Pc,Ac,An,ka,Lc,Mc,Oc,Ic,mi,Ln,go,Ri,Mn,td,Rf,Ca,Xr,Tc,$a,xt,vi,Ea,bo,_o,xo,ko,Co,$o,Eo,Jr,gi,Sa;var Ve=function(){function pm(o){var _this193=this;_classCallCheck(this,pm);S(this,td),S(this,xa,void 0),S(this,$c,void 0),S(this,Ec,void 0),S(this,Sc,void 0),S(this,Pc,void 0),S(this,Ac,void 0),S(this,An,void 0),S(this,ka,void 0),S(this,Lc,void 0),S(this,Mc,void 0),S(this,Oc,void 0),S(this,Ic,void 0),S(this,mi,void 0),S(this,Ln,void 0),S(this,go,void 0),S(this,Ri,void 0),S(this,Mn,void 0),S(this,Ca,void 0),S(this,Xr,void 0),S(this,Tc,void 0),S(this,$a,void 0),S(this,xt,void 0),S(this,vi,void 0),S(this,Ea,void 0),S(this,bo,void 0),S(this,_o,void 0),S(this,xo,void 0),S(this,ko,void 0),S(this,Co,void 0),S(this,$o,void 0),S(this,Eo,void 0),S(this,Jr,void 0),S(this,gi,void 0),S(this,Sa,void 0),this.version=pm.version,this.weavySid=wh(),this.weavyId="".concat(pm.sourceName,"#").concat(this.weavySid),A(this,xa,!1),this.host=document.documentElement,this.cloudFilePickerUrl=pm.defaults.cloudFilePickerUrl,this.confluenceAuthenticationUrl=pm.defaults.confluenceAuthenticationUrl,this.confluenceProductName=pm.defaults.confluenceProductName,this.disableEnvironmentImports=pm.defaults.disableEnvironmentImports,this.gcTime=pm.defaults.gcTime,this.modalParent=pm.defaults.modalParent,this.reactions=pm.defaults.reactions,this.scrollBehavior=pm.defaults.scrollBehavior,this.staleTime=pm.defaults.staleTime,this.tokenFactoryRetryDelay=pm.defaults.tokenFactoryRetryDelay,this.tokenFactoryTimeout=pm.defaults.tokenFactoryTimeout,this.zoomAuthenticationUrl=pm.defaults.zoomAuthenticationUrl,A(this,Ac,new Promise(function(B){A(_this193,Pc,B)})),A(this,ka,new Promise(function(B){A(_this193,An,B)})),A(this,Mc,new Promise(function(B){A(_this193,Lc,B)})),A(this,Ic,new Promise(function(B){A(_this193,Oc,B)})),A(this,Ri,null),A(this,Mn,""),A(this,Ca,_asyncToGenerator(_regeneratorRuntime().mark(function _callee60(){var B,Q,Y,J,it,_args=arguments;return _regeneratorRuntime().wrap(function _callee60$(_context61){while(1)switch(_context61.prev=_context61.next){case 0:B=_args.length>0&&_args[0]!==undefined?_args[0]:!1;J=[_this193.whenUrlAndTokenFactory()];_this193.tokenFactoryRetryDelay!==1/0&&J.push(new Promise(function(nt){return setTimeout(nt,_this193.tokenFactoryRetryDelay)}));_context61.next=5;return Promise.race(J);case 5:_context61.next=7;return(Q=_this193.tokenFactory)==null?void 0:Q.call(_this193,B);case 7:it=_context61.sent;if(!(!D(_this193,td,Rf).call(_this193,it)&&(A(_this193,ka,new Promise(function(nt){A(_this193,An,nt)})),!B))){_context61.next=12;break}_context61.next=11;return h(_this193,Ca).call(_this193,!1);case 11:return _context61.abrupt("return",_context61.sent);case 12:if(it){_context61.next=14;break}throw new TypeError("Could not get a valid token from tokenFactory.");case 14:return _context61.abrupt("return",((Y=h(_this193,An))==null||Y.call(_this193,!0),it));case 15:case"end":return _context61.stop()}},_callee60)}))),A(this,vi,[]),this.signalRAccessTokenRefresh=!1,A(this,_o,new Promise(function(B,Q){A(_this193,Ea,B),A(_this193,bo,Q)})),A(this,xo,new Set),A(this,ko,"connecting"),A(this,Co,"ok"),A(this,$o,window.navigator.onLine?"online":"offline"),A(this,Eo,!1),A(this,gi,new Map([["sv-SE",function(){return import(new URL("./es/locales/sv-SE.js",typeof WEAVY_IMPORT_URL=="string"&&(!import.meta.url||!new URL(import.meta.url).href.startsWith(WEAVY_IMPORT_URL))?WEAVY_IMPORT_URL:import.meta.url).href).then(function(B){return B.svSE})}]])),A(this,Sa,pm.sourceLocale),console.info("".concat(pm.sourceName,"@").concat(pm.version," #").concat(this.weavySid));var s={};for(var B in o){var Q=B;o[Q]!==void 0&&Object.assign(s,_defineProperty({},Q,o[Q]))}s!=null&&s.host&&(this.host=s.host,delete s.host),s&&Object.assign(this,s),this.createQueryClient(),this.whenConnectionRequested().then(function(){_this193.isDestroyed||_this193.createConnection()}),this.whenUrlAndTokenFactory().then(function(){_this193.isDestroyed||_this193.checkVersion()}),this.host!==document.documentElement?(wp.detachListeners(),A(this,$c,new fh(this.host,{context:Le,initialValue:this}))):wp.setValue(this),this.host.isConnected&&h(this,Xr).mount(),A(this,Sc,Yb(this.host,function(B){_this193.isDestroyed||(B?(console.log(_this193.weavyId,"Query client mounted"),h(_this193,Xr).mount()):(console.log(_this193.weavyId,"Query client unmounted"),h(_this193,Xr).unmount()))})),x1([ns]),Gb(_asyncToGenerator(_regeneratorRuntime().mark(function _callee61(){var _B7;return _regeneratorRuntime().wrap(function _callee61$(_context62){while(1)switch(_context62.prev=_context62.next){case 0:if(!_this193.isDestroyed&&(Rn.host&&Rn.host instanceof Ys?A(_this193,Jr,Rn.host):A(_this193,Jr,new Ys),h(_this193,Jr).connectedContexts.add(_this193),document)){_B7=_this193.modalParent&&document.querySelector(_this193.modalParent)||document.documentElement;_B7.contains(h(_this193,Jr))||(_B7.append(h(_this193,Jr)),_this193.host.contains(_B7)||A(_this193,Ec,new fh(_B7,{context:Le,initialValue:_this193})))}case 1:case"end":return _context62.stop()}},_callee61)}))),window.addEventListener("online",function(){_this193.networkState="online"}),window.addEventListener("offline",function(){_this193.networkState="offline",_this193.networkStateIsPending=!1})}_createClass(pm,[{key:"isDestroyed",get:function get(){return h(this,xa)}},{key:"whenUrl",value:function(){var _whenUrl=_asyncToGenerator(_regeneratorRuntime().mark(function _callee62(){return _regeneratorRuntime().wrap(function _callee62$(_context63){while(1)switch(_context63.prev=_context63.next){case 0:_context63.next=2;return h(this,Ac);case 2:case"end":return _context63.stop()}},_callee62,this)}));function whenUrl(){return _whenUrl.apply(this,arguments)}return whenUrl}()},{key:"whenUrlAndTokenFactory",value:function(){var _whenUrlAndTokenFactory=_asyncToGenerator(_regeneratorRuntime().mark(function _callee63(){return _regeneratorRuntime().wrap(function _callee63$(_context64){while(1)switch(_context64.prev=_context64.next){case 0:_context64.next=2;return h(this,ka);case 2:case"end":return _context64.stop()}},_callee63,this)}));function whenUrlAndTokenFactory(){return _whenUrlAndTokenFactory.apply(this,arguments)}return whenUrlAndTokenFactory}()},{key:"whenTokenIsValid",value:function(){var _whenTokenIsValid=_asyncToGenerator(_regeneratorRuntime().mark(function _callee64(){return _regeneratorRuntime().wrap(function _callee64$(_context65){while(1)switch(_context65.prev=_context65.next){case 0:_context65.next=2;return h(this,Mc);case 2:case"end":return _context65.stop()}},_callee64,this)}));function whenTokenIsValid(){return _whenTokenIsValid.apply(this,arguments)}return whenTokenIsValid}()},{key:"whenConnectionRequested",value:function(){var _whenConnectionRequested=_asyncToGenerator(_regeneratorRuntime().mark(function _callee65(){return _regeneratorRuntime().wrap(function _callee65$(_context66){while(1)switch(_context66.prev=_context66.next){case 0:_context66.next=2;return h(this,Ic);case 2:case"end":return _context66.stop()}},_callee65,this)}));function whenConnectionRequested(){return _whenConnectionRequested.apply(this,arguments)}return whenConnectionRequested}()},{key:"url",get:function get(){return h(this,mi)},set:function set(o){var s,B;if(this.isDestroyed)throw new zt;try{if(typeof o=="string")A(this,mi,Ro(o));else if(o instanceof URL)A(this,mi,o);else throw-1}catch(_unused19){throw new Error("Invalid url")}!this.disableEnvironmentImports&&globalThis.WEAVY_IMPORT_URL===void 0&&(globalThis.WEAVY_IMPORT_URL=new URL("./uikit-web/",o).href),h(this,mi)&&((s=h(this,Pc))==null||s.call(this,h(this,mi))),h(this,mi)&&this.tokenFactory&&((B=h(this,An))==null||B.call(this,!0))}},{key:"checkVersion",value:(function(){var _checkVersion=_asyncToGenerator(_regeneratorRuntime().mark(function _callee66(){var o,s,B,Q,Y,J,it,_args8=arguments;return _regeneratorRuntime().wrap(function _callee66$(_context67){while(1)switch(_context67.prev=_context67.next){case 0:o=_args8.length>0&&_args8[0]!==undefined?_args8[0]:this.version;_context67.next=3;return this.whenUrlAndTokenFactory();case 3:this.networkStateIsPending=!0;_context67.prev=4;_context67.t0=fetch;_context67.t1=new URL("/version",this.url);_context67.next=9;return this.fetchOptions(!1);case 9:_context67.t2=_context67.sent;_context67.next=12;return(0,_context67.t0)(_context67.t1,_context67.t2);case 12:Q=_context67.sent;if(Q.ok){_context67.next=15;break}throw new Error("Could not verify environment version.");case 15:this.networkStateIsPending=!1,this.serverState="ok";_context67.next=22;break;case 18:_context67.prev=18;_context67.t3=_context67["catch"](4);this.networkStateIsPending=!1,this.serverState="unreachable",console.warn("Could not check version: "+_context67.t3.toString());return _context67.abrupt("return");case 22:_context67.next=24;return Q.text();case 24:Y=_context67.sent;if(!(!o||!Y||o!==Y)){_context67.next=36;break}_context67.prev=26;J=o.split(".").slice(0,2),it=Y.split(".").slice(0,2);if(!(J[0]!==it[0])){_context67.next=30;break}throw new Error;case 30:J[1]!==it[1]&&console.warn("Version inconsistency: ".concat(pm.sourceName,"@").concat(this.version," \u2260 ").concat((s=h(this,mi))==null?void 0:s.hostname,"@").concat(Y));_context67.next=36;break;case 33:_context67.prev=33;_context67.t4=_context67["catch"](26);throw new Error("Version mismatch! ".concat(pm.sourceName,"@").concat(this.version," \u2260 ").concat((B=h(this,mi))==null?void 0:B.hostname,"@").concat(Y));case 36:case"end":return _context67.stop()}},_callee66,this,[[4,18],[26,33]])}));function checkVersion(){return _checkVersion.apply(this,arguments)}return checkVersion}())},{key:"tokenFactory",get:function get(){return h(this,Ln)},set:function set(o){var _this194=this;var s;if(this.isDestroyed)throw new zt;h(this,Ln)&&h(this,Ln)!==o&&this.whenUrlAndTokenFactory().then(function(){_this194.queryClient.refetchQueries({stale:!0})}),A(this,Ln,o),this.url&&h(this,Ln)&&((s=h(this,An))==null||s.call(this,!0))}},{key:"tokenUrl",get:function get(){return h(this,go)},set:function set(o){var _this195=this;if(this.isDestroyed)throw new zt;try{if(typeof o=="string")A(this,go,Ro(o));else if(o instanceof URL)A(this,go,o);else if(o!==void 0)throw-1}catch(_unused21){throw new Error("Invalid url")}h(this,go)&&!this.tokenFactory&&(this.tokenFactory=function(){var _ref147=_asyncToGenerator(_regeneratorRuntime().mark(function _callee67(s){var B,Q,Y;return _regeneratorRuntime().wrap(function _callee67$(_context68){while(1)switch(_context68.prev=_context68.next){case 0:if(_this195.tokenUrl){_context68.next=2;break}throw new Error("tokenURL property is not valid");case 2:B=new URL(_this195.tokenUrl);s?B.searchParams.set("refresh","true"):B.searchParams["delete"]("refresh");_context68.next=6;return fetch(B);case 6:Q=_context68.sent;if(!Q.ok){_context68.next=16;break}_context68.next=10;return Q.json();case 10:Y=_context68.sent;if(!(Y.access_token===void 0)){_context68.next=13;break}throw new Error("Token response does not contain required property: access_token");case 13:return _context68.abrupt("return",Y.access_token);case 16:throw new Error("Could not get access token from server!");case 17:case"end":return _context68.stop()}},_callee67)}));return function(_x53){return _ref147.apply(this,arguments)}}())}},{key:"getToken",value:function(){var _getToken=_asyncToGenerator(_regeneratorRuntime().mark(function _callee68(){var _this196=this;var o,s,_args10=arguments;return _regeneratorRuntime().wrap(function _callee68$(_context69){while(1)switch(_context69.prev=_context69.next){case 0:o=_args10.length>0&&_args10[0]!==undefined?_args10[0]:!1;if(!this.isDestroyed){_context69.next=3;break}throw new zt;case 3:if(!(h(this,Mn)&&!o)){_context69.next=5;break}return _context69.abrupt("return",h(this,Mn));case 5:_context69.next=7;return this.whenUrlAndTokenFactory();case 7:if(!h(this,Ri)){_context69.next=11;break}_context69.next=10;return h(this,Ri);case 10:return _context69.abrupt("return",_context69.sent);case 11:A(this,Ri,new Promise(function(s,B){h(_this196,Ca).call(_this196,o).then(s)["catch"](B),_this196.tokenFactoryTimeout!==1/0&&setTimeout(function(){return B(new Error("Token factory timeout."))},_this196.tokenFactoryTimeout),window.addEventListener("offline",function(){return B(new Error("Network changed."))},{once:!0}),window.addEventListener("online",function(){return B(new Error("Network changed."))},{once:!0})}));_context69.prev=12;_context69.next=15;return h(this,Ri);case 15:s=_context69.sent;return _context69.abrupt("return",(A(this,Ri,null),A(this,Mn,s),h(this,Mn)));case 19:_context69.prev=19;_context69.t0=_context69["catch"](12);throw A(this,Ri,null),console.error(_context69.t0),_context69.t0;case 22:case"end":return _context69.stop()}},_callee68,this,[[12,19]])}));function getToken(){return _getToken.apply(this,arguments)}return getToken}()},{key:"queryClient",get:function get(){return h(this,Xr)}},{key:"createQueryClient",value:function(){var _createQueryClient=_asyncToGenerator(_regeneratorRuntime().mark(function _callee69(){var o;return _regeneratorRuntime().wrap(function _callee69$(_context70){while(1)switch(_context70.prev=_context70.next){case 0:if(!this.isDestroyed){_context70.next=2;break}throw new zt;case 2:A(this,Xr,new pv({defaultOptions:{queries:{staleTime:this.staleTime,gcTime:this.gcTime}}}));_context70.prev=3;A(this,$a,Rb({key:"WEAVY_QUERY_OFFLINE_CACHE",storage:window.sessionStorage,throttleTime:this.staleTime}));o={queryClient:h(this,Xr),persister:h(this,$a),maxAge:this.gcTime,buster:pm.version,hydrateOptions:void 0,dehydrateOptions:{shouldDehydrateMutation:function shouldDehydrateMutation(s){var B,Q;var Y=((Q=(B=s.state.context)==null?void 0:B.status)==null?void 0:Q.state)==="pending";return!!(s.state.context&&!Y||s.state.isPaused)}}};_context70.next=8;return zb(o);case 8:A(this,Tc,Nb(o));_context70.next=14;break;case 11:_context70.prev=11;_context70.t0=_context70["catch"](3);console.warn(this.weavyId,"Query cache persister not available.");case 14:case"end":return _context70.stop()}},_callee69,this,[[3,11]])}));function createQueryClient(){return _createQueryClient.apply(this,arguments)}return createQueryClient}()},{key:"disconnectQueryClient",value:function(){var _disconnectQueryClient=_asyncToGenerator(_regeneratorRuntime().mark(function _callee70(){var o,s;return _regeneratorRuntime().wrap(function _callee70$(_context71){while(1)switch(_context71.prev=_context71.next){case 0:console.log(this.weavyId,"Query client disconnected");_context71.next=3;return h(this,Xr).cancelQueries();case 3:this.queryClient.setQueriesData({},void 0);this.queryClient.resetQueries();(o=h(this,$a))==null||o.removeClient();(s=h(this,Tc))==null||s.call(this);h(this,Xr).unmount();h(this,Xr).clear();case 9:case"end":return _context71.stop()}},_callee70,this)}));function disconnectQueryClient(){return _disconnectQueryClient.apply(this,arguments)}return disconnectQueryClient}()},{key:"rtmConnection",get:function get(){return h(this,xt)}},{key:"whenConnectionStarted",value:function(){var _whenConnectionStarted=_asyncToGenerator(_regeneratorRuntime().mark(function _callee71(){return _regeneratorRuntime().wrap(function _callee71$(_context72){while(1)switch(_context72.prev=_context72.next){case 0:_context72.next=2;return h(this,_o);case 2:return _context72.abrupt("return",_context72.sent);case 3:case"end":return _context72.stop()}},_callee71,this)}));function whenConnectionStarted(){return _whenConnectionStarted.apply(this,arguments)}return whenConnectionStarted}()},{key:"createConnection",value:function(){var _createConnection=_asyncToGenerator(_regeneratorRuntime().mark(function _callee74(){var _this197=this;var o,_o2;return _regeneratorRuntime().wrap(function _callee74$(_context75){while(1)switch(_context75.prev=_context75.next){case 0:if(!this.isDestroyed){_context75.next=2;break}throw new zt;case 2:if(!(this.url&&this.tokenFactory)){_context75.next=18;break}if(!(this.networkStateIsPending=!0,h(this,xt))){_context75.next=15;break}o=new URL("/hubs/rtm",this.url);_context75.t0=h(this,xt).baseUrl!==o.toString();if(!_context75.t0){_context75.next=13;break}this.connectionState="reconnecting";console.log(this.weavyId,"Reconnecting due to changed url.",h(this,xt).baseUrl,"=>",o.toString());_context75.next=11;return this.disconnect();case 11:h(this,xt).baseUrl=o.toString();this.connect();case 13:_context75.next=18;break;case 15:this.connectionState="connecting";_o2=new URL("/hubs/rtm",this.url);A(this,xt,new rg().configureLogging(G.None).withUrl(_o2.toString(),{accessTokenFactory:function(){var _accessTokenFactory=_asyncToGenerator(_regeneratorRuntime().mark(function _callee72(){var s;return _regeneratorRuntime().wrap(function _callee72$(_context73){while(1)switch(_context73.prev=_context73.next){case 0:_context73.prev=0;if(!_this197.signalRAccessTokenRefresh){_context73.next=8;break}_context73.next=4;return _this197.getToken(!0);case 4:s=_context73.sent;return _context73.abrupt("return",(_this197.signalRAccessTokenRefresh=!1,s));case 8:_context73.next=10;return _this197.getToken();case 10:return _context73.abrupt("return",_context73.sent);case 11:_context73.next=16;break;case 13:_context73.prev=13;_context73.t0=_context73["catch"](0);throw console.error(_context73.t0),_context73.t0;case 16:case"end":return _context73.stop()}},_callee72,null,[[0,13]])}));function accessTokenFactory(){return _accessTokenFactory.apply(this,arguments)}return accessTokenFactory}()}).withAutomaticReconnect({nextRetryDelayInMilliseconds:function nextRetryDelayInMilliseconds(s){return!_this197.isDestroyed&&window.navigator.onLine&&(document==null?void 0:document.visibilityState)!=="hidden"&&s.elapsedMilliseconds<6e4?[0,2e3,1e4][s.previousRetryCount]||1e4:null}}).build()),h(this,xt).onclose(function(){var _ref148=_asyncToGenerator(_regeneratorRuntime().mark(function _callee73(s){return _regeneratorRuntime().wrap(function _callee73$(_context74){while(1)switch(_context74.prev=_context74.next){case 0:console.info(_this197.weavyId,"SignalR closed."),_this197.connectionState="disconnected",!_this197.isDestroyed&&(_this197.networkStateIsPending=!0,A(_this197,_o,new Promise(function(B,Q){A(_this197,Ea,B),A(_this197,bo,Q)})),_this197.connect());case 1:case"end":return _context74.stop()}},_callee73)}));return function(_x54){return _ref148.apply(this,arguments)}}()),h(this,xt).onreconnecting(function(s){console.log(_this197.weavyId,"SignalR reconnecting..."),_this197.connectionState="reconnecting"}),h(this,xt).onreconnected(function(s){var B;console.info(_this197.weavyId,"SignalR reconnected."),_this197.connectionState="connected",_this197.networkStateIsPending=!1;for(var Q=0;Q<h(_this197,vi).length;Q++)(B=h(_this197,xt))==null||B.invoke("Subscribe",h(_this197,vi)[Q].name)}),this.connect();case 18:case"end":return _context75.stop()}},_callee74,this)}));function createConnection(){return _createConnection.apply(this,arguments)}return createConnection}()},{key:"disconnect",value:function(){var _disconnect=_asyncToGenerator(_regeneratorRuntime().mark(function _callee75(){return _regeneratorRuntime().wrap(function _callee75$(_context76){while(1)switch(_context76.prev=_context76.next){case 0:_context76.t0=h(this,xt);if(!_context76.t0){_context76.next=5;break}_context76.next=4;return h(this,xt).stop();case 4:this.connectionState="disconnected";case 5:case"end":return _context76.stop()}},_callee75,this)}));function disconnect(){return _disconnect.apply(this,arguments)}return disconnect}()},{key:"connect",value:function(){var _connect4=_asyncToGenerator(_regeneratorRuntime().mark(function _callee76(){var o;return _regeneratorRuntime().wrap(function _callee76$(_context77){while(1)switch(_context77.prev=_context77.next){case 0:if(!this.isDestroyed){_context77.next=2;break}throw new zt;case 2:if(!h(this,xt)){_context77.next=44;break}console.log(this.weavyId,"Connecting SignalR...");_context77.prev=4;if(window.navigator.onLine){_context77.next=7;break}throw new Error;case 7:_context77.next=9;return Promise.race([h(this,xt).start(),this.whenConnectionStarted()]);case 9:this.signalRAccessTokenRefresh=!1;this.networkStateIsPending=!1;this.connectionState="connected";(o=h(this,Ea))==null||o.call(this,void 0);console.info(this.weavyId,"SignalR connected.");_context77.next=44;break;case 16:_context77.prev=16;_context77.t0=_context77["catch"](4);if(!(_context77.t0 instanceof zt)){_context77.next=21;break}console.warn(this.weavyId,"SignalR connection aborted.");return _context77.abrupt("return");case 21:if(!window.navigator.onLine){_context77.next=32;break}if(!(!this.signalRAccessTokenRefresh&&window.document.visibilityState!=="hidden"&&_context77.t0.toString().includes("Unauthorized"))){_context77.next=26;break}console.log(this.weavyId,"Retrying SignalR connect with fresh token."),this.signalRAccessTokenRefresh=!0;_context77.next=30;break;case 26:console.log(this.weavyId,"Server is probably down, retrying SignalR connect after a delay or when window regains focus.");this.connectionState="reconnecting";_context77.next=30;return new Promise(function(B){setTimeout(B,5e3),window.addEventListener("visibilitychange",B,{once:!0}),window.addEventListener("offline",B,{once:!0}),window.addEventListener("online",B,{once:!0})});case 30:_context77.next=36;break;case 32:this.networkStateIsPending=!1;console.log(this.weavyId,"Offline, reconnecting SignalR when online.");_context77.next=36;return new Promise(function(B){window.addEventListener("online",B,{once:!0})});case 36:_context77.t1=window.navigator.onLine&&(document==null?void 0:document.visibilityState)!=="hidden";if(!_context77.t1){_context77.next=40;break}_context77.next=40;return new Promise(function(B){return setTimeout(B,1e3)});case 40:this.checkVersion();this.networkStateIsPending=!0;_context77.next=44;return this.connect();case 44:case"end":return _context77.stop()}},_callee76,this,[[4,16]])}));function connect(){return _connect4.apply(this,arguments)}return connect}()},{key:"subscribe",value:function(){var _subscribe=_asyncToGenerator(_regeneratorRuntime().mark(function _callee77(o,s,B){var Q,Y;return _regeneratorRuntime().wrap(function _callee77$(_context78){while(1)switch(_context78.prev=_context78.next){case 0:if(!this.isDestroyed){_context78.next=2;break}throw new zt;case 2:(Q=h(this,Oc))==null||Q.call(this,!0);_context78.prev=3;Y=o?o+":"+s:s;if(!h(this,vi).some(function(J){return J.name===Y&&J.callback===B})){_context78.next=7;break}throw new Error("Duplicate subscribe: "+Y);case 7:h(this,vi).push({name:Y,callback:B});_context78.next=10;return this.whenConnectionStarted();case 10:if(h(this,xt)){_context78.next=12;break}throw new Error("Connection not created");case 12:h(this,xt).on(Y,B);_context78.next=15;return h(this,xt).invoke("Subscribe",Y);case 15:_context78.next=20;break;case 17:_context78.prev=17;_context78.t0=_context78["catch"](3);_context78.t0 instanceof zt||console.error(this.weavyId,"Error in Subscribe:",_context78.t0);case 20:case"end":return _context78.stop()}},_callee77,this,[[3,17]])}));function subscribe(_x55,_x56,_x57){return _subscribe.apply(this,arguments)}return subscribe}()},{key:"unsubscribe",value:function(){var _unsubscribe=_asyncToGenerator(_regeneratorRuntime().mark(function _callee78(o,s,B){var Q,Y,J;return _regeneratorRuntime().wrap(function _callee78$(_context79){while(1)switch(_context79.prev=_context79.next){case 0:if(!this.isDestroyed){_context79.next=2;break}throw new zt;case 2:_context79.prev=2;Y=o?o+":"+s:s,J=h(this,vi).findIndex(function(it){return it.name===Y&&it.callback===B});if(!(J!==-1)){_context79.next=15;break}h(this,vi).splice(J,1);_context79.next=8;return this.whenConnectionStarted();case 8:if(h(this,xt)){_context79.next=10;break}throw new Error("Connection not created");case 10:(Q=h(this,xt))==null||Q.off(Y,B);_context79.t0=h(this,vi).some(function(it){return it.name===Y});if(_context79.t0){_context79.next=15;break}_context79.next=15;return h(this,xt).invoke("Unsubscribe",Y);case 15:_context79.next=20;break;case 17:_context79.prev=17;_context79.t1=_context79["catch"](2);_context79.t1 instanceof zt||console.error(this.weavyId,"Error in Unsubscribe:",_context79.t1);case 20:case"end":return _context79.stop()}},_callee78,this,[[2,17]])}));function unsubscribe(_x58,_x59,_x60){return _unsubscribe.apply(this,arguments)}return unsubscribe}()},{key:"networkState",get:function get(){return h(this,$o)},set:function set(o){A(this,$o,o),this.triggerNetworkChange()}},{key:"serverState",get:function get(){return h(this,Co)},set:function set(o){A(this,Co,o),this.triggerNetworkChange()}},{key:"connectionState",get:function get(){return h(this,ko)},set:function set(o){A(this,ko,o),this.triggerNetworkChange()}},{key:"networkStateIsPending",get:function get(){return h(this,Eo)},set:function set(o){A(this,Eo,o),this.triggerNetworkChange()}},{key:"network",get:function get(){return{state:h(this,$o)==="online"?h(this,ko)==="connected"||h(this,Co)==="ok"?"online":"unreachable":"offline",isPending:h(this,Eo)}}},{key:"triggerNetworkChange",value:function triggerNetworkChange(){var o=this.network;h(this,xo).forEach(function(s){s(o)})}},{key:"addNetworkListener",value:function addNetworkListener(o){h(this,xo).add(o)}},{key:"removeNetworkListener",value:function removeNetworkListener(o){h(this,xo)["delete"](o)}},{key:"locales",get:function get(){return Array.from(h(this,gi).entries())},set:function set(o){var _this198=this;if(this.isDestroyed)throw new zt;if(this.localization)throw new Error("Locales may only be configured once");if(!Array.isArray(o))throw new TypeError("Provided locales have invalid format.");o.forEach(function(s){var _h3;if(!Array.isArray(s)||s.length!==2||typeof s[0]!="string")throw new TypeError("Invalid locale provided: "+s[0]);(_h3=h(_this198,gi)).set.apply(_h3,_toConsumableArray(s))}),this.configureLocalization()}},{key:"locale",get:function get(){return h(this,Sa)},set:function set(o){var _this199=this;if(this.isDestroyed)throw new zt;!this.locale&&!o||(A(this,Sa,o),this.localization?this.localization.setLocale(this.locale):queueMicrotask(function(){_this199.localization?_this199.localization.setLocale(_this199.locale):_this199.locale!==pm.sourceLocale&&(h(_this199,gi).has(_this199.locale)&&_this199.configureLocalization(),_this199.localization?_this199.localization.setLocale(_this199.locale):console.error(_this199.weavyId,"You need to configure additional languages in config to use '".concat(o,"'.")))}))}},{key:"loadLocale",value:function(){var _loadLocale=_asyncToGenerator(_regeneratorRuntime().mark(function _callee79(o){var s,B;return _regeneratorRuntime().wrap(function _callee79$(_context80){while(1)switch(_context80.prev=_context80.next){case 0:if(!this.isDestroyed){_context80.next=2;break}throw new zt;case 2:if(!((s=h(this,gi))!=null&&s.has(o))){_context80.next=10;break}B=h(this,gi).get(o);console.log(this.weavyId,typeof B=="function"?"loading locale":"preloaded locale",o);_context80.next=7;return typeof B=="function"?B():B;case 7:return _context80.abrupt("return",_context80.sent);case 10:throw new Error("The requested locale is not configured");case 11:case"end":return _context80.stop()}},_callee79,this)}));function loadLocale(_x61){return _loadLocale.apply(this,arguments)}return loadLocale}()},{key:"configureLocalization",value:function configureLocalization(){var _this200=this;var o;if(this.isDestroyed)throw new zt;if((o=h(this,gi))!=null&&o.size&&!this.localization){var s=h(this,gi).keys();console.log(this.weavyId,"Configuring locales",s);var _G$=G$1({sourceLocale:pm.sourceLocale,targetLocales:s,loadLocale:function loadLocale(Y){return _this200.loadLocale(Y)}}),B=_G$.getLocale,Q=_G$.setLocale;this.localization={getLocale:B,setLocale:Q}}}},{key:"fetchOptions",value:function(){var _fetchOptions=_asyncToGenerator(_regeneratorRuntime().mark(function _callee80(){var o,s,_args23=arguments;return _regeneratorRuntime().wrap(function _callee80$(_context81){while(1)switch(_context81.prev=_context81.next){case 0:o=_args23.length>0&&_args23[0]!==undefined?_args23[0]:!0;if(!this.isDestroyed){_context81.next=3;break}throw new zt;case 3:s={"X-Weavy-Source":"".concat(pm.sourceName,"@").concat(pm.version)};_context81.t0=o;if(!_context81.t0){_context81.next=10;break}_context81.next=8;return this.getToken();case 8:_context81.t1=_context81.sent;s.Authorization="Bearer "+_context81.t1;case 10:return _context81.abrupt("return",Xs(jb,{headers:s},!0));case 11:case"end":return _context81.stop()}},_callee80,this)}));function fetchOptions(){return _fetchOptions.apply(this,arguments)}return fetchOptions}()},{key:"get",value:function(){var _get2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee81(o){return _regeneratorRuntime().wrap(function _callee81$(_context82){while(1)switch(_context82.prev=_context82.next){case 0:_context82.next=2;return this.post(o,"GET");case 2:return _context82.abrupt("return",_context82.sent);case 3:case"end":return _context82.stop()}},_callee81,this)}));function get(_x62){return _get2.apply(this,arguments)}return get}()},{key:"post",value:function(){var _post=_asyncToGenerator(_regeneratorRuntime().mark(function _callee82(o,s,B){var Q,Y,J,it,_args25=arguments;return _regeneratorRuntime().wrap(function _callee82$(_context83){while(1)switch(_context83.prev=_context83.next){case 0:Q=_args25.length>3&&_args25[3]!==undefined?_args25[3]:Vl.JSON;Y=_args25.length>4&&_args25[4]!==undefined?_args25[4]:!0;if(!this.isDestroyed){_context83.next=4;break}throw new zt;case 4:_context83.t0=Xs;_context83.next=7;return this.fetchOptions();case 7:_context83.t1=_context83.sent;_context83.t2={headers:{"content-type":Q},method:s,body:B};_context83.t3=!0;J=(0,_context83.t0)(_context83.t1,_context83.t2,_context83.t3);this.networkStateIsPending=!0;_context83.next=14;return fetch(new URL(o,this.url),J);case 14:it=_context83.sent;if(!it.ok){_context83.next=19;break}this.networkStateIsPending=!1,this.serverState="ok";_context83.next=30;break;case 19:if(!(it.status===401||it.status===403)){_context83.next=29;break}if(!Y){_context83.next=26;break}_context83.next=23;return this.getToken(!0);case 23:_context83.next=25;return this.post(o,s,B,Q,!1);case 25:return _context83.abrupt("return",_context83.sent);case 26:this.networkStateIsPending=!1,this.serverState="unauthorized";_context83.next=30;break;case 29:this.networkStateIsPending=!1,this.serverState="unreachable";case 30:return _context83.abrupt("return",it);case 31:case"end":return _context83.stop()}},_callee82,this)}));function post(_x63,_x64,_x65){return _post.apply(this,arguments)}return post}()},{key:"upload",value:function(){var _upload=_asyncToGenerator(_regeneratorRuntime().mark(function _callee83(o,s,B){var _this201=this;var Q,Y,J,it,_args26=arguments;return _regeneratorRuntime().wrap(function _callee83$(_context84){while(1)switch(_context84.prev=_context84.next){case 0:Q=_args26.length>3&&_args26[3]!==undefined?_args26[3]:Vl.JSON;Y=_args26.length>4?_args26[4]:undefined;J=_args26.length>5&&_args26[5]!==undefined?_args26[5]:!0;if(!this.isDestroyed){_context84.next=5;break}throw new zt;case 5:_context84.next=7;return this.getToken();case 7:it=_context84.sent;_context84.next=10;return new Promise(function(nt,ot){var dt=new XMLHttpRequest;dt.open(s,new URL(o,_this201.url),!0),dt.setRequestHeader("Authorization","Bearer "+it),dt.setRequestHeader("X-Weavy-Source","".concat(pm.sourceName,"@").concat(pm.version)),Q&&dt.setRequestHeader("content-type",Q),Y&&dt.upload.addEventListener("progress",function(Mt){Y(Mt.loaded/Mt.total*100||100)}),dt.onload=function(Mt){J&&(dt.status===401||dt.status===401)?_this201.getToken(!0).then(function(){return _this201.upload(o,s,B,Q,Y,!1)}).then(nt)["catch"](ot):nt(new Response(dt.response,{status:dt.status,statusText:dt.statusText}))},dt.onerror=ot,dt.send(B)});case 10:return _context84.abrupt("return",_context84.sent);case 11:case"end":return _context84.stop()}},_callee83,this)}));function upload(_x66,_x67,_x68){return _upload.apply(this,arguments)}return upload}()},{key:"destroy",value:function destroy(){var o,s,B;A(this,xa,!0),h(this,Sc).disconnect(),this.disconnectQueryClient(),this.disconnect(),h(this,bo)&&(h(this,_o)["catch"](function(){}),h(this,bo).call(this,new zt)),(o=h(this,$c))==null||o.detachListeners(),(s=h(this,Ec))==null||s.detachListeners(),h(this,Jr)&&(h(this,Jr).connectedContexts["delete"](this),h(this,Jr).connectedContexts.size||(B=h(this,Jr))==null||B.remove()),console.info(this.weavyId,"was destroyed")}}]);return pm}();xa=new WeakMap,$c=new WeakMap,Ec=new WeakMap,Sc=new WeakMap,Pc=new WeakMap,Ac=new WeakMap,An=new WeakMap,ka=new WeakMap,Lc=new WeakMap,Mc=new WeakMap,Oc=new WeakMap,Ic=new WeakMap,mi=new WeakMap,Ln=new WeakMap,go=new WeakMap,Ri=new WeakMap,Mn=new WeakMap,td=new WeakSet,Rf=function Rf(r){var o;if(!r)return!1;if(typeof r!="string")throw new TypeError("You have provided an invalid string access token of type ".concat(_typeof(r),"."));if(typeof r=="string"&&!r.startsWith("wyu_"))throw r.startsWith("wys_")?new TypeError("You have provided an API key for authentication. Provide a user access token instead."):new TypeError("You have provided an invalid string as access token.");return(o=h(this,Lc))==null||o.call(this,r),!0},Ca=new WeakMap,Xr=new WeakMap,Tc=new WeakMap,$a=new WeakMap,xt=new WeakMap,vi=new WeakMap,Ea=new WeakMap,bo=new WeakMap,_o=new WeakMap,xo=new WeakMap,ko=new WeakMap,Co=new WeakMap,$o=new WeakMap,Eo=new WeakMap,Jr=new WeakMap,gi=new WeakMap,Sa=new WeakMap,Ve.version="21.1.1",Ve.sourceName="@weavy/uikit-web",Ve.sourceLocale=gp,Ve.defaults={cloudFilePickerUrl:"https://filebrowser.weavy.io/v14/",confluenceAuthenticationUrl:void 0,confluenceProductName:void 0,disableEnvironmentImports:!1,gcTime:1e3*60*60*24,locale:gp,modalParent:"body",reactions:["\uD83D\uDE0D","\uD83D\uDE0E","\uD83D\uDE09","\uD83D\uDE1C","\uD83D\uDC4D"],scrollBehavior:e1?"instant":"smooth",staleTime:1e3*1,tokenFactoryRetryDelay:2e3,tokenFactoryTimeout:2e4,zoomAuthenticationUrl:void 0};var oa=Ve;var Y5=oa;function k1(r){return typeof r=="string"&&(r=eval==null?void 0:(0,eval)("\"use strict\";(".concat(r,")"))),r}var C1=Object.defineProperty,$1=Object.getOwnPropertyDescriptor,Vt=function Vt(r,o,s,B){for(var Q=B>1?void 0:B?$1(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&C1(o,s,Q),Q};var Pt=function(_le2){_inherits(Pt,_le2);function Pt(){var _this202$weavyContext;var _this202;_classCallCheck(this,Pt);_this202=_callSuper(this,Pt),_this202.provider=!1,_this202.version=oa.version,_this202.sourceName=oa.sourceName,_this202.childElementCount&&(_this202.provider=!0),(_this202$weavyContext=_this202.weavyContext)!==null&&_this202$weavyContext!==void 0?_this202$weavyContext:_this202.weavyContext=new oa({host:_this202.provider?_assertThisInitialized(_this202):void 0});return _this202}_createClass(Pt,[{key:"willUpdate",value:function willUpdate(r){var _this203=this;if(this.weavyContext){var o={};Array.from(r.keys()).forEach(function(s){s!=="weavyContext"&&_this203[s]&&Object.assign(o,_defineProperty({},s,_this203[s]))}),Object.assign(this.weavyContext,o)}}},{key:"render",value:function render(){return v(_templateObject4||(_templateObject4=_taggedTemplateLiteral([" <slot></slot> "])))}}]);return Pt}(le);Pt.styles=[Be(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n :host {\n display: contents;\n }\n "])))];Vt([m({attribute:!0,type:Boolean})],Pt.prototype,"provider",2);Vt([m({attribute:!0,converter:{fromAttribute:function fromAttribute(r){return Ro(r)}}})],Pt.prototype,"cloudFilePickerUrl",2);Vt([m({attribute:!0,converter:{fromAttribute:function fromAttribute(r){return Ro(r)}}})],Pt.prototype,"confluenceAuthenticationUrl",2);Vt([m({attribute:!0})],Pt.prototype,"confluenceProductName",2);Vt([m({type:Boolean})],Pt.prototype,"disableEnvironmentImports",2);Vt([m({attribute:!0})],Pt.prototype,"locale",2);Vt([m({attribute:!0,type:Array})],Pt.prototype,"locales",2);Vt([m({attribute:!0,type:Number})],Pt.prototype,"gcTime",2);Vt([m({attribute:!0})],Pt.prototype,"modalParent",2);Vt([m({attribute:!0,type:Array})],Pt.prototype,"reactions",2);Vt([m({attribute:!0})],Pt.prototype,"scrollBehavior",2);Vt([m({attribute:!0,type:Number})],Pt.prototype,"staleTime",2);Vt([m({attribute:!0,converter:{fromAttribute:function fromAttribute(r){return k1(r)}}})],Pt.prototype,"tokenFactory",2);Vt([m({attribute:!0,type:Number})],Pt.prototype,"tokenFactoryRetryDelay",2);Vt([m({attribute:!0,type:Number})],Pt.prototype,"tokenFactoryTimeout",2);Vt([m({attribute:!0,converter:{fromAttribute:function fromAttribute(r){return Ro(r)}}})],Pt.prototype,"tokenUrl",2);Vt([m({attribute:!0,converter:{fromAttribute:function fromAttribute(r){return Ro(r)}}})],Pt.prototype,"url",2);Vt([m({attribute:!0,converter:{fromAttribute:function fromAttribute(r){return Ro(r)}}})],Pt.prototype,"zoomAuthenticationUrl",2);Vt([K()],Pt.prototype,"weavyContext",2);Pt=Vt([de("wy-context")],Pt);var Fi=function(r){return r.None="none",r.Read="read",r.Write="write",r.Admin="admin",r}(Fi||{}),Cs=function(r){return r.List="list",r.Read="read",r.Create="create",r.Update="update",r.Delete="delete",r.Admin="admin",r}(Cs||{}),lo=function(r){return r.ChatRoom="edb400ac-839b-45a7-b2a8-6a01820d1c44",r.ContextualChat="d65dd4bc-418e-403c-9f56-f9cf4da931ed",r.PrivateChat="7e14f418-8f15-46f4-b182-f619b671e470",r}(lo||{}),Qc=function(r){return r.Chat="chat",r.Comments="comments",r.Files="files",r.Posts="posts",r}(Qc||{}),Df=function(r){return r.App="app",r.File="file",r.Message="message",r.User="user",r.Comment="comment",r.Post="post",r}(Df||{}),Ee=function(r){return r.Attachments="attachments",r.CloudFiles="cloud_files",r.Comments="comments",r.Confluence="confluence",r.Embeds="embeds",r.Meetings="meetings",r.Mentions="mentions",r.Polls="polls",r.Previews="previews",r.Reactions="reactions",r.Receipts="receipts",r.Thumbnails="thumbnails",r.Typing="typing",r.Versions="versions",r.WebDAV="web_dav",r.Webhooks="webhooks",r}(Ee||{});function tr(r,o,s,B,Q){var Y=arguments.length>5&&arguments[5]!==undefined?arguments[5]:"GET";return _objectSpread({queryKey:o,queryFn:function(){var _queryFn=_asyncToGenerator(_regeneratorRuntime().mark(function _callee84(){var J;return _regeneratorRuntime().wrap(function _callee84$(_context85){while(1)switch(_context85.prev=_context85.next){case 0:_context85.next=2;return r.post(s||"/api/"+o.join("/"),Y,Q);case 2:J=_context85.sent;if(!J.ok){_context85.next=7;break}_context85.next=6;return J.json();case 6:return _context85.abrupt("return",_context85.sent);case 7:throw new Error("Error calling ".concat(s||"/api/"+o.join("/")));case 8:case"end":return _context85.stop()}},_callee84)}));function queryFn(){return _queryFn.apply(this,arguments)}return queryFn}()},B)}function E1(_x69,_x70,_x71,_x72,_x73){return _E.apply(this,arguments)}function _E(){_E=_asyncToGenerator(_regeneratorRuntime().mark(function _callee270(r,o,s,B,Q){var Y,J,it,nt,_args214=arguments;return _regeneratorRuntime().wrap(function _callee270$(_context272){while(1)switch(_context272.prev=_context272.next){case 0:Y=_args214.length>5&&_args214[5]!==undefined?_args214[5]:"GET";J=_args214.length>6&&_args214[6]!==undefined?_args214[6]:!1;it=r.queryClient,nt=tr(r,o,s,B,Q,Y);if(!J){_context272.next=9;break}_context272.next=6;return it.fetchQuery(nt);case 6:_context272.t0=_context272.sent;_context272.next=12;break;case 9:_context272.next=11;return it.ensureQueryData(nt);case 11:_context272.t0=_context272.sent;case 12:return _context272.abrupt("return",_context272.t0);case 13:case"end":return _context272.stop()}},_callee270)}));return _E.apply(this,arguments)}function S1(r,o){var s=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var B=arguments.length>3?arguments[3]:undefined;if(r){if(r=JSON.parse(JSON.stringify(r)),r!=null&&r.pages){var _r$pages$map;var Q=-1;return{pages:_toConsumableArray((_r$pages$map=r.pages.map(function(Y,J){if(Q>=0)return Y;var it=Y.data||[],nt=it.filter(function(ot){return ot.id!==o.id&&(!B||ot.id!==B)});return s&&s.by?(Q=nt.findIndex(function(ot){var _dt6,_Mt6;var dt=ot[s.by],Mt=o[s.by];if(s.by==="modified_at"&&((_dt6=dt)!==null&&_dt6!==void 0?_dt6:dt=ot.created_at,(_Mt6=Mt)!==null&&_Mt6!==void 0?_Mt6:Mt=o.created_at),typeof dt=="string"&&typeof Mt=="string"){var Ot=dt.localeCompare(Mt,void 0,{sensitivity:"base",numeric:!0});return s.descending?Ot<0:Ot>0}return dt&&Mt&&(s.descending?dt<Mt:dt>Mt)}),Q>=0?(nt.splice(Q,0,o),Y.data=_toConsumableArray(nt),Y.end&&(Y.end+=1+nt.length-it.length)):r&&J==r.pages.length-1&&Y.end===Y.count?(Y.data=[].concat(_toConsumableArray(nt),[o]),Y.end&&(Y.end+=1+nt.length-it.length)):Y.data=_toConsumableArray(nt)):J===0&&(s.descending?Y.data=[o].concat(_toConsumableArray(nt)):Y.data=[].concat(_toConsumableArray(nt),[o]),Y.end&&(Y.end+=1+nt.length-it.length)),Y}))!==null&&_r$pages$map!==void 0?_r$pages$map:[]),pageParams:_toConsumableArray(r.pageParams)}}else if(r!=null&&r.length){var _Q8=-1;var Y=_toConsumableArray(r.filter(function(J){return J.id!==o.id&&(!B||J.id!==B)}));return s&&s.by?(_Q8=Y.findIndex(function(J){var _it9,_nt7;var it=J[s.by],nt=o[s.by];if(s.by==="modified_at"&&((_it9=it)!==null&&_it9!==void 0?_it9:it=J.created_at,(_nt7=nt)!==null&&_nt7!==void 0?_nt7:nt=o.created_at),typeof it=="string"&&typeof nt=="string"){var ot=it.localeCompare(nt,void 0,{sensitivity:"base",numeric:!0});return s.descending?ot<0:ot>0}return it&&nt&&(s.descending?it<nt:it>nt)}),_Q8>=0?Y.splice(_Q8,0,o):Y.push(o)):s.descending?Y.unshift(o):Y.push(o),Y}}return r}function Ff(r,o,s){if(o!==void 0){var _r$pages$map2;var B=o instanceof Function?o:function(Q){return Q.id===o};if(r)return r=JSON.parse(JSON.stringify(r)),r.pages?{pages:(_r$pages$map2=r.pages.map(function(Q){return Q.data&&(Q.data=_toConsumableArray(Q.data.map(function(Y){return B(Y)&&(Y=_objectSpread({},Y),s(Y)),Y}))),Q}))!==null&&_r$pages$map2!==void 0?_r$pages$map2:[],pageParams:r.pageParams}:r.length?_toConsumableArray(r.map(function(Q){return B(Q)&&(Q=_objectSpread({},Q),s(Q)),Q})):r.data?{data:_toConsumableArray(r.data.map(function(Q){return B(Q)&&(Q=_objectSpread({},Q),s(Q)),Q})),count:r.count}:(s(r),r)}return r}function zf(r,o){if(o!==void 0){var s=o instanceof Function?o:function(B){return B.id===o};if(r){var _r$pages$map3;if(r=JSON.parse(JSON.stringify(r)),r.pages)return{pages:(_r$pages$map3=r.pages.map(function(B){return B.data&&(B.data=_toConsumableArray(B.data.filter(function(Q){return!s(Q)}))),B}))!==null&&_r$pages$map3!==void 0?_r$pages$map3:[],pageParams:r.pageParams};if(r.length)return _toConsumableArray(r.filter(function(B){return!s(B)}))}}return r}var sn=function sn(r,o,s,B,Q){return r.setQueryData(o,function(Y){return S1(Y,s,Q,B)})},tt=function tt(r,o,s,B){return r.setQueryData(o,function(Q){return Ff(Q,s,B)})},je=function je(r,o,s,B){r.setQueriesData(o,function(Q){return Ff(Q,s,B)})},P1=function P1(r,o,s){return r.setQueryData(o,function(B){return zf(B,s)})},A1=function A1(r,o,s){r.setQueriesData(o,function(B){return zf(B,s)})};function L1(r,o,s){var B;var Q=r.getQueryData(o);(B=Q==null?void 0:Q.pages)!=null&&B.length&&Q.pages.length>1&&r.setQueryData(o,function(Y){return{pages:Y.pages.slice(0,1),pageParams:Y.pageParams.slice(0,1)}},s)}function M1(r,o){var s=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};return _objectSpread(_objectSpread({},s),{},{initialPageParam:0,queryKey:["messages",o],queryFn:function(){var _queryFn2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee85(B){var Q,Y,J,it;return _regeneratorRuntime().wrap(function _callee85$(_context86){while(1)switch(_context86.prev=_context86.next){case 0:Y=B.pageParam;J="/api/apps/"+o+"/messages?orderby=createdat+desc&skip="+Y+"&top=25";_context86.next=4;return r.get(J);case 4:_context86.next=6;return _context86.sent.json();case 6:it=_context86.sent;return _context86.abrupt("return",(it.data=((Q=it.data)==null?void 0:Q.reverse())||[],it));case 8:case"end":return _context86.stop()}},_callee85)}));function queryFn(_x74){return _queryFn2.apply(this,arguments)}return queryFn}(),getNextPageParam:function getNextPageParam(B,Q){if((B==null?void 0:B.end)<(B==null?void 0:B.count))return Q.length*25},select:function select(B){return{pages:_toConsumableArray(B.pages).reverse(),pageParams:_toConsumableArray(B.pageParams).reverse()}}})}function O1(r,o){var s=r.queryClient;return{mutationFn:function(){var _mutationFn=_asyncToGenerator(_regeneratorRuntime().mark(function _callee86(B){var Q;return _regeneratorRuntime().wrap(function _callee86$(_context87){while(1)switch(_context87.prev=_context87.next){case 0:_context87.next=2;return r.post("/api/apps/"+B.app_id+"/messages","POST",JSON.stringify({text:B.text,blobs:B.blobs,embed_id:B.embed_id||null,meeting_id:B.meeting_id,options:B.poll_options.filter(function(Y){return Y.text.trim()!==""}).map(function(Y){return{text:Y.text}}),metadata:{temp_id:(Q=B.temp_id)==null?void 0:Q.toString()}}));case 2:return _context87.abrupt("return",_context87.sent.json());case 3:case"end":return _context87.stop()}},_callee86)}));function mutationFn(_x75){return _mutationFn.apply(this,arguments)}return mutationFn}(),mutationKey:o,onMutate:function(){var _onMutate=_asyncToGenerator(_regeneratorRuntime().mark(function _callee87(B){var Q;return _regeneratorRuntime().wrap(function _callee87$(_context88){while(1)switch(_context88.prev=_context88.next){case 0:_context88.next=2;return s.cancelQueries({queryKey:["messages",B.app_id]});case 2:if(!B.temp_id){_context88.next=5;break}Q={id:B.temp_id,app_id:-1,attachment_ids:[],is_trashed:!1,text:B.text,html:B.text,plain:B.text,temp:!0,created_by_id:B.user_id,created_by:{id:B.user_id,avatar_url:"",display_name:"",presence:void 0,name:""},created_at:(new Date()).toUTCString(),attachments:[],attachment_count:0,reactions:[]};sn(s,["messages",B.app_id],Q);case 5:return _context88.abrupt("return",{temp_id:B.temp_id});case 6:case"end":return _context88.stop()}},_callee87)}));function onMutate(_x76){return _onMutate.apply(this,arguments)}return onMutate}(),onSuccess:function onSuccess(B,Q,Y){sn(s,["messages",Q.app_id],B,Y.temp_id)}}}function I1(r,o,s){return _objectSpread({queryKey:["members",o],queryFn:function(){var _queryFn3=_asyncToGenerator(_regeneratorRuntime().mark(function _callee88(){return _regeneratorRuntime().wrap(function _callee88$(_context89){while(1)switch(_context89.prev=_context89.next){case 0:_context89.next=2;return r.get("/api/apps/"+o+"/members");case 2:_context89.next=4;return _context89.sent.json();case 4:return _context89.abrupt("return",_context89.sent);case 5:case"end":return _context89.stop()}},_callee88)}));function queryFn(){return _queryFn3.apply(this,arguments)}return queryFn}()},s)}function T1(r,o){return{queryKey:["searchmembers"],initialPageParam:0,enabled:!0,queryFn:function(){var _queryFn4=_asyncToGenerator(_regeneratorRuntime().mark(function _callee89(s){var B,Q,Y,J;return _regeneratorRuntime().wrap(function _callee89$(_context90){while(1)switch(_context90.prev=_context90.next){case 0:B=o();Q=B||"*";Y=s.pageParam;_context90.next=5;return r.get("/api/users/autocomplete?q=".concat(Q,"&skip=").concat(Y,"&top=25&count=").concat(!B));case 5:_context90.next=7;return _context90.sent.json();case 7:J=_context90.sent;return _context90.abrupt("return",(J.data=J.data||[],J));case 9:case"end":return _context90.stop()}},_callee89)}));function queryFn(_x77){return _queryFn4.apply(this,arguments)}return queryFn}(),getNextPageParam:function getNextPageParam(s,B){if(s!=null&&s.end&&(s==null?void 0:s.end)<(s==null?void 0:s.count))return B.length*25}}}var as=function(){function as(o){_classCallCheck(this,as);o.addController(this),this.host=o,this.setContext()}_createClass(as,[{key:"result",get:function get(){return this._result&&this.observer?this.observer.trackResult(this._result):void 0}},{key:"setContext",value:function(){var _setContext=_asyncToGenerator(_regeneratorRuntime().mark(function _callee90(){var _this204=this;return _regeneratorRuntime().wrap(function _callee90$(_context91){while(1)switch(_context91.prev=_context91.next){case 0:this.whenContext=new Promise(function(o){return _this204.resolveContext=o});_context91.next=3;return yn(this.host);case 3:this.context=new $i(this.host,{context:Le,subscribe:!0});case 4:case"end":return _context91.stop()}},_callee90,this)}));function setContext(){return _setContext.apply(this,arguments)}return setContext}()},{key:"hostUpdate",value:function hostUpdate(){var o,s;(o=this.context)!=null&&o.value&&((s=this.resolveContext)==null||s.call(this))}},{key:"trackInfiniteQuery",value:function(){var _trackInfiniteQuery=_asyncToGenerator(_regeneratorRuntime().mark(function _callee91(o,s){var _this205=this;var B,Q,Y,J;return _regeneratorRuntime().wrap(function _callee91$(_context92){while(1)switch(_context92.prev=_context92.next){case 0:_context92.t0=s;if(_context92.t0){_context92.next=5;break}_context92.next=4;return this.whenContext;case 4:s=(Q=(B=this.context)==null?void 0:B.value)==null?void 0:Q.queryClient;case 5:if(s){_context92.next=7;break}throw new Error("No QueryClient provided");case 7:(Y=this.observeUnsubscribe)==null||Y.call(this);J=new mv(s,o);this.observer=J,this._result=J.getOptimisticResult(J.options),this.observeUnsubscribe=J.subscribe(function(){var it=Rc(_this205.result,J.getCurrentResult());it!==_this205._result&&(_this205._result=it,_this205.host.requestUpdate())}),J.updateResult(),this.host.requestUpdate();case 10:case"end":return _context92.stop()}},_callee91,this)}));function trackInfiniteQuery(_x78,_x79){return _trackInfiniteQuery.apply(this,arguments)}return trackInfiniteQuery}()},{key:"untrackInfiniteQuery",value:function untrackInfiniteQuery(){var o;(o=this.observeUnsubscribe)==null||o.call(this),this.observeUnsubscribe=void 0,this._result=void 0,this.observer=void 0}},{key:"hostDisconnected",value:function hostDisconnected(){var o;(o=this.observeUnsubscribe)==null||o.call(this)}}]);return as}();function R1(r){for(;r;)if(r=r.nextElementSibling,r instanceof HTMLElement&&/absolute|sticky|fixed/.test(getComputedStyle(r).position)===!1)return r;return null}function yd(r){var o=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1;if(r){var s=getComputedStyle(r);var B=s.position==="absolute",Q=o?/(auto|scroll|overlay|hidden)/:/(auto|overlay|scroll)/;if(s.position==="fixed"&&document.scrollingElement)return document.scrollingElement;for(var Y=r;Y=Y.parentElement;)if(s=getComputedStyle(Y),!(B&&s.position==="static")&&Q.test(s.overflow+s.overflowY+s.overflowX))return Y}return document.scrollingElement||r}function D1(r){if(r){var o=yd(r);return o.clientHeight!==o.scrollHeight}return!1}function F1(r){var o=arguments.length>1&&arguments[1]!==undefined?arguments[1]:32;if(r){var s=yd(r);return Math.abs(s.scrollTop+s.clientHeight-s.scrollHeight)<o}return!1}function z1(_x80){return _z.apply(this,arguments)}function _z(){_z=_asyncToGenerator(_regeneratorRuntime().mark(function _callee271(r){var o,s,_args215=arguments;return _regeneratorRuntime().wrap(function _callee271$(_context273){while(1)switch(_context273.prev=_context273.next){case 0:o=_args215.length>1&&_args215[1]!==undefined?_args215[1]:!1;if(!r){_context273.next=6;break}s=yd(r);Math.abs(s.scrollTop+s.clientHeight-s.scrollHeight)>1&&(o?s.scrollTo({top:s.scrollHeight,left:0,behavior:"smooth"}):s.scrollTop=s.scrollHeight);_context273.next=6;return new Promise(function(B){var Q=s.scrollTop;var Y=function Y(){o&&s.scrollTop===Q&&(s.scrollTop=s.scrollHeight),Q=s.scrollTop,Math.abs(s.scrollTop+s.clientHeight-s.scrollHeight)>1?requestAnimationFrame(Y):B(void 0)};requestAnimationFrame(Y)});case 6:case"end":return _context273.stop()}},_callee271)}));return _z.apply(this,arguments)}var N1=0,V1="512px";function B1(r,o){var _o3;var s=arguments.length>2&&arguments[2]!==undefined?arguments[2]:!1;var B=!1;var Q=yd(r);Q.style.overflowAnchor="none";var Y=Q===document.documentElement?document:Q;(_o3=o)!==null&&_o3!==void 0?_o3:o=function o(){return Promise.reject(new Error("No reverse scroller handler function defined"))};var J=new IntersectionObserver(function(it){it.forEach(function(nt){if(nt.isIntersecting&&!B){B=!0;var ot,dt,Mt;s&&(ot=R1(nt.target)||nt.target,dt=Q.scrollHeight,Mt=ot.offsetTop);var Ot=function Ot(){queueMicrotask(function(){if(dt!==Q.scrollHeight){if(s&&ot!=null&&ot.isConnected){var Ut=ot.offsetTop-Mt;Q.scrollTop+=Ut}requestAnimationFrame(function(){return B=!1})}else queueMicrotask(function(){if(dt!==Q.scrollHeight){if(s&&ot!=null&&ot.isConnected){var _Ut3=ot.offsetTop-Mt;Q.scrollTop+=_Ut3}requestAnimationFrame(function(){return B=!1})}else requestAnimationFrame(function(){if(s&&J.takeRecords().length&&ot!=null&&ot.isConnected){var _Ut4=ot.offsetTop-Mt;Q.scrollTop+=_Ut4}requestAnimationFrame(function(){return B=!1})})})})},Qt=o();Qt?Qt.then(Ot):Ot()}})},{root:Y,threshold:N1,rootMargin:V1});return J.observe(r),J}var ss=function(){function ss(o){var s=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1;_classCallCheck(this,ss);this.reverse=!1,this.isObservePending=!1,o.addController(this),this.host=o,this.reverse=s}_createClass(ss,[{key:"observe",value:function observe(o,s){var _this206=this;o&&s&&!o.isLoading&&!this.isObservePending&&(this.isObservePending=!0,requestAnimationFrame(function(){var B;(B=_this206.scroller)==null||B.disconnect(),_this206.scroller=B1(s,_asyncToGenerator(_regeneratorRuntime().mark(function _callee92(){return _regeneratorRuntime().wrap(function _callee92$(_context93){while(1)switch(_context93.prev=_context93.next){case 0:_context93.t0=o.hasNextPage&&!o.isFetching;if(!_context93.t0){_context93.next=8;break}_context93.next=4;return o.fetchNextPage({cancelRefetch:!1});case 4:_context93.t1=_this206.reverse;if(!_context93.t1){_context93.next=8;break}_context93.next=8;return _this206.host.updateComplete;case 8:case"end":return _context93.stop()}},_callee92)})),_this206.reverse),_this206.isObservePending=!1}))}},{key:"hostDisconnected",value:function hostDisconnected(){var o;(o=this.scroller)==null||o.disconnect()}}]);return ss}();var H1=function(_ss){_inherits(H1,_ss);function H1(o){_classCallCheck(this,H1);return _callSuper(this,H1,[o,!0])}return _createClass(H1)}(ss);var tn=function(){function tn(o){_classCallCheck(this,tn);o.addController(this),this.host=o,this.setContext()}_createClass(tn,[{key:"setContext",value:function(){var _setContext2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee93(){var _this207=this;return _regeneratorRuntime().wrap(function _callee93$(_context94){while(1)switch(_context94.prev=_context94.next){case 0:this.whenContext=new Promise(function(o){return _this207.resolveContext=o});_context94.next=3;return yn(this.host);case 3:this.context=new $i(this.host,{context:Le,subscribe:!0});case 4:case"end":return _context94.stop()}},_callee93,this)}));function setContext(){return _setContext2.apply(this,arguments)}return setContext}()},{key:"hostUpdate",value:function hostUpdate(){var o,s;(o=this.context)!=null&&o.value&&((s=this.resolveContext)==null||s.call(this))}},{key:"trackMutation",value:function(){var _trackMutation=_asyncToGenerator(_regeneratorRuntime().mark(function _callee94(o,s){var _this$observeUnsubscr,_this208=this;var B,Q,Y;return _regeneratorRuntime().wrap(function _callee94$(_context95){while(1)switch(_context95.prev=_context95.next){case 0:_context95.t0=s;if(_context95.t0){_context95.next=5;break}_context95.next=4;return this.whenContext;case 4:s=(Q=(B=this.context)==null?void 0:B.value)==null?void 0:Q.queryClient;case 5:if(s){_context95.next=7;break}throw new Error("No QueryClient provided");case 7:return _context95.abrupt("return",((Y=this.observeUnsubscribe)==null||Y.call(this),this.observer=new Ye(s,_objectSpread({},o)),this.result=this.observer.getCurrentResult(),(_this$observeUnsubscr=this.observeUnsubscribe)!==null&&_this$observeUnsubscr!==void 0?_this$observeUnsubscr:this.observeUnsubscribe=this.observer.subscribe(function(){if(_this208.observer){var J=Rc(_this208.result,_this208.observer.getCurrentResult());_this208.result!==J&&(_this208.result=J,_this208.host.requestUpdate())}}),this.observer));case 8:case"end":return _context95.stop()}},_callee94,this)}));function trackMutation(_x81,_x82){return _trackMutation.apply(this,arguments)}return trackMutation}()},{key:"untrackMutation",value:function untrackMutation(){var o;(o=this.observeUnsubscribe)==null||o.call(this),this.observeUnsubscribe=void 0,this.result=void 0,this.observer=void 0,this.host.requestUpdate()}},{key:"mutate",get:function get(){return this.observer.mutate}},{key:"hostDisconnected",value:function hostDisconnected(){var o;(o=this.observeUnsubscribe)==null||o.call(this)}}]);return tn}();var kt=function(){function kt(o){_classCallCheck(this,kt);o.addController(this),this.host=o,this.setContext()}_createClass(kt,[{key:"result",get:function get(){return this._result&&this.observer?this.observer.trackResult(this._result):void 0}},{key:"setContext",value:function(){var _setContext3=_asyncToGenerator(_regeneratorRuntime().mark(function _callee95(){var _this209=this;return _regeneratorRuntime().wrap(function _callee95$(_context96){while(1)switch(_context96.prev=_context96.next){case 0:this.whenContext=new Promise(function(o){return _this209.resolveContext=o});_context96.next=3;return yn(this.host);case 3:this.context=new $i(this.host,{context:Le,subscribe:!0});case 4:case"end":return _context96.stop()}},_callee95,this)}));function setContext(){return _setContext3.apply(this,arguments)}return setContext}()},{key:"hostUpdate",value:function hostUpdate(){var o,s;(o=this.context)!=null&&o.value&&((s=this.resolveContext)==null||s.call(this))}},{key:"trackQuery",value:function(){var _trackQuery=_asyncToGenerator(_regeneratorRuntime().mark(function _callee96(o,s){var _this210=this;var B,Q,Y,J;return _regeneratorRuntime().wrap(function _callee96$(_context97){while(1)switch(_context97.prev=_context97.next){case 0:_context97.t0=s;if(_context97.t0){_context97.next=5;break}_context97.next=4;return this.whenContext;case 4:s=(Q=(B=this.context)==null?void 0:B.value)==null?void 0:Q.queryClient;case 5:if(s){_context97.next=7;break}throw new Error("No QueryClient provided");case 7:(Y=this.observeUnsubscribe)==null||Y.call(this);J=new uw(s,o);this.observer=J,this._result=J.getOptimisticResult(J.options),this.observeUnsubscribe=J.subscribe(function(){var it=Rc(_this210.result,J.getCurrentResult());it!==_this210._result&&(_this210._result=it,_this210.host.requestUpdate())}),J.updateResult(),this.host.requestUpdate();case 10:case"end":return _context97.stop()}},_callee96,this)}));function trackQuery(_x83,_x84){return _trackQuery.apply(this,arguments)}return trackQuery}()},{key:"untrackQuery",value:function untrackQuery(){var o;(o=this.observeUnsubscribe)==null||o.call(this),this.observeUnsubscribe=void 0,this._result=void 0,this.observer=void 0,this.host.requestUpdate()}},{key:"hostDisconnected",value:function hostDisconnected(){var o;(o=this.observeUnsubscribe)==null||o.call(this)}}]);return kt}();var j1="@charset \"UTF-8\";:where(:host,:host>*,[class^=wy-],[class*=\" wy-\"]){box-sizing:border-box;text-align:initial;font-size:var(--wy-font-size-base, var(--wy-font-size, 1em))}:where(:host,:host>*,[class^=wy-],[class*=\" wy-\"]) *:before,:where(:host,:host>*,[class^=wy-],[class*=\" wy-\"]) *:after{box-sizing:inherit}:where(:host,:host>*,[class^=wy-],[class*=\" wy-\"]):where(a),:where(:host,:host>*,[class^=wy-],[class*=\" wy-\"]) *:where(a){text-decoration:var(--wy-link-decoration, none);color:var(--wy-link, var(--wy-primary-40, #006399))}:where(:host,:host>*,[class^=wy-],[class*=\" wy-\"]):where(a):hover,:where(:host,:host>*,[class^=wy-],[class*=\" wy-\"]) *:where(a):hover{text-decoration:var(--wy-link-hover-decoration, unset)}:where(:host,:host>*,[class^=wy-],[class*=\" wy-\"]):where(a):where(:not([href]):not([class])),:where(:host,:host>*,[class^=wy-],[class*=\" wy-\"]):where(a):where(:not([href]):not([class])):hover,:where(:host,:host>*,[class^=wy-],[class*=\" wy-\"]) *:where(a):where(:not([href]):not([class])),:where(:host,:host>*,[class^=wy-],[class*=\" wy-\"]) *:where(a):where(:not([href]):not([class])):hover{text-decoration:none}:where(:host,:host>*,[class^=wy-],[class*=\" wy-\"]):where(p),:where(:host,:host>*,[class^=wy-],[class*=\" wy-\"]) *:where(p){margin-top:0;margin-bottom:calc(1 * var(--wy-rem, 1rem))}:where(:host,:host>*,[class^=wy-],[class*=\" wy-\"]):where(label),:where(:host,:host>*,[class^=wy-],[class*=\" wy-\"]) *:where(label){cursor:inherit}:where(:host,:host>*,[class^=wy-],[class*=\" wy-\"])[hidden],:where(:host,:host>*,[class^=wy-],[class*=\" wy-\"]) *[hidden]{display:none!important}:where(:host,:host>*,[class^=wy-],[class*=\" wy-\"]):where([role=button]),:where(:host,:host>*,[class^=wy-],[class*=\" wy-\"]) *:where([role=button]){cursor:pointer}.wy-scroll-y{overflow-y:auto;touch-action:pan-y,pan-x;will-change:scroll-position,opacity;backface-visibility:hidden;max-height:100%;scroll-padding-top:var(--wy-scrollbar-adjust-top, 0);scroll-padding-bottom:var(--wy-scrollbar-adjust-bottom, 0)}.wy-scroll-y:not(body){-webkit-overflow-scrolling:touch}.wy-scroll-y:not(.wy-scroll-x){overflow-x:hidden;touch-action:pan-y}.wy-scroll-x{overflow-x:auto;touch-action:pan-y,pan-x;will-change:scroll-position,opacity;backface-visibility:hidden;max-width:100%}.wy-scroll-x:not(.wy-scroll-y){overflow-y:hidden;touch-action:pan-x}.wy-scrollbars.wy-scroll-y,.wy-scrollbars .wy-scroll-y{scrollbar-width:thin;scrollbar-color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e)) transparent}@supports (overflow-y: overlay){.wy-scrollbars.wy-scroll-y,.wy-scrollbars .wy-scroll-y{overflow-y:overlay}}.wy-scrollbars.wy-scroll-y::-webkit-scrollbar,.wy-scrollbars .wy-scroll-y::-webkit-scrollbar{height:.625rem;width:.625rem;background:transparent;z-index:999}.wy-scrollbars.wy-scroll-y::-webkit-scrollbar-track,.wy-scrollbars .wy-scroll-y::-webkit-scrollbar-track{background:transparent}.wy-scrollbars.wy-scroll-y::-webkit-scrollbar-thumb,.wy-scrollbars .wy-scroll-y::-webkit-scrollbar-thumb{background-color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e));border:.125rem solid transparent;border-radius:.5rem;background-clip:padding-box;opacity:75%}.wy-scrollbars.wy-scroll-y::-webkit-scrollbar-thumb:hover,.wy-scrollbars .wy-scroll-y::-webkit-scrollbar-thumb:hover{background-color:var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce));opacity:75%}.wy-scrollbars.wy-scroll-y::-webkit-scrollbar-thumb:window-inactive,.wy-scrollbars .wy-scroll-y::-webkit-scrollbar-thumb:window-inactive{background-color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e));opacity:50%}.wy-scrollbars.wy-scroll-y::-webkit-scrollbar-button:vertical:start:single-button,.wy-scrollbars .wy-scroll-y::-webkit-scrollbar-button:vertical:start:single-button{height:var(--wy-scrollbar-adjust-top, 0)}.wy-scrollbars.wy-scroll-y::-webkit-scrollbar-button:vertical:end:single-button,.wy-scrollbars .wy-scroll-y::-webkit-scrollbar-button:vertical:end:single-button{height:var(--wy-scrollbar-adjust-bottom, 0)}.wy-block-scroll{overflow:hidden!important}.wy-scrollbar-detection{position:fixed;top:0;left:0;width:8rem;height:8rem;overflow:scroll;z-index:-99999;pointer-events:none;visibility:hidden}.wy-appbars{backface-visibility:hidden;--wy-component-background-color: var(--wy-surface-1, var(--wy-surface-1-light, #f1f2f7));background-color:var(--wy-component-background-color);box-shadow:var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce)) 0 -1px 0 0 inset}@supports (position: sticky){.wy-appbars{position:sticky;top:0;z-index:1020}}@supports (backdrop-filter: blur(calc(.5 * var(--wy-rem, 1rem)))){.wy-appbars{-webkit-backdrop-filter:blur(calc(.5 * var(--wy-rem, 1rem)));backdrop-filter:blur(calc(.5 * var(--wy-rem, 1rem)))}.wy-appbars>.wy-appbar{-webkit-backdrop-filter:none;backdrop-filter:none}}.wy-appbars>.wy-appbar,.wy-appbars>.wy-toolbar{background-color:transparent;box-shadow:none}.wy-appbar{--wy-component-color: var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e));--wy-component-background-color: var(--wy-surface-1, var(--wy-surface-1-light, #f1f2f7));display:grid;align-items:center;justify-content:space-between;justify-items:center;height:var(--wy-appbar-height, calc(3 * var(--wy-rem, 1rem)));padding:calc(.25 * var(--wy-rem, 1rem));flex:0 0 var(--wy-appbar-height, calc(3 * var(--wy-rem, 1rem)));grid-template-columns:minmax(calc(2.5 * var(--wy-rem, 1rem)),max-content) minmax(0,max-content) minmax(calc(2.5 * var(--wy-rem, 1rem)),max-content);column-gap:calc(.5 * var(--wy-rem, 1rem));line-height:var(--wy-line-height-base, );background-color:var(--wy-component-background-color);color:var(--wy-component-color);box-shadow:var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce)) 0 -1px 0 0 inset}.wy-appbar .wy-badge{align-self:center}.wy-appbar .wy-button{max-height:calc(2.5 * var(--wy-rem, 1rem))}.wy-appbar-buttons,.wy-toolbar-buttons{display:flex;flex:0 0 auto;align-items:center}.wy-toolbar-buttons-last{margin-inline-start:auto}.wy-appbar-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%;color:inherit!important;-webkit-user-select:none;user-select:none}.wy-appbar-text a,.wy-appbar-text a:hover{color:inherit}.wy-appbar-text-trashed{text-decoration:line-through}.wy-toolbars-bottom{position:absolute;z-index:1030;bottom:calc(var(--wy-footerbar-height, calc(4 * var(--wy-rem, 1rem))) / 2);left:0;right:0;min-height:var(--wy-appbar-height, calc(3 * var(--wy-rem, 1rem)));display:flex;flex-direction:column;justify-content:center;justify-items:center}.wy-toolbar{--wy-component-color: var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e));--wy-component-background-color: var(--wy-surface-1, var(--wy-surface-1-light, #f1f2f7));display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;justify-items:center;min-height:var(--wy-appbar-height, calc(3 * var(--wy-rem, 1rem)));padding:calc(.25 * var(--wy-rem, 1rem));flex:1 0 var(--wy-appbar-height, calc(3 * var(--wy-rem, 1rem)));column-gap:calc(.25 * var(--wy-rem, 1rem));line-height:var(--wy-line-height-base, );background-color:var(--wy-component-background-color);color:var(--wy-component-color);box-shadow:var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce)) 0 -1px 0 0 inset}.wy-toolbar-center{margin:0 auto;border-radius:var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)))}.wy-toolbar-center .wy-input{text-align:center}.wy-toolbar-text{margin-left:calc(.25 * var(--wy-rem, 1rem))}.wy-footerbars{padding-bottom:var(--wy-footerbar-height, calc(4 * var(--wy-rem, 1rem)))}.wy-footerbars>.wy-toolbar{box-shadow:none}.wy-footerbar{--wy-component-background-color: var(--wy-surface-1, var(--wy-surface-1-light, #f1f2f7));--wy-component-color: var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e));position:absolute;bottom:0;left:0;right:0;z-index:1020}.wy-footerbar:after{content:\"\";background-color:var(--wy-component-background-color);color:var(--wy-component-color);box-shadow:var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce)) 0 1px 0 0 inset;position:absolute;width:100%;left:0;bottom:0;height:100%;z-index:-1;backface-visibility:hidden}@supports (backdrop-filter: blur(calc(.5 * var(--wy-rem, 1rem)))){.wy-footerbar:after{-webkit-backdrop-filter:blur(calc(.5 * var(--wy-rem, 1rem)));backdrop-filter:blur(calc(.5 * var(--wy-rem, 1rem)))}}.wy-footerbar .wy-buttons{flex-direction:row-reverse}.wy-footerbar .wy-buttons>:not(:last-child){margin:0 0 0 calc(.5 * var(--wy-rem, 1rem))}.wy-footerbar-sticky{position:sticky}.wy-footerbars-fixed .wy-footerbar{position:fixed}.wy-footerbars-fixed .wy-footerbar:after{position:fixed;height:var(--wy-footerbar-height, calc(4 * var(--wy-rem, 1rem)))}.wy-avatar{border-radius:50%}.wy-avatar-img{width:var(--wy-component-avatar-size, calc(2 * var(--wy-rem, 1rem)));height:var(--wy-component-avatar-size, calc(2 * var(--wy-rem, 1rem)))}.wy-avatar-initials{background-color:var(--wy-component-avatar-background-color, var(--wy-primary, var(--wy-primary-40, #006399)));color:var(--wy-component-avatar-color, var(--wy-on-primary, var(--wy-white, #ffffff)));width:var(--wy-component-avatar-size, calc(2 * var(--wy-rem, 1rem)));height:var(--wy-component-avatar-size, calc(2 * var(--wy-rem, 1rem)));display:flex;align-items:center;align-content:center;justify-content:center;justify-items:center;font-size:calc(var(--wy-component-avatar-size, calc(2 * var(--wy-rem, 1rem))))}.wy-avatar-initials>span{font-size:max(8px,var(--wy-avatar-font-size, .382em));font-weight:var(--wy-avatar-font-weight, 600);line-height:1}.wy-avatar-header{padding:calc(1.5 * var(--wy-rem, 1rem));margin-left:auto;margin-right:auto;text-align:center;display:flex;flex-direction:column;justify-content:center;align-items:center}.wy-avatar-presence{position:relative;display:flex}.wy-avatar-group{position:relative;display:inline-flex;flex-shrink:0;width:var(--wy-component-avatar-size, calc(2 * var(--wy-rem, 1rem)));height:var(--wy-component-avatar-size, calc(2 * var(--wy-rem, 1rem)))}.wy-avatar-group wy-avatar:first-child{position:absolute;top:0;left:0;display:unset;-webkit-mask-image:radial-gradient(at bottom right,rgba(0,0,0,0) calc(35% + .125 * var(--wy-rem, 1rem)),rgb(0,0,0) calc(35% + .1875 * var(--wy-rem, 1rem)));mask-image:radial-gradient(at bottom right,#0000 calc(35% + .125 * var(--wy-rem, 1rem)),#000 calc(35% + .1875 * var(--wy-rem, 1rem)))}.wy-avatar-group wy-avatar:last-child{position:absolute;bottom:0;right:0;display:unset}.wy-presence{background-color:var(--wy-component-background-color, transparent);width:calc(.75 * var(--wy-rem, 1rem));height:calc(.75 * var(--wy-rem, 1rem));border-radius:50%;position:absolute;bottom:0;right:-5%;box-sizing:border-box}.wy-presence:not(.wy-presence-active){display:none}.wy-presence:after{content:\"\";position:absolute;width:100%;height:100%;top:0;left:0;border-radius:inherit;background-color:var(--wy-presence-active, var(--wy-green-light, #00a38b));background-clip:content-box;padding:calc(.125 * var(--wy-rem, 1rem));box-sizing:border-box}.wy-presence-away:after{background-color:var(--wy-presence-away, var(, ))}.wy-presence-in-text{position:absolute;top:calc(.375 * var(--wy-rem, 1rem));left:calc(.25 * var(--wy-rem, 1rem));bottom:auto;right:auto}.wy-button{--wy-component-color: var(--wy-primary, var(--wy-primary-40, #006399));color:var(--wy-component-color);background:var(--wy-component-background-color, transparent);padding:var(--wy-btn-padding-y, .5em) var(--wy-btn-padding-x, 1.5em);font-family:var(--wy-btn-font-family, var(--wy-font-family, unset)),inherit;font-size:var(--wy-btn-font-size, var(--wy-font-size-base, 1em));font-weight:var(--wy-btn-font-weight, 400);line-height:var(--wy-btn-line-height, var(--wy-line-height, 1.5));text-align:center;text-decoration:none;vertical-align:middle;cursor:pointer;-webkit-user-select:none;user-select:none;border:var(--wy-btn-border-width, 0) solid var(--wy-btn-border-color, transparent);border-radius:var(--wy-btn-border-radius, 1.25em);display:inline-flex;align-items:center;justify-content:center;gap:calc(.25 * var(--wy-rem, 1rem));position:relative}.wy-button:not(.wy-button-link,:disabled)>*{z-index:3}.wy-button:not(.wy-button-link,:disabled):before{content:\"\";z-index:2;position:absolute;top:0;left:0;width:100%;height:100%;border-radius:inherit;background:var(--wy-component-color);opacity:0%}.wy-button:not(.wy-button-link,:disabled):hover:before{opacity:8%}.wy-button:not(.wy-button-link,:disabled):focus:before,.wy-button:not(.wy-button-link,:disabled):active:before,.wy-button:not(.wy-button-link,:disabled).wy-active:before{opacity:12%}.wy-button:disabled{opacity:var(--wy-opacity-disabled, 38%);cursor:unset;pointer-events:none}.wy-button-icon{--wy-component-color: var(--wy-on-surface-variant, var(--wy-neutral-variant-30, #42474e));width:calc(2.5 * var(--wy-rem, 1rem));height:calc(2.5 * var(--wy-rem, 1rem));padding:calc(.5 * var(--wy-rem, 1rem));line-height:1;border-radius:var(--wy-border-radius-pill, calc(50 * var(--wy-rem, 1rem)));border-width:0;align-items:center;justify-content:center}.wy-button-icon.wy-active{--wy-component-color: var(--wy-primary, var(--wy-primary-40, #006399))}.wy-button-icon-inline{background:var(--wy-component-background-color);color:currentColor;border-radius:var(--wy-border-radius-pill, calc(50 * var(--wy-rem, 1rem)));display:flex;width:auto;background-clip:content-box}.wy-button-inline{border-radius:var(--wy-border-radius-pill, calc(50 * var(--wy-rem, 1rem)));padding:calc(.5 * var(--wy-rem, 1rem)) calc(.75 * var(--wy-rem, 1rem))}.wy-button-primary{--wy-component-background-color: var(--wy-primary, var(--wy-primary-40, #006399));--wy-component-color: var(--wy-on-primary, var(--wy-white, #ffffff))}.wy-button-variant{--wy-component-background-color: var(--wy-surface-variant, var(--wy-neutral-variant-90, #dee3eb));--wy-component-color: var(--wy-on-surface-variant, var(--wy-neutral-variant-30, #42474e))}.wy-button-primary-text{--wy-component-color: var(--wy-primary, var(--wy-primary-40, #006399))}.wy-button-link{padding:0;color:var(--wy-link-color, var(--wy-primary, var(--wy-primary-40, #006399)));text-decoration:var(--wy-link-decoration, none)}.wy-button-link:hover,.wy-button-link:focus{text-decoration:var(--wy-link-hover-decoration, unset)}.wy-buttons{display:flex;align-items:center;flex-wrap:wrap;gap:calc(.5 * var(--wy-rem, 1rem))}.wy-code pre,.wy-content pre{text-wrap:pretty}.wy-code code[class*=language-],.wy-code pre[class*=language-],.wy-content code[class*=language-],.wy-content pre[class*=language-]{color:var(--wy-code-text, var(--wy-code-text-light, #3b3b3b));font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;text-align:left;white-space:pre-wrap;word-spacing:normal;word-break:normal;word-wrap:break-word;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}@media print{.wy-code code[class*=language-],.wy-code pre[class*=language-],.wy-content code[class*=language-],.wy-content pre[class*=language-]{text-shadow:none}}.wy-code pre[class*=language-],.wy-content pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}.wy-code :not(pre)>code[class*=language-],.wy-code pre[class*=language-],.wy-content :not(pre)>code[class*=language-],.wy-content pre[class*=language-]{color:var(--wy-code-text, var(--wy-code-text-light, #3b3b3b));background:var(--wy-background, var(--wy-neutral-99, #fcfcff))}.wy-code :not(pre)>code[class*=language-],.wy-content :not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.wy-code .token.variable,.wy-content .token.variable{color:var(--wy-code-variable, var(--wy-code-variable-light, #001080))}.wy-code .token.operator,.wy-content .token.operator{color:var(--wy-code-operator, var(--wy-code-operator-light, #000000))}.wy-code .token.prolog,.wy-content .token.prolog{color:var(--wy-code-prolog, var(--wy-code-prolog-light, #000080))}.wy-code .token.comment,.wy-content .token.comment{color:var(--wy-code-comment, var(--wy-code-comment-light, #008000))}.wy-code .token.builtin,.wy-content .token.builtin{color:var(--wy-code-builtin, var(--wy-code-builtin-light, #0070C1))}.wy-code .token.number,.wy-content .token.number{color:var(--wy-code-number, var(--wy-code-number-light, #098658))}.wy-code .token.inserted,.wy-content .token.inserted{color:var(--wy-code-inserted, var(--wy-code-inserted-light, #098658))}.wy-code .token.constant,.wy-content .token.constant{color:var(--wy-code-constant, var(--wy-code-constant-light, #811F3F))}.wy-code .token.hexcode,.wy-content .token.hexcode{color:var(--wy-code-hexcode, var(--wy-code-hexcode-light, #811F3F))}.wy-code .token.regex,.wy-content .token.regex{color:var(--wy-code-regex, var(--wy-code-regex-light, #811F3F))}.wy-code .token.char,.wy-content .token.char{color:var(--wy-code-char, var(--wy-code-char-light, #811F3F))}.wy-code .token.tag,.wy-content .token.tag{color:var(--wy-code-tag, var(--wy-code-tag-light, #800000))}.wy-code .token.attr-name,.wy-content .token.attr-name{color:var(--wy-code-attr-name, var(--wy-code-attr-name-light, #E50000))}.wy-code .token.selector,.wy-content .token.selector{color:var(--wy-code-selector, var(--wy-code-selector-light, #E50000))}.wy-code .token.property,.wy-content .token.property{color:var(--wy-code-property, var(--wy-code-property-light, #E50000))}.wy-code .token.deleted,.wy-content .token.deleted{color:var(--wy-code-deleted, var(--wy-code-deleted-light, #A31515))}.wy-code .token.string,.wy-content .token.string{color:var(--wy-code-string, var(--wy-code-string-light, #A31515))}.wy-code .token.changed,.wy-content .token.changed{color:var(--wy-code-changed, var(--wy-code-changed-light, #0451A5))}.wy-code .token.punctuation,.wy-content .token.punctuation{color:var(--wy-code-punctuation, var(--wy-code-punctuation-light, #000000))}.wy-code .token.function,.wy-content .token.function{color:var(--wy-code-function, var(--wy-code-function-light, #0000FF))}.wy-code .token.keyword,.wy-content .token.keyword{color:var(--wy-code-keyword, var(--wy-code-keyword-light, #AF00DB))}.wy-code .token.class-name,.wy-content .token.class-name{color:var(--wy-code-class-name, var(--wy-code-class-name-light, #267F99))}.wy-code .token.important,.wy-code .token.bold,.wy-content .token.important,.wy-content .token.bold{font-weight:700}.wy-code .token.italic,.wy-content .token.italic{font-style:italic}.wy-content{overflow-wrap:break-word;min-width:0}.wy-content :not(pre)>code{overflow-wrap:inherit}.wy-content pre,.wy-content pre>code[class*=language-]{white-space:pre-wrap}.wy-content :last-child{margin-bottom:0}.wy-content:empty{display:none}.wy-hashtag{color:var(--wy-primary, var(--wy-primary-40, #006399))}.wy-mention{font-weight:500}.wy-dropdown,.wy-dropup{position:relative}.wy-dropdown-toggle{white-space:nowrap}.wy-dropdown-menu{--wy-component-background-color: var(--wy-surface-2, var(--wy-surface-2-light, #eaedf3));--wy-component-color: var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e));background-color:var(--wy-component-background-color);color:var(--wy-component-color);position:absolute;z-index:1000;min-width:calc(10 * var(--wy-rem, 1rem));padding:0;margin:0;font-size:var(--wy-font-size-base, var(--wy-font-size, 1em));text-align:left;list-style:none;background-clip:padding-box;border-radius:var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)));box-shadow:var(--wy-shadow-level1, 0 calc(.125 * var(--wy-rem, 1rem)) calc(.125 * var(--wy-rem, 1rem)) 0 rgba(0, 0, 0, .14), 0 calc(.1875 * var(--wy-rem, 1rem)) calc(.0625 * var(--wy-rem, 1rem)) calc(-.125 * var(--wy-rem, 1rem)) rgba(0, 0, 0, .2), 0 calc(.0625 * var(--wy-rem, 1rem)) calc(.3125 * var(--wy-rem, 1rem)) 0 rgba(0, 0, 0, .12));overflow:hidden;display:block}.wy-dropdown-menu[data-bs-popper]{top:100%;left:0;margin-top:calc(.25 * var(--wy-rem, 1rem))}.wy-dropup .wy-dropdown-menu{top:auto;bottom:100%;margin-top:0;margin-bottom:0}[data-bs-toggle=dropdown]~.wy-dropdown-menu:not(.show){display:none}[data-bs-toggle=dropdown]~.wy-dropdown-menu[hidden].show{display:block!important}.wy-dropdown-menu-end{right:0}.wy-dropdown-item{background-color:transparent;color:var(--wy-component-color, var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e)));display:block;width:100%;padding:calc(.75 * var(--wy-rem, 1rem)) calc(1 * var(--wy-rem, 1rem));clear:both;font-family:var(--wy-font-family, unset),inherit;font-size:inherit;font-weight:400;line-height:1;text-align:inherit;text-decoration:none;white-space:nowrap;border:0;gap:calc(.25 * var(--wy-rem, 1rem));cursor:pointer;display:flex;align-items:center}.wy-dropdown-item:hover,.wy-dropdown-item:focus{--wy-component-color: var(--wy-on-surface-variant, var(--wy-neutral-variant-30, #42474e));--wy-component-background-color: var(--wy-surface-variant, var(--wy-neutral-variant-90, #dee3eb));color:var(--wy-component-color);background-color:var(--wy-component-background-color);text-decoration:none}.wy-dropdown-item.wy-active,.wy-dropdown-item:active{--wy-component-color: var(--wy-on-primary-container, var(--wy-primary-10, #001d32));--wy-component-background-color: var(--wy-primary-container, var(--wy-primary-90, #cde5ff));color:var(--wy-component-color);background-color:var(--wy-component-background-color);text-decoration:none}.wy-dropdown-item.wy-disabled,.wy-dropdown-item:disabled{color:var(--wy-component-color);background-color:var(--wy-component-background-color);pointer-events:none;opacity:var(--wy-opacity-disabled, 38%)}.wy-dropdown-item>img,.wy-dropdown-item>wy-icon{margin-right:calc(.5 * var(--wy-rem, 1rem))}.wy-dropdown-item>img,.wy-dropdown-item>img .wy-icon,.wy-dropdown-item>wy-icon,.wy-dropdown-item>wy-icon .wy-icon{color:inherit}.wy-dropdown-item:active>wy-icon,.wy-dropdown-item:active>wy-icon .wy-icon{color:inherit}.wy-dropdown-item.wy-option wy-icon{visibility:hidden}.wy-dropdown-item.wy-option.wy-selected wy-icon{visibility:visible}.wy-dropdown-divider{height:0;margin:0;overflow:hidden;border:none;border-top:1px solid var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce))}.wy-emoji{font-size:1.25em;width:1em;height:1em;vertical-align:-.125em;line-height:1;display:inline-flex;justify-content:center;align-items:center}img.wy-emoji,svg.wy-emoji{vertical-align:-.25em}.wy-empty{display:flex;align-items:center;justify-content:center;flex:1;min-width:0;position:relative}.wy-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;position:relative;width:var(--wy-component-icon-width);height:var(--wy-component-icon-height)}.wy-icon:not([width]),.wy-icon[width=\"24\"]{width:var(--wy-component-icon-width, calc(1.5 * var(--wy-rem, 1rem)))}.wy-icon:not([height]),.wy-icon[height=\"24\"]{height:var(--wy-component-icon-height, calc(1.5 * var(--wy-rem, 1rem)))}.wy-icon-first{margin-left:calc(-.5 * var(--wy-rem, 1rem))}.wy-icon-last{margin-right:calc(-.5 * var(--wy-rem, 1rem))}.wy-icon-padded{margin:16.66666667%}.wy-icon-inline{vertical-align:-.25em}.wy-icon-overlay{position:absolute;bottom:0;right:0;background:var(--wy-component-background-color, var(--wy-background, var(--wy-neutral-99, #fcfcff)));border-radius:50%;border:1px solid var(--wy-component-background-color, var(--wy-background, var(--wy-neutral-99, #fcfcff)))}.wy-icon-stack{display:inline-flex;position:relative;line-height:1}.wy-icon-stack .wy-icon:last-child,.wy-icon-stack>svg:last-child{position:absolute;bottom:0;right:0;background-color:var(--wy-component-background-color, var(--wy-background, var(--wy-neutral-99, #fcfcff)));border-radius:50%;width:calc(var(--wy-component-icon-width) / 2);height:calc(var(--wy-component-icon-height) / 2)}.wy-icon-active-stack{display:inline-flex;position:relative;line-height:1}.wy-icon-active-stack .wy-icon-stack-item{transition:opacity var(--wy-transition, var(--wy-transition-duration, .2s) var(--wy-transition-curve, cubic-bezier(.4, 0, .2, 1)));align-self:center;justify-self:center;margin:auto}.wy-icon-active-stack .wy-icon-stack-item:last-child{position:absolute;opacity:0}.wy-icon-active-stack.wy-active .wy-icon-stack-item:first-child,.wy-active .wy-icon-active-stack .wy-icon-stack-item:first-child{opacity:0}.wy-icon-active-stack.wy-active .wy-icon-stack-item:last-child,.wy-active .wy-icon-active-stack .wy-icon-stack-item:last-child{opacity:1}.wy-icon:not([class*=wy-icon-color-]):not([class*=wy-kind-]):not([data-icon=progress]) *{fill:currentColor}.wy-content-icon{color:var(--wy-component-color, var(--wy-on-surface-variant, var(--wy-neutral-variant-30, #42474e)));border-radius:var(--wy-component-border-radius, var(--wy-border-radius-lg, calc(1.5 * var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem))))));display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:calc(1 * var(--wy-rem, 1rem)) calc(2 * var(--wy-rem, 1rem));margin:auto}.wy-content-icon>.wy-icon-stack,.wy-content-icon>.wy-icon,.wy-content-icon>wy-icon,.wy-content-icon ::slotted(.wy-icon-stack),.wy-content-icon ::slotted(.wy-icon),.wy-content-icon ::slotted(wy-icon){--wy-component-icon-width: calc(4 * var(--wy-rem, 1rem));--wy-component-icon-height: calc(4 * var(--wy-rem, 1rem))}.wy-content-name,.wy-content-meta{padding:calc(1 * var(--wy-rem, 1rem)) calc(2 * var(--wy-rem, 1rem));text-align:center}.wy-icon-color-theme *,.wy-icon-color-theme * *{fill:var(--wy-theme, var(, ))}.wy-icon-color-primary *,.wy-icon-color-primary * *{fill:var(--wy-primary, var(--wy-primary-40, #006399))}.wy-icon-color-secondary *,.wy-icon-color-secondary * *{fill:var(--wy-secondary, var(--wy-secondary-40, #3b6a1c))}.wy-icon-color-tertiary *,.wy-icon-color-tertiary * *{fill:var(--wy-tertiary, var(--wy-tertiary-40, #3b6a1c))}.wy-icon-color-surface *,.wy-icon-color-surface * *{fill:var(--wy-surface, var(--wy-neutral-99, #fcfcff))}.wy-icon-color-surface-variant *,.wy-icon-color-surface-variant * *{fill:var(--wy-surface-variant, var(--wy-neutral-variant-90, #dee3eb))}.wy-icon-color-error *,.wy-icon-color-error * *{fill:var(--wy-error, var(--wy-error-40, #ba1824))}.wy-icon-color-warning *,.wy-icon-color-warning * *{fill:var(--wy-warning, var(--wy-warning-70, #afb140))}.wy-icon-color-blue *,.wy-icon-color-blue * *{fill:var(--wy-blue, var(--wy-blue-light, #89a9fc))}.wy-icon-color-indigo *,.wy-icon-color-indigo * *{fill:var(--wy-indigo, var(--wy-indigo-light, #9185de))}.wy-icon-color-purple *,.wy-icon-color-purple * *{fill:var(--wy-purple, var(--wy-purple-light, #c675b7))}.wy-icon-color-pink *,.wy-icon-color-pink * *{fill:var(--wy-pink, var(--wy-pink-light, #d57194))}.wy-icon-color-red *,.wy-icon-color-red * *{fill:var(--wy-red, var(--wy-red-light, #db726c))}.wy-icon-color-orange *,.wy-icon-color-orange * *{fill:var(--wy-orange, var(--wy-orange-light, #e89a3a))}.wy-icon-color-yellow *,.wy-icon-color-yellow * *{fill:var(--wy-yellow, var(--wy-yellow-light, #afb140))}.wy-icon-color-green *,.wy-icon-color-green * *{fill:var(--wy-green, var(--wy-green-light, #00a38b))}.wy-icon-color-teal *,.wy-icon-color-teal * *{fill:var(--wy-teal, var(--wy-teal-light, #00a0a8))}.wy-icon-color-cyan *,.wy-icon-color-cyan * *{fill:var(--wy-cyan, var(--wy-cyan-light, #0082a1))}.wy-icon-color-gray *,.wy-icon-color-gray * *{fill:var(--wy-gray, var(--wy-gray-light, #76777a))}.wy-icon-color-black *,.wy-icon-color-black * *{fill:var(--wy-black, var(, ))}.wy-icon-color-white *,.wy-icon-color-white * *{fill:var(--wy-white, var(, ))}[class*=wy-kind-],[class*=wy-kind-] *{fill:var(--wy-gray, var(--wy-gray-light, #76777a))}.wy-kind-archive{fill:var(--wy-orange, var(--wy-orange-light, #e89a3a))}.wy-kind-audio *{fill:var(--wy-teal, var(--wy-teal-light, #00a0a8))}.wy-kind-code *{fill:var(--wy-green, var(--wy-green-light, #00a38b))}.wy-kind-document *{fill:var(--wy-blue, var(--wy-blue-light, #89a9fc))}.wy-kind-email *{fill:var(--wy-red, var(--wy-red-light, #db726c))}.wy-kind-presentation *{fill:var(--wy-orange, var(--wy-orange-light, #e89a3a))}.wy-kind-spreadsheet *{fill:var(--wy-green, var(--wy-green-light, #00a38b))}.wy-kind-image *{fill:var(--wy-pink, var(--wy-pink-light, #d57194))}.wy-kind-text *{fill:var(--wy-cyan, var(--wy-cyan-light, #0082a1))}.wy-kind-video *{fill:var(--wy-purple, var(--wy-purple-light, #c675b7))}.wy-ext-pdf *{fill:var(--wy-red, var(--wy-red-light, #db726c))}.wy-kind-text-icon{width:calc(1.25 * var(--wy-rem, 1rem));height:calc(1.25 * var(--wy-rem, 1rem));vertical-align:calc(-.3125 * var(--wy-rem, 1rem))}[data-icon=progress].wy-icon-primary{color:var(--wy-primary, var(--wy-primary-40, #006399))}[data-icon=progress] :first-child{fill:none;stroke:var(--wy-surface-variant, var(--wy-neutral-variant-90, #dee3eb))}[data-icon=progress] :last-child{fill:none;stroke:currentColor}.wy-image-grid{display:flex;flex-wrap:wrap;justify-content:space-evenly;position:relative;border-radius:var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)));overflow:hidden;column-gap:1px;row-gap:1px}.wy-image-grid .wy-image{padding:0;width:50%;position:relative;flex:auto;background-color:inherit;background-clip:content-box}.wy-image-grid .wy-image:first-of-type:not(:nth-last-of-type(2)){flex-basis:100%!important}.wy-image-grid .wy-image-area{display:block;height:100%;cursor:pointer}.wy-image-grid .wy-image-area img{position:absolute;height:100%;width:100%;object-fit:contain}.wy-image-grid .wy-more{position:absolute;line-height:100%;color:var(--wy-white, var(, ));top:0;left:0;bottom:0;right:0;display:flex;align-items:center;justify-content:center;font-size:calc(1.5 * var(--wy-rem, 1rem));background:rgba(0,0,0,var(--wy-opacity-disabled, 38%))}.wy-title{font-style:var(--wy-headings-font-style, unset);font-weight:var(--wy-headings-font-weight, 500);line-height:var(--wy-headings-line-height, var(--wy-line-height, 1.5));margin-top:.5em;margin-bottom:.5em;font-weight:400;font-size:2.5em;line-height:3em}.wy-headline{font-style:var(--wy-headings-font-style, unset);font-weight:var(--wy-headings-font-weight, 500);line-height:var(--wy-headings-line-height, var(--wy-line-height, 1.5));margin-top:.5em;margin-bottom:.5em;font-weight:400;font-size:1.5em;line-height:2em}.wy-label{font-style:var(--wy-headings-font-style, unset);font-weight:var(--wy-headings-font-weight, 500);line-height:var(--wy-headings-line-height, var(--wy-line-height, 1.5));margin-top:0;margin-bottom:0;font-weight:500;font-size:1em;line-height:1.5em}.wy-input{--wy-component-background-color: var(--wy-background, var(--wy-neutral-99, #fcfcff));--wy-component-color: var(--wy-on-background, var(--wy-neutral-10, #1a1c1e));background-color:var(--wy-component-background-color);color:var(--wy-component-color);border:var(--wy-input-border-width, 1px) solid var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce));display:block;width:100%;min-height:calc(2.5 * var(--wy-rem, 1rem));padding:var(--wy-input-padding-y, calc(.4375 * var(--wy-rem, 1rem))) var(--wy-input-padding-x, calc(.75 * var(--wy-rem, 1rem)));font-family:var(--wy-input-font-family, var(--wy-font-family, inherit)),inherit;font-size:var(--wy-input-font-size, var(--wy-font-size-base, 1em));font-weight:var(--wy-input-font-weight, var(--wy-font-weight, unset));line-height:var(--wy-input-line-height, var(--wy-line-height, calc(1.5 * var(--wy-rem, 1rem))));background-clip:padding-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--wy-input-border-radius, var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem))))}.wy-input:focus{--wy-component-color: var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e));color:var(--wy-component-color);border-color:var(--wy-primary, var(--wy-primary-40, #006399));outline:0}.wy-input::placeholder{color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e));opacity:1}.wy-input:disabled{opacity:38%}.wy-input::file-selector-button,.wy-input::-webkit-file-upload-button{color:var(--wy-component-color);background-color:var(--wy-component-background-color);padding:var(--wy-input-padding-y, calc(.4375 * var(--wy-rem, 1rem))) var(--wy-input-padding-x, calc(.75 * var(--wy-rem, 1rem)));margin:calc(-1 * var(--wy-input-padding-y, calc(.4375 * var(--wy-rem, 1rem)))) calc(-1 * var(--wy-input-padding-x, calc(.75 * var(--wy-rem, 1rem))));margin-inline-end:var(--wy-input-padding-x, calc(.75 * var(--wy-rem, 1rem)));pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:var(--wy-input-border-width, 1px);border-radius:0}.wy-input:hover:not(:disabled):not([readonly])::file-selector-button,.wy-input:hover:not(:disabled):not([readonly]) ::-webkit-file-upload-button{background-color:var(--wy-component-background-color)}.wy-input[type=file]{overflow:hidden}.wy-input[type=file]:not(:disabled):not([readonly]){cursor:pointer}.wy-input::-webkit-date-and-time-value{height:calc(var(--wy-input-line-height, var(--wy-line-height, calc(1.5 * var(--wy-rem, 1rem)))) * 1em)}.wy-input[type=search]::-webkit-search-cancel-button{-webkit-appearance:none}.wy-input-filled{--wy-component-background-color: var(--wy-surface-2, var(--wy-surface-2-light, #eaedf3));--wy-component-color: var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e));background-color:var(--wy-component-background-color);color:var(--wy-component-color);border-radius:calc(1.25 * var(--wy-rem, 1rem));border-color:var(--wy-component-background-color)}.wy-input-filled:focus{border-color:var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce))}.wy-input-label{font-style:var(--wy-headings-font-style, unset);font-weight:var(--wy-headings-font-weight, 500);line-height:var(--wy-headings-line-height, var(--wy-line-height, 1.5));margin-top:0;margin-bottom:0;font-weight:500;font-size:1em;line-height:1.5em;display:block;margin-bottom:calc(.5 * var(--wy-rem, 1rem))}.wy-description{margin-top:calc(.25 * var(--wy-rem, 1rem));font-size:var(--wy-font-size-sm, calc(.875 * var(--wy-font-size-base, 1em)))}.wy-is-invalid,.wy-is-invalid:focus{border-color:var(--wy-error, var(--wy-error-40, #ba1824))}.wy-invalid-feedback{margin-top:calc(.25 * var(--wy-rem, 1rem));font-size:var(--wy-font-size-sm, calc(.875 * var(--wy-font-size-base, 1em)));color:var(--wy-error, var(--wy-error-40, #ba1824))}.wy-input-group{position:relative}.wy-input-group>wy-icon{position:absolute;top:0;left:0;z-index:4}.wy-input-group>wy-icon+.wy-input{padding-left:calc(2.5 * var(--wy-rem, 1rem))}.wy-input-group-button-icon{position:absolute;top:0;right:0;z-index:4;border-radius:var(--wy-input-border-radius, var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem))))}.wy-input-group-input-filled~.wy-button-icon{border-radius:calc(1.25 * var(--wy-rem, 1rem))}.wy-input-group-input{padding-right:calc(2.5 * var(--wy-rem, 1rem))}.wy-input-group-input:placeholder-shown~.wy-input-group-button-icon[type=reset]{display:none}.wy-input-group-input:not(:placeholder-shown)~.wy-input-group-button-icon[type=reset]+.wy-input-group-button-icon{display:none}.wy-item{position:relative;display:flex;align-items:center;gap:calc(.5 * var(--wy-rem, 1rem));padding:calc(.25 * var(--wy-rem, 1rem)) calc(.75 * var(--wy-rem, 1rem));text-decoration:none;min-height:calc(3 * var(--wy-rem, 1rem))}.wy-item>.wy-avatar,.wy-item>wy-icon,.wy-item>wy-spinner,.wy-item>.wy-icon-stack{margin-left:calc(-.25 * var(--wy-rem, 1rem))}.wy-item-body{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wy-item-body>*{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wy-item-body+.wy-dropdown,.wy-item-body+.wy-button-icon,.wy-item-body+.wy-item-actions{margin-right:calc(-.5 * var(--wy-rem, 1rem))}.wy-item-body+.wy-emoji{margin-right:calc(.125 * var(--wy-rem, 1rem))}.wy-item-title{color:var(--wy-on-background, var(--wy-neutral-10, #1a1c1e));font-weight:var(--wy-headings-font-weight, 500);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wy-item-text{color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--wy-font-size-sm, calc(.875 * var(--wy-font-size-base, 1em)))}.wy-item-text .wy-icon{width:calc(1.25 * var(--wy-rem, 1rem));height:calc(1.25 * var(--wy-rem, 1rem));vertical-align:calc(-.3125 * var(--wy-rem, 1rem))}.wy-item-actions{--wy-component-background-color: transparent;display:flex;align-items:center;flex:0 0 auto}.wy-item-actions-top{position:absolute;top:calc(.25 * var(--wy-rem, 1rem));right:calc(.25 * var(--wy-rem, 1rem));margin:0!important}.wy-item-actions-bottom{position:absolute;bottom:calc(.25 * var(--wy-rem, 1rem));right:calc(.25 * var(--wy-rem, 1rem));margin:0!important}.wy-item-body:has(+.wy-item-actions-bottom) .wy-item-row:last-child{margin-right:calc(4.5 * var(--wy-rem, 1rem))}.wy-item-body:has(+.wy-item-actions-top) .wy-item-row:first-child{margin-right:calc(2 * var(--wy-rem, 1rem))}.wy-action-label{margin-right:calc(.5 * var(--wy-rem, 1rem));font-style:italic}.wy-item-row{display:flex;align-items:baseline}.wy-item-row:first-child{margin-bottom:calc(.125 * var(--wy-rem, 1rem))}.wy-item-row .wy-item-title,.wy-item-row .wy-item-text{margin-right:auto}.wy-item-row .wy-meta{margin:0 calc(.25 * var(--wy-rem, 1rem));white-space:nowrap}.wy-item-hover{-webkit-user-select:none;user-select:none;cursor:pointer}.wy-item-hover:hover,.wy-item-hover:focus{--wy-component-background-color: var(--wy-surface-2, var(--wy-surface-2-light, #eaedf3));--wy-component-color: var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e));background-color:var(--wy-component-background-color);color:var(--wy-component-color);text-decoration:none}.wy-item-hover:active{--wy-component-background-color: var(--wy-surface-variant, var(--wy-neutral-variant-90, #dee3eb));--wy-component-color: var(--wy-on-surface-variant, var(--wy-neutral-variant-30, #42474e));background-color:var(--wy-component-background-color);color:var(--wy-component-color)}.wy-item-hover.wy-disabled,.wy-item-hover:disabled{opacity:var(--wy-opacity-disabled, 38%);pointer-events:none}.wy-item-hover.wy-active{--wy-component-background-color: var(--wy-primary-container, var(--wy-primary-90, #cde5ff));--wy-component-color: var(--wy-on-primary-container, var(--wy-primary-10, #001d32));background-color:var(--wy-component-background-color);color:var(--wy-component-color);border-color:var(--wy-component-background-color)}.wy-item-trashed{text-decoration:line-through;opacity:var(--wy-opacity-disabled, 38%)}.wy-item-trashed.wy-item-hover:hover{opacity:1}.wy-item-lg{padding:calc(.75 * var(--wy-rem, 1rem));min-height:calc(4.5 * var(--wy-rem, 1rem));gap:calc(.75 * var(--wy-rem, 1rem))}.wy-item-lg>.wy-avatar,.wy-item-lg>wy-icon,.wy-item-lg>.wy-icon-stack{margin-left:0}.wy-list{border-radius:var(--wy-border-radius-sm, calc(.75 * var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)))));display:flex;flex-direction:column;gap:1px;min-width:0}.wy-list .wy-item:not(.wy-item-hover){--wy-component-background-color: var(--wy-background, var(--wy-neutral-99, #fcfcff));--wy-component-color: var(--wy-on-background, var(--wy-neutral-10, #1a1c1e));background-color:var(--wy-component-background-color);color:var(--wy-component-color)}.wy-list .wy-item:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.wy-list .wy-item:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.wy-list-bordered{border:1px solid var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce));gap:0}.wy-list-bordered .wy-item{border-top:1px solid var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce));border-left:none;border-right:none}.wy-list-bordered .wy-item:first-child{border-top:none}.wy-list-bordered .wy-item:last-child{border-bottom:none}.wy-list-bordered .wy-item+.wy-list-bordered .wy-item{border-top-width:0}.wy-messages{padding:calc(1 * var(--wy-rem, 1rem)) calc(1 * var(--wy-rem, 1rem)) calc(1 * var(--wy-rem, 1rem)) calc(.75 * var(--wy-rem, 1rem));flex:1 1 100%}.wy-message-placeholder{opacity:.5}.wy-date-separator{font-size:var(--wy-font-size-xs, calc(.75 * var(--wy-font-size-base, 1em)));pointer-events:none;margin:calc(.5 * var(--wy-rem, 1rem));text-align:center;position:sticky;top:calc(1.5 * var(--wy-rem, 1rem));z-index:10}.wy-date-separator time{background:var(--wy-surface-3, var(--wy-surface-3-light, #e3e7ee));color:var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e));padding:calc(.25 * var(--wy-rem, 1rem)) calc(.5 * var(--wy-rem, 1rem));border-radius:var(--wy-border-radius-sm, calc(.75 * var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)))));display:inline-block}.wy-appbars+.wy-pane-body .wy-date-separator{top:calc(var(--wy-appbar-height, calc(3 * var(--wy-rem, 1rem))) + 1.5 * var(--wy-rem, 1rem))}.wy-message{display:flex;flex-direction:row;align-items:flex-start;margin-bottom:calc(1 * var(--wy-rem, 1rem))}.wy-message .wy-image-grid,.wy-message .wy-attachments{border-radius:var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)))}.wy-message-meta{font-size:var(--wy-font-size-xs, calc(.75 * var(--wy-font-size-base, 1em)));margin:0 0 calc(.25 * var(--wy-rem, 1rem)) calc(.25 * var(--wy-rem, 1rem));color:var(--wy-on-surface-variant, var(--wy-neutral-variant-30, #42474e))}.wy-message-bubble{--wy-component-background-color: var(--wy-surface-variant, var(--wy-neutral-variant-90, #dee3eb));--wy-component-color: var(--wy-on-surface-variant, var(--wy-neutral-variant-30, #42474e));background-color:var(--wy-component-background-color);color:var(--wy-component-color);border-radius:calc(var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem))) + .5 * var(--wy-rem, 1rem));display:flex;flex-direction:column;padding:calc(.75 * var(--wy-rem, 1rem));gap:calc(.75 * var(--wy-rem, 1rem));max-width:min(32 * var(--wy-rem, 1rem),100% - 2 * var(--wy-rem, 1rem))}.wy-message-bubble>div{flex:1 1 100%}.wy-message-bubble .wy-likes,.wy-message-bubble .wy-reactions-line{position:relative;height:0;min-height:0;max-height:0;margin:0 calc(-.75 * var(--wy-rem, 1rem)) calc(-.75 * var(--wy-rem, 1rem));flex:0 0 0}.wy-message-bubble .wy-like-count{background:var(--wy-component-background-color);border-radius:var(--wy-border-radius-pill, calc(50 * var(--wy-rem, 1rem)));color:currentColor}.wy-message-bubble .wy-reactions-line,.wy-message-bubble wy-reactions{display:flex;flex-direction:row-reverse;justify-content:flex-end}.wy-message-author{margin:calc(1.375 * var(--wy-rem, 1rem)) calc(.5 * var(--wy-rem, 1rem)) 0 0}.wy-message-content{display:flex;flex-direction:column;width:100%;align-items:flex-start;flex-wrap:wrap;min-width:0;position:relative}.wy-message-content-row{display:flex;flex-direction:row;align-items:center;max-width:100%}.wy-message-bot .wy-message-bubble{--wy-component-background-color: var(--wy-tertiary-container, var(--wy-tertiary-90, #bbf294));--wy-component-color: var(--wy-on-tertiary-container, var(--wy-tertiary-10, #0a2100));background-color:var(--wy-component-background-color);color:var(--wy-component-color)}.wy-message-me{margin-right:0;margin-left:calc(2.5 * var(--wy-rem, 1rem));align-items:flex-end}.wy-message-me .wy-message-meta{margin:0 calc(.25 * var(--wy-rem, 1rem)) calc(.25 * var(--wy-rem, 1rem)) 0}.wy-message-me .wy-message-content{align-items:flex-end}.wy-message-me .wy-message-content-row{flex-direction:row-reverse}.wy-message-me .wy-message-bubble{--wy-component-background-color: var(--wy-primary-container, var(--wy-primary-90, #cde5ff));--wy-component-color: var(--wy-on-primary-container, var(--wy-primary-10, #001d32));background-color:var(--wy-component-background-color);color:var(--wy-component-color)}.wy-message-me .wy-likes{flex-direction:row-reverse}.wy-message-me .wy-reactions-line,.wy-message-me wy-reactions{display:flex;flex-direction:row}.wy-message-me .wy-reactions-line .wy-dropdown-menu,.wy-message-me wy-reactions .wy-dropdown-menu{right:0}.wy-message-emoji .wy-message-bubble{background:none;padding:0 0 calc(.75 * var(--wy-rem, 1rem))}.wy-message-emoji .wy-content .wy-emoji{width:calc(3 * var(--wy-rem, 1rem));height:calc(3 * var(--wy-rem, 1rem));margin:0}.wy-message-emoji.wy-message-me .wy-content{text-align:end}.wy-readby-status{display:flex;gap:calc(.25 * var(--wy-rem, 1rem));height:calc(1.125 * var(--wy-rem, 1rem));justify-content:flex-end;margin-top:calc(-.125 * var(--wy-rem, 1rem))}.wy-status-pending,.wy-status-sent,.wy-status-delivered{--wy-component-background-color: var(--wy-inverse-primary, var(--wy-primary-80, #95ccff));color:var(--wy-component-background-color)}.wy-message-readmore{justify-self:center;text-align:center}.wy-meta{color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e));font-size:var(--wy-font-size-sm, calc(.875 * var(--wy-font-size-base, 1em)))}.wy-meta-sm{font-size:var(--wy-font-size-xs, calc(.75 * var(--wy-font-size-base, 1em)))}.wy-viewport{position:fixed;top:0;right:0;bottom:0;left:0;z-index:2147483647;pointer-events:none}.wy-overlays{pointer-events:none;width:100%;height:100%;max-width:none;display:flex;align-items:center;justify-content:center;transform-style:preserve-3d;overflow-y:initial;overflow-x:initial;perspective:calc(100 * var(--wy-rem, 1rem));perspective-origin:center center}.wy-overlays .wy-panel:not(.wy-transition){transform:translateZ(calc(-4 * var(--wy-rem, 1rem)))!important}.wy-overlays .wy-panel .wy-controls{position:absolute;border-bottom:none;flex-direction:row;transition:opacity .1s .2s step-end}.wy-overlays .wy-panel .wy-controls wy-icon{color:var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e))}.wy-overlays .wy-panel.wy-loaded .wy-controls{pointer-events:none;opacity:0}.wy-overlays .wy-panel .wy-panel-frame{background-color:transparent}@media (min-width: 768px){.wy-overlays .wy-panel.wy-modal{left:auto;right:auto;top:calc(2 * var(--wy-rem, 1rem));bottom:calc(3.2 * var(--wy-rem, 1rem));margin-left:calc(4 * var(--wy-rem, 1rem));margin-top:auto;margin-right:calc(4 * var(--wy-rem, 1rem));margin-bottom:auto;border-radius:var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)));box-shadow:var(--wy-shadow-level4, 0 calc(1 * var(--wy-rem, 1rem)) calc(2.25 * var(--wy-rem, 1rem)) calc(.125 * var(--wy-rem, 1rem)) rgba(0, 0, 0, .14), 0 calc(.375 * var(--wy-rem, 1rem)) calc(1.875 * var(--wy-rem, 1rem)) calc(.3125 * var(--wy-rem, 1rem)) rgba(0, 0, 0, .12), 0 calc(.5 * var(--wy-rem, 1rem)) calc(.625 * var(--wy-rem, 1rem)) calc(-.3125 * var(--wy-rem, 1rem)) rgba(0, 0, 0, .2));width:calc(32 * var(--wy-rem, 1rem));max-height:calc(32 * var(--wy-rem, 1rem))}.wy-overlays .wy-panel.wy-modal:not(.wy-scroll-y){overflow:hidden}}@media (min-width: 768px){.wy-overlays .wy-panel.wy-modal-full{left:calc(1 * var(--wy-rem, 1rem));top:calc(1 * var(--wy-rem, 1rem));right:calc(1 * var(--wy-rem, 1rem));bottom:calc(1 * var(--wy-rem, 1rem));margin:0;border-radius:var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)));box-shadow:var(--wy-shadow-level4, 0 calc(1 * var(--wy-rem, 1rem)) calc(2.25 * var(--wy-rem, 1rem)) calc(.125 * var(--wy-rem, 1rem)) rgba(0, 0, 0, .14), 0 calc(.375 * var(--wy-rem, 1rem)) calc(1.875 * var(--wy-rem, 1rem)) calc(.3125 * var(--wy-rem, 1rem)) rgba(0, 0, 0, .12), 0 calc(.5 * var(--wy-rem, 1rem)) calc(.625 * var(--wy-rem, 1rem)) calc(-.3125 * var(--wy-rem, 1rem)) rgba(0, 0, 0, .2));width:auto;max-height:none}.wy-overlays .wy-panel.wy-modal-full:not(.wy-scroll-y){overflow:hidden}}.wy-overlays .wy-panel.wy-loading .wy-controls{transition:opacity var(--wy-transition, var(--wy-transition-duration, .2s) var(--wy-transition-curve, cubic-bezier(.4, 0, .2, 1)));opacity:1}tr.wy-pager{pointer-events:none}:not(tr).wy-pager:not(:empty){display:block;text-align:center;margin:calc(1 * var(--wy-rem, 1rem)) auto}tr.wy-pager td{text-align:center;border:0}tr.wy-pager td .wy-spinner{display:inline;margin:calc(1 * var(--wy-rem, 1rem)) auto}.wy-grid .wy-pager{display:flex}.wy-pane{display:flex;flex-direction:column;position:relative;min-height:0;height:100%;flex:1 1 auto}.wy-pane-body{display:flex;flex-direction:column;flex:1}.wy-pane-group{padding:calc(.75 * var(--wy-rem, 1rem))}.wy-pane-background{--wy-component-background-color: var(--wy-background, var(--wy-neutral-99, #fcfcff));--wy-component-color: var(--wy-on-background, var(--wy-neutral-10, #1a1c1e));background-color:var(--wy-component-background-color);color:var(--wy-component-color)}.wy-panels{position:absolute;top:0;right:0;bottom:0;left:0;overscroll-behavior:contain;overflow-y:auto;overflow-x:hidden}.wy-panel{--wy-component-background-color: var(--wy-background, var(--wy-neutral-99, #fcfcff));--wy-component-color: var(--wy-on-background, var(--wy-neutral-10, #1a1c1e));position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;overflow:hidden;background-color:var(--wy-component-background-color);color:var(--wy-component-color);display:flex;flex-direction:column}.wy-panel .wy-controls{top:calc(.25 * var(--wy-rem, 1rem));left:calc(.25 * var(--wy-rem, 1rem));min-width:calc(2.5 * var(--wy-rem, 1rem));width:auto;display:flex;z-index:10000;order:-1;flex-direction:row-reverse;border-bottom:1px solid var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce))}.wy-panel .wy-controls:empty{display:none}.wy-panel .wy-controls wy-icon{color:var(--wy-component-color)}.wy-panel .wy-panel-frame{transition:opacity var(--wy-transition-fast, var(--wy-transition-duration-fast, .1s) var(--wy-transition-curve, cubic-bezier(.4, 0, .2, 1)));transition-delay:.2s;opacity:1}.wy-panel .wy-panel-frame:not([src]){display:none}.wy-panel:not(.wy-loaded) .wy-panel-frame{opacity:0;transition:opacity .2s step-start;transition-delay:.1s}.wy-panel.wy-open{pointer-events:all;z-index:5}.wy-panel.wy-open[data-title]:before{content:attr(data-title);position:absolute;top:0;left:0;right:0;height:var(--wy-appbar-height, calc(3 * var(--wy-rem, 1rem)));padding:calc(.25 * var(--wy-rem, 1rem));opacity:0;pointer-events:none;display:flex;align-items:center;justify-content:center;transition:opacity .1s step-end;transition-delay:.2s;font-family:var(--wy-font-family, unset),inherit;line-height:var(--wy-line-height, 1.5);font-weight:var(--wy-font-weight, unset);background-color:var(--wy-surface-1, var(--wy-surface-1-light, #f1f2f7));color:var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e));box-shadow:var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce)) 0 -1px 0 0 inset;backface-visibility:hidden}@supports (backdrop-filter: blur(calc(.5 * var(--wy-rem, 1rem)))){.wy-panel.wy-open[data-title]:before{-webkit-backdrop-filter:blur(calc(.5 * var(--wy-rem, 1rem)));backdrop-filter:blur(calc(.5 * var(--wy-rem, 1rem)))}}.wy-panel.wy-open:after{content:\"\";position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:none;opacity:0;transition:opacity var(--wy-transition, var(--wy-transition-duration, .2s) var(--wy-transition-curve, cubic-bezier(.4, 0, .2, 1)));transition-duration:0s}.wy-panel.wy-open.wy-loading[data-title]:before{opacity:1}.wy-panel.wy-open.wy-loading:after{transition:opacity var(--wy-transition, var(--wy-transition-duration, .2s) var(--wy-transition-curve, cubic-bezier(.4, 0, .2, 1)));transition-duration:.5s;opacity:1;background-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 24 24' width='24' height='24' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cstyle type='text/css'%3Eg%7Banimation:rotate 2s linear infinite;transform-origin:center center%7Dcircle%7Bstroke-dasharray:1,100;stroke-dashoffset:0;animation:dash 1.5s ease-in-out infinite,color 6s ease-in-out infinite%7D@keyframes rotate%7B100%25%7Btransform:rotate(360deg)%7D%7D@keyframes dash%7B0%25%7Bstroke-dasharray:1,100;stroke-dashoffset:0%7D50%25%7Bstroke-dasharray:44.5,100;stroke-dashoffset:-17.5px%7D100%25%7Bstroke-dasharray:44.5,100;stroke-dashoffset:-62px%7D%7D@keyframes color%7B0%25,100%25%7Bstroke:%23216eb4%7D40%25%7Bstroke:%2328b7cf%7D66%25%7Bstroke:%23216eb4%7D80%25,90%25%7Bstroke:%2328b7cf%7D%7D%3C/style%3E%3Cg%3E%3Ccircle fill='none' cx='12' cy='12' r='11' stroke-linecap='butt' stroke-width='2' /%3E%3C/g%3E%3C/svg%3E\");background-repeat:no-repeat;background-position:50%;background-size:calc(2 * var(--wy-rem, 1rem));background-color:transparent}.wy-panel{opacity:0;visibility:hidden;transition:opacity var(--wy-transition-fast, var(--wy-transition-duration-fast, .1s) var(--wy-transition-curve, cubic-bezier(.4, 0, .2, 1))) .01s,transform var(--wy-transition-fast, var(--wy-transition-duration-fast, .1s) var(--wy-transition-curve, cubic-bezier(.4, 0, .2, 1))) .01s,visibility .01s step-end var(--wy-transition-duration-fast, .1s)}.wy-panel.wy-open{transition:opacity var(--wy-transition, var(--wy-transition-duration, .2s) var(--wy-transition-curve, cubic-bezier(.4, 0, .2, 1))),transform var(--wy-transition, var(--wy-transition-duration, .2s) var(--wy-transition-curve, cubic-bezier(.4, 0, .2, 1))),visibility var(--wy-transition-duration, .2s) step-start;visibility:visible}.wy-panel.wy-open.wy-transition{opacity:1;transform:none}.wy-panel-frame{flex:1 1 100%;border:0}.wy-picker-list{background:var(--wy-component-background-color);color:var(--wy-component-color);border:none}.wy-picker-list>.wy-picker-list-item:first-child,.wy-picker-list>:first-child .wy-picker-list-item{border-top:none}.wy-picker-list>.wy-picker-list-item:last-child,.wy-picker-list>:last-child .wy-picker-list-item{border-bottom:none}.wy-picker-list-item{display:flex;align-items:center;padding:calc(.25 * var(--wy-rem, 1rem)) calc(.5 * var(--wy-rem, 1rem))}.wy-picker-list-item>wy-icon{margin-left:calc(.25 * var(--wy-rem, 1rem));margin-right:calc(.25 * var(--wy-rem, 1rem));flex:0 0 auto}.wy-picker-list-item>button{margin-block-start:auto;flex:0 0 auto}.wy-picker-list-item-title{flex-grow:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wy-main{display:flex;height:calc(100% - var(--wy-appbar-height, calc(3 * var(--wy-rem, 1rem))));min-height:0}@media (max-width: 767.98px){.wy-main{flex-direction:column}}.wy-preview{--wy-component-background-color: var(--wy-background, var(--wy-neutral-99, #fcfcff));--wy-component-color: var(--wy-on-background, var(--wy-neutral-10, #1a1c1e));background-color:var(--wy-component-background-color);color:var(--wy-component-color);display:flex;flex-direction:column;align-items:stretch;justify-content:stretch;position:relative;flex:1 1 100%;min-width:calc(16 * var(--wy-rem, 1rem));min-height:calc(16 * var(--wy-rem, 1rem));max-height:100%;max-width:100%}.wy-preview-swiper{display:flex;flex-direction:row;flex:1 1 100%;align-items:center;justify-content:start;min-width:calc(16 * var(--wy-rem, 1rem));min-height:calc(16 * var(--wy-rem, 1rem));max-height:100%;max-width:100%;overflow-x:scroll;scroll-snap-type:x mandatory;scroll-behavior:auto;overscroll-behavior-x:none;scrollbar-width:none}.wy-preview-swiper::-webkit-scrollbar{display:none}.wy-preview-swiper-disabled{overflow-x:hidden}.wy-preview-area{position:relative;min-width:100%;min-height:100%;width:100%;height:100%;flex:1 1 auto;display:flex;flex-direction:column;scroll-snap-stop:always;scroll-snap-align:center}.wy-nav-prev,.wy-nav-next{--wy-component-background-color: var(--wy-surface-variant, var(--wy-neutral-variant-90, #dee3eb));--wy-component-color: var(--wy-on-surface-variant, var(--wy-neutral-variant-30, #42474e));background-color:var(--wy-component-background-color);position:absolute;top:50%;z-index:1000;border-radius:50%}.wy-nav-prev{left:calc(.5 * var(--wy-rem, 1rem))}.wy-nav-next{right:calc(.5 * var(--wy-rem, 1rem))}.wy-document{--wy-component-background-color: var(--wy-background, );--wy-component-color: var(--wy-on-background, );background-color:var(--wy-component-background-color);color:var(--wy-component-color);align-self:flex-start;padding:calc(2 * var(--wy-rem, 1rem)) calc(3.5 * var(--wy-rem, 1rem));width:100%;min-height:100%;flex:1 0 auto}@media (min-width: 768px){.wy-document{padding:calc(3 * var(--wy-rem, 1rem)) calc(4 * var(--wy-rem, 1rem));margin:calc(2 * var(--wy-rem, 1rem)) auto;border-radius:calc(.125 * var(--wy-rem, 1rem));box-shadow:var(--wy-shadow-level2, 0 calc(.25 * var(--wy-rem, 1rem)) calc(.3125 * var(--wy-rem, 1rem)) 0 rgba(0, 0, 0, .14), 0 calc(.0625 * var(--wy-rem, 1rem)) calc(.625 * var(--wy-rem, 1rem)) 0 rgba(0, 0, 0, .12), 0 calc(.125 * var(--wy-rem, 1rem)) calc(.25 * var(--wy-rem, 1rem)) calc(-.0625 * var(--wy-rem, 1rem)) rgba(0, 0, 0, .2));width:120ch;min-height:170ch;max-width:calc(100% - 3.5 * var(--wy-rem, 1rem))}}.wy-content-code{align-self:flex-start;width:100%;padding:calc(2 * var(--wy-rem, 1rem)) calc(3.5 * var(--wy-rem, 1rem))}.wy-content-iframe{border:0;display:block;width:100%;height:100%;top:0;left:0;flex:1 1 100%}.wy-content-iframe.wy-loaded{--wy-component-background-color: var(--wy-surface-1, var(--wy-surface-1-light, #f1f2f7));--wy-component-color: var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e));background-color:var(--wy-component-background-color);color:var(--wy-component-color)}.wy-content-iframe.wy-loaded~.wy-content-iframe-fallback,.wy-content-iframe.wy-loaded~.wy-spinner,.wy-content-iframe.wy-loaded~wy-spinner{display:none}.wy-content-iframe.wy-loading:not(.wy-loaded){position:absolute;visibility:hidden;z-index:-1;pointer-events:none}.wy-content-iframe.wy-loading:not(.wy-loaded):not(.wy-fallback)~.wy-content-iframe-fallback{display:none}.wy-content-iframe.wy-loading:not(.wy-loaded).wy-fallback~.wy-spinner,.wy-content-iframe.wy-loading:not(.wy-loaded).wy-fallback~wy-spinner{display:none}.wy-content-iframe~.wy-spinner,.wy-content-iframe~wy-spinner{margin:auto}.wy-content-html pre,.wy-content-html code{word-break:break-word;white-space:pre-wrap}.wy-content-image{min-width:0;display:flex;align-items:center;justify-content:center;position:relative;margin:auto;max-height:100%;max-width:100%;transition:transform var(--wy-transition, var(--wy-transition-duration, .2s) var(--wy-transition-curve, cubic-bezier(.4, 0, .2, 1))),transform-origin var(--wy-transition-duration, .2s) step-end}.wy-content-image.wy-zoom{cursor:zoom-out;transition:transform var(--wy-transition, var(--wy-transition-duration, .2s) var(--wy-transition-curve, cubic-bezier(.4, 0, .2, 1))),transform-origin var(--wy-transition-duration, .2s) step-start}.wy-content-image img{min-width:0;min-height:0;width:100%;height:100%}.wy-content-image img:not(.wy-loading-transition):not([data-controller~=image])~.wy-spinner,.wy-content-image img:not(.wy-loading-transition):not([data-controller~=image])~wy-spinner{display:none}.wy-content-image img.wy-loading,.wy-content-image img[data-controller~=image]{transition:opacity .15s ease-out;opacity:0}.wy-content-image img.wy-loading.wy-loaded,.wy-content-image img[data-controller~=image].wy-loaded{opacity:1;transition:opacity .15s ease-out}.wy-content-image img.wy-loading.wy-loaded~img,.wy-content-image img[data-controller~=image].wy-loaded~img{transition-delay:.15s;opacity:0}.wy-content-image img.wy-loading.wy-loaded~.wy-spinner,.wy-content-image img.wy-loading.wy-loaded~wy-spinner,.wy-content-image img[data-controller~=image].wy-loaded~.wy-spinner,.wy-content-image img[data-controller~=image].wy-loaded~wy-spinner{display:none}.wy-content-image img.wy-responsive-image-thumb{position:absolute;z-index:-1}.wy-content-image img~.wy-spinner,.wy-content-image img~wy-spinner{position:absolute}.wy-content-video:not(.wy-error){min-height:0;max-width:100%;max-height:100%;flex:1 1 auto}.wy-content-video,.wy-content-audio{margin:auto}.wy-content-video.wy-loading:not(.wy-loaded),.wy-content-video[data-controller~=media]:not(.wy-loaded),.wy-content-audio.wy-loading:not(.wy-loaded),.wy-content-audio[data-controller~=media]:not(.wy-loaded){visibility:hidden}.wy-content-video.wy-loading.wy-loaded~.wy-spinner,.wy-content-video.wy-loading.wy-loaded~wy-spinner,.wy-content-video[data-controller~=media].wy-loaded~.wy-spinner,.wy-content-video[data-controller~=media].wy-loaded~wy-spinner,.wy-content-audio.wy-loading.wy-loaded~.wy-spinner,.wy-content-audio.wy-loading.wy-loaded~wy-spinner,.wy-content-audio[data-controller~=media].wy-loaded~.wy-spinner,.wy-content-audio[data-controller~=media].wy-loaded~wy-spinner{display:none}.wy-content-video:focus,.wy-content-audio:focus{outline:none}:host(wy-pdf-viewer){--annotation-unfocused-field-background: url(\"data:image/svg+xml;charset=UTF-8,<svg width='1px' height='1px' xmlns='http://www.w3.org/2000/svg'><rect width='100%' height='100%' style='fill:rgba(0, 54, 255, 0.13);'/></svg>\");--input-focus-border-color: Highlight;--input-focus-outline: 1px solid Canvas;--input-unfocused-border-color: transparent;--input-disabled-border-color: transparent;--input-hover-border-color: black;--xfa-unfocused-field-background: url(\"data:image/svg+xml;charset=UTF-8,<svg width='1px' height='1px' xmlns='http://www.w3.org/2000/svg'><rect width='100%' height='100%' style='fill:rgba(0, 54, 255, 0.13);'/></svg>\");--xfa-focus-outline: auto;--focus-outline: solid 2px blue;--hover-outline: dashed 2px blue;--freetext-line-height: 1.35;--freetext-padding: 2px;--editorFreeText-editing-cursor: text;--editorInk-editing-cursor: pointer;--viewer-container-height: 0;--pdfViewer-padding-bottom: 0;--page-margin: calc(2 * var(--wy-rem, 1rem)) auto;--page-border: none;--page-border-image: none;--spreadHorizontalWrapped-margin-LR: -3.5px;--scale-factor: 1}@media (forced-colors: active){:host(wy-pdf-viewer){--input-focus-border-color: CanvasText;--input-unfocused-border-color: ActiveText;--input-disabled-border-color: GrayText;--input-hover-border-color: Highlight}}@media (forced-colors: active){:host(wy-pdf-viewer){--xfa-focus-outline: 2px solid CanvasText}}@media (forced-colors: active){:host(wy-pdf-viewer){--focus-outline: solid 3px ButtonText;--hover-outline: dashed 3px ButtonText}}@media screen and (forced-colors: active){:host(wy-pdf-viewer){--page-border: 1px solid CanvasText;--page-border-image: none;--spreadHorizontalWrapped-margin-LR: 3.5px}}.wy-content-pdf .wy-input[data-pdf-target=pageNumber]{width:calc(3 * var(--wy-rem, 1rem))}.wy-content-pdf .wy-input[data-pdf-target=zoomLevel]{width:calc(5 * var(--wy-rem, 1rem))}.wy-content-pdf .wy-pdf-container{position:absolute;width:100%;height:100%;bottom:0;left:0;overflow-y:auto;max-height:100%;overflow-x:auto;touch-action:pan-y,pan-x;will-change:scroll-position,opacity;backface-visibility:hidden;max-width:100%}.wy-content-pdf .wy-pdf-container:not(body){-webkit-overflow-scrolling:touch}.wy-scrollbars .wy-content-pdf .wy-pdf-container{scrollbar-width:thin;scrollbar-color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e)) transparent}.wy-scrollbars .wy-content-pdf .wy-pdf-container::-webkit-scrollbar{height:.625rem;width:.625rem;background:transparent;z-index:999}.wy-scrollbars .wy-content-pdf .wy-pdf-container::-webkit-scrollbar-track{background:transparent}.wy-scrollbars .wy-content-pdf .wy-pdf-container::-webkit-scrollbar-thumb{background-color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e));border:.125rem solid transparent;border-radius:.5rem;background-clip:padding-box;opacity:75%}.wy-scrollbars .wy-content-pdf .wy-pdf-container::-webkit-scrollbar-thumb:hover{background-color:var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce));opacity:75%}.wy-scrollbars .wy-content-pdf .wy-pdf-container::-webkit-scrollbar-thumb:window-inactive{background-color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e));opacity:50%}@supports (overflow-y: overlay){.wy-scrollbars .wy-content-pdf .wy-pdf-container{overflow-y:overlay}}.wy-content-pdf .textLayer{position:absolute;text-align:initial;left:0;top:0;right:0;bottom:0;overflow:hidden;opacity:.25;line-height:1;-webkit-text-size-adjust:none;-moz-text-size-adjust:none;text-size-adjust:none;forced-color-adjust:none}.wy-content-pdf .textLayer span,.wy-content-pdf .textLayer br{color:transparent;position:absolute;white-space:pre;cursor:text;transform-origin:0% 0%}.wy-content-pdf .textLayer span.markedContent{top:0;height:0}.wy-content-pdf .textLayer .highlight{margin:-1px;padding:1px;background-color:#b400aa;border-radius:4px}.wy-content-pdf .textLayer .highlight.appended{position:initial}.wy-content-pdf .textLayer .highlight.begin{border-radius:4px 0 0 4px}.wy-content-pdf .textLayer .highlight.end{border-radius:0 4px 4px 0}.wy-content-pdf .textLayer .highlight.middle{border-radius:0}.wy-content-pdf .textLayer .highlight.selected{background-color:#006400}.wy-content-pdf .textLayer ::-moz-selection{background:#00f;background:AccentColor}.wy-content-pdf .textLayer ::selection{background:#00f;background:AccentColor}.wy-content-pdf .textLayer br::-moz-selection{background:transparent}.wy-content-pdf .textLayer br::selection{background:transparent}.wy-content-pdf .textLayer .endOfContent{display:block;position:absolute;left:0;top:100%;right:0;bottom:0;z-index:-1;cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none}.wy-content-pdf .textLayer .endOfContent.active{top:0}@media (forced-colors: active){.wy-content-pdf .annotationLayer .textWidgetAnnotation input:required,.wy-content-pdf .annotationLayer .textWidgetAnnotation textarea:required,.wy-content-pdf .annotationLayer .choiceWidgetAnnotation select:required,.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.checkBox input:required,.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.radioButton input:required{outline:1.5px solid selectedItem}}.wy-content-pdf .annotationLayer{position:absolute;top:0;left:0;pointer-events:none;transform-origin:0 0}.wy-content-pdf .annotationLayer section{position:absolute;text-align:initial;pointer-events:auto;box-sizing:border-box;transform-origin:0 0}.wy-content-pdf .annotationLayer .linkAnnotation>a,.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.pushButton>a{position:absolute;font-size:1em;top:0;left:0;width:100%;height:100%}.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.pushButton>canvas{width:100%;height:100%}.wy-content-pdf .annotationLayer .linkAnnotation>a:hover,.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.pushButton>a:hover{opacity:.2;background:#ff0;box-shadow:0 2px 10px #ff0}.wy-content-pdf .annotationLayer .textAnnotation img{position:absolute;cursor:pointer;width:100%;height:100%}.wy-content-pdf .annotationLayer .textWidgetAnnotation input,.wy-content-pdf .annotationLayer .textWidgetAnnotation textarea,.wy-content-pdf .annotationLayer .choiceWidgetAnnotation select,.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.checkBox input,.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.radioButton input{background-image:var(--annotation-unfocused-field-background);border:2px solid var(--input-unfocused-border-color);box-sizing:border-box;font:calc(9px * var(--scale-factor)) sans-serif;height:100%;margin:0;vertical-align:top;width:100%}.wy-content-pdf .annotationLayer .textWidgetAnnotation input:required,.wy-content-pdf .annotationLayer .textWidgetAnnotation textarea:required,.wy-content-pdf .annotationLayer .choiceWidgetAnnotation select:required,.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.checkBox input:required,.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.radioButton input:required{outline:1.5px solid red}.wy-content-pdf .annotationLayer .choiceWidgetAnnotation select option{padding:0}.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.radioButton input{border-radius:50%}.wy-content-pdf .annotationLayer .textWidgetAnnotation textarea{resize:none}.wy-content-pdf .annotationLayer .textWidgetAnnotation input[disabled],.wy-content-pdf .annotationLayer .textWidgetAnnotation textarea[disabled],.wy-content-pdf .annotationLayer .choiceWidgetAnnotation select[disabled],.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.checkBox input[disabled],.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.radioButton input[disabled]{background:none;border:2px solid var(--input-disabled-border-color);cursor:not-allowed}.wy-content-pdf .annotationLayer .textWidgetAnnotation input:hover,.wy-content-pdf .annotationLayer .textWidgetAnnotation textarea:hover,.wy-content-pdf .annotationLayer .choiceWidgetAnnotation select:hover,.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.checkBox input:hover,.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.radioButton input:hover{border:2px solid var(--input-hover-border-color)}.wy-content-pdf .annotationLayer .textWidgetAnnotation input:hover,.wy-content-pdf .annotationLayer .textWidgetAnnotation textarea:hover,.wy-content-pdf .annotationLayer .choiceWidgetAnnotation select:hover,.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.checkBox input:hover{border-radius:2px}.wy-content-pdf .annotationLayer .textWidgetAnnotation input:focus,.wy-content-pdf .annotationLayer .textWidgetAnnotation textarea:focus,.wy-content-pdf .annotationLayer .choiceWidgetAnnotation select:focus{background:none;border:2px solid var(--input-focus-border-color);border-radius:2px;outline:var(--input-focus-outline)}.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.checkBox :focus,.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.radioButton :focus{background-image:none;background-color:transparent}.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.checkBox :focus{border:2px solid var(--input-focus-border-color);border-radius:2px;outline:var(--input-focus-outline)}.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.radioButton :focus{border:2px solid var(--input-focus-border-color);outline:var(--input-focus-outline)}.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after,.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before{background-color:CanvasText;content:\"\";display:block;position:absolute}.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after{height:80%;left:45%;width:1px}.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before{transform:rotate(45deg)}.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after{transform:rotate(-45deg)}.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before{border-radius:50%;height:50%;left:30%;top:20%;width:50%}.wy-content-pdf .annotationLayer .textWidgetAnnotation input.comb{font-family:monospace;padding-left:2px;padding-right:0}.wy-content-pdf .annotationLayer .textWidgetAnnotation input.comb:focus{width:103%}.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.checkBox input,.wy-content-pdf .annotationLayer .buttonWidgetAnnotation.radioButton input{-webkit-appearance:none;-moz-appearance:none;appearance:none}.wy-content-pdf .annotationLayer .popupTriggerArea{height:100%;width:100%}.wy-content-pdf .annotationLayer .popupWrapper{position:absolute;font-size:calc(9px * var(--scale-factor));width:100%;min-width:calc(180px * var(--scale-factor));pointer-events:none}.wy-content-pdf .annotationLayer .popup{position:absolute;max-width:calc(180px * var(--scale-factor));background-color:#ff9;box-shadow:0 calc(2px * var(--scale-factor)) calc(5px * var(--scale-factor)) #888;border-radius:calc(2px * var(--scale-factor));padding:calc(6px * var(--scale-factor));margin-left:calc(5px * var(--scale-factor));cursor:pointer;font:message-box;white-space:normal;word-wrap:break-word;pointer-events:auto}.wy-content-pdf .annotationLayer .popup>*{font-size:calc(9px * var(--scale-factor))}.wy-content-pdf .annotationLayer .popup h1{display:inline-block}.wy-content-pdf .annotationLayer .popupDate{display:inline-block;margin-left:calc(5px * var(--scale-factor))}.wy-content-pdf .annotationLayer .popupContent{border-top:1px solid rgb(51,51,51);margin-top:calc(2px * var(--scale-factor));padding-top:calc(2px * var(--scale-factor))}.wy-content-pdf .annotationLayer .richText>*{white-space:pre-wrap;font-size:calc(9px * var(--scale-factor))}.wy-content-pdf .annotationLayer .highlightAnnotation,.wy-content-pdf .annotationLayer .underlineAnnotation,.wy-content-pdf .annotationLayer .squigglyAnnotation,.wy-content-pdf .annotationLayer .strikeoutAnnotation,.wy-content-pdf .annotationLayer .freeTextAnnotation,.wy-content-pdf .annotationLayer .lineAnnotation svg line,.wy-content-pdf .annotationLayer .squareAnnotation svg rect,.wy-content-pdf .annotationLayer .circleAnnotation svg ellipse,.wy-content-pdf .annotationLayer .polylineAnnotation svg polyline,.wy-content-pdf .annotationLayer .polygonAnnotation svg polygon,.wy-content-pdf .annotationLayer .caretAnnotation,.wy-content-pdf .annotationLayer .inkAnnotation svg polyline,.wy-content-pdf .annotationLayer .stampAnnotation,.wy-content-pdf .annotationLayer .fileAttachmentAnnotation{cursor:pointer}.wy-content-pdf .annotationLayer section svg{position:absolute;width:100%;height:100%}.wy-content-pdf .annotationLayer .annotationTextContent{position:absolute;width:100%;height:100%;opacity:0;color:transparent;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}.wy-content-pdf .annotationLayer .annotationTextContent span{width:100%;display:inline-block}@media (forced-colors: active){.wy-content-pdf .xfaLayer *:required{outline:1.5px solid selectedItem}}.wy-content-pdf .xfaLayer{background-color:transparent}.wy-content-pdf .xfaLayer .highlight{margin:-1px;padding:1px;background-color:#efcbed;border-radius:4px}.wy-content-pdf .xfaLayer .highlight.appended{position:initial}.wy-content-pdf .xfaLayer .highlight.begin{border-radius:4px 0 0 4px}.wy-content-pdf .xfaLayer .highlight.end{border-radius:0 4px 4px 0}.wy-content-pdf .xfaLayer .highlight.middle{border-radius:0}.wy-content-pdf .xfaLayer .highlight.selected{background-color:#cbdfcb}.wy-content-pdf .xfaPage{overflow:hidden;position:relative}.wy-content-pdf .xfaContentarea{position:absolute}.wy-content-pdf .xfaPrintOnly{display:none}.wy-content-pdf .xfaLayer{position:absolute;text-align:initial;top:0;left:0;transform-origin:0 0;line-height:1.2}.wy-content-pdf .xfaLayer *{color:inherit;font:inherit;font-style:inherit;font-weight:inherit;font-kerning:inherit;letter-spacing:-.01px;text-align:inherit;text-decoration:inherit;box-sizing:border-box;background-color:transparent;padding:0;margin:0;pointer-events:auto;line-height:inherit}.wy-content-pdf .xfaLayer *:required{outline:1.5px solid red}.wy-content-pdf .xfaLayer div{pointer-events:none}.wy-content-pdf .xfaLayer svg{pointer-events:none}.wy-content-pdf .xfaLayer svg *{pointer-events:none}.wy-content-pdf .xfaLayer a{color:#00f}.wy-content-pdf .xfaRich li{margin-left:3em}.wy-content-pdf .xfaFont{color:#000;font-weight:400;font-kerning:none;font-size:10px;font-style:normal;letter-spacing:0;text-decoration:none;vertical-align:0}.wy-content-pdf .xfaCaption{overflow:hidden;flex:0 0 auto}.wy-content-pdf .xfaCaptionForCheckButton{overflow:hidden;flex:1 1 auto}.wy-content-pdf .xfaLabel{height:100%;width:100%}.wy-content-pdf .xfaLeft{display:flex;flex-direction:row;align-items:center}.wy-content-pdf .xfaRight{display:flex;flex-direction:row-reverse;align-items:center}.wy-content-pdf .xfaLeft>.xfaCaption,.wy-content-pdf .xfaLeft>.xfaCaptionForCheckButton,.wy-content-pdf .xfaRight>.xfaCaption,.wy-content-pdf .xfaRight>.xfaCaptionForCheckButton{max-height:100%}.wy-content-pdf .xfaTop{display:flex;flex-direction:column;align-items:flex-start}.wy-content-pdf .xfaBottom{display:flex;flex-direction:column-reverse;align-items:flex-start}.wy-content-pdf .xfaTop>.xfaCaption,.wy-content-pdf .xfaTop>.xfaCaptionForCheckButton,.wy-content-pdf .xfaBottom>.xfaCaption,.wy-content-pdf .xfaBottom>.xfaCaptionForCheckButton{width:100%}.wy-content-pdf .xfaBorder{background-color:transparent;position:absolute;pointer-events:none}.wy-content-pdf .xfaWrapped{width:100%;height:100%}.wy-content-pdf .xfaTextfield:focus,.wy-content-pdf .xfaSelect:focus{background-image:none;background-color:transparent;outline:var(--xfa-focus-outline);outline-offset:-1px}.wy-content-pdf .xfaCheckbox:focus,.wy-content-pdf .xfaRadio:focus{outline:var(--xfa-focus-outline)}.wy-content-pdf .xfaTextfield,.wy-content-pdf .xfaSelect{height:100%;width:100%;flex:1 1 auto;border:none;resize:none;background-image:var(--xfa-unfocused-field-background)}.wy-content-pdf .xfaSelect{padding-left:2px;padding-right:2px;padding-inline:2px}.wy-content-pdf .xfaTop>.xfaTextfield,.wy-content-pdf .xfaTop>.xfaSelect,.wy-content-pdf .xfaBottom>.xfaTextfield,.wy-content-pdf .xfaBottom>.xfaSelect{flex:0 1 auto}.wy-content-pdf .xfaButton{cursor:pointer;width:100%;height:100%;border:none;text-align:center}.wy-content-pdf .xfaLink{width:100%;height:100%;position:absolute;top:0;left:0}.wy-content-pdf .xfaCheckbox,.wy-content-pdf .xfaRadio{width:100%;height:100%;flex:0 0 auto;border:none}.wy-content-pdf .xfaRich{white-space:pre-wrap;width:100%;height:100%}.wy-content-pdf .xfaImage{-o-object-position:left top;object-position:left top;-o-object-fit:contain;object-fit:contain;width:100%;height:100%}.wy-content-pdf .xfaLrTb,.wy-content-pdf .xfaRlTb,.wy-content-pdf .xfaTb{display:flex;flex-direction:column;align-items:stretch}.wy-content-pdf .xfaLr{display:flex;flex-direction:row;align-items:stretch}.wy-content-pdf .xfaRl{display:flex;flex-direction:row-reverse;align-items:stretch}.wy-content-pdf .xfaTb>div{justify-content:left}.wy-content-pdf .xfaPosition,.wy-content-pdf .xfaArea{position:relative}.wy-content-pdf .xfaValignMiddle{display:flex;align-items:center}.wy-content-pdf .xfaTable{display:flex;flex-direction:column;align-items:stretch}.wy-content-pdf .xfaTable .xfaRow{display:flex;flex-direction:row;align-items:stretch}.wy-content-pdf .xfaTable .xfaRlRow{display:flex;flex-direction:row-reverse;align-items:stretch;flex:1}.wy-content-pdf .xfaTable .xfaRlRow>div{flex:1}.wy-content-pdf .xfaNonInteractive input,.wy-content-pdf .xfaNonInteractive textarea,.wy-content-pdf .xfaDisabled input,.wy-content-pdf .xfaDisabled textarea,.wy-content-pdf .xfaReadOnly input,.wy-content-pdf .xfaReadOnly textarea{background:initial}@media print{.wy-content-pdf .xfaTextfield,.wy-content-pdf .xfaSelect{background:transparent}.wy-content-pdf .xfaSelect{-webkit-appearance:none;-moz-appearance:none;appearance:none;text-indent:1px;text-overflow:\"\"}}.wy-content-pdf [data-editor-rotation=\"90\"]{transform:rotate(90deg)}.wy-content-pdf [data-editor-rotation=\"180\"]{transform:rotate(180deg)}.wy-content-pdf [data-editor-rotation=\"270\"]{transform:rotate(270deg)}.wy-content-pdf .annotationEditorLayer{background:transparent;position:absolute;top:0;left:0;font-size:calc(100px * var(--scale-factor));transform-origin:0 0;cursor:auto;z-index:20000}.wy-content-pdf .annotationEditorLayer.freeTextEditing{cursor:var(--editorFreeText-editing-cursor)}.wy-content-pdf .annotationEditorLayer.inkEditing{cursor:var(--editorInk-editing-cursor)}.wy-content-pdf .annotationEditorLayer .selectedEditor{outline:var(--focus-outline);resize:none}.wy-content-pdf .annotationEditorLayer .freeTextEditor{position:absolute;background:transparent;border-radius:3px;padding:calc(var(--freetext-padding) * var(--scale-factor));resize:none;width:auto;height:auto;z-index:1;transform-origin:0 0;touch-action:none;cursor:auto}.wy-content-pdf .annotationEditorLayer .freeTextEditor .internal{background:transparent;border:none;top:0;left:0;overflow:visible;white-space:nowrap;resize:none;font:10px sans-serif;line-height:var(--freetext-line-height)}.wy-content-pdf .annotationEditorLayer .freeTextEditor .overlay{position:absolute;display:none;background:transparent;top:0;left:0;width:100%;height:100%}.wy-content-pdf .annotationEditorLayer .freeTextEditor .overlay.enabled{display:block}.wy-content-pdf .annotationEditorLayer .freeTextEditor .internal:empty:before{content:attr(default-content);color:gray}.wy-content-pdf .annotationEditorLayer .freeTextEditor .internal:focus{outline:none}.wy-content-pdf .annotationEditorLayer .inkEditor.disabled{resize:none}.wy-content-pdf .annotationEditorLayer .inkEditor.disabled.selectedEditor{resize:horizontal}.wy-content-pdf .annotationEditorLayer .freeTextEditor:hover:not(.selectedEditor),.wy-content-pdf .annotationEditorLayer .inkEditor:hover:not(.selectedEditor){outline:var(--hover-outline)}.wy-content-pdf .annotationEditorLayer .inkEditor{position:absolute;background:transparent;border-radius:3px;overflow:auto;width:100%;height:100%;z-index:1;transform-origin:0 0;cursor:auto}.wy-content-pdf .annotationEditorLayer .inkEditor.editing{resize:none;cursor:inherit}.wy-content-pdf .annotationEditorLayer .inkEditor .inkEditorCanvas{position:absolute;top:0;left:0;width:100%;height:100%;touch-action:none}.wy-content-pdf [data-main-rotation=\"90\"]{transform:rotate(90deg) translateY(-100%)}.wy-content-pdf [data-main-rotation=\"180\"]{transform:rotate(180deg) translate(-100%,-100%)}.wy-content-pdf [data-main-rotation=\"270\"]{transform:rotate(270deg) translate(-100%)}.wy-content-pdf .pdfViewer{padding-bottom:var(--pdfViewer-padding-bottom)}.wy-content-pdf .pdfViewer .canvasWrapper{overflow:hidden}.wy-content-pdf .pdfViewer .page{direction:ltr;width:816px;height:1056px;margin:var(--page-margin);position:relative;overflow:visible;border:var(--page-border);-o-border-image:var(--page-border-image);border-image:var(--page-border-image);background-clip:content-box;background-color:#fff}.wy-content-pdf .pdfViewer .dummyPage{position:relative;width:0;height:var(--viewer-container-height)}.wy-content-pdf .pdfViewer.removePageBorders .page{margin:0 auto 10px;border:none}.wy-content-pdf .pdfViewer.singlePageView{display:inline-block}.wy-content-pdf .pdfViewer.singlePageView .page{margin:0;border:none}.wy-content-pdf .pdfViewer.scrollHorizontal,.wy-content-pdf .pdfViewer.scrollWrapped,.wy-content-pdf .spread{margin-left:3.5px;margin-right:3.5px;text-align:center}.wy-content-pdf .pdfViewer.scrollHorizontal,.wy-content-pdf .spread{white-space:nowrap}.wy-content-pdf .pdfViewer.removePageBorders,.wy-content-pdf .pdfViewer.scrollHorizontal .spread,.wy-content-pdf .pdfViewer.scrollWrapped .spread{margin-left:0;margin-right:0}.wy-content-pdf .spread .page,.wy-content-pdf .spread .dummyPage,.wy-content-pdf .pdfViewer.scrollHorizontal .page,.wy-content-pdf .pdfViewer.scrollWrapped .page,.wy-content-pdf .pdfViewer.scrollHorizontal .spread,.wy-content-pdf .pdfViewer.scrollWrapped .spread{display:inline-block;vertical-align:middle}.wy-content-pdf .spread .page,.wy-content-pdf .pdfViewer.scrollHorizontal .page,.wy-content-pdf .pdfViewer.scrollWrapped .page{margin-left:var(--spreadHorizontalWrapped-margin-LR);margin-right:var(--spreadHorizontalWrapped-margin-LR)}.wy-content-pdf .pdfViewer.removePageBorders .spread .page,.wy-content-pdf .pdfViewer.removePageBorders.scrollHorizontal .page,.wy-content-pdf .pdfViewer.removePageBorders.scrollWrapped .page{margin-left:5px;margin-right:5px}.wy-content-pdf .pdfViewer .page canvas{margin:0;display:block}.wy-content-pdf .pdfViewer .page canvas[hidden]{display:none}.wy-content-pdf .pdfViewer .page .loadingIcon{position:absolute;display:block;left:0;top:0;right:0;bottom:0}.wy-content-pdf .pdfViewer .page .loadingIcon.notVisible{background:none}.wy-content-pdf .pdfViewer.enablePermissions .textLayer span{-webkit-user-select:none!important;-moz-user-select:none!important;user-select:none!important;cursor:not-allowed}.wy-content-pdf .pdfPresentationMode .pdfViewer{padding-bottom:0}.wy-content-pdf .pdfPresentationMode .spread{margin:0}.wy-content-pdf .pdfPresentationMode .pdfViewer .page{margin:0 auto;border:2px solid transparent}.wy-content-pdf .pdfViewer .page{box-shadow:var(--wy-shadow-level2, 0 calc(.25 * var(--wy-rem, 1rem)) calc(.3125 * var(--wy-rem, 1rem)) 0 rgba(0, 0, 0, .14), 0 calc(.0625 * var(--wy-rem, 1rem)) calc(.625 * var(--wy-rem, 1rem)) 0 rgba(0, 0, 0, .12), 0 calc(.125 * var(--wy-rem, 1rem)) calc(.25 * var(--wy-rem, 1rem)) calc(-.0625 * var(--wy-rem, 1rem)) rgba(0, 0, 0, .2));background-color:var(--wy-white, var(, ))}.wy-content-text{word-break:break-word;white-space:pre-wrap}.wy-likes{display:inline-flex;align-items:center}.wy-like-button{background:var(--wy-component-background-color);color:var(--wy-primary);width:calc(2.5 * var(--wy-rem, 1rem));height:calc(2.5 * var(--wy-rem, 1rem))}.wy-like-count{padding:0 calc(.5 * var(--wy-rem, 1rem));color:var(--wy-outline);font-size:var(--wy-font-size-sm, calc(.875 * var(--wy-font-size-base, 1em)))}.wy-reaction-count{margin:0 calc(.5 * var(--wy-rem, 1rem)) 0 calc(.125 * var(--wy-rem, 1rem));line-height:1;font-size:var(--wy-font-size-sm, calc(.875 * var(--wy-font-size-base, 1em)))}.wy-reaction-menu{padding:calc(.25 * var(--wy-rem, 1rem));font-size:calc(1.125 * var(--wy-rem, 1rem));border-radius:calc(2.5 * var(--wy-rem, 1rem))}.wy-reaction-picker{display:flex}.wy-reaction-picker .wy-reaction-button{color:unset}.wy-reactions{display:inline-flex;align-items:center;column-gap:calc(.1875 * var(--wy-rem, 1rem))}.wy-reactions:empty{display:none}.wy-reactions-line{display:flex;align-items:center}:host(wy-reactions) .wy-emoji{width:calc(1.125 * var(--wy-rem, 1rem));height:calc(1.125 * var(--wy-rem, 1rem));font-size:calc(1.125 * var(--wy-rem, 1rem))}:host(wy-reactions) .wy-emoji:first-child{margin-left:calc(.1875 * var(--wy-rem, 1rem))}:host(wy-reactions) .wy-emoji:last-child{margin-right:calc(.1875 * var(--wy-rem, 1rem))}:host(wy-reactions[small]) .wy-reaction-lineup .wy-emoji,:host(wy-reactions[small]) .wy-reaction-like-button .wy-emoji{width:calc(1.125 * var(--wy-rem, 1rem));height:calc(1.125 * var(--wy-rem, 1rem));font-size:calc(1 * var(--wy-rem, 1rem))}:host(wy-reactions[small]) .wy-reaction-lineup .wy-emoji:first-child,:host(wy-reactions[small]) .wy-reaction-like-button .wy-emoji:first-child{margin-left:calc(.125 * var(--wy-rem, 1rem))}:host(wy-reactions[small]) .wy-reaction-lineup .wy-emoji:last-child,:host(wy-reactions[small]) .wy-reaction-like-button .wy-emoji:last-child{margin-right:calc(.125 * var(--wy-rem, 1rem))}:host(wy-reactions[small]) .wy-reaction-lineup .wy-like-count,:host(wy-reactions[small]) .wy-reaction-like-button .wy-like-count{font-size:var(--wy-font-size-xs, calc(.75 * var(--wy-font-size-base, 1em)))}.wy-table-reactions td:first-child{width:calc(3 * var(--wy-rem, 1rem))}.wy-table-reactions td:nth-child(2){width:100%}.wy-table-reactions tr:last-child td{box-shadow:none}.wy-reaction{font-size:calc(1.125 * var(--wy-rem, 1rem))}.wy-reaction-menu-button,.wy-like-button{background:var(--wy-component-background-color);color:currentColor;border-radius:var(--wy-border-radius-pill, calc(50 * var(--wy-rem, 1rem)));background-clip:content-box}.wy-sheet{--wy-scrollbar-adjust-top: 0;--wy-scrollbar-adjust-bottom: 0;--wy-component-background-color: var(--wy-surface-3, var(--wy-surface-3-light, #e3e7ee));--wy-component-color: var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e));background-color:var(--wy-component-background-color);color:var(--wy-component-color);position:fixed;z-index:1055;display:flex;flex-direction:column;overflow:hidden;bottom:calc(.5 * var(--wy-rem, 1rem));left:calc(.5 * var(--wy-rem, 1rem));right:calc(.5 * var(--wy-rem, 1rem));max-height:max(50vh,50%);min-height:calc(3 * var(--wy-rem, 1rem));margin:calc(.5 * var(--wy-rem, 1rem)) auto;max-width:calc(32 * var(--wy-rem, 1rem));transition:opacity var(--wy-transition, var(--wy-transition-duration, .2s) var(--wy-transition-curve, cubic-bezier(.4, 0, .2, 1)));border-radius:var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)));box-shadow:var(--wy-shadow-level1, 0 calc(.125 * var(--wy-rem, 1rem)) calc(.125 * var(--wy-rem, 1rem)) 0 rgba(0, 0, 0, .14), 0 calc(.1875 * var(--wy-rem, 1rem)) calc(.0625 * var(--wy-rem, 1rem)) calc(-.125 * var(--wy-rem, 1rem)) rgba(0, 0, 0, .2), 0 calc(.0625 * var(--wy-rem, 1rem)) calc(.3125 * var(--wy-rem, 1rem)) 0 rgba(0, 0, 0, .12))}.wy-sheet>.wy-appbars,.wy-sheet>.wy-appbar{border-top-left-radius:inherit;border-top-right-radius:inherit}.wy-sheet-body{overflow:hidden;padding:calc(.5 * var(--wy-rem, 1rem));position:relative;min-height:calc(3 * var(--wy-rem, 1rem))}.wy-sheet-body.wy-scroll-y{overflow-y:auto}.wy-sheet:not(.wy-show){opacity:0;transform:translateY(calc(32 * var(--wy-rem, 1rem)))}.wy-sheet.wy-show{opacity:1;transform:none;transition:transform var(--wy-transition, var(--wy-transition-duration, .2s) var(--wy-transition-curve, cubic-bezier(.4, 0, .2, 1))),opacity var(--wy-transition, var(--wy-transition-duration, .2s) var(--wy-transition-curve, cubic-bezier(.4, 0, .2, 1)));pointer-events:auto}.wy-spinner{align-self:center;justify-self:center;margin:auto}.wy-spinner circle{stroke-dasharray:1,100;stroke-dashoffset:0;transform-origin:center;fill:none!important}.wy-spinner.wy-spin{animation:wy-rotate 1.4s linear infinite}.wy-spinner.wy-spin circle{animation:wy-dash 1.4s ease-in-out infinite,wy-color 2.8s ease-in-out infinite}.wy-spinner.wy-spinner-overlay{position:absolute;left:0;right:0;top:0;bottom:0;margin:auto}@keyframes wy-rotate{to{transform:rotate(360deg)}}@keyframes wy-dash{0%{stroke-dasharray:1,100;stroke-dashoffset:0}50%{stroke-dasharray:44.5,100;stroke-dashoffset:-17.5}to{stroke-dasharray:44.5,100;stroke-dashoffset:-62}}@keyframes wy-color{0%,to{stroke:var(--wy-primary, var(--wy-primary-40, #006399))}25%{stroke:var(--wy-primary, var(--wy-primary-40, #006399))}50%{stroke:transparent}75%{stroke:var(--wy-primary, var(--wy-primary-40, #006399))}}.wy-toasts{position:fixed;left:0;bottom:calc(3.5 * var(--wy-rem, 1rem));right:0;pointer-events:none;display:flex;flex-direction:column;align-items:center;justify-content:center;z-index:1030;gap:calc(1 * var(--wy-rem, 1rem))}.wy-toast{background:var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e));color:var(--wy-surface-2, var(--wy-surface-2-light, #eaedf3));margin:0 0 calc(1 * var(--wy-rem, 1rem));width:calc(16 * var(--wy-rem, 1rem));max-width:calc(100% - 3 * var(--wy-rem, 1rem));gap:calc(.5 * var(--wy-rem, 1rem));display:flex;cursor:pointer;border-radius:var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)));margin-left:auto;margin-right:auto;margin-bottom:calc(.5 * var(--wy-rem, 1rem));padding:calc(.5 * var(--wy-rem, 1rem)) calc(.75 * var(--wy-rem, 1rem));-webkit-user-select:none;user-select:none;box-shadow:var(--wy-shadow-level2, 0 calc(.25 * var(--wy-rem, 1rem)) calc(.3125 * var(--wy-rem, 1rem)) 0 rgba(0, 0, 0, .14), 0 calc(.0625 * var(--wy-rem, 1rem)) calc(.625 * var(--wy-rem, 1rem)) 0 rgba(0, 0, 0, .12), 0 calc(.125 * var(--wy-rem, 1rem)) calc(.25 * var(--wy-rem, 1rem)) calc(-.0625 * var(--wy-rem, 1rem)) rgba(0, 0, 0, .2));position:relative;overflow:hidden;height:auto}.wy-toast.wy-fade{transition:all var(--wy-transition, var(--wy-transition-duration, .2s) var(--wy-transition-curve, cubic-bezier(.4, 0, .2, 1)))}.wy-toast.wy-fade:not(.wy-show){opacity:0;height:0;padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0}.wy-toast-action{position:sticky;top:calc(4.5 * var(--wy-rem, 1rem));bottom:calc(4.5 * var(--wy-rem, 1rem));z-index:990;background-color:var(--wy-primary, var(--wy-primary-40, #006399));color:var(--wy-on-primary, var(--wy-white, #ffffff));padding:calc(.5 * var(--wy-rem, 1rem)) calc(1 * var(--wy-rem, 1rem));border-radius:var(--wy-border-radius-pill, calc(50 * var(--wy-rem, 1rem)));font-size:var(--wy-font-size-xs, calc(.75 * var(--wy-font-size-base, 1em)));width:max-content;align-self:center;text-align:center;box-shadow:none}.wy-toast-primary{background:var(--wy-on-primary-container, var(--wy-primary-10, #001d32));color:var(--wy-primary-container, var(--wy-primary-90, #cde5ff))}.wy-typing-show{font-style:italic;display:none}.wy-typing-active .wy-typing-show{display:block}.wy-typing-active .wy-typing-hide{display:none}.wy-appbar wy-typing{position:relative;padding:0 calc(1.25 * var(--wy-rem, 1rem))}.wy-placeholder{cursor:wait;color:var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce));background:var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce));opacity:.5;animation:wy-placeholder-glow 2s ease-in-out infinite}@keyframes wy-placeholder-glow{50%{opacity:.2}}.wy-meeting{flex:1 1 100%;align-items:flex-start}.wy-meeting-actions{margin-top:calc(.5 * var(--wy-rem, 1rem))}.wy-dragging:after{content:attr(data-drag-title);background-color:#ffffff80;display:flex;justify-content:center;align-items:center;border:calc(.125 * var(--wy-rem, 1rem)) dashed var(--wy-primary, var(--wy-primary-40, #006399));font-weight:700;z-index:10000;position:absolute;top:0;left:0;bottom:0;right:0}.wy-message-editor-top{background-color:var(--wy-component-background-color);color:var(--wy-component-color)}@supports (position: sticky){.wy-message-editor-top{position:sticky;top:0;z-index:1020}}.wy-message-editor-bottom{background-color:var(--wy-component-background-color);color:var(--wy-component-color)}@supports (position: sticky){.wy-message-editor-bottom{position:sticky;bottom:0;z-index:1020}}.wy-message-form .wy-spinner{display:none}.wy-message-form.wy-uploading .wy-spinner{display:block}.wy-message-form.wy-uploading [data-icon=plus]{display:none}.wy-message-form .wy-picker-list:not(:empty){border-top:1px solid var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce))}.wy-message-editor-inputs{display:flex;flex-direction:row;align-items:flex-end;padding:calc(.5 * var(--wy-rem, 1rem)) calc(.25 * var(--wy-rem, 1rem));min-height:calc(3.5 * var(--wy-rem, 1rem))}.wy-message-editor-inputs>:not(:last-child){margin-right:calc(.25 * var(--wy-rem, 1rem))}.wy-message-editor-buttons{flex:1 0 auto}.wy-message-editor-text{flex:1 1 100%;display:flex;flex-direction:column}.wy-message-editor-mention,.wy-message-editor-link{background:#00f;color:#fff}.wy-message-editor .cm-editor,.wy-message-editor-grow:after,.wy-message-editor-grow>textarea,.wy-message-editor-textfield{flex:1 1 100%;max-height:calc(11.25 * var(--wy-rem, 1rem));background-color:var(--wy-background, var(--wy-neutral-99, #fcfcff));color:var(--wy-on-background, var(--wy-neutral-10, #1a1c1e));border-radius:calc(1.25 * var(--wy-rem, 1rem));border:var(--wy-input-border-width, 1px) solid var(--wy-background, var(--wy-neutral-99, #fcfcff))}.wy-message-editor .cm-editor:focus,.wy-message-editor-grow:focus:after,.wy-message-editor-grow>textarea:focus,.wy-message-editor-textfield:focus{border-color:var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce))}.wy-message-editor .cm-editor .cm-content,.wy-message-editor-textcontent{font-family:var(--wy-input-font-family, var(--wy-font-family, inherit)),\xA0inherit;font-size:var(--wy-font-size-base, var(--wy-font-size, 1em));padding:var(--wy-input-padding-y, calc(.4375 * var(--wy-rem, 1rem))) var(--wy-input-padding-x, calc(.75 * var(--wy-rem, 1rem)));min-height:calc(calc(2.5 * var(--wy-rem, 1rem)) - var(--wy-input-border-width, 1px));line-height:calc(1.5 * var(--wy-rem, 1rem))}.wy-message-editor-grow{display:grid}.wy-message-editor-grow:after,.wy-message-editor-grow>textarea{grid-area:1/1/2/2}.wy-message-editor-grow:after{content:attr(data-replicated-value) \" \";white-space:pre-wrap;visibility:hidden}.wy-message-editor-grow>textarea{resize:none;overflow:hidden}.wy-message-editor .cm-scroller{font-family:unset;line-height:1.5}.wy-message-editor .cm-widgetBuffer{vertical-align:unset}.wy-message-editor .cm-placeholder{color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e))}.wy-message-editor .cm-content{caret-color:var(--wy-on-background, var(--wy-neutral-10, #1a1c1e))}.wy-message-editor .cm-editor.cm-focused{--wy-component-color: var(--wy-on-background, var(--wy-neutral-10, #1a1c1e));color:var(--wy-component-color);border-color:var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce));outline:0}.wy-message-editor .cm-editor .cm-scroller{overflow:auto}.wy-scrollbars .wy-message-editor .cm-editor .cm-scroller{scrollbar-width:thin;scrollbar-color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e)) transparent}.wy-scrollbars .wy-message-editor .cm-editor .cm-scroller::-webkit-scrollbar{height:.625rem;width:.625rem;background:transparent;z-index:999}.wy-scrollbars .wy-message-editor .cm-editor .cm-scroller::-webkit-scrollbar-track{background:transparent}.wy-scrollbars .wy-message-editor .cm-editor .cm-scroller::-webkit-scrollbar-thumb{background-color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e));border:.125rem solid transparent;border-radius:.5rem;background-clip:padding-box;opacity:75%}.wy-scrollbars .wy-message-editor .cm-editor .cm-scroller::-webkit-scrollbar-thumb:hover{background-color:var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce));opacity:75%}.wy-scrollbars .wy-message-editor .cm-editor .cm-scroller::-webkit-scrollbar-thumb:window-inactive{background-color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e));opacity:50%}.wy-scrollbars .wy-message-editor .cm-editor .cm-scroller::-webkit-scrollbar-button:vertical:start:single-button{height:calc(.375 * var(--wy-rem, 1rem))}.wy-scrollbars .wy-message-editor .cm-editor .cm-scroller::-webkit-scrollbar-button:vertical:end:single-button{height:calc(.375 * var(--wy-rem, 1rem))}.wy-message-editor .wy-is-invalid+[data-editor-target] .cm-editor,.wy-message-editor .wy-is-invalid .cm-editor{border-color:var(--wy-error, var(--wy-error-40, #ba1824))!important}.wy-message-editor .cm-tooltip.cm-tooltip-autocomplete>ul{font-family:unset;max-height:calc(15 * var(--wy-rem, 1rem))}.wy-message-editor .cm-tooltip.cm-tooltip-autocomplete>ul>li{padding:0}.wy-message-editor .cm-tooltip{border:none;background-clip:padding-box;background-color:var(--wy-surface-2, var(--wy-surface-2-light, #eaedf3));color:var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e));border-radius:var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)));box-shadow:var(--wy-shadow-level1, 0 calc(.125 * var(--wy-rem, 1rem)) calc(.125 * var(--wy-rem, 1rem)) 0 rgba(0, 0, 0, .14), 0 calc(.1875 * var(--wy-rem, 1rem)) calc(.0625 * var(--wy-rem, 1rem)) calc(-.125 * var(--wy-rem, 1rem)) rgba(0, 0, 0, .2), 0 calc(.0625 * var(--wy-rem, 1rem)) calc(.3125 * var(--wy-rem, 1rem)) 0 rgba(0, 0, 0, .12));overflow:hidden;z-index:1000}.wy-message-editor .cm-tooltip-autocomplete ul li[aria-selected]{background:var(--wy-primary-container, var(--wy-primary-90, #cde5ff));color:unset}.wy-message-editor .cm-tooltip-autocomplete .cm-completionLabel{display:none}.wy-message-editor .cm-tooltip-autocomplete .wy-item-hover:hover,.wy-message-editor .cm-tooltip-autocomplete .wy-item-hover:focus{background:var(--wy-surface-variant, var(--wy-neutral-variant-90, #dee3eb))}.wy-message-editor .cm-tooltip-autocomplete .wy-avatar{width:calc(2 * var(--wy-rem, 1rem));height:calc(2 * var(--wy-rem, 1rem))}.wy-card{--wy-component-background-color: var(--wy-surface-1, var(--wy-surface-1-light, #f1f2f7));--wy-component-color: var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e));--wy-component-border-radius: var(--wy-border-radius-lg, calc(1.5 * var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)))));background-color:var(--wy-component-background-color);color:var(--wy-component-color);border-radius:var(--wy-component-border-radius);position:relative;display:flex;flex-direction:column;min-width:0;word-wrap:break-word;background-clip:border-box}.wy-card>hr{margin-right:0;margin-left:0}.wy-card-primary{--wy-component-background-color: var(--wy-primary-container, var(--wy-primary-90, #cde5ff));--wy-component-color: var(--wy-on-primary-container, var(--wy-primary-10, #001d32))}.wy-card-hover{cursor:pointer;-webkit-user-select:none;user-select:none}.wy-card-hover:before{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;border-radius:inherit;background:var(--wy-component-color);opacity:0%}.wy-card-hover:hover:before{opacity:var(--wy-opacity-state-hover, 8%)}.wy-card-hover:focus:before{opacity:var(--wy-opacity-state-focus, 12%)}.wy-card-hover:active:before,.wy-card-hover.wy-active:before{opacity:var(--wy-opacity-state-active, 12%)}.wy-card-actions{position:absolute;top:min(.25 * var(--wy-rem, 1rem),100% - 2.5 * var(--wy-rem, 1rem));right:calc(.25 * var(--wy-rem, 1rem));align-items:center;display:flex}.wy-card-actions>.wy-button-icon,.wy-card-actions>.wy-dropdown>.wy-button-icon{background-clip:content-box}.wy-card-content{flex:1 0 auto;padding-block-end:calc(.5 * var(--wy-rem, 1rem));padding-inline-start:calc(.5 * var(--wy-rem, 1rem));padding-inline-end:calc(.5 * var(--wy-rem, 1rem))}.wy-card-content:first-child,.wy-card-actions+.wy-card-content:nth-child(2){padding-block-start:calc(.5 * var(--wy-rem, 1rem))}.wy-card-top{border-radius:var(--wy-component-border-radius);object-fit:cover;object-position:top center;flex:1 1 100%;max-height:calc(10 * var(--wy-rem, 1rem))}.wy-card-top-image{object-position:50% 38%}.wy-card-trashed{text-decoration:line-through}.wy-card-trashed>*:not(.wy-card-actions){opacity:var(--wy-opacity-disabled, 38%)}.wy-filename{font-size:var(--wy-font-size-sm, calc(.875 * var(--wy-font-size-base, 1em)));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center}.wy-files{width:100%;height:100%;position:relative;color:var(--wy-on-background, var(--wy-neutral-10, #1a1c1e));background-color:var(--wy-background, var(--wy-neutral-99, #fcfcff));display:flex;flex-direction:column;flex:1}@supports (position: sticky){wy-files-appbar{position:sticky;top:0;z-index:1020}}.wy-table-files thead{display:none;text-align:left}.wy-table-files td:nth-child(2){padding:0 var(--wy-table-cell-padding-x, calc(.25 * var(--wy-rem, 1rem)))}.wy-table-files td:nth-child(2),.wy-table-files th:nth-child(2){width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wy-table-files td:nth-child(3),.wy-table-files th:nth-child(3){display:none;width:calc(7 * var(--wy-rem, 1rem));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wy-table-files td:nth-child(4),.wy-table-files th:nth-child(4){display:none;width:calc(7.5 * var(--wy-rem, 1rem));text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wy-table-files td:nth-child(5),.wy-table-files th:nth-child(5){display:none;width:calc(7 * var(--wy-rem, 1rem));text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media (min-width: 576px){.wy-table-files thead{display:table-header-group}.wy-table-files td:nth-child(5),.wy-table-files th:nth-child(5){display:table-cell}}@media (min-width: 768px){.wy-table-files td:nth-child(3),.wy-table-files th:nth-child(3),.wy-table-files td:nth-child(4),.wy-table-files th:nth-child(4){display:table-cell}}.wy-files-thead{text-align:left}@media (max-width: 767.98px){.wy-files-thead{display:none}}.wy-files-td-filename{padding:0 var(--wy-table-cell-padding-x, calc(.25 * var(--wy-rem, 1rem)))}.wy-files-td-filename,.wy-files-th-filename{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wy-files-td-modified,.wy-files-th-modified{width:calc(7 * var(--wy-rem, 1rem));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media (max-width: 991.98px){.wy-files-td-modified,.wy-files-th-modified{display:none}}.wy-files-td-kind,.wy-files-th-kind{width:calc(7.5 * var(--wy-rem, 1rem));text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media (max-width: 991.98px){.wy-files-td-kind,.wy-files-th-kind{display:none}}.wy-files-td-size,.wy-files-th-size{width:calc(7 * var(--wy-rem, 1rem));text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media (min-width: 768px){.wy-files-td-size,.wy-files-th-size{display:none}}.wy-grid{display:grid;grid-auto-flow:dense;grid-template-columns:repeat(auto-fill,minmax(calc(10 * var(--wy-rem, 1rem)),1fr));grid-gap:calc(.75 * var(--wy-rem, 1rem))}.wy-sidebar{--wy-component-background-color: var(--wy-surface-2, var(--wy-surface-2-light, #eaedf3));--wy-component-color: var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e));background:var(--wy-component-background-color);color:var(--wy-component-color);min-width:0;min-height:0;flex-grow:0;flex-shrink:0;flex-basis:calc(18 * var(--wy-rem, 1rem));z-index:10;display:flex;flex-direction:column;transition:flex-basis var(--wy-transition, var(--wy-transition-duration, .2s) var(--wy-transition-curve, cubic-bezier(.4, 0, .2, 1)));position:relative;order:9999}.wy-sidebar>*{transition:opacity var(--wy-transition-fast, var(--wy-transition-duration-fast, .1s) var(--wy-transition-curve, cubic-bezier(.4, 0, .2, 1))) calc(var(--wy-transition-duration, .2s) - var(--wy-transition-duration-fast, .1s));min-width:calc(18 * var(--wy-rem, 1rem))}.wy-sidebar[hidden]{display:flex!important;flex-basis:0}.wy-sidebar[hidden]>*{transition:opacity var(--wy-transition-fast, var(--wy-transition-duration-fast, .1s) var(--wy-transition-curve, cubic-bezier(.4, 0, .2, 1)));opacity:0}@media (min-width: 768px){.wy-sidebar>*{min-width:calc(18 * var(--wy-rem, 1rem))}.wy-sidebar .wy-sidebar-handle{display:none}}@media (max-width: 767.98px){.wy-sidebar{transition:flex-basis var(--wy-transition, var(--wy-transition-duration, .2s) var(--wy-transition-curve, cubic-bezier(.4, 0, .2, 1))),margin-top var(--wy-transition, var(--wy-transition-duration, .2s) var(--wy-transition-curve, cubic-bezier(.4, 0, .2, 1)));border-top-left-radius:var(--wy-border-radius-lg, calc(1.5 * var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)))));border-top-right-radius:var(--wy-border-radius-lg, calc(1.5 * var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)))));flex-basis:50vh}.wy-sidebar:not([hidden]){margin-top:calc(-1 * var(--wy-border-radius-lg, calc(1.5 * var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem))))))}.wy-sidebar:not([hidden]).wy-maximized{flex-basis:calc(100% - var(--wy-appbar-height, calc(3 * var(--wy-rem, 1rem))) * .5);margin-top:calc(-50% + var(--wy-appbar-height, calc(3 * var(--wy-rem, 1rem))) * 2.5 - var(--wy-border-radius-lg, calc(1.5 * var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem))))))}.wy-sidebar:not([hidden]).wy-maximized~* .wy-nav-prev,.wy-sidebar:not([hidden]).wy-maximized~* .wy-nav-next{display:none}.wy-sidebar>*{min-height:var(--wy-appbar-height, calc(3 * var(--wy-rem, 1rem)))}}.wy-sidebar-handle{width:calc(4 * var(--wy-rem, 1rem));background-clip:content-box;background-color:var(--wy-on-surface-variant, var(--wy-neutral-variant-30, #42474e));height:calc(1 * var(--wy-rem, 1rem));border:calc(.375 * var(--wy-rem, 1rem)) solid transparent;position:absolute;top:0;z-index:2;left:50%;margin-left:calc(-2 * var(--wy-rem, 1rem));border-radius:var(--wy-border-radius-pill, calc(50 * var(--wy-rem, 1rem)));cursor:pointer}.wy-table{--wy-component-color: var(--wy-on-background, var(--wy-neutral-10, #1a1c1e));--wy-component-background-color: var(--wy-background, var(--wy-neutral-99, #fcfcff));color:var(--wy-component-color);background-color:var(--wy-component-background-color);table-layout:fixed;width:100%;vertical-align:top;border-collapse:collapse}.wy-table th,.wy-table td{padding:var(--wy-table-cell-padding-y, calc(.25 * var(--wy-rem, 1rem))) var(--wy-table-cell-padding-x, calc(.25 * var(--wy-rem, 1rem)));box-shadow:var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce)) 0 -1px 0 0 inset;line-height:1;vertical-align:middle;height:calc(2.5 * var(--wy-rem, 1rem))}.wy-table th:first-child,.wy-table td:first-child{padding-left:calc(var(--wy-table-cell-padding-x, calc(.25 * var(--wy-rem, 1rem))) * 2)}.wy-table th:last-child,.wy-table td:last-child{padding-right:calc(var(--wy-table-cell-padding-x, calc(.25 * var(--wy-rem, 1rem))) * 2)}.wy-table>tbody{vertical-align:inherit}.wy-table>thead{vertical-align:bottom}.wy-table .wy-table-cell-icon{color:var(--wy-component-color);vertical-align:middle;text-align:center;padding:calc(var(--wy-table-cell-padding-y, calc(.25 * var(--wy-rem, 1rem))) * .5) var(--wy-table-cell-padding-x, calc(.25 * var(--wy-rem, 1rem)));width:calc(calc(2.5 * var(--wy-rem, 1rem)) + var(--wy-table-cell-padding-x, calc(.25 * var(--wy-rem, 1rem))) * 2);font-size:var(--wy-font-size-base, var(--wy-font-size, 1em));font-weight:var(--wy-font-weight-base, );text-transform:none;letter-spacing:normal}.wy-table .wy-table-cell-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.wy-table-hover>tbody>tr:not(.wy-pager):hover>*{--wy-component-color: var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e));--wy-component-background-color: var(--wy-surface-2, var(--wy-surface-2-light, #eaedf3));color:var(--color);background-color:var(--wy-component-background-color);cursor:pointer}.wy-table-trashed th,.wy-table-trashed td{text-decoration:line-through}.wy-table-trashed th:not(:last-child)>*,.wy-table-trashed td:not(:last-child)>*{opacity:var(--wy-opacity-disabled, 38%)}.wy-table-trashed th>a,.wy-table-trashed td>a{color:var(--wy-component-color)}.wy-table-trashed:hover th,.wy-table-trashed:hover td{opacity:1}.wy-table-no-result{text-align:center;padding:calc(1 * var(--wy-rem, 1rem))}.wy-table-sort-link{display:inline-flex;align-items:center;color:var(--wy-link, var(--wy-primary-40, #006399));cursor:pointer}.wy-post{--wy-component-background-color: var(--wy-surface-1, var(--wy-surface-1-light, #f1f2f7));--wy-component-color: var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e));background-color:var(--wy-component-background-color);color:var(--wy-component-color);display:flex;flex-direction:column;position:relative;margin:calc(1 * var(--wy-rem, 1rem)) calc(.75 * var(--wy-rem, 1rem));--wy-component-border-radius: var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)));border-radius:var(--wy-component-border-radius)}.wy-post .wy-image-grid{border-radius:0;margin-bottom:calc(1 * var(--wy-rem, 1rem))}.wy-post .wy-embed{margin-bottom:calc(1 * var(--wy-rem, 1rem))}.wy-post .wy-comments{margin:calc(.5 * var(--wy-rem, 1rem)) calc(.75 * var(--wy-rem, 1rem));border-top:1px solid var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce));padding:calc(.75 * var(--wy-rem, 1rem)) 0 0}.wy-post-body{padding:0 calc(1 * var(--wy-rem, 1rem))}.wy-post-body:empty{display:none}.wy-post-body .wy-content,.wy-post-body .wy-list,.wy-post-body .wy-poll{margin-bottom:calc(1 * var(--wy-rem, 1rem))}.wy-post-footer{display:flex;align-items:center;justify-content:space-between;margin:0 calc(.25 * var(--wy-rem, 1rem)) calc(.25 * var(--wy-rem, 1rem))}.wy-post-footer .wy-meta{margin-right:calc(.5 * var(--wy-rem, 1rem))}.wy-post-dragging:after{content:attr(data-drag-title,\"Drop files here to upload.\");background-color:#ffffff80;display:flex;justify-content:center;align-items:center;border:calc(.125 * var(--wy-rem, 1rem)) dashed var(--wy-primary, var(--wy-primary-40, #006399));font-weight:700;z-index:10000;position:absolute;top:0;left:0;bottom:0;right:0}.wy-poll{flex:1 1 100%;min-width:0}.wy-poll-form{background:var(--wy-component-background-color);color:var(--wy-component-color);padding:calc(.5 * var(--wy-rem, 1rem))}.wy-poll-form:empty{display:none}.wy-poll-form input:not(:first-child){margin-top:calc(.5 * var(--wy-rem, 1rem))}.wy-poll-option{position:relative;background-color:var(--wy-background, var(--wy-neutral-99, #fcfcff));border:1px solid var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce));border-radius:var(--wy-border-radius-sm, calc(.75 * var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)))));margin-bottom:calc(.25 * var(--wy-rem, 1rem));padding:calc(.25 * var(--wy-rem, 1rem)) calc(.5 * var(--wy-rem, 1rem));min-height:calc(2.5 * var(--wy-rem, 1rem));cursor:pointer}.wy-poll-option .wy-progress{position:absolute;top:0;left:0;bottom:0;background-color:var(--wy-primary-container, var(--wy-primary-90, #cde5ff))}.wy-poll-option>:not(.wy-progress){z-index:1}.wy-embed{display:flex;flex-direction:column;word-wrap:break-word}.wy-embed-photo a{display:flex}.wy-embed-photo img{width:100%;height:auto}.wy-embed-photo-sm a{padding:0 calc(1 * var(--wy-rem, 1rem))}.wy-embed-photo-sm img{display:block;margin:0 auto;width:auto;max-width:100%;border-radius:var(--wy-border-radius-sm, calc(.75 * var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)))))}.wy-embed-video{position:relative;display:block;width:100%;padding:0;overflow:hidden}.wy-embed-video:before{display:block;content:\"\";padding-top:56.25%}.wy-embed-video iframe,.wy-embed-video embed,.wy-embed-video object,.wy-embed-video video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.wy-embed-caption{--wy-component-background-color: var(--wy-surface-3, var(--wy-surface-3-light, #e3e7ee));--wy-component-color: var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e));background-color:var(--wy-component-background-color);color:var(--wy-component-color);padding:calc(.5 * var(--wy-rem, 1rem)) calc(1 * var(--wy-rem, 1rem)) calc(1 * var(--wy-rem, 1rem));position:relative}.wy-embed-link{color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e));text-transform:uppercase;font-size:var(--wy-font-size-sm, calc(.875 * var(--wy-font-size-base, 1em)))}.wy-embed-link:after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;content:\"\"}.wy-embed-title{font-weight:var(--wy-headings-font-weight, 500);margin-bottom:calc(.5 * var(--wy-rem, 1rem))}.wy-embed-description{color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e))}.wy-embed-preview a[target=_blank]{pointer-events:none}.wy-embed-preview .wy-embed{display:none;margin:calc(.75 * var(--wy-rem, 1rem));border:1px solid var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce));border-radius:var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)))}.wy-embed-preview .wy-embed:first-child{display:block}.wy-embed-preview .wy-embed-caption{border-bottom-left-radius:var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)));border-bottom-right-radius:var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)))}.wy-embed-preview .wy-embed-actions{display:flex}.wy-embed-actions{display:none;justify-content:space-between;padding:calc(.5 * var(--wy-rem, 1rem)) calc(.25 * var(--wy-rem, 1rem))}.wy-embed-cycle{visibility:hidden}.wy-embed-show-cycle .wy-embed-cycle{visibility:visible}.wy-post-editor{padding:calc(.75 * var(--wy-rem, 1rem))}.wy-post-editor.wy-uploading .wy-icon-active-stack>:first-child{opacity:0}.wy-post-editor.wy-uploading .wy-icon-active-stack>:last-child{opacity:1}.wy-post-editor .wy-picker-list:not(:empty){margin-top:calc(.75 * var(--wy-rem, 1rem));border-top:1px solid var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce))}.wy-post-editor-inputs{display:flex;flex-direction:row;align-items:flex-end;min-height:calc(3.5 * var(--wy-rem, 1rem));flex-wrap:wrap}.wy-post-editor-inputs>:not(:last-child){margin-right:calc(.25 * var(--wy-rem, 1rem))}.wy-post-editor-inputs>:last-child{margin-left:auto}.wy-post-editor-buttons{flex:1 0 auto}.wy-post-editor-text{flex:1 1 100%;display:flex;flex-direction:column}.wy-post-editor-mention,.wy-post-editor-link{background:#00f;color:#fff}.wy-post-editor .cm-editor,.wy-post-editor-grow:after,.wy-post-editor-grow>textarea,.wy-post-editor-textfield{flex:1 1 100%;max-height:calc(11.25 * var(--wy-rem, 1rem));min-height:calc(4 * var(--wy-rem, 1rem));background-color:var(--wy-background, var(--wy-neutral-99, #fcfcff));color:var(--wy-on-background, var(--wy-neutral-10, #1a1c1e));border-radius:var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)));border:var(--wy-input-border-width, 1px) solid var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce));caret-color:var(--wy-primary, var(--wy-primary-40, #006399))}.wy-post-editor .cm-editor:focus,.wy-post-editor-grow:focus:after,.wy-post-editor-grow>textarea:focus,.wy-post-editor-textfield:focus{border-color:var(--wy-primary, var(--wy-primary-40, #006399))}.wy-post-editor .cm-editor .cm-content,.wy-post-editor-textcontent{font-family:var(--wy-input-font-family, var(--wy-font-family, inherit)),inherit;font-size:var(--wy-input-font-size, var(--wy-font-size-base, 1em));padding:var(--wy-input-padding-y, calc(.4375 * var(--wy-rem, 1rem))) var(--wy-input-padding-x, calc(.75 * var(--wy-rem, 1rem)))}.wy-post-editor-grow{display:grid}.wy-post-editor-grow:after,.wy-post-editor-grow>textarea{grid-area:1/1/2/2}.wy-post-editor-grow:after{content:attr(data-replicated-value) \" \";white-space:pre-wrap;visibility:hidden}.wy-post-editor-grow>textarea{resize:none;overflow:hidden}.wy-post-editor .cm-scroller{font-family:unset;line-height:1.5}.wy-post-editor .cm-widgetBuffer{vertical-align:unset}.wy-post-editor .cm-placeholder{color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e))}.wy-post-editor .cm-content{caret-color:var(--wy-on-background, var(--wy-neutral-10, #1a1c1e))}.wy-post-editor .cm-editor.cm-focused{--wy-component-color: var(--wy-on-background, var(--wy-neutral-10, #1a1c1e));color:var(--wy-component-color);border-color:var(--wy-primary, var(--wy-primary-40, #006399));outline:0}.wy-post-editor .cm-editor .cm-scroller{overflow:auto}.wy-scrollbars .wy-post-editor .cm-editor .cm-scroller{scrollbar-width:thin;scrollbar-color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e)) transparent}.wy-scrollbars .wy-post-editor .cm-editor .cm-scroller::-webkit-scrollbar{height:.625rem;width:.625rem;background:transparent;z-index:999}.wy-scrollbars .wy-post-editor .cm-editor .cm-scroller::-webkit-scrollbar-track{background:transparent}.wy-scrollbars .wy-post-editor .cm-editor .cm-scroller::-webkit-scrollbar-thumb{background-color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e));border:.125rem solid transparent;border-radius:.5rem;background-clip:padding-box;opacity:75%}.wy-scrollbars .wy-post-editor .cm-editor .cm-scroller::-webkit-scrollbar-thumb:hover{background-color:var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce));opacity:75%}.wy-scrollbars .wy-post-editor .cm-editor .cm-scroller::-webkit-scrollbar-thumb:window-inactive{background-color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e));opacity:50%}.wy-scrollbars .wy-post-editor .cm-editor .cm-scroller::-webkit-scrollbar-button:vertical:start:single-button{height:calc(.375 * var(--wy-rem, 1rem))}.wy-scrollbars .wy-post-editor .cm-editor .cm-scroller::-webkit-scrollbar-button:vertical:end:single-button{height:calc(.375 * var(--wy-rem, 1rem))}.wy-post-editor .wy-is-invalid+[data-editor-target] .cm-editor,.wy-post-editor .wy-is-invalid .cm-editor{border-color:var(--wy-error, var(--wy-error-40, #ba1824))!important}.wy-post-editor .cm-tooltip.cm-tooltip-autocomplete>ul{font-family:unset;max-height:calc(15 * var(--wy-rem, 1rem))}.wy-post-editor .cm-tooltip.cm-tooltip-autocomplete>ul>li{padding:0}.wy-post-editor .cm-tooltip{border:none;background-clip:padding-box;background-color:var(--wy-surface-2, var(--wy-surface-2-light, #eaedf3));color:var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e));border-radius:var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)));box-shadow:var(--wy-shadow-level1, 0 calc(.125 * var(--wy-rem, 1rem)) calc(.125 * var(--wy-rem, 1rem)) 0 rgba(0, 0, 0, .14), 0 calc(.1875 * var(--wy-rem, 1rem)) calc(.0625 * var(--wy-rem, 1rem)) calc(-.125 * var(--wy-rem, 1rem)) rgba(0, 0, 0, .2), 0 calc(.0625 * var(--wy-rem, 1rem)) calc(.3125 * var(--wy-rem, 1rem)) 0 rgba(0, 0, 0, .12));overflow:hidden;z-index:1000}.wy-post-editor .cm-tooltip-autocomplete ul li[aria-selected]{background:var(--wy-primary-container, var(--wy-primary-90, #cde5ff));color:unset}.wy-post-editor .cm-tooltip-autocomplete .cm-completionLabel{display:none}.wy-post-editor .cm-tooltip-autocomplete .wy-item-hover:hover,.wy-post-editor .cm-tooltip-autocomplete .wy-item-hover:focus{background:var(--wy-surface-variant, var(--wy-neutral-variant-90, #dee3eb))}.wy-post-editor .cm-tooltip-autocomplete .wy-avatar{width:calc(2 * var(--wy-rem, 1rem));height:calc(2 * var(--wy-rem, 1rem))}.wy-comments{padding:calc(.5 * var(--wy-rem, 1rem)) calc(.75 * var(--wy-rem, 1rem)) 0 calc(.75 * var(--wy-rem, 1rem));display:flex;flex-direction:column;gap:calc(1.25 * var(--wy-rem, 1rem))}.wy-comments-count{padding:0 calc(.5 * var(--wy-rem, 1rem));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wy-comment{--wy-component-background-color: var(--wy-surface-3, var(--wy-surface-3-light, #e3e7ee));--wy-component-color: var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e));--wy-component-border-radius: var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)));border-radius:var(--wy-component-border-radius);background-color:var(--wy-component-background-color);color:var(--wy-component-color);display:flex;flex-direction:column;gap:calc(.25 * var(--wy-rem, 1rem));padding:calc(.25 * var(--wy-rem, 1rem));position:relative}.wy-comment .wy-item{padding-left:calc(.75 * var(--wy-rem, 1rem));padding-right:calc(.75 * var(--wy-rem, 1rem))}.wy-comment .wy-item>.wy-avatar,.wy-comment .wy-item>wy-icon,.wy-comment .wy-item>.wy-icon-stack{margin-left:calc(-.25 * var(--wy-rem, 1rem))}.wy-comment .wy-reactions-line{position:absolute;bottom:calc(-1.125 * var(--wy-rem, 1rem));right:calc(.25 * var(--wy-rem, 1rem))}.wy-comment-body{flex:1 0 auto;z-index:1}.wy-comment-body .wy-image-grid,.wy-comment-body .wy-embed,.wy-comment-body .wy-content,.wy-comment-body .wy-list,.wy-comment-body .wy-poll{margin-bottom:calc(1 * var(--wy-rem, 1rem))}.wy-comment-body .wy-image-grid:last-child,.wy-comment-body .wy-embed:last-child,.wy-comment-body .wy-content:last-child,.wy-comment-body .wy-list:last-child,.wy-comment-body .wy-poll:last-child{margin-bottom:0}.wy-comment-content{padding:0 calc(.5 * var(--wy-rem, 1rem)) calc(.5 * var(--wy-rem, 1rem));display:flex;flex-direction:column}.wy-comment-editor .wy-spinner{display:none}.wy-comment-editor.wy-uploading .wy-spinner{display:block}.wy-comment-editor.wy-uploading [data-icon=plus]{display:none}.wy-comment-editor .wy-picker-list:not(:empty){border-top:1px solid var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce))}.wy-comment-editor-bottom{position:sticky;bottom:0;z-index:999;background-color:var(--wy-component-background-color);color:var(--wy-component-color)}.wy-comment-editor-inputs{display:flex;flex-direction:row;align-items:flex-end;padding:calc(.5 * var(--wy-rem, 1rem)) calc(.25 * var(--wy-rem, 1rem));min-height:calc(3.5 * var(--wy-rem, 1rem))}.wy-comment-editor-inputs>:not(:last-child){margin-right:calc(.25 * var(--wy-rem, 1rem))}.wy-comment-editor-buttons{flex:1 0 auto}.wy-comment-editor-text{flex:1 1 100%;display:flex;flex-direction:column}.wy-comment-editor-mention,.wy-comment-editor-link{background:#00f;color:#fff}.wy-comment-editor .cm-editor,.wy-comment-editor-grow:after,.wy-comment-editor-grow>textarea,.wy-comment-editor-textfield{flex:1 1 100%;max-height:calc(11.25 * var(--wy-rem, 1rem));background-color:var(--wy-background, var(--wy-neutral-99, #fcfcff));color:var(--wy-on-background, var(--wy-neutral-10, #1a1c1e));border-radius:calc(1.25 * var(--wy-rem, 1rem));border:var(--wy-input-border-width, 1px) solid var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce))}.wy-comment-editor .cm-editor:focus,.wy-comment-editor-grow:focus:after,.wy-comment-editor-grow>textarea:focus,.wy-comment-editor-textfield:focus{border-color:var(--wy-primary, var(--wy-primary-40, #006399))}.wy-comment-editor .cm-editor .cm-content,.wy-comment-editor-textcontent{font-family:var(--wy-input-font-family, var(--wy-font-family, inherit)),inherit;font-size:var(--wy-input-font-size, var(--wy-font-size-base, 1em));padding:var(--wy-input-padding-y, calc(.4375 * var(--wy-rem, 1rem))) var(--wy-input-padding-x, calc(.75 * var(--wy-rem, 1rem)))}.wy-comment-editor-grow{display:grid}.wy-comment-editor-grow:after,.wy-comment-editor-grow>textarea{grid-area:1/1/2/2}.wy-comment-editor-grow:after{content:attr(data-replicated-value) \" \";white-space:pre-wrap;visibility:hidden}.wy-comment-editor-grow>textarea{resize:none;overflow:hidden}.wy-comment-editor{position:relative}.wy-comment-editor .cm-scroller{font-family:unset;line-height:1.5}.wy-comment-editor .cm-widgetBuffer{vertical-align:unset}.wy-comment-editor .cm-placeholder{color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e))}.wy-comment-editor .cm-content{caret-color:var(--wy-on-background, var(--wy-neutral-10, #1a1c1e))}.wy-comment-editor .cm-editor.cm-focused{--wy-component-color: var(--wy-on-background, var(--wy-neutral-10, #1a1c1e));color:var(--wy-component-color);border-color:var(--wy-primary, var(--wy-primary-40, #006399));outline:0}.wy-comment-editor .cm-editor .cm-scroller{overflow:auto}.wy-scrollbars .wy-comment-editor .cm-editor .cm-scroller{scrollbar-width:thin;scrollbar-color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e)) transparent}.wy-scrollbars .wy-comment-editor .cm-editor .cm-scroller::-webkit-scrollbar{height:.625rem;width:.625rem;background:transparent;z-index:999}.wy-scrollbars .wy-comment-editor .cm-editor .cm-scroller::-webkit-scrollbar-track{background:transparent}.wy-scrollbars .wy-comment-editor .cm-editor .cm-scroller::-webkit-scrollbar-thumb{background-color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e));border:.125rem solid transparent;border-radius:.5rem;background-clip:padding-box;opacity:75%}.wy-scrollbars .wy-comment-editor .cm-editor .cm-scroller::-webkit-scrollbar-thumb:hover{background-color:var(--wy-outline-variant, var(--wy-neutral-variant-80, #c2c7ce));opacity:75%}.wy-scrollbars .wy-comment-editor .cm-editor .cm-scroller::-webkit-scrollbar-thumb:window-inactive{background-color:var(--wy-outline, var(--wy-neutral-variant-50, #72777e));opacity:50%}.wy-scrollbars .wy-comment-editor .cm-editor .cm-scroller::-webkit-scrollbar-button:vertical:start:single-button{height:calc(.375 * var(--wy-rem, 1rem))}.wy-scrollbars .wy-comment-editor .cm-editor .cm-scroller::-webkit-scrollbar-button:vertical:end:single-button{height:calc(.375 * var(--wy-rem, 1rem))}.wy-comment-editor .wy-is-invalid+.cm-editor,.wy-comment-editor .wy-is-invalid .cm-editor{border-color:var(--wy-error, var(--wy-error-40, #ba1824))!important}.wy-comment-editor .cm-tooltip.cm-tooltip-autocomplete>ul{font-family:unset;max-height:calc(15 * var(--wy-rem, 1rem))}.wy-comment-editor .cm-tooltip.cm-tooltip-autocomplete>ul>li{padding:0}.wy-comment-editor .cm-tooltip{border:none;background-clip:padding-box;background-color:var(--wy-surface-2, var(--wy-surface-2-light, #eaedf3));color:var(--wy-on-surface, var(--wy-neutral-10, #1a1c1e));border-radius:var(--wy-border-radius, calc(.5 * var(--wy-rem, 1rem)));box-shadow:var(--wy-shadow-level1, 0 calc(.125 * var(--wy-rem, 1rem)) calc(.125 * var(--wy-rem, 1rem)) 0 rgba(0, 0, 0, .14), 0 calc(.1875 * var(--wy-rem, 1rem)) calc(.0625 * var(--wy-rem, 1rem)) calc(-.125 * var(--wy-rem, 1rem)) rgba(0, 0, 0, .2), 0 calc(.0625 * var(--wy-rem, 1rem)) calc(.3125 * var(--wy-rem, 1rem)) 0 rgba(0, 0, 0, .12));overflow:hidden;z-index:1000}.wy-comment-editor .cm-tooltip-autocomplete ul li[aria-selected]{background:var(--wy-primary-container, var(--wy-primary-90, #cde5ff));color:unset}.wy-comment-editor .cm-tooltip-autocomplete .cm-completionLabel{display:none}.wy-comment-editor .cm-tooltip-autocomplete .wy-item-hover:hover,.wy-comment-editor .cm-tooltip-autocomplete .wy-item-hover:focus{background:var(--wy-surface-variant, var(--wy-neutral-variant-90, #dee3eb))}.wy-comment-editor .cm-tooltip-autocomplete .wy-avatar{width:calc(2 * var(--wy-rem, 1rem));height:calc(2 * var(--wy-rem, 1rem))}.wy-badge{display:inline-block;padding:.35em .65em;font-size:.75em;font-weight:var(--wy-font-weight-bold, );line-height:1;color:var(--wy-on-primary, var(--wy-white, #ffffff));text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:var(--wy-border-radius-pill, calc(50 * var(--wy-rem, 1rem)));background-color:var(--wy-primary, var(--wy-primary-40, #006399))}.wy-badge:empty{display:none}.wy-button{position:relative}.wy-button .wy-badge{font-size:var(--wy-font-size-xs, calc(.75 * var(--wy-font-size-base, 1em)));position:absolute;right:0;top:0;border-radius:calc(1 * var(--wy-rem, 1rem));margin:0;padding:calc(.25 * var(--wy-rem, 1rem));min-width:calc(1 * var(--wy-rem, 1rem));max-width:calc(2 * var(--wy-rem, 1rem));height:calc(1 * var(--wy-rem, 1rem));line-height:calc(.5 * var(--wy-rem, 1rem));display:block;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wy-button .wy-badge:empty{display:none}.wy-conversations{position:relative}.wy-conversation{display:flex;position:relative}.wy-conversation .wy-item-title{font-weight:400}.wy-conversation.wy-unread .wy-item-title{font-weight:700}.wy-conversation.wy-unread .wy-item-text,.wy-conversation.wy-unread .wy-meta{color:var(--wy-on-background, var(--wy-neutral-10, #1a1c1e));font-weight:600}.wy-conversation .wy-item-text .wy-typing-show{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:400}.wy-messenger-conversation{---background-color: var(--wy-background, var(--wy-neutral-99, #fcfcff));---color: var(--wy-on-background, var(--wy-neutral-10, #1a1c1e));background-color:var(---background-color);color:var(---color);overflow-anchor:none;display:flex;flex-direction:column;flex:1 0 min-content;height:100%;width:100%;min-height:0;min-width:0}",me=Fc(j1);var U1="M15,14C12.33,14 7,15.33 7,18V20H23V18C23,15.33 17.67,14 15,14M1,10V12H9V10M15,12A4,4 0 0,0 19,8A4,4 0 0,0 15,4A4,4 0 0,0 11,8A4,4 0 0,0 15,12Z",W1="M15,14C12.33,14 7,15.33 7,18V20H23V18C23,15.33 17.67,14 15,14M6,10V7H4V10H1V12H4V15H6V12H9V10M15,12A4,4 0 0,0 19,8A4,4 0 0,0 15,4A4,4 0 0,0 11,8A4,4 0 0,0 15,12Z",q1="M13 14H11V9H13M13 18H11V16H13M1 21H23L12 2L1 21Z",Q1="M13,13H11V7H13M13,17H11V15H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z",K1="M13 13H11V7H13M11 15H13V17H11M15.73 3H8.27L3 8.27V15.73L8.27 21H15.73L21 15.73V8.27L15.73 3Z",bp="M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z",Z1="M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z",Nf="M7.5,18A5.5,5.5 0 0,1 2,12.5A5.5,5.5 0 0,1 7.5,7H18A4,4 0 0,1 22,11A4,4 0 0,1 18,15H9.5A2.5,2.5 0 0,1 7,12.5A2.5,2.5 0 0,1 9.5,10H17V11.5H9.5A1,1 0 0,0 8.5,12.5A1,1 0 0,0 9.5,13.5H18A2.5,2.5 0 0,0 20.5,11A2.5,2.5 0 0,0 18,8.5H7.5A4,4 0 0,0 3.5,12.5A4,4 0 0,0 7.5,16.5H17V18H7.5Z",G1="M12,3A9,9 0 0,0 3,12H0L4,16L8,12H5A7,7 0 0,1 12,5A7,7 0 0,1 19,12A7,7 0 0,1 12,19C10.5,19 9.09,18.5 7.94,17.7L6.5,19.14C8.04,20.3 9.94,21 12,21A9,9 0 0,0 21,12A9,9 0 0,0 12,3M14,12A2,2 0 0,0 12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12Z",Vf="M21,19V20H3V19L5,17V11C5,7.9 7.03,5.17 10,4.29C10,4.19 10,4.1 10,4A2,2 0 0,1 12,2A2,2 0 0,1 14,4C14,4.1 14,4.19 14,4.29C16.97,5.17 19,7.9 19,11V17L21,19M14,21A2,2 0 0,1 12,23A2,2 0 0,1 10,21",Bf="M20.84,22.73L18.11,20H3V19L5,17V11C5,9.86 5.29,8.73 5.83,7.72L1.11,3L2.39,1.73L22.11,21.46L20.84,22.73M19,15.8V11C19,7.9 16.97,5.17 14,4.29C14,4.19 14,4.1 14,4A2,2 0 0,0 12,2A2,2 0 0,0 10,4C10,4.1 10,4.19 10,4.29C9.39,4.47 8.8,4.74 8.26,5.09L19,15.8M12,23A2,2 0 0,0 14,21H10A2,2 0 0,0 12,23Z",Y1="M15.39,14.04V14.04C15.39,12.62 14.24,11.47 12.82,11.47C11.41,11.47 10.26,12.62 10.26,14.04V14.04C10.26,15.45 11.41,16.6 12.82,16.6C14.24,16.6 15.39,15.45 15.39,14.04M17.1,14.04C17.1,16.4 15.18,18.31 12.82,18.31C11.19,18.31 9.77,17.39 9.05,16.04C8.33,17.39 6.91,18.31 5.28,18.31C2.94,18.31 1.04,16.43 1,14.11V14.11H1V7H1V7C1,6.56 1.39,6.18 1.86,6.18C2.33,6.18 2.7,6.56 2.71,7V7H2.71V10.62C3.43,10.08 4.32,9.76 5.28,9.76C6.91,9.76 8.33,10.68 9.05,12.03C9.77,10.68 11.19,9.76 12.82,9.76C15.18,9.76 17.1,11.68 17.1,14.04V14.04M7.84,14.04V14.04C7.84,12.62 6.69,11.47 5.28,11.47C3.86,11.47 2.71,12.62 2.71,14.04V14.04C2.71,15.45 3.86,16.6 5.28,16.6C6.69,16.6 7.84,15.45 7.84,14.04M22.84,16.96V16.96C22.95,17.12 23,17.3 23,17.47C23,17.73 22.88,18 22.66,18.15C22.5,18.26 22.33,18.32 22.15,18.32C21.9,18.32 21.65,18.21 21.5,18L19.59,15.47L17.7,18V18C17.53,18.21 17.28,18.32 17.03,18.32C16.85,18.32 16.67,18.26 16.5,18.15C16.29,18 16.17,17.72 16.17,17.46C16.17,17.29 16.23,17.11 16.33,16.96V16.96H16.33V16.96L18.5,14.04L16.33,11.11V11.11H16.33V11.11C16.22,10.96 16.17,10.79 16.17,10.61C16.17,10.35 16.29,10.1 16.5,9.93C16.89,9.65 17.41,9.72 17.7,10.09V10.09L19.59,12.61L21.5,10.09C21.76,9.72 22.29,9.65 22.66,9.93C22.89,10.1 23,10.36 23,10.63C23,10.8 22.95,10.97 22.84,11.11V11.11H22.84V11.11L20.66,14.04L22.84,16.96V16.96H22.84Z",X1="M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3M9 17H7V10H9V17M13 17H11V7H13V17M17 17H15V13H17V17Z",_p="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z",J1="M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z",e0="M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M12 20C7.59 20 4 16.41 4 12S7.59 4 12 4 20 7.59 20 12 16.41 20 12 20M16.59 7.58L10 14.17L7.41 11.59L6 13L10 17L18 9L16.59 7.58Z",t0="M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3M19,5V19H5V5H19Z",r0="M19,19H5V5H15V3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V11H19M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z",i0="M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z",n0="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z",o0="M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z",a0="M6.5 20Q4.22 20 2.61 18.43 1 16.85 1 14.58 1 12.63 2.17 11.1 3.35 9.57 5.25 9.15 5.88 6.85 7.75 5.43 9.63 4 12 4 14.93 4 16.96 6.04 19 8.07 19 11 20.73 11.2 21.86 12.5 23 13.78 23 15.5 23 17.38 21.69 18.69 20.38 20 18.5 20Z",s0="M9,22A1,1 0 0,1 8,21V18H4A2,2 0 0,1 2,16V4C2,2.89 2.9,2 4,2H20A2,2 0 0,1 22,4V16A2,2 0 0,1 20,18H13.9L10.2,21.71C10,21.9 9.75,22 9.5,22V22H9Z",c0="M9,22A1,1 0 0,1 8,21V18H4A2,2 0 0,1 2,16V4C2,2.89 2.9,2 4,2H20A2,2 0 0,1 22,4V16A2,2 0 0,1 20,18H13.9L10.2,21.71C10,21.9 9.75,22 9.5,22V22H9M10,16V19.08L13.08,16H20V4H4V16H10Z",l0="M15,9H5V5H15M12,19A3,3 0 0,1 9,16A3,3 0 0,1 12,13A3,3 0 0,1 15,16A3,3 0 0,1 12,19M17,3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V7L17,3Z",d0="M13,19A1,1 0 0,0 14,20H16V22H13.5C12.95,22 12,21.55 12,21C12,21.55 11.05,22 10.5,22H8V20H10A1,1 0 0,0 11,19V5A1,1 0 0,0 10,4H8V2H10.5C11.05,2 12,2.45 12,3C12,2.45 12.95,2 13.5,2H16V4H14A1,1 0 0,0 13,5V19Z",Hf="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z",jf="M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19M8.46,11.88L9.87,10.47L12,12.59L14.12,10.47L15.53,11.88L13.41,14L15.53,16.12L14.12,17.53L12,15.41L9.88,17.53L8.47,16.12L10.59,14L8.46,11.88M15.5,4L14.5,3H9.5L8.5,4H5V6H19V4H15.5Z",h0="M14,14H16L12,10L8,14H10V18H14V14M6,7H18V19C18,19.5 17.8,20 17.39,20.39C17,20.8 16.5,21 16,21H8C7.5,21 7,20.8 6.61,20.39C6.2,20 6,19.5 6,19V7M19,4V6H5V4H8.5L9.5,3H14.5L15.5,4H19Z",u0="M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z",y0="M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z",p0="M3 6.2L8 9.39L13 6.2L8 3L3 6.2M13 6.2L18 9.39L23 6.2L18 3L13 6.2M3 12.55L8 15.74L13 12.55L8 9.35L3 12.55M18 9.35L13 12.55L18 15.74L23 12.55L18 9.35M8.03 16.8L13.04 20L18.04 16.8L13.04 13.61L8.03 16.8Z",w0="M17.9,17.39C17.64,16.59 16.89,16 16,16H15V13A1,1 0 0,0 14,12H8V10H10A1,1 0 0,0 11,9V7H13A2,2 0 0,0 15,5V4.59C17.93,5.77 20,8.64 20,12C20,14.08 19.2,15.97 17.9,17.39M11,19.93C7.05,19.44 4,16.08 4,12C4,11.38 4.08,10.78 4.21,10.21L9,15V16A2,2 0 0,0 11,18M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z",f0="M20,8L12,13L4,8V6L12,11L20,6M20,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V6C22,4.89 21.1,4 20,4Z",m0="M13,9V3.5L18.5,9M6,2C4.89,2 4,2.89 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2H6Z",xp="M13,9H18.5L13,3.5V9M6,2H14L20,8V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V4C4,2.89 4.89,2 6,2M6.12,15.5L9.86,19.24L11.28,17.83L8.95,15.5L11.28,13.17L9.86,11.76L6.12,15.5M17.28,15.5L13.54,11.76L12.12,13.17L14.45,15.5L12.12,17.83L13.54,19.24L17.28,15.5Z",kp="M13,9H18.5L13,3.5V9M6,2H14L20,8V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V4C4,2.89 4.89,2 6,2M15,18V16H6V18H15M18,14V12H6V14H18Z",v0="M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M15.8,20H14L12,16.6L10,20H8.2L11.1,15.5L8.2,11H10L12,14.4L14,11H15.8L12.9,15.5L15.8,20M13,9V3.5L18.5,9H13Z",g0="M13,9H18.5L13,3.5V9M6,2H14L20,8V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V4C4,2.89 4.89,2 6,2M6,20H15L18,20V12L14,16L12,14L6,20M8,9A2,2 0 0,0 6,11A2,2 0 0,0 8,13A2,2 0 0,0 10,11A2,2 0 0,0 8,9Z",b0="M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M13,13H11V18A2,2 0 0,1 9,20A2,2 0 0,1 7,18A2,2 0 0,1 9,16C9.4,16 9.7,16.1 10,16.3V11H13V13M13,9V3.5L18.5,9H13Z",_0="M12.6,12.3H10.6V15.5H12.7C13.3,15.5 13.6,15.3 13.9,15C14.2,14.7 14.3,14.4 14.3,13.9C14.3,13.4 14.2,13.1 13.9,12.8C13.6,12.5 13.2,12.3 12.6,12.3M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M15.2,16C14.6,16.5 14.1,16.7 12.8,16.7H10.6V20H9V11H12.8C14.1,11 14.7,11.3 15.2,11.8C15.8,12.4 16,13 16,13.9C16,14.8 15.8,15.5 15.2,16M13,9V3.5L18.5,9H13Z",x0="M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M13.5,16V19H10.5V16H8L12,12L16,16H13.5M13,9V3.5L18.5,9H13Z",k0="M13,9H18.5L13,3.5V9M6,2H14L20,8V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V4C4,2.89 4.89,2 6,2M17,19V13L14,15.2V13H7V19H14V16.8L17,19Z",C0="M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M15.2,20H13.8L12,13.2L10.2,20H8.8L6.6,11H8.1L9.5,17.8L11.3,11H12.6L14.4,17.8L15.8,11H17.3L15.2,20M13,9V3.5L18.5,9H13Z",$0="M20,2H4C2.89,2 2,2.89 2,4V20C2,21.11 2.89,22 4,22H20C21.11,22 22,21.11 22,20V4C22,2.89 21.11,2 20,2M12,4L15,7H13V9H11V7H9M7,15L4,12L7,9V11H9V13H7M12,20L9,17H11V15H13V17H15M17,15V13H15V11H17V9L20,12",E0="M17 4H20C21.1 4 22 4.9 22 6V8H20V6H17V4M4 8V6H7V4H4C2.9 4 2 4.9 2 6V8H4M20 16V18H17V20H20C21.1 20 22 19.1 22 18V16H20M7 18H4V16H2V18C2 19.1 2.9 20 4 20H7V18M18 8H6V16H18V8Z",S0="M20 6H12L10 4H4C2.9 4 2 4.9 2 6V18C2 19.1 2.9 20 4 20H20C21.1 20 22 19.1 22 18V8C22 6.9 21.1 6 20 6M18 12H16V14H18V16H16V18H14V16H16V14H14V12H16V10H14V8H16V10H18V12Z",P0="M17,7H22V17H17V19A1,1 0 0,0 18,20H20V22H17.5C16.95,22 16,21.55 16,21C16,21.55 15.05,22 14.5,22H12V20H14A1,1 0 0,0 15,19V5A1,1 0 0,0 14,4H12V2H14.5C15.05,2 16,2.45 16,3C16,2.45 16.95,2 17.5,2H20V4H18A1,1 0 0,0 17,5V7M2,7H13V9H4V15H13V17H2V7M20,15V9H17V15H20Z",A0="M7.71,3.5L1.15,15L4.58,21L11.13,9.5M9.73,15L6.3,21H19.42L22.85,15M22.28,14L15.42,2H8.58L8.57,2L15.43,14H22.28Z",L0="M15.07,11.25L14.17,12.17C13.45,12.89 13,13.5 13,15H11V14.5C11,13.39 11.45,12.39 12.17,11.67L13.41,10.41C13.78,10.05 14,9.55 14,9C14,7.89 13.1,7 12,7A2,2 0 0,0 10,9H8A4,4 0 0,1 12,5A4,4 0 0,1 16,9C16,9.88 15.64,10.67 15.07,11.25M13,19H11V17H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z",M0="M13.5,8H12V13L16.28,15.54L17,14.33L13.5,12.25V8M13,3A9,9 0 0,0 4,12H1L4.96,16.03L9,12H6A7,7 0 0,1 13,5A7,7 0 0,1 20,12A7,7 0 0,1 13,19C11.07,19 9.32,18.21 8.06,16.94L6.64,18.36C8.27,20 10.5,21 13,21A9,9 0 0,0 22,12A9,9 0 0,0 13,3",O0="M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z",I0="M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z",T0="M7,10L12,15L17,10H7Z",R0="M7,15L12,10L17,15H7Z",D0="M22 7V16C22 17.1 21.1 18 20 18H6L2 22V4C2 2.9 2.9 2 4 2H14.1C14 2.3 14 2.7 14 3C14 5.8 16.2 8 19 8C20.1 8 21.2 7.6 22 7M16 3C16 4.7 17.3 6 19 6S22 4.7 22 3 20.7 0 19 0 16 1.3 16 3Z",F0="M18.21 10.29Q19 10.34 19.7 10.68 20.39 11 20.9 11.57 21.41 12.12 21.71 12.83 22 13.54 22 14.34 22 15.18 21.68 15.92 21.36 16.66 20.8 17.21 20.25 17.76 19.5 18.08 18.78 18.41 17.94 18.41H7Q5.97 18.41 5.06 18 4.15 17.61 3.47 16.94 2.79 16.26 2.4 15.35 2 14.44 2 13.41 2 12.59 2.26 11.83 2.5 11.08 3 10.45 3.44 9.82 4.08 9.35 4.72 8.88 5.5 8.63 5.87 8.5 6.21 8.5 6.56 8.43 6.93 8.41H6.94Q7.37 7.75 7.95 7.23 8.5 6.71 9.2 6.34 9.87 6 10.62 5.78 11.37 5.59 12.16 5.59 13.22 5.59 14.2 5.94 15.18 6.29 16 6.91 16.8 7.53 17.37 8.39 17.95 9.26 18.21 10.29M12.16 6.84Q11.05 6.84 10.06 7.3 9.06 7.75 8.36 8.6 8.73 8.7 9.07 8.85 9.4 9 9.73 9.2L13.71 11.58L16 10.62Q16.21 10.53 16.44 10.45 16.67 10.38 16.92 10.33 16.68 9.55 16.21 8.91 15.74 8.27 15.11 7.81 14.5 7.35 13.73 7.1 13 6.84 12.16 6.84M4 15.66L12.27 12.18L9.08 10.26Q8.59 9.97 8.06 9.81 7.5 9.66 6.95 9.66 6.19 9.66 5.5 9.96 4.84 10.26 4.34 10.77 3.84 11.29 3.54 11.97 3.25 12.65 3.25 13.41 3.25 14 3.45 14.59 3.64 15.19 4 15.66M17.94 17.16Q18.41 17.16 18.84 17 19.27 16.86 19.64 16.58L13.61 13L5.03 16.59Q5.47 16.86 5.97 17 6.47 17.16 7 17.16M20.45 15.61Q20.75 15 20.75 14.34 20.75 13.7 20.5 13.17 20.26 12.65 19.85 12.28 19.43 11.91 18.88 11.71 18.32 11.5 17.7 11.5 17.35 11.5 17 11.6 16.66 11.68 16.33 11.81 16 11.93 15.67 12.08 15.35 12.23 15.04 12.37Z",z0="M19,13H5V11H19V13Z",N0="M14,3V5H17.59L7.76,14.83L9.17,16.24L19,6.41V10H21V3M19,19H5V5H12V3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V12H19V19Z",xh="M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z",V0="M16,12V4H17V2H7V4H8V12L6,14V16H11.2V22H12.8V16H18V14L16,12Z",B0="M2,5.27L3.28,4L20,20.72L18.73,22L12.8,16.07V22H11.2V16H6V14L8,12V11.27L2,5.27M16,12L18,14V16H17.82L8,6.18V4H7V2H17V4H16V12Z",Uf="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z",H0="M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M13,7H11V11H7V13H11V17H13V13H17V11H13V7Z",Wf="M13,3A9,9 0 0,0 4,12H1L4.89,15.89L4.96,16.03L9,12H6A7,7 0 0,1 13,5A7,7 0 0,1 20,12A7,7 0 0,1 13,19C11.07,19 9.32,18.21 8.06,16.94L6.64,18.36C8.27,20 10.5,21 13,21A9,9 0 0,0 22,12A9,9 0 0,0 13,3Z",j0="M4,3H5V5H3V4A1,1 0 0,1 4,3M20,3A1,1 0 0,1 21,4V5H19V3H20M15,5V3H17V5H15M11,5V3H13V5H11M7,5V3H9V5H7M21,20A1,1 0 0,1 20,21H19V19H21V20M15,21V19H17V21H15M11,21V19H13V21H11M7,21V19H9V21H7M4,21A1,1 0 0,1 3,20V19H5V21H4M3,15H5V17H3V15M21,15V17H19V15H21M3,11H5V13H3V11M21,11V13H19V11H21M3,7H5V9H3V7M21,7V9H19V7H21Z",U0="M2,21L23,12L2,3V10L17,12L2,14V21Z",W0="M13,19H14A1,1 0 0,1 15,20H15.73L13,17.27V19M22,20V21.18L20.82,20H22M21,22.72L19.73,24L17.73,22H15A1,1 0 0,1 14,23H10A1,1 0 0,1 9,22H2V20H9A1,1 0 0,1 10,19H11V17H4A1,1 0 0,1 3,16V12A1,1 0 0,1 4,11H6.73L4.73,9H4A1,1 0 0,1 3,8V7.27L1,5.27L2.28,4L21,22.72M4,3H20A1,1 0 0,1 21,4V8A1,1 0 0,1 20,9H9.82L7,6.18V5H5.82L3.84,3C3.89,3 3.94,3 4,3M20,11A1,1 0 0,1 21,12V16A1,1 0 0,1 20,17H17.82L11.82,11H20M9,7H10V5H9V7M9,15H10V14.27L9,13.27V15M5,13V15H7V13H5Z",q0="M12 1L3 5V11C3 16.55 6.84 21.74 12 23C17.16 21.74 21 16.55 21 11V5L12 1M15.08 16L12 14.15L8.93 16L9.74 12.5L7.03 10.16L10.61 9.85L12 6.55L13.39 9.84L16.97 10.15L14.26 12.5L15.08 16Z",Q0="M18 21L14 17H17V7H14L18 3L22 7H19V17H22M2 19V17H12V19M2 13V11H9V13M2 7V5H6V7H2Z",K0="M12,17.27L18.18,21L16.54,13.97L22,9.24L14.81,8.62L12,2L9.19,8.62L2,9.24L7.45,13.97L5.82,21L12,17.27Z",Z0="M20.8 22.7L17.9 19.8L18.2 21L12 17.3L5.8 21L7.4 14L2 9.2L6.9 8.8L1.1 3L2.4 1.7L22.1 21.4L20.8 22.7M22 9.2L14.8 8.6L12 2L10 6.8L16.9 13.7L22 9.2Z",G0="M21,9L17,5V8H10V10H17V13M7,11L3,15L7,19V16H14V14H7V11Z",Y0="M9,3L5,7H8V14H10V7H13M16,17V10H14V17H11L15,21L19,17H16Z",X0="M23,10C23,8.89 22.1,8 21,8H14.68L15.64,3.43C15.66,3.33 15.67,3.22 15.67,3.11C15.67,2.7 15.5,2.32 15.23,2.05L14.17,1L7.59,7.58C7.22,7.95 7,8.45 7,9V19A2,2 0 0,0 9,21H18C18.83,21 19.54,20.5 19.84,19.78L22.86,12.73C22.95,12.5 23,12.26 23,12V10M1,21H5V9H1V21Z",J0="M5,9V21H1V9H5M9,21A2,2 0 0,1 7,19V9C7,8.45 7.22,7.95 7.59,7.59L14.17,1L15.23,2.06C15.5,2.33 15.67,2.7 15.67,3.11L15.64,3.43L14.69,8H21C22.11,8 23,8.9 23,10V12C23,12.26 22.95,12.5 22.86,12.73L19.84,19.78C19.54,20.5 18.83,21 18,21H9M9,19H18.03L21,12V10H12.21L13.34,4.68L9,9.03V19Z",e2="M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M9,8H11V17H9V8M13,8H15V17H13V8Z",t2="M9,16V10H5L12,3L19,10H15V16H9M5,20V18H19V20H5Z",r2="M17,10.5V7A1,1 0 0,0 16,6H4A1,1 0 0,0 3,7V17A1,1 0 0,0 4,18H16A1,1 0 0,0 17,17V13.5L21,17.5V6.5L17,10.5Z",i2="M3 5V19H20V5H3M7 7V9H5V7H7M5 13V11H7V13H5M5 15H7V17H5V15M18 17H9V15H18V17M18 13H9V11H18V13M18 9H9V7H18V9Z",n2="M4 5V18H21V5H4M14 7V10.5H11V7H14M6 7H9V10.5H6V7M6 16V12.5H9V16H6M11 16V12.5H14V16H11M19 16H16V12.5H19V16M16 10.5V7H19V10.5H16Z",o2="M2.28,3L1,4.27L2.47,5.74C2.04,6 1.61,6.29 1.2,6.6L3,9C3.53,8.6 4.08,8.25 4.66,7.93L6.89,10.16C6.15,10.5 5.44,10.91 4.8,11.4L6.6,13.8C7.38,13.22 8.26,12.77 9.2,12.47L11.75,15C10.5,15.07 9.34,15.5 8.4,16.2L12,21L14.46,17.73L17.74,21L19,19.72M12,3C9.85,3 7.8,3.38 5.9,4.07L8.29,6.47C9.5,6.16 10.72,6 12,6C15.38,6 18.5,7.11 21,9L22.8,6.6C19.79,4.34 16.06,3 12,3M12,9C11.62,9 11.25,9 10.88,9.05L14.07,12.25C15.29,12.53 16.43,13.07 17.4,13.8L19.2,11.4C17.2,9.89 14.7,9 12,9Z";var Cp=j0,$p={"shield-star":q0,"account-minus":U1,"account-plus":W1,alert:q1,"alert-circle":Q1,"alert-octagon":K1,attachment:Nf,back:bp,"backup-restore":G1,bell:Vf,"bell-off":Bf,check:_p,"check-circle-outline":e0,"checkbox-blank":t0,"checkbox-marked":r0,"circle-outline":i0,"check-circle":J1,close:n0,"close-circle":o0,comment:s0,"comment-outline":c0,confluence:"M.87 18.257c-.248.382-.53.875-.763 1.245a.764.764 0 0 0 .255 1.04l4.965 3.054a.764.764 0 0 0 1.058-.26c.199-.332.454-.763.733-1.221 1.967-3.247 3.945-2.853 7.508-1.146l4.957 2.337a.764.764 0 0 0 1.028-.382l2.364-5.346a.764.764 0 0 0-.382-1 599.851 599.851 0 0 1-4.965-2.361C10.911 10.97 5.224 11.185.87 18.257zM23.131 5.743c.249-.405.531-.875.764-1.25a.764.764 0 0 0-.256-1.034L18.675.404a.764.764 0 0 0-1.058.26c-.195.335-.451.763-.734 1.225-1.966 3.246-3.945 2.85-7.508 1.146L4.437.694a.764.764 0 0 0-1.027.382L1.046 6.422a.764.764 0 0 0 .382 1c1.039.49 3.105 1.467 4.965 2.361 6.698 3.246 12.392 3.029 16.738-4.04z","content-save":l0,"delete":Hf,"delete-restore":h0,"delete-forever":jf,"dots-vertical":u0,download:y0,earth:w0,"emoticon-plus":"M 19 0 L 19 3 L 16 3 L 16 5 L 19 5 L 19 8 L 21 8 L 21 5 L 24 5 L 24 3 L 21 3 L 21 0 L 19 0 z M 12 2 C 6.5 2 2 6.5 2 12 C 2 17.5 6.5 22 12 22 C 17.5 22 22 17.5 22 12 L 20 12 C 20 16.4 16.4 20 12 20 C 7.6 20 4 16.4 4 12 C 4 7.6 7.6 4 12 4 L 12 2 z M 8.5 8 C 7.7 8 7 8.7 7 9.5 C 7 10.3 7.7 11 8.5 11 C 9.3 11 10 10.3 10 9.5 C 10 8.7 9.3 8 8.5 8 z M 15.5 8 C 14.7 8 14 8.7 14 9.5 C 14 10.3 14.7 11 15.5 11 C 16.3 11 17 10.3 17 9.5 C 17 8.7 16.3 8 15.5 8 z M 6.9 14 C 7.7 16 9.7 17.5 12 17.5 C 14.3 17.5 16.3 16 17.1 14 L 6.9 14 z","fit-screen":E0,"fit-width":$0,"help-circle":L0,information:O0,magnify:I0,"menu-down":T0,"menu-up":R0,minus:z0,next:Z1,"open-in-new":N0,pencil:xh,pin:V0,unpin:B0,plus:Uf,"plus-circle-outline":H0,poll:X1,previous:bp,read:D0,restore:Wf,unread:_p,send:U0,"server-network-off":W0,sort:Q0,star:K0,unstar:Z0,"swap-horizontal":G0,textbox:P0,"thumb-up":X0,"thumb-up-outline":J0,trashcan:e2,video:r2,"view-list-outline":i2,"view-module-outline":n2,"wifi-off":o2,email:f0,file:m0,"file-upload":x0,"file-music":b0,"file-image":g0,"file-video":k0,"file-code":xp,"file-xml":xp,"file-document":kp,"file-word":C0,"file-excel":v0,"file-pdf":kp,"file-powerpoint":_0,"file-compressed":S0,dropbox:p0,onedrive:F0,box:Y1,"google-drive":A0,zoom:"m12 2c-5.6 0-10 4.5-10 10 0 5.6 4.5 10 10 10 5.5 0 9.9-4.5 9.9-10 .1-5.6-4.4-10-9.9-10zm2.6 13.1c0 .2-.1.3-.3.3h-6.9c-1.1 0-1.9-.8-1.9-1.9v-4.6c0-.2.1-.3.3-.3h6.9c1 0 1.9.8 1.9 1.9zm3.8.1c0 .4-.2.4-.5.2l-2.8-2.1v-2.6l2.8-2.1c.2-.2.5-.1.5.2z",cloud:a0},Ep={attach:Nf,create:Uf,"delete-forever":jf,edit:xh,modify:xh,rename:d0,replace:Y0,restore:Wf,subscribe:Vf,trash:Hf,unsubscribe:Bf,upload:t2,version:M0},Sp={dropbox:"#0061fe",onedrive:"#0078d4",box:"#0161d5","google-drive":"#1a73e8",zoom:"#4a8cff",confluence:"#2684ff"};function a2(r){return r.split("+")}function Pp(r){return r&&r in $p?$p[r]:""}function s2(r){return r&&r in Ep?Ep[r]:""}var Qe=qn(function(_Qn4){_inherits(_class3,_Qn4);function _class3(r){var _this211;_classCallCheck(this,_class3);var o;if(_this211=_callSuper(this,_class3,[r]),r.type!==Nc.ATTRIBUTE||r.name!=="class"||((o=r.strings)==null?void 0:o.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");return _possibleConstructorReturn(_this211)}_createClass(_class3,[{key:"render",value:function render(r){return" "+Object.keys(r).filter(function(o){return r[o]}).join(" ")+" "}},{key:"update",value:function update(r,_ref150){var _ref151=_slicedToArray(_ref150,1),o=_ref151[0];var s,B;if(this.st===void 0){this.st=new Set,r.strings!==void 0&&(this.nt=new Set(r.strings.join(" ").split(/\s/).filter(function(Y){return Y!==""})));for(var Y in o)o[Y]&&!((s=this.nt)!=null&&s.has(Y))&&this.st.add(Y);return this.render(o)}var Q=r.element.classList;var _iterator179=_createForOfIteratorHelper(this.st),_step179;try{for(_iterator179.s();!(_step179=_iterator179.n()).done;){var _Y5=_step179.value;_Y5 in o||(Q.remove(_Y5),this.st["delete"](_Y5))}}catch(err){_iterator179.e(err)}finally{_iterator179.f()}for(var _Y4 in o){var J=!!o[_Y4];J===this.st.has(_Y4)||(B=this.nt)!=null&&B.has(_Y4)||(J?(Q.add(_Y4),this.st.add(_Y4)):(Q.remove(_Y4),this.st["delete"](_Y4)))}return Ni}}]);return _class3}(Qn)),et=function et(r){return r!==null&&r!==void 0?r:O};var c2=Object.defineProperty,l2=Object.getOwnPropertyDescriptor,Rr=function Rr(r,o,s,B){for(var Q=B>1?void 0:B?l2(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&c2(o,s,Q),Q};var ar=function(_le3){_inherits(ar,_le3);function ar(){var _this212;_classCallCheck(this,ar);_this212=_callSuper(this,ar,arguments),_this212.color="",_this212.size=24,_this212.path=Cp,_this212.inline=!1,_this212.first=!1,_this212.last=!1,_this212.padded=!1;return _this212}_createClass(ar,[{key:"willUpdate",value:function willUpdate(r){if(r.has("name")&&this.name){var _a2=a2(this.name),_a3=_slicedToArray(_a2,2),o=_a3[0],s=_a3[1];this.path=Pp(o)||Cp,this.overlayPath=Pp(s)||this.overlayPath,this.nativeIconColor=this.color==="native"&&Sp[o]||void 0,this.nativeOverlayColor=s&&Sp[s]||void 0}}},{key:"render",value:function render(){var r;var o=this.kind?Pf(this.kind):this.kind,s=(r=this.ext)!=null&&r.startsWith(".")?this.ext.substring(1):this.ext,B=_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},"wy-kind-"+o,!!o),"wy-ext-"+s,!!s),"wy-icon-color-"+this.color,!!this.color),"wy-icon-first",this.first),"wy-icon-last",this.last),"wy-icon-padded",this.padded),"wy-icon-inline",this.inline),Q=this.size!==24&&this.size/16,Y=Q?"width: var(--wy-component-icon-width, calc(".concat(Q," * var(--wy-rem, 1rem))); height: var(--wy-component-icon-height, calc(").concat(Q," * var(--wy-rem, 1rem)));"):"";return this.overlayPath?v(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n <span class=\"wy-icon-stack\" style=\"","\">\n <svg class=\"wy-icon ","\" viewBox=\"0 0 24 24\" width=\"","\" height=\"","\">\n <path d=\"","\" style=\"fill: ","\" />\n <!--rect width=\"24\" height=\"24\" fill=\"transparent\" /-->\n </svg>\n <svg viewBox=\"0 0 24 24\" width=\"","\" height=\"","\">\n <path d=\"","\" style=\"fill: ","\" />\n <!--rect width=\"24\" height=\"24\" fill=\"transparent\" /-->\n </svg>\n </span>\n "])),Y,Qe(B),this.size,this.size,this.path,et(this.nativeIconColor),this.size/2,this.size/2,this.overlayPath,et(this.nativeOverlayColor)):v(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n <svg class=\"wy-icon ","\" style=\"","\" viewBox=\"0 0 24 24\" width=\"","\" height=\"","\">\n <path d=\"","\" style=\"fill: ","\" />\n <!--rect width=\"24\" height=\"24\" fill=\"transparent\" /-->\n </svg>\n "])),Qe(B),Y,this.size,this.size,this.path,et(this.nativeIconColor))}}]);return ar}(le);ar.styles=[me,Be(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["\n :host {\n display: contents;\n }\n "])))];Rr([m()],ar.prototype,"name",2);Rr([m()],ar.prototype,"color",2);Rr([m({type:Number})],ar.prototype,"size",2);Rr([m()],ar.prototype,"kind",2);Rr([m()],ar.prototype,"ext",2);Rr([m({attribute:!1})],ar.prototype,"path",2);Rr([m({attribute:!1})],ar.prototype,"overlayPath",2);Rr([m({type:Boolean})],ar.prototype,"inline",2);Rr([m({type:Boolean})],ar.prototype,"first",2);Rr([m({type:Boolean})],ar.prototype,"last",2);Rr([m({type:Boolean})],ar.prototype,"padded",2);Rr([K()],ar.prototype,"nativeIconColor",2);Rr([K()],ar.prototype,"nativeOverlayColor",2);ar=Rr([de("wy-icon")],ar);var d2=Object.defineProperty,h2=Object.getOwnPropertyDescriptor,Kc=function Kc(r,o,s,B){for(var Q=B>1?void 0:B?h2(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&d2(o,s,Q),Q};var Na=function(_le4){_inherits(Na,_le4);function Na(){var _this213;_classCallCheck(this,Na);_this213=_callSuper(this,Na,arguments),_this213.size=24,_this213.nospin=!1,_this213.overlay=!1,_this213.progress=NaN;return _this213}_createClass(Na,[{key:"createRenderRoot",value:function createRenderRoot(){return this}},{key:"render",value:function render(){var r=this.nospin&&this.progress&&100-this.progress||void 0;if(r!==void 0)return v(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["<svg\n viewBox=\"0 0 24 24\"\n width=","\n height=","\n transform=\"rotate(-90)\"\n data-icon=\"progress\"\n class=\"wy-icon wy-icon-primary\">\n <circle cx=\"12\" cy=\"12\" r=\"10\" stroke-linecap=\"butt\" stroke-width=\"2\" fill=\"none\" stroke=\"#eee\"></circle>\n <circle\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke-dasharray=\"100\"\n stroke-dashoffset=","\n stroke-linecap=\"butt\"\n stroke-width=\"2\"\n fill=\"none\"\n stroke=\"currentColor\"\n path-length=\"100\"></circle>\n </svg>"])),this.size,this.size,r);{var o={"wy-spin":!this.nospin,"wy-spinner-overlay":this.overlay};return v(_templateObject10||(_templateObject10=_taggedTemplateLiteral(["<svg\n class=\"wy-spinner ","\"\n width=","\n height=","\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <circle fill=\"none\" cx=\"12\" cy=\"12\" r=\"11\" stroke-linecap=\"butt\" stroke-width=\"2\" />\n </svg>"])),Qe(o),this.size,this.size)}}}]);return Na}(le);Kc([m({type:Number})],Na.prototype,"size",2);Kc([m({type:Boolean})],Na.prototype,"nospin",2);Kc([m({type:Boolean})],Na.prototype,"overlay",2);Kc([m({type:Number})],Na.prototype,"progress",2);Na=Kc([de("wy-spinner")],Na);var u2=Object.defineProperty,y2=Object.getOwnPropertyDescriptor,qu=function qu(r,o,s,B){for(var Q=B>1?void 0:B?y2(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&u2(o,s,Q),Q};var ec=function(_le5){_inherits(ec,_le5);function ec(){var _this214;_classCallCheck(this,ec);_this214=_callSuper(this,ec,arguments),_this214.noNetwork=!1,_this214.handleUpdate=function(){return _this214.requestUpdate()};return _this214}_createClass(ec,[{key:"willUpdate",value:function willUpdate(r){if(r.has("weavyContext")){var o=r.get("weavyContext");o&&o!==this.weavyContext&&o.removeNetworkListener(this.handleUpdate),this.weavyContext&&o!==this.weavyContext&&this.weavyContext.addNetworkListener(this.handleUpdate)}}},{key:"render",value:function render(){var r,o,s,B;return v(_templateObject11||(_templateObject11=_taggedTemplateLiteral(["\n <div class=\"wy-empty\">\n ","\n </div>\n "])),this.weavyContext&&!this.noNetwork&&((r=this.weavyContext)==null?void 0:r.network.state)==="unreachable"?v(_templateObject12||(_templateObject12=_taggedTemplateLiteral(["\n <div class=\"wy-content-icon\">\n <div class=\"wy-content-icon\">\n <wy-icon name=\"server-network-off\"></wy-icon>\n </div>\n <div class=\"wy-content-name\">\n <span>","</span>\n </div>\n <div class=\"wy-content-meta\">\n <wy-spinner ?hidden=","></wy-spinner>\n </div>\n </div>\n "])),K$1("The server is offline, try again in a few minutes..."),!((o=this.weavyContext)!=null&&o.network.isPending)):!this.noNetwork&&((s=this.weavyContext)==null?void 0:s.network.state)==="offline"?v(_templateObject13||(_templateObject13=_taggedTemplateLiteral(["\n <div class=\"wy-content-icon\">\n <div class=\"wy-content-icon\">\n <wy-icon name=\"wifi-off\"></wy-icon>\n </div>\n <div class=\"wy-content-name\">\n <span>","</span>\n </div>\n <div class=\"wy-content-meta\">\n <wy-spinner ?hidden=","></wy-spinner>\n </div>\n </div>\n "])),K$1("You are currently offline."),!((B=this.weavyContext)!=null&&B.network.isPending)):v(_templateObject14||(_templateObject14=_taggedTemplateLiteral(["\n <slot>\n <div class=\"wy-content-icon\">\n <div class=\"wy-content-icon\">\n <wy-icon name=\"information\"></wy-icon>\n </div>\n <div class=\"wy-content-name\">\n <slot name=\"title\">\n <span>","</span>\n </slot>\n </div>\n </div>\n </slot>\n "])),K$1("Nothing to see here yet.")))}},{key:"connectedCallback",value:function connectedCallback(){var r;_get(_getPrototypeOf(ec.prototype),"connectedCallback",this).call(this),(r=this.weavyContext)==null||r.addNetworkListener(this.handleUpdate)}},{key:"disconnectedCallback",value:function disconnectedCallback(){var r;_get(_getPrototypeOf(ec.prototype),"disconnectedCallback",this).call(this),(r=this.weavyContext)==null||r.removeNetworkListener(this.handleUpdate)}}]);return ec}(le);ec.styles=[me,Be(_templateObject15||(_templateObject15=_taggedTemplateLiteral(["\n :host {\n display: contents;\n }\n "])))];qu([Ge({context:Le,subscribe:!0}),K()],ec.prototype,"weavyContext",2);qu([m({type:Boolean})],ec.prototype,"noNetwork",2);ec=qu([de("wy-empty"),q()],ec);var p2=Object.defineProperty,w2=Object.getOwnPropertyDescriptor,Zo=function Zo(r,o,s,B){for(var Q=B>1?void 0:B?w2(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&p2(o,s,Q),Q};var cn=function(_le6){_inherits(cn,_le6);function cn(){var _this215;_classCallCheck(this,cn);_this215=_callSuper(this,cn,arguments),_this215.activeTypers=[],_this215.text="",_this215.typingTimeout=null,_this215.handleRealtimeTyping=function(r){r.entity.id===_this215.appId&&r.actor.id!==_this215.userId&&(_this215.setTypers(r.actor),_this215.updateTyping())},_this215.handleRealtimeStopTyping=function(r){var o=_this215.activeTypers;o.forEach(function(s,B){s.id===r.actor.id&&o.splice(B,1)}),_this215.updateTyping()};return _this215}_createClass(cn,[{key:"updateTyping",value:function updateTyping(){var _this216=this;var r;var o=this.activeTypers;this.typingTimeout&&(clearTimeout(this.typingTimeout),this.typingTimeout=null);var s=Date.now();if(o.forEach(function(B,Q){s-B.time>5*1e3&&o.splice(Q,1)}),o.length){var B=Math.round((s-Math.max.apply(null,o.map(function(it){return it.time})))/1e3)%3+1,Q=".".repeat(B),Y=o.map(function(it){return it.display_name}).sort();var J="";if(Y.length===1){var it=Y[0];J=K$1(c(_templateObject16||(_templateObject16=_taggedTemplateLiteral([""," is typing",""])),it,Q),{desc:"A is typing..."})}else{var _it10=new Intl.ListFormat((r=this.weavyContext)==null?void 0:r.locale,{style:"long",type:"conjunction"}).format(Y);J=K$1(c(_templateObject17||(_templateObject17=_taggedTemplateLiteral([""," are typing",""])),_it10,Q),{desc:"A, B and C are typing..."})}this.text=J,this.typingTimeout=window.setTimeout(function(){return _this216.updateTyping()},1e3)}else this.text=""}},{key:"setTypers",value:function setTypers(r){var o=this.activeTypers;o.forEach(function(B,Q){B.id===r.id&&o.splice(Q,1)});var s=_objectSpread(_objectSpread({},r),{},{time:Date.now()});o.push(s)}},{key:"willUpdate",value:function willUpdate(r){(r.has("weavyContext")||r.has("appId")||r.has("userId"))&&this.weavyContext&&(this.activeTypers=[],r.get("appId")&&r.get("appId")!==this.appId&&(this.weavyContext.unsubscribe("a".concat(this.appId),"typing",this.handleRealtimeTyping),this.weavyContext.unsubscribe("a".concat(this.appId),"message_created",this.handleRealtimeStopTyping)),this.weavyContext.subscribe("a".concat(this.appId),"typing",this.handleRealtimeTyping),this.weavyContext.subscribe("a".concat(this.appId),"message_created",this.handleRealtimeStopTyping))}},{key:"render",value:function render(){return this.text?v(_templateObject18||(_templateObject18=_taggedTemplateLiteral(["<span>","</span>"])),this.text):v(_templateObject19||(_templateObject19=_taggedTemplateLiteral(["<slot></slot>"])))}}]);return cn}(le);cn.styles=me;Zo([Ge({context:Le,subscribe:!0}),K()],cn.prototype,"weavyContext",2);Zo([m({attribute:!0,type:Number})],cn.prototype,"appId",2);Zo([m({attribute:!0,type:Number})],cn.prototype,"userId",2);Zo([K()],cn.prototype,"activeTypers",2);Zo([K()],cn.prototype,"text",2);Zo([K()],cn.prototype,"typingTimeout",2);cn=Zo([de("wy-typing"),q()],cn);var qf=function(r){return r.Active="active",r.Away="away",r}(qf||{}),f2=Object.defineProperty,m2=Object.getOwnPropertyDescriptor,Qu=function Qu(r,o,s,B){for(var Q=B>1?void 0:B?m2(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&f2(o,s,Q),Q};var tc=function(_le7){_inherits(tc,_le7);function tc(){var _this217;_classCallCheck(this,tc);_this217=_callSuper(this,tc,arguments),_this217.placement="avatar";return _this217}_createClass(tc,[{key:"render",value:function render(){var r={"wy-presence":!0,"wy-presence-active":this.status===qf.Active,"wy-presence-in-text":this.placement==="text"};return v(_templateObject20||(_templateObject20=_taggedTemplateLiteral([" <span class="," data-presence-id=","></span> "])),Qe(r),this.id)}}]);return tc}(le);tc.styles=[me,Be(_templateObject21||(_templateObject21=_taggedTemplateLiteral(["\n :host {\n display: contents;\n }\n "])))];Qu([m()],tc.prototype,"placement",2);Qu([m()],tc.prototype,"status",2);tc=Qu([de("wy-presence")],tc);var kh=function(_Qn5){_inherits(kh,_Qn5);function kh(o){var _this218;_classCallCheck(this,kh);if(_this218=_callSuper(this,kh,[o]),_this218.it=O,o.type!==Nc.CHILD)throw Error(_this218.constructor.directiveName+"() can only be used in child bindings");return _possibleConstructorReturn(_this218)}_createClass(kh,[{key:"render",value:function render(o){if(o===O||o==null)return this._t=void 0,this.it=o;if(o===Ni)return o;if(typeof o!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(o===this.it)return this._t;this.it=o;var s=[o];return s.raw=s,this._t={_$litType$:this.constructor.resultType,strings:s,values:[]}}}]);return kh}(Qn);kh.directiveName="unsafeHTML",kh.resultType=1;var Do=qn(kh),Pe=function Pe(r,o){var s=arguments.length>2&&arguments[2]!==undefined?arguments[2]:!0;return r&&o?r.indexOf(o)!=-1&&s:!1},Ch=qn(function(_Qn6){_inherits(_class4,_Qn6);function _class4(){var _this219;_classCallCheck(this,_class4);_this219=_callSuper(this,_class4,arguments),_this219.key=O;return _this219}_createClass(_class4,[{key:"render",value:function render(r,o){return this.key=r,o}},{key:"update",value:function update(r,_ref152){var _ref153=_slicedToArray(_ref152,2),o=_ref153[0],s=_ref153[1];return o!==this.key&&(Il(r),this.key=o),s}}]);return _class4}(Qn));var v2=Object.defineProperty,g2=Object.getOwnPropertyDescriptor,ui=function ui(r,o,s,B){for(var Q=B>1?void 0:B?g2(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&v2(o,s,Q),Q};var ln=function(_le8){_inherits(ln,_le8);function ln(){var _this220;_classCallCheck(this,ln);_this220=_callSuper(this,ln,arguments),_this220.size=32,_this220.src="",_this220.name="",_this220.isBot=!1,_this220.avatarClass="";return _this220}_createClass(ln,[{key:"render",value:function render(){var r=this.size/16;var o;return!this.src&&this.name&&(o=Hb(this.name)),v(_templateObject22||(_templateObject22=_taggedTemplateLiteral(["<div class=",">\n ","\n ","\n </div>"])),Qe(_defineProperty({"wy-avatar-presence":!0},this.avatarClass,!0)),this.src?v(_templateObject23||(_templateObject23=_taggedTemplateLiteral(["\n <img\n alt=\"\"\n title=\"","\"\n class=\"wy-avatar wy-avatar-img\"\n style=\"--wy-component-avatar-size: calc("," * var(--wy-rem, 1rem));\"\n height=\"","\"\n width=\"","\"\n src=\"","\"\n decoding=\"async\"\n loading=\"lazy\"\n />\n "])),et(this.title||this.name),r,this.size,this.size,this.src):v(_templateObject24||(_templateObject24=_taggedTemplateLiteral(["\n <div\n class=\"wy-avatar wy-avatar-initials\"\n style=\"--wy-component-avatar-size: calc("," * var(--wy-rem, 1rem));\"\n title=\"","\">\n <span>","</span>\n </div>\n "])),r,et(this.title||this.name),o),this.presence?v(_templateObject25||(_templateObject25=_taggedTemplateLiteral(["<wy-presence .status="," id=","></wy-presence>"])),this.presence,this.id):O)}}]);return ln}(le);ln.styles=[me,Be(_templateObject26||(_templateObject26=_taggedTemplateLiteral(["\n :host {\n display: contents;\n }\n "])))];ui([m({type:Number})],ln.prototype,"size",2);ui([m()],ln.prototype,"src",2);ui([m()],ln.prototype,"name",2);ui([m({type:Boolean})],ln.prototype,"isBot",2);ui([m()],ln.prototype,"avatarClass",2);ui([m()],ln.prototype,"presence",2);ln=ui([de("wy-avatar")],ln);var Fo=function(_le9){_inherits(Fo,_le9);function Fo(){var _this221;_classCallCheck(this,Fo);_this221=_callSuper(this,Fo,arguments),_this221.size=32,_this221.name="";return _this221}_createClass(Fo,[{key:"render",value:function render(){var _this222=this;var r;var o=this.size/16,s=(((r=this.members)==null?void 0:r.data)||[]).filter(function(Y){return Y.id!==_this222.user.id}).slice(0,2).reverse(),B=(s==null?void 0:s.shift())||this.user,Q=(s==null?void 0:s.shift())||(B!==this.user?this.user:void 0);return v(_templateObject27||(_templateObject27=_taggedTemplateLiteral(["\n <div class=\"wy-avatar-group\" title="," style=\"--wy-component-avatar-size: calc("," * var(--wy-rem, 1rem));\">\n <wy-avatar\n .src=","\n .name=","\n size=","></wy-avatar>\n <wy-avatar\n .src=","\n .name=","\n size=","></wy-avatar>\n </div>\n "])),this.name,o,Q==null?void 0:Q.avatar_url,Q==null?void 0:Q.display_name,this.size*2/3,B.avatar_url,B.display_name,this.size*2/3)}}]);return Fo}(le);Fo.styles=[me,Be(_templateObject28||(_templateObject28=_taggedTemplateLiteral(["\n :host {\n display: contents;\n }\n "])))];ui([m({type:Number})],Fo.prototype,"size",2);ui([m({type:Object})],Fo.prototype,"user",2);ui([m({type:Object,attribute:!1})],Fo.prototype,"members",2);ui([m()],Fo.prototype,"name",2);Fo=ui([de("wy-avatar-group")],Fo);var b2=Object.defineProperty,_2=Object.getOwnPropertyDescriptor,cs=function cs(r,o,s,B){for(var Q=B>1?void 0:B?_2(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&b2(o,s,Q),Q};var Nn=function(_le10){_inherits(Nn,_le10);function Nn(){var _this223;_classCallCheck(this,Nn);_this223=_callSuper(this,Nn,arguments),_this223.kind="filled",_this223.active=!1,_this223.buttonClass="",_this223.disabled=!1;return _this223}_createClass(Nn,[{key:"render",value:function render(){var r,o;var s=_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},((r=this.buttonClass)==null?void 0:r.toString())||"",!0),"wy-active",!!this.active),"wy-button-inline",this.kind==="inline"),"wy-button-icon",!!((o=this.kind)!=null&&o.startsWith("icon"))),"wy-button-icon-inline",this.kind==="icon-inline"),"wy-button-link",this.kind==="link");return v(_templateObject29||(_templateObject29=_taggedTemplateLiteral(["\n <button\n class=\"wy-button ","\"\n type=","\n ?disabled=",">\n <slot></slot>\n </button>\n "])),Qe(s),et(this.type),this.disabled)}}]);return Nn}(le);Nn.styles=[me,Be(_templateObject30||(_templateObject30=_taggedTemplateLiteral(["\n /*:host {\n display: contents \n }*/\n "])))];cs([m()],Nn.prototype,"type",2);cs([m()],Nn.prototype,"kind",2);cs([m({type:Boolean})],Nn.prototype,"active",2);cs([m({type:String})],Nn.prototype,"buttonClass",2);cs([m({type:Boolean,reflect:!0})],Nn.prototype,"disabled",2);Nn=cs([de("wy-button")],Nn);var x2=Object.defineProperty,k2=Object.getOwnPropertyDescriptor,Ku=function Ku(r,o,s,B){for(var Q=B>1?void 0:B?k2(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&x2(o,s,Q),Q};var rc=function(_le11){_inherits(rc,_le11);function rc(){var _this224;_classCallCheck(this,rc);_this224=_callSuper(this,rc,arguments),_this224.enableSwap=!1;return _this224}_createClass(rc,[{key:"createRenderRoot",value:function createRenderRoot(){return this}},{key:"dispatchRemove",value:function dispatchRemove(r){var o=new CustomEvent("embed-remove",{detail:{id:r}});return this.dispatchEvent(o)}},{key:"dispatchSwap",value:function dispatchSwap(){var r=new CustomEvent("embed-swap",{detail:{}});return this.dispatchEvent(r)}},{key:"render",value:function render(){var _this225=this;var r=this.embed.type==="photo"&&this.embed.provider_name.toLocaleLowerCase()==="giphy",o=!this.embed.html&&!r;return v(_templateObject31||(_templateObject31=_taggedTemplateLiteral(["\n <div class=\"wy-embed-actions\">\n ","\n\n <wy-button kind=\"icon\" @click=","\n ><wy-icon name=\"close-circle\"></wy-icon\n ></wy-button>\n </div>\n\n ","\n ","\n ","\n ","\n ","\n ","\n "])),this.enableSwap?v(_templateObject32||(_templateObject32=_taggedTemplateLiteral(["<wy-button kind=\"icon\" @click=","\n ><wy-icon name=\"swap-horizontal\"></wy-icon\n ></wy-button>"])),function(){return _this225.dispatchSwap()}):v(_templateObject33||(_templateObject33=_taggedTemplateLiteral(["<wy-button buttonClass=\"wy-embed-cycle\"></wy-button>"]))),function(){return _this225.dispatchRemove(_this225.embed.id)},this.embed.type==="audio"?v(_templateObject34||(_templateObject34=_taggedTemplateLiteral(["<div class=\"wy-embed-audio\"></div>"]))):O,this.embed.type==="video"&&this.embed.html?v(_templateObject35||(_templateObject35=_taggedTemplateLiteral(["<div class=\"wy-embed-video\"><div>","</div></div>"])),Do(this.embed.html)):O,this.embed.type==="rich"?v(_templateObject36||(_templateObject36=_taggedTemplateLiteral(["<div class=\"wy-embed-rich\"></div>"]))):O,this.embed.type==="photo"&&this.embed.thumbnail_url?v(_templateObject37||(_templateObject37=_taggedTemplateLiteral(["\n <div\n class=",">\n <a href="," target=\"_blank\">\n <img\n src=","\n width=","\n height=","\n alt=\"\" />\n </a>\n </div>\n "])),Qe({"wy-embed-photo":!0,"wy-embed-photo-sm":(this.embed.thumbnail_width||0)<250}),this.embed.original_url,this.embed.thumbnail_url,this.embed.thumbnail_width,this.embed.thumbnail_height):O,this.embed.type!=="audio"&&this.embed.type!=="video"&&this.embed.type!=="rich"&&this.embed.type!=="photo"&&this.embed.thumbnail_url?v(_templateObject38||(_templateObject38=_taggedTemplateLiteral(["\n <div\n class=",">\n <a href="," target=\"_blank\">\n <img\n src=","\n width=","\n height=","\n alt=\"\" />\n </a>\n </div>\n "])),Qe({"wy-embed-photo":!0,"wy-embed-photo-sm":(this.embed.thumbnail_width||0)<250}),this.embed.original_url,this.embed.thumbnail_url,this.embed.thumbnail_width,this.embed.thumbnail_height):O,o?v(_templateObject39||(_templateObject39=_taggedTemplateLiteral([" <div class=\"wy-embed-caption\">\n <a class=\"wy-embed-link\" href="," target=\"_blank\">","</a>\n ","\n ","\n </div>"])),this.embed.original_url,this.embed.host,this.embed.title?v(_templateObject40||(_templateObject40=_taggedTemplateLiteral(["<div class=\"wy-embed-title\">","</div>"])),this.embed.title):O,this.embed.description?v(_templateObject41||(_templateObject41=_taggedTemplateLiteral(["<div class=\"wy-embed-description\">","</div>"])),this.embed.description):O):O)}}]);return rc}(le);rc.styles=me;Ku([m({attribute:!1})],rc.prototype,"embed",2);Ku([m({type:Boolean,attribute:!1})],rc.prototype,"enableSwap",2);rc=Ku([de("wy-embed")],rc);var pd=function pd(r){var o=arguments.length>1&&arguments[1]!==undefined?arguments[1]:3;var s=[" B"," KB"," MB"," GB"," TB"," PB"," EB"," ZB"," YB"];var B=r,Q=0;for(;Q<s.length-1&&B>=1024;)B=100*B/1024/100,Q++;return B.toLocaleString(void 0,{maximumSignificantDigits:o})+s[Q]};function Li(r){return r.lastIndexOf(".")===-1?".":(r.substring(r.lastIndexOf("."),r.length)||r).toLowerCase()}function Qf(r){switch(r){case".aac":case".aif":case".aiff":case".au":case".gsm":case".m4a":case".mid":case".midi":case".mka":case".mp3":case".oga":case".ogg":case".ra":case".ram":case".snd":case".spx":case".wav":case".wma":return!0;default:return!1}}function C2(r){switch(r){case".ai":case".apng":case".bmp":case".emf":case".eps":case".gif":case".heic":case".ico":case".jpg":case".jpeg":case".png":case".psd":case".svg":case".tif":case".tiff":case".webp":case".wmf":return!0;default:return!1}}function $2(r){switch(Li(r)){case".apng":case".bmp":case".gif":case".ico":case".jpg":case".jpeg":case".png":case".svg":case".webp":return!0;default:return!1}}function Kf(r){switch(r){case".3g2":case".asx":case".asf":case".avi":case".flv":case".mk3d":case".mkv":case".mov":case".mp4":case".mpeg":case".mpg":case".ogm":case".ogv":case".ogx":case".qt":case".rm":case".rv":case".smi":case".smil":case".swf":case".webm":case".wmv":case".xaml":return!0;default:return!1}}function E2(r){switch(r){case".markdown":case".md":return!0;default:return!1}}function Zf(r){switch(r){case".htm":case".html":case".xhtml":case".xml":return!0;default:return!1}}function Zu(r){if(Zf(r))return!0;switch(r){case".as":case".as3":case".asm":case".aspx":case".bat":case".c":case".cc":case".cmake":case".coffee":case".cpp":case".cs":case".css":case".cxx":case".diff":case".erb":case".erl":case".groovy":case".gvy":case".h":case".haml":case".hh":case".hpp":case".hxx":case".java":case".js":case".json":case".jsx":case".less":case".lst":case".m":case".make":case".ml":case".mm":case".out":case".patch":case".php":case".pl":case".plist":case".properties":case".py":case".rb":case".sass":case".scala":case".scm":case".script":case".scss":case".sh":case".sml":case".sql":case".vb":case".vi":case".vim":case".xsd":case".xsl":case".yaml":case".yml":return!0;default:return!1}}function Gf(r){if(Zu(r)||E2(r))return!0;switch(r){case".txt":return!0;default:return!1}}function Zn(r){var o=Li(r);if(o==="")return{icon:"file"};if(Qf(o))return{icon:"file-music",color:"indigo"};if(C2(o))return{icon:"file-image",color:"cyan"};if(Kf(o))return{icon:"file-video",color:"pink"};if(Zf(o))return{icon:"file-xml",color:"purple"};if(Zu(o))return{icon:"file-code",color:"purple"};if(Gf(o))return{icon:"file-document"};switch(o){case".7z":case".zip":return{icon:"file-compressed",color:"orange"};case".doc":case".docm":case".docx":case".dotm":case".dotx":return{icon:"file-word",color:"native"};case".eml":case".msg":return{icon:"email",color:""};case".xls":case".xlsm":case".xlsx":case".xltx":return{icon:"file-excel",color:"native"};case".pdf":return{icon:"file-pdf",color:"native"};case".ppt":case".pptm":case".pptx":case".potx":return{icon:"file-powerpoint",color:"native"};case".pages":return{icon:"file",color:"orange"};case".numbers":return{icon:"file",color:"green"};case".keynote":return{icon:"file",color:"blue"}}return{icon:"file"}}function S2(r){var o=Li(r);return o===""?"none":$2(o)?"image":Zu(o)?"code":Gf(o)?"text":Qf(o)?"audio":Kf(o)?"video":"none"}function ls(r){switch(r){case"Google Drive":return"google-drive";case"Dropbox":return"dropbox";case"OneDrive":return"onedrive";case"Box":return"box";case"Confluence":return"confluence";default:return""}}function Gu(r){var o="file";switch(Li(r)){case".7z":case".zip":o="archive";break;case".aac":case".aif":case".aiff":case".au":case".gsm":case".m4a":case".mid":case".midi":case".mka":case".mp3":case".oga":case".ogg":case".ra":case".ram":case".snd":case".spx":case".wav":case".wma":o="audio";break;case".c":case".cgi":case".cpp":case".cs":case".cshtml":case".css":case".html":case".java":case".js":case".json":case".less":case".php":case".pl":case".ps1":case".py":case".rb":case".rs":case".scss":case".sh":case".swift":case".sql":case".ts":case".xml":case".yaml":case".yml":o="code";break;case".doc":case".docm":case".docx":case".dotm":case".dotx":case".gdoc":case".pages":case".pdf":o="document";break;case".eml":case".msg":o="email";break;case".gslides":case".keynote":case".ppt":case".pptm":case".pptx":case".potx":o="presentation";break;case".gsheet":case".numbers":case".xls":case".xlsm":case".xlsx":case".xltx":o="spreadsheet";break;case".ai":case".apng":case".bmp":case".emf":case".eps":case".gif":case".heic":case".ico":case".jpg":case".jpeg":case".png":case".psd":case".svg":case".tif":case".tiff":case".webp":case".wmf":o="image";break;case".md":case".markdown":case".txt":o="text";break;case".3g2":case".asx":case".asf":case".avi":case".flv":case".mk3d":case".mkv":case".mov":case".mp4":case".mpeg":case".mpg":case".ogm":case".ogv":case".ogx":case".qt":case".rm":case".rv":case".smi":case".smil":case".swf":case".webm":case".wmv":case".xaml":o="video";break}return o}function Yu(r){var o=r.target,s=o==null?void 0:o.value.lastIndexOf(".");s===-1?o==null||o.select():o==null||o.setSelectionRange(0,s)}var P2=Object.defineProperty,A2=Object.getOwnPropertyDescriptor,ds=function ds(r,o,s,B){for(var Q=B>1?void 0:B?A2(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&P2(o,s,Q),Q};var Vn=function(_le12){_inherits(Vn,_le12);function Vn(){var _this226;_classCallCheck(this,Vn);_this226=_callSuper(this,Vn,arguments),_this226.name="",_this226.previewUrl="",_this226.url="",_this226.size=0;return _this226}_createClass(Vn,[{key:"render",value:function render(){var r=this.size&&this.size>0?pd(this.size):null,o=Li(this.name);var _Zn=Zn(this.name),s=_Zn.icon;var B=Gu(this.name),Q=ls(this.provider);return Q&&(s="".concat(s,"+").concat(Q)),v(_templateObject42||(_templateObject42=_taggedTemplateLiteral(["\n <a href="," class=\"wy-item wy-item-lg\" target=\"_blank\" title=",">\n <wy-icon name="," size=\"48\" kind="," ext=","></wy-icon>\n <div class=\"wy-item-body \">\n <div class=\"wy-item-title\">","</div>\n ","\n </div>\n </a>\n "])),this.previewUrl||this.url,this.name,s,B,o,this.name,r?v(_templateObject43||(_templateObject43=_taggedTemplateLiteral(["<div class=\"wy-item-text\" title=\"{fileSize}\">","</div>"])),r):"")}}]);return Vn}(le);Vn.styles=me;ds([m()],Vn.prototype,"name",2);ds([m()],Vn.prototype,"previewUrl",2);ds([m()],Vn.prototype,"url",2);ds([m()],Vn.prototype,"provider",2);ds([m({type:Number})],Vn.prototype,"size",2);Vn=ds([de("wy-attachment")],Vn);var Yf="important",L2=" !"+Yf,Hl=qn(function(_Qn7){_inherits(_class5,_Qn7);function _class5(r){var _this227;_classCallCheck(this,_class5);var o;if(_this227=_callSuper(this,_class5,[r]),r.type!==Nc.ATTRIBUTE||r.name!=="style"||((o=r.strings)==null?void 0:o.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");return _possibleConstructorReturn(_this227)}_createClass(_class5,[{key:"render",value:function render(r){return Object.keys(r).reduce(function(o,s){var B=r[s];return B==null?o:o+"".concat(s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase(),":").concat(B,";")},"")}},{key:"update",value:function update(r,_ref154){var _ref155=_slicedToArray(_ref154,1),o=_ref155[0];var s=r.element.style;if(this.ft===void 0)return this.ft=new Set(Object.keys(o)),this.render(o);var _iterator180=_createForOfIteratorHelper(this.ft),_step180;try{for(_iterator180.s();!(_step180=_iterator180.n()).done;){var _B9=_step180.value;o[_B9]==null&&(this.ft["delete"](_B9),_B9.includes("-")?s.removeProperty(_B9):s[_B9]=null)}}catch(err){_iterator180.e(err)}finally{_iterator180.f()}for(var B in o){var Q=o[B];if(Q!=null){this.ft.add(B);var Y=typeof Q=="string"&&Q.endsWith(L2);B.includes("-")||Y?s.setProperty(B,Y?Q.slice(0,-11):Q,Y?Yf:""):s[B]=Q}}return Ni}}]);return _class5}(Qn));function $h(r){var o=r;o&&(o.complete&&o.naturalHeight!==0?o.classList.contains("wy-loading")?o.decode().then(function(){o.classList.add("wy-loaded")}):o.classList.add("wy-loading","wy-loaded"):o.classList.add("wy-loading"))}function Eh(r){var o=r.target;o.tagName==="IMG"&&o.classList.contains("wy-loading")&&!o.classList.contains("wy-loaded")&&o.classList.add("wy-loaded")}var M2=Object.defineProperty,O2=Object.getOwnPropertyDescriptor,Xu=function Xu(r,o,s,B){for(var Q=B>1?void 0:B?O2(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&M2(o,s,Q),Q};var ic=function(_le13){_inherits(ic,_le13);function ic(){var _this228;_classCallCheck(this,ic);_this228=_callSuper(this,ic,arguments),_this228.images=[],_this228.limit=3;return _this228}_createClass(ic,[{key:"createRenderRoot",value:function createRenderRoot(){return this}},{key:"dispatchFileOpen",value:function dispatchFileOpen(r,o){if(r.preventDefault(),!o.is_trashed){var s=new CustomEvent("file-open",{detail:{file:o}});this.dispatchEvent(s)}}},{key:"render",value:function render(){var _this229=this;var r=this.images.length>this.limit?this.images.length-this.limit:0,o=this.images.slice(0,this.limit);return v(_templateObject44||(_templateObject44=_taggedTemplateLiteral(["\n <div class=\"wy-image-grid\">\n ","\n </div>\n "])),o.map(function(s,B){var Q=s.width/s.height||1,Y=64,J=2,it=Q.toPrecision(5),nt=(Q*Y).toPrecision(5)+"px",ot=(100/Q).toPrecision(5)+"%",dt=s.width+"px",Mt=s.width>0?J*s.width+"px":"none";return v(_templateObject45||(_templateObject45=_taggedTemplateLiteral(["\n <a\n href=\"#\"\n @click=","\n class=\"wy-image\"\n style=",">\n <div class=\"wy-image-area\" style=",">\n <img\n src=","\n ","\n @load=","\n alt=\"\"\n loading=\"lazy\"\n decoding=\"async\" />\n ","\n </div>\n </a>\n "])),function(Ot){!Ot.defaultPrevented&&_this229.dispatchFileOpen(Ot,s)},Hl({flexBasis:nt,flexGrow:it,flexShrink:it,width:dt,maxWidth:Mt}),Hl({paddingBottom:ot}),s.preview_url,Ce($h),Eh,B===o.length-1&&r?v(_templateObject46||(_templateObject46=_taggedTemplateLiteral(["<span class=\"wy-more\">+","</span>"])),r):"")}))}}]);return ic}(le);ic.styles=me;Xu([m({attribute:!1})],ic.prototype,"images",2);Xu([m({type:Number})],ic.prototype,"limit",2);ic=Xu([de("wy-image-grid")],ic);var I2=Object.defineProperty,T2=Object.getOwnPropertyDescriptor,Ju=function Ju(r,o,s,B){for(var Q=B>1?void 0:B?T2(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&I2(o,s,Q),Q};var nc=function(_le14){_inherits(nc,_le14);function nc(){var _this230;_classCallCheck(this,nc);_this230=_callSuper(this,nc,arguments),_this230.files=[],_this230.limit=3;return _this230}_createClass(nc,[{key:"createRenderRoot",value:function createRenderRoot(){return this}},{key:"dispatchFileOpen",value:function dispatchFileOpen(r,o){r.preventDefault();var s=new CustomEvent("file-open",{detail:{file:o}});return this.dispatchEvent(s)}},{key:"render",value:function render(){var _this231=this;return v(_templateObject47||(_templateObject47=_taggedTemplateLiteral(["\n <div class=\"wy-list wy-list-bordered\">\n ","\n </div>\n "])),this.files.map(function(r){var o=r.size&&r.size>0?pd(r.size):null,s=Li(r.name);var _Zn2=Zn(r.name),B=_Zn2.icon;var Q=Gu(r.name),Y=ls(r.provider);return Y&&(B="".concat(B,"+").concat(Y)),v(_templateObject48||(_templateObject48=_taggedTemplateLiteral(["\n <a\n @click=","\n class=\"wy-item wy-item-lg\"\n href=\"#\"\n title=",">\n <wy-icon name="," size=\"48\" kind="," ext=","></wy-icon>\n <div class=\"wy-item-body \">\n <div class=\"wy-item-title\">","</div>\n ","\n </div>\n </a>\n "])),function(J){!J.defaultPrevented&&!r.is_trashed&&_this231.dispatchFileOpen(J,r)},r.name,B,Q,s,r.name,o?v(_templateObject49||(_templateObject49=_taggedTemplateLiteral(["<div class=\"wy-item-text\" title=\"{fileSize}\">","</div>"])),o):"")}))}}]);return nc}(le);nc.styles=me;Ju([m({attribute:!1})],nc.prototype,"files",2);Ju([m({type:Number})],nc.prototype,"limit",2);nc=Ju([de("wy-attachments-list")],nc);var Pr="top",oi="bottom",ai="right",Ar="left",ey="auto",Zc=[Pr,oi,ai,Ar],Va="start",oc="end",R2="clippingParents",Xf="viewport",gs="popper",D2="reference",Ap=Zc.reduce(function(r,o){return r.concat([o+"-"+Va,o+"-"+oc])},[]),Jf=[].concat(Zc,[ey]).reduce(function(r,o){return r.concat([o,o+"-"+Va,o+"-"+oc])},[]),F2="beforeRead",z2="read",N2="afterRead",V2="beforeMain",B2="main",H2="afterMain",j2="beforeWrite",U2="write",W2="afterWrite",q2=[F2,z2,N2,V2,B2,H2,j2,U2,W2];function Bi(r){return r?(r.nodeName||"").toLowerCase():null}function jr(r){if(r==null)return window;if(r.toString()!=="[object Window]"){var o=r.ownerDocument;return o&&o.defaultView||window}return r}function zo(r){var o=jr(r).Element;return r instanceof o||r instanceof Element}function ii(r){var o=jr(r).HTMLElement;return r instanceof o||r instanceof HTMLElement}function ty(r){if((typeof ShadowRoot==="undefined"?"undefined":_typeof(ShadowRoot))>"u")return!1;var o=jr(r).ShadowRoot;return r instanceof o||r instanceof ShadowRoot}function Q2(r){var o=r.state;Object.keys(o.elements).forEach(function(s){var B=o.styles[s]||{},Q=o.attributes[s]||{},Y=o.elements[s];!ii(Y)||!Bi(Y)||(Object.assign(Y.style,B),Object.keys(Q).forEach(function(J){var it=Q[J];it===!1?Y.removeAttribute(J):Y.setAttribute(J,it===!0?"":it)}))})}function K2(r){var o=r.state,s={popper:{position:o.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(o.elements.popper.style,s.popper),o.styles=s,o.elements.arrow&&Object.assign(o.elements.arrow.style,s.arrow),function(){Object.keys(o.elements).forEach(function(B){var Q=o.elements[B],Y=o.attributes[B]||{},J=Object.keys(o.styles.hasOwnProperty(B)?o.styles[B]:s[B]),it=J.reduce(function(nt,ot){return nt[ot]="",nt},{});!ii(Q)||!Bi(Q)||(Object.assign(Q.style,it),Object.keys(Y).forEach(function(nt){Q.removeAttribute(nt)}))})}}var Z2={name:"applyStyles",enabled:!0,phase:"write",fn:Q2,effect:K2,requires:["computeStyles"]};function zi(r){return r.split("-")[0]}var Ao=Math.max,jl=Math.min,Ba=Math.round;function Sh(){var r=navigator.userAgentData;return r!=null&&r.brands&&Array.isArray(r.brands)?r.brands.map(function(o){return o.brand+"/"+o.version}).join(" "):navigator.userAgent}function em(){return!/^((?!chrome|android).)*safari/i.test(Sh())}function Ha(r,o,s){o===void 0&&(o=!1),s===void 0&&(s=!1);var B=r.getBoundingClientRect(),Q=1,Y=1;o&&ii(r)&&(Q=r.offsetWidth>0&&Ba(B.width)/r.offsetWidth||1,Y=r.offsetHeight>0&&Ba(B.height)/r.offsetHeight||1);var J=zo(r)?jr(r):window,it=J.visualViewport,nt=!em()&&s,ot=(B.left+(nt&&it?it.offsetLeft:0))/Q,dt=(B.top+(nt&&it?it.offsetTop:0))/Y,Mt=B.width/Q,Ot=B.height/Y;return{width:Mt,height:Ot,top:dt,right:ot+Mt,bottom:dt+Ot,left:ot,x:ot,y:dt}}function ry(r){var o=Ha(r),s=r.offsetWidth,B=r.offsetHeight;return Math.abs(o.width-s)<=1&&(s=o.width),Math.abs(o.height-B)<=1&&(B=o.height),{x:r.offsetLeft,y:r.offsetTop,width:s,height:B}}function tm(r,o){var s=o.getRootNode&&o.getRootNode();if(r.contains(o))return!0;if(s&&ty(s)){var B=o;do{if(B&&r.isSameNode(B))return!0;B=B.parentNode||B.host}while(B)}return!1}function dn(r){return jr(r).getComputedStyle(r)}function G2(r){return["table","td","th"].indexOf(Bi(r))>=0}function Gn(r){return((zo(r)?r.ownerDocument:r.document)||window.document).documentElement}function wd(r){return Bi(r)==="html"?r:r.assignedSlot||r.parentNode||(ty(r)?r.host:null)||Gn(r)}function Lp(r){return!ii(r)||dn(r).position==="fixed"?null:r.offsetParent}function Y2(r){var o=/firefox/i.test(Sh()),s=/Trident/i.test(Sh());if(s&&ii(r)){var B=dn(r);if(B.position==="fixed")return null}var Q=wd(r);for(ty(Q)&&(Q=Q.host);ii(Q)&&["html","body"].indexOf(Bi(Q))<0;){var Y=dn(Q);if(Y.transform!=="none"||Y.perspective!=="none"||Y.contain==="paint"||["transform","perspective"].indexOf(Y.willChange)!==-1||o&&Y.willChange==="filter"||o&&Y.filter&&Y.filter!=="none")return Q;Q=Q.parentNode}return null}function Gc(r){for(var o=jr(r),s=Lp(r);s&&G2(s)&&dn(s).position==="static";)s=Lp(s);return s&&(Bi(s)==="html"||Bi(s)==="body"&&dn(s).position==="static")?o:s||Y2(r)||o}function iy(r){return["top","bottom"].indexOf(r)>=0?"x":"y"}function Rs(r,o,s){return Ao(r,jl(o,s))}function X2(r,o,s){var B=Rs(r,o,s);return B>s?s:B}function rm(){return{top:0,right:0,bottom:0,left:0}}function im(r){return Object.assign({},rm(),r)}function nm(r,o){return o.reduce(function(s,B){return s[B]=r,s},{})}var J2=function J2(r,o){return r=typeof r=="function"?r(Object.assign({},o.rects,{placement:o.placement})):r,im(typeof r!="number"?r:nm(r,Zc))};function e_(r){var o,s=r.state,B=r.name,Q=r.options,Y=s.elements.arrow,J=s.modifiersData.popperOffsets,it=zi(s.placement),nt=iy(it),ot=[Ar,ai].indexOf(it)>=0,dt=ot?"height":"width";if(!(!Y||!J)){var Mt=J2(Q.padding,s),Ot=ry(Y),Qt=nt==="y"?Pr:Ar,Ut=nt==="y"?oi:ai,te=s.rects.reference[dt]+s.rects.reference[nt]-J[nt]-s.rects.popper[dt],qt=J[nt]-s.rects.reference[nt],ie=Gc(Y),re=ie?nt==="y"?ie.clientHeight||0:ie.clientWidth||0:0,ne=te/2-qt/2,ae=Mt[Qt],Bt=re-Ot[dt]-Mt[Ut],Wt=re/2-Ot[dt]/2+ne,oe=Rs(ae,Wt,Bt),ve=nt;s.modifiersData[B]=(o={},o[ve]=oe,o.centerOffset=oe-Wt,o)}}function t_(r){var o=r.state,s=r.options,B=s.element,Q=B===void 0?"[data-popper-arrow]":B;Q!=null&&(typeof Q=="string"&&(Q=o.elements.popper.querySelector(Q),!Q)||tm(o.elements.popper,Q)&&(o.elements.arrow=Q))}var r_={name:"arrow",enabled:!0,phase:"main",fn:e_,effect:t_,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ja(r){return r.split("-")[1]}var i_={top:"auto",right:"auto",bottom:"auto",left:"auto"};function n_(r,o){var s=r.x,B=r.y,Q=o.devicePixelRatio||1;return{x:Ba(s*Q)/Q||0,y:Ba(B*Q)/Q||0}}function Mp(r){var o,s=r.popper,B=r.popperRect,Q=r.placement,Y=r.variation,J=r.offsets,it=r.position,nt=r.gpuAcceleration,ot=r.adaptive,dt=r.roundOffsets,Mt=r.isFixed,Ot=J.x,Qt=Ot===void 0?0:Ot,Ut=J.y,te=Ut===void 0?0:Ut,qt=typeof dt=="function"?dt({x:Qt,y:te}):{x:Qt,y:te};Qt=qt.x,te=qt.y;var ie=J.hasOwnProperty("x"),re=J.hasOwnProperty("y"),ne=Ar,ae=Pr,Bt=window;if(ot){var Wt=Gc(s),oe="clientHeight",ve="clientWidth";if(Wt===jr(s)&&(Wt=Gn(s),dn(Wt).position!=="static"&&it==="absolute"&&(oe="scrollHeight",ve="scrollWidth")),Wt=Wt,Q===Pr||(Q===Ar||Q===ai)&&Y===oc){ae=oi;var _e=Mt&&Wt===Bt&&Bt.visualViewport?Bt.visualViewport.height:Wt[oe];te-=_e-B.height,te*=nt?1:-1}if(Q===Ar||(Q===Pr||Q===oi)&&Y===oc){ne=ai;var Xe=Mt&&Wt===Bt&&Bt.visualViewport?Bt.visualViewport.width:Wt[ve];Qt-=Xe-B.width,Qt*=nt?1:-1}}var He=Object.assign({position:it},ot&&i_),ro=dt===!0?n_({x:Qt,y:te},jr(s)):{x:Qt,y:te};if(Qt=ro.x,te=ro.y,nt){var Xo;return Object.assign({},He,(Xo={},Xo[ae]=re?"0":"",Xo[ne]=ie?"0":"",Xo.transform=(Bt.devicePixelRatio||1)<=1?"translate("+Qt+"px, "+te+"px)":"translate3d("+Qt+"px, "+te+"px, 0)",Xo))}return Object.assign({},He,(o={},o[ae]=re?te+"px":"",o[ne]=ie?Qt+"px":"",o.transform="",o))}function o_(r){var o=r.state,s=r.options,B=s.gpuAcceleration,Q=B===void 0?!0:B,Y=s.adaptive,J=Y===void 0?!0:Y,it=s.roundOffsets,nt=it===void 0?!0:it,ot={placement:zi(o.placement),variation:ja(o.placement),popper:o.elements.popper,popperRect:o.rects.popper,gpuAcceleration:Q,isFixed:o.options.strategy==="fixed"};o.modifiersData.popperOffsets!=null&&(o.styles.popper=Object.assign({},o.styles.popper,Mp(Object.assign({},ot,{offsets:o.modifiersData.popperOffsets,position:o.options.strategy,adaptive:J,roundOffsets:nt})))),o.modifiersData.arrow!=null&&(o.styles.arrow=Object.assign({},o.styles.arrow,Mp(Object.assign({},ot,{offsets:o.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:nt})))),o.attributes.popper=Object.assign({},o.attributes.popper,{"data-popper-placement":o.placement})}var a_={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:o_,data:{}};var hl={passive:!0};function s_(r){var o=r.state,s=r.instance,B=r.options,Q=B.scroll,Y=Q===void 0?!0:Q,J=B.resize,it=J===void 0?!0:J,nt=jr(o.elements.popper),ot=[].concat(o.scrollParents.reference,o.scrollParents.popper);return Y&&ot.forEach(function(dt){dt.addEventListener("scroll",s.update,hl)}),it&&nt.addEventListener("resize",s.update,hl),function(){Y&&ot.forEach(function(dt){dt.removeEventListener("scroll",s.update,hl)}),it&&nt.removeEventListener("resize",s.update,hl)}}var c_={name:"eventListeners",enabled:!0,phase:"write",fn:function fn(){},effect:s_,data:{}};var l_={left:"right",right:"left",bottom:"top",top:"bottom"};function vl(r){return r.replace(/left|right|bottom|top/g,function(o){return l_[o]})}var d_={start:"end",end:"start"};function Op(r){return r.replace(/start|end/g,function(o){return d_[o]})}function ny(r){var o=jr(r),s=o.pageXOffset,B=o.pageYOffset;return{scrollLeft:s,scrollTop:B}}function oy(r){return Ha(Gn(r)).left+ny(r).scrollLeft}function h_(r,o){var s=jr(r),B=Gn(r),Q=s.visualViewport,Y=B.clientWidth,J=B.clientHeight,it=0,nt=0;if(Q){Y=Q.width,J=Q.height;var ot=em();(ot||!ot&&o==="fixed")&&(it=Q.offsetLeft,nt=Q.offsetTop)}return{width:Y,height:J,x:it+oy(r),y:nt}}function u_(r){var o,s=Gn(r),B=ny(r),Q=(o=r.ownerDocument)==null?void 0:o.body,Y=Ao(s.scrollWidth,s.clientWidth,Q?Q.scrollWidth:0,Q?Q.clientWidth:0),J=Ao(s.scrollHeight,s.clientHeight,Q?Q.scrollHeight:0,Q?Q.clientHeight:0),it=-B.scrollLeft+oy(r),nt=-B.scrollTop;return dn(Q||s).direction==="rtl"&&(it+=Ao(s.clientWidth,Q?Q.clientWidth:0)-Y),{width:Y,height:J,x:it,y:nt}}function ay(r){var o=dn(r),s=o.overflow,B=o.overflowX,Q=o.overflowY;return /auto|scroll|overlay|hidden/.test(s+Q+B)}function om(r){return["html","body","#document"].indexOf(Bi(r))>=0?r.ownerDocument.body:ii(r)&&ay(r)?r:om(wd(r))}function Ds(r,o){var s;o===void 0&&(o=[]);var B=om(r),Q=B===((s=r.ownerDocument)==null?void 0:s.body),Y=jr(B),J=Q?[Y].concat(Y.visualViewport||[],ay(B)?B:[]):B,it=o.concat(J);return Q?it:it.concat(Ds(wd(J)))}function Ph(r){return Object.assign({},r,{left:r.x,top:r.y,right:r.x+r.width,bottom:r.y+r.height})}function y_(r,o){var s=Ha(r,!1,o==="fixed");return s.top=s.top+r.clientTop,s.left=s.left+r.clientLeft,s.bottom=s.top+r.clientHeight,s.right=s.left+r.clientWidth,s.width=r.clientWidth,s.height=r.clientHeight,s.x=s.left,s.y=s.top,s}function Ip(r,o,s){return o===Xf?Ph(h_(r,s)):zo(o)?y_(o,s):Ph(u_(Gn(r)))}function p_(r){var o=Ds(wd(r)),s=["absolute","fixed"].indexOf(dn(r).position)>=0,B=s&&ii(r)?Gc(r):r;return zo(B)?o.filter(function(Q){return zo(Q)&&tm(Q,B)&&Bi(Q)!=="body"}):[]}function w_(r,o,s,B){var Q=o==="clippingParents"?p_(r):[].concat(o),Y=[].concat(Q,[s]),J=Y[0],it=Y.reduce(function(nt,ot){var dt=Ip(r,ot,B);return nt.top=Ao(dt.top,nt.top),nt.right=jl(dt.right,nt.right),nt.bottom=jl(dt.bottom,nt.bottom),nt.left=Ao(dt.left,nt.left),nt},Ip(r,J,B));return it.width=it.right-it.left,it.height=it.bottom-it.top,it.x=it.left,it.y=it.top,it}function am(r){var o=r.reference,s=r.element,B=r.placement,Q=B?zi(B):null,Y=B?ja(B):null,J=o.x+o.width/2-s.width/2,it=o.y+o.height/2-s.height/2,nt;switch(Q){case Pr:nt={x:J,y:o.y-s.height};break;case oi:nt={x:J,y:o.y+o.height};break;case ai:nt={x:o.x+o.width,y:it};break;case Ar:nt={x:o.x-s.width,y:it};break;default:nt={x:o.x,y:o.y}}var ot=Q?iy(Q):null;if(ot!=null){var dt=ot==="y"?"height":"width";switch(Y){case Va:nt[ot]=nt[ot]-(o[dt]/2-s[dt]/2);break;case oc:nt[ot]=nt[ot]+(o[dt]/2-s[dt]/2);break}}return nt}function ac(r,o){o===void 0&&(o={});var s=o,B=s.placement,Q=B===void 0?r.placement:B,Y=s.strategy,J=Y===void 0?r.strategy:Y,it=s.boundary,nt=it===void 0?R2:it,ot=s.rootBoundary,dt=ot===void 0?Xf:ot,Mt=s.elementContext,Ot=Mt===void 0?gs:Mt,Qt=s.altBoundary,Ut=Qt===void 0?!1:Qt,te=s.padding,qt=te===void 0?0:te,ie=im(typeof qt!="number"?qt:nm(qt,Zc)),re=Ot===gs?D2:gs,ne=r.rects.popper,ae=r.elements[Ut?re:Ot],Bt=w_(zo(ae)?ae:ae.contextElement||Gn(r.elements.popper),nt,dt,J),Wt=Ha(r.elements.reference),oe=am({reference:Wt,element:ne,strategy:"absolute",placement:Q}),ve=Ph(Object.assign({},ne,oe)),_e=Ot===gs?ve:Wt,Xe={top:Bt.top-_e.top+ie.top,bottom:_e.bottom-Bt.bottom+ie.bottom,left:Bt.left-_e.left+ie.left,right:_e.right-Bt.right+ie.right},He=r.modifiersData.offset;if(Ot===gs&&He){var ro=He[Q];Object.keys(Xe).forEach(function(Xo){var Se=[ai,oi].indexOf(Xo)>=0?1:-1,xr=[Pr,oi].indexOf(Xo)>=0?"y":"x";Xe[Xo]+=ro[xr]*Se})}return Xe}function f_(r,o){o===void 0&&(o={});var s=o,B=s.placement,Q=s.boundary,Y=s.rootBoundary,J=s.padding,it=s.flipVariations,nt=s.allowedAutoPlacements,ot=nt===void 0?Jf:nt,dt=ja(B),Mt=dt?it?Ap:Ap.filter(function(Ut){return ja(Ut)===dt}):Zc,Ot=Mt.filter(function(Ut){return ot.indexOf(Ut)>=0});Ot.length===0&&(Ot=Mt);var Qt=Ot.reduce(function(Ut,te){return Ut[te]=ac(r,{placement:te,boundary:Q,rootBoundary:Y,padding:J})[zi(te)],Ut},{});return Object.keys(Qt).sort(function(Ut,te){return Qt[Ut]-Qt[te]})}function m_(r){if(zi(r)===ey)return[];var o=vl(r);return[Op(r),o,Op(o)]}function v_(r){var o=r.state,s=r.options,B=r.name;if(!o.modifiersData[B]._skip){for(var Q=s.mainAxis,Y=Q===void 0?!0:Q,J=s.altAxis,it=J===void 0?!0:J,nt=s.fallbackPlacements,ot=s.padding,dt=s.boundary,Mt=s.rootBoundary,Ot=s.altBoundary,Qt=s.flipVariations,Ut=Qt===void 0?!0:Qt,te=s.allowedAutoPlacements,qt=o.options.placement,ie=zi(qt),re=ie===qt,ne=nt||(re||!Ut?[vl(qt)]:m_(qt)),ae=[qt].concat(ne).reduce(function(pe,ue){return pe.concat(zi(ue)===ey?f_(o,{placement:ue,boundary:dt,rootBoundary:Mt,padding:ot,flipVariations:Ut,allowedAutoPlacements:te}):ue)},[]),Bt=o.rects.reference,Wt=o.rects.popper,oe=new Map,ve=!0,_e=ae[0],Xe=0;Xe<ae.length;Xe++){var He=ae[Xe],ro=zi(He),Xo=ja(He)===Va,Se=[Pr,oi].indexOf(ro)>=0,xr=Se?"width":"height",pr=ac(o,{placement:He,boundary:dt,rootBoundary:Mt,altBoundary:Ot,padding:ot}),$e=Se?Xo?ai:Ar:Xo?oi:Pr;Bt[xr]>Wt[xr]&&($e=vl($e));var _r=vl($e),Ps=[];if(Y&&Ps.push(pr[ro]<=0),it&&Ps.push(pr[$e]<=0,pr[_r]<=0),Ps.every(function(pe){return pe})){_e=He,ve=!1;break}oe.set(He,Ps)}if(ve)for(var qe=Ut?3:1,bl=function bl(pe){var ue=ae.find(function(se){var be=oe.get(se);if(be)return be.slice(0,pe).every(function(Ae){return Ae})});if(ue)return _e=ue,"break"},ol=qe;ol>0;ol--){var Te=bl(ol);if(Te==="break")break}o.placement!==_e&&(o.modifiersData[B]._skip=!0,o.placement=_e,o.reset=!0)}}var g_={name:"flip",enabled:!0,phase:"main",fn:v_,requiresIfExists:["offset"],data:{_skip:!1}};function Tp(r,o,s){return s===void 0&&(s={x:0,y:0}),{top:r.top-o.height-s.y,right:r.right-o.width+s.x,bottom:r.bottom-o.height+s.y,left:r.left-o.width-s.x}}function Rp(r){return[Pr,ai,oi,Ar].some(function(o){return r[o]>=0})}function b_(r){var o=r.state,s=r.name,B=o.rects.reference,Q=o.rects.popper,Y=o.modifiersData.preventOverflow,J=ac(o,{elementContext:"reference"}),it=ac(o,{altBoundary:!0}),nt=Tp(J,B),ot=Tp(it,Q,Y),dt=Rp(nt),Mt=Rp(ot);o.modifiersData[s]={referenceClippingOffsets:nt,popperEscapeOffsets:ot,isReferenceHidden:dt,hasPopperEscaped:Mt},o.attributes.popper=Object.assign({},o.attributes.popper,{"data-popper-reference-hidden":dt,"data-popper-escaped":Mt})}var __={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:b_};function x_(r,o,s){var B=zi(r),Q=[Ar,Pr].indexOf(B)>=0?-1:1,Y=typeof s=="function"?s(Object.assign({},o,{placement:r})):s,J=Y[0],it=Y[1];return J=J||0,it=(it||0)*Q,[Ar,ai].indexOf(B)>=0?{x:it,y:J}:{x:J,y:it}}function k_(r){var o=r.state,s=r.options,B=r.name,Q=s.offset,Y=Q===void 0?[0,0]:Q,J=Jf.reduce(function(dt,Mt){return dt[Mt]=x_(Mt,o.rects,Y),dt},{}),it=J[o.placement],nt=it.x,ot=it.y;o.modifiersData.popperOffsets!=null&&(o.modifiersData.popperOffsets.x+=nt,o.modifiersData.popperOffsets.y+=ot),o.modifiersData[B]=J}var C_={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:k_};function $_(r){var o=r.state,s=r.name;o.modifiersData[s]=am({reference:o.rects.reference,element:o.rects.popper,strategy:"absolute",placement:o.placement})}var E_={name:"popperOffsets",enabled:!0,phase:"read",fn:$_,data:{}};function S_(r){return r==="x"?"y":"x"}function P_(r){var o=r.state,s=r.options,B=r.name,Q=s.mainAxis,Y=Q===void 0?!0:Q,J=s.altAxis,it=J===void 0?!1:J,nt=s.boundary,ot=s.rootBoundary,dt=s.altBoundary,Mt=s.padding,Ot=s.tether,Qt=Ot===void 0?!0:Ot,Ut=s.tetherOffset,te=Ut===void 0?0:Ut,qt=ac(o,{boundary:nt,rootBoundary:ot,padding:Mt,altBoundary:dt}),ie=zi(o.placement),re=ja(o.placement),ne=!re,ae=iy(ie),Bt=S_(ae),Wt=o.modifiersData.popperOffsets,oe=o.rects.reference,ve=o.rects.popper,_e=typeof te=="function"?te(Object.assign({},o.rects,{placement:o.placement})):te,Xe=typeof _e=="number"?{mainAxis:_e,altAxis:_e}:Object.assign({mainAxis:0,altAxis:0},_e),He=o.modifiersData.offset?o.modifiersData.offset[o.placement]:null,ro={x:0,y:0};if(Wt){if(Y){var Xo,Se=ae==="y"?Pr:Ar,xr=ae==="y"?oi:ai,pr=ae==="y"?"height":"width",$e=Wt[ae],_r=$e+qt[Se],Ps=$e-qt[xr],qe=Qt?-ve[pr]/2:0,bl=re===Va?oe[pr]:ve[pr],ol=re===Va?-ve[pr]:-oe[pr],Te=o.elements.arrow,pe=Qt&&Te?ry(Te):{width:0,height:0},ue=o.modifiersData["arrow#persistent"]?o.modifiersData["arrow#persistent"].padding:rm(),se=ue[Se],be=ue[xr],Ae=Rs(0,oe[pr],pe[pr]),ze=ne?oe[pr]/2-qe-Ae-se-Xe.mainAxis:bl-Ae-se-Xe.mainAxis,pi=ne?-oe[pr]/2+qe+Ae+be+Xe.mainAxis:ol+Ae+be+Xe.mainAxis,io=o.elements.arrow&&Gc(o.elements.arrow),Qr=io?ae==="y"?io.clientTop||0:io.clientLeft||0:0,Es=(Xo=He==null?void 0:He[ae])!=null?Xo:0,nl=$e+ze-Es-Qr,Cr=$e+pi-Es,$l=Rs(Qt?jl(_r,nl):_r,$e,Qt?Ao(Ps,Cr):Ps);Wt[ae]=$l,ro[ae]=$l-$e}if(it){var _l,Ih=ae==="x"?Pr:Ar,Rh=ae==="x"?oi:ai,Th=Wt[Bt],$s=Bt==="y"?"height":"width",Dr=Th+qt[Ih],Xi=Th-qt[Rh],Ke=[Pr,Ar].indexOf(ie)!==-1,ta=(_l=He==null?void 0:He[Bt])!=null?_l:0,Cl=Ke?Dr:Th-oe[$s]-ve[$s]-ta+Xe.altAxis,Oh=Ke?Th+oe[$s]+ve[$s]-ta-Xe.altAxis:Xi,jh=Qt&&Ke?X2(Cl,Th,Oh):Rs(Qt?Cl:Dr,Th,Qt?Oh:Xi);Wt[Bt]=jh,ro[Bt]=jh-Th}o.modifiersData[B]=ro}}var A_={name:"preventOverflow",enabled:!0,phase:"main",fn:P_,requiresIfExists:["offset"]};function L_(r){return{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}}function M_(r){return r===jr(r)||!ii(r)?ny(r):L_(r)}function O_(r){var o=r.getBoundingClientRect(),s=Ba(o.width)/r.offsetWidth||1,B=Ba(o.height)/r.offsetHeight||1;return s!==1||B!==1}function I_(r,o,s){s===void 0&&(s=!1);var B=ii(o),Q=ii(o)&&O_(o),Y=Gn(o),J=Ha(r,Q,s),it={scrollLeft:0,scrollTop:0},nt={x:0,y:0};return(B||!B&&!s)&&((Bi(o)!=="body"||ay(Y))&&(it=M_(o)),ii(o)?(nt=Ha(o,!0),nt.x+=o.clientLeft,nt.y+=o.clientTop):Y&&(nt.x=oy(Y))),{x:J.left+it.scrollLeft-nt.x,y:J.top+it.scrollTop-nt.y,width:J.width,height:J.height}}function T_(r){var o=new Map,s=new Set,B=[];r.forEach(function(Y){o.set(Y.name,Y)});function Q(Y){s.add(Y.name);var J=[].concat(Y.requires||[],Y.requiresIfExists||[]);J.forEach(function(it){if(!s.has(it)){var nt=o.get(it);nt&&Q(nt)}}),B.push(Y)}return r.forEach(function(Y){s.has(Y.name)||Q(Y)}),B}function R_(r){var o=T_(r);return q2.reduce(function(s,B){return s.concat(o.filter(function(Q){return Q.phase===B}))},[])}function D_(r){var o;return function(){return o||(o=new Promise(function(s){Promise.resolve().then(function(){o=void 0,s(r())})})),o}}function F_(r){var o=r.reduce(function(s,B){var Q=s[B.name];return s[B.name]=Q?Object.assign({},Q,B,{options:Object.assign({},Q.options,B.options),data:Object.assign({},Q.data,B.data)}):B,s},{});return Object.keys(o).map(function(s){return o[s]})}var Dp={placement:"bottom",modifiers:[],strategy:"absolute"};function Fp(){for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return!o.some(function(B){return!(B&&typeof B.getBoundingClientRect=="function")})}function z_(r){r===void 0&&(r={});var o=r,s=o.defaultModifiers,B=s===void 0?[]:s,Q=o.defaultOptions,Y=Q===void 0?Dp:Q;return function(J,it,nt){nt===void 0&&(nt=Y);var ot={placement:"bottom",orderedModifiers:[],options:Object.assign({},Dp,Y),modifiersData:{},elements:{reference:J,popper:it},attributes:{},styles:{}},dt=[],Mt=!1,Ot={state:ot,setOptions:function setOptions(te){var qt=typeof te=="function"?te(ot.options):te;Ut(),ot.options=Object.assign({},Y,ot.options,qt),ot.scrollParents={reference:zo(J)?Ds(J):J.contextElement?Ds(J.contextElement):[],popper:Ds(it)};var ie=R_(F_([].concat(B,ot.options.modifiers)));return ot.orderedModifiers=ie.filter(function(re){return re.enabled}),Qt(),Ot.update()},forceUpdate:function forceUpdate(){if(!Mt){var te=ot.elements,qt=te.reference,ie=te.popper;if(Fp(qt,ie)){ot.rects={reference:I_(qt,Gc(ie),ot.options.strategy==="fixed"),popper:ry(ie)},ot.reset=!1,ot.placement=ot.options.placement,ot.orderedModifiers.forEach(function(ve){return ot.modifiersData[ve.name]=Object.assign({},ve.data)});for(var re=0;re<ot.orderedModifiers.length;re++){if(ot.reset===!0){ot.reset=!1,re=-1;continue}var ne=ot.orderedModifiers[re],ae=ne.fn,Bt=ne.options,Wt=Bt===void 0?{}:Bt,oe=ne.name;typeof ae=="function"&&(ot=ae({state:ot,options:Wt,name:oe,instance:Ot})||ot)}}}},update:D_(function(){return new Promise(function(te){Ot.forceUpdate(),te(ot)})}),destroy:function destroy(){Ut(),Mt=!0}};if(!Fp(J,it))return Ot;Ot.setOptions(nt).then(function(te){!Mt&&nt.onFirstUpdate&&nt.onFirstUpdate(te)});function Qt(){ot.orderedModifiers.forEach(function(te){var qt=te.name,ie=te.options,re=ie===void 0?{}:ie,ne=te.effect;if(typeof ne=="function"){var ae=ne({state:ot,name:qt,instance:Ot,options:re}),Bt=function Bt(){};dt.push(ae||Bt)}})}function Ut(){dt.forEach(function(te){return te()}),dt=[]}return Ot}}var N_=[c_,E_,a_,Z2,C_,g_,A_,r_,__],sm=z_({defaultModifiers:N_});function V_(r,o,s,B,Q,Y){return new Ye(r.queryClient,{mutationFn:function(){var _mutationFn2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee97(){return _regeneratorRuntime().wrap(function _callee97$(_context98){while(1)switch(_context98.prev=_context98.next){case 0:_context98.next=2;return r.post("/api/".concat(B,"/").concat(s,"/reactions"),"POST",JSON.stringify({content:Q}));case 2:return _context98.abrupt("return",_context98.sent);case 3:case"end":return _context98.stop()}},_callee97)}));function mutationFn(){return _mutationFn2.apply(this,arguments)}return mutationFn}(),onMutate:function onMutate(){tt(r.queryClient,[B,o],s,function(J){J.reactions=J.reactions||[],J.reactions=[].concat(_toConsumableArray(J.reactions.filter(function(it){return it.created_by_id!==Y})),[{content:Q,created_by_id:Y}])})},onSuccess:function onSuccess(){tt(r.queryClient,[B,o],s,function(J){J.reactions=J.reactions||[],J.reactions=[].concat(_toConsumableArray(J.reactions.filter(function(it){return it.created_by_id!==Y})),[{content:Q,created_by_id:Y}])})}})}function B_(r,o,s,B,Q){return new Ye(r.queryClient,{mutationFn:function(){var _mutationFn3=_asyncToGenerator(_regeneratorRuntime().mark(function _callee98(){return _regeneratorRuntime().wrap(function _callee98$(_context99){while(1)switch(_context99.prev=_context99.next){case 0:_context99.next=2;return r.post("/api/".concat(B,"/").concat(s,"/reactions"),"DELETE",JSON.stringify({}));case 2:return _context99.abrupt("return",_context99.sent);case 3:case"end":return _context99.stop()}},_callee98)}));function mutationFn(){return _mutationFn3.apply(this,arguments)}return mutationFn}(),onMutate:function onMutate(){tt(r.queryClient,[B,o],s,function(Y){Y.reactions=_toConsumableArray(Y.reactions.filter(function(J){return J.created_by_id!==Q}))})},onSuccess:function onSuccess(){tt(r.queryClient,[B,o],s,function(Y){Y.reactions=_toConsumableArray(Y.reactions.filter(function(J){return J.created_by_id!==Q}))})}})}function H_(r,o,s,B,Q,Y){return new Ye(r.queryClient,{mutationFn:function(){var _mutationFn4=_asyncToGenerator(_regeneratorRuntime().mark(function _callee99(){return _regeneratorRuntime().wrap(function _callee99$(_context100){while(1)switch(_context100.prev=_context100.next){case 0:_context100.next=2;return r.post("/api/".concat(B,"/").concat(s,"/reactions"),"DELETE",JSON.stringify({}));case 2:_context100.next=4;return r.post("/api/".concat(B,"/").concat(s,"/reactions"),"POST",JSON.stringify({content:Q}));case 4:return _context100.abrupt("return",_context100.sent);case 5:case"end":return _context100.stop()}},_callee99)}));function mutationFn(){return _mutationFn4.apply(this,arguments)}return mutationFn}(),onMutate:function onMutate(){tt(r.queryClient,[B,o],s,function(J){J.reactions=J.reactions||[],J.reactions=[].concat(_toConsumableArray(J.reactions.filter(function(it){return it.created_by_id!==Y})),[{content:Q,created_by_id:Y}])})},onSuccess:function onSuccess(){tt(r.queryClient,[B,o],s,function(J){J.reactions=J.reactions||[],J.reactions=[].concat(_toConsumableArray(J.reactions.filter(function(it){return it.created_by_id!==Y})),[{content:Q,created_by_id:Y}])})}})}function j_(r,o,s){return{queryKey:["reactions",o,s],enabled:!1,queryFn:function(){var _queryFn5=_asyncToGenerator(_regeneratorRuntime().mark(function _callee100(){return _regeneratorRuntime().wrap(function _callee100$(_context101){while(1)switch(_context101.prev=_context101.next){case 0:_context101.next=2;return r.get("/api/"+o+"/"+s+"/reactions");case 2:_context101.next=4;return _context101.sent.json();case 4:return _context101.abrupt("return",_context101.sent);case 5:case"end":return _context101.stop()}},_callee100)}));function queryFn(){return _queryFn5.apply(this,arguments)}return queryFn}()}}var U_=Object.defineProperty,W_=Object.getOwnPropertyDescriptor,cm=function cm(r,o,s,B){for(var Q=B>1?void 0:B?W_(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&U_(o,s,Q),Q};var Ul=function(_le15){_inherits(Ul,_le15);function Ul(){_classCallCheck(this,Ul);return _callSuper(this,Ul,arguments)}_createClass(Ul,[{key:"render",value:function render(){return v(_templateObject50||(_templateObject50=_taggedTemplateLiteral([" <div class=\"wy-item\">\n <wy-avatar .src="," .name=","></wy-avatar>\n <div class=\"wy-item-body\">","</div>\n <span class=\"wy-emoji\">","</span>\n </div>"])),this.reaction.created_by.avatar_url,this.reaction.created_by.display_name,this.reaction.created_by.display_name,this.reaction.content)}}]);return Ul}(le);Ul.styles=me;cm([m({attribute:!1})],Ul.prototype,"reaction",2);Ul=cm([de("wy-reaction-item")],Ul);var q_=Object.defineProperty,Q_=Object.getOwnPropertyDescriptor,fd=function fd(r,o,s,B){for(var Q=B>1?void 0:B?Q_(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&q_(o,s,Q),Q};var _No=function(_le16){_inherits(No,_le16);function No(){var _this232;_classCallCheck(this,No);_this232=_callSuper(this,No),_this232.show=!1,_this232.sheetId="",_this232.viewportRef=Re(),_this232.handleKeys=function(r){_this232.show&&r.key==="Escape"&&(r.stopImmediatePropagation(),_this232.close())},_this232.handleGlobalClose=function(r){var o;if(_this232.show){var s=(o=r.detail)==null?void 0:o.sheet;s instanceof _No&&s!==_assertThisInitialized(_this232)&&_this232.close()}};return _this232}_createClass(No,[{key:"close",value:function close(){this.show=!1,this.dispatchEvent(new Event("removeModal",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("release-focus",{bubbles:!0,composed:!0}))}},{key:"regainFocus",value:function regainFocus(r){var o;this.show&&r.composedPath()[0]!==this&&(r.stopImmediatePropagation(),(o=this.viewportRef.value)==null||o.focus())}},{key:"connectedCallback",value:function connectedCallback(){var r;_get(_getPrototypeOf(No.prototype),"connectedCallback",this).call(this),(r=this.weavyContext)==null||r.host.addEventListener("wy-sheets-close",this.handleGlobalClose)}},{key:"willUpdate",value:function willUpdate(r){var o;r.has("show")&&(this.show?((o=this.weavyContext)==null||o.host.dispatchEvent(new CustomEvent("wy-sheets-close",{bubbles:!0,composed:!0,detail:{sheet:this}})),this.addEventListener("keyup",this.handleKeys),this.addEventListener("release-focus",this.regainFocus)):(this.removeEventListener("keyup",this.handleKeys),this.removeEventListener("release-focus",this.regainFocus)))}},{key:"render",value:function render(){var _this233=this;return v(_templateObject51||(_templateObject51=_taggedTemplateLiteral(["\n <section class=\"wy-viewport\" tabindex=\"0\" ",">\n <div class=\"wy-sheet ","\">\n <slot name=\"header\">\n <header class=\"wy-appbars\">\n <nav class=\"wy-appbar\">\n <slot name=\"appbar-buttons\" class=\"wy-appbar-buttons\"></slot>\n <slot name=\"appbar-text\" class=\"wy-appbar-text\"></slot>\n <wy-button kind=\"icon\" @click=",">\n <wy-icon name=\"close\"></wy-icon>\n </wy-button>\n </nav>\n </header>\n </slot>\n <div class=\"wy-sheet-body wy-scroll-y\">\n <slot></slot>\n </div>\n </div>\n </section>\n "])),Ce(this.viewportRef),this.show?"wy-show":"",function(){return _this233.close()})}},{key:"updated",value:function updated(r){var o;r.has("show")&&this.show&&((o=this.viewportRef.value)==null||o.focus())}},{key:"disconnectedCallback",value:function disconnectedCallback(){var r;_get(_getPrototypeOf(No.prototype),"disconnectedCallback",this).call(this),(r=this.weavyContext)==null||r.host.removeEventListener("wy-sheets-close",this.handleGlobalClose),this.close()}}]);return No}(le);_No.styles=me;fd([Ge({context:Le,subscribe:!0}),K()],_No.prototype,"weavyContext",2);fd([m({type:Boolean})],_No.prototype,"show",2);fd([m({attribute:!1})],_No.prototype,"sheetId",2);_No=fd([de("wy-sheet")],_No);var K_=Object.defineProperty,Z_=Object.getOwnPropertyDescriptor,ur=function ur(r,o,s,B){for(var Q=B>1?void 0:B?Z_(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&K_(o,s,Q),Q};var rr=function(_le17){_inherits(rr,_le17);function rr(){var _this234;_classCallCheck(this,rr);_this234=_callSuper(this,rr,arguments),_this234.directionX="left",_this234.directionY="up",_this234.small=!1,_this234.reactions=[],_this234._placement="bottom-start",_this234.emojis=[],_this234.visible=!1,_this234.messageType="messages",_this234.userId=-1,_this234.showSheet=!1,_this234.sheetId="",_this234.popperReferenceRef=Re(),_this234.popperElementRef=Re(),_this234.reactionListQuery=new kt(_assertThisInitialized(_this234)),_this234._documentClickHandler=function(){_this234.visible=!1},_this234.handleReaction=function(){var _ref156=_asyncToGenerator(_regeneratorRuntime().mark(function _callee101(r){var o,s,B;return _regeneratorRuntime().wrap(function _callee101$(_context102){while(1)switch(_context102.prev=_context102.next){case 0:_context102.t0=!_this234.weavyContext||!_this234.parentId;if(_context102.t0){_context102.next=26;break}if(!(_this234.reactedEmoji===r)){_context102.next=11;break}_this234.reactedEmoji=void 0;_context102.next=6;return B_(_this234.weavyContext,_this234.parentId,_this234.entityId,_this234.messageType,_this234.userId);case 6:_context102.next=8;return _context102.sent.mutate();case 8:(o=_this234.reactionListQuery.observer)==null||o.refetch();_context102.next=26;break;case 11:if(!(_this234.reactedEmoji===void 0)){_context102.next=20;break}_this234.reactedEmoji=r;_context102.next=15;return V_(_this234.weavyContext,_this234.parentId,_this234.entityId,_this234.messageType,r,_this234.userId);case 15:_context102.next=17;return _context102.sent.mutate();case 17:(s=_this234.reactionListQuery.observer)==null||s.refetch();_context102.next=26;break;case 20:_this234.reactedEmoji=r;_context102.next=23;return H_(_this234.weavyContext,_this234.parentId,_this234.entityId,_this234.messageType,r,_this234.userId);case 23:_context102.next=25;return _context102.sent.mutate();case 25:(B=_this234.reactionListQuery.observer)==null||B.refetch();case 26:case"end":return _context102.stop()}},_callee101)}));return function(_x85){return _ref156.apply(this,arguments)}}();return _this234}_createClass(rr,[{key:"handleReactionsClick",value:function handleReactionsClick(){var r;(r=this.reactionListQuery.observer)==null||r.refetch(),this.showSheet=!this.showSheet}},{key:"willUpdate",value:function willUpdate(r){var _this235=this;var o,s,B,Q;r.has("reactions")&&(this.reactedEmoji=(s=(o=this.reactions)==null?void 0:o.find(function(Y){return Y.created_by_id===_this235.userId}))==null?void 0:s.content),(r.has("directionX")||r.has("directionY"))&&(this._placement=this.directionX==="right"&&this.directionY==="down"?"bottom-start":this.directionX==="left"&&this.directionY==="down"?"bottom-end":this.directionX==="right"&&this.directionY==="up"?"top-start":"top-end"),r.has("visible")&&(this.visible?requestAnimationFrame(function(){document.addEventListener("click",_this235._documentClickHandler,{once:!0})}):document.removeEventListener("click",this._documentClickHandler),this.visible&&!this._popper&&this.popperReferenceRef.value&&this.popperElementRef.value?this._popper=sm(this.popperReferenceRef.value,this.popperElementRef.value):!this.visible&&this._popper&&(this._popper.destroy(),this._popper=void 0),(B=this._popper)==null||B.setOptions({placement:this._placement,modifiers:[{name:"offset",options:{offset:[4,0]}},{name:"preventOverflow",options:{padding:4}}]})),r.has("weavyContext")&&(Q=this.weavyContext)!=null&&Q.reactions&&this.emojis!=this.weavyContext.reactions&&(this.emojis=this.weavyContext.reactions)}},{key:"render",value:function render(){var _this$reactionListQue,_this236=this;var r,o,s;var _ref157=(_this$reactionListQue=this.reactionListQuery.result)!==null&&_this$reactionListQue!==void 0?_this$reactionListQue:{},B=_ref157.data,Q=_ref157.isLoading,Y=_toConsumableArray(new Map((r=this.reactions)==null?void 0:r.map(function(J){return[J.content,J]})).values());return v(_templateObject52||(_templateObject52=_taggedTemplateLiteral(["\n ","\n\n <wy-button\n ","\n kind=\"icon\"\n ?active=","\n buttonClass=\"wy-reaction-menu-button\"\n @click=","\n title=",">\n <wy-icon name=\"emoticon-plus\" size=","></wy-icon>\n </wy-button>\n\n <div "," class=\"wy-reaction-menu wy-dropdown-menu\" ?hidden=",">\n <div class=\"wy-reaction-picker\">\n ","\n </div>\n </div>\n\n ","\n "])),Y.length?v(_templateObject53||(_templateObject53=_taggedTemplateLiteral(["\n <wy-button\n class=\"wy-reaction-lineup\"\n kind=\"icon-inline\"\n ?active=","\n @click=","\n buttonClass=\"wy-reactions ","\">\n ","\n ","\n </wy-button>\n "])),this.showSheet,this.handleReactionsClick,this.small?"wy-reactions-small":O,Y.map(function(J){return v(_templateObject54||(_templateObject54=_taggedTemplateLiteral(["<span class=\"wy-emoji\" title=\"\">","</span>"])),J.content)}),((o=this.reactions)==null?void 0:o.length)>1?v(_templateObject55||(_templateObject55=_taggedTemplateLiteral(["<small class=\"wy-reaction-count\">","</small>"])),this.reactions.length):O):O,Ce(this.popperReferenceRef),this.visible,function(){_this236.visible=!_this236.visible},K$1("React",{desc:"Button action to react"}),this.small?18:20,Ce(this.popperElementRef),!this.visible,this.emojis.map(function(J){return v(_templateObject56||(_templateObject56=_taggedTemplateLiteral(["\n <wy-button\n kind=\"icon\"\n buttonClass=","\n ?active=","\n @click=",">\n <span class=\"wy-emoji\">","</span>\n </wy-button>\n "])),"wy-reaction-button",_this236.reactedEmoji===J,function(){_this236.handleReaction(J)},J)}),an(this.showSheet,v(_templateObject57||(_templateObject57=_taggedTemplateLiteral(["\n <wy-sheet\n .show=","\n .sheetId=\"","\"\n @release-focus=",">\n <span slot=\"appbar-text\">","</span>\n <!-- <wy-spinner></wy-spinner> -->\n ","\n </wy-sheet>\n "])),this.showSheet,this.sheetId,function(){return _this236.dispatchEvent(new CustomEvent("release-focus",{bubbles:!0,composed:!0}))},K$1("Reactions"),B&&!Q?v(_templateObject58||(_templateObject58=_taggedTemplateLiteral(["\n ","\n "])),(s=B.data)==null?void 0:s.map(function(J){return v(_templateObject59||(_templateObject59=_taggedTemplateLiteral([" <wy-reaction-item .reaction=","></wy-reaction-item> "])),J)})):O),function(){return _this236.showSheet=!1}))}},{key:"updated",value:function updated(r){(r.has("weavyContext")||r.has("entityId"))&&this.weavyContext&&this.entityId&&(this.reactionListQuery.trackQuery(j_(this.weavyContext,this.messageType,this.entityId)),this.sheetId="sheet-"+this.messageType+"-"+this.entityId)}}]);return rr}(le);rr.styles=[me,Be(_templateObject60||(_templateObject60=_taggedTemplateLiteral(["\n :host {\n display: contents;\n }\n "])))];ur([K()],rr.prototype,"reactedEmoji",2);ur([Ge({context:Le,subscribe:!0}),K()],rr.prototype,"weavyContext",2);ur([m()],rr.prototype,"directionX",2);ur([m()],rr.prototype,"directionY",2);ur([m({type:Boolean})],rr.prototype,"small",2);ur([m({attribute:!1})],rr.prototype,"reactions",2);ur([K()],rr.prototype,"_placement",2);ur([m({attribute:!1})],rr.prototype,"emojis",2);ur([m({attribute:!1})],rr.prototype,"visible",2);ur([m({attribute:!0,type:String})],rr.prototype,"messageType",2);ur([m({attribute:!0,type:Number})],rr.prototype,"parentId",2);ur([m({attribute:!0,type:Number})],rr.prototype,"entityId",2);ur([m({attribute:!1,type:Number})],rr.prototype,"userId",2);ur([K()],rr.prototype,"showSheet",2);ur([K()],rr.prototype,"sheetId",2);rr=ur([de("wy-reactions"),q()],rr);var G_=1e3*60*60,jd=G_*24;function Yc(r,o,s){var _s7;var B=arguments.length>3&&arguments[3]!==undefined?arguments[3]:7;(_s7=s)!==null&&_s7!==void 0?_s7:s=new Date;var Q=new Date(s.getFullYear(),s.getMonth(),s.getDate()),Y=o.valueOf()-s.valueOf(),J=o.toDateString()===s.toDateString(),it=o.valueOf()>Q.valueOf()-jd*B&&o.valueOf()<Q.valueOf()+jd*B;if(!J&&it){var nt=Math.round(Y/jd);return new Intl.RelativeTimeFormat(r,{numeric:"auto"}).format(nt,"days")}else return J?new Intl.DateTimeFormat(r,{timeStyle:"short"}).format(o):new Intl.DateTimeFormat(r,{dateStyle:"short"}).format(o)}var Y_=Object.defineProperty,X_=Object.getOwnPropertyDescriptor,sy=function sy(r,o,s,B){for(var Q=B>1?void 0:B?X_(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&Y_(o,s,Q),Q};var sc=function(_le18){_inherits(sc,_le18);function sc(){_classCallCheck(this,sc);return _callSuper(this,sc,arguments)}_createClass(sc,[{key:"render",value:function render(){var r,o;var s=this.meeting.ended_at?new Intl.DateTimeFormat((r=this.weavyContext)==null?void 0:r.locale,{dateStyle:"full",timeStyle:"short"}).format(new Date(this.meeting.ended_at)):"",B=this.meeting.ended_at?Yc((o=this.weavyContext)==null?void 0:o.locale,new Date(this.meeting.ended_at)):"";return v(_templateObject61||(_templateObject61=_taggedTemplateLiteral(["\n <div class=\"wy-list\">\n ","\n </div>\n "])),this.meeting.ended_at?v(_templateObject62||(_templateObject62=_taggedTemplateLiteral(["\n <div class=\"wy-item wy-meeting\">\n <wy-icon name=\"zoom\" size=\"96\"></wy-icon>\n <div class=\"wy-item-body\">\n <div class=\"wy-item-title\">","</div>\n <div class=\"wy-item-body\">\n <time datetime="," title=",">","</time>\n ","\n </div>\n </div>\n </div>\n "])),K$1("Zoom meeting"),this.meeting.ended_at,s,K$1(c(_templateObject63||(_templateObject63=_taggedTemplateLiteral(["Ended ",""])),B)),this.meeting.ended_at?v(_templateObject64||(_templateObject64=_taggedTemplateLiteral(["\n <div class=\"wy-meeting-actions\">\n <a href="," target=\"_blank\" class=\"wy-button wy-button-primary\"\n >","</a\n >\n </div>\n "])),this.meeting.recording_url,K$1("Play recording")):O):v(_templateObject65||(_templateObject65=_taggedTemplateLiteral(["\n <a class=\"wy-item wy-meeting\" href="," target=\"_blank\">\n <wy-icon name=\"zoom\" size=\"96\" color=\"native\"></wy-icon>\n <div class=\"wy-item-body\">\n <div class=\"wy-item-title\">","</div>\n <div class=\"wy-item-body\">\n <div\n >ID:\n ","-","-","</div\n >\n <div class=\"wy-meeting-actions\">\n <wy-button buttonClass=\"wy-button-primary\">","</wy-button>\n </div>\n </div>\n </div>\n </a>\n "])),this.meeting.join_url,K$1("Zoom meeting"),this.meeting.provider_id.substring(0,3),this.meeting.provider_id.substring(3,6),this.meeting.provider_id.substring(6),K$1("Join meeting")))}}]);return sc}(le);sc.styles=me;sy([Ge({context:Le,subscribe:!0}),K()],sc.prototype,"weavyContext",2);sy([m({attribute:!1})],sc.prototype,"meeting",2);sc=sy([de("wy-meeting-card"),q()],sc);var J_=Object.defineProperty,ex=Object.getOwnPropertyDescriptor,lm=function lm(r,o,s,B){for(var Q=B>1?void 0:B?ex(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&J_(o,s,Q),Q};var Wl=function(_le19){_inherits(Wl,_le19);function Wl(){var _this237;_classCallCheck(this,Wl);_this237=_callSuper(this,Wl,arguments),_this237.text="";return _this237}_createClass(Wl,[{key:"render",value:function render(){var r=this.text.trim();var o="";return r.length&&(o=r.split(/(\n+)/).map(function(s){return"<div>".concat(s.split(/(\s+)/).map(function(B){return"<span class=\"wy-placeholder\">".concat(B,"</span>")}).join(" "),"</div>")}).join(" ")),v(_templateObject66||(_templateObject66=_taggedTemplateLiteral(["\n <div>","</div>\n "])),Do(o))}}]);return Wl}(le);Wl.styles=me;lm([m()],Wl.prototype,"text",2);Wl=lm([de("wy-skeleton")],Wl);var tx=function(){function tx(o){_classCallCheck(this,tx);this.delay=NaN,this.sleep=!1,o.addController(this),this.host=o}_createClass(tx,[{key:"createObserver",value:function createObserver(o){var _this238=this;var s;(s=this.scrollObserver)==null||s.disconnect(),this.swipeElement=o,this.scrollObserver=new IntersectionObserver(function(B){B.forEach(function(){var _ref158=_asyncToGenerator(_regeneratorRuntime().mark(function _callee102(Q){return _regeneratorRuntime().wrap(function _callee102$(_context103){while(1)switch(_context103.prev=_context103.next){case 0:_context103.t0=Q.isIntersecting&&!_this238.sleep&&Q.intersectionRatio>=1;if(!_context103.t0){_context103.next=17;break}_this238.sleep=!0;_context103.t1=Number.isNaN(_this238.delay);if(_context103.t1){_context103.next=7;break}_context103.next=7;return new Promise(function(Y){setTimeout(Y,_this238.delay)});case 7:_context103.t2=Q.target===_this238.prevElement&&_this238.whenPrev;if(!_context103.t2){_context103.next=11;break}_context103.next=11;return _this238.whenPrev();case 11:_context103.t3=Q.target===_this238.nextElement&&_this238.whenNext;if(!_context103.t3){_context103.next=15;break}_context103.next=15;return _this238.whenNext();case 15:_context103.next=17;return _this238.host.updateComplete;case 17:case"end":return _context103.stop()}},_callee102)}));return function(_x86){return _ref158.apply(this,arguments)}}())},{root:o,threshold:1,rootMargin:"0px"})}},{key:"observe",value:function observe(o,s){var B,Q,Y,J;this.prevElement&&((B=this.scrollObserver)==null||B.unobserve(this.prevElement),this.prevElement=void 0),this.nextElement&&((Q=this.scrollObserver)==null||Q.unobserve(this.nextElement),this.nextElement=void 0),o&&((Y=this.scrollObserver)==null||Y.observe(o),this.prevElement=o),s&&((J=this.scrollObserver)==null||J.observe(s),this.nextElement=s),this.sleep=!1}},{key:"clearObserver",value:function clearObserver(){var o;this.prevElement=void 0,this.nextElement=void 0,(o=this.scrollObserver)==null||o.disconnect(),this.sleep=!1}},{key:"hostDisconnected",value:function hostDisconnected(){this.clearObserver()}}]);return tx}();var rx="WEAVY_OFFLINE_CACHE";var Lo;try{Lo=window.sessionStorage}catch(_unused23){console.warn("Session storage not available.")}var ul=new Map;function ix(_x87,_x88){return _ix.apply(this,arguments)}function _ix(){_ix=_asyncToGenerator(_regeneratorRuntime().mark(function _callee272(r,o){var s;return _regeneratorRuntime().wrap(function _callee272$(_context274){while(1)switch(_context274.prev=_context274.next){case 0:s=Lo==null?void 0:Lo.getItem("".concat(r,"-").concat(o.toString()));if(!s){_context274.next=3;break}return _context274.abrupt("return",JSON.parse(s));case 3:case"end":return _context274.stop()}},_callee272)}));return _ix.apply(this,arguments)}function nx(_x89,_x90,_x91){return _nx.apply(this,arguments)}function _nx(){_nx=_asyncToGenerator(_regeneratorRuntime().mark(function _callee273(r,o,s){var B;return _regeneratorRuntime().wrap(function _callee273$(_context275){while(1)switch(_context275.prev=_context275.next){case 0:B=JSON.stringify(s);B&&(Lo==null||Lo.setItem("".concat(r,"-").concat(o.toString()),B));case 2:case"end":return _context275.stop()}},_callee273)}));return _nx.apply(this,arguments)}function ox(_x92,_x93,_x94){return _ox.apply(this,arguments)}function _ox(){_ox=_asyncToGenerator(_regeneratorRuntime().mark(function _callee275(r,o,s){var B;return _regeneratorRuntime().wrap(function _callee275$(_context277){while(1)switch(_context277.prev=_context277.next){case 0:B="".concat(rx,":").concat(_typeof(r),":").concat(o);s.forEach(function(){var _ref287=_asyncToGenerator(_regeneratorRuntime().mark(function _callee274(Q){var Y,_Y9;return _regeneratorRuntime().wrap(function _callee274$(_context276){while(1)switch(_context276.prev=_context276.next){case 0:if(ul.has(Q)){_context276.next=5;break}_context276.next=3;return ix(B,Q);case 3:Y=_context276.sent;Y&&(r[Q]=Y),ul.set(Q,Y);case 5:if(r[Q]!==ul.get(Q)){_Y9=r[Q];ul.set(Q,_Y9),nx(B,Q,_Y9)}case 6:case"end":return _context276.stop()}},_callee274)}));return function(_x237){return _ref287.apply(this,arguments)}}());case 2:case"end":return _context277.stop()}},_callee275)}));return _ox.apply(this,arguments)}var cy=function(){function cy(o,s,B){_classCallCheck(this,cy);this.prefixKey="",this.properties=[],o.addController(this),this.host=o,B&&(this.properties=B),s&&(this.prefixKey=s)}_createClass(cy,[{key:"observe",value:function observe(o,s){this.properties=o,s&&(this.prefixKey=s)}},{key:"hostUpdate",value:function hostUpdate(){this.prefixKey&&this.properties&&ox(this.host,this.prefixKey,this.properties)}}]);return cy}();function gl(r,o){var s=Xs({},window.history.state,!0);if(!s.weavy||!s.weavy[r]||!Object.hasOwn(s.weavy[r],o))throw new Error("Property not found");return s.weavy[r][o]}function Ah(r,o){var s=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"push";var B=arguments.length>3?arguments[3]:undefined;if(o){var _Q$weavy;var Q=Xs({},window.history.state,!0);(_Q$weavy=Q.weavy)!==null&&_Q$weavy!==void 0?_Q$weavy:Q.weavy={},Q.weavy[r]=o,B=B&&String(B)||window.location.href;try{s==="replace"?window.history.replaceState(Q,"",B):window.history.pushState(Q,"",B)}catch(Y){console.warn("history: Could not push history state.",Y,o)}}}function ax(r,o,s){var B="".concat(_typeof(r),":").concat(o);s.forEach(function(){var _ref159=_asyncToGenerator(_regeneratorRuntime().mark(function _callee103(Q){var Y;return _regeneratorRuntime().wrap(function _callee103$(_context104){while(1)switch(_context104.prev=_context104.next){case 0:try{Y=gl(B,Q);r[Q]=Y}catch(_unused24){}case 1:case"end":return _context104.stop()}},_callee103)}));return function(_x95){return _ref159.apply(this,arguments)}}())}function Lh(r,o,s){var B=arguments.length>3&&arguments[3]!==undefined?arguments[3]:"push";var Q="".concat(_typeof(r),":").concat(o),Y={};s.forEach(function(){var _ref160=_asyncToGenerator(_regeneratorRuntime().mark(function _callee104(J){return _regeneratorRuntime().wrap(function _callee104$(_context105){while(1)switch(_context105.prev=_context105.next){case 0:Y[J]=r[J];case 1:case"end":return _context105.stop()}},_callee104)}));return function(_x96){return _ref160.apply(this,arguments)}}()),Ah(Q,Y,B)}function sx(r,o,s){Lh(r,o,s,"replace")}var cx=function(){function cx(o,s,B){var _this239=this;_classCallCheck(this,cx);if(this._backCount=0,this.restoreHistory=function(){if(_this239.prefixKey&&_this239.properties){ax(_this239.host,_this239.prefixKey,_this239.properties);try{_this239._backCount=gl(_this239.prefixKey,"_backCount")||0}catch(_unused25){_this239._backCount=0}_this239.updatePrevPropertyValues()}},o.addController(this),this.host=o,B&&(this.properties=B),s){this.prefixKey=s;try{this._backCount=gl(this.prefixKey,"_backCount")||this._backCount}catch(_unused26){}}}_createClass(cx,[{key:"hasBackNavigation",get:function get(){return this._backCount>0}},{key:"back",value:function back(){window.history.back()}},{key:"backAll",value:function backAll(){window.history.go(this._backCount*-1)}},{key:"observe",value:function observe(o,s){if(this.properties=o,s){this.prefixKey=s;try{this._backCount=gl(this.prefixKey,"_hasBack")||this._backCount}catch(_unused27){}}}},{key:"pushCurrentState",value:function pushCurrentState(){this.prefixKey&&(Lh(this.host,this.prefixKey,this.properties),this._backCount++,Ah(this.prefixKey,{_backCount:this._backCount},"replace"))}},{key:"updatePrevPropertyValues",value:function updatePrevPropertyValues(){var _this$prevPropertyVal,_this240=this;this.properties&&((_this$prevPropertyVal=this.prevPropertyValues)!==null&&_this$prevPropertyVal!==void 0?_this$prevPropertyVal:this.prevPropertyValues={},this.properties.forEach(function(o){_this240.prevPropertyValues[o]=_this240.host[o]}))}},{key:"hostConnected",value:function hostConnected(){window.addEventListener("popstate",this.restoreHistory)}},{key:"hostUpdated",value:function hostUpdated(){var _this241=this;this.prefixKey&&this.properties&&(this.prevPropertyValues?this.properties.some(function(o){return _this241.prevPropertyValues[o]!==_this241.host[o]})&&(Lh(this.prevPropertyValues,this.prefixKey,this.properties),this._backCount++,Ah(this.prefixKey,{_backCount:this._backCount},"replace")):this.prevPropertyValues={},sx(this.host,this.prefixKey,this.properties),this.updatePrevPropertyValues())}},{key:"hostDisconnected",value:function hostDisconnected(){window.removeEventListener("popstate",this.restoreHistory)}}]);return cx}();function md(r){var o=typeof r=="string"&&r.length<=0;return!(r===void 0||_typeof(r)>"u"||r==="undefined"||o)&&(typeof r=="string"?!!JSON.parse(r):!!r)}var lx=Object.defineProperty,dx=Object.getOwnPropertyDescriptor,vd=function vd(r,o,s,B){for(var Q=B>1?void 0:B?dx(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&lx(o,s,Q),Q};var Ua=function(_le20){_inherits(Ua,_le20);function Ua(){var _this242;_classCallCheck(this,Ua);_this242=_callSuper(this,Ua,arguments),_this242.open=!0,_this242.maximized=!1,_this242.header=!1,_this242.viewportRef=Re(),_this242.releaseFocusEvent=function(){return new CustomEvent("release-focus",{bubbles:!0,composed:!0})},_this242.removeModalEvent=function(){return new Event("removeModal",{bubbles:!0,composed:!0})},_this242.handleKeys=function(r){_this242.open&&r.key==="Escape"&&(r.stopImmediatePropagation(),_this242.close())};return _this242}_createClass(Ua,[{key:"close",value:function close(){this.open=!1,this.dispatchEvent(this.removeModalEvent()),this.dispatchEvent(this.releaseFocusEvent())}},{key:"regainFocus",value:function regainFocus(r){var o;this.open&&r.composedPath()[0]!==this&&(r.stopImmediatePropagation(),(o=this.viewportRef.value)==null||o.focus())}},{key:"willUpdate",value:function willUpdate(r){r.has("open")&&(this.open?(this.addEventListener("keyup",this.handleKeys),this.addEventListener("release-focus",this.regainFocus)):(this.removeEventListener("keyup",this.handleKeys),this.removeEventListener("release-focus",this.regainFocus)))}},{key:"render",value:function render(){var _this243=this;var r={"wy-open":this.open,"wy-modal-full":this.maximized};return v(_templateObject67||(_templateObject67=_taggedTemplateLiteral(["\n <section class=\"wy-overlays wy-viewport\" tabindex=\"0\" ",">\n <div class=\"wy-panel wy-overlay wy-transition wy-modal ","\">\n ","\n <slot></slot>\n </div>\n </section>\n "])),Ce(this.viewportRef),Qe(r),this.header?v(_templateObject68||(_templateObject68=_taggedTemplateLiteral(["\n <slot name=\"header\">\n <header class=\"wy-appbars\">\n <nav class=\"wy-appbar\">\n <wy-button kind=\"icon\" @click=","><wy-icon name=\"close\"></wy-icon></wy-button>\n <slot name=\"appbar-text\" class=\"wy-appbar-text\"></slot>\n <slot name=\"appbar-buttons\" class=\"wy-appbar-buttons\"></slot>\n </nav>\n </header>\n </slot>\n "])),function(){return _this243.close()}):O)}},{key:"updated",value:function updated(r){var o;r.has("open")&&this.open&&((o=this.viewportRef.value)==null||o.focus())}},{key:"disconnectedCallback",value:function disconnectedCallback(){_get(_getPrototypeOf(Ua.prototype),"disconnectedCallback",this).call(this),this.close()}}]);return Ua}(le);Ua.styles=me;vd([m({converter:md})],Ua.prototype,"open",2);vd([m({type:Boolean})],Ua.prototype,"maximized",2);vd([m({type:Boolean})],Ua.prototype,"header",2);Ua=vd([de("wy-overlay")],Ua);function gd(r){r.stopPropagation()}function hx(r){r.key==="Escape"&&(r.target.value="")}function dm(r){r.key==="Escape"&&r.target.blur()}function ql(r){r.stopPropagation(),dm(r)}function hm(r){r.stopPropagation(),r.target.value?hx(r):dm(r)}function ux(r){r.key==="Enter"&&(r.stopPropagation(),r.target.click())}function yx(r){r.key===" "&&(r.preventDefault(),r.stopPropagation())}function Bn(r){ux(r),yx(r)}function Hn(r){r.key===" "&&(r.preventDefault(),r.stopPropagation(),r.target.click())}var px=Object.defineProperty,wx=Object.getOwnPropertyDescriptor,yr=function yr(r,o,s,B){for(var Q=B>1?void 0:B?wx(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&px(o,s,Q),Q};var si=function(_le21){_inherits(si,_le21);function si(){var _this244;_classCallCheck(this,si);_this244=_callSuper(this,si),_this244.directionX="right",_this244.directionY="down",_this244.icon="dots-vertical",_this244.noWrapper=!1,_this244.disabled=!1,_this244._placement="bottom-start",_this244.wasVisible=!1,_this244.visible=!1,_this244.popperReferenceRef=Re(),_this244.popperElementRef=Re(),_this244._documentClickHandler=function(r){_this244.wasVisible=_this244.visible,r.preventDefault(),_this244.visible=!1},_this244.addEventListener("click",function(r){r.stopPropagation()});return _this244}_createClass(si,[{key:"handleClickToggle",value:function handleClickToggle(r){(!r.defaultPrevented||r.defaultPrevented&&!this.wasVisible)&&(this.visible=!this.visible)}},{key:"willUpdate",value:function willUpdate(r){var _this245=this;var o;(r.has("directionX")||r.has("directionY"))&&(this._placement=this.directionX==="right"&&this.directionY==="down"?"bottom-start":this.directionX==="left"&&this.directionY==="down"?"bottom-end":this.directionX==="right"&&this.directionY==="up"?"top-start":"top-end"),r.has("visible")&&(this.visible?requestAnimationFrame(function(){document.addEventListener("click",_this245._documentClickHandler,{once:!0,capture:!0})}):document.removeEventListener("click",this._documentClickHandler,{capture:!0}),this.visible&&!this._popper&&this.popperReferenceRef.value&&this.popperElementRef.value?this._popper=sm(this.popperReferenceRef.value,this.popperElementRef.value):!this.visible&&this._popper&&(this._popper.destroy(),this._popper=void 0),(o=this._popper)==null||o.setOptions({placement:this._placement,modifiers:[{name:"offset",options:{offset:function offset(_ref161){var s=_ref161.placement;return[0,s.includes("top")?9:13]}}},{name:"preventOverflow",options:{padding:4}}]}))}},{key:"render",value:function render(){var _this246=this;var r=this._slotButton.length===0||this._slotButton.length===1&&this._slotButton[0]instanceof ar;return v(_templateObject69||(_templateObject69=_taggedTemplateLiteral(["\n <span\n tabindex=\"0\"\n @click=","\n @keydown=","\n @keyup=","\n >\n <wy-button\n .kind=","\n ","\n class=","\n title=","\n ?disabled=","\n >\n <slot name=\"button\" @slotchange=",">\n <wy-icon name=","></wy-icon>\n </slot>\n </wy-button>\n\n <div "," class=\"wy-dropdown-menu\" ?hidden=",">\n <slot></slot>\n </div>\n </span>\n "])),this.handleClickToggle,Bn,Hn,r?"icon":void 0,Ce(this.popperReferenceRef),Qe({"wy-active":this.visible}),this.title,this.disabled,function(){return _this246.requestUpdate()},this.icon,Ce(this.popperElementRef),!this.visible)}}]);return si}(le);si.styles=[Be(_templateObject70||(_templateObject70=_taggedTemplateLiteral(["\n /*:host {\n position: relative;\n }*/\n "]))),me];yr([m()],si.prototype,"directionX",2);yr([m()],si.prototype,"directionY",2);yr([m()],si.prototype,"icon",2);yr([m({type:Boolean})],si.prototype,"noWrapper",2);yr([m({type:Boolean})],si.prototype,"disabled",2);yr([K()],si.prototype,"_placement",2);yr([K()],si.prototype,"visible",2);yr([mg({slot:"button"})],si.prototype,"_slotButton",2);yr([K()],si.prototype,"_popper",2);si=yr([de("wy-dropdown")],si);var Ql=function(_le22){_inherits(Ql,_le22);function Ql(){var _this247;_classCallCheck(this,Ql);_this247=_callSuper(this,Ql,arguments),_this247.active=!1;return _this247}_createClass(Ql,[{key:"render",value:function render(){return v(_templateObject71||(_templateObject71=_taggedTemplateLiteral(["<div class=\"wy-dropdown-item ","\"><slot></slot></div>"])),Qe({"wy-active":this.active}))}}]);return Ql}(le);Ql.styles=[me,Be(_templateObject72||(_templateObject72=_taggedTemplateLiteral(["\n :host {\n display: contents;\n }\n "])))];yr([m({converter:md})],Ql.prototype,"active",2);Ql=yr([de("wy-dropdown-item")],Ql);var cc=function(_le23){_inherits(cc,_le23);function cc(){var _this248;_classCallCheck(this,cc);_this248=_callSuper(this,cc,arguments),_this248.active=!1,_this248.selected=!1;return _this248}_createClass(cc,[{key:"render",value:function render(){var r={visibility:this.selected?null:"hidden"};return v(_templateObject73||(_templateObject73=_taggedTemplateLiteral(["\n <div class=\"wy-dropdown-item wy-option ","\">\n <slot name=\"icon\" style=","><wy-icon name=\"check\"></wy-icon></slot>\n <slot></slot>\n </div>\n "])),Qe({"wy-active":this.active,"wy-selected":this.selected}),Hl(r))}}]);return cc}(le);cc.styles=[me,Be(_templateObject74||(_templateObject74=_taggedTemplateLiteral(["\n :host {\n display: contents;\n }\n "])))];yr([m({converter:md})],cc.prototype,"active",2);yr([m({type:Boolean})],cc.prototype,"selected",2);cc=yr([de("wy-dropdown-option")],cc);var Mh=function(_le24){_inherits(Mh,_le24);function Mh(){_classCallCheck(this,Mh);return _callSuper(this,Mh,arguments)}_createClass(Mh,[{key:"render",value:function render(){return v(_templateObject75||(_templateObject75=_taggedTemplateLiteral(["<hr class=\"wy-dropdown-divider\" />"])))}}]);return Mh}(le);Mh.styles=[me,Be(_templateObject76||(_templateObject76=_taggedTemplateLiteral(["\n :host {\n display: contents;\n }\n "])))];Mh=yr([de("wy-dropdown-divider")],Mh);var fx=Object.defineProperty,mx=Object.getOwnPropertyDescriptor,Xc=function Xc(r,o,s,B){for(var Q=B>1?void 0:B?mx(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&fx(o,s,Q),Q};var Vo=function(_le25){_inherits(Vo,_le25);function Vo(){_classCallCheck(this,Vo);return _callSuper(this,Vo,arguments)}_createClass(Vo,[{key:"render",value:function render(){var _this$iconClass;var r=this.icon;var o=ls(this.provider);return o&&(r="".concat(r,"+").concat(o)),v(_templateObject77||(_templateObject77=_taggedTemplateLiteral(["\n <div class=\"wy-content-icon ","\">\n <div class=\"wy-content-icon\">\n <wy-icon name=","></wy-icon>\n </div>\n <div class=\"wy-content-name\">\n ","\n </div>\n </div>\n "])),(_this$iconClass=this.iconClass)!==null&&_this$iconClass!==void 0?_this$iconClass:"",r,this.provider?v(_templateObject78||(_templateObject78=_taggedTemplateLiteral(["\n <span>"," </span>\n <a href="," target=\"_blank\">","</a>\n "])),K$1("No preview available :("),this.src,K$1(c(_templateObject79||(_templateObject79=_taggedTemplateLiteral(["Open in ","?"])),this.provider))):v(_templateObject80||(_templateObject80=_taggedTemplateLiteral(["<span>","</span>"])),K$1("No preview available :(")))}}]);return Vo}(le);Vo.styles=[me,Be(_templateObject81||(_templateObject81=_taggedTemplateLiteral(["\n :host {\n display: contents;\n }\n "])))];Xc([m()],Vo.prototype,"src",2);Xc([m()],Vo.prototype,"icon",2);Xc([m()],Vo.prototype,"provider",2);Xc([m()],Vo.prototype,"iconClass",2);Vo=Xc([de("wy-preview-icon"),q()],Vo);var vx=Object.defineProperty,gx=Object.getOwnPropertyDescriptor,bd=function bd(r,o,s,B){for(var Q=B>1?void 0:B?gx(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&vx(o,s,Q),Q};var Wa=function(_le26){_inherits(Wa,_le26);function Wa(){_classCallCheck(this,Wa);return _callSuper(this,Wa,arguments)}_createClass(Wa,[{key:"render",value:function render(){if(this.width&&this.height){var _r4={"--width":this.width,"--height":this.height};return v(_templateObject82||(_templateObject82=_taggedTemplateLiteral(["\n <div class=\"wy-content-image wy-responsive-image\" style=",">\n <img\n class=\"wy-loading-transition\"\n src=","\n ","\n @load=","\n width=","\n height=","\n decoding=\"async\"\n alt="," />\n <wy-spinner></wy-spinner>\n </div>\n "])),Hl(_r4),this.src,Ce($h),Eh,this.width,this.height,K$1("Preview"))}else return v(_templateObject83||(_templateObject83=_taggedTemplateLiteral(["\n <div class=\"wy-content-image wy-responsive-image wy-intrinsic-image\">\n <img src="," "," @load="," decoding=\"async\" alt="," />\n </div>\n "])),this.src,Ce($h),Eh,K$1("Preview"))}}]);return Wa}(le);Wa.styles=[me,Be(_templateObject84||(_templateObject84=_taggedTemplateLiteral(["\n :host {\n display: contents;\n }\n "])))];bd([m()],Wa.prototype,"src",2);bd([m({type:Number})],Wa.prototype,"width",2);bd([m({type:Number})],Wa.prototype,"height",2);Wa=bd([de("wy-preview-image"),q()],Wa);function um(r){r.classList.contains("wy-loading")&&r.classList.add("wy-loaded"),r.classList.add("wy-error"),r.outerHTML=r.outerHTML.replace(/<(video|audio)/,"<div").replace(/(video|audio)>/,"div>")}function zp(r){var o=r.target;(o.tagName==="VIDEO"||o.tagName==="AUDIO")&&o.classList.contains("wy-loading")&&o.classList.add("wy-loaded")}function Np(r){var o=r.target;if(o.tagName==="SOURCE"&&o.parentNode){var s=o.parentNode,B=parseInt(s.dataset.errors||"0")+1;s.dataset.errors=B.toString(),s.querySelectorAll("source").length>=B&&(console.warn(s.tagName.toLowerCase()+" source error, switching to fallback"),um(s))}}function Vp(r){var o=r.target;(o.tagName==="VIDEO"||o.tagName==="AUDIO")&&(o.tagName==="VIDEO"&&!o.videoWidth||o.tagName==="AUDIO"&&!o.duration)&&(console.warn(o.tagName.toLowerCase()+" track not available, switching to fallback"),um(o))}var bx=Object.defineProperty,_x=Object.getOwnPropertyDescriptor,Jc=function Jc(r,o,s,B){for(var Q=B>1?void 0:B?_x(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&bx(o,s,Q),Q};var Bo=function(_le27){_inherits(Bo,_le27);function Bo(){var _this249;_classCallCheck(this,Bo);_this249=_callSuper(this,Bo,arguments),_this249.format="",_this249.name="";return _this249}_createClass(Bo,[{key:"registerLoading",value:function registerLoading(r){this.unregisterLoading(),r&&(this.mediaElement=r,r.classList.add("wy-loading"),r.addEventListener("error",Np,!0),r.addEventListener("loadedmetadata",zp,!0),r.addEventListener("loadedmetadata",Vp,!0))}},{key:"unregisterLoading",value:function unregisterLoading(){this.mediaElement&&(this.mediaElement.pause(),this.mediaElement.removeAttribute("autoplay"),this.mediaElement.setAttribute("preload","none"),this.mediaElement.removeEventListener("error",Np,!0),this.mediaElement.removeEventListener("loadedmetadata",zp,!0),this.mediaElement.removeEventListener("loadedmetadata",Vp,!0),this.mediaElement=void 0)}},{key:"render",value:function render(){return this.format==="video"?v(_templateObject85||(_templateObject85=_taggedTemplateLiteral(["\n <video "," class=\"wy-content-video\" controls crossorigin=\"use-credentials\" autoplay>\n <source src="," type="," />\n <wy-preview-icon src="," icon=\"file-video\"></wy-preview-icon>\n </video>\n <wy-spinner></wy-spinner>\n "])),Ce(this.registerLoading),this.src,et(this.mediaType),this.src):v(_templateObject86||(_templateObject86=_taggedTemplateLiteral(["\n <audio "," class=\"wy-content-audio\" controls crossorigin=\"use-credentials\" autoplay>\n <source src="," type="," />\n </audio>\n "])),Ce(this.registerLoading),this.src,et(this.mediaType))}},{key:"disconnectedCallback",value:function disconnectedCallback(){this.unregisterLoading(),_get(_getPrototypeOf(Bo.prototype),"disconnectedCallback",this).call(this)}}]);return Bo}(le);Bo.styles=[me,Be(_templateObject87||(_templateObject87=_taggedTemplateLiteral(["\n :host {\n display: contents;\n }\n "])))];Jc([m()],Bo.prototype,"format",2);Jc([m()],Bo.prototype,"src",2);Jc([m()],Bo.prototype,"name",2);Jc([m()],Bo.prototype,"mediaType",2);Bo=Jc([de("wy-preview-media")],Bo);var xx=Object.defineProperty,kx=Object.getOwnPropertyDescriptor,Go=function Go(r,o,s,B){for(var Q=B>1?void 0:B?kx(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&xx(o,s,Q),Q};var hn=function(_le28){_inherits(hn,_le28);function hn(){var _this250;_classCallCheck(this,hn);_this250=_callSuper(this,hn,arguments),_this250.html=!1,_this250.code=!1,_this250.textOrHtmlContent="",_this250.loading=!0;return _this250}_createClass(hn,[{key:"updated",value:function(){var _updated=_asyncToGenerator(_regeneratorRuntime().mark(function _callee105(r){var _this251=this;return _regeneratorRuntime().wrap(function _callee105$(_context106){while(1)switch(_context106.prev=_context106.next){case 0:_context106.t0=(r.has("weavyContext")||r.has("src"))&&this.weavyContext;if(!_context106.t0){_context106.next=9;break}this.loading=!0;_context106.t1=fetch;_context106.t2=this.src;_context106.next=7;return this.weavyContext.fetchOptions();case 7:_context106.t3=_context106.sent;(0,_context106.t1)(_context106.t2,_context106.t3).then(Ub).then(function(o){return new Response(o)}).then(function(o){return o.text()}).then(function(o){_this251.loading=!1,_this251.textOrHtmlContent=o});case 9:case"end":return _context106.stop()}},_callee105,this)}));function updated(_x97){return _updated.apply(this,arguments)}return updated}()},{key:"render",value:function render(){return this.loading?v(_templateObject88||(_templateObject88=_taggedTemplateLiteral(["\n <wy-empty><wy-spinner></wy-spinner></wy-empty>\n "]))):this.html?this.code?v(_templateObject89||(_templateObject89=_taggedTemplateLiteral([" <div class=\"wy-content-code wy-code\">","</div> "])),Do(this.textOrHtmlContent)):v(_templateObject90||(_templateObject90=_taggedTemplateLiteral(["\n <div class=\"wy-document\">\n <div class=\"wy-content-html\">","</div>\n </div>\n "])),Do(this.textOrHtmlContent)):this.code?v(_templateObject91||(_templateObject91=_taggedTemplateLiteral([" <div class=\"wy-content-code\">","</div> "])),this.textOrHtmlContent):v(_templateObject92||(_templateObject92=_taggedTemplateLiteral(["\n <div class=\"wy-document wy-light\">\n <pre class=\"wy-content-text\">","</pre>\n </div>\n "])),this.textOrHtmlContent)}}]);return hn}(le);hn.styles=[me,Be(_templateObject93||(_templateObject93=_taggedTemplateLiteral(["\n :host {\n display: contents;\n }\n "])))];Go([Ge({context:Le,subscribe:!0}),K()],hn.prototype,"weavyContext",2);Go([m()],hn.prototype,"src",2);Go([m({type:Boolean})],hn.prototype,"html",2);Go([m({type:Boolean})],hn.prototype,"code",2);Go([K()],hn.prototype,"textOrHtmlContent",2);Go([K()],hn.prototype,"loading",2);hn=Go([de("wy-preview-text")],hn);var Cx=Object.defineProperty,$x=Object.getOwnPropertyDescriptor,el=function el(r,o,s,B){for(var Q=B>1?void 0:B?$x(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&Cx(o,s,Q),Q};var Ho=function(_le29){_inherits(Ho,_le29);function Ho(){_classCallCheck(this,Ho);return _callSuper(this,Ho,arguments)}_createClass(Ho,[{key:"registerLoading",value:function registerLoading(r){var _this252=this;var o;if((o=this.unregisterLoading)==null||o.call(this),r){this.embedElement=r,r.classList.add("wy-loading");var s=window.setTimeout(function(){r.classList.add("wy-fallback")},2500),B=function B(Q){var Y=Q.target;Y.tagName==="OBJECT"&&Y.classList.contains("wy-loading")&&!Y.classList.contains("wy-loaded")&&(Y.classList.add("wy-loaded"),window.clearTimeout(s))};r.addEventListener("load",B,!0),this.unregisterLoading=function(){_this252.embedElement&&(r.removeEventListener("load",B,!0),window.clearTimeout(s),_this252.embedElement=void 0)}}}},{key:"render",value:function render(){return v(_templateObject94||(_templateObject94=_taggedTemplateLiteral(["\n <object title="," "," class=\"wy-content-iframe\" data=","></object>\n <wy-spinner overlay></wy-spinner>\n <wy-preview-icon\n src=","\n icon=","\n provider=","\n class=\"wy-content-iframe-fallback\"></wy-preview-icon>\n "])),K$1("Preview"),Ce(this.registerLoading),this.src,this.src,this.icon,et(this.provider))}},{key:"disconnectedCallback",value:function disconnectedCallback(){var r;(r=this.unregisterLoading)==null||r.call(this),_get(_getPrototypeOf(Ho.prototype),"disconnectedCallback",this).call(this)}}]);return Ho}(le);Ho.styles=[me,Be(_templateObject95||(_templateObject95=_taggedTemplateLiteral(["\n :host {\n display: contents;\n }\n "])))];el([m()],Ho.prototype,"src",2);el([m()],Ho.prototype,"name",2);el([m()],Ho.prototype,"icon",2);el([m()],Ho.prototype,"provider",2);Ho=el([de("wy-preview-embed"),q()],Ho);var ym={exports:{}};(function(r,o){(function(s,B){r.exports=s.pdfjsViewer=B()})(globalThis,function(){return function(){var s=[,function(J,it,nt){var ot,dt,Mt,Ot,Qt,Ut,te,qt,ie,re,ne,ae,Bt,Wt,oe,ve,_e,Xe,He,ro,Xo,Se,xr,pr,$e,_r,Ps,qe,bl,ol,Te,pe,ue,se,be,Ae,ze,pi,io,Qr,Es,nl,Cr;Object.defineProperty(it,"__esModule",{value:!0}),it.PDFFindController=it.FindState=void 0;var $l=nt(2),_l=nt(3),Ih=nt(4);var Rh={FOUND:0,NOT_FOUND:1,WRAPPED:2,PENDING:3};it.FindState=Rh;var Th=250,$s=-50,Dr=-400,Xi={"\u2010":"-","\u2018":"'","\u2019":"'","\u201A":"'","\u201B":"'","\u201C":"\"","\u201D":"\"","\u201E":"\"","\u201F":"\"","\xBC":"1/4","\xBD":"1/2","\xBE":"3/4"},Ke=new Set([12441,12442,2381,2509,2637,2765,2893,3021,3149,3277,3387,3388,3405,3530,3642,3770,3972,4153,4154,5908,5940,6098,6752,6980,7082,7083,7154,7155,11647,43014,43052,43204,43347,43456,43766,44013,3158,3953,3954,3962,3963,3964,3965,3968,3956]);var ta;var Cl=new RegExp("\\p{M}+","gu"),Oh=new RegExp("([.*+?^${}()|[\\]\\\\])|(\\p{P})|(\\s+)|(\\p{M})|(\\p{L})","gu"),jh=new RegExp("([^\\p{M}])\\p{M}*$","u"),qh=new RegExp("^\\p{M}*([^\\p{M}])","u"),Bh=/[\uAC00-\uD7AF\uFA6C\uFACF-\uFAD1\uFAD5-\uFAD7]+/g,Jh=new Map,Xh="[\\u1100-\\u1112\\ud7a4-\\ud7af\\ud84a\\ud84c\\ud850\\ud854\\ud857\\ud85f]",Qh=new Map;var Kh=null,ia=null;function fe(rn){var Oe=[];var wi;for(;(wi=Bh.exec(rn))!==null;){var _wi3=wi,ke=_wi3.index;var _iterator181=_createForOfIteratorHelper(wi[0]),_step181;try{for(_iterator181.s();!(_step181=_iterator181.n()).done;){var ye=_step181.value;var Ie=Jh.get(ye);Ie||(Ie=ye.normalize("NFD").length,Jh.set(ye,Ie)),Oe.push([Ie,ke++])}}catch(err){_iterator181.e(err)}finally{_iterator181.f()}}var Jo;if(Oe.length===0&&Kh)Jo=Kh;else if(Oe.length>0&&ia)Jo=ia;else{var _ke=Object.keys(Xi).join(""),_ye=(0,_l.getNormalizeWithNFKC)(),_Ie="([".concat(_ke,"])|([").concat(_ye,"])|((?:\u3099|\u309A)\\n)|(\\p{M}+(?:-\\n)?)|(\\S-\\n)|((?:\\p{Ideographic}|[\u3040-\u30FF])\\n)|(\\n)");Oe.length===0?Jo=Kh=new RegExp(_Ie+"|(\\u0000)","gum"):Jo=ia=new RegExp(_Ie+"|(".concat(Xh,")"),"gum")}var xl=[];for(;(wi=Cl.exec(rn))!==null;)xl.push([wi[0].length,wi.index]);var Pd=rn.normalize("NFD");var Dh=[[0,0]];var Vh=0,Ed=0,Nh=0,Zh=0,py=0,Hh=!1;return Pd=Pd.replace(Jo,function(ke,ye,Ie,cr,lr,Ss,kl,Wh,zh,Fh){var tu,Uh,Yh;if(Fh-=Zh,ye){var Gh=Xi[ye],eu=Gh.length;for(var ru=1;ru<eu;ru++)Dh.push([Fh-Nh+ru,Nh-ru]);return Nh-=eu-1,Gh}if(Ie){var _Gh6=Qh.get(Ie);_Gh6||(_Gh6=Ie.normalize("NFKC"),Qh.set(Ie,_Gh6));var _eu3=_Gh6.length;for(var _ru3=1;_ru3<_eu3;_ru3++)Dh.push([Fh-Nh+_ru3,Nh-_ru3]);return Nh-=_eu3-1,_Gh6}if(cr)return Hh=!0,Fh+py===((tu=xl[Vh])==null?void 0:tu[1])?++Vh:(Dh.push([Fh-1-Nh+1,Nh-1]),Nh-=1,Zh+=1),Dh.push([Fh-Nh+1,Nh]),Zh+=1,py+=1,cr.charAt(0);if(lr){var _Gh7=lr.endsWith("\n"),_eu4=_Gh7?lr.length-2:lr.length;Hh=!0;var _ru4=_eu4;Fh+py===((Uh=xl[Vh])==null?void 0:Uh[1])&&(_ru4-=xl[Vh][0],++Vh);for(var yy=1;yy<=_ru4;yy++)Dh.push([Fh-1-Nh+yy,Nh-yy]);return Nh-=_ru4,Zh+=_ru4,_Gh7?(Fh+=_eu4-1,Dh.push([Fh-Nh+1,1+Nh]),Nh+=1,Zh+=1,py+=1,lr.slice(0,_eu4)):lr}if(Ss){var _Gh8=Ss.length-2;return Dh.push([Fh-Nh+_Gh8,1+Nh]),Nh+=1,Zh+=1,py+=1,Ss.slice(0,-2)}if(kl){var _Gh9=kl.length-1;return Dh.push([Fh-Nh+_Gh9,Nh]),Zh+=1,py+=1,kl.slice(0,-1)}if(Wh)return Dh.push([Fh-Nh+1,Nh-1]),Nh-=1,Zh+=1,py+=1," ";if(Fh+py===((Yh=Oe[Ed])==null?void 0:Yh[1])){var _Gh10=Oe[Ed][0]-1;++Ed;for(var _eu5=1;_eu5<=_Gh10;_eu5++)Dh.push([Fh-(Nh-_eu5),Nh-_eu5]);Nh-=_Gh10,Zh+=_Gh10}return zh}),Dh.push([Pd.length,Nh]),[Pd,Dh,Hh]}function Me(rn,Oe,wi){if(!rn)return[Oe,wi];var Jo=Oe,xl=Oe+wi-1;var Pd=(0,$l.binarySearchFirstItem)(rn,function(Nh){return Nh[0]>=Jo});rn[Pd][0]>Jo&&--Pd;var Dh=(0,$l.binarySearchFirstItem)(rn,function(Nh){return Nh[0]>=xl},Pd);rn[Dh][0]>xl&&--Dh;var Vh=Jo+rn[Pd][1],Ed=xl+rn[Dh][1]+1-Vh;return[Vh,Ed]}var kr=function(){function kr(_ref162){var Oe=_ref162.linkService,wi=_ref162.eventBus,_ref162$updateMatches=_ref162.updateMatchesCountOnProgress,Jo=_ref162$updateMatches===void 0?!0:_ref162$updateMatches;_classCallCheck(this,kr);S(this,Ot),S(this,Ut),S(this,qt),S(this,re),S(this,ae),S(this,Wt),S(this,ve),S(this,Xe),S(this,ro),S(this,Se),S(this,pr),S(this,_r),S(this,qe),S(this,ol),S(this,pe),S(this,se),S(this,Ae),S(this,pi),S(this,Qr),S(this,nl),S(this,ot,null),S(this,dt,!0),S(this,Mt,0),this._linkService=Oe,this._eventBus=wi,A(this,dt,Jo),this.onIsPageVisible=null,D(this,Ut,te).call(this),wi._on("find",D(this,Ot,Qt).bind(this)),wi._on("findbarclose",D(this,Ae,ze).bind(this))}_createClass(kr,[{key:"highlightMatches",get:function get(){return this._highlightMatches}},{key:"pageMatches",get:function get(){return this._pageMatches}},{key:"pageMatchesLength",get:function get(){return this._pageMatchesLength}},{key:"selected",get:function get(){return this._selected}},{key:"state",get:function get(){return h(this,ot)}},{key:"setDocument",value:function setDocument(Oe){this._pdfDocument&&D(this,Ut,te).call(this),Oe&&(this._pdfDocument=Oe,this._firstPageCapability.resolve())}},{key:"scrollMatchIntoView",value:function scrollMatchIntoView(_ref163){var _ref163$element=_ref163.element,Oe=_ref163$element===void 0?null:_ref163$element,_ref163$selectedLeft=_ref163.selectedLeft,wi=_ref163$selectedLeft===void 0?0:_ref163$selectedLeft,_ref163$pageIndex=_ref163.pageIndex,Jo=_ref163$pageIndex===void 0?-1:_ref163$pageIndex,_ref163$matchIndex=_ref163.matchIndex,xl=_ref163$matchIndex===void 0?-1:_ref163$matchIndex;if(!this._scrollMatches||!Oe||xl===-1||xl!==this._selected.matchIdx||Jo===-1||Jo!==this._selected.pageIdx)return;this._scrollMatches=!1;var Pd={top:$s,left:wi+Dr};(0,$l.scrollIntoView)(Oe,Pd,!0)}}]);return kr}();ot=new WeakMap,dt=new WeakMap,Mt=new WeakMap,Ot=new WeakSet,Qt=function Qt(rn){var _this253=this;if(!rn)return;rn.phraseSearch===!1&&(console.error("The `phraseSearch`-parameter was removed, please provide an Array of strings in the `query`-parameter instead."),typeof rn.query=="string"&&(rn.query=rn.query.match(/\S+/g)));var Oe=this._pdfDocument,wi=rn.type;(h(this,ot)===null||D(this,re,ne).call(this,rn))&&(this._dirtyMatch=!0),A(this,ot,rn),wi!=="highlightallchange"&&D(this,nl,Cr).call(this,Rh.PENDING),this._firstPageCapability.promise.then(function(){if(!_this253._pdfDocument||Oe&&_this253._pdfDocument!==Oe)return;D(_this253,ro,Xo).call(_this253);var Jo=!_this253._highlightMatches,xl=!!_this253._findTimeout;_this253._findTimeout&&(clearTimeout(_this253._findTimeout),_this253._findTimeout=null),wi?_this253._dirtyMatch?D(_this253,_r,Ps).call(_this253):wi==="again"?(D(_this253,_r,Ps).call(_this253),Jo&&h(_this253,ot).highlightAll&&D(_this253,pr,$e).call(_this253)):wi==="highlightallchange"?(xl?D(_this253,_r,Ps).call(_this253):_this253._highlightMatches=!0,D(_this253,pr,$e).call(_this253)):D(_this253,_r,Ps).call(_this253):_this253._findTimeout=setTimeout(function(){D(_this253,_r,Ps).call(_this253),_this253._findTimeout=null},Th)})},Ut=new WeakSet,te=function te(){this._highlightMatches=!1,this._scrollMatches=!1,this._pdfDocument=null,this._pageMatches=[],this._pageMatchesLength=[],A(this,Mt,0),A(this,ot,null),this._selected={pageIdx:-1,matchIdx:-1},this._offset={pageIdx:null,matchIdx:null,wrapped:!1},this._extractTextPromises=[],this._pageContents=[],this._pageDiffs=[],this._hasDiacritics=[],this._matchesCountTotal=0,this._pagesToSearch=null,this._pendingFindMatches=new Set,this._resumePageIdx=null,this._dirtyMatch=!1,clearTimeout(this._findTimeout),this._findTimeout=null,this._firstPageCapability=new Ih.PromiseCapability},qt=new WeakSet,ie=function ie(){var _fe,_fe2;var _h4=h(this,ot),rn=_h4.query;return typeof rn=="string"?(rn!==this._rawQuery&&(this._rawQuery=rn,(_fe=fe(rn),_fe2=_slicedToArray(_fe,1),this._normalizedQuery=_fe2[0])),this._normalizedQuery):(rn||[]).filter(function(Oe){return!!Oe}).map(function(Oe){return fe(Oe)[0]})},re=new WeakSet,ne=function ne(rn){var _ref164;var Oe;var wi=rn.query,Jo=h(this,ot).query,xl=_typeof(wi);if(xl!==_typeof(Jo))return!0;if(xl==="string"){if(wi!==Jo)return!0}else if(JSON.stringify(wi)!==JSON.stringify(Jo))return!0;switch(rn.type){case"again":var Pd=this._selected.pageIdx+1,Dh=this._linkService;return Pd>=1&&Pd<=Dh.pagesCount&&Pd!==Dh.page&&!((_ref164=(Oe=this.onIsPageVisible)==null?void 0:Oe.call(this,Pd))!==null&&_ref164!==void 0?_ref164:!0);case"highlightallchange":return!1}return!0},ae=new WeakSet,Bt=function Bt(rn,Oe,wi){var Jo=rn.slice(0,Oe).match(jh);if(Jo){var xl=rn.charCodeAt(Oe),Pd=Jo[1].charCodeAt(0);if((0,_l.getCharacterType)(xl)===(0,_l.getCharacterType)(Pd))return!1}if(Jo=rn.slice(Oe+wi).match(qh),Jo){var _xl=rn.charCodeAt(Oe+wi-1),_Pd=Jo[1].charCodeAt(0);if((0,_l.getCharacterType)(_xl)===(0,_l.getCharacterType)(_Pd))return!1}return!0},Wt=new WeakSet,oe=function oe(rn,Oe,wi,Jo){var xl=this._pageMatches[wi]=[],Pd=this._pageMatchesLength[wi]=[];if(!rn)return;var Dh=this._pageDiffs[wi];var Vh;for(;(Vh=rn.exec(Jo))!==null;){if(Oe&&!D(this,ae,Bt).call(this,Jo,Vh.index,Vh[0].length))continue;var _Me2=Me(Dh,Vh.index,Vh[0].length),_Me3=_slicedToArray(_Me2,2),Ed=_Me3[0],Nh=_Me3[1];Nh&&(xl.push(Ed),Pd.push(Nh))}},ve=new WeakSet,_e=function _e(rn,Oe){var _h5=h(this,ot),wi=_h5.matchDiacritics;var Jo=!1;rn=rn.replaceAll(Oh,function(Pd,Dh,Vh,Ed,Nh,Zh){return Dh?"[ ]*\\".concat(Dh,"[ ]*"):Vh?"[ ]*".concat(Vh,"[ ]*"):Ed?"[ ]+":wi?Nh||Zh:Nh?Ke.has(Nh.charCodeAt(0))?Nh:"":Oe?(Jo=!0,"".concat(Zh,"\\p{M}*")):Zh});var xl="[ ]*";return rn.endsWith(xl)&&(rn=rn.slice(0,rn.length-xl.length)),wi&&Oe&&(ta||(ta=String.fromCharCode.apply(String,_toConsumableArray(Ke))),Jo=!0,rn="".concat(rn,"(?=[").concat(ta,"]|[^\\p{M}]|$)")),[Jo,rn]},Xe=new WeakSet,He=function He(rn){var _D$call,_D$call2,_this254=this;var Oe=h(this,qt,ie);if(Oe.length===0)return;var _h6=h(this,ot),wi=_h6.caseSensitive,Jo=_h6.entireWord,xl=this._pageContents[rn],Pd=this._hasDiacritics[rn];var Dh=!1;typeof Oe=="string"?(_D$call=D(this,ve,_e).call(this,Oe,Pd),_D$call2=_slicedToArray(_D$call,2),Dh=_D$call2[0],Oe=_D$call2[1],_D$call):Oe=Oe.sort().reverse().map(function(Nh){var _D$call3=D(_this254,ve,_e).call(_this254,Nh,Pd),_D$call4=_slicedToArray(_D$call3,2),Zh=_D$call4[0],py=_D$call4[1];return Dh||(Dh=Zh),"(".concat(py,")")}).join("|");var Vh="g".concat(Dh?"u":"").concat(wi?"":"i");Oe=Oe?new RegExp(Oe,Vh):null,D(this,Wt,oe).call(this,Oe,Jo,rn,xl),h(this,ot).highlightAll&&D(this,Se,xr).call(this,rn),this._resumePageIdx===rn&&(this._resumePageIdx=null,D(this,ol,Te).call(this));var Ed=this._pageMatches[rn].length;this._matchesCountTotal+=Ed,h(this,dt)?Ed>0&&D(this,Qr,Es).call(this):++ws(this,Mt)._===this._linkService.pagesCount&&D(this,Qr,Es).call(this)},ro=new WeakSet,Xo=function Xo(){var _this255=this;if(this._extractTextPromises.length>0)return;var rn=Promise.resolve();var Oe={disableNormalization:!0};var _loop5=function _loop5(wi){var xl=new Ih.PromiseCapability;_this255._extractTextPromises[wi]=xl.promise,rn=rn.then(function(){return _this255._pdfDocument.getPage(wi+1).then(function(Pd){return Pd.getTextContent(Oe)}).then(function(Pd){var _fe3,_fe4;var Dh=[];var _iterator182=_createForOfIteratorHelper(Pd.items),_step182;try{for(_iterator182.s();!(_step182=_iterator182.n()).done;){var Vh=_step182.value;Dh.push(Vh.str),Vh.hasEOL&&Dh.push("\n")}}catch(err){_iterator182.e(err)}finally{_iterator182.f()}(_fe3=fe(Dh.join("")),_fe4=_slicedToArray(_fe3,3),_this255._pageContents[wi]=_fe4[0],_this255._pageDiffs[wi]=_fe4[1],_this255._hasDiacritics[wi]=_fe4[2]),xl.resolve()},function(Pd){console.error("Unable to get text content for page ".concat(wi+1),Pd),_this255._pageContents[wi]="",_this255._pageDiffs[wi]=null,_this255._hasDiacritics[wi]=!1,xl.resolve()})})};for(var wi=0,Jo=this._linkService.pagesCount;wi<Jo;wi++){_loop5(wi)}},Se=new WeakSet,xr=function xr(rn){this._scrollMatches&&this._selected.pageIdx===rn&&(this._linkService.page=rn+1),this._eventBus.dispatch("updatetextlayermatches",{source:this,pageIndex:rn})},pr=new WeakSet,$e=function $e(){this._eventBus.dispatch("updatetextlayermatches",{source:this,pageIndex:-1})},_r=new WeakSet,Ps=function Ps(){var _this256=this;var rn=h(this,ot).findPrevious,Oe=this._linkService.page-1,wi=this._linkService.pagesCount;if(this._highlightMatches=!0,this._dirtyMatch){this._dirtyMatch=!1,this._selected.pageIdx=this._selected.matchIdx=-1,this._offset.pageIdx=Oe,this._offset.matchIdx=null,this._offset.wrapped=!1,this._resumePageIdx=null,this._pageMatches.length=0,this._pageMatchesLength.length=0,A(this,Mt,0),this._matchesCountTotal=0,D(this,pr,$e).call(this);var _loop6=function _loop6(xl){_this256._pendingFindMatches.has(xl)||(_this256._pendingFindMatches.add(xl),_this256._extractTextPromises[xl].then(function(){_this256._pendingFindMatches["delete"](xl),D(_this256,Xe,He).call(_this256,xl)}))};for(var xl=0;xl<wi;xl++){_loop6(xl)}}if(h(this,qt,ie).length===0){D(this,nl,Cr).call(this,Rh.FOUND);return}if(this._resumePageIdx)return;var Jo=this._offset;if(this._pagesToSearch=wi,Jo.matchIdx!==null){var _xl2=this._pageMatches[Jo.pageIdx].length;if(!rn&&Jo.matchIdx+1<_xl2||rn&&Jo.matchIdx>0){Jo.matchIdx=rn?Jo.matchIdx-1:Jo.matchIdx+1,D(this,se,be).call(this,!0);return}D(this,pe,ue).call(this,rn)}D(this,ol,Te).call(this)},qe=new WeakSet,bl=function bl(rn){var Oe=this._offset,wi=rn.length,Jo=h(this,ot).findPrevious;return wi?(Oe.matchIdx=Jo?wi-1:0,D(this,se,be).call(this,!0),!0):(D(this,pe,ue).call(this,Jo),Oe.wrapped&&(Oe.matchIdx=null,this._pagesToSearch<0)?(D(this,se,be).call(this,!1),!0):!1)},ol=new WeakSet,Te=function Te(){this._resumePageIdx!==null&&console.error("There can only be one pending page.");var rn=null;do{var Oe=this._offset.pageIdx;if(rn=this._pageMatches[Oe],!rn){this._resumePageIdx=Oe;break}}while(!D(this,qe,bl).call(this,rn))},pe=new WeakSet,ue=function ue(rn){var Oe=this._offset,wi=this._linkService.pagesCount;Oe.pageIdx=rn?Oe.pageIdx-1:Oe.pageIdx+1,Oe.matchIdx=null,this._pagesToSearch--,(Oe.pageIdx>=wi||Oe.pageIdx<0)&&(Oe.pageIdx=rn?wi-1:0,Oe.wrapped=!0)},se=new WeakSet,be=function be(){var rn=arguments.length>0&&arguments[0]!==undefined?arguments[0]:!1;var Oe=Rh.NOT_FOUND;var wi=this._offset.wrapped;if(this._offset.wrapped=!1,rn){var Jo=this._selected.pageIdx;this._selected.pageIdx=this._offset.pageIdx,this._selected.matchIdx=this._offset.matchIdx,Oe=wi?Rh.WRAPPED:Rh.FOUND,Jo!==-1&&Jo!==this._selected.pageIdx&&D(this,Se,xr).call(this,Jo)}D(this,nl,Cr).call(this,Oe,h(this,ot).findPrevious),this._selected.pageIdx!==-1&&(this._scrollMatches=!0,D(this,Se,xr).call(this,this._selected.pageIdx))},Ae=new WeakSet,ze=function ze(rn){var _this257=this;var Oe=this._pdfDocument;this._firstPageCapability.promise.then(function(){!_this257._pdfDocument||Oe&&_this257._pdfDocument!==Oe||(_this257._findTimeout&&(clearTimeout(_this257._findTimeout),_this257._findTimeout=null),_this257._resumePageIdx&&(_this257._resumePageIdx=null,_this257._dirtyMatch=!0),D(_this257,nl,Cr).call(_this257,Rh.FOUND),_this257._highlightMatches=!1,D(_this257,pr,$e).call(_this257))})},pi=new WeakSet,io=function io(){var rn;var _this$_selected=this._selected,Oe=_this$_selected.pageIdx,wi=_this$_selected.matchIdx;var Jo=0,xl=this._matchesCountTotal;if(wi!==-1){for(var Pd=0;Pd<Oe;Pd++)Jo+=((rn=this._pageMatches[Pd])==null?void 0:rn.length)||0;Jo+=wi+1}return(Jo<1||Jo>xl)&&(Jo=xl=0),{current:Jo,total:xl}},Qr=new WeakSet,Es=function Es(){this._eventBus.dispatch("updatefindmatchescount",{source:this,matchesCount:D(this,pi,io).call(this)})},nl=new WeakSet,Cr=function Cr(rn){var _ref165;var Oe=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1;var wi;!h(this,dt)&&(h(this,Mt)!==this._linkService.pagesCount||rn===Rh.PENDING)||this._eventBus.dispatch("updatefindcontrolstate",{source:this,state:rn,previous:Oe,matchesCount:D(this,pi,io).call(this),rawQuery:(_ref165=(wi=h(this,ot))==null?void 0:wi.query)!==null&&_ref165!==void 0?_ref165:null})},it.PDFFindController=kr},function(J,it){var nt,ot,dt,Mt,Ot;Object.defineProperty(it,"__esModule",{value:!0}),it.animationStarted=it.VERTICAL_PADDING=it.UNKNOWN_SCALE=it.TextLayerMode=it.SpreadMode=it.SidebarView=it.ScrollMode=it.SCROLLBAR_PADDING=it.RenderingStates=it.ProgressBar=it.PresentationModeState=it.OutputScale=it.MIN_SCALE=it.MAX_SCALE=it.MAX_AUTO_SCALE=it.DEFAULT_SCALE_VALUE=it.DEFAULT_SCALE_DELTA=it.DEFAULT_SCALE=it.CursorTool=it.AutoPrintRegExp=void 0,it.apiPageLayoutToViewerModes=_l,it.apiPageModeToSidebarView=Ih,it.approximateFraction=bl,it.backtrackBeforeAllVisibleElements=pe,it.binarySearchFirstItem=qe,it.docStyle=void 0,it.getActiveOrFocusedElement=$l,it.getPageSizeInches=Te,it.getVisibleElements=ue,it.isPortraitOrientation=io,it.isValidRotation=Ae,it.isValidScrollMode=ze,it.isValidSpreadMode=pi,it.normalizeWheelEventDelta=be,it.normalizeWheelEventDirection=se,it.parseQueryString=$e,it.removeNullCharacters=Ps,it.roundToDivide=ol,it.scrollIntoView=xr,it.toggleCheckedBtn=Rh,it.toggleExpandedBtn=Th,it.watchScroll=pr;var Qt="auto";it.DEFAULT_SCALE_VALUE=Qt;var Ut=1;it.DEFAULT_SCALE=Ut;var te=1.1;it.DEFAULT_SCALE_DELTA=te;var qt=0.1;it.MIN_SCALE=qt;var ie=10;it.MAX_SCALE=ie;var re=0;it.UNKNOWN_SCALE=re;var ne=1.25;it.MAX_AUTO_SCALE=ne;var ae=40;it.SCROLLBAR_PADDING=ae;var Bt=5;it.VERTICAL_PADDING=Bt;var Wt={INITIAL:0,RUNNING:1,PAUSED:2,FINISHED:3};it.RenderingStates=Wt;var oe={UNKNOWN:0,NORMAL:1,CHANGING:2,FULLSCREEN:3};it.PresentationModeState=oe;var ve={UNKNOWN:-1,NONE:0,THUMBS:1,OUTLINE:2,ATTACHMENTS:3,LAYERS:4};it.SidebarView=ve;var _e={DISABLE:0,ENABLE:1,ENABLE_PERMISSIONS:2};it.TextLayerMode=_e;var Xe={UNKNOWN:-1,VERTICAL:0,HORIZONTAL:1,WRAPPED:2,PAGE:3};it.ScrollMode=Xe;var He={UNKNOWN:-1,NONE:0,ODD:1,EVEN:2};it.SpreadMode=He;var ro={SELECT:0,HAND:1,ZOOM:2};it.CursorTool=ro;var Xo=/\bprint\s*\(/;it.AutoPrintRegExp=Xo;var Se=function(){function Se(){_classCallCheck(this,Se);var Dr=window.devicePixelRatio||1;this.sx=Dr,this.sy=Dr}_createClass(Se,[{key:"scaled",get:function get(){return this.sx!==1||this.sy!==1}}]);return Se}();it.OutputScale=Se;function xr($s,Dr){var Xi=arguments.length>2&&arguments[2]!==undefined?arguments[2]:!1;var Ke=$s.offsetParent;if(!Ke){console.error("offsetParent is not set -- cannot scroll");return}var ta=$s.offsetTop+$s.clientTop,Cl=$s.offsetLeft+$s.clientLeft;for(;Ke.clientHeight===Ke.scrollHeight&&Ke.clientWidth===Ke.scrollWidth||Xi&&(Ke.classList.contains("markedContent")||getComputedStyle(Ke).overflow==="hidden");)if(ta+=Ke.offsetTop,Cl+=Ke.offsetLeft,Ke=Ke.offsetParent,!Ke)return;Dr&&(Dr.top!==void 0&&(ta+=Dr.top),Dr.left!==void 0&&(Cl+=Dr.left,Ke.scrollLeft=Cl)),Ke.scrollTop=ta}function pr($s,Dr){var Xi=function Xi(Cl){ta||(ta=window.requestAnimationFrame(function(){ta=null;var Oh=$s.scrollLeft,jh=Ke.lastX;Oh!==jh&&(Ke.right=Oh>jh),Ke.lastX=Oh;var qh=$s.scrollTop,Bh=Ke.lastY;qh!==Bh&&(Ke.down=qh>Bh),Ke.lastY=qh,Dr(Ke)}))},Ke={right:!0,down:!0,lastX:$s.scrollLeft,lastY:$s.scrollTop,_eventHandler:Xi};var ta=null;return $s.addEventListener("scroll",Xi,!0),Ke}function $e($s){var Dr=new Map;var _iterator183=_createForOfIteratorHelper(new URLSearchParams($s)),_step183;try{for(_iterator183.s();!(_step183=_iterator183.n()).done;){var _step183$value=_slicedToArray(_step183.value,2),Xi=_step183$value[0],Ke=_step183$value[1];Dr.set(Xi.toLowerCase(),Ke)}}catch(err){_iterator183.e(err)}finally{_iterator183.f()}return Dr}var _r=/[\x01-\x1F]/g;function Ps($s){var Dr=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1;return typeof $s!="string"?(console.error("The argument must be a string."),$s):(Dr&&($s=$s.replaceAll(_r," ")),$s.replaceAll("\0",""))}function qe($s,Dr){var Xi=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0;var Ke=Xi,ta=$s.length-1;if(ta<0||!Dr($s[ta]))return $s.length;if(Dr($s[Ke]))return Ke;for(;Ke<ta;){var Cl=Ke+ta>>1,Oh=$s[Cl];Dr(Oh)?ta=Cl:Ke=Cl+1}return Ke}function bl($s){if(Math.floor($s)===$s)return[$s,1];var Dr=1/$s,Xi=8;if(Dr>Xi)return[1,Xi];if(Math.floor(Dr)===Dr)return[1,Dr];var Ke=$s>1?Dr:$s;var ta=0,Cl=1,Oh=1,jh=1;for(;;){var Bh=ta+Oh,Jh=Cl+jh;if(Jh>Xi)break;Ke<=Bh/Jh?(Oh=Bh,jh=Jh):(ta=Bh,Cl=Jh)}var qh;return Ke-ta/Cl<Oh/jh-Ke?qh=Ke===$s?[ta,Cl]:[Cl,ta]:qh=Ke===$s?[Oh,jh]:[jh,Oh],qh}function ol($s,Dr){var Xi=$s%Dr;return Xi===0?$s:Math.round($s-Xi+Dr)}function Te(_ref166){var $s=_ref166.view,Dr=_ref166.userUnit,Xi=_ref166.rotate;var _$s10=_slicedToArray($s,4),Ke=_$s10[0],ta=_$s10[1],Cl=_$s10[2],Oh=_$s10[3],jh=Xi%180!==0,qh=(Cl-Ke)/72*Dr,Bh=(Oh-ta)/72*Dr;return{width:jh?Bh:qh,height:jh?qh:Bh}}function pe($s,Dr,Xi){if($s<2)return $s;var Ke=Dr[$s].div,ta=Ke.offsetTop+Ke.clientTop;ta>=Xi&&(Ke=Dr[$s-1].div,ta=Ke.offsetTop+Ke.clientTop);for(var Cl=$s-2;Cl>=0&&(Ke=Dr[Cl].div,!(Ke.offsetTop+Ke.clientTop+Ke.clientHeight<=ta));--Cl)$s=Cl;return $s}function ue(_ref167){var $s=_ref167.scrollEl,Dr=_ref167.views,_ref167$sortByVisibil=_ref167.sortByVisibility,Xi=_ref167$sortByVisibil===void 0?!1:_ref167$sortByVisibil,_ref167$horizontal=_ref167.horizontal,Ke=_ref167$horizontal===void 0?!1:_ref167$horizontal,_ref167$rtl=_ref167.rtl,ta=_ref167$rtl===void 0?!1:_ref167$rtl;var Cl=$s.scrollTop,Oh=Cl+$s.clientHeight,jh=$s.scrollLeft,qh=jh+$s.clientWidth;function Bh(rn){var Oe=rn.div;return Oe.offsetTop+Oe.clientTop+Oe.clientHeight>Cl}function Jh(rn){var Oe=rn.div,wi=Oe.offsetLeft+Oe.clientLeft,Jo=wi+Oe.clientWidth;return ta?wi<qh:Jo>jh}var Xh=[],Qh=new Set,Kh=Dr.length;var ia=qe(Dr,Ke?Jh:Bh);ia>0&&ia<Kh&&!Ke&&(ia=pe(ia,Dr,Cl));var fe=Ke?qh:-1;for(var rn=ia;rn<Kh;rn++){var Oe=Dr[rn],wi=Oe.div,Jo=wi.offsetLeft+wi.clientLeft,xl=wi.offsetTop+wi.clientTop,Pd=wi.clientWidth,Dh=wi.clientHeight,Vh=Jo+Pd,Ed=xl+Dh;if(fe===-1)Ed>=Oh&&(fe=Ed);else if((Ke?Jo:xl)>fe)break;if(Ed<=Cl||xl>=Oh||Vh<=jh||Jo>=qh)continue;var Nh=Math.max(0,Cl-xl)+Math.max(0,Ed-Oh),Zh=Math.max(0,jh-Jo)+Math.max(0,Vh-qh),py=(Dh-Nh)/Dh,Hh=(Pd-Zh)/Pd,ke=py*Hh*100|0;Xh.push({id:Oe.id,x:Jo,y:xl,view:Oe,percent:ke,widthPercent:Hh*100|0}),Qh.add(Oe.id)}var Me=Xh[0],kr=Xh.at(-1);return Xi&&Xh.sort(function(rn,Oe){var wi=rn.percent-Oe.percent;return Math.abs(wi)>1e-3?-wi:rn.id-Oe.id}),{first:Me,last:kr,views:Xh,ids:Qh}}function se($s){var Dr=Math.hypot($s.deltaX,$s.deltaY);var Xi=Math.atan2($s.deltaY,$s.deltaX);return-0.25*Math.PI<Xi&&Xi<0.75*Math.PI&&(Dr=-Dr),Dr}function be($s){var Dr=$s.deltaMode;var Xi=se($s);var Ke=30,ta=30;return Dr===WheelEvent.DOM_DELTA_PIXEL?Xi/=Ke*ta:Dr===WheelEvent.DOM_DELTA_LINE&&(Xi/=ta),Xi}function Ae($s){return Number.isInteger($s)&&$s%90===0}function ze($s){return Number.isInteger($s)&&Object.values(Xe).includes($s)&&$s!==Xe.UNKNOWN}function pi($s){return Number.isInteger($s)&&Object.values(He).includes($s)&&$s!==He.UNKNOWN}function io($s){return $s.width<=$s.height}var Qr=new Promise(function($s){window.requestAnimationFrame($s)});it.animationStarted=Qr;var Es=document.documentElement.style;it.docStyle=Es;function nl($s,Dr,Xi){return Math.min(Math.max($s,Dr),Xi)}var Cr=function(){function Cr(Dr){_classCallCheck(this,Cr);S(this,nt,null),S(this,ot,null),S(this,dt,0),S(this,Mt,null),S(this,Ot,!0),A(this,nt,Dr.classList),A(this,Mt,Dr.style)}_createClass(Cr,[{key:"percent",get:function get(){return h(this,dt)},set:function set(Dr){if(A(this,dt,nl(Dr,0,100)),isNaN(Dr)){h(this,nt).add("indeterminate");return}h(this,nt).remove("indeterminate"),h(this,Mt).setProperty("--progressBar-percent","".concat(h(this,dt),"%"))}},{key:"setWidth",value:function setWidth(Dr){if(!Dr)return;var Xi=Dr.parentNode.offsetWidth-Dr.offsetWidth;Xi>0&&h(this,Mt).setProperty("--progressBar-end-offset","".concat(Xi,"px"))}},{key:"setDisableAutoFetch",value:function setDisableAutoFetch(){var _this258=this;var Dr=arguments.length>0&&arguments[0]!==undefined?arguments[0]:5e3;isNaN(h(this,dt))||(h(this,ot)&&clearTimeout(h(this,ot)),this.show(),A(this,ot,setTimeout(function(){A(_this258,ot,null),_this258.hide()},Dr)))}},{key:"hide",value:function hide(){h(this,Ot)&&(A(this,Ot,!1),h(this,nt).add("hidden"))}},{key:"show",value:function show(){h(this,Ot)||(A(this,Ot,!0),h(this,nt).remove("hidden"))}}]);return Cr}();nt=new WeakMap,ot=new WeakMap,dt=new WeakMap,Mt=new WeakMap,Ot=new WeakMap,it.ProgressBar=Cr;function $l(){var $s=document,Dr=$s.activeElement||$s.querySelector(":focus");for(;Dr!=null&&Dr.shadowRoot;)$s=Dr.shadowRoot,Dr=$s.activeElement||$s.querySelector(":focus");return Dr}function _l($s){var Dr=Xe.VERTICAL,Xi=He.NONE;switch($s){case"SinglePage":Dr=Xe.PAGE;break;case"OneColumn":break;case"TwoPageLeft":Dr=Xe.PAGE;case"TwoColumnLeft":Xi=He.ODD;break;case"TwoPageRight":Dr=Xe.PAGE;case"TwoColumnRight":Xi=He.EVEN;break}return{scrollMode:Dr,spreadMode:Xi}}function Ih($s){switch($s){case"UseNone":return ve.NONE;case"UseThumbs":return ve.THUMBS;case"UseOutlines":return ve.OUTLINE;case"UseAttachments":return ve.ATTACHMENTS;case"UseOC":return ve.LAYERS}return ve.NONE}function Rh($s,Dr){var Xi=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;$s.classList.toggle("toggled",Dr),$s.setAttribute("aria-checked",Dr),Xi==null||Xi.classList.toggle("hidden",!Dr)}function Th($s,Dr){var Xi=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;$s.classList.toggle("toggled",Dr),$s.setAttribute("aria-expanded",Dr),Xi==null||Xi.classList.toggle("hidden",!Dr)}},function(J,it){Object.defineProperty(it,"__esModule",{value:!0}),it.CharacterType=void 0,it.getCharacterType=ne,it.getNormalizeWithNFKC=Bt;var nt={SPACE:0,ALPHA_LETTER:1,PUNCT:2,HAN_LETTER:3,KATAKANA_LETTER:4,HIRAGANA_LETTER:5,HALFWIDTH_KATAKANA_LETTER:6,THAI_LETTER:7};it.CharacterType=nt;function ot(Wt){return Wt<11904}function dt(Wt){return(Wt&65408)===0}function Mt(Wt){return Wt>=97&&Wt<=122||Wt>=65&&Wt<=90}function Ot(Wt){return Wt>=48&&Wt<=57}function Qt(Wt){return Wt===32||Wt===9||Wt===13||Wt===10}function Ut(Wt){return Wt>=13312&&Wt<=40959||Wt>=63744&&Wt<=64255}function te(Wt){return Wt>=12448&&Wt<=12543}function qt(Wt){return Wt>=12352&&Wt<=12447}function ie(Wt){return Wt>=65376&&Wt<=65439}function re(Wt){return(Wt&65408)===3584}function ne(Wt){return ot(Wt)?dt(Wt)?Qt(Wt)?nt.SPACE:Mt(Wt)||Ot(Wt)||Wt===95?nt.ALPHA_LETTER:nt.PUNCT:re(Wt)?nt.THAI_LETTER:Wt===160?nt.SPACE:nt.ALPHA_LETTER:Ut(Wt)?nt.HAN_LETTER:te(Wt)?nt.KATAKANA_LETTER:qt(Wt)?nt.HIRAGANA_LETTER:ie(Wt)?nt.HALFWIDTH_KATAKANA_LETTER:nt.ALPHA_LETTER}var ae;function Bt(){return ae||(ae="\xA0\xA8\xAA\xAF\xB2-\xB5\xB8-\xBA\xBC-\xBE\u0132-\u0133\u013F-\u0140\u0149\u017F\u01C4-\u01CC\u01F1-\u01F3\u02B0-\u02B8\u02D8-\u02DD\u02E0-\u02E4\u0374\u037A\u037E\u0384-\u0385\u0387\u03D0-\u03D6\u03F0-\u03F2\u03F4-\u03F5\u03F9\u0587\u0675-\u0678\u0958-\u095F\u09DC-\u09DD\u09DF\u0A33\u0A36\u0A59-\u0A5B\u0A5E\u0B5C-\u0B5D\u0E33\u0EB3\u0EDC-\u0EDD\u0F0C\u0F43\u0F4D\u0F52\u0F57\u0F5C\u0F69\u10FC\u1D2C-\u1D2E\u1D30-\u1D3A\u1D3C-\u1D4D\u1D4F-\u1D6A\u1D78\u1D9B-\u1DBF\u1E9A-\u1E9B\u1F71\u1F73\u1F75\u1F77\u1F79\u1F7B\u1F7D\u1FBB\u1FBD-\u1FC1\u1FC9\u1FCB\u1FCD-\u1FCF\u1FD3\u1FDB\u1FDD-\u1FDF\u1FE3\u1FEB\u1FED-\u1FEF\u1FF9\u1FFB\u1FFD-\u1FFE\u2000-\u200A\u2011\u2017\u2024-\u2026\u202F\u2033-\u2034\u2036-\u2037\u203C\u203E\u2047-\u2049\u2057\u205F\u2070-\u2071\u2074-\u208E\u2090-\u209C\u20A8\u2100-\u2103\u2105-\u2107\u2109-\u2113\u2115-\u2116\u2119-\u211D\u2120-\u2122\u2124\u2126\u2128\u212A-\u212D\u212F-\u2131\u2133-\u2139\u213B-\u2140\u2145-\u2149\u2150-\u217F\u2189\u222C-\u222D\u222F-\u2230\u2329-\u232A\u2460-\u24EA\u2A0C\u2A74-\u2A76\u2ADC\u2C7C-\u2C7D\u2D6F\u2E9F\u2EF3\u2F00-\u2FD5\u3000\u3036\u3038-\u303A\u309B-\u309C\u309F\u30FF\u3131-\u318E\u3192-\u319F\u3200-\u321E\u3220-\u3247\u3250-\u327E\u3280-\u33FF\uA69C-\uA69D\uA770\uA7F2-\uA7F4\uA7F8-\uA7F9\uAB5C-\uAB5F\uAB69\uF900-\uFA0D\uFA10\uFA12\uFA15-\uFA1E\uFA20\uFA22\uFA25-\uFA26\uFA2A-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB36\uFB38-\uFB3C\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFC\uFE10-\uFE19\uFE30-\uFE44\uFE47-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFE70-\uFE72\uFE74\uFE76-\uFEFC\uFF01-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\uFFE0-\uFFE6"),ae}},function(J){J.exports=globalThis.pdfjsLib},function(J,it,nt){var ot,dt,_Mt7,Ot,Qt;Object.defineProperty(it,"__esModule",{value:!0}),it.SimpleLinkService=it.PDFLinkService=it.LinkTarget=void 0;var Ut=nt(2);var te="noopener noreferrer nofollow",qt={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4};it.LinkTarget=qt;function ie(Bt){var _ref168=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},Wt=_ref168.url,oe=_ref168.target,ve=_ref168.rel,_ref168$enabled=_ref168.enabled,_e=_ref168$enabled===void 0?!0:_ref168$enabled;if(!Wt||typeof Wt!="string")throw new Error("A valid \"url\" parameter must provided.");_e?Bt.href=Bt.title=Wt:(Bt.href="",Bt.title="Disabled: ".concat(Wt),Bt.onclick=function(){return!1});var Xe="";switch(oe){case qt.NONE:break;case qt.SELF:Xe="_self";break;case qt.BLANK:Xe="_blank";break;case qt.PARENT:Xe="_parent";break;case qt.TOP:Xe="_top";break}Bt.target=Xe,Bt.rel=typeof ve=="string"?ve:te}var re=function(){function Tm(){var _ref169=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},Wt=_ref169.eventBus,_ref169$externalLinkT=_ref169.externalLinkTarget,oe=_ref169$externalLinkT===void 0?null:_ref169$externalLinkT,_ref169$externalLinkR=_ref169.externalLinkRel,ve=_ref169$externalLinkR===void 0?null:_ref169$externalLinkR,_ref169$ignoreDestina=_ref169.ignoreDestinationZoom,_e=_ref169$ignoreDestina===void 0?!1:_ref169$ignoreDestina;_classCallCheck(this,Tm);S(this,dt),S(this,ot,new Map),this.eventBus=Wt,this.externalLinkTarget=oe,this.externalLinkRel=ve,this.externalLinkEnabled=!0,this._ignoreDestinationZoom=_e,this.baseUrl=null,this.pdfDocument=null,this.pdfViewer=null,this.pdfHistory=null}_createClass(Tm,[{key:"setDocument",value:function setDocument(Wt){var oe=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;this.baseUrl=oe,this.pdfDocument=Wt,h(this,ot).clear()}},{key:"setViewer",value:function setViewer(Wt){this.pdfViewer=Wt}},{key:"setHistory",value:function setHistory(Wt){this.pdfHistory=Wt}},{key:"pagesCount",get:function get(){return this.pdfDocument?this.pdfDocument.numPages:0}},{key:"page",get:function get(){return this.pdfViewer.currentPageNumber},set:function set(Wt){this.pdfViewer.currentPageNumber=Wt}},{key:"rotation",get:function get(){return this.pdfViewer.pagesRotation},set:function set(Wt){this.pdfViewer.pagesRotation=Wt}},{key:"isInPresentationMode",get:function get(){return this.pdfViewer.isInPresentationMode}},{key:"goToDestination",value:function(){var _goToDestination=_asyncToGenerator(_regeneratorRuntime().mark(function _callee106(Wt){var oe,ve;return _regeneratorRuntime().wrap(function _callee106$(_context107){while(1)switch(_context107.prev=_context107.next){case 0:if(this.pdfDocument){_context107.next=2;break}return _context107.abrupt("return");case 2:if(!(typeof Wt=="string")){_context107.next=9;break}oe=Wt;_context107.next=6;return this.pdfDocument.getDestination(Wt);case 6:ve=_context107.sent;_context107.next=13;break;case 9:oe=null;_context107.next=12;return Wt;case 12:ve=_context107.sent;case 13:if(Array.isArray(ve)){_context107.next=16;break}console.error("PDFLinkService.goToDestination: \"".concat(ve,"\" is not a valid destination array, for dest=\"").concat(Wt,"\"."));return _context107.abrupt("return");case 16:D(this,dt,_Mt7).call(this,Wt,oe,ve);case 17:case"end":return _context107.stop()}},_callee106,this)}));function goToDestination(_x98){return _goToDestination.apply(this,arguments)}return goToDestination}()},{key:"goToPage",value:function goToPage(Wt){if(!this.pdfDocument)return;var oe=typeof Wt=="string"&&this.pdfViewer.pageLabelToPageNumber(Wt)||Wt|0;if(!(Number.isInteger(oe)&&oe>0&&oe<=this.pagesCount)){console.error("PDFLinkService.goToPage: \"".concat(Wt,"\" is not a valid page."));return}this.pdfHistory&&(this.pdfHistory.pushCurrentPosition(),this.pdfHistory.pushPage(oe)),this.pdfViewer.scrollPageIntoView({pageNumber:oe})}},{key:"addLinkAttributes",value:function addLinkAttributes(Wt,oe){var ve=arguments.length>2&&arguments[2]!==undefined?arguments[2]:!1;ie(Wt,{url:oe,target:ve?qt.BLANK:this.externalLinkTarget,rel:this.externalLinkRel,enabled:this.externalLinkEnabled})}},{key:"getDestinationHash",value:function getDestinationHash(Wt){if(typeof Wt=="string"){if(Wt.length>0)return this.getAnchorUrl("#"+escape(Wt))}else if(Array.isArray(Wt)){var oe=JSON.stringify(Wt);if(oe.length>0)return this.getAnchorUrl("#"+escape(oe))}return this.getAnchorUrl("")}},{key:"getAnchorUrl",value:function getAnchorUrl(Wt){return this.baseUrl?this.baseUrl+Wt:Wt}},{key:"setHash",value:function setHash(Wt){var oe;if(!this.pdfDocument)return;var ve,_e;if(Wt.includes("=")){var Xe=(0,Ut.parseQueryString)(Wt);if(Xe.has("search")){var He=Xe.get("search").replaceAll("\"",""),ro=Xe.get("phrase")==="true";this.eventBus.dispatch("findfromurlhash",{source:this,query:ro?He:He.match(/\S+/g)})}if(Xe.has("page")&&(ve=Xe.get("page")|0||1),Xe.has("zoom")){var _He=Xe.get("zoom").split(","),_ro=_He[0],Xo=parseFloat(_ro);_ro.includes("Fit")?_ro==="Fit"||_ro==="FitB"?_e=[null,{name:_ro}]:_ro==="FitH"||_ro==="FitBH"||_ro==="FitV"||_ro==="FitBV"?_e=[null,{name:_ro},_He.length>1?_He[1]|0:null]:_ro==="FitR"?_He.length!==5?console.error("PDFLinkService.setHash: Not enough parameters for \"FitR\"."):_e=[null,{name:_ro},_He[1]|0,_He[2]|0,_He[3]|0,_He[4]|0]:console.error("PDFLinkService.setHash: \"".concat(_ro,"\" is not a valid zoom value.")):_e=[null,{name:"XYZ"},_He.length>1?_He[1]|0:null,_He.length>2?_He[2]|0:null,Xo?Xo/100:_ro]}_e?this.pdfViewer.scrollPageIntoView({pageNumber:ve||this.page,destArray:_e,allowNegativeOffset:!0}):ve&&(this.page=ve),Xe.has("pagemode")&&this.eventBus.dispatch("pagemode",{source:this,mode:Xe.get("pagemode")}),Xe.has("nameddest")&&this.goToDestination(Xe.get("nameddest"))}else{_e=unescape(Wt);try{_e=JSON.parse(_e),Array.isArray(_e)||(_e=_e.toString())}catch(_unused28){}if(typeof _e=="string"||D(oe=Tm,Ot,Qt).call(oe,_e)){this.goToDestination(_e);return}console.error("PDFLinkService.setHash: \"".concat(unescape(Wt),"\" is not a valid destination."))}}},{key:"executeNamedAction",value:function executeNamedAction(Wt){var oe,ve;switch(Wt){case"GoBack":(oe=this.pdfHistory)==null||oe.back();break;case"GoForward":(ve=this.pdfHistory)==null||ve.forward();break;case"NextPage":this.pdfViewer.nextPage();break;case"PrevPage":this.pdfViewer.previousPage();break;case"LastPage":this.page=this.pagesCount;break;case"FirstPage":this.page=1;break}this.eventBus.dispatch("namedaction",{source:this,action:Wt})}},{key:"executeSetOCGState",value:function(){var _executeSetOCGState=_asyncToGenerator(_regeneratorRuntime().mark(function _callee107(Wt){var oe,ve,_e,_iterator184,_step184,Xe,He;return _regeneratorRuntime().wrap(function _callee107$(_context108){while(1)switch(_context108.prev=_context108.next){case 0:oe=this.pdfDocument;_context108.next=3;return this.pdfViewer.optionalContentConfigPromise;case 3:ve=_context108.sent;if(!(oe!==this.pdfDocument)){_context108.next=6;break}return _context108.abrupt("return");case 6:_iterator184=_createForOfIteratorHelper(Wt.state);_context108.prev=7;_iterator184.s();case 9:if((_step184=_iterator184.n()).done){_context108.next=28;break}Xe=_step184.value;_context108.t0=Xe;_context108.next=_context108.t0==="ON"?14:_context108.t0==="OFF"?14:_context108.t0==="Toggle"?14:16;break;case 14:_e=Xe;return _context108.abrupt("continue",26);case 16:_context108.t1=_e;_context108.next=_context108.t1==="ON"?19:_context108.t1==="OFF"?21:_context108.t1==="Toggle"?23:26;break;case 19:ve.setVisibility(Xe,!0);return _context108.abrupt("break",26);case 21:ve.setVisibility(Xe,!1);return _context108.abrupt("break",26);case 23:He=ve.getGroup(Xe);He&&ve.setVisibility(Xe,!He.visible);return _context108.abrupt("break",26);case 26:_context108.next=9;break;case 28:_context108.next=33;break;case 30:_context108.prev=30;_context108.t2=_context108["catch"](7);_iterator184.e(_context108.t2);case 33:_context108.prev=33;_iterator184.f();return _context108.finish(33);case 36:this.pdfViewer.optionalContentConfigPromise=Promise.resolve(ve);case 37:case"end":return _context108.stop()}},_callee107,this,[[7,30,33,36]])}));function executeSetOCGState(_x99){return _executeSetOCGState.apply(this,arguments)}return executeSetOCGState}()},{key:"cachePageRef",value:function cachePageRef(Wt,oe){if(!oe)return;var ve=oe.gen===0?"".concat(oe.num,"R"):"".concat(oe.num,"R").concat(oe.gen);h(this,ot).set(ve,Wt)}},{key:"_cachedPageNumber",value:function _cachedPageNumber(Wt){if(!Wt)return null;var oe=Wt.gen===0?"".concat(Wt.num,"R"):"".concat(Wt.num,"R").concat(Wt.gen);return h(this,ot).get(oe)||null}}]);return Tm}();ot=new WeakMap,dt=new WeakSet,_Mt7=function Mt(Bt){var _this259=this;var Wt=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;var oe=arguments.length>2?arguments[2]:undefined;var ve=oe[0];var _e;if(_typeof(ve)=="object"&&ve!==null){if(_e=this._cachedPageNumber(ve),!_e){this.pdfDocument.getPageIndex(ve).then(function(Xe){_this259.cachePageRef(Xe+1,ve),D(_this259,dt,_Mt7).call(_this259,Bt,Wt,oe)})["catch"](function(){console.error("PDFLinkService.#goToDestinationHelper: \"".concat(ve,"\" is not a valid page reference, for dest=\"").concat(Bt,"\"."))});return}}else if(Number.isInteger(ve))_e=ve+1;else{console.error("PDFLinkService.#goToDestinationHelper: \"".concat(ve,"\" is not a valid destination reference, for dest=\"").concat(Bt,"\"."));return}if(!_e||_e<1||_e>this.pagesCount){console.error("PDFLinkService.#goToDestinationHelper: \"".concat(_e,"\" is not a valid page number, for dest=\"").concat(Bt,"\"."));return}this.pdfHistory&&(this.pdfHistory.pushCurrentPosition(),this.pdfHistory.push({namedDest:Wt,explicitDest:oe,pageNumber:_e})),this.pdfViewer.scrollPageIntoView({pageNumber:_e,destArray:oe,ignoreDestinationZoom:this._ignoreDestinationZoom})},Ot=new WeakSet,Qt=function Qt(Bt){if(!Array.isArray(Bt))return!1;var Wt=Bt.length;if(Wt<2)return!1;var oe=Bt[0];if(!(_typeof(oe)=="object"&&Number.isInteger(oe.num)&&Number.isInteger(oe.gen))&&!(Number.isInteger(oe)&&oe>=0))return!1;var ve=Bt[1];if(!(_typeof(ve)=="object"&&typeof ve.name=="string"))return!1;var _e=!0;switch(ve.name){case"XYZ":if(Wt!==5)return!1;break;case"Fit":case"FitB":return Wt===2;case"FitH":case"FitBH":case"FitV":case"FitBV":if(Wt!==3)return!1;break;case"FitR":if(Wt!==6)return!1;_e=!1;break;default:return!1}for(var Xe=2;Xe<Wt;Xe++){var He=Bt[Xe];if(!(typeof He=="number"||_e&&He===null))return!1}return!0},S(re,Ot);var ne=re;it.PDFLinkService=ne;var ae=function(){function ae(){_classCallCheck(this,ae);this.externalLinkEnabled=!0}_createClass(ae,[{key:"pagesCount",get:function get(){return 0}},{key:"page",get:function get(){return 0},set:function set(Wt){}},{key:"rotation",get:function get(){return 0},set:function set(Wt){}},{key:"isInPresentationMode",get:function get(){return!1}},{key:"goToDestination",value:function(){var _goToDestination2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee108(Wt){return _regeneratorRuntime().wrap(function _callee108$(_context109){while(1)switch(_context109.prev=_context109.next){case 0:case"end":return _context109.stop()}},_callee108)}));function goToDestination(_x100){return _goToDestination2.apply(this,arguments)}return goToDestination}()},{key:"goToPage",value:function goToPage(Wt){}},{key:"addLinkAttributes",value:function addLinkAttributes(Wt,oe){var ve=arguments.length>2&&arguments[2]!==undefined?arguments[2]:!1;ie(Wt,{url:oe,enabled:this.externalLinkEnabled})}},{key:"getDestinationHash",value:function getDestinationHash(Wt){return"#"}},{key:"getAnchorUrl",value:function getAnchorUrl(Wt){return"#"}},{key:"setHash",value:function setHash(Wt){}},{key:"executeNamedAction",value:function executeNamedAction(Wt){}},{key:"executeSetOCGState",value:function executeSetOCGState(Wt){}},{key:"cachePageRef",value:function cachePageRef(Wt,oe){}}]);return ae}();it.SimpleLinkService=ae},function(J,it,nt){var ot,dt,Mt;Object.defineProperty(it,"__esModule",{value:!0}),it.AnnotationLayerBuilder=void 0;var Ot=nt(4),Qt=nt(7),Ut=nt(2);var te=function(){function te(_ref170){var ie=_ref170.pageDiv,re=_ref170.pdfPage,ne=_ref170.linkService,ae=_ref170.downloadManager,_ref170$annotationSto=_ref170.annotationStorage,Bt=_ref170$annotationSto===void 0?null:_ref170$annotationSto,_ref170$imageResource=_ref170.imageResourcesPath,Wt=_ref170$imageResource===void 0?"":_ref170$imageResource,_ref170$renderForms=_ref170.renderForms,oe=_ref170$renderForms===void 0?!0:_ref170$renderForms,_ref170$l10n=_ref170.l10n,ve=_ref170$l10n===void 0?Qt.NullL10n:_ref170$l10n,_ref170$enableScripti=_ref170.enableScripting,_e=_ref170$enableScripti===void 0?!1:_ref170$enableScripti,_ref170$hasJSActionsP=_ref170.hasJSActionsPromise,Xe=_ref170$hasJSActionsP===void 0?null:_ref170$hasJSActionsP,_ref170$fieldObjectsP=_ref170.fieldObjectsPromise,He=_ref170$fieldObjectsP===void 0?null:_ref170$fieldObjectsP,_ref170$annotationCan=_ref170.annotationCanvasMap,ro=_ref170$annotationCan===void 0?null:_ref170$annotationCan,_ref170$accessibility=_ref170.accessibilityManager,Xo=_ref170$accessibility===void 0?null:_ref170$accessibility;_classCallCheck(this,te);S(this,dt),S(this,ot,null),this.pageDiv=ie,this.pdfPage=re,this.linkService=ne,this.downloadManager=ae,this.imageResourcesPath=Wt,this.renderForms=oe,this.l10n=ve,this.annotationStorage=Bt,this.enableScripting=_e,this._hasJSActionsPromise=Xe||Promise.resolve(!1),this._fieldObjectsPromise=He||Promise.resolve(null),this._annotationCanvasMap=ro,this._accessibilityManager=Xo,this.annotationLayer=null,this.div=null,this._cancelled=!1,this._eventBus=ne.eventBus}_createClass(te,[{key:"render",value:function(){var _render=_asyncToGenerator(_regeneratorRuntime().mark(function _callee109(ie){var _this260=this;var re,ne,_yield$Promise$all,_yield$Promise$all2,ae,Bt,Wt,oe,_args52=arguments;return _regeneratorRuntime().wrap(function _callee109$(_context110){while(1)switch(_context110.prev=_context110.next){case 0:re=_args52.length>1&&_args52[1]!==undefined?_args52[1]:"display";if(!this.div){_context110.next=6;break}if(!(this._cancelled||!this.annotationLayer)){_context110.next=4;break}return _context110.abrupt("return");case 4:this.annotationLayer.update({viewport:ie.clone({dontFlip:!0})});return _context110.abrupt("return");case 6:_context110.next=8;return Promise.all([this.pdfPage.getAnnotations({intent:re}),this._hasJSActionsPromise,this._fieldObjectsPromise]);case 8:_yield$Promise$all=_context110.sent;_yield$Promise$all2=_slicedToArray(_yield$Promise$all,3);ae=_yield$Promise$all2[0];Bt=_yield$Promise$all2[1];Wt=_yield$Promise$all2[2];if(!this._cancelled){_context110.next=15;break}return _context110.abrupt("return");case 15:oe=this.div=document.createElement("div");if(!(oe.className="annotationLayer",this.pageDiv.append(oe),ae.length===0)){_context110.next=19;break}this.hide();return _context110.abrupt("return");case 19:this.annotationLayer=new Ot.AnnotationLayer({div:oe,accessibilityManager:this._accessibilityManager,annotationCanvasMap:this._annotationCanvasMap,l10n:this.l10n,page:this.pdfPage,viewport:ie.clone({dontFlip:!0})});_context110.next=22;return this.annotationLayer.render({annotations:ae,imageResourcesPath:this.imageResourcesPath,renderForms:this.renderForms,linkService:this.linkService,downloadManager:this.downloadManager,annotationStorage:this.annotationStorage,enableScripting:this.enableScripting,hasJSActions:Bt,fieldObjects:Wt});case 22:this.linkService.isInPresentationMode&&D(this,dt,Mt).call(this,Ut.PresentationModeState.FULLSCREEN);h(this,ot)||(A(this,ot,function(ve){D(_this260,dt,Mt).call(_this260,ve.state)}),(ne=this._eventBus)==null||ne._on("presentationmodechanged",h(this,ot)));case 24:case"end":return _context110.stop()}},_callee109,this)}));function render(_x101){return _render.apply(this,arguments)}return render}()},{key:"cancel",value:function cancel(){var ie;this._cancelled=!0,h(this,ot)&&((ie=this._eventBus)==null||ie._off("presentationmodechanged",h(this,ot)),A(this,ot,null))}},{key:"hide",value:function hide(){this.div&&(this.div.hidden=!0)}}]);return te}();ot=new WeakMap,dt=new WeakSet,Mt=function Mt(qt){if(!this.div)return;var ie=!1;switch(qt){case Ut.PresentationModeState.FULLSCREEN:ie=!0;break;case Ut.PresentationModeState.NORMAL:break;default:return}var _iterator185=_createForOfIteratorHelper(this.div.childNodes),_step185;try{for(_iterator185.s();!(_step185=_iterator185.n()).done;){var re=_step185.value;re.hasAttribute("data-internal-link")||(re.inert=ie)}}catch(err){_iterator185.e(err)}finally{_iterator185.f()}},it.AnnotationLayerBuilder=te},function(J,it){Object.defineProperty(it,"__esModule",{value:!0}),it.NullL10n=void 0,it.getL10nFallback=ot;var nt={of_pages:"of {{pagesCount}}",page_of_pages:"({{pageNumber}} of {{pagesCount}})",document_properties_kb:"{{size_kb}} KB ({{size_b}} bytes)",document_properties_mb:"{{size_mb}} MB ({{size_b}} bytes)",document_properties_date_string:"{{date}}, {{time}}",document_properties_page_size_unit_inches:"in",document_properties_page_size_unit_millimeters:"mm",document_properties_page_size_orientation_portrait:"portrait",document_properties_page_size_orientation_landscape:"landscape",document_properties_page_size_name_a3:"A3",document_properties_page_size_name_a4:"A4",document_properties_page_size_name_letter:"Letter",document_properties_page_size_name_legal:"Legal",document_properties_page_size_dimension_string:"{{width}} \xD7 {{height}} {{unit}} ({{orientation}})",document_properties_page_size_dimension_name_string:"{{width}} \xD7 {{height}} {{unit}} ({{name}}, {{orientation}})",document_properties_linearized_yes:"Yes",document_properties_linearized_no:"No",additional_layers:"Additional Layers",page_landmark:"Page {{page}}",thumb_page_title:"Page {{page}}",thumb_page_canvas:"Thumbnail of Page {{page}}",find_reached_top:"Reached top of document, continued from bottom",find_reached_bottom:"Reached end of document, continued from top","find_match_count[one]":"{{current}} of {{total}} match","find_match_count[other]":"{{current}} of {{total}} matches","find_match_count_limit[one]":"More than {{limit}} match","find_match_count_limit[other]":"More than {{limit}} matches",find_not_found:"Phrase not found",page_scale_width:"Page Width",page_scale_fit:"Page Fit",page_scale_auto:"Automatic Zoom",page_scale_actual:"Actual Size",page_scale_percent:"{{scale}}%",loading_error:"An error occurred while loading the PDF.",invalid_file_error:"Invalid or corrupted PDF file.",missing_file_error:"Missing PDF file.",unexpected_response_error:"Unexpected server response.",rendering_error:"An error occurred while rendering the page.",annotation_date_string:"{{date}}, {{time}}",printing_not_supported:"Warning: Printing is not fully supported by this browser.",printing_not_ready:"Warning: The PDF is not fully loaded for printing.",web_fonts_disabled:"Web fonts are disabled: unable to use embedded PDF fonts.",free_text2_default_content:"Start typing\u2026",editor_free_text2_aria_label:"Text Editor",editor_ink2_aria_label:"Draw Editor",editor_ink_canvas_aria_label:"User-created image",editor_alt_text_button_label:"Alt text",editor_alt_text_edit_button_label:"Edit alt text",editor_alt_text_decorative_tooltip:"Marked as decorative"};nt.print_progress_percent="{{progress}}%";function ot(Ot,Qt){switch(Ot){case"find_match_count":Ot="find_match_count[".concat(Qt.total===1?"one":"other","]");break;case"find_match_count_limit":Ot="find_match_count_limit[".concat(Qt.limit===1?"one":"other","]");break}return nt[Ot]||""}function dt(Ot,Qt){return Qt?Ot.replaceAll(/\{\{\s*(\w+)\s*\}\}/g,function(Ut,te){return te in Qt?Qt[te]:"{{"+te+"}}"}):Ot}var Mt={getLanguage:function getLanguage(){return _asyncToGenerator(_regeneratorRuntime().mark(function _callee110(){return _regeneratorRuntime().wrap(function _callee110$(_context111){while(1)switch(_context111.prev=_context111.next){case 0:return _context111.abrupt("return","en-us");case 1:case"end":return _context111.stop()}},_callee110)}))()},getDirection:function getDirection(){return _asyncToGenerator(_regeneratorRuntime().mark(function _callee111(){return _regeneratorRuntime().wrap(function _callee111$(_context112){while(1)switch(_context112.prev=_context112.next){case 0:return _context112.abrupt("return","ltr");case 1:case"end":return _context112.stop()}},_callee111)}))()},get:function get(Ot){var _arguments2=arguments;return _asyncToGenerator(_regeneratorRuntime().mark(function _callee112(){var Qt,Ut;return _regeneratorRuntime().wrap(function _callee112$(_context113){while(1)switch(_context113.prev=_context113.next){case 0:Qt=_arguments2.length>1&&_arguments2[1]!==undefined?_arguments2[1]:null;Ut=_arguments2.length>2&&_arguments2[2]!==undefined?_arguments2[2]:ot(Ot,Qt);return _context113.abrupt("return",dt(Ut,Qt));case 3:case"end":return _context113.stop()}},_callee112)}))()},translate:function translate(Ot){return _asyncToGenerator(_regeneratorRuntime().mark(function _callee113(){return _regeneratorRuntime().wrap(function _callee113$(_context114){while(1)switch(_context114.prev=_context114.next){case 0:case"end":return _context114.stop()}},_callee113)}))()}};it.NullL10n=Mt},function(J,it,nt){var ot;Object.defineProperty(it,"__esModule",{value:!0}),it.DownloadManager=void 0;var dt=nt(4);function Mt(Qt,Ut){var te=document.createElement("a");if(!te.click)throw new Error("DownloadManager: \"a.click()\" is not supported.");te.href=Qt,te.target="_parent","download"in te&&(te.download=Ut),(document.body||document.documentElement).append(te),te.click(),te.remove()}var Ot=function(){function Ot(){_classCallCheck(this,Ot);S(this,ot,new WeakMap)}_createClass(Ot,[{key:"downloadUrl",value:function downloadUrl(Ut,te,qt){if(!(0,dt.createValidAbsoluteUrl)(Ut,"http://example.com")){console.error("downloadUrl - not a valid URL: ".concat(Ut));return}Mt(Ut+"#pdfjs.action=download",te)}},{key:"downloadData",value:function downloadData(Ut,te,qt){var ie=URL.createObjectURL(new Blob([Ut],{type:qt}));Mt(ie,te)}},{key:"openOrDownloadData",value:function openOrDownloadData(Ut,te,qt){var ie=(0,dt.isPdfFile)(qt)?"application/pdf":"";return this.downloadData(te,qt,ie),!1}},{key:"download",value:function download(Ut,te,qt,ie){var re=URL.createObjectURL(Ut);Mt(re,qt)}}]);return Ot}();ot=new WeakMap,it.DownloadManager=Ot},function(J,it){var nt;Object.defineProperty(it,"__esModule",{value:!0}),it.WaitOnType=it.EventBus=it.AutomationEventBus=void 0,it.waitOnEventOrTimeout=dt;var ot={EVENT:"event",TIMEOUT:"timeout"};it.WaitOnType=ot;function dt(_ref171){var Qt=_ref171.target,Ut=_ref171.name,_ref171$delay=_ref171.delay,te=_ref171$delay===void 0?0:_ref171$delay;return new Promise(function(qt,ie){if(_typeof(Qt)!="object"||!(Ut&&typeof Ut=="string")||!(Number.isInteger(te)&&te>=0))throw new Error("waitOnEventOrTimeout - invalid parameters.");function re(Wt){Qt instanceof Mt?Qt._off(Ut,ne):Qt.removeEventListener(Ut,ne),Bt&&clearTimeout(Bt),qt(Wt)}var ne=re.bind(null,ot.EVENT);Qt instanceof Mt?Qt._on(Ut,ne):Qt.addEventListener(Ut,ne);var ae=re.bind(null,ot.TIMEOUT),Bt=setTimeout(ae,te)})}var Mt=function(){function Mt(){_classCallCheck(this,Mt);S(this,nt,Object.create(null))}_createClass(Mt,[{key:"on",value:function on(Ut,te){var qt=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;this._on(Ut,te,{external:!0,once:qt==null?void 0:qt.once})}},{key:"off",value:function off(Ut,te){var qt=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;this._off(Ut,te,{external:!0,once:qt==null?void 0:qt.once})}},{key:"dispatch",value:function dispatch(Ut,te){var qt=h(this,nt)[Ut];if(!qt||qt.length===0)return;var ie;var _iterator186=_createForOfIteratorHelper(qt.slice(0)),_step186;try{for(_iterator186.s();!(_step186=_iterator186.n()).done;){var _step186$value=_step186.value,_re5=_step186$value.listener,ne=_step186$value.external,ae=_step186$value.once;if(ae&&this._off(Ut,_re5),ne){(ie||(ie=[])).push(_re5);continue}_re5(te)}}catch(err){_iterator186.e(err)}finally{_iterator186.f()}if(ie){var _iterator187=_createForOfIteratorHelper(ie),_step187;try{for(_iterator187.s();!(_step187=_iterator187.n()).done;){var re=_step187.value;re(te)}}catch(err){_iterator187.e(err)}finally{_iterator187.f()}ie=null}}},{key:"_on",value:function _on(Ut,te){var qt=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;var ie;((ie=h(this,nt))[Ut]||(ie[Ut]=[])).push({listener:te,external:(qt==null?void 0:qt.external)===!0,once:(qt==null?void 0:qt.once)===!0})}},{key:"_off",value:function _off(Ut,te){var qt=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;var ie=h(this,nt)[Ut];if(ie){for(var re=0,ne=ie.length;re<ne;re++)if(ie[re].listener===te){ie.splice(re,1);return}}}}]);return Mt}();nt=new WeakMap,it.EventBus=Mt;var Ot=function(_Mt8){_inherits(Ot,_Mt8);function Ot(){_classCallCheck(this,Ot);return _callSuper(this,Ot,arguments)}_createClass(Ot,[{key:"dispatch",value:function dispatch(Ut,te){throw new Error("Not implemented: AutomationEventBus.dispatch")}}]);return Ot}(Mt);it.AutomationEventBus=Ot},function(J,it,nt){Object.defineProperty(it,"__esModule",{value:!0}),it.GenericL10n=void 0,nt(11);var ot=nt(7);var dt={en:"en-US",es:"es-ES",fy:"fy-NL",ga:"ga-IE",gu:"gu-IN",hi:"hi-IN",hy:"hy-AM",nb:"nb-NO",ne:"ne-NP",nn:"nn-NO",pa:"pa-IN",pt:"pt-PT",sv:"sv-SE",zh:"zh-CN"};function Mt(Qt){return dt[Qt==null?void 0:Qt.toLowerCase()]||Qt}var Ot=function(){function Ot(Ut){_classCallCheck(this,Ot);var _document4=document,te=_document4.webL10n;this._lang=Ut,this._ready=new Promise(function(qt,ie){te.setLanguage(Mt(Ut),function(){qt(te)})})}_createClass(Ot,[{key:"getLanguage",value:function(){var _getLanguage=_asyncToGenerator(_regeneratorRuntime().mark(function _callee114(){return _regeneratorRuntime().wrap(function _callee114$(_context115){while(1)switch(_context115.prev=_context115.next){case 0:_context115.next=2;return this._ready;case 2:return _context115.abrupt("return",_context115.sent.getLanguage());case 3:case"end":return _context115.stop()}},_callee114,this)}));function getLanguage(){return _getLanguage.apply(this,arguments)}return getLanguage}()},{key:"getDirection",value:function(){var _getDirection=_asyncToGenerator(_regeneratorRuntime().mark(function _callee115(){return _regeneratorRuntime().wrap(function _callee115$(_context116){while(1)switch(_context116.prev=_context116.next){case 0:_context116.next=2;return this._ready;case 2:return _context116.abrupt("return",_context116.sent.getDirection());case 3:case"end":return _context116.stop()}},_callee115,this)}));function getDirection(){return _getDirection.apply(this,arguments)}return getDirection}()},{key:"get",value:function(){var _get3=_asyncToGenerator(_regeneratorRuntime().mark(function _callee116(Ut){var te,qt,_args59=arguments;return _regeneratorRuntime().wrap(function _callee116$(_context117){while(1)switch(_context117.prev=_context117.next){case 0:te=_args59.length>1&&_args59[1]!==undefined?_args59[1]:null;qt=_args59.length>2&&_args59[2]!==undefined?_args59[2]:(0,ot.getL10nFallback)(Ut,te);_context117.next=4;return this._ready;case 4:return _context117.abrupt("return",_context117.sent.get(Ut,te,qt));case 5:case"end":return _context117.stop()}},_callee116,this)}));function get(_x102){return _get3.apply(this,arguments)}return get}()},{key:"translate",value:function(){var _translate=_asyncToGenerator(_regeneratorRuntime().mark(function _callee117(Ut){return _regeneratorRuntime().wrap(function _callee117$(_context118){while(1)switch(_context118.prev=_context118.next){case 0:_context118.next=2;return this._ready;case 2:return _context118.abrupt("return",_context118.sent.translate(Ut));case 3:case"end":return _context118.stop()}},_callee117,this)}));function translate(_x103){return _translate.apply(this,arguments)}return translate}()}]);return Ot}();it.GenericL10n=Ot},function(){document.webL10n=function(J,it){var nt={},ot="",dt="textContent",Mt="",Ot={},Qt="loading",Ut=!0;function te(){return it.querySelectorAll("link[type=\"application/l10n\"]")}function qt(){var Se=it.querySelector("script[type=\"application/l10n\"]");return Se?JSON.parse(Se.innerHTML):null}function ie(Se){return Se?Se.querySelectorAll("*[data-l10n-id]"):[]}function re(Se){if(!Se)return{};var xr=Se.getAttribute("data-l10n-id"),pr=Se.getAttribute("data-l10n-args"),$e={};if(pr)try{$e=JSON.parse(pr)}catch(_unused29){console.warn("could not parse arguments for #"+xr)}return{id:xr,args:$e}}function ne(Se,xr,pr){xr=xr||function(_r){},pr=pr||function(){};var $e=new XMLHttpRequest;$e.open("GET",Se,Ut),$e.overrideMimeType&&$e.overrideMimeType("text/plain; charset=utf-8"),$e.onreadystatechange=function(){$e.readyState==4&&($e.status==200||$e.status===0?xr($e.responseText):pr())},$e.onerror=pr,$e.ontimeout=pr;try{$e.send(null)}catch(_unused30){pr()}}function ae(Se,xr,pr,$e){var _r=Se.replace(/[^\/]*$/,"")||"./";function Ps(bl){return bl.lastIndexOf("\\")<0?bl:bl.replace(/\\\\/g,"\\").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g,"\t").replace(/\\b/g,"\b").replace(/\\f/g,"\f").replace(/\\{/g,"{").replace(/\\}/g,"}").replace(/\\"/g,"\"").replace(/\\'/g,"'")}function qe(bl,ol){var Te={},pe=/^\s*|\s*$/,ue=/^\s*#|^\s*$/,se=/^\s*\[(.*)\]\s*$/,be=/^\s*@import\s+url\((.*)\)\s*$/i,Ae=/^([^=\s]*)\s*=\s*(.+)$/;function ze(io,Qr,Es){var nl=io.replace(pe,"").split(/[\r\n]+/),Cr="*",$l=xr.split("-",1)[0],_l=!1,Ih="";function Rh(){for(;;){if(!nl.length){Es();return}var Th=nl.shift();if(!ue.test(Th)){if(Qr){if(Ih=se.exec(Th),Ih){Cr=Ih[1].toLowerCase(),_l=Cr!=="*"&&Cr!==xr&&Cr!==$l;continue}else if(_l)continue;if(Ih=be.exec(Th),Ih){pi(_r+Ih[1],Rh);return}}var $s=Th.match(Ae);$s&&$s.length==3&&(Te[$s[1]]=Ps($s[2]))}}}Rh()}function pi(io,Qr){ne(io,function(Es){ze(Es,!1,Qr)},function(){console.warn(io+" not found."),Qr()})}ze(bl,!0,function(){ol(Te)})}ne(Se,function(bl){ot+=bl,qe(bl,function(ol){for(var Te in ol){var pe,ue,se=Te.lastIndexOf(".");se>0?(pe=Te.substring(0,se),ue=Te.substring(se+1)):(pe=Te,ue=dt),nt[pe]||(nt[pe]={}),nt[pe][ue]=ol[Te]}pr&&pr()})},$e)}function Bt(Se,xr){Se&&(Se=Se.toLowerCase()),xr=xr||function(){},Wt(),Mt=Se;var pr=te(),$e=pr.length;if($e===0){var _r=qt();if(_r&&_r.locales&&_r.default_locale){if(console.log("using the embedded JSON directory, early way out"),nt=_r.locales[Se],!nt){var Ps=_r.default_locale.toLowerCase();for(var qe in _r.locales)if(qe=qe.toLowerCase(),qe===Se){nt=_r.locales[Se];break}else qe===Ps&&(nt=_r.locales[Ps])}xr()}else console.log("no resource to load, early way out");Qt="complete";return}var bl=null,ol=0;bl=function bl(){ol++,ol>=$e&&(xr(),Qt="complete")};function Te(se){var be=se.href;this.load=function(Ae,ze){ae(be,Ae,ze,function(){console.warn(be+" not found."),console.warn("\""+Ae+"\" resource not found"),Mt="",ze()})}}for(var pe=0;pe<$e;pe++){var ue=new Te(pr[pe]);ue.load(Se,bl)}}function Wt(){nt={},ot="",Mt=""}function oe(Se){var xr={af:3,ak:4,am:4,ar:1,asa:3,az:0,be:11,bem:3,bez:3,bg:3,bh:4,bm:0,bn:3,bo:0,br:20,brx:3,bs:11,ca:3,cgg:3,chr:3,cs:12,cy:17,da:3,de:3,dv:3,dz:0,ee:3,el:3,en:3,eo:3,es:3,et:3,eu:3,fa:0,ff:5,fi:3,fil:4,fo:3,fr:5,fur:3,fy:3,ga:8,gd:24,gl:3,gsw:3,gu:3,guw:4,gv:23,ha:3,haw:3,he:2,hi:4,hr:11,hu:0,id:0,ig:0,ii:0,is:3,it:3,iu:7,ja:0,jmc:3,jv:0,ka:0,kab:5,kaj:3,kcg:3,kde:0,kea:0,kk:3,kl:3,km:0,kn:0,ko:0,ksb:3,ksh:21,ku:3,kw:7,lag:18,lb:3,lg:3,ln:4,lo:0,lt:10,lv:6,mas:3,mg:4,mk:16,ml:3,mn:3,mo:9,mr:3,ms:0,mt:15,my:0,nah:3,naq:7,nb:3,nd:3,ne:3,nl:3,nn:3,no:3,nr:3,nso:4,ny:3,nyn:3,om:3,or:3,pa:3,pap:3,pl:13,ps:3,pt:3,rm:3,ro:9,rof:3,ru:11,rwk:3,sah:0,saq:3,se:7,seh:3,ses:0,sg:0,sh:11,shi:19,sk:12,sl:14,sma:7,smi:7,smj:7,smn:7,sms:7,sn:3,so:3,sq:3,sr:11,ss:3,ssy:3,st:3,sv:3,sw:3,syr:3,ta:3,te:3,teo:3,th:0,ti:4,tig:3,tk:3,tl:4,tn:3,to:0,tr:0,ts:3,tzm:22,uk:11,ur:3,ve:3,vi:0,vun:3,wa:4,wae:3,wo:0,xh:3,xog:3,yo:0,zh:0,zu:3};function pr(qe,bl){return bl.indexOf(qe)!==-1}function $e(qe,bl,ol){return bl<=qe&&qe<=ol}var _r={0:function _(qe){return"other"},1:function _(qe){return $e(qe%100,3,10)?"few":qe===0?"zero":$e(qe%100,11,99)?"many":qe==2?"two":qe==1?"one":"other"},2:function _(qe){return qe!==0&&qe%10===0?"many":qe==2?"two":qe==1?"one":"other"},3:function _(qe){return qe==1?"one":"other"},4:function _(qe){return $e(qe,0,1)?"one":"other"},5:function _(qe){return $e(qe,0,2)&&qe!=2?"one":"other"},6:function _(qe){return qe===0?"zero":qe%10==1&&qe%100!=11?"one":"other"},7:function _(qe){return qe==2?"two":qe==1?"one":"other"},8:function _(qe){return $e(qe,3,6)?"few":$e(qe,7,10)?"many":qe==2?"two":qe==1?"one":"other"},9:function _(qe){return qe===0||qe!=1&&$e(qe%100,1,19)?"few":qe==1?"one":"other"},10:function _(qe){return $e(qe%10,2,9)&&!$e(qe%100,11,19)?"few":qe%10==1&&!$e(qe%100,11,19)?"one":"other"},11:function _(qe){return $e(qe%10,2,4)&&!$e(qe%100,12,14)?"few":qe%10===0||$e(qe%10,5,9)||$e(qe%100,11,14)?"many":qe%10==1&&qe%100!=11?"one":"other"},12:function _(qe){return $e(qe,2,4)?"few":qe==1?"one":"other"},13:function _(qe){return $e(qe%10,2,4)&&!$e(qe%100,12,14)?"few":qe!=1&&$e(qe%10,0,1)||$e(qe%10,5,9)||$e(qe%100,12,14)?"many":qe==1?"one":"other"},14:function _(qe){return $e(qe%100,3,4)?"few":qe%100==2?"two":qe%100==1?"one":"other"},15:function _(qe){return qe===0||$e(qe%100,2,10)?"few":$e(qe%100,11,19)?"many":qe==1?"one":"other"},16:function _(qe){return qe%10==1&&qe!=11?"one":"other"},17:function _(qe){return qe==3?"few":qe===0?"zero":qe==6?"many":qe==2?"two":qe==1?"one":"other"},18:function _(qe){return qe===0?"zero":$e(qe,0,2)&&qe!==0&&qe!=2?"one":"other"},19:function _(qe){return $e(qe,2,10)?"few":$e(qe,0,1)?"one":"other"},20:function _(qe){return($e(qe%10,3,4)||qe%10==9)&&!($e(qe%100,10,19)||$e(qe%100,70,79)||$e(qe%100,90,99))?"few":qe%1e6===0&&qe!==0?"many":qe%10==2&&!pr(qe%100,[12,72,92])?"two":qe%10==1&&!pr(qe%100,[11,71,91])?"one":"other"},21:function _(qe){return qe===0?"zero":qe==1?"one":"other"},22:function _(qe){return $e(qe,0,1)||$e(qe,11,99)?"one":"other"},23:function _(qe){return $e(qe%10,1,2)||qe%20===0?"one":"other"},24:function _(qe){return $e(qe,3,10)||$e(qe,13,19)?"few":pr(qe,[2,12])?"two":pr(qe,[1,11])?"one":"other"}},Ps=xr[Se.replace(/-.*$/,"")];return Ps in _r?_r[Ps]:(console.warn("plural form unknown for ["+Se+"]"),function(){return"other"})}Ot.plural=function(Se,xr,pr,$e){var _r=parseFloat(xr);if(isNaN(_r)||$e!=dt)return Se;Ot._pluralRules||(Ot._pluralRules=oe(Mt));var Ps="["+Ot._pluralRules(_r)+"]";return _r===0&&pr+"[zero]"in nt?Se=nt[pr+"[zero]"][$e]:_r==1&&pr+"[one]"in nt?Se=nt[pr+"[one]"][$e]:_r==2&&pr+"[two]"in nt?Se=nt[pr+"[two]"][$e]:pr+Ps in nt?Se=nt[pr+Ps][$e]:pr+"[other]"in nt&&(Se=nt[pr+"[other]"][$e]),Se};function ve(Se,xr,pr){var $e=nt[Se];if(!$e){if(console.warn("#"+Se+" is undefined."),!pr)return null;$e=pr}var _r={};for(var Ps in $e){var qe=$e[Ps];qe=_e(qe,xr,Se,Ps),qe=Xe(qe,xr,Se),_r[Ps]=qe}return _r}function _e(Se,xr,pr,$e){var _r=/\{\[\s*([a-zA-Z]+)\(([a-zA-Z]+)\)\s*\]\}/,Ps=_r.exec(Se);if(!Ps||!Ps.length)return Se;var qe=Ps[1],bl=Ps[2],ol;if(xr&&bl in xr?ol=xr[bl]:bl in nt&&(ol=nt[bl]),qe in Ot){var Te=Ot[qe];Se=Te(Se,ol,pr,$e)}return Se}function Xe(Se,xr,pr){var $e=/\{\{\s*(.+?)\s*\}\}/g;return Se.replace($e,function(_r,Ps){return xr&&Ps in xr?xr[Ps]:Ps in nt?nt[Ps]:(console.log("argument {{"+Ps+"}} for #"+pr+" is undefined."),_r)})}function He(Se){var xr=re(Se);if(xr.id){var pr=ve(xr.id,xr.args);if(!pr){console.warn("#"+xr.id+" is undefined.");return}if(pr[dt]){if(ro(Se)===0)Se[dt]=pr[dt];else{for(var $e=Se.childNodes,_r=!1,Ps=0,qe=$e.length;Ps<qe;Ps++)$e[Ps].nodeType===3&&/\S/.test($e[Ps].nodeValue)&&(_r?$e[Ps].nodeValue="":($e[Ps].nodeValue=pr[dt],_r=!0));if(!_r){var bl=it.createTextNode(pr[dt]);Se.prepend(bl)}}delete pr[dt]}for(var ol in pr)Se[ol]=pr[ol]}}function ro(Se){if(Se.children)return Se.children.length;if(_typeof(Se.childElementCount)<"u")return Se.childElementCount;for(var xr=0,pr=0;pr<Se.childNodes.length;pr++)xr+=Se.nodeType===1?1:0;return xr}function Xo(Se){Se=Se||it.documentElement;for(var xr=ie(Se),pr=xr.length,$e=0;$e<pr;$e++)He(xr[$e]);He(Se)}return{get:function get(Se,xr,pr){var $e=Se.lastIndexOf("."),_r=dt;$e>0&&(_r=Se.substring($e+1),Se=Se.substring(0,$e));var Ps;pr&&(Ps={},Ps[_r]=pr);var qe=ve(Se,xr,Ps);return qe&&_r in qe?qe[_r]:"{{"+Se+"}}"},getData:function getData(){return nt},getText:function getText(){return ot},getLanguage:function getLanguage(){return Mt},setLanguage:function setLanguage(Se,xr){Bt(Se,function(){xr&&xr()})},getDirection:function getDirection(){var Se=["ar","he","fa","ps","ur"],xr=Mt.split("-",1)[0];return Se.indexOf(xr)>=0?"rtl":"ltr"},translate:Xo,getReadyState:function getReadyState(){return Qt},ready:function ready(Se){if(Se)Qt=="complete"||Qt=="interactive"?J.setTimeout(function(){Se()}):it.addEventListener&&it.addEventListener("localized",function xr(){it.removeEventListener("localized",xr),Se()});else return}}}(window,document)},function(J,it,nt){Object.defineProperty(it,"__esModule",{value:!0}),it.PDFHistory=void 0,it.isDestArraysEqual=ie,it.isDestHashesEqual=qt;var ot=nt(2),dt=nt(9);var Mt=1e3,Ot=50,Qt=1e3;function Ut(){return document.location.hash}var te=function(){function te(_ref172){var _this261=this;var ne=_ref172.linkService,ae=_ref172.eventBus;_classCallCheck(this,te);this.linkService=ne,this.eventBus=ae,this._initialized=!1,this._fingerprint="",this.reset(),this._boundEvents=null,this.eventBus._on("pagesinit",function(){_this261._isPagesLoaded=!1,_this261.eventBus._on("pagesloaded",function(Bt){_this261._isPagesLoaded=!!Bt.pagesCount},{once:!0})})}_createClass(te,[{key:"initialize",value:function initialize(_ref173){var ne=_ref173.fingerprint,_ref173$resetHistory=_ref173.resetHistory,ae=_ref173$resetHistory===void 0?!1:_ref173$resetHistory,_ref173$updateUrl=_ref173.updateUrl,Bt=_ref173$updateUrl===void 0?!1:_ref173$updateUrl;if(!ne||typeof ne!="string"){console.error("PDFHistory.initialize: The \"fingerprint\" must be a non-empty string.");return}this._initialized&&this.reset();var Wt=this._fingerprint!==""&&this._fingerprint!==ne;this._fingerprint=ne,this._updateUrl=Bt===!0,this._initialized=!0,this._bindEvents();var oe=window.history.state;if(this._popStateInProgress=!1,this._blockHashChange=0,this._currentHash=Ut(),this._numPositionUpdates=0,this._uid=this._maxUid=0,this._destination=null,this._position=null,!this._isValidState(oe,!0)||ae){var _this$_parseCurrentHa=this._parseCurrentHash(!0),_e=_this$_parseCurrentHa.hash,Xe=_this$_parseCurrentHa.page,He=_this$_parseCurrentHa.rotation;if(!_e||Wt||ae){this._pushOrReplaceState(null,!0);return}this._pushOrReplaceState({hash:_e,page:Xe,rotation:He},!0);return}var ve=oe.destination;this._updateInternalState(ve,oe.uid,!0),ve.rotation!==void 0&&(this._initialRotation=ve.rotation),ve.dest?(this._initialBookmark=JSON.stringify(ve.dest),this._destination.page=null):ve.hash?this._initialBookmark=ve.hash:ve.page&&(this._initialBookmark="page=".concat(ve.page))}},{key:"reset",value:function reset(){this._initialized&&(this._pageHide(),this._initialized=!1,this._unbindEvents()),this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),this._initialBookmark=null,this._initialRotation=null}},{key:"push",value:function push(_ref174){var _this262=this;var _ref174$namedDest=_ref174.namedDest,ne=_ref174$namedDest===void 0?null:_ref174$namedDest,ae=_ref174.explicitDest,Bt=_ref174.pageNumber;if(!this._initialized)return;if(ne&&typeof ne!="string"){console.error("PDFHistory.push: \"".concat(ne,"\" is not a valid namedDest parameter."));return}else if(Array.isArray(ae)){if(!this._isValidPage(Bt)&&(Bt!==null||this._destination)){console.error("PDFHistory.push: \"".concat(Bt,"\" is not a valid pageNumber parameter."));return}}else{console.error("PDFHistory.push: \"".concat(ae,"\" is not a valid explicitDest parameter."));return}var Wt=ne||JSON.stringify(ae);if(!Wt)return;var oe=!1;if(this._destination&&(qt(this._destination.hash,Wt)||ie(this._destination.dest,ae))){if(this._destination.page)return;oe=!0}this._popStateInProgress&&!oe||(this._pushOrReplaceState({dest:ae,hash:Wt,page:Bt,rotation:this.linkService.rotation},oe),this._popStateInProgress||(this._popStateInProgress=!0,Promise.resolve().then(function(){_this262._popStateInProgress=!1})))}},{key:"pushPage",value:function pushPage(ne){var _this263=this;var ae;if(this._initialized){if(!this._isValidPage(ne)){console.error("PDFHistory.pushPage: \"".concat(ne,"\" is not a valid page number."));return}((ae=this._destination)==null?void 0:ae.page)!==ne&&(this._popStateInProgress||(this._pushOrReplaceState({dest:null,hash:"page=".concat(ne),page:ne,rotation:this.linkService.rotation}),this._popStateInProgress||(this._popStateInProgress=!0,Promise.resolve().then(function(){_this263._popStateInProgress=!1}))))}}},{key:"pushCurrentPosition",value:function pushCurrentPosition(){!this._initialized||this._popStateInProgress||this._tryPushCurrentPosition()}},{key:"back",value:function back(){if(!this._initialized||this._popStateInProgress)return;var ne=window.history.state;this._isValidState(ne)&&ne.uid>0&&window.history.back()}},{key:"forward",value:function forward(){if(!this._initialized||this._popStateInProgress)return;var ne=window.history.state;this._isValidState(ne)&&ne.uid<this._maxUid&&window.history.forward()}},{key:"popStateInProgress",get:function get(){return this._initialized&&(this._popStateInProgress||this._blockHashChange>0)}},{key:"initialBookmark",get:function get(){return this._initialized?this._initialBookmark:null}},{key:"initialRotation",get:function get(){return this._initialized?this._initialRotation:null}},{key:"_pushOrReplaceState",value:function _pushOrReplaceState(ne){var ae=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1;var Bt=ae||!this._destination,Wt={fingerprint:this._fingerprint,uid:Bt?this._uid:this._uid+1,destination:ne};this._updateInternalState(ne,Wt.uid);var oe;if(this._updateUrl&&ne!=null&&ne.hash){var ve=document.location.href.split("#")[0];ve.startsWith("file://")||(oe="".concat(ve,"#").concat(ne.hash))}Bt?window.history.replaceState(Wt,"",oe):window.history.pushState(Wt,"",oe)}},{key:"_tryPushCurrentPosition",value:function _tryPushCurrentPosition(){var ne=arguments.length>0&&arguments[0]!==undefined?arguments[0]:!1;if(!this._position)return;var ae=this._position;if(ne&&(ae=Object.assign(Object.create(null),this._position),ae.temporary=!0),!this._destination){this._pushOrReplaceState(ae);return}if(this._destination.temporary){this._pushOrReplaceState(ae,!0);return}if(this._destination.hash===ae.hash||!this._destination.page&&this._numPositionUpdates<=Ot)return;var Bt=!1;if(this._destination.page>=ae.first&&this._destination.page<=ae.page){if(this._destination.dest!==void 0||!this._destination.first)return;Bt=!0}this._pushOrReplaceState(ae,Bt)}},{key:"_isValidPage",value:function _isValidPage(ne){return Number.isInteger(ne)&&ne>0&&ne<=this.linkService.pagesCount}},{key:"_isValidState",value:function _isValidState(ne){var ae=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1;if(!ne)return!1;if(ne.fingerprint!==this._fingerprint)if(ae){if(typeof ne.fingerprint!="string"||ne.fingerprint.length!==this._fingerprint.length)return!1;var _performance$getEntri=performance.getEntriesByType("navigation"),_performance$getEntri2=_slicedToArray(_performance$getEntri,1),Bt=_performance$getEntri2[0];if((Bt==null?void 0:Bt.type)!=="reload")return!1}else return!1;return!(!Number.isInteger(ne.uid)||ne.uid<0||ne.destination===null||_typeof(ne.destination)!="object")}},{key:"_updateInternalState",value:function _updateInternalState(ne,ae){var Bt=arguments.length>2&&arguments[2]!==undefined?arguments[2]:!1;this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),Bt&&ne!=null&&ne.temporary&&delete ne.temporary,this._destination=ne,this._uid=ae,this._maxUid=Math.max(this._maxUid,ae),this._numPositionUpdates=0}},{key:"_parseCurrentHash",value:function _parseCurrentHash(){var ne=arguments.length>0&&arguments[0]!==undefined?arguments[0]:!1;var ae=unescape(Ut()).substring(1),Bt=(0,ot.parseQueryString)(ae),Wt=Bt.get("nameddest")||"";var oe=Bt.get("page")|0;return(!this._isValidPage(oe)||ne&&Wt.length>0)&&(oe=null),{hash:ae,page:oe,rotation:this.linkService.rotation}}},{key:"_updateViewarea",value:function _updateViewarea(_ref175){var _this264=this;var ne=_ref175.location;this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),this._position={hash:ne.pdfOpenParams.substring(1),page:this.linkService.page,first:ne.pageNumber,rotation:ne.rotation},!this._popStateInProgress&&(this._isPagesLoaded&&this._destination&&!this._destination.page&&this._numPositionUpdates++,this._updateViewareaTimeout=setTimeout(function(){_this264._popStateInProgress||_this264._tryPushCurrentPosition(!0),_this264._updateViewareaTimeout=null},Qt))}},{key:"_popState",value:function _popState(_ref176){var _this265=this;var ne=_ref176.state;var ae=Ut(),Bt=this._currentHash!==ae;if(this._currentHash=ae,!ne){this._uid++;var _this$_parseCurrentHa2=this._parseCurrentHash(),oe=_this$_parseCurrentHa2.hash,ve=_this$_parseCurrentHa2.page,_e=_this$_parseCurrentHa2.rotation;this._pushOrReplaceState({hash:oe,page:ve,rotation:_e},!0);return}if(!this._isValidState(ne))return;this._popStateInProgress=!0,Bt&&(this._blockHashChange++,(0,dt.waitOnEventOrTimeout)({target:window,name:"hashchange",delay:Mt}).then(function(){_this265._blockHashChange--}));var Wt=ne.destination;this._updateInternalState(Wt,ne.uid,!0),(0,ot.isValidRotation)(Wt.rotation)&&(this.linkService.rotation=Wt.rotation),Wt.dest?this.linkService.goToDestination(Wt.dest):Wt.hash?this.linkService.setHash(Wt.hash):Wt.page&&(this.linkService.page=Wt.page),Promise.resolve().then(function(){_this265._popStateInProgress=!1})}},{key:"_pageHide",value:function _pageHide(){(!this._destination||this._destination.temporary)&&this._tryPushCurrentPosition()}},{key:"_bindEvents",value:function _bindEvents(){this._boundEvents||(this._boundEvents={updateViewarea:this._updateViewarea.bind(this),popState:this._popState.bind(this),pageHide:this._pageHide.bind(this)},this.eventBus._on("updateviewarea",this._boundEvents.updateViewarea),window.addEventListener("popstate",this._boundEvents.popState),window.addEventListener("pagehide",this._boundEvents.pageHide))}},{key:"_unbindEvents",value:function _unbindEvents(){this._boundEvents&&(this.eventBus._off("updateviewarea",this._boundEvents.updateViewarea),window.removeEventListener("popstate",this._boundEvents.popState),window.removeEventListener("pagehide",this._boundEvents.pageHide),this._boundEvents=null)}}]);return te}();it.PDFHistory=te;function qt(re,ne){return typeof re!="string"||typeof ne!="string"?!1:re===ne||(0,ot.parseQueryString)(re).get("nameddest")===ne}function ie(re,ne){function ae(Bt,Wt){if(_typeof(Bt)!=_typeof(Wt)||Array.isArray(Bt)||Array.isArray(Wt))return!1;if(Bt!==null&&_typeof(Bt)=="object"&&Wt!==null){if(Object.keys(Bt).length!==Object.keys(Wt).length)return!1;for(var oe in Bt)if(!ae(Bt[oe],Wt[oe]))return!1;return!0}return Bt===Wt||Number.isNaN(Bt)&&Number.isNaN(Wt)}if(!(Array.isArray(re)&&Array.isArray(ne))||re.length!==ne.length)return!1;for(var Bt=0,Wt=re.length;Bt<Wt;Bt++)if(!ae(re[Bt],ne[Bt]))return!1;return!0}},function(J,it,nt){var ot,dt,Mt,Ot,Qt,Ut,te,qt,ie,re,ne,ae,Bt,Wt,oe,ve,_e,Xe,He,ro,Xo,Se,xr,pr,$e,_r;Object.defineProperty(it,"__esModule",{value:!0}),it.PDFPageView=void 0;var Ps=nt(4),qe=nt(2),bl=nt(14),ol=nt(6),Te=nt(15),pe=nt(7),ue=nt(5),se=nt(16),be=nt(17),Ae=nt(18),ze=nt(19),pi=nt(20);var io=Te.compatibilityParams.maxCanvasPixels||16777216,Qr=function Qr(){return{annotationEditorUIManager:null,annotationStorage:null,downloadManager:null,enableScripting:!1,fieldObjectsPromise:null,findController:null,hasJSActionsPromise:null,get linkService(){return new ue.SimpleLinkService}}};var Es=function(){function Es(Cr){var _Cr$textLayerMode,_Cr$annotationMode,_Cr$isOffscreenCanvas,_Cr$maxCanvasPixels,_this266=this;_classCallCheck(this,Es);S(this,ne),S(this,Bt),S(this,oe),S(this,_e),S(this,He),S(this,Xo),S(this,xr),S(this,$e),S(this,ot,Ps.AnnotationMode.ENABLE_FORMS),S(this,dt,!1),S(this,Mt,null),S(this,Ot,null),S(this,Qt,null),S(this,Ut,null),S(this,te,qe.RenderingStates.INITIAL),S(this,qt,qe.TextLayerMode.ENABLE),S(this,ie,{directDrawing:!0,initialOptionalContent:!0,regularAnnotations:!0}),S(this,re,new WeakMap);var $l;var _l=Cr.container,Ih=Cr.defaultViewport;this.id=Cr.id,this.renderingId="page"+this.id,A(this,Mt,Cr.layerProperties||Qr),this.pdfPage=null,this.pageLabel=null,this.rotation=0,this.scale=Cr.scale||qe.DEFAULT_SCALE,this.viewport=Ih,this.pdfPageRotate=Ih.rotation,this._optionalContentConfigPromise=Cr.optionalContentConfigPromise||null,A(this,qt,(_Cr$textLayerMode=Cr.textLayerMode)!==null&&_Cr$textLayerMode!==void 0?_Cr$textLayerMode:qe.TextLayerMode.ENABLE),A(this,ot,(_Cr$annotationMode=Cr.annotationMode)!==null&&_Cr$annotationMode!==void 0?_Cr$annotationMode:Ps.AnnotationMode.ENABLE_FORMS),this.imageResourcesPath=Cr.imageResourcesPath||"",this.isOffscreenCanvasSupported=(_Cr$isOffscreenCanvas=Cr.isOffscreenCanvasSupported)!==null&&_Cr$isOffscreenCanvas!==void 0?_Cr$isOffscreenCanvas:!0,this.maxCanvasPixels=(_Cr$maxCanvasPixels=Cr.maxCanvasPixels)!==null&&_Cr$maxCanvasPixels!==void 0?_Cr$maxCanvasPixels:io,this.pageColors=Cr.pageColors||null,this.eventBus=Cr.eventBus,this.renderingQueue=Cr.renderingQueue,this.l10n=Cr.l10n||pe.NullL10n,this.renderTask=null,this.resume=null,this._isStandalone=!(($l=this.renderingQueue)!=null&&$l.hasViewer()),this._container=_l,Cr.useOnlyCssZoom&&(console.error("useOnlyCssZoom was removed, please use `maxCanvasPixels = 0` instead."),this.maxCanvasPixels=0),this._annotationCanvasMap=null,this.annotationLayer=null,this.annotationEditorLayer=null,this.textLayer=null,this.zoomLayer=null,this.xfaLayer=null,this.structTreeLayer=null;var Rh=document.createElement("div");if(Rh.className="page",Rh.setAttribute("data-page-number",this.id),Rh.setAttribute("role","region"),this.l10n.get("page_landmark",{page:this.id}).then(function(Th){Rh.setAttribute("aria-label",Th)}),this.div=Rh,D(this,ne,ae).call(this),_l==null||_l.append(Rh),this._isStandalone){_l==null||_l.style.setProperty("--scale-factor",this.scale*Ps.PixelsPerInch.PDF_TO_CSS_UNITS);var Th=Cr.optionalContentConfigPromise;Th&&Th.then(function($s){Th===_this266._optionalContentConfigPromise&&(h(_this266,ie).initialOptionalContent=$s.hasInitialVisibility)})}}_createClass(Es,[{key:"renderingState",get:function get(){return h(this,te)},set:function set(Cr){var _this267=this;if(Cr!==h(this,te))switch(A(this,te,Cr),h(this,Ot)&&(clearTimeout(h(this,Ot)),A(this,Ot,null)),Cr){case qe.RenderingStates.PAUSED:this.div.classList.remove("loading");break;case qe.RenderingStates.RUNNING:this.div.classList.add("loadingIcon"),A(this,Ot,setTimeout(function(){_this267.div.classList.add("loading"),A(_this267,Ot,null)},0));break;case qe.RenderingStates.INITIAL:case qe.RenderingStates.FINISHED:this.div.classList.remove("loadingIcon","loading");break}}},{key:"setPdfPage",value:function setPdfPage(Cr){var $l,_l,Ih;this._isStandalone&&((($l=this.pageColors)==null?void 0:$l.foreground)==="CanvasText"||((_l=this.pageColors)==null?void 0:_l.background)==="Canvas")&&((Ih=this._container)==null||Ih.style.setProperty("--hcm-highligh-filter",Cr.filterFactory.addHighlightHCMFilter("CanvasText","Canvas","HighlightText","Highlight"))),this.pdfPage=Cr,this.pdfPageRotate=Cr.rotate;var Rh=(this.rotation+this.pdfPageRotate)%360;this.viewport=Cr.getViewport({scale:this.scale*Ps.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:Rh}),D(this,ne,ae).call(this),this.reset()}},{key:"destroy",value:function destroy(){var Cr;this.reset(),(Cr=this.pdfPage)==null||Cr.cleanup()}},{key:"_textHighlighter",get:function get(){return(0,Ps.shadow)(this,"_textHighlighter",new Ae.TextHighlighter({pageIndex:this.id-1,eventBus:this.eventBus,findController:h(this,Mt).call(this).findController}))}},{key:"_resetZoomLayer",value:function _resetZoomLayer(){var Cr=arguments.length>0&&arguments[0]!==undefined?arguments[0]:!1;if(!this.zoomLayer)return;var $l=this.zoomLayer.firstChild;h(this,re)["delete"]($l),$l.width=0,$l.height=0,Cr&&this.zoomLayer.remove(),this.zoomLayer=null}},{key:"reset",value:function reset(){var _ref177=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},_ref177$keepZoomLayer=_ref177.keepZoomLayer,Cr=_ref177$keepZoomLayer===void 0?!1:_ref177$keepZoomLayer,_ref177$keepAnnotatio=_ref177.keepAnnotationLayer,$l=_ref177$keepAnnotatio===void 0?!1:_ref177$keepAnnotatio,_ref177$keepAnnotatio2=_ref177.keepAnnotationEditorLayer,_l=_ref177$keepAnnotatio2===void 0?!1:_ref177$keepAnnotatio2,_ref177$keepXfaLayer=_ref177.keepXfaLayer,Ih=_ref177$keepXfaLayer===void 0?!1:_ref177$keepXfaLayer,_ref177$keepTextLayer=_ref177.keepTextLayer,Rh=_ref177$keepTextLayer===void 0?!1:_ref177$keepTextLayer;var Th,$s,Dr,Xi,Ke;this.cancelRendering({keepAnnotationLayer:$l,keepAnnotationEditorLayer:_l,keepXfaLayer:Ih,keepTextLayer:Rh}),this.renderingState=qe.RenderingStates.INITIAL;var ta=this.div,Cl=ta.childNodes,Oh=Cr&&this.zoomLayer||null,jh=$l&&((Th=this.annotationLayer)==null?void 0:Th.div)||null,qh=_l&&(($s=this.annotationEditorLayer)==null?void 0:$s.div)||null,Bh=Ih&&((Dr=this.xfaLayer)==null?void 0:Dr.div)||null,Jh=Rh&&((Xi=this.textLayer)==null?void 0:Xi.div)||null;for(var Xh=Cl.length-1;Xh>=0;Xh--){var Qh=Cl[Xh];switch(Qh){case Oh:case jh:case qh:case Bh:case Jh:continue}Qh.remove()}ta.removeAttribute("data-loaded"),jh&&this.annotationLayer.hide(),qh&&this.annotationEditorLayer.hide(),Bh&&this.xfaLayer.hide(),Jh&&this.textLayer.hide(),(Ke=this.structTreeLayer)==null||Ke.hide(),Oh||(this.canvas&&(h(this,re)["delete"](this.canvas),this.canvas.width=0,this.canvas.height=0,delete this.canvas),this._resetZoomLayer())}},{key:"update",value:function update(_ref178){var _this268=this;var _ref178$scale=_ref178.scale,Cr=_ref178$scale===void 0?0:_ref178$scale,_ref178$rotation=_ref178.rotation,$l=_ref178$rotation===void 0?null:_ref178$rotation,_ref178$optionalConte=_ref178.optionalContentConfigPromise,_l=_ref178$optionalConte===void 0?null:_ref178$optionalConte,_ref178$drawingDelay=_ref178.drawingDelay,Ih=_ref178$drawingDelay===void 0?-1:_ref178$drawingDelay;var Rh;this.scale=Cr||this.scale,typeof $l=="number"&&(this.rotation=$l),_l instanceof Promise&&(this._optionalContentConfigPromise=_l,_l.then(function($s){_l===_this268._optionalContentConfigPromise&&(h(_this268,ie).initialOptionalContent=$s.hasInitialVisibility)})),h(this,ie).directDrawing=!0;var Th=(this.rotation+this.pdfPageRotate)%360;if(this.viewport=this.viewport.clone({scale:this.scale*Ps.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:Th}),D(this,ne,ae).call(this),this._isStandalone&&((Rh=this._container)==null||Rh.style.setProperty("--scale-factor",this.viewport.scale)),this.canvas){var $s=!1;if(h(this,dt)){if(this.maxCanvasPixels===0)$s=!0;else if(this.maxCanvasPixels>0){var _this$viewport2=this.viewport,Xi=_this$viewport2.width,Ke=_this$viewport2.height,_this$outputScale=this.outputScale,ta=_this$outputScale.sx,Cl=_this$outputScale.sy;$s=(Math.floor(Xi)*ta|0)*(Math.floor(Ke)*Cl|0)>this.maxCanvasPixels}}var Dr=!$s&&Ih>=0&&Ih<1e3;if(Dr||$s){if(Dr&&this.renderingState!==qe.RenderingStates.FINISHED&&(this.cancelRendering({keepZoomLayer:!0,keepAnnotationLayer:!0,keepAnnotationEditorLayer:!0,keepXfaLayer:!0,keepTextLayer:!0,cancelExtraDelay:Ih}),this.renderingState=qe.RenderingStates.FINISHED,h(this,ie).directDrawing=!1),this.cssTransform({target:this.canvas,redrawAnnotationLayer:!0,redrawAnnotationEditorLayer:!0,redrawXfaLayer:!0,redrawTextLayer:!Dr,hideTextLayer:Dr}),Dr)return;this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:!0,timestamp:performance.now(),error:h(this,Ut)});return}!this.zoomLayer&&!this.canvas.hidden&&(this.zoomLayer=this.canvas.parentNode,this.zoomLayer.style.position="absolute")}this.zoomLayer&&this.cssTransform({target:this.zoomLayer.firstChild}),this.reset({keepZoomLayer:!0,keepAnnotationLayer:!0,keepAnnotationEditorLayer:!0,keepXfaLayer:!0,keepTextLayer:!0})}},{key:"cancelRendering",value:function cancelRendering(){var _ref179=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},_ref179$keepAnnotatio=_ref179.keepAnnotationLayer,Cr=_ref179$keepAnnotatio===void 0?!1:_ref179$keepAnnotatio,_ref179$keepAnnotatio2=_ref179.keepAnnotationEditorLayer,$l=_ref179$keepAnnotatio2===void 0?!1:_ref179$keepAnnotatio2,_ref179$keepXfaLayer=_ref179.keepXfaLayer,_l=_ref179$keepXfaLayer===void 0?!1:_ref179$keepXfaLayer,_ref179$keepTextLayer=_ref179.keepTextLayer,Ih=_ref179$keepTextLayer===void 0?!1:_ref179$keepTextLayer,_ref179$cancelExtraDe=_ref179.cancelExtraDelay,Rh=_ref179$cancelExtraDe===void 0?0:_ref179$cancelExtraDe;var Th;this.renderTask&&(this.renderTask.cancel(Rh),this.renderTask=null),this.resume=null,this.textLayer&&(!Ih||!this.textLayer.div)&&(this.textLayer.cancel(),this.textLayer=null),this.structTreeLayer&&!this.textLayer&&(this.structTreeLayer=null),this.annotationLayer&&(!Cr||!this.annotationLayer.div)&&(this.annotationLayer.cancel(),this.annotationLayer=null,this._annotationCanvasMap=null),this.annotationEditorLayer&&(!$l||!this.annotationEditorLayer.div)&&(this.annotationEditorLayer.cancel(),this.annotationEditorLayer=null),this.xfaLayer&&(!_l||!this.xfaLayer.div)&&(this.xfaLayer.cancel(),this.xfaLayer=null,(Th=this._textHighlighter)==null||Th.disable())}},{key:"cssTransform",value:function cssTransform(_ref180){var Cr=_ref180.target,_ref180$redrawAnnotat=_ref180.redrawAnnotationLayer,$l=_ref180$redrawAnnotat===void 0?!1:_ref180$redrawAnnotat,_ref180$redrawAnnotat2=_ref180.redrawAnnotationEditorLayer,_l=_ref180$redrawAnnotat2===void 0?!1:_ref180$redrawAnnotat2,_ref180$redrawXfaLaye=_ref180.redrawXfaLayer,Ih=_ref180$redrawXfaLaye===void 0?!1:_ref180$redrawXfaLaye,_ref180$redrawTextLay=_ref180.redrawTextLayer,Rh=_ref180$redrawTextLay===void 0?!1:_ref180$redrawTextLay,_ref180$hideTextLayer=_ref180.hideTextLayer,Th=_ref180$hideTextLayer===void 0?!1:_ref180$hideTextLayer;var $s;if(!Cr.hasAttribute("zooming")){Cr.setAttribute("zooming",!0);var Xi=Cr.style;Xi.width=Xi.height=""}var Dr=h(this,re).get(Cr);if(this.viewport!==Dr){var _Xi3=this.viewport.rotation-Dr.rotation,Ke=Math.abs(_Xi3);var ta=1,Cl=1;if(Ke===90||Ke===270){var _this$viewport3=this.viewport,Oh=_this$viewport3.width,jh=_this$viewport3.height;ta=jh/Oh,Cl=Oh/jh}Cr.style.transform="rotate(".concat(_Xi3,"deg) scale(").concat(ta,", ").concat(Cl,")")}$l&&this.annotationLayer&&D(this,Bt,Wt).call(this),_l&&this.annotationEditorLayer&&D(this,oe,ve).call(this),Ih&&this.xfaLayer&&D(this,_e,Xe).call(this),this.textLayer&&(Th?(this.textLayer.hide(),($s=this.structTreeLayer)==null||$s.hide()):Rh&&D(this,He,ro).call(this))}},{key:"width",get:function get(){return this.viewport.width}},{key:"height",get:function get(){return this.viewport.height}},{key:"getPagePoint",value:function getPagePoint(Cr,$l){return this.viewport.convertToPdfPoint(Cr,$l)}},{key:"draw",value:function(){var _draw=_asyncToGenerator(_regeneratorRuntime().mark(function _callee119(){var _this269=this;var Cr,$l,_l,Ih,Rh,Th,_h$call,fe,Me,kr,rn,Oe,wi,$s,Dr,Xi,Ke,ta,Cl,Oh,jh,_fe5,_fe6,_Me4,qh,Bh,Jh,Xh,Qh,Kh,ia,_h$call3,_Me6;return _regeneratorRuntime().wrap(function _callee119$(_context120){while(1)switch(_context120.prev=_context120.next){case 0:this.renderingState!==qe.RenderingStates.INITIAL&&(console.error("Must be in new state before drawing"),this.reset());Cr=this.div,$l=this.l10n,_l=this.pageColors,Ih=this.pdfPage,Rh=this.viewport;if(Ih){_context120.next=4;break}throw this.renderingState=qe.RenderingStates.FINISHED,new Error("pdfPage is not loaded");case 4:this.renderingState=qe.RenderingStates.RUNNING;Th=document.createElement("div");if(Th.classList.add("canvasWrapper"),Cr.append(Th),!this.textLayer&&h(this,qt)!==qe.TextLayerMode.DISABLE&&!Ih.isPureXfa&&(this._accessibilityManager||(this._accessibilityManager=new be.TextAccessibilityManager),this.textLayer=new ze.TextLayerBuilder({highlighter:this._textHighlighter,accessibilityManager:this._accessibilityManager,isOffscreenCanvasSupported:this.isOffscreenCanvasSupported,enablePermissions:h(this,qt)===qe.TextLayerMode.ENABLE_PERMISSIONS}),Cr.append(this.textLayer.div)),!this.annotationLayer&&h(this,ot)!==Ps.AnnotationMode.DISABLE){_h$call=h(this,Mt).call(this),fe=_h$call.annotationStorage,Me=_h$call.downloadManager,kr=_h$call.enableScripting,rn=_h$call.fieldObjectsPromise,Oe=_h$call.hasJSActionsPromise,wi=_h$call.linkService;this._annotationCanvasMap||(this._annotationCanvasMap=new Map),this.annotationLayer=new ol.AnnotationLayerBuilder({pageDiv:Cr,pdfPage:Ih,annotationStorage:fe,imageResourcesPath:this.imageResourcesPath,renderForms:h(this,ot)===Ps.AnnotationMode.ENABLE_FORMS,linkService:wi,downloadManager:Me,l10n:$l,enableScripting:kr,hasJSActionsPromise:Oe,fieldObjectsPromise:rn,annotationCanvasMap:this._annotationCanvasMap,accessibilityManager:this._accessibilityManager})}$s=function $s(fe){if(Cl==null||Cl(!1),_this269.renderingQueue&&!_this269.renderingQueue.isHighestPriority(_this269)){_this269.renderingState=qe.RenderingStates.PAUSED,_this269.resume=function(){_this269.renderingState=qe.RenderingStates.RUNNING,fe()};return}fe()},Dr=Rh.width,Xi=Rh.height,Ke=document.createElement("canvas");Ke.setAttribute("role","presentation"),Ke.hidden=!0;ta=!!(_l!=null&&_l.background&&_l!=null&&_l.foreground);Cl=function(_Cl3){function Cl(_x104){return _Cl3.apply(this,arguments)}Cl.toString=function(){return _Cl3.toString()};return Cl}(function(fe){(!ta||fe)&&(Ke.hidden=!1,Cl=null)});Th.append(Ke),this.canvas=Ke;Oh=Ke.getContext("2d",{alpha:!1}),jh=this.outputScale=new qe.OutputScale;if(this.maxCanvasPixels===0){_fe5=1/this.scale;jh.sx*=_fe5,jh.sy*=_fe5,A(this,dt,!0)}else if(this.maxCanvasPixels>0){_fe6=Dr*Xi,_Me4=Math.sqrt(this.maxCanvasPixels/_fe6);jh.sx>_Me4||jh.sy>_Me4?(jh.sx=_Me4,jh.sy=_Me4,A(this,dt,!0)):A(this,dt,!1)}qh=(0,qe.approximateFraction)(jh.sx),Bh=(0,qe.approximateFraction)(jh.sy);Ke.width=(0,qe.roundToDivide)(Dr*jh.sx,qh[0]),Ke.height=(0,qe.roundToDivide)(Xi*jh.sy,Bh[0]);Jh=Ke.style;Jh.width=(0,qe.roundToDivide)(Dr,qh[1])+"px",Jh.height=(0,qe.roundToDivide)(Xi,Bh[1])+"px",h(this,re).set(Ke,Rh);Xh=jh.scaled?[jh.sx,0,0,jh.sy,0,0]:null,Qh={canvasContext:Oh,transform:Xh,viewport:Rh,annotationMode:h(this,ot),optionalContentConfigPromise:this._optionalContentConfigPromise,annotationCanvasMap:this._annotationCanvasMap,pageColors:_l},Kh=this.renderTask=this.pdfPage.render(Qh);Kh.onContinue=$s;ia=Kh.promise.then(_asyncToGenerator(_regeneratorRuntime().mark(function _callee118(){var fe,_h$call2,_Me5;return _regeneratorRuntime().wrap(function _callee118$(_context119){while(1)switch(_context119.prev=_context119.next){case 0:Cl==null||Cl(!0);_context119.next=3;return D(_this269,$e,_r).call(_this269,Kh);case 3:D(_this269,He,ro).call(_this269);_context119.t0=_this269.annotationLayer;if(!_context119.t0){_context119.next=8;break}_context119.next=8;return D(_this269,Bt,Wt).call(_this269);case 8:if(_this269.annotationEditorLayer){_context119.next=13;break}_h$call2=h(_this269,Mt).call(_this269),_Me5=_h$call2.annotationEditorUIManager;if(_Me5){_context119.next=12;break}return _context119.abrupt("return");case 12:_this269.annotationEditorLayer=new bl.AnnotationEditorLayerBuilder({uiManager:_Me5,pageDiv:Cr,pdfPage:Ih,l10n:$l,accessibilityManager:_this269._accessibilityManager,annotationLayer:(fe=_this269.annotationLayer)==null?void 0:fe.annotationLayer});case 13:D(_this269,oe,ve).call(_this269);case 14:case"end":return _context119.stop()}},_callee118)})),function(fe){return fe instanceof Ps.RenderingCancelledException||Cl==null||Cl(!0),D(_this269,$e,_r).call(_this269,Kh,fe)});if(Ih.isPureXfa){if(this.xfaLayer)this.xfaLayer.div&&Cr.append(this.xfaLayer.div);else{_h$call3=h(this,Mt).call(this),fe=_h$call3.annotationStorage,_Me6=_h$call3.linkService;this.xfaLayer=new pi.XfaLayerBuilder({pageDiv:Cr,pdfPage:Ih,annotationStorage:fe,linkService:_Me6})}D(this,_e,Xe).call(this)}return _context120.abrupt("return",(Cr.setAttribute("data-loaded",!0),this.eventBus.dispatch("pagerender",{source:this,pageNumber:this.id}),ia));case 23:case"end":return _context120.stop()}},_callee119,this)}));function draw(){return _draw.apply(this,arguments)}return draw}()},{key:"setPageLabel",value:function setPageLabel(Cr){this.pageLabel=typeof Cr=="string"?Cr:null,this.pageLabel!==null?this.div.setAttribute("data-page-label",this.pageLabel):this.div.removeAttribute("data-page-label")}},{key:"thumbnailCanvas",get:function get(){var _h7=h(this,ie),Cr=_h7.directDrawing,$l=_h7.initialOptionalContent,_l=_h7.regularAnnotations;return Cr&&$l&&_l?this.canvas:null}}]);return Es}();ot=new WeakMap,dt=new WeakMap,Mt=new WeakMap,Ot=new WeakMap,Qt=new WeakMap,Ut=new WeakMap,te=new WeakMap,qt=new WeakMap,ie=new WeakMap,re=new WeakMap,ne=new WeakSet,ae=function ae(){var nl=this.viewport;if(this.pdfPage){if(h(this,Qt)===nl.rotation)return;A(this,Qt,nl.rotation)}(0,Ps.setLayerDimensions)(this.div,nl,!0,!1)},Bt=new WeakSet,Wt=function(){var _ref182=_asyncToGenerator(_regeneratorRuntime().mark(function _callee120(){var nl;return _regeneratorRuntime().wrap(function _callee120$(_context121){while(1)switch(_context121.prev=_context121.next){case 0:nl=null;_context121.prev=1;_context121.next=4;return this.annotationLayer.render(this.viewport,"display");case 4:_context121.next=9;break;case 6:_context121.prev=6;_context121.t0=_context121["catch"](1);console.error("#renderAnnotationLayer: \"".concat(_context121.t0,"\".")),nl=_context121.t0;case 9:_context121.prev=9;this.eventBus.dispatch("annotationlayerrendered",{source:this,pageNumber:this.id,error:nl});return _context121.finish(9);case 12:case"end":return _context121.stop()}},_callee120,this,[[1,6,9,12]])}));return function Wt(){return _ref182.apply(this,arguments)}}(),oe=new WeakSet,ve=function(){var _ref183=_asyncToGenerator(_regeneratorRuntime().mark(function _callee121(){var nl;return _regeneratorRuntime().wrap(function _callee121$(_context122){while(1)switch(_context122.prev=_context122.next){case 0:nl=null;_context122.prev=1;_context122.next=4;return this.annotationEditorLayer.render(this.viewport,"display");case 4:_context122.next=9;break;case 6:_context122.prev=6;_context122.t0=_context122["catch"](1);console.error("#renderAnnotationEditorLayer: \"".concat(_context122.t0,"\".")),nl=_context122.t0;case 9:_context122.prev=9;this.eventBus.dispatch("annotationeditorlayerrendered",{source:this,pageNumber:this.id,error:nl});return _context122.finish(9);case 12:case"end":return _context122.stop()}},_callee121,this,[[1,6,9,12]])}));return function ve(){return _ref183.apply(this,arguments)}}(),_e=new WeakSet,Xe=function(){var _ref184=_asyncToGenerator(_regeneratorRuntime().mark(function _callee122(){var nl,Cr;return _regeneratorRuntime().wrap(function _callee122$(_context123){while(1)switch(_context123.prev=_context123.next){case 0:nl=null;_context123.prev=1;_context123.next=4;return this.xfaLayer.render(this.viewport,"display");case 4:Cr=_context123.sent;Cr!=null&&Cr.textDivs&&this._textHighlighter&&D(this,xr,pr).call(this,Cr.textDivs);_context123.next=11;break;case 8:_context123.prev=8;_context123.t0=_context123["catch"](1);console.error("#renderXfaLayer: \"".concat(_context123.t0,"\".")),nl=_context123.t0;case 11:_context123.prev=11;this.eventBus.dispatch("xfalayerrendered",{source:this,pageNumber:this.id,error:nl});return _context123.finish(11);case 14:case"end":return _context123.stop()}},_callee122,this,[[1,8,11,14]])}));return function Xe(){return _ref184.apply(this,arguments)}}(),He=new WeakSet,ro=function(){var _ref185=_asyncToGenerator(_regeneratorRuntime().mark(function _callee123(){var nl,Cr,$l,_l,Ih;return _regeneratorRuntime().wrap(function _callee123$(_context124){while(1)switch(_context124.prev=_context124.next){case 0:nl=this.pdfPage,Cr=this.textLayer,$l=this.viewport;if(Cr){_context124.next=3;break}return _context124.abrupt("return");case 3:_l=null;_context124.prev=4;if(!Cr.renderingDone){Ih=nl.streamTextContent({includeMarkedContent:!0,disableNormalization:!0});Cr.setTextContentSource(Ih)}_context124.next=8;return Cr.render($l);case 8:_context124.next=15;break;case 10:_context124.prev=10;_context124.t0=_context124["catch"](4);if(!(_context124.t0 instanceof Ps.AbortException)){_context124.next=14;break}return _context124.abrupt("return");case 14:console.error("#renderTextLayer: \"".concat(_context124.t0,"\".")),_l=_context124.t0;case 15:this.eventBus.dispatch("textlayerrendered",{source:this,pageNumber:this.id,numTextDivs:Cr.numTextDivs,error:_l}),D(this,Xo,Se).call(this);case 16:case"end":return _context124.stop()}},_callee123,this,[[4,10]])}));return function ro(){return _ref185.apply(this,arguments)}}(),Xo=new WeakSet,Se=function(){var _ref186=_asyncToGenerator(_regeneratorRuntime().mark(function _callee124(){var nl,Cr,$l,_l,Ih;return _regeneratorRuntime().wrap(function _callee124$(_context125){while(1)switch(_context125.prev=_context125.next){case 0:if(this.textLayer){_context125.next=2;break}return _context125.abrupt("return");case 2:this.structTreeLayer||(this.structTreeLayer=new se.StructTreeLayerBuilder);_context125.next=5;return this.structTreeLayer.renderingDone?null:this.pdfPage.getStructTree();case 5:_l=_context125.sent;Ih=(nl=this.structTreeLayer)==null?void 0:nl.render(_l);Ih&&((Cr=this.canvas)==null||Cr.append(Ih)),($l=this.structTreeLayer)==null||$l.show();case 8:case"end":return _context125.stop()}},_callee124,this)}));return function Se(){return _ref186.apply(this,arguments)}}(),xr=new WeakSet,pr=function(){var _ref187=_asyncToGenerator(_regeneratorRuntime().mark(function _callee125(nl){var Cr,$l,_iterator188,_step188,_l;return _regeneratorRuntime().wrap(function _callee125$(_context126){while(1)switch(_context126.prev=_context126.next){case 0:_context126.next=2;return this.pdfPage.getTextContent();case 2:Cr=_context126.sent;$l=[];_iterator188=_createForOfIteratorHelper(Cr.items);try{for(_iterator188.s();!(_step188=_iterator188.n()).done;){_l=_step188.value;$l.push(_l.str)}}catch(err){_iterator188.e(err)}finally{_iterator188.f()}this._textHighlighter.setTextMapping(nl,$l),this._textHighlighter.enable();case 7:case"end":return _context126.stop()}},_callee125,this)}));return function pr(_x105){return _ref187.apply(this,arguments)}}(),$e=new WeakSet,_r=function(){var _ref188=_asyncToGenerator(_regeneratorRuntime().mark(function _callee126(nl){var Cr,_args69=arguments;return _regeneratorRuntime().wrap(function _callee126$(_context127){while(1)switch(_context127.prev=_context127.next){case 0:Cr=_args69.length>1&&_args69[1]!==undefined?_args69[1]:null;if(!(nl===this.renderTask&&(this.renderTask=null),Cr instanceof Ps.RenderingCancelledException)){_context127.next=4;break}A(this,Ut,null);return _context127.abrupt("return");case 4:if(!(A(this,Ut,Cr),this.renderingState=qe.RenderingStates.FINISHED,this._resetZoomLayer(!0),h(this,ie).regularAnnotations=!nl.separateAnnots,this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:!1,timestamp:performance.now(),error:h(this,Ut)}),Cr)){_context127.next=6;break}throw Cr;case 6:case"end":return _context127.stop()}},_callee126,this)}));return function _r(_x106){return _ref188.apply(this,arguments)}}(),it.PDFPageView=Es},function(J,it,nt){var ot,dt;Object.defineProperty(it,"__esModule",{value:!0}),it.AnnotationEditorLayerBuilder=void 0;var Mt=nt(4),Ot=nt(7);var Qt=function(){function Qt(te){_classCallCheck(this,Qt);S(this,ot,null),S(this,dt,void 0),this.pageDiv=te.pageDiv,this.pdfPage=te.pdfPage,this.accessibilityManager=te.accessibilityManager,this.l10n=te.l10n||Ot.NullL10n,this.annotationEditorLayer=null,this.div=null,this._cancelled=!1,A(this,dt,te.uiManager),A(this,ot,te.annotationLayer||null)}_createClass(Qt,[{key:"render",value:function(){var _render3=_asyncToGenerator(_regeneratorRuntime().mark(function _callee127(te){var qt,ie,re,ne,_args70=arguments;return _regeneratorRuntime().wrap(function _callee127$(_context128){while(1)switch(_context128.prev=_context128.next){case 0:qt=_args70.length>1&&_args70[1]!==undefined?_args70[1]:"display";if(!(qt!=="display"||this._cancelled)){_context128.next=3;break}return _context128.abrupt("return");case 3:ie=te.clone({dontFlip:!0});if(!this.div){_context128.next=7;break}this.annotationEditorLayer.update({viewport:ie}),this.show();return _context128.abrupt("return");case 7:re=this.div=document.createElement("div");re.className="annotationEditorLayer",re.tabIndex=0,re.hidden=!0,re.dir=h(this,dt).direction,this.pageDiv.append(re),this.annotationEditorLayer=new Mt.AnnotationEditorLayer({uiManager:h(this,dt),div:re,accessibilityManager:this.accessibilityManager,pageIndex:this.pdfPage.pageNumber-1,l10n:this.l10n,viewport:ie,annotationLayer:h(this,ot)});ne={viewport:ie,div:re,annotations:null,intent:qt};this.annotationEditorLayer.render(ne),this.show();case 11:case"end":return _context128.stop()}},_callee127,this)}));function render(_x107){return _render3.apply(this,arguments)}return render}()},{key:"cancel",value:function cancel(){this._cancelled=!0,this.div&&(this.pageDiv=null,this.annotationEditorLayer.destroy(),this.div.remove())}},{key:"hide",value:function hide(){this.div&&(this.div.hidden=!0)}},{key:"show",value:function show(){!this.div||this.annotationEditorLayer.isEmpty||(this.div.hidden=!1)}}]);return Qt}();ot=new WeakMap,dt=new WeakMap,it.AnnotationEditorLayerBuilder=Qt},function(J,it){Object.defineProperty(it,"__esModule",{value:!0}),it.compatibilityParams=it.OptionKind=it.AppOptions=void 0;var nt=Object.create(null);it.compatibilityParams=nt;{var Qt=navigator.userAgent||"",Ut=navigator.platform||"",te=navigator.maxTouchPoints||1,qt=/Android/.test(Qt),ie=/\b(iPad|iPhone|iPod)(?=;)/.test(Qt)||Ut==="MacIntel"&&te>1;(function(){(ie||qt)&&(nt.maxCanvasPixels=5242880)})()}var ot={VIEWER:2,API:4,WORKER:8,PREFERENCE:128};it.OptionKind=ot;var dt={annotationEditorMode:{value:0,kind:ot.VIEWER+ot.PREFERENCE},annotationMode:{value:2,kind:ot.VIEWER+ot.PREFERENCE},cursorToolOnLoad:{value:0,kind:ot.VIEWER+ot.PREFERENCE},defaultZoomDelay:{value:400,kind:ot.VIEWER+ot.PREFERENCE},defaultZoomValue:{value:"",kind:ot.VIEWER+ot.PREFERENCE},disableHistory:{value:!1,kind:ot.VIEWER},disablePageLabels:{value:!1,kind:ot.VIEWER+ot.PREFERENCE},enablePermissions:{value:!1,kind:ot.VIEWER+ot.PREFERENCE},enablePrintAutoRotate:{value:!0,kind:ot.VIEWER+ot.PREFERENCE},enableScripting:{value:!0,kind:ot.VIEWER+ot.PREFERENCE},enableStampEditor:{value:!0,kind:ot.VIEWER+ot.PREFERENCE},externalLinkRel:{value:"noopener noreferrer nofollow",kind:ot.VIEWER},externalLinkTarget:{value:0,kind:ot.VIEWER+ot.PREFERENCE},historyUpdateUrl:{value:!1,kind:ot.VIEWER+ot.PREFERENCE},ignoreDestinationZoom:{value:!1,kind:ot.VIEWER+ot.PREFERENCE},imageResourcesPath:{value:"./images/",kind:ot.VIEWER},maxCanvasPixels:{value:16777216,kind:ot.VIEWER},forcePageColors:{value:!1,kind:ot.VIEWER+ot.PREFERENCE},pageColorsBackground:{value:"Canvas",kind:ot.VIEWER+ot.PREFERENCE},pageColorsForeground:{value:"CanvasText",kind:ot.VIEWER+ot.PREFERENCE},pdfBugEnabled:{value:!1,kind:ot.VIEWER+ot.PREFERENCE},printResolution:{value:150,kind:ot.VIEWER},sidebarViewOnLoad:{value:-1,kind:ot.VIEWER+ot.PREFERENCE},scrollModeOnLoad:{value:-1,kind:ot.VIEWER+ot.PREFERENCE},spreadModeOnLoad:{value:-1,kind:ot.VIEWER+ot.PREFERENCE},textLayerMode:{value:1,kind:ot.VIEWER+ot.PREFERENCE},viewerCssTheme:{value:0,kind:ot.VIEWER+ot.PREFERENCE},viewOnLoad:{value:0,kind:ot.VIEWER+ot.PREFERENCE},cMapPacked:{value:!0,kind:ot.API},cMapUrl:{value:"../web/cmaps/",kind:ot.API},disableAutoFetch:{value:!1,kind:ot.API+ot.PREFERENCE},disableFontFace:{value:!1,kind:ot.API+ot.PREFERENCE},disableRange:{value:!1,kind:ot.API+ot.PREFERENCE},disableStream:{value:!1,kind:ot.API+ot.PREFERENCE},docBaseUrl:{value:"",kind:ot.API},enableXfa:{value:!0,kind:ot.API+ot.PREFERENCE},fontExtraProperties:{value:!1,kind:ot.API},isEvalSupported:{value:!0,kind:ot.API},isOffscreenCanvasSupported:{value:!0,kind:ot.API},maxImageSize:{value:-1,kind:ot.API},pdfBug:{value:!1,kind:ot.API},standardFontDataUrl:{value:"../web/standard_fonts/",kind:ot.API},verbosity:{value:1,kind:ot.API},workerPort:{value:null,kind:ot.WORKER},workerSrc:{value:"../build/pdf.worker.js",kind:ot.WORKER}};dt.defaultUrl={value:"compressed.tracemonkey-pldi-09.pdf",kind:ot.VIEWER},dt.disablePreferences={value:!1,kind:ot.VIEWER},dt.locale={value:navigator.language||"en-US",kind:ot.VIEWER},dt.sandboxBundleSrc={value:"../build/pdf.sandbox.js",kind:ot.VIEWER};var Mt=Object.create(null);var Ot=function(){function Ot(){_classCallCheck(this,Ot);throw new Error("Cannot initialize AppOptions.")}_createClass(Ot,null,[{key:"get",value:function get(Ut){var _nt$Ut;var te=Mt[Ut];if(te!==void 0)return te;var qt=dt[Ut];if(qt!==void 0)return(_nt$Ut=nt[Ut])!==null&&_nt$Ut!==void 0?_nt$Ut:qt.value}},{key:"getAll",value:function getAll(){var Ut=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;var te=Object.create(null);for(var _qt3 in dt){var _nt$_qt;var _ie12=dt[_qt3];if(Ut){if(!(Ut&_ie12.kind))continue;if(Ut===ot.PREFERENCE){var ne=_ie12.value,ae=_typeof(ne);if(ae==="boolean"||ae==="string"||ae==="number"&&Number.isInteger(ne)){te[_qt3]=ne;continue}throw new Error("Invalid type for preference: ".concat(_qt3))}}var re=Mt[_qt3];te[_qt3]=re!==void 0?re:(_nt$_qt=nt[_qt3])!==null&&_nt$_qt!==void 0?_nt$_qt:_ie12.value}return te}},{key:"set",value:function set(Ut,te){Mt[Ut]=te}},{key:"setAll",value:function setAll(Ut){for(var _te5 in Ut)Mt[_te5]=Ut[_te5]}},{key:"remove",value:function remove(Ut){delete Mt[Ut]}}]);return Ot}();it.AppOptions=Ot,Ot._hasUserOptions=function(){return Object.keys(Mt).length>0}},function(J,it,nt){var ot,dt,Mt,Ot,_Qt4;Object.defineProperty(it,"__esModule",{value:!0}),it.StructTreeLayerBuilder=void 0;var Ut=nt(2);var te={Document:null,DocumentFragment:null,Part:"group",Sect:"group",Div:"group",Aside:"note",NonStruct:"none",P:null,H:"heading",Title:null,FENote:"note",Sub:"group",Lbl:null,Span:null,Em:null,Strong:null,Link:"link",Annot:"note",Form:"form",Ruby:null,RB:null,RT:null,RP:null,Warichu:null,WT:null,WP:null,L:"list",LI:"listitem",LBody:null,Table:"table",TR:"row",TH:"columnheader",TD:"cell",THead:"columnheader",TBody:null,TFoot:null,Caption:null,Figure:"figure",Formula:null,Artifact:null},qt=/^H(\d+)$/;var ie=function(){function ie(){_classCallCheck(this,ie);S(this,dt),S(this,Ot),S(this,ot,void 0)}_createClass(ie,[{key:"renderingDone",get:function get(){return h(this,ot)!==void 0}},{key:"render",value:function render(ne){if(h(this,ot)!==void 0)return h(this,ot);var ae=D(this,Ot,_Qt4).call(this,ne);return ae==null||ae.classList.add("structTree"),A(this,ot,ae)}},{key:"hide",value:function hide(){h(this,ot)&&!h(this,ot).hidden&&(h(this,ot).hidden=!0)}},{key:"show",value:function show(){var ne;(ne=h(this,ot))!=null&&ne.hidden&&(h(this,ot).hidden=!1)}}]);return ie}();ot=new WeakMap,dt=new WeakSet,Mt=function Mt(re,ne){var ae=re.alt,Bt=re.id,Wt=re.lang;ae!==void 0&&ne.setAttribute("aria-label",(0,Ut.removeNullCharacters)(ae)),Bt!==void 0&&ne.setAttribute("aria-owns",Bt),Wt!==void 0&&ne.setAttribute("lang",(0,Ut.removeNullCharacters)(Wt,!0))},Ot=new WeakSet,_Qt4=function Qt(re){if(!re)return null;var ne=document.createElement("span");if("role"in re){var ae=re.role,Bt=ae.match(qt);Bt?(ne.setAttribute("role","heading"),ne.setAttribute("aria-level",Bt[1])):te[ae]&&ne.setAttribute("role",te[ae])}if(D(this,dt,Mt).call(this,re,ne),re.children)if(re.children.length===1&&"id"in re.children[0])D(this,dt,Mt).call(this,re.children[0],ne);else{var _iterator189=_createForOfIteratorHelper(re.children),_step189;try{for(_iterator189.s();!(_step189=_iterator189.n()).done;){var _ae8=_step189.value;ne.append(D(this,Ot,_Qt4).call(this,_ae8))}}catch(err){_iterator189.e(err)}finally{_iterator189.f()}}return ne},it.StructTreeLayerBuilder=ie},function(J,it,nt){var ot,dt,Mt,Ot,Qt,Ut,te,qt;Object.defineProperty(it,"__esModule",{value:!0}),it.TextAccessibilityManager=void 0;var ie=nt(2);var re=function(){function km(){_classCallCheck(this,km);S(this,te),S(this,ot,!1),S(this,dt,null),S(this,Mt,new Map),S(this,Ot,new Map)}_createClass(km,[{key:"setTextMapping",value:function setTextMapping(Bt){A(this,dt,Bt)}},{key:"enable",value:function enable(){if(h(this,ot))throw new Error("TextAccessibilityManager is already enabled.");if(!h(this,dt))throw new Error("Text divs and strings have not been set.");if(A(this,ot,!0),A(this,dt,h(this,dt).slice()),h(this,dt).sort(D(km,Qt,Ut)),h(this,Mt).size>0){var Bt=h(this,dt);var _iterator190=_createForOfIteratorHelper(h(this,Mt)),_step190;try{for(_iterator190.s();!(_step190=_iterator190.n()).done;){var _step190$value=_slicedToArray(_step190.value,2),Wt=_step190$value[0],oe=_step190$value[1];if(!document.getElementById(Wt)){h(this,Mt)["delete"](Wt);continue}D(this,te,qt).call(this,Wt,Bt[oe])}}catch(err){_iterator190.e(err)}finally{_iterator190.f()}}var _iterator191=_createForOfIteratorHelper(h(this,Ot)),_step191;try{for(_iterator191.s();!(_step191=_iterator191.n()).done;){var _step191$value=_slicedToArray(_step191.value,2),_Bt7=_step191$value[0],_Wt5=_step191$value[1];this.addPointerInTextLayer(_Bt7,_Wt5)}}catch(err){_iterator191.e(err)}finally{_iterator191.f()}h(this,Ot).clear()}},{key:"disable",value:function disable(){h(this,ot)&&(h(this,Ot).clear(),A(this,dt,null),A(this,ot,!1))}},{key:"removePointerInTextLayer",value:function removePointerInTextLayer(Bt){if(!h(this,ot)){h(this,Ot)["delete"](Bt);return}var Wt=h(this,dt);if(!Wt||Wt.length===0)return;var oe=Bt.id,ve=h(this,Mt).get(oe);if(ve===void 0)return;var _e=Wt[ve];h(this,Mt)["delete"](oe);var Xe=_e.getAttribute("aria-owns");Xe!=null&&Xe.includes(oe)&&(Xe=Xe.split(" ").filter(function(He){return He!==oe}).join(" "),Xe?_e.setAttribute("aria-owns",Xe):(_e.removeAttribute("aria-owns"),_e.setAttribute("role","presentation")))}},{key:"addPointerInTextLayer",value:function addPointerInTextLayer(Bt,Wt){var oe=Bt.id;if(!oe)return null;if(!h(this,ot))return h(this,Ot).set(Bt,Wt),null;Wt&&this.removePointerInTextLayer(Bt);var ve=h(this,dt);if(!ve||ve.length===0)return null;var _e=(0,ie.binarySearchFirstItem)(ve,function(Xo){var Se;return D(Se=km,Qt,Ut).call(Se,Bt,Xo)<0}),Xe=Math.max(0,_e-1),He=ve[Xe];D(this,te,qt).call(this,oe,He),h(this,Mt).set(oe,Xe);var ro=He.parentNode;return ro!=null&&ro.classList.contains("markedContent")?ro.id:null}},{key:"moveElementInDOM",value:function moveElementInDOM(Bt,Wt,oe,ve){var _e=this.addPointerInTextLayer(oe,ve);if(!Bt.hasChildNodes())return Bt.append(Wt),_e;var Xe=Array.from(Bt.childNodes).filter(function(Xo){return Xo!==Wt});if(Xe.length===0)return _e;var He=oe||Wt,ro=(0,ie.binarySearchFirstItem)(Xe,function(Xo){var Se;return D(Se=km,Qt,Ut).call(Se,He,Xo)<0});return ro===0?Xe[0].before(Wt):Xe[ro-1].after(Wt),_e}}]);return km}();ot=new WeakMap,dt=new WeakMap,Mt=new WeakMap,Ot=new WeakMap,Qt=new WeakSet,Ut=function Ut(ae,Bt){var Wt=ae.getBoundingClientRect(),oe=Bt.getBoundingClientRect();if(Wt.width===0&&Wt.height===0)return 1;if(oe.width===0&&oe.height===0)return-1;var ve=Wt.y,_e=Wt.y+Wt.height,Xe=Wt.y+Wt.height/2,He=oe.y,ro=oe.y+oe.height,Xo=oe.y+oe.height/2;if(Xe<=He&&Xo>=_e)return-1;if(Xo<=ve&&Xe>=ro)return 1;var Se=Wt.x+Wt.width/2,xr=oe.x+oe.width/2;return Se-xr},te=new WeakSet,qt=function qt(ae,Bt){var Wt=Bt.getAttribute("aria-owns");Wt!=null&&Wt.includes(ae)||Bt.setAttribute("aria-owns",Wt?"".concat(Wt," ").concat(ae):ae),Bt.removeAttribute("role")},S(re,Qt);var ne=re;it.TextAccessibilityManager=ne},function(J,it){Object.defineProperty(it,"__esModule",{value:!0}),it.TextHighlighter=void 0;var nt=function(){function nt(_ref189){var dt=_ref189.findController,Mt=_ref189.eventBus,Ot=_ref189.pageIndex;_classCallCheck(this,nt);this.findController=dt,this.matches=[],this.eventBus=Mt,this.pageIdx=Ot,this._onUpdateTextLayerMatches=null,this.textDivs=null,this.textContentItemsStr=null,this.enabled=!1}_createClass(nt,[{key:"setTextMapping",value:function setTextMapping(dt,Mt){this.textDivs=dt,this.textContentItemsStr=Mt}},{key:"enable",value:function enable(){var _this270=this;if(!this.textDivs||!this.textContentItemsStr)throw new Error("Text divs and strings have not been set.");if(this.enabled)throw new Error("TextHighlighter is already enabled.");this.enabled=!0,this._onUpdateTextLayerMatches||(this._onUpdateTextLayerMatches=function(dt){(dt.pageIndex===_this270.pageIdx||dt.pageIndex===-1)&&_this270._updateMatches()},this.eventBus._on("updatetextlayermatches",this._onUpdateTextLayerMatches)),this._updateMatches()}},{key:"disable",value:function disable(){this.enabled&&(this.enabled=!1,this._onUpdateTextLayerMatches&&(this.eventBus._off("updatetextlayermatches",this._onUpdateTextLayerMatches),this._onUpdateTextLayerMatches=null),this._updateMatches(!0))}},{key:"_convertMatches",value:function _convertMatches(dt,Mt){if(!dt)return[];var Ot=this.textContentItemsStr;var Qt=0,Ut=0;var te=Ot.length-1,qt=[];for(var ie=0,re=dt.length;ie<re;ie++){var ne=dt[ie];for(;Qt!==te&&ne>=Ut+Ot[Qt].length;)Ut+=Ot[Qt].length,Qt++;Qt===Ot.length&&console.error("Could not find a matching mapping");var ae={begin:{divIdx:Qt,offset:ne-Ut}};for(ne+=Mt[ie];Qt!==te&&ne>Ut+Ot[Qt].length;)Ut+=Ot[Qt].length,Qt++;ae.end={divIdx:Qt,offset:ne-Ut},qt.push(ae)}return qt}},{key:"_renderMatches",value:function _renderMatches(dt){if(dt.length===0)return;var Mt=this.findController,Ot=this.pageIdx,Qt=this.textContentItemsStr,Ut=this.textDivs,te=Ot===Mt.selected.pageIdx,qt=Mt.selected.matchIdx,ie=Mt.state.highlightAll;var re=null;var ne={divIdx:-1,offset:void 0};function ae(Xe,He){var ro=Xe.divIdx;return Ut[ro].textContent="",Bt(ro,0,Xe.offset,He)}function Bt(Xe,He,ro,Xo){var Se=Ut[Xe];if(Se.nodeType===Node.TEXT_NODE){var $e=document.createElement("span");Se.before($e),$e.append(Se),Ut[Xe]=$e,Se=$e}var xr=Qt[Xe].substring(He,ro),pr=document.createTextNode(xr);if(Xo){var _$e2=document.createElement("span");return _$e2.className="".concat(Xo," appended"),_$e2.append(pr),Se.append(_$e2),Xo.includes("selected")?_$e2.offsetLeft:0}return Se.append(pr),0}var Wt=qt,oe=Wt+1;if(ie)Wt=0,oe=dt.length;else if(!te)return;var ve=-1,_e=-1;for(var Xe=Wt;Xe<oe;Xe++){var He=dt[Xe],ro=He.begin;if(ro.divIdx===ve&&ro.offset===_e)continue;ve=ro.divIdx,_e=ro.offset;var Xo=He.end,Se=te&&Xe===qt,xr=Se?" selected":"";var pr=0;if(!re||ro.divIdx!==re.divIdx?(re!==null&&Bt(re.divIdx,re.offset,ne.offset),ae(ro)):Bt(re.divIdx,re.offset,ro.offset),ro.divIdx===Xo.divIdx)pr=Bt(ro.divIdx,ro.offset,Xo.offset,"highlight"+xr);else{pr=Bt(ro.divIdx,ro.offset,ne.offset,"highlight begin"+xr);for(var $e=ro.divIdx+1,_r=Xo.divIdx;$e<_r;$e++)Ut[$e].className="highlight middle"+xr;ae(Xo,"highlight end"+xr)}re=Xo,Se&&Mt.scrollMatchIntoView({element:Ut[ro.divIdx],selectedLeft:pr,pageIndex:Ot,matchIndex:qt})}re&&Bt(re.divIdx,re.offset,ne.offset)}},{key:"_updateMatches",value:function _updateMatches(){var dt=arguments.length>0&&arguments[0]!==undefined?arguments[0]:!1;if(!this.enabled&&!dt)return;var Mt=this.findController,Ot=this.matches,Qt=this.pageIdx,Ut=this.textContentItemsStr,te=this.textDivs;var qt=-1;var _iterator192=_createForOfIteratorHelper(Ot),_step192;try{for(_iterator192.s();!(_step192=_iterator192.n()).done;){var ne=_step192.value;var ae=Math.max(qt,ne.begin.divIdx);for(var Bt=ae,Wt=ne.end.divIdx;Bt<=Wt;Bt++){var oe=te[Bt];oe.textContent=Ut[Bt],oe.className=""}qt=ne.end.divIdx+1}}catch(err){_iterator192.e(err)}finally{_iterator192.f()}if(!(Mt!=null&&Mt.highlightMatches)||dt)return;var ie=Mt.pageMatches[Qt]||null,re=Mt.pageMatchesLength[Qt]||null;this.matches=this._convertMatches(ie,re),this._renderMatches(this.matches)}}]);return nt}();it.TextHighlighter=nt},function(J,it,nt){var ot,dt,Mt,Ot,Qt,Ut,te,qt;Object.defineProperty(it,"__esModule",{value:!0}),it.TextLayerBuilder=void 0;var ie=nt(4),re=nt(2);var ne=function(){function ne(_ref190){var _ref190$highlighter=_ref190.highlighter,Bt=_ref190$highlighter===void 0?null:_ref190$highlighter,_ref190$accessibility=_ref190.accessibilityManager,Wt=_ref190$accessibility===void 0?null:_ref190$accessibility,_ref190$isOffscreenCa=_ref190.isOffscreenCanvasSupported,oe=_ref190$isOffscreenCa===void 0?!0:_ref190$isOffscreenCa,_ref190$enablePermiss=_ref190.enablePermissions,ve=_ref190$enablePermiss===void 0?!1:_ref190$enablePermiss;_classCallCheck(this,ne);S(this,Qt),S(this,te),S(this,ot,!1),S(this,dt,0),S(this,Mt,0),S(this,Ot,null),this.textContentItemsStr=[],this.renderingDone=!1,this.textDivs=[],this.textDivProperties=new WeakMap,this.textLayerRenderTask=null,this.highlighter=Bt,this.accessibilityManager=Wt,this.isOffscreenCanvasSupported=oe,A(this,ot,ve===!0),this.div=document.createElement("div"),this.div.className="textLayer",this.hide()}_createClass(ne,[{key:"numTextDivs",get:function get(){return this.textDivs.length}},{key:"render",value:function(){var _render4=_asyncToGenerator(_regeneratorRuntime().mark(function _callee128(Bt){var Wt,oe,ve,_e,Xe,He,ro;return _regeneratorRuntime().wrap(function _callee128$(_context129){while(1)switch(_context129.prev=_context129.next){case 0:if(h(this,Ot)){_context129.next=2;break}throw new Error("No \"textContentSource\" parameter specified.");case 2:_e=Bt.scale*(globalThis.devicePixelRatio||1),Xe=Bt.rotation;if(!this.renderingDone){_context129.next=7;break}He=Xe!==h(this,dt),ro=_e!==h(this,Mt);(He||ro)&&(this.hide(),(0,ie.updateTextLayer)({container:this.div,viewport:Bt,textDivs:this.textDivs,textDivProperties:this.textDivProperties,isOffscreenCanvasSupported:this.isOffscreenCanvasSupported,mustRescale:ro,mustRotate:He}),A(this,Mt,_e),A(this,dt,Xe)),this.show();return _context129.abrupt("return");case 7:this.cancel();(Wt=this.highlighter)==null||Wt.setTextMapping(this.textDivs,this.textContentItemsStr);(oe=this.accessibilityManager)==null||oe.setTextMapping(this.textDivs);this.textLayerRenderTask=(0,ie.renderTextLayer)({textContentSource:h(this,Ot),container:this.div,viewport:Bt,textDivs:this.textDivs,textDivProperties:this.textDivProperties,textContentItemsStr:this.textContentItemsStr,isOffscreenCanvasSupported:this.isOffscreenCanvasSupported});_context129.next=13;return this.textLayerRenderTask.promise;case 13:D(this,Qt,Ut).call(this);A(this,Mt,_e);A(this,dt,Xe);this.show();(ve=this.accessibilityManager)==null||ve.enable();case 18:case"end":return _context129.stop()}},_callee128,this)}));function render(_x108){return _render4.apply(this,arguments)}return render}()},{key:"hide",value:function hide(){var Bt;this.div.hidden||((Bt=this.highlighter)==null||Bt.disable(),this.div.hidden=!0)}},{key:"show",value:function show(){var Bt;this.div.hidden&&this.renderingDone&&(this.div.hidden=!1,(Bt=this.highlighter)==null||Bt.enable())}},{key:"cancel",value:function cancel(){var Bt,Wt;this.textLayerRenderTask&&(this.textLayerRenderTask.cancel(),this.textLayerRenderTask=null),(Bt=this.highlighter)==null||Bt.disable(),(Wt=this.accessibilityManager)==null||Wt.disable(),this.textContentItemsStr.length=0,this.textDivs.length=0,this.textDivProperties=new WeakMap}},{key:"setTextContentSource",value:function setTextContentSource(Bt){this.cancel(),A(this,Ot,Bt)}}]);return ne}();ot=new WeakMap,dt=new WeakMap,Mt=new WeakMap,Ot=new WeakMap,Qt=new WeakSet,Ut=function Ut(){this.renderingDone=!0;var ae=document.createElement("div");ae.className="endOfContent",this.div.append(ae),D(this,te,qt).call(this)},te=new WeakSet,qt=function qt(){var _this271=this;var ae=this.div;ae.addEventListener("mousedown",function(Bt){var Wt=ae.querySelector(".endOfContent");if(!Wt)return;var oe=Bt.target!==ae;if(oe&&(oe=getComputedStyle(Wt).getPropertyValue("-moz-user-select")!=="none"),oe){var ve=ae.getBoundingClientRect(),_e=Math.max(0,(Bt.pageY-ve.top)/ve.height);Wt.style.top=(_e*100).toFixed(2)+"%"}Wt.classList.add("active")}),ae.addEventListener("mouseup",function(){var Bt=ae.querySelector(".endOfContent");Bt&&(Bt.style.top="",Bt.classList.remove("active"))}),ae.addEventListener("copy",function(Bt){if(!h(_this271,ot)){var Wt=document.getSelection();Bt.clipboardData.setData("text/plain",(0,re.removeNullCharacters)((0,ie.normalizeUnicode)(Wt.toString())))}Bt.preventDefault(),Bt.stopPropagation()})},it.TextLayerBuilder=ne},function(J,it,nt){Object.defineProperty(it,"__esModule",{value:!0}),it.XfaLayerBuilder=void 0;var ot=nt(4);var dt=function(){function dt(_ref191){var Ot=_ref191.pageDiv,Qt=_ref191.pdfPage,_ref191$annotationSto=_ref191.annotationStorage,Ut=_ref191$annotationSto===void 0?null:_ref191$annotationSto,te=_ref191.linkService,_ref191$xfaHtml=_ref191.xfaHtml,qt=_ref191$xfaHtml===void 0?null:_ref191$xfaHtml;_classCallCheck(this,dt);this.pageDiv=Ot,this.pdfPage=Qt,this.annotationStorage=Ut,this.linkService=te,this.xfaHtml=qt,this.div=null,this._cancelled=!1}_createClass(dt,[{key:"render",value:function(){var _render5=_asyncToGenerator(_regeneratorRuntime().mark(function _callee129(Ot){var Qt,qt,ie,Ut,te,_args72=arguments;return _regeneratorRuntime().wrap(function _callee129$(_context130){while(1)switch(_context130.prev=_context130.next){case 0:Qt=_args72.length>1&&_args72[1]!==undefined?_args72[1]:"display";if(!(Qt==="print")){_context130.next=4;break}qt={viewport:Ot.clone({dontFlip:!0}),div:this.div,xfaHtml:this.xfaHtml,annotationStorage:this.annotationStorage,linkService:this.linkService,intent:Qt},ie=document.createElement("div");return _context130.abrupt("return",(this.pageDiv.append(ie),qt.div=ie,ot.XfaLayer.render(qt)));case 4:_context130.next=6;return this.pdfPage.getXfa();case 6:Ut=_context130.sent;if(!(this._cancelled||!Ut)){_context130.next=9;break}return _context130.abrupt("return",{textDivs:[]});case 9:te={viewport:Ot.clone({dontFlip:!0}),div:this.div,xfaHtml:Ut,annotationStorage:this.annotationStorage,linkService:this.linkService,intent:Qt};return _context130.abrupt("return",this.div?ot.XfaLayer.update(te):(this.div=document.createElement("div"),this.pageDiv.append(this.div),te.div=this.div,ot.XfaLayer.render(te)));case 11:case"end":return _context130.stop()}},_callee129,this)}));function render(_x109){return _render5.apply(this,arguments)}return render}()},{key:"cancel",value:function cancel(){this._cancelled=!0}},{key:"hide",value:function hide(){this.div&&(this.div.hidden=!0)}}]);return dt}();it.XfaLayerBuilder=dt},function(J,it,nt){Object.defineProperty(it,"__esModule",{value:!0}),it.PDFScriptingManager=void 0;var ot=nt(22),dt=nt(23);var Mt=function(_dt$PDFScriptingManag){_inherits(Mt,_dt$PDFScriptingManag);function Mt(Qt){var _this272;_classCallCheck(this,Mt);Qt.externalServices||window.addEventListener("updatefromsandbox",function(Ut){Qt.eventBus.dispatch("updatefromsandbox",{source:window,detail:Ut.detail})}),Qt.externalServices||(Qt.externalServices={createScripting:function createScripting(_ref192){var Ut=_ref192.sandboxBundleSrc;return new ot.GenericScripting(Ut)}}),Qt.docProperties||(Qt.docProperties=function(Ut){return(0,ot.docProperties)(Ut)}),_this272=_callSuper(this,Mt,[Qt]);return _this272}return _createClass(Mt)}(dt.PDFScriptingManager);it.PDFScriptingManager=Mt},function(J,it,nt){Object.defineProperty(it,"__esModule",{value:!0}),it.GenericScripting=void 0,it.docProperties=dt;var ot=nt(4);function dt(_x110){return _dt7.apply(this,arguments)}function _dt7(){_dt7=_asyncToGenerator(_regeneratorRuntime().mark(function _callee133(Ot){var Qt,Ut,_yield$Ot$getMetadata,te,qt,ie,re,_yield$Ot$getDownload,ne;return _regeneratorRuntime().wrap(function _callee133$(_context134){while(1)switch(_context134.prev=_context134.next){case 0:Qt="",Ut=Qt.split("#")[0];_context134.next=3;return Ot.getMetadata();case 3:_yield$Ot$getMetadata=_context134.sent;te=_yield$Ot$getMetadata.info;qt=_yield$Ot$getMetadata.metadata;ie=_yield$Ot$getMetadata.contentDispositionFilename;re=_yield$Ot$getMetadata.contentLength;if(re){_context134.next=14;break}_context134.next=11;return Ot.getDownloadInfo();case 11:_yield$Ot$getDownload=_context134.sent;ne=_yield$Ot$getDownload.length;re=ne;case 14:return _context134.abrupt("return",_objectSpread(_objectSpread({},te),{},{baseURL:Ut,filesize:re,filename:ie||(0,ot.getPdfFilenameFromUrl)(Qt),metadata:qt==null?void 0:qt.getRaw(),authors:qt==null?void 0:qt.get("dc:creator"),numPages:Ot.numPages,URL:Qt}));case 15:case"end":return _context134.stop()}},_callee133)}));return _dt7.apply(this,arguments)}var Mt=function(){function Mt(Qt){_classCallCheck(this,Mt);this._ready=(0,ot.loadScript)(Qt,!0).then(function(){return window.pdfjsSandbox.QuickJSSandbox()})}_createClass(Mt,[{key:"createSandbox",value:function(){var _createSandbox=_asyncToGenerator(_regeneratorRuntime().mark(function _callee130(Qt){return _regeneratorRuntime().wrap(function _callee130$(_context131){while(1)switch(_context131.prev=_context131.next){case 0:_context131.next=2;return this._ready;case 2:_context131.sent.create(Qt);case 3:case"end":return _context131.stop()}},_callee130,this)}));function createSandbox(_x111){return _createSandbox.apply(this,arguments)}return createSandbox}()},{key:"dispatchEventInSandbox",value:function(){var _dispatchEventInSandbox=_asyncToGenerator(_regeneratorRuntime().mark(function _callee131(Qt){var Ut;return _regeneratorRuntime().wrap(function _callee131$(_context132){while(1)switch(_context132.prev=_context132.next){case 0:_context132.next=2;return this._ready;case 2:Ut=_context132.sent;setTimeout(function(){return Ut.dispatchEvent(Qt)},0);case 4:case"end":return _context132.stop()}},_callee131,this)}));function dispatchEventInSandbox(_x112){return _dispatchEventInSandbox.apply(this,arguments)}return dispatchEventInSandbox}()},{key:"destroySandbox",value:function(){var _destroySandbox=_asyncToGenerator(_regeneratorRuntime().mark(function _callee132(){return _regeneratorRuntime().wrap(function _callee132$(_context133){while(1)switch(_context133.prev=_context133.next){case 0:_context133.next=2;return this._ready;case 2:_context133.sent.nukeSandbox();case 3:case"end":return _context133.stop()}},_callee132,this)}));function destroySandbox(){return _destroySandbox.apply(this,arguments)}return destroySandbox}()}]);return Mt}();it.GenericScripting=Mt},function(J,it,nt){var ot,dt,Mt,Ot,Qt,Ut,te,qt,ie,re,ne,ae,Bt,Wt,oe,ve,_e,Xe,He,ro,Xo;Object.defineProperty(it,"__esModule",{value:!0}),it.PDFScriptingManager=void 0;var Se=nt(2),xr=nt(4);var pr=function(){function pr(_ref193){var _r=_ref193.eventBus,_ref193$sandboxBundle=_ref193.sandboxBundleSrc,Ps=_ref193$sandboxBundle===void 0?null:_ref193$sandboxBundle,_ref193$externalServi=_ref193.externalServices,qe=_ref193$externalServi===void 0?null:_ref193$externalServi,_ref193$docProperties=_ref193.docProperties,bl=_ref193$docProperties===void 0?null:_ref193$docProperties;_classCallCheck(this,pr);S(this,ae),S(this,Wt),S(this,ve),S(this,Xe),S(this,ro),S(this,ot,null),S(this,dt,null),S(this,Mt,null),S(this,Ot,null),S(this,Qt,null),S(this,Ut,null),S(this,te,null),S(this,qt,!1),S(this,ie,null),S(this,re,null),S(this,ne,null),A(this,Ot,_r),A(this,ie,Ps),A(this,Qt,qe),A(this,Mt,bl)}_createClass(pr,[{key:"setViewer",value:function setViewer(_r){A(this,te,_r)}},{key:"setDocument",value:function(){var _setDocument=_asyncToGenerator(_regeneratorRuntime().mark(function _callee135(_r){var _this273=this;var Ps,_yield$Promise$all3,_yield$Promise$all4,qe,bl,ol,_iterator193,_step193,_step193$value,_Te3,pe,Te;return _regeneratorRuntime().wrap(function _callee135$(_context136){while(1)switch(_context136.prev=_context136.next){case 0:_context136.t0=h(this,Ut);if(!_context136.t0){_context136.next=4;break}_context136.next=4;return D(this,ro,Xo).call(this);case 4:A(this,Ut,_r);if(_r){_context136.next=7;break}return _context136.abrupt("return");case 7:_context136.next=9;return Promise.all([_r.getFieldObjects(),_r.getCalculationOrderIds(),_r.getJSActions()]);case 9:_yield$Promise$all3=_context136.sent;_yield$Promise$all4=_slicedToArray(_yield$Promise$all3,3);qe=_yield$Promise$all4[0];bl=_yield$Promise$all4[1];ol=_yield$Promise$all4[2];if(!(!qe&&!ol)){_context136.next=18;break}_context136.next=17;return D(this,ro,Xo).call(this);case 17:return _context136.abrupt("return");case 18:if(!(_r===h(this,Ut))){_context136.next=54;break}_context136.prev=19;A(this,re,D(this,Xe,He).call(this));_context136.next=29;break;case 23:_context136.prev=23;_context136.t1=_context136["catch"](19);console.error("setDocument: \"".concat(_context136.t1.message,"\"."));_context136.next=28;return D(this,ro,Xo).call(this);case 28:return _context136.abrupt("return");case 29:this._internalEvents.set("updatefromsandbox",function(Te){(Te==null?void 0:Te.source)===window&&D(_this273,ae,Bt).call(_this273,Te.detail)}),this._internalEvents.set("dispatcheventinsandbox",function(Te){var pe;(pe=h(_this273,re))==null||pe.dispatchEventInSandbox(Te.detail)}),this._internalEvents.set("pagechanging",function(_ref194){var Te=_ref194.pageNumber,pe=_ref194.previous;Te!==pe&&(D(_this273,ve,_e).call(_this273,pe),D(_this273,Wt,oe).call(_this273,Te))}),this._internalEvents.set("pagerendered",function(_ref195){var Te=_ref195.pageNumber;_this273._pageOpenPending.has(Te)&&Te===h(_this273,te).currentPageNumber&&D(_this273,Wt,oe).call(_this273,Te)}),this._internalEvents.set("pagesdestroy",_asyncToGenerator(_regeneratorRuntime().mark(function _callee134(){var Te,pe;return _regeneratorRuntime().wrap(function _callee134$(_context135){while(1)switch(_context135.prev=_context135.next){case 0:_context135.next=2;return D(_this273,ve,_e).call(_this273,h(_this273,te).currentPageNumber);case 2:_context135.next=4;return(Te=h(_this273,re))==null?void 0:Te.dispatchEventInSandbox({id:"doc",name:"WillClose"});case 4:(pe=h(_this273,ot))==null||pe.resolve();case 5:case"end":return _context135.stop()}},_callee134)})));_iterator193=_createForOfIteratorHelper(this._internalEvents);try{for(_iterator193.s();!(_step193=_iterator193.n()).done;){_step193$value=_slicedToArray(_step193.value,2),_Te3=_step193$value[0],pe=_step193$value[1];h(this,Ot)._on(_Te3,pe)}}catch(err){_iterator193.e(err)}finally{_iterator193.f()}_context136.prev=32;_context136.next=35;return h(this,Mt).call(this,_r);case 35:Te=_context136.sent;if(!(_r!==h(this,Ut))){_context136.next=38;break}return _context136.abrupt("return");case 38:_context136.next=40;return h(this,re).createSandbox({objects:qe,calculationOrder:bl,appInfo:{platform:navigator.platform,language:navigator.language},docInfo:_objectSpread(_objectSpread({},Te),{},{actions:ol})});case 40:h(this,Ot).dispatch("sandboxcreated",{source:this});_context136.next=49;break;case 43:_context136.prev=43;_context136.t2=_context136["catch"](32);console.error("setDocument: \"".concat(_context136.t2.message,"\"."));_context136.next=48;return D(this,ro,Xo).call(this);case 48:return _context136.abrupt("return");case 49:_context136.next=51;return(Ps=h(this,re))==null?void 0:Ps.dispatchEventInSandbox({id:"doc",name:"Open"});case 51:_context136.next=53;return D(this,Wt,oe).call(this,h(this,te).currentPageNumber,!0);case 53:Promise.resolve().then(function(){_r===h(_this273,Ut)&&A(_this273,qt,!0)});case 54:case"end":return _context136.stop()}},_callee135,this,[[19,23],[32,43]])}));function setDocument(_x113){return _setDocument.apply(this,arguments)}return setDocument}()},{key:"dispatchWillSave",value:function(){var _dispatchWillSave=_asyncToGenerator(_regeneratorRuntime().mark(function _callee136(){var _r;return _regeneratorRuntime().wrap(function _callee136$(_context137){while(1)switch(_context137.prev=_context137.next){case 0:return _context137.abrupt("return",(_r=h(this,re))==null?void 0:_r.dispatchEventInSandbox({id:"doc",name:"WillSave"}));case 1:case"end":return _context137.stop()}},_callee136,this)}));function dispatchWillSave(){return _dispatchWillSave.apply(this,arguments)}return dispatchWillSave}()},{key:"dispatchDidSave",value:function(){var _dispatchDidSave=_asyncToGenerator(_regeneratorRuntime().mark(function _callee137(){var _r;return _regeneratorRuntime().wrap(function _callee137$(_context138){while(1)switch(_context138.prev=_context138.next){case 0:return _context138.abrupt("return",(_r=h(this,re))==null?void 0:_r.dispatchEventInSandbox({id:"doc",name:"DidSave"}));case 1:case"end":return _context138.stop()}},_callee137,this)}));function dispatchDidSave(){return _dispatchDidSave.apply(this,arguments)}return dispatchDidSave}()},{key:"dispatchWillPrint",value:function(){var _dispatchWillPrint=_asyncToGenerator(_regeneratorRuntime().mark(function _callee138(){var _r;return _regeneratorRuntime().wrap(function _callee138$(_context139){while(1)switch(_context139.prev=_context139.next){case 0:if(!h(this,re)){_context139.next=14;break}_context139.next=3;return(_r=h(this,ne))==null?void 0:_r.promise;case 3:A(this,ne,new xr.PromiseCapability);_context139.prev=4;_context139.next=7;return h(this,re).dispatchEventInSandbox({id:"doc",name:"WillPrint"});case 7:_context139.next=12;break;case 9:_context139.prev=9;_context139.t0=_context139["catch"](4);throw h(this,ne).resolve(),A(this,ne,null),_context139.t0;case 12:_context139.next=14;return h(this,ne).promise;case 14:case"end":return _context139.stop()}},_callee138,this,[[4,9]])}));function dispatchWillPrint(){return _dispatchWillPrint.apply(this,arguments)}return dispatchWillPrint}()},{key:"dispatchDidPrint",value:function(){var _dispatchDidPrint=_asyncToGenerator(_regeneratorRuntime().mark(function _callee139(){var _r;return _regeneratorRuntime().wrap(function _callee139$(_context140){while(1)switch(_context140.prev=_context140.next){case 0:return _context140.abrupt("return",(_r=h(this,re))==null?void 0:_r.dispatchEventInSandbox({id:"doc",name:"DidPrint"}));case 1:case"end":return _context140.stop()}},_callee139,this)}));function dispatchDidPrint(){return _dispatchDidPrint.apply(this,arguments)}return dispatchDidPrint}()},{key:"destroyPromise",get:function get(){var _r;return((_r=h(this,dt))==null?void 0:_r.promise)||null}},{key:"ready",get:function get(){return h(this,qt)}},{key:"_internalEvents",get:function get(){return(0,xr.shadow)(this,"_internalEvents",new Map)}},{key:"_pageOpenPending",get:function get(){return(0,xr.shadow)(this,"_pageOpenPending",new Set)}},{key:"_visitedPages",get:function get(){return(0,xr.shadow)(this,"_visitedPages",new Map)}}]);return pr}();ot=new WeakMap,dt=new WeakMap,Mt=new WeakMap,Ot=new WeakMap,Qt=new WeakMap,Ut=new WeakMap,te=new WeakMap,qt=new WeakMap,ie=new WeakMap,re=new WeakMap,ne=new WeakMap,ae=new WeakSet,Bt=function(){var _ref197=_asyncToGenerator(_regeneratorRuntime().mark(function _callee140($e){var _r,Ps,qe,bl,ol,Te,pe,ue,be,se,_iterator194,_step194,_be2,Ae;return _regeneratorRuntime().wrap(function _callee140$(_context141){while(1)switch(_context141.prev=_context141.next){case 0:qe=h(this,te),bl=qe.isInPresentationMode||qe.isChangingPresentationMode,ol=$e.id,Te=$e.siblings,pe=$e.command,ue=$e.value;if(ol){_context141.next=38;break}_context141.t0=pe;_context141.next=_context141.t0==="clear"?5:_context141.t0==="error"?7:_context141.t0==="layout"?9:_context141.t0==="page-num"?11:_context141.t0==="print"?13:_context141.t0==="println"?17:_context141.t0==="zoom"?19:_context141.t0==="SaveAs"?21:_context141.t0==="FirstPage"?23:_context141.t0==="LastPage"?25:_context141.t0==="NextPage"?27:_context141.t0==="PrevPage"?29:_context141.t0==="ZoomViewIn"?31:_context141.t0==="ZoomViewOut"?33:_context141.t0==="WillPrintFinished"?35:37;break;case 5:console.clear();return _context141.abrupt("break",37);case 7:console.error(ue);return _context141.abrupt("break",37);case 9:if(!bl){be=(0,Se.apiPageLayoutToViewerModes)(ue);qe.spreadMode=be.spreadMode}return _context141.abrupt("break",37);case 11:qe.currentPageNumber=ue+1;return _context141.abrupt("break",37);case 13:_context141.next=15;return qe.pagesPromise;case 15:h(this,Ot).dispatch("print",{source:this});return _context141.abrupt("break",37);case 17:console.log(ue);return _context141.abrupt("break",37);case 19:bl||(qe.currentScaleValue=ue);return _context141.abrupt("break",37);case 21:h(this,Ot).dispatch("download",{source:this});return _context141.abrupt("break",37);case 23:qe.currentPageNumber=1;return _context141.abrupt("break",37);case 25:qe.currentPageNumber=qe.pagesCount;return _context141.abrupt("break",37);case 27:qe.nextPage();return _context141.abrupt("break",37);case 29:qe.previousPage();return _context141.abrupt("break",37);case 31:bl||qe.increaseScale();return _context141.abrupt("break",37);case 33:bl||qe.decreaseScale();return _context141.abrupt("break",37);case 35:(_r=h(this,ne))==null||_r.resolve(),A(this,ne,null);return _context141.abrupt("break",37);case 37:return _context141.abrupt("return");case 38:if(!(bl&&$e.focus)){_context141.next=40;break}return _context141.abrupt("return");case 40:delete $e.id,delete $e.siblings;se=Te?[ol].concat(_toConsumableArray(Te)):[ol];_iterator194=_createForOfIteratorHelper(se);try{for(_iterator194.s();!(_step194=_iterator194.n()).done;){_be2=_step194.value;Ae=document.querySelector("[data-element-id=\"".concat(_be2,"\"]"));Ae?Ae.dispatchEvent(new CustomEvent("updatefromsandbox",{detail:$e})):(Ps=h(this,Ut))==null||Ps.annotationStorage.setValue(_be2,$e)}}catch(err){_iterator194.e(err)}finally{_iterator194.f()}case 44:case"end":return _context141.stop()}},_callee140,this)}));return function Bt(_x114){return _ref197.apply(this,arguments)}}(),Wt=new WeakSet,oe=function(){var _ref198=_asyncToGenerator(_regeneratorRuntime().mark(function _callee142($e){var _this274=this;var _r,Ps,qe,bl,ol,_args85=arguments;return _regeneratorRuntime().wrap(function _callee142$(_context143){while(1)switch(_context143.prev=_context143.next){case 0:_r=_args85.length>1&&_args85[1]!==undefined?_args85[1]:!1;Ps=h(this,Ut),qe=this._visitedPages;if(!(_r&&A(this,ot,new xr.PromiseCapability),!h(this,ot))){_context143.next=4;break}return _context143.abrupt("return");case 4:bl=h(this,te).getPageView($e-1);if(!((bl==null?void 0:bl.renderingState)!==Se.RenderingStates.FINISHED)){_context143.next=8;break}this._pageOpenPending.add($e);return _context143.abrupt("return");case 8:this._pageOpenPending["delete"]($e);ol=_asyncToGenerator(_regeneratorRuntime().mark(function _callee141(){var Te,pe,ue;return _regeneratorRuntime().wrap(function _callee141$(_context142){while(1)switch(_context142.prev=_context142.next){case 0:_context142.next=2;return qe.has($e)?null:(Te=bl.pdfPage)==null?void 0:Te.getJSActions();case 2:ue=_context142.sent;_context142.t0=Ps===h(_this274,Ut);if(!_context142.t0){_context142.next=7;break}_context142.next=7;return(pe=h(_this274,re))==null?void 0:pe.dispatchEventInSandbox({id:"page",name:"PageOpen",pageNumber:$e,actions:ue});case 7:case"end":return _context142.stop()}},_callee141)}))();qe.set($e,ol);case 11:case"end":return _context143.stop()}},_callee142,this)}));return function oe(_x115){return _ref198.apply(this,arguments)}}(),ve=new WeakSet,_e=function(){var _ref200=_asyncToGenerator(_regeneratorRuntime().mark(function _callee143($e){var _r,Ps,qe,bl;return _regeneratorRuntime().wrap(function _callee143$(_context144){while(1)switch(_context144.prev=_context144.next){case 0:Ps=h(this,Ut),qe=this._visitedPages;if(!(!h(this,ot)||this._pageOpenPending.has($e))){_context144.next=3;break}return _context144.abrupt("return");case 3:bl=qe.get($e);_context144.t0=bl;if(!_context144.t0){_context144.next=13;break}qe.set($e,null);_context144.next=9;return bl;case 9:_context144.t1=Ps===h(this,Ut);if(!_context144.t1){_context144.next=13;break}_context144.next=13;return(_r=h(this,re))==null?void 0:_r.dispatchEventInSandbox({id:"page",name:"PageClose",pageNumber:$e});case 13:case"end":return _context144.stop()}},_callee143,this)}));return function _e(_x116){return _ref200.apply(this,arguments)}}(),Xe=new WeakSet,He=function He(){if(A(this,dt,new xr.PromiseCapability),h(this,re))throw new Error("#initScripting: Scripting already exists.");return h(this,Qt).createScripting({sandboxBundleSrc:h(this,ie)})},ro=new WeakSet,Xo=function(){var _ref201=_asyncToGenerator(_regeneratorRuntime().mark(function _callee144(){var $e,_r,Ps,_iterator195,_step195,_step195$value,qe,bl;return _regeneratorRuntime().wrap(function _callee144$(_context145){while(1)switch(_context145.prev=_context145.next){case 0:if(h(this,re)){_context145.next=3;break}A(this,Ut,null),($e=h(this,dt))==null||$e.resolve();return _context145.abrupt("return");case 3:_context145.t0=h(this,ot);if(!_context145.t0){_context145.next=8;break}_context145.next=7;return Promise.race([h(this,ot).promise,new Promise(function(qe){setTimeout(qe,1e3)})])["catch"](function(){});case 7:A(this,ot,null);case 8:A(this,Ut,null);_context145.prev=9;_context145.next=12;return h(this,re).destroySandbox();case 12:_context145.next=16;break;case 14:_context145.prev=14;_context145.t1=_context145["catch"](9);case 16:(_r=h(this,ne))==null||_r.reject(new Error("Scripting destroyed.")),A(this,ne,null);_iterator195=_createForOfIteratorHelper(this._internalEvents);try{for(_iterator195.s();!(_step195=_iterator195.n()).done;){_step195$value=_slicedToArray(_step195.value,2),qe=_step195$value[0],bl=_step195$value[1];h(this,Ot)._off(qe,bl)}}catch(err){_iterator195.e(err)}finally{_iterator195.f()}this._internalEvents.clear(),this._pageOpenPending.clear(),this._visitedPages.clear(),A(this,re,null),A(this,qt,!1),(Ps=h(this,dt))==null||Ps.resolve();case 20:case"end":return _context145.stop()}},_callee144,this,[[9,14]])}));return function Xo(){return _ref201.apply(this,arguments)}}(),it.PDFScriptingManager=pr},function(J,it,nt){Object.defineProperty(it,"__esModule",{value:!0}),it.PDFSinglePageViewer=void 0;var ot=nt(2),dt=nt(25);var Mt=function(_dt$PDFViewer){_inherits(Mt,_dt$PDFViewer);function Mt(){_classCallCheck(this,Mt);return _callSuper(this,Mt,arguments)}_createClass(Mt,[{key:"_resetView",value:function _resetView(){_get(_getPrototypeOf(Mt.prototype),"_resetView",this).call(this),this._scrollMode=ot.ScrollMode.PAGE,this._spreadMode=ot.SpreadMode.NONE}},{key:"scrollMode",set:function set(Qt){}},{key:"_updateScrollMode",value:function _updateScrollMode(){}},{key:"spreadMode",set:function set(Qt){}},{key:"_updateSpreadMode",value:function _updateSpreadMode(){}}]);return Mt}(dt.PDFViewer);it.PDFSinglePageViewer=Mt},function(J,it,nt){var ot,dt,Mt,Ot,Qt,Ut,te,qt,ie,re,ne,ae,Bt,Wt,oe,ve,_e,Xe,He,ro,Xo,Se,xr,pr,$e,_r,Ps,qe,bl,ol,Te,pe,ue,se,be,Ae,ze,pi,io,Qr,Es,nl,Cr,$l,_l,Ih,Rh,Th,$s,Dr,Xi;Object.defineProperty(it,"__esModule",{value:!0}),it.PagesCountLimit=it.PDFViewer=it.PDFPageViewBuffer=void 0;var Ke=nt(4),ta=nt(2),Cl=nt(7),Oh=nt(13),jh=nt(26),qh=nt(5);var Bh=10,Jh={FORCE_SCROLL_MODE_PAGE:15e3,FORCE_LAZY_PAGE_INIT:7500,PAUSE_EAGER_PAGE_INIT:250};it.PagesCountLimit=Jh;function Xh(ia){return Object.values(Ke.AnnotationEditorType).includes(ia)&&ia!==Ke.AnnotationEditorType.DISABLE}var Qh=function(_Symbol$iterator){function Qh(fe){_classCallCheck(this,Qh);S(this,Mt),S(this,ot,new Set),S(this,dt,0),A(this,dt,fe)}_createClass(Qh,[{key:"push",value:function push(fe){var Me=h(this,ot);Me.has(fe)&&Me["delete"](fe),Me.add(fe),Me.size>h(this,dt)&&D(this,Mt,Ot).call(this)}},{key:"resize",value:function resize(fe){var Me=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;A(this,dt,fe);var kr=h(this,ot);if(Me){var rn=kr.size;var Oe=1;var _iterator196=_createForOfIteratorHelper(kr),_step196;try{for(_iterator196.s();!(_step196=_iterator196.n()).done;){var wi=_step196.value;if(Me.has(wi.id)&&(kr["delete"](wi),kr.add(wi)),++Oe>rn)break}}catch(err){_iterator196.e(err)}finally{_iterator196.f()}}for(;kr.size>h(this,dt);)D(this,Mt,Ot).call(this)}},{key:"has",value:function has(fe){return h(this,ot).has(fe)}},{key:_Symbol$iterator,value:function value(){return h(this,ot).keys()}}]);return Qh}(Symbol.iterator);ot=new WeakMap,dt=new WeakMap,Mt=new WeakSet,Ot=function Ot(){var ia=h(this,ot).keys().next().value;ia==null||ia.destroy(),h(this,ot)["delete"](ia)},it.PDFPageViewBuffer=Qh;var Kh=function(){function Kh(fe){var _this275=this,_fe$textLayerMode,_fe$annotationMode,_fe$annotationEditorM,_fe$isOffscreenCanvas;_classCallCheck(this,Kh);S(this,Se),S(this,pr),S(this,_r),S(this,qe),S(this,ol),S(this,pe),S(this,se),S(this,Ae),S(this,pi),S(this,Qr),S(this,nl),S(this,$l),S(this,Ih),S(this,Th),S(this,Dr),S(this,Qt,null),S(this,Ut,null),S(this,te,Ke.AnnotationEditorType.NONE),S(this,qt,null),S(this,ie,Ke.AnnotationMode.ENABLE_FORMS),S(this,re,null),S(this,ne,null),S(this,ae,!1),S(this,Bt,!1),S(this,Wt,null),S(this,oe,!1),S(this,ve,0),S(this,_e,new ResizeObserver(D(this,Dr,Xi).bind(this))),S(this,Xe,null),S(this,He,null),S(this,ro,null),S(this,Xo,ta.TextLayerMode.ENABLE);var Me,kr;var rn="3.11.174";if(Ke.version!==rn)throw new Error("The API version \"".concat(Ke.version,"\" does not match the Viewer version \"").concat(rn,"\"."));if(this.container=fe.container,this.viewer=fe.viewer||fe.container.firstElementChild,((Me=this.container)==null?void 0:Me.tagName)!=="DIV"||((kr=this.viewer)==null?void 0:kr.tagName)!=="DIV")throw new Error("Invalid `container` and/or `viewer` option.");if(this.container.offsetParent&&getComputedStyle(this.container).position!=="absolute")throw new Error("The `container` must be absolutely positioned.");h(this,_e).observe(this.container),this.eventBus=fe.eventBus,this.linkService=fe.linkService||new qh.SimpleLinkService,this.downloadManager=fe.downloadManager||null,this.findController=fe.findController||null,A(this,Ut,fe.altTextManager||null),this.findController&&(this.findController.onIsPageVisible=function(Oe){return _this275._getVisiblePages().ids.has(Oe)}),this._scriptingManager=fe.scriptingManager||null,A(this,Xo,(_fe$textLayerMode=fe.textLayerMode)!==null&&_fe$textLayerMode!==void 0?_fe$textLayerMode:ta.TextLayerMode.ENABLE),A(this,ie,(_fe$annotationMode=fe.annotationMode)!==null&&_fe$annotationMode!==void 0?_fe$annotationMode:Ke.AnnotationMode.ENABLE_FORMS),A(this,te,(_fe$annotationEditorM=fe.annotationEditorMode)!==null&&_fe$annotationEditorM!==void 0?_fe$annotationEditorM:Ke.AnnotationEditorType.NONE),this.imageResourcesPath=fe.imageResourcesPath||"",this.enablePrintAutoRotate=fe.enablePrintAutoRotate||!1,this.removePageBorders=fe.removePageBorders||!1,fe.useOnlyCssZoom&&(console.error("useOnlyCssZoom was removed, please use `maxCanvasPixels = 0` instead."),fe.maxCanvasPixels=0),this.isOffscreenCanvasSupported=(_fe$isOffscreenCanvas=fe.isOffscreenCanvasSupported)!==null&&_fe$isOffscreenCanvas!==void 0?_fe$isOffscreenCanvas:!0,this.maxCanvasPixels=fe.maxCanvasPixels,this.l10n=fe.l10n||Cl.NullL10n,A(this,ae,fe.enablePermissions||!1),this.pageColors=fe.pageColors||null,this.defaultRenderingQueue=!fe.renderingQueue,this.defaultRenderingQueue?(this.renderingQueue=new jh.PDFRenderingQueue,this.renderingQueue.setViewer(this)):this.renderingQueue=fe.renderingQueue,this.scroll=(0,ta.watchScroll)(this.container,this._scrollUpdate.bind(this)),this.presentationModeState=ta.PresentationModeState.UNKNOWN,this._onBeforeDraw=this._onAfterDraw=null,this._resetView(),this.removePageBorders&&this.viewer.classList.add("removePageBorders"),D(this,Th,$s).call(this),this.eventBus._on("thumbnailrendered",function(_ref202){var Oe=_ref202.pageNumber,wi=_ref202.pdfPage;var Jo=_this275._pages[Oe-1];h(_this275,Qt).has(Jo)||wi==null||wi.cleanup()})}_createClass(Kh,[{key:"pagesCount",get:function get(){return this._pages.length}},{key:"getPageView",value:function getPageView(fe){return this._pages[fe]}},{key:"getCachedPageViews",value:function getCachedPageViews(){return new Set(h(this,Qt))}},{key:"pageViewsReady",get:function get(){return this._pagesCapability.settled&&this._pages.every(function(fe){return fe==null?void 0:fe.pdfPage})}},{key:"renderForms",get:function get(){return h(this,ie)===Ke.AnnotationMode.ENABLE_FORMS}},{key:"enableScripting",get:function get(){return!!this._scriptingManager}},{key:"currentPageNumber",get:function get(){return this._currentPageNumber},set:function set(fe){if(!Number.isInteger(fe))throw new Error("Invalid page number.");this.pdfDocument&&(this._setCurrentPageNumber(fe,!0)||console.error("currentPageNumber: \"".concat(fe,"\" is not a valid page.")))}},{key:"_setCurrentPageNumber",value:function _setCurrentPageNumber(fe){var _ref203;var Me=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1;var kr;if(this._currentPageNumber===fe)return Me&&D(this,nl,Cr).call(this),!0;if(!(0<fe&&fe<=this.pagesCount))return!1;var rn=this._currentPageNumber;return this._currentPageNumber=fe,this.eventBus.dispatch("pagechanging",{source:this,pageNumber:fe,pageLabel:(_ref203=(kr=this._pageLabels)==null?void 0:kr[fe-1])!==null&&_ref203!==void 0?_ref203:null,previous:rn}),Me&&D(this,nl,Cr).call(this),!0}},{key:"currentPageLabel",get:function get(){var _ref204;var fe;return(_ref204=(fe=this._pageLabels)==null?void 0:fe[this._currentPageNumber-1])!==null&&_ref204!==void 0?_ref204:null},set:function set(fe){if(!this.pdfDocument)return;var Me=fe|0;if(this._pageLabels){var kr=this._pageLabels.indexOf(fe);kr>=0&&(Me=kr+1)}this._setCurrentPageNumber(Me,!0)||console.error("currentPageLabel: \"".concat(fe,"\" is not a valid page."))}},{key:"currentScale",get:function get(){return this._currentScale!==ta.UNKNOWN_SCALE?this._currentScale:ta.DEFAULT_SCALE},set:function set(fe){if(isNaN(fe))throw new Error("Invalid numeric scale.");this.pdfDocument&&D(this,Qr,Es).call(this,fe,{noScroll:!1})}},{key:"currentScaleValue",get:function get(){return this._currentScaleValue},set:function set(fe){this.pdfDocument&&D(this,Qr,Es).call(this,fe,{noScroll:!1})}},{key:"pagesRotation",get:function get(){return this._pagesRotation},set:function set(fe){if(!(0,ta.isValidRotation)(fe))throw new Error("Invalid pages rotation angle.");if(!this.pdfDocument||(fe%=360,fe<0&&(fe+=360),this._pagesRotation===fe))return;this._pagesRotation=fe;var Me=this._currentPageNumber;this.refresh(!0,{rotation:fe}),this._currentScaleValue&&D(this,Qr,Es).call(this,this._currentScaleValue,{noScroll:!0}),this.eventBus.dispatch("rotationchanging",{source:this,pagesRotation:fe,pageNumber:Me}),this.defaultRenderingQueue&&this.update()}},{key:"firstPagePromise",get:function get(){return this.pdfDocument?this._firstPageCapability.promise:null}},{key:"onePageRendered",get:function get(){return this.pdfDocument?this._onePageRenderedCapability.promise:null}},{key:"pagesPromise",get:function get(){return this.pdfDocument?this._pagesCapability.promise:null}},{key:"getAllText",value:function(){var _getAllText=_asyncToGenerator(_regeneratorRuntime().mark(function _callee145(){var fe,Me,kr,rn,Oe,_yield$Oe$getTextCont,wi,_iterator197,_step197,Jo;return _regeneratorRuntime().wrap(function _callee145$(_context146){while(1)switch(_context146.prev=_context146.next){case 0:fe=[],Me=[];kr=1,rn=this.pdfDocument.numPages;case 2:if(!(kr<=rn)){_context146.next=19;break}if(!h(this,oe)){_context146.next=5;break}return _context146.abrupt("return",null);case 5:Me.length=0;_context146.next=8;return this.pdfDocument.getPage(kr);case 8:Oe=_context146.sent;_context146.next=11;return Oe.getTextContent();case 11:_yield$Oe$getTextCont=_context146.sent;wi=_yield$Oe$getTextCont.items;_iterator197=_createForOfIteratorHelper(wi);try{for(_iterator197.s();!(_step197=_iterator197.n()).done;){Jo=_step197.value;Jo.str&&Me.push(Jo.str),Jo.hasEOL&&Me.push("\n")}}catch(err){_iterator197.e(err)}finally{_iterator197.f()}fe.push((0,ta.removeNullCharacters)(Me.join("")));case 16:++kr;_context146.next=2;break;case 19:return _context146.abrupt("return",fe.join("\n"));case 20:case"end":return _context146.stop()}},_callee145,this)}));function getAllText(){return _getAllText.apply(this,arguments)}return getAllText}()},{key:"setDocument",value:function setDocument(fe){var _this276=this;var Me,kr;if(this.pdfDocument&&(this.eventBus.dispatch("pagesdestroy",{source:this}),this._cancelRendering(),this._resetView(),(Me=this.findController)==null||Me.setDocument(null),(kr=this._scriptingManager)==null||kr.setDocument(null),h(this,qt)&&(h(this,qt).destroy(),A(this,qt,null))),this.pdfDocument=fe,!fe)return;var rn=fe.numPages,Oe=fe.getPage(1),wi=fe.getOptionalContentConfig(),Jo=h(this,ae)?fe.getPermissions():Promise.resolve();if(rn>Jh.FORCE_SCROLL_MODE_PAGE){console.warn("Forcing PAGE-scrolling for performance reasons, given the length of the document.");var xl=this._scrollMode=ta.ScrollMode.PAGE;this.eventBus.dispatch("scrollmodechanged",{source:this,mode:xl})}this._pagesCapability.promise.then(function(){_this276.eventBus.dispatch("pagesloaded",{source:_this276,pagesCount:rn})},function(){}),this._onBeforeDraw=function(xl){var Pd=_this276._pages[xl.pageNumber-1];Pd&&h(_this276,Qt).push(Pd)},this.eventBus._on("pagerender",this._onBeforeDraw),this._onAfterDraw=function(xl){xl.cssTransform||_this276._onePageRenderedCapability.settled||(_this276._onePageRenderedCapability.resolve({timestamp:xl.timestamp}),_this276.eventBus._off("pagerendered",_this276._onAfterDraw),_this276._onAfterDraw=null,h(_this276,He)&&(document.removeEventListener("visibilitychange",h(_this276,He)),A(_this276,He,null)))},this.eventBus._on("pagerendered",this._onAfterDraw),Promise.all([Oe,Jo]).then(function(_ref205){var _ref206=_slicedToArray(_ref205,2),xl=_ref206[0],Pd=_ref206[1];var Dh,Vh;if(fe!==_this276.pdfDocument)return;_this276._firstPageCapability.resolve(xl),_this276._optionalContentConfigPromise=wi;var _D$call5=D(_this276,pr,$e).call(_this276,Pd),Ed=_D$call5.annotationEditorMode,Nh=_D$call5.annotationMode,Zh=_D$call5.textLayerMode;if(Zh!==ta.TextLayerMode.DISABLE){var cr=A(_this276,Wt,document.createElement("div"));cr.id="hiddenCopyElement",_this276.viewer.before(cr)}if(Ed!==Ke.AnnotationEditorType.DISABLE){var _cr4=Ed;fe.isPureXfa?console.warn("Warning: XFA-editing is not implemented."):Xh(_cr4)?(A(_this276,qt,new Ke.AnnotationEditorUIManager(_this276.container,_this276.viewer,h(_this276,Ut),_this276.eventBus,fe,_this276.pageColors)),_cr4!==Ke.AnnotationEditorType.NONE&&h(_this276,qt).updateMode(_cr4)):console.error("Invalid AnnotationEditor mode: ".concat(_cr4))}var py=D(_this276,Se,xr).bind(_this276),Hh=_this276._scrollMode===ta.ScrollMode.PAGE?null:_this276.viewer,ke=_this276.currentScale,ye=xl.getViewport({scale:ke*Ke.PixelsPerInch.PDF_TO_CSS_UNITS});_this276.viewer.style.setProperty("--scale-factor",ye.scale),(((Dh=_this276.pageColors)==null?void 0:Dh.foreground)==="CanvasText"||((Vh=_this276.pageColors)==null?void 0:Vh.background)==="Canvas")&&_this276.viewer.style.setProperty("--hcm-highligh-filter",fe.filterFactory.addHighlightHCMFilter("CanvasText","Canvas","HighlightText","Highlight"));for(var _cr5=1;_cr5<=rn;++_cr5){var lr=new Oh.PDFPageView({container:Hh,eventBus:_this276.eventBus,id:_cr5,scale:ke,defaultViewport:ye.clone(),optionalContentConfigPromise:wi,renderingQueue:_this276.renderingQueue,textLayerMode:Zh,annotationMode:Nh,imageResourcesPath:_this276.imageResourcesPath,isOffscreenCanvasSupported:_this276.isOffscreenCanvasSupported,maxCanvasPixels:_this276.maxCanvasPixels,pageColors:_this276.pageColors,l10n:_this276.l10n,layerProperties:py});_this276._pages.push(lr)}var Ie=_this276._pages[0];Ie&&(Ie.setPdfPage(xl),_this276.linkService.cachePageRef(1,xl.ref)),_this276._scrollMode===ta.ScrollMode.PAGE?D(_this276,ol,Te).call(_this276):_this276._spreadMode!==ta.SpreadMode.NONE&&_this276._updateSpreadMode(),D(_this276,_r,Ps).call(_this276).then(_asyncToGenerator(_regeneratorRuntime().mark(function _callee146(){var cr,lr,Ss,_loop7,kl;return _regeneratorRuntime().wrap(function _callee146$(_context148){while(1)switch(_context148.prev=_context148.next){case 0:if(!((cr=_this276.findController)==null||cr.setDocument(fe),(lr=_this276._scriptingManager)==null||lr.setDocument(fe),h(_this276,Wt)&&(A(_this276,ne,D(_this276,qe,bl).bind(_this276,Zh)),document.addEventListener("copy",h(_this276,ne))),h(_this276,qt)&&_this276.eventBus.dispatch("annotationeditormodechanged",{source:_this276,mode:h(_this276,te)}),fe.loadingParams.disableAutoFetch||rn>Jh.FORCE_LAZY_PAGE_INIT)){_context148.next=3;break}_this276._pagesCapability.resolve();return _context148.abrupt("return");case 3:Ss=rn-1;if(!(Ss<=0)){_context148.next=7;break}_this276._pagesCapability.resolve();return _context148.abrupt("return");case 7:_loop7=_regeneratorRuntime().mark(function _loop7(kl){var Wh;return _regeneratorRuntime().wrap(function _loop7$(_context147){while(1)switch(_context147.prev=_context147.next){case 0:Wh=fe.getPage(kl).then(function(zh){var Fh=_this276._pages[kl-1];Fh.pdfPage||Fh.setPdfPage(zh),_this276.linkService.cachePageRef(kl,zh.ref),--Ss===0&&_this276._pagesCapability.resolve()},function(zh){console.error("Unable to get page ".concat(kl," to initialize viewer"),zh),--Ss===0&&_this276._pagesCapability.resolve()});_context147.t0=kl%Jh.PAUSE_EAGER_PAGE_INIT===0;if(!_context147.t0){_context147.next=5;break}_context147.next=5;return Wh;case 5:case"end":return _context147.stop()}},_loop7)});kl=2;case 9:if(!(kl<=rn)){_context148.next=14;break}return _context148.delegateYield(_loop7(kl),"t0",11);case 11:++kl;_context148.next=9;break;case 14:case"end":return _context148.stop()}},_callee146)}))),_this276.eventBus.dispatch("pagesinit",{source:_this276}),fe.getMetadata().then(function(_ref208){var cr=_ref208.info;fe===_this276.pdfDocument&&cr.Language&&(_this276.viewer.lang=cr.Language)}),_this276.defaultRenderingQueue&&_this276.update()})["catch"](function(xl){console.error("Unable to initialize viewer",xl),_this276._pagesCapability.reject(xl)})}},{key:"setPageLabels",value:function setPageLabels(fe){var Me;if(this.pdfDocument){fe?Array.isArray(fe)&&this.pdfDocument.numPages===fe.length?this._pageLabels=fe:(this._pageLabels=null,console.error("setPageLabels: Invalid page labels.")):this._pageLabels=null;for(var kr=0,rn=this._pages.length;kr<rn;kr++){var _ref209;this._pages[kr].setPageLabel((_ref209=(Me=this._pageLabels)==null?void 0:Me[kr])!==null&&_ref209!==void 0?_ref209:null)}}}},{key:"_resetView",value:function _resetView(){this._pages=[],this._currentPageNumber=1,this._currentScale=ta.UNKNOWN_SCALE,this._currentScaleValue=null,this._pageLabels=null,A(this,Qt,new Qh(Bh)),this._location=null,this._pagesRotation=0,this._optionalContentConfigPromise=null,this._firstPageCapability=new Ke.PromiseCapability,this._onePageRenderedCapability=new Ke.PromiseCapability,this._pagesCapability=new Ke.PromiseCapability,this._scrollMode=ta.ScrollMode.VERTICAL,this._previousScrollMode=ta.ScrollMode.UNKNOWN,this._spreadMode=ta.SpreadMode.NONE,A(this,Xe,{previousPageNumber:1,scrollDown:!0,pages:[]}),this._onBeforeDraw&&(this.eventBus._off("pagerender",this._onBeforeDraw),this._onBeforeDraw=null),this._onAfterDraw&&(this.eventBus._off("pagerendered",this._onAfterDraw),this._onAfterDraw=null),h(this,He)&&(document.removeEventListener("visibilitychange",h(this,He)),A(this,He,null)),this.viewer.textContent="",this._updateScrollMode(),this.viewer.removeAttribute("lang"),h(this,Wt)&&(document.removeEventListener("copy",h(this,ne)),A(this,ne,null),h(this,Wt).remove(),A(this,Wt,null))}},{key:"_scrollUpdate",value:function _scrollUpdate(){this.pagesCount!==0&&this.update()}},{key:"pageLabelToPageNumber",value:function pageLabelToPageNumber(fe){if(!this._pageLabels)return null;var Me=this._pageLabels.indexOf(fe);return Me<0?null:Me+1}},{key:"scrollPageIntoView",value:function scrollPageIntoView(_ref210){var fe=_ref210.pageNumber,_ref210$destArray=_ref210.destArray,Me=_ref210$destArray===void 0?null:_ref210$destArray,_ref210$allowNegative=_ref210.allowNegativeOffset,kr=_ref210$allowNegative===void 0?!1:_ref210$allowNegative,_ref210$ignoreDestina=_ref210.ignoreDestinationZoom,rn=_ref210$ignoreDestina===void 0?!1:_ref210$ignoreDestina;if(!this.pdfDocument)return;var Oe=Number.isInteger(fe)&&this._pages[fe-1];if(!Oe){console.error("scrollPageIntoView: \"".concat(fe,"\" is not a valid pageNumber parameter."));return}if(this.isInPresentationMode||!Me){this._setCurrentPageNumber(fe,!0);return}var wi=0,Jo=0,xl=0,Pd=0,Dh,Vh;var Ed=Oe.rotation%180!==0,Nh=(Ed?Oe.height:Oe.width)/Oe.scale/Ke.PixelsPerInch.PDF_TO_CSS_UNITS,Zh=(Ed?Oe.width:Oe.height)/Oe.scale/Ke.PixelsPerInch.PDF_TO_CSS_UNITS;var py=0;switch(Me[1].name){case"XYZ":wi=Me[2],Jo=Me[3],py=Me[4],wi=wi!==null?wi:0,Jo=Jo!==null?Jo:Zh;break;case"Fit":case"FitB":py="page-fit";break;case"FitH":case"FitBH":Jo=Me[2],py="page-width",Jo===null&&this._location?(wi=this._location.left,Jo=this._location.top):(typeof Jo!="number"||Jo<0)&&(Jo=Zh);break;case"FitV":case"FitBV":wi=Me[2],xl=Nh,Pd=Zh,py="page-height";break;case"FitR":wi=Me[2],Jo=Me[3],xl=Me[4]-wi,Pd=Me[5]-Jo;var Ie=ta.SCROLLBAR_PADDING,cr=ta.VERTICAL_PADDING;this.removePageBorders&&(Ie=cr=0),Dh=(this.container.clientWidth-Ie)/xl/Ke.PixelsPerInch.PDF_TO_CSS_UNITS,Vh=(this.container.clientHeight-cr)/Pd/Ke.PixelsPerInch.PDF_TO_CSS_UNITS,py=Math.min(Math.abs(Dh),Math.abs(Vh));break;default:console.error("scrollPageIntoView: \"".concat(Me[1].name,"\" is not a valid destination type."));return}if(rn||(py&&py!==this._currentScale?this.currentScaleValue=py:this._currentScale===ta.UNKNOWN_SCALE&&(this.currentScaleValue=ta.DEFAULT_SCALE_VALUE)),py==="page-fit"&&!Me[4]){D(this,pe,ue).call(this,Oe);return}var Hh=[Oe.viewport.convertToViewportPoint(wi,Jo),Oe.viewport.convertToViewportPoint(wi+xl,Jo+Pd)];var ke=Math.min(Hh[0][0],Hh[1][0]),ye=Math.min(Hh[0][1],Hh[1][1]);kr||(ke=Math.max(ke,0),ye=Math.max(ye,0)),D(this,pe,ue).call(this,Oe,{left:ke,top:ye})}},{key:"_updateLocation",value:function _updateLocation(fe){var Me=this._currentScale,kr=this._currentScaleValue,rn=parseFloat(kr)===Me?Math.round(Me*1e4)/100:kr,Oe=fe.id,wi=this._pages[Oe-1],Jo=this.container,xl=wi.getPagePoint(Jo.scrollLeft-fe.x,Jo.scrollTop-fe.y),Pd=Math.round(xl[0]),Dh=Math.round(xl[1]);var Vh="#page=".concat(Oe);this.isInPresentationMode||(Vh+="&zoom=".concat(rn,",").concat(Pd,",").concat(Dh)),this._location={pageNumber:Oe,scale:rn,top:Dh,left:Pd,rotation:this._pagesRotation,pdfOpenParams:Vh}}},{key:"update",value:function update(){var fe=this._getVisiblePages(),Me=fe.views,kr=Me.length;if(kr===0)return;var rn=Math.max(Bh,2*kr+1);h(this,Qt).resize(rn,fe.ids),this.renderingQueue.renderHighestPriority(fe);var Oe=this._spreadMode===ta.SpreadMode.NONE&&(this._scrollMode===ta.ScrollMode.PAGE||this._scrollMode===ta.ScrollMode.VERTICAL),wi=this._currentPageNumber;var Jo=!1;var _iterator198=_createForOfIteratorHelper(Me),_step198;try{for(_iterator198.s();!(_step198=_iterator198.n()).done;){var xl=_step198.value;if(xl.percent<100)break;if(xl.id===wi&&Oe){Jo=!0;break}}}catch(err){_iterator198.e(err)}finally{_iterator198.f()}this._setCurrentPageNumber(Jo?wi:Me[0].id),this._updateLocation(fe.first),this.eventBus.dispatch("updateviewarea",{source:this,location:this._location})}},{key:"containsElement",value:function containsElement(fe){return this.container.contains(fe)}},{key:"focus",value:function focus(){this.container.focus()}},{key:"_isContainerRtl",get:function get(){return getComputedStyle(this.container).direction==="rtl"}},{key:"isInPresentationMode",get:function get(){return this.presentationModeState===ta.PresentationModeState.FULLSCREEN}},{key:"isChangingPresentationMode",get:function get(){return this.presentationModeState===ta.PresentationModeState.CHANGING}},{key:"isHorizontalScrollbarEnabled",get:function get(){return this.isInPresentationMode?!1:this.container.scrollWidth>this.container.clientWidth}},{key:"isVerticalScrollbarEnabled",get:function get(){return this.isInPresentationMode?!1:this.container.scrollHeight>this.container.clientHeight}},{key:"_getVisiblePages",value:function _getVisiblePages(){var fe=this._scrollMode===ta.ScrollMode.PAGE?h(this,Xe).pages:this._pages,Me=this._scrollMode===ta.ScrollMode.HORIZONTAL,kr=Me&&this._isContainerRtl;return(0,ta.getVisibleElements)({scrollEl:this.container,views:fe,sortByVisibility:!0,horizontal:Me,rtl:kr})}},{key:"cleanup",value:function cleanup(){var _iterator199=_createForOfIteratorHelper(this._pages),_step199;try{for(_iterator199.s();!(_step199=_iterator199.n()).done;){var fe=_step199.value;fe.renderingState!==ta.RenderingStates.FINISHED&&fe.reset()}}catch(err){_iterator199.e(err)}finally{_iterator199.f()}}},{key:"_cancelRendering",value:function _cancelRendering(){var _iterator200=_createForOfIteratorHelper(this._pages),_step200;try{for(_iterator200.s();!(_step200=_iterator200.n()).done;){var fe=_step200.value;fe.cancelRendering()}}catch(err){_iterator200.e(err)}finally{_iterator200.f()}}},{key:"forceRendering",value:function forceRendering(fe){var _this277=this;var Me=fe||this._getVisiblePages(),kr=D(this,Ih,Rh).call(this,Me),rn=this._spreadMode!==ta.SpreadMode.NONE&&this._scrollMode!==ta.ScrollMode.HORIZONTAL,Oe=this.renderingQueue.getHighestPriority(Me,this._pages,kr,rn);return Oe?(D(this,$l,_l).call(this,Oe).then(function(){_this277.renderingQueue.renderView(Oe)}),!0):!1}},{key:"hasEqualPageSizes",get:function get(){var fe=this._pages[0];for(var Me=1,kr=this._pages.length;Me<kr;++Me){var rn=this._pages[Me];if(rn.width!==fe.width||rn.height!==fe.height)return!1}return!0}},{key:"getPagesOverview",value:function getPagesOverview(){var _this278=this;var fe;return this._pages.map(function(Me){var kr=Me.pdfPage.getViewport({scale:1}),rn=(0,ta.isPortraitOrientation)(kr);if(fe===void 0)fe=rn;else if(_this278.enablePrintAutoRotate&&rn!==fe)return{width:kr.height,height:kr.width,rotation:(kr.rotation-90)%360};return{width:kr.width,height:kr.height,rotation:kr.rotation}})}},{key:"optionalContentConfigPromise",get:function get(){return this.pdfDocument?this._optionalContentConfigPromise?this._optionalContentConfigPromise:(console.error("optionalContentConfigPromise: Not initialized yet."),this.pdfDocument.getOptionalContentConfig()):Promise.resolve(null)},set:function set(fe){if(!(fe instanceof Promise))throw new Error("Invalid optionalContentConfigPromise: ".concat(fe));this.pdfDocument&&this._optionalContentConfigPromise&&(this._optionalContentConfigPromise=fe,this.refresh(!1,{optionalContentConfigPromise:fe}),this.eventBus.dispatch("optionalcontentconfigchanged",{source:this,promise:fe}))}},{key:"scrollMode",get:function get(){return this._scrollMode},set:function set(fe){if(this._scrollMode!==fe){if(!(0,ta.isValidScrollMode)(fe))throw new Error("Invalid scroll mode: ".concat(fe));this.pagesCount>Jh.FORCE_SCROLL_MODE_PAGE||(this._previousScrollMode=this._scrollMode,this._scrollMode=fe,this.eventBus.dispatch("scrollmodechanged",{source:this,mode:fe}),this._updateScrollMode(this._currentPageNumber))}}},{key:"_updateScrollMode",value:function _updateScrollMode(){var fe=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;var Me=this._scrollMode,kr=this.viewer;kr.classList.toggle("scrollHorizontal",Me===ta.ScrollMode.HORIZONTAL),kr.classList.toggle("scrollWrapped",Me===ta.ScrollMode.WRAPPED),!(!this.pdfDocument||!fe)&&(Me===ta.ScrollMode.PAGE?D(this,ol,Te).call(this):this._previousScrollMode===ta.ScrollMode.PAGE&&this._updateSpreadMode(),this._currentScaleValue&&isNaN(this._currentScaleValue)&&D(this,Qr,Es).call(this,this._currentScaleValue,{noScroll:!0}),this._setCurrentPageNumber(fe,!0),this.update())}},{key:"spreadMode",get:function get(){return this._spreadMode},set:function set(fe){if(this._spreadMode!==fe){if(!(0,ta.isValidSpreadMode)(fe))throw new Error("Invalid spread mode: ".concat(fe));this._spreadMode=fe,this.eventBus.dispatch("spreadmodechanged",{source:this,mode:fe}),this._updateSpreadMode(this._currentPageNumber)}}},{key:"_updateSpreadMode",value:function _updateSpreadMode(){var fe=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;if(!this.pdfDocument)return;var Me=this.viewer,kr=this._pages;if(this._scrollMode===ta.ScrollMode.PAGE)D(this,ol,Te).call(this);else if(Me.textContent="",this._spreadMode===ta.SpreadMode.NONE){var _iterator201=_createForOfIteratorHelper(this._pages),_step201;try{for(_iterator201.s();!(_step201=_iterator201.n()).done;){var rn=_step201.value;Me.append(rn.div)}}catch(err){_iterator201.e(err)}finally{_iterator201.f()}}else{var _rn2=this._spreadMode-1;var Oe=null;for(var wi=0,Jo=kr.length;wi<Jo;++wi)Oe===null?(Oe=document.createElement("div"),Oe.className="spread",Me.append(Oe)):wi%2===_rn2&&(Oe=Oe.cloneNode(!1),Me.append(Oe)),Oe.append(kr[wi].div)}fe&&(this._currentScaleValue&&isNaN(this._currentScaleValue)&&D(this,Qr,Es).call(this,this._currentScaleValue,{noScroll:!0}),this._setCurrentPageNumber(fe,!0),this.update())}},{key:"_getPageAdvance",value:function _getPageAdvance(fe){var Me=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1;switch(this._scrollMode){case ta.ScrollMode.WRAPPED:{var _this$_getVisiblePage=this._getVisiblePages(),kr=_this$_getVisiblePage.views,rn=new Map;var _iterator202=_createForOfIteratorHelper(kr),_step202;try{for(_iterator202.s();!(_step202=_iterator202.n()).done;){var _step202$value=_step202.value,Oe=_step202$value.id,wi=_step202$value.y,Jo=_step202$value.percent,xl=_step202$value.widthPercent;if(Jo===0||xl<100)continue;var Pd=rn.get(wi);Pd||rn.set(wi,Pd||(Pd=[])),Pd.push(Oe)}}catch(err){_iterator202.e(err)}finally{_iterator202.f()}var _iterator203=_createForOfIteratorHelper(rn.values()),_step203;try{for(_iterator203.s();!(_step203=_iterator203.n()).done;){var _Oe4=_step203.value;var _wi4=_Oe4.indexOf(fe);if(_wi4===-1)continue;var _Jo=_Oe4.length;if(_Jo===1)break;if(Me)for(var _xl3=_wi4-1,_Pd2=0;_xl3>=_Pd2;_xl3--){var Dh=_Oe4[_xl3],Vh=_Oe4[_xl3+1]-1;if(Dh<Vh)return fe-Vh}else for(var _xl4=_wi4+1,_Pd3=_Jo;_xl4<_Pd3;_xl4++){var _Dh3=_Oe4[_xl4],_Vh2=_Oe4[_xl4-1]+1;if(_Dh3>_Vh2)return _Vh2-fe}if(Me){var _xl5=_Oe4[0];if(_xl5<fe)return fe-_xl5+1}else{var _xl6=_Oe4[_Jo-1];if(_xl6>fe)return _xl6-fe+1}break}}catch(err){_iterator203.e(err)}finally{_iterator203.f()}break}case ta.ScrollMode.HORIZONTAL:break;case ta.ScrollMode.PAGE:case ta.ScrollMode.VERTICAL:{if(this._spreadMode===ta.SpreadMode.NONE)break;var _kr2=this._spreadMode-1;if(Me&&fe%2!==_kr2||!Me&&fe%2===_kr2)break;var _this$_getVisiblePage2=this._getVisiblePages(),_rn3=_this$_getVisiblePage2.views,_Oe5=Me?fe-1:fe+1;var _iterator204=_createForOfIteratorHelper(_rn3),_step204;try{for(_iterator204.s();!(_step204=_iterator204.n()).done;){var _step204$value=_step204.value,_wi5=_step204$value.id,_Jo2=_step204$value.percent,_xl7=_step204$value.widthPercent;if(_wi5===_Oe5){if(_Jo2>0&&_xl7===100)return 2;break}}}catch(err){_iterator204.e(err)}finally{_iterator204.f()}break}}return 1}},{key:"nextPage",value:function nextPage(){var fe=this._currentPageNumber,Me=this.pagesCount;if(fe>=Me)return!1;var kr=this._getPageAdvance(fe,!1)||1;return this.currentPageNumber=Math.min(fe+kr,Me),!0}},{key:"previousPage",value:function previousPage(){var fe=this._currentPageNumber;if(fe<=1)return!1;var Me=this._getPageAdvance(fe,!0)||1;return this.currentPageNumber=Math.max(fe-Me,1),!0}},{key:"increaseScale",value:function increaseScale(){var _ref211=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},fe=_ref211.drawingDelay,Me=_ref211.scaleFactor,kr=_ref211.steps;if(!this.pdfDocument)return;var rn=this._currentScale;if(Me>1)rn=Math.round(rn*Me*100)/100;else{var _kr3;(_kr3=kr)!==null&&_kr3!==void 0?_kr3:kr=1;do rn=Math.ceil((rn*ta.DEFAULT_SCALE_DELTA).toFixed(2)*10)/10;while(--kr>0&&rn<ta.MAX_SCALE)}D(this,Qr,Es).call(this,Math.min(ta.MAX_SCALE,rn),{noScroll:!1,drawingDelay:fe})}},{key:"decreaseScale",value:function decreaseScale(){var _ref212=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},fe=_ref212.drawingDelay,Me=_ref212.scaleFactor,kr=_ref212.steps;if(!this.pdfDocument)return;var rn=this._currentScale;if(Me>0&&Me<1)rn=Math.round(rn*Me*100)/100;else{var _kr4;(_kr4=kr)!==null&&_kr4!==void 0?_kr4:kr=1;do rn=Math.floor((rn/ta.DEFAULT_SCALE_DELTA).toFixed(2)*10)/10;while(--kr>0&&rn>ta.MIN_SCALE)}D(this,Qr,Es).call(this,Math.max(ta.MIN_SCALE,rn),{noScroll:!1,drawingDelay:fe})}},{key:"containerTopLeft",get:function get(){return h(this,re)||A(this,re,[this.container.offsetTop,this.container.offsetLeft])}},{key:"annotationEditorMode",get:function get(){return h(this,qt)?h(this,te):Ke.AnnotationEditorType.DISABLE},set:function set(_ref213){var fe=_ref213.mode,_ref213$editId=_ref213.editId,Me=_ref213$editId===void 0?null:_ref213$editId;if(!h(this,qt))throw new Error("The AnnotationEditor is not enabled.");if(h(this,te)!==fe){if(!Xh(fe))throw new Error("Invalid AnnotationEditor mode: ".concat(fe));this.pdfDocument&&(A(this,te,fe),this.eventBus.dispatch("annotationeditormodechanged",{source:this,mode:fe}),h(this,qt).updateMode(fe,Me))}}},{key:"annotationEditorParams",set:function set(_ref214){var fe=_ref214.type,Me=_ref214.value;if(!h(this,qt))throw new Error("The AnnotationEditor is not enabled.");h(this,qt).updateParams(fe,Me)}},{key:"refresh",value:function refresh(){var fe=arguments.length>0&&arguments[0]!==undefined?arguments[0]:!1;var Me=arguments.length>1&&arguments[1]!==undefined?arguments[1]:Object.create(null);if(this.pdfDocument){var _iterator205=_createForOfIteratorHelper(this._pages),_step205;try{for(_iterator205.s();!(_step205=_iterator205.n()).done;){var kr=_step205.value;kr.update(Me)}}catch(err){_iterator205.e(err)}finally{_iterator205.f()}h(this,ro)!==null&&(clearTimeout(h(this,ro)),A(this,ro,null)),fe||this.update()}}}]);return Kh}();Qt=new WeakMap,Ut=new WeakMap,te=new WeakMap,qt=new WeakMap,ie=new WeakMap,re=new WeakMap,ne=new WeakMap,ae=new WeakMap,Bt=new WeakMap,Wt=new WeakMap,oe=new WeakMap,ve=new WeakMap,_e=new WeakMap,Xe=new WeakMap,He=new WeakMap,ro=new WeakMap,Xo=new WeakMap,Se=new WeakSet,xr=function xr(){var ia=this;return{get annotationEditorUIManager(){return h(ia,qt)},get annotationStorage(){var fe;return(fe=ia.pdfDocument)==null?void 0:fe.annotationStorage},get downloadManager(){return ia.downloadManager},get enableScripting(){return!!ia._scriptingManager},get fieldObjectsPromise(){var fe;return(fe=ia.pdfDocument)==null?void 0:fe.getFieldObjects()},get findController(){return ia.findController},get hasJSActionsPromise(){var fe;return(fe=ia.pdfDocument)==null?void 0:fe.hasJSActions()},get linkService(){return ia.linkService}}},pr=new WeakSet,$e=function $e(ia){var fe={annotationEditorMode:h(this,te),annotationMode:h(this,ie),textLayerMode:h(this,Xo)};return ia&&(!ia.includes(Ke.PermissionFlag.COPY)&&h(this,Xo)===ta.TextLayerMode.ENABLE&&(fe.textLayerMode=ta.TextLayerMode.ENABLE_PERMISSIONS),ia.includes(Ke.PermissionFlag.MODIFY_CONTENTS)||(fe.annotationEditorMode=Ke.AnnotationEditorType.DISABLE),!ia.includes(Ke.PermissionFlag.MODIFY_ANNOTATIONS)&&!ia.includes(Ke.PermissionFlag.FILL_INTERACTIVE_FORMS)&&h(this,ie)===Ke.AnnotationMode.ENABLE_FORMS&&(fe.annotationMode=Ke.AnnotationMode.ENABLE)),fe},_r=new WeakSet,Ps=function Ps(){var _this279=this;if(document.visibilityState==="hidden"||!this.container.offsetParent||this._getVisiblePages().views.length===0)return Promise.resolve();var ia=new Promise(function(fe){A(_this279,He,function(){document.visibilityState==="hidden"&&(fe(),document.removeEventListener("visibilitychange",h(_this279,He)),A(_this279,He,null))}),document.addEventListener("visibilitychange",h(_this279,He))});return Promise.race([this._onePageRenderedCapability.promise,ia])},qe=new WeakSet,bl=function bl(ia,fe){var _this280=this;var Me=document.getSelection(),kr=Me.focusNode,rn=Me.anchorNode;if(rn&&kr&&Me.containsNode(h(this,Wt))){if(h(this,Bt)||ia===ta.TextLayerMode.ENABLE_PERMISSIONS){fe.preventDefault(),fe.stopPropagation();return}A(this,Bt,!0);var Oe=this.container.style.cursor;this.container.style.cursor="wait";var wi=function wi(Jo){return A(_this280,oe,Jo.key==="Escape")};window.addEventListener("keydown",wi),this.getAllText().then(function(){var _ref215=_asyncToGenerator(_regeneratorRuntime().mark(function _callee147(Jo){return _regeneratorRuntime().wrap(function _callee147$(_context149){while(1)switch(_context149.prev=_context149.next){case 0:_context149.t0=Jo!==null;if(!_context149.t0){_context149.next=4;break}_context149.next=4;return navigator.clipboard.writeText(Jo);case 4:case"end":return _context149.stop()}},_callee147)}));return function(_x117){return _ref215.apply(this,arguments)}}())["catch"](function(Jo){console.warn("Something goes wrong when extracting the text: ".concat(Jo.message))})["finally"](function(){A(_this280,Bt,!1),A(_this280,oe,!1),window.removeEventListener("keydown",wi),_this280.container.style.cursor=Oe}),fe.preventDefault(),fe.stopPropagation()}},ol=new WeakSet,Te=function Te(){if(this._scrollMode!==ta.ScrollMode.PAGE)throw new Error("#ensurePageViewVisible: Invalid scrollMode value.");var ia=this._currentPageNumber,fe=h(this,Xe),Me=this.viewer;if(Me.textContent="",fe.pages.length=0,this._spreadMode===ta.SpreadMode.NONE&&!this.isInPresentationMode){var kr=this._pages[ia-1];Me.append(kr.div),fe.pages.push(kr)}else{var _kr5=new Set,rn=this._spreadMode-1;rn===-1?_kr5.add(ia-1):ia%2!==rn?(_kr5.add(ia-1),_kr5.add(ia)):(_kr5.add(ia-2),_kr5.add(ia-1));var Oe=document.createElement("div");if(Oe.className="spread",this.isInPresentationMode){var wi=document.createElement("div");wi.className="dummyPage",Oe.append(wi)}var _iterator206=_createForOfIteratorHelper(_kr5),_step206;try{for(_iterator206.s();!(_step206=_iterator206.n()).done;){var _wi6=_step206.value;var Jo=this._pages[_wi6];Jo&&(Oe.append(Jo.div),fe.pages.push(Jo))}}catch(err){_iterator206.e(err)}finally{_iterator206.f()}Me.append(Oe)}fe.scrollDown=ia>=fe.previousPageNumber,fe.previousPageNumber=ia},pe=new WeakSet,ue=function ue(ia){var fe=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;var Me=ia.div,kr=ia.id;if(this._currentPageNumber!==kr&&this._setCurrentPageNumber(kr),this._scrollMode===ta.ScrollMode.PAGE&&(D(this,ol,Te).call(this),this.update()),!fe&&!this.isInPresentationMode){var rn=Me.offsetLeft+Me.clientLeft,Oe=rn+Me.clientWidth,_this$container=this.container,wi=_this$container.scrollLeft,Jo=_this$container.clientWidth;(this._scrollMode===ta.ScrollMode.HORIZONTAL||rn<wi||Oe>wi+Jo)&&(fe={left:0,top:0})}(0,ta.scrollIntoView)(Me,fe),!this._currentScaleValue&&this._location&&(this._location=null)},se=new WeakSet,be=function be(ia){return ia===this._currentScale||Math.abs(ia-this._currentScale)<1e-15},Ae=new WeakSet,ze=function ze(ia,fe,_ref216){var _this281=this;var _ref216$noScroll=_ref216.noScroll,Me=_ref216$noScroll===void 0?!1:_ref216$noScroll,_ref216$preset=_ref216.preset,kr=_ref216$preset===void 0?!1:_ref216$preset,_ref216$drawingDelay=_ref216.drawingDelay,rn=_ref216$drawingDelay===void 0?-1:_ref216$drawingDelay;if(this._currentScaleValue=fe.toString(),D(this,se,be).call(this,ia)){kr&&this.eventBus.dispatch("scalechanging",{source:this,scale:ia,presetValue:fe});return}this.viewer.style.setProperty("--scale-factor",ia*Ke.PixelsPerInch.PDF_TO_CSS_UNITS);var Oe=rn>=0&&rn<1e3;if(this.refresh(!0,{scale:ia,drawingDelay:Oe?rn:-1}),Oe&&A(this,ro,setTimeout(function(){A(_this281,ro,null),_this281.refresh()},rn)),this._currentScale=ia,!Me){var wi=this._currentPageNumber,Jo;this._location&&!(this.isInPresentationMode||this.isChangingPresentationMode)&&(wi=this._location.pageNumber,Jo=[null,{name:"XYZ"},this._location.left,this._location.top,null]),this.scrollPageIntoView({pageNumber:wi,destArray:Jo,allowNegativeOffset:!0})}this.eventBus.dispatch("scalechanging",{source:this,scale:ia,presetValue:kr?fe:void 0}),this.defaultRenderingQueue&&this.update()},pi=new WeakSet,io=function io(){return this._spreadMode!==ta.SpreadMode.NONE&&this._scrollMode!==ta.ScrollMode.HORIZONTAL?2:1},Qr=new WeakSet,Es=function Es(ia,fe){var Me=parseFloat(ia);if(Me>0)fe.preset=!1,D(this,Ae,ze).call(this,Me,ia,fe);else{var _ref217;var kr=this._pages[this._currentPageNumber-1];if(!kr)return;var rn=ta.SCROLLBAR_PADDING,Oe=ta.VERTICAL_PADDING;this.isInPresentationMode?(rn=Oe=4,this._spreadMode!==ta.SpreadMode.NONE&&(rn*=2)):this.removePageBorders?rn=Oe=0:this._scrollMode===ta.ScrollMode.HORIZONTAL&&(_ref217=[Oe,rn],rn=_ref217[0],Oe=_ref217[1],_ref217);var wi=(this.container.clientWidth-rn)/kr.width*kr.scale/h(this,pi,io),Jo=(this.container.clientHeight-Oe)/kr.height*kr.scale;switch(ia){case"page-actual":Me=1;break;case"page-width":Me=wi;break;case"page-height":Me=Jo;break;case"page-fit":Me=Math.min(wi,Jo);break;case"auto":var xl=(0,ta.isPortraitOrientation)(kr)?wi:Math.min(Jo,wi);Me=Math.min(ta.MAX_AUTO_SCALE,xl);break;default:console.error("#setScale: \"".concat(ia,"\" is an unknown zoom value."));return}fe.preset=!0,D(this,Ae,ze).call(this,Me,ia,fe)}},nl=new WeakSet,Cr=function Cr(){var ia=this._pages[this._currentPageNumber-1];this.isInPresentationMode&&D(this,Qr,Es).call(this,this._currentScaleValue,{noScroll:!0}),D(this,pe,ue).call(this,ia)},$l=new WeakSet,_l=function(){var _ref218=_asyncToGenerator(_regeneratorRuntime().mark(function _callee148(ia){var fe,Me,kr;return _regeneratorRuntime().wrap(function _callee148$(_context150){while(1)switch(_context150.prev=_context150.next){case 0:if(!ia.pdfPage){_context150.next=2;break}return _context150.abrupt("return",ia.pdfPage);case 2:_context150.prev=2;_context150.next=5;return this.pdfDocument.getPage(ia.id);case 5:kr=_context150.sent;return _context150.abrupt("return",(ia.pdfPage||ia.setPdfPage(kr),(Me=(fe=this.linkService)._cachedPageNumber)!=null&&Me.call(fe,kr.ref)||this.linkService.cachePageRef(ia.id,kr.ref),kr));case 9:_context150.prev=9;_context150.t0=_context150["catch"](2);return _context150.abrupt("return",(console.error("Unable to get page for page view",_context150.t0),null));case 12:case"end":return _context150.stop()}},_callee148,this,[[2,9]])}));return function _l(_x118){return _ref218.apply(this,arguments)}}(),Ih=new WeakSet,Rh=function Rh(ia){var fe,Me;if(((fe=ia.first)==null?void 0:fe.id)===1)return!0;if(((Me=ia.last)==null?void 0:Me.id)===this.pagesCount)return!1;switch(this._scrollMode){case ta.ScrollMode.PAGE:return h(this,Xe).scrollDown;case ta.ScrollMode.HORIZONTAL:return this.scroll.right}return this.scroll.down},Th=new WeakSet,$s=function $s(){var ia=arguments.length>0&&arguments[0]!==undefined?arguments[0]:this.container.clientHeight;ia!==h(this,ve)&&(A(this,ve,ia),ta.docStyle.setProperty("--viewer-container-height","".concat(ia,"px")))},Dr=new WeakSet,Xi=function Xi(ia){var _iterator207=_createForOfIteratorHelper(ia),_step207;try{for(_iterator207.s();!(_step207=_iterator207.n()).done;){var fe=_step207.value;if(fe.target===this.container){D(this,Th,$s).call(this,Math.floor(fe.borderBoxSize[0].blockSize)),A(this,re,null);break}}}catch(err){_iterator207.e(err)}finally{_iterator207.f()}},it.PDFViewer=Kh},function(J,it,nt){Object.defineProperty(it,"__esModule",{value:!0}),it.PDFRenderingQueue=void 0;var ot=nt(4),dt=nt(2);var Mt=3e4;var Ot=function(){function Ot(){var _this282=this;_classCallCheck(this,Ot);this.pdfViewer=null,this.pdfThumbnailViewer=null,this.onIdle=null,this.highestPriorityPage=null,this.idleTimeout=null,this.printing=!1,this.isThumbnailViewEnabled=!1,Object.defineProperty(this,"hasViewer",{value:function value(){return!!_this282.pdfViewer}})}_createClass(Ot,[{key:"setViewer",value:function setViewer(Ut){this.pdfViewer=Ut}},{key:"setThumbnailViewer",value:function setThumbnailViewer(Ut){this.pdfThumbnailViewer=Ut}},{key:"isHighestPriority",value:function isHighestPriority(Ut){return this.highestPriorityPage===Ut.renderingId}},{key:"renderHighestPriority",value:function renderHighestPriority(Ut){var te;this.idleTimeout&&(clearTimeout(this.idleTimeout),this.idleTimeout=null),!this.pdfViewer.forceRendering(Ut)&&(this.isThumbnailViewEnabled&&(te=this.pdfThumbnailViewer)!=null&&te.forceRendering()||this.printing||this.onIdle&&(this.idleTimeout=setTimeout(this.onIdle.bind(this),Mt)))}},{key:"getHighestPriority",value:function getHighestPriority(Ut,te,qt){var ie=arguments.length>3&&arguments[3]!==undefined?arguments[3]:!1;var re=Ut.views,ne=re.length;if(ne===0)return null;for(var ve=0;ve<ne;ve++){var _e=re[ve].view;if(!this.isViewFinished(_e))return _e}var ae=Ut.first.id,Bt=Ut.last.id;if(Bt-ae+1>ne){var _ve3=Ut.ids;for(var _e7=1,Xe=Bt-ae;_e7<Xe;_e7++){var He=qt?ae+_e7:Bt-_e7;if(_ve3.has(He))continue;var ro=te[He-1];if(!this.isViewFinished(ro))return ro}}var Wt=qt?Bt:ae-2,oe=te[Wt];return oe&&!this.isViewFinished(oe)||ie&&(Wt+=qt?1:-1,oe=te[Wt],oe&&!this.isViewFinished(oe))?oe:null}},{key:"isViewFinished",value:function isViewFinished(Ut){return Ut.renderingState===dt.RenderingStates.FINISHED}},{key:"renderView",value:function renderView(Ut){var _this283=this;switch(Ut.renderingState){case dt.RenderingStates.FINISHED:return!1;case dt.RenderingStates.PAUSED:this.highestPriorityPage=Ut.renderingId,Ut.resume();break;case dt.RenderingStates.RUNNING:this.highestPriorityPage=Ut.renderingId;break;case dt.RenderingStates.INITIAL:this.highestPriorityPage=Ut.renderingId,Ut.draw()["finally"](function(){_this283.renderHighestPriority()})["catch"](function(te){te instanceof ot.RenderingCancelledException||console.error("renderView: \"".concat(te,"\""))});break}return!0}}]);return Ot}();it.PDFRenderingQueue=Ot}],B={};function Q(J){var it=B[J];if(it!==void 0)return it.exports;var nt=B[J]={exports:{}};return s[J](nt,nt.exports,Q),nt.exports}var Y={};return function(){var J=Y;Object.defineProperty(J,"__esModule",{value:!0}),Object.defineProperty(J,"AnnotationLayerBuilder",{enumerable:!0,get:function get(){return dt.AnnotationLayerBuilder}}),Object.defineProperty(J,"DownloadManager",{enumerable:!0,get:function get(){return Mt.DownloadManager}}),Object.defineProperty(J,"EventBus",{enumerable:!0,get:function get(){return Ot.EventBus}}),Object.defineProperty(J,"FindState",{enumerable:!0,get:function get(){return it.FindState}}),Object.defineProperty(J,"GenericL10n",{enumerable:!0,get:function get(){return Qt.GenericL10n}}),Object.defineProperty(J,"LinkTarget",{enumerable:!0,get:function get(){return nt.LinkTarget}}),Object.defineProperty(J,"NullL10n",{enumerable:!0,get:function get(){return Ut.NullL10n}}),Object.defineProperty(J,"PDFFindController",{enumerable:!0,get:function get(){return it.PDFFindController}}),Object.defineProperty(J,"PDFHistory",{enumerable:!0,get:function get(){return te.PDFHistory}}),Object.defineProperty(J,"PDFLinkService",{enumerable:!0,get:function get(){return nt.PDFLinkService}}),Object.defineProperty(J,"PDFPageView",{enumerable:!0,get:function get(){return qt.PDFPageView}}),Object.defineProperty(J,"PDFScriptingManager",{enumerable:!0,get:function get(){return ie.PDFScriptingManager}}),Object.defineProperty(J,"PDFSinglePageViewer",{enumerable:!0,get:function get(){return re.PDFSinglePageViewer}}),Object.defineProperty(J,"PDFViewer",{enumerable:!0,get:function get(){return ne.PDFViewer}}),Object.defineProperty(J,"ProgressBar",{enumerable:!0,get:function get(){return ot.ProgressBar}}),Object.defineProperty(J,"RenderingStates",{enumerable:!0,get:function get(){return ot.RenderingStates}}),Object.defineProperty(J,"ScrollMode",{enumerable:!0,get:function get(){return ot.ScrollMode}}),Object.defineProperty(J,"SimpleLinkService",{enumerable:!0,get:function get(){return nt.SimpleLinkService}}),Object.defineProperty(J,"SpreadMode",{enumerable:!0,get:function get(){return ot.SpreadMode}}),Object.defineProperty(J,"StructTreeLayerBuilder",{enumerable:!0,get:function get(){return ae.StructTreeLayerBuilder}}),Object.defineProperty(J,"TextLayerBuilder",{enumerable:!0,get:function get(){return Bt.TextLayerBuilder}}),Object.defineProperty(J,"XfaLayerBuilder",{enumerable:!0,get:function get(){return Wt.XfaLayerBuilder}}),Object.defineProperty(J,"parseQueryString",{enumerable:!0,get:function get(){return ot.parseQueryString}});var it=Q(1),nt=Q(5),ot=Q(2),dt=Q(6),Mt=Q(8),Ot=Q(9),Qt=Q(10),Ut=Q(7),te=Q(12),qt=Q(13),ie=Q(21),re=Q(24),ne=Q(25),ae=Q(16),Bt=Q(19),Wt=Q(20)}(),Y}()})})(ym);var yl=ym.exports,Ex=Object.defineProperty,Sx=Object.getOwnPropertyDescriptor,_d=function _d(r,o,s,B){for(var Q=B>1?void 0:B?Sx(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&Ex(o,s,Q),Q};var qa=function(_le30){_inherits(qa,_le30);function qa(){var _this284;_classCallCheck(this,qa);_this284=_callSuper(this,qa,arguments),_this284.DEFAULT_SCALE_DELTA=1.1,_this284.MAX_SCALE=3,_this284.MIN_SCALE=0.2,_this284.SEARCH_FOR="",_this284.ENABLE_XFA=!0,_this284.CMAP_PACKED=!0,_this284.pageNumberRef=Re(),_this284.totalPagesRef=Re(),_this284.zoomLevelRef=Re(),_this284.viewerContainerRef=Re(),_this284.pdfEventBus=new yl.EventBus,_this284.pdfLinkService=new yl.PDFLinkService({eventBus:_this284.pdfEventBus}),_this284.pdfFindController=new yl.PDFFindController({eventBus:_this284.pdfEventBus,linkService:_this284.pdfLinkService});return _this284}_createClass(qa,[{key:"setScale",value:function setScale(r){this.pdfViewer.currentScaleValue=typeof r=="number"?r.toFixed(2):r}},{key:"setPage",value:function setPage(r){this.pdfViewer.currentPageNumber=r}},{key:"updatePage",value:function updatePage(){if(this.pdfViewer&&this.pageNumberRef.value){var _r5=parseInt(this.pageNumberRef.value.value);isNaN(_r5)?this.setPage(this.pdfViewer.currentPageNumber):_r5>this.pdfViewer.pagesCount?this.setPage(this.pdfViewer.pagesCount):_r5<=0?this.setPage(1):this.setPage(_r5)}}},{key:"select",value:function select(r){var o=r.target;o&&o.setSelectionRange(0,o.value.length)}},{key:"fitToPage",value:function fitToPage(){this.setScale("page-fit")}},{key:"fitToWidth",value:function fitToWidth(){this.setScale("page-width")}},{key:"zoomIn",value:function zoomIn(){if(this.pdfViewer){var _r6=this.pdfViewer.currentScale,o=1;do _r6=_r6*this.DEFAULT_SCALE_DELTA,_r6=Math.floor(_r6*10)/10,_r6=Math.min(this.MAX_SCALE,_r6);while(--o>0&&_r6<this.MAX_SCALE);this.setScale(_r6)}}},{key:"zoomOut",value:function zoomOut(){if(this.pdfViewer){var _r7=this.pdfViewer.currentScale,o=1;do _r7=_r7/this.DEFAULT_SCALE_DELTA,_r7=Math.floor(_r7*10)/10,_r7=Math.max(this.MIN_SCALE,_r7);while(--o>0&&_r7>this.MIN_SCALE);this.setScale(_r7)}}},{key:"updateZoom",value:function updateZoom(){if(this.pdfViewer&&this.zoomLevelRef.value){var _r8=parseFloat(this.zoomLevelRef.value.value.replace("%",""));isNaN(_r8)?this.setScale(this.pdfViewer.currentScale+1e-4):this.setScale(_r8/100)}}},{key:"clearDocument",value:function clearDocument(){var r,o;try{(r=this.loadingTask)==null||r.destroy()}catch(_unused32){}try{(o=this.pdfViewer)==null||o.setDocument(null)}catch(_unused33){}try{this.pdfLinkService.setDocument(null,null)}catch(_unused34){}}},{key:"willUpdate",value:function willUpdate(r){r.has("weavyContext")&&this.weavyContext&&(this.WORKER_URL||(this.WORKER_URL=new URL("/js/pdf.worker.min.js",this.weavyContext.url),pdfjsLib.GlobalWorkerOptions.workerSrc=this.WORKER_URL.toString()),this.CMAP_URL||(this.CMAP_URL=new URL("/cmaps/",this.weavyContext.url)))}},{key:"update",value:function update(r){var _this285=this;var o;_get(_getPrototypeOf(qa.prototype),"update",this).call(this,r),(r.has("weavyContext")||r.has("src")||r.has("pdfViewer"))&&this.weavyContext&&this.src&&this.pdfViewer&&(this.loadingTask=pdfjsLib.getDocument({url:this.src,enableXfa:this.ENABLE_XFA,cMapUrl:((o=this.CMAP_URL)==null?void 0:o.toString())||"",cMapPacked:this.CMAP_PACKED}),this.loadingTask.promise.then(function(s){_this285.pdfViewer.setDocument(s),_this285.pdfLinkService.setDocument(s,null)}))}},{key:"updated",value:function updated(){var _this286=this;this.weavyContext&&this.viewerContainerRef.value&&!this.pdfViewer&&(this.pdfViewer=new yl.PDFViewer({container:this.viewerContainerRef.value,eventBus:this.pdfEventBus,linkService:this.pdfLinkService,findController:this.pdfFindController,annotationEditorMode:pdfjsLib.AnnotationEditorType.DISABLE}),this.pdfLinkService.setViewer(this.pdfViewer),this.pdfEventBus.on("scalechanging",function(){_this286.zoomLevelRef.value.value=Math.round(_this286.pdfViewer.currentScale*100).toFixed(0)+"%"}),this.pdfEventBus.on("pagechanging",function(){_this286.pageNumberRef.value.value=_this286.pdfViewer.currentPageNumber.toFixed(0)}),this.pdfEventBus.on("pagesinit",function(){_this286.isConnected&&(_this286.pdfViewer.currentScaleValue="auto",_this286.pageNumberRef.value.value="1",_this286.totalPagesRef.value.innerText=_this286.pdfViewer.pagesCount.toFixed(0),_this286.SEARCH_FOR&&(_this286.pdfFindController&&!("_onFind"in _this286.pdfFindController)?_this286.pdfFindController.executeCommand("find",{query:_this286.SEARCH_FOR}):_this286.pdfEventBus.dispatch("find",{type:"",query:_this286.SEARCH_FOR})))}))}},{key:"render",value:function render(){return v(_templateObject96||(_templateObject96=_taggedTemplateLiteral(["\n <div class=\"wy-content-pdf\">\n <div class=\"wy-toolbars-bottom\">\n <nav class=\"wy-toolbar wy-toolbar-center\">\n <div class=\"wy-toolbar-buttons\">\n <input\n type=\"text\"\n class=\"wy-input\"\n ","\n @keyup=","\n @change=","\n @click=","\n data-pdf-target=\"pageNumber\"\n />\n <span class=\"wy-toolbar-text\">/</span>\n <span class=\"wy-toolbar-text\" ",">1</span>\n </div>\n <div class=\"wy-toolbar-buttons\">\n <button class=\"wy-button wy-button-icon btn-zoom-out\" @click="," title=","\n ><wy-icon name=\"minus\"></wy-icon\n ></button>\n <input\n type=\"text\"\n class=\"wy-input\"\n ","\n @keyup=","\n @change=","\n @click=","\n value=\"100%\"\n data-pdf-target=\"zoomLevel\"\n />\n <button class=\"wy-button wy-button-icon btn-zoom-in\" @click="," title=","\n ><wy-icon name=\"plus\"></wy-icon\n ></button>\n </div>\n <div class=\"wy-toolbar-buttons\">\n <button\n class=\"wy-button wy-button-icon btn-fit-page\"\n @click=","\n title=","\n ><wy-icon name=\"fit-width\"></wy-icon\n ></button>\n <button class=\"wy-button wy-button-icon\" @click="," title=","\n ><wy-icon name=\"fit-screen\"></wy-icon\n ></button>\n </div>\n </nav>\n </div>\n <div "," class=\"wy-pdf-container\">\n <div id=\"viewer\" class=\"pdfViewer\"></div>\n </div>\n </div>\n "])),Ce(this.pageNumberRef),ql,this.updatePage,this.select,Ce(this.totalPagesRef),this.zoomOut,K$1("Zoom out"),Ce(this.zoomLevelRef),ql,this.updateZoom,this.select,this.zoomIn,K$1("Zoom in"),this.fitToWidth,K$1("Fit to width"),this.fitToPage,K$1("Fit to screen"),Ce(this.viewerContainerRef))}},{key:"disconnectedCallback",value:function disconnectedCallback(){var r;try{this.clearDocument(),(r=this.pdfViewer)==null||r.cleanup()}catch(_unused35){}this.pdfViewer=void 0,_get(_getPrototypeOf(qa.prototype),"disconnectedCallback",this).call(this)}}]);return qa}(le);qa.styles=[me,Be(_templateObject97||(_templateObject97=_taggedTemplateLiteral(["\n :host {\n display: contents;\n }\n "])))];_d([Ge({context:Le,subscribe:!0}),K()],qa.prototype,"weavyContext",2);_d([m()],qa.prototype,"src",2);_d([K()],qa.prototype,"pdfViewer",2);qa=_d([de("wy-pdf-viewer"),q()],qa);var Px=Object.defineProperty,Ax=Object.getOwnPropertyDescriptor,Qi=function Qi(r,o,s,B){for(var Q=B>1?void 0:B?Ax(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&Px(o,s,Q),Q};var ci=function(_le31){_inherits(ci,_le31);function ci(){var _this287;_classCallCheck(this,ci);_this287=_callSuper(this,ci),_this287.viewerRef=Re(),import(new URL("./es/embedded-confluence-bundle.js",typeof WEAVY_IMPORT_URL=="string"&&(!import.meta.url||!new URL(import.meta.url).href.startsWith(WEAVY_IMPORT_URL))?WEAVY_IMPORT_URL:import.meta.url).href).then(function(r){return r.embeddedConfluenceBundle}).then(function(r){_this287.PageComponent=r.Page});return _this287}_createClass(ci,[{key:"willUpdate",value:function willUpdate(r){var _this$productName;if(r.has("weavyContext")&&this.weavyContext&&((_this$productName=this.productName)!==null&&_this$productName!==void 0?_this$productName:this.productName=this.weavyContext.confluenceProductName),r.has("raw")&&this.raw){var o=JSON.parse(this.raw);this.contentId=o.contentId,this.hostname=o.hostname,this.spaceKey=o.spaceKey}}},{key:"render",value:function render(){return this.productName?v(_templateObject98||(_templateObject98=_taggedTemplateLiteral(["\n <div class=\"wy-confluence-viewer\" ",">\n ","\n </div>\n "])),Ce(this.viewerRef),!this.contentId||!this.PageComponent?v(_templateObject99||(_templateObject99=_taggedTemplateLiteral([" <wy-spinner overlay></wy-spinner> "]))):O):v(_templateObject100||(_templateObject100=_taggedTemplateLiteral(["\n <wy-preview-icon\n src=","\n icon=","\n provider=","\n ></wy-preview-icon>\n "])),et(this.src),this.icon,et(this.src?"Confluence":void 0))}},{key:"updated",value:function(){var _updated2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee149(r){var o,s,B;return _regeneratorRuntime().wrap(function _callee149$(_context151){while(1)switch(_context151.prev=_context151.next){case 0:if(!((r.has("contentId")||r.has("PageComponent")||r.has("productName"))&&this.contentId&&this.viewerRef.value&&this.PageComponent)){_context151.next=20;break}_context151.prev=1;_context151.next=4;return import(new URL("./es/react/index.js",typeof WEAVY_IMPORT_URL=="string"&&(!import.meta.url||!new URL(import.meta.url).href.startsWith(WEAVY_IMPORT_URL))?WEAVY_IMPORT_URL:import.meta.url).href).then(function(B){return B.index});case 4:o=_context151.sent;_context151.next=10;break;case 7:_context151.prev=7;_context151.t0=_context151["catch"](1);console.error("React error",_context151.t0);case 10:_context151.prev=10;_context151.next=13;return import(new URL("./es/react-dom/index.js",typeof WEAVY_IMPORT_URL=="string"&&(!import.meta.url||!new URL(import.meta.url).href.startsWith(WEAVY_IMPORT_URL))?WEAVY_IMPORT_URL:import.meta.url).href).then(function(B){return B.index});case 13:s=_context151.sent;_context151.next=19;break;case 16:_context151.prev=16;_context151.t1=_context151["catch"](10);console.error("ReactDOM error",_context151.t1);case 19:if(o&&s){B=o.createElement(this.PageComponent,{contentId:this.contentId,locale:"en-US",hostname:this.hostname,parentProduct:this.productName,spaceKey:this.spaceKey,themeState:""},null);s.render(B,this.viewerRef.value)}case 20:case"end":return _context151.stop()}},_callee149,this,[[1,7],[10,16]])}));function updated(_x119){return _updated2.apply(this,arguments)}return updated}()}]);return ci}(le);ci.styles=[me,Be(_templateObject101||(_templateObject101=_taggedTemplateLiteral(["\n :host {\n display: contents;\n }\n\n .wy-confluence-viewer {\n display: contents;\n }\n\n .wy-confluence-viewer > * {\n border: none;\n flex: 1;\n }\n "])))];Qi([Ge({context:Le,subscribe:!0}),K()],ci.prototype,"weavyContext",2);Qi([m()],ci.prototype,"src",2);Qi([m()],ci.prototype,"icon",2);Qi([m()],ci.prototype,"raw",2);Qi([m()],ci.prototype,"productName",2);Qi([K()],ci.prototype,"contentId",2);Qi([K()],ci.prototype,"hostname",2);Qi([K()],ci.prototype,"spaceKey",2);Qi([K()],ci.prototype,"PageComponent",2);ci=Qi([de("wy-confluence-viewer")],ci);var Lx=Object.defineProperty,Mx=Object.getOwnPropertyDescriptor,xd=function xd(r,o,s,B){for(var Q=B>1?void 0:B?Mx(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&Lx(o,s,Q),Q};var Qa=function(_le32){_inherits(Qa,_le32);function Qa(){var _this288;_classCallCheck(this,Qa);_this288=_callSuper(this,Qa,arguments),_this288.availableFeatures=[],_this288.features={};return _this288}_createClass(Qa,[{key:"render",value:function render(){var r=this.file;if(!r)return O;var _Zn3=Zn(r.name),o=_Zn3.icon,s=Li(r.name);var B=r.preview_url||r.download_url||"";r.preview_format==="image"&&(s===".gif"||s===".svg")&&(B=r.download_url||"");var Q=B,Y=r.external_url,J=r.is_trashed?"none":r.preview_format,it=r.name,nt=r.width,ot=r.height,dt=r.media_type,Mt=r.provider,Ot=r.raw;return J==="image"?v(_templateObject102||(_templateObject102=_taggedTemplateLiteral(["<wy-preview-image src="," width="," height=","></wy-preview-image>"])),Q,et(nt),et(ot)):J==="pdf"?v(_templateObject103||(_templateObject103=_taggedTemplateLiteral(["<wy-pdf-viewer src=","></wy-pdf-viewer>"])),Q):J==="video"||J==="audio"?v(_templateObject104||(_templateObject104=_taggedTemplateLiteral(["<wy-preview-media\n format=","\n src=","\n name=","\n mediaType=","></wy-preview-media>"])),J,Q,it,dt):J==="text"?v(_templateObject105||(_templateObject105=_taggedTemplateLiteral(["<wy-preview-text src=","></wy-preview-text>"])),Q):J==="code"?v(_templateObject106||(_templateObject106=_taggedTemplateLiteral(["<wy-preview-text src="," ?html="," code></wy-preview-text>"])),Q,!/^(?:blob:|data:)/.test(Q)):J==="html"?v(_templateObject107||(_templateObject107=_taggedTemplateLiteral(["<wy-preview-text src="," html></wy-preview-text>"])),Q):J==="embed"?v(_templateObject108||(_templateObject108=_taggedTemplateLiteral(["<wy-preview-embed src="," name="," icon="," provider=","></wy-preview-embed>"])),Q,it,o,et(Mt)):J==="none"?Mt==="Confluence"&&Ot?v(_templateObject109||(_templateObject109=_taggedTemplateLiteral(["<wy-confluence-viewer src="," icon="," raw=","></wy-confluence-viewer>"])),et(Y),o,Ot):Y?v(_templateObject110||(_templateObject110=_taggedTemplateLiteral(["<wy-preview-icon src="," icon="," provider=","></wy-preview-icon>"])),Y,o,et(Mt)):v(_templateObject111||(_templateObject111=_taggedTemplateLiteral(["<wy-preview-icon src="," icon=","></wy-preview-icon>"])),Q,o):O}}]);return Qa}(le);Qa.styles=[me,Be(_templateObject112||(_templateObject112=_taggedTemplateLiteral(["\n :host {\n display: contents;\n }\n "])))];xd([m({type:Object})],Qa.prototype,"file",2);xd([m({type:Array})],Qa.prototype,"availableFeatures",2);xd([m({type:Object})],Qa.prototype,"features",2);Qa=xd([de("wy-preview-item")],Qa);function Fs(){var r=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"";var o=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"";var s=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"";var B=arguments.length>3&&arguments[3]!==undefined?arguments[3]:!1;if(r){var Q=document.createElement("a");B&&(/^(data:|blob:)/.test(r)?Q.download=s||"download":r=r.includes("?d=1")||r.includes("&d=1")?r:r.includes("?")?r+"&d=1":r+"?d=1"),o&&(Q.target=o),Q.href=r,document.body.appendChild(Q);try{Q.click()}catch(_unused36){if(console.warn("Could not open link normally, trying fallback"),/^(?:blob:|data:)/.test(r))console.error("Could not ".concat(B?"download":"open"," ").concat(s));else try{window.open(r,o)}catch(_unused37){console.error("Could not ".concat(B?"download":"open"," ").concat(s))}}document.body.removeChild(Q)}}var Ox=Object.defineProperty,Ix=Object.getOwnPropertyDescriptor,hs=function hs(r,o,s,B){for(var Q=B>1?void 0:B?Ix(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&Ox(o,s,Q),Q};var jo=function(_le33){_inherits(jo,_le33);function jo(){var _this289;_classCallCheck(this,jo);_this289=_callSuper(this,jo,arguments),_this289.availableFeatures=[],_this289.features={},_this289.noWrapper=!1,_this289.hasEventListener={"edit-name":!1,subscribe:!1,trash:!1,restore:!1,"delete-forever":!1};return _this289}_createClass(jo,[{key:"addEventListener",value:function addEventListener(r,o,s){var B=r;Object.prototype.hasOwnProperty.call(this.hasEventListener,B)&&Object.assign(this.hasEventListener,_defineProperty({},B,!0)),_get(_getPrototypeOf(jo.prototype),"addEventListener",this).call(this,r,o,s)}},{key:"triggerDownload",value:function triggerDownload(){this.file&&Fs(this.file.download_url,"_top",this.file.name,!0)}},{key:"triggerExternal",value:function triggerExternal(){this.file&&Fs(this.file.external_url,"_blank",this.file.name)}},{key:"triggerApplication",value:function triggerApplication(){this.file&&Fs(this.file.application_url,"_top",this.file.name)}},{key:"dispatchEditName",value:function dispatchEditName(){var r=new CustomEvent("edit-name",{detail:{file:this.file}});return this.dispatchEvent(r)}},{key:"dispatchSubscribe",value:function dispatchSubscribe(r){var o=new CustomEvent("subscribe",{detail:{file:this.file,subscribe:r}});return this.dispatchEvent(o)}},{key:"dispatchTrash",value:function dispatchTrash(){var r=new CustomEvent("trash",{detail:{file:this.file}});return this.dispatchEvent(r)}},{key:"dispatchRestore",value:function dispatchRestore(){var r=new CustomEvent("restore",{detail:{file:this.file}});return this.dispatchEvent(r)}},{key:"dispatchDeleteForever",value:function dispatchDeleteForever(){var r=new CustomEvent("delete-forever",{detail:{file:this.file}});return this.dispatchEvent(r)}},{key:"render",value:function render(){var _this290=this;var r;if(!this.file)return O;var _Zn4=Zn(this.file.name),o=_Zn4.icon,s=this.file.id>=1,B=this.file.provider,Q=this.file.provider||"app";return v(_templateObject113||(_templateObject113=_taggedTemplateLiteral(["\n <wy-dropdown directionX=\"left\" ?noWrapper=",">\n ","\n ","\n <slot></slot>\n </wy-dropdown>\n "])),this.noWrapper,s&&this.file.is_trashed?v(_templateObject114||(_templateObject114=_taggedTemplateLiteral(["\n ","\n ","\n ","\n "])),this.hasEventListener.restore?v(_templateObject115||(_templateObject115=_taggedTemplateLiteral(["\n <wy-dropdown-item @click=",">\n <wy-icon name=\"delete-restore\"></wy-icon>\n ","\n </wy-dropdown-item>\n "])),function(){return _this290.dispatchRestore()},K$1("Restore")):O,this.hasEventListener.restore&&this.hasEventListener["delete-forever"]?v(_templateObject116||(_templateObject116=_taggedTemplateLiteral([" <wy-dropdown-divider></wy-dropdown-divider> "]))):O,this.hasEventListener["delete-forever"]?v(_templateObject117||(_templateObject117=_taggedTemplateLiteral(["\n <wy-dropdown-item @click=",">\n <wy-icon name=\"delete-forever\"></wy-icon>\n ","\n </wy-dropdown-item>\n "])),function(){return _this290.dispatchDeleteForever()},K$1("Delete")):O):O,this.file.is_trashed?O:v(_templateObject118||(_templateObject118=_taggedTemplateLiteral(["\n ","\n ","\n "])),this.file.external_url?v(_templateObject119||(_templateObject119=_taggedTemplateLiteral(["\n <wy-dropdown-item @click=",">\n <wy-icon name=","></wy-icon>\n ","\n </wy-dropdown-item>\n "])),function(){return _this290.triggerExternal()},o,K$1(c(_templateObject120||(_templateObject120=_taggedTemplateLiteral(["Open in ",""])),B))):v(_templateObject121||(_templateObject121=_taggedTemplateLiteral(["\n ","\n <wy-dropdown-item @click=",">\n <wy-icon name=\"download\"></wy-icon>\n ","\n </wy-dropdown-item>\n "])),this.file.application_url&&Pe(this.availableFeatures,Ee.WebDAV,(r=this.features)==null?void 0:r.webDAV)?v(_templateObject122||(_templateObject122=_taggedTemplateLiteral(["\n <wy-dropdown-item @click=",">\n <wy-icon name=","></wy-icon>\n ","\n </wy-dropdown-item>\n "])),function(){return _this290.triggerApplication()},this.file.provider?Pf(this.file.provider):o,K$1(c(_templateObject123||(_templateObject123=_taggedTemplateLiteral(["Open in ",""])),Q))):O,function(){return _this290.triggerDownload()},K$1("Download")),s?v(_templateObject124||(_templateObject124=_taggedTemplateLiteral(["\n ","\n ","\n ","\n "])),this.hasEventListener["edit-name"]?v(_templateObject125||(_templateObject125=_taggedTemplateLiteral(["\n <wy-dropdown-item @click=",">\n <wy-icon name=\"textbox\"></wy-icon>\n ","\n </wy-dropdown-item>\n "])),function(){return _this290.dispatchEditName()},K$1("Rename")):O,this.hasEventListener.subscribe?this.file.is_subscribed?v(_templateObject126||(_templateObject126=_taggedTemplateLiteral(["\n <wy-dropdown-item @click=",">\n <wy-icon name=\"bell-off\"></wy-icon>\n ","\n </wy-dropdown-item>\n "])),function(){return _this290.dispatchSubscribe(!1)},K$1("Unsubscribe")):v(_templateObject127||(_templateObject127=_taggedTemplateLiteral(["\n <wy-dropdown-item @click=",">\n <wy-icon name=\"bell\"></wy-icon>\n ","\n </wy-dropdown-item>\n "])),function(){return _this290.dispatchSubscribe(!0)},K$1("Subscribe")):O,this.hasEventListener.trash?v(_templateObject128||(_templateObject128=_taggedTemplateLiteral(["\n <wy-dropdown-divider></wy-dropdown-divider>\n <wy-dropdown-item @click=",">\n <wy-icon name=\"delete\"></wy-icon>\n ","\n </wy-dropdown-item>\n "])),function(){return _this290.dispatchTrash()},K$1("Trash")):O):O))}}]);return jo}(le);hs([m({type:Object})],jo.prototype,"file",2);hs([m({type:Array})],jo.prototype,"availableFeatures",2);hs([m({type:Object})],jo.prototype,"features",2);hs([m({converter:md})],jo.prototype,"noWrapper",2);hs([m({type:Object})],jo.prototype,"hasEventListener",2);jo=hs([de("wy-file-menu"),q()],jo);function Tx(r,o,s){var B=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};return _objectSpread(_objectSpread({},B),{},{initialPageParam:0,queryKey:["comments",s],queryFn:function(){var _queryFn6=_asyncToGenerator(_regeneratorRuntime().mark(function _callee150(Q){var Y,J,it;return _regeneratorRuntime().wrap(function _callee150$(_context152){while(1)switch(_context152.prev=_context152.next){case 0:Y=Q.pageParam;J="/api/"+o+"/"+s+"/comments?orderby=createdat+asc&skip="+Y+"&top=25";_context152.next=4;return r.get(J);case 4:_context152.next=6;return _context152.sent.json();case 6:it=_context152.sent;return _context152.abrupt("return",(it.data=it.data||[],it));case 8:case"end":return _context152.stop()}},_callee150)}));function queryFn(_x120){return _queryFn6.apply(this,arguments)}return queryFn}(),getNextPageParam:function getNextPageParam(Q,Y){if((Q==null?void 0:Q.end)<(Q==null?void 0:Q.count))return Y.length*25}})}function Rx(r,o){return{mutationFn:function(){var _mutationFn5=_asyncToGenerator(_regeneratorRuntime().mark(function _callee151(s){return _regeneratorRuntime().wrap(function _callee151$(_context153){while(1)switch(_context153.prev=_context153.next){case 0:_context153.next=2;return r.post("/api/comments/"+s.id,"PATCH",JSON.stringify({text:s.text,blobs:s.blobs,attachments:s.attachments,meeting_id:s.meetingId,options:s.pollOptions.filter(function(B){return B.text.trim()!==""}).map(function(B){return{id:B.id,text:B.text}}),embed_id:s.embed||null}));case 2:return _context153.abrupt("return",_context153.sent.json());case 3:case"end":return _context153.stop()}},_callee151)}));function mutationFn(_x121){return _mutationFn5.apply(this,arguments)}return mutationFn}(),mutationKey:o,onSuccess:function onSuccess(s,B){B.id&&tt(r.queryClient,["comments",B.parentId],B.id,function(Q){Q.text=s.text,Q.html=s.html,Q.attachment_ids=s.attachment_ids,Q.attachments=s.attachments,Q.meeting=s.meeting,Q.meeting_id=s.meeting_id,Q.modified_at=s.modified_at,Q.modified_by=s.modified_by,Q.options=s.options,Q.embed=s.embed})}}}function Dx(r,o){var s=r.queryClient;return{mutationFn:function(){var _mutationFn6=_asyncToGenerator(_regeneratorRuntime().mark(function _callee152(B){return _regeneratorRuntime().wrap(function _callee152$(_context154){while(1)switch(_context154.prev=_context154.next){case 0:_context154.next=2;return r.post("/api/"+B.type+"/"+B.parentId+"/comments","POST",JSON.stringify({text:B.text,blobs:B.blobs,meeting_id:B.meetingId,options:B.pollOptions.filter(function(Q){return Q.text.trim()!==""}).map(function(Q){return{text:Q.text}}),embed_id:B.embed}));case 2:return _context154.abrupt("return",_context154.sent.json());case 3:case"end":return _context154.stop()}},_callee152)}));function mutationFn(_x122){return _mutationFn6.apply(this,arguments)}return mutationFn}(),mutationKey:o,onMutate:function(){var _onMutate2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee153(B){var Q,Y;return _regeneratorRuntime().wrap(function _callee153$(_context155){while(1)switch(_context155.prev=_context155.next){case 0:_context155.next=2;return s.cancelQueries({queryKey:["comments",B.parentId]});case 2:Q=Math.random(),Y={id:Q,app_id:-1,attachment_ids:[],is_trashed:!1,text:B.text,html:B.text,plain:B.text,temp:!0,created_by_id:B.user.id,created_by:{id:B.user.id,avatar_url:B.user.avatar_url,display_name:B.user.display_name,presence:void 0,name:B.user.name},created_at:(new Date()).toUTCString(),attachments:[],reactions:[]};return _context155.abrupt("return",(sn(s,["comments",B.parentId],Y,void 0,{descending:!1}),{tempId:Q}));case 4:case"end":return _context155.stop()}},_callee153)}));function onMutate(_x123){return _onMutate2.apply(this,arguments)}return onMutate}(),onSuccess:function onSuccess(B,Q,Y){sn(s,["comments",Q.parentId],B,Y.tempId,{descending:!1}),tt(s,[Q.type,Q.appId],Q.parentId,function(J){J.comment_count=(J.comment_count||0)+1})}}}function Fx(r,o){var s=r.queryClient,B={mutationKey:["comments",o],mutationFn:function(){var _mutationFn7=_asyncToGenerator(_regeneratorRuntime().mark(function _callee154(_ref219){var Q;return _regeneratorRuntime().wrap(function _callee154$(_context156){while(1)switch(_context156.prev=_context156.next){case 0:Q=_ref219.id;_context156.next=3;return r.post("/api/comments/"+Q+"/trash","POST","");case 3:return _context156.abrupt("return",_context156.sent.json());case 4:case"end":return _context156.stop()}},_callee154)}));function mutationFn(_x124){return _mutationFn7.apply(this,arguments)}return mutationFn}(),onMutate:function(){var _onMutate3=_asyncToGenerator(_regeneratorRuntime().mark(function _callee155(Q){return _regeneratorRuntime().wrap(function _callee155$(_context157){while(1)switch(_context157.prev=_context157.next){case 0:return _context157.abrupt("return",(je(s,{queryKey:B.mutationKey,exact:!1},Q.id,function(Y){return Object.assign(Y,{is_trashed:!0})}),{type:"trash",id:Q.id}));case 1:case"end":return _context157.stop()}},_callee155)}));function onMutate(_x125){return _onMutate3.apply(this,arguments)}return onMutate}(),onSuccess:function onSuccess(Q,Y){je(s,{queryKey:B.mutationKey,exact:!1},Y.id,function(J){return Object.assign(J,Q)}),tt(s,[Y.type,Y.appId],Y.parentId,function(J){J.comment_count=(J.comment_count||1)-1})}};return B}function zx(r,o){return new Ye(r.queryClient,Fx(r,o))}function Nx(r,o){var s=r.queryClient,B={mutationKey:["comments",o],mutationFn:function(){var _mutationFn8=_asyncToGenerator(_regeneratorRuntime().mark(function _callee156(_ref220){var Q,Y,J;return _regeneratorRuntime().wrap(function _callee156$(_context158){while(1)switch(_context158.prev=_context158.next){case 0:Q=_ref220.id;_context158.next=3;return r.post("/api/comments/"+Q+"/restore","POST","");case 3:Y=_context158.sent;if(Y.ok){_context158.next=9;break}_context158.next=7;return Y.json();case 7:J=_context158.sent;throw new Error(J.detail||J.title,{cause:J});case 9:return _context158.abrupt("return",Y.json());case 10:case"end":return _context158.stop()}},_callee156)}));function mutationFn(_x126){return _mutationFn8.apply(this,arguments)}return mutationFn}(),onMutate:function(){var _onMutate4=_asyncToGenerator(_regeneratorRuntime().mark(function _callee157(Q){return _regeneratorRuntime().wrap(function _callee157$(_context159){while(1)switch(_context159.prev=_context159.next){case 0:return _context159.abrupt("return",(je(s,{queryKey:B.mutationKey,exact:!1},Q.id,function(Y){return Object.assign(Y,{is_trashed:!1})}),{type:"restore",file:Q.id}));case 1:case"end":return _context159.stop()}},_callee157)}));function onMutate(_x127){return _onMutate4.apply(this,arguments)}return onMutate}(),onSuccess:function onSuccess(Q,Y){je(s,{queryKey:B.mutationKey,exact:!1},Y.id,function(J){return Object.assign(J,Q)}),tt(s,[Y.type,Y.appId],Y.parentId,function(J){J.comment_count=(J.comment_count||0)+1})}};return B}function Vx(r,o){return new Ye(r.queryClient,Nx(r,o))}function Bx(r,o){var s=r.queryClient,B=o;return{mutationKey:B,mutationFn:function(){var _mutationFn9=_asyncToGenerator(_regeneratorRuntime().mark(function _callee158(_ref221){var Q,Y,J;return _regeneratorRuntime().wrap(function _callee158$(_context160){while(1)switch(_context160.prev=_context160.next){case 0:Q=_ref221.optionId;_context160.next=3;return r.post("/api/options/".concat(Q,"/vote"),"POST","");case 3:Y=_context160.sent;if(Y.ok){_context160.next=9;break}_context160.next=7;return Y.json();case 7:J=_context160.sent;throw new Error(J.detail||J.title,{cause:J});case 9:return _context160.abrupt("return",Y.json());case 10:case"end":return _context160.stop()}},_callee158)}));function mutationFn(_x128){return _mutationFn9.apply(this,arguments)}return mutationFn}(),onMutate:function(){var _onMutate5=_asyncToGenerator(_regeneratorRuntime().mark(function _callee159(Q){return _regeneratorRuntime().wrap(function _callee159$(_context161){while(1)switch(_context161.prev=_context161.next){case 0:return _context161.abrupt("return",(je(s,{queryKey:B},Q.parentId,function(Y){var J;Y.options=(J=Y.options)==null?void 0:J.map(function(it){if(it.has_voted){it.has_voted=!1;var nt=it.vote_count||1;it.vote_count=nt-1}else if(!it.has_voted&&it.id===Q.optionId){it.has_voted=!0;var _nt8=it.vote_count||0;it.vote_count=_nt8+1}return it})}),{id:Q.optionId}));case 1:case"end":return _context161.stop()}},_callee159)}));function onMutate(_x129){return _onMutate5.apply(this,arguments)}return onMutate}(),onSuccess:function(){var _onSuccess=_asyncToGenerator(_regeneratorRuntime().mark(function _callee160(Q,Y){var J;return _regeneratorRuntime().wrap(function _callee160$(_context162){while(1)switch(_context162.prev=_context162.next){case 0:_context162.next=2;return r.get("/api/"+Y.parentType+"/"+Y.parentId);case 2:_context162.next=4;return _context162.sent.json();case 4:J=_context162.sent;je(s,{queryKey:B,exact:!1},Y.parentId,function(it){return Object.assign(it,J)});case 6:case"end":return _context162.stop()}},_callee160)}));function onSuccess(_x130,_x131){return _onSuccess.apply(this,arguments)}return onSuccess}()}}function ly(r,o){return new Ye(r.queryClient,Bx(r,o))}function Hx(r,o){return{queryKey:["votes",o],enabled:!1,queryFn:function(){var _queryFn7=_asyncToGenerator(_regeneratorRuntime().mark(function _callee161(){return _regeneratorRuntime().wrap(function _callee161$(_context163){while(1)switch(_context163.prev=_context163.next){case 0:_context163.next=2;return r.get("/api/options/".concat(o,"/voters"));case 2:_context163.next=4;return _context163.sent.json();case 4:return _context163.abrupt("return",_context163.sent);case 5:case"end":return _context163.stop()}},_callee161)}));function queryFn(){return _queryFn7.apply(this,arguments)}return queryFn}()}}var jx=Object.defineProperty,Ux=Object.getOwnPropertyDescriptor,zm=function zm(r,o,s,B){for(var Q=B>1?void 0:B?Ux(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&jx(o,s,Q),Q};var Kl=function(_le34){_inherits(Kl,_le34);function Kl(){_classCallCheck(this,Kl);return _callSuper(this,Kl,arguments)}_createClass(Kl,[{key:"dispatchRestore",value:function dispatchRestore(){var r=new CustomEvent("restore",{detail:{id:this.commentId}});return this.dispatchEvent(r)}},{key:"render",value:function render(){var _this291=this;return v(_templateObject129||(_templateObject129=_taggedTemplateLiteral(["\n <div class=\"wy-item wy-item-lg\">\n <div class=\"wy-item-body\">","</div>\n <wy-button @click="," class=\"wy-button-variant\">","</wy-button>\n </div>\n "])),K$1("Comment was trashed."),function(){return _this291.dispatchRestore()},K$1("Undo"))}}]);return Kl}(le);Kl.styles=me;zm([m({type:Number})],Kl.prototype,"commentId",2);Kl=zm([de("wy-comment-trashed"),q()],Kl);var Wx=Object.defineProperty,qx=Object.getOwnPropertyDescriptor,us=function us(r,o,s,B){for(var Q=B>1?void 0:B?qx(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&Wx(o,s,Q),Q};var jn=function(_le35){_inherits(jn,_le35);function jn(){var _this292;_classCallCheck(this,jn);_this292=_callSuper(this,jn,arguments),_this292.showSheet=!1,_this292.sheetId="",_this292.getVotesQuery=new kt(_assertThisInitialized(_this292));return _this292}_createClass(jn,[{key:"updated",value:function updated(r){r.has("weavyContext")&&this.weavyContext&&this.option&&(this.getVotesQuery.trackQuery(Hx(this.weavyContext,this.option.id)),this.sheetId="sheet-post-"+this.option.id)}},{key:"dispatchVote",value:function dispatchVote(r){var o=new CustomEvent("vote",{detail:{id:r}});return this.dispatchEvent(o)}},{key:"openSheet",value:function openSheet(r){var o;r.preventDefault(),r.stopPropagation(),(o=this.getVotesQuery.observer)==null||o.refetch(),this.showSheet=!this.showSheet}},{key:"render",value:function render(){var _this$getVotesQuery$r,_this293=this;var _ref222=(_this$getVotesQuery$r=this.getVotesQuery.result)!==null&&_this$getVotesQuery$r!==void 0?_this$getVotesQuery$r:{},r=_ref222.data,o=_ref222.isLoading,s=this.totalVotes>0?Math.round((this.option.vote_count||0)/this.totalVotes*100):0;return v(_templateObject130||(_templateObject130=_taggedTemplateLiteral(["\n <div\n class=\"wy-item wy-poll-option\"\n tabindex=\"0\"\n @click=","\n @keydown=","\n @keyup=","\n >\n <div class=\"wy-progress\" style=\"width: ","\"></div>\n ","\n <div class=\"wy-item-body\">","</div>\n ","\n </div>\n\n ","\n "])),function(){return _this293.dispatchVote(_this293.option.id)},Bn,Hn,s+"%",this.option.has_voted?v(_templateObject131||(_templateObject131=_taggedTemplateLiteral(["<wy-icon name=\"check-circle\"></wy-icon>"]))):v(_templateObject132||(_templateObject132=_taggedTemplateLiteral(["<wy-icon name=\"circle-outline\"></wy-icon>"]))),this.option.text,s>0?v(_templateObject133||(_templateObject133=_taggedTemplateLiteral(["<span\n class=\"wy-facepile\"\n tabindex=\"0\"\n @click=","\n @keydown=","\n @keyup=","\n >\n ","\n </span>"])),function(B){return _this293.openSheet(B)},Bn,Hn,s+"%"):O,an(this.showSheet,v(_templateObject134||(_templateObject134=_taggedTemplateLiteral(["\n <wy-sheet\n .show=","\n .sheetId=\"","\"\n @release-focus=","\n >\n <span slot=\"appbar-text\">","</span>\n <!-- <wy-spinner></wy-spinner> -->\n ","\n </wy-sheet>\n "])),this.showSheet,this.sheetId,function(){return _this293.dispatchEvent(new CustomEvent("release-focus",{bubbles:!0,composed:!0}))},K$1(c(_templateObject135||(_templateObject135=_taggedTemplateLiteral(["Votes on ",""])),this.option.text)),r&&!o?v(_templateObject136||(_templateObject136=_taggedTemplateLiteral(["\n ","\n "])),r.map(function(B){return v(_templateObject137||(_templateObject137=_taggedTemplateLiteral(["\n <div class=\"wy-item\">\n <wy-avatar .size="," .src="," .name=","></wy-avatar>\n <div class=\"wy-item-body\">","</div>\n </div>\n "])),32,B.avatar_url,B.display_name,B.display_name)})):O),function(){return _this293.showSheet=!1}))}}]);return jn}(le);jn.styles=me;us([Ge({context:Le,subscribe:!0}),K()],jn.prototype,"weavyContext",2);us([m({type:Number,attribute:!1})],jn.prototype,"totalVotes",2);us([m({attribute:!1})],jn.prototype,"option",2);us([K()],jn.prototype,"showSheet",2);us([K()],jn.prototype,"sheetId",2);jn=us([de("wy-poll-option"),q()],jn);var Qx=Object.defineProperty,Kx=Object.getOwnPropertyDescriptor,Nm=function Nm(r,o,s,B){for(var Q=B>1?void 0:B?Kx(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&Qx(o,s,Q),Q};var Zl=function(_le36){_inherits(Zl,_le36);function Zl(){var _this294;_classCallCheck(this,Zl);_this294=_callSuper(this,Zl,arguments),_this294.pollOptions=[];return _this294}_createClass(Zl,[{key:"dispatchVote",value:function dispatchVote(r){var o=new CustomEvent("vote",{detail:{id:r}});return this.dispatchEvent(o)}},{key:"render",value:function render(){var _this295=this;var r=this.pollOptions.reduce(function(o,s){return o+(s.vote_count||0)},0);return v(_templateObject138||(_templateObject138=_taggedTemplateLiteral(["\n <div class=\"wy-poll\">\n ","\n </div>\n "])),this.pollOptions.map(function(o){return v(_templateObject139||(_templateObject139=_taggedTemplateLiteral(["<wy-poll-option\n @vote=","\n .option=","\n .totalVotes=","></wy-poll-option>"])),function(s){return _this295.dispatchVote(s.detail.id)},o,r)}))}}]);return Zl}(le);Zl.styles=me;Nm([m({type:Array,attribute:!1})],Zl.prototype,"pollOptions",2);Zl=Nm([de("wy-poll")],Zl);var Zx=Object.defineProperty,Gx=Object.getOwnPropertyDescriptor,jt=function jt(r,o,s,B){for(var Q=B>1?void 0:B?Gx(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&Zx(o,s,Q),Q};var Tt=function(_le37){_inherits(Tt,_le37);function Tt(){var _this296;_classCallCheck(this,Tt);_this296=_callSuper(this,Tt,arguments),_this296.temp=!1,_this296.createdAt="",_this296.modifiedAt=void 0,_this296.isTrashed=!1,_this296.html="",_this296.attachments=[],_this296.pollOptions=[],_this296.reactions=[],_this296.features={},_this296.previewRef=Re();return _this296}_createClass(Tt,[{key:"createRenderRoot",value:function createRenderRoot(){return this}},{key:"dispatchVote",value:function dispatchVote(r){var o=new CustomEvent("vote",{detail:{id:r}});return this.dispatchEvent(o)}},{key:"dispatchTrash",value:function dispatchTrash(){var r=new CustomEvent("trash",{detail:{id:this.commentId}});return this.dispatchEvent(r)}},{key:"dispatchEdit",value:function dispatchEdit(r){var o=new CustomEvent("edit",{detail:{edit:r}});return this.dispatchEvent(o)}},{key:"render",value:function render(){var _this297=this;var r,o,s,B,Q,Y;var J=(r=this.attachments)==null?void 0:r.filter(function(dt){return dt.kind==="image"&&dt.thumbnail_url}),it=(o=this.attachments)==null?void 0:o.filter(function(dt){return dt.kind!=="image"||!dt.thumbnail_url}),nt=new Intl.DateTimeFormat((s=this.weavyContext)==null?void 0:s.locale,{dateStyle:"full",timeStyle:"short"}).format(new Date(this.createdAt)),ot=Yc((B=this.weavyContext)==null?void 0:B.locale,new Date(this.createdAt));return v(_templateObject140||(_templateObject140=_taggedTemplateLiteral(["\n <div class=\"wy-item wy-item-sm wy-comment-header\">\n <wy-avatar .src="," .size="," .name=","></wy-avatar>\n <div class=\"wy-item-body\">\n <div class=\"wy-item-title\">","</div>\n <div class=\"wy-item-text\">\n <time datetime="," title=",">","</time>\n ","\n </div>\n </div>\n\n ","\n </div>\n <div class=\"wy-comment-body\">\n <div class=\"wy-comment-content\">\n <!-- image grid -->\n ","\n\n <!-- embeds -->\n ","\n ","\n\n <!-- poll -->\n ","\n\n <!-- files -->\n ","\n\n <!-- meeting -->\n ","\n </div>\n </div>\n\n ","\n\n <wy-preview\n ","\n .app=","\n .uid=","\n .files=","\n .isAttachment=","\n .availableFeatures=","\n .features=","></wy-preview>\n "])),this.createdBy.avatar_url,32,this.createdBy.display_name,this.createdBy.display_name,this.createdAt,nt,ot,this.modifiedAt?v(_templateObject141||(_templateObject141=_taggedTemplateLiteral(["<time datetime=","> \xB7 ","</time>"])),this.modifiedAt,K$1("edited")):O,this.user.id===this.createdBy.id?v(_templateObject142||(_templateObject142=_taggedTemplateLiteral(["\n <div class=\"wy-item-actions wy-item-actions-top\">\n <wy-dropdown>\n ","\n ","\n </wy-dropdown>\n </div>\n "])),this.user.id===this.createdBy.id?v(_templateObject143||(_templateObject143=_taggedTemplateLiteral(["<wy-dropdown-item @click=",">\n <wy-icon name=\"pencil\"></wy-icon>\n ","\n </wy-dropdown-item>"])),function(){return _this297.dispatchEdit(!0)},K$1("Edit")):O,this.user.id===this.createdBy.id?v(_templateObject144||(_templateObject144=_taggedTemplateLiteral(["<wy-dropdown-item @click=",">\n <wy-icon name=\"trashcan\"></wy-icon>\n ","\n </wy-dropdown-item>"])),function(){return _this297.dispatchTrash()},K$1("Trash")):O):O,J&&J.length?v(_templateObject145||(_templateObject145=_taggedTemplateLiteral(["<wy-image-grid\n .images=","\n @file-open=","></wy-image-grid>"])),J,function(dt){var Mt;(Mt=_this297.previewRef.value)==null||Mt.open(dt.detail.file)}):"",this.embed&&Pe(this.availableFeatures,Ee.Embeds,(Q=this.features)==null?void 0:Q.embeds)?v(_templateObject146||(_templateObject146=_taggedTemplateLiteral([" <wy-embed class=\"wy-embed\" .embed=","></wy-embed> "])),this.embed):O,this.html?v(_templateObject147||(_templateObject147=_taggedTemplateLiteral(["<div class=\"wy-content\">","</div>"])),Do(this.html)):"",this.pollOptions&&this.pollOptions.length>0?v(_templateObject148||(_templateObject148=_taggedTemplateLiteral(["\n <wy-poll\n .pollOptions=","\n @vote=","></wy-poll>\n "])),this.pollOptions,function(dt){return _this297.dispatchVote(dt.detail.id)}):O,it&&it.length?v(_templateObject149||(_templateObject149=_taggedTemplateLiteral(["<wy-attachments-list\n .files=","\n @file-open=","></wy-attachments-list>"])),it,function(dt){var Mt;(Mt=_this297.previewRef.value)==null||Mt.open(dt.detail.file)}):"",this.meeting?v(_templateObject150||(_templateObject150=_taggedTemplateLiteral(["<wy-meeting-card .meeting=","></wy-meeting-card>"])),this.meeting):"",Pe(this.availableFeatures,Ee.Reactions,(Y=this.features)==null?void 0:Y.reactions)?v(_templateObject151||(_templateObject151=_taggedTemplateLiteral(["\n <div class=\"wy-reactions-line\">\n <wy-reactions\n small \n .reactions=","\n parentId=","\n entityId=","\n messageType=\"comments\"\n .userId=","></wy-reactions>\n </div>"])),this.reactions,this.parentId,this.commentId,this.user.id):O,Ce(this.previewRef),this.app,"comment-".concat(this.parentId,"-").concat(this.commentId.toString()),this.attachments,!0,this.availableFeatures,this.features)}}]);return Tt}(le);Tt.styles=me;jt([Ge({context:Le,subscribe:!0}),K()],Tt.prototype,"weavyContext",2);jt([m({attribute:!1})],Tt.prototype,"app",2);jt([m({attribute:!1})],Tt.prototype,"user",2);jt([m({type:Number})],Tt.prototype,"commentId",2);jt([m({type:Number})],Tt.prototype,"parentId",2);jt([m({type:Boolean})],Tt.prototype,"temp",2);jt([m({attribute:!1})],Tt.prototype,"createdBy",2);jt([m()],Tt.prototype,"createdAt",2);jt([m()],Tt.prototype,"modifiedAt",2);jt([m({type:Boolean})],Tt.prototype,"isTrashed",2);jt([m()],Tt.prototype,"html",2);jt([m({type:Array})],Tt.prototype,"attachments",2);jt([m({attribute:!1})],Tt.prototype,"embed",2);jt([m({type:Array})],Tt.prototype,"pollOptions",2);jt([m({attribute:!1})],Tt.prototype,"meeting",2);jt([m({type:Array})],Tt.prototype,"reactions",2);jt([m({type:Object})],Tt.prototype,"features",2);jt([m({type:Array})],Tt.prototype,"availableFeatures",2);Tt=jt([de("wy-comment-view"),q()],Tt);var Vm="Expected a function",Bp=NaN,Yx="[object Symbol]",Xx=/^\s+|\s+$/g,Jx=/^[-+]0x[0-9a-f]+$/i,ek=/^0b[01]+$/i,tk=/^0o[0-7]+$/i,rk=parseInt,ik=_typeof(gf$1)=="object"&&gf$1&&gf$1.Object===Object&&gf$1,nk=(typeof self==="undefined"?"undefined":_typeof(self))=="object"&&self&&self.Object===Object&&self,ok=ik||nk||Function("return this")(),ak=Object.prototype,sk=ak.toString,ck=Math.max,lk=Math.min,Ud=function Ud(){return ok.Date.now()};function dk(r,o,s){var B,Q,Y,J,it,nt,ot=0,dt=!1,Mt=!1,Ot=!0;if(typeof r!="function")throw new TypeError(Vm);o=Hp(o)||0,Gl(s)&&(dt=!!s.leading,Mt="maxWait"in s,Y=Mt?ck(Hp(s.maxWait)||0,o):Y,Ot="trailing"in s?!!s.trailing:Ot);function Qt(Wt){var oe=B,ve=Q;return B=Q=void 0,ot=Wt,J=r.apply(ve,oe),J}function Ut(Wt){return ot=Wt,it=setTimeout(ie,o),dt?Qt(Wt):J}function te(Wt){var oe=Wt-nt,ve=Wt-ot,_e=o-oe;return Mt?lk(_e,Y-ve):_e}function qt(Wt){var oe=Wt-nt,ve=Wt-ot;return nt===void 0||oe>=o||oe<0||Mt&&ve>=Y}function ie(){var Wt=Ud();if(qt(Wt))return re(Wt);it=setTimeout(ie,te(Wt))}function re(Wt){return it=void 0,Ot&&B?Qt(Wt):(B=Q=void 0,J)}function ne(){it!==void 0&&clearTimeout(it),ot=0,B=nt=Q=it=void 0}function ae(){return it===void 0?J:re(Ud())}function Bt(){var Wt=Ud(),oe=qt(Wt);if(B=arguments,Q=this,nt=Wt,oe){if(it===void 0)return Ut(nt);if(Mt)return it=setTimeout(ie,o),Qt(nt)}return it===void 0&&(it=setTimeout(ie,o)),J}return Bt.cancel=ne,Bt.flush=ae,Bt}function hk(r,o,s){var B=!0,Q=!0;if(typeof r!="function")throw new TypeError(Vm);return Gl(s)&&(B="leading"in s?!!s.leading:B,Q="trailing"in s?!!s.trailing:Q),dk(r,o,{leading:B,maxWait:o,trailing:Q})}function Gl(r){var o=_typeof(r);return!!r&&(o=="object"||o=="function")}function uk(r){return!!r&&_typeof(r)=="object"}function yk(r){return _typeof(r)=="symbol"||uk(r)&&sk.call(r)==Yx}function Hp(r){if(typeof r=="number")return r;if(yk(r))return Bp;if(Gl(r)){var o=typeof r.valueOf=="function"?r.valueOf():r;r=Gl(o)?o+"":o}if(typeof r!="string")return r===0?r:+r;r=r.replace(Xx,"");var s=ek.test(r);return s||tk.test(r)?rk(r.slice(2),s?2:8):Jx.test(r)?Bp:+r}var pk=hk;var Yl=wf$1(pk);function wk(r,o,s,B){return new Ye(r.queryClient,{mutationFn:function(){var _mutationFn10=_asyncToGenerator(_regeneratorRuntime().mark(function _callee162(){return _regeneratorRuntime().wrap(function _callee162$(_context164){while(1)switch(_context164.prev=_context164.next){case 0:_context164.next=2;return r.post("/api/".concat(s,"/").concat(o,"/").concat(B,"/typing"),"PUT",JSON.stringify({}));case 2:return _context164.abrupt("return",_context164.sent);case 3:case"end":return _context164.stop()}},_callee162)}));function mutationFn(){return _mutationFn10.apply(this,arguments)}return mutationFn}()})}function fk(r,o){return new Ye(r.queryClient,{mutationFn:function(){var _mutationFn11=_asyncToGenerator(_regeneratorRuntime().mark(function _callee163(){return _regeneratorRuntime().wrap(function _callee163$(_context165){while(1)switch(_context165.prev=_context165.next){case 0:_context165.next=2;return r.post("/api/meetings","POST",JSON.stringify({provider:o}));case 2:_context165.next=4;return _context165.sent.json();case 4:return _context165.abrupt("return",_context165.sent);case 5:case"end":return _context165.stop()}},_callee163)}));function mutationFn(){return _mutationFn11.apply(this,arguments)}return mutationFn}()})}function St(r,o,s,B){var Q=r.getMutationCache(),Y=Q.find({mutationKey:o,predicate:function predicate(J){return J.state.variables===s}});if(Y&&Y.state.context){var J=_objectSpread({},Y.state.context);B(J);var it=_objectSpread(_objectSpread({},Y.state),{},{context:J});Y.state=it,Q.notify({mutation:Y,type:"updated",action:{type:"pending",context:Y.state.context,variables:Y.state.variables}})}}function Bm(r,o,s){var B=r.getMutationCache().find({mutationKey:o,exact:!0,predicate:s});B&&r.getMutationCache().remove(B)}function mk(r,o){var s=r.getMutationCache();s.findAll({mutationKey:o,exact:!0}).forEach(function(B){s.remove(B)})}var dy=function dy(r,o){var s=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0;var B=arguments.length>3&&arguments[3]!==undefined?arguments[3]:"application/octet-stream";var Q=arguments.length>4?arguments[4]:undefined;var Y=arguments.length>5&&arguments[5]!==undefined?arguments[5]:Date.now();var J=r&&(r instanceof URL?r.toString():URL.createObjectURL(r));return{id:Y,refId:Y,name:o,kind:Gu(o),size:s,media_type:B,embed_url:"",preview_format:S2(o),thumbnail_url:J,preview_url:J,download_url:J,version:-1,created_by:Q,created_by_id:Q.id,created_at:(new Date()).toUTCString(),is_subscribed:!1,is_trashed:!1}};function vk(r){var o=r?r.reduce(function(s,B){var Q,Y;var J=(Q=B.context)==null?void 0:Q.file;return J&&(Y=B.context)!=null&&Y.status.progress&&J.size?{loaded:s.loaded+B.context.status.progress*J.size,total:s.total+J.size}:s},{loaded:0,total:0}):{loaded:0,total:0};return{loaded:o.loaded,total:o.total,percent:o.total>0?o.loaded/o.total:null}}function gk(r){return r?r.some(function(o){var s;return((s=o.context)==null?void 0:s.status.state)==="conflict"})?"conflict":r.some(function(o){return o.status==="error"})?"error":r.every(function(o){return o.status==="success"})?"ok":"pending":"ok"}function bk(r){return(r==null?void 0:r.filter(function(o){var s;return((s=o.context)==null?void 0:s.status.state)==="conflict"||o.status==="error"}))||[]}function _k(r,o,s){var B=r.queryClient;B.getMutationCache().findAll({mutationKey:["apps",o.id,"files"],exact:!0,predicate:function predicate(Q){var Y;return /error|success/.test(Q.state.status)&&((Y=Q.state.variables.blob)==null?void 0:Y.name)===s}}).forEach(function(Q){B.getMutationCache().remove(Q)})}function xk(r,o,s){var B=r.queryClient,Q=["apps",s.id,"files"];return{mutationFn:function(){var _mutationFn12=_asyncToGenerator(_regeneratorRuntime().mark(function _callee164(_ref223){var Y,_ref223$replace,J,it,nt;return _regeneratorRuntime().wrap(function _callee164$(_context166){while(1)switch(_context166.prev=_context166.next){case 0:Y=_ref223.blob,_ref223$replace=_ref223.replace,J=_ref223$replace===void 0?!1:_ref223$replace;_context166.next=3;return r.post("/api/apps/"+s.id+"/files","POST",JSON.stringify({blob_id:Y.id,replace:J}));case 3:it=_context166.sent;if(it.ok){_context166.next=9;break}_context166.next=7;return it.json();case 7:nt=_context166.sent;throw new Error(nt.detail||nt.title,{cause:nt});case 9:_context166.next=11;return it.json();case 11:return _context166.abrupt("return",_context166.sent);case 12:case"end":return _context166.stop()}},_callee164)}));function mutationFn(_x132){return _mutationFn12.apply(this,arguments)}return mutationFn}(),mutationKey:Q,onMutate:function(){var _onMutate6=_asyncToGenerator(_regeneratorRuntime().mark(function _callee165(Y){var J,it;return _regeneratorRuntime().wrap(function _callee165$(_context167){while(1)switch(_context167.prev=_context167.next){case 0:_context167.next=2;return B.cancelQueries({queryKey:Q,exact:!0});case 2:kk(r,s,Y.blob.name);_k(r,s,Y.blob.name);try{J=Y.blob.thumbnail_url&&new URL(Y.blob.thumbnail_url)||void 0}catch(_unused38){}it=dy(J,Y.blob.name,Y.blob.size,Y.blob.media_type,o);return _context167.abrupt("return",{type:Y.replace?"replace":"create",file:it,status:{state:"pending"}});case 7:case"end":return _context167.stop()}},_callee165)}));function onMutate(_x133){return _onMutate6.apply(this,arguments)}return onMutate}(),onSuccess:function onSuccess(Y,J,it){return St(B,Q,J,function(nt){nt&&(nt.status.state="ok",nt.status.progress=void 0,nt.status.text=void 0)}),B.invalidateQueries({queryKey:Q})},onError:function onError(Y,J,it){var nt,ot,dt;((nt=Y==null?void 0:Y.cause)==null?void 0:nt.status)===409?St(B,Q,J,function(Mt){Mt&&(Mt.status.progress=void 0,Mt.status.state="conflict",Mt.status.text=Y.message)}):((ot=it.file)!=null&&ot.refId||(dt=it.file)==null||dt.id,St(B,Q,J,function(Mt){Mt&&(Mt.status.state="error",Mt.status.progress=void 0,Mt.status.text=Y.message)}))}}}function kk(r,o,s,B){var Q=r.queryClient;Q.getMutationCache().findAll({mutationKey:["apps",o.id,"blobs",B],exact:!0,status:"success",predicate:function predicate(Y){return Y.state.data.name===s}}).forEach(function(Y){Q.getMutationCache().remove(Y)})}function Ck(_x134,_x135,_x136){return _Ck.apply(this,arguments)}function _Ck(){_Ck=_asyncToGenerator(_regeneratorRuntime().mark(function _callee276(r,o,s){var B,Q,Y;return _regeneratorRuntime().wrap(function _callee276$(_context278){while(1)switch(_context278.prev=_context278.next){case 0:B=new FormData;B.append("blob",o);_context278.next=4;return r.upload("/api/blobs","POST",B,Vl.Auto,function(Y){s&&s({progress:Y})});case 4:Q=_context278.sent;if(Q.ok){_context278.next=10;break}_context278.next=8;return Q.json();case 8:Y=_context278.sent;throw new Error(Y.detail||Y.title,{cause:Y});case 10:_context278.next=12;return Q.json();case 12:return _context278.abrupt("return",_context278.sent);case 13:case"end":return _context278.stop()}},_callee276)}));return _Ck.apply(this,arguments)}function Hm(r,o,s,B){var Q=r.queryClient,Y=["apps",s.id,"blobs",B];return{mutationFn:function(){var _mutationFn13=_asyncToGenerator(_regeneratorRuntime().mark(function _callee166(J){return _regeneratorRuntime().wrap(function _callee166$(_context168){while(1)switch(_context168.prev=_context168.next){case 0:_context168.next=2;return Ck(r,J.file,J.onProgress);case 2:return _context168.abrupt("return",_context168.sent);case 3:case"end":return _context168.stop()}},_callee166)}));function mutationFn(_x137){return _mutationFn13.apply(this,arguments)}return mutationFn}(),mutationKey:Y,onMutate:function(){var _onMutate7=_asyncToGenerator(_regeneratorRuntime().mark(function _callee167(J){var it;return _regeneratorRuntime().wrap(function _callee167$(_context169){while(1)switch(_context169.prev=_context169.next){case 0:_context169.next=2;return Q.cancelQueries({queryKey:Y,exact:!0});case 2:it=dy(J.file,J.file.name,J.file.size,J.file.type,o);return _context169.abrupt("return",(J.onProgress=function(_ref224){var nt=_ref224.progress;St(Q,Y,J,function(ot){ot.status.state="pending",ot.status.progress=nt})},{type:"upload",file:it,status:{state:"pending"}}));case 4:case"end":return _context169.stop()}},_callee167)}));function onMutate(_x138){return _onMutate7.apply(this,arguments)}return onMutate}(),onSuccess:function onSuccess(J,it,nt){St(Q,Y,it,function(ot){ot.status.state="ok",ot.status.progress=void 0,ot.status.text=void 0})},onError:function onError(J,it,nt){var ot=J.cause;ot&&ot.status===409?St(Q,Y,it,function(dt){dt.status.state="conflict",dt.status.progress=void 0,dt.status.text=ot.detail||ot.title}):St(Q,Y,it,function(dt){dt&&(dt.status.state="error",dt.status.progress=void 0,dt.status.text=ot.detail||ot.title)})}}}function jp(r,o){return r.findAll(o.filters).map(function(s){return o.select?o.select(s):s.state})}var jm=function(){function jm(o){_classCallCheck(this,jm);this.alwaysUpdate=!1,o.addController(this),this.host=o,this.setContext()}_createClass(jm,[{key:"setContext",value:function(){var _setContext4=_asyncToGenerator(_regeneratorRuntime().mark(function _callee168(){var _this298=this;return _regeneratorRuntime().wrap(function _callee168$(_context170){while(1)switch(_context170.prev=_context170.next){case 0:this.whenContext=new Promise(function(o){return _this298.resolveContext=o});_context170.next=3;return yn(this.host);case 3:this.context=new $i(this.host,{context:Le,subscribe:!0});case 4:case"end":return _context170.stop()}},_callee168,this)}));function setContext(){return _setContext4.apply(this,arguments)}return setContext}()},{key:"hostUpdate",value:function hostUpdate(){var o,s;(o=this.context)!=null&&o.value&&((s=this.resolveContext)==null||s.call(this))}},{key:"trackMutationState",value:function(){var _trackMutationState=_asyncToGenerator(_regeneratorRuntime().mark(function _callee169(o,s){var _this299=this;var B,Q,Y,J;return _regeneratorRuntime().wrap(function _callee169$(_context171){while(1)switch(_context171.prev=_context171.next){case 0:_context171.t0=s;if(_context171.t0){_context171.next=5;break}_context171.next=4;return this.whenContext;case 4:s=(Q=(B=this.context)==null?void 0:B.value)==null?void 0:Q.queryClient;case 5:if(s){_context171.next=7;break}throw new Error("No QueryClient provided");case 7:(Y=this.mutationCacheUnsubscribe)==null||Y.call(this);J=s.getMutationCache();return _context171.abrupt("return",(this.result=jp(J,o),this.mutationCacheUnsubscribe=J.subscribe(function(it){if(/added|removed|updated/.test(it.type)){var nt=jp(J,o);(_this299.result!==nt||Is(_this299.result,nt))&&(_this299.result=nt,_this299.host.requestUpdate())}}),this.host.requestUpdate(),this.result));case 10:case"end":return _context171.stop()}},_callee169,this)}));function trackMutationState(_x139,_x140){return _trackMutationState.apply(this,arguments)}return trackMutationState}()},{key:"hostDisconnected",value:function hostDisconnected(){var o;(o=this.mutationCacheUnsubscribe)==null||o.call(this)}}]);return jm}();function $k(_x141,_x142){return _$k.apply(this,arguments)}function _$k(){_$k=_asyncToGenerator(_regeneratorRuntime().mark(function _callee277(r,o){var s,B;return _regeneratorRuntime().wrap(function _callee277$(_context279){while(1)switch(_context279.prev=_context279.next){case 0:_context279.next=2;return r.post("/api/blobs/external","POST",JSON.stringify(o));case 2:s=_context279.sent;if(s.ok){_context279.next=8;break}_context279.next=6;return s.json();case 6:B=_context279.sent;throw new Error(B.detail||B.title,{cause:B});case 8:_context279.next=10;return s.json();case 10:return _context279.abrupt("return",_context279.sent);case 11:case"end":return _context279.stop()}},_callee277)}));return _$k.apply(this,arguments)}function Ek(r,o,s,B){var Q=r.queryClient,Y=["apps",s.id,"blobs",B];return{mutationFn:function(){var _mutationFn14=_asyncToGenerator(_regeneratorRuntime().mark(function _callee170(J){return _regeneratorRuntime().wrap(function _callee170$(_context172){while(1)switch(_context172.prev=_context172.next){case 0:_context172.next=2;return $k(r,J.externalBlob);case 2:return _context172.abrupt("return",_context172.sent);case 3:case"end":return _context172.stop()}},_callee170)}));function mutationFn(_x143){return _mutationFn14.apply(this,arguments)}return mutationFn}(),mutationKey:Y,onMutate:function(){var _onMutate8=_asyncToGenerator(_regeneratorRuntime().mark(function _callee171(J){return _regeneratorRuntime().wrap(function _callee171$(_context173){while(1)switch(_context173.prev=_context173.next){case 0:_context173.next=2;return Q.cancelQueries({queryKey:Y,exact:!0});case 2:return _context173.abrupt("return",{type:"attach",file:dy(void 0,J.externalBlob.name,J.externalBlob.size,void 0,o),status:{state:"pending"}});case 3:case"end":return _context173.stop()}},_callee171)}));function onMutate(_x144){return _onMutate8.apply(this,arguments)}return onMutate}(),onSuccess:function onSuccess(J,it,nt){St(Q,Y,it,function(ot){ot.status.state="ok",ot.status.progress=void 0,ot.status.text=void 0})},onError:function onError(J,it,nt){var ot=J.cause;ot&&ot.status===409?St(Q,Y,it,function(dt){dt.status.state="conflict",dt.status.progress=void 0,dt.status.text=ot.detail||ot.title}):St(Q,Y,it,function(dt){dt&&(dt.status.state="error",dt.status.progress=void 0,dt.status.text=ot.detail||ot.title)})}}}function Um(r,o,s,B){return new Ye(r.queryClient,Ek(r,o,s,B))}var Sk=/(((https?|ftp):\/\/|(www|ftp)\.)[\w]+(.[\w]+)([\w\-.,@?^=%&amp;:/~+#]*[\w\-@?^=%&amp;/~+#]))/gim;var ra=[],lc=[],Xl=[],El=[],gn={};var Pk=function Pk(r,o){return r.length===o.length&&r.every(function(s,B){return s===o[B]})};function Ak(_x145,_x146,_x147){return _Ak.apply(this,arguments)}function _Ak(){_Ak=_asyncToGenerator(_regeneratorRuntime().mark(function _callee278(r,o,s){var B,Q;return _regeneratorRuntime().wrap(function _callee278$(_context280){while(1)switch(_context280.prev=_context280.next){case 0:new FormData().append("url",r);_context280.prev=1;_context280.next=4;return s.post("/api/embeds","POST",JSON.stringify({url:r}));case 4:B=_context280.sent;if(B.ok){_context280.next=7;break}throw new Error;case 7:_context280.next=9;return B.json();case 9:Q=_context280.sent;delete gn[r],lc=[].concat(_toConsumableArray(lc),[r]),o(Q);_context280.next=16;break;case 13:_context280.prev=13;_context280.t0=_context280["catch"](1);Xl=[].concat(_toConsumableArray(Xl),[r]),delete gn[r];case 16:case"end":return _context280.stop()}},_callee278,null,[[1,13]])}));return _Ak.apply(this,arguments)}var Lk=function Lk(){ra=[],lc=[],Xl=[],El=[],gn={}},Up=function Up(r){lc=r},Mk=function(){var _ref225=_asyncToGenerator(_regeneratorRuntime().mark(function _callee172(r,o,s){var B,Q,Y;return _regeneratorRuntime().wrap(function _callee172$(_context174){while(1)switch(_context174.prev=_context174.next){case 0:Q=((B=r.match(Sk))==null?void 0:B.map(function(Y){return Y}))||null;if(Q!==null&&(Q=Q.map(function(Y){return Y.startsWith("//")?"http:"+Y:!Y.startsWith("http://")&&!Y.startsWith("https://")?"http://"+Y:Y})),!(Q===null||Q.length===0)&&(Q.length!==ra.length||!Pk(Q,ra))){ra=Q,Q.forEach(function(Y){!lc.includes(Y)&&!Xl.includes(Y)&&!El.includes(Y)&&_typeof(gn[Y])>"u"&&(gn[Y]=window.setTimeout(function(){Ak(Y,o,s)},500))}),El=El.filter(function(Y){return ra.includes(Y)});for(Y in gn)ra.includes(Y)||(window.clearTimeout(gn[Y]),delete gn[Y])}case 2:case"end":return _context174.stop()}},_callee172)}));return function Mk(_x148,_x149,_x150){return _ref225.apply(this,arguments)}}();var Pa;var Wm=function(){function Wm(o){var _this300=this;_classCallCheck(this,Wm);S(this,Pa,!1),o.addController(this),this.host=o,o.addEventListener("dragstart",function(){return _this300.isDragActive=!0}),o.addEventListener("dragenter",function(){return _this300.isDragActive=!0}),o.addEventListener("dragover",function(s){s.preventDefault(),_this300.isDragActive=!0}),o.addEventListener("dragleave",function(){return _this300.isDragActive=!1}),o.addEventListener("dragend",function(){return _this300.isDragActive=!1}),o.addEventListener("drop",function(s){return _this300.handleDrop(s)})}_createClass(Wm,[{key:"isDragActive",get:function get(){return h(this,Pa)},set:function set(o){h(this,Pa)!==o&&(A(this,Pa,o),this.host.requestUpdate())}},{key:"handleDrop",value:function handleDrop(o){var s,B;o.preventDefault();var Q=[];(s=o.dataTransfer)!=null&&s.items?_toConsumableArray(o.dataTransfer.items).forEach(function(Y){if(Y.kind==="file"){var J=Y.getAsFile();Q.push(J)}}):(B=o.dataTransfer)!=null&&B.files&&_toConsumableArray(o.dataTransfer.files).forEach(function(Y){Q.push(Y)}),Q.length&&this.dispatchUploadFiles(Q),this.isDragActive=!1}},{key:"dispatchUploadFiles",value:function dispatchUploadFiles(o){var s=new CustomEvent("drop-files",{detail:{files:o}});return this.host.dispatchEvent(s)}},{key:"hostDisconnected",value:function hostDisconnected(){}}]);return Wm}();Pa=new WeakMap;var Ok=Object.defineProperty,Ik=Object.getOwnPropertyDescriptor,Yn=function Yn(r,o,s,B){for(var Q=B>1?void 0:B?Ik(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&Ok(o,s,Q),Q};var Hi=function(_le38){_inherits(Hi,_le38);function Hi(){var _this301;_classCallCheck(this,Hi);_this301=_callSuper(this,Hi,arguments),_this301.availableFeatures=[],_this301.features={},_this301.status={state:"ok"},_this301.hasHover=!0,_this301.isRenaming=!1;return _this301}_createClass(Hi,[{key:"dispatchEditName",value:function dispatchEditName(r){var o=new CustomEvent("edit-name",{detail:{file:r}});return this.dispatchEvent(o)}},{key:"dispatchRename",value:function dispatchRename(r,o){var s=new CustomEvent("rename",{detail:{file:r,name:o}});return this.dispatchEvent(s)}},{key:"dispatchTrash",value:function dispatchTrash(r){var o=new CustomEvent("trash",{detail:{file:r}});return this.dispatchEvent(o)}},{key:"dispatchRestore",value:function dispatchRestore(r){var o=new CustomEvent("restore",{detail:{file:r}});return this.dispatchEvent(o)}},{key:"dispatchDeleteForever",value:function dispatchDeleteForever(r){var o=new CustomEvent("delete-forever",{detail:{file:r}});return this.dispatchEvent(o)}},{key:"dispatchSubscribe",value:function dispatchSubscribe(r,o){var s=new CustomEvent("subscribe",{detail:{file:r,subscribe:o}});return this.dispatchEvent(s)}},{key:"render",value:function render(){var _this302=this;var r=this.file;if(!r)return O;var _Zn5=Zn(r.name),o=_Zn5.icon;var s=s2(this.actionType),B=Li(r.name),Q=ls(r.provider);Q&&(o="".concat(o,"+").concat(Q));var Y=function Y(it){it.stopImmediatePropagation();var nt=it.target;nt.value&&nt.value!==r.name?_this302.dispatchRename(r,nt.value):_this302.dispatchEditName({id:NaN})},J=function J(it){var nt=it.target;it.key==="Escape"?(it.preventDefault(),nt.value=r.name,nt.blur()):it.key==="Enter"&&(it.preventDefault(),nt.blur())};return v(_templateObject152||(_templateObject152=_taggedTemplateLiteral(["\n <div\n class=\"wy-item ","\"\n title=",">\n ","\n <div class=\"wy-item-body\">\n ","\n </div>\n <div class=\"wy-item-actions\">\n <slot name=\"actions\">\n <wy-file-menu\n .file=","\n .features=","\n .availableFeatures=","\n @edit-name=","\n @trash=","\n @restore=","\n @delete-forever=","\n @subscribe=",">\n </wy-file-menu>\n </slot>\n </div>\n </div>\n "])),Qe({"wy-item-trashed":r.is_trashed,"wy-item-hover":this.hasHover&&!r.is_trashed&&!this.isRenaming}),r.name,this.status.state==="error"?v(_templateObject153||(_templateObject153=_taggedTemplateLiteral(["<wy-icon name=\"alert-octagon\" color=\"error\" title=","></wy-icon>"])),et(this.status.text)):this.status.state==="conflict"?v(_templateObject154||(_templateObject154=_taggedTemplateLiteral(["<wy-icon name=\"alert\" color=\"yellow\" title=","></wy-icon>"])),et(this.status.text)):this.status.state==="pending"?v(_templateObject155||(_templateObject155=_taggedTemplateLiteral(["<wy-spinner ?nospin="," .progress=","></wy-spinner>"])),!!this.status.progress,this.status.progress):v(_templateObject156||(_templateObject156=_taggedTemplateLiteral(["<wy-icon .name="," .overlayPath="," .size="," .kind="," ext=","></wy-icon>"])),o,s,24,r.kind,B),this.isRenaming?v(_templateObject157||(_templateObject157=_taggedTemplateLiteral(["\n <input\n type=\"text\"\n maxlength=\"256\"\n class=\"wy-input\"\n .defaultValue=","\n @blur=","\n @keyup=","\n @click=","\n @focus=","\n "," />\n "])),r.name,Y,function(it){gd(it),J(it)},function(it){return it.preventDefault()},Yu,Ce(Bu)):v(_templateObject158||(_templateObject158=_taggedTemplateLiteral(["\n <span title=","\n ><slot name=\"title\"\n >","","</slot\n ></span\n >\n "])),r.name+(this.status.text?": ".concat(this.status.text):""),this.title||r.name,this.status.text?v(_templateObject159||(_templateObject159=_taggedTemplateLiteral([": <em>","</em>"])),this.status.text):O),this.file,this.features,this.availableFeatures,function(it){return _this302.dispatchEditName(it.detail.file)},function(it){return _this302.dispatchTrash(it.detail.file)},function(it){return _this302.dispatchRestore(it.detail.file)},function(it){return _this302.dispatchDeleteForever(it.detail.file)},function(it){return _this302.dispatchSubscribe(it.detail.file,it.detail.subscribe)})}}]);return Hi}(le);Hi.styles=me;Yn([m({type:Object})],Hi.prototype,"file",2);Yn([m({type:Array})],Hi.prototype,"availableFeatures",2);Yn([m({type:Object})],Hi.prototype,"features",2);Yn([m({type:Object})],Hi.prototype,"status",2);Yn([m({type:Boolean})],Hi.prototype,"hasHover",2);Yn([m()],Hi.prototype,"actionType",2);Yn([K()],Hi.prototype,"isRenaming",2);Hi=Yn([de("wy-file-item")],Hi);var Tk=Object.defineProperty,Rk=Object.getOwnPropertyDescriptor,Xn=function Xn(r,o,s,B){for(var Q=B>1?void 0:B?Rk(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&Tk(o,s,Q),Q};var ji=function(_le39){_inherits(ji,_le39);function ji(){var _this303;_classCallCheck(this,ji);_this303=_callSuper(this,ji,arguments),_this303.unauthorized=!1,_this303.confluenceQuery=new kt(_assertThisInitialized(_this303)),_this303.confluenceResourceQuery=new kt(_assertThisInitialized(_this303)),_this303.onMessage=function(){var _ref226=_asyncToGenerator(_regeneratorRuntime().mark(function _callee173(r){var o;return _regeneratorRuntime().wrap(function _callee173$(_context175){while(1)switch(_context175.prev=_context175.next){case 0:_context175.t0=r.data.name;_context175.next=_context175.t0==="confluence-signed-in"?3:5;break;case 3:_this303.unauthorized=!1,(o=_this303.confluenceResourceQuery.result)==null||o.refetch();return _context175.abrupt("break",5);case 5:case"end":return _context175.stop()}},_callee173)}));return function(_x151){return _ref226.apply(this,arguments)}}();return _this303}_createClass(ji,[{key:"dispatchSubmit",value:function dispatchSubmit(r,o,s){if(this.cloudHost&&this.spaceKey){var B=new CustomEvent("submit",{detail:{url:r,id:o,title:s,hostname:this.cloudHost,spaceKey:this.spaceKey}});this.dispatchEvent(B)}}},{key:"dispatchUnauthorized",value:function dispatchUnauthorized(){var r=new CustomEvent("unauthorized");return this.dispatchEvent(r)}},{key:"handleResourceClick",value:function handleResourceClick(r,o){r.preventDefault();var s=new URL(o.url);this.cloudId=o.id,this.cloudHost=s.hostname}},{key:"handleSpaceClick",value:function handleSpaceClick(r,o,s){var B;r.preventDefault(),this.spaceKey=s,this.spaceId=o,(B=this.confluenceQuery.result)==null||B.refetch()}},{key:"handlePageClick",value:function handlePageClick(r,o,s,B){r.preventDefault(),this.dispatchSubmit(o,s,B)}},{key:"connectedCallback",value:function connectedCallback(){_get(_getPrototypeOf(ji.prototype),"connectedCallback",this).call(this),window.addEventListener("message",this.onMessage)}},{key:"willUpdate",value:function willUpdate(r){r.has("weavyContext")&&this.weavyContext&&this.confluenceResourceQuery.trackQuery(tr(this.weavyContext,["confluence","resources"],"/confluence/resources")),(r.has("weavyContext")||r.has("cloudId")||r.has("spaceId"))&&this.weavyContext&&this.cloudId&&this.confluenceQuery.trackQuery(tr(this.weavyContext,["confluence",this.cloudId,"spaces",this.spaceId!=null?this.spaceId+"/pages":void 0],"/confluence/".concat(this.cloudId,"/spaces/").concat(this.spaceId!=null?this.spaceId+"/pages":"")))}},{key:"render",value:function render(){var _this304=this;var r,o,s;if(!((r=this.weavyContext)!=null&&r.confluenceAuthenticationUrl))return O;var _ref227=((o=this.confluenceQuery)==null?void 0:o.result)||{},B=_ref227.data,Q=_ref227.isPending,_ref228=((s=this.confluenceResourceQuery)==null?void 0:s.result)||{},Y=_ref228.data,J=_ref228.isPending;return this.unauthorized?v(_templateObject160||(_templateObject160=_taggedTemplateLiteral(["<wy-empty><button class=\"wy-button wy-button-primary\" @click=",">Sign in</button></wy-empty>"])),this.dispatchUnauthorized):v(_templateObject161||(_templateObject161=_taggedTemplateLiteral(["\n <div class=\"wy-search wy-scroll-y\">\n <div class=\"wy-pane-group\">\n ","\n ","\n ","\n ","\n \n </div>\n </div>\n "])),this.spaceKey?v(_templateObject162||(_templateObject162=_taggedTemplateLiteral(["\n <a\n href=\"#\"\n class=\"wy-item-body\"\n @click=","\n >\n <wy-icon name=\"back\"></wy-icon> ","\n </a>\n "])),function(it){return _this304.handleSpaceClick(it,void 0,void 0)},K$1("Back")):O,J||Q?v(_templateObject163||(_templateObject163=_taggedTemplateLiteral([" <wy-spinner overlay></wy-spinner> "]))):O,!this.cloudId&&!J&&Y?v(_templateObject164||(_templateObject164=_taggedTemplateLiteral(["\n <h5>","</h5>\n <div class=\"wy-list wy-list-bordered\">\n ","\n </div>\n "])),K$1("Select a Confluence site"),Lr(Y.resources,function(it){return it.id},function(it){return v(_templateObject165||(_templateObject165=_taggedTemplateLiteral(["\n <a\n href=\"#\"\n class=\"wy-item wy-item-lg wy-item-hover\"\n title=","\n @click=","\n >\n <wy-icon name=\"earth\" size=\"48\"></wy-icon>\n <div class=\"wy-item-body \">\n <div class=\"wy-item-title\">","</div>\n </div>\n </a>\n "])),it.name,function(nt){return _this304.handleResourceClick(nt,it)},it.name)})):O,this.cloudId&&!Q&&B?v(_templateObject166||(_templateObject166=_taggedTemplateLiteral(["\n <div class=\"wy-list wy-list-bordered\">\n ","\n </div>\n "])),Lr(B.results,function(it){return it.id},function(it){return _this304.spaceKey?v(_templateObject167||(_templateObject167=_taggedTemplateLiteral(["\n <a\n href=\"#\"\n class=\"wy-item wy-item-lg wy-item-hover\"\n title=","\n @click=","\n >\n <wy-icon name=\"file\" size=\"48\"></wy-icon>\n <div class=\"wy-item-body \">\n <div class=\"wy-item-title\">","</div>\n </div>\n </a>\n "])),it.title,function(nt){return _this304.handlePageClick(nt,it._links.webui,it.id,it.title)},it.title):v(_templateObject168||(_templateObject168=_taggedTemplateLiteral(["\n <a\n href=\"#\"\n class=\"wy-item wy-item-lg wy-item-hover\"\n title=","\n @click=","\n >\n <wy-icon name=\"confluence\" color=\"native\" size=\"48\"></wy-icon>\n <div class=\"wy-item-body \">\n <div class=\"wy-item-title\">","</div>\n </div>\n </a>\n "])),it.name,function(nt){return _this304.handleSpaceClick(nt,it.id,it.key)},it.name)})):O)}},{key:"updated",value:function updated(r){var o;!this.unauthorized&&this.confluenceResourceQuery.result&&!this.confluenceResourceQuery.result.isPending&&((o=this.confluenceResourceQuery.result.data)==null?void 0:o.resources)==null&&(this.unauthorized=!0)}},{key:"disconnectedCallback",value:function disconnectedCallback(){_get(_getPrototypeOf(ji.prototype),"disconnectedCallback",this).call(this),window.removeEventListener("message",this.onMessage)}}]);return ji}(le);ji.styles=me;Xn([Ge({context:Le,subscribe:!0}),K()],ji.prototype,"weavyContext",2);Xn([m({attribute:!1})],ji.prototype,"user",2);Xn([K()],ji.prototype,"unauthorized",2);Xn([K()],ji.prototype,"cloudHost",2);Xn([K()],ji.prototype,"cloudId",2);Xn([K()],ji.prototype,"spaceKey",2);Xn([K()],ji.prototype,"spaceId",2);ji=Xn([de("wy-confluence-picker"),q()],ji);var Dk=Object.defineProperty,Fk=Object.getOwnPropertyDescriptor,tl=function tl(r,o,s,B){for(var Q=B>1?void 0:B?Fk(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&Dk(o,s,Q),Q};var Uo=function(_le40){_inherits(Uo,_le40);function Uo(){var _this305;_classCallCheck(this,Uo);_this305=_callSuper(this,Uo,arguments),_this305.dropdown=!1,_this305.showPicker=!1;return _this305}_createClass(Uo,[{key:"open",value:function open(){this.showPicker=!0}},{key:"close",value:function close(){this.showPicker=!1}},{key:"dispatchExternalBlobs",value:function dispatchExternalBlobs(r){var o=new CustomEvent("external-blobs",{detail:{externalBlobs:r}});return this.dispatchEvent(o)}},{key:"handleUnauthorized",value:function handleUnauthorized(){var r;this.user&&window.open("".concat((r=this.weavyContext)==null?void 0:r.confluenceAuthenticationUrl,"&state=").concat(this.user.id),"confluenceAuthWin","height=640,width=480")}},{key:"handleAddPage",value:function(){var _handleAddPage=_asyncToGenerator(_regeneratorRuntime().mark(function _callee174(_ref229){var r,o,s,B,Q,Y,J;return _regeneratorRuntime().wrap(function _callee174$(_context176){while(1)switch(_context176.prev=_context176.next){case 0:r=_ref229.url,o=_ref229.id,s=_ref229.title,B=_ref229.hostname,Q=_ref229.spaceKey;J={provider:"Confluence",link:"https://"+B+"/wiki"+r,name:s,size:0,raw:{contentId:o,hostname:B,parentProduct:(Y=this.weavyContext)==null?void 0:Y.confluenceProductName,spaceKey:Q}};this.dispatchExternalBlobs([J]),this.close();case 3:case"end":return _context176.stop()}},_callee174,this)}));function handleAddPage(_x152){return _handleAddPage.apply(this,arguments)}return handleAddPage}()},{key:"render",value:function render(){var _this306=this;var r;return(r=this.weavyContext)!=null&&r.confluenceAuthenticationUrl?v(_templateObject169||(_templateObject169=_taggedTemplateLiteral(["\n ","\n ","\n "])),this.dropdown?v(_templateObject170||(_templateObject170=_taggedTemplateLiteral(["\n <wy-dropdown-item @click=",">\n <wy-icon name=\"confluence\" color=\"native\"></wy-icon> Confluence\n </wy-dropdown-item>\n "])),function(){return _this306.open()}):v(_templateObject171||(_templateObject171=_taggedTemplateLiteral(["\n <wy-button @click="," title=\"Confluence\" kind=\"icon\"\n ><wy-icon name=\"confluence\" color=\"native\"></wy-icon\n ></wy-button>\n "])),function(){return _this306.open()}),an(this.showPicker,v(_templateObject172||(_templateObject172=_taggedTemplateLiteral(["\n <wy-overlay\n @release-focus=","\n >\n <slot name=\"header\">\n <header class=\"wy-appbars\">\n <nav class=\"wy-appbar\">\n <slot name=\"appbar-buttons\" class=\"wy-appbar-buttons\"></slot>\n <slot name=\"appbar-text\" class=\"wy-appbar-text\">","</slot>\n <wy-button kind=\"icon\" @click=",">\n <wy-icon name=\"close\"></wy-icon>\n </wy-button>\n </nav>\n </header>\n </slot>\n\n <wy-confluence-picker\n @submit=","\n @close=","\n @unauthorized=","\n ></wy-confluence-picker>\n </wy-overlay>\n "])),function(){return _this306.dispatchEvent(new CustomEvent("release-focus",{bubbles:!0,composed:!0}))},K$1("Confluence Page Picker"),function(){return _this306.close()},function(o){return _this306.handleAddPage(o.detail)},function(){return _this306.close()},function(){return _this306.handleUnauthorized()}),function(){return _this306.close()})):O}}]);return Uo}(le);Uo.styles=me;tl([Ge({context:Le,subscribe:!0}),K()],Uo.prototype,"weavyContext",2);tl([m({attribute:!1,type:Object})],Uo.prototype,"user",2);tl([m({type:Boolean})],Uo.prototype,"dropdown",2);tl([K()],Uo.prototype,"showPicker",2);Uo=tl([de("wy-confluence"),q()],Uo);var zk=Object.defineProperty,Nk=Object.getOwnPropertyDescriptor,rt=function rt(r,o,s,B){for(var Q=B>1?void 0:B?Nk(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&zk(o,s,Q),Q};var We=function(_le41){_inherits(We,_le41);function We(){var _this307;_classCallCheck(this,We);_this307=_callSuper(this,We),_this307._placeholder="",_this307.text="",_this307.options=[],_this307.attachments=[],_this307.buttonText="",_this307.typing=!0,_this307.draft=!1,_this307.editorType="posts",_this307.editorClass="wy-post-editor",_this307.editorLocation="apps",_this307.availableFeatures=[],_this307.features={},_this307.editorError=!1,_this307.showPolls=!1,_this307.pollOptions=[],_this307.embeds=[],_this307.draftKey="",_this307.uploadBlobMutation=new tn(_assertThisInitialized(_this307)),_this307.mutatingFiles=new jm(_assertThisInitialized(_this307)),_this307.fileInputRef=Re(),_this307.cloudFilesRef=Re(),_this307.dropZone=new Wm(_assertThisInitialized(_this307)),_this307.keyMap=[],_this307.editorRef=Re(),_this307.throttledTyping=Yl(_asyncToGenerator(_regeneratorRuntime().mark(function _callee175(){return _regeneratorRuntime().wrap(function _callee175$(_context177){while(1)switch(_context177.prev=_context177.next){case 0:_context177.t0=_this307.weavyContext&&_this307.app;if(!_context177.t0){_context177.next=6;break}_context177.next=4;return wk(_this307.weavyContext,_this307.app.id,_this307.editorLocation,_this307.editorType);case 4:_context177.next=6;return _context177.sent.mutate();case 6:case"end":return _context177.stop()}},_callee175)})),2e3,{leading:!0,trailing:!1}),_this307.throttledDrafting=Yl(_asyncToGenerator(_regeneratorRuntime().mark(function _callee176(){return _regeneratorRuntime().wrap(function _callee176$(_context178){while(1)switch(_context178.prev=_context178.next){case 0:_this307.saveDraft();case 1:case"end":return _context178.stop()}},_callee176)})),500,{leading:!0,trailing:!0}),_this307.createMeeting=function(){var _ref232=_asyncToGenerator(_regeneratorRuntime().mark(function _callee177(r){var o;return _regeneratorRuntime().wrap(function _callee177$(_context179){while(1)switch(_context179.prev=_context179.next){case 0:if(!_this307.weavyContext){_context179.next=9;break}_context179.t0=r.data.name;_context179.next=_context179.t0==="zoom-signed-in"?4:9;break;case 4:_context179.next=6;return fk(_this307.weavyContext,"zoom").mutate();case 6:o=_context179.sent;_this307.meeting=o;return _context179.abrupt("break",9);case 9:case"end":return _context179.stop()}},_callee177)}));return function(_x153){return _ref232.apply(this,arguments)}}(),_this307.openFileInput=function(){var r;(r=_this307.fileInputRef.value)==null||r.click()},_this307.openCloudFiles=function(){var r;(r=_this307.cloudFilesRef.value)==null||r.open()},_this307.addEventListener("drop-files",_this307.handleDropFiles),_this307.addEventListener("keyup",ql);return _this307}_createClass(We,[{key:"placeholder",get:function get(){return this._placeholder},set:function set(r){this._placeholder=r}},{key:"willUpdate",value:function willUpdate(r){var o;if((r.has("weavyContext")||r.has("app")||r.has("user")||r.has("parentId"))&&this.weavyContext&&this.app&&this.user){this.draftKey="draft-".concat(this.editorType,"-").concat(this.parentId||this.app.id),this.uploadBlobMutation.trackMutation(Hm(this.weavyContext,this.user,this.app,"".concat(this.editorLocation,"-").concat(this.parentId||this.app.id)));var s=["apps",this.app.id,"blobs","".concat(this.editorLocation,"-").concat(this.parentId||this.app.id)];if(this.mutatingFiles.trackMutationState({filters:{mutationKey:s,exact:!0}},this.weavyContext.queryClient),this.externalBlobMutation=Um(this.weavyContext,this.user,this.app,"".concat(this.editorLocation,"-").concat(this.parentId||this.app.id)),this.draft){var B=localStorage.getItem(this.draftKey);if(B){var Q=JSON.parse(B);this.text=Q.text,this.embeds=Q.embeds,this.meeting=Q.meeting,((o=Q.pollOptions)==null?void 0:o.length)>0&&(this.showPolls=!0,this.pollOptions=Q.pollOptions),Up(this.embeds.map(function(Y){return Y.original_url}))}else this.clearEditor()}this.embed&&(this.embeds=[this.embed],Up(this.embeds.map(function(B){return B.original_url}))),this.options&&this.options.length>0&&(this.pollOptions=[].concat(_toConsumableArray(this.options),[{id:null,text:""}]),this.showPolls=!0)}r.has("text")&&this.editor&&this.editor.dispatch({changes:{from:0,to:this.editor.state.doc.length,insert:this.text}})}},{key:"updated",value:function updated(r){var _this308=this;if((r.has("weavyContext")||r.has("app")||r.has("user")||r.has("parentId"))&&this.weavyContext&&this.app&&this.user&&this.editorRef.value&&this.weavyContext.whenUrl().then(function(){import(new URL("./es/editor.js",typeof WEAVY_IMPORT_URL=="string"&&(!import.meta.url||!new URL(import.meta.url).href.startsWith(WEAVY_IMPORT_URL))?WEAVY_IMPORT_URL:import.meta.url).href).then(function(o){return o.editor}).then(function(_ref233){var o=_ref233.defaultHighlightStyle,s=_ref233.syntaxHighlighting,B=_ref233.history,Q=_ref233.dropCursor,Y=_ref233.mentions,J=_ref233.autocompletion,it=_ref233.placeholder,nt=_ref233.keymap,ot=_ref233.weavyKeymap,dt=_ref233.defaultKeymap,Mt=_ref233.historyKeymap,Ot=_ref233.markdown,Qt=_ref233.languages,Ut=_ref233.EditorView,te=_ref233.EditorState,qt=_ref233.weavyDesktopMessageKeymap;var ie,re,ne;var ae=_this308.editorType==="messages"&&Jb&&qt?_toConsumableArray(qt):[];_this308.editorExtensions=[Ut.contentAttributes.of({spellcheck:"true",autocorrect:"on",autocapitalize:"on"}),B(),Q(),Y,J({override:Pe(_this308.availableFeatures,Ee.Mentions,(ie=_this308.features)==null?void 0:ie.mentions)?[function(Bt){return _this308.autocomplete(Bt)}]:null,closeOnBlur:!1,icons:!1,addToOptions:[{render:function render(Bt,Wt){var oe,ve,_e,Xe;var He=document.createElement("div");He.classList.add("wy-item"),He.classList.add("wy-item-hover"),(!((oe=Bt.item)!=null&&oe.access)||Bt.item.access===Fi.None)&&He.classList.add("wy-disabled");var ro=document.createElement("wy-avatar");ro.src=((ve=Bt.item)==null?void 0:ve.avatar_url)||"",ro.name=((_e=Bt.item)==null?void 0:_e.display_name)||"";var Xo=document.createElement("div");return Xo.classList.add("wy-item-body"),Xo.innerText=((Xe=Bt.item)==null?void 0:Xe.display_name)||"",He.appendChild(ro),He.appendChild(Xo),He},position:10}]}),it(_this308.placeholder),s(o,{fallback:!0}),Ut.lineWrapping,nt.of([].concat(_toConsumableArray(ae),_toConsumableArray(ot),_toConsumableArray(dt),_toConsumableArray(Mt))),Ot({codeLanguages:Qt}),Ut.domEventHandlers({paste:function paste(Bt,Wt){var oe,ve;var _e=[];var Xe=((oe=Bt.clipboardData)==null?void 0:oe.items)||[];for(var He in Xe){var ro=Xe[He];if(ro.kind==="file"){var Xo=ro.getAsFile();Xo&&(_e=[].concat(_toConsumableArray(_e),[Xo]))}}if(_e.length>0&&Pe(_this308.availableFeatures,Ee.Attachments,(ve=_this308.features)==null?void 0:ve.attachments)){for(var _He2=0;_He2<_e.length;_He2++)_this308.handleUploadFiles(_e);return!0}},keyup:function keyup(Bt,Wt){var oe,ve;_this308.typing&&Wt.state.doc.toString()!==""&&Pe(_this308.availableFeatures,Ee.Typing,(oe=_this308.features)==null?void 0:oe.typing)&&_this308.throttledTyping(),_this308.draft&&_this308.throttledDrafting(),Pe(_this308.availableFeatures,Ee.Embeds,(ve=_this308.features)==null?void 0:ve.embeds)&&Wt.state.doc.toString()!==""&&_this308.handleEmbeds(Wt.state.doc.toString())}}),Ut.updateListener.of(function(Bt){})],_this308.editor||(_this308.editor=new Ut({state:te.create({doc:_this308.text,extensions:_this308.editorExtensions}),parent:_this308.editorRef.value}),(ne=(re=_this308.editorRef.value)==null?void 0:re.querySelector(".cm-editor"))==null||ne.addEventListener("Weavy-SoftSubmit",_this308.submit.bind(_this308)))})}),r.has("placeholder")){var o=this.renderRoot.querySelector(".cm-placeholder");o&&(o.setAttribute("aria-label","placeholder ".concat(this.placeholder)),o.innerText=this.placeholder)}}},{key:"connectedCallback",value:function connectedCallback(){_get(_getPrototypeOf(We.prototype),"connectedCallback",this).call(this),window.addEventListener("message",this.createMeeting)}},{key:"disconnectedCallback",value:function disconnectedCallback(){_get(_getPrototypeOf(We.prototype),"disconnectedCallback",this).call(this),window.removeEventListener("message",this.createMeeting)}},{key:"handleRemoveMeeting",value:function handleRemoveMeeting(){this.meeting=void 0}},{key:"autocomplete",value:function(){var _autocomplete=_asyncToGenerator(_regeneratorRuntime().mark(function _callee178(r){var o,s,B,Q,Y;return _regeneratorRuntime().wrap(function _callee178$(_context180){while(1)switch(_context180.prev=_context180.next){case 0:if(!(!this.weavyContext||!this.app)){_context180.next=2;break}return _context180.abrupt("return",null);case 2:o=r.matchBefore(/(?!\]\(@)(^[^@]{0,1}|[^@]{2})@([^@]+)/);if(!(!r.explicit&&!o)){_context180.next=5;break}return _context180.abrupt("return",null);case 5:o=r.matchBefore(/@[^@]+/);s=o==null?void 0:o.text.substring(1);_context180.next=9;return this.weavyContext.get("/api/users/autocomplete?id="+this.app.id+"&q="+s);case 9:B=_context180.sent;_context180.next=12;return B==null?void 0:B.json();case 12:Q=_context180.sent;Y=[];return _context180.abrupt("return",(Q.data&&(Y=Q.data.filter(function(J){return _typeof(J.display_name)<"u"}).map(function(J){return{item:J,label:J.display_name,apply:function apply(it,nt,ot,dt){var Mt="["+J.display_name+"](@u"+J.id.toString()+")";var Ot=it.state.update({changes:{from:ot-1,to:ot}});it.dispatch(Ot),Ot=it.state.update({changes:{from:ot-1,to:dt-1,insert:Mt}}),it.dispatch(Ot)}}})),{from:o?o.from+1:r.pos,options:Y,filter:!1}));case 15:case"end":return _context180.stop()}},_callee178,this)}));function autocomplete(_x154){return _autocomplete.apply(this,arguments)}return autocomplete}()},{key:"handleDropFiles",value:function handleDropFiles(r){var o=r.detail;o.files&&this.handleUploadFiles(o.files)}},{key:"handleUploadFiles",value:function(){var _handleUploadFiles=_asyncToGenerator(_regeneratorRuntime().mark(function _callee179(r,o){var s,B;return _regeneratorRuntime().wrap(function _callee179$(_context181){while(1)switch(_context181.prev=_context181.next){case 0:if(!r){_context181.next=11;break}s=0;case 2:if(!(s<r.length)){_context181.next=10;break}B={file:r[s]};_context181.next=6;return this.uploadBlobMutation.mutate(B);case 6:this.saveDraft();case 7:s++;_context181.next=2;break;case 10:o&&(o.value="");case 11:case"end":return _context181.stop()}},_callee179,this)}));function handleUploadFiles(_x155,_x156){return _handleUploadFiles.apply(this,arguments)}return handleUploadFiles}()},{key:"handleExternalBlobs",value:function handleExternalBlobs(r){var o;if(r)for(var s=0;s<r.length;s++){var B=r[s];(o=this.externalBlobMutation)==null||o.mutate({externalBlob:B})}}},{key:"handleRemoveUpload",value:function handleRemoveUpload(r){!this.weavyContext||!this.app||Bm(this.weavyContext.queryClient,["apps",this.app.id,"blobs","".concat(this.editorLocation,"-").concat(this.parentId||this.app.id)],function(o){var s,B;return((s=o.state.data)==null?void 0:s.id)===((B=r.data)==null?void 0:B.id)})}},{key:"saveDraft",value:function saveDraft(){var r;if(!this.draft)return;var o=this.mutatingFiles.result;var s=(r=this.editor)==null?void 0:r.state.doc.toString();s===void 0&&(s=this.text),(!o||!o.length)&&!this.meeting&&!this.embeds.length&&!this.pollOptions.length&&s===""?localStorage.removeItem(this.draftKey):localStorage.setItem(this.draftKey,JSON.stringify({meeting:this.meeting,text:s,pollOptions:this.pollOptions,embeds:this.embeds}))}},{key:"handleRemoveAttachment",value:function handleRemoveAttachment(r){this.attachments=this.attachments.filter(function(o){return o.id!==r.id})}},{key:"submit",value:function(){var _submit=_asyncToGenerator(_regeneratorRuntime().mark(function _callee180(){var r,o,s,B,Q,Y,J,it,nt,ot,dt;return _regeneratorRuntime().wrap(function _callee180$(_context182){while(1)switch(_context182.prev=_context182.next){case 0:Q=this.mutatingFiles.result,Y=(r=this.editor)==null?void 0:r.state.doc.toString().trim(),J=(o=this.meeting)==null?void 0:o.id,it=Q==null?void 0:Q.map(function(Mt){var Ot;return(Ot=Mt.data)==null?void 0:Ot.id}),nt=((s=this.attachments)==null?void 0:s.map(function(Mt){return Mt.id}))||[],ot=this.pollOptions.filter(function(Mt){return Mt.text.trim()!==""});if(!(!Y&&!J&&(it==null?void 0:it.length)==0&&ot.length==0&&nt.length==0&&this.embeds.length==0)){_context182.next=3;break}return _context182.abrupt("return");case 3:dt={detail:{text:Y,meetingId:J,blobs:it,attachments:nt,pollOptions:ot,embed:(B=this.embeds[0])==null?void 0:B.id},bubbles:!0,composed:!0};this.dispatchEvent(new CustomEvent("submit",dt)),this.resetEditor();case 5:case"end":return _context182.stop()}},_callee180,this)}));function submit(){return _submit.apply(this,arguments)}return submit}()},{key:"resetEditor",value:function resetEditor(){this.clearEditor(),this.weavyContext&&this.app&&mk(this.weavyContext.queryClient,["apps",this.app.id,"blobs","".concat(this.editorLocation,"-").concat(this.parentId||this.app.id)]),localStorage.removeItem(this.draftKey)}},{key:"clearEditor",value:function clearEditor(){var r;(r=this.editor)==null||r.dispatch({changes:{from:0,to:this.editor.state.doc.length,insert:""}}),this.text="",this.meeting=void 0,this.pollOptions=[],this.showPolls=!1,this.embeds=[],Lk()}},{key:"handleZoomClick",value:function handleZoomClick(){!this.weavyContext||!this.user||window.open("".concat(this.weavyContext.zoomAuthenticationUrl,"&state=").concat(this.user.id),"zoomAuthWin","height=640,width=480")}},{key:"setEmbeds",value:function setEmbeds(r){this.embeds=[r].concat(_toConsumableArray(this.embeds)),this.saveDraft()}},{key:"handleEmbeds",value:function(){var _handleEmbeds=_asyncToGenerator(_regeneratorRuntime().mark(function _callee181(r){return _regeneratorRuntime().wrap(function _callee181$(_context183){while(1)switch(_context183.prev=_context183.next){case 0:_context183.t0=this.weavyContext;if(!_context183.t0){_context183.next=4;break}_context183.next=4;return Mk(r,this.setEmbeds.bind(this),this.weavyContext);case 4:case"end":return _context183.stop()}},_callee181,this)}));function handleEmbeds(_x157){return _handleEmbeds.apply(this,arguments)}return handleEmbeds}()},{key:"removeEmbed",value:function removeEmbed(r){this.embeds=this.embeds.filter(function(o){return o.id!==r.detail.id}),this.saveDraft()}},{key:"swapEmbed",value:function swapEmbed(){var r=this.embeds.shift();r&&(this.embeds=[].concat(_toConsumableArray(this.embeds),[r])),this.saveDraft()}},{key:"openPolls",value:function openPolls(){if(this.showPolls)this.showPolls=!1;else{if(this.pollOptions.length===0){var r={id:null,text:""};this.pollOptions=[].concat(_toConsumableArray(this.pollOptions),[r])}this.showPolls=!0}}},{key:"handlePollOptionChange",value:function handlePollOptionChange(r,o){var s=_toConsumableArray(this.pollOptions);s[o].text=r.target.value,this.pollOptions=s,this.saveDraft()}},{key:"handlePollOptionAdd",value:function handlePollOptionAdd(r,o){if(o===this.pollOptions.length-1){var s={id:null,text:""};this.pollOptions=[].concat(_toConsumableArray(this.pollOptions),[s]),this.saveDraft()}}},{key:"renderTopSlot",value:function renderTopSlot(){return O}},{key:"renderMiddleSlot",value:function renderMiddleSlot(){var _this309=this;var r,o,s,B,Q,Y,J;return v(_templateObject173||(_templateObject173=_taggedTemplateLiteral(["\n <!-- Input -->\n <div\n class=","\n ","\n ></div>\n <div class=\"wy-post-editor-inputs\">\n ","\n ","\n ","\n ","\n ","\n\n <!-- Button -->\n <wy-button @click=\"","\" buttonClass=\"wy-button-primary\" title=",">\n ","\n </wy-button>\n </div>\n "])),Qe({"wy-post-editor-text":!0,"wy-is-invalid":this.editorError}),Ce(this.editorRef),Pe(this.availableFeatures,Ee.Attachments,(r=this.features)==null?void 0:r.attachments)?v(_templateObject174||(_templateObject174=_taggedTemplateLiteral(["<wy-button kind=\"icon\" @click=",">\n <wy-icon name=\"attachment\"></wy-icon>\n </wy-button>\n <input\n type=\"file\"\n ","\n @click=","\n @change=","\n multiple\n hidden\n tabindex=\"-1\"\n />"])),this.openFileInput,Ce(this.fileInputRef),function(it){return it.stopPropagation()},function(it){return _this309.handleUploadFiles(Array.from(it.target.files||[]),it.target)}):O,Pe(this.availableFeatures,Ee.CloudFiles,(o=this.features)==null?void 0:o.cloudFiles)?v(_templateObject175||(_templateObject175=_taggedTemplateLiteral(["<wy-button kind=\"icon\" @click=",">\n <wy-icon name=\"cloud\"></wy-icon>\n </wy-button>"])),this.openCloudFiles):O,Pe(this.availableFeatures,Ee.Confluence,(s=this.features)==null?void 0:s.confluence)&&(B=this.weavyContext)!=null&&B.confluenceAuthenticationUrl?v(_templateObject176||(_templateObject176=_taggedTemplateLiteral(["<wy-confluence @external-blobs=","></wy-confluence>"])),function(it){return _this309.handleExternalBlobs(it.detail.externalBlobs)}):O,Pe(this.availableFeatures,Ee.Meetings,(Q=this.features)==null?void 0:Q.meetings)&&(Y=this.weavyContext)!=null&&Y.zoomAuthenticationUrl?v(_templateObject177||(_templateObject177=_taggedTemplateLiteral(["<wy-button kind=\"icon\" @click=",">\n <wy-icon name=\"zoom\"></wy-icon>\n </wy-button>"])),this.handleZoomClick):O,Pe(this.availableFeatures,Ee.Polls,(J=this.features)==null?void 0:J.polls)?v(_templateObject178||(_templateObject178=_taggedTemplateLiteral(["<wy-button kind=\"icon\" @click=","><wy-icon name=\"poll\"></wy-icon></wy-button>"])),this.openPolls):O,this.submit,this.buttonText,this.buttonText)}},{key:"renderBottomSlot",value:function renderBottomSlot(){return this.renderLists()}},{key:"renderLists",value:function renderLists(){var _this310=this;var r,o,s;var B=this.mutatingFiles.result;return v(_templateObject179||(_templateObject179=_taggedTemplateLiteral(["\n <!-- polls -->\n ","\n\n <!-- meetings -->\n ","\n\n <!-- blobs -->\n ","\n\n <!-- attachments -->\n ","\n\n <!-- embeds -->\n ","\n "])),Pe(this.availableFeatures,Ee.Polls,(r=this.features)==null?void 0:r.polls)&&this.showPolls&&this.pollOptions.length>0?v(_templateObject180||(_templateObject180=_taggedTemplateLiteral(["\n <div class=\"wy-poll-form\">\n ","\n </div>\n "])),this.pollOptions.map(function(Q,Y){return v(_templateObject181||(_templateObject181=_taggedTemplateLiteral(["<input\n value=","\n @change=","\n @keyup=","\n class=\"wy-input\"\n type=\"text\"\n placeholder=","\n @focus=","\n />"])),Q.text,function(J){return _this310.handlePollOptionChange(J,Y)},gd,K$1("+ add an option"),function(J){return _this310.handlePollOptionAdd(J,Y)})})):O,Pe(this.availableFeatures,Ee.Meetings,(o=this.features)==null?void 0:o.meetings)&&this.meeting?v(_templateObject182||(_templateObject182=_taggedTemplateLiteral(["<div class=\"wy-item\">\n <wy-icon name=\"zoom\"></wy-icon>\n <div class=\"wy-item-body\">","</div>\n <wy-button kind=\"icon\" @click=",">\n <wy-icon name=\"close-circle\"></wy-icon>\n </wy-button>\n </div>"])),K$1("Zoom meeting"),this.handleRemoveMeeting):O,B&&B.length?Lr(B,function(Q){return"mutation"+Q.submittedAt},function(Q){var Y,J;if((Y=Q.context)!=null&&Y.file){var it=Q.context.file,nt=_objectSpread({},Q.context.status);return v(_templateObject183||(_templateObject183=_taggedTemplateLiteral(["\n <wy-file-item\n .availableFeatures=","\n .features=","\n .file=","\n .status=","\n title=\"",": ","\"\n >\n <span slot=\"title\"\n ><strong></strong> ","\n ","</span\n >\n <wy-button\n slot=\"actions\"\n kind=\"icon\"\n @click=","\n title=","\n >\n <wy-icon name=\"close\"></wy-icon>\n </wy-button>\n </wy-file-item>\n "])),_this310.availableFeatures,_this310.features,(J=Q.context)==null?void 0:J.file,nt,Sf(Q.context.type),it.name+(nt.text?": ".concat(nt.text):""),it.name,nt.text?v(_templateObject184||(_templateObject184=_taggedTemplateLiteral([": <em>","</em>"])),nt.text):O,function(){return _this310.handleRemoveUpload(Q)},K$1("Discard",{desc:"Button action to discard"}))}return O}):O,this.attachments&&this.attachments.map(function(Q){return v(_templateObject185||(_templateObject185=_taggedTemplateLiteral(["<wy-file-item\n .file=","\n .availableFeatures=","\n .features=","\n title=\"","\"\n >\n <span slot=\"title\">","</span>\n <wy-button\n slot=\"actions\"\n kind=\"icon\"\n @click=","\n title=","\n >\n <wy-icon name=\"close\"></wy-icon>\n </wy-button>\n </wy-file-item>"])),Q,_this310.availableFeatures,_this310.features,Q.name,Q.name,function(){return _this310.handleRemoveAttachment(Q)},K$1("Remove",{desc:"Button action to remove"}))}),Pe(this.availableFeatures,Ee.Embeds,(s=this.features)==null?void 0:s.embeds)&&this.embeds.length>0?v(_templateObject186||(_templateObject186=_taggedTemplateLiteral(["<div class=\"wy-embed-preview\">\n ","\n </div> "])),this.embeds.map(function(Q){return v(_templateObject187||(_templateObject187=_taggedTemplateLiteral(["\n <wy-embed\n class=\"wy-embed\"\n .embed=","\n @embed-remove=","\n @embed-swap=","\n .enableSwap=","\n ></wy-embed>\n "])),Q,_this310.removeEmbed,_this310.swapEmbed,_this310.embeds.length>1)})):O)}},{key:"renderCloudFiles",value:function renderCloudFiles(){var _this311=this;return v(_templateObject188||(_templateObject188=_taggedTemplateLiteral(["\n <wy-cloud-files\n ","\n @external-blobs=","\n ></wy-cloud-files>\n "])),Ce(this.cloudFilesRef),function(r){return _this311.handleExternalBlobs(r.detail.externalBlobs)})}},{key:"render",value:function render(){var r=this.dropZone.isDragActive;return v(_templateObject189||(_templateObject189=_taggedTemplateLiteral(["\n <div\n class=","\n data-drag-title=","\n title=","\n >\n "," "," ","\n </div>\n ","\n "])),Qe(_defineProperty(_defineProperty({},this.editorClass,!0),"wy-dragging",r)),K$1("Drop files here to upload."),K$1("Drop files here to upload."),this.renderTopSlot(),this.renderMiddleSlot(),this.renderBottomSlot(),this.renderCloudFiles())}}]);return We}(le);We.styles=me;rt([Ge({context:Le,subscribe:!0}),K()],We.prototype,"weavyContext",2);rt([m({attribute:!1})],We.prototype,"app",2);rt([m({attribute:!1})],We.prototype,"parentId",2);rt([m({attribute:!1})],We.prototype,"user",2);rt([m()],We.prototype,"placeholder",1);rt([m()],We.prototype,"text",2);rt([m({attribute:!1})],We.prototype,"embed",2);rt([m({attribute:!1})],We.prototype,"options",2);rt([m({attribute:!1})],We.prototype,"attachments",2);rt([m()],We.prototype,"buttonText",2);rt([m({type:Boolean})],We.prototype,"typing",2);rt([m({type:Boolean})],We.prototype,"draft",2);rt([m()],We.prototype,"editorType",2);rt([m()],We.prototype,"editorClass",2);rt([m()],We.prototype,"editorLocation",2);rt([m({attribute:!1})],We.prototype,"availableFeatures",2);rt([m({attribute:!1})],We.prototype,"features",2);rt([K()],We.prototype,"meeting",2);rt([K()],We.prototype,"editorError",2);rt([K()],We.prototype,"showPolls",2);rt([K()],We.prototype,"pollOptions",2);rt([K()],We.prototype,"embeds",2);rt([K()],We.prototype,"draftKey",2);rt([K()],We.prototype,"keyMap",2);rt([K()],We.prototype,"editorExtensions",2);rt([K()],We.prototype,"editor",2);We=rt([de("wy-editor"),q()],We);var Vk=Object.defineProperty,Bk=Object.getOwnPropertyDescriptor,At=function At(r,o,s,B){for(var Q=B>1?void 0:B?Bk(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&Vk(o,s,Q),Q};var mt=function(_le42){_inherits(mt,_le42);function mt(){var _this312;_classCallCheck(this,mt);_this312=_callSuper(this,mt,arguments),_this312.temp=!1,_this312.createdAt="",_this312.modifiedAt=void 0,_this312.isSubscribed=!1,_this312.isTrashed=!1,_this312.text="",_this312.attachments=[],_this312.pollOptions=[],_this312.reactions=[],_this312.seenBy=[],_this312.userId=-1,_this312.features={},_this312.updateCommentMutation=new tn(_assertThisInitialized(_this312));return _this312}_createClass(mt,[{key:"dispatchEdit",value:function dispatchEdit(r){var o=new CustomEvent("edit",{detail:{edit:r}});return this.dispatchEvent(o)}},{key:"handleSubmit",value:function handleSubmit(r){this.updateCommentMutation.mutate({id:this.commentId,type:"apps",parentId:this.parentId,text:r.detail.text,meetingId:r.detail.meetingId,blobs:r.detail.blobs,attachments:r.detail.attachments,pollOptions:r.detail.pollOptions,embed:r.detail.embed,user:this.user}),this.dispatchEdit(!1)}},{key:"willUpdate",value:function(){var _willUpdate=_asyncToGenerator(_regeneratorRuntime().mark(function _callee182(r){return _regeneratorRuntime().wrap(function _callee182$(_context184){while(1)switch(_context184.prev=_context184.next){case 0:(r.has("app")||r.has("weavyContext"))&&this.app&&this.weavyContext&&this.updateCommentMutation.trackMutation(Rx(this.weavyContext,["comments",this.parentId]));case 1:case"end":return _context184.stop()}},_callee182,this)}));function willUpdate(_x158){return _willUpdate.apply(this,arguments)}return willUpdate}()},{key:"render",value:function render(){var _this313=this;return v(_templateObject190||(_templateObject190=_taggedTemplateLiteral(["\n <nav class=\"wy-item\">\n <div class=\"wy-item-body\">\n <div class=\"wy-item-title\">","</div>\n </div>\n\n <wy-button @click="," kind=\"icon\">\n <wy-icon name=\"close\"></wy-icon>\n </wy-button>\n </nav>\n <wy-editor\n editorLocation=\"posts\"\n .text=","\n .embed=","\n .options=","\n .attachments=","\n .app=","\n .user=","\n .parentId=","\n .availableFeatures=","\n .features=","\n .typing=","\n .draft=","\n placeholder=","\n buttonText=","\n @submit=","></wy-editor>\n "])),K$1("Edit comment"),function(){return _this313.dispatchEdit(!1)},this.text,this.embed,this.pollOptions,this.attachments,this.app,this.user,this.commentId,this.availableFeatures,this.features,!1,!1,K$1("Edit comment..."),K$1("Update",{desc:"Button action to update"}),function(r){return _this313.handleSubmit(r)})}}]);return mt}(le);mt.styles=me;At([Ge({context:Le,subscribe:!0}),K()],mt.prototype,"weavyContext",2);At([m({attribute:!1})],mt.prototype,"app",2);At([m({attribute:!1})],mt.prototype,"user",2);At([m({type:Number})],mt.prototype,"parentId",2);At([m({type:Number})],mt.prototype,"commentId",2);At([m({type:Boolean})],mt.prototype,"temp",2);At([m({attribute:!1})],mt.prototype,"createdBy",2);At([m()],mt.prototype,"createdAt",2);At([m()],mt.prototype,"modifiedAt",2);At([m({type:Boolean})],mt.prototype,"isSubscribed",2);At([m({type:Boolean})],mt.prototype,"isTrashed",2);At([m()],mt.prototype,"text",2);At([m({type:Array})],mt.prototype,"attachments",2);At([m({type:Array})],mt.prototype,"pollOptions",2);At([m({attribute:!1})],mt.prototype,"meeting",2);At([m({attribute:!1})],mt.prototype,"embed",2);At([m({type:Array})],mt.prototype,"reactions",2);At([m({type:Array})],mt.prototype,"seenBy",2);At([m({type:Number})],mt.prototype,"userId",2);At([m({type:Object})],mt.prototype,"features",2);At([m({type:Array})],mt.prototype,"availableFeatures",2);mt=At([de("wy-comment-edit"),q()],mt);var Hk=Object.defineProperty,jk=Object.getOwnPropertyDescriptor,Lt=function Lt(r,o,s,B){for(var Q=B>1?void 0:B?jk(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&Hk(o,s,Q),Q};var vt=function(_le43){_inherits(vt,_le43);function vt(){var _this314;_classCallCheck(this,vt);_this314=_callSuper(this,vt,arguments),_this314.temp=!1,_this314.createdAt="",_this314.modifiedAt=void 0,_this314.isTrashed=!1,_this314.html="",_this314.text="",_this314.attachments=[],_this314.pollOptions=[],_this314.reactions=[],_this314.commentCount=0,_this314.seenBy=[],_this314.features={},_this314.editing=!1;return _this314}_createClass(vt,[{key:"dispatchVote",value:function dispatchVote(r){var o=new CustomEvent("vote",{detail:{id:r,parentId:this.commentId,parentType:"comments"}});return this.dispatchEvent(o)}},{key:"dispatchSubscribe",value:function dispatchSubscribe(r){var o=new CustomEvent("subscribe",{detail:{id:this.commentId,subscribe:r}});return this.dispatchEvent(o)}},{key:"dispatchTrash",value:function dispatchTrash(){var r=new CustomEvent("trash",{detail:{id:this.commentId}});return this.dispatchEvent(r)}},{key:"dispatchRestore",value:function dispatchRestore(){var r=new CustomEvent("restore",{detail:{id:this.commentId}});return this.dispatchEvent(r)}},{key:"render",value:function render(){var _this315=this;return v(_templateObject191||(_templateObject191=_taggedTemplateLiteral(["\n ","\n ","\n ","\n "])),this.isTrashed?v(_templateObject192||(_templateObject192=_taggedTemplateLiteral(["<wy-comment-trashed\n class=\"wy-comment\"\n commentId=","\n @restore=","></wy-comment-trashed> "])),this.commentId,function(){_this315.dispatchRestore()}):O,!this.isTrashed&&this.editing?v(_templateObject193||(_templateObject193=_taggedTemplateLiteral(["<wy-comment-edit\n class=\"wy-comment\"\n .app=","\n .user=","\n .commentId=","\n .parentId=","\n .availableFeatures=","\n .features=","\n .text=","\n .pollOptions=","\n .attachments=","\n .embed=","\n @edit=","></wy-comment-edit> "])),this.app,this.user,this.commentId,this.parentId,this.availableFeatures,this.features,this.text,this.pollOptions,this.attachments,this.embed,function(r){_this315.editing=r.detail.edit}):O,!this.isTrashed&&!this.editing?v(_templateObject194||(_templateObject194=_taggedTemplateLiteral(["<wy-comment-view\n class=\"wy-comment\"\n id=\"","\"\n .app=","\n .user=","\n .commentId=","\n .parentId=","\n .temp=","\n .createdBy=","\n .createdAt=","\n .modifiedAt=","\n .isTrashed=","\n .html=","\n .attachments=","\n .embed=","\n .meeting=","\n .pollOptions=","\n .reactions=","\n .availableFeatures=","\n .features=","\n @edit=","\n @subscribe=","\n @trash=","\n @vote=","></wy-comment-view> "])),this.id,this.app,this.user,this.commentId,this.parentId,this.temp,this.createdBy,this.createdAt,this.modifiedAt,this.isTrashed,this.html,this.attachments,this.embed,this.meeting,this.pollOptions,this.reactions,this.availableFeatures,this.features,function(r){_this315.editing=r.detail.edit},function(r){_this315.dispatchSubscribe(r.detail.subscribe)},function(){_this315.dispatchTrash()},function(r){_this315.dispatchVote(r.detail.id)}):O)}}]);return vt}(le);vt.styles=me;Lt([m({attribute:!1})],vt.prototype,"app",2);Lt([m({attribute:!1})],vt.prototype,"user",2);Lt([m({type:Number})],vt.prototype,"commentId",2);Lt([m({type:Number})],vt.prototype,"parentId",2);Lt([m({type:Boolean})],vt.prototype,"temp",2);Lt([m({attribute:!1})],vt.prototype,"createdBy",2);Lt([m()],vt.prototype,"createdAt",2);Lt([m()],vt.prototype,"modifiedAt",2);Lt([m({type:Boolean})],vt.prototype,"isTrashed",2);Lt([m()],vt.prototype,"html",2);Lt([m()],vt.prototype,"text",2);Lt([m({attribute:!1})],vt.prototype,"attachments",2);Lt([m({type:Array})],vt.prototype,"pollOptions",2);Lt([m({attribute:!1})],vt.prototype,"meeting",2);Lt([m({attribute:!1})],vt.prototype,"embed",2);Lt([m({type:Array})],vt.prototype,"reactions",2);Lt([m({attribute:!1})],vt.prototype,"commentCount",2);Lt([m({type:Array})],vt.prototype,"seenBy",2);Lt([m({type:Object})],vt.prototype,"features",2);Lt([m({type:Array})],vt.prototype,"availableFeatures",2);Lt([K()],vt.prototype,"editing",2);vt=Lt([de("wy-comment")],vt);var Uk=Object.defineProperty,Wk=Object.getOwnPropertyDescriptor,qk=function qk(r,o,s,B){for(var Q=B>1?void 0:B?Wk(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&Uk(o,s,Q),Q};var Wp=function(_We){_inherits(Wp,_We);function Wp(){var _this316;_classCallCheck(this,Wp);_this316=_callSuper(this,Wp),_this316.editorType="comments",_this316.editorClass="wy-comment-editor";return _this316}_createClass(Wp,[{key:"renderTopSlot",value:function renderTopSlot(){return O}},{key:"renderMiddleSlot",value:function renderMiddleSlot(){var _this317=this;var r,o,s,B,Q,Y,J,it,nt,ot;return v(_templateObject195||(_templateObject195=_taggedTemplateLiteral(["<div class=\"wy-comment-editor-inputs\">\n <!-- Add -->\n ","\n\n <!-- Input -->\n <div\n class=","\n ","\n ></div>\n\n <!-- Button -->\n <wy-button kind=\"icon\" @click=\"","\" title=",">\n <wy-icon name=\"send\"></wy-icon>\n </wy-button>\n </div>"])),Pe(this.availableFeatures,Ee.Attachments,(r=this.features)==null?void 0:r.attachments)||Pe(this.availableFeatures,Ee.CloudFiles,(o=this.features)==null?void 0:o.cloudFiles)||Pe(this.availableFeatures,Ee.Meetings,(s=this.features)==null?void 0:s.meetings)?v(_templateObject196||(_templateObject196=_taggedTemplateLiteral(["<wy-dropdown icon=\"plus\" directionY=\"up\">\n ","\n ","\n ","\n ","\n ","\n </wy-dropdown>"])),Pe(this.availableFeatures,Ee.Attachments,(B=this.features)==null?void 0:B.attachments)?v(_templateObject197||(_templateObject197=_taggedTemplateLiteral(["<wy-dropdown-item @click=",">\n <wy-icon name=\"attachment\"></wy-icon>\n <span>","</span>\n </wy-dropdown-item>\n <input\n type=\"file\"\n ","\n @click=","\n @change=","\n multiple\n hidden\n tabindex=\"-1\"\n />"])),this.openFileInput,K$1("From device"),Ce(this.fileInputRef),function(dt){return dt.stopPropagation()},function(dt){return _this317.handleUploadFiles(Array.from(dt.target.files||[]),dt.target)}):O,Pe(this.availableFeatures,Ee.CloudFiles,(Q=this.features)==null?void 0:Q.cloudFiles)?v(_templateObject198||(_templateObject198=_taggedTemplateLiteral(["<wy-dropdown-item @click=",">\n <wy-icon name=\"cloud\"></wy-icon>\n <span>","</span>\n </wy-dropdown-item>"])),this.openCloudFiles,K$1("From cloud")):O,Pe(this.availableFeatures,Ee.Confluence,(Y=this.features)==null?void 0:Y.confluence)&&(J=this.weavyContext)!=null&&J.confluenceAuthenticationUrl?v(_templateObject199||(_templateObject199=_taggedTemplateLiteral(["<wy-confluence\n dropdown\n @external-blobs=","\n ></wy-confluence>"])),function(dt){return _this317.handleExternalBlobs(dt.detail.externalBlobs)}):O,Pe(this.availableFeatures,Ee.Meetings,(it=this.features)==null?void 0:it.meetings)&&(nt=this.weavyContext)!=null&&nt.zoomAuthenticationUrl?v(_templateObject200||(_templateObject200=_taggedTemplateLiteral(["<wy-dropdown-item @click=",">\n <wy-icon name=\"zoom\"></wy-icon>\n <span>","</span>\n </wy-dropdown-item>"])),this.handleZoomClick,K$1("Zoom meeting")):O,Pe(this.availableFeatures,Ee.Polls,(ot=this.features)==null?void 0:ot.polls)?v(_templateObject201||(_templateObject201=_taggedTemplateLiteral(["<wy-dropdown-item @click=",">\n <wy-icon name=\"poll\"></wy-icon>\n <span>","</span>\n </wy-dropdown-item>"])),this.openPolls,K$1("Poll")):O):O,Qe({"wy-comment-editor-text":!0,"wy-is-invalid":this.editorError}),Ce(this.editorRef),this.submit,this.buttonText)}},{key:"renderBottomSlot",value:function renderBottomSlot(){return this.renderLists()}}]);return Wp}(We);Wp=qk([de("wy-comment-editor"),q()],Wp);var kd=function kd(r,o,s){return r===Fi.Read&&((s==null?void 0:s.indexOf(Cs.Read))!=-1||(s==null?void 0:s.indexOf(Cs.Create))!=-1)||r===Fi.Write&&(s==null?void 0:s.indexOf(Cs.Create))!=-1||r===Fi.Admin&&(s==null?void 0:s.indexOf(Cs.Admin))!=-1};var Qk=Object.defineProperty,Kk=Object.getOwnPropertyDescriptor,Jn=function Jn(r,o,s,B){for(var Q=B>1?void 0:B?Kk(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&Qk(o,s,Q),Q};var Ui=function(_le44){_inherits(Ui,_le44);function Ui(){var _this318;_classCallCheck(this,Ui);_this318=_callSuper(this,Ui,arguments),_this318.location="apps",_this318.features={},_this318.commentsQuery=new as(_assertThisInitialized(_this318)),_this318.addCommentMutation=new tn(_assertThisInitialized(_this318)),_this318.infiniteScroll=new ss(_assertThisInitialized(_this318)),_this318.pagerRef=Re(),_this318.handleRealtimeCommentCreated=function(r){var o;!_this318.weavyContext||r.actor.id===_this318.user.id||((o=r.comment.parent)==null?void 0:o.id)!==_this318.parentId||(r.comment.created_by=r.actor,sn(_this318.weavyContext.queryClient,["comments",_this318.parentId],r.comment,void 0,{descending:!1}))},_this318.handleRealtimeReactionAdded=function(r){!_this318.weavyContext||r.actor.id===_this318.user.id||r.entity.type!=="comment"||tt(_this318.weavyContext.queryClient,["comments",_this318.parentId],r.entity.id,function(o){o.reactions=[].concat(_toConsumableArray(o.reactions||[]),[{content:r.reaction,created_by_id:r.actor.id}])})},_this318.handleRealtimeReactionDeleted=function(r){!_this318.weavyContext||r.actor.id===_this318.user.id||r.entity.type!=="comment"||tt(_this318.weavyContext.queryClient,["comments",_this318.parentId],r.entity.id,function(o){o.reactions=o.reactions.filter(function(s){return s.created_by_id!==r.actor.id})})};return _this318}_createClass(Ui,[{key:"willUpdate",value:function(){var _willUpdate2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee183(r){return _regeneratorRuntime().wrap(function _callee183$(_context185){while(1)switch(_context185.prev=_context185.next){case 0:(r.has("parentId")||r.has("weavyContext"))&&this.parentId&&this.weavyContext&&(this.commentsQuery.trackInfiniteQuery(Tx(this.weavyContext,this.location,this.parentId)),this.addCommentMutation.trackMutation(Dx(this.weavyContext,["comments",this.parentId])),this.removeCommentMutation=zx(this.weavyContext,this.parentId),this.restoreCommentMutation=Vx(this.weavyContext,this.parentId),this.pollMutation=ly(this.weavyContext,["comments",this.parentId])),r.has("weavyContext")&&this.weavyContext&&(this.weavyContext.subscribe("a".concat(this.app.id),"comment_created",this.handleRealtimeCommentCreated),this.weavyContext.subscribe("a".concat(this.app.id),"reaction_added",this.handleRealtimeReactionAdded),this.weavyContext.subscribe("a".concat(this.app.id),"reaction_removed",this.handleRealtimeReactionDeleted));case 1:case"end":return _context185.stop()}},_callee183,this)}));function willUpdate(_x159){return _willUpdate2.apply(this,arguments)}return willUpdate}()},{key:"update",value:function update(r){_get(_getPrototypeOf(Ui.prototype),"update",this).call(this,r),this.infiniteScroll.observe(this.commentsQuery.result,this.pagerRef.value)}},{key:"handleSubmit",value:function(){var _handleSubmit=_asyncToGenerator(_regeneratorRuntime().mark(function _callee184(r){return _regeneratorRuntime().wrap(function _callee184$(_context186){while(1)switch(_context186.prev=_context186.next){case 0:_context186.t0=this.app;if(!_context186.t0){_context186.next=4;break}_context186.next=4;return this.addCommentMutation.mutate({appId:this.app.id,parentId:this.parentId,type:this.location,text:r.detail.text,meetingId:r.detail.meetingId,blobs:r.detail.blobs,pollOptions:r.detail.pollOptions,embed:r.detail.embed,user:this.user});case 4:case"end":return _context186.stop()}},_callee184,this)}));function handleSubmit(_x160){return _handleSubmit.apply(this,arguments)}return handleSubmit}()},{key:"renderComments",value:function renderComments(r){var _this319=this;if(r){var o=r.pages.flatMap(function(s){return s.data});return Lr(o,function(s){return s.id},function(s){return[v(_templateObject202||(_templateObject202=_taggedTemplateLiteral(["<wy-comment\n id=\"comment-","\"\n .app=","\n .user=","\n .commentId=","\n .parentId=","\n .temp=","\n .createdBy=","\n .createdAt=","\n .modifiedAt=","\n .isTrashed=","\n .html=","\n .text=","\n .attachments=","\n .embed=","\n .meeting=","\n .pollOptions=","\n .reactions=","\n .availableFeatures=","\n .features=","\n @trash=","\n @restore=","\n @vote=","\n ></wy-comment>"])),s.id,_this319.app,_this319.user,s.id,_this319.parentId,!1,s.created_by,s.created_at,s.modified_at,s.is_trashed,s.html,s.text,s.attachments,s.embed,s.meeting,s.options,s.reactions,_this319.availableFeatures,_this319.features,function(B){var Q;(Q=_this319.removeCommentMutation)==null||Q.mutate({id:B.detail.id,appId:_this319.app.id,parentId:_this319.parentId,type:_this319.location})},function(B){var Q;(Q=_this319.restoreCommentMutation)==null||Q.mutate({id:B.detail.id,appId:_this319.app.id,parentId:_this319.parentId,type:_this319.location})},function(B){var Q;(Q=_this319.pollMutation)==null||Q.mutate({optionId:B.detail.id,parentType:B.detail.parentType,parentId:B.detail.parentId})})]})}return O}},{key:"render",value:function render(){var _this$commentsQuery$r,_this320=this;var _ref234=(_this$commentsQuery$r=this.commentsQuery.result)!==null&&_this$commentsQuery$r!==void 0?_this$commentsQuery$r:{},r=_ref234.data,o=_ref234.isPending;return v(_templateObject203||(_templateObject203=_taggedTemplateLiteral([" <div>\n <div class=\"wy-comments\">\n ","\n <div "," class=\"wy-pager\"></div>\n </div>\n ","\n </div>"])),!o&&this.app&&r&&this.availableFeatures?this.renderComments(r):v(_templateObject204||(_templateObject204=_taggedTemplateLiteral(["<wy-spinner class=\"wy-content-icon\"></wy-spinner>"]))),Ce(this.pagerRef),kd(Fi.Write,this.app.access,this.app.permissions)?v(_templateObject205||(_templateObject205=_taggedTemplateLiteral(["\n <wy-comment-editor\n editorLocation=","\n .app=","\n .user=","\n .parentId=","\n .availableFeatures=","\n .features=","\n .typing=","\n .draft=","\n placeholder=","\n buttonText=","\n @submit=","\n ></wy-comment-editor>\n "])),this.location,this.app,this.user,this.parentId,this.availableFeatures,this.features,!1,!0,K$1("Create a comment..."),K$1("Comment",{desc:"Button action to comment"}),function(s){return _this320.handleSubmit(s)}):O)}},{key:"disconnectedCallback",value:function disconnectedCallback(){this.weavyContext&&this.app&&(this.weavyContext.unsubscribe("a".concat(this.app.id),"comment_created",this.handleRealtimeCommentCreated),this.weavyContext.unsubscribe("a".concat(this.app.id),"reaction_added",this.handleRealtimeReactionAdded),this.weavyContext.unsubscribe("a".concat(this.app.id),"reaction_removed",this.handleRealtimeReactionDeleted)),_get(_getPrototypeOf(Ui.prototype),"disconnectedCallback",this).call(this)}}]);return Ui}(le);Ui.styles=me;Jn([Ge({context:Le,subscribe:!0}),K()],Ui.prototype,"weavyContext",2);Jn([m({attribute:!1})],Ui.prototype,"app",2);Jn([m({attribute:!1})],Ui.prototype,"user",2);Jn([m({type:Number})],Ui.prototype,"parentId",2);Jn([m({attribute:!1})],Ui.prototype,"location",2);Jn([m({type:Object})],Ui.prototype,"features",2);Jn([m({type:Array})],Ui.prototype,"availableFeatures",2);Ui=Jn([de("wy-comment-list"),q()],Ui);function hy(r,o){return["apps",r.id,"file",o.id,"versions"]}function Zk(r,o,s){var B=r.queryClient,Q=["apps",o.id,"files"],Y=hy(o,s),J={mutationKey:Q,mutationFn:function(){var _mutationFn15=_asyncToGenerator(_regeneratorRuntime().mark(function _callee185(_ref235){var it;return _regeneratorRuntime().wrap(function _callee185$(_context187){while(1)switch(_context187.prev=_context187.next){case 0:it=_ref235.versionFile;if(!(it.id>=1&&it.version)){_context187.next=5;break}_context187.next=4;return r.post("/api/files/".concat(it.id,"/versions/").concat(it.version,"/restore"),"POST","");case 4:return _context187.abrupt("return",_context187.sent.json());case 5:throw new Error("Could not restore ".concat(it.name," to version ").concat(it.version,"."));case 6:case"end":return _context187.stop()}},_callee185)}));function mutationFn(_x161){return _mutationFn15.apply(this,arguments)}return mutationFn}(),onMutate:function(){var _onMutate9=_asyncToGenerator(_regeneratorRuntime().mark(function _callee186(it){return _regeneratorRuntime().wrap(function _callee186$(_context188){while(1)switch(_context188.prev=_context188.next){case 0:return _context188.abrupt("return",(je(B,{queryKey:J.mutationKey,exact:!1},it.versionFile.id,function(nt){return Object.assign(nt,it.versionFile,{status:"pending"})}),{type:"version",file:s,status:{state:"pending"}}));case 1:case"end":return _context188.stop()}},_callee186)}));function onMutate(_x162){return _onMutate9.apply(this,arguments)}return onMutate}(),onSuccess:function onSuccess(it,nt){je(B,{queryKey:J.mutationKey,exact:!1},nt.versionFile.id,function(ot){return Object.assign(ot,it,{status:"ok"})}),St(B,J.mutationKey,nt,function(ot){ot.status.state="ok"})},onError:function onError(it,nt,ot){ot!=null&&ot.file&&je(B,{queryKey:J.mutationKey,exact:!1},nt.versionFile.id,function(dt){return Object.assign(dt,ot.file,{status:"error"})}),St(B,J.mutationKey,nt,function(dt){dt.status.state="error",dt.status.text=it.message})},onSettled:function onSettled(){B.invalidateQueries({queryKey:Y})}};return J}function Gk(r,o,s){return new Ye(r.queryClient,Zk(r,o,s))}function Yk(r,o,s){var B=r.queryClient,Q=hy(o,s);return{mutationKey:Q,mutationFn:function(){var _mutationFn16=_asyncToGenerator(_regeneratorRuntime().mark(function _callee187(_ref236){var Y,J,it,_J6;return _regeneratorRuntime().wrap(function _callee187$(_context189){while(1)switch(_context189.prev=_context189.next){case 0:Y=_ref236.versionFile;if(!(Y.id>=1&&Y.version)){_context189.next=12;break}_context189.next=4;return r.post("/api/files/".concat(Y.id,"/versions/").concat(Y.version),"DELETE","");case 4:J=_context189.sent;if(J.ok){_context189.next=10;break}_context189.next=8;return J.json();case 8:it=_context189.sent;throw new Error(it.detail||it.title,{cause:it});case 10:_context189.next=14;break;case 12:_J6={status:400,title:"Could not remove ".concat(Y.name," version ").concat(Y.version,".")};throw new Error(_J6.detail||_J6.title,{cause:_J6});case 14:case"end":return _context189.stop()}},_callee187)}));function mutationFn(_x163){return _mutationFn16.apply(this,arguments)}return mutationFn}(),onMutate:function(){var _onMutate10=_asyncToGenerator(_regeneratorRuntime().mark(function _callee188(Y){return _regeneratorRuntime().wrap(function _callee188$(_context190){while(1)switch(_context190.prev=_context190.next){case 0:tt(B,Q,function(J){return J.id===Y.versionFile.id&&J.version===Y.versionFile.version},function(J){return Object.assign(J,{status:"pending"})});case 1:case"end":return _context190.stop()}},_callee188)}));function onMutate(_x164){return _onMutate10.apply(this,arguments)}return onMutate}(),onSuccess:function onSuccess(Y,J){P1(B,Q,function(it){return it.id===J.versionFile.id&&it.version===J.versionFile.version})},onError:function onError(Y,J){tt(B,Q,function(it){return it.id===J.versionFile.id&&it.version===J.versionFile.version},function(it){return Object.assign(it,{status:void 0})})}}}function Xk(r,o,s){return new Ye(r.queryClient,Yk(r,o,s))}var Jk=Object.defineProperty,eC=Object.getOwnPropertyDescriptor,Yo=function Yo(r,o,s,B){for(var Q=B>1?void 0:B?eC(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&Jk(o,s,Q),Q};var un=function(_le45){_inherits(un,_le45);function un(){var _this321;_classCallCheck(this,un);_this321=_callSuper(this,un,arguments),_this321.features={},_this321.availableFeatures=[],_this321.fileVersionsQuery=new kt(_assertThisInitialized(_this321));return _this321}_createClass(un,[{key:"selectVersion",value:function selectVersion(r){this.activeVersion=r,this.dispatchFileVersionSelect(r)}},{key:"dispatchFileVersionSelect",value:function dispatchFileVersionSelect(r){var o=new CustomEvent("file-version-select",{detail:{versionFile:r}});return this.dispatchEvent(o)}},{key:"handleRevert",value:function handleRevert(r){var o;console.debug("reverting file version",r.version),(o=this.fileVersionRestoreMutation)==null||o.mutate({versionFile:r}),this.selectVersion(r)}},{key:"handleRemove",value:function handleRemove(r){var o;console.debug("removing file version",r.version),(o=this.fileVersionDeleteMutation)==null||o.mutate({versionFile:r}),this.activeVersion===r&&(this.activeVersion=this.file)}},{key:"triggerDownload",value:function triggerDownload(r){Fs(r.download_url,"_top",r.name,!0)}},{key:"willUpdate",value:function willUpdate(r){(r.has("weavyContext")||r.has("file"))&&this.weavyContext&&this.fileVersionsQuery.trackQuery(tr(this.weavyContext,hy(this.app,this.file),"/api/files/".concat(this.file.id,"/versions"))),(r.has("weavyContext")||r.has("app")||r.has("file"))&&this.weavyContext&&this.app&&this.file&&(this.fileVersionRestoreMutation=Gk(this.weavyContext,this.app,this.file),this.fileVersionDeleteMutation=Xk(this.weavyContext,this.app,this.file))}},{key:"render",value:function render(){var _this322=this;var _this$fileVersionsQue=this.fileVersionsQuery.result,r=_this$fileVersionsQue.data,o=_this$fileVersionsQue.isPending;return o?v(_templateObject206||(_templateObject206=_taggedTemplateLiteral(["<wy-spinner overlay></wy-spinner>"]))):r?v(_templateObject207||(_templateObject207=_taggedTemplateLiteral(["\n <div class=\"wy-list wy-versions\">\n ","\n </div>\n "])),Lr(r,function(s){return s.id},function(s,B){var Q,Y,J,it;var nt=Zn(s.name||"").icon,ot=r.length-B,dt=Li(s.name),Mt=new Date(s.modified_at||s.created_at),Ot=!!_this322.file.external_url,Qt=new Intl.DateTimeFormat((Q=_this322.weavyContext)==null?void 0:Q.locale,{dateStyle:"full",timeStyle:"short"}).format(Mt),Ut=Yc((Y=_this322.weavyContext)==null?void 0:Y.locale,new Date(Mt));return Ot?v(_templateObject208||(_templateObject208=_taggedTemplateLiteral(["\n <wy-empty noNetwork>\n <span slot=\"title\">","</span>\n </wy-empty>\n "])),K$1("Versions are not available for external cloud files.")):v(_templateObject209||(_templateObject209=_taggedTemplateLiteral(["\n <div\n class=\"wy-item wy-item-hover wy-item-lg ","\"\n tabindex=\"0\"\n @click=","\n @keydown=","\n @keyup=","\n >\n <wy-icon name="," size=\"48\" kind="," ext=","></wy-icon>\n <div class=\"wy-item-body\">\n <div class=\"wy-item-title\">",". ","</div>\n <div class=\"wy-item-text\">\n <time datetime="," title=","\n >","</time\n >\n \xB7 ","</div\n >\n </div>\n\n <wy-dropdown directionX=\"left\">\n <wy-dropdown-item @click=",">\n <wy-icon name=\"download\"></wy-icon>\n ","\n </wy-dropdown-item>\n\n ","\n </wy-dropdown>\n </div>\n "])),Qe({"wy-active":s.version==((J=_this322.activeVersion)==null?void 0:J.version)}),function(){return _this322.selectVersion(s)},Bn,Hn,nt,s.kind,dt,ot,s.name,s.modified_at||s.created_at,Qt,Ut,(it=s.modified_by)==null?void 0:it.display_name,function(){return _this322.triggerDownload(s)},K$1("Download"),s.version!==_this322.file.version?v(_templateObject210||(_templateObject210=_taggedTemplateLiteral(["\n <wy-dropdown-divider></wy-dropdown-divider>\n <wy-dropdown-item @click=",">\n <wy-icon name=\"restore\"></wy-icon>\n ","\n </wy-dropdown-item>\n <wy-dropdown-item @click=",">\n <wy-icon name=\"delete\"></wy-icon>\n ","\n </wy-dropdown-item>\n "])),function(){return _this322.handleRevert(s)},"Revert",function(){return _this322.handleRemove(s)},K$1("Remove",{desc:"Button action to remove"})):O)})):O}}]);return un}(le);un.styles=me;Yo([Ge({context:Le,subscribe:!0}),K()],un.prototype,"weavyContext",2);Yo([m({attribute:!1})],un.prototype,"app",2);Yo([m({attribute:!1})],un.prototype,"file",2);Yo([m({attribute:!1})],un.prototype,"activeVersion",2);Yo([m({type:Object})],un.prototype,"features",2);Yo([K()],un.prototype,"availableFeatures",2);un=Yo([de("wy-file-versions"),q()],un);var tC=Object.defineProperty,rC=Object.getOwnPropertyDescriptor,Dt=function Dt(r,o,s,B){for(var Q=B>1?void 0:B?rC(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&tC(o,s,Q),Q};var Ct=function(_le46){_inherits(Ct,_le46);function Ct(){var _this323;_classCallCheck(this,Ct);_this323=_callSuper(this,Ct,arguments),_this323.uid="preview",_this323.features={},_this323.availableFeatures=[],_this323.currentId=NaN,_this323.isAttachment=!1,_this323.showOverlay=!1,_this323.commentsOpen=!1,_this323.versionsOpen=!1,_this323.sidePanelMaximized=!1,_this323.persistState=new cy(_assertThisInitialized(_this323)),_this323.history=new cx(_assertThisInitialized(_this323)),_this323.previewFileRef=Re(),_this323.swipeScrollRef=Re(),_this323.prevRef=Re(),_this323.nextRef=Re(),_this323.swipeScroller=new tx(_assertThisInitialized(_this323)),_this323.disableSwipeScroll=!1,_this323.handleKeys=function(r){_this323.showOverlay&&(r.key==="ArrowLeft"?(r.stopPropagation(),_this323.setPrev()):r.key==="ArrowRight"&&(r.stopPropagation(),_this323.setNext()))};return _this323}_createClass(Ct,[{key:"open",value:function open(r,o,s){o&&(this.files=o),r&&(this.currentId=r.id),s&&(this.uid=s),this.showOverlay=!0}},{key:"close",value:function close(){this.history.hasBackNavigation?this.history.backAll():this.showOverlay=!1}},{key:"toggleSidebarTab",value:function toggleSidebarTab(r,o){r==="comments"?(this.versionsOpen=!1,this.commentsOpen=o!==void 0?o:!this.commentsOpen):r==="versions"?(this.commentsOpen=!1,this.versionsOpen=o!==void 0?o:!this.versionsOpen):(this.commentsOpen=!1,this.versionsOpen=!1)}},{key:"handleVersionFile",value:function handleVersionFile(r){this.versionFile=r.detail.versionFile}},{key:"scrollToPrev",value:function scrollToPrev(){var r;this.prevRef.value&&(this.unblockSwipeScroll(),this.prevRef.value.scrollIntoView({behavior:(r=this.weavyContext)==null?void 0:r.scrollBehavior}))}},{key:"scrollToNext",value:function scrollToNext(){var r;this.nextRef.value&&(this.unblockSwipeScroll(),this.nextRef.value.scrollIntoView({behavior:(r=this.weavyContext)==null?void 0:r.scrollBehavior}))}},{key:"blockSwipeScroll",value:function blockSwipeScroll(){var _this324=this;var r=arguments.length>0&&arguments[0]!==undefined?arguments[0]:20;window.clearTimeout(this.disableSwipeScrollTimeout),this.disableSwipeScroll=!0,this.disableSwipeScrollTimeout=window.setTimeout(function(){return _this324.disableSwipeScroll=!1},r)}},{key:"unblockSwipeScroll",value:function unblockSwipeScroll(){window.clearTimeout(this.disableSwipeScrollTimeout),this.disableSwipeScroll=!1}},{key:"setPrev",value:function setPrev(){this.currentId=this.previousFile.id,this.blockSwipeScroll()}},{key:"setNext",value:function setNext(){this.currentId=this.nextFile.id,this.blockSwipeScroll()}},{key:"currentPreviewFileCallback",value:function currentPreviewFileCallback(r){r==null||r.scrollIntoView(),requestAnimationFrame(function(){return r==null?void 0:r.scrollIntoView()})}},{key:"willUpdate",value:function willUpdate(r){var _this325=this;if(r.has("app")&&this.app&&(this.persistState.observe(["commentsOpen","versionsOpen"],"".concat(this.app.type,"-").concat(this.app.id.toString(),"-").concat(this.uid)),this.history.observe(["showOverlay","currentFile","versionFile"],"".concat(this.app.type,"-").concat(this.app.id.toString(),"-").concat(this.uid,"}"))),r.has("queryResult")&&this.queryResult){var _this$queryResult;var _ref237=(_this$queryResult=this.queryResult)!==null&&_this$queryResult!==void 0?_this$queryResult:{},o=_ref237.data;this.files=o==null?void 0:o.filter(function(s){return s&&!s.is_trashed})}if(r.has("infiniteQueryResult")&&this.infiniteQueryResult){var _this$infiniteQueryRe;var _ref238=(_this$infiniteQueryRe=this.infiniteQueryResult)!==null&&_this$infiniteQueryRe!==void 0?_this$infiniteQueryRe:{},_o4=_ref238.data;this.files=_o4==null?void 0:_o4.pages.flatMap(function(s){return s.data}).filter(function(s){return s&&!s.is_trashed}).filter(function(s){return s})}(r.has("files")||r.has("currentId")||r.has("showOverlay"))&&this.files&&this.showOverlay&&(this.currentFile=void 0,this.previousFile=void 0,this.nextFile=void 0,this.versionFile=void 0,this.currentFile=this.files.find(function(o,s){return _this325.files&&o.id===_this325.currentId?(s>=1&&(_this325.previousFile=_this325.files[s-1]),s<_this325.files.length-1&&(_this325.nextFile=_this325.files[s+1]),_this325.infiniteQueryResult&&s>=_this325.files.length-2&&_this325.infiniteQueryResult.hasNextPage&&!_this325.infiniteQueryResult.isFetchingNextPage&&_this325.infiniteQueryResult.fetchNextPage(),_this325.infiniteQueryResult&&s<=1&&_this325.infiniteQueryResult.hasPreviousPage&&!_this325.infiniteQueryResult.isFetchingPreviousPage&&_this325.infiniteQueryResult.fetchPreviousPage(),!0):!1})),r.has("currentFile")&&this.currentFile&&!this.files&&(this.files=[this.currentFile])}},{key:"renderHeader",value:function renderHeader(r){var _this326=this;var o,s;var B={"wy-appbar-text-trashed":!!(r!=null&&r.is_trashed)};return v(_templateObject211||(_templateObject211=_taggedTemplateLiteral([" <header class=\"wy-appbars\">\n <nav class=\"wy-appbar\">\n <wy-button kind=\"icon\" @click=","><wy-icon name=\"close\"></wy-icon></wy-button>\n <div class=\"wy-appbar-text ","\">\n ","\n </div>\n <div class=\"wy-appbar-buttons\">\n ","\n </div>\n </nav>\n </header>"])),function(){return _this326.close()},Qe(B),r?v(_templateObject212||(_templateObject212=_taggedTemplateLiteral([" <span>","</span> "])),r.name):O,r?v(_templateObject213||(_templateObject213=_taggedTemplateLiteral(["\n ","\n <wy-file-menu\n .file=","\n .availableFeatures=","\n .features=","\n >\n ","\n </wy-file-menu>\n "])),r.id>=1&&!this.isAttachment&&Pe(this.availableFeatures,Ee.Comments,(o=this.features)==null?void 0:o.comments)?v(_templateObject214||(_templateObject214=_taggedTemplateLiteral(["\n <wy-button\n kind=\"icon\"\n ?active=","\n @click=","\n title=","\n >\n <div class=\"wy-icon-active-stack\">\n <span class=\"wy-icon-stack-item\"><wy-icon name=\"comment-outline\"></wy-icon></span>\n <span class=\"wy-icon-stack-item\"><wy-icon name=\"comment\"></wy-icon></span>\n </div>\n </wy-button>\n "])),this.commentsOpen,function(){return _this326.toggleSidebarTab("comments")},K$1("Comments")):O,r,this.availableFeatures,this.features,r.id>=1&&!this.isAttachment&&Pe(this.availableFeatures,Ee.Versions,(s=this.features)==null?void 0:s.versions)?v(_templateObject215||(_templateObject215=_taggedTemplateLiteral(["\n <wy-dropdown-item\n ?active=","\n @click=","\n >\n <wy-icon name=\"backup-restore\"></wy-icon>\n ","\n </wy-dropdown-item>\n "])),this.versionsOpen,function(){return _this326.toggleSidebarTab("versions")},K$1("Versions")):O):O)}},{key:"render",value:function render(){var _this327=this;var r=this.files===void 0;this.queryResult?r=this.queryResult.isPending:this.infiniteQueryResult&&(r=this.infiniteQueryResult.isPending);var o=this.versionFile||this.currentFile,s=[this.previousFile,o,this.nextFile].filter(function(Q){return Q}),B={"wy-preview-swiper-disabled":this.disableSwipeScroll};return an(this.showOverlay,v(_templateObject216||(_templateObject216=_taggedTemplateLiteral(["\n <wy-overlay\n class=\"wy-dark\"\n maximized\n @keyup=","\n @release-focus=","\n >\n ","\n\n <div class=\"wy-main\">\n <aside\n id=\"tab-comments\"\n class=\"wy-sidebar ","\"\n ?hidden=","\n >\n <nav class=\"wy-item\">\n <div class=\"wy-item-body\">\n <div class=\"wy-item-title\">","</div>\n </div>\n <wy-button kind=\"icon\" @click=",">\n <wy-icon name=\"close\"></wy-icon>\n </wy-button>\n <button\n @click=","\n class=\"wy-sidebar-handle\"\n title=","\n ></button>\n </nav>\n <div class=\"wy-pane wy-scroll-y\">\n ","\n </div>\n </aside>\n <aside\n id=\"tab-versions\"\n class=\"wy-sidebar ","\"\n ?hidden=","\n >\n <nav class=\"wy-item\">\n <div class=\"wy-item-body\">\n <div class=\"wy-item-title\">","</div>\n </div>\n <wy-button kind=\"icon\" @click=",">\n <wy-icon name=\"close\"></wy-icon>\n </wy-button>\n <button\n @click=","\n class=\"wy-sidebar-handle\"\n title=","\n ></button>\n </nav>\n <div class=\"wy-pane wy-scroll-y\">\n <div class=\"wy-pane-body\">\n ","\n </div>\n </div>\n </aside>\n\n <div class=\"wy-preview\">\n <div "," class=\"wy-preview-swiper ","\">\n ","\n </div>\n ","\n </div>\n </div>\n </wy-overlay>\n "])),this.handleKeys,function(){return _this327.dispatchEvent(new CustomEvent("release-focus",{bubbles:!0,composed:!0}))},this.renderHeader(this.currentFile),Qe({"wy-active":this.commentsOpen,"wy-maximized":this.sidePanelMaximized}),!this.commentsOpen,K$1("Comments"),function(){return _this327.toggleSidebarTab("comments",!1)},function(){return _this327.sidePanelMaximized=!_this327.sidePanelMaximized},this.sidePanelMaximized?K$1("Restore side panel"):K$1("Maximize side panel"),this.commentsOpen&&this.currentFile&&this.currentFile.id>=1&&this.app&&this.user?v(_templateObject217||(_templateObject217=_taggedTemplateLiteral(["\n <wy-comment-list\n .app=","\n .user=","\n .parentId=","\n .location=","\n .availableFeatures=","\n .features=","\n ></wy-comment-list>\n "])),this.app,this.user,this.currentFile.id,"files",this.availableFeatures,this.features):O,Qe({"wy-active":this.versionsOpen,"wy-maximized":this.sidePanelMaximized}),!this.versionsOpen,K$1("Versions"),function(){return _this327.toggleSidebarTab("versions",!1)},function(){return _this327.sidePanelMaximized=!_this327.sidePanelMaximized},this.sidePanelMaximized?K$1("Restore side panel"):K$1("Maximize side panel"),this.versionsOpen&&this.currentFile&&this.app?v(_templateObject218||(_templateObject218=_taggedTemplateLiteral(["\n <wy-file-versions\n .app=","\n .file=","\n .activeVersion=","\n .availableFeatures=","\n .features=","\n @file-version-select=","\n ></wy-file-versions>\n "])),this.app,this.currentFile,this.versionFile||this.currentFile,this.availableFeatures,this.features,function(Q){return _this327.handleVersionFile(Q)}):O,Ce(this.swipeScrollRef),Qe(B),Lr(s,function(Q){return"preview-area-"+(Q==null?void 0:Q.id)},function(Q){var Y=Q===o?_this327.currentPreviewFileCallback:Q===_this327.nextFile?_this327.nextRef:Q===_this327.previousFile?_this327.prevRef:void 0;return Q?v(_templateObject219||(_templateObject219=_taggedTemplateLiteral(["\n <div\n id=\"preview-","\"\n ","\n class=\"wy-preview-area wy-scroll-y wy-scroll-x\"\n >\n ","\n </div>\n "])),Q.id,Ce(Y),r?v(_templateObject220||(_templateObject220=_taggedTemplateLiteral([" <wy-spinner overlay></wy-spinner> "]))):v(_templateObject221||(_templateObject221=_taggedTemplateLiteral([" <wy-preview-item .file=","></wy-preview-item> "])),Q)):O}),this.currentFile?v(_templateObject222||(_templateObject222=_taggedTemplateLiteral(["\n ","\n ","\n "])),this.previousFile?v(_templateObject223||(_templateObject223=_taggedTemplateLiteral(["\n <nav class=\"wy-nav-prev\">\n <wy-button kind=\"icon\" @click=",">\n <wy-icon name=\"previous\"></wy-icon>\n </wy-button>\n </nav>\n "])),function(){return _this327.scrollToPrev()}):O,this.nextFile?v(_templateObject224||(_templateObject224=_taggedTemplateLiteral(["\n <nav class=\"wy-nav-next\">\n <wy-button kind=\"icon\" @click=",">\n <wy-icon name=\"next\"></wy-icon>\n </wy-button>\n </nav>\n "])),function(){return _this327.scrollToNext()}):O):O),function(){return _this327.close()})}},{key:"updated",value:function updated(){var _this328=this;requestAnimationFrame(function(){return requestAnimationFrame(function(){var _r$whenPrev,_o$whenNext;var r,o;_this328.swipeScrollRef.value?((_r$whenPrev=(r=_this328.swipeScroller).whenPrev)!==null&&_r$whenPrev!==void 0?_r$whenPrev:r.whenPrev=_asyncToGenerator(_regeneratorRuntime().mark(function _callee189(){return _regeneratorRuntime().wrap(function _callee189$(_context191){while(1)switch(_context191.prev=_context191.next){case 0:return _context191.abrupt("return",_this328.setPrev());case 1:case"end":return _context191.stop()}},_callee189)})),(_o$whenNext=(o=_this328.swipeScroller).whenNext)!==null&&_o$whenNext!==void 0?_o$whenNext:o.whenNext=_asyncToGenerator(_regeneratorRuntime().mark(function _callee190(){return _regeneratorRuntime().wrap(function _callee190$(_context192){while(1)switch(_context192.prev=_context192.next){case 0:return _context192.abrupt("return",_this328.setNext());case 1:case"end":return _context192.stop()}},_callee190)})),_this328.swipeScroller.createObserver(_this328.swipeScrollRef.value),_this328.swipeScroller.observe(_this328.prevRef.value,_this328.nextRef.value)):_this328.swipeScroller.clearObserver()})})}}]);return Ct}(le);Ct.styles=[me];Dt([Ge({context:Le,subscribe:!0}),K()],Ct.prototype,"weavyContext",2);Dt([m()],Ct.prototype,"uid",2);Dt([m({type:Object})],Ct.prototype,"features",2);Dt([K()],Ct.prototype,"availableFeatures",2);Dt([m({attribute:!1})],Ct.prototype,"files",2);Dt([m({attribute:!1})],Ct.prototype,"queryResult",2);Dt([m({attribute:!1})],Ct.prototype,"infiniteQueryResult",2);Dt([m({type:Object})],Ct.prototype,"app",2);Dt([m({type:Object})],Ct.prototype,"user",2);Dt([m({type:Number})],Ct.prototype,"currentId",2);Dt([m({type:Boolean})],Ct.prototype,"isAttachment",2);Dt([K()],Ct.prototype,"currentFile",2);Dt([K()],Ct.prototype,"previousFile",2);Dt([K()],Ct.prototype,"nextFile",2);Dt([K()],Ct.prototype,"showOverlay",2);Dt([K()],Ct.prototype,"commentsOpen",2);Dt([K()],Ct.prototype,"versionsOpen",2);Dt([K()],Ct.prototype,"versionFile",2);Dt([K()],Ct.prototype,"sidePanelMaximized",2);Dt([K()],Ct.prototype,"disableSwipeScroll",2);Ct=Dt([de("wy-preview"),q()],Ct);var iC=Object.defineProperty,nC=Object.getOwnPropertyDescriptor,gt=function gt(r,o,s,B){for(var Q=B>1?void 0:B?nC(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&iC(o,s,Q),Q};var ct=function(_le47){_inherits(ct,_le47);function ct(){var _this329;_classCallCheck(this,ct);_this329=_callSuper(this,ct,arguments),_this329.me=!1,_this329.isBot=!1,_this329.chatRoom=!1,_this329.temp=!1,_this329.sent=null,_this329.delivered=null,_this329.displayName="",_this329.avatar="",_this329.createdAt="",_this329.html="",_this329.text="",_this329.attachments=[],_this329.pollOptions=[],_this329.reactions=[],_this329.seenBy=[],_this329.userId=-1,_this329.features={},_this329.previewRef=Re();return _this329}_createClass(ct,[{key:"dispatchVote",value:function dispatchVote(r){var o=new CustomEvent("vote",{detail:{id:r,parentId:this.messageId}});return this.dispatchEvent(o)}},{key:"render",value:function render(){var _this330=this;var r,o,s,B,Q,Y,J;var it=(r=this.attachments)==null?void 0:r.filter(function(Mt){return Mt.kind==="image"&&Mt.thumbnail_url}),nt=(o=this.attachments)==null?void 0:o.filter(function(Mt){return Mt.kind!=="image"||!Mt.thumbnail_url}),ot=this.createdAt?new Intl.DateTimeFormat((s=this.weavyContext)==null?void 0:s.locale,{dateStyle:"full",timeStyle:"short"}).format(new Date(this.createdAt)):"",dt=this.createdAt?new Intl.DateTimeFormat((B=this.weavyContext)==null?void 0:B.locale,{timeStyle:"short"}).format(new Date(this.createdAt)):"";return v(_templateObject225||(_templateObject225=_taggedTemplateLiteral(["\n <div class=",">\n ","\n\n <div class=\"wy-message-content\">\n <div class=\"wy-message-meta\">\n ","\n <time datetime="," title=",">","</time>\n </div>\n\n <div class=\"wy-message-bubble\">\n ","\n </div>\n </div>\n </div>\n ","\n ","\n "])),Qe({"wy-message":!0,"wy-message-me":this.me,"wy-message-bot":this.isBot}),this.me?"":v(_templateObject226||(_templateObject226=_taggedTemplateLiteral(["\n <div class=\"wy-message-author\">\n <wy-avatar .src=\"","\" .size="," .name=\"","\" .isBot=","></wy-avatar>\n </div>\n "])),this.avatar,32,this.displayName,this.isBot),this.chatRoom&&!this.me?v(_templateObject227||(_templateObject227=_taggedTemplateLiteral([" <span>"," \xB7 </span> "])),this.displayName):"",this.createdAt,ot,dt,this.temp?v(_templateObject228||(_templateObject228=_taggedTemplateLiteral(["<wy-skeleton .text=","></wy-skeleton>"])),this.text):v(_templateObject229||(_templateObject229=_taggedTemplateLiteral(["\n <!-- image grid -->\n ","\n\n <!-- embeds -->\n ","\n\n <!-- text -->\n ","\n\n <!-- poll -->\n ","\n\n <!-- meeting -->\n ","\n\n <!-- files -->\n ","\n\n <!-- reactions -->\n ","\n "])),it&&it.length?v(_templateObject230||(_templateObject230=_taggedTemplateLiteral(["<wy-image-grid\n .images=","\n @file-open=","></wy-image-grid>"])),it,function(Mt){var Ot;(Ot=_this330.previewRef.value)==null||Ot.open(Mt.detail.file)}):"",this.embed&&Pe(this.availableFeatures,Ee.Embeds,(Q=this.features)==null?void 0:Q.embeds)?v(_templateObject231||(_templateObject231=_taggedTemplateLiteral([" <wy-embed class=\"wy-embed\" .embed=","></wy-embed> "])),this.embed):O,this.html?v(_templateObject232||(_templateObject232=_taggedTemplateLiteral(["<div class=\"wy-content\">","</div>"])),Do(this.html)):"",this.pollOptions&&this.pollOptions.length>0?v(_templateObject233||(_templateObject233=_taggedTemplateLiteral(["\n <wy-poll\n .pollOptions=","\n @vote=","></wy-poll>\n "])),this.pollOptions,function(Mt){return _this330.dispatchVote(Mt.detail.id)}):O,this.meeting?v(_templateObject234||(_templateObject234=_taggedTemplateLiteral(["<wy-meeting-card .meeting=","></wy-meeting-card>"])),this.meeting):"",nt&&nt.length?v(_templateObject235||(_templateObject235=_taggedTemplateLiteral(["<wy-attachments-list\n .files=","\n @file-open=","></wy-attachments-list>"])),nt,function(Mt){var Ot;(Ot=_this330.previewRef.value)==null||Ot.open(Mt.detail.file)}):"",Pe(this.availableFeatures,Ee.Reactions,(Y=this.features)==null?void 0:Y.reactions)?v(_templateObject236||(_templateObject236=_taggedTemplateLiteral(["\n <div class=\"wy-reactions-line\">\n ","\n </div>"])),Ch("reactions-".concat(this.app.id,"-").concat(this.messageId),v(_templateObject237||(_templateObject237=_taggedTemplateLiteral(["<wy-reactions\n small \n .reactions=","\n parentId=","\n entityId=","\n messageType=\"messages\"\n .userId=","></wy-reactions>"])),this.reactions,this.app.id,this.messageId,this.userId))):O),Pe(this.availableFeatures,Ee.Receipts,(J=this.features)==null?void 0:J.receipts)?v(_templateObject238||(_templateObject238=_taggedTemplateLiteral(["<div class=\"wy-readby-status\">\n ","\n </div>"])),this.seenBy&&this.seenBy.length?v(_templateObject239||(_templateObject239=_taggedTemplateLiteral(["\n ","\n "])),this.seenBy.map(function(Mt){var Ot;var Qt=Mt.marked_at?new Intl.DateTimeFormat((Ot=_this330.weavyContext)==null?void 0:Ot.locale,{dateStyle:"full",timeStyle:"short"}).format(new Date(Mt.marked_at)):"";return v(_templateObject240||(_templateObject240=_taggedTemplateLiteral(["<wy-avatar\n title=","\n .name=","\n .src=","\n size=","></wy-avatar>"])),K$1(c(_templateObject241||(_templateObject241=_taggedTemplateLiteral(["Seen by "," at ",""])),Mt.display_name,Qt)),Mt.display_name,Mt.avatar_url,16)})):this.delivered===!0?v(_templateObject242||(_templateObject242=_taggedTemplateLiteral(["<wy-icon title=\"Delivered\" class=\"wy-status-delivered\" name=\"check-circle\"></wy-icon>"]))):this.sent===!0?v(_templateObject243||(_templateObject243=_taggedTemplateLiteral(["<wy-icon title=\"Sent\" class=\"wy-status-sent\" name=\"check-circle-outline\"></wy-icon>"]))):this.sent===!1?v(_templateObject244||(_templateObject244=_taggedTemplateLiteral(["<wy-icon title=\"Pending\" class=\"wy-status-pending\" name=\"circle-outline\"></wy-icon>"]))):O):O,this.attachments?Ch("preview-message-".concat(this.messageId),v(_templateObject245||(_templateObject245=_taggedTemplateLiteral(["\n <wy-preview\n ","\n .uid=","\n .app=","\n .files=","\n .availableFeatures=","\n .features=","\n .isAttachment=","></wy-preview>\n "])),Ce(this.previewRef),"message-".concat(this.messageId),this.app,[].concat(_toConsumableArray(it),_toConsumableArray(nt)),this.availableFeatures,this.features,!0)):O)}}]);return ct}(le);ct.styles=me;gt([Ge({context:Le,subscribe:!0}),K()],ct.prototype,"weavyContext",2);gt([m({type:Object})],ct.prototype,"app",2);gt([m({type:Number})],ct.prototype,"messageId",2);gt([m({type:Boolean})],ct.prototype,"me",2);gt([m({type:Boolean})],ct.prototype,"isBot",2);gt([m({type:Boolean})],ct.prototype,"chatRoom",2);gt([m({type:Boolean})],ct.prototype,"temp",2);gt([m({type:Boolean})],ct.prototype,"sent",2);gt([m({type:Boolean})],ct.prototype,"delivered",2);gt([m()],ct.prototype,"displayName",2);gt([m()],ct.prototype,"avatar",2);gt([m()],ct.prototype,"createdAt",2);gt([m()],ct.prototype,"html",2);gt([m()],ct.prototype,"text",2);gt([m({type:Array})],ct.prototype,"attachments",2);gt([m({attribute:!1})],ct.prototype,"meeting",2);gt([m({type:Array})],ct.prototype,"pollOptions",2);gt([m({attribute:!1})],ct.prototype,"embed",2);gt([m({type:Array})],ct.prototype,"reactions",2);gt([m({type:Array})],ct.prototype,"seenBy",2);gt([m({type:Number})],ct.prototype,"userId",2);gt([K()],ct.prototype,"availableFeatures",2);gt([m({type:Object})],ct.prototype,"features",2);ct=gt([de("wy-message"),q()],ct);var oC=Object.defineProperty,aC=Object.getOwnPropertyDescriptor,yi=function yi(r,o,s,B){for(var Q=B>1?void 0:B?aC(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&oC(o,s,Q),Q};var Ir=function(_le48){_inherits(Ir,_le48);function Ir(){var _this331;_classCallCheck(this,Ir);_this331=_callSuper(this,Ir,arguments),_this331._chatRoomId="edb400ac-839b-45a7-b2a8-6a01820d1c44",_this331.dataUpdatedAt=NaN,_this331.pagerRef=Re();return _this331}_createClass(Ir,[{key:"dispatchScrollToBottom",value:function dispatchScrollToBottom(){var r=new CustomEvent("scroll-to-bottom");return this.dispatchEvent(r)}},{key:"createRenderRoot",value:function createRenderRoot(){return this}},{key:"dispatchVote",value:function dispatchVote(r,o){var s=new CustomEvent("vote",{detail:{id:r,parentId:o,parentType:"messages"}});return this.dispatchEvent(s)}},{key:"render",value:function render(){var _this332=this;var r;var o=(r=this.infiniteMessages)==null?void 0:r.pages.flatMap(function(B){return B.data});var s;return v(_templateObject246||(_templateObject246=_taggedTemplateLiteral(["\n <div class=\"wy-messages\">\n <div "," class=\"wy-pager\"></div>\n <!-- this.user ?? -->\n ","\n </div>\n "])),Ce(this.pagerRef),o?Lr(o,function(B){return B.id},function(B,Q){var Y,J;var it=new Date(B.created_at);var nt=v(_templateObject247||(_templateObject247=_taggedTemplateLiteral([""])));if((s==null?void 0:s.toDateString())!==it.toDateString()){var dt=new Intl.DateTimeFormat((Y=_this332.weavyContext)==null?void 0:Y.locale,{dateStyle:"short"}).format(it);s=it,nt=v(_templateObject248||(_templateObject248=_taggedTemplateLiteral(["<div class=\"wy-date-separator\"><time>","</time></div>"])),dt)}var ot=v(_templateObject249||(_templateObject249=_taggedTemplateLiteral([""])));return _this332.unreadMarkerId&&_this332.unreadMarkerId===B.id&&(ot=v(_templateObject250||(_templateObject250=_taggedTemplateLiteral(["<div\n class=\"wy-toast wy-toast-action\"\n tabindex=\"0\"\n @click=","\n @keydown=","\n @keyup=","\n >\n ","\n </div>"])),function(){return _this332.dispatchScrollToBottom()},Bn,Hn,K$1("New messages"))),v(_templateObject251||(_templateObject251=_taggedTemplateLiteral(["",""])),[v(_templateObject252||(_templateObject252=_taggedTemplateLiteral(["",""])),nt),v(_templateObject253||(_templateObject253=_taggedTemplateLiteral(["",""])),_this332.unreadMarkerPosition==="top"?ot:O),Ch("message-".concat(B.id),v(_templateObject254||(_templateObject254=_taggedTemplateLiteral(["<wy-message\n id=\"message-","\"\n .app=","\n .messageId=","\n .me=","\n .isBot=","\n .chatRoom=","\n .temp=","\n .displayName=","\n .avatar=","\n .createdAt=","\n .text=","\n .html=","\n .attachments=","\n .meeting=","\n .pollOptions=","\n .embed=","\n .reactions=","\n .userId=","\n .availableFeatures=","\n .features=","\n .sent=","\n .delivered=","\n .seenBy=","\n @vote=","\n ></wy-message>"])),B.id,_this332.app,B.id,B.created_by.id===_this332.user.id,B.created_by.is_bot||!1,((J=_this332.app)==null?void 0:J.type)===_this332._chatRoomId,B.temp,B.created_by.display_name,B.created_by.avatar_url,B.created_at,B.plain,B.html,B.attachments,B.meeting,B.options,B.embed,B.reactions,_this332.user.id,_this332.availableFeatures,_this332.features,_this332.members&&Q===o.length-1&&B.created_by.id===_this332.user.id?!B.temp:null,_this332.members&&Q===o.length-1&&_this332.members.data.filter(function(dt){return dt.id!==_this332.user.id&&dt.delivered_at>B.created_at}).length>0,_this332.members&&_this332.members.data&&_this332.members.data.length>0?_this332.members.data.filter(function(dt){return dt.marked_id===B.id&&dt.id!==_this332.user.id}):[],function(dt){_this332.dispatchVote(dt.detail.id,dt.detail.parentId)})),v(_templateObject255||(_templateObject255=_taggedTemplateLiteral(["",""])),_this332.unreadMarkerPosition==="bottom"?ot:O)])}):O)}}]);return Ir}(le);Ir.styles=[me,Be(_templateObject256||(_templateObject256=_taggedTemplateLiteral(["\n :host(wy-messages) {\n display: contents;\n }\n "])))];yi([Ge({context:Le,subscribe:!0}),K()],Ir.prototype,"weavyContext",2);yi([m({attribute:!1})],Ir.prototype,"app",2);yi([m({attribute:!1})],Ir.prototype,"infiniteMessages",2);yi([m({type:Number})],Ir.prototype,"dataUpdatedAt",2);yi([m({attribute:!1})],Ir.prototype,"user",2);yi([m({attribute:!1})],Ir.prototype,"members",2);yi([m({attribute:!1})],Ir.prototype,"availableFeatures",2);yi([m({attribute:!1})],Ir.prototype,"features",2);yi([m({attribute:!1})],Ir.prototype,"unreadMarkerId",2);yi([m({attribute:!1})],Ir.prototype,"unreadMarkerPosition",2);yi([m({attribute:!1})],Ir.prototype,"pagerRef",2);Ir=yi([de("wy-messages"),q()],Ir);var sC=Object.defineProperty,cC=Object.getOwnPropertyDescriptor,lC=function lC(r,o,s,B){for(var Q=B>1?void 0:B?cC(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&sC(o,s,Q),Q};var qp=function(_We2){_inherits(qp,_We2);function qp(){var _this333;_classCallCheck(this,qp);_this333=_callSuper(this,qp),_this333.editorType="messages",_this333.editorClass="wy-message-editor";return _this333}_createClass(qp,[{key:"renderTopSlot",value:function renderTopSlot(){return this.renderLists()}},{key:"renderMiddleSlot",value:function renderMiddleSlot(){var _this334=this;var r,o,s,B,Q,Y,J,it,nt,ot,dt;return v(_templateObject257||(_templateObject257=_taggedTemplateLiteral([" <div class=\"wy-message-editor-inputs\">\n <!-- Add -->\n ","\n\n <!-- Input -->\n <div class=\"wy-message-editor-text\" ","></div>\n\n <!-- Button -->\n <wy-button\n kind=\"icon\"\n buttonClass=\"wy-button-primary-text\"\n title=","\n @click=\"","\"\n >\n <wy-icon name=\"send\"></wy-icon>\n </wy-button>\n </div>"])),Pe(this.availableFeatures,Ee.Attachments,(r=this.features)==null?void 0:r.attachments)||Pe(this.availableFeatures,Ee.CloudFiles,(o=this.features)==null?void 0:o.cloudFiles)||Pe(this.availableFeatures,Ee.Polls,(s=this.features)==null?void 0:s.polls)||Pe(this.availableFeatures,Ee.Meetings,(B=this.features)==null?void 0:B.meetings)?v(_templateObject258||(_templateObject258=_taggedTemplateLiteral(["<wy-dropdown icon=\"plus\" directionY=\"up\">\n ","\n ","\n ","\n ","\n ","\n </wy-dropdown>"])),Pe(this.availableFeatures,Ee.Attachments,(Q=this.features)==null?void 0:Q.attachments)?v(_templateObject259||(_templateObject259=_taggedTemplateLiteral(["\n <wy-dropdown-item @click=",">\n <wy-icon name=\"attachment\"></wy-icon>\n <span>","</span>\n </wy-dropdown-item>\n <input\n type=\"file\"\n ","\n @click=","\n @change=","\n multiple\n hidden\n tabindex=\"-1\"\n />\n "])),this.openFileInput,K$1("From device"),Ce(this.fileInputRef),function(Mt){return Mt.stopPropagation()},function(Mt){return _this334.handleUploadFiles(Array.from(Mt.target.files||[]),Mt.target)}):O,Pe(this.availableFeatures,Ee.CloudFiles,(Y=this.features)==null?void 0:Y.cloudFiles)?v(_templateObject260||(_templateObject260=_taggedTemplateLiteral(["\n <wy-dropdown-item @click=",">\n <wy-icon name=\"cloud\"></wy-icon>\n <span>","</span>\n </wy-dropdown-item>\n "])),this.openCloudFiles,K$1("From cloud")):O,Pe(this.availableFeatures,Ee.Confluence,(J=this.features)==null?void 0:J.confluence)&&(it=this.weavyContext)!=null&&it.confluenceAuthenticationUrl?v(_templateObject261||(_templateObject261=_taggedTemplateLiteral(["<wy-confluence\n dropdown\n .user=","\n @external-blobs=","\n ></wy-confluence>"])),this.user,function(Mt){return _this334.handleExternalBlobs(Mt.detail.externalBlobs)}):O,Pe(this.availableFeatures,Ee.Polls,(nt=this.features)==null?void 0:nt.polls)?v(_templateObject262||(_templateObject262=_taggedTemplateLiteral(["\n <wy-dropdown-item @click=",">\n <wy-icon name=\"poll\"></wy-icon>\n <span>","</span>\n </wy-dropdown-item>\n "])),this.openPolls,K$1("Poll")):O,Pe(this.availableFeatures,Ee.Meetings,(ot=this.features)==null?void 0:ot.meetings)&&(dt=this.weavyContext)!=null&&dt.zoomAuthenticationUrl?v(_templateObject263||(_templateObject263=_taggedTemplateLiteral(["\n <wy-dropdown-item @click=",">\n <wy-icon name=\"zoom\"></wy-icon>\n <span>","</span>\n </wy-dropdown-item>\n "])),this.handleZoomClick,K$1("Zoom meeting")):O):O,Ce(this.editorRef),K$1("Send",{desc:"Button action to send"}),this.submit)}},{key:"renderBottomSlot",value:function renderBottomSlot(){return O}}]);return qp}(We);qp=lC([de("wy-message-editor"),q()],qp);var dC=Object.defineProperty,hC=Object.getOwnPropertyDescriptor,ys=function ys(r,o,s,B){for(var Q=B>1?void 0:B?hC(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&dC(o,s,Q),Q};var Un=function(_le49){_inherits(Un,_le49);function Un(){var _this335;_classCallCheck(this,Un);_this335=_callSuper(this,Un,arguments),_this335.existingMembers={data:[],count:0},_this335.selected=[],_this335.text="",_this335.peopleQuery=new as(_assertThisInitialized(_this335)),_this335.inputRef=Re(),_this335.infiniteScroll=new ss(_assertThisInitialized(_this335)),_this335.pagerRef=Re(),_this335.throttledSearch=Yl(_asyncToGenerator(_regeneratorRuntime().mark(function _callee191(){var r;return _regeneratorRuntime().wrap(function _callee191$(_context193){while(1)switch(_context193.prev=_context193.next){case 0:_this335.text=((r=_this335.inputRef.value)==null?void 0:r.value)||"";case 1:case"end":return _context193.stop()}},_callee191)})),250,{leading:!1,trailing:!0});return _this335}_createClass(Un,[{key:"updated",value:function(){var _updated3=_asyncToGenerator(_regeneratorRuntime().mark(function _callee192(r){var _this336=this;var o;return _regeneratorRuntime().wrap(function _callee192$(_context194){while(1)switch(_context194.prev=_context194.next){case 0:this.infiniteScroll.observe(this.peopleQuery.result,this.pagerRef.value);r.has("weavyContext")&&this.weavyContext&&this.peopleQuery.trackInfiniteQuery(T1(this.weavyContext,function(){return _this336.text}));_context194.t0=r.has("text");if(!_context194.t0){_context194.next=6;break}_context194.next=6;return(o=this.peopleQuery.result)==null?void 0:o.refetch();case 6:case"end":return _context194.stop()}},_callee192,this)}));function updated(_x165){return _updated3.apply(this,arguments)}return updated}()},{key:"dispatchSubmit",value:function dispatchSubmit(){var r=new CustomEvent("submit",{detail:{members:this.selected}});return this.dispatchEvent(r)}},{key:"isChecked",value:function isChecked(r){return this.selected.find(function(o){return o.id===r})!=null}},{key:"handleSelected",value:function handleSelected(r,o){o?this.selected=[].concat(_toConsumableArray(this.selected),[r]):this.selected=this.selected.filter(function(s){return s.id!==r.id})}},{key:"clear",value:function(){var _clear=_asyncToGenerator(_regeneratorRuntime().mark(function _callee193(){return _regeneratorRuntime().wrap(function _callee193$(_context195){while(1)switch(_context195.prev=_context195.next){case 0:this.text="";case 1:case"end":return _context195.stop()}},_callee193,this)}));function clear(){return _clear.apply(this,arguments)}return clear}()},{key:"render",value:function render(){var _this$peopleQuery$res,_this337=this,_B$filter$map,_this$buttonTitle;var r;var _ref242=(_this$peopleQuery$res=this.peopleQuery.result)!==null&&_this$peopleQuery$res!==void 0?_this$peopleQuery$res:{data:[]},o=_ref242.data,s=_ref242.isPending,B=((r=o==null?void 0:o.pages)==null?void 0:r.flatMap(function(it){return it.data}))||[],Q=!!B.length,Y=this.selected.length>0,J=!!B.filter(function(it){var nt,ot;return((ot=(nt=_this337.existingMembers)==null?void 0:nt.data)==null?void 0:ot.find(function(dt){return dt.id===it.id}))===void 0}).length;return v(_templateObject264||(_templateObject264=_taggedTemplateLiteral(["<div class=\"wy-search wy-scroll-y\">\n <div class=\"wy-pane-group\">\n <div class=\"wy-search-form wy-input-group\">\n <input\n class=\"wy-search-input wy-input wy-input-group-input wy-input-filled\"\n name=\"search\"\n .value=","\n ","\n @input=","\n @keyup=","\n placeholder="," />\n <wy-button\n type=\"reset\"\n @click=","\n kind=\"icon\"\n class=\"wy-input-group-button-icon\"\n buttonClass=\"wy-button-icon\">\n <wy-icon name=\"close-circle\"></wy-icon>\n </wy-button>\n <wy-button kind=\"icon\" class=\"wy-input-group-button-icon\" buttonClass=\"wy-button-icon\">\n <wy-icon name=\"magnify\"></wy-icon>\n </wy-button>\n </div>\n </div>\n ","\n ","\n\n <div class=\"wy-footerbars\">\n <div class=\"wy-footerbar\">\n <div class=\"wy-pane-group\">\n <div class=\"wy-buttons\">\n <wy-button\n buttonClass=\"wy-button-primary\"\n @click=","\n ?disabled=","\n >","</wy-button\n >\n </div>\n </div>\n </div>\n </div>\n </div>"])),this.text||"",Ce(this.inputRef),function(){return _this337.throttledSearch()},hm,K$1("Search for people..."),this.clear,Y?v(_templateObject265||(_templateObject265=_taggedTemplateLiteral(["\n <div class=\"wy-pane-group\">\n <label class=\"wy-input-label\">","</label>\n ","\n </div>\n "])),K$1("Selected"),this.selected.map(function(it){return v(_templateObject266||(_templateObject266=_taggedTemplateLiteral(["\n <div class=\"wy-item\">\n <wy-avatar\n id=","\n .src=","\n .name=","\n .presence=","\n size=","\n ></wy-avatar>\n\n <div class=\"wy-item-body\"> "," </div>\n <wy-button\n @click=","\n kind=\"icon\"\n title=",">\n <wy-icon name=\"account-minus\"></wy-icon>\n </wy-button>\n </div>\n "])),it.id,it.avatar_url,it.display_name,it.presence,32,it.display_name,function(){return _this337.handleSelected(it,!_this337.isChecked(it.id))},K$1("Remove",{desc:"Button action to remove"}))})):O,Q&&J?v(_templateObject267||(_templateObject267=_taggedTemplateLiteral(["\n <div class=\"wy-pane-group\">\n <label class=\"wy-input-label\">","</label>\n ","\n </div>\n <div "," class=\"wy-pager\"></div>\n "])),K$1("People"),(_B$filter$map=B.filter(function(it){var nt,ot;return((ot=(nt=_this337.existingMembers)==null?void 0:nt.data)==null?void 0:ot.find(function(dt){return dt.id===it.id}))===void 0&&_this337.selected.find(function(dt){return dt.id===it.id})===void 0}).map(function(it){return v(_templateObject268||(_templateObject268=_taggedTemplateLiteral([" <div class=\"wy-item\">\n <wy-avatar\n id=","\n .src=","\n .name=","\n .presence=","\n size=","\n ></wy-avatar>\n\n <div class=\"wy-item-body\"> "," </div>\n <wy-button @click="," kind=\"icon\">\n <wy-icon name=\"account-plus\"></wy-icon>\n </wy-button>\n </div>"])),it.id,it.avatar_url,it.display_name,it.presence,32,it.display_name,function(){return _this337.handleSelected(it,!_this337.isChecked(it.id))})}))!==null&&_B$filter$map!==void 0?_B$filter$map:O,Ce(this.pagerRef)):s?v(_templateObject269||(_templateObject269=_taggedTemplateLiteral([" <wy-spinner overlay></wy-spinner> "]))):v(_templateObject270||(_templateObject270=_taggedTemplateLiteral(["\n <div class=\"wy-pane-group\">\n <div class=\"wy-table-no-result\">\n ","\n </div>\n </div>\n "])),this.text?K$1("Your search did not match any people."):K$1("No more users found.")),this.dispatchSubmit,this.selected.length===0?!0:void 0,(_this$buttonTitle=this.buttonTitle)!==null&&_this$buttonTitle!==void 0?_this$buttonTitle:K$1("Next"))}}]);return Un}(le);Un.styles=[me,Be(_templateObject271||(_templateObject271=_taggedTemplateLiteral(["\n :host {\n display: contents;\n }\n "])))];ys([Ge({context:Le,subscribe:!0}),K()],Un.prototype,"weavyContext",2);ys([m({attribute:!1})],Un.prototype,"existingMembers",2);ys([m({attribute:!1})],Un.prototype,"buttonTitle",2);ys([K()],Un.prototype,"selected",2);ys([K()],Un.prototype,"text",2);Un=ys([de("wy-users-search"),q()],Un);function uC(r){return{mutationFn:function(){var _mutationFn17=_asyncToGenerator(_regeneratorRuntime().mark(function _callee194(_ref243){var o,s;return _regeneratorRuntime().wrap(function _callee194$(_context196){while(1)switch(_context196.prev=_context196.next){case 0:o=_ref243.id;s="/api/conversations/".concat(o,"/delivered");_context196.next=4;return r.post(s,"PUT","");case 4:return _context196.abrupt("return",_context196.sent.json());case 5:case"end":return _context196.stop()}},_callee194)}));function mutationFn(_x166){return _mutationFn17.apply(this,arguments)}return mutationFn}(),onMutate:function(){var _onMutate11=_asyncToGenerator(_regeneratorRuntime().mark(function _callee195(){return _regeneratorRuntime().wrap(function _callee195$(_context197){while(1)switch(_context197.prev=_context197.next){case 0:return _context197.abrupt("return",{});case 1:case"end":return _context197.stop()}},_callee195)}));function onMutate(){return _onMutate11.apply(this,arguments)}return onMutate}()}}function yC(r){return{mutationFn:function(){var _mutationFn18=_asyncToGenerator(_regeneratorRuntime().mark(function _callee196(_ref244){var o,s,B,Q;return _regeneratorRuntime().wrap(function _callee196$(_context198){while(1)switch(_context198.prev=_context198.next){case 0:o=_ref244.id,s=_ref244.markAsRead,B=_ref244.messageId;Q=s?"/api/conversations/".concat(o,"/mark?messageId=").concat(B):"/api/conversations/".concat(o,"/mark");_context198.next=4;return r.post(Q,s?"PUT":"DELETE","");case 4:return _context198.abrupt("return",_context198.sent.json());case 5:case"end":return _context198.stop()}},_callee196)}));function mutationFn(_x167){return _mutationFn18.apply(this,arguments)}return mutationFn}(),onMutate:function(){var _onMutate12=_asyncToGenerator(_regeneratorRuntime().mark(function _callee197(o){return _regeneratorRuntime().wrap(function _callee197$(_context199){while(1)switch(_context199.prev=_context199.next){case 0:return _context199.abrupt("return",(tt(r.queryClient,["conversations"],o.id,function(s){s.is_unread=!o.markAsRead}),tt(r.queryClient,["conversations",o.id],-1,function(s){s.is_unread=!o.markAsRead,o.messageId&&s.last_message&&(s.last_message.id=o.messageId)}),{}));case 1:case"end":return _context199.stop()}},_callee197)}));function onMutate(_x168){return _onMutate12.apply(this,arguments)}return onMutate}()}}function pC(r){return{mutationFn:function(){var _mutationFn19=_asyncToGenerator(_regeneratorRuntime().mark(function _callee198(_ref245){var o,s;return _regeneratorRuntime().wrap(function _callee198$(_context200){while(1)switch(_context200.prev=_context200.next){case 0:o=_ref245.id,s=_ref245.star;_context200.next=3;return r.post("/api/apps/".concat(o,"/stars"),s?"POST":"DELETE","");case 3:case"end":return _context200.stop()}},_callee198)}));function mutationFn(_x169){return _mutationFn19.apply(this,arguments)}return mutationFn}(),onMutate:function(){var _onMutate13=_asyncToGenerator(_regeneratorRuntime().mark(function _callee199(o){return _regeneratorRuntime().wrap(function _callee199$(_context201){while(1)switch(_context201.prev=_context201.next){case 0:return _context201.abrupt("return",(tt(r.queryClient,["conversations"],o.id,function(s){s.is_starred=o.star}),{}));case 1:case"end":return _context201.stop()}},_callee199)}));function onMutate(_x170){return _onMutate13.apply(this,arguments)}return onMutate}()}}function wC(r){return{mutationFn:function(){var _mutationFn20=_asyncToGenerator(_regeneratorRuntime().mark(function _callee200(_ref246){var o,s;return _regeneratorRuntime().wrap(function _callee200$(_context202){while(1)switch(_context202.prev=_context202.next){case 0:o=_ref246.id,s=_ref246.pin;_context202.next=3;return r.post("/api/conversations/".concat(o,"/pin"),s?"PUT":"DELETE","");case 3:case"end":return _context202.stop()}},_callee200)}));function mutationFn(_x171){return _mutationFn20.apply(this,arguments)}return mutationFn}(),onMutate:function(){var _onMutate14=_asyncToGenerator(_regeneratorRuntime().mark(function _callee201(){return _regeneratorRuntime().wrap(function _callee201$(_context203){while(1)switch(_context203.prev=_context203.next){case 0:return _context203.abrupt("return",{});case 1:case"end":return _context203.stop()}},_callee201)}));function onMutate(){return _onMutate14.apply(this,arguments)}return onMutate}()}}function fC(r){return{mutationFn:function(){var _mutationFn21=_asyncToGenerator(_regeneratorRuntime().mark(function _callee202(_ref247){var o,s;return _regeneratorRuntime().wrap(function _callee202$(_context204){while(1)switch(_context204.prev=_context204.next){case 0:o=_ref247.id,s=_ref247.members;_context204.next=3;return r.post("/api/apps/".concat(o,"/members/").concat(s.join(",")),"DELETE","");case 3:case"end":return _context204.stop()}},_callee202)}));function mutationFn(_x172){return _mutationFn21.apply(this,arguments)}return mutationFn}(),onMutate:function(){var _onMutate15=_asyncToGenerator(_regeneratorRuntime().mark(function _callee203(){return _regeneratorRuntime().wrap(function _callee203$(_context205){while(1)switch(_context205.prev=_context205.next){case 0:return _context205.abrupt("return",{});case 1:case"end":return _context205.stop()}},_callee203)}));function onMutate(){return _onMutate15.apply(this,arguments)}return onMutate}()}}function mC(r){return{mutationFn:function(){var _mutationFn22=_asyncToGenerator(_regeneratorRuntime().mark(function _callee204(_ref248){var o,s;return _regeneratorRuntime().wrap(function _callee204$(_context206){while(1)switch(_context206.prev=_context206.next){case 0:o=_ref248.id,s=_ref248.members;_context206.next=3;return r.post("/api/apps/".concat(o,"/members"),"POST",JSON.stringify(s.map(function(B){return{id:B,access:"write"}})));case 3:case"end":return _context206.stop()}},_callee204)}));function mutationFn(_x173){return _mutationFn22.apply(this,arguments)}return mutationFn}(),onMutate:function(){var _onMutate16=_asyncToGenerator(_regeneratorRuntime().mark(function _callee205(){return _regeneratorRuntime().wrap(function _callee205$(_context207){while(1)switch(_context207.prev=_context207.next){case 0:return _context207.abrupt("return",{});case 1:case"end":return _context207.stop()}},_callee205)}));function onMutate(){return _onMutate16.apply(this,arguments)}return onMutate}()}}function vC(r){return{mutationFn:function(){var _mutationFn23=_asyncToGenerator(_regeneratorRuntime().mark(function _callee206(_ref249){var o,s;return _regeneratorRuntime().wrap(function _callee206$(_context208){while(1)switch(_context208.prev=_context208.next){case 0:o=_ref249.id,s=_ref249.title;_context208.next=3;return r.post("/api/apps/".concat(o),"PATCH",JSON.stringify({type:"ChatRoom",name:s}));case 3:return _context208.abrupt("return",_context208.sent.json());case 4:case"end":return _context208.stop()}},_callee206)}));function mutationFn(_x174){return _mutationFn23.apply(this,arguments)}return mutationFn}(),onMutate:function(){var _onMutate17=_asyncToGenerator(_regeneratorRuntime().mark(function _callee207(o){return _regeneratorRuntime().wrap(function _callee207$(_context209){while(1)switch(_context209.prev=_context209.next){case 0:return _context209.abrupt("return",(tt(r.queryClient,["conversations"],o.id,function(s){s.display_name=o.title}),tt(r.queryClient,["conversations",o.id],-1,function(s){s.display_name=o.title}),{}));case 1:case"end":return _context209.stop()}},_callee207)}));function onMutate(_x175){return _onMutate17.apply(this,arguments)}return onMutate}()}}function gC(r){return new Ye(r.queryClient,uC(r))}function qm(r){return new Ye(r.queryClient,yC(r))}function bC(r){return new Ye(r.queryClient,pC(r))}function _C(r){return new Ye(r.queryClient,wC(r))}function Qm(r){return new Ye(r.queryClient,fC(r))}function xC(r){return new Ye(r.queryClient,mC(r))}function kC(r){return new Ye(r.queryClient,vC(r))}var CC=Object.defineProperty,$C=Object.getOwnPropertyDescriptor,Wr=function Wr(r,o,s,B){for(var Q=B>1?void 0:B?$C(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&CC(o,s,Q),Q};var sr=function(_le50){_inherits(sr,_le50);function sr(){var _this338;_classCallCheck(this,sr);_this338=_callSuper(this,sr,arguments),_this338.lastReadMessagePosition="bottom",_this338.features={},_this338.showAddMembers=!1,_this338.showDetails=!1,_this338.conversationTitle="",_this338.conversationTitleInput="",_this338.releaseFocusEvent=function(){return new CustomEvent("release-focus",{bubbles:!0,composed:!0})},_this338.messagesQuery=new as(_assertThisInitialized(_this338)),_this338.membersQuery=new kt(_assertThisInitialized(_this338)),_this338.userQuery=new kt(_assertThisInitialized(_this338)),_this338.featuresQuery=new kt(_assertThisInitialized(_this338)),_this338.addMessageMutation=new tn(_assertThisInitialized(_this338)),_this338.infiniteScroll=new H1(_assertThisInitialized(_this338)),_this338.pagerRef=Re(),_this338.wasAtBottom=!0,_this338.handleRealtimeMessage=function(r){var o,s,B;if(!_this338.weavyContext||!_this338.conversation||!_this338.user)return;r.message.created_by=r.actor;var Q=(o=r.message.metadata)!=null&&o.temp_id?parseFloat((s=r.message.metadata)==null?void 0:s.temp_id):void 0;sn(_this338.weavyContext.queryClient,["messages",r.message.app_id],r.message,Q),r.message.app_id===_this338.conversation.id&&(_this338.isContextualChat()||(B=_this338.markConversationMutation)==null||B.mutate({id:_this338.conversation.id,markAsRead:!0,messageId:r.message.id}),!_this338.isAtBottom&&!_this338.lastReadMessageId&&(_this338.lastReadMessageId=r.message.id,_this338.lastReadMessagePosition="top"))},_this338.handleRealtimeReactionAdded=function(r){!_this338.weavyContext||!_this338.user||!_this338.conversation||je(_this338.weavyContext.queryClient,{queryKey:["messages"],exact:!1},r.entity.id,function(o){o.reactions=[].concat(_toConsumableArray((o.reactions||[]).filter(function(s){return s.created_by_id!==r.actor.id})),[{content:r.reaction,created_by_id:r.actor.id}])})},_this338.handleRealtimeReactionDeleted=function(r){!_this338.weavyContext||!_this338.conversation||!_this338.user||je(_this338.weavyContext.queryClient,{queryKey:["messages"],exact:!1},r.entity.id,function(o){o.reactions=o.reactions.filter(function(s){return s.created_by_id!==r.actor.id})})},_this338.handleRealtimeAppUpdated=function(r){!_this338.conversation||r.app.id!==_this338.conversation.id||(_this338.conversationTitle=_this338.conversationTitleInput=r.app.display_name)},_this338.handleRealtimeSeenBy=function(r){!_this338.weavyContext||!_this338.conversation||_this338.isContextualChat()||r.conversation.id!==_this338.conversation.id||tt(_this338.weavyContext.queryClient,["members",_this338.conversation.id],r.actor.id,function(o){o.marked_id=r.marked_id,o.marked_at=r.marked_at})},_this338.handleRealtimeDelivered=function(r){!_this338.weavyContext||!_this338.conversation||r.actor.id===_this338.user.id||r.conversation.id!==_this338.conversation.id||tt(_this338.weavyContext.queryClient,["members",_this338.conversation.id],r.actor.id,function(o){o.delivered_at=r.delivered_at})};return _this338}_createClass(sr,[{key:"isContextualChat",value:function isContextualChat(r){var o;return((o=r!==null&&r!==void 0?r:this.conversation)==null?void 0:o.type)===lo.ContextualChat}},{key:"isPrivateChat",value:function isPrivateChat(r){var o;return((o=r!==null&&r!==void 0?r:this.conversation)==null?void 0:o.type)===lo.PrivateChat}},{key:"isChatRoom",value:function isChatRoom(r){var o;return((o=r!==null&&r!==void 0?r:this.conversation)==null?void 0:o.type)===lo.ChatRoom}},{key:"handleSubmit",value:function handleSubmit(r){var _this339=this;this.conversation&&this.user&&(this.addMessageMutation.mutate({app_id:this.conversation.id,text:r.detail.text,meeting_id:r.detail.meetingId,poll_options:r.detail.pollOptions,embed_id:r.detail.embed,blobs:r.detail.blobs,user_id:this.user.id,temp_id:Math.random()}).then(function(o){var s;_this339.isContextualChat()||(s=_this339.markConversationMutation)==null||s.mutate({id:_this339.conversation.id,markAsRead:!0,messageId:o.id})}),this.lastReadMessageId=void 0,requestAnimationFrame(function(){_this339.scrollToBottom()}))}},{key:"isAtBottom",get:function get(){return this.pagerRef.value?F1(this.pagerRef.value):!0}},{key:"scrollToBottom",value:function scrollToBottom(){D1(this.pagerRef.value)&&(this.weavyContext&&this.conversation&&L1(this.weavyContext.queryClient,["messages",this.conversation.id]),z1(this.pagerRef.value))}},{key:"unsubscribeToRealtime",value:function unsubscribeToRealtime(r){this.weavyContext&&(this.weavyContext.unsubscribe("a".concat(r.id),"message_created",this.handleRealtimeMessage),this.weavyContext.unsubscribe("a".concat(r.id),"reaction_added",this.handleRealtimeReactionAdded),this.weavyContext.unsubscribe("a".concat(r.id),"reaction_removed",this.handleRealtimeReactionDeleted),this.isContextualChat(r)||(this.weavyContext.unsubscribe("a".concat(r.id),"conversation_marked",this.handleRealtimeSeenBy),this.weavyContext.unsubscribe("a".concat(r.id),"app_updated",this.handleRealtimeAppUpdated),this.weavyContext.unsubscribe(null,"conversation_delivered",this.handleRealtimeDelivered)))}},{key:"addMembers",value:function(){var _addMembers=_asyncToGenerator(_regeneratorRuntime().mark(function _callee208(r){var o;return _regeneratorRuntime().wrap(function _callee208$(_context210){while(1)switch(_context210.prev=_context210.next){case 0:this.showAddMembers=!1;_context210.t0=!(!this.weavyContext||!this.conversation);if(!_context210.t0){_context210.next=9;break}_context210.next=5;return(o=this.addMembersMutation)==null?void 0:o.mutate({id:this.conversation.id,members:r.map(function(s){return s.id})});case 5:_context210.next=7;return this.membersQuery.result.refetch();case 7:_context210.next=9;return this.weavyContext.queryClient.invalidateQueries({queryKey:["conversations"]});case 9:case"end":return _context210.stop()}},_callee208,this)}));function addMembers(_x176){return _addMembers.apply(this,arguments)}return addMembers}()},{key:"handleSaveConversationName",value:function(){var _handleSaveConversationName=_asyncToGenerator(_regeneratorRuntime().mark(function _callee209(){var r,o;return _regeneratorRuntime().wrap(function _callee209$(_context211){while(1)switch(_context211.prev=_context211.next){case 0:if(this.conversation){_context211.next=2;break}return _context211.abrupt("return");case 2:o=this.conversationTitleInput.trim()===""?null:this.conversationTitleInput.trim();_context211.next=5;return(r=this.updateConversationMutation)==null?void 0:r.mutate({id:this.conversation.id,title:o});case 5:case"end":return _context211.stop()}},_callee209,this)}));function handleSaveConversationName(){return _handleSaveConversationName.apply(this,arguments)}return handleSaveConversationName}()},{key:"leaveConversation",value:function(){var _leaveConversation=_asyncToGenerator(_regeneratorRuntime().mark(function _callee210(r){var o;return _regeneratorRuntime().wrap(function _callee210$(_context212){while(1)switch(_context212.prev=_context212.next){case 0:_context212.t0=!this.weavyContext||!this.conversation||!this.user;if(_context212.t0){_context212.next=12;break}_context212.next=4;return(o=this.leaveConversationMutation)==null?void 0:o.mutate({id:this.conversation.id,members:[r||this.user.id]});case 4:if(!r){_context212.next=9;break}_context212.next=7;return this.membersQuery.result.refetch();case 7:_context212.next=10;break;case 9:this.showDetails=!1,this.conversation=void 0;case 10:_context212.next=12;return this.weavyContext.queryClient.invalidateQueries({queryKey:["conversations"]});case 12:case"end":return _context212.stop()}},_callee210,this)}));function leaveConversation(_x177){return _leaveConversation.apply(this,arguments)}return leaveConversation}()},{key:"scheduleUpdate",value:function(){var _scheduleUpdate=_asyncToGenerator(_regeneratorRuntime().mark(function _callee211(){var r,o,s;return _regeneratorRuntime().wrap(function _callee211$(_context213){while(1)switch(_context213.prev=_context213.next){case 0:_context213.next=2;return yn(this);case 2:this.weavyContextConsumer=new $i(this,{context:Le,subscribe:!0});(r=this.weavyContextConsumer)!=null&&r.value&&this.weavyContext!==((o=this.weavyContextConsumer)==null?void 0:o.value)&&(this.weavyContext=(s=this.weavyContextConsumer)==null?void 0:s.value);_context213.next=6;return _get(_getPrototypeOf(sr.prototype),"scheduleUpdate",this).call(this);case 6:case"end":return _context213.stop()}},_callee211,this)}));function scheduleUpdate(){return _scheduleUpdate.apply(this,arguments)}return scheduleUpdate}()},{key:"willUpdate",value:function willUpdate(r){var _this340=this;var o,s,B,Q,Y,J,it,nt,ot,dt,Mt,Ot;if((r.has("weavyContext")||r.has("conversation"))&&this.weavyContext){var Qt=r.get("conversation");r.has("weavyContext")&&(this.userQuery.trackQuery(tr(this.weavyContext,["user"])),this.featuresQuery.trackQuery(tr(this.weavyContext,["features","chat"])),this.isContextualChat()||(this.markConversationMutation=qm(this.weavyContext),this.leaveConversationMutation=Qm(this.weavyContext),this.addMembersMutation=xC(this.weavyContext),this.updateConversationMutation=kC(this.weavyContext))),r.has("conversation")&&this.conversation&&(this.isContextualChat()||(this.conversationTitleInput=this.conversationTitle=this.conversation.display_name),this.messagesQuery.trackInfiniteQuery(M1(this.weavyContext,this.conversation.id)),this.addMessageMutation.trackMutation(O1(this.weavyContext,["messages",this.conversation.id])),this.pollMutation=ly(this.weavyContext,["messages",this.conversation.id]),this.conversation.id!==(Qt==null?void 0:Qt.id)&&(this.wasAtBottom=!0)),Qt&&this.conversation&&Qt.id!==this.conversation.id&&(this.unsubscribeToRealtime(Qt),!this.isContextualChat()&&this.conversation.last_message&&this.conversation.is_unread&&((s=this.markConversationMutation)==null||s.mutate({id:this.conversation.id,markAsRead:!0,messageId:(o=this.conversation.last_message)==null?void 0:o.id}))),this.conversation||(this.messagesQuery.untrackInfiniteQuery(),this.addMessageMutation.untrackMutation(),this.membersQuery.untrackQuery())}else this.wasAtBottom=this.isAtBottom;(B=this.userQuery.result)!=null&&B.isPending||(this.user=(Q=this.userQuery.result)==null?void 0:Q.data),!this.availableFeatures&&!((Y=this.featuresQuery.result)!=null&&Y.isPending)&&(this.availableFeatures=(J=this.featuresQuery.result)==null?void 0:J.data),(r.has("weavyContext")||r.has("conversation")||r.has("user"))&&this.weavyContext&&this.conversation&&this.user&&(this.isContextualChat()||Pe(this.availableFeatures,Ee.Receipts,(it=this.features)==null?void 0:it.receipts)&&this.membersQuery.trackQuery(I1(this.weavyContext,this.conversation.id,{initialData:function initialData(){var Qt,Ut,te;if((Qt=_this340.conversation)!=null&&Qt.id)return(te=(Ut=_this340.weavyContext)==null?void 0:Ut.queryClient.getQueryData(["conversations",_this340.conversation.id]))==null?void 0:te.members}})),this.lastReadMessageId=!this.isContextualChat()&&this.conversation.is_unread?(Mt=(dt=(((ot=(nt=this.conversation)==null?void 0:nt.members)==null?void 0:ot.data)||[]).filter(function(Qt){var Ut;return Qt.id===((Ut=_this340.user)==null?void 0:Ut.id)}))==null?void 0:dt[0])==null?void 0:Mt.marked_id:void 0,this.lastReadMessagePosition="bottom"),(r.has("weavyContext")||r.has("conversation"))&&this.weavyContext&&this.conversation&&this.conversation.id!==((Ot=r.get("conversation"))==null?void 0:Ot.id)&&(this.weavyContext.subscribe("a".concat(this.conversation.id),"message_created",this.handleRealtimeMessage),this.weavyContext.subscribe("a".concat(this.conversation.id),"reaction_added",this.handleRealtimeReactionAdded),this.weavyContext.subscribe("a".concat(this.conversation.id),"reaction_removed",this.handleRealtimeReactionDeleted),this.isContextualChat()||(this.weavyContext.subscribe("a".concat(this.conversation.id),"app_updated",this.handleRealtimeAppUpdated),this.weavyContext.subscribe("a".concat(this.conversation.id),"conversation_marked",this.handleRealtimeSeenBy),this.weavyContext.subscribe(null,"conversation_delivered",this.handleRealtimeDelivered)))}},{key:"update",value:function update(r){_get(_getPrototypeOf(sr.prototype),"update",this).call(this,r),this.infiniteScroll.observe(this.messagesQuery.result,this.pagerRef.value)}},{key:"render",value:function render(){var _ref253,_this$messagesQuery$r,_this$membersQuery$re,_this341=this,_ref254;var r,o,s,B,Q,Y,J,it;var _ref250=(_ref253=(r=this.weavyContext)==null?void 0:r.network)!==null&&_ref253!==void 0?_ref253:{isPending:!0},nt=_ref250.isPending,_ref251=(_this$messagesQuery$r=this.messagesQuery.result)!==null&&_this$messagesQuery$r!==void 0?_this$messagesQuery$r:{isPending:nt},ot=_ref251.data,dt=_ref251.isPending,Mt=_ref251.hasNextPage,_ref252=(_this$membersQuery$re=this.membersQuery.result)!==null&&_this$membersQuery$re!==void 0?_this$membersQuery$re:{},Ot=_ref252.data,Qt=_ref252.isPending,Ut=this.user&&this.isPrivateChat()?(B=(((s=(o=this.conversation)==null?void 0:o.members)==null?void 0:s.data)||[]).filter(function(te){var qt;return te.id!==((qt=_this341.user)==null?void 0:qt.id)}))==null?void 0:B[0]:null;return v(_templateObject272||(_templateObject272=_taggedTemplateLiteral(["\n <div class=\"wy-messenger-conversation wy-scroll-y\">\n ","\n ","\n ","\n </div>\n\n <!-- add members modal -->\n ","\n\n <!-- details modal -->\n ","\n "])),this.conversation&&!this.isContextualChat()?v(_templateObject273||(_templateObject273=_taggedTemplateLiteral(["\n <header class=\"wy-appbars\">\n <nav class=\"wy-appbar\">\n <div><slot name=\"action\"></slot></div>\n ","\n ","\n </nav>\n </header>\n "])),this.availableFeatures&&this.conversation&&this.user?v(_templateObject274||(_templateObject274=_taggedTemplateLiteral(["\n <wy-typing appId="," userId=",">\n ","\n <span class=\"wy-appbar-text\">","</span>\n </wy-typing>\n "])),(Q=this.conversation)==null?void 0:Q.id,this.user.id,this.conversation.type===lo.PrivateChat?v(_templateObject275||(_templateObject275=_taggedTemplateLiteral(["<wy-presence\n placement=\"text\"\n .status=","\n id=","\n ></wy-presence>"])),Ut==null?void 0:Ut.presence,et(Ut==null?void 0:Ut.id)):O,this.conversationTitle):v(_templateObject276||(_templateObject276=_taggedTemplateLiteral(["<span></span>"]))),this.isChatRoom()||this.isPrivateChat()?v(_templateObject277||(_templateObject277=_taggedTemplateLiteral(["\n <wy-dropdown>\n <wy-dropdown-item @click=",">\n <wy-icon name=\"information\"></wy-icon>\n ","\n </wy-dropdown-item>\n ","\n </wy-dropdown>\n "])),function(){return _this341.showDetails=!0},K$1("Details"),this.isChatRoom()?v(_templateObject278||(_templateObject278=_taggedTemplateLiteral(["\n <wy-dropdown-item @click=",">\n <wy-icon name=\"account-plus\"></wy-icon> ","\n </wy-dropdown-item>\n <wy-dropdown-item @click=",">\n <wy-icon name=\"account-minus\"></wy-icon> ","\n </wy-dropdown-item>\n "])),function(){return _this341.showAddMembers=!0},K$1("Add members"),function(){return _this341.leaveConversation()},K$1("Leave conversation")):O):O):O,this.conversation&&this.user&&ot?v(_templateObject279||(_templateObject279=_taggedTemplateLiteral(["\n ","\n <wy-messages\n .app=","\n .user=","\n .infiniteMessages=","\n .availableFeatures=","\n .features=","\n .members=","\n .unreadMarkerId=","\n .unreadMarkerPosition=","\n .pagerRef=","\n @scroll-to-bottom=","\n @vote=","\n ></wy-messages>\n "])),!Mt&&!dt?v(_templateObject280||(_templateObject280=_taggedTemplateLiteral(["\n <div class=\"wy-avatar-header\">\n ","\n ","\n </div>\n "])),this.isChatRoom()&&!this.conversation.avatar_url?v(_templateObject281||(_templateObject281=_taggedTemplateLiteral(["\n <wy-avatar-group\n .members=","\n .user=","\n .name=","\n .size=","\n ></wy-avatar-group>\n "])),Ot,this.user,this.conversation.display_name,128):!this.isContextualChat()&&(this.conversation.display_name||this.conversation.avatar_url)?v(_templateObject282||(_templateObject282=_taggedTemplateLiteral(["\n <wy-avatar\n src=","\n name=","\n size=","\n ></wy-avatar>\n "])),et(Ut==null?void 0:Ut.avatar_url),this.conversation.display_name,128):O,!this.isContextualChat()&&this.conversationTitle?v(_templateObject283||(_templateObject283=_taggedTemplateLiteral([" <h3 class=\"wy-headline\">","</h3> "])),this.conversationTitle):O):O,this.conversation,this.user,ot,this.availableFeatures,this.features,Ot,this.lastReadMessageId,this.lastReadMessagePosition,this.pagerRef,function(){return _this341.scrollToBottom()},function(te){var qt;(qt=_this341.pollMutation)==null||qt.mutate({optionId:te.detail.id,parentType:te.detail.parentType,parentId:te.detail.parentId})}):v(_templateObject284||(_templateObject284=_taggedTemplateLiteral(["\n <div class=\"wy-messages\">\n <wy-empty class=\"wy-pane\">\n ","\n </wy-empty>\n </div>\n "])),dt||Qt||!this.user||!this.conversation?v(_templateObject285||(_templateObject285=_taggedTemplateLiteral(["<wy-spinner overlay></wy-spinner>"]))):K$1("Start the conversation!")),this.conversation&&kd(Fi.Write,(Y=this.conversation)==null?void 0:Y.access,(J=this.conversation)==null?void 0:J.permissions)?v(_templateObject286||(_templateObject286=_taggedTemplateLiteral(["\n <div class=\"wy-footerbar wy-footerbar-sticky\">\n <wy-message-editor\n .app=","\n .user=","\n .availableFeatures=","\n .features=","\n .draft=","\n placeholder=","\n @submit=","\n ></wy-message-editor>\n </div>\n "])),this.conversation,this.user,this.availableFeatures,this.features,!0,K$1("Type a message..."),function(te){return _this341.handleSubmit(te)}):O,an(this.showAddMembers,v(_templateObject287||(_templateObject287=_taggedTemplateLiteral(["\n <wy-overlay @release-focus=",">\n <header class=\"wy-appbars\">\n <nav class=\"wy-appbar\">\n <wy-button kind=\"icon\" @click=",">\n <wy-icon name=\"close\"></wy-icon>\n </wy-button>\n <div class=\"wy-appbar-text\">","</div>\n </nav>\n </header>\n\n <wy-users-search\n .buttonTitle=","\n .existingMembers=","\n @submit=","\n ></wy-users-search>\n </wy-overlay>\n "])),function(){return _this341.dispatchEvent(_this341.releaseFocusEvent())},function(){return _this341.showAddMembers=!1},K$1("Add members"),K$1("Add"),Ot,function(te){return _this341.addMembers(te.detail.members)}),function(){return _this341.showAddMembers=!1}),an(this.showDetails,v(_templateObject288||(_templateObject288=_taggedTemplateLiteral(["\n <wy-overlay @release-focus=",">\n <header class=\"wy-appbars\">\n <nav class=\"wy-appbar\">\n <wy-button kind=\"icon\" @click=",">\n <wy-icon name=\"close\"></wy-icon>\n </wy-button>\n <div class=\"wy-appbar-text\">","</div>\n </nav>\n </header>\n <div class=\"wy-scroll-y\">\n ","\n </div>\n </wy-overlay>\n "])),function(){return _this341.dispatchEvent(_this341.releaseFocusEvent())},function(){return _this341.showDetails=!1},K$1("Details"),this.conversation&&this.user?v(_templateObject289||(_templateObject289=_taggedTemplateLiteral(["\n <div class=\"wy-avatar-header\">\n ","\n ","\n </div>\n ","\n "])),(this.isContextualChat()||this.isChatRoom())&&!this.conversation.avatar_url?v(_templateObject290||(_templateObject290=_taggedTemplateLiteral(["\n <wy-avatar-group\n .members=","\n .user=","\n .name=","\n .size=","\n ></wy-avatar-group>\n "])),Ot,this.user,this.conversation.display_name,128):this.conversation.display_name||this.conversation.avatar_url?v(_templateObject291||(_templateObject291=_taggedTemplateLiteral(["\n <wy-avatar\n src=","\n name=","\n size=","\n ></wy-avatar>\n "])),this.conversation.avatar_url,this.conversation.display_name,128):O,!this.isContextualChat()&&this.conversationTitle?v(_templateObject292||(_templateObject292=_taggedTemplateLiteral([" <h3 class=\"wy-headline\">","</h3> "])),this.conversationTitle):O,this.isChatRoom()?v(_templateObject293||(_templateObject293=_taggedTemplateLiteral(["\n <div class=\"wy-pane-group\">\n <label class=\"wy-input-label\">","</label>\n <div class=\"wy-input-group\">\n <input\n class=\"wy-input\"\n .value=","\n @input=","\n @keyup=","\n />\n <wy-button\n kind=\"icon\"\n class=\"wy-input-group-button-icon\"\n buttonClass=\"wy-input-group-button-icon wy-button-primary\"\n @click=","\n >\n <wy-icon name=\"check\"></wy-icon>\n </wy-button>\n </div>\n <div class=\"wy-description\">\n ","\n </div>\n </div>\n <div class=\"wy-pane-group\">\n <label class=\"wy-input-label\">","</label>\n ","\n </div>\n <div class=\"wy-pane-group\">\n <wy-button\n kind=\"filled\"\n buttonClass=\"wy-button-primary\"\n @click=","\n title=","\n >\n <wy-icon name=\"account-plus\"></wy-icon>\n ","\n </wy-button>\n </div>\n "])),K$1("Conversation name"),this.conversationTitleInput,function(te){_this341.conversationTitleInput=te.target.value},ql,function(){return _this341.handleSaveConversationName()},K$1("Changing the name of a group chat changes it for everyone."),K$1("Members"),Ot?v(_templateObject294||(_templateObject294=_taggedTemplateLiteral(["\n ","\n "])),(_ref254=(it=Ot.data)==null?void 0:it.map(function(te){return v(_templateObject295||(_templateObject295=_taggedTemplateLiteral(["\n <div class=\"wy-item\">\n <wy-avatar\n .src=","\n .name=","\n size=","\n ></wy-avatar>\n <div class=\"wy-item-body\">\n ","\n ","\n </div>\n\n ","\n </div>\n "])),te.avatar_url,te.display_name,32,te.display_name,_this341.conversation.created_by_id===te.id?v(_templateObject296||(_templateObject296=_taggedTemplateLiteral([" <wy-icon\n size=\"20\"\n inline\n name=\"shield-star\"\n title=","\n ></wy-icon>"])),K$1("Admin")):O,_this341.conversation.created_by_id===_this341.user.id||te.id!==_this341.user.id?v(_templateObject297||(_templateObject297=_taggedTemplateLiteral(["\n <wy-dropdown>\n ","\n </wy-dropdown>\n "])),_this341.conversation.created_by_id===_this341.user.id&&te.id!==_this341.user.id?v(_templateObject298||(_templateObject298=_taggedTemplateLiteral([" <wy-dropdown-item\n @click=","\n >\n <wy-icon name=\"account-minus\"></wy-icon>\n ","\n </wy-dropdown-item>"])),function(){return _this341.leaveConversation(te.id)},K$1("Remove member")):te.id===_this341.user.id?v(_templateObject299||(_templateObject299=_taggedTemplateLiteral(["\n <wy-dropdown-item @click=",">\n <wy-icon name=\"account-minus\"></wy-icon>\n ","\n </wy-dropdown-item>\n "])),function(){return _this341.leaveConversation()},K$1("Leave conversation")):O):O)}))!==null&&_ref254!==void 0?_ref254:O):O,function(){_this341.showDetails=!1,_this341.showAddMembers=!0},K$1("Add members"),K$1("Add members")):O):O),function(){return _this341.showDetails=!1}))}},{key:"updated",value:function updated(){var _this342=this;this.wasAtBottom&&requestAnimationFrame(function(){_this342.scrollToBottom()})}},{key:"disconnectedCallback",value:function disconnectedCallback(){this.weavyContext&&this.conversation&&this.unsubscribeToRealtime(this.conversation),_get(_getPrototypeOf(sr.prototype),"disconnectedCallback",this).call(this)}}]);return sr}(le);sr.styles=[me,Be(_templateObject300||(_templateObject300=_taggedTemplateLiteral(["\n :host {\n display: contents;\n position: relative;\n }\n\n wy-messages {\n display: contents;\n }\n "])))];Wr([K()],sr.prototype,"weavyContext",2);Wr([m({attribute:!1})],sr.prototype,"user",2);Wr([m({attribute:!1})],sr.prototype,"conversation",2);Wr([K()],sr.prototype,"lastReadMessageId",2);Wr([K()],sr.prototype,"lastReadMessagePosition",2);Wr([m()],sr.prototype,"cssClass",2);Wr([K()],sr.prototype,"availableFeatures",2);Wr([m({type:Object})],sr.prototype,"features",2);Wr([K()],sr.prototype,"showAddMembers",2);Wr([K()],sr.prototype,"showDetails",2);Wr([K()],sr.prototype,"conversationTitle",2);Wr([K()],sr.prototype,"conversationTitleInput",2);sr=Wr([de("wy-conversation"),q()],sr);var rl=function(){function rl(o,s){var _this343=this;_classCallCheck(this,rl);this.firstUpdate=!0,this.styles=[],o.addController(this),this.host=o,s&&(this.styles=s),this.cssObserverDisconnect=v1(o,function(){return _this343.checkThemeUpdate()}),this.metaObserverDisconnect=g1(function(){return _this343.checkThemeUpdate()})}_createClass(rl,[{key:"checkThemeUpdate",value:function checkThemeUpdate(){var o=this.themeColor||bh(this.host)||_h();if(o&&o!==this._resolvedThemeColor){this._resolvedThemeColor=o,console.log("Configuring theme",this._resolvedThemeColor);var s=_1(this._resolvedThemeColor).join(""),B=Be(_templateObject301||(_templateObject301=_taggedTemplateLiteral(["\n :host {\n ",";\n }\n "])),Fc(s)),Q=this.host.renderRoot;mw(Q,[].concat(_toConsumableArray(this.styles),[B]))}}},{key:"hostUpdate",value:function hostUpdate(){this.firstUpdate&&(this.checkThemeUpdate(),this.firstUpdate=!1)}},{key:"hostDisconnected",value:function hostDisconnected(){var o,s;(o=this.cssObserverDisconnect)==null||o.call(this),(s=this.metaObserverDisconnect)==null||s.call(this)}}]);return rl}();function Cd(r,o,s){return tr(r,["apps",o],void 0,void 0,JSON.stringify({type:s}),"PUT")}function EC(r,o){var s=r.queryClient,B=["apps",o.uid];return{mutationFn:function(){var _mutationFn24=_asyncToGenerator(_regeneratorRuntime().mark(function _callee212(_ref255){var Q,Y;return _regeneratorRuntime().wrap(function _callee212$(_context214){while(1)switch(_context214.prev=_context214.next){case 0:Q=_ref255.subscribe;if(!(o.id>=1)){_context214.next=12;break}_context214.next=4;return r.post("/api/apps/".concat(o.id,"/").concat(Q?"subscribe":"unsubscribe"),"POST","");case 4:Y=_context214.sent;if(Y.ok){_context214.next=9;break}_context214.next=8;return Y.json();case 8:throw _context214.sent;case 9:return _context214.abrupt("return",Y.json());case 12:throw new Error("Could not subscribe to app ".concat(o.uid,"."));case 13:case"end":return _context214.stop()}},_callee212)}));function mutationFn(_x178){return _mutationFn24.apply(this,arguments)}return mutationFn}(),onMutate:function(){var _onMutate18=_asyncToGenerator(_regeneratorRuntime().mark(function _callee213(Q){var Y;return _regeneratorRuntime().wrap(function _callee213$(_context215){while(1)switch(_context215.prev=_context215.next){case 0:return _context215.abrupt("return",(s.setQueryData(B,function(J){return Y=J.is_subscribed,_objectSpread(_objectSpread({},J),{},{is_subscribed:Q.subscribe})}),{previousSubscribe:Y,subscribe:Q.subscribe}));case 1:case"end":return _context215.stop()}},_callee213)}));function onMutate(_x179){return _onMutate18.apply(this,arguments)}return onMutate}(),onSuccess:function onSuccess(Q){s.setQueryData(B,function(Y){return _objectSpread(_objectSpread({},Y),Q)},{updatedAt:Date.now()}),s.invalidateQueries({queryKey:B,exact:!0})},onError:function onError(Q,Y,J){J&&J.previousSubscribe!==void 0&&s.setQueryData(B,function(it){return _objectSpread(_objectSpread({},it),{},{is_subscribed:J==null?void 0:J.previousSubscribe})})}}}var SC=Object.defineProperty,PC=Object.getOwnPropertyDescriptor,Km=function Km(r,o,s,B){for(var Q=B>1?void 0:B?PC(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&SC(o,s,Q),Q};var _dc=function(_sr){_inherits(dc,_sr);function dc(){var _this344;_classCallCheck(this,dc);_this344=_callSuper(this,dc),_this344.realtimeMessageCreatedEvent=function(r){!_this344.weavyContext||!_this344.conversation||!_this344.user||r.message.app_id!==_this344.conversation.id||r.message.created_by_id===_this344.user.id||_this344.dispatchEvent(new CustomEvent("wy:message_created",{bubbles:!0,composed:!1,detail:r}))},_this344.realtimeReactionAddedEvent=function(r){!_this344.weavyContext||!_this344.user||!_this344.conversation||r.actor.id===_this344.user.id||_this344.dispatchEvent(new CustomEvent("wy:reaction_added",{bubbles:!0,composed:!1,detail:r}))},_this344.realtimeReactionRemovedEvent=function(r){!_this344.weavyContext||!_this344.conversation||!_this344.user||r.actor.id===_this344.user.id||_this344.dispatchEvent(new CustomEvent("wy:reaction_removed",{bubbles:!0,composed:!1,detail:r}))},_this344.realtimeAppUpdatedEvent=function(r){!_this344.conversation||r.app.id!==_this344.conversation.id||_this344.dispatchEvent(new CustomEvent("wy:app_updated",{bubbles:!0,composed:!1,detail:r}))},_this344.conversationQuery=new kt(_assertThisInitialized(_this344)),new rl(_assertThisInitialized(_this344),_dc.styles);return _this344}_createClass(dc,[{key:"willUpdate",value:function(){var _willUpdate3=_asyncToGenerator(_regeneratorRuntime().mark(function _callee214(r){var o,s;return _regeneratorRuntime().wrap(function _callee214$(_context216){while(1)switch(_context216.prev=_context216.next){case 0:(r.has("weavyContext")||r.has("uid"))&&this.weavyContext&&this.uid&&this.conversationQuery.trackQuery(Cd(this.weavyContext,this.uid,Qc.Chat)),(o=this.conversationQuery.result)!=null&&o.isPending||(this.conversation=(s=this.conversationQuery.result)==null?void 0:s.data),(r.has("weavyContext")||r.has("conversation"))&&this.weavyContext&&this.conversation&&(this.weavyContext.subscribe("a".concat(this.conversation.id),"message_created",this.realtimeMessageCreatedEvent),this.weavyContext.subscribe("a".concat(this.conversation.id),"reaction_added",this.realtimeReactionAddedEvent),this.weavyContext.subscribe("a".concat(this.conversation.id),"reaction_removed",this.realtimeReactionRemovedEvent),this.weavyContext.subscribe("a".concat(this.conversation.id),"app_updated",this.realtimeAppUpdatedEvent)),_get(_getPrototypeOf(dc.prototype),"willUpdate",this).call(this,r);case 1:case"end":return _context216.stop()}},_callee214,this)}));function willUpdate(_x180){return _willUpdate3.apply(this,arguments)}return willUpdate}()},{key:"unsubscribeToChatRealtime",value:function unsubscribeToChatRealtime(r){this.weavyContext&&(this.weavyContext.unsubscribe("a".concat(r.id),"message_created",this.realtimeMessageCreatedEvent),this.weavyContext.unsubscribe("a".concat(r.id),"reaction_added",this.realtimeReactionAddedEvent),this.weavyContext.unsubscribe("a".concat(r.id),"reaction_removed",this.realtimeReactionRemovedEvent),this.weavyContext.unsubscribe("a".concat(r.id),"app_updated",this.realtimeAppUpdatedEvent))}},{key:"disconnectedCallback",value:function disconnectedCallback(){this.weavyContext&&this.conversation&&this.unsubscribeToChatRealtime(this.conversation),_get(_getPrototypeOf(dc.prototype),"disconnectedCallback",this).call(this)}}]);return dc}(sr);_dc.styles=[].concat(_toConsumableArray(sr.styles),[ns]);Km([m()],_dc.prototype,"uid",2);_dc=Km([de("wy-chat")],_dc);var AC=Object.defineProperty,LC=Object.getOwnPropertyDescriptor,eo=function eo(r,o,s,B){for(var Q=B>1?void 0:B?LC(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&AC(o,s,Q),Q};var _Ei=function(_le51){_inherits(Ei,_le51);function Ei(){var _this345;_classCallCheck(this,Ei);_this345=_callSuper(this,Ei),_this345.features={},_this345.realtimeCommentCreatedEvent=function(r){return new CustomEvent("wy:comment_created",{bubbles:!0,composed:!1,detail:r})},_this345.realtimeReactionAddedEvent=function(r){return new CustomEvent("wy:reaction_added",{bubbles:!0,composed:!1,detail:r})},_this345.realtimeReactionRemovedEvent=function(r){return new CustomEvent("wy:reaction_removed",{bubbles:!0,composed:!1,detail:r})},_this345.appQuery=new kt(_assertThisInitialized(_this345)),_this345.userQuery=new kt(_assertThisInitialized(_this345)),_this345.featuresQuery=new kt(_assertThisInitialized(_this345)),_this345.handleRealtimeCommentCreated=function(r){!_this345.weavyContext||r.actor.id===_this345.user.id||_this345.dispatchEvent(_this345.realtimeCommentCreatedEvent(r))},_this345.handleRealtimeReactionAdded=function(r){!_this345.weavyContext||r.actor.id===_this345.user.id||r.entity.type!=="comment"||_this345.dispatchEvent(_this345.realtimeReactionAddedEvent(r))},_this345.handleRealtimeReactionDeleted=function(r){!_this345.weavyContext||r.actor.id===_this345.user.id||r.entity.type!=="comment"||_this345.dispatchEvent(_this345.realtimeReactionRemovedEvent(r))},new rl(_assertThisInitialized(_this345),_Ei.styles);return _this345}_createClass(Ei,[{key:"scheduleUpdate",value:function(){var _scheduleUpdate2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee215(){var r,o,s;return _regeneratorRuntime().wrap(function _callee215$(_context217){while(1)switch(_context217.prev=_context217.next){case 0:_context217.next=2;return yn(this);case 2:this.weavyContextConsumer=new $i(this,{context:Le,subscribe:!0});(r=this.weavyContextConsumer)!=null&&r.value&&this.weavyContext!==((o=this.weavyContextConsumer)==null?void 0:o.value)&&(this.weavyContext=(s=this.weavyContextConsumer)==null?void 0:s.value);_context217.next=6;return _get(_getPrototypeOf(Ei.prototype),"scheduleUpdate",this).call(this);case 6:case"end":return _context217.stop()}},_callee215,this)}));function scheduleUpdate(){return _scheduleUpdate2.apply(this,arguments)}return scheduleUpdate}()},{key:"unsubscribeToRealtime",value:function unsubscribeToRealtime(r){this.weavyContext&&(this.weavyContext.unsubscribe("a".concat(r.id),"comment_created",this.handleRealtimeCommentCreated),this.weavyContext.unsubscribe("a".concat(r.id),"reaction_added",this.handleRealtimeReactionAdded),this.weavyContext.unsubscribe("a".concat(r.id),"reaction_removed",this.handleRealtimeReactionDeleted))}},{key:"willUpdate",value:function willUpdate(r){var o,s,B,Q,Y,J;if(r.has("app")){var it=r.get("app");it&&it!==this.app&&this.unsubscribeToRealtime(it)}(r.has("uid")||r.has("weavyContext"))&&this.uid&&this.weavyContext&&(this.appQuery.trackQuery(Cd(this.weavyContext,this.uid,Qc.Comments)),this.userQuery.trackQuery(tr(this.weavyContext,["user"])),this.featuresQuery.trackQuery(tr(this.weavyContext,["features","comments"]))),(o=this.appQuery.result)!=null&&o.isPending||(this.app=(s=this.appQuery.result)==null?void 0:s.data),(B=this.userQuery.result)!=null&&B.isPending||(this.user=(Q=this.userQuery.result)==null?void 0:Q.data),(Y=this.featuresQuery.result)!=null&&Y.isPending||(this.availableFeatures=(J=this.featuresQuery.result)==null?void 0:J.data),(r.has("weavyContext")||r.has("app")||r.has("user"))&&this.weavyContext&&this.app&&this.user&&(this.weavyContext.subscribe("a".concat(this.app.id),"comment_created",this.handleRealtimeCommentCreated),this.weavyContext.subscribe("a".concat(this.app.id),"reaction_added",this.handleRealtimeReactionAdded),this.weavyContext.subscribe("a".concat(this.app.id),"reaction_removed",this.handleRealtimeReactionDeleted))}},{key:"render",value:function render(){var r;return this.app&&this.user?v(_templateObject302||(_templateObject302=_taggedTemplateLiteral(["\n <wy-comment-list\n parentId=","\n .app=","\n .user=","\n .features=","\n .availableFeatures=","\n .location=","\n ></wy-comment-list>\n "])),(r=this.app)==null?void 0:r.id,this.app,this.user,this.features,this.availableFeatures,"apps"):v(_templateObject303||(_templateObject303=_taggedTemplateLiteral(["\n <wy-empty>\n <wy-spinner></wy-spinner>\n </wy-empty>\n "])))}},{key:"disconnectedCallback",value:function disconnectedCallback(){this.weavyContext&&this.app&&this.unsubscribeToRealtime(this.app),_get(_getPrototypeOf(Ei.prototype),"disconnectedCallback",this).call(this)}}]);return Ei}(le);_Ei.styles=[ns,me,Be(_templateObject304||(_templateObject304=_taggedTemplateLiteral(["\n :host {\n position: relative;\n }\n "])))];eo([K()],_Ei.prototype,"weavyContext",2);eo([K()],_Ei.prototype,"user",2);eo([m()],_Ei.prototype,"uid",2);eo([m()],_Ei.prototype,"cssClass",2);eo([K()],_Ei.prototype,"availableFeatures",2);eo([m({type:Object})],_Ei.prototype,"features",2);eo([K()],_Ei.prototype,"app",2);_Ei=eo([de("wy-comments"),q()],_Ei);var MC=function MC(r){var o,s,B,Q,Y,J,it,nt,ot,dt,Mt,Ot,Qt,Ut;return Ut=function(_r9){_inherits(Ut,_r9);function Ut(){var _this346;_classCallCheck(this,Ut);for(var _len10=arguments.length,te=new Array(_len10),_key10=0;_key10<_len10;_key10++){te[_key10]=arguments[_key10]}_this346=_callSuper(this,Ut,[].concat(te)),S(_assertThisInitialized(_this346),Q),S(_assertThisInitialized(_this346),J),S(_assertThisInitialized(_this346),nt),S(_assertThisInitialized(_this346),dt),S(_assertThisInitialized(_this346),Ot),S(_assertThisInitialized(_this346),o,[]),S(_assertThisInitialized(_this346),s,void 0),S(_assertThisInitialized(_this346),B,new Set);return _this346}_createClass(Ut,[{key:"eventParent",get:function get(){return h(this,s)},set:function set(te){te!=null&&te.eventChildren&&te.eventChildren.add(this),A(this,s,te)}},{key:"eventChildren",get:function get(){return h(this,B)}},{key:"on",value:function on(){var _this347=this;for(var _len11=arguments.length,te=new Array(_len11),_key11=0;_key11<_len11;_key11++){te[_key11]=arguments[_key11]}var qt=D(this,Ot,Qt).call(this,te);if(te[3]){var ie=function ie(){try{for(var _len12=arguments.length,re=new Array(_len12),_key12=0;_key12<_len12;_key12++){re[_key12]=arguments[_key12]}qt.handler.apply(_this347,re)}catch(_unused39){try{qt.handler()}catch(ne){console.warn("Could not invoke one handler:",ne)}}D(_this347,nt,ot).call(_this347,qt.events,qt.selector,null,qt.handler)};D(this,Q,Y).call(this,qt.events,qt.selector,ie,qt.handler)}else D(this,Q,Y).call(this,qt.events,qt.selector,qt.handler,qt.handler)}},{key:"one",value:function one(te,qt,ie){this.on(te,qt,ie,!0)}},{key:"off",value:function off(){for(var _len13=arguments.length,te=new Array(_len13),_key13=0;_key13<_len13;_key13++){te[_key13]=arguments[_key13]}var qt=D(this,Ot,Qt).call(this,te),ie=D(this,J,it).call(this,qt.events,qt.selector,qt.handler);return D(this,nt,ot).call(this,qt.events,qt.selector,ie,qt.handler)}},{key:"clearEventHandlers",value:function clearEventHandlers(){h(this,o).length=0}},{key:"triggerEvent",value:function triggerEvent(te,qt){var re=/^(before|on|after):/.test(te),ne=re?te.split(":")[0]:"";te=te.replace(/^(before|on|after):/,"");var ae="before:"+te,Bt=te,Wt="after:"+te;if(qt&&typeof qt=="string")try{qt=JSON.parse(qt)}catch(_unused40){console.warn("Could not parse event data",te,qt)}var oe;for(var _len14=arguments.length,ie=new Array(_len14>2?_len14-2:0),_key14=2;_key14<_len14;_key14++){ie[_key14-2]=arguments[_key14]}if(re){var _D2,_h9;if(ne==="before"||ne==="after"){var _h8,_D;if(h(this,s)&&(oe=(_h8=h(this,s)).triggerEvent.apply(_h8,[ne==="before"?ae:Wt,qt].concat(ie)),qt=oe||oe===!1?oe:qt,qt===!1)||(oe=(_D=D(this,dt,Mt)).call.apply(_D,[this,ne==="before"?ae:Wt,qt].concat(ie)),qt=oe||oe===!1?oe:qt,qt===!1))return qt}else if(ne==="on"&&(oe=(_D2=D(this,dt,Mt)).call.apply(_D2,[this,Bt,qt].concat(ie)),qt=oe||oe===!1?oe:qt,qt===!1||h(this,s)&&(oe=(_h9=h(this,s)).triggerEvent.apply(_h9,["on:"+Bt,qt].concat(ie)),qt=oe||oe===!1?oe:qt,qt===!1)))return qt}else{var _h10,_D3,_D4,_h11,_h12,_D5;if(h(this,s)&&(oe=(_h10=h(this,s)).triggerEvent.apply(_h10,[ae,qt].concat(ie)),qt=oe||oe===!1?oe:qt,qt===!1)||(oe=(_D3=D(this,dt,Mt)).call.apply(_D3,[this,ae,qt].concat(ie)),qt=oe||oe===!1?oe:qt,qt===!1)||(oe=(_D4=D(this,dt,Mt)).call.apply(_D4,[this,Bt,qt].concat(ie)),qt=oe||oe===!1?oe:qt,qt===!1)||h(this,s)&&(oe=(_h11=h(this,s)).triggerEvent.apply(_h11,["on:"+Bt,qt].concat(ie)),qt=oe||oe===!1?oe:qt,qt===!1)||h(this,s)&&(oe=(_h12=h(this,s)).triggerEvent.apply(_h12,[Wt,qt].concat(ie)),qt=oe||oe===!1?oe:qt,qt===!1))return qt;oe=(_D5=D(this,dt,Mt)).call.apply(_D5,[this,Wt,qt].concat(ie)),qt=oe||oe===!1?oe:qt}return qt}}]);return Ut}(r),o=new WeakMap,s=new WeakMap,B=new WeakMap,Q=new WeakSet,Y=function Y(te,qt,ie,re){h(this,o).push({events:te,selector:qt,handler:ie,originalHandler:re})},J=new WeakSet,it=function it(te,qt,ie,re){var ne={events:te,selector:qt,handler:ie,originalHandler:re||ie},ae=h(this,o).filter(function(Bt){return Is(ne,Bt,!0)}).pop();return ae&&ae.handler},nt=new WeakSet,ot=function ot(te,qt,ie,re){var _this348=this;var ne={events:te,selector:qt,handler:ie,originalHandler:re};var ae=!1;return h(this,o).forEach(function(Bt,Wt){Is(ne,Bt,!0)&&(ae=!0,h(_this348,o).splice(Wt,1))}),ae},dt=new WeakSet,Mt=function Mt(te,qt){for(var _len15=arguments.length,ie=new Array(_len15>2?_len15-2:0),_key15=2;_key15<_len15;_key15++){ie[_key15-2]=arguments[_key15]}var re=!1;return h(this,o).forEach(function(ne){ne.events.split(" ").forEach(function(ae){if(ae=ae.indexOf("on:")===0?ae.split("on:")[1]:ae,te===ae&&(!ne.selector||Is(ne.selector,qt,!0))){var Bt=ne.handler.apply(ne,[qt].concat(ie));Bt?qt=Bt:Bt===!1&&(re=!0)}})}),re?!1:qt},Ot=new WeakSet,Qt=function Qt(te){var qt=typeof te[1]=="function"?te[1]:te[2],ie=typeof te[1]=="function"?null:te[1];return{events:te[0],selector:ie,handler:qt}},Ut},OC=MC(function(){function _class6(){_classCallCheck(this,_class6)}return _createClass(_class6)}());function Qp(r){var o;var s="";try{s=((o=/^((?:https?:\/\/[^/]+)|(?:file:\/\/))\/?/.exec(r))==null?void 0:o[1])||""}catch(_unused41){console.error("Unable to resolve location origin. Make sure you are using http, https or file protocol and have a valid location URL.")}return s}var IC=function(_OC){_inherits(IC,_OC);function IC(){var _this349;var o=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,IC);_this349=_callSuper(this,IC),_this349.contentWindows=new Set,_this349.contentWindowsMapByWeavyId=new Map,_this349.contentWindowOrigins=new WeakMap,_this349.contentWindowNames=new WeakMap,_this349.contentWindowWeavyIds=new WeakMap,_this349.contentWindowDomain=new WeakMap,_this349.origin=Qp(window.location.href),_this349.timeout=2e3,o!=null&&o.timeout&&(_this349.timeout=o.timeout),window.addEventListener("message",function(s){var B,Q;if(s.data.name&&s.data.weavyId!==void 0){if(s.data.weavyMessageId&&s.data.name!=="message-receipt"&&s.data.name!=="unready")try{(B=s.source)==null||B.postMessage({name:"message-receipt",weavyId:s.data.weavyId,weavyMessageId:s.data.weavyMessageId},{targetOrigin:s.origin})}catch(_unused42){console.error("could not post back message-receipt to source")}switch(s.data.name){case"register-child":{if((!s.source||!_this349.contentWindowWeavyIds.has(s.source))&&console.warn("register-child: contentWindow not pre-registered",s.source),s.source&&_this349.contentWindowOrigins.get(s.source)!==s.origin){console.error("register-child: "+_this349.contentWindowNames.get(s.source)+" has invalid origin",s.origin);return}try{var Y=_this349.contentWindowWeavyIds.get(s.source),J=_this349.contentWindowNames.get(s.source);J&&s.source&&s.source.postMessage({name:"register-window",windowName:J,weavyId:Y||!0},{targetOrigin:s.origin})}catch(Y){console.error("could not register frame window",Y)}break}case"ready":{s.source&&_this349.contentWindowsMapByWeavyId.has(s.data.weavyId)&&_this349.contentWindowNames.has(s.source)&&(Q=_this349.contentWindowsMapByWeavyId.get(s.data.weavyId))!=null&&Q.get(_this349.contentWindowNames.get(s.source))&&(_this349.contentWindowDomain.set(s.source,s.origin),_this349.distributeMessage(s));break}case"unready":{_this349.contentWindowsMapByWeavyId.has(s.data.weavyId)&&_this349.distributeMessage(s,!0);break}default:{(s.source===window||_this349.contentWindowsMapByWeavyId.size)&&_this349.distributeMessage(s);break}}}});return _this349}_createClass(IC,[{key:"console",get:function get(){return console}},{key:"distributeMessage",value:function distributeMessage(o){var s=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1;var B=o.source===window&&o.origin===this.origin;if(s||(s=o.source&&this.contentWindowOrigins.has(o.source)&&o.origin===this.contentWindowOrigins.get(o.source)||!1),B||s){s&&!o.data.windowName&&o.source&&(o.data.windowName=this.contentWindowNames.get(o.source));var Q=o.data.name;this.triggerEvent(Q,o.data,o),this.triggerEvent("message",o.data,o)}}},{key:"registerContentWindow",value:function registerContentWindow(o,s,B,Q){var Y;try{if(!s){console.error("registerContentWindow() No valid contentWindow to register, must be a window and have a name.");return}}catch(_unused43){console.error("registerContentWindow() cannot access contentWindowName")}o.self&&(o=o.self),this.console.log("registerContentWindow",o),(!B||B==="true")&&(B=!0),this.contentWindowsMapByWeavyId.has(B)||this.contentWindowsMapByWeavyId.set(B,new Map),(Y=this.contentWindowsMapByWeavyId.get(B))==null||Y.set(s,o),this.contentWindows.add(o),this.contentWindowNames.set(o,s),this.contentWindowWeavyIds.set(o,B),this.contentWindowOrigins.set(o,Q)}},{key:"unregisterAll",value:function unregisterAll(o){var _this350=this;var s;this.contentWindowsMapByWeavyId.has(o)&&((s=this.contentWindowsMapByWeavyId.get(o))==null||s.forEach(function(B,Q){_this350.unregisterContentWindow(Q,o)}),this.contentWindowsMapByWeavyId.get(o),this.contentWindowsMapByWeavyId["delete"](o))}},{key:"unregisterContentWindow",value:function unregisterContentWindow(o,s){var B,Q,Y,J;if(this.contentWindowsMapByWeavyId.has(s)){if((B=this.contentWindowsMapByWeavyId.get(s))!=null&&B.has(o)){var it=(Q=this.contentWindowsMapByWeavyId.get(s))==null?void 0:Q.get(o);if(it)try{this.contentWindows["delete"](it),this.contentWindowNames["delete"](it),this.contentWindowWeavyIds["delete"](it),this.contentWindowOrigins["delete"](it)}catch(_unused44){}}if((Y=this.contentWindowsMapByWeavyId.get(s))==null||Y["delete"](o),((J=this.contentWindowsMapByWeavyId.get(s))==null?void 0:J.size)===0)try{this.contentWindowsMapByWeavyId["delete"](s)}catch(_unused45){}}}},{key:"whenPostMessage",value:function(){var _whenPostMessage=_asyncToGenerator(_regeneratorRuntime().mark(function _callee216(o,s,B){var _this351=this;var Q,Y,J;return _regeneratorRuntime().wrap(function _callee216$(_context218){while(1)switch(_context218.prev=_context218.next){case 0:B===null&&(B=void 0);Q=o===window.self,Y=Q?Qp(window.location.href):this.contentWindowOrigins.get(o);if(!(Q||o&&Y===this.contentWindowDomain.get(o))){_context218.next=8;break}s.weavyMessageId||(s.weavyMessageId=wh()+wh());_context218.next=6;return Promise.race([new Promise(function(it,nt){J=window.setTimeout(function(){nt(new Error("postMessage() receipt timed out: "+s.weavyMessageId+", "+s.name))},_this351.timeout||2e3)}),new Promise(function(it){_this351.on("message-receipt",{weavyId:s.weavyId,weavyMessageId:s.weavyMessageId},function(){console.debug("message-receipt received",s.weavyMessageId,s.name),clearTimeout(J),it(void 0)}),o.postMessage(s,{targetOrigin:Y,transfer:B})})]);case 6:_context218.next=9;break;case 8:throw new Error("postMessage() Invalid window origin: "+Y+", "+s.name);case 9:case"end":return _context218.stop()}},_callee216,this)}));function whenPostMessage(_x181,_x182,_x183){return _whenPostMessage.apply(this,arguments)}return whenPostMessage}()},{key:"postToChildren",value:function postToChildren(o,s){var _this352=this;if(_typeof(o)!="object"||!o.name){console.error("postToChildren() Invalid message format",o);return}s===null&&(s=void 0),o.distributeName=o.name,o.name="distribute",o.weavyId=o.weavyId||!0,this.contentWindows.forEach(function(B){var Q=_this352.contentWindowOrigins.get(B);if(Q===_this352.contentWindowDomain.get(B))try{B.postMessage(o,{targetOrigin:Q,transfer:s})}catch(_unused46){console.warn("postToChildren() could not distribute message to "+_this352.contentWindowNames.get(B))}})}},{key:"postToFrame",value:function(){var _postToFrame=_asyncToGenerator(_regeneratorRuntime().mark(function _callee217(o,s,B,Q){var Y,J;return _regeneratorRuntime().wrap(function _callee217$(_context219){while(1)switch(_context219.prev=_context219.next){case 0:if(!(_typeof(B)!="object"||!B.name)){_context219.next=3;break}console.error("postToFrame() Invalid message format",B);return _context219.abrupt("return");case 3:J=(Y=this.contentWindowsMapByWeavyId.get(s))==null?void 0:Y.get(o);if(J){_context219.next=6;break}throw new Error("postToFrame() Window not registered: ".concat(s,", ").concat(o));case 6:B.weavyId=s;_context219.next=9;return this.whenPostMessage(J,B,Q);case 9:return _context219.abrupt("return",_context219.sent);case 10:case"end":return _context219.stop()}},_callee217,this)}));function postToFrame(_x184,_x185,_x186,_x187){return _postToFrame.apply(this,arguments)}return postToFrame}()},{key:"postToSelf",value:function(){var _postToSelf=_asyncToGenerator(_regeneratorRuntime().mark(function _callee218(o,s){return _regeneratorRuntime().wrap(function _callee218$(_context220){while(1)switch(_context220.prev=_context220.next){case 0:if(!(_typeof(o)!="object"||!o.name)){_context220.next=3;break}console.error("postToSelf() Invalid message format",o);return _context220.abrupt("return");case 3:o.weavyId=o.weavyId||!0;_context220.next=6;return this.whenPostMessage(window.self,o,s);case 6:return _context220.abrupt("return",_context220.sent);case 7:case"end":return _context220.stop()}},_callee218,this)}));function postToSelf(_x188,_x189){return _postToSelf.apply(this,arguments)}return postToSelf}()},{key:"postToSource",value:function postToSource(o,s,B){if(o.source&&o.data.weavyId!==void 0){var Q=o.source===window.self&&o.origin===this.origin,Y=this.contentWindowOrigins.has(o.source)&&o.origin===this.contentWindowOrigins.get(o.source);if(B===null&&(B=void 0),Q||Y){s.weavyId=o.data.weavyId;try{o.source.postMessage(s,{targetOrigin:o.origin,transfer:B})}catch(J){console.error("postToSource() Could not post message back to source",J)}}}}}]);return IC}(OC);var fn=new IC;var TC=Object.defineProperty,RC=Object.getOwnPropertyDescriptor,il=function il(r,o,s,B){for(var Q=B>1?void 0:B?RC(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&TC(o,s,Q),Q};var Wo=function(_le52){_inherits(Wo,_le52);function Wo(){var _this353;_classCallCheck(this,Wo);_this353=_callSuper(this,Wo,arguments),_this353.iframeVisible=!1,_this353.showOverlay=!1,_this353.isRegistered=!1,_this353.iframeElementRef=Re(),_this353.overlayRef=Re();return _this353}_createClass(Wo,[{key:"open",value:function open(){this.showOverlay=!0}},{key:"close",value:function close(){this.showOverlay=!1,this.iframeVisible=!1}},{key:"origin",get:function get(){var r="";try{window.location.ancestorOrigins&&0<window.location.ancestorOrigins.length?r=window.location.ancestorOrigins[window.location.ancestorOrigins.length-1]:window.top&&(r=window.top.document.location.origin)}catch(_unused47){}if(!r)try{r=window.self.document.location.origin}catch(_unused48){console.error("Filebrowser: Could not read current origin.")}return r}},{key:"dispatchExternalBlobs",value:function dispatchExternalBlobs(r){var o=new CustomEvent("external-blobs",{detail:{externalBlobs:r}});return this.dispatchEvent(o)}},{key:"connectedCallback",value:function connectedCallback(){var _this354=this;_get(_getPrototypeOf(Wo.prototype),"connectedCallback",this).call(this),this.handleFiles=function(r,o){var s,B;o.source===((B=(s=_this354.iframeElementRef.value)==null?void 0:s.contentWindow)==null?void 0:B.self)&&(_this354.dispatchExternalBlobs(r.blobs),_this354.close())},this.handleClose=function(r,o){var s,B;o.source===((B=(s=_this354.iframeElementRef.value)==null?void 0:s.contentWindow)==null?void 0:B.self)&&_this354.close()},this.handleGoogleSelected=function(r,o){var s,B;o.source===((B=(s=_this354.iframeElementRef.value)==null?void 0:s.contentWindow)==null?void 0:B.self)&&(_this354.overlayRef.value.maximized=!0)},fn.on("add-external-blobs",this.handleFiles),fn.on("request:file-browser-close",this.handleClose),fn.on("google-selected",this.handleGoogleSelected)}},{key:"disconnectedCallback",value:function disconnectedCallback(){_get(_getPrototypeOf(Wo.prototype),"disconnectedCallback",this).call(this),fn.off("add-external-blobs",this.handleFiles),fn.off("request:file-browser-close",this.handleClose),fn.off("google-selected",this.handleGoogleSelected)}},{key:"updated",value:function updated(){var r,o;this.weavyContext&&(this.showOverlay&&!this.src&&(this.src=new URL("?origin="+this.origin+"&v=X&t="+Date.now().toString()+"&weavyId=wy-filebrowser",this.weavyContext.cloudFilePickerUrl)),!this.isRegistered&&this.showOverlay&&this.src?(r=this.iframeElementRef.value)!=null&&r.contentWindow&&(fn.registerContentWindow((o=this.iframeElementRef.value)==null?void 0:o.contentWindow.self,"weavy-filebrowser","wy-filebrowser",this.src.origin),this.isRegistered=!0):this.isRegistered&&!this.showOverlay&&this.src&&(fn.unregisterContentWindow("weavy-filebrowser","wy-filebrowser"),this.isRegistered=!1,this.src=void 0))}},{key:"render",value:function render(){var _this355=this;var r;return an(this.showOverlay,v(_templateObject305||(_templateObject305=_taggedTemplateLiteral(["\n <wy-overlay\n ","\n @release-focus=",">\n <wy-spinner overlay ?hidden=","></wy-spinner>\n <iframe\n ","\n @load=","\n src=","\n style=\"flex: 1 1 100%; border: 0;\"\n id=\"weavy-filebrowser\"\n name=\"weavy-filebrowser\"\n title=","></iframe>\n </wy-overlay>\n "])),Ce(this.overlayRef),function(){return _this355.dispatchEvent(new CustomEvent("release-focus",{bubbles:!0,composed:!0}))},this.iframeVisible,Ce(this.iframeElementRef),function(){return _this355.iframeVisible=!0},et((r=this.src)==null?void 0:r.toString()),K$1("Cloud File Browser")),function(){return _this355.showOverlay=!1})}}]);return Wo}(le);Wo.styles=me;il([Ge({context:Le,subscribe:!0}),K()],Wo.prototype,"weavyContext",2);il([K()],Wo.prototype,"src",2);il([K()],Wo.prototype,"iframeVisible",2);il([K()],Wo.prototype,"showOverlay",2);Wo=il([de("wy-cloud-files"),q()],Wo);var DC=Object.defineProperty,FC=Object.getOwnPropertyDescriptor,Ki=function Ki(r,o,s,B){for(var Q=B>1?void 0:B?FC(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&DC(o,s,Q),Q};var li=function(_le53){_inherits(li,_le53);function li(){var _this356;_classCallCheck(this,li);_this356=_callSuper(this,li,arguments),_this356.availableFeatures=[],_this356.features={},_this356.order={by:"name",descending:!1},_this356.view="list",_this356.showTrashed=!1,_this356.showUploadSheet=!1,_this356.mutatingFiles=new jm(_assertThisInitialized(_this356)),_this356.fileInputRef=Re(),_this356.cloudFilesRef=Re(),_this356.openFileInput=function(){var r;(r=_this356.fileInputRef.value)==null||r.click()},_this356.openCloudFiles=function(){var r;(r=_this356.cloudFilesRef.value)==null||r.open()};return _this356}_createClass(li,[{key:"handleRemoveMutation",value:function handleRemoveMutation(r){this.weavyContext&&Bm(this.weavyContext.queryClient,["apps",this.app.id,"files"],function(o){return o.state.submittedAt===r.submittedAt})}},{key:"handleOverwriteUpload",value:function handleOverwriteUpload(r){var o;var s=(o=r.variables)==null?void 0:o.blob;s&&this.dispatchCreateFiles([s],!0)}},{key:"dispatchUploadFiles",value:function dispatchUploadFiles(r,o){var s=new CustomEvent("upload-files",{detail:{files:r,input:o}});return this.dispatchEvent(s)}},{key:"dispatchExternalBlobs",value:function dispatchExternalBlobs(r){var o=new CustomEvent("external-blobs",{detail:{externalBlobs:r}});return this.dispatchEvent(o)}},{key:"dispatchCreateFiles",value:function dispatchCreateFiles(r){var o=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1;var s=new CustomEvent("create-files",{detail:{blobs:r,replace:o}});return this.dispatchEvent(s)}},{key:"dispatchOrder",value:function dispatchOrder(r){var o=new CustomEvent("order",{detail:{order:r}});return this.dispatchEvent(o)}},{key:"dispatchView",value:function dispatchView(r){var o=new CustomEvent("view",{detail:{view:r}});return this.dispatchEvent(o)}},{key:"dispatchShowTrashed",value:function dispatchShowTrashed(r){var o=new CustomEvent("show-trashed",{detail:{showTrashed:r}});return this.dispatchEvent(o)}},{key:"dispatchSubscribe",value:function dispatchSubscribe(r){var o=new CustomEvent("subscribe",{detail:{subscribe:r}});return this.dispatchEvent(o)}},{key:"willUpdate",value:function willUpdate(r){(r.has("weavyContext")||r.has("app"))&&this.weavyContext&&this.app&&this.mutatingFiles.trackMutationState({filters:{mutationKey:["apps",this.app.id],exact:!1}},this.weavyContext.queryClient)}},{key:"renderFileMutation",value:function renderFileMutation(r){var _this357=this;var o,s,B;if((o=r.context)!=null&&o.file){var Q=r.context.file,Y=_objectSpread({},r.context.status);return r.context.status.state==="conflict"&&(Y.text=K$1("Replace existing file?")),v(_templateObject306||(_templateObject306=_taggedTemplateLiteral(["\n <wy-file-item\n .availableFeatures=","\n .features=","\n .file=","\n .status=","\n .actionType=","\n title=\"",": ","\"\n >\n <span slot=\"title\">","</span>\n ","\n ","\n <wy-button\n slot=\"actions\"\n kind=\"icon\"\n @click=","\n title=","\n >\n <wy-icon name=\"close\"></wy-icon>\n </wy-button>\n </wy-file-item>\n "])),this.availableFeatures,this.features,(s=r.context)==null?void 0:s.file,Y,r.context.type,Sf(r.context.type),Q.name,Q.name,Y.text?v(_templateObject307||(_templateObject307=_taggedTemplateLiteral([": <span slot=\"actions\" title=","><em>","</em></span>"])),Y.text,Y.text):O,Y.state==="conflict"&&(B=r.variables)!=null&&B.blob?v(_templateObject308||(_templateObject308=_taggedTemplateLiteral(["\n <wy-button\n slot=\"actions\"\n kind=\"icon\"\n @click=","\n title=","\n >\n <wy-icon name=\"check\"></wy-icon>\n </wy-button>\n "])),function(){return _this357.handleOverwriteUpload(r)},K$1("Replace")):O,function(){return _this357.handleRemoveMutation(r)},K$1("Discard",{desc:"Button action to discard"}))}return O}},{key:"render",value:function render(){var _this358=this;var r,o,s,B,Q,Y,J;var it=this.mutatingFiles.result,nt=bk(it),ot=it!=null&&it.length?it.filter(function(Ot){var Qt;return((Qt=Ot.context)==null?void 0:Qt.file)&&!nt.includes(Ot)}):[],dt=vk(it),Mt=gk(it);return v(_templateObject309||(_templateObject309=_taggedTemplateLiteral(["\n <nav class=\"wy-toolbar\">\n <div class=\"wy-toolbar-buttons\">\n ","\n \n </div>\n <div class=\"wy-toolbar-buttons wy-toolbar-buttons-last\">\n ","\n\n <wy-dropdown icon=\"sort\" title=\"Sort items by\" directionX=\"left\">\n <wy-dropdown-option\n ?selected=","\n @click=","\n >\n ","\n </wy-dropdown-option>\n <wy-dropdown-option\n ?selected=","\n @click=","\n >\n ","\n </wy-dropdown-option>\n <wy-dropdown-option\n ?selected=","\n @click=","\n >\n ","\n </wy-dropdown-option>\n <wy-dropdown-divider></wy-dropdown-divider>\n <wy-dropdown-option\n ?selected=","\n @click=","\n >\n ","\n </wy-dropdown-option>\n <wy-dropdown-option\n ?selected=","\n @click=","\n >\n ","\n </wy-dropdown-option>\n </wy-dropdown>\n\n <wy-dropdown\n icon=","\n title=\"View options\"\n directionX=\"left\"\n >\n <wy-dropdown-option ?selected="," @click=",">\n ","\n </wy-dropdown-option>\n <wy-dropdown-option ?selected="," @click=",">\n ","\n </wy-dropdown-option>\n <wy-dropdown-divider></wy-dropdown-divider>\n <wy-dropdown-option ?selected="," @click=",">\n ","\n </wy-dropdown-option>\n <wy-dropdown-option ?selected="," @click=",">\n ","\n </wy-dropdown-option>\n </wy-dropdown>\n\n <wy-dropdown directionX=\"left\" ?disabled=",">\n ","\n ","\n </wy-dropdown>\n </div>\n </nav>\n\n ","\n\n <wy-cloud-files\n ","\n @external-blobs=","\n ></wy-cloud-files>\n "])),kd(Fi.Write,((r=this.app)==null?void 0:r.access)||Fi.None,(o=this.app)==null?void 0:o.permissions)?v(_templateObject310||(_templateObject310=_taggedTemplateLiteral(["\n <wy-dropdown title=",">\n <span slot=\"button\">","</span>\n <wy-icon slot=\"button\" name=\"plus\" last></wy-icon>\n <wy-dropdown-item @click=",">\n <wy-icon name=\"attachment\"></wy-icon>\n <span>","</span>\n </wy-dropdown-item>\n <input\n type=\"file\"\n ","\n @click=","\n @change=","\n multiple\n hidden\n tabindex=\"-1\"\n />\n ","\n ","\n </wy-dropdown>\n "])),K$1("Add files"),K$1("Add files"),this.openFileInput,K$1("From device"),Ce(this.fileInputRef),function(Ot){return Ot.stopPropagation()},function(Ot){return _this358.dispatchUploadFiles(Ot.target.files,Ot.target)},Pe(this.availableFeatures,Ee.CloudFiles,(s=this.features)==null?void 0:s.cloudFiles)?v(_templateObject311||(_templateObject311=_taggedTemplateLiteral(["\n <wy-dropdown-item @click=",">\n <wy-icon name=\"cloud\"></wy-icon>\n <span>","</span>\n </wy-dropdown-item>\n "])),this.openCloudFiles,K$1("From cloud")):O,Pe(this.availableFeatures,Ee.Confluence,(B=this.features)==null?void 0:B.confluence)&&(Q=this.weavyContext)!=null&&Q.confluenceAuthenticationUrl?v(_templateObject312||(_templateObject312=_taggedTemplateLiteral(["<wy-confluence dropdown @external-blobs=","></wy-confluence>"])),function(Ot){return _this358.dispatchExternalBlobs(Ot.detail.externalBlobs)}):O):O,it!=null&&it.length?v(_templateObject313||(_templateObject313=_taggedTemplateLiteral(["\n <wy-button\n kind=\"icon\"\n @click=","\n title=","\n >\n ","\n </wy-button>\n "])),function(){_this358.showUploadSheet=!_this358.showUploadSheet},K$1(Mt==="conflict"?"File conflict":Mt==="error"?"Upload error":Mt==="pending"?"Pending":"All uploads finished"),Mt==="conflict"?v(_templateObject314||(_templateObject314=_taggedTemplateLiteral(["<wy-icon name=\"alert\" color=\"yellow\" title=","></wy-icon>"])),K$1("File conflict")):Mt==="error"?v(_templateObject315||(_templateObject315=_taggedTemplateLiteral(["<wy-icon name=\"alert-octagon\" color=\"error\" title=","></wy-icon>"])),K$1("Upload error")):Mt==="pending"?v(_templateObject316||(_templateObject316=_taggedTemplateLiteral(["<wy-spinner\n ?nospin=","\n progress=","\n title=","\n ></wy-spinner>"])),dt!==void 0,et(dt.percent!==null?dt.percent:void 0),K$1("Pending")):v(_templateObject317||(_templateObject317=_taggedTemplateLiteral(["<wy-icon name=\"check\" title=","></wy-icon>"])),K$1("All uploads finished"))):O,this.order.by==="name",function(){return _this358.dispatchOrder(_objectSpread(_objectSpread({},_this358.order),{},{by:"name"}))},K$1("Name"),this.order.by==="modified_at",function(){return _this358.dispatchOrder(_objectSpread(_objectSpread({},_this358.order),{},{by:"modified_at"}))},K$1("Modified"),this.order.by==="size",function(){return _this358.dispatchOrder(_objectSpread(_objectSpread({},_this358.order),{},{by:"size"}))},K$1("Size"),!this.order.descending,function(){return _this358.dispatchOrder(_objectSpread(_objectSpread({},_this358.order),{},{descending:!1}))},K$1("Ascending"),this.order.descending,function(){return _this358.dispatchOrder(_objectSpread(_objectSpread({},_this358.order),{},{descending:!0}))},K$1("Descending"),this.view==="grid"?"view-module-outline":"view-list-outline",this.view==="list",function(){return _this358.dispatchView("list")},K$1("List view"),this.view==="grid",function(){return _this358.dispatchView("grid")},K$1("Grid view"),!this.showTrashed,function(){return _this358.dispatchShowTrashed(!1)},K$1("Hide trashed"),this.showTrashed,function(){return _this358.dispatchShowTrashed(!0)},K$1("Show trashed"),!this.app,(Y=this.app)!=null&&Y.is_subscribed?v(_templateObject318||(_templateObject318=_taggedTemplateLiteral(["<wy-dropdown-item @click=",">\n <wy-icon name=\"bell-off\"></wy-icon>\n ","\n </wy-dropdown-item>"])),function(){return _this358.dispatchSubscribe(!1)},K$1("Unsubscribe")):v(_templateObject319||(_templateObject319=_taggedTemplateLiteral(["<wy-dropdown-item @click=",">\n <wy-icon name=\"bell\"></wy-icon>\n ","\n </wy-dropdown-item>"])),function(){return _this358.dispatchSubscribe(!0)},K$1("Subscribe")),(J=this.app)!=null&&J.archive_url?v(_templateObject320||(_templateObject320=_taggedTemplateLiteral(["<wy-dropdown-item\n @click=","\n >\n <wy-icon name=\"download\"></wy-icon>\n ","\n </wy-dropdown-item>"])),function(){var Ot,Qt;return Fs((Ot=_this358.app)==null?void 0:Ot.archive_url,"_top","".concat((Qt=_this358.app)==null?void 0:Qt.uid,".zip"),!0)},K$1("Download files")):O,an(this.showUploadSheet&&!!(it!=null&&it.length),v(_templateObject321||(_templateObject321=_taggedTemplateLiteral(["\n <wy-sheet\n .show=","\n @release-focus=","\n >\n <wy-button\n kind=\"icon\"\n slot=\"appbar-buttons\"\n @click=","\n title=","\n >\n <wy-icon name=\"trashcan\"></wy-icon>\n </wy-button>\n <span slot=\"appbar-text\">","</span>\n ","\n ","\n </wy-sheet>\n "])),this.showUploadSheet,function(){return _this358.dispatchEvent(new CustomEvent("release-focus",{bubbles:!0,composed:!0}))},function(){it==null||it.forEach(function(Ot){return _this358.handleRemoveMutation(Ot)})},K$1("Remove all",{desc:"Button action to remove all"}),K$1("File actions"),nt.length?v(_templateObject322||(_templateObject322=_taggedTemplateLiteral(["\n ","\n ","\n "])),Lr(nt,function(Ot){return"mutation"+Ot.submittedAt},function(Ot){return _this358.renderFileMutation(Ot)}),ot.length?v(_templateObject323||(_templateObject323=_taggedTemplateLiteral(["<hr />"]))):O):O,ot.length?v(_templateObject324||(_templateObject324=_taggedTemplateLiteral(["\n ","\n "])),Lr(ot,function(Ot){return"mutation"+Ot.submittedAt},function(Ot){return _this358.renderFileMutation(Ot)})):O),function(){return _this358.showUploadSheet=!1}),Ce(this.cloudFilesRef),function(Ot){return _this358.dispatchExternalBlobs(Ot.detail.externalBlobs)})}}]);return li}(le);li.styles=[me];Ki([Ge({context:Le,subscribe:!0}),K()],li.prototype,"weavyContext",2);Ki([m({type:Object})],li.prototype,"app",2);Ki([m({type:Object})],li.prototype,"user",2);Ki([m({type:Array})],li.prototype,"availableFeatures",2);Ki([m({type:Object})],li.prototype,"features",2);Ki([m({type:Object})],li.prototype,"order",2);Ki([m()],li.prototype,"view",2);Ki([m({type:Boolean})],li.prototype,"showTrashed",2);Ki([K()],li.prototype,"showUploadSheet",2);li=Ki([de("wy-files-appbar"),q()],li);function zC(r,_ref256,s){var _this359=this;var o=_ref256.file;var B=o.size&&o.size>0?pd(o.size):O,Q=o.modified_at||o.created_at,Y=new Intl.DateTimeFormat(r==null?void 0:r.locale,{dateStyle:"full",timeStyle:"short"}).format(new Date(Q)),J=!!(s&&s===o.id);var _Zn6=Zn(o.name),it=_Zn6.icon;var nt=Li(o.name),ot=ls(o.provider);ot&&(it="".concat(it,"+").concat(ot));var dt=function dt(Ot){Ot.stopImmediatePropagation();var Qt=Ot.target;Qt.value&&Qt.value!==o.name?_this359.dispatchRename(o,Qt.value):_this359.dispatchEditName({id:NaN})},Mt=function Mt(Ot){var Qt=Ot.target;Ot.key==="Escape"?(Ot.preventDefault(),Qt.value=o.name,Qt.blur()):Ot.key==="Enter"&&(Ot.preventDefault(),Qt.blur())};return v(_templateObject325||(_templateObject325=_taggedTemplateLiteral(["\n <div\n class=\"wy-card ","\"\n title=\""," \u2022 "," \u2022 ","\"\n tabindex=\"0\"\n @click=","\n @keydown=","\n @keyup=","\n >\n <div class=\"wy-card-actions\">\n <wy-file-menu\n .file=","\n .availableFeatures=","\n .features=","\n @edit-name=","\n @trash=","\n @restore=","\n @delete-forever=","\n @subscribe=","\n ></wy-file-menu>\n </div>\n ","\n <div class=\"wy-card-label wy-card-content wy-filename\">\n ","\n </div>\n </div>\n "])),Qe({"wy-card-trashed":o.is_trashed,"wy-card-hover":!o.is_trashed&&!J}),o.name,B,Y,function(Ot){!Ot.defaultPrevented&&!o.is_trashed&&_this359.dispatchFileOpen(o)},Bn,Hn,o,this.availableFeatures,this.features,function(Ot){return _this359.dispatchEditName(Ot.detail.file)},function(Ot){return _this359.dispatchTrash(Ot.detail.file)},function(Ot){return _this359.dispatchRestore(Ot.detail.file)},function(Ot){return _this359.dispatchDeleteForever(Ot.detail.file)},function(Ot){return _this359.dispatchSubscribe(Ot.detail.file,Ot.detail.subscribe)},!o.is_trashed&&o.thumbnail_url?v(_templateObject326||(_templateObject326=_taggedTemplateLiteral(["\n <img\n class=\"wy-card-top wy-card-content ","\"\n src=","\n alt=","\n loading=\"lazy\"\n />\n "])),Qe({"wy-card-top-image":o.kind==="image"}),o.thumbnail_url,o.name):v(_templateObject327||(_templateObject327=_taggedTemplateLiteral(["\n <div class=\"wy-content-icon wy-card-top wy-card-content\">\n <wy-icon name="," size=\"96\" kind="," ext=","></wy-icon>\n </div>\n "])),it,o.kind,nt),J?v(_templateObject328||(_templateObject328=_taggedTemplateLiteral(["\n <input\n type=\"text\"\n maxlength=\"256\"\n class=\"wy-input\"\n .defaultValue=","\n @blur=","\n @keyup=","\n @click=","\n @focus=","\n ","\n />\n "])),o.name,dt,function(Ot){gd(Ot),Mt(Ot)},function(Ot){return Ot.preventDefault()},Yu,Ce(Bu)):v(_templateObject329||(_templateObject329=_taggedTemplateLiteral([" <span title=",">","</span> "])),o.name,o.name))}function NC(r,o,s,B){var _this360=this;return o&&o.length?v(_templateObject330||(_templateObject330=_taggedTemplateLiteral(["\n <table class=\"wy-table wy-table-hover wy-table-files\">\n <thead class=\"wy-files-thead\">","</thead>\n <tbody class=\"wy-files-tbody\">\n ","\n </tbody>\n </table>\n "])),VC.call(this,s),Lr(o,function(Q){return Q.id},function(Q){return BC.call(_this360,r,{file:Q},B)})):O}function VC(r){var _this361=this;var o=[{by:"name",title:K$1("Name")},{by:"modified_at",title:K$1("Modified")},{by:void 0,title:K$1("Kind")},{by:"size",title:K$1("Size")}];return v(_templateObject331||(_templateObject331=_taggedTemplateLiteral(["\n <tr>\n <th class=\"wy-table-cell-icon\"></th>\n ","\n <th class=\"wy-table-cell-icon\"></th>\n </tr>\n "])),o.map(function(s){var B=s.by===(r==null?void 0:r.by),Q=function Q(Y){Y.preventDefault(),s.by&&_this361.dispatchOrder({by:s.by,descending:B&&!(r!=null&&r.descending)})};return v(_templateObject332||(_templateObject332=_taggedTemplateLiteral([" <th>\n ","\n </th>"])),s.by?v(_templateObject333||(_templateObject333=_taggedTemplateLiteral(["<div\n class=\"wy-table-sort-link\"\n tabindex=\"0\"\n @click=","\n @keydown=","\n @keyup=","\n >","\n ","</div\n >"])),Q,Bn,Hn,s.title,B&&v(_templateObject334||(_templateObject334=_taggedTemplateLiteral(["<wy-icon name=","></wy-icon>"])),r!=null&&r.descending?"menu-down":"menu-up")||O):s.title)}))}function BC(r,_ref257,s){var _this362=this;var o=_ref257.file;var B=o.size&&o.size>0?pd(o.size):O,Q=o.modified_at||o.created_at,Y=new Intl.DateTimeFormat(r==null?void 0:r.locale,{dateStyle:"full",timeStyle:"short"}).format(new Date(Q)),J=new Intl.DateTimeFormat(r==null?void 0:r.locale,{dateStyle:"short"}).format(new Date(Q)),it=!!(s&&s===o.id);var _Zn7=Zn(o.name),nt=_Zn7.icon;var ot=Li(o.name),dt=ls(o.provider);dt&&(nt="".concat(nt,"+").concat(dt));var Mt=function Mt(Qt){Qt.stopImmediatePropagation();var Ut=Qt.target;Ut.value&&Ut.value!==o.name?_this362.dispatchRename(o,Ut.value):_this362.dispatchEditName({id:NaN})},Ot=function Ot(Qt){var Ut=Qt.target;Qt.key==="Escape"?(Qt.preventDefault(),Ut.value=o.name,Ut.blur()):Qt.key==="Enter"&&(Qt.preventDefault(),Ut.blur())};return v(_templateObject335||(_templateObject335=_taggedTemplateLiteral(["\n <tr\n class=","\n @click=","\n >\n <td class=\"wy-table-cell-icon\"><wy-icon name="," size=\"24\" kind="," ext=","></wy-icon></td>\n <td class=\"wy-files-td-filename\">\n ","\n </td>\n <td class=\"wy-files-td-modified\"\n ><time datetime=\"","\" title=",">","</time></td\n >\n <td class=\"wy-files-td-kind\"><span>","</span></td>\n <td class=\"wy-files-td-size\"><span>","</span></td>\n <td class=\"wy-table-cell-icon\">\n <wy-file-menu\n .file=","\n .availableFeatures=","\n .features=","\n @edit-name=","\n @trash=","\n @restore=","\n @delete-forever=","\n @subscribe=","\n >\n </wy-file-menu>\n </td>\n </tr>\n "])),et(o.is_trashed?"wy-table-trashed":void 0),function(Qt){!Qt.defaultPrevented&&!o.is_trashed&&_this362.dispatchFileOpen(o)},nt,o.kind,ot,it?v(_templateObject336||(_templateObject336=_taggedTemplateLiteral(["\n <input\n type=\"text\"\n maxlength=\"256\"\n class=\"wy-input\"\n .defaultValue=","\n @blur=","\n @keyup=","\n @click=","\n @focus=","\n ","\n />\n "])),o.name,Mt,function(Qt){gd(Qt),Ot(Qt)},function(Qt){return Qt.preventDefault()},Yu,Ce(Bu)):v(_templateObject337||(_templateObject337=_taggedTemplateLiteral([" <span>","</span> "])),o.name),Q,Y,J,o.kind,B,o,this.availableFeatures,this.features,function(Qt){return _this362.dispatchEditName(Qt.detail.file)},function(Qt){return _this362.dispatchTrash(Qt.detail.file)},function(Qt){return _this362.dispatchRestore(Qt.detail.file)},function(Qt){return _this362.dispatchDeleteForever(Qt.detail.file)},function(Qt){return _this362.dispatchSubscribe(Qt.detail.file,Qt.detail.subscribe)})}var HC=Object.defineProperty,jC=Object.getOwnPropertyDescriptor,pn=function pn(r,o,s,B){for(var Q=B>1?void 0:B?jC(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&HC(o,s,Q),Q};var Si=function(_le54){_inherits(Si,_le54);function Si(){var _this363;_classCallCheck(this,Si);_this363=_callSuper(this,Si),_this363.order={by:"name",descending:!1},_this363.view="list",_this363.isRenamingId=NaN,_this363.features={},_this363.availableFeatures=[],_this363.addEventListener("edit-name",function(r){_this363.isRenamingId=r.detail.file.id}),_this363.addEventListener("rename",function(){_this363.isRenamingId=NaN});return _this363}_createClass(Si,[{key:"dispatchFileOpen",value:function dispatchFileOpen(r){var o=new CustomEvent("file-open",{detail:{file:r}});return this.dispatchEvent(o)}},{key:"dispatchOrder",value:function dispatchOrder(r){var o=new CustomEvent("order",{detail:{order:r}});return this.dispatchEvent(o)}},{key:"dispatchEditName",value:function dispatchEditName(r){var o=new CustomEvent("edit-name",{detail:{file:r}});return this.dispatchEvent(o)}},{key:"dispatchRename",value:function dispatchRename(r,o){var s=new CustomEvent("rename",{detail:{file:r,name:o}});return this.dispatchEvent(s)}},{key:"dispatchTrash",value:function dispatchTrash(r){var o=new CustomEvent("trash",{detail:{file:r}});return this.dispatchEvent(o)}},{key:"dispatchRestore",value:function dispatchRestore(r){var o=new CustomEvent("restore",{detail:{file:r}});return this.dispatchEvent(o)}},{key:"dispatchDeleteForever",value:function dispatchDeleteForever(r){var o=new CustomEvent("delete-forever",{detail:{file:r}});return this.dispatchEvent(o)}},{key:"dispatchSubscribe",value:function dispatchSubscribe(r,o){var s=new CustomEvent("subscribe",{detail:{file:r,subscribe:o}});return this.dispatchEvent(s)}},{key:"render",value:function render(){var _this364=this;return this.files&&this.files.length?this.view==="grid"?v(_templateObject338||(_templateObject338=_taggedTemplateLiteral(["\n <div class=\"wy-grid wy-pane-group\">\n ","\n </div>\n "])),Lr(this.files,function(r){return r.id},function(r){return zC.call(_this364,_this364.weavyContext,{file:r},_this364.isRenamingId)})):NC.call(this,this.weavyContext,this.files,this.order,this.isRenamingId):O}}]);return Si}(le);Si.styles=me;pn([Ge({context:Le,subscribe:!0}),K()],Si.prototype,"weavyContext",2);pn([m({attribute:!1})],Si.prototype,"files",2);pn([m({type:Number})],Si.prototype,"dataUpdatedAt",2);pn([m({attribute:!1})],Si.prototype,"order",2);pn([m()],Si.prototype,"view",2);pn([m({type:Number})],Si.prototype,"isRenamingId",2);pn([m({type:Object})],Si.prototype,"features",2);pn([K()],Si.prototype,"availableFeatures",2);Si=pn([de("wy-files-list"),q()],Si);function UC(r,o){var s=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var B=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};if(!r)throw new Error("useFileList must be used within a WeavyContext");return _objectSpread(_objectSpread({},B),{},{queryKey:["apps",o,"files",s],initialPageParam:0,queryFn:function(){var _queryFn8=_asyncToGenerator(_regeneratorRuntime().mark(function _callee219(Q){var Y,J,it,nt;return _regeneratorRuntime().wrap(function _callee219$(_context221){while(1)switch(_context221.prev=_context221.next){case 0:Y=Q.pageParam,J=!!(s!=null&&s.trashed),it=s.order?s.order.by+(s.order.descending?"+desc":""):"";nt="/api/apps/"+o+"/files?skip="+Y+"&top=25&orderby="+it;J&&(nt+="&trashed=null");_context221.next=5;return r.get(nt);case 5:_context221.next=7;return _context221.sent.json();case 7:return _context221.abrupt("return",_context221.sent);case 8:case"end":return _context221.stop()}},_callee219)}));function queryFn(_x190){return _queryFn8.apply(this,arguments)}return queryFn}(),getNextPageParam:function getNextPageParam(Q,Y){return Q!=null&&Q.end&&(Q==null?void 0:Q.end)<(Q==null?void 0:Q.count)?Y.length*25:null}})}function WC(r,o){var s=r.queryClient,B={mutationKey:["apps",o.id,"files"],mutationFn:function(){var _mutationFn25=_asyncToGenerator(_regeneratorRuntime().mark(function _callee220(_ref258){var Q,Y,J,it;return _regeneratorRuntime().wrap(function _callee220$(_context222){while(1)switch(_context222.prev=_context222.next){case 0:Q=_ref258.file,Y=_ref258.name;if(!(Q.id>=1)){_context222.next=13;break}_context222.next=4;return r.post("/api/files/"+Q.id,"PATCH",JSON.stringify({name:Y}));case 4:J=_context222.sent;if(J.ok){_context222.next=10;break}_context222.next=8;return J.json();case 8:it=_context222.sent;throw new Error(it.detail||it.title,{cause:it});case 10:return _context222.abrupt("return",J.json());case 13:throw new Error("Could not rename ".concat(Q.name));case 14:case"end":return _context222.stop()}},_callee220)}));function mutationFn(_x191){return _mutationFn25.apply(this,arguments)}return mutationFn}(),onMutate:function onMutate(Q){return je(s,{queryKey:B.mutationKey,exact:!1},Q.file.id,function(Y){return Object.assign(Y,{name:Q.name})}),{type:"rename",file:Q.file,status:{state:"pending"}}},onSuccess:function onSuccess(Q,Y){je(s,{queryKey:B.mutationKey,exact:!1},Y.file.id,function(J){return Object.assign(J,Q)}),St(s,B.mutationKey,Y,function(J){J.status.state="ok"})},onError:function onError(Q,Y){je(s,{queryKey:B.mutationKey,exact:!1},Y.file.id,function(J){return Object.assign(J,{name:Y.file.name})}),St(s,B.mutationKey,Y,function(J){J.status.state="error",J.status.text=Q.message})}};return B}function qC(r,o){return new Ye(r.queryClient,WC(r,o))}function QC(r,o){var s=r.queryClient,B={mutationKey:["apps",o.id,"files"],mutationFn:function(){var _mutationFn26=_asyncToGenerator(_regeneratorRuntime().mark(function _callee221(_ref259){var Q;return _regeneratorRuntime().wrap(function _callee221$(_context223){while(1)switch(_context223.prev=_context223.next){case 0:Q=_ref259.file;if(!(Q.id>=1)){_context223.next=5;break}_context223.next=4;return r.post("/api/files/"+Q.id+"/trash","POST","");case 4:return _context223.abrupt("return",_context223.sent.json());case 5:throw new Error("Could not trash ".concat(Q.name,"."));case 6:case"end":return _context223.stop()}},_callee221)}));function mutationFn(_x192){return _mutationFn26.apply(this,arguments)}return mutationFn}(),onMutate:function(){var _onMutate19=_asyncToGenerator(_regeneratorRuntime().mark(function _callee222(Q){return _regeneratorRuntime().wrap(function _callee222$(_context224){while(1)switch(_context224.prev=_context224.next){case 0:return _context224.abrupt("return",(je(s,{queryKey:B.mutationKey,exact:!1},Q.file.id,function(Y){return Object.assign(Y,{is_trashed:!0})}),{type:"trash",file:Q.file,status:{state:"pending"}}));case 1:case"end":return _context224.stop()}},_callee222)}));function onMutate(_x193){return _onMutate19.apply(this,arguments)}return onMutate}(),onSuccess:function onSuccess(Q,Y){je(s,{queryKey:B.mutationKey,exact:!1},Y.file.id,function(J){return Object.assign(J,Q)}),St(s,B.mutationKey,Y,function(J){J.status.state="ok"})},onError:function onError(Q,Y){je(s,{queryKey:B.mutationKey,exact:!1},Y.file.id,function(J){return Object.assign(J,{is_trashed:!1})}),St(s,B.mutationKey,Y,function(J){J.status.state="error",J.status.text=Q.message})}};return B}function KC(r,o){return new Ye(r.queryClient,QC(r,o))}function ZC(r,o){var s=r.queryClient,B={mutationKey:["apps",o.id,"files"],mutationFn:function(){var _mutationFn27=_asyncToGenerator(_regeneratorRuntime().mark(function _callee223(_ref260){var Q,Y,J,_Y6;return _regeneratorRuntime().wrap(function _callee223$(_context225){while(1)switch(_context225.prev=_context225.next){case 0:Q=_ref260.file;if(!(Q.id>=1)){_context225.next=13;break}_context225.next=4;return r.post("/api/files/"+Q.id+"/restore","POST","");case 4:Y=_context225.sent;if(Y.ok){_context225.next=10;break}_context225.next=8;return Y.json();case 8:J=_context225.sent;throw new Error(J.detail||J.title,{cause:J});case 10:return _context225.abrupt("return",Y.json());case 13:_Y6={status:400,title:"Could not restore ".concat(Q.name,".")};throw new Error(_Y6.detail||_Y6.title,{cause:_Y6});case 15:case"end":return _context225.stop()}},_callee223)}));function mutationFn(_x194){return _mutationFn27.apply(this,arguments)}return mutationFn}(),onMutate:function(){var _onMutate20=_asyncToGenerator(_regeneratorRuntime().mark(function _callee224(Q){return _regeneratorRuntime().wrap(function _callee224$(_context226){while(1)switch(_context226.prev=_context226.next){case 0:return _context226.abrupt("return",(je(s,{queryKey:B.mutationKey,exact:!1},Q.file.id,function(Y){return Object.assign(Y,{status:"pending"})}),{type:"restore",file:Q.file,status:{state:"pending"}}));case 1:case"end":return _context226.stop()}},_callee224)}));function onMutate(_x195){return _onMutate20.apply(this,arguments)}return onMutate}(),onSuccess:function onSuccess(Q,Y){je(s,{queryKey:B.mutationKey,exact:!1},Y.file.id,function(J){return Object.assign(J,Q,{is_trashed:!1,status:"ok"})}),St(s,B.mutationKey,Y,function(J){J.status.state="ok"})},onError:function onError(Q,Y){je(s,{queryKey:B.mutationKey,exact:!1},Y.file.id,function(J){return Object.assign(J,{is_trashed:!0})}),St(s,B.mutationKey,Y,function(J){J.status.state="error",J.status.text=Q.message})}};return B}function GC(r,o){return new Ye(r.queryClient,ZC(r,o))}function YC(r,o){var s=r.queryClient,B={mutationKey:["apps",o.id,"files"],mutationFn:function(){var _mutationFn28=_asyncToGenerator(_regeneratorRuntime().mark(function _callee225(_ref261){var Q,Y,J,_Y7;return _regeneratorRuntime().wrap(function _callee225$(_context227){while(1)switch(_context227.prev=_context227.next){case 0:Q=_ref261.file;if(!(Q.id>=1&&Q.is_trashed)){_context227.next=12;break}_context227.next=4;return r.post("/api/files/"+Q.id,"DELETE","");case 4:Y=_context227.sent;if(Y.ok){_context227.next=10;break}_context227.next=8;return Y.json();case 8:J=_context227.sent;throw new Error(J.detail||J.title,{cause:J});case 10:_context227.next=14;break;case 12:_Y7={status:400,title:"Could not delete ".concat(Q.name," forever.")};throw new Error(_Y7.detail||_Y7.title,{cause:_Y7});case 14:case"end":return _context227.stop()}},_callee225)}));function mutationFn(_x196){return _mutationFn28.apply(this,arguments)}return mutationFn}(),onMutate:function(){var _onMutate21=_asyncToGenerator(_regeneratorRuntime().mark(function _callee226(Q){return _regeneratorRuntime().wrap(function _callee226$(_context228){while(1)switch(_context228.prev=_context228.next){case 0:return _context228.abrupt("return",(je(s,{queryKey:B.mutationKey,exact:!1},Q.file.id,function(Y){return Object.assign(Y,{status:"pending"})}),{type:"delete-forever",file:Q.file,status:{state:"pending"}}));case 1:case"end":return _context228.stop()}},_callee226)}));function onMutate(_x197){return _onMutate21.apply(this,arguments)}return onMutate}(),onSuccess:function onSuccess(Q,Y){A1(s,{queryKey:B.mutationKey,exact:!1},Y.file.id),St(s,B.mutationKey,Y,function(J){J.status.state="ok"})},onError:function onError(Q,Y){je(s,{queryKey:B.mutationKey,exact:!1},Y.file.id,function(J){return Object.assign(J,{status:void 0})}),St(s,B.mutationKey,Y,function(J){J.status.state="error",J.status.text=Q.message})}};return B}function XC(r,o){return new Ye(r.queryClient,YC(r,o))}function JC(r,o){var s=r.queryClient,B=["apps",o.id,"files"];return{mutationKey:B,mutationFn:function(){var _mutationFn29=_asyncToGenerator(_regeneratorRuntime().mark(function _callee227(_ref262){var Q,Y,J,it;return _regeneratorRuntime().wrap(function _callee227$(_context229){while(1)switch(_context229.prev=_context229.next){case 0:Q=_ref262.file,Y=_ref262.subscribe;if(!(Q.id>=1)){_context229.next=13;break}_context229.next=4;return r.post("/api/files/".concat(Q.id,"/").concat(Y?"subscribe":"unsubscribe"),"POST","");case 4:J=_context229.sent;if(J.ok){_context229.next=10;break}_context229.next=8;return J.json();case 8:it=_context229.sent;throw new Error(it.detail||it.title,{cause:it});case 10:return _context229.abrupt("return",J.json());case 13:throw new Error("Could not ".concat(Y?"subscribe":"unsubscribe"," to ").concat(Q.name,"."));case 14:case"end":return _context229.stop()}},_callee227)}));function mutationFn(_x198){return _mutationFn29.apply(this,arguments)}return mutationFn}(),onMutate:function(){var _onMutate22=_asyncToGenerator(_regeneratorRuntime().mark(function _callee228(Q){return _regeneratorRuntime().wrap(function _callee228$(_context230){while(1)switch(_context230.prev=_context230.next){case 0:return _context230.abrupt("return",(je(s,{queryKey:B,exact:!1},Q.file.id,function(Y){return Object.assign(Y,{is_subscribed:Q.subscribe,status:"pending"})}),{type:Q.subscribe?"subscribe":"unsubscribe",file:Q.file,status:{state:"pending"}}));case 1:case"end":return _context230.stop()}},_callee228)}));function onMutate(_x199){return _onMutate22.apply(this,arguments)}return onMutate}(),onSuccess:function onSuccess(Q,Y){je(s,{queryKey:B,exact:!1},Y.file.id,function(J){return Object.assign(J,Q,{status:"ok"})}),St(s,B,Y,function(J){J.status.state="ok"})},onError:function onError(Q,Y){je(s,{queryKey:B,exact:!1},Y.file.id,function(J){return Object.assign(J,{is_subscribed:Y.file.is_subscribed,status:"error"})}),St(s,B,Y,function(J){J.status.state="error",J.status.text=Q.message})}}}function e5(r,o){return new Ye(r.queryClient,JC(r,o))}var t5=Object.defineProperty,r5=Object.getOwnPropertyDescriptor,Zi=function Zi(r,o,s,B){for(var Q=B>1?void 0:B?r5(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&t5(o,s,Q),Q};var _Ur=function(_le55){_inherits(Ur,_le55);function Ur(){var _this365;_classCallCheck(this,Ur);_this365=_callSuper(this,Ur),_this365.features={},_this365.view="list",_this365.order={by:"name",descending:!1},_this365.showTrashed=!1,_this365.availableFeatures=[],_this365.realtimeFileCreatedEvent=function(r){return new CustomEvent("wy:file_created",{bubbles:!0,composed:!1,detail:r})},_this365.realtimeFileUpdatedEvent=function(r){return new CustomEvent("wy:file_updated",{bubbles:!0,composed:!1,detail:r})},_this365.realtimeFileTrashedEvent=function(r){return new CustomEvent("wy:file_trashed",{bubbles:!0,composed:!1,detail:r})},_this365.realtimeFileRestoredEvent=function(r){return new CustomEvent("wy:file_restored",{bubbles:!0,composed:!1,detail:r})},_this365.realtimeFileDeletedEvent=function(r){return new CustomEvent("wy:file_deleted",{bubbles:!0,composed:!1,detail:r})},_this365.appQuery=new kt(_assertThisInitialized(_this365)),_this365.userQuery=new kt(_assertThisInitialized(_this365)),_this365.featuresQuery=new kt(_assertThisInitialized(_this365)),_this365.filesQuery=new as(_assertThisInitialized(_this365)),_this365.persistState=new cy(_assertThisInitialized(_this365)),_this365.infiniteScroll=new ss(_assertThisInitialized(_this365)),_this365.pagerRef=Re(),_this365.previewRef=Re(),_this365.dropZone=new Wm(_assertThisInitialized(_this365)),_this365.appSubscribeMutation=new tn(_assertThisInitialized(_this365)),_this365.uploadBlobMutation=new tn(_assertThisInitialized(_this365)),_this365.createFileMutation=new tn(_assertThisInitialized(_this365)),_this365.handleRealtimeFileCreated=function(r){_this365.weavyContext&&(r.file.created_by=r.actor,_this365.weavyContext.queryClient.invalidateQueries({queryKey:_this365.getFilesQueryKey()}),_this365.dispatchEvent(_this365.realtimeFileCreatedEvent(r)))},_this365.handleRealtimeFileUpdated=function(r){!_this365.weavyContext||!_this365.app||(_this365.weavyContext.queryClient.invalidateQueries({queryKey:_this365.getFilesQueryKey()}),_this365.dispatchEvent(_this365.realtimeFileUpdatedEvent(r)))},_this365.handleRealtimeFileTrashed=function(r){!_this365.weavyContext||!_this365.app||(_this365.weavyContext.queryClient.invalidateQueries({queryKey:_this365.getFilesQueryKey()}),_this365.dispatchEvent(_this365.realtimeFileTrashedEvent(r)))},_this365.handleRealtimeFileRestored=function(r){!_this365.weavyContext||!_this365.app||(_this365.weavyContext.queryClient.invalidateQueries({queryKey:_this365.getFilesQueryKey()}),_this365.dispatchEvent(_this365.realtimeFileRestoredEvent(r)))},_this365.handleRealtimeFileDeleted=function(r){!_this365.weavyContext||!_this365.app||(_this365.weavyContext.queryClient.invalidateQueries({queryKey:_this365.getFilesQueryKey()}),_this365.dispatchEvent(_this365.realtimeFileDeletedEvent(r)))},_this365.addEventListener("drop-files",_this365.handleBlobUpload),new rl(_assertThisInitialized(_this365),_Ur.styles);return _this365}_createClass(Ur,[{key:"handleBlobUpload",value:function handleBlobUpload(r){var _this366=this;var o=r.detail;if(o.files){for(var s=0;s<o.files.length;s++){var B={file:o.files[s]};this.uploadBlobMutation.mutate(B).then(function(Q){return _this366.handleCreateFile(Q)})}o.input&&(o.input.value="")}}},{key:"handleExternalBlobs",value:function handleExternalBlobs(r){var _this367=this;var o;if(r.detail.externalBlobs)for(var s=0;s<r.detail.externalBlobs.length;s++){var B=r.detail.externalBlobs[s];(o=this.externalBlobMutation)==null||o.mutate({externalBlob:B}).then(function(Q){return _this367.handleCreateFile(Q)})}}},{key:"handleCreateFile",value:function(){var _handleCreateFile=_asyncToGenerator(_regeneratorRuntime().mark(function _callee229(r,o){return _regeneratorRuntime().wrap(function _callee229$(_context231){while(1)switch(_context231.prev=_context231.next){case 0:_context231.next=2;return this.createFileMutation.mutate({blob:r,replace:o});case 2:return _context231.abrupt("return",_context231.sent);case 3:case"end":return _context231.stop()}},_callee229,this)}));function handleCreateFile(_x200,_x201){return _handleCreateFile.apply(this,arguments)}return handleCreateFile}()},{key:"handleSubscribe",value:function handleSubscribe(r){var o;(o=this.app)!=null&&o.id&&this.appSubscribeMutation.mutate({subscribe:r})}},{key:"getFilesQueryKey",value:function getFilesQueryKey(){return["apps",this.app.id,"files"]}},{key:"unsubscribeToRealtime",value:function unsubscribeToRealtime(r){this.weavyContext&&(this.weavyContext.unsubscribe("a".concat(r.id),"file_created",this.handleRealtimeFileCreated),this.weavyContext.unsubscribe("a".concat(r.id),"file_updated",this.handleRealtimeFileUpdated),this.weavyContext.unsubscribe("a".concat(r.id),"file_trashed",this.handleRealtimeFileTrashed),this.weavyContext.unsubscribe("a".concat(r.id),"file_restored",this.handleRealtimeFileRestored),this.weavyContext.unsubscribe("a".concat(r.id),"file_deleted",this.handleRealtimeFileDeleted))}},{key:"scheduleUpdate",value:function(){var _scheduleUpdate3=_asyncToGenerator(_regeneratorRuntime().mark(function _callee230(){var r,o,s;return _regeneratorRuntime().wrap(function _callee230$(_context232){while(1)switch(_context232.prev=_context232.next){case 0:_context232.next=2;return yn(this);case 2:this.weavyContextConsumer=new $i(this,{context:Le,subscribe:!0});(r=this.weavyContextConsumer)!=null&&r.value&&this.weavyContext!==((o=this.weavyContextConsumer)==null?void 0:o.value)&&(this.weavyContext=(s=this.weavyContextConsumer)==null?void 0:s.value);_context232.next=6;return _get(_getPrototypeOf(Ur.prototype),"scheduleUpdate",this).call(this);case 6:case"end":return _context232.stop()}},_callee230,this)}));function scheduleUpdate(){return _scheduleUpdate3.apply(this,arguments)}return scheduleUpdate}()},{key:"willUpdate",value:function willUpdate(r){var o,s,B,Q,Y,J;if(r.has("app")){var it=r.get("app");it&&it!==this.app&&this.unsubscribeToRealtime(it)}(r.has("uid")||r.has("weavyContext"))&&this.uid&&this.weavyContext&&(this.appQuery.trackQuery(Cd(this.weavyContext,this.uid,Qc.Files)),this.userQuery.trackQuery(tr(this.weavyContext,["user"])),this.featuresQuery.trackQuery(tr(this.weavyContext,["features","files"])),this.persistState.observe(["view","order","showTrashed"],this.uid)),(o=this.appQuery.result)!=null&&o.isPending||(this.app=(s=this.appQuery.result)==null?void 0:s.data),(B=this.userQuery.result)!=null&&B.isPending||(this.user=(Q=this.userQuery.result)==null?void 0:Q.data),(Y=this.featuresQuery.result)!=null&&Y.isPending||(this.availableFeatures=(J=this.featuresQuery.result)==null?void 0:J.data),(r.has("weavyContext")||r.has("app")||r.has("order")||r.has("showTrashed"))&&this.weavyContext&&this.app&&this.filesQuery.trackInfiniteQuery(UC(this.weavyContext,this.app.id,{order:this.order,trashed:this.showTrashed})),(r.has("weavyContext")||r.has("app")||r.has("user"))&&this.weavyContext&&this.app&&this.user&&(this.appSubscribeMutation.trackMutation(EC(this.weavyContext,this.app)),this.uploadBlobMutation.trackMutation(Hm(this.weavyContext,this.user,this.app)),this.createFileMutation.trackMutation(xk(this.weavyContext,this.user,this.app)),this.externalBlobMutation=Um(this.weavyContext,this.user,this.app),this.renameFileMutation=qC(this.weavyContext,this.app),this.subscribeFileMutation=e5(this.weavyContext,this.app),this.trashFileMutation=KC(this.weavyContext,this.app),this.restoreFileMutation=GC(this.weavyContext,this.app),this.deleteForeverFileMutation=XC(this.weavyContext,this.app),this.weavyContext.subscribe("a".concat(this.app.id),"file_created",this.handleRealtimeFileCreated),this.weavyContext.subscribe("a".concat(this.app.id),"file_updated",this.handleRealtimeFileUpdated),this.weavyContext.subscribe("a".concat(this.app.id),"file_trashed",this.handleRealtimeFileTrashed),this.weavyContext.subscribe("a".concat(this.app.id),"file_restored",this.handleRealtimeFileRestored),this.weavyContext.subscribe("a".concat(this.app.id),"file_deleted",this.handleRealtimeFileDeleted))}},{key:"updated",value:function updated(){this.infiniteScroll.observe(this.filesQuery.result,this.pagerRef.value)}},{key:"render",value:function render(){var _ref265,_this$filesQuery$resu,_this368=this;var r;var _ref263=(_ref265=(r=this.weavyContext)==null?void 0:r.network)!==null&&_ref265!==void 0?_ref265:{isPending:!0},o=_ref263.isPending,_ref264=(_this$filesQuery$resu=this.filesQuery.result)!==null&&_this$filesQuery$resu!==void 0?_this$filesQuery$resu:{isPending:o},s=_ref264.data,B=_ref264.isPending,Q=_ref264.dataUpdatedAt,Y=this.dropZone.isDragActive,J=((s==null?void 0:s.pages.flatMap(function(it){return it.data}))||[]).filter(function(it){return it});return v(_templateObject339||(_templateObject339=_taggedTemplateLiteral(["\n <wy-files-appbar\n .app=","\n .user=","\n .availableFeatures=","\n .features=","\n .order=","\n .showTrashed=","\n .view=","\n @upload-files=","\n @external-blobs=","\n @create-files=","\n @order=","\n @show-trashed=","\n @view=","\n @subscribe=","\n >\n </wy-files-appbar>\n\n <div\n class=\"wy-files ","\"\n data-drag-title=","\n title=","\n >\n ","\n <div "," class=\"wy-pager\"></div>\n </div>\n ","\n "])),this.app,this.user,this.availableFeatures,this.features,this.order,this.showTrashed,this.view,this.handleBlobUpload,this.handleExternalBlobs,function(it){return it.detail.blobs.forEach(function(nt){return _this368.handleCreateFile(nt,it.detail.replace)})},function(it){_this368.order=it.detail.order},function(it){_this368.showTrashed=it.detail.showTrashed},function(it){_this368.view=it.detail.view},function(it){return _this368.handleSubscribe(it.detail.subscribe)},Qe({"wy-dragging":Y}),K$1("Drop files here to upload."),K$1("Drop files here to upload."),B?v(_templateObject340||(_templateObject340=_taggedTemplateLiteral(["<wy-empty><wy-spinner overlay></wy-spinner></wy-empty>"]))):J.length?v(_templateObject341||(_templateObject341=_taggedTemplateLiteral(["\n <wy-files-list\n .view=","\n .files=","\n .dataUpdatedAt=","\n .order=","\n .availableFeatures=","\n .features=","\n @file-open=","\n @order=","\n @rename=","\n @subscribe=","\n @trash=","\n @restore=","\n @delete-forever=","\n >\n </wy-files-list>\n "])),this.view,J,Q,this.order,this.availableFeatures,this.features,function(it){var nt;(nt=_this368.previewRef.value)==null||nt.open(it.detail.file)},function(it){_this368.order=it.detail.order},function(it){var nt;(nt=_this368.renameFileMutation)==null||nt.mutate({file:it.detail.file,name:it.detail.name})},function(it){var nt;(nt=_this368.subscribeFileMutation)==null||nt.mutate({file:it.detail.file,subscribe:it.detail.subscribe})},function(it){var nt;(nt=_this368.trashFileMutation)==null||nt.mutate({file:it.detail.file})},function(it){var nt;(nt=_this368.restoreFileMutation)==null||nt.mutate({file:it.detail.file})},function(it){var nt;(nt=_this368.deleteForeverFileMutation)==null||nt.mutate({file:it.detail.file})}):v(_templateObject342||(_templateObject342=_taggedTemplateLiteral(["\n <wy-empty>\n <div class=\"wy-content-icon\">\n <div class=\"wy-content-icon\">\n <wy-icon name=\"file-upload\"></wy-icon>\n </div>\n <div class=\"wy-content-name\">\n <span>","</span>\n </div>\n </div>\n </wy-empty>\n "])),K$1("Add some files to get started!")),Ce(this.pagerRef),B?O:v(_templateObject343||(_templateObject343=_taggedTemplateLiteral(["\n <wy-preview\n ","\n .app=","\n .user=","\n .infiniteQueryResult=","\n .availableFeatures=","\n .features=","\n ></wy-preview>\n "])),Ce(this.previewRef),this.app,this.user,this.filesQuery.result,this.availableFeatures,this.features))}},{key:"disconnectedCallback",value:function disconnectedCallback(){this.weavyContext&&this.app&&this.unsubscribeToRealtime(this.app),_get(_getPrototypeOf(Ur.prototype),"disconnectedCallback",this).call(this)}}]);return Ur}(le);_Ur.styles=[ns,me,Be(_templateObject344||(_templateObject344=_taggedTemplateLiteral(["\n :host {\n min-height: 100%;\n display: flex;\n flex-direction: column;\n width: 100%;\n }\n "])))];Zi([K()],_Ur.prototype,"weavyContext",2);Zi([m()],_Ur.prototype,"uid",2);Zi([m({type:Object})],_Ur.prototype,"features",2);Zi([m()],_Ur.prototype,"view",2);Zi([m({type:Object})],_Ur.prototype,"order",2);Zi([m({type:Boolean})],_Ur.prototype,"showTrashed",2);Zi([K()],_Ur.prototype,"app",2);Zi([K()],_Ur.prototype,"user",2);Zi([K()],_Ur.prototype,"availableFeatures",2);_Ur=Zi([de("wy-files"),q()],_Ur);var i5=function(){function i5(o){var _this369=this;_classCallCheck(this,i5);this.observers=[],this.conditions={},this.resizer=new ResizeObserver(function(s){var B=!1;var _iterator208=_createForOfIteratorHelper(s),_step208;try{for(_iterator208.s();!(_step208=_iterator208.n()).done;){var Q=_step208.value;B=_this369.checkConditions(Q)||B}}catch(err){_iterator208.e(err)}finally{_iterator208.f()}B&&_this369.host.requestUpdate()}),o.addController(this),this.host=o}_createClass(i5,[{key:"checkConditions",value:function checkConditions(o){var _this370=this;var s=!1;return this.observers.forEach(function(B){if(o.target===B.target){var Q=_this370.conditions[B.name],Y=B.condition(o);Q!==Y&&(_this370.conditions[B.name]=Y,s=!0)}}),s}},{key:"observe",value:function observe(o){var s=o.target,B=s.getBoundingClientRect();this.observers.push(o),this.resizer.observe(s),this.checkConditions({contentBoxSize:[{inlineSize:s.clientWidth,blockSize:s.clientHeight}],borderBoxSize:[{inlineSize:B.width,blockSize:B.height}],devicePixelContentBoxSize:[{inlineSize:B.width*window.devicePixelRatio,blockSize:B.height*window.devicePixelRatio}],contentRect:B,target:s})}},{key:"hostDisconnected",value:function hostDisconnected(){this.conditions={},this.observers.length=0,this.resizer.disconnect()}}]);return i5}();function n5(r){var o=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var s=arguments.length>2?arguments[2]:undefined;return _objectSpread(_objectSpread({},o),{},{initialPageParam:0,queryKey:["conversations"],queryFn:function(){var _queryFn9=_asyncToGenerator(_regeneratorRuntime().mark(function _callee231(B){var Q,Y,J,it;return _regeneratorRuntime().wrap(function _callee231$(_context233){while(1)switch(_context233.prev=_context233.next){case 0:Q=(s==null?void 0:s())||"";Y=B.pageParam;J="/api/conversations?contextual=false&q=".concat(Q,"&skip=").concat(Y,"&top=25");_context233.next=5;return r.get(J);case 5:_context233.next=7;return _context233.sent.json();case 7:it=_context233.sent;return _context233.abrupt("return",(it.data=it.data||[],it));case 9:case"end":return _context233.stop()}},_callee231)}));function queryFn(_x202){return _queryFn9.apply(this,arguments)}return queryFn}(),getNextPageParam:function getNextPageParam(B,Q){if((B==null?void 0:B.end)<(B==null?void 0:B.count))return Q.length*25}})}function o5(r){return{mutationFn:function(){var _mutationFn30=_asyncToGenerator(_regeneratorRuntime().mark(function _callee232(_ref266){var o;return _regeneratorRuntime().wrap(function _callee232$(_context234){while(1)switch(_context234.prev=_context234.next){case 0:o=_ref266.members;_context234.next=3;return r.post("/api/conversations","POST",JSON.stringify({members:o}));case 3:_context234.next=5;return _context234.sent.json();case 5:return _context234.abrupt("return",_context234.sent);case 6:case"end":return _context234.stop()}},_callee232)}));function mutationFn(_x203){return _mutationFn30.apply(this,arguments)}return mutationFn}(),onMutate:function(){var _onMutate23=_asyncToGenerator(_regeneratorRuntime().mark(function _callee233(o){return _regeneratorRuntime().wrap(function _callee233$(_context235){while(1)switch(_context235.prev=_context235.next){case 0:return _context235.abrupt("return",{});case 1:case"end":return _context235.stop()}},_callee233)}));function onMutate(_x204){return _onMutate23.apply(this,arguments)}return onMutate}()}}function a5(r){return new Ye(r.queryClient,o5(r))}var s5=Object.defineProperty,c5=Object.getOwnPropertyDescriptor,qr=function qr(r,o,s,B){for(var Q=B>1?void 0:B?c5(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&s5(o,s,Q),Q};var br=function(_le56){_inherits(br,_le56);function br(){var _this371;_classCallCheck(this,br);_this371=_callSuper(this,br,arguments),_this371.unread=!1,_this371.avatarUrl="",_this371.displayName="",_this371.room=!1,_this371.selected=!1,_this371.starred=!1,_this371.pinned=!1,_this371.handleMessageCreated=function(r){var o;r.message.app_id===_this371.conversationId&&r.actor.id!==_this371.user.id&&((o=_this371.deliveredConversationMutation)==null||o.mutate({id:_this371.conversationId})),_this371.dispatchRefetch()},_this371.handleConversationUpdated=function(){_this371.dispatchRefetch()},_this371.handleConversationMarked=function(r){r.actor.id===_this371.user.id&&_this371.dispatchRefetch()};return _this371}_createClass(br,[{key:"dispatchRefetch",value:function dispatchRefetch(){var r=new CustomEvent("refetch",{});return this.dispatchEvent(r)}},{key:"dispatchSelected",value:function dispatchSelected(r,o){r.preventDefault();var s=new CustomEvent("selected",{detail:{id:o}});return this.dispatchEvent(s)}},{key:"handleStar",value:function handleStar(r,o){r.preventDefault(),r.stopPropagation();var s=new CustomEvent("star",{detail:{id:this.conversationId,star:o}});return this.dispatchEvent(s)}},{key:"handlePin",value:function handlePin(r,o){r.preventDefault(),r.stopPropagation();var s=new CustomEvent("pin",{detail:{id:this.conversationId,pin:o}});return this.dispatchEvent(s)}},{key:"dispatchMarked",value:function dispatchMarked(r){var o;var s=new CustomEvent("mark",{detail:{id:this.conversationId,markAsRead:r,messageId:(o=this.lastMessage)==null?void 0:o.id}});return this.dispatchEvent(s)}},{key:"handleLeaveConversation",value:function handleLeaveConversation(){var r=new CustomEvent("leave",{detail:{id:this.conversationId}});return this.dispatchEvent(r)}},{key:"willUpdate",value:function willUpdate(r){var o;r.has("weavyContext")&&this.weavyContext&&(this.deliveredConversationMutation=gC(this.weavyContext),this.weavyContext.subscribe("a".concat(this.conversationId),"app_updated",this.handleConversationUpdated),this.weavyContext.subscribe("a".concat(this.conversationId),"member_added",this.handleConversationUpdated),this.weavyContext.subscribe("a".concat(this.conversationId),"message_created",this.handleMessageCreated),this.weavyContext.subscribe("a".concat(this.conversationId),"conversation_marked",this.handleConversationMarked),this.unread&&((o=this.deliveredConversationMutation)==null||o.mutate({id:this.conversationId})))}},{key:"render",value:function render(){var _this372=this;var r,o,s,B,Q,Y,J,it,nt,ot,dt,Mt,Ot;var Qt=(r=this.lastMessage)!=null&&r.created_at?new Intl.DateTimeFormat((o=this.weavyContext)==null?void 0:o.locale,{dateStyle:"full",timeStyle:"short"}).format(new Date(this.lastMessage.created_at)):"",Ut=(s=this.lastMessage)!=null&&s.created_at?Yc((B=this.weavyContext)==null?void 0:B.locale,new Date(this.lastMessage.created_at)):"",te=this.room?null:(Y=(((Q=this.members)==null?void 0:Q.data)||[]).filter(function(qt){return qt.id!==_this372.user.id}))==null?void 0:Y[0];return v(_templateObject345||(_templateObject345=_taggedTemplateLiteral(["\n <div\n class=","\n tabindex=\"0\"\n @click=","\n @keydown=","\n @keyup=","\n >\n ","\n\n <div class=\"wy-item-body\">\n <div class=\"wy-item-row\">\n <div class=\"wy-item-title\">","</div>\n ","\n </div>\n <div class=\"wy-item-row\">\n <div class=\"wy-item-text\">\n <wy-typing appId="," userId=",">\n ","\n ","\n ","\n ","\n ","\n </wy-typing>\n </div>\n </div>\n </div>\n\n <div class=\"wy-item-actions wy-item-actions-bottom\">\n ","\n ","\n\n <wy-dropdown>\n <wy-dropdown-item @click=",">\n <wy-icon name=","></wy-icon>\n ","\n </wy-dropdown-item>\n <wy-dropdown-item @click=",">\n <wy-icon name=","></wy-icon>\n ","\n </wy-dropdown-item>\n <wy-dropdown-item @click=",">\n <wy-icon name=","></wy-icon>\n ","\n </wy-dropdown-item>\n ","\n </wy-dropdown>\n </div>\n </div>\n "])),Qe({"wy-item wy-item-lg wy-item-hover wy-conversation":!0,"wy-unread":this.unread,"wy-active":this.selected}),function(qt){return _this372.dispatchSelected(qt,_this372.conversationId)},Bn,Hn,this.room&&this.user?v(_templateObject346||(_templateObject346=_taggedTemplateLiteral(["\n <wy-avatar-group\n .members=","\n .user=","\n .name=","\n .size=","\n ></wy-avatar-group>\n "])),this.members,this.user,this.displayName,48):v(_templateObject347||(_templateObject347=_taggedTemplateLiteral(["\n <wy-avatar\n src=","\n name=","\n size=","\n presence=","\n id=","\n ></wy-avatar>\n "])),et(te==null?void 0:te.avatar_url),this.displayName,48,(te==null?void 0:te.presence)||"away",et(te==null?void 0:te.id)),this.displayName,this.lastMessage?v(_templateObject348||(_templateObject348=_taggedTemplateLiteral(["<time class=\"wy-meta\" datetime="," title=","\n >","</time\n >"])),this.lastMessage.created_at.toString(),Qt,Ut):O,this.conversationId,this.user.id,this.lastMessage?v(_templateObject349||(_templateObject349=_taggedTemplateLiteral(["\n ","\n ","\n "])),this.user.id===this.lastMessage.created_by.id?v(_templateObject350||(_templateObject350=_taggedTemplateLiteral(["",": "])),K$1("You")):O,this.members.count>2&&this.user.id!==((J=this.lastMessage)==null?void 0:J.created_by.id)?v(_templateObject351||(_templateObject351=_taggedTemplateLiteral(["",": "])),(it=this.lastMessage)==null?void 0:it.created_by.display_name):O):O,(nt=this.lastMessage)!=null&&nt.text?v(_templateObject352||(_templateObject352=_taggedTemplateLiteral(["<span>","</span>"])),this.lastMessage.plain):O,!((ot=this.lastMessage)!=null&&ot.text)&&(((dt=this.lastMessage)==null?void 0:dt.attachment_count)||0)>0?v(_templateObject353||(_templateObject353=_taggedTemplateLiteral(["<wy-icon kind=\"text-icon\" name=\"attachment\"></wy-icon>"]))):O,!((Mt=this.lastMessage)!=null&&Mt.text)&&(Ot=this.lastMessage)!=null&&Ot.meeting_id?v(_templateObject354||(_templateObject354=_taggedTemplateLiteral(["<wy-icon kind=\"text-icon\" name=\"zoom\"></wy-icon>"]))):O,this.lastMessage?O:v(_templateObject355||(_templateObject355=_taggedTemplateLiteral(["&nbsp;"]))),this.starred?v(_templateObject356||(_templateObject356=_taggedTemplateLiteral(["<wy-button kind=\"icon\" @click=",">\n <wy-icon name=\"star\" size="," color=\"yellow\"></wy-icon>\n </wy-button>"])),function(qt){return _this372.handleStar(qt,!1)},24):O,this.pinned?v(_templateObject357||(_templateObject357=_taggedTemplateLiteral(["<wy-button kind=\"icon\" @click=","\n ><wy-icon name=\"pin\" size="," color=\"\"></wy-icon\n ></wy-button>"])),function(qt){return _this372.handlePin(qt,!1)},24):O,function(){return _this372.dispatchMarked(_this372.unread)},this.unread?"unread":"read",this.unread?K$1("Mark as read"):K$1("Mark as unread"),function(qt){return _this372.handlePin(qt,!_this372.pinned)},this.pinned?"unpin":"pin",this.pinned?K$1("Unpin"):K$1("Pin"),function(qt){return _this372.handleStar(qt,!_this372.starred)},this.starred?"unstar":"star",this.starred?K$1("Unstar"):K$1("Star"),this.room?v(_templateObject358||(_templateObject358=_taggedTemplateLiteral(["<wy-dropdown-item @click=",">\n <wy-icon name=\"account-minus\"></wy-icon>\n ","\n </wy-dropdown-item>"])),function(){return _this372.handleLeaveConversation()},K$1("Leave conversation")):O)}}]);return br}(le);br.styles=me;qr([Ge({context:Le,subscribe:!0}),K()],br.prototype,"weavyContext",2);qr([m({attribute:!0,type:Number})],br.prototype,"conversationId",2);qr([m({attribute:!0,type:Boolean})],br.prototype,"unread",2);qr([m({attribute:!0})],br.prototype,"avatarUrl",2);qr([m({attribute:!0})],br.prototype,"displayName",2);qr([m({attribute:!0,type:Boolean,reflect:!0})],br.prototype,"room",2);qr([m({attribute:!0,type:Boolean,reflect:!0})],br.prototype,"selected",2);qr([m({attribute:!0,type:Boolean,reflect:!0})],br.prototype,"starred",2);qr([m({attribute:!0,type:Boolean,reflect:!0})],br.prototype,"pinned",2);qr([m({attribute:!1})],br.prototype,"members",2);qr([m({attribute:!1})],br.prototype,"lastMessage",2);qr([m({attribute:!1})],br.prototype,"user",2);br=qr([de("wy-conversation-list-item"),q()],br);var l5=Object.defineProperty,d5=Object.getOwnPropertyDescriptor,uy=function uy(r,o,s,B){for(var Q=B>1?void 0:B?d5(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&l5(o,s,Q),Q};var hc=function(_le57){_inherits(hc,_le57);function hc(){var _this373;_classCallCheck(this,hc);_this373=_callSuper(this,hc,arguments),_this373.show=!1;return _this373}_createClass(hc,[{key:"open",value:function open(){this.show=!0}},{key:"close",value:function close(){this.show=!1}},{key:"submit",value:function(){var _submit2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee234(r){var o,s,B,Q;return _regeneratorRuntime().wrap(function _callee234$(_context236){while(1)switch(_context236.prev=_context236.next){case 0:_context236.next=2;return(o=this.addConversationMutation)==null?void 0:o.mutate({members:r.map(function(Y){return Y.id})});case 2:s=_context236.sent;this.close();B=new CustomEvent("refetch",{});this.dispatchEvent(B);Q=new CustomEvent("selected",{detail:{id:s==null?void 0:s.id}});return _context236.abrupt("return",this.dispatchEvent(Q));case 8:case"end":return _context236.stop()}},_callee234,this)}));function submit(_x205){return _submit2.apply(this,arguments)}return submit}()},{key:"updated",value:function updated(r){r.has("weavyContext")&&this.weavyContext&&(this.addConversationMutation=a5(this.weavyContext))}},{key:"render",value:function render(){var _this374=this;return v(_templateObject359||(_templateObject359=_taggedTemplateLiteral(["\n <wy-button kind=\"icon\" @click=","><wy-icon name=\"plus\"></wy-icon></wy-button>\n\n ","\n "])),this.open,an(this.show,v(_templateObject360||(_templateObject360=_taggedTemplateLiteral(["<wy-overlay\n @release-focus=",">\n <header class=\"wy-appbars\">\n <nav class=\"wy-appbar\">\n <wy-button kind=\"icon\" @click=",">\n <wy-icon name=\"close\"></wy-icon>\n </wy-button>\n <div class=\"wy-appbar-text\">","</div>\n </nav>\n </header>\n\n <wy-users-search @submit=","></wy-users-search>\n </wy-overlay>"])),function(){return _this374.dispatchEvent(new CustomEvent("release-focus",{bubbles:!0,composed:!0}))},function(){return _this374.close()},K$1("New conversation"),function(r){return _this374.submit(r.detail.members)}),function(){return _this374.show=!1}))}}]);return hc}(le);hc.styles=[me,Be(_templateObject361||(_templateObject361=_taggedTemplateLiteral(["\n :host {\n display: contents;\n }\n "])))];uy([Ge({context:Le,subscribe:!0}),K()],hc.prototype,"weavyContext",2);uy([K()],hc.prototype,"show",2);hc=uy([de("wy-conversation-new"),q()],hc);var h5=Object.defineProperty,u5=Object.getOwnPropertyDescriptor,ps=function ps(r,o,s,B){for(var Q=B>1?void 0:B?u5(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&h5(o,s,Q),Q};var Wn=function(_le58){_inherits(Wn,_le58);function Wn(){var _this375;_classCallCheck(this,Wn);_this375=_callSuper(this,Wn,arguments),_this375._chatRoomId="edb400ac-839b-45a7-b2a8-6a01820d1c44",_this375.searchText="",_this375.inputRef=Re(),_this375.conversationsQuery=new as(_assertThisInitialized(_this375)),_this375.userQuery=new kt(_assertThisInitialized(_this375)),_this375.infiniteScroll=new ss(_assertThisInitialized(_this375)),_this375.pagerRef=Re(),_this375.handleRefresh=function(){_this375.conversationsQuery.result.refetch()},_this375.handlePresenceChange=function(r){_this375.weavyContext&&(Array.isArray(r)||(r=[r]),tt(_this375.weavyContext.queryClient,["conversations"],function(){return!0},function(o){var s=o.members.data;s.forEach(function(B){B.presence=r.indexOf(B.id)!=-1?"active":"away"}),o.members.data=s}))},_this375.throttledSearch=Yl(_asyncToGenerator(_regeneratorRuntime().mark(function _callee235(){var r;return _regeneratorRuntime().wrap(function _callee235$(_context237){while(1)switch(_context237.prev=_context237.next){case 0:_this375.searchText=((r=_this375.inputRef.value)==null?void 0:r.value)||"";case 1:case"end":return _context237.stop()}},_callee235)})),250,{leading:!1,trailing:!0});return _this375}_createClass(Wn,[{key:"dispatchSelected",value:function dispatchSelected(r){this.conversationId=r;var o=new CustomEvent("conversation-selected",{detail:{id:r}});return this.dispatchEvent(o)}},{key:"handleMark",value:function(){var _handleMark=_asyncToGenerator(_regeneratorRuntime().mark(function _callee236(r,o,s){var B,Q;return _regeneratorRuntime().wrap(function _callee236$(_context238){while(1)switch(_context238.prev=_context238.next){case 0:Q=o?s:null;_context238.next=3;return(B=this.markConversationMutation)==null?void 0:B.mutate({id:r,markAsRead:o,messageId:Q});case 3:this.conversationsQuery.result.refetch();case 4:case"end":return _context238.stop()}},_callee236,this)}));function handleMark(_x206,_x207,_x208){return _handleMark.apply(this,arguments)}return handleMark}()},{key:"handleStar",value:function(){var _handleStar=_asyncToGenerator(_regeneratorRuntime().mark(function _callee237(r,o){var s;return _regeneratorRuntime().wrap(function _callee237$(_context239){while(1)switch(_context239.prev=_context239.next){case 0:_context239.next=2;return(s=this.starConversationMutation)==null?void 0:s.mutate({id:r,star:o});case 2:this.conversationsQuery.result.refetch();case 3:case"end":return _context239.stop()}},_callee237,this)}));function handleStar(_x209,_x210){return _handleStar.apply(this,arguments)}return handleStar}()},{key:"handlePin",value:function(){var _handlePin=_asyncToGenerator(_regeneratorRuntime().mark(function _callee238(r,o){var s;return _regeneratorRuntime().wrap(function _callee238$(_context240){while(1)switch(_context240.prev=_context240.next){case 0:_context240.next=2;return(s=this.pinConversationMutation)==null?void 0:s.mutate({id:r,pin:o});case 2:this.conversationsQuery.result.refetch();case 3:case"end":return _context240.stop()}},_callee238,this)}));function handlePin(_x211,_x212){return _handlePin.apply(this,arguments)}return handlePin}()},{key:"handleLeaveConversation",value:function(){var _handleLeaveConversation=_asyncToGenerator(_regeneratorRuntime().mark(function _callee239(r){var o;return _regeneratorRuntime().wrap(function _callee239$(_context241){while(1)switch(_context241.prev=_context241.next){case 0:_context241.next=2;return(o=this.leaveConversationMutation)==null?void 0:o.mutate({id:r,members:[this.user.id]});case 2:this.dispatchSelected(void 0);this.conversationsQuery.result.refetch();case 4:case"end":return _context241.stop()}},_callee239,this)}));function handleLeaveConversation(_x213){return _handleLeaveConversation.apply(this,arguments)}return handleLeaveConversation}()},{key:"clear",value:function(){var _clear2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee240(){return _regeneratorRuntime().wrap(function _callee240$(_context242){while(1)switch(_context242.prev=_context242.next){case 0:this.searchText="";case 1:case"end":return _context242.stop()}},_callee240,this)}));function clear(){return _clear2.apply(this,arguments)}return clear}()},{key:"willUpdate",value:function(){var _willUpdate4=_asyncToGenerator(_regeneratorRuntime().mark(function _callee241(r){var _this376=this;var o,s;return _regeneratorRuntime().wrap(function _callee241$(_context243){while(1)switch(_context243.prev=_context243.next){case 0:r.has("weavyContext")&&this.weavyContext&&(this.userQuery.trackQuery(tr(this.weavyContext,["user"])),this.conversationsQuery.trackInfiniteQuery(n5(this.weavyContext,{},function(){return _this376.searchText})),this.markConversationMutation=qm(this.weavyContext),this.starConversationMutation=bC(this.weavyContext),this.pinConversationMutation=_C(this.weavyContext),this.leaveConversationMutation=Qm(this.weavyContext),this.weavyContext.subscribe(null,"app_created",this.handleRefresh),this.weavyContext.subscribe(null,"member_added",this.handleRefresh),this.weavyContext.subscribe(null,"online",this.handlePresenceChange)),(o=this.userQuery.result)!=null&&o.isPending||(this.user=(s=this.userQuery.result)==null?void 0:s.data);case 1:case"end":return _context243.stop()}},_callee241,this)}));function willUpdate(_x214){return _willUpdate4.apply(this,arguments)}return willUpdate}()},{key:"update",value:function update(r){_get(_getPrototypeOf(Wn.prototype),"update",this).call(this,r),this.infiniteScroll.observe(this.conversationsQuery.result,this.pagerRef.value)}},{key:"updated",value:function(){var _updated4=_asyncToGenerator(_regeneratorRuntime().mark(function _callee242(r){return _regeneratorRuntime().wrap(function _callee242$(_context244){while(1)switch(_context244.prev=_context244.next){case 0:_context244.t0=r.has("searchText")&&this.conversationsQuery.result;if(!_context244.t0){_context244.next=4;break}_context244.next=4;return this.conversationsQuery.result.refetch();case 4:case"end":return _context244.stop()}},_callee242,this)}));function updated(_x215){return _updated4.apply(this,arguments)}return updated}()},{key:"renderConversations",value:function renderConversations(r,o){var _this377=this;if(o){var s=o.pages.flatMap(function(B){return B.data});return Lr(s,function(B){return B.id},function(B){return[v(_templateObject362||(_templateObject362=_taggedTemplateLiteral(["<wy-conversation-list-item\n .conversationId=","\n .user=","\n .avatarUrl=","\n .displayName=","\n .lastMessage=","\n .members=","\n .unread=","\n .starred=","\n .pinned=","\n .room=","\n .selected=","\n @selected=","\n @mark=","\n @star=","\n @pin=","\n @leave=","\n @refetch=","\n ></wy-conversation-list-item>"])),B.id,_this377.user,B.avatar_url,B.display_name,B.last_message,B.members,B.is_unread,B.is_starred,B.is_pinned,B.type===_this377._chatRoomId,_this377.conversationId==B.id,function(Q){return _this377.dispatchSelected(Q.detail.id)},function(Q){return _this377.handleMark(Q.detail.id,Q.detail.markAsRead,Q.detail.messageId)},function(Q){return _this377.handleStar(Q.detail.id,Q.detail.star)},function(Q){return _this377.handlePin(Q.detail.id,Q.detail.pin)},function(Q){return _this377.handleLeaveConversation(Q.detail.id)},function(){return _this377.conversationsQuery.result.refetch()})]})}return O}},{key:"render",value:function render(){var _this$conversationsQu,_this$name,_this378=this;var r,o,s;var _ref268=(_this$conversationsQu=this.conversationsQuery.result)!==null&&_this$conversationsQu!==void 0?_this$conversationsQu:{},B=_ref268.data,Q=_ref268.isPending;return v(_templateObject363||(_templateObject363=_taggedTemplateLiteral(["\n ","\n "])),this.user?v(_templateObject364||(_templateObject364=_taggedTemplateLiteral(["\n <header class=\"wy-appbars\">\n <nav class=\"wy-appbar\">\n <wy-avatar\n .src=","\n .name=","\n .size=","\n .presence=","\n ></wy-avatar>\n <div class=\"wy-appbar-text\">","</div>\n <wy-conversation-new\n @refetch=","\n @selected=","\n ></wy-conversation-new>\n </nav>\n </header>\n <div class=\"wy-pane-body\">\n <div class=\"wy-search-form \">\n <div class=\"wy-pane-group\">\n <div class=\"wy-input-group\">\n <input\n class=\"wy-search-input wy-input wy-input-group-input wy-input-filled\"\n name=\"text\"\n .value=","\n ","\n @input=","\n @keyup=","\n placeholder=","\n />\n <wy-button\n type=\"reset\"\n @click=","\n kind=\"icon\"\n class=\"wy-input-group-button-icon\"\n buttonClass=\"wy-button-icon\"\n >\n <wy-icon name=\"close-circle\"></wy-icon>\n </wy-button>\n <wy-button kind=\"icon\" class=\"wy-input-group-button-icon\" buttonClass=\"wy-button-icon\">\n <wy-icon name=\"magnify\"></wy-icon>\n </wy-button>\n </div>\n </div>\n </div>\n </div>\n <div class=\"wy-conversations\">\n ","\n <div "," class=\"wy-pager\"></div>\n </div>\n "])),(r=this.user)==null?void 0:r.avatar_url,(o=this.user)==null?void 0:o.display_name,24,(s=this.user)==null?void 0:s.presence,(_this$name=this.name)!==null&&_this$name!==void 0?_this$name:K$1("Messenger"),function(){return _this378.conversationsQuery.result.refetch()},function(Y){return _this378.dispatchSelected(Y.detail.id)},this.searchText||"",Ce(this.inputRef),function(){return _this378.throttledSearch()},hm,K$1("Search for conversations..."),this.clear,!Q&&this.user&&B?this.renderConversations(this.user,B):v(_templateObject365||(_templateObject365=_taggedTemplateLiteral(["<wy-spinner class=\"wy-content-icon\"></wy-spinner>"]))),Ce(this.pagerRef)):v(_templateObject366||(_templateObject366=_taggedTemplateLiteral(["<wy-empty class=\"wy-pane\"><wy-spinner overlay></wy-spinner></wy-empty>"]))))}},{key:"disconnectedCallback",value:function disconnectedCallback(){this.weavyContext&&(this.weavyContext.unsubscribe(null,"app_created",this.handleRefresh),this.weavyContext.unsubscribe(null,"member_added",this.handleRefresh),this.weavyContext.unsubscribe(null,"online",this.handlePresenceChange)),_get(_getPrototypeOf(Wn.prototype),"disconnectedCallback",this).call(this)}}]);return Wn}(le);Wn.styles=[me,Be(_templateObject367||(_templateObject367=_taggedTemplateLiteral(["\n :host{\n position: relative;\n }\n "])))];ps([Ge({context:Le,subscribe:!0}),K()],Wn.prototype,"weavyContext",2);ps([K()],Wn.prototype,"user",2);ps([m()],Wn.prototype,"name",2);ps([m({type:Number})],Wn.prototype,"conversationId",2);ps([K()],Wn.prototype,"searchText",2);Wn=ps([de("wy-conversation-list"),q()],Wn);var y5=Object.defineProperty,p5=Object.getOwnPropertyDescriptor,$d=function $d(r,o,s,B){for(var Q=B>1?void 0:B?p5(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&y5(o,s,Q),Q};var Ka=function(_le59){_inherits(Ka,_le59);function Ka(){var _this379;_classCallCheck(this,Ka);_this379=_callSuper(this,Ka,arguments),_this379["private"]=!0,_this379.rooms=!0,_this379.badgeQuery=new kt(_assertThisInitialized(_this379)),_this379.handleBadgeRefresh=function(){setTimeout(function(){_this379.badgeQuery.result.isRefetching||_this379.badgeQuery.result.refetch()},500)},_this379.handleRealtimeMessage=function(r){_this379.handleBadgeRefresh()},_this379.handleRealtimeSeenBy=function(r){_this379.handleBadgeRefresh()};return _this379}_createClass(Ka,[{key:"updated",value:function(){var _updated5=_asyncToGenerator(_regeneratorRuntime().mark(function _callee243(r){return _regeneratorRuntime().wrap(function _callee243$(_context245){while(1)switch(_context245.prev=_context245.next){case 0:r.has("weavyContext")&&this.weavyContext&&(this.badgeQuery.trackQuery(tr(this.weavyContext,["conversations","badge"])),this.weavyContext.subscribe(null,"message_created",this.handleRealtimeMessage),this.weavyContext.subscribe(null,"conversation_marked",this.handleBadgeRefresh));case 1:case"end":return _context245.stop()}},_callee243,this)}));function updated(_x216){return _updated5.apply(this,arguments)}return updated}()},{key:"render",value:function render(){var _this$badgeQuery$resu;var _ref269=(_this$badgeQuery$resu=this.badgeQuery.result)!==null&&_this$badgeQuery$resu!==void 0?_this$badgeQuery$resu:{},r=_ref269.data,o=_ref269.isPending,s=r?(this["private"]?r["private"]:0)+(this.rooms?r.rooms:0):0;return v(_templateObject368||(_templateObject368=_taggedTemplateLiteral(["\n ","\n "])),!o&&s>0?v(_templateObject369||(_templateObject369=_taggedTemplateLiteral([" <span class=\"wy-badge wy-badge-danger\">","</span> "])),s):O)}}]);return Ka}(le);Ka.styles=me;$d([Ge({context:Le,subscribe:!0}),K()],Ka.prototype,"weavyContext",2);$d([m({attribute:!1,type:Boolean})],Ka.prototype,"private",2);$d([m({attribute:!1,type:Boolean})],Ka.prototype,"rooms",2);Ka=$d([de("wy-badge")],Ka);var Kp=function Kp(r){return gg(r)?r._$litType$.h:r.strings},w5=qn(function(_Qn8){_inherits(_class7,_Qn8);function _class7(r){var _this380;_classCallCheck(this,_class7);_this380=_callSuper(this,_class7,[r]),_this380.et=new WeakMap;return _this380}_createClass(_class7,[{key:"render",value:function render(r){return[r]}},{key:"update",value:function update(r,_ref270){var _ref271=_slicedToArray(_ref270,1),o=_ref271[0];var s=Fy(this.it)?Kp(this.it):null,B=Fy(o)?Kp(o):null;if(s!==null&&(B===null||s!==B)){var Q=oh(r).pop();var Y=this.et.get(s);if(Y===void 0){var J=document.createDocumentFragment();Y=Pw(O,J),Y.setConnected(!1),this.et.set(s,Y)}Il(Y,[Q]),ao(Y,void 0,Q)}if(B!==null){if(s===null||s!==B){var _Q9=this.et.get(B);if(_Q9!==void 0){var _Y8=oh(_Q9).pop();xg(r),ao(r,void 0,_Y8),Il(r,[_Y8])}}this.it=o}else this.it=void 0;return this.render(o)}}]);return _class7}(Qn));var f5=Object.defineProperty,m5=Object.getOwnPropertyDescriptor,wn=function wn(r,o,s,B){for(var Q=B>1?void 0:B?m5(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&f5(o,s,Q),Q};var _di=function(_le60){_inherits(di,_le60);function di(){var _this381;_classCallCheck(this,di);_this381=_callSuper(this,di),_this381.conversationId=null,_this381.features={},_this381.conversationQuery=new kt(_assertThisInitialized(_this381)),_this381.userQuery=new kt(_assertThisInitialized(_this381)),_this381.featuresQuery=new kt(_assertThisInitialized(_this381)),_this381.persistState=new cy(_assertThisInitialized(_this381),"messenger",["conversationId"]),_this381.resizer=new i5(_assertThisInitialized(_this381)),_this381.hasEventListener={"wy:message_created":!1,"wy:app_created":!1,"wy:conversation_marked":!1,"wy:conversation_delivered":!1,"wy:member_added":!1},_this381.realtimeMessageCreatedEvent=function(){var _ref272=_asyncToGenerator(_regeneratorRuntime().mark(function _callee244(r){var o;return _regeneratorRuntime().wrap(function _callee244$(_context246){while(1)switch(_context246.prev=_context246.next){case 0:_context246.t0=((o=r.message.parent)==null?void 0:o.type)===Df.App;if(!_context246.t0){_context246.next=5;break}_context246.next=4;return _this381.conversationBelongsToMessenger(r.message.app_id);case 4:_context246.t0=_context246.sent;case 5:_context246.t1=_context246.t0;if(!_context246.t1){_context246.next=8;break}_this381.dispatchEvent(new CustomEvent("wy:message_created",{bubbles:!0,composed:!1,detail:r}));case 8:case"end":return _context246.stop()}},_callee244)}));return function(_x217){return _ref272.apply(this,arguments)}}(),_this381.realtimeAppCreatedEvent=function(){var _ref273=_asyncToGenerator(_regeneratorRuntime().mark(function _callee245(r){return _regeneratorRuntime().wrap(function _callee245$(_context247){while(1)switch(_context247.prev=_context247.next){case 0:_context247.next=2;return _this381.conversationBelongsToMessenger(r.app);case 2:_context247.t0=_context247.sent;if(!_context247.t0){_context247.next=5;break}_this381.dispatchEvent(new CustomEvent("wy:app_created",{bubbles:!0,composed:!1,detail:r}));case 5:case"end":return _context247.stop()}},_callee245)}));return function(_x218){return _ref273.apply(this,arguments)}}(),_this381.realtimeConversationMarkedEvent=function(){var _ref274=_asyncToGenerator(_regeneratorRuntime().mark(function _callee246(r){return _regeneratorRuntime().wrap(function _callee246$(_context248){while(1)switch(_context248.prev=_context248.next){case 0:_context248.next=2;return _this381.conversationBelongsToMessenger(r.conversation);case 2:_context248.t0=_context248.sent;if(!_context248.t0){_context248.next=5;break}_this381.dispatchEvent(new CustomEvent("wy:conversation_marked",{bubbles:!0,composed:!1,detail:r}));case 5:case"end":return _context248.stop()}},_callee246)}));return function(_x219){return _ref274.apply(this,arguments)}}(),_this381.realtimeConversationDeliveredEvent=function(){var _ref275=_asyncToGenerator(_regeneratorRuntime().mark(function _callee247(r){return _regeneratorRuntime().wrap(function _callee247$(_context249){while(1)switch(_context249.prev=_context249.next){case 0:_context249.next=2;return _this381.conversationBelongsToMessenger(r.conversation);case 2:_context249.t0=_context249.sent;if(!_context249.t0){_context249.next=5;break}_this381.dispatchEvent(new CustomEvent("wy:conversation_delivered",{bubbles:!0,composed:!1,detail:r}));case 5:case"end":return _context249.stop()}},_callee247)}));return function(_x220){return _ref275.apply(this,arguments)}}(),_this381.realtimeMemberAddedEvent=function(){var _ref276=_asyncToGenerator(_regeneratorRuntime().mark(function _callee248(r){return _regeneratorRuntime().wrap(function _callee248$(_context250){while(1)switch(_context250.prev=_context250.next){case 0:_context250.next=2;return _this381.conversationBelongsToMessenger(r.app);case 2:_context250.t0=_context250.sent;if(!_context250.t0){_context250.next=5;break}_this381.dispatchEvent(new CustomEvent("wy:member_added",{bubbles:!0,composed:!1,detail:r}));case 5:case"end":return _context250.stop()}},_callee248)}));return function(_x221){return _ref276.apply(this,arguments)}}(),new rl(_assertThisInitialized(_this381),_di.styles);return _this381}_createClass(di,[{key:"addEventListener",value:function addEventListener(r,o,s){var B=r;Object.prototype.hasOwnProperty.call(this.hasEventListener,B)&&(this.hasEventListener=_objectSpread(_objectSpread({},this.hasEventListener),{},_defineProperty({},B,!0))),_get(_getPrototypeOf(di.prototype),"addEventListener",this).call(this,r,o,s)}},{key:"conversationBelongsToMessenger",value:(function(){var _conversationBelongsToMessenger=_asyncToGenerator(_regeneratorRuntime().mark(function _callee249(r){var _this382=this;var o;return _regeneratorRuntime().wrap(function _callee249$(_context251){while(1)switch(_context251.prev=_context251.next){case 0:if(this.weavyContext){_context251.next=2;break}return _context251.abrupt("return",!1);case 2:if(!(typeof r=="number")){_context251.next=8;break}_context251.next=5;return E1(this.weavyContext,["conversations",r],void 0,{initialData:function initialData(){var s,B;return(B=(s=_this382.weavyContext)==null?void 0:s.queryClient.getQueryData(["conversations"]))==null?void 0:B.pages.flatMap(function(Q){return Q.data}).find(function(Q){return Q.id===r})}});case 5:o=_context251.sent;_context251.next=13;break;case 8:if(!(typeof r.type=="string")){_context251.next=12;break}o=r;_context251.next=13;break;case 12:return _context251.abrupt("return",!1);case 13:return _context251.abrupt("return",o.type===lo.ChatRoom||o.type===lo.PrivateChat);case 14:case"end":return _context251.stop()}},_callee249,this)}));function conversationBelongsToMessenger(_x222){return _conversationBelongsToMessenger.apply(this,arguments)}return conversationBelongsToMessenger}())},{key:"selectConversation",value:(function(){var _selectConversation=_asyncToGenerator(_regeneratorRuntime().mark(function _callee250(r){return _regeneratorRuntime().wrap(function _callee250$(_context252){while(1)switch(_context252.prev=_context252.next){case 0:_context252.next=2;return this.conversationBelongsToMessenger(r);case 2:if(!_context252.sent){_context252.next=6;break}this.conversationId=r;_context252.next=7;break;case 6:throw new Error("The conversation ".concat(r," is invalid."));case 7:case"end":return _context252.stop()}},_callee250,this)}));function selectConversation(_x223){return _selectConversation.apply(this,arguments)}return selectConversation}())},{key:"clearConversation",value:function clearConversation(){this.conversationId=null}},{key:"connectedCallback",value:function connectedCallback(){_get(_getPrototypeOf(di.prototype),"connectedCallback",this).call(this),this.parentElement&&this.resizer.observe({name:"overlay-mode",target:this,condition:function condition(r){return r.contentRect.width<=768}})}},{key:"scheduleUpdate",value:function(){var _scheduleUpdate4=_asyncToGenerator(_regeneratorRuntime().mark(function _callee251(){var r,o,s;return _regeneratorRuntime().wrap(function _callee251$(_context253){while(1)switch(_context253.prev=_context253.next){case 0:_context253.next=2;return yn(this);case 2:this.weavyContextConsumer=new $i(this,{context:Le,subscribe:!0});(r=this.weavyContextConsumer)!=null&&r.value&&this.weavyContext!==((o=this.weavyContextConsumer)==null?void 0:o.value)&&(this.weavyContext=(s=this.weavyContextConsumer)==null?void 0:s.value);_context253.next=6;return _get(_getPrototypeOf(di.prototype),"scheduleUpdate",this).call(this);case 6:case"end":return _context253.stop()}},_callee251,this)}));function scheduleUpdate(){return _scheduleUpdate4.apply(this,arguments)}return scheduleUpdate}()},{key:"willUpdate",value:function(){var _willUpdate5=_asyncToGenerator(_regeneratorRuntime().mark(function _callee252(r){var _this383=this;var o,s,B,Q;return _regeneratorRuntime().wrap(function _callee252$(_context254){while(1)switch(_context254.prev=_context254.next){case 0:r.has("weavyContext")&&this.weavyContext&&(this.userQuery.trackQuery(tr(this.weavyContext,["user"])),this.featuresQuery.trackQuery(tr(this.weavyContext,["features","messenger"]))),(o=this.userQuery.result)!=null&&o.isPending||(this.user=(s=this.userQuery.result)==null?void 0:s.data),(B=this.featuresQuery.result)!=null&&B.isPending||(this.availableFeatures=(Q=this.featuresQuery.result)==null?void 0:Q.data),(r.has("conversationId")||r.has("weavyContext"))&&this.weavyContext&&(this.conversationId?this.conversationQuery.trackQuery(tr(this.weavyContext,["conversations",this.conversationId],void 0,{initialData:function initialData(){var Y,J;return(J=(Y=_this383.weavyContext)==null?void 0:Y.queryClient.getQueryData(["conversations"]))==null?void 0:J.pages.flatMap(function(it){return it.data}).find(function(it){return it.id===_this383.conversationId})}})):this.conversationQuery.untrackQuery()),(r.has("weavyContext")||r.has("hasEventListener")||r.has("user"))&&this.weavyContext&&this.user&&(this.weavyContext.unsubscribe(null,"message_created",this.realtimeMessageCreatedEvent),this.weavyContext.unsubscribe(null,"conversation_marked",this.realtimeConversationMarkedEvent),this.weavyContext.unsubscribe(null,"conversation_delivered",this.realtimeConversationDeliveredEvent),this.weavyContext.unsubscribe(null,"app_created",this.realtimeAppCreatedEvent),this.weavyContext.unsubscribe(null,"member_added",this.realtimeMemberAddedEvent),this.hasEventListener["wy:message_created"]&&this.weavyContext.subscribe(null,"message_created",this.realtimeMessageCreatedEvent),this.hasEventListener["wy:conversation_marked"]&&this.weavyContext.subscribe(null,"conversation_marked",this.realtimeConversationMarkedEvent),this.hasEventListener["wy:conversation_delivered"]&&this.weavyContext.subscribe(null,"conversation_delivered",this.realtimeConversationDeliveredEvent),this.hasEventListener["wy:app_created"]&&this.weavyContext.subscribe(null,"app_created",this.realtimeAppCreatedEvent),this.hasEventListener["wy:member_added"]&&this.weavyContext.subscribe(null,"member_added",this.realtimeMemberAddedEvent));case 1:case"end":return _context254.stop()}},_callee252,this)}));function willUpdate(_x224){return _willUpdate5.apply(this,arguments)}return willUpdate}()},{key:"render",value:function render(){var _ref279,_this$conversationQue,_this384=this;var r;var o=this.resizer.conditions,_ref277=(_ref279=(r=this.weavyContext)==null?void 0:r.network)!==null&&_ref279!==void 0?_ref279:{isPending:!0},s=_ref277.isPending,_ref278=(_this$conversationQue=this.conversationQuery.result)!==null&&_this$conversationQue!==void 0?_this$conversationQue:{isPending:s},B=_ref278.data,Q=_ref278.isPending;return v(_templateObject370||(_templateObject370=_taggedTemplateLiteral(["\n <wy-conversation-list\n class=\"wy-scroll-y ","\"\n name=","\n conversationId=","\n @conversation-selected=","\n ></wy-conversation-list>\n ","\n "])),Qe(o),et(this.name),et(this.conversationId!==null?this.conversationId:void 0),function(Y){return _this384.selectConversation(Y.detail.id)},w5(this.conversationId?Q?v(_templateObject371||(_templateObject371=_taggedTemplateLiteral([" <wy-empty class=","><wy-spinner></wy-spinner></wy-empty> "])),Qe(o)):v(_templateObject372||(_templateObject372=_taggedTemplateLiteral([" <wy-conversation\n class=","\n data-conversation-id=","\n .conversation=","\n .availableFeatures=","\n .features=","\n >\n <span slot=\"action\" class=\"wy-close-conversation\">\n <wy-button kind=\"icon\" @click=",">\n <wy-icon name=\"back\"></wy-icon>\n </wy-button>\n <wy-badge slot=\"badge\"></wy-badge>\n </span>\n </wy-conversation>"])),Qe(o),this.conversationId!==null?this.conversationId:"",B,this.availableFeatures,this.features,function(){return _this384.clearConversation()}):v(_templateObject373||(_templateObject373=_taggedTemplateLiteral([" <wy-empty class="," noNetwork>","</wy-empty> "])),Qe(o),K$1("Select a conversation"))))}},{key:"disconnectedCallback",value:function disconnectedCallback(){this.weavyContext&&(this.weavyContext.unsubscribe(null,"message_created",this.realtimeMessageCreatedEvent),this.weavyContext.unsubscribe(null,"conversation_marked",this.realtimeConversationMarkedEvent),this.weavyContext.unsubscribe(null,"conversation_delivered",this.realtimeConversationDeliveredEvent),this.weavyContext.unsubscribe(null,"app_created",this.realtimeAppCreatedEvent),this.weavyContext.unsubscribe(null,"member_added",this.realtimeMemberAddedEvent)),_get(_getPrototypeOf(di.prototype),"disconnectedCallback",this).call(this)}}]);return di}(le);_di.styles=[ns,me,Be(_templateObject374||(_templateObject374=_taggedTemplateLiteral(["\n :host(wy-messenger) {\n display: flex;\n align-items: stretch;\n position: relative;\n flex: 1;\n min-width: 0;\n }\n\n wy-conversation-list {\n flex: 0 1 50%;\n min-width: 0;\n max-width: 24rem;\n border-right: 1px solid var(--wy-outline-variant, var(--wy-neutral-variant-80, #c1c7ce));\n }\n\n wy-conversation {\n flex: 0 1 100%;\n min-width: max(50%, 16rem);\n min-height: min-content;\n display: flex;\n flex-direction: column;\n }\n\n .wy-close-conversation {\n display: none;\n }\n\n wy-conversation-list.overlay-mode {\n flex: 0 1 100%;\n min-width: 0;\n max-width: none;\n border-right: none;\n }\n\n wy-conversation-list[conversationid].overlay-mode {\n display: none;\n }\n\n wy-conversation[data-conversation-id=\"\"].overlay-mode {\n display: none;\n }\n\n .overlay-mode .wy-close-conversation {\n display: unset;\n }\n\n wy-empty.overlay-mode {\n display: none;\n }\n "])))];wn([K()],_di.prototype,"weavyContext",2);wn([m()],_di.prototype,"name",2);wn([K()],_di.prototype,"user",2);wn([K()],_di.prototype,"conversationId",2);wn([K()],_di.prototype,"conversation",2);wn([m({type:Object})],_di.prototype,"features",2);wn([K()],_di.prototype,"availableFeatures",2);wn([K()],_di.prototype,"hasEventListener",2);_di=wn([de("wy-messenger"),q()],_di);var v5=Object.defineProperty,g5=Object.getOwnPropertyDescriptor,Gm=function Gm(r,o,s,B){for(var Q=B>1?void 0:B?g5(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&v5(o,s,Q),Q};var Jl=function(_le61){_inherits(Jl,_le61);function Jl(){_classCallCheck(this,Jl);return _callSuper(this,Jl,arguments)}_createClass(Jl,[{key:"dispatchRestore",value:function dispatchRestore(){var r=new CustomEvent("restore",{detail:{}});return this.dispatchEvent(r)}},{key:"render",value:function render(){var _this385=this;return v(_templateObject375||(_templateObject375=_taggedTemplateLiteral(["\n <div class=\"wy-item wy-item-lg\">\n <div class=\"wy-item-body\">","</div>\n <wy-button @click="," class=\"wy-button-variant\">","</wy-button>\n </div>\n "])),K$1("Post was trashed."),function(){return _this385.dispatchRestore()},K$1("Undo"))}}]);return Jl}(le);Jl.styles=me;Gm([m({type:Number})],Jl.prototype,"postId",2);Jl=Gm([de("wy-post-trashed"),q()],Jl);var b5=Object.defineProperty,_5=Object.getOwnPropertyDescriptor,bt=function bt(r,o,s,B){for(var Q=B>1?void 0:B?_5(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&b5(o,s,Q),Q};var lt=function(_le62){_inherits(lt,_le62);function lt(){var _this386;_classCallCheck(this,lt);_this386=_callSuper(this,lt,arguments),_this386.temp=!1,_this386.createdAt="",_this386.modifiedAt=void 0,_this386.isSubscribed=!1,_this386.isTrashed=!1,_this386.html="",_this386.text="",_this386.attachments=[],_this386.pollOptions=[],_this386.reactions=[],_this386.commentCount=0,_this386.seenBy=[],_this386.features={},_this386.showComments=!1,_this386.loadComments=!1,_this386.previewRef=Re();return _this386}_createClass(lt,[{key:"dispatchVote",value:function dispatchVote(r){var o=new CustomEvent("vote",{detail:{id:r}});return this.dispatchEvent(o)}},{key:"dispatchSubscribe",value:function dispatchSubscribe(r){var o=new CustomEvent("subscribe",{detail:{id:this.postId,subscribe:r}});return this.dispatchEvent(o)}},{key:"dispatchTrash",value:function dispatchTrash(){var r=new CustomEvent("trash",{detail:{id:this.postId}});return this.dispatchEvent(r)}},{key:"dispatchEdit",value:function dispatchEdit(r){var o=new CustomEvent("edit",{detail:{edit:r}});return this.dispatchEvent(o)}},{key:"handleCommentsClick",value:function handleCommentsClick(r){r.preventDefault(),this.showComments=!this.showComments,this.loadComments=!0}},{key:"render",value:function render(){var _this387=this;var r,o,s,B,Q,Y,J;var it=(r=this.attachments)==null?void 0:r.filter(function(Ot){return Ot.kind==="image"&&Ot.thumbnail_url}),nt=(o=this.attachments)==null?void 0:o.filter(function(Ot){return Ot.kind!=="image"||!Ot.thumbnail_url}),ot=new Intl.DateTimeFormat((s=this.weavyContext)==null?void 0:s.locale,{dateStyle:"full",timeStyle:"short"}).format(new Date(this.createdAt)),dt=Yc((B=this.weavyContext)==null?void 0:B.locale,new Date(this.createdAt)),Mt=this.modifiedAt&&this.weavyContext?new Intl.DateTimeFormat(this.weavyContext.locale,{dateStyle:"full",timeStyle:"short"}).format(new Date(this.modifiedAt)):"";return this.temp?v(_templateObject376||(_templateObject376=_taggedTemplateLiteral(["<div class=\"wy-post\">\n <div class=\"wy-item wy-item-lg\">\n <wy-avatar .src=\"","\" .size="," .name=","></wy-avatar>\n <div class=\"wy-item-body\">\n <div class=\"wy-item-title\"><span class=\"wy-placeholder\">","</span></div>\n <div class=\"wy-item-text\">\n <time class=\"wy-placeholder\">","</time>\n </div>\n </div>\n </div>\n <div class=\"wy-post-body\">\n <div class=\"wy-content\"><wy-skeleton .text=","></wy-skeleton></div>\n </div>\n </div>"])),this.createdBy.avatar_url,48,this.createdBy.display_name,this.createdBy.display_name,dt,this.text):v(_templateObject377||(_templateObject377=_taggedTemplateLiteral(["\n <div class=\"wy-post\">\n <div class=\"wy-item wy-item-lg\">\n <wy-avatar .src=\"","\" .size="," .name=","></wy-avatar>\n <div class=\"wy-item-body\">\n <div class=\"wy-item-row\">\n <div class=\"wy-item-title\">","</div>\n </div>\n <div class=\"wy-item-row\">\n <div class=\"wy-item-text\">\n <time datetime="," title=",">","</time>\n ","\n </div>\n </div>\n </div>\n\n <div class=\"wy-item-actions wy-item-actions-top\">\n <wy-dropdown>\n ","\n ","\n ","\n </wy-dropdown>\n </div>\n </div>\n <!-- image grid -->\n ","\n\n <!-- embeds -->\n ","\n\n <div class=\"wy-post-body\">\n ","\n\n <!-- poll -->\n ","\n\n <!-- files -->\n ","\n\n <!-- meeting -->\n ","\n </div>\n\n <div class=\"wy-post-footer\">\n <div>\n <!-- comment count -->\n ","\n </div>\n ","\n </div>\n\n <!-- comments -->\n ","\n </div>\n <wy-preview\n ","\n .app=","\n .files=","\n .availableFeatures=","\n .isAttachment=","\n .features=","></wy-preview>\n </div>\n "])),this.createdBy.avatar_url,48,this.createdBy.display_name,this.createdBy.display_name,this.createdAt,ot,dt,this.modifiedAt?v(_templateObject378||(_templateObject378=_taggedTemplateLiteral(["<time datetime=\"","\" title=","> \xB7 ","</time>"])),this.modifiedAt,Mt,K$1("edited")):O,this.isSubscribed?v(_templateObject379||(_templateObject379=_taggedTemplateLiteral(["<wy-dropdown-item @click=",">\n <wy-icon name=\"bell-off\"></wy-icon>\n ","\n </wy-dropdown-item>"])),function(){return _this387.dispatchSubscribe(!1)},K$1("Unsubscribe")):v(_templateObject380||(_templateObject380=_taggedTemplateLiteral(["<wy-dropdown-item @click=",">\n <wy-icon name=\"bell\"></wy-icon>\n ","\n </wy-dropdown-item>"])),function(){return _this387.dispatchSubscribe(!0)},K$1("Subscribe")),this.user.id===this.createdBy.id?v(_templateObject381||(_templateObject381=_taggedTemplateLiteral(["<wy-dropdown-item @click=",">\n <wy-icon name=\"pencil\"></wy-icon>\n ","\n </wy-dropdown-item>"])),function(){return _this387.dispatchEdit(!0)},K$1("Edit")):O,this.user.id===this.createdBy.id?v(_templateObject382||(_templateObject382=_taggedTemplateLiteral(["<wy-dropdown-item @click=",">\n <wy-icon name=\"trashcan\"></wy-icon>\n ","\n </wy-dropdown-item>"])),function(){return _this387.dispatchTrash()},K$1("Trash")):O,it&&it.length?v(_templateObject383||(_templateObject383=_taggedTemplateLiteral(["<wy-image-grid\n .images=","\n @file-open=","></wy-image-grid>"])),it,function(Ot){var Qt;(Qt=_this387.previewRef.value)==null||Qt.open(Ot.detail.file)}):"",this.embed&&Pe(this.availableFeatures,Ee.Embeds,(Q=this.features)==null?void 0:Q.embeds)?v(_templateObject384||(_templateObject384=_taggedTemplateLiteral([" <wy-embed class=\"wy-embed\" .embed=","></wy-embed> "])),this.embed):O,this.html?v(_templateObject385||(_templateObject385=_taggedTemplateLiteral(["<div class=\"wy-content\">","</div>"])),Do(this.html)):"",this.pollOptions&&this.pollOptions.length>0?v(_templateObject386||(_templateObject386=_taggedTemplateLiteral(["\n <wy-poll\n .pollOptions=","\n @vote=","></wy-poll>\n "])),this.pollOptions,function(Ot){return _this387.dispatchVote(Ot.detail.id)}):O,nt&&nt.length?v(_templateObject387||(_templateObject387=_taggedTemplateLiteral(["<wy-attachments-list\n .files=","\n @file-open=","></wy-attachments-list>"])),nt,function(Ot){var Qt;(Qt=_this387.previewRef.value)==null||Qt.open(Ot.detail.file)}):"",this.meeting?v(_templateObject388||(_templateObject388=_taggedTemplateLiteral(["<wy-meeting-card .meeting=","></wy-meeting-card>"])),this.meeting):"",Pe(this.availableFeatures,Ee.Comments,(Y=this.features)==null?void 0:Y.comments)?v(_templateObject389||(_templateObject389=_taggedTemplateLiteral([" <wy-button\n kind=\"inline\"\n ?active=","\n buttonClass=\"wy-meta\"\n @click=",">\n ","\n </wy-button>"])),this.showComments,function(Ot){return _this387.handleCommentsClick(Ot)},this.commentCount!==1?K$1(c(_templateObject390||(_templateObject390=_taggedTemplateLiteral([""," comments"])),this.commentCount)):K$1("1 comment")):O,Pe(this.availableFeatures,Ee.Reactions,(J=this.features)==null?void 0:J.reactions)?v(_templateObject391||(_templateObject391=_taggedTemplateLiteral(["\n <div class=\"wy-reactions-line wy-reactions-line-reverse\">\n <wy-reactions \n .reactions=","\n parentId=","\n entityId=","\n messageType=\"posts\"\n .userId=","></wy-reactions>\n </div>"])),this.reactions,this.app.id,this.postId,this.user.id):O,this.loadComments?v(_templateObject392||(_templateObject392=_taggedTemplateLiteral(["\n <div ?hidden=",">\n <wy-comment-list\n .app=","\n .user=","\n .parentId=","\n .location=","\n .features=","\n .availableFeatures=","></wy-comment-list>\n </div>\n "])),!this.showComments,this.app,this.user,this.postId,"posts",this.features,this.availableFeatures):O,Ce(this.previewRef),this.app,this.attachments,this.availableFeatures,!0,this.features)}}]);return lt}(le);lt.styles=[me,Be(_templateObject393||(_templateObject393=_taggedTemplateLiteral(["\n :host {\n display: contents;\n }\n "])))];bt([Ge({context:Le,subscribe:!0}),K()],lt.prototype,"weavyContext",2);bt([m({attribute:!1})],lt.prototype,"app",2);bt([m({attribute:!1})],lt.prototype,"user",2);bt([m({type:Number})],lt.prototype,"postId",2);bt([m({type:Boolean})],lt.prototype,"temp",2);bt([m({attribute:!1})],lt.prototype,"createdBy",2);bt([m()],lt.prototype,"createdAt",2);bt([m()],lt.prototype,"modifiedAt",2);bt([m({type:Boolean})],lt.prototype,"isSubscribed",2);bt([m({type:Boolean})],lt.prototype,"isTrashed",2);bt([m()],lt.prototype,"html",2);bt([m()],lt.prototype,"text",2);bt([m({type:Array})],lt.prototype,"attachments",2);bt([m({type:Array})],lt.prototype,"pollOptions",2);bt([m({attribute:!1})],lt.prototype,"meeting",2);bt([m({attribute:!1})],lt.prototype,"embed",2);bt([m({type:Array})],lt.prototype,"reactions",2);bt([m({attribute:!1})],lt.prototype,"commentCount",2);bt([m({type:Array})],lt.prototype,"seenBy",2);bt([m({type:Object})],lt.prototype,"features",2);bt([m({type:Array})],lt.prototype,"availableFeatures",2);bt([K()],lt.prototype,"showComments",2);bt([K()],lt.prototype,"loadComments",2);lt=bt([de("wy-post-view"),q()],lt);function x5(r,o){return{initialPageParam:0,queryKey:["posts",o],queryFn:function(){var _queryFn10=_asyncToGenerator(_regeneratorRuntime().mark(function _callee253(s){var B,Q,Y;return _regeneratorRuntime().wrap(function _callee253$(_context255){while(1)switch(_context255.prev=_context255.next){case 0:B=s.pageParam;Q="/api/apps/"+o+"/posts?orderby=createdat+desc&skip="+B+"&top=25";_context255.next=4;return r.get(Q);case 4:_context255.next=6;return _context255.sent.json();case 6:Y=_context255.sent;return _context255.abrupt("return",(Y.data=Y.data||[],Y));case 8:case"end":return _context255.stop()}},_callee253)}));function queryFn(_x225){return _queryFn10.apply(this,arguments)}return queryFn}(),getNextPageParam:function getNextPageParam(s,B){if((s==null?void 0:s.end)<(s==null?void 0:s.count))return B.length*25}}}function k5(r,o){return{mutationFn:function(){var _mutationFn31=_asyncToGenerator(_regeneratorRuntime().mark(function _callee254(s){return _regeneratorRuntime().wrap(function _callee254$(_context256){while(1)switch(_context256.prev=_context256.next){case 0:_context256.next=2;return r.post("/api/posts/"+s.id,"PATCH",JSON.stringify({text:s.text,blobs:s.blobs,attachments:s.attachments,meeting_id:s.meetingId,options:s.pollOptions.filter(function(B){return B.text.trim()!==""}).map(function(B){return{id:B.id,text:B.text}}),embed_id:s.embed||null}));case 2:return _context256.abrupt("return",_context256.sent.json());case 3:case"end":return _context256.stop()}},_callee254)}));function mutationFn(_x226){return _mutationFn31.apply(this,arguments)}return mutationFn}(),mutationKey:o,onMutate:function(){var _onMutate24=_asyncToGenerator(_regeneratorRuntime().mark(function _callee255(s){return _regeneratorRuntime().wrap(function _callee255$(_context257){while(1)switch(_context257.prev=_context257.next){case 0:tt(r.queryClient,["posts",s.appId],s.id,function(B){B.text=s.text,B.html=s.text});case 1:case"end":return _context257.stop()}},_callee255)}));function onMutate(_x227){return _onMutate24.apply(this,arguments)}return onMutate}(),onSuccess:function onSuccess(s,B){B.id&&tt(r.queryClient,["posts",B.appId],B.id,function(Q){Q.text=s.text,Q.html=s.html,Q.attachment_ids=s.attachment_ids,Q.attachments=s.attachments,Q.embed=s.embed,Q.meeting=s.meeting,Q.meeting_id=s.meeting_id,Q.modified_at=s.modified_at,Q.modified_by=s.modified_by,Q.options=s.options})}}}function C5(r,o){var s=r.queryClient;return{mutationFn:function(){var _mutationFn32=_asyncToGenerator(_regeneratorRuntime().mark(function _callee256(B){return _regeneratorRuntime().wrap(function _callee256$(_context258){while(1)switch(_context258.prev=_context258.next){case 0:_context258.next=2;return r.post("/api/apps/"+B.appId+"/posts","POST",JSON.stringify({text:B.text,blobs:B.blobs,meeting_id:B.meetingId,options:B.pollOptions.filter(function(Q){return Q.text.trim()!==""}).map(function(Q){return{text:Q.text}}),embed_id:B.embed}));case 2:return _context258.abrupt("return",_context258.sent.json());case 3:case"end":return _context258.stop()}},_callee256)}));function mutationFn(_x228){return _mutationFn32.apply(this,arguments)}return mutationFn}(),mutationKey:o,onMutate:function(){var _onMutate25=_asyncToGenerator(_regeneratorRuntime().mark(function _callee257(B){var Q,Y;return _regeneratorRuntime().wrap(function _callee257$(_context259){while(1)switch(_context259.prev=_context259.next){case 0:_context259.next=2;return s.cancelQueries({queryKey:["posts",B.appId]});case 2:Q=Math.random(),Y={id:Q,app_id:-1,attachment_ids:[],is_subscribed:!0,is_trashed:!1,text:B.text,html:B.text,plain:B.text,temp:!0,created_by_id:B.user.id,created_by:{id:B.user.id,avatar_url:B.user.avatar_url,display_name:B.user.display_name,presence:void 0,name:B.user.name},created_at:(new Date()).toUTCString(),attachments:[],reactions:[]};return _context259.abrupt("return",(sn(s,["posts",B.appId],Y,void 0,{descending:!0}),{tempId:Q}));case 4:case"end":return _context259.stop()}},_callee257)}));function onMutate(_x229){return _onMutate25.apply(this,arguments)}return onMutate}(),onSuccess:function onSuccess(B,Q,Y){sn(s,["posts",Q.appId],B,Y==null?void 0:Y.tempId,{descending:!0})}}}var $5=Object.defineProperty,E5=Object.getOwnPropertyDescriptor,Ft=function Ft(r,o,s,B){for(var Q=B>1?void 0:B?E5(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&$5(o,s,Q),Q};var $t=function(_le63){_inherits($t,_le63);function $t(){var _this388;_classCallCheck(this,$t);_this388=_callSuper(this,$t,arguments),_this388.temp=!1,_this388.createdAt="",_this388.modifiedAt=void 0,_this388.isSubscribed=!1,_this388.isTrashed=!1,_this388.text="",_this388.attachments=[],_this388.pollOptions=[],_this388.reactions=[],_this388.seenBy=[],_this388.userId=-1,_this388.features={},_this388.updatePostMutation=new tn(_assertThisInitialized(_this388));return _this388}_createClass($t,[{key:"dispatchEdit",value:function dispatchEdit(r){var o=new CustomEvent("edit",{detail:{edit:r}});return this.dispatchEvent(o)}},{key:"handleSubmit",value:function handleSubmit(r){this.updatePostMutation.mutate({id:this.postId,appId:this.app.id,text:r.detail.text,meetingId:r.detail.meetingId,blobs:r.detail.blobs,attachments:r.detail.attachments,pollOptions:r.detail.pollOptions,embed:r.detail.embed,user:this.user}),this.dispatchEdit(!1)}},{key:"willUpdate",value:function(){var _willUpdate6=_asyncToGenerator(_regeneratorRuntime().mark(function _callee258(r){return _regeneratorRuntime().wrap(function _callee258$(_context260){while(1)switch(_context260.prev=_context260.next){case 0:(r.has("weavyContext")||r.has("app"))&&this.weavyContext&&this.updatePostMutation.trackMutation(k5(this.weavyContext,["posts",this.app.id]));case 1:case"end":return _context260.stop()}},_callee258,this)}));function willUpdate(_x230){return _willUpdate6.apply(this,arguments)}return willUpdate}()},{key:"render",value:function render(){var _this389=this;return v(_templateObject394||(_templateObject394=_taggedTemplateLiteral(["\n <nav class=\"wy-item\">\n <div class=\"wy-item-body\">\n <div class=\"wy-item-title\">","</div>\n </div>\n\n <wy-button kind=\"icon\" @click=",">\n <wy-icon name=\"close\"></wy-icon>\n </wy-button>\n </nav>\n <wy-editor\n editorLocation=\"apps\"\n .text=","\n .embed=","\n .options=","\n .attachments=","\n .app=","\n .user=","\n .parentId=","\n .availableFeatures=","\n .features=","\n .typing=","\n .draft=","\n placeholder=","\n buttonText=","\n @submit=","></wy-editor>\n "])),K$1("Edit post"),function(){return _this389.dispatchEdit(!1)},this.text,this.embed,this.pollOptions,this.attachments,this.app,this.user,this.postId,this.availableFeatures,this.features,!1,!1,K$1("Edit post..."),K$1("Update",{desc:"Button action to update"}),function(r){return _this389.handleSubmit(r)})}}]);return $t}(le);$t.styles=me;Ft([Ge({context:Le,subscribe:!0}),K()],$t.prototype,"weavyContext",2);Ft([m({attribute:!1})],$t.prototype,"app",2);Ft([m({attribute:!1})],$t.prototype,"user",2);Ft([m({type:Number})],$t.prototype,"postId",2);Ft([m({type:Boolean})],$t.prototype,"temp",2);Ft([m({attribute:!1})],$t.prototype,"createdBy",2);Ft([m()],$t.prototype,"createdAt",2);Ft([m()],$t.prototype,"modifiedAt",2);Ft([m({type:Boolean})],$t.prototype,"isSubscribed",2);Ft([m({type:Boolean})],$t.prototype,"isTrashed",2);Ft([m()],$t.prototype,"text",2);Ft([m({type:Array})],$t.prototype,"attachments",2);Ft([m({type:Array})],$t.prototype,"pollOptions",2);Ft([m({attribute:!1})],$t.prototype,"meeting",2);Ft([m({attribute:!1})],$t.prototype,"embed",2);Ft([m({type:Array})],$t.prototype,"reactions",2);Ft([m({type:Array})],$t.prototype,"seenBy",2);Ft([m({type:Number})],$t.prototype,"userId",2);Ft([m({type:Object})],$t.prototype,"features",2);Ft([m({type:Array})],$t.prototype,"availableFeatures",2);$t=Ft([de("wy-post-edit"),q()],$t);var S5=Object.defineProperty,P5=Object.getOwnPropertyDescriptor,Et=function Et(r,o,s,B){for(var Q=B>1?void 0:B?P5(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&S5(o,s,Q),Q};var pt=function(_le64){_inherits(pt,_le64);function pt(){var _this390;_classCallCheck(this,pt);_this390=_callSuper(this,pt,arguments),_this390.temp=!1,_this390.createdAt="",_this390.modifiedAt=void 0,_this390.isSubscribed=!1,_this390.isTrashed=!1,_this390.html="",_this390.text="",_this390.plain="",_this390.attachments=[],_this390.pollOptions=[],_this390.reactions=[],_this390.commentCount=0,_this390.seenBy=[],_this390.features={},_this390.editing=!1;return _this390}_createClass(pt,[{key:"dispatchVote",value:function dispatchVote(r){var o=new CustomEvent("vote",{detail:{id:r,parentId:this.postId,parentType:"posts"}});return this.dispatchEvent(o)}},{key:"dispatchSubscribe",value:function dispatchSubscribe(r){var o=new CustomEvent("subscribe",{detail:{id:this.postId,subscribe:r}});return this.dispatchEvent(o)}},{key:"dispatchTrash",value:function dispatchTrash(){var r=new CustomEvent("trash",{detail:{id:this.postId}});return this.dispatchEvent(r)}},{key:"dispatchRestore",value:function dispatchRestore(){var r=new CustomEvent("restore",{detail:{id:this.postId}});return this.dispatchEvent(r)}},{key:"render",value:function render(){var _this391=this;return v(_templateObject395||(_templateObject395=_taggedTemplateLiteral(["\n ","\n ","\n ","\n "])),this.isTrashed?v(_templateObject396||(_templateObject396=_taggedTemplateLiteral(["<wy-post-trashed\n class=\"wy-post\"\n postId=","\n @restore=","></wy-post-trashed> "])),this.postId,function(){_this391.dispatchRestore()}):O,!this.isTrashed&&this.editing?v(_templateObject397||(_templateObject397=_taggedTemplateLiteral(["<wy-post-edit\n class=\"wy-post\"\n .app=","\n .user=","\n .postId=","\n .availableFeatures=","\n .features=","\n .text=","\n .embed=","\n .pollOptions=","\n .attachments=","\n @edit=","></wy-post-edit> "])),this.app,this.user,this.postId,this.availableFeatures,this.features,this.text,this.embed,this.pollOptions,this.attachments,function(r){_this391.editing=r.detail.edit}):O,!this.isTrashed&&!this.editing?v(_templateObject398||(_templateObject398=_taggedTemplateLiteral(["<wy-post-view\n id=\"","\"\n .app=","\n .user=","\n .postId=","\n .temp=","\n .createdBy=","\n .createdAt=","\n .modifiedAt=","\n .isSubscribed=","\n .isTrashed=","\n .html=","\n .text=","\n .attachments=","\n .meeting=","\n .pollOptions=","\n .embed=","\n .reactions=","\n .commentCount=","\n .availableFeatures=","\n .features=","\n @edit=","\n @subscribe=","\n @trash=","\n @vote=","></wy-post-view> "])),this.id,this.app,this.user,this.postId,this.temp,this.createdBy,this.createdAt,this.modifiedAt,this.isSubscribed,this.isTrashed,this.html,this.plain,this.attachments,this.meeting,this.pollOptions,this.embed,this.reactions,this.commentCount,this.availableFeatures,this.features,function(r){_this391.editing=r.detail.edit},function(r){_this391.dispatchSubscribe(r.detail.subscribe)},function(){_this391.dispatchTrash()},function(r){_this391.dispatchVote(r.detail.id)}):O)}}]);return pt}(le);pt.styles=me;Et([m({attribute:!1})],pt.prototype,"app",2);Et([m({attribute:!1})],pt.prototype,"user",2);Et([m({type:Number})],pt.prototype,"postId",2);Et([m({type:Boolean})],pt.prototype,"temp",2);Et([m({attribute:!1})],pt.prototype,"createdBy",2);Et([m()],pt.prototype,"createdAt",2);Et([m()],pt.prototype,"modifiedAt",2);Et([m({type:Boolean})],pt.prototype,"isSubscribed",2);Et([m({type:Boolean})],pt.prototype,"isTrashed",2);Et([m()],pt.prototype,"html",2);Et([m()],pt.prototype,"text",2);Et([m()],pt.prototype,"plain",2);Et([m({attribute:!1})],pt.prototype,"attachments",2);Et([m({type:Array})],pt.prototype,"pollOptions",2);Et([m({attribute:!1})],pt.prototype,"meeting",2);Et([m({attribute:!1})],pt.prototype,"embed",2);Et([m({type:Array})],pt.prototype,"reactions",2);Et([m({attribute:!1})],pt.prototype,"commentCount",2);Et([m({type:Array})],pt.prototype,"seenBy",2);Et([m({type:Object})],pt.prototype,"features",2);Et([m({type:Array})],pt.prototype,"availableFeatures",2);Et([K()],pt.prototype,"editing",2);pt=Et([de("wy-post")],pt);function A5(r,o){var s=r.queryClient,B=["posts",o.id];return{mutationKey:B,mutationFn:function(){var _mutationFn33=_asyncToGenerator(_regeneratorRuntime().mark(function _callee259(_ref280){var Q,Y,J,it;return _regeneratorRuntime().wrap(function _callee259$(_context261){while(1)switch(_context261.prev=_context261.next){case 0:Q=_ref280.id,Y=_ref280.subscribe;_context261.next=3;return r.post("/api/posts/".concat(Q,"/").concat(Y?"subscribe":"unsubscribe"),"POST","");case 3:J=_context261.sent;if(J.ok){_context261.next=9;break}_context261.next=7;return J.json();case 7:it=_context261.sent;throw new Error(it.detail||it.title,{cause:it});case 9:return _context261.abrupt("return",J.json());case 10:case"end":return _context261.stop()}},_callee259)}));function mutationFn(_x231){return _mutationFn33.apply(this,arguments)}return mutationFn}(),onMutate:function(){var _onMutate26=_asyncToGenerator(_regeneratorRuntime().mark(function _callee260(Q){return _regeneratorRuntime().wrap(function _callee260$(_context262){while(1)switch(_context262.prev=_context262.next){case 0:return _context262.abrupt("return",(je(s,{queryKey:B,exact:!1},Q.id,function(Y){return Object.assign(Y,{is_subscribed:Q.subscribe})}),{type:Q.subscribe?"subscribe":"unsubscribe",id:Q.id}));case 1:case"end":return _context262.stop()}},_callee260)}));function onMutate(_x232){return _onMutate26.apply(this,arguments)}return onMutate}(),onSuccess:function onSuccess(Q,Y){je(s,{queryKey:B,exact:!1},Y.id,function(J){return Object.assign(J,Q)})},onError:function onError(){}}}function L5(r,o){return new Ye(r.queryClient,A5(r,o))}function M5(r,o){var s=r.queryClient,B={mutationKey:["posts",o.id],mutationFn:function(){var _mutationFn34=_asyncToGenerator(_regeneratorRuntime().mark(function _callee261(_ref281){var Q;return _regeneratorRuntime().wrap(function _callee261$(_context263){while(1)switch(_context263.prev=_context263.next){case 0:Q=_ref281.id;_context263.next=3;return r.post("/api/posts/"+Q+"/trash","POST","");case 3:return _context263.abrupt("return",_context263.sent.json());case 4:case"end":return _context263.stop()}},_callee261)}));function mutationFn(_x233){return _mutationFn34.apply(this,arguments)}return mutationFn}(),onMutate:function(){var _onMutate27=_asyncToGenerator(_regeneratorRuntime().mark(function _callee262(Q){return _regeneratorRuntime().wrap(function _callee262$(_context264){while(1)switch(_context264.prev=_context264.next){case 0:return _context264.abrupt("return",(je(s,{queryKey:B.mutationKey,exact:!1},Q.id,function(Y){return Object.assign(Y,{is_trashed:!0})}),{type:"trash",id:Q.id}));case 1:case"end":return _context264.stop()}},_callee262)}));function onMutate(_x234){return _onMutate27.apply(this,arguments)}return onMutate}(),onSuccess:function onSuccess(Q,Y){je(s,{queryKey:B.mutationKey,exact:!1},Y.id,function(J){return Object.assign(J,Q)})}};return B}function O5(r,o){return new Ye(r.queryClient,M5(r,o))}function I5(r,o){var s=r.queryClient,B={mutationKey:["posts",o.id],mutationFn:function(){var _mutationFn35=_asyncToGenerator(_regeneratorRuntime().mark(function _callee263(_ref282){var Q,Y,J;return _regeneratorRuntime().wrap(function _callee263$(_context265){while(1)switch(_context265.prev=_context265.next){case 0:Q=_ref282.id;_context265.next=3;return r.post("/api/posts/"+Q+"/restore","POST","");case 3:Y=_context265.sent;if(Y.ok){_context265.next=9;break}_context265.next=7;return Y.json();case 7:J=_context265.sent;throw new Error(J.detail||J.title,{cause:J});case 9:return _context265.abrupt("return",Y.json());case 10:case"end":return _context265.stop()}},_callee263)}));function mutationFn(_x235){return _mutationFn35.apply(this,arguments)}return mutationFn}(),onMutate:function(){var _onMutate28=_asyncToGenerator(_regeneratorRuntime().mark(function _callee264(Q){return _regeneratorRuntime().wrap(function _callee264$(_context266){while(1)switch(_context266.prev=_context266.next){case 0:return _context266.abrupt("return",(je(s,{queryKey:B.mutationKey,exact:!1},Q.id,function(Y){return Object.assign(Y,{is_trashed:!1})}),{type:"restore",file:Q.id}));case 1:case"end":return _context266.stop()}},_callee264)}));function onMutate(_x236){return _onMutate28.apply(this,arguments)}return onMutate}(),onSuccess:function onSuccess(Q,Y){je(s,{queryKey:B.mutationKey,exact:!1},Y.id,function(J){return Object.assign(J,Q)})}};return B}function T5(r,o){return new Ye(r.queryClient,I5(r,o))}var R5=Object.defineProperty,D5=Object.getOwnPropertyDescriptor,to=function to(r,o,s,B){for(var Q=B>1?void 0:B?D5(o,s):o,Y=r.length-1,J;Y>=0;Y--)(J=r[Y])&&(Q=(B?J(o,s,Q):J(Q))||Q);return B&&Q&&R5(o,s,Q),Q};var _Pi=function(_le65){_inherits(Pi,_le65);function Pi(){var _this392;_classCallCheck(this,Pi);_this392=_callSuper(this,Pi),_this392.features={},_this392.realtimePostCreatedEvent=function(r){return new CustomEvent("wy:post_created",{bubbles:!0,composed:!1,detail:r})},_this392.realtimeCommentCreatedEvent=function(r){return new CustomEvent("wy:comment_created",{bubbles:!0,composed:!1,detail:r})},_this392.realtimeReactionAddedEvent=function(r){return new CustomEvent("wy:reaction_added",{bubbles:!0,composed:!1,detail:r})},_this392.realtimeReactionRemovedEvent=function(r){return new CustomEvent("wy:reaction_removed",{bubbles:!0,composed:!1,detail:r})},_this392.postsQuery=new as(_assertThisInitialized(_this392)),_this392.appQuery=new kt(_assertThisInitialized(_this392)),_this392.userQuery=new kt(_assertThisInitialized(_this392)),_this392.featuresQuery=new kt(_assertThisInitialized(_this392)),_this392.infiniteScroll=new ss(_assertThisInitialized(_this392)),_this392.pagerRef=Re(),_this392.addPostMutation=new tn(_assertThisInitialized(_this392)),_this392.handleRealtimePostCreated=function(r){!_this392.weavyContext||r.post.app_id!==_this392.app.id||r.post.created_by_id===_this392.user.id||(r.post.created_by=r.actor,sn(_this392.weavyContext.queryClient,["posts",_this392.app.id],r.post,void 0,{descending:!0}),_this392.dispatchEvent(_this392.realtimePostCreatedEvent(r)))},_this392.handleRealtimeCommentCreated=function(r){!_this392.weavyContext||r.actor.id===_this392.user.id||(tt(_this392.weavyContext.queryClient,["posts",_this392.app.id],r.comment.parent.id,function(o){o.comment_count=(o.comment_count||0)+1}),_this392.dispatchEvent(_this392.realtimeCommentCreatedEvent(r)))},_this392.handleRealtimeReactionAdded=function(r){!_this392.weavyContext||r.actor.id===_this392.user.id||r.entity.type!=="post"||(tt(_this392.weavyContext.queryClient,["posts",_this392.app.id],r.entity.id,function(o){o.reactions=[].concat(_toConsumableArray(o.reactions||[]),[{content:r.reaction,created_by_id:r.actor.id}])}),_this392.dispatchEvent(_this392.realtimeReactionAddedEvent(r)))},_this392.handleRealtimeReactionDeleted=function(r){!_this392.weavyContext||r.actor.id===_this392.user.id||r.entity.type!=="post"||(tt(_this392.weavyContext.queryClient,["posts",_this392.app.id],r.entity.id,function(o){o.reactions=o.reactions.filter(function(s){return s.created_by_id!==r.actor.id})}),_this392.dispatchEvent(_this392.realtimeReactionRemovedEvent(r)))},new rl(_assertThisInitialized(_this392),_Pi.styles);return _this392}_createClass(Pi,[{key:"scheduleUpdate",value:function(){var _scheduleUpdate5=_asyncToGenerator(_regeneratorRuntime().mark(function _callee265(){var r,o,s;return _regeneratorRuntime().wrap(function _callee265$(_context267){while(1)switch(_context267.prev=_context267.next){case 0:_context267.next=2;return yn(this);case 2:this.weavyContextConsumer=new $i(this,{context:Le,subscribe:!0});(r=this.weavyContextConsumer)!=null&&r.value&&this.weavyContext!==((o=this.weavyContextConsumer)==null?void 0:o.value)&&(this.weavyContext=(s=this.weavyContextConsumer)==null?void 0:s.value);_context267.next=6;return _get(_getPrototypeOf(Pi.prototype),"scheduleUpdate",this).call(this);case 6:case"end":return _context267.stop()}},_callee265,this)}));function scheduleUpdate(){return _scheduleUpdate5.apply(this,arguments)}return scheduleUpdate}()},{key:"handleSubmit",value:function handleSubmit(r){this.app&&this.addPostMutation.mutate({appId:this.app.id,text:r.detail.text,meetingId:r.detail.meetingId,blobs:r.detail.blobs,pollOptions:r.detail.pollOptions,embed:r.detail.embed,user:this.user})}},{key:"unsubscribeToRealtime",value:function unsubscribeToRealtime(r){this.weavyContext&&(this.weavyContext.unsubscribe("a".concat(r.id),"post_created",this.handleRealtimePostCreated),this.weavyContext.unsubscribe("a".concat(r.id),"comment_created",this.handleRealtimeCommentCreated),this.weavyContext.unsubscribe("a".concat(r.id),"reaction_added",this.handleRealtimeReactionAdded),this.weavyContext.unsubscribe("a".concat(r.id),"reaction_removed",this.handleRealtimeReactionDeleted))}},{key:"willUpdate",value:function willUpdate(r){var o,s,B,Q,Y,J;if(r.has("app")){var it=r.get("app");it&&it!==this.app&&this.unsubscribeToRealtime(it)}(r.has("uid")||r.has("weavyContext"))&&this.uid&&this.weavyContext&&(this.appQuery.trackQuery(Cd(this.weavyContext,this.uid,Qc.Posts)),this.userQuery.trackQuery(tr(this.weavyContext,["user"])),this.featuresQuery.trackQuery(tr(this.weavyContext,["features","feeds"]))),(o=this.appQuery.result)!=null&&o.isPending||(this.app=(s=this.appQuery.result)==null?void 0:s.data),(B=this.userQuery.result)!=null&&B.isPending||(this.user=(Q=this.userQuery.result)==null?void 0:Q.data),(Y=this.featuresQuery.result)!=null&&Y.isPending||(this.availableFeatures=(J=this.featuresQuery.result)==null?void 0:J.data),(r.has("weavyContext")||r.has("app"))&&this.weavyContext&&this.app&&this.postsQuery.trackInfiniteQuery(x5(this.weavyContext,this.app.id)),(r.has("weavyContext")||r.has("app")||r.has("user"))&&this.weavyContext&&this.app&&this.user&&(this.addPostMutation.trackMutation(C5(this.weavyContext,["posts",this.app.id])),this.subscribePostMutation=L5(this.weavyContext,this.app),this.removePostMutation=O5(this.weavyContext,this.app),this.restorePostMutation=T5(this.weavyContext,this.app),this.pollMutation=ly(this.weavyContext,["posts",this.app.id]),this.weavyContext.subscribe("a".concat(this.app.id),"post_created",this.handleRealtimePostCreated),this.weavyContext.subscribe("a".concat(this.app.id),"comment_created",this.handleRealtimeCommentCreated),this.weavyContext.subscribe("a".concat(this.app.id),"reaction_added",this.handleRealtimeReactionAdded),this.weavyContext.subscribe("a".concat(this.app.id),"reaction_removed",this.handleRealtimeReactionDeleted))}},{key:"update",value:function update(r){_get(_getPrototypeOf(Pi.prototype),"update",this).call(this,r),this.infiniteScroll.observe(this.postsQuery.result,this.pagerRef.value)}},{key:"renderPosts",value:function renderPosts(r,o,s,B,Q){var _this393=this;if(Q){var Y=Q.pages.flatMap(function(J){return J.data});return Lr(Y,function(J){return J.id},function(J){return[v(_templateObject399||(_templateObject399=_taggedTemplateLiteral(["<wy-post\n id=\"post-","\"\n .app=","\n .user=","\n .postId=","\n .temp=","\n .createdBy=","\n .createdAt=","\n .modifiedAt=","\n .isSubscribed=","\n .isTrashed=","\n .html=","\n .text=","\n .plain=","\n .attachments=","\n .meeting=","\n .pollOptions=","\n .embed=","\n .reactions=","\n .commentCount=","\n .availableFeatures=","\n .features=","\n @subscribe=","\n @trash=","\n @restore=","\n @vote=","\n ></wy-post>"])),J.id,r,o,J.id,J.temp||!1,J.created_by,J.created_at,J.modified_at,J.is_subscribed,J.is_trashed,J.html,J.text,J.plain,J.attachments,J.meeting,J.options,J.embed,J.reactions,J.comment_count||0,s,B,function(it){var nt;(nt=_this393.subscribePostMutation)==null||nt.mutate({id:it.detail.id,subscribe:it.detail.subscribe})},function(it){var nt;(nt=_this393.removePostMutation)==null||nt.mutate({id:it.detail.id})},function(it){var nt;(nt=_this393.restorePostMutation)==null||nt.mutate({id:it.detail.id})},function(it){var nt;(nt=_this393.pollMutation)==null||nt.mutate({optionId:it.detail.id,parentType:it.detail.parentType,parentId:it.detail.parentId})})]})}return O}},{key:"render",value:function render(){var _this$postsQuery$resu,_this394=this;var _ref283=(_this$postsQuery$resu=this.postsQuery.result)!==null&&_this$postsQuery$resu!==void 0?_this$postsQuery$resu:{},r=_ref283.data,o=_ref283.isPending;return v(_templateObject400||(_templateObject400=_taggedTemplateLiteral(["\n <div class=\"wy-posts\">\n ","\n <!-- this.user ?? -->\n ","\n </div>\n "])),this.availableFeatures&&this.app&&this.user&&kd(Fi.Write,this.app.access,this.app.permissions)?v(_templateObject401||(_templateObject401=_taggedTemplateLiteral(["\n <div class=\"wy-post\">\n <wy-editor\n editorLocation=\"apps\"\n .app=","\n .user=","\n .availableFeatures=","\n .features=","\n .typing=","\n .draft=","\n placeholder=","\n buttonText=","\n @submit=","\n ></wy-editor>\n </div>\n "])),this.app,this.user,this.availableFeatures,this.features,!1,!0,K$1("Create a post..."),K$1("Post"),function(s){return _this394.handleSubmit(s)}):O,o?v(_templateObject402||(_templateObject402=_taggedTemplateLiteral([" <wy-empty><wy-spinner overlay></wy-spinner></wy-empty> "]))):v(_templateObject403||(_templateObject403=_taggedTemplateLiteral(["\n ","\n <div "," class=\"wy-pager\"></div>\n "])),this.app&&this.user&&r&&this.availableFeatures?this.renderPosts(this.app,this.user,this.availableFeatures,this.features,r):v(_templateObject404||(_templateObject404=_taggedTemplateLiteral(["<wy-empty><wy-spinner class=\"wy-content-icon\"></wy-spinner></wy-empty>"]))),Ce(this.pagerRef)))}},{key:"disconnectedCallback",value:function disconnectedCallback(){this.weavyContext&&this.app&&this.unsubscribeToRealtime(this.app),_get(_getPrototypeOf(Pi.prototype),"disconnectedCallback",this).call(this)}}]);return Pi}(le);_Pi.styles=[ns,me,Be(_templateObject405||(_templateObject405=_taggedTemplateLiteral(["\n :host {\n position: relative;\n }\n "])))];to([K()],_Pi.prototype,"weavyContext",2);to([K()],_Pi.prototype,"user",2);to([m()],_Pi.prototype,"uid",2);to([m()],_Pi.prototype,"cssClass",2);to([K()],_Pi.prototype,"availableFeatures",2);to([m({type:Object})],_Pi.prototype,"features",2);to([K()],_Pi.prototype,"app",2);_Pi=to([de("wy-posts"),q()],_Pi);function useWeavy(r){var J,it,nt,ot,dt,Mt;var _useState=useState(),_useState2=_slicedToArray(_useState,2),o=_useState2[0],s=_useState2[1],B=_objectSpread(_objectSpread({},r),{},{cloudFilePickerUrl:(J=r.cloudFilePickerUrl)==null?void 0:J.toString(),locales:useMemo(function(){return r.locales},[(it=r.locales)==null?void 0:it.length]),tokenUrl:(nt=r.tokenUrl)==null?void 0:nt.toString(),tokenFactory:useMemo(function(){return r.tokenFactory},[(ot=r.tokenFactory)==null?void 0:ot.toString()]),url:(dt=r.url)==null?void 0:dt.toString(),zoomAuthenticationUrl:(Mt=r.url)==null?void 0:Mt.toString()}),_useState3=useState(B),_useState4=_slicedToArray(_useState3,2),Q=_useState4[0],Y=_useState4[1];return useEffect(function(){var Ot=new Y5(B);return s(Ot),function(){Ot==null||Ot.destroy()}},[]),useEffect(function(){if(o&&!o.isDestroyed){var Ot={};Object.entries(B).forEach(function(_ref284){var _ref285=_slicedToArray(_ref284,2),Qt=_ref285[0],Ut=_ref285[1];Ut!==Q[Qt]&&Object.assign(Ot,_defineProperty({},Qt,Ut))}),Object.keys(Ot).length&&(Y(B),Object.assign(o,Ot))}},[B]),o}var e=new Set(["children","localName","ref","style","className"]),n=new WeakMap,t=function t(r,o,s,B,Q){var Y=Q==null?void 0:Q[o];Y===void 0||s===B?(r[o]=s,s==null&&o in HTMLElement.prototype&&r.removeAttribute(o)):function(J,it,nt){var ot=n.get(J);ot===void 0&&n.set(J,ot=new Map);var dt=ot.get(it);nt!==void 0?dt===void 0?(ot.set(it,dt={handleEvent:nt}),J.addEventListener(it,dt)):dt.handleEvent=nt:dt!==void 0&&(ot["delete"](it),J.removeEventListener(it,dt))}(r,Y,s)},l=function l(_ref286){var r=_ref286.react,o=_ref286.tagName,s=_ref286.elementClass,B=_ref286.events,Q=_ref286.displayName;var Y=new Set(Object.keys(B!==null&&B!==void 0?B:{})),J=r.forwardRef(function(it,nt){var ot=r.useRef(null),dt=r.useRef(null),Mt={},Ot={};for(var _i16=0,_Object$entries5=Object.entries(it);_i16<_Object$entries5.length;_i16++){var _Object$entries5$_i=_slicedToArray(_Object$entries5[_i16],2),Qt=_Object$entries5$_i[0],Ut=_Object$entries5$_i[1];e.has(Qt)?Mt[Qt==="className"?"class":Qt]=Ut:Y.has(Qt)||Qt in s.prototype?Ot[Qt]=Ut:Mt[Qt]=Ut}return r.useLayoutEffect(function(){if(dt.current!==null){for(var _Qt5 in Ot)t(dt.current,_Qt5,it[_Qt5],ot.current?ot.current[_Qt5]:void 0,B);ot.current=it}}),r.useLayoutEffect(function(){var Qt;(Qt=dt.current)==null||Qt.removeAttribute("defer-hydration")},[]),Mt.suppressHydrationWarning=!0,r.createElement(o,_objectSpread(_objectSpread({},Mt),{},{ref:r.useCallback(function(Qt){dt.current=Qt,typeof nt=="function"?nt(Qt):nt!==null&&(nt.current=Qt)},[nt])}))});return J.displayName=Q!==null&&Q!==void 0?Q:s.name,J},WyChat=l({react:React,tagName:"wy-chat",elementClass:_dc,events:{onWyMessageCreated:"wy:message_created",onWyReactionAdded:"wy:reaction_added",onWyReactionRemoved:"wy:reaction_removed",onWyAppUpdated:"wy:app_updated"}});Y5.version="21.1.1";Y5.sourceName="@weavy/uikit-react";var WyContext=l({react:React,tagName:"wy-context",elementClass:Pt}),WyFiles=l({react:React,tagName:"wy-files",elementClass:_Ur,events:{onWyFileCreated:"wy:file_created",onWyFileUpdated:"wy:file_updated",onWyFileTrashed:"wy:file_trashed",onWyFileRestored:"wy:file_restored",onWyFileDeleted:"wy:file_deleted"}}),WyMessenger=l({react:React,tagName:"wy-messenger",elementClass:_di,events:{onWyMessageCreated:"wy:message_created",onWyAppCreated:"wy:app_created",onWyConversationMarked:"wy:conversation_marked",onWyConversationDelivered:"wy:conversation_delivered",onWyMemberAdded:"wy:member_added"}}),WyPosts=l({react:React,tagName:"wy-posts",elementClass:_Pi,events:{onWyPostCreated:"wy:post_created",onWyCommentCreated:"wy:comment_created",onWyReactionAdded:"wy:reaction_added",onWyReactionRemoved:"wy:reaction_removed"}}),WyAttachment=l({react:React,tagName:"wy-attachment",elementClass:Vn}),WyAttachmentsList=l({react:React,tagName:"wy-attachments-list",elementClass:nc,events:{onFileOpen:"file-open"}}),WyAvatar=l({react:React,tagName:"wy-avatar",elementClass:ln}),WyBadge=l({react:React,tagName:"wy-badge",elementClass:Ka}),WyButton=l({react:React,tagName:"wy-button",elementClass:Nn}),WyCloudFiles=l({react:React,tagName:"wy-cloud-files",elementClass:Wo,events:{onExternalBlobs:"external-blobs",onReleaseFocus:"release-focus"}}),WyComments=l({react:React,tagName:"wy-comments",elementClass:_Ei}),WyComment=l({react:React,tagName:"wy-comment",elementClass:vt,events:{onVote:"vote",onSubscribe:"subscribe",onTrash:"trash",onRestore:"restore"}}),WyCommentView=l({react:React,tagName:"wy-comment-view",elementClass:Tt,events:{onVote:"vote",onTrash:"trash",onEdit:"edit"}}),WyCommentEdit=l({react:React,tagName:"wy-comment-edit",elementClass:mt,events:{onEdit:"edit"}}),WyCommentEditor=l({react:React,tagName:"wy-comment-editor",elementClass:Wp,events:{onSubmit:"submit"}}),WyCommentTrashed=l({react:React,tagName:"wy-comment-trashed",elementClass:Kl,events:{onRestore:"restore"}}),WyConversation=l({react:React,tagName:"wy-conversation",elementClass:sr,events:{onReleaseFocus:"release-focus"}}),WyConversationNew=l({react:React,tagName:"wy-conversation-new",elementClass:hc,events:{onReleaseFocus:"release-focus"}}),WyConversationList=l({react:React,tagName:"wy-conversation-list",elementClass:Wn,events:{onConversationSelected:"conversation-selected"}}),WyConversationListItem=l({react:React,tagName:"wy-conversation-list-item",elementClass:br,events:{onRefetch:"refetch",onSelected:"selected",onStar:"star",onPin:"pin",onMark:"mark",onLeave:"leave"}}),WyDropdown=l({react:React,tagName:"wy-dropdown",elementClass:si}),WyDropdownItem=l({react:React,tagName:"wy-dropdown-item",elementClass:Ql}),WyDropdownOption=l({react:React,tagName:"wy-dropdown-option",elementClass:cc}),WyDropdownDivider=l({react:React,tagName:"wy-dropdown-divider",elementClass:Mh}),WyEditor=l({react:React,tagName:"wy-editor",elementClass:We,events:{onSubmit:"submit"}}),WyEmbed=l({react:React,tagName:"wy-embed",elementClass:rc,events:{onEmbedRemove:"embed-remove",onEmbedSwap:"embed-swap"}}),WyEmpty=l({react:React,tagName:"wy-empty",elementClass:ec}),WyFileItem=l({react:React,tagName:"wy-file-item",elementClass:Hi,events:{onEditName:"edit-name",onRename:"rename",onTrash:"trash",onRestore:"restore",onDeleteForever:"delete-forever",onSubscribe:"subscribe"}}),WyFileMenu=l({react:React,tagName:"wy-file-menu",elementClass:jo,events:{onEditName:"edit-name",onSubscribe:"subscribe",onTrash:"trash",onRestore:"restore",onDeleteForever:"delete-forever"}}),WyFileVersions=l({react:React,tagName:"wy-file-versions",elementClass:un,events:{onFileVersionSelect:"file-version-select"}}),WyFilesAppbar=l({react:React,tagName:"wy-files-appbar",elementClass:li,events:{onReleaseFocus:"release-focus",onUploadFiles:"upload-files",onExternalBlobs:"external-blobs",onCreateFiles:"create-files",onOrder:"order",onView:"view",onShowTrashed:"show-trashed",onSubscribe:"subscribe"}}),WyFilesList=l({react:React,tagName:"wy-files-list",elementClass:Si,events:{onFileOpen:"file-open",onOrder:"order",onEditName:"edit-name",onRename:"rename",onTrash:"trash",onRestore:"restore",onDeleteForever:"delete-forever",onSubscribe:"subscribe"}}),WyIcon=l({react:React,tagName:"wy-icon",elementClass:ar}),WyImageGrid=l({react:React,tagName:"wy-image-grid",elementClass:ic,events:{onFileOpen:"file-open"}}),WyMeetingCard=l({react:React,tagName:"wy-meeting-card",elementClass:sc}),WyMessage=l({react:React,tagName:"wy-message",elementClass:ct}),WyMessages=l({react:React,tagName:"wy-messages",elementClass:Ir,events:{onScrollToBottom:"scroll-to-bottom"}}),WyMessageEditor=l({react:React,tagName:"wy-message-editor",elementClass:qp,events:{onSubmit:"submit"}}),WyOverlay=l({react:React,tagName:"wy-overlay",elementClass:Ua,events:{onReleaseFocus:"release-focus",onRemoveModal:"removeModal"}}),WyPdfViewer=l({react:React,tagName:"wy-pdf-viewer",elementClass:qa}),WyPoll=l({react:React,tagName:"wy-poll",elementClass:Zl,events:{onReleaseFocus:"release-focus",onVote:"vote"}}),WyPollOption=l({react:React,tagName:"wy-poll-option",elementClass:jn,events:{onReleaseFocus:"release-focus",onVote:"vote"}}),WyPortal=l({react:React,tagName:"wy-portal",elementClass:Ys}),WyPost=l({react:React,tagName:"wy-post",elementClass:pt,events:{onVote:"vote",onSubscribe:"subscribe",onTrash:"trash",onRestore:"restore"}}),WyPostView=l({react:React,tagName:"wy-post-view",elementClass:lt,events:{onVote:"vote",onSubscribe:"subscribe",onTrash:"trash",onEdit:"edit"}}),WyPostEdit=l({react:React,tagName:"wy-post-edit",elementClass:$t,events:{onEdit:"edit"}}),WyPostTrashed=l({react:React,tagName:"wy-post-trashed",elementClass:Jl,events:{onRestore:"restore"}}),WyPresence=l({react:React,tagName:"wy-presence",elementClass:tc}),WyPreview=l({react:React,tagName:"wy-preview",elementClass:Ct,events:{onReleaseFocus:"release-focus"}}),WyPreviewItem=l({react:React,tagName:"wy-preview-item",elementClass:Qa}),WyPreviewEmbed=l({react:React,tagName:"wy-preview-embed",elementClass:Ho}),WyPreviewIcon=l({react:React,tagName:"wy-preview-icon",elementClass:Vo}),WyPreviewImage=l({react:React,tagName:"wy-preview-image",elementClass:Wa}),WyPreviewMedia=l({react:React,tagName:"wy-preview-media",elementClass:Bo}),WyPreviewText=l({react:React,tagName:"wy-preview-text",elementClass:hn}),WyReactions=l({react:React,tagName:"wy-reactions",elementClass:rr,events:{onReleaseFocus:"release-focus"}}),WyReactionItem=l({react:React,tagName:"wy-reaction-item",elementClass:Ul}),WySheet=l({react:React,tagName:"wy-sheet",elementClass:_No,events:{onReleaseFocus:"release-focus",onRemoveModal:"removeModal"}}),WySkeleton=l({react:React,tagName:"wy-skeleton",elementClass:Wl}),WySpinner=l({react:React,tagName:"wy-spinner",elementClass:Na}),WyTyping=l({react:React,tagName:"wy-typing",elementClass:cn}),WyUsersSearch=l({react:React,tagName:"wy-users-search",elementClass:Un,events:{onSubmit:"submit"}});export{Y5 as Weavy,WyAttachment,WyAttachmentsList,WyAvatar,WyBadge,WyButton,WyChat,WyCloudFiles,WyComment,WyCommentEdit,WyCommentEditor,WyCommentTrashed,WyCommentView,WyComments,WyContext,WyConversation,WyConversationList,WyConversationListItem,WyConversationNew,WyDropdown,WyDropdownDivider,WyDropdownItem,WyDropdownOption,WyEditor,WyEmbed,WyEmpty,WyFileItem,WyFileMenu,WyFileVersions,WyFiles,WyFilesAppbar,WyFilesList,WyIcon,WyImageGrid,WyMeetingCard,WyMessage,WyMessageEditor,WyMessages,WyMessenger,WyOverlay,WyPdfViewer,WyPoll,WyPollOption,WyPortal,WyPost,WyPostEdit,WyPostTrashed,WyPostView,WyPosts,WyPresence,WyPreview,WyPreviewEmbed,WyPreviewIcon,WyPreviewImage,WyPreviewItem,WyPreviewMedia,WyPreviewText,WyReactionItem,WyReactions,WySheet,WySkeleton,WySpinner,WyTyping,WyUsersSearch,useWeavy};