-
Notifications
You must be signed in to change notification settings - Fork 354
/
1717.911209a5.iframe.bundle.js
1 lines (1 loc) · 58.1 KB
/
1717.911209a5.iframe.bundle.js
1
(self.webpackChunkwebviewer_ui=self.webpackChunkwebviewer_ui||[]).push([[1717],{"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/src/index.js??ruleSet[1].rules[14].use[2]!./node_modules/sass-loader/dist/cjs.js!./src/components/NoteHeader/NoteHeader.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,":host{display:inline-block;container-type:inline-size;width:100%;height:100%;overflow:hidden}@media(min-width:901px){.App:not(.is-web-component) .hide-in-desktop{display:none}}@container (min-width: 901px){.hide-in-desktop{display:none}}@media(min-width:641px)and (max-width:900px){.App:not(.is-in-desktop-only-mode):not(.is-web-component) .hide-in-tablet{display:none}}@container (min-width: 641px) and (max-width: 900px){.App.is-web-component:not(.is-in-desktop-only-mode) .hide-in-tablet{display:none}}@media(max-width:640px)and (min-width:431px){.App:not(.is-web-component) .hide-in-mobile{display:none}}@container (max-width: 640px) and (min-width: 431px){.App.is-web-component .hide-in-mobile{display:none}}@media(max-width:430px){.App:not(.is-web-component) .hide-in-small-mobile{display:none}}@container (max-width: 430px){.App.is-web-component .hide-in-small-mobile{display:none}}.always-hide{display:none}.NoteHeader{padding-right:12px;position:relative;flex:1;color:var(--text-color);display:flex}@media (-ms-high-contrast:active),(-ms-high-contrast:none){.NoteHeader{flex:none}}.NoteHeader .type-icon{margin:2px;width:24px;height:24px}.NoteHeader .type-icon-container{padding-right:13px}.NoteHeader .type-icon-container .unread-notification{position:absolute;width:13px;height:13px;right:-2px;top:-2px;border-radius:10000px;border:2px solid var(--component-background);background:#00a5e4}.NoteHeader .author-and-date{flex:1;min-width:0;position:relative}.NoteHeader .author-and-date.isReply{padding-left:0;padding-top:0;font-size:10px}.NoteHeader .author-and-date .author-and-overflow{display:flex;justify-content:space-between}.NoteHeader .author-and-date .author-and-overflow .author-and-time{display:flex;flex-direction:column;word-break:break-word}.NoteHeader .author-and-date .author-and-overflow .author-and-time .author{font-weight:700}.NoteHeader .author-and-date .author-and-overflow .author-and-time .date-and-num-replies{display:flex}.NoteHeader .author-and-date .author-and-overflow .author-and-time .date-and-num-replies .date-and-time{opacity:.8;font-size:10px;color:var(--faded-text)}@media(max-width:640px){.App:not(.is-in-desktop-only-mode):not(.is-web-component) .NoteHeader .author-and-date .author-and-overflow .author-and-time .date-and-num-replies .date-and-time{font-size:12px}}@container (max-width: 640px){.App.is-web-component:not(.is-in-desktop-only-mode) .NoteHeader .author-and-date .author-and-overflow .author-and-time .date-and-num-replies .date-and-time{font-size:12px}}.NoteHeader .author-and-date .author-and-overflow .author-and-time .date-and-num-replies .num-replies-container{display:flex;flex-grow:1;padding-left:10px}.NoteHeader .author-and-date .author-and-overflow .author-and-time .date-and-num-replies .num-replies-container .num-reply-icon{height:12px;width:12px}.NoteHeader .author-and-date .author-and-overflow .author-and-time .date-and-num-replies .num-replies-container .num-replies{opacity:.8;font-size:10px}@media(max-width:640px){.App:not(.is-in-desktop-only-mode):not(.is-web-component) .NoteHeader .author-and-date .author-and-overflow .author-and-time .date-and-num-replies .num-replies-container .num-replies{font-size:12px}}@container (max-width: 640px){.App.is-web-component:not(.is-in-desktop-only-mode) .NoteHeader .author-and-date .author-and-overflow .author-and-time .date-and-num-replies .num-replies-container .num-replies{font-size:12px}}.NoteHeader .author-and-date .author-and-overflow .state-and-overflow{display:flex;flex:1;justify-content:flex-end}.NoteHeader .author-and-date .author-and-overflow .state-and-overflow .tracked-change-icon-wrapper{margin-left:8px;cursor:pointer}.NoteHeader .author-and-date .author-and-overflow .state-and-overflow .tracked-change-icon-wrapper .tracked-change-icon{margin:2px;width:24px;height:24px}.NoteHeader .author-name{font-weight:700}.parent{padding-left:12px;padding-top:12px}",""]),exports.locals={LEFT_HEADER_WIDTH:"41px",RIGHT_HEADER_WIDTH:"41px"},module.exports=exports},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/src/index.js??ruleSet[1].rules[14].use[2]!./node_modules/sass-loader/dist/cjs.js!./src/components/NotePopup/NotePopup.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,":host{display:inline-block;container-type:inline-size;width:100%;height:100%;overflow:hidden}@media(min-width:901px){.App:not(.is-web-component) .hide-in-desktop{display:none}}@container (min-width: 901px){.hide-in-desktop{display:none}}@media(min-width:641px)and (max-width:900px){.App:not(.is-in-desktop-only-mode):not(.is-web-component) .hide-in-tablet{display:none}}@container (min-width: 641px) and (max-width: 900px){.App.is-web-component:not(.is-in-desktop-only-mode) .hide-in-tablet{display:none}}@media(max-width:640px)and (min-width:431px){.App:not(.is-web-component) .hide-in-mobile{display:none}}@container (max-width: 640px) and (min-width: 431px){.App.is-web-component .hide-in-mobile{display:none}}@media(max-width:430px){.App:not(.is-web-component) .hide-in-small-mobile{display:none}}@container (max-width: 430px){.App.is-web-component .hide-in-small-mobile{display:none}}.always-hide{display:none}.NotePopup{flex-grow:0;justify-content:flex-end;-webkit-user-select:none;-moz-user-select:none;user-select:none;position:relative}.NotePopup,.NotePopup .overflow{display:flex;width:28px;height:28px}.NotePopup .overflow{border-radius:4px;justify-content:center;align-items:center}.NotePopup .overflow .Icon{width:24px;height:24px}.NotePopup .overflow:hover{background:var(--blue-1)}.NotePopup .overflow.active{background:var(--popup-button-active)}.NotePopup .options{display:flex;flex-direction:column;box-shadow:0 0 3px 0 var(--box-shadow);z-index:80;position:absolute;border-radius:4px;background:var(--component-background);top:40px;width:-moz-max-content;width:max-content}@media (-ms-high-contrast:active),(-ms-high-contrast:none){.NotePopup .options{right:0}}.NotePopup .options .note-popup-option{padding:0;border:none;background-color:transparent;align-items:flex-start}:host(:not([data-tabbing=true])) .NotePopup .options .note-popup-option,html:not([data-tabbing=true]) .NotePopup .options .note-popup-option{outline:none}.NotePopup .options.options-reply{top:30px}.NotePopup .options .option{display:flex;flex-direction:column;justify-content:center;height:28px;padding-left:8px;padding-right:17px;border-radius:0}.NotePopup .options .option:hover{background-color:var(--popup-button-hover)}.NotePopup .options .option:first-child{border-top-right-radius:4px;border-top-left-radius:4px}.NotePopup .options .option:last-child{border-bottom-right-radius:4px}.NotePopup .Button.active{background:var(--popup-button-active)}",""]),exports.locals={LEFT_HEADER_WIDTH:"41px",RIGHT_HEADER_WIDTH:"41px"},module.exports=exports},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/src/index.js??ruleSet[1].rules[14].use[2]!./node_modules/sass-loader/dist/cjs.js!./src/components/NoteState/NoteState.scss":(module,exports,__webpack_require__)=>{(exports=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(!1)).push([module.id,":host{display:inline-block;container-type:inline-size;width:100%;height:100%;overflow:hidden}@media(min-width:901px){.App:not(.is-web-component) .hide-in-desktop{display:none}}@container (min-width: 901px){.hide-in-desktop{display:none}}@media(min-width:641px)and (max-width:900px){.App:not(.is-in-desktop-only-mode):not(.is-web-component) .hide-in-tablet{display:none}}@container (min-width: 641px) and (max-width: 900px){.App.is-web-component:not(.is-in-desktop-only-mode) .hide-in-tablet{display:none}}@media(max-width:640px)and (min-width:431px){.App:not(.is-web-component) .hide-in-mobile{display:none}}@container (max-width: 640px) and (min-width: 431px){.App.is-web-component .hide-in-mobile{display:none}}@media(max-width:430px){.App:not(.is-web-component) .hide-in-small-mobile{display:none}}@container (max-width: 430px){.App.is-web-component .hide-in-small-mobile{display:none}}.always-hide{display:none}.multi-state-container{position:relative;bottom:52px;pointer-events:auto}.NoteState{border:none;background-color:transparent;flex-grow:0;display:flex;justify-content:flex-end;-webkit-user-select:none;-moz-user-select:none;user-select:none;padding:0 10px 0 15px}:host(:not([data-tabbing=true])) .NoteState,html:not([data-tabbing=true]) .NoteState{outline:none}@media (-ms-high-contrast:active),(-ms-high-contrast:none){.NoteState{padding-left:0;padding-right:5px}}.NoteState .overflow{width:28px;height:28px;border-radius:4px}.NoteState .overflow .Icon{margin:4px;width:20px;height:20px}.NoteState .overflow:hover{background:var(--blue-1)}.NoteState .Button.active,.NoteState .overflow.active{background:var(--popup-button-active)}.note-state-options{padding:0;border:none;background-color:transparent;font-size:inherit;display:flex;flex-direction:column;box-shadow:0 0 3px 0 var(--box-shadow);z-index:80;border-radius:4px;background:var(--component-background);pointer-events:auto}:host(:not([data-tabbing=true])) .note-state-options,html:not([data-tabbing=true]) .note-state-options{outline:none}.note-state-options *{box-sizing:border-box}.note-state-options .note-state-option{display:flex;flex-direction:row;justify-content:flex-start;height:35px;padding:8px;border-radius:0}.note-state-options .note-state-option .Icon{margin-right:5px;width:18px;height:18px}.note-state-options .note-state-option:hover{background-color:var(--popup-button-hover)}.note-state-options .note-state-option:first-child{border-top-right-radius:4px;border-top-left-radius:4px}.note-state-options .note-state-option:last-child{border-bottom-right-radius:4px}",""]),exports.locals={LEFT_HEADER_WIDTH:"41px",RIGHT_HEADER_WIDTH:"41px"},module.exports=exports},"./src/components/NoteHeader/NoteHeader.scss":(module,__unused_webpack_exports,__webpack_require__)=>{var api=__webpack_require__("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),content=__webpack_require__("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/src/index.js??ruleSet[1].rules[14].use[2]!./node_modules/sass-loader/dist/cjs.js!./src/components/NoteHeader/NoteHeader.scss");"string"==typeof(content=content.__esModule?content.default:content)&&(content=[[module.id,content,""]]);var options={insert:"head",singleton:!1};api(content,options);module.exports=content.locals||{}},"./src/components/NotePopup/NotePopup.scss":(module,__unused_webpack_exports,__webpack_require__)=>{var api=__webpack_require__("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),content=__webpack_require__("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/src/index.js??ruleSet[1].rules[14].use[2]!./node_modules/sass-loader/dist/cjs.js!./src/components/NotePopup/NotePopup.scss");"string"==typeof(content=content.__esModule?content.default:content)&&(content=[[module.id,content,""]]);var options={insert:"head",singleton:!1};api(content,options);module.exports=content.locals||{}},"./src/components/NoteState/NoteState.scss":(module,__unused_webpack_exports,__webpack_require__)=>{var api=__webpack_require__("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),content=__webpack_require__("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/src/index.js??ruleSet[1].rules[14].use[2]!./node_modules/sass-loader/dist/cjs.js!./src/components/NoteState/NoteState.scss");"string"==typeof(content=content.__esModule?content.default:content)&&(content=[[module.id,content,""]]);var options={insert:"head",singleton:!1};api(content,options);module.exports=content.locals||{}},"./src/components/NoteHeader/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>components_NoteHeader});var react=__webpack_require__("./node_modules/react/index.js"),prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),core=__webpack_require__("./src/core/index.js"),NotePopup=__webpack_require__("./src/components/NotePopup/NotePopup.js"),Tooltip=__webpack_require__("./src/components/Tooltip/index.js"),useTranslation=__webpack_require__("./node_modules/react-i18next/dist/es/useTranslation.js"),es=__webpack_require__("./node_modules/react-redux/es/index.js"),selectors=__webpack_require__("./src/redux/selectors/index.js");function _array_like_to_array(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _define_property(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _sliced_to_array(arr,i){return function _array_with_holes(arr){if(Array.isArray(arr))return arr}(arr)||function _iterable_to_array_limit(arr,i){var _i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null!=_i){var _s,_e,_arr=[],_n=!0,_d=!1;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}}(arr,i)||_unsupported_iterable_to_array(arr,i)||function _non_iterable_rest(){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 _to_consumable_array(arr){return function _array_without_holes(arr){if(Array.isArray(arr))return _array_like_to_array(arr)}(arr)||function _iterable_to_array(iter){if("undefined"!=typeof Symbol&&null!=iter[Symbol.iterator]||null!=iter["@@iterator"])return Array.from(iter)}(arr)||_unsupported_iterable_to_array(arr)||function _non_iterable_spread(){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 _unsupported_iterable_to_array(o,minLen){if(o){if("string"==typeof o)return _array_like_to_array(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);return"Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_array_like_to_array(o,minLen):void 0}}function NotePopupContainer(props){var activeDocumentViewerKey=_sliced_to_array((0,es.d4)((function(state){return[selectors.A.getActiveDocumentViewerKey(state)]})),1)[0],annotation=props.annotation,setIsEditing=props.setIsEditing,noteIndex=props.noteIndex,_React_useState=_sliced_to_array(react.useState(core.A.canModify(annotation)),2),canModify=_React_useState[0],setCanModify=_React_useState[1],_React_useState1=_sliced_to_array(react.useState(core.A.canModifyContents(annotation)),2),canModifyContents=_React_useState1[0],setCanModifyContents=_React_useState1[1],_React_useState2=_sliced_to_array(react.useState(!1),2),isOpen=_React_useState2[0],setIsOpen=_React_useState2[1],t=_sliced_to_array((0,useTranslation.B)(),1)[0];react.useEffect((function(){var onUpdateAnnotationPermission=function onUpdateAnnotationPermission(){setCanModify(core.A.canModify(annotation,activeDocumentViewerKey)),setCanModifyContents(core.A.canModifyContents(annotation,activeDocumentViewerKey))};return onUpdateAnnotationPermission(),core.A.addEventListener("updateAnnotationPermission",onUpdateAnnotationPermission,void 0,activeDocumentViewerKey),function(){return core.A.removeEventListener("updateAnnotationPermission",onUpdateAnnotationPermission,activeDocumentViewerKey)}}),[annotation,activeDocumentViewerKey]);var passProps={handleEdit:react.useCallback((function(){(function _instanceof(left,right){return null!=right&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?!!right[Symbol.hasInstance](left):left instanceof right})(annotation,window.Core.Annotations.FreeTextAnnotation)&&core.A.getAnnotationManager(activeDocumentViewerKey).isFreeTextEditingEnabled()?core.A.getAnnotationManager(activeDocumentViewerKey).trigger("annotationDoubleClicked",annotation):setIsEditing(!0,noteIndex)}),[annotation,setIsEditing,noteIndex]),handleDelete:react.useCallback((function(){core.A.deleteAnnotations([annotation].concat(_to_consumable_array(annotation.getGroupedChildren())),void 0,activeDocumentViewerKey)}),[annotation]),isEditable:canModifyContents,isDeletable:canModify&&!(null==annotation?void 0:annotation.NoDelete),isOpen,closePopup:function(){return setIsOpen(!1)},openPopup:function(){return setIsOpen(!0)}};return react.createElement(Tooltip.A,{content:t("formField.formFieldPopup.options")},react.createElement("div",null,react.createElement(NotePopup.A,function _object_spread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{},ownKeys=Object.keys(source);"function"==typeof Object.getOwnPropertySymbols&&(ownKeys=ownKeys.concat(Object.getOwnPropertySymbols(source).filter((function(sym){return Object.getOwnPropertyDescriptor(source,sym).enumerable})))),ownKeys.forEach((function(key){_define_property(target,key,source[key])}))}return target}({},props,passProps))))}const NotePopup_NotePopupContainer=NotePopupContainer;NotePopupContainer.__docgenInfo={description:"",methods:[],displayName:"NotePopupContainer"};const components_NotePopup=NotePopup_NotePopupContainer;NotePopup_NotePopupContainer.__docgenInfo={description:"",methods:[],displayName:"NotePopupContainer"};var NoteState=__webpack_require__("./src/components/NoteState/NoteState.js"),NoteStateUtils=__webpack_require__("./src/helpers/NoteStateUtils.js");function NoteStateContainer_array_like_to_array(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function NoteStateContainer_define_property(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function NoteStateContainer_sliced_to_array(arr,i){return function NoteStateContainer_array_with_holes(arr){if(Array.isArray(arr))return arr}(arr)||function NoteStateContainer_iterable_to_array_limit(arr,i){var _i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null!=_i){var _s,_e,_arr=[],_n=!0,_d=!1;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}}(arr,i)||function NoteStateContainer_unsupported_iterable_to_array(o,minLen){if(!o)return;if("string"==typeof o)return NoteStateContainer_array_like_to_array(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return NoteStateContainer_array_like_to_array(o,minLen)}(arr,i)||function NoteStateContainer_non_iterable_rest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var propTypes={annotation:prop_types_default().object};function NoteStateContainer(props){var activeDocumentViewerKey=NoteStateContainer_sliced_to_array((0,es.d4)((function(state){return[selectors.A.getActiveDocumentViewerKey(state)]})),1)[0],annotation=props.annotation,handleStateChange=react.useCallback((function handleStateChangeCallback(newValue){var stateAnnotation=(0,NoteStateUtils.H)(annotation,newValue,activeDocumentViewerKey);annotation.addReply(stateAnnotation);var annotationManager=core.A.getAnnotationManager(activeDocumentViewerKey);annotationManager.addAnnotation(stateAnnotation),annotationManager.trigger("addReply",[stateAnnotation,annotation,annotationManager.getRootAnnotation(annotation)])}),[annotation,activeDocumentViewerKey]);return react.createElement("div",null,react.createElement(NoteState.A,function NoteStateContainer_object_spread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{},ownKeys=Object.keys(source);"function"==typeof Object.getOwnPropertySymbols&&(ownKeys=ownKeys.concat(Object.getOwnPropertySymbols(source).filter((function(sym){return Object.getOwnPropertyDescriptor(source,sym).enumerable})))),ownKeys.forEach((function(key){NoteStateContainer_define_property(target,key,source[key])}))}return target}({handleStateChange},props)))}NoteStateContainer.propTypes=propTypes;const NoteState_NoteStateContainer=NoteStateContainer;NoteStateContainer.__docgenInfo={description:"",methods:[],displayName:"NoteStateContainer",props:{annotation:{description:"",type:{name:"object"},required:!1}}};const components_NoteState=NoteState_NoteStateContainer;NoteState_NoteStateContainer.__docgenInfo={description:"",methods:[],displayName:"NoteStateContainer",props:{annotation:{description:"",type:{name:"object"},required:!1}}};var Icon=__webpack_require__("./src/components/Icon/index.js"),Context=__webpack_require__("./src/components/Note/Context.js");function NoteUnpostedCommentIndicator_array_like_to_array(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function NoteUnpostedCommentIndicator_sliced_to_array(arr,i){return function NoteUnpostedCommentIndicator_array_with_holes(arr){if(Array.isArray(arr))return arr}(arr)||function NoteUnpostedCommentIndicator_iterable_to_array_limit(arr,i){var _i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null!=_i){var _s,_e,_arr=[],_n=!0,_d=!1;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}}(arr,i)||function NoteUnpostedCommentIndicator_unsupported_iterable_to_array(o,minLen){if(!o)return;if("string"==typeof o)return NoteUnpostedCommentIndicator_array_like_to_array(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return NoteUnpostedCommentIndicator_array_like_to_array(o,minLen)}(arr,i)||function NoteUnpostedCommentIndicator_non_iterable_rest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var NoteUnpostedCommentIndicator=function(param){var annotationId=param.annotationId,pendingEditTextMap=param.pendingEditTextMap,pendingReplyMap=param.pendingReplyMap,pendingAttachmentMap=param.pendingAttachmentMap,t=(0,useTranslation.B)().t,_useState=NoteUnpostedCommentIndicator_sliced_to_array((0,react.useState)(!1),2),hasUnpostedComment=_useState[0],setHasUnpostedComment=_useState[1],_useState1=NoteUnpostedCommentIndicator_sliced_to_array((0,react.useState)(!1),2),hasUnpostedReply=_useState1[0],setHasUnpostedReply=_useState1[1],_useState2=NoteUnpostedCommentIndicator_sliced_to_array((0,react.useState)(!1),2),hasUnpostedAttachment=_useState2[0],setHasUnpostedAttachment=_useState2[1];return(0,react.useEffect)((function(){var _pendingEditTextMap_annotationId,_pendingReplyMap_annotationId,_pendingAttachmentMap_annotationId;setHasUnpostedComment((null===(_pendingEditTextMap_annotationId=pendingEditTextMap[annotationId])||void 0===_pendingEditTextMap_annotationId?void 0:_pendingEditTextMap_annotationId.length)>0),setHasUnpostedReply((null===(_pendingReplyMap_annotationId=pendingReplyMap[annotationId])||void 0===_pendingReplyMap_annotationId?void 0:_pendingReplyMap_annotationId.length)>0),setHasUnpostedAttachment((null===(_pendingAttachmentMap_annotationId=pendingAttachmentMap[annotationId])||void 0===_pendingAttachmentMap_annotationId?void 0:_pendingAttachmentMap_annotationId.length)>0)}),[pendingEditTextMap,pendingReplyMap,pendingAttachmentMap]),hasUnpostedComment||hasUnpostedReply||hasUnpostedAttachment?react.createElement("div",{"data-element":"unpostedCommentIndicator"},react.createElement(Tooltip.A,{content:t("message.unpostedComment")},react.createElement("div",null,react.createElement(Icon.A,{className:"type-icon",glyph:"icon-unposted-comment"})))):null};const NoteUnpostedCommentIndicator_NoteUnpostedCommentIndicator=NoteUnpostedCommentIndicator;NoteUnpostedCommentIndicator.__docgenInfo={description:"",methods:[],displayName:"NoteUnpostedCommentIndicator"};var NoteUnpostedCommentIndicatorContainer=function(param){var annotationId=param.annotationId,isDisabled=(0,es.d4)((function(state){return selectors.A.isElementDisabled(state,"unpostedCommentIndicator")})),_React_useContext=react.useContext(Context.A),pendingEditTextMap=_React_useContext.pendingEditTextMap,pendingReplyMap=_React_useContext.pendingReplyMap,pendingAttachmentMap=_React_useContext.pendingAttachmentMap;return isDisabled?null:react.createElement(NoteUnpostedCommentIndicator_NoteUnpostedCommentIndicator,{annotationId,pendingEditTextMap,pendingReplyMap,pendingAttachmentMap})};const NoteUnpostedCommentIndicator_NoteUnpostedCommentIndicatorContainer=NoteUnpostedCommentIndicatorContainer;NoteUnpostedCommentIndicatorContainer.__docgenInfo={description:"",methods:[],displayName:"NoteUnpostedCommentIndicatorContainer"};const components_NoteUnpostedCommentIndicator=NoteUnpostedCommentIndicator_NoteUnpostedCommentIndicatorContainer;NoteUnpostedCommentIndicator_NoteUnpostedCommentIndicatorContainer.__docgenInfo={description:"",methods:[],displayName:"NoteUnpostedCommentIndicatorContainer"};var Choice=__webpack_require__("./src/components/Choice/index.js"),getLatestActivityDate=__webpack_require__("./src/helpers/getLatestActivityDate.js"),getColor=__webpack_require__("./src/helpers/getColor.js"),helpers_color=__webpack_require__("./src/helpers/color.js"),dayjs_min=__webpack_require__("./node_modules/dayjs/dayjs.min.js"),dayjs_min_default=__webpack_require__.n(dayjs_min),classnames=__webpack_require__("./node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(classnames),sortStrategies=__webpack_require__("./src/constants/sortStrategies.js"),theme=__webpack_require__("./src/constants/theme.js"),officeEditor=__webpack_require__("./src/constants/officeEditor.js"),commonColors=__webpack_require__("./src/constants/commonColors.js");__webpack_require__("./src/components/NoteHeader/NoteHeader.scss");function NoteHeader_array_like_to_array(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function NoteHeader_sliced_to_array(arr,i){return function NoteHeader_array_with_holes(arr){if(Array.isArray(arr))return arr}(arr)||function NoteHeader_iterable_to_array_limit(arr,i){var _i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null!=_i){var _s,_e,_arr=[],_n=!0,_d=!1;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}}(arr,i)||function NoteHeader_unsupported_iterable_to_array(o,minLen){if(!o)return;if("string"==typeof o)return NoteHeader_array_like_to_array(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return NoteHeader_array_like_to_array(o,minLen)}(arr,i)||function NoteHeader_non_iterable_rest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var NoteHeader_propTypes={icon:prop_types_default().string,iconColor:prop_types_default().string,color:prop_types_default().string,fillColor:prop_types_default().string,annotation:prop_types_default().object,language:prop_types_default().string,noteDateFormat:prop_types_default().string,isSelected:prop_types_default().bool,setIsEditing:prop_types_default().func,notesShowLastUpdatedDate:prop_types_default().bool,isUnread:prop_types_default().bool,renderAuthorName:prop_types_default().func,isNoteStateDisabled:prop_types_default().bool,isEditing:prop_types_default().bool,noteIndex:prop_types_default().number,sortStrategy:prop_types_default().string,activeTheme:prop_types_default().string,isMultiSelected:prop_types_default().bool,isMultiSelectMode:prop_types_default().bool,handleMultiSelect:prop_types_default().func,isGroupMember:prop_types_default().bool,showAnnotationNumbering:prop_types_default().bool,isTrackedChange:prop_types_default().bool};function NoteHeader_NoteHeader(props){var _annotation_iconColor_toHexString,_annotation_iconColor,date,icon=props.icon,iconColor=props.iconColor,annotation=props.annotation,language=props.language,noteDateFormat=props.noteDateFormat,isSelected=props.isSelected,setIsEditing=props.setIsEditing,notesShowLastUpdatedDate=props.notesShowLastUpdatedDate,isReply=props.isReply,isUnread=props.isUnread,renderAuthorName=props.renderAuthorName,isNoteStateDisabled=props.isNoteStateDisabled,isEditing=props.isEditing,noteIndex=props.noteIndex,sortStrategy=props.sortStrategy,activeTheme=props.activeTheme,isMultiSelected=props.isMultiSelected,isMultiSelectMode=props.isMultiSelectMode,handleMultiSelect=props.handleMultiSelect,isGroupMember=props.isGroupMember,showAnnotationNumbering=props.showAnnotationNumbering,timezone=props.timezone,isTrackedChange=props.isTrackedChange,t=NoteHeader_sliced_to_array((0,useTranslation.B)(),1)[0],dateCreated=sortStrategy===sortStrategies.vr.MODIFIED_DATE||notesShowLastUpdatedDate&&sortStrategy!==sortStrategies.vr.CREATED_DATE?(0,getLatestActivityDate.A)(annotation):annotation.DateCreated;if(timezone&&dateCreated){var datetimeStr=dateCreated.toLocaleString("en-US",{timeZone:timezone});date=new Date(datetimeStr)}else date=dateCreated;var numberOfReplies=annotation.getReplies().length,color=null===(_annotation_iconColor=annotation[iconColor])||void 0===_annotation_iconColor||null===(_annotation_iconColor_toHexString=_annotation_iconColor.toHexString)||void 0===_annotation_iconColor_toHexString?void 0:_annotation_iconColor_toHexString.call(_annotation_iconColor);activeTheme===theme.A.DARK&&color&&(0,helpers_color.lw)(color)?color=commonColors.z.white:activeTheme===theme.A.LIGHT&&color&&(0,helpers_color.vO)(color)&&(color=commonColors.z.black);var fillColor=(0,getColor.A)(annotation.FillColor),annotationAssociatedNumber=annotation.getAssociatedNumber(),annotationDisplayedAssociatedNumber="#".concat(annotationAssociatedNumber," - "),authorAndDateClass=classnames_default()("author-and-date",{isReply}),noteHeaderClass=classnames_default()("NoteHeader",{parent:!isReply&&!isGroupMember});return react.createElement("div",{className:noteHeaderClass},!isReply&&react.createElement("div",{className:"type-icon-container"},isUnread&&react.createElement("div",{className:"unread-notification"}),react.createElement(Icon.A,{className:"type-icon",glyph:icon,color,fillColor})),react.createElement("div",{className:authorAndDateClass},react.createElement("div",{className:"author-and-overflow"},react.createElement("div",{className:"author-and-time"},react.createElement("div",{className:"author"},showAnnotationNumbering&&void 0!==annotationAssociatedNumber&&react.createElement("span",{className:"annotation-number"},annotationDisplayedAssociatedNumber),renderAuthorName(annotation)),react.createElement("div",{className:"date-and-num-replies"},react.createElement("div",{className:"date-and-time"},date?dayjs_min_default()(date).locale(language).format(noteDateFormat):t("option.notesPanel.noteContent.noDate"),isGroupMember&&" (Page ".concat(annotation.PageNumber,")")),numberOfReplies>0&&!isSelected&&react.createElement("div",{className:"num-replies-container"},react.createElement(Icon.A,{className:"num-reply-icon",glyph:"icon-chat-bubble"}),react.createElement("div",{className:"num-replies"},numberOfReplies)))),react.createElement("div",{className:"state-and-overflow"},isMultiSelectMode&&!isGroupMember&&!isReply&&react.createElement(Choice.A,{id:"note-multi-select-toggle_".concat(annotation.Id),checked:isMultiSelected,onClick:function(e){e.preventDefault(),e.stopPropagation(),handleMultiSelect(!isMultiSelected)}}),react.createElement(components_NoteUnpostedCommentIndicator,{annotationId:annotation.Id}),!isNoteStateDisabled&&!isReply&&!isMultiSelectMode&&!isGroupMember&&!isTrackedChange&&react.createElement(components_NoteState,{annotation,isSelected}),!isEditing&&isSelected&&!isMultiSelectMode&&!isGroupMember&&!isTrackedChange&&react.createElement(components_NotePopup,{noteIndex,annotation,setIsEditing,isReply}),isSelected&&isTrackedChange&&!isMultiSelectMode&&react.createElement(react.Fragment,null,react.createElement("div",{className:"tracked-change-icon-wrapper",onClick:function(){return trackedChangeId=annotation.getCustomData(officeEditor.Rf),void core.A.getOfficeEditor().acceptTrackedChange(trackedChangeId);var trackedChangeId}},react.createElement(Icon.A,{className:"tracked-change-icon",glyph:"icon-menu-checkmark"})),react.createElement("div",{className:"tracked-change-icon-wrapper",onClick:function(){return trackedChangeId=annotation.getCustomData(officeEditor.Rf),void core.A.getOfficeEditor().rejectTrackedChange(trackedChangeId);var trackedChangeId}},react.createElement(Icon.A,{className:"tracked-change-icon",glyph:"icon-close"})))))))}NoteHeader_NoteHeader.propTypes=NoteHeader_propTypes;const components_NoteHeader_NoteHeader=NoteHeader_NoteHeader;NoteHeader_NoteHeader.__docgenInfo={description:"",methods:[],displayName:"NoteHeader",props:{icon:{description:"",type:{name:"string"},required:!1},iconColor:{description:"",type:{name:"string"},required:!1},color:{description:"",type:{name:"string"},required:!1},fillColor:{description:"",type:{name:"string"},required:!1},annotation:{description:"",type:{name:"object"},required:!1},language:{description:"",type:{name:"string"},required:!1},noteDateFormat:{description:"",type:{name:"string"},required:!1},isSelected:{description:"",type:{name:"bool"},required:!1},setIsEditing:{description:"",type:{name:"func"},required:!1},notesShowLastUpdatedDate:{description:"",type:{name:"bool"},required:!1},isUnread:{description:"",type:{name:"bool"},required:!1},renderAuthorName:{description:"",type:{name:"func"},required:!1},isNoteStateDisabled:{description:"",type:{name:"bool"},required:!1},isEditing:{description:"",type:{name:"bool"},required:!1},noteIndex:{description:"",type:{name:"number"},required:!1},sortStrategy:{description:"",type:{name:"string"},required:!1},activeTheme:{description:"",type:{name:"string"},required:!1},isMultiSelected:{description:"",type:{name:"bool"},required:!1},isMultiSelectMode:{description:"",type:{name:"bool"},required:!1},handleMultiSelect:{description:"",type:{name:"func"},required:!1},isGroupMember:{description:"",type:{name:"bool"},required:!1},showAnnotationNumbering:{description:"",type:{name:"bool"},required:!1},isTrackedChange:{description:"",type:{name:"bool"},required:!1}}};const components_NoteHeader=components_NoteHeader_NoteHeader;components_NoteHeader_NoteHeader.__docgenInfo={description:"",methods:[],displayName:"NoteHeader",props:{icon:{description:"",type:{name:"string"},required:!1},iconColor:{description:"",type:{name:"string"},required:!1},color:{description:"",type:{name:"string"},required:!1},fillColor:{description:"",type:{name:"string"},required:!1},annotation:{description:"",type:{name:"object"},required:!1},language:{description:"",type:{name:"string"},required:!1},noteDateFormat:{description:"",type:{name:"string"},required:!1},isSelected:{description:"",type:{name:"bool"},required:!1},setIsEditing:{description:"",type:{name:"func"},required:!1},notesShowLastUpdatedDate:{description:"",type:{name:"bool"},required:!1},isUnread:{description:"",type:{name:"bool"},required:!1},renderAuthorName:{description:"",type:{name:"func"},required:!1},isNoteStateDisabled:{description:"",type:{name:"bool"},required:!1},isEditing:{description:"",type:{name:"bool"},required:!1},noteIndex:{description:"",type:{name:"number"},required:!1},sortStrategy:{description:"",type:{name:"string"},required:!1},activeTheme:{description:"",type:{name:"string"},required:!1},isMultiSelected:{description:"",type:{name:"bool"},required:!1},isMultiSelectMode:{description:"",type:{name:"bool"},required:!1},handleMultiSelect:{description:"",type:{name:"func"},required:!1},isGroupMember:{description:"",type:{name:"bool"},required:!1},showAnnotationNumbering:{description:"",type:{name:"bool"},required:!1},isTrackedChange:{description:"",type:{name:"bool"},required:!1}}}},"./src/components/NotePopup/NotePopup.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_6__),hooks_useOnClickOutside__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/hooks/useOnClickOutside.js"),components_DataElementWrapper__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/DataElementWrapper/index.js"),react_i18next__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/react-i18next/dist/es/useTranslation.js"),classnames__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/classnames/index.js"),classnames__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__),components_Icon__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/components/Icon/index.js");__webpack_require__("./src/components/NotePopup/NotePopup.scss");function _array_like_to_array(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _sliced_to_array(arr,i){return function _array_with_holes(arr){if(Array.isArray(arr))return arr}(arr)||function _iterable_to_array_limit(arr,i){var _i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null!=_i){var _s,_e,_arr=[],_n=!0,_d=!1;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}}(arr,i)||function _unsupported_iterable_to_array(o,minLen){if(!o)return;if("string"==typeof o)return _array_like_to_array(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _array_like_to_array(o,minLen)}(arr,i)||function _non_iterable_rest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var propTypes={handleEdit:prop_types__WEBPACK_IMPORTED_MODULE_6___default().func,handleDelete:prop_types__WEBPACK_IMPORTED_MODULE_6___default().func,closePopup:prop_types__WEBPACK_IMPORTED_MODULE_6___default().func,openPopup:prop_types__WEBPACK_IMPORTED_MODULE_6___default().func,isEditable:prop_types__WEBPACK_IMPORTED_MODULE_6___default().bool,isDeletable:prop_types__WEBPACK_IMPORTED_MODULE_6___default().bool,isOpen:prop_types__WEBPACK_IMPORTED_MODULE_6___default().bool};function noop(){}function NotePopup(props){var _props_handleEdit=props.handleEdit,handleEdit=void 0===_props_handleEdit?noop:_props_handleEdit,_props_handleDelete=props.handleDelete,handleDelete=void 0===_props_handleDelete?noop:_props_handleDelete,_props_closePopup=props.closePopup,closePopup=void 0===_props_closePopup?noop:_props_closePopup,_props_openPopup=props.openPopup,openPopup=void 0===_props_openPopup?noop:_props_openPopup,isEditable=props.isEditable,isDeletable=props.isDeletable,isOpen=props.isOpen,isReply=props.isReply,t=_sliced_to_array((0,react_i18next__WEBPACK_IMPORTED_MODULE_7__.B)(),1)[0],popupRef=react__WEBPACK_IMPORTED_MODULE_0__.useRef();(0,hooks_useOnClickOutside__WEBPACK_IMPORTED_MODULE_1__.A)(popupRef,(function(){closePopup()}));if(!isEditable&&!isDeletable)return null;var notePopupButtonClass=classnames__WEBPACK_IMPORTED_MODULE_3___default()("overflow note-popup-toggle-trigger",{active:isOpen}),optionsClass=classnames__WEBPACK_IMPORTED_MODULE_3___default()("options note-popup-options",{"options-reply":isReply});return react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_DataElementWrapper__WEBPACK_IMPORTED_MODULE_2__.A,{className:"NotePopup",dataElement:"notePopup",ref:popupRef},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:notePopupButtonClass,onClick:function(e){e.stopPropagation(),isOpen?closePopup():openPopup()}},react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Icon__WEBPACK_IMPORTED_MODULE_4__.A,{glyph:"icon-tools-more"})),isOpen&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:optionsClass},isEditable&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_DataElementWrapper__WEBPACK_IMPORTED_MODULE_2__.A,{type:"button",className:"option note-popup-option",dataElement:"notePopupEdit",onClick:function onEditButtonClick(e){e.stopPropagation(),closePopup(),handleEdit()}},t("action.edit")),isDeletable&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_DataElementWrapper__WEBPACK_IMPORTED_MODULE_2__.A,{type:"button",className:"option note-popup-option",dataElement:"notePopupDelete",onClick:function onDeleteButtonClick(){closePopup(),handleDelete()}},t("action.delete"))))}NotePopup.propTypes=propTypes;const __WEBPACK_DEFAULT_EXPORT__=NotePopup;NotePopup.__docgenInfo={description:"",methods:[],displayName:"NotePopup",props:{handleEdit:{description:"",type:{name:"func"},required:!1},handleDelete:{description:"",type:{name:"func"},required:!1},closePopup:{description:"",type:{name:"func"},required:!1},openPopup:{description:"",type:{name:"func"},required:!1},isEditable:{description:"",type:{name:"bool"},required:!1},isDeletable:{description:"",type:{name:"bool"},required:!1},isOpen:{description:"",type:{name:"bool"},required:!1}}}},"./src/components/NoteState/NoteState.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_7__),react_i18next__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/react-i18next/dist/es/useTranslation.js"),classnames__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/classnames/index.js"),classnames__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__),_Tooltip__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/Tooltip/index.js"),_NoteStatePopup__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/NoteState/NoteStatePopup.js"),components_DataElementWrapper__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/components/DataElementWrapper/index.js"),components_Icon__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/components/Icon/index.js");__webpack_require__("./src/components/NoteState/NoteState.scss");function _array_like_to_array(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _sliced_to_array(arr,i){return function _array_with_holes(arr){if(Array.isArray(arr))return arr}(arr)||function _iterable_to_array_limit(arr,i){var _i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null!=_i){var _s,_e,_arr=[],_n=!0,_d=!1;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}}(arr,i)||function _unsupported_iterable_to_array(o,minLen){if(!o)return;if("string"==typeof o)return _array_like_to_array(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _array_like_to_array(o,minLen)}(arr,i)||function _non_iterable_rest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var propTypes={annotation:prop_types__WEBPACK_IMPORTED_MODULE_7___default().object.isRequired,openOnInitialLoad:prop_types__WEBPACK_IMPORTED_MODULE_7___default().bool,handleStateChange:prop_types__WEBPACK_IMPORTED_MODULE_7___default().func};function NoteState(props){var annotation=props.annotation,_props_openOnInitialLoad=props.openOnInitialLoad,openOnInitialLoad=void 0!==_props_openOnInitialLoad&&_props_openOnInitialLoad,_props_handleStateChange=props.handleStateChange,handleStateChange=void 0===_props_handleStateChange?function(){}:_props_handleStateChange,t=_sliced_to_array((0,react_i18next__WEBPACK_IMPORTED_MODULE_8__.B)(),1)[0],_useState=_sliced_to_array((0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(openOnInitialLoad),2),isOpen=_useState[0],setIsOpen=_useState[1],popupRef=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(),annotationState=annotation.getStatus(),icon="icon-annotation-status-".concat(""===annotationState?"none":annotationState.toLowerCase()),noteStateButtonClassName=classnames__WEBPACK_IMPORTED_MODULE_1___default()("overflow",{active:isOpen}),id=annotation.Id;return react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_DataElementWrapper__WEBPACK_IMPORTED_MODULE_4__.A,{className:"NoteState",dataElement:"noteState",onClick:function(e){e.stopPropagation(),setIsOpen(!isOpen)},ref:popupRef,"data-id":id},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_Tooltip__WEBPACK_IMPORTED_MODULE_2__.A,{content:t("option.notesOrder.status")},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:noteStateButtonClassName},react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Icon__WEBPACK_IMPORTED_MODULE_5__.A,{glyph:icon}))),isOpen&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(_NoteStatePopup__WEBPACK_IMPORTED_MODULE_3__.A,{triggerElementName:id,handleStateChange,onClose:function(){setIsOpen(!1)}}))}NoteState.propTypes=propTypes;const __WEBPACK_DEFAULT_EXPORT__=NoteState;NoteState.__docgenInfo={description:"",methods:[],displayName:"NoteState",props:{annotation:{description:"",type:{name:"object"},required:!0},openOnInitialLoad:{description:"",type:{name:"bool"},required:!1},handleStateChange:{description:"",type:{name:"func"},required:!1}}}},"./src/components/NoteState/NoteStatePopup.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),react_i18next__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/react-i18next/dist/es/useTranslation.js"),hooks_useOnClickOutside__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/hooks/useOnClickOutside.js"),constants_dataElement__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/constants/dataElement.js"),components_DataElementWrapper__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/DataElementWrapper/index.js"),components_PopupPortal__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/components/PopupPortal/index.js"),components_Icon__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/components/Icon/index.js"),helpers_getOverlayPositionBasedOn__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./src/helpers/getOverlayPositionBasedOn.js"),prop_types__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_7__),helpers_getRootNode__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./src/helpers/getRootNode.js");__webpack_require__("./src/components/NoteState/NoteState.scss");function _array_like_to_array(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _sliced_to_array(arr,i){return function _array_with_holes(arr){if(Array.isArray(arr))return arr}(arr)||function _iterable_to_array_limit(arr,i){var _i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null!=_i){var _s,_e,_arr=[],_n=!0,_d=!1;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}}(arr,i)||function _unsupported_iterable_to_array(o,minLen){if(!o)return;if("string"==typeof o)return _array_like_to_array(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _array_like_to_array(o,minLen)}(arr,i)||function _non_iterable_rest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var propTypes={style:prop_types__WEBPACK_IMPORTED_MODULE_7___default().object,triggerElementName:prop_types__WEBPACK_IMPORTED_MODULE_7___default().string.isRequired,onClose:prop_types__WEBPACK_IMPORTED_MODULE_7___default().func,handleStateChange:prop_types__WEBPACK_IMPORTED_MODULE_7___default().func},NoteStatePopup=function(param){var style=param.style,triggerElementName=param.triggerElementName,_param_onClose=param.onClose,onClose=void 0===_param_onClose?function(){}:_param_onClose,_param_handleStateChange=param.handleStateChange,handleStateChange=void 0===_param_handleStateChange?function(){}:_param_handleStateChange,t=_sliced_to_array((0,react_i18next__WEBPACK_IMPORTED_MODULE_8__.B)(),1)[0],_useState=_sliced_to_array((0,react__WEBPACK_IMPORTED_MODULE_0__.useState)({left:"auto",right:"auto",top:"auto"}),2),position=_useState[0],setPosition=_useState[1],popupRef=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(),isMultiSelect=triggerElementName===constants_dataElement__WEBPACK_IMPORTED_MODULE_2__.A.NOTE_MULTI_STATE_BUTTON;(0,hooks_useOnClickOutside__WEBPACK_IMPORTED_MODULE_1__.A)(popupRef,(function(e){var querySelector=isMultiSelect?'[data-element="'.concat(constants_dataElement__WEBPACK_IMPORTED_MODULE_2__.A.NOTE_MULTI_STATE_BUTTON,'"]'):'[data-id="'.concat(triggerElementName,'"]');(0,helpers_getRootNode__WEBPACK_IMPORTED_MODULE_9__.Ay)().querySelector(querySelector).contains(e.target)||onClose()}));var createOnStateOptionButtonClickHandler=function(state){return function(){handleStateChange(state)}};return(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((function(){var position=(0,helpers_getOverlayPositionBasedOn__WEBPACK_IMPORTED_MODULE_10__.A)(triggerElementName,popupRef,!1,isMultiSelect?"data-element":"data-id");setPosition(position)}),[]),react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_PopupPortal__WEBPACK_IMPORTED_MODULE_4__.A,{id:"note-state-popup-portal",position},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{style,className:"note-state-options",ref:popupRef},react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_DataElementWrapper__WEBPACK_IMPORTED_MODULE_3__.A,{dataElement:"notePopupState"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_DataElementWrapper__WEBPACK_IMPORTED_MODULE_3__.A,{dataElement:"notePopupStateAccepted",className:"note-state-option",onClick:createOnStateOptionButtonClickHandler("Accepted")},react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Icon__WEBPACK_IMPORTED_MODULE_5__.A,{glyph:"icon-annotation-status-accepted"}),t("option.state.accepted")),react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_DataElementWrapper__WEBPACK_IMPORTED_MODULE_3__.A,{dataElement:"notePopupStateRejected",className:"note-state-option",onClick:createOnStateOptionButtonClickHandler("Rejected")},react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Icon__WEBPACK_IMPORTED_MODULE_5__.A,{glyph:"icon-annotation-status-rejected"}),t("option.state.rejected")),react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_DataElementWrapper__WEBPACK_IMPORTED_MODULE_3__.A,{dataElement:"notePopupStateCancelled",className:"note-state-option",onClick:createOnStateOptionButtonClickHandler("Cancelled")},react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Icon__WEBPACK_IMPORTED_MODULE_5__.A,{glyph:"icon-annotation-status-cancelled"}),t("option.state.cancelled")),react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_DataElementWrapper__WEBPACK_IMPORTED_MODULE_3__.A,{dataElement:"notePopupStateCompleted",className:"note-state-option",onClick:createOnStateOptionButtonClickHandler("Completed")},react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Icon__WEBPACK_IMPORTED_MODULE_5__.A,{glyph:"icon-annotation-status-completed"}),t("option.state.completed")),react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_DataElementWrapper__WEBPACK_IMPORTED_MODULE_3__.A,{dataElement:"notePopupStateNone",className:"note-state-option",onClick:createOnStateOptionButtonClickHandler("None")},react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Icon__WEBPACK_IMPORTED_MODULE_5__.A,{glyph:"icon-annotation-status-none"}),t("option.state.none")),react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_DataElementWrapper__WEBPACK_IMPORTED_MODULE_3__.A,{dataElement:"notePopupStateMarked",className:"note-state-option",onClick:createOnStateOptionButtonClickHandler("Marked")},react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Icon__WEBPACK_IMPORTED_MODULE_5__.A,{glyph:"icon-annotation-status-marked"}),t("option.state.marked")),react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_DataElementWrapper__WEBPACK_IMPORTED_MODULE_3__.A,{dataElement:"notePopupStateUnmarked",className:"note-state-option",onClick:createOnStateOptionButtonClickHandler("Unmarked")},react__WEBPACK_IMPORTED_MODULE_0__.createElement(components_Icon__WEBPACK_IMPORTED_MODULE_5__.A,{glyph:"icon-annotation-status-unmarked"}),t("option.state.unmarked")))))};NoteStatePopup.propTypes=propTypes;const __WEBPACK_DEFAULT_EXPORT__=NoteStatePopup;NoteStatePopup.__docgenInfo={description:"",methods:[],displayName:"NoteStatePopup",props:{onClose:{defaultValue:{value:"() => {}",computed:!1},description:"",type:{name:"func"},required:!1},handleStateChange:{defaultValue:{value:"() => {}",computed:!1},description:"",type:{name:"func"},required:!1},style:{description:"",type:{name:"object"},required:!1},triggerElementName:{description:"",type:{name:"string"},required:!0}}}},"./src/components/PopupPortal/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>components_PopupPortal});var react_dom=__webpack_require__("./node_modules/react-dom/index.js"),react=__webpack_require__("./node_modules/react/index.js"),getRootNode=__webpack_require__("./src/helpers/getRootNode.js");const hooks_usePortal=function usePortal(id){var rootElemRef=(0,react.useRef)(null);return(0,react.useEffect)((function setupElement(){var existingParent=document.querySelector("#".concat(id)),parentElem=existingParent||function createRootElement(id){var rootContainer=document.createElement("div");return rootContainer.setAttribute("id",id),rootContainer}(id);return existingParent||function addRootElement(rootElem){var node=window.isApryseWebViewerWebComponent?(0,getRootNode.Ay)():document.body;node.insertBefore(rootElem,node.lastElementChild.nextElementSibling)}(parentElem),parentElem.appendChild(rootElemRef.current),function removeElement(){rootElemRef.current.remove(),parentElem.childElementCount||parentElem.remove()}}),[id]),function getRootElem(){return rootElemRef.current||(rootElemRef.current=document.createElement("div")),rootElemRef.current}()};const components_PopupPortal=function(param){var id=param.id,position=param.position,children=param.children,target=hooks_usePortal(id);return target.style.position="absolute",target.style.top="auto"===position.top?position.top:"".concat(position.top,"px"),target.style.left="auto"===position.left?position.left:"".concat(position.left,"px"),target.style.right="auto"===position.right?position.right:"".concat(position.right,"px"),target.style.pointerEvents="none",target.style.zIndex=999,(0,react_dom.createPortal)(children,target)}},"./src/constants/theme.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={DARK:"dark",LIGHT:"light"}},"./src/helpers/NoteStateUtils.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{H:()=>createStateAnnotation});var i18next__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/i18next/dist/esm/i18next.js"),core__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/index.js");function createStateAnnotation(annotation,state){var documentViewerKey=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,stateAnnotation=new window.Core.Annotations.StickyAnnotation;stateAnnotation.InReplyTo=annotation.Id,stateAnnotation.X=annotation.X,stateAnnotation.Y=annotation.Y,stateAnnotation.PageNumber=annotation.PageNumber,stateAnnotation.Subject="Sticky Note",stateAnnotation.Author=core__WEBPACK_IMPORTED_MODULE_1__.A.getCurrentUser(),stateAnnotation.State=state,stateAnnotation.StateModel="Marked"===state||"Unmarked"===state?"Marked":"Review",stateAnnotation.Hidden=!0,stateAnnotation.enableSkipAutoLink();var displayAuthor=core__WEBPACK_IMPORTED_MODULE_1__.A.getDisplayAuthor(stateAnnotation.Author,documentViewerKey),stateMessage=i18next__WEBPACK_IMPORTED_MODULE_0__.A.t("option.state.".concat(state.toLowerCase())),contents="".concat(stateMessage," ").concat(i18next__WEBPACK_IMPORTED_MODULE_0__.A.t("option.state.setBy")," ").concat(displayAuthor);return stateAnnotation.setContents(contents),stateAnnotation}}}]);