{"version":3,"file":"js/application-9bf697f61db57e72239c.js","sources":["webpack:///webpack/bootstrap","webpack:///./app/assets/images/Composz-logo-black-trans.png","webpack:///./app/assets/images/Composz-logo-white-trans.png","webpack:///./app/assets/images/WishCollage.jpg","webpack:///./app/assets/images/blankProfile.png","webpack:///./app/assets/images/slider/Banner-0.jpg","webpack:///./app/assets/images/slider/Banner-1.jpg","webpack:///./app/assets/images/slider/Banner-10.jpg","webpack:///./app/assets/images/slider/Banner-11.jpg","webpack:///./app/assets/images/slider/Banner-2.jpg","webpack:///./app/assets/images/slider/Banner-3.jpg","webpack:///./app/assets/images/slider/Banner-4.jpg","webpack:///./app/assets/images/slider/Banner-5.jpg","webpack:///./app/assets/images/slider/Banner-6.jpg","webpack:///./app/assets/images/slider/Banner-7.jpg","webpack:///./app/assets/images/slider/Banner-8.jpg","webpack:///./app/assets/images/slider/Banner-9-India.jpg","webpack:///./app/assets/images/slider/Banner-9.jpg","webpack:///./app/assets/images/slider/WelcomeToComposz.jpg","webpack:///./app/assets/images/slider/WelcomeToComposzAudio.jpg","webpack:///./app/assets/images/slider/WelcomeToComposzIndia.jpg","webpack:///./app/assets/images/slider/WelcomeToComposzMobile.jpg","webpack:///./app/assets/images/slider/WelcomeToComposzMobileIndia.jpg","webpack:///./app/assets/images/wishCollectorLogoOfficial.png","webpack:///./app/javascript/actions/index.jsx","webpack:///./app/javascript/actions/layouts.jsx","webpack:///./app/javascript/actions/misc_actions.js","webpack:///./app/javascript/actions/orders.jsx","webpack:///./app/javascript/actions/product_keys.jsx","webpack:///./app/javascript/actions/product_sets.jsx","webpack:///./app/javascript/adukku_utils/array.js","webpack:///./app/javascript/adukku_utils/authorizeUser.js","webpack:///./app/javascript/adukku_utils/formatCurrency.js","webpack:///./app/javascript/components sync ^\\.\\/.*$","webpack:///./app/javascript/components/AddProduct.jsx","webpack:///./app/javascript/components/AddUser.jsx","webpack:///./app/javascript/components/AddUser1.jsx","webpack:///./app/javascript/components/AddViewProductUser.jsx","webpack:///./app/javascript/components/Admin/Admin.js","webpack:///./app/javascript/components/AudioHelpers.js","webpack:///./app/javascript/components/ClipBoard.js","webpack:///./app/javascript/components/ComposzHomePage.jsx","webpack:///./app/javascript/components/ComposzNavbar.jsx","webpack:///./app/javascript/components/Contribute.jsx","webpack:///./app/javascript/components/DragDropTouch.js","webpack:///./app/javascript/components/EditProductData.jsx","webpack:///./app/javascript/components/EditProductImage.jsx","webpack:///./app/javascript/components/EventsHomePage.css","webpack:///./app/javascript/components/EventsHomePage.jsx","webpack:///./app/javascript/components/EventsHomePageOriginal.jsx","webpack:///./app/javascript/components/FileManager/FileManager.js","webpack:///./app/javascript/components/GetViewProductUser.jsx","webpack:///./app/javascript/components/LoadingSpinner.jsx","webpack:///./app/javascript/components/MyCart.jsx","webpack:///./app/javascript/components/MyOrders.jsx","webpack:///./app/javascript/components/MyProducts.jsx","webpack:///./app/javascript/components/Navbar.jsx","webpack:///./app/javascript/components/PresetProduct.jsx","webpack:///./app/javascript/components/Product.jsx","webpack:///./app/javascript/components/ProductComposzNavbar.jsx","webpack:///./app/javascript/components/ProductDL.jsx","webpack:///./app/javascript/components/ProductDLAttr.jsx","webpack:///./app/javascript/components/ProductData.jsx","webpack:///./app/javascript/components/ProductImageUpload.jsx","webpack:///./app/javascript/components/ProductLayoutList.jsx","webpack:///./app/javascript/components/ProductList.jsx","webpack:///./app/javascript/components/ProductNavbar.jsx","webpack:///./app/javascript/components/Spinner.js","webpack:///./app/javascript/components/UserEvent/EventPayment.jsx","webpack:///./app/javascript/components/UserEvent/RPEventPayment.jsx","webpack:///./app/javascript/components/UserEvent/RPEventPaymentModal.js","webpack:///./app/javascript/components/UserEvent/UserEvent.js","webpack:///./app/javascript/components/UserStorage/CCPaymentModal.js","webpack:///./app/javascript/components/UserStorage/CCStoragePayment.jsx","webpack:///./app/javascript/components/UserStorage/PaymentModal.js","webpack:///./app/javascript/components/UserStorage/StoragePayment.jsx","webpack:///./app/javascript/components/UserStorage/UserStorage.js","webpack:///./app/javascript/components/VideoHelpers.js","webpack:///./app/javascript/components/ViewProducts.jsx","webpack:///./app/javascript/components/WishCollectorHomePage.jsx","webpack:///./app/javascript/components/WishCollectorNav.jsx","webpack:///./app/javascript/components/WishCollectorNavbar.jsx","webpack:///./app/javascript/components/bootstrap/Forms.FieldGroup.jsx","webpack:///./app/javascript/components/cart/Cart.jsx","webpack:///./app/javascript/components/cart/Cart1.jsx","webpack:///./app/javascript/components/cart/CartList.jsx","webpack:///./app/javascript/components/layouts/AddLayout.jsx","webpack:///./app/javascript/components/layouts/Layout.jsx","webpack:///./app/javascript/components/layouts/LayoutList.jsx","webpack:///./app/javascript/components/layouts/ThumbnailPreview.jsx","webpack:///./app/javascript/components/layouts/lydl/LyDl.jsx","webpack:///./app/javascript/components/layouts/lydl/LyDlList.jsx","webpack:///./app/javascript/components/layouts/lydl/ManageLyDl.jsx","webpack:///./app/javascript/components/layouts/lydlrel/AddLyDlRel.jsx","webpack:///./app/javascript/components/layouts/lydlrel/AddLyDlRelKey.jsx","webpack:///./app/javascript/components/layouts/lydlrel/EditLyDlRel.jsx","webpack:///./app/javascript/components/layouts/lydlrel/EditLyDlRelKey.jsx","webpack:///./app/javascript/components/layouts/lydlrel/EditLyDlRelKeyList.jsx","webpack:///./app/javascript/components/layouts/lydlrel/EditLyDlRelList.jsx","webpack:///./app/javascript/components/layouts/lydlrel/LyDlRel.jsx","webpack:///./app/javascript/components/layouts/lydlrel/LyDlRelKey.jsx","webpack:///./app/javascript/components/layouts/lydlrel/LyDlRelKeyList.jsx","webpack:///./app/javascript/components/layouts/lydlrel/LyDlRelList.jsx","webpack:///./app/javascript/components/layouts/lyslotfors/AddLySlotFor.jsx","webpack:///./app/javascript/components/layouts/lyslotfors/LySlotFor.jsx","webpack:///./app/javascript/components/layouts/lyslotfors/LySlotForList.jsx","webpack:///./app/javascript/components/orders/1.jsx","webpack:///./app/javascript/components/orders/CCavenuePayment.jsx","webpack:///./app/javascript/components/orders/DownloadFiles.jsx","webpack:///./app/javascript/components/orders/Layout.jsx","webpack:///./app/javascript/components/orders/Order.jsx","webpack:///./app/javascript/components/orders/OrderList.jsx","webpack:///./app/javascript/components/orders/OrderProductSet.jsx","webpack:///./app/javascript/components/orders/OrderProductSetList.jsx","webpack:///./app/javascript/components/orders/Payment.jsx","webpack:///./app/javascript/components/orders/ShareProduct.jsx","webpack:///./app/javascript/components/product_keys/EditProductKey.jsx","webpack:///./app/javascript/components/product_keys/ProductKey.jsx","webpack:///./app/javascript/components/product_keys/ProductKeyList.jsx","webpack:///./app/javascript/components/product_sets/AddProductSet.jsx","webpack:///./app/javascript/components/product_sets/ProductSet.jsx","webpack:///./app/javascript/components/product_sets/ProductSetCount.jsx","webpack:///./app/javascript/components/product_sets/ProductSetCountList.jsx","webpack:///./app/javascript/components/product_sets/ProductSetDLVal.jsx","webpack:///./app/javascript/components/product_sets/ProductSetDLValList.jsx","webpack:///./app/javascript/components/product_sets/ProductSetKeyVal.jsx","webpack:///./app/javascript/components/product_sets/ProductSetKeyValList.jsx","webpack:///./app/javascript/components/product_sets/ProductSetLayout.jsx","webpack:///./app/javascript/components/product_sets/ProductSetList.jsx","webpack:///./app/javascript/components/react-select-override/FixRequiredSelect.jsx","webpack:///./app/javascript/components/spinner.css","webpack:///./app/javascript/components/view_products/ViewProduct.jsx","webpack:///./app/javascript/components/view_products/ViewProductList.jsx","webpack:///./app/javascript/components/view_products/ViewProductSet.jsx","webpack:///./app/javascript/components/view_products/ViewProductSetList.jsx","webpack:///./app/javascript/constants/endpoints.jsx","webpack:///./app/javascript/containers/AddProductContainer.jsx","webpack:///./app/javascript/containers/AddUserContainer.jsx","webpack:///./app/javascript/containers/AdminContainer.jsx","webpack:///./app/javascript/containers/EditProductDataContainer.jsx","webpack:///./app/javascript/containers/FileManagerContainer.jsx","webpack:///./app/javascript/containers/ProductContainer.jsx","webpack:///./app/javascript/containers/ProductDLAttrContainer.jsx","webpack:///./app/javascript/containers/ProductDLContainer.jsx","webpack:///./app/javascript/containers/ProductDataContainer.jsx","webpack:///./app/javascript/containers/ProductImageUploadContainer.jsx","webpack:///./app/javascript/containers/ProductLayoutListContainer.jsx","webpack:///./app/javascript/containers/ProductListContainer.jsx","webpack:///./app/javascript/containers/UserStorageContainer.jsx","webpack:///./app/javascript/containers/cart/CartContainer.jsx","webpack:///./app/javascript/containers/cart/CartListContainer.jsx","webpack:///./app/javascript/containers/layouts/AddLayoutContainer.jsx","webpack:///./app/javascript/containers/layouts/LayoutContainer.jsx","webpack:///./app/javascript/containers/layouts/LayoutListContainer.jsx","webpack:///./app/javascript/containers/layouts/lydl/LyDlContainer.jsx","webpack:///./app/javascript/containers/layouts/lydl/LyDlListContainer.jsx","webpack:///./app/javascript/containers/layouts/lydl/ManageLyDlContainer.jsx","webpack:///./app/javascript/containers/layouts/lydlrel/AddLyDlRelContainer.jsx","webpack:///./app/javascript/containers/layouts/lydlrel/AddLyDlRelKeyContainer.jsx","webpack:///./app/javascript/containers/layouts/lydlrel/EditLyDlRelContainer.jsx","webpack:///./app/javascript/containers/layouts/lydlrel/EditLyDlRelKeyContainer.jsx","webpack:///./app/javascript/containers/layouts/lydlrel/EditLyDlRelListContainer.jsx","webpack:///./app/javascript/containers/layouts/lydlrel/LyDlRelContainer.jsx","webpack:///./app/javascript/containers/layouts/lydlrel/LyDlRelKeyContainer.jsx","webpack:///./app/javascript/containers/layouts/lydlrel/LyDlRelKeyListContainer.jsx","webpack:///./app/javascript/containers/layouts/lydlrel/LyDlRelListContainer.jsx","webpack:///./app/javascript/containers/layouts/lyslotfors/AddLySlotForContainer.jsx","webpack:///./app/javascript/containers/layouts/lyslotfors/LySlotForContainer.jsx","webpack:///./app/javascript/containers/layouts/lyslotfors/LySlotForListContainer.jsx","webpack:///./app/javascript/containers/orders/CCavenuePaymentContainer.jsx","webpack:///./app/javascript/containers/orders/DownloadFilesContainer.jsx","webpack:///./app/javascript/containers/orders/LayoutContainer.jsx","webpack:///./app/javascript/containers/orders/OrderContainer.jsx","webpack:///./app/javascript/containers/orders/OrderListContainer.jsx","webpack:///./app/javascript/containers/orders/OrderProductSetContainer.jsx","webpack:///./app/javascript/containers/orders/OrderProductSetListContainer.jsx","webpack:///./app/javascript/containers/orders/PaymentContainer.jsx","webpack:///./app/javascript/containers/orders/ShareProductContainer.jsx","webpack:///./app/javascript/containers/product_keys/EditProductKeyContainer.jsx","webpack:///./app/javascript/containers/product_keys/ProductKeyContainer.jsx","webpack:///./app/javascript/containers/product_keys/ProductKeyListContainer.jsx","webpack:///./app/javascript/containers/product_sets/AddProductSetContainer.jsx","webpack:///./app/javascript/containers/product_sets/ProductSetContainer.jsx","webpack:///./app/javascript/containers/product_sets/ProductSetCountContainer.jsx","webpack:///./app/javascript/containers/product_sets/ProductSetCountListContainer.jsx","webpack:///./app/javascript/containers/product_sets/ProductSetDLValContainer.jsx","webpack:///./app/javascript/containers/product_sets/ProductSetDLValListContainer.jsx","webpack:///./app/javascript/containers/product_sets/ProductSetKeyValContainer.jsx","webpack:///./app/javascript/containers/product_sets/ProductSetKeyValListContainer.jsx","webpack:///./app/javascript/containers/product_sets/ProductSetLayoutContainer.jsx","webpack:///./app/javascript/containers/product_sets/ProductSetListContainer.jsx","webpack:///./app/javascript/containers/view_products/ViewProductContainer.jsx","webpack:///./app/javascript/containers/view_products/ViewProductListContainer.jsx","webpack:///./app/javascript/containers/view_products/ViewProductSetContainer.jsx","webpack:///./app/javascript/containers/view_products/ViewProductSetListContainer.jsx","webpack:///./app/javascript/context/cart/CartContext.jsx","webpack:///./app/javascript/context/cart/CartReducer.jsx","webpack:///./app/javascript/context/cart/CartState.jsx","webpack:///./app/javascript/context/cart/CartTypes.js","webpack:///./app/javascript/packs/application.js","webpack:///./app/javascript/reducers/layouts.reducers.jsx","webpack:///./app/javascript/reducers/misc_reducer.jsx","webpack:///./app/javascript/reducers/orders_reducer.jsx","webpack:///./app/javascript/reducers/product_key.reducers.jsx","webpack:///./app/javascript/reducers/product_reducers.jsx","webpack:///./app/javascript/reducers/product_sets.reducers.jsx","webpack:///./app/javascript/sagas/index.jsx","webpack:///./app/javascript/sagas/layouts.saga.jsx","webpack:///./app/javascript/sagas/orders.saga.js","webpack:///./app/javascript/sagas/orders_index.saga.jsx","webpack:///./app/javascript/sagas/product_keys.saga.jsx","webpack:///./app/javascript/sagas/product_sets.saga.jsx","webpack:///./app/javascript/sagas/products.saga.js","webpack:///./node_modules/@babel/runtime-corejs2/core-js/array/from.js","webpack:///./node_modules/@babel/runtime-corejs2/core-js/array/is-array.js","webpack:///./node_modules/@babel/runtime-corejs2/core-js/object/assign.js","webpack:///./node_modules/@babel/runtime-corejs2/core-js/object/entries.js","webpack:///./node_modules/@babel/runtime-corejs2/core-js/object/values.js","webpack:///./node_modules/@babel/runtime-corejs2/core-js/parse-int.js","webpack:///./node_modules/@babel/runtime-corejs2/helpers/assertThisInitialized.js","webpack:///./node_modules/@babel/runtime-corejs2/helpers/esm/assertThisInitialized.js","webpack:///./node_modules/@babel/runtime-corejs2/helpers/esm/extends.js","webpack:///./node_modules/@babel/runtime-corejs2/helpers/esm/inheritsLoose.js","webpack:///./node_modules/@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose.js","webpack:///./node_modules/@babel/runtime-corejs2/helpers/esm/setPrototypeOf.js","webpack:///./node_modules/@babel/runtime-corejs2/helpers/extends.js","webpack:///./node_modules/@babel/runtime-corejs2/helpers/inheritsLoose.js","webpack:///./node_modules/@babel/runtime-corejs2/helpers/interopRequireDefault.js","webpack:///./node_modules/@babel/runtime-corejs2/helpers/interopRequireWildcard.js","webpack:///./node_modules/@babel/runtime-corejs2/helpers/objectWithoutPropertiesLoose.js","webpack:///./node_modules/@babel/runtime-corejs2/helpers/setPrototypeOf.js","webpack:///./node_modules/@babel/runtime-corejs2/helpers/typeof.js","webpack:///./node_modules/@babel/runtime/helpers/arrayLikeToArray.js","webpack:///./node_modules/@babel/runtime/helpers/arrayWithHoles.js","webpack:///./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","webpack:///./node_modules/@babel/runtime/helpers/assertThisInitialized.js","webpack:///./node_modules/@babel/runtime/helpers/classCallCheck.js","webpack:///./node_modules/@babel/runtime/helpers/createClass.js","webpack:///./node_modules/@babel/runtime/helpers/createSuper.js","webpack:///./node_modules/@babel/runtime/helpers/defineProperty.js","webpack:///./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","webpack:///./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack:///./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","webpack:///./node_modules/@babel/runtime/helpers/esm/classCallCheck.js","webpack:///./node_modules/@babel/runtime/helpers/esm/createClass.js","webpack:///./node_modules/@babel/runtime/helpers/esm/createSuper.js","webpack:///./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack:///./node_modules/@babel/runtime/helpers/esm/extends.js","webpack:///./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","webpack:///./node_modules/@babel/runtime/helpers/esm/inherits.js","webpack:///./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js","webpack:///./node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","webpack:///./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","webpack:///./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack:///./node_modules/@babel/runtime/helpers/esm/objectSpread2.js","webpack:///./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","webpack:///./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack:///./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js","webpack:///./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack:///./node_modules/@babel/runtime/helpers/esm/slicedToArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js","webpack:///./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack:///./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack:///./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack:///./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack:///./node_modules/@babel/runtime/helpers/extends.js","webpack:///./node_modules/@babel/runtime/helpers/getPrototypeOf.js","webpack:///./node_modules/@babel/runtime/helpers/inherits.js","webpack:///./node_modules/@babel/runtime/helpers/interopRequireDefault.js","webpack:///./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js","webpack:///./node_modules/@babel/runtime/helpers/iterableToArray.js","webpack:///./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","webpack:///./node_modules/@babel/runtime/helpers/nonIterableRest.js","webpack:///./node_modules/@babel/runtime/helpers/nonIterableSpread.js","webpack:///./node_modules/@babel/runtime/helpers/objectSpread2.js","webpack:///./node_modules/@babel/runtime/helpers/objectWithoutProperties.js","webpack:///./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js","webpack:///./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","webpack:///./node_modules/@babel/runtime/helpers/setPrototypeOf.js","webpack:///./node_modules/@babel/runtime/helpers/slicedToArray.js","webpack:///./node_modules/@babel/runtime/helpers/taggedTemplateLiteral.js","webpack:///./node_modules/@babel/runtime/helpers/toConsumableArray.js","webpack:///./node_modules/@babel/runtime/helpers/toPrimitive.js","webpack:///./node_modules/@babel/runtime/helpers/toPropertyKey.js","webpack:///./node_modules/@babel/runtime/helpers/typeof.js","webpack:///./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","webpack:///./node_modules/@emotion/cache/dist/emotion-cache.esm.js","webpack:///./node_modules/@emotion/hash/dist/emotion-hash.esm.js","webpack:///./node_modules/@emotion/memoize/dist/emotion-memoize.esm.js","webpack:///./node_modules/@emotion/react/_isolated-hnrs/dist/emotion-react-_isolated-hnrs.esm.js","webpack:///./node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js","webpack:///./node_modules/@emotion/react/dist/emotion-react.esm.js","webpack:///./node_modules/@emotion/serialize/dist/emotion-serialize.esm.js","webpack:///./node_modules/@emotion/sheet/dist/emotion-sheet.esm.js","webpack:///./node_modules/@emotion/unitless/dist/emotion-unitless.esm.js","webpack:///./node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.esm.js","webpack:///./node_modules/@emotion/utils/dist/emotion-utils.esm.js","webpack:///./node_modules/@emotion/weak-memoize/dist/emotion-weak-memoize.esm.js","webpack:///./node_modules/@floating-ui/core/dist/floating-ui.core.esm.js","webpack:///./node_modules/@floating-ui/dom/dist/floating-ui.dom.esm.js","webpack:///./node_modules/@floating-ui/utils/dist/floating-ui.utils.esm.js","webpack:///./node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.esm.js","webpack:///./node_modules/@remix-run/router/dist/router.js","webpack:///./node_modules/@toast-ui/react-image-editor/dist/toastui-react-image-editor.js","webpack:///./node_modules/array-unique/index.js","webpack:///./node_modules/babel-polyfill/lib/index.js","webpack:///./node_modules/babel-polyfill/node_modules/regenerator-runtime/runtime.js","webpack:///./node_modules/base64-js/index.js","webpack:///./node_modules/classnames/index.js","webpack:///./node_modules/core-js/fn/regexp/escape.js","webpack:///./node_modules/core-js/library/fn/array/from.js","webpack:///./node_modules/core-js/library/fn/array/is-array.js","webpack:///./node_modules/core-js/library/fn/object/assign.js","webpack:///./node_modules/core-js/library/fn/object/create.js","webpack:///./node_modules/core-js/library/fn/object/define-property.js","webpack:///./node_modules/core-js/library/fn/object/entries.js","webpack:///./node_modules/core-js/library/fn/object/get-own-property-descriptor.js","webpack:///./node_modules/core-js/library/fn/object/set-prototype-of.js","webpack:///./node_modules/core-js/library/fn/object/values.js","webpack:///./node_modules/core-js/library/fn/parse-int.js","webpack:///./node_modules/core-js/library/fn/symbol/index.js","webpack:///./node_modules/core-js/library/fn/symbol/iterator.js","webpack:///./node_modules/core-js/library/fn/weak-map.js","webpack:///./node_modules/core-js/library/modules/_a-function.js","webpack:///./node_modules/core-js/library/modules/_add-to-unscopables.js","webpack:///./node_modules/core-js/library/modules/_an-instance.js","webpack:///./node_modules/core-js/library/modules/_an-object.js","webpack:///./node_modules/core-js/library/modules/_array-includes.js","webpack:///./node_modules/core-js/library/modules/_array-methods.js","webpack:///./node_modules/core-js/library/modules/_array-species-constructor.js","webpack:///./node_modules/core-js/library/modules/_array-species-create.js","webpack:///./node_modules/core-js/library/modules/_classof.js","webpack:///./node_modules/core-js/library/modules/_cof.js","webpack:///./node_modules/core-js/library/modules/_collection-weak.js","webpack:///./node_modules/core-js/library/modules/_collection.js","webpack:///./node_modules/core-js/library/modules/_core.js","webpack:///./node_modules/core-js/library/modules/_create-property.js","webpack:///./node_modules/core-js/library/modules/_ctx.js","webpack:///./node_modules/core-js/library/modules/_defined.js","webpack:///./node_modules/core-js/library/modules/_descriptors.js","webpack:///./node_modules/core-js/library/modules/_dom-create.js","webpack:///./node_modules/core-js/library/modules/_enum-bug-keys.js","webpack:///./node_modules/core-js/library/modules/_enum-keys.js","webpack:///./node_modules/core-js/library/modules/_export.js","webpack:///./node_modules/core-js/library/modules/_fails.js","webpack:///./node_modules/core-js/library/modules/_for-of.js","webpack:///./node_modules/core-js/library/modules/_global.js","webpack:///./node_modules/core-js/library/modules/_has.js","webpack:///./node_modules/core-js/library/modules/_hide.js","webpack:///./node_modules/core-js/library/modules/_html.js","webpack:///./node_modules/core-js/library/modules/_ie8-dom-define.js","webpack:///./node_modules/core-js/library/modules/_iobject.js","webpack:///./node_modules/core-js/library/modules/_is-array-iter.js","webpack:///./node_modules/core-js/library/modules/_is-array.js","webpack:///./node_modules/core-js/library/modules/_is-object.js","webpack:///./node_modules/core-js/library/modules/_iter-call.js","webpack:///./node_modules/core-js/library/modules/_iter-create.js","webpack:///./node_modules/core-js/library/modules/_iter-define.js","webpack:///./node_modules/core-js/library/modules/_iter-detect.js","webpack:///./node_modules/core-js/library/modules/_iter-step.js","webpack:///./node_modules/core-js/library/modules/_iterators.js","webpack:///./node_modules/core-js/library/modules/_library.js","webpack:///./node_modules/core-js/library/modules/_meta.js","webpack:///./node_modules/core-js/library/modules/_object-assign.js","webpack:///./node_modules/core-js/library/modules/_object-create.js","webpack:///./node_modules/core-js/library/modules/_object-dp.js","webpack:///./node_modules/core-js/library/modules/_object-dps.js","webpack:///./node_modules/core-js/library/modules/_object-gopd.js","webpack:///./node_modules/core-js/library/modules/_object-gopn-ext.js","webpack:///./node_modules/core-js/library/modules/_object-gopn.js","webpack:///./node_modules/core-js/library/modules/_object-gops.js","webpack:///./node_modules/core-js/library/modules/_object-gpo.js","webpack:///./node_modules/core-js/library/modules/_object-keys-internal.js","webpack:///./node_modules/core-js/library/modules/_object-keys.js","webpack:///./node_modules/core-js/library/modules/_object-pie.js","webpack:///./node_modules/core-js/library/modules/_object-sap.js","webpack:///./node_modules/core-js/library/modules/_object-to-array.js","webpack:///./node_modules/core-js/library/modules/_parse-int.js","webpack:///./node_modules/core-js/library/modules/_property-desc.js","webpack:///./node_modules/core-js/library/modules/_redefine-all.js","webpack:///./node_modules/core-js/library/modules/_redefine.js","webpack:///./node_modules/core-js/library/modules/_set-collection-from.js","webpack:///./node_modules/core-js/library/modules/_set-collection-of.js","webpack:///./node_modules/core-js/library/modules/_set-proto.js","webpack:///./node_modules/core-js/library/modules/_set-to-string-tag.js","webpack:///./node_modules/core-js/library/modules/_shared-key.js","webpack:///./node_modules/core-js/library/modules/_shared.js","webpack:///./node_modules/core-js/library/modules/_string-at.js","webpack:///./node_modules/core-js/library/modules/_string-trim.js","webpack:///./node_modules/core-js/library/modules/_string-ws.js","webpack:///./node_modules/core-js/library/modules/_to-absolute-index.js","webpack:///./node_modules/core-js/library/modules/_to-integer.js","webpack:///./node_modules/core-js/library/modules/_to-iobject.js","webpack:///./node_modules/core-js/library/modules/_to-length.js","webpack:///./node_modules/core-js/library/modules/_to-object.js","webpack:///./node_modules/core-js/library/modules/_to-primitive.js","webpack:///./node_modules/core-js/library/modules/_uid.js","webpack:///./node_modules/core-js/library/modules/_validate-collection.js","webpack:///./node_modules/core-js/library/modules/_wks-define.js","webpack:///./node_modules/core-js/library/modules/_wks-ext.js","webpack:///./node_modules/core-js/library/modules/_wks.js","webpack:///./node_modules/core-js/library/modules/core.get-iterator-method.js","webpack:///./node_modules/core-js/library/modules/es6.array.from.js","webpack:///./node_modules/core-js/library/modules/es6.array.is-array.js","webpack:///./node_modules/core-js/library/modules/es6.array.iterator.js","webpack:///./node_modules/core-js/library/modules/es6.object.assign.js","webpack:///./node_modules/core-js/library/modules/es6.object.create.js","webpack:///./node_modules/core-js/library/modules/es6.object.define-property.js","webpack:///./node_modules/core-js/library/modules/es6.object.get-own-property-descriptor.js","webpack:///./node_modules/core-js/library/modules/es6.object.set-prototype-of.js","webpack:///./node_modules/core-js/library/modules/es6.parse-int.js","webpack:///./node_modules/core-js/library/modules/es6.string.iterator.js","webpack:///./node_modules/core-js/library/modules/es6.symbol.js","webpack:///./node_modules/core-js/library/modules/es6.weak-map.js","webpack:///./node_modules/core-js/library/modules/es7.object.entries.js","webpack:///./node_modules/core-js/library/modules/es7.object.values.js","webpack:///./node_modules/core-js/library/modules/es7.symbol.async-iterator.js","webpack:///./node_modules/core-js/library/modules/es7.symbol.observable.js","webpack:///./node_modules/core-js/library/modules/es7.weak-map.from.js","webpack:///./node_modules/core-js/library/modules/es7.weak-map.of.js","webpack:///./node_modules/core-js/library/modules/web.dom.iterable.js","webpack:///./node_modules/core-js/modules/_a-function.js","webpack:///./node_modules/core-js/modules/_a-number-value.js","webpack:///./node_modules/core-js/modules/_add-to-unscopables.js","webpack:///./node_modules/core-js/modules/_advance-string-index.js","webpack:///./node_modules/core-js/modules/_an-instance.js","webpack:///./node_modules/core-js/modules/_an-object.js","webpack:///./node_modules/core-js/modules/_array-copy-within.js","webpack:///./node_modules/core-js/modules/_array-fill.js","webpack:///./node_modules/core-js/modules/_array-from-iterable.js","webpack:///./node_modules/core-js/modules/_array-includes.js","webpack:///./node_modules/core-js/modules/_array-methods.js","webpack:///./node_modules/core-js/modules/_array-reduce.js","webpack:///./node_modules/core-js/modules/_array-species-constructor.js","webpack:///./node_modules/core-js/modules/_array-species-create.js","webpack:///./node_modules/core-js/modules/_bind.js","webpack:///./node_modules/core-js/modules/_classof.js","webpack:///./node_modules/core-js/modules/_cof.js","webpack:///./node_modules/core-js/modules/_collection-strong.js","webpack:///./node_modules/core-js/modules/_collection-to-json.js","webpack:///./node_modules/core-js/modules/_collection-weak.js","webpack:///./node_modules/core-js/modules/_collection.js","webpack:///./node_modules/core-js/modules/_core.js","webpack:///./node_modules/core-js/modules/_create-property.js","webpack:///./node_modules/core-js/modules/_ctx.js","webpack:///./node_modules/core-js/modules/_date-to-iso-string.js","webpack:///./node_modules/core-js/modules/_date-to-primitive.js","webpack:///./node_modules/core-js/modules/_defined.js","webpack:///./node_modules/core-js/modules/_descriptors.js","webpack:///./node_modules/core-js/modules/_dom-create.js","webpack:///./node_modules/core-js/modules/_enum-bug-keys.js","webpack:///./node_modules/core-js/modules/_enum-keys.js","webpack:///./node_modules/core-js/modules/_export.js","webpack:///./node_modules/core-js/modules/_fails-is-regexp.js","webpack:///./node_modules/core-js/modules/_fails.js","webpack:///./node_modules/core-js/modules/_fix-re-wks.js","webpack:///./node_modules/core-js/modules/_flags.js","webpack:///./node_modules/core-js/modules/_flatten-into-array.js","webpack:///./node_modules/core-js/modules/_for-of.js","webpack:///./node_modules/core-js/modules/_function-to-string.js","webpack:///./node_modules/core-js/modules/_global.js","webpack:///./node_modules/core-js/modules/_has.js","webpack:///./node_modules/core-js/modules/_hide.js","webpack:///./node_modules/core-js/modules/_html.js","webpack:///./node_modules/core-js/modules/_ie8-dom-define.js","webpack:///./node_modules/core-js/modules/_inherit-if-required.js","webpack:///./node_modules/core-js/modules/_invoke.js","webpack:///./node_modules/core-js/modules/_iobject.js","webpack:///./node_modules/core-js/modules/_is-array-iter.js","webpack:///./node_modules/core-js/modules/_is-array.js","webpack:///./node_modules/core-js/modules/_is-integer.js","webpack:///./node_modules/core-js/modules/_is-object.js","webpack:///./node_modules/core-js/modules/_is-regexp.js","webpack:///./node_modules/core-js/modules/_iter-call.js","webpack:///./node_modules/core-js/modules/_iter-create.js","webpack:///./node_modules/core-js/modules/_iter-define.js","webpack:///./node_modules/core-js/modules/_iter-detect.js","webpack:///./node_modules/core-js/modules/_iter-step.js","webpack:///./node_modules/core-js/modules/_iterators.js","webpack:///./node_modules/core-js/modules/_library.js","webpack:///./node_modules/core-js/modules/_math-expm1.js","webpack:///./node_modules/core-js/modules/_math-fround.js","webpack:///./node_modules/core-js/modules/_math-log1p.js","webpack:///./node_modules/core-js/modules/_math-scale.js","webpack:///./node_modules/core-js/modules/_math-sign.js","webpack:///./node_modules/core-js/modules/_meta.js","webpack:///./node_modules/core-js/modules/_metadata.js","webpack:///./node_modules/core-js/modules/_microtask.js","webpack:///./node_modules/core-js/modules/_new-promise-capability.js","webpack:///./node_modules/core-js/modules/_object-assign.js","webpack:///./node_modules/core-js/modules/_object-create.js","webpack:///./node_modules/core-js/modules/_object-dp.js","webpack:///./node_modules/core-js/modules/_object-dps.js","webpack:///./node_modules/core-js/modules/_object-forced-pam.js","webpack:///./node_modules/core-js/modules/_object-gopd.js","webpack:///./node_modules/core-js/modules/_object-gopn-ext.js","webpack:///./node_modules/core-js/modules/_object-gopn.js","webpack:///./node_modules/core-js/modules/_object-gops.js","webpack:///./node_modules/core-js/modules/_object-gpo.js","webpack:///./node_modules/core-js/modules/_object-keys-internal.js","webpack:///./node_modules/core-js/modules/_object-keys.js","webpack:///./node_modules/core-js/modules/_object-pie.js","webpack:///./node_modules/core-js/modules/_object-sap.js","webpack:///./node_modules/core-js/modules/_object-to-array.js","webpack:///./node_modules/core-js/modules/_own-keys.js","webpack:///./node_modules/core-js/modules/_parse-float.js","webpack:///./node_modules/core-js/modules/_parse-int.js","webpack:///./node_modules/core-js/modules/_perform.js","webpack:///./node_modules/core-js/modules/_promise-resolve.js","webpack:///./node_modules/core-js/modules/_property-desc.js","webpack:///./node_modules/core-js/modules/_redefine-all.js","webpack:///./node_modules/core-js/modules/_redefine.js","webpack:///./node_modules/core-js/modules/_regexp-exec-abstract.js","webpack:///./node_modules/core-js/modules/_regexp-exec.js","webpack:///./node_modules/core-js/modules/_replacer.js","webpack:///./node_modules/core-js/modules/_same-value.js","webpack:///./node_modules/core-js/modules/_set-collection-from.js","webpack:///./node_modules/core-js/modules/_set-collection-of.js","webpack:///./node_modules/core-js/modules/_set-proto.js","webpack:///./node_modules/core-js/modules/_set-species.js","webpack:///./node_modules/core-js/modules/_set-to-string-tag.js","webpack:///./node_modules/core-js/modules/_shared-key.js","webpack:///./node_modules/core-js/modules/_shared.js","webpack:///./node_modules/core-js/modules/_species-constructor.js","webpack:///./node_modules/core-js/modules/_strict-method.js","webpack:///./node_modules/core-js/modules/_string-at.js","webpack:///./node_modules/core-js/modules/_string-context.js","webpack:///./node_modules/core-js/modules/_string-html.js","webpack:///./node_modules/core-js/modules/_string-pad.js","webpack:///./node_modules/core-js/modules/_string-repeat.js","webpack:///./node_modules/core-js/modules/_string-trim.js","webpack:///./node_modules/core-js/modules/_string-ws.js","webpack:///./node_modules/core-js/modules/_task.js","webpack:///./node_modules/core-js/modules/_to-absolute-index.js","webpack:///./node_modules/core-js/modules/_to-index.js","webpack:///./node_modules/core-js/modules/_to-integer.js","webpack:///./node_modules/core-js/modules/_to-iobject.js","webpack:///./node_modules/core-js/modules/_to-length.js","webpack:///./node_modules/core-js/modules/_to-object.js","webpack:///./node_modules/core-js/modules/_to-primitive.js","webpack:///./node_modules/core-js/modules/_typed-array.js","webpack:///./node_modules/core-js/modules/_typed-buffer.js","webpack:///./node_modules/core-js/modules/_typed.js","webpack:///./node_modules/core-js/modules/_uid.js","webpack:///./node_modules/core-js/modules/_user-agent.js","webpack:///./node_modules/core-js/modules/_validate-collection.js","webpack:///./node_modules/core-js/modules/_wks-define.js","webpack:///./node_modules/core-js/modules/_wks-ext.js","webpack:///./node_modules/core-js/modules/_wks.js","webpack:///./node_modules/core-js/modules/core.get-iterator-method.js","webpack:///./node_modules/core-js/modules/core.regexp.escape.js","webpack:///./node_modules/core-js/modules/es6.array.copy-within.js","webpack:///./node_modules/core-js/modules/es6.array.every.js","webpack:///./node_modules/core-js/modules/es6.array.fill.js","webpack:///./node_modules/core-js/modules/es6.array.filter.js","webpack:///./node_modules/core-js/modules/es6.array.find-index.js","webpack:///./node_modules/core-js/modules/es6.array.find.js","webpack:///./node_modules/core-js/modules/es6.array.for-each.js","webpack:///./node_modules/core-js/modules/es6.array.from.js","webpack:///./node_modules/core-js/modules/es6.array.index-of.js","webpack:///./node_modules/core-js/modules/es6.array.is-array.js","webpack:///./node_modules/core-js/modules/es6.array.iterator.js","webpack:///./node_modules/core-js/modules/es6.array.join.js","webpack:///./node_modules/core-js/modules/es6.array.last-index-of.js","webpack:///./node_modules/core-js/modules/es6.array.map.js","webpack:///./node_modules/core-js/modules/es6.array.of.js","webpack:///./node_modules/core-js/modules/es6.array.reduce-right.js","webpack:///./node_modules/core-js/modules/es6.array.reduce.js","webpack:///./node_modules/core-js/modules/es6.array.slice.js","webpack:///./node_modules/core-js/modules/es6.array.some.js","webpack:///./node_modules/core-js/modules/es6.array.sort.js","webpack:///./node_modules/core-js/modules/es6.array.species.js","webpack:///./node_modules/core-js/modules/es6.date.now.js","webpack:///./node_modules/core-js/modules/es6.date.to-iso-string.js","webpack:///./node_modules/core-js/modules/es6.date.to-json.js","webpack:///./node_modules/core-js/modules/es6.date.to-primitive.js","webpack:///./node_modules/core-js/modules/es6.date.to-string.js","webpack:///./node_modules/core-js/modules/es6.function.bind.js","webpack:///./node_modules/core-js/modules/es6.function.has-instance.js","webpack:///./node_modules/core-js/modules/es6.function.name.js","webpack:///./node_modules/core-js/modules/es6.map.js","webpack:///./node_modules/core-js/modules/es6.math.acosh.js","webpack:///./node_modules/core-js/modules/es6.math.asinh.js","webpack:///./node_modules/core-js/modules/es6.math.atanh.js","webpack:///./node_modules/core-js/modules/es6.math.cbrt.js","webpack:///./node_modules/core-js/modules/es6.math.clz32.js","webpack:///./node_modules/core-js/modules/es6.math.cosh.js","webpack:///./node_modules/core-js/modules/es6.math.expm1.js","webpack:///./node_modules/core-js/modules/es6.math.fround.js","webpack:///./node_modules/core-js/modules/es6.math.hypot.js","webpack:///./node_modules/core-js/modules/es6.math.imul.js","webpack:///./node_modules/core-js/modules/es6.math.log10.js","webpack:///./node_modules/core-js/modules/es6.math.log1p.js","webpack:///./node_modules/core-js/modules/es6.math.log2.js","webpack:///./node_modules/core-js/modules/es6.math.sign.js","webpack:///./node_modules/core-js/modules/es6.math.sinh.js","webpack:///./node_modules/core-js/modules/es6.math.tanh.js","webpack:///./node_modules/core-js/modules/es6.math.trunc.js","webpack:///./node_modules/core-js/modules/es6.number.constructor.js","webpack:///./node_modules/core-js/modules/es6.number.epsilon.js","webpack:///./node_modules/core-js/modules/es6.number.is-finite.js","webpack:///./node_modules/core-js/modules/es6.number.is-integer.js","webpack:///./node_modules/core-js/modules/es6.number.is-nan.js","webpack:///./node_modules/core-js/modules/es6.number.is-safe-integer.js","webpack:///./node_modules/core-js/modules/es6.number.max-safe-integer.js","webpack:///./node_modules/core-js/modules/es6.number.min-safe-integer.js","webpack:///./node_modules/core-js/modules/es6.number.parse-float.js","webpack:///./node_modules/core-js/modules/es6.number.parse-int.js","webpack:///./node_modules/core-js/modules/es6.number.to-fixed.js","webpack:///./node_modules/core-js/modules/es6.number.to-precision.js","webpack:///./node_modules/core-js/modules/es6.object.assign.js","webpack:///./node_modules/core-js/modules/es6.object.create.js","webpack:///./node_modules/core-js/modules/es6.object.define-properties.js","webpack:///./node_modules/core-js/modules/es6.object.define-property.js","webpack:///./node_modules/core-js/modules/es6.object.freeze.js","webpack:///./node_modules/core-js/modules/es6.object.get-own-property-descriptor.js","webpack:///./node_modules/core-js/modules/es6.object.get-own-property-names.js","webpack:///./node_modules/core-js/modules/es6.object.get-prototype-of.js","webpack:///./node_modules/core-js/modules/es6.object.is-extensible.js","webpack:///./node_modules/core-js/modules/es6.object.is-frozen.js","webpack:///./node_modules/core-js/modules/es6.object.is-sealed.js","webpack:///./node_modules/core-js/modules/es6.object.is.js","webpack:///./node_modules/core-js/modules/es6.object.keys.js","webpack:///./node_modules/core-js/modules/es6.object.prevent-extensions.js","webpack:///./node_modules/core-js/modules/es6.object.seal.js","webpack:///./node_modules/core-js/modules/es6.object.set-prototype-of.js","webpack:///./node_modules/core-js/modules/es6.object.to-string.js","webpack:///./node_modules/core-js/modules/es6.parse-float.js","webpack:///./node_modules/core-js/modules/es6.parse-int.js","webpack:///./node_modules/core-js/modules/es6.promise.js","webpack:///./node_modules/core-js/modules/es6.reflect.apply.js","webpack:///./node_modules/core-js/modules/es6.reflect.construct.js","webpack:///./node_modules/core-js/modules/es6.reflect.define-property.js","webpack:///./node_modules/core-js/modules/es6.reflect.delete-property.js","webpack:///./node_modules/core-js/modules/es6.reflect.enumerate.js","webpack:///./node_modules/core-js/modules/es6.reflect.get-own-property-descriptor.js","webpack:///./node_modules/core-js/modules/es6.reflect.get-prototype-of.js","webpack:///./node_modules/core-js/modules/es6.reflect.get.js","webpack:///./node_modules/core-js/modules/es6.reflect.has.js","webpack:///./node_modules/core-js/modules/es6.reflect.is-extensible.js","webpack:///./node_modules/core-js/modules/es6.reflect.own-keys.js","webpack:///./node_modules/core-js/modules/es6.reflect.prevent-extensions.js","webpack:///./node_modules/core-js/modules/es6.reflect.set-prototype-of.js","webpack:///./node_modules/core-js/modules/es6.reflect.set.js","webpack:///./node_modules/core-js/modules/es6.regexp.constructor.js","webpack:///./node_modules/core-js/modules/es6.regexp.exec.js","webpack:///./node_modules/core-js/modules/es6.regexp.flags.js","webpack:///./node_modules/core-js/modules/es6.regexp.match.js","webpack:///./node_modules/core-js/modules/es6.regexp.replace.js","webpack:///./node_modules/core-js/modules/es6.regexp.search.js","webpack:///./node_modules/core-js/modules/es6.regexp.split.js","webpack:///./node_modules/core-js/modules/es6.regexp.to-string.js","webpack:///./node_modules/core-js/modules/es6.set.js","webpack:///./node_modules/core-js/modules/es6.string.anchor.js","webpack:///./node_modules/core-js/modules/es6.string.big.js","webpack:///./node_modules/core-js/modules/es6.string.blink.js","webpack:///./node_modules/core-js/modules/es6.string.bold.js","webpack:///./node_modules/core-js/modules/es6.string.code-point-at.js","webpack:///./node_modules/core-js/modules/es6.string.ends-with.js","webpack:///./node_modules/core-js/modules/es6.string.fixed.js","webpack:///./node_modules/core-js/modules/es6.string.fontcolor.js","webpack:///./node_modules/core-js/modules/es6.string.fontsize.js","webpack:///./node_modules/core-js/modules/es6.string.from-code-point.js","webpack:///./node_modules/core-js/modules/es6.string.includes.js","webpack:///./node_modules/core-js/modules/es6.string.italics.js","webpack:///./node_modules/core-js/modules/es6.string.iterator.js","webpack:///./node_modules/core-js/modules/es6.string.link.js","webpack:///./node_modules/core-js/modules/es6.string.raw.js","webpack:///./node_modules/core-js/modules/es6.string.repeat.js","webpack:///./node_modules/core-js/modules/es6.string.small.js","webpack:///./node_modules/core-js/modules/es6.string.starts-with.js","webpack:///./node_modules/core-js/modules/es6.string.strike.js","webpack:///./node_modules/core-js/modules/es6.string.sub.js","webpack:///./node_modules/core-js/modules/es6.string.sup.js","webpack:///./node_modules/core-js/modules/es6.string.trim.js","webpack:///./node_modules/core-js/modules/es6.symbol.js","webpack:///./node_modules/core-js/modules/es6.typed.array-buffer.js","webpack:///./node_modules/core-js/modules/es6.typed.data-view.js","webpack:///./node_modules/core-js/modules/es6.typed.float32-array.js","webpack:///./node_modules/core-js/modules/es6.typed.float64-array.js","webpack:///./node_modules/core-js/modules/es6.typed.int16-array.js","webpack:///./node_modules/core-js/modules/es6.typed.int32-array.js","webpack:///./node_modules/core-js/modules/es6.typed.int8-array.js","webpack:///./node_modules/core-js/modules/es6.typed.uint16-array.js","webpack:///./node_modules/core-js/modules/es6.typed.uint32-array.js","webpack:///./node_modules/core-js/modules/es6.typed.uint8-array.js","webpack:///./node_modules/core-js/modules/es6.typed.uint8-clamped-array.js","webpack:///./node_modules/core-js/modules/es6.weak-map.js","webpack:///./node_modules/core-js/modules/es6.weak-set.js","webpack:///./node_modules/core-js/modules/es7.array.flat-map.js","webpack:///./node_modules/core-js/modules/es7.array.flatten.js","webpack:///./node_modules/core-js/modules/es7.array.includes.js","webpack:///./node_modules/core-js/modules/es7.asap.js","webpack:///./node_modules/core-js/modules/es7.error.is-error.js","webpack:///./node_modules/core-js/modules/es7.global.js","webpack:///./node_modules/core-js/modules/es7.map.from.js","webpack:///./node_modules/core-js/modules/es7.map.of.js","webpack:///./node_modules/core-js/modules/es7.map.to-json.js","webpack:///./node_modules/core-js/modules/es7.math.clamp.js","webpack:///./node_modules/core-js/modules/es7.math.deg-per-rad.js","webpack:///./node_modules/core-js/modules/es7.math.degrees.js","webpack:///./node_modules/core-js/modules/es7.math.fscale.js","webpack:///./node_modules/core-js/modules/es7.math.iaddh.js","webpack:///./node_modules/core-js/modules/es7.math.imulh.js","webpack:///./node_modules/core-js/modules/es7.math.isubh.js","webpack:///./node_modules/core-js/modules/es7.math.rad-per-deg.js","webpack:///./node_modules/core-js/modules/es7.math.radians.js","webpack:///./node_modules/core-js/modules/es7.math.scale.js","webpack:///./node_modules/core-js/modules/es7.math.signbit.js","webpack:///./node_modules/core-js/modules/es7.math.umulh.js","webpack:///./node_modules/core-js/modules/es7.object.define-getter.js","webpack:///./node_modules/core-js/modules/es7.object.define-setter.js","webpack:///./node_modules/core-js/modules/es7.object.entries.js","webpack:///./node_modules/core-js/modules/es7.object.get-own-property-descriptors.js","webpack:///./node_modules/core-js/modules/es7.object.lookup-getter.js","webpack:///./node_modules/core-js/modules/es7.object.lookup-setter.js","webpack:///./node_modules/core-js/modules/es7.object.values.js","webpack:///./node_modules/core-js/modules/es7.observable.js","webpack:///./node_modules/core-js/modules/es7.promise.finally.js","webpack:///./node_modules/core-js/modules/es7.promise.try.js","webpack:///./node_modules/core-js/modules/es7.reflect.define-metadata.js","webpack:///./node_modules/core-js/modules/es7.reflect.delete-metadata.js","webpack:///./node_modules/core-js/modules/es7.reflect.get-metadata-keys.js","webpack:///./node_modules/core-js/modules/es7.reflect.get-metadata.js","webpack:///./node_modules/core-js/modules/es7.reflect.get-own-metadata-keys.js","webpack:///./node_modules/core-js/modules/es7.reflect.get-own-metadata.js","webpack:///./node_modules/core-js/modules/es7.reflect.has-metadata.js","webpack:///./node_modules/core-js/modules/es7.reflect.has-own-metadata.js","webpack:///./node_modules/core-js/modules/es7.reflect.metadata.js","webpack:///./node_modules/core-js/modules/es7.set.from.js","webpack:///./node_modules/core-js/modules/es7.set.of.js","webpack:///./node_modules/core-js/modules/es7.set.to-json.js","webpack:///./node_modules/core-js/modules/es7.string.at.js","webpack:///./node_modules/core-js/modules/es7.string.match-all.js","webpack:///./node_modules/core-js/modules/es7.string.pad-end.js","webpack:///./node_modules/core-js/modules/es7.string.pad-start.js","webpack:///./node_modules/core-js/modules/es7.string.trim-left.js","webpack:///./node_modules/core-js/modules/es7.string.trim-right.js","webpack:///./node_modules/core-js/modules/es7.symbol.async-iterator.js","webpack:///./node_modules/core-js/modules/es7.symbol.observable.js","webpack:///./node_modules/core-js/modules/es7.system.global.js","webpack:///./node_modules/core-js/modules/es7.weak-map.from.js","webpack:///./node_modules/core-js/modules/es7.weak-map.of.js","webpack:///./node_modules/core-js/modules/es7.weak-set.from.js","webpack:///./node_modules/core-js/modules/es7.weak-set.of.js","webpack:///./node_modules/core-js/modules/web.dom.iterable.js","webpack:///./node_modules/core-js/modules/web.immediate.js","webpack:///./node_modules/core-js/modules/web.timers.js","webpack:///./node_modules/core-js/shim.js","webpack:///./node_modules/deep-diff/index.js","webpack:///./node_modules/dom-helpers/activeElement.js","webpack:///./node_modules/dom-helpers/class/addClass.js","webpack:///./node_modules/dom-helpers/class/hasClass.js","webpack:///./node_modules/dom-helpers/class/index.js","webpack:///./node_modules/dom-helpers/class/removeClass.js","webpack:///./node_modules/dom-helpers/events/filter.js","webpack:///./node_modules/dom-helpers/events/index.js","webpack:///./node_modules/dom-helpers/events/listen.js","webpack:///./node_modules/dom-helpers/events/off.js","webpack:///./node_modules/dom-helpers/events/on.js","webpack:///./node_modules/dom-helpers/ownerDocument.js","webpack:///./node_modules/dom-helpers/query/contains.js","webpack:///./node_modules/dom-helpers/query/isWindow.js","webpack:///./node_modules/dom-helpers/query/offset.js","webpack:///./node_modules/dom-helpers/query/offsetParent.js","webpack:///./node_modules/dom-helpers/query/position.js","webpack:///./node_modules/dom-helpers/query/querySelectorAll.js","webpack:///./node_modules/dom-helpers/query/scrollLeft.js","webpack:///./node_modules/dom-helpers/query/scrollTop.js","webpack:///./node_modules/dom-helpers/style/getComputedStyle.js","webpack:///./node_modules/dom-helpers/style/index.js","webpack:///./node_modules/dom-helpers/style/removeStyle.js","webpack:///./node_modules/dom-helpers/transition/end.js","webpack:///./node_modules/dom-helpers/transition/index.js","webpack:///./node_modules/dom-helpers/transition/isTransform.js","webpack:///./node_modules/dom-helpers/transition/properties.js","webpack:///./node_modules/dom-helpers/util/camelize.js","webpack:///./node_modules/dom-helpers/util/camelizeStyle.js","webpack:///./node_modules/dom-helpers/util/hyphenate.js","webpack:///./node_modules/dom-helpers/util/hyphenateStyle.js","webpack:///./node_modules/dom-helpers/util/inDOM.js","webpack:///./node_modules/dom-helpers/util/scrollbarSize.js","webpack:///./node_modules/fflate/esm/browser.js","webpack:///./node_modules/form-serialize/index.js","webpack:///./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js","webpack:///./node_modules/html2canvas/dist/html2canvas.js","webpack:///./node_modules/ieee754/index.js","webpack:///./node_modules/invariant/browser.js","webpack:///./node_modules/isarray/index.js","webpack:///./node_modules/jspdf/dist/jspdf.es.min.js","webpack:///./node_modules/keycode/index.js","webpack:///./node_modules/lodash-es/_Symbol.js","webpack:///./node_modules/lodash-es/_baseGetTag.js","webpack:///./node_modules/lodash-es/_freeGlobal.js","webpack:///./node_modules/lodash-es/_getPrototype.js","webpack:///./node_modules/lodash-es/_getRawTag.js","webpack:///./node_modules/lodash-es/_objectToString.js","webpack:///./node_modules/lodash-es/_overArg.js","webpack:///./node_modules/lodash-es/_root.js","webpack:///./node_modules/lodash-es/isObjectLike.js","webpack:///./node_modules/lodash-es/isPlainObject.js","webpack:///./node_modules/lodash/_Symbol.js","webpack:///./node_modules/lodash/_baseGetTag.js","webpack:///./node_modules/lodash/_freeGlobal.js","webpack:///./node_modules/lodash/_getPrototype.js","webpack:///./node_modules/lodash/_getRawTag.js","webpack:///./node_modules/lodash/_objectToString.js","webpack:///./node_modules/lodash/_overArg.js","webpack:///./node_modules/lodash/_root.js","webpack:///./node_modules/lodash/isObjectLike.js","webpack:///./node_modules/lodash/isPlainObject.js","webpack:///./node_modules/memoize-one/dist/memoize-one.esm.js","webpack:///./node_modules/node-libs-browser/node_modules/buffer/index.js","webpack:///./node_modules/object-assign/index.js","webpack:///./node_modules/prop-types-extra/lib/all.js","webpack:///./node_modules/prop-types-extra/lib/componentOrElement.js","webpack:///./node_modules/prop-types-extra/lib/deprecated.js","webpack:///./node_modules/prop-types-extra/lib/elementType.js","webpack:///./node_modules/prop-types-extra/lib/isRequiredForA11y.js","webpack:///./node_modules/prop-types-extra/lib/utils/createChainableTypeChecker.js","webpack:///./node_modules/prop-types-extra/node_modules/warning/warning.js","webpack:///./node_modules/prop-types/checkPropTypes.js","webpack:///./node_modules/prop-types/factoryWithTypeCheckers.js","webpack:///./node_modules/prop-types/index.js","webpack:///./node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack:///./node_modules/prop-types/lib/has.js","webpack:///./node_modules/react-bootstrap/es/Accordion.js","webpack:///./node_modules/react-bootstrap/es/Alert.js","webpack:///./node_modules/react-bootstrap/es/Badge.js","webpack:///./node_modules/react-bootstrap/es/Breadcrumb.js","webpack:///./node_modules/react-bootstrap/es/BreadcrumbItem.js","webpack:///./node_modules/react-bootstrap/es/Button.js","webpack:///./node_modules/react-bootstrap/es/ButtonGroup.js","webpack:///./node_modules/react-bootstrap/es/ButtonToolbar.js","webpack:///./node_modules/react-bootstrap/es/Carousel.js","webpack:///./node_modules/react-bootstrap/es/CarouselCaption.js","webpack:///./node_modules/react-bootstrap/es/CarouselItem.js","webpack:///./node_modules/react-bootstrap/es/Checkbox.js","webpack:///./node_modules/react-bootstrap/es/Clearfix.js","webpack:///./node_modules/react-bootstrap/es/CloseButton.js","webpack:///./node_modules/react-bootstrap/es/Col.js","webpack:///./node_modules/react-bootstrap/es/Collapse.js","webpack:///./node_modules/react-bootstrap/es/ControlLabel.js","webpack:///./node_modules/react-bootstrap/es/Dropdown.js","webpack:///./node_modules/react-bootstrap/es/DropdownButton.js","webpack:///./node_modules/react-bootstrap/es/DropdownMenu.js","webpack:///./node_modules/react-bootstrap/es/DropdownToggle.js","webpack:///./node_modules/react-bootstrap/es/Fade.js","webpack:///./node_modules/react-bootstrap/es/Form.js","webpack:///./node_modules/react-bootstrap/es/FormControl.js","webpack:///./node_modules/react-bootstrap/es/FormControlFeedback.js","webpack:///./node_modules/react-bootstrap/es/FormControlStatic.js","webpack:///./node_modules/react-bootstrap/es/FormGroup.js","webpack:///./node_modules/react-bootstrap/es/Glyphicon.js","webpack:///./node_modules/react-bootstrap/es/Grid.js","webpack:///./node_modules/react-bootstrap/es/HelpBlock.js","webpack:///./node_modules/react-bootstrap/es/Image.js","webpack:///./node_modules/react-bootstrap/es/InputGroup.js","webpack:///./node_modules/react-bootstrap/es/InputGroupAddon.js","webpack:///./node_modules/react-bootstrap/es/InputGroupButton.js","webpack:///./node_modules/react-bootstrap/es/Jumbotron.js","webpack:///./node_modules/react-bootstrap/es/Label.js","webpack:///./node_modules/react-bootstrap/es/ListGroup.js","webpack:///./node_modules/react-bootstrap/es/ListGroupItem.js","webpack:///./node_modules/react-bootstrap/es/Media.js","webpack:///./node_modules/react-bootstrap/es/MediaBody.js","webpack:///./node_modules/react-bootstrap/es/MediaHeading.js","webpack:///./node_modules/react-bootstrap/es/MediaLeft.js","webpack:///./node_modules/react-bootstrap/es/MediaList.js","webpack:///./node_modules/react-bootstrap/es/MediaListItem.js","webpack:///./node_modules/react-bootstrap/es/MediaRight.js","webpack:///./node_modules/react-bootstrap/es/MenuItem.js","webpack:///./node_modules/react-bootstrap/es/Modal.js","webpack:///./node_modules/react-bootstrap/es/ModalBody.js","webpack:///./node_modules/react-bootstrap/es/ModalDialog.js","webpack:///./node_modules/react-bootstrap/es/ModalFooter.js","webpack:///./node_modules/react-bootstrap/es/ModalHeader.js","webpack:///./node_modules/react-bootstrap/es/ModalTitle.js","webpack:///./node_modules/react-bootstrap/es/Nav.js","webpack:///./node_modules/react-bootstrap/es/NavDropdown.js","webpack:///./node_modules/react-bootstrap/es/NavItem.js","webpack:///./node_modules/react-bootstrap/es/Navbar.js","webpack:///./node_modules/react-bootstrap/es/NavbarBrand.js","webpack:///./node_modules/react-bootstrap/es/NavbarCollapse.js","webpack:///./node_modules/react-bootstrap/es/NavbarHeader.js","webpack:///./node_modules/react-bootstrap/es/NavbarToggle.js","webpack:///./node_modules/react-bootstrap/es/Overlay.js","webpack:///./node_modules/react-bootstrap/es/OverlayTrigger.js","webpack:///./node_modules/react-bootstrap/es/PageHeader.js","webpack:///./node_modules/react-bootstrap/es/PageItem.js","webpack:///./node_modules/react-bootstrap/es/Pager.js","webpack:///./node_modules/react-bootstrap/es/PagerItem.js","webpack:///./node_modules/react-bootstrap/es/Pagination.js","webpack:///./node_modules/react-bootstrap/es/PaginationItem.js","webpack:///./node_modules/react-bootstrap/es/Panel.js","webpack:///./node_modules/react-bootstrap/es/PanelBody.js","webpack:///./node_modules/react-bootstrap/es/PanelCollapse.js","webpack:///./node_modules/react-bootstrap/es/PanelFooter.js","webpack:///./node_modules/react-bootstrap/es/PanelGroup.js","webpack:///./node_modules/react-bootstrap/es/PanelHeading.js","webpack:///./node_modules/react-bootstrap/es/PanelTitle.js","webpack:///./node_modules/react-bootstrap/es/PanelToggle.js","webpack:///./node_modules/react-bootstrap/es/Popover.js","webpack:///./node_modules/react-bootstrap/es/ProgressBar.js","webpack:///./node_modules/react-bootstrap/es/Radio.js","webpack:///./node_modules/react-bootstrap/es/ResponsiveEmbed.js","webpack:///./node_modules/react-bootstrap/es/Row.js","webpack:///./node_modules/react-bootstrap/es/SafeAnchor.js","webpack:///./node_modules/react-bootstrap/es/SplitButton.js","webpack:///./node_modules/react-bootstrap/es/SplitToggle.js","webpack:///./node_modules/react-bootstrap/es/Tab.js","webpack:///./node_modules/react-bootstrap/es/TabContainer.js","webpack:///./node_modules/react-bootstrap/es/TabContent.js","webpack:///./node_modules/react-bootstrap/es/TabPane.js","webpack:///./node_modules/react-bootstrap/es/Table.js","webpack:///./node_modules/react-bootstrap/es/Tabs.js","webpack:///./node_modules/react-bootstrap/es/Thumbnail.js","webpack:///./node_modules/react-bootstrap/es/ToggleButton.js","webpack:///./node_modules/react-bootstrap/es/ToggleButtonGroup.js","webpack:///./node_modules/react-bootstrap/es/Tooltip.js","webpack:///./node_modules/react-bootstrap/es/Well.js","webpack:///./node_modules/react-bootstrap/es/index.js","webpack:///./node_modules/react-bootstrap/es/utils/PropTypes.js","webpack:///./node_modules/react-bootstrap/es/utils/StyleConfig.js","webpack:///./node_modules/react-bootstrap/es/utils/ValidComponentChildren.js","webpack:///./node_modules/react-bootstrap/es/utils/bootstrapUtils.js","webpack:///./node_modules/react-bootstrap/es/utils/capitalize.js","webpack:///./node_modules/react-bootstrap/es/utils/createChainedFunction.js","webpack:///./node_modules/react-bootstrap/es/utils/deprecationWarning.js","webpack:///./node_modules/react-bootstrap/es/utils/index.js","webpack:///./node_modules/react-bootstrap/es/utils/splitComponentProps.js","webpack:///./node_modules/react-bootstrap/lib/Fade.js","webpack:///./node_modules/react-bootstrap/lib/Tab.js","webpack:///./node_modules/react-bootstrap/lib/TabContainer.js","webpack:///./node_modules/react-bootstrap/lib/TabContent.js","webpack:///./node_modules/react-bootstrap/lib/TabPane.js","webpack:///./node_modules/react-bootstrap/lib/utils/StyleConfig.js","webpack:///./node_modules/react-bootstrap/lib/utils/bootstrapUtils.js","webpack:///./node_modules/react-bootstrap/lib/utils/createChainedFunction.js","webpack:///./node_modules/react-dom/cjs/react-dom-server.browser.development.js","webpack:///./node_modules/react-dom/cjs/react-dom.development.js","webpack:///./node_modules/react-dom/index.js","webpack:///./node_modules/react-dom/server.browser.js","webpack:///./node_modules/react-is/cjs/react-is.development.js","webpack:///./node_modules/react-is/index.js","webpack:///./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js","webpack:///./node_modules/react-overlays/lib/LegacyPortal.js","webpack:///./node_modules/react-overlays/lib/Modal.js","webpack:///./node_modules/react-overlays/lib/ModalManager.js","webpack:///./node_modules/react-overlays/lib/Overlay.js","webpack:///./node_modules/react-overlays/lib/Portal.js","webpack:///./node_modules/react-overlays/lib/Position.js","webpack:///./node_modules/react-overlays/lib/RefHolder.js","webpack:///./node_modules/react-overlays/lib/RootCloseWrapper.js","webpack:///./node_modules/react-overlays/lib/utils/addEventListener.js","webpack:///./node_modules/react-overlays/lib/utils/addFocusListener.js","webpack:///./node_modules/react-overlays/lib/utils/calculatePosition.js","webpack:///./node_modules/react-overlays/lib/utils/getContainer.js","webpack:///./node_modules/react-overlays/lib/utils/isOverflowing.js","webpack:///./node_modules/react-overlays/lib/utils/manageAriaHidden.js","webpack:///./node_modules/react-overlays/lib/utils/ownerDocument.js","webpack:///./node_modules/react-prop-types/lib/elementType.js","webpack:///./node_modules/react-prop-types/lib/utils/createChainableTypeChecker.js","webpack:///./node_modules/react-redux/lib/components/Provider.js","webpack:///./node_modules/react-redux/lib/components/connect.js","webpack:///./node_modules/react-redux/lib/index.js","webpack:///./node_modules/react-redux/lib/utils/shallowEqual.js","webpack:///./node_modules/react-redux/lib/utils/storeShape.js","webpack:///./node_modules/react-redux/lib/utils/warning.js","webpack:///./node_modules/react-redux/lib/utils/wrapActionCreators.js","webpack:///./node_modules/react-router-dom/dist/index.js","webpack:///./node_modules/react-router/dist/index.js","webpack:///./node_modules/react-select/dist/Select-aab027f3.esm.js","webpack:///./node_modules/react-select/dist/index-641ee5b8.esm.js","webpack:///./node_modules/react-select/dist/react-select.esm.js","webpack:///./node_modules/react-select/dist/useStateManager-7e1e8489.esm.js","webpack:///./node_modules/react-transition-group/Transition.js","webpack:///./node_modules/react-transition-group/utils/PropTypes.js","webpack:///./node_modules/react/cjs/react.development.js","webpack:///./node_modules/react/index.js","webpack:///./node_modules/react_ujs/react_ujs/index.js","webpack:///./node_modules/react_ujs/react_ujs/src/events/detect.js","webpack:///./node_modules/react_ujs/react_ujs/src/events/native.js","webpack:///./node_modules/react_ujs/react_ujs/src/events/pjax.js","webpack:///./node_modules/react_ujs/react_ujs/src/events/turbolinks.js","webpack:///./node_modules/react_ujs/react_ujs/src/events/turbolinksClassic.js","webpack:///./node_modules/react_ujs/react_ujs/src/events/turbolinksClassicDeprecated.js","webpack:///./node_modules/react_ujs/react_ujs/src/getConstructor/fromGlobal.js","webpack:///./node_modules/react_ujs/react_ujs/src/getConstructor/fromRequireContext.js","webpack:///./node_modules/react_ujs/react_ujs/src/getConstructor/fromRequireContextWithGlobalFallback.js","webpack:///./node_modules/react_ujs/react_ujs/src/getConstructor/fromRequireContextsWithGlobalFallback.js","webpack:///./node_modules/react_ujs/react_ujs/src/reactDomClient.js","webpack:///./node_modules/react_ujs/react_ujs/src/renderHelpers.js","webpack:///./node_modules/redux-logger/lib/core.js","webpack:///./node_modules/redux-logger/lib/defaults.js","webpack:///./node_modules/redux-logger/lib/diff.js","webpack:///./node_modules/redux-logger/lib/helpers.js","webpack:///./node_modules/redux-logger/lib/index.js","webpack:///./node_modules/redux-saga/es/effects.js","webpack:///./node_modules/redux-saga/es/index.js","webpack:///./node_modules/redux-saga/es/internal/buffers.js","webpack:///./node_modules/redux-saga/es/internal/channel.js","webpack:///./node_modules/redux-saga/es/internal/io-helpers.js","webpack:///./node_modules/redux-saga/es/internal/io.js","webpack:///./node_modules/redux-saga/es/internal/middleware.js","webpack:///./node_modules/redux-saga/es/internal/proc.js","webpack:///./node_modules/redux-saga/es/internal/runSaga.js","webpack:///./node_modules/redux-saga/es/internal/sagaHelpers/fsmIterator.js","webpack:///./node_modules/redux-saga/es/internal/sagaHelpers/index.js","webpack:///./node_modules/redux-saga/es/internal/sagaHelpers/takeEvery.js","webpack:///./node_modules/redux-saga/es/internal/sagaHelpers/takeLatest.js","webpack:///./node_modules/redux-saga/es/internal/sagaHelpers/throttle.js","webpack:///./node_modules/redux-saga/es/internal/scheduler.js","webpack:///./node_modules/redux-saga/es/internal/utils.js","webpack:///./node_modules/redux-saga/es/utils.js","webpack:///./node_modules/redux/es/applyMiddleware.js","webpack:///./node_modules/redux/es/bindActionCreators.js","webpack:///./node_modules/redux/es/combineReducers.js","webpack:///./node_modules/redux/es/compose.js","webpack:///./node_modules/redux/es/createStore.js","webpack:///./node_modules/redux/es/index.js","webpack:///./node_modules/redux/es/utils/warning.js","webpack:///./node_modules/reselect/lib/index.js","webpack:///./node_modules/scheduler/cjs/scheduler-tracing.development.js","webpack:///./node_modules/scheduler/cjs/scheduler.development.js","webpack:///./node_modules/scheduler/index.js","webpack:///./node_modules/scheduler/tracing.js","webpack:///./node_modules/stylis/dist/stylis.mjs","webpack:///./node_modules/symbol-observable/es/index.js","webpack:///./node_modules/symbol-observable/es/ponyfill.js","webpack:///./node_modules/tui-color-picker/dist/tui-color-picker.js","webpack:///./node_modules/tui-image-editor/dist/tui-image-editor.css","webpack:///./node_modules/tui-image-editor/dist/tui-image-editor.js","webpack:///./node_modules/uncontrollable/index.js","webpack:///./node_modules/uncontrollable/utils.js","webpack:///./node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.browser.esm.js","webpack:///./node_modules/warning/browser.js","webpack:///(webpack)/buildin/amd-options.js","webpack:///(webpack)/buildin/global.js","webpack:///(webpack)/buildin/harmony-module.js","webpack:///(webpack)/buildin/module.js"],"sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t};\n\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"application\": 0\n \t};\n\n\n\n \t// script path function\n \tfunction jsonpScriptSrc(chunkId) {\n \t\treturn __webpack_require__.p + \"js/\" + ({}[chunkId]||chunkId) + \"-\" + {\"0\":\"ad91f8040dc9c348eaa4\",\"1\":\"d053d1628d40807a2dd1\"}[chunkId] + \".chunk.js\"\n \t}\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId) {\n \t\tvar promises = [];\n\n\n \t\t// JSONP chunk loading for javascript\n\n \t\tvar installedChunkData = installedChunks[chunkId];\n \t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n \t\t\t// a Promise means \"currently loading\".\n \t\t\tif(installedChunkData) {\n \t\t\t\tpromises.push(installedChunkData[2]);\n \t\t\t} else {\n \t\t\t\t// setup Promise in chunk cache\n \t\t\t\tvar promise = new Promise(function(resolve, reject) {\n \t\t\t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n \t\t\t\t});\n \t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n \t\t\t\t// start chunk loading\n \t\t\t\tvar script = document.createElement('script');\n \t\t\t\tvar onScriptComplete;\n\n \t\t\t\tscript.charset = 'utf-8';\n \t\t\t\tscript.timeout = 120;\n \t\t\t\tif (__webpack_require__.nc) {\n \t\t\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n \t\t\t\t}\n \t\t\t\tscript.src = jsonpScriptSrc(chunkId);\n\n \t\t\t\t// create error before stack unwound to get useful stacktrace later\n \t\t\t\tvar error = new Error();\n \t\t\t\tonScriptComplete = function (event) {\n \t\t\t\t\t// avoid mem leaks in IE.\n \t\t\t\t\tscript.onerror = script.onload = null;\n \t\t\t\t\tclearTimeout(timeout);\n \t\t\t\t\tvar chunk = installedChunks[chunkId];\n \t\t\t\t\tif(chunk !== 0) {\n \t\t\t\t\t\tif(chunk) {\n \t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n \t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n \t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n \t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n \t\t\t\t\t\t\terror.type = errorType;\n \t\t\t\t\t\t\terror.request = realSrc;\n \t\t\t\t\t\t\tchunk[1](error);\n \t\t\t\t\t\t}\n \t\t\t\t\t\tinstalledChunks[chunkId] = undefined;\n \t\t\t\t\t}\n \t\t\t\t};\n \t\t\t\tvar timeout = setTimeout(function(){\n \t\t\t\t\tonScriptComplete({ type: 'timeout', target: script });\n \t\t\t\t}, 120000);\n \t\t\t\tscript.onerror = script.onload = onScriptComplete;\n \t\t\t\tdocument.head.appendChild(script);\n \t\t\t}\n \t\t}\n \t\treturn Promise.all(promises);\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/packs/\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./app/javascript/packs/application.js\");\n","module.exports = __webpack_public_path__ + \"media/images/Composz-logo-black-trans-da502d86.png\";","module.exports = __webpack_public_path__ + \"media/images/Composz-logo-white-trans-68a3068d.png\";","module.exports = __webpack_public_path__ + \"media/images/WishCollage-576d481e.jpg\";","module.exports = __webpack_public_path__ + \"media/images/blankProfile-8f6d005f.png\";","module.exports = __webpack_public_path__ + \"media/slider/Banner-0-efc4a0b5.jpg\";","module.exports = __webpack_public_path__ + \"media/slider/Banner-1-3c1f10ca.jpg\";","module.exports = __webpack_public_path__ + \"media/slider/Banner-10-1f31442c.jpg\";","module.exports = __webpack_public_path__ + \"media/slider/Banner-11-21c4a497.jpg\";","module.exports = __webpack_public_path__ + \"media/slider/Banner-2-7c937fb2.jpg\";","module.exports = __webpack_public_path__ + \"media/slider/Banner-3-4270fa3c.jpg\";","module.exports = __webpack_public_path__ + \"media/slider/Banner-4-a4c4dade.jpg\";","module.exports = __webpack_public_path__ + \"media/slider/Banner-5-9fcfd8bf.jpg\";","module.exports = __webpack_public_path__ + \"media/slider/Banner-6-7a746c08.jpg\";","module.exports = __webpack_public_path__ + \"media/slider/Banner-7-75d01109.jpg\";","module.exports = __webpack_public_path__ + \"media/slider/Banner-8-f842cedf.jpg\";","module.exports = __webpack_public_path__ + \"media/slider/Banner-9-India-648f7362.jpg\";","module.exports = __webpack_public_path__ + \"media/slider/Banner-9-ca632935.jpg\";","module.exports = __webpack_public_path__ + \"media/slider/WelcomeToComposz-9179e6ed.jpg\";","module.exports = __webpack_public_path__ + \"media/slider/WelcomeToComposzAudio-72b8e474.jpg\";","module.exports = __webpack_public_path__ + \"media/slider/WelcomeToComposzIndia-3c7f0d24.jpg\";","module.exports = __webpack_public_path__ + \"media/slider/WelcomeToComposzMobile-89eb6b55.jpg\";","module.exports = __webpack_public_path__ + \"media/slider/WelcomeToComposzMobileIndia-0e1ba5b1.jpg\";","module.exports = __webpack_public_path__ + \"media/images/wishCollectorLogoOfficial-e18c3b48.png\";","export const GET_PRODUCT_DATA_LEVELS = \"GET_PRODUCT_DATA_LEVELS\";\nexport const DELETE_PRODUCT_DATA_LEVEL = \"DELETE_PRODUCT_DATA_LEVEL\";\nexport const CREATE_PRODUCT_DATA_LEVEL = \"CREATE_PRODUCT_DATA_LEVEL\";\nexport const PRODUCT_DATA_LEVELS = \"PRODUCT_DATA_LEVELS\";\nexport const NEW_PRODUCT_DATA_LEVEL = \"NEW_PRODUCT_DATA_LEVEL\";\n\nexport const DATA_LEVEL_ATTRIBUTES = \"DATA_LEVEL_ATTRIBUTES\";\nexport const NEW_DATA_LEVEL_ATTRIBUTE = \"DATA_LEVEL_ATTRIBUTES\";\nexport const GET_DATA_LEVEL_ATTRIBUTES = \"GET_DATA_LEVEL_ATTRIBUTES\";\nexport const DELETE_DATA_LEVEL_ATTRIBUTE = \"DELETE_DATA_LEVEL_ATTRIBUTE\";\nexport const UPDATE_DATA_LEVEL_ATTRIBUTE = \"UPDATE_DATA_LEVEL_ATTRIBUTE\";\nexport const CREATE_DATA_LEVEL_ATTRIBUTE = \"CREATE_DATA_LEVEL_ATTRIBUTE\";\n\nexport const GET_PRODUCTS = \"GET_PRODUCTS\";\nexport const DELETE_PRODUCT = \"DELETE_PRODUCT\";\nexport const DELETE_PRODUCT_SAGA = \"DELETE_PRODUCT_SAGA\";\nexport const UPDATE_PRODUCT = \"UPDATE_PRODUCT\";\nexport const UPDATE_PRODUCT_SAGA = \"UPDATE_PRODUCT_SAGA\";\nexport const CREATE_PRODUCT = \"CREATE_PRODUCT\";\nexport const PRODUCTS = \"PRODUCTS\";\nexport const CLONE_PRODUCT = \"CLONE_PRODUCT\";\nexport const GET_PRESET_PRODUCT = \"GET_PRESET_PRODUCT\";\nexport const GET_PRESET_PRODUCT_SAGA = \"GET_PRESET_PRODUCT_SAGA\";\n\nexport const TOGGLE_DATALEVEL_EXPAND = \"TOGGLE_DATALEVEL_EXPAND\";\nexport const TOGGLE_PRODUCT_EXPAND = \"TOGGLE_PRODUCT_EXPAND\";\n\nexport const TOGGLE = \"TOGGLE\";\nexport const TOGGLE_EDIT_DATALEVEL = \"TOGGLE_EDIT_DATALEVEL\";\nexport const TOGGLE_EDIT_PRODUCT = \"TOGGLE_EDIT_PRODUCT\";\nexport const TOGGLE_EDIT_DATALEVEL_ATTRIBUTE = \"TOGGLE_EDIT_DATALEVEL_ATTRIBUTE\";\n\nexport const CLEAR_PRODUCT_DATA_LEVELS = \"CLEAR_PRODUCT_DATA_LEVELS\";\nexport const CLEAR_PRODUCTS = \"CLEAR_PRODUCTS\";\n\nexport const UPDATE_OR_DELETE_RESOURCE = \"UPDATE_OR_DELETE_RESOURCE\";\nexport const CREATE_RESOURCE = \"CREATE_RESOURCE\";\n\nexport const GET_CATEGORIES = \"GET_CATEGORIES\";\nexport const ADD_CATEGORIES = \"ADD_CATEGORIES\";\n\nexport const ADD_PRODUCT_USER = \"ADD_PRODUCT_USER\";\nexport const PRODUCT_USER = \"PRODUCT_USER\";\n\nexport const ADD_VIEW_PRODUCT_USER = \"ADD_VIEW_PRODUCT_USER\";\nexport const GET_VIEW_PRODUCT_USER = \"GET_VIEW_PRODUCT_USER\";\nexport const ADD_VIEW_PRODUCT_USER_SAGA = \"ADD_VIEW_PRODUCT_USER_SAGA\";\nexport const GET_VIEW_PRODUCT_USER_SAGA = \"GET_VIEW_PRODUCT_USER_SAGA\";\n\n\nexport const GET_UPLOADED_DATA = \"GET_UPLOADED_DATA\";\nexport const GET_UPLOADED_DATA_SAGA = \"GET_UPLOADED_DATA_SAGA\";\nexport const UPDATE_UPLOADED_DATA = \"UPDATE_UPLOADED_DATA\";\nexport const UPDATE_UPLOADED_DATA_SAGA = \"UPDATE_UPLOADED_DATA_SAGA\";\n/* START OF CRUD product data levels*/\n\nexport const SET_USER_ROLE = \"SET_USER_ROLE\";\nexport const SET_USER_ROLE_SAGA = \"SET_USER_ROLE_SAGA\";\n\nexport const setCurrentUserRole = (role) => {\n return { type: SET_USER_ROLE_SAGA, role: role };\n};\n\nexport const getProductDatalevels = (product_id) => {\n return { type: PRODUCT_DATA_LEVELS, product_id: product_id };\n};\n\nexport const newProductDatalevel = (product_id, dlname) => {\n return {\n type: NEW_PRODUCT_DATA_LEVEL,\n payload: {\n product_id: product_id,\n dlname: dlname,\n id: product_id + \"/datalevels/\" + dlname,\n isEdit: true,\n attributes: [],\n },\n };\n};\n\nexport const deleteProductDataLevel = (id, persisted = true) => {\n if (persisted)\n return {\n type: UPDATE_OR_DELETE_RESOURCE,\n id: id,\n resource: \"datalevels\",\n method: \"delete\",\n payload: Object.assign({}, {}, { reducerKey: DELETE_PRODUCT_DATA_LEVEL }),\n };\n else return { type: DELETE_PRODUCT_DATA_LEVEL, id: id };\n};\n\nexport const createProductDatalevel = (product_id, dlname, dltype) => {\n return {\n type: CREATE_RESOURCE,\n resource: \"datalevels\",\n id: product_id + \"/datalevels\",\n method: \"create\",\n payload: Object.assign(\n {},\n {},\n { dltype: dltype, dlname: dlname, reducerKey: CREATE_PRODUCT_DATA_LEVEL }\n ),\n };\n};\n/* END OF CRUD product data levels*/\n\n/* START OF CRUD product data level attributes*/\nexport const getDataLevelAttributes = (product_id, dlname) => {\n return {\n type: DATA_LEVEL_ATTRIBUTES,\n product_id: product_id,\n dlname: dlname,\n };\n};\n\nexport const newDatalevelAttribute = (dlId, payload) => {\n return {\n type: NEW_DATA_LEVEL_ATTRIBUTE,\n dl_id: dlId,\n payload: Object.assign({}, payload, { isEdit: true }),\n };\n};\n\nexport const deleteDataLevelAttribute = (id, persisted = true) => {\n if (persisted)\n return {\n type: UPDATE_OR_DELETE_RESOURCE,\n id: id,\n resource: \"attributes\",\n method: \"delete\",\n payload: Object.assign({}, {}, { reducerKey: DELETE_DATA_LEVEL_ATTRIBUTE }),\n };\n else return { type: DELETE_DATA_LEVEL_ATTRIBUTE, id: id };\n};\n\nexport const updateDataLevelAttribute = (payload) => {\n return {\n type: UPDATE_OR_DELETE_RESOURCE,\n id: payload.id,\n resource: \"attributes\",\n method: \"update\",\n payload: Object.assign({}, payload, {\n reducerKey: UPDATE_DATA_LEVEL_ATTRIBUTE,\n }),\n };\n};\n\nexport const createDataLevelAttribute = (dlId, payload) => {\n let product_id = payload.product_id;\n let dlname = payload.dlname;\n let id = product_id + \"/datalevels/\" + dlname + \"/attributes\";\n return {\n type: CREATE_RESOURCE,\n dl_id: dlId,\n id: id,\n resource: \"attributes\",\n method: \"update\",\n payload: Object.assign({}, payload, {\n reducerKey: CREATE_DATA_LEVEL_ATTRIBUTE,\n }),\n };\n};\n/* END OF CRUD product data level attributes*/\n\n/* START OF CRUD product*/\nexport const getProducts = (payload) => {\n return {\n type: PRODUCTS,\n products_type: payload && payload.type ? payload.type : \"\",\n };\n};\n\nexport const getPresetProduct = (payload) => {\n return { type: GET_PRESET_PRODUCT, product_id: payload.product_id };\n};\n\n// export const deleteProduct = id => {\n// return { type: DELETE_PRODUCT, id: id };\n// };\n\nexport const deleteProduct = (url, method, payload) => {\n return {\n type: DELETE_PRODUCT_SAGA,\n payload: payload,\n url: url,\n method: method,\n };\n};\n\nexport const updateProduct = (id, url, method, payload) => {\n // return {type: UPDATE_PRODUCT, id: id, payload: payload};\n return {\n type: UPDATE_PRODUCT_SAGA,\n id: id,\n url: url,\n method: method,\n payload: payload,\n };\n};\n\nexport const createProduct = (url, method, payload) => {\n return { type: CREATE_PRODUCT, url: url, method: method, payload: payload };\n};\n\nexport const cloneProduct = (url, method, payload) => {\n return {\n type: CLONE_PRODUCT,\n payload: payload,\n url: url,\n method: method,\n };\n};\n/* END OF CRUD product*/\n\n/* START OF CRUD product*/\nexport const getCategories = () => {\n return { type: GET_CATEGORIES };\n};\n/* END OF CRUD product*/\n\nexport const toggleView = (payload) => {\n return { type: TOGGLE, payload: payload };\n};\n\nexport const productUser = (payload) => {\n return { type: PRODUCT_USER, payload: payload };\n};\n\nexport const addViewProductUser = (payload) => {\n return { type: ADD_VIEW_PRODUCT_USER, payload: payload };\n};\n\nexport const getViewProductUser = (payload) => {\n return { type: GET_VIEW_PRODUCT_USER, payload: payload };\n};\n\nexport const getUploadedData = (payload) => {\n let product_id = payload.product_id;\n let dlname = payload.dlname;\n return {\n type: GET_UPLOADED_DATA_SAGA,\n product_id: product_id,\n dlname: dlname,\n is_search: payload.isSearch,\n search_data: payload.searchData,\n page: payload.page,\n per_page: payload.per_page,\n };\n};\n\nexport const updateUploadedData = (payload) => {\n let product_id = payload.product_id;\n let dlname = payload.dlname;\n let data = payload.data;\n return {\n type: UPDATE_UPLOADED_DATA_SAGA,\n product_id: product_id,\n dlname: dlname,\n id: payload.id,\n data: data,\n };\n};\n","export const GET_PRODUCT_LAYOUTS = \"GET_PRODUCT_LAYOUTS\";\nexport const DELETE_PRODUCT_LAYOUT = \"DELETE_PRODUCT_LAYOUT\";\nexport const CREATE_PRODUCT_LAYOUT = \"CREATE_PRODUCT_LAYOUT\";\nexport const UPDATE_PRODUCT_LAYOUT = \"UPDATE_PRODUCT_LAYOUT\";\nexport const ADD_ALL_LAYOUTS = \"ADD_ALL_LAYOUTS\";\nexport const ADD_LAYOUT = \"ADD_LAYOUT\";\nexport const CLONE_LAYOUT = \"CLONE_LAYOUT\";\nexport const CLONE_PRODUCT_LAYOUT = \"CLONE_PRODUCT_LAYOUT\";\nexport const DELETE_LAYOUT = \"DELETE_LAYOUT\";\nexport const ADD_LY_DATALEVELS = \"ADD_LY_DATALEVELS\";\nexport const DELETE_LY_DATALEVEL = \"DELETE_LY_DATALEVEL\";\nexport const GET_LAYOUT_DETAILS = \"GET_LAYOUT_DETAILS\";\nexport const CREATE_LY_DATALEVEL = \"CREATE_LY_DATALEVEL\";\nexport const CREATE_LY_DATALEVEL_REL = \"CREATE_LY_DATALEVEL_REL\";\nexport const DELETE_LY_DATALEVEL_REL = \"DELETE_LY_DATALEVEL_REL\";\nexport const CREATE_LY_DATALEVEL_REL_KEY = \"CREATE_LY_DATALEVEL_REL_KEY\";\nexport const DELETE_LY_DATALEVEL_REL_KEY = \"DELETE_LY_DATALEVEL_REL_KEY\";\nexport const CREATE_LY_SLOTFOR = \"CREATE_LY_SLOTFOR\";\nexport const DELETE_LY_SLOTFOR = \"DELETE_LY_SLOTFOR\";\n\nexport const getLayouts = (product_id, payload = {}) => {\n return {\n type: GET_PRODUCT_LAYOUTS,\n id: product_id,\n reducerKey: ADD_ALL_LAYOUTS,\n payload: Object.assign({}, payload, { product_id: product_id }),\n };\n};\n\nexport const createLayout = (url, method, payload) => {\n return {\n type: CREATE_PRODUCT_LAYOUT,\n payload: payload,\n url: url,\n method: method,\n };\n};\n\nexport const updateLayout = (id, url, method, payload) => {\n // return {type: UPDATE_PRODUCT, id: id, payload: payload};\n return {\n type: UPDATE_PRODUCT_LAYOUT,\n id: id,\n url: url,\n method: method,\n payload: payload,\n };\n};\n\nexport const cloneLayout = (url, method, payload) => {\n return {\n type: CLONE_PRODUCT_LAYOUT,\n payload: payload,\n url: url,\n method: method,\n };\n};\n\nexport const deleteLayout = (url, method, payload) => {\n return {\n type: DELETE_PRODUCT_LAYOUT,\n payload: payload,\n url: url,\n method: method,\n id: payload.id,\n product_id: payload.product_id,\n };\n};\n\nexport const deleteLyDL = (url, method, payload) => {\n return {\n type: DELETE_LY_DATALEVEL,\n payload: payload,\n url: url,\n method: method,\n };\n};\n\nexport const createLyDL = (url, method, payload) => {\n return {\n type: CREATE_LY_DATALEVEL,\n payload: payload,\n url: url,\n method: method,\n };\n};\n\nexport const getLayoutDetails = (layout_id, payload = {}) => {\n return {\n type: GET_LAYOUT_DETAILS,\n id: layout_id,\n payload: Object.assign({}, payload, { layout_id: layout_id }),\n };\n};\n\nexport const deleteLyDLRel = (url, method, payload) => {\n return {\n type: DELETE_LY_DATALEVEL_REL,\n payload: payload,\n url: url,\n method: method,\n };\n};\n\nexport const createLyDLRel = (url, method, payload) => {\n return {\n type: CREATE_LY_DATALEVEL_REL,\n payload: payload,\n url: url,\n method: method,\n };\n};\n\nexport const deleteLyDLRelKey = (url, method, payload) => {\n return {\n type: DELETE_LY_DATALEVEL_REL_KEY,\n payload: payload,\n url: url,\n method: method,\n };\n};\n\nexport const createLyDLRelKey = (url, method, payload) => {\n return {\n type: CREATE_LY_DATALEVEL_REL_KEY,\n payload: payload,\n url: url,\n method: method,\n };\n};\n\nexport const deleteLyDLSlotFor = (url, method, payload) => {\n return {\n type: DELETE_LY_SLOTFOR,\n payload: payload,\n url: url,\n method: method,\n };\n};\n\nexport const createLyDLSlotFor = (url, method, payload) => {\n return {\n type: CREATE_LY_SLOTFOR,\n payload: payload,\n url: url,\n method: method,\n };\n};\n","export const SHOW_OVERLAY = \"SHOW_OVERLAY\";\nexport const HIDE_OVERLAY = \"HIDE_OVERLAY\";\nexport const TOGGLE_OVERLAY = \"TOGGLE_OVERLAY\";\nexport const SELECTED_DATALEVEL = \"SELECTED_DATALEVEL_OVERLAY\";\nexport const SELECTED_DATALEVEL_ATTRIBUTE = \"SELECTED_DATALEVEL_ATTRIBUTE_OVERLAY\";\nexport const SELECTED_ORDER = \"SELECTED_ORDER_OVERLAY\";\nexport const EXPAND_SECTION = \"EXPAND_SECTION\";\nexport const HIDE_SECTION = \"HIDE_SECTION\";\n\nexport const showOverlay = (id) => {\n return { type: SHOW_OVERLAY, id: id };\n};\nexport const hideOverlay = (id) => {\n return { type: HIDE_OVERLAY, id: id };\n};\n\nexport const expandSection = (id) => {\n return { type: EXPAND_SECTION, id: id };\n}\n\nexport const hideSection = (id) => {\n return { type: HIDE_SECTION, id: id };\n}\n\nexport const toggleOverlay = (id) => {\n return { type: TOGGLE_OVERLAY, id: id };\n};\n\nexport const selectDatalevel = (id, datalevel) => {\n return { type: SELECTED_DATALEVEL, id: id, payload: datalevel };\n}\n\nexport const selectDatalevelAttribute = (id, attribute) => {\n return { type: SELECTED_DATALEVEL_ATTRIBUTE, id: id, payload: attribute };\n}\n\nexport const selectKeyOrder = (id, order) => {\n return { type: SELECTED_ORDER, id: id, payload: order };\n}\n\nexport const toggleProductSets = (id) => {\n return { type: TOGGLE_PRODUCTSET, id: id };\n}","export const GET_PRICE = \"GET_PRICE\";\nexport const ADD_PRICE = \"ADD_PRICE\";\nexport const GENERATE_IMAGE = \"GENERATE_IMAGE\";\nexport const GENERATE_IMAGE_SAGA = \"GENERATE_IMAGE_SAGA\";\nexport const GET_VIEW_PRODUCTS = \"GET_VIEW_PRODUCTS\";\nexport const ADD_VIEW_PRODUCTS = \"ADD_VIEW_PRODUCTS\";\nexport const SHARE_PRODUCT = \"SHARE_PRODUCT\";\nexport const ADD_SHARE_PRODUCT = \"ADD_SHARE_PRODUCT\";\nexport const GET_ORDERS = \"GET_ORDERS\";\nexport const GET_ORDERS_SAGA = \"GET_ORDERS_SAGA\";\nexport const ADD_TO_CART = \"ADD_TO_CART\";\nexport const ADD_TO_CART_SAGA = \"ADD_TO_CART_SAGA\";\n\nexport const getPrice = (product_id, setno) => {\n setno = setno === undefined || setno === null ? \"\" : setno;\n return { type: GET_PRICE, product_id: product_id, setno: setno };\n};\n\nexport const generateImage = (product_id, setno) => {\n return {\n type: GENERATE_IMAGE_SAGA,\n payload: Object.assign({}, {}, { product_id: product_id, setno: setno }),\n };\n};\n\nexport const getViewProducts = () => {\n return { type: GET_VIEW_PRODUCTS };\n};\n\nexport const shareProduct = (payload) => {\n return { type: SHARE_PRODUCT, payload: payload };\n};\n\nexport const addToCart = (payload) => {\n return { type: ADD_TO_CART_SAGA, payload: payload };\n};\n\nexport const getOrders = (payload) => {\n return { type: GET_ORDERS_SAGA, payload: payload };\n};\n","export const GET_PRODUCT_KEYS = \"GET_PRODUCT_KEYS\";\nexport const DELETE_PRODUCT_KEY = \"DELETE_PRODUCT_KEY\";\nexport const CREATE_PRODUCT_KEY = \"CREATE_PRODUCT_KEY\";\nexport const ADD_ALL_KEYS = \"ADD_ALL_KEYS\";\nexport const ADD_KEY = \"ADD_KEY\";\nexport const DELETE_KEY = \"DELETE_KEY\";\n\nexport const getKeys = (product_id) => {\n return { type: GET_PRODUCT_KEYS, id: product_id, reducerKey: ADD_ALL_KEYS };\n};\n\nexport const createKey =(url, method, payload) => {\n return { type: CREATE_PRODUCT_KEY, payload: payload, url: url, method: method };\n}\n\n\nexport const deleteKey =(url, method, payload) => {\n return { type: DELETE_PRODUCT_KEY, payload: payload, url: url, method: method };\n}","export const GET_PRODUCT_SETSAAAA = \"GET_PRODUCT_SETSAAAA\";\nexport const GET_PRODUCT_SETS = \"GET_PRODUCT_SETS\";\nexport const GET_PRODUCT_SET_PLACEHOLDERS = \"GET_PRODUCT_SET_PLACEHOLDERS\";\nexport const DELETE_PRODUCT_SET = \"DELETE_PRODUCT_SET\";\nexport const CREATE_PRODUCT_SET = \"CREATE_PRODUCT_SET\";\nexport const ADD_ALL_SETS = \"ADD_ALL_SETS\";\nexport const ADD_SET = \"ADD_SET\";\nexport const DELETE_SET = \"DELETE_SET\";\nexport const ADD_SET_KEYVALS = \"ADD_SET_KEYVALS\";\nexport const CREATE_PRODUCT_SET_KEY = \"CREATE_PRODUCT_SET_KEY\";\nexport const UPDATE_PRODUCT_SET_KEY = \"UPDATE_PRODUCT_SET_KEY\";\n\nexport const CREATE_PRODUCT_SET_DLVAL = \"CREATE_PRODUCT_SET_DLVAL\";\nexport const UPDATE_PRODUCT_SET_DLVAL = \"UPDATE_PRODUCT_SET_DLVAL\";\nexport const CREATE_PRODUCT_SET_LAYOUT = \"CREATE_PRODUCT_SET_LAYOUT\";\nexport const DELETE_PRODUCT_SET_LAYOUT = \"DELETE_PRODUCT_SET_LAYOUT\";\nexport const GET_SUPPORTED_PRODUCT_LAYOUTS = \"GET_SUPPORTED_PRODUCT_LAYOUTS\";\nexport const ADD_ALL_SUPPORTED_LAYOUTS = \"ADD_ALL_SUPPORTED_LAYOUTS\";\n\nexport const ADD_SET_OCCURENCE_COUNT = \"ADD_SET_OCCURENCE_COUNT\";\nexport const ADD_SET_OCCURENCE_COUNT_SAGA = \"ADD_SET_OCCURENCE_COUNT_SAGA\";\nexport const UPDATE_SET_OCCURENCE_COUNT = \"UPDATE_SET_OCCURENCE_COUNT\";\nexport const UPDATE_SET_OCCURENCE_COUNT_SAGA = \"UPDATE_SET_OCCURENCE_COUNT_SAGA\";\nexport const UPDATE_PRODUCT_SET = \"UPDATE_PRODUCT_SET\";\n\nexport const getSets = (product_id) => {\n return { type: GET_PRODUCT_SETS, id: product_id, reducerKey: ADD_ALL_SETS };\n};\n\nexport const createSet = (url, method, payload) => {\n return {\n type: CREATE_PRODUCT_SET,\n payload: payload,\n url: url,\n method: method,\n };\n};\n\nexport const deleteSet = (url, method, payload) => {\n return {\n type: DELETE_PRODUCT_SET,\n payload: payload,\n url: url,\n method: method,\n };\n};\n\nexport const updateSet = (id, url, method, payload) => {\n // return {type: UPDATE_PRODUCT, id: id, payload: payload};\n return {\n type: UPDATE_PRODUCT_SET,\n id: id,\n url: url,\n method: method,\n payload: payload,\n };\n};\n\nexport const createSetKey = (url, method, payload) => {\n return {\n type: CREATE_PRODUCT_SET_KEY,\n payload: payload,\n url: url,\n method: method,\n };\n};\n\nexport const updateSetKey = (url, method, payload) => {\n return {\n type: UPDATE_PRODUCT_SET_KEY,\n payload: payload,\n url: url,\n method: method,\n };\n};\n\nexport const createSetDLVal = (url, method, payload) => {\n return {\n type: CREATE_PRODUCT_SET_DLVAL,\n payload: payload,\n url: url,\n method: method,\n };\n};\n\nexport const updateSetDLVal = (url, method, payload) => {\n return {\n type: UPDATE_PRODUCT_SET_DLVAL,\n payload: payload,\n url: url,\n method: method,\n };\n};\n\nexport const getSetPlaceholders = (product_id, setno) => {\n return {\n type: GET_PRODUCT_SET_PLACEHOLDERS,\n id: product_id,\n setno: setno,\n reducerKey: ADD_SET_KEYVALS,\n };\n};\n\nexport const createSetLayout = (url, method, payload) => {\n return {\n type: CREATE_PRODUCT_SET_LAYOUT,\n payload: payload,\n url: url,\n method: method,\n };\n};\n\nexport const deleteSetLayout = (url, method, payload) => {\n return {\n type: DELETE_PRODUCT_SET_LAYOUT,\n payload: payload,\n url: url,\n method: method,\n };\n};\n\nexport const getSupportedLayouts = (product_id, payload = {}) => {\n return {\n type: GET_SUPPORTED_PRODUCT_LAYOUTS,\n id: product_id,\n reducerKey: ADD_ALL_SUPPORTED_LAYOUTS,\n payload: Object.assign({}, payload, { product_id: product_id }),\n };\n};\n\nexport const createSetOccurenceCount = (url, method, payload) => {\n return {\n type: ADD_SET_OCCURENCE_COUNT,\n payload: payload,\n url: url,\n method: method,\n };\n};\n\nexport const updateSetOccurenceCount = (url, method, payload) => {\n return {\n type: UPDATE_SET_OCCURENCE_COUNT,\n payload: payload,\n url: url,\n method: method,\n };\n};\n","export const distinctObjects = function (objectArr, compositeKey) {\n var runTime = {};\n for (var object of objectArr) {\n let uniqKey = compositeKey\n .map((key) => {\n return object[key];\n })\n .join(\"_\");\n runTime[uniqKey] = runTime[uniqKey] || {};\n runTime[uniqKey] = Object.assign({}, runTime[uniqKey], object);\n }\n return Object.values(runTime);\n};\n\nexport const formDataToJSON = function (formData) {\n let object = {};\n formData.forEach(function (value, key) {\n object[key] = value;\n });\n return object;\n};\n","import React, { Component } from \"react\";\n\nexport const authorized = function (requiredRoles, userRoles, type = \"ANY\") {\n if (userRoles.includes(\"preset\")) {\n return false;\n }\n if (userRoles.includes(\"admin\")) {\n return true;\n }\n\n if (type === \"ANY\") {\n return requiredRoles.some((role) => userRoles.includes(role));\n } else if (type === \"ALL\") {\n return !requiredRoles.some((role) => !userRoles.includes(role));\n }\n};\n\nexport class Authorized extends Component {\n constructor(props) {\n super(props);\n }\n render() {\n if (authorized(this.props.requiredRoles, this.props.userRoles, this.props.roleType || \"ANY\")) {\n return this.props.children;\n }\n return null;\n }\n}\n","export const formatCurrency = function (value, divisor, region) {\n const converted = value / divisor;\n let formatter = new Intl.NumberFormat(\"en-US\", {\n style: \"currency\",\n currency: region || \"USD\",\n });\n return formatter.format(converted); /* $2,500.00 */\n};\n","var map = {\n\t\"./AddProduct\": \"./app/javascript/components/AddProduct.jsx\",\n\t\"./AddProduct.jsx\": \"./app/javascript/components/AddProduct.jsx\",\n\t\"./AddUser\": \"./app/javascript/components/AddUser.jsx\",\n\t\"./AddUser.jsx\": \"./app/javascript/components/AddUser.jsx\",\n\t\"./AddUser1\": \"./app/javascript/components/AddUser1.jsx\",\n\t\"./AddUser1.jsx\": \"./app/javascript/components/AddUser1.jsx\",\n\t\"./AddViewProductUser\": \"./app/javascript/components/AddViewProductUser.jsx\",\n\t\"./AddViewProductUser.jsx\": \"./app/javascript/components/AddViewProductUser.jsx\",\n\t\"./Admin/Admin\": \"./app/javascript/components/Admin/Admin.js\",\n\t\"./Admin/Admin.js\": \"./app/javascript/components/Admin/Admin.js\",\n\t\"./AudioHelpers\": \"./app/javascript/components/AudioHelpers.js\",\n\t\"./AudioHelpers.js\": \"./app/javascript/components/AudioHelpers.js\",\n\t\"./ClipBoard\": \"./app/javascript/components/ClipBoard.js\",\n\t\"./ClipBoard.js\": \"./app/javascript/components/ClipBoard.js\",\n\t\"./ComposzHomePage\": \"./app/javascript/components/ComposzHomePage.jsx\",\n\t\"./ComposzHomePage.jsx\": \"./app/javascript/components/ComposzHomePage.jsx\",\n\t\"./ComposzNavbar\": \"./app/javascript/components/ComposzNavbar.jsx\",\n\t\"./ComposzNavbar.jsx\": \"./app/javascript/components/ComposzNavbar.jsx\",\n\t\"./Contribute\": \"./app/javascript/components/Contribute.jsx\",\n\t\"./Contribute.jsx\": \"./app/javascript/components/Contribute.jsx\",\n\t\"./DragDropTouch\": \"./app/javascript/components/DragDropTouch.js\",\n\t\"./DragDropTouch.js\": \"./app/javascript/components/DragDropTouch.js\",\n\t\"./EditProductData\": \"./app/javascript/components/EditProductData.jsx\",\n\t\"./EditProductData.jsx\": \"./app/javascript/components/EditProductData.jsx\",\n\t\"./EditProductImage\": \"./app/javascript/components/EditProductImage.jsx\",\n\t\"./EditProductImage.jsx\": \"./app/javascript/components/EditProductImage.jsx\",\n\t\"./EventsHomePage\": \"./app/javascript/components/EventsHomePage.jsx\",\n\t\"./EventsHomePage.css\": \"./app/javascript/components/EventsHomePage.css\",\n\t\"./EventsHomePage.jsx\": \"./app/javascript/components/EventsHomePage.jsx\",\n\t\"./EventsHomePageOriginal\": \"./app/javascript/components/EventsHomePageOriginal.jsx\",\n\t\"./EventsHomePageOriginal.jsx\": \"./app/javascript/components/EventsHomePageOriginal.jsx\",\n\t\"./FileManager/FileManager\": \"./app/javascript/components/FileManager/FileManager.js\",\n\t\"./FileManager/FileManager.js\": \"./app/javascript/components/FileManager/FileManager.js\",\n\t\"./GetViewProductUser\": \"./app/javascript/components/GetViewProductUser.jsx\",\n\t\"./GetViewProductUser.jsx\": \"./app/javascript/components/GetViewProductUser.jsx\",\n\t\"./LoadingSpinner\": \"./app/javascript/components/LoadingSpinner.jsx\",\n\t\"./LoadingSpinner.jsx\": \"./app/javascript/components/LoadingSpinner.jsx\",\n\t\"./MyCart\": \"./app/javascript/components/MyCart.jsx\",\n\t\"./MyCart.jsx\": \"./app/javascript/components/MyCart.jsx\",\n\t\"./MyOrders\": \"./app/javascript/components/MyOrders.jsx\",\n\t\"./MyOrders.jsx\": \"./app/javascript/components/MyOrders.jsx\",\n\t\"./MyProducts\": \"./app/javascript/components/MyProducts.jsx\",\n\t\"./MyProducts.jsx\": \"./app/javascript/components/MyProducts.jsx\",\n\t\"./Navbar\": \"./app/javascript/components/Navbar.jsx\",\n\t\"./Navbar.jsx\": \"./app/javascript/components/Navbar.jsx\",\n\t\"./PresetProduct\": \"./app/javascript/components/PresetProduct.jsx\",\n\t\"./PresetProduct.jsx\": \"./app/javascript/components/PresetProduct.jsx\",\n\t\"./Product\": \"./app/javascript/components/Product.jsx\",\n\t\"./Product.jsx\": \"./app/javascript/components/Product.jsx\",\n\t\"./ProductComposzNavbar\": \"./app/javascript/components/ProductComposzNavbar.jsx\",\n\t\"./ProductComposzNavbar.jsx\": \"./app/javascript/components/ProductComposzNavbar.jsx\",\n\t\"./ProductDL\": \"./app/javascript/components/ProductDL.jsx\",\n\t\"./ProductDL.jsx\": \"./app/javascript/components/ProductDL.jsx\",\n\t\"./ProductDLAttr\": \"./app/javascript/components/ProductDLAttr.jsx\",\n\t\"./ProductDLAttr.jsx\": \"./app/javascript/components/ProductDLAttr.jsx\",\n\t\"./ProductData\": \"./app/javascript/components/ProductData.jsx\",\n\t\"./ProductData.jsx\": \"./app/javascript/components/ProductData.jsx\",\n\t\"./ProductImageUpload\": \"./app/javascript/components/ProductImageUpload.jsx\",\n\t\"./ProductImageUpload.jsx\": \"./app/javascript/components/ProductImageUpload.jsx\",\n\t\"./ProductLayoutList\": \"./app/javascript/components/ProductLayoutList.jsx\",\n\t\"./ProductLayoutList.jsx\": \"./app/javascript/components/ProductLayoutList.jsx\",\n\t\"./ProductList\": \"./app/javascript/components/ProductList.jsx\",\n\t\"./ProductList.jsx\": \"./app/javascript/components/ProductList.jsx\",\n\t\"./ProductNavbar\": \"./app/javascript/components/ProductNavbar.jsx\",\n\t\"./ProductNavbar.jsx\": \"./app/javascript/components/ProductNavbar.jsx\",\n\t\"./Spinner\": \"./app/javascript/components/Spinner.js\",\n\t\"./Spinner.js\": \"./app/javascript/components/Spinner.js\",\n\t\"./UserEvent/EventPayment\": \"./app/javascript/components/UserEvent/EventPayment.jsx\",\n\t\"./UserEvent/EventPayment.jsx\": \"./app/javascript/components/UserEvent/EventPayment.jsx\",\n\t\"./UserEvent/RPEventPayment\": \"./app/javascript/components/UserEvent/RPEventPayment.jsx\",\n\t\"./UserEvent/RPEventPayment.jsx\": \"./app/javascript/components/UserEvent/RPEventPayment.jsx\",\n\t\"./UserEvent/RPEventPaymentModal\": \"./app/javascript/components/UserEvent/RPEventPaymentModal.js\",\n\t\"./UserEvent/RPEventPaymentModal.js\": \"./app/javascript/components/UserEvent/RPEventPaymentModal.js\",\n\t\"./UserEvent/UserEvent\": \"./app/javascript/components/UserEvent/UserEvent.js\",\n\t\"./UserEvent/UserEvent.js\": \"./app/javascript/components/UserEvent/UserEvent.js\",\n\t\"./UserStorage/CCPaymentModal\": \"./app/javascript/components/UserStorage/CCPaymentModal.js\",\n\t\"./UserStorage/CCPaymentModal.js\": \"./app/javascript/components/UserStorage/CCPaymentModal.js\",\n\t\"./UserStorage/CCStoragePayment\": \"./app/javascript/components/UserStorage/CCStoragePayment.jsx\",\n\t\"./UserStorage/CCStoragePayment.jsx\": \"./app/javascript/components/UserStorage/CCStoragePayment.jsx\",\n\t\"./UserStorage/PaymentModal\": \"./app/javascript/components/UserStorage/PaymentModal.js\",\n\t\"./UserStorage/PaymentModal.js\": \"./app/javascript/components/UserStorage/PaymentModal.js\",\n\t\"./UserStorage/StoragePayment\": \"./app/javascript/components/UserStorage/StoragePayment.jsx\",\n\t\"./UserStorage/StoragePayment.jsx\": \"./app/javascript/components/UserStorage/StoragePayment.jsx\",\n\t\"./UserStorage/UserStorage\": \"./app/javascript/components/UserStorage/UserStorage.js\",\n\t\"./UserStorage/UserStorage.js\": \"./app/javascript/components/UserStorage/UserStorage.js\",\n\t\"./VideoHelpers\": \"./app/javascript/components/VideoHelpers.js\",\n\t\"./VideoHelpers.js\": \"./app/javascript/components/VideoHelpers.js\",\n\t\"./ViewProducts\": \"./app/javascript/components/ViewProducts.jsx\",\n\t\"./ViewProducts.jsx\": \"./app/javascript/components/ViewProducts.jsx\",\n\t\"./WishCollectorHomePage\": \"./app/javascript/components/WishCollectorHomePage.jsx\",\n\t\"./WishCollectorHomePage.jsx\": \"./app/javascript/components/WishCollectorHomePage.jsx\",\n\t\"./WishCollectorNav\": \"./app/javascript/components/WishCollectorNav.jsx\",\n\t\"./WishCollectorNav.jsx\": \"./app/javascript/components/WishCollectorNav.jsx\",\n\t\"./WishCollectorNavbar\": \"./app/javascript/components/WishCollectorNavbar.jsx\",\n\t\"./WishCollectorNavbar.jsx\": \"./app/javascript/components/WishCollectorNavbar.jsx\",\n\t\"./bootstrap/Forms.FieldGroup\": \"./app/javascript/components/bootstrap/Forms.FieldGroup.jsx\",\n\t\"./bootstrap/Forms.FieldGroup.jsx\": \"./app/javascript/components/bootstrap/Forms.FieldGroup.jsx\",\n\t\"./cart/Cart\": \"./app/javascript/components/cart/Cart.jsx\",\n\t\"./cart/Cart.jsx\": \"./app/javascript/components/cart/Cart.jsx\",\n\t\"./cart/Cart1\": \"./app/javascript/components/cart/Cart1.jsx\",\n\t\"./cart/Cart1.jsx\": \"./app/javascript/components/cart/Cart1.jsx\",\n\t\"./cart/CartList\": \"./app/javascript/components/cart/CartList.jsx\",\n\t\"./cart/CartList.jsx\": \"./app/javascript/components/cart/CartList.jsx\",\n\t\"./layouts/AddLayout\": \"./app/javascript/components/layouts/AddLayout.jsx\",\n\t\"./layouts/AddLayout.jsx\": \"./app/javascript/components/layouts/AddLayout.jsx\",\n\t\"./layouts/Layout\": \"./app/javascript/components/layouts/Layout.jsx\",\n\t\"./layouts/Layout.jsx\": \"./app/javascript/components/layouts/Layout.jsx\",\n\t\"./layouts/LayoutList\": \"./app/javascript/components/layouts/LayoutList.jsx\",\n\t\"./layouts/LayoutList.jsx\": \"./app/javascript/components/layouts/LayoutList.jsx\",\n\t\"./layouts/ThumbnailPreview\": \"./app/javascript/components/layouts/ThumbnailPreview.jsx\",\n\t\"./layouts/ThumbnailPreview.jsx\": \"./app/javascript/components/layouts/ThumbnailPreview.jsx\",\n\t\"./layouts/lydl/LyDl\": \"./app/javascript/components/layouts/lydl/LyDl.jsx\",\n\t\"./layouts/lydl/LyDl.jsx\": \"./app/javascript/components/layouts/lydl/LyDl.jsx\",\n\t\"./layouts/lydl/LyDlList\": \"./app/javascript/components/layouts/lydl/LyDlList.jsx\",\n\t\"./layouts/lydl/LyDlList.jsx\": \"./app/javascript/components/layouts/lydl/LyDlList.jsx\",\n\t\"./layouts/lydl/ManageLyDl\": \"./app/javascript/components/layouts/lydl/ManageLyDl.jsx\",\n\t\"./layouts/lydl/ManageLyDl.jsx\": \"./app/javascript/components/layouts/lydl/ManageLyDl.jsx\",\n\t\"./layouts/lydlrel/AddLyDlRel\": \"./app/javascript/components/layouts/lydlrel/AddLyDlRel.jsx\",\n\t\"./layouts/lydlrel/AddLyDlRel.jsx\": \"./app/javascript/components/layouts/lydlrel/AddLyDlRel.jsx\",\n\t\"./layouts/lydlrel/AddLyDlRelKey\": \"./app/javascript/components/layouts/lydlrel/AddLyDlRelKey.jsx\",\n\t\"./layouts/lydlrel/AddLyDlRelKey.jsx\": \"./app/javascript/components/layouts/lydlrel/AddLyDlRelKey.jsx\",\n\t\"./layouts/lydlrel/EditLyDlRel\": \"./app/javascript/components/layouts/lydlrel/EditLyDlRel.jsx\",\n\t\"./layouts/lydlrel/EditLyDlRel.jsx\": \"./app/javascript/components/layouts/lydlrel/EditLyDlRel.jsx\",\n\t\"./layouts/lydlrel/EditLyDlRelKey\": \"./app/javascript/components/layouts/lydlrel/EditLyDlRelKey.jsx\",\n\t\"./layouts/lydlrel/EditLyDlRelKey.jsx\": \"./app/javascript/components/layouts/lydlrel/EditLyDlRelKey.jsx\",\n\t\"./layouts/lydlrel/EditLyDlRelKeyList\": \"./app/javascript/components/layouts/lydlrel/EditLyDlRelKeyList.jsx\",\n\t\"./layouts/lydlrel/EditLyDlRelKeyList.jsx\": \"./app/javascript/components/layouts/lydlrel/EditLyDlRelKeyList.jsx\",\n\t\"./layouts/lydlrel/EditLyDlRelList\": \"./app/javascript/components/layouts/lydlrel/EditLyDlRelList.jsx\",\n\t\"./layouts/lydlrel/EditLyDlRelList.jsx\": \"./app/javascript/components/layouts/lydlrel/EditLyDlRelList.jsx\",\n\t\"./layouts/lydlrel/LyDlRel\": \"./app/javascript/components/layouts/lydlrel/LyDlRel.jsx\",\n\t\"./layouts/lydlrel/LyDlRel.jsx\": \"./app/javascript/components/layouts/lydlrel/LyDlRel.jsx\",\n\t\"./layouts/lydlrel/LyDlRelKey\": \"./app/javascript/components/layouts/lydlrel/LyDlRelKey.jsx\",\n\t\"./layouts/lydlrel/LyDlRelKey.jsx\": \"./app/javascript/components/layouts/lydlrel/LyDlRelKey.jsx\",\n\t\"./layouts/lydlrel/LyDlRelKeyList\": \"./app/javascript/components/layouts/lydlrel/LyDlRelKeyList.jsx\",\n\t\"./layouts/lydlrel/LyDlRelKeyList.jsx\": \"./app/javascript/components/layouts/lydlrel/LyDlRelKeyList.jsx\",\n\t\"./layouts/lydlrel/LyDlRelList\": \"./app/javascript/components/layouts/lydlrel/LyDlRelList.jsx\",\n\t\"./layouts/lydlrel/LyDlRelList.jsx\": \"./app/javascript/components/layouts/lydlrel/LyDlRelList.jsx\",\n\t\"./layouts/lyslotfors/AddLySlotFor\": \"./app/javascript/components/layouts/lyslotfors/AddLySlotFor.jsx\",\n\t\"./layouts/lyslotfors/AddLySlotFor.jsx\": \"./app/javascript/components/layouts/lyslotfors/AddLySlotFor.jsx\",\n\t\"./layouts/lyslotfors/LySlotFor\": \"./app/javascript/components/layouts/lyslotfors/LySlotFor.jsx\",\n\t\"./layouts/lyslotfors/LySlotFor.jsx\": \"./app/javascript/components/layouts/lyslotfors/LySlotFor.jsx\",\n\t\"./layouts/lyslotfors/LySlotForList\": \"./app/javascript/components/layouts/lyslotfors/LySlotForList.jsx\",\n\t\"./layouts/lyslotfors/LySlotForList.jsx\": \"./app/javascript/components/layouts/lyslotfors/LySlotForList.jsx\",\n\t\"./orders/1\": \"./app/javascript/components/orders/1.jsx\",\n\t\"./orders/1.jsx\": \"./app/javascript/components/orders/1.jsx\",\n\t\"./orders/CCavenuePayment\": \"./app/javascript/components/orders/CCavenuePayment.jsx\",\n\t\"./orders/CCavenuePayment.jsx\": \"./app/javascript/components/orders/CCavenuePayment.jsx\",\n\t\"./orders/DownloadFiles\": \"./app/javascript/components/orders/DownloadFiles.jsx\",\n\t\"./orders/DownloadFiles.jsx\": \"./app/javascript/components/orders/DownloadFiles.jsx\",\n\t\"./orders/Layout\": \"./app/javascript/components/orders/Layout.jsx\",\n\t\"./orders/Layout.jsx\": \"./app/javascript/components/orders/Layout.jsx\",\n\t\"./orders/Order\": \"./app/javascript/components/orders/Order.jsx\",\n\t\"./orders/Order.jsx\": \"./app/javascript/components/orders/Order.jsx\",\n\t\"./orders/OrderList\": \"./app/javascript/components/orders/OrderList.jsx\",\n\t\"./orders/OrderList.jsx\": \"./app/javascript/components/orders/OrderList.jsx\",\n\t\"./orders/OrderProductSet\": \"./app/javascript/components/orders/OrderProductSet.jsx\",\n\t\"./orders/OrderProductSet.jsx\": \"./app/javascript/components/orders/OrderProductSet.jsx\",\n\t\"./orders/OrderProductSetList\": \"./app/javascript/components/orders/OrderProductSetList.jsx\",\n\t\"./orders/OrderProductSetList.jsx\": \"./app/javascript/components/orders/OrderProductSetList.jsx\",\n\t\"./orders/Payment\": \"./app/javascript/components/orders/Payment.jsx\",\n\t\"./orders/Payment.jsx\": \"./app/javascript/components/orders/Payment.jsx\",\n\t\"./orders/ShareProduct\": \"./app/javascript/components/orders/ShareProduct.jsx\",\n\t\"./orders/ShareProduct.jsx\": \"./app/javascript/components/orders/ShareProduct.jsx\",\n\t\"./product_keys/EditProductKey\": \"./app/javascript/components/product_keys/EditProductKey.jsx\",\n\t\"./product_keys/EditProductKey.jsx\": \"./app/javascript/components/product_keys/EditProductKey.jsx\",\n\t\"./product_keys/ProductKey\": \"./app/javascript/components/product_keys/ProductKey.jsx\",\n\t\"./product_keys/ProductKey.jsx\": \"./app/javascript/components/product_keys/ProductKey.jsx\",\n\t\"./product_keys/ProductKeyList\": \"./app/javascript/components/product_keys/ProductKeyList.jsx\",\n\t\"./product_keys/ProductKeyList.jsx\": \"./app/javascript/components/product_keys/ProductKeyList.jsx\",\n\t\"./product_sets/AddProductSet\": \"./app/javascript/components/product_sets/AddProductSet.jsx\",\n\t\"./product_sets/AddProductSet.jsx\": \"./app/javascript/components/product_sets/AddProductSet.jsx\",\n\t\"./product_sets/ProductSet\": \"./app/javascript/components/product_sets/ProductSet.jsx\",\n\t\"./product_sets/ProductSet.jsx\": \"./app/javascript/components/product_sets/ProductSet.jsx\",\n\t\"./product_sets/ProductSetCount\": \"./app/javascript/components/product_sets/ProductSetCount.jsx\",\n\t\"./product_sets/ProductSetCount.jsx\": \"./app/javascript/components/product_sets/ProductSetCount.jsx\",\n\t\"./product_sets/ProductSetCountList\": \"./app/javascript/components/product_sets/ProductSetCountList.jsx\",\n\t\"./product_sets/ProductSetCountList.jsx\": \"./app/javascript/components/product_sets/ProductSetCountList.jsx\",\n\t\"./product_sets/ProductSetDLVal\": \"./app/javascript/components/product_sets/ProductSetDLVal.jsx\",\n\t\"./product_sets/ProductSetDLVal.jsx\": \"./app/javascript/components/product_sets/ProductSetDLVal.jsx\",\n\t\"./product_sets/ProductSetDLValList\": \"./app/javascript/components/product_sets/ProductSetDLValList.jsx\",\n\t\"./product_sets/ProductSetDLValList.jsx\": \"./app/javascript/components/product_sets/ProductSetDLValList.jsx\",\n\t\"./product_sets/ProductSetKeyVal\": \"./app/javascript/components/product_sets/ProductSetKeyVal.jsx\",\n\t\"./product_sets/ProductSetKeyVal.jsx\": \"./app/javascript/components/product_sets/ProductSetKeyVal.jsx\",\n\t\"./product_sets/ProductSetKeyValList\": \"./app/javascript/components/product_sets/ProductSetKeyValList.jsx\",\n\t\"./product_sets/ProductSetKeyValList.jsx\": \"./app/javascript/components/product_sets/ProductSetKeyValList.jsx\",\n\t\"./product_sets/ProductSetLayout\": \"./app/javascript/components/product_sets/ProductSetLayout.jsx\",\n\t\"./product_sets/ProductSetLayout.jsx\": \"./app/javascript/components/product_sets/ProductSetLayout.jsx\",\n\t\"./product_sets/ProductSetList\": \"./app/javascript/components/product_sets/ProductSetList.jsx\",\n\t\"./product_sets/ProductSetList.jsx\": \"./app/javascript/components/product_sets/ProductSetList.jsx\",\n\t\"./react-select-override/FixRequiredSelect\": \"./app/javascript/components/react-select-override/FixRequiredSelect.jsx\",\n\t\"./react-select-override/FixRequiredSelect.jsx\": \"./app/javascript/components/react-select-override/FixRequiredSelect.jsx\",\n\t\"./spinner\": \"./app/javascript/components/spinner.css\",\n\t\"./spinner.css\": \"./app/javascript/components/spinner.css\",\n\t\"./view_products/ViewProduct\": \"./app/javascript/components/view_products/ViewProduct.jsx\",\n\t\"./view_products/ViewProduct.jsx\": \"./app/javascript/components/view_products/ViewProduct.jsx\",\n\t\"./view_products/ViewProductList\": \"./app/javascript/components/view_products/ViewProductList.jsx\",\n\t\"./view_products/ViewProductList.jsx\": \"./app/javascript/components/view_products/ViewProductList.jsx\",\n\t\"./view_products/ViewProductSet\": \"./app/javascript/components/view_products/ViewProductSet.jsx\",\n\t\"./view_products/ViewProductSet.jsx\": \"./app/javascript/components/view_products/ViewProductSet.jsx\",\n\t\"./view_products/ViewProductSetList\": \"./app/javascript/components/view_products/ViewProductSetList.jsx\",\n\t\"./view_products/ViewProductSetList.jsx\": \"./app/javascript/components/view_products/ViewProductSetList.jsx\"\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = \"./app/javascript/components sync recursive ^\\\\.\\\\/.*$\";","import React from \"react\";\nimport { Form, Modal, Button } from \"react-bootstrap\";\n\nimport { FieldGroup } from \"./bootstrap/Forms.FieldGroup\";\nimport { ENDPOINTS } from \"../constants/endpoints\";\nimport { formDataToJSON } from \"../adukku_utils/array\";\n\nexport default class AddProductSet extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n overlay: props.overlay || { visible: false },\n is_preset_display: false,\n categories: props.categories,\n sub_categories: props.sub_categories,\n voice: 'NO-VOICE',\n role: null,\n countryCode: this.getCookie(\"countryCode\")\n };\n this.showAddSetOverlay = this.showAddSetOverlay.bind(this);\n this.hideAddSetOverlay = this.hideAddSetOverlay.bind(this);\n this._handleValidSubmit = this._handleValidSubmit.bind(this);\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (nextProps !== this.state) {\n this.setState(nextProps);\n }\n if (\n this.props.categories &&\n this.props.sub_categories &&\n (this.props.categories.length != nextProps.categories.length ||\n this.props.sub_categories.length != nextProps.sub_categories.length)\n ) {\n this.setState({\n categories: nextProps.categories,\n sub_categories: nextProps.sub_categories,\n });\n }\n }\n\n componentDidMount() {\n let user_role = document.getElementById(\"user_role\");\n user_role = user_role.innerHTML;\n this.setState({ role: user_role });\n this.props.getCategories();\n }\n\n showAddSetOverlay(e) {\n e.preventDefault();\n e.stopPropagation();\n this.props.showOverlay(\"addProduct\");\n }\n\n hideAddSetOverlay(e) {\n e.preventDefault();\n e.stopPropagation();\n this.props.hideOverlay(\"addProduct\");\n }\n\n handlePresetToggle = (e) => {\n this.setState({ is_preset_display: !this.state.is_preset_display });\n };\n\n getProductCategories = () => {\n let categories = [\n \"SCHOOL\",\n \"COLLEGE\",\n \"UNIVERSITY\",\n \"PRE_SCHOOL\",\n \"PLAY_SCHOOL\",\n \"INDIVIDUAL\",\n \"STUDENT\",\n \"ALUMNI\",\n \"TEACHER\",\n \"CORPORATE\",\n \"DOCTORS-CLUB\",\n \"SPORTS\",\n \"BAR-ASSOCIATION\",\n \"MILITARY\",\n \"NAVY\",\n \"NATURE-CLUB\",\n \"WALLSTREET\",\n \"MUSIC-CLUB\",\n \"AIRFORCE\",\n \"GOVERNMENT\",\n \"EVENTS\",\n \"OTHERS\",\n ];\n const { categories: myCategories } = this.state;\n myCategories.forEach((sc) => {\n if (!categories.includes(sc)) {\n categories.push(sc);\n }\n });\n return categories;\n };\n\n getProductSubCategories = () => {\n let subCategories = [\n \"COMPOSITES\",\n \"PICTURE_BOOKLET\",\n \"SPORTS_PICTURE_BOOKLET\",\n \"FOLDER\",\n \"GRADUATION_FOLDER\",\n \"PORTRAIT\",\n \"PASSPORT\",\n \"ID_CARD\",\n \"REPORT_CARD\",\n \"CERTIFICATES\",\n \"YEAR_BOOK\",\n \"PAST_PRESENT\",\n \"BUNDLE\",\n \"ALL_IN_ONE\",\n \"WEDDING\",\n \"ANNIVERSARY\",\n \"ENGAGEMENT\",\n \"BIRTHDAY\",\n \"GRADUATION\",\n \"AUTOGRAPHS\",\n \"JOB\",\n \"HOUSE\",\n \"BABY\",\n \"SHOWER\",\n \"PROMOTION\",\n \"FAREWELL\",\n \"RETIREMENT\",\n \"GETWELL\",\n \"ACHIEVEMENT\",\n \"OTHER\",\n ];\n const { sub_categories } = this.state;\n sub_categories.forEach((sc) => {\n if (!subCategories.includes(sc)) {\n subCategories.push(sc);\n }\n });\n return subCategories;\n };\n\n getVoiceOptions = () => {\n if (this.state.countryCode == 'IN') {\n return [\n { label: \"NO-VOICE\", value: \"NORMAL\" },\n { label: \"VOICE-30SEC - Additional ₹200 per Record\", value: \"VOICE-30SEC\"},\n { label: \"VOICE-15SEC - Additional ₹127 per Record\", value: \"VOICE-15SEC\"},\n ];\n \n }\n else {\n return [\n { label: \"NO-VOICE\", value: \"NORMAL\" },\n { label: \"VOICE-30SEC - Additional $4 per Record\", value: \"VOICE-30SEC\"},\n ];\n }\n };\n\n getCookie(cname) {\n let name = cname + \"=\";\n let decodedCookie = decodeURIComponent(document.cookie);\n let ca = decodedCookie.split(';');\n for(let i = 0; i \n {this.props.labelText}\n \n
\n \n Create New Product\n \n \n \n \n {this.state.role === \"admin\" && (\n \n )}\n {\n this.setState({ [name]: value });\n }}\n value={this.state.category}\n >\n \n {productCategories.map((category) => {\n return (\n \n );\n })}\n \n {this.state.category == \"OTHERS\" && (\n {\n this.setState({ [name]: value });\n }}\n value={this.state.product_category}\n />\n )}\n {\n this.setState({ [name]: value });\n }}\n value={this.state.sub_category}\n >\n \n {productSubCategories.map((scategory) => {\n return (\n \n );\n })}\n \n {this.state.sub_category == \"OTHER\" && (\n {\n this.setState({ [name]: value });\n }}\n value={this.state.product_sub_category}\n />\n )}\n {\n this.setState({ [name]: value }, ()=>{value=this.state.voice});\n }}\n value={this.state.voice}\n >\n {voiceOptions.map((vo) => {\n return (\n \n );\n })}\n \n \n \n \n {/* */}\n \n
\n
\n \n );\n }\n}\n","import React, { Component } from \"react\";\nimport { Col, Form, Modal, Button } from \"react-bootstrap\";\n\nimport { FieldGroup } from \"./bootstrap/Forms.FieldGroup\";\nimport { formDataToJSON } from \"../adukku_utils/array\";\nimport { authorized, Authorized } from \"../adukku_utils/authorizeUser\";\n\nexport default class AddUser extends Component {\n constructor(props) {\n super(props);\n this.state = {\n ...props,\n email: props.edit_user && props.edit_user.email,\n login: props.edit_user && props.edit_user.login,\n view_user_user_type: props.view_user_user_type,\n view_user_product_code: props.view_user_product_code,\n view_user_password: props.view_user_password,\n view_and_pay_user_user_type: props.view_and_pay_user_user_type,\n view_and_pay_user_product_code: props.view_and_pay_user_product_code,\n view_and_pay_user_password: props.view_and_pay_user_password,\n user_id: props.user_id,\n product_id: props.product_id,\n \n is_update_code: \"Click here to Generate New Product Code\",\n \n };\n this._handleGenerateViewUserProductCode = this._handleGenerateViewUserProductCode.bind(this);\n this._handleGenerateViewAndPayUserProductCode = this._handleGenerateViewAndPayUserProductCode.bind(this);\n this._handleValidSubmit = this._handleValidSubmit.bind(this);\n this._handleAddViewUserValidSubmit = this._handleAddViewUserValidSubmit.bind(this);\n this.hideCreateLayoutOverlay = this.hideCreateLayoutOverlay.bind(this);\n }\n\n _handleGenerateViewUserProductCode = (e) => {\n let newCode = Math.round(Math.random() * (1000000));\n this.setState({ view_user_product_code: newCode });\n };\n\n _handleGenerateViewAndPayUserProductCode = (e) => {\n let newCode = Math.round(Math.random() * (1000000));\n this.setState({ view_and_pay_user_product_code: newCode });\n };\n\n _handleValidSubmit = (e) => {\n e.preventDefault();\n e.stopPropagation();\n let formData = formDataToJSON(new FormData(e.target));\n if (formData[\"role\"] === \"editor\") formData[\"name\"] = formData.login;\n this.props.productUser(formData);\n this.setState({ show: false, view_pay_modal: false });\n };\n\n hideCreateLayoutOverlay= (e) => {\n e.preventDefault();\n e.stopPropagation();\n this.setState({ show: false, view_pay_modal: false });\n }\n\n _handleAddViewUserValidSubmit = (e) => {\n e.preventDefault();\n e.stopPropagation();\n let formData = formDataToJSON(new FormData(e.target));\n formData[\"user_id\"] = this.props.user_id;\n this.props.addViewProductUser(formData);\n \n alert (\"Make sure to share the PRODUCT_CODE & PASSWORD to your intended audience\\n\\nYour intended audience can then add your PRODUCT using VIEW/PAY PRODUCTS under DASHBOARD\");\n this.setState({ show: false, view_pay_modal: false });\n };\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (this.state.edit_user !== nextProps.edit_user) {\n this.setState({\n ...nextProps,\n email: nextProps.edit_user && nextProps.edit_user.email,\n login: nextProps.edit_user && nextProps.edit_user.login,\n });\n }\n }\n\n render() {\n const { edit_user, email, login, role, labelText, isAddViewUser, isAddViewPayUser } = this.state;\n const style = {\n display: \"none\",\n };\n return (\n \n{/* Commenting out Data Correction User for Phase 1 \n {role && !isAddViewUser && (\n \n
  • \n this.setState({ show: true })}>\n \n {edit_user ? \"Edit Data Correction User\" : \"Add Data Correction User\"}\n \n \n \n
    \n \n Data Correction user\n \n \n \n \n \n {\n this.setState({ [name]: value });\n }}\n />\n {\n this.setState({ [name]: value });\n }}\n />\n \n \n
    \n
    \n \n \n \n \n
    \n
    \n
  • \n
    \n )}\n*/}\n {isAddViewUser && (\n
  • \n this.setState({ view_pay_modal: true })}>\n {this.props.view_user_password ? `Edit ${labelText}` : `Add ${labelText}`}\n \n \n \n {this.props.view_user_password ? `Edit ${labelText}` : `Add ${labelText}`}\n \n \n
    \n \n \n \n \n {/* Bala*/}\n\n
    \n {\n let yesNo = confirm(\"Are you sure?\\nOld Product Code (if any) will not work anymore!!!\") \n if (yesNo) {\n this._handleGenerateViewUserProductCode()\n alert(\"New Product Code Generated\") \n }\n }}\n >\n
    \n \n \n {\n this.setState({\n view_user_password: e.target.value,\n });\n }}\n placeholder=\"Enter a Password\"\n required=\"required\"\n />\n \n
    \n \n \n
    \n \n \n \n
    \n
  • \n )}{\" \"}\n {isAddViewPayUser && (\n
  • \n this.setState({ view_pay_modal: true })}>\n {this.props.view_and_pay_user_password ? `Edit ${labelText}` : `Add ${labelText}`}\n \n \n \n {this.props.view_and_pay_user_password ? `Edit ${labelText}` : `Add ${labelText}`}\n \n \n
    \n \n \n \n \n {/* Bala*/}\n\n
    \n {\n let yesNo = confirm(\"Are you sure?\\nOld Product Code (if any) will not work anymore!!!\") \n if (yesNo) {\n this._handleGenerateViewAndPayUserProductCode()\n alert(\"New Product Code Generated\") \n }\n }}\n >\n
    \n \n \n {\n this.setState({\n view_and_pay_user_password: e.target.value,\n });\n }}\n placeholder=\"Enter a Password\"\n required=\"required\"\n />\n \n
    \n \n \n
    \n \n \n \n
    \n
  • \n )}{\" \"}\n
    \n );\n }\n}\n","import React, { Component } from \"react\";\nimport { Col, Form, Modal, Button } from \"react-bootstrap\";\n\nimport { FieldGroup } from \"./bootstrap/Forms.FieldGroup\";\nimport { formDataToJSON } from \"../adukku_utils/array\";\nimport { authorized, Authorized } from \"../adukku_utils/authorizeUser\";\n\nexport default class AddUser extends Component {\n constructor(props) {\n super(props);\n this.state = {\n ...props,\n email: props.edit_user && props.edit_user.email,\n login: props.edit_user && props.edit_user.login,\n };\n }\n _handleValidSubmit = (e) => {\n e.preventDefault();\n e.stopPropagation();\n let formData = formDataToJSON(new FormData(e.target));\n if (formData[\"role\"] === \"editor\") formData[\"name\"] = formData.login;\n this.props.productUser(formData);\n this.setState({ show: false, view_pay_modal: false });\n };\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (this.state.edit_user !== nextProps.edit_user) {\n this.setState({\n ...nextProps,\n email: nextProps.edit_user && nextProps.edit_user.email,\n login: nextProps.edit_user && nextProps.edit_user.login,\n });\n }\n }\n\n render() {\n const { edit_user, email, login, role } = this.state;\n const style = {\n display: \"none\",\n };\n return (\n \n \n
  • \n this.setState({ show: true })}>\n {edit_user ? \"Edit Data Correction User\" : \"Add Data Correction User\"}\n \n \n
    \n \n Data Correction user\n \n \n \n \n \n {\n this.setState({ [name]: value });\n }}\n />\n {\n this.setState({ [name]: value });\n }}\n />\n \n \n
    \n
    \n \n \n \n \n
    \n
    \n
  • \n
    \n
  • \n this.setState({ view_pay_modal: true })}>\n {this.props.is_password_set ? \"Edit View & Pay user\" : \"Add View & Pay user\"}\n \n \n \n View & Pay User\n \n \n
    \n \n \n \n \n \n
    \n \n \n
    \n \n \n \n
    \n
  • \n
    \n );\n }\n}\n","import React, { Component } from \"react\";\nimport { Col, Form, Modal, Button } from \"react-bootstrap\";\n\nimport { FieldGroup } from \"./bootstrap/Forms.FieldGroup\";\nimport { formDataToJSON } from \"../adukku_utils/array\";\nimport { authorized, Authorized } from \"../adukku_utils/authorizeUser\";\n\nexport default class AddUser extends Component {\n constructor(props) {\n super(props);\n this.state = {\n ...props,\n email: props.edit_user && props.edit_user.email,\n login: props.edit_user && props.edit_user.login,\n view_user_product_code: props.view_user && props.view_user.product_code,\n view_user_password: props.view_user && props.view_user.password,\n view_and_pay_user_product_code: props.view_and_pay_user && props.view_and_pay_user.product_code,\n view_and_pay_user_password: props.view_and_pay_user && props.view_and_pay_user.password,\n\n is_update_code: \"Click here to Generate New Product Code\",\n \n };\n this._handleGenerateProductCode = this._handleGenerateProductCode.bind(this);\n this._handleValidSubmit = this._handleValidSubmit.bind(this);\n }\n\n _handleGenerateProductCode = (e) => {\n let newCode = Math.round(Math.random() * (1000000));\n this.setState({ view_user_Product_code: newCode });\n };\n\n _handleValidSubmit = (e) => {\n e.preventDefault();\n e.stopPropagation();\n let formData = formDataToJSON(new FormData(e.target));\n if (formData[\"role\"] === \"editor\") formData[\"name\"] = formData.login;\n this.props.productUser(formData);\n this.setState({ show: false, view_pay_modal: false });\n };\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (this.state.edit_user !== nextProps.edit_user) {\n this.setState({\n ...nextProps,\n email: nextProps.edit_user && nextProps.edit_user.email,\n login: nextProps.edit_user && nextProps.edit_user.login,\n });\n }\n }\n\n render() {\n const { edit_user, email, login, role, labelText, isAddViewUser } = this.state;\n const style = {\n display: \"none\",\n };\n return (\n \n {role && !isAddViewUser && (\n \n
  • \n this.setState({ show: true })}>\n {/*Bala\n {edit_user ? \"Edit Data Correction User\" : \"Add Data Correction User\"}\n */}\n \n \n
    \n \n Data Correction user\n \n \n \n \n \n {\n this.setState({ [name]: value });\n }}\n />\n {\n this.setState({ [name]: value });\n }}\n />\n \n \n
    \n
    \n \n \n \n \n
    \n
    \n
  • \n
    \n )}\n {isAddViewUser && (\n
  • \n this.setState({ view_pay_modal: true })}>\n {this.props.is_password_set ? `Edit ${labelText}` : `Add ${labelText}`}\n \n \n {\n this.setState({ view_pay_modal: false });\n }}\n >\n {labelText}\n \n \n
    \n \n \n \n {/* Bala*/}\n\n
    \n Generate New Product Code : \n {\n let yesNo = confirm(\"Are you sure?\\nOld Product Code (if any) will not work anymore!!!\") \n if (yesNo) {\n this._handleGenerateProductCode()\n alert(\"New Product Code Generated\") \n }\n }}\n >\n
    \n \n \n {\n // this.setState({\n // password: e.target.value,\n // });\n // }}\n placeholder=\"Password\"\n required={this.props.is_password_set ? null : \"required\"}\n />\n \n
    \n \n \n
    \n \n \n \n
    \n
  • \n )}{\" \"}\n
    \n );\n }\n}\n","import React from \"react\";\nimport { Col, Modal, Button, Row } from \"react-bootstrap\";\n\nimport { FieldGroup } from \"../bootstrap/Forms.FieldGroup\";\nimport { ENDPOINTS } from \"../../constants/endpoints\";\nimport ThumbnailPreview from \"../layouts/ThumbnailPreview\";\n// import StoragePayment from \"./StoragePayment\";\n\nexport default class AdminDefaults extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n avail_space: \"\",\n adminDefaults: {},\n };\n }\n\n componentDidUpdate(prevProps, prevState) {\n if (this.state.isFileManagerOpen && this.state.isFileManagerOpen != prevState.isFileManagerOpen)\n this.getPurchaseHistory();\n }\n\n getPurchaseHistory = () => {\n let uri = ENDPOINTS.user_storages.get_defaults.uri;\n let that = this;\n return fetch(uri, {\n method: \"GET\",\n headers: {\n \"content-type\": \"application/json\",\n },\n })\n .then((response) => response.json())\n .then((response) => {\n that.setState({\n avail_space: response.data.avail_space || 0,\n product_expiry_hours: response.data.product_expiry_hours || 0,\n space_expiry_hours: response.data.space_expiry_hours || 0,\n });\n });\n };\n\n updateAdminDefaults = (e) => {\n e.stopPropagation();\n e.preventDefault();\n let uri = ENDPOINTS.user_storages.update_defaults.uri;\n let that = this;\n let formData = new FormData();\n formData.append(\"avail_space\", this.state.avail_space);\n formData.append(\"product_expiry_hours\", this.state.product_expiry_hours);\n formData.append(\"space_expiry_hours\", this.state.space_expiry_hours);\n formData.append(\"storage_unit\", \"MEGA_BYTE\");\n formData.append(\"type\", \"set_defaults\");\n return fetch(uri, {\n method: \"PUT\",\n body: formData,\n })\n .then((response) => response.json())\n .then((response) => {\n that.setState({\n adminDefaults: response.data,\n isFileManagerOpen: false,\n });\n });\n };\n\n openFileManager = () => {\n this.setState({\n isFileManagerOpen: !this.state.isFileManagerOpen,\n });\n };\n\n render() {\n const { isFileManagerOpen, adminDefaults } = this.state;\n return (\n
  • \n {\"Set Admin Defaults\"}\n \n \n Purchase Storage\n \n \n \n \n \n \n {\n this.setState({ [name]: value });\n }}\n value={\n adminDefaults && adminDefaults.avail_space\n ? adminDefaults.avail_space\n : this.state.avail_space\n }\n />\n MB\n \n \n \n \n {\n this.setState({ [name]: value });\n }}\n value={\n adminDefaults && adminDefaults.product_expiry_hours\n ? adminDefaults.product_expiry_hours\n : this.state.product_expiry_hours\n }\n />\n Hours\n \n \n \n \n\n \n \n \n \n {\n this.setState({ [name]: value });\n }}\n value={\n adminDefaults && adminDefaults.space_expiry_hours\n ? adminDefaults.space_expiry_hours\n : this.state.space_expiry_hours\n }\n />\n Hours\n \n \n \n \n \n \n \n {/* */}\n \n \n
  • \n );\n }\n}\n","var isRecording=false;\nlet audioinfoDivElement = document.querySelector(\"#audioRecorderDiv\");\nstop = false\nvar audblob;\nlet once = true;\n\nvar recorded_audio_file = ''\n\nexport function delete_Recording(){\n const recMediaFile = document.getElementById(\"audio\");\n recMediaFile.src = '';\n audblob = '';\n var buttonDelete = document.getElementById(\"aud_del\")\n buttonDelete.disabled=true\n buttonDelete.innerHTML=\"\"\n}\n\nexport function get_Blob(){\n return audblob;\n}\n\nexport function del_Blob(){\n audblob='';\n}\n\nexport function stop_Recording(){\n stop=true;\n}\n\nexport function start_audio_Recording(recorded_audio_file){\n\n var i = 0;\n stop=false;\n document.getElementById(\"myBar\").style.width=\"0%\";\n document.getElementById(\"label\").innerHTML = '0%';\n document.getElementById(\"myProgress\").style.width=\"100%\";\n var maxRectime = 30;\n\n function move(recorded_audio_file) {\n if (i == 0) {\n i = 1;\n var elem = document.getElementById(\"myBar\");\n var width = 0;\n\n var id = setInterval(frame, maxRectime+1);\n \n function frame() {\n if (stop) {\n clearInterval(id);\n stopMp3Recording(recorded_audio_file);\n }\n if (width >= 100) {\n clearInterval(id);\n stopMp3Recording(recorded_audio_file);\n i = 0;\n } else {\n width = width + .1\n elem.style.width = width + \"%\";\n if (width.toFixed(2)%1==0) {\n document.getElementById(\"label\").innerHTML = width.toFixed(2) * 1 + '%';\n }\n }\n }\n }\n }\n\n // New instance\n var recorder = new MicRecorder({\n bitRate: 128,\n });\n\n if (once) {\n recorder.start().then(() => {\n recorder.stop().getMp3()\n })\n once = false;\n}\n\n \n\n\n var buttonStart = document.getElementById(\"aud_st\")\n buttonStart.disabled=true\n buttonStart.innerHTML=\"\"\n\n \n function wait(secs){\n secs = secs - 1\n if (secs <= 0) {\n clearInterval(waitintervalId);\n }\n }\n \n const waitintervalId = setInterval(wait(6), 1000);\n\n var index = 6\n function countDown() {\n \n index = index - 1\n document.getElementById(\"CountDown\").innerHTML=`Recording starts in ${index}`\n document.getElementById(\"CountDown\").focus()\n if (index <= 0) {\n clearInterval(intervalId);\n document.getElementById(\"CountDown\").innerHTML=''\n \n recorder.start().then(() => {\n stop=false;\n maxRectime = 30;\n i=0;\n \n var recAudio = document.getElementById(\"audio\");\n recAudio.src = '';\n var buttonDelete = document.getElementById(\"aud_del\")\n buttonDelete.disabled=true\n buttonDelete.innerHTML=\"\"\n \n move(recorded_audio_file);\n }).catch((e) => {\n console.error(e);\n });\n }\n }\n\n const intervalId = setInterval(countDown, 1000);\n\n function stopMp3Recording(recorded_audio_file) {\n recorder.stop().getMp3().then(([buffer, blob]) => {\n stop = true; \n const mp3blob = new Blob(buffer, {type: \"audio/mpeg\"});\n const recMediaFile = document.getElementById(\"audio\");\n const RecUrl = URL.createObjectURL(mp3blob);\n recMediaFile.src = RecUrl;\n recMediaFile.value = 30000;\n audblob = mp3blob;\n\n var buttonDelete = document.getElementById(\"aud_del\")\n buttonDelete.disabled=false\n buttonDelete.innerHTML=\"\"\n\n setTimeout(function() {\n document.getElementById(\"myBar\").style.width=\"0%\";\n document.getElementById(\"label\").innerHTML = '0%';\n document.getElementById(\"aud_st\").disabled=false\n document.getElementById(\"aud_st\").innerHTML=\"\"\n }, 1000)\n });\n }\n\n}// start_audio_Recording\n\n function getAudioFiles(recorded_audio_file) {\n let uri = \"/api/audio_files?recorded_audio_file=\" + recorded_audio_file\n return fetch(uri, {\n method: \"GET\",\n responseType:'blob',\n header: {\"Content-Type\": \"audio/mpeg\"},\n })\n .then((response) => {\n return response.blob()\n })\n }\n\n export function save_Recording(blob, event_id, recorded_audio_file) {\n //let uri = \"/api/savecontribute_audio?event_id=\"+event_id+\"&recorded_audio_file=\" + recorded_audio_file\n let template_url = \"/api/savecontribute_audio?event_id=:event_id&recorded_audio_file=:filename\"\n template_url = template_url.replace(\":event_id\", event_id).replace(\":filename\", recorded_audio_file);\n return fetch(template_url, {\n method: \"POST\",\n body: blob,\n header: {\"Content-Type\": \"audio/mpeg\", \"Accept\":\"audio/mpeg\"},\n })\n .then((response) => response.json())\n .then((response) => {\n if (response.data===\"available\") {\n //alert(\"Audio successfully saved\")\n return 0;\n }\n else {\n const recMediaFile = document.getElementById(\"audio\");\n recMediaFile.src = '';\n audblob = '';\n alert(\"Save of Audio recording failed. Kindly Record again.\")\n return -1;\n }\n });\n }\n","import React, {Component, useState, useEffect, Fragment} from 'react';\n\nexport function ClipBoard(data) {\n\n const [showImg, setShowImg] = useState(false)\n\n var text = \"http://adukku.dev.devathon.com/contribute?event_id=\" + data.event_id + '&&event_dt=' + data.event_dt\n \n\n return(\n
    \n {\n showImg? (\n \n )\n : (\n \n
    \n\n \n

    \n http://adukku.dev.devathon.com/contribute?event_id={data.event_id}&&event_dt={data.event_dt}

    \n \n\n \n \n
    \n
    \n )\n }\n
    \n )\n}\n\n//export default ClipBoard","import React from 'react';\nimport { Carousel, CarouselItem, Button } from 'react-bootstrap';\n\nimport slide00 from 'images/slider/Banner-0.jpg';\nimport slide01 from 'images/slider/Banner-1.jpg';\nimport slide02 from 'images/slider/Banner-2.jpg';\nimport slide03 from 'images/slider/Banner-3.jpg';\nimport slide04 from 'images/slider/Banner-4.jpg';\nimport slide05 from 'images/slider/Banner-5.jpg';\nimport slide06 from 'images/slider/Banner-6.jpg';\nimport slide07 from 'images/slider/Banner-7.jpg';\nimport slide08 from 'images/slider/Banner-8.jpg';\nimport slide09 from 'images/slider/Banner-9.jpg';\nimport slide09India from 'images/slider/Banner-9-India.jpg';\nimport slide10 from 'images/slider/Banner-10.jpg';\nimport slide11 from 'images/slider/Banner-11.jpg';\nimport WelcomeToComposz from 'images/slider/WelcomeToComposz.jpg';\nimport WelcomeToComposzMobile from 'images/slider/WelcomeToComposzMobile.jpg';\nimport WelcomeToComposzIndia from 'images/slider/WelcomeToComposzIndia.jpg';\nimport WelcomeToComposzMobileIndia from 'images/slider/WelcomeToComposzMobileIndia.jpg';\nimport WelcomeToComposzAudio from 'images/slider/WelcomeToComposzAudio.jpg';\n\n//import 'stylesheets/ComposzHomePage.css';\n// import 'bootstrap/dist/css/bootstrap.min.css';\n\nexport class ComposzHomePage extends React.Component {\n constructor(props) {\n super(props)\n this.state = {\n windowWidth: window.innerWidth,\n windowHeight: window.innerHeight,\n countryCode: this.getCookie(\"countryCode\")\n };\n }\n \n handleSignup = () => {\n const link = document.createElement('a');\n link.setAttribute('href', '/users/sign_up');\n document.body.appendChild(link);\n link.click();\n }\n \n handleLearn = () => {\n const link = document.createElement('a');\n //link.setAttribute('href', '/static/Learn.html');\n //link.setAttribute('href', 'https://www.youtube.com/watch?v=VbWrWD8rqe4&list=PLe2VUCyoX9EzbIF94L4yNO1F1e0ESy81u');\n link.setAttribute('href', 'https://www.youtube.com/watch?v=bvbJZB3luqg&list=PLe2VUCyoX9EzbIF94L4yNO1F1e0ESy81u&index=8');\n link.setAttribute('target', 'blank');\n link.click();\n }\n\n showAlan = () => {\n const link = document.createElement('a');\n link.setAttribute('href', 'https://composz.com/CompositeOfAlan.html');\n link.setAttribute('target', 'blank');\n //link.setAttribute('onmouseover', 'pointer');\n link.click();\n }\n\n handleResize = e => {\n const windowWidth = window.innerWidth;\n const windowHeight = window.innerHeight;\n \n this.setState(prevState => {\n return {\n windowWidth,\n windowHeight,\n };\n });\n };\n\n componentDidMount() {\n window.addEventListener(\"resize\", this.handleResize);\n \n // if (window.innerWidth < 450) {\n // alert('Composz is best viewed on a Desktop!');\n // }\n\n \n if (this.state.countryCode === ''){\n //fetch country code of user\n //var url = 'https://api.ipregistry.co/?key=64qg4jmpagjha51m';\n var url = \"https://ipinfo.io/?token=f7e161ea50651f\";\n fetch(url)\n .then((response) => response.json())\n .then((responseJson) => {\n this.setState({\n countryCode: responseJson.country\n });\n document.cookie = \"countryCode=\" + responseJson.country + \";\";\n })\n .catch((error) => {\n //console.error(error);\n this.setState({\n countryCode: \"US\"\n });\n });\n }\n \n /*\n this.setState({\n countryCode: document.cookie.split(\"=\")[1] // set the country code from cookie set in application_controller.rb\n });\n */\n }\n\n componentWillUnmount() {\n window.removeEventListener(\"resize\", this.handleResize);\n }\n \n getCookie(cname) {\n let name = cname + \"=\";\n let decodedCookie = decodeURIComponent(document.cookie);\n let ca = decodedCookie.split(';');\n for(let i = 0; i 450) {\n \n return(\n\n \n \n\n \n {/**/}\n \n\n
    \n
    \n\n {this.state.countryCode === 'IN' ? :\n \n }\n \n \n \n
    \n\n
    \n \n \n \n \n \n \n \n {/* \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {this.state.countryCode === 'IN' ? : }\n \n \n \n \n \n \n */}\n \n \n
    \n
    \n \n {this.state.countryCode === 'IN' ?\n
    \n

    \n

    \n

    \n
    \n
    \n

    \n

           Contact :

    \n           LIFE COLORS

    \n           #9, 4th Cross,

    \n           Kothanur Main Road,

    \n           Bangalore 560 062.

    \n

    \n           email : composz-team@composz.com

    \n           phone : +91 9620621884

    \n

    \n
    \n\n
    \n

    \n

       Policies :

    \n     Pricing

    \n     Refund & Return

    \n     Shipping

    \n

    \n

    \n

    \n

    \n

    \n
    \n
    \n
    : ''\n } \n
    \n );\n }\n else {\n return(\n\n //{this.state.countryCode === 'IN' ? : }\n \n \n \n \n \n
    \n \n {this.state.countryCode === 'IN' ? : }\n\n \n \n \n
    \n

    \n
    \n \n \n \n \n \n \n \n {/* \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {this.state.countryCode === 'IN' ? : }\n \n \n \n \n \n \n */}\n \n \n
    \n \n \n {this.state.countryCode === 'IN' ?\n
    \n

    \n

    \n

    \n

    \n

    \n
    \n
    \n

    \n

    Contact :

    \n   LIFE COLORS

    \n   #9, 4th Cross,

    \n   Kothanur Main Road,

    \n   Bangalore 560 062.

    \n

    \n   email : composz-team@composz.com

    \n   phone : +91 9620621884

    \n

    \n
    \n\n
    \n

    \n

    Policies :

    \n Pricing

    \n Refund & Return

    \n Shipping

    \n

    \n

    \n

    \n

    \n

    \n
    \n
    \n
    : ''\n } \n
    \n );\n }\n }\n}\n\n\nexport default ComposzHomePage \n","import React, { useState } from 'react';\nimport { Navbar, Nav, NavItem, MenuItem, NavDropdown, Dropdown } from 'react-bootstrap';\nimport logo from 'images/Composz-logo-white-trans.png';\nimport Mynavbar from './Navbar';\n\nexport class ComposzNavbar extends React.Component {\n \n \n constructor(props) {\n super(props)\n this.state = {\n windowWidth: window.innerWidth,\n windowHeight: window.innerHeight\n };\n document.cookie = \"cartCounter=25;\";\n }\n\n componentDidMount() {\n window.addEventListener(\"resize\", this.handleResize);\n }\n\n componentWillUnmount() {\n window.removeEventListener(\"resize\", this.handleResize);\n}\n\n handleResize = e => {\n const windowWidth = window.innerWidth;\n const windowHeight = window.innerHeight;\n \n this.setState(prevState => {\n return {\n windowWidth,\n windowHeight,\n };\n });\n };\n\n \n Fnavbar = () => {\n let Usernavbar = Mynavbar(this.props.user_id, this.props.user_name, this.props.has_view_products)\n return Usernavbar\n \n }\n\n render() {\n\n \n\n return (\n \n {window.location.pathname!=\"/products\" && \n window.location.pathname!=\"/orders\" &&\n window.location.pathname!=\"/orders/cart\"? \n \n : \n null\n }\n \n );\n }\n}\n\nexport default ComposzNavbar\n","import React, { Fragment } from 'react';\nimport { ENDPOINTS } from \"../constants/endpoints\";\nimport { FieldGroup } from \"./bootstrap/Forms.FieldGroup\";\nimport { formDataToJSON } from \"../adukku_utils/array\";\nimport { SPLoader } from \"./Spinner.js\";\nimport { Button, Modal, Form, FormGroup, ControlLabel, FormControl, Dropdown } from \"react-bootstrap\";\n\nimport {start_audio_Recording, stop_Recording, delete_Recording, save_Recording, get_Blob, del_Blob} from \"./AudioHelpers.js\"\n\nexport class Contribute extends React.Component {\n constructor(props) {\n super(props);\n let customState = { ...props, events: [], upld_aud_blob: \"\",\n birthday_uniqueImages: [], wedding_uniqueImages: [], mobile:false, recording:false,\n isCreatingContribute: false, edit_flg: false, bride: \"\", bridegroom: \"\", bday_name: \"\", noRecords: '',\n event_id: props.event_id, title: \"\", img_url: \"\", event_dt: props.event_dt, isLoading: true,\n c_name: \"\", message: \"\", c_img_url: \"\", c_file: \"\", c_place: \"\", c_aud_url: \"\", c_blob: \"\", c_page_no: \"\", c_seq_no: \"\",\n };\n this.state = customState\n this.getContributeEventfromDB(); \n }\n \n UNSAFE_componentWillMount() {\n this.checkDevice(); \n }\n\n checkDevice = () => {\n /* Storing user's device details in a variable*/\n let details = navigator.userAgent; \n \n /* Creating a regular expression \n containing some mobile devices keywords \n to search it in details string*/\n let regexp = /android|iphone|kindle|ipad/i; \n \n /* Using test() method to search regexp in details \n it returns boolean value*/\n let isMobileDevice = regexp.test(details); \n \n if (isMobileDevice) { \n this.setState({mobile: true})\n } else { \n this.setState({mobile: false})\n }\n }\n\n getContributeEventfromDB = () => {\n \n let event_uri = ENDPOINTS.events.show.uri;\n event_uri = event_uri.replace(\":event_id\", this.props.event_id)\n event_uri = event_uri + \"?event_dt=\" + this.props.event_dt\n \n let noRecords;\n \n noRecords = fetch(event_uri, {\n method: \"GET\", headers: { \"content-type\": \"application/json\" }, \n })\n .then((response) => response.json())\n .then((data) => { \n if (data.noRecords === 0) this.setState({noRecords: 0})\n else \n this.setState({\n events: data.events, \n isLoading: false}); \n });\n \n }\n\n getAudioFiles = (recorded_audio_file) => {\n let uri = \"/api/audio_files?recorded_audio_file=\" + recorded_audio_file\n return fetch(uri, {\n method: \"GET\",\n responseType:'blob',\n header: {\"Content-Type\": \"audio/mpeg\"},\n })\n .then((response) => {\n return response.blob()\n })\n }\n\n handleAudioSubmit = (event) => {\n var files = event.target.files;\n var filename = files[0].name\n var extension = filename.split('.')[1]\n \n if (files.length > 0){\n \n if (extension !== ('mp3' || 'wav')) {\n alert (\"Audio file rejected\\nAccepted formats are .mp3 or .wav\\nPlease upload valid Audio format\")\n return -1\n }\n\n //document.getElementById(\"RecNo\").textContent=\"You are Record Number: \" + (parseInt(window.sequenceNo) + 1).toString()\n \n var audioElement = document.getElementById(\"audio\");\n const RecUrl = URL.createObjectURL(files[0]);\n audioElement.src = RecUrl\n audioElement.load();\n setTimeout(() => {\n // Code goes here\n var maxRectime = 30\n if (audioElement.duration > maxRectime + 1) {\n audioElement.setAttribute('src', '');\n alert(\"Max audio is only \" + maxRectime + \" Seconds! Audio File rejected\")\n }\n else\n this.setState({\n upld_aud_blob: files[0],\n });\n \n // else\n // save_Recording(files[0], recorded_audio_file);\n //alert(\"Audio file successfully uploaded and saved\")\n }, 100)\n }\n }\n\n _handleValidSubmit = (e) => {\n\n if (this.state.recording) {\n alert (\"Recording in progress! Stop Recording befor proceeding...\")\n return false\n }\n\n e.preventDefault();\n e.stopPropagation();\n\n //if (!get_Blob()) {\n if (!get_Blob() && !this.state.upld_aud_blob) {\n alert (\"Kindly Upload/Record your Audio Wishes before proceeding...\")\n return false\n }\n\n let aud_blob = this.state.upld_aud_blob != \"\" ? this.state.upld_aud_blob : get_Blob();\n\n if (aud_blob.size === 0) { \n alert (\"Kindly Record your Audio Wishes before proceeding...\")\n return false\n }\n\n this.setState({c_blob: aud_blob})\n \n let spinner=document.getElementById(\"contributeSpinner\") \n spinner.style.display=\"\"\n\n let formData = formDataToJSON(new FormData(e.target));\n\n let endpoint, url, method\n endpoint = ENDPOINTS.contributes.create;\n url = endpoint.uri;\n method = endpoint.method;\n\n if (formData.c_img_url.name === \"\") {\n formData.c_img_url = this.state.c_img_url.toLowerCase()\n }\n else {\n formData.c_img_url = formData.c_img_url.name.toLowerCase();\n }\n\n formData.event_id = this.props.event_id\n formData.message = this.state.message\n \n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: method,\n body: JSON.stringify(formData),\n });\n return ajaxCall\n .then((response) => response.json())\n .then((data) => { \n this.setState({\n c_page_no: data.page_no,\n c_seq_no: data.seq_no,\n })\n this.closeModal(aud_blob, data.page_no, data.seq_no, this.props.event_id);\n });\n }\n\n save_contribute_image = (aud_blob, page_no, seq_no, event_id) => {\n let fileExt = this.state.c_img_url.split('.')[1].toLowerCase()\n let img_fileName = event_id + '-' + page_no + '-' + seq_no + '.' + fileExt\n\n let template_url = \"/api/savecontribute_image?event_id=:event_id&contribute_image_file=:filename\"\n template_url = template_url.replace(\":event_id\", event_id).replace(\":filename\", img_fileName);\n \n let formData = new FormData();\n formData.append(\"file\", this.state.c_file)\n \n $.ajax({\n url: template_url,\n type: \"POST\",\n method: \"POST\",\n data: formData,\n processData: false,\n contentType: false,\n }).then(function (data) {\n if (data.message == \"Image saved\") {\n if (aud_blob.size > 0) {\n let aud_fileName = event_id + '-' + page_no + '-' + seq_no + '.mp3'\n \n let spinner=document.getElementById(\"contributeSpinner\") \n spinner.style.display=\"none\"\n\n async function closeFinally (aud_blob, event_id, aud_fileName) {\n const result = await save_Recording(aud_blob, event_id, aud_fileName)\n if (result === 0) {\n alert (\"Thanks for your Wishes.\\nYour Wishes have been saved and sent successfully.\\nRedirecting to wishcolletor.com\")\n window.location.href = \"https://wishcollector.com\"\n }\n }\n\n closeFinally(aud_blob, event_id, aud_fileName);\n } \n }\n else {\n let spinner=document.getElementById(\"contributeSpinner\") \n spinner.style.display=\"none !important\"\n alert(\"Image not saved\\nKindly submit valid Image\")\n }\n });\n }\n\n closeModal = (aud_blob, page_no, seq_no, event_id) => {\n if (this.state.c_img_url != '') {\n this.save_contribute_image(aud_blob, page_no, seq_no, event_id);\n }\n }\n\n \n\n render() {\n if (this.state.noRecords === 0) {\n return

    --------- No Event Found! ----------

    \n }\n else {\n\n if (!this.state.isLoading && this.state.events[0]) {\n\n if (this.state.events[0].status != 'ACTIVE') {\n \n return (\n \n
    --------- This Event has been closed by the Creator ----------
    \n
    -------------------- Kindly Wish Directly! -------------------
    \n
    \n )\n \n }\n else {\n \n return( \n\n \n\n {this.setState({ isCreatingContribute: false })}}\n style={{marginTop:'45px', }}\n>\n \n \n Submit Wishes\n \n \n\n
    \n \n \n {\n this.setState({ [name]: value });\n }}\n value={this.state.c_name}\n >\n \n\n {\n this.setState({ [name]: value });\n }}\n value={this.state.c_place}\n >\n \n\n\n\n {/* \n Enter your Text Message/Wish\n this.setState({ message: e.target.value })}\n placeholder=\"Best Wishes.\" \n />\n */}\n \n \"\"\n\n {\n if (event.target.value) {\n var fileExtensions = [\".jpg\",\".jpeg\",\".bmp\",\".gif\",\".png\"];\n var files = event.target.files;\n var filename = files[0].name\n var extension = filename.split('.')[1].toLowerCase()\n //if (extension !== ('jpg' || 'jpeg' || 'svg' || 'png' || 'gif')) {\n if (fileExtensions.indexOf(extension) != -1) {\n alert (\"Image file rejected\\nAccepted formats (.jpg, .svg, .png, .gif)\\nPlease upload valid Image format\")\n event.target.value = ''\n var output = document.getElementById('output');\n output.src = ''\n return -1\n }\n\n this.setState({c_file: event.target.files[0]})\n this.setState({c_img_url: event.target.value });\n var output = document.getElementById('output');\n output.src = URL.createObjectURL(event.target.files[0]);\n output.style.display='block'\n }\n }}\n \n //value={this.state.c_img_url}\n \n >\n\n \n\n\n\n\n \n\n\n {this.state.mobile?\n \n Record your Audio Message/Wish\n

    \n - Max 30 secs\n

    \n \n\n \n\n
    \n
    Rec
    \n
    Stop
    \n
    \n
    Re-Rec
    \n\n
    \n \n \n \n
    \n\n

    \n \n
    \n :\n \n

    Record your Audio Message/Wish - Max 30 secs

    \n\n \n\n \n\n \n \n
    \n \n
    \n\n
    \n
    Rec
    \n
    Stop
    \n
    \n
    Re-Rec
    \n\n

    \n \n
    \n } \n
    \n
    \n
    \n 0%\n
    \n
    \n
    \n\n
    \n \n {\n var result = this.handleAudioSubmit(event)\n if (result === -1) {\n var audioElement = document.getElementById(\"audio\")\n audioElement.src = ''\n if (get_Blob()) del_Blob();\n event.target.value = ''\n }\n }}\n onClick={(event)=>{\n if (get_Blob()) {\n alert(\"Previously recorded/uploaded Audio will be deleted\")\n var audioElement = document.getElementById(\"audio\")\n audioElement.src = ''\n del_Blob();\n } \n }}\n \n />\n
    \n\n\n \n Enter your Text Message/Wish\n this.setState({ message: e.target.value })}\n placeholder=\"Best Wishes.\" \n />\n \n\n\n\n
    \n\n \n \n \n
    \n
    \n\n {this.state.mobile?\n\n
    \n
    \n

    {this.state.events[0].title}

    \n {this.state.events[0].video?\n \n : ''} \n \"\" {\n window.open(`uploads/events/${this.state.events[0].id}/pictures/`+this.state.events[0].img_url, \"_blank\")\n }}\n />\n
    \n \n { this.state.events[0].event_type === \"Wedding\" || this.state.events[0].event_type === \"Anniversary\" || this.state.events[0].event_type === \"Engagement\"?\n {this.state.events[0].bride}\n :\n ''\n }\n

    \n { this.state.events[0].event_type === \"Wedding\" || this.state.events[0].event_type === \"Anniversary\" || this.state.events[0].event_type === \"Engagement\"?\n {this.state.events[0].bridegroom}\n :\n ''\n }\n { this.state.events[0].event_type != \"Wedding\" && this.state.events[0].event_type != \"Anniversary\" && this.state.events[0].event_type != \"Engagement\"?\n Name: {this.state.events[0].bday_name}\n :\n ''\n }\n

    \n Date: {this.state.events[0].event_dt}\n

    \n

    \n \n \n

    \n

    \n
    \n
    \n
    \n\n :\n\n
    \n
    \n {this.state.events[0].video?\n \n : ''} \n \"\" {\n window.open(`uploads/events/${this.state.events[0].id}/pictures/`+this.state.events[0].img_url, \"_blank\")\n }}\n />\n
    \n

    {this.state.events[0].title}

    \n { this.state.events[0].event_type === \"Wedding\" || this.state.events[0].event_type === \"Anniversary\" || this.state.events[0].event_type === \"Engagement\"?\n

    {this.state.events[0].bride}

    \n :\n ''\n }\n { this.state.events[0].event_type === \"Wedding\" || this.state.events[0].event_type === \"Anniversary\" || this.state.events[0].event_type === \"Engagement\"?\n

    {this.state.events[0].bridegroom}

    \n :\n ''\n }\n { this.state.events[0].event_type != \"Wedding\" && this.state.events[0].event_type != \"Anniversary\" && this.state.events[0].event_type != \"Engagement\"?\n

    Name of the person: {this.state.events[0].bday_name}

    \n :\n ''\n }\n

    Date: {this.state.events[0].event_dt}

    \n
    \n
    \n
    \n \n\n \n {/*
    */}\n
    \n \n }\n\n
    \n \n
    \n\n
    \n )\n }\n }\n else {\n if (!this.state.isLoading && this.state.events.length === 0) {\n return

    --------- No Event Found! ----------

    \n }\n else\n return null\n }\n }\n \n\n }\n}\n\nexport default Contribute;","var DragDropTouch;\n(function (DragDropTouch_1) {\n 'use strict';\n /**\n * Object used to hold the data that is being dragged during drag and drop operations.\n *\n * It may hold one or more data items of different types. For more information about\n * drag and drop operations and data transfer objects, see\n * HTML Drag and Drop API.\n *\n * This object is created automatically by the @see:DragDropTouch singleton and is\n * accessible through the @see:dataTransfer property of all drag events.\n */\n var DataTransfer = (function () {\n function DataTransfer() {\n this._dropEffect = 'move';\n this._effectAllowed = 'all';\n this._data = {};\n }\n Object.defineProperty(DataTransfer.prototype, 'dropEffect', {\n /**\n * Gets or sets the type of drag-and-drop operation currently selected.\n * The value must be 'none', 'copy', 'link', or 'move'.\n */\n get: function () {\n return this._dropEffect;\n },\n set: function (value) {\n this._dropEffect = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DataTransfer.prototype, 'effectAllowed', {\n /**\n * Gets or sets the types of operations that are possible.\n * Must be one of 'none', 'copy', 'copyLink', 'copyMove', 'link',\n * 'linkMove', 'move', 'all' or 'uninitialized'.\n */\n get: function () {\n return this._effectAllowed;\n },\n set: function (value) {\n this._effectAllowed = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DataTransfer.prototype, 'types', {\n /**\n * Gets an array of strings giving the formats that were set in the @see:dragstart event.\n */\n get: function () {\n return Object.keys(this._data);\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Removes the data associated with a given type.\n *\n * The type argument is optional. If the type is empty or not specified, the data\n * associated with all types is removed. If data for the specified type does not exist,\n * or the data transfer contains no data, this method will have no effect.\n *\n * @param type Type of data to remove.\n */\n DataTransfer.prototype.clearData = function (type) {\n if (type != null) {\n delete this._data[type];\n }\n else {\n this._data = null;\n }\n };\n /**\n * Retrieves the data for a given type, or an empty string if data for that type does\n * not exist or the data transfer contains no data.\n *\n * @param type Type of data to retrieve.\n */\n DataTransfer.prototype.getData = function (type) {\n return this._data[type] || '';\n };\n /**\n * Set the data for a given type.\n *\n * For a list of recommended drag types, please see\n * https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Recommended_Drag_Types.\n *\n * @param type Type of data to add.\n * @param value Data to add.\n */\n DataTransfer.prototype.setData = function (type, value) {\n this._data[type] = value;\n };\n /**\n * Set the image to be used for dragging if a custom one is desired.\n *\n * @param img An image element to use as the drag feedback image.\n * @param offsetX The horizontal offset within the image.\n * @param offsetY The vertical offset within the image.\n */\n DataTransfer.prototype.setDragImage = function (img, offsetX, offsetY) {\n var ddt = DragDropTouch._instance;\n ddt._imgCustom = img;\n ddt._imgOffset = { x: offsetX, y: offsetY };\n };\n return DataTransfer;\n }());\n DragDropTouch_1.DataTransfer = DataTransfer;\n /**\n * Defines a class that adds support for touch-based HTML5 drag/drop operations.\n *\n * The @see:DragDropTouch class listens to touch events and raises the\n * appropriate HTML5 drag/drop events as if the events had been caused\n * by mouse actions.\n *\n * The purpose of this class is to enable using existing, standard HTML5\n * drag/drop code on mobile devices running IOS or Android.\n *\n * To use, include the DragDropTouch.js file on the page. The class will\n * automatically start monitoring touch events and will raise the HTML5\n * drag drop events (dragstart, dragenter, dragleave, drop, dragend) which\n * should be handled by the application.\n *\n * For details and examples on HTML drag and drop, see\n * https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Drag_operations.\n */\n var DragDropTouch = (function () {\n /**\n * Initializes the single instance of the @see:DragDropTouch class.\n */\n function DragDropTouch() {\n this._lastClick = 0;\n // enforce singleton pattern\n if (DragDropTouch._instance) {\n throw 'DragDropTouch instance already created.';\n }\n // detect passive event support\n // https://github.com/Modernizr/Modernizr/issues/1894\n var supportsPassive = false;\n document.addEventListener('test', function () { }, {\n get passive() {\n supportsPassive = true;\n return true;\n }\n });\n // listen to touch events\n if ('ontouchstart' in document) {\n var d = document, ts = this._touchstart.bind(this), tm = this._touchmove.bind(this), te = this._touchend.bind(this), opt = supportsPassive ? { passive: false, capture: false } : false;\n d.addEventListener('touchstart', ts, opt);\n d.addEventListener('touchmove', tm, opt);\n d.addEventListener('touchend', te);\n d.addEventListener('touchcancel', te);\n }\n }\n /**\n * Gets a reference to the @see:DragDropTouch singleton.\n */\n DragDropTouch.getInstance = function () {\n return DragDropTouch._instance;\n };\n // ** event handlers\n DragDropTouch.prototype._touchstart = function (e) {\n var _this = this;\n if (this._shouldHandle(e)) {\n // raise double-click and prevent zooming\n if (Date.now() - this._lastClick < DragDropTouch._DBLCLICK) {\n if (this._dispatchEvent(e, 'dblclick', e.target)) {\n if (e.cancelable) {\n e.preventDefault();\n }\n this._reset();\n return;\n }\n }\n // clear all variables\n this._reset();\n // get nearest draggable element\n var src = this._closestDraggable(e.target);\n if (src) {\n // give caller a chance to handle the hover/move events\n if (!this._dispatchEvent(e, 'mousemove', e.target) &&\n !this._dispatchEvent(e, 'mousedown', e.target)) {\n // get ready to start dragging\n this._dragSource = src;\n this._ptDown = this._getPoint(e);\n this._lastTouch = e;\n if (e.cancelable) {\n e.preventDefault();\n }\n // show context menu if the user hasn't started dragging after a while\n setTimeout(function () {\n if (_this._dragSource == src && _this._img == null) {\n if (_this._dispatchEvent(e, 'contextmenu', src)) {\n _this._reset();\n }\n }\n }, DragDropTouch._CTXMENU);\n if (DragDropTouch._ISPRESSHOLDMODE) {\n this._pressHoldInterval = setTimeout(function () {\n _this._isDragEnabled = true;\n _this._touchmove(e);\n }, DragDropTouch._PRESSHOLDAWAIT);\n }\n }\n }\n }\n };\n DragDropTouch.prototype._touchmove = function (e) {\n if (this._shouldCancelPressHoldMove(e)) {\n this._reset();\n return;\n }\n if (this._shouldHandleMove(e) || this._shouldHandlePressHoldMove(e)) {\n // see if target wants to handle move\n var target = this._getTarget(e);\n if (this._dispatchEvent(e, 'mousemove', target)) {\n this._lastTouch = e;\n if (e.cancelable) {\n e.preventDefault();\n }\n return;\n }\n // start dragging\n if (this._dragSource && !this._img && this._shouldStartDragging(e)) {\n this._dispatchEvent(e, 'dragstart', this._dragSource);\n this._createImage(e);\n this._dispatchEvent(e, 'dragenter', target);\n }\n // continue dragging\n if (this._img) {\n this._lastTouch = e;\n if (e.cancelable) {\n e.preventDefault(); // prevent scrolling\n }\n if (target != this._lastTarget) {\n this._dispatchEvent(this._lastTouch, 'dragleave', this._lastTarget);\n this._dispatchEvent(e, 'dragenter', target);\n this._lastTarget = target;\n }\n this._moveImage(e);\n this._isDropZone = this._dispatchEvent(e, 'dragover', target);\n }\n }\n };\n DragDropTouch.prototype._touchend = function (e) {\n if (this._shouldHandle(e)) {\n // see if target wants to handle up\n if (this._dispatchEvent(this._lastTouch, 'mouseup', e.target)) {\n if (e.cancelable) {\n e.preventDefault();\n }\n return;\n }\n // user clicked the element but didn't drag, so clear the source and simulate a click\n if (!this._img) {\n this._dragSource = null;\n this._dispatchEvent(this._lastTouch, 'click', e.target);\n this._lastClick = Date.now();\n }\n // finish dragging\n this._destroyImage();\n if (this._dragSource) {\n if (e.type.indexOf('cancel') < 0 && this._isDropZone) {\n this._dispatchEvent(this._lastTouch, 'drop', this._lastTarget);\n }\n this._dispatchEvent(this._lastTouch, 'dragend', this._dragSource);\n this._reset();\n }\n }\n };\n // ** utilities\n // ignore events that have been handled or that involve more than one touch\n DragDropTouch.prototype._shouldHandle = function (e) {\n return e &&\n !e.defaultPrevented &&\n e.touches && e.touches.length < 2;\n };\n\n // use regular condition outside of press & hold mode\n DragDropTouch.prototype._shouldHandleMove = function (e) {\n return !DragDropTouch._ISPRESSHOLDMODE && this._shouldHandle(e);\n };\n\n // allow to handle moves that involve many touches for press & hold\n DragDropTouch.prototype._shouldHandlePressHoldMove = function (e) {\n return DragDropTouch._ISPRESSHOLDMODE &&\n this._isDragEnabled && e && e.touches && e.touches.length;\n };\n\n // reset data if user drags without pressing & holding\n DragDropTouch.prototype._shouldCancelPressHoldMove = function (e) {\n return DragDropTouch._ISPRESSHOLDMODE && !this._isDragEnabled &&\n this._getDelta(e) > DragDropTouch._PRESSHOLDMARGIN;\n };\n\n // start dragging when specified delta is detected\n DragDropTouch.prototype._shouldStartDragging = function (e) {\n var delta = this._getDelta(e);\n return delta > DragDropTouch._THRESHOLD ||\n (DragDropTouch._ISPRESSHOLDMODE && delta >= DragDropTouch._PRESSHOLDTHRESHOLD);\n }\n\n // clear all members\n DragDropTouch.prototype._reset = function () {\n this._destroyImage();\n this._dragSource = null;\n this._lastTouch = null;\n this._lastTarget = null;\n this._ptDown = null;\n this._isDragEnabled = false;\n this._isDropZone = false;\n this._dataTransfer = new DataTransfer();\n clearInterval(this._pressHoldInterval);\n };\n // get point for a touch event\n DragDropTouch.prototype._getPoint = function (e, page) {\n if (e && e.touches) {\n e = e.touches[0];\n }\n return { x: page ? e.pageX : e.clientX, y: page ? e.pageY : e.clientY };\n };\n // get distance between the current touch event and the first one\n DragDropTouch.prototype._getDelta = function (e) {\n if (DragDropTouch._ISPRESSHOLDMODE && !this._ptDown) { return 0; }\n var p = this._getPoint(e);\n return Math.abs(p.x - this._ptDown.x) + Math.abs(p.y - this._ptDown.y);\n };\n // get the element at a given touch event\n DragDropTouch.prototype._getTarget = function (e) {\n var pt = this._getPoint(e), el = document.elementFromPoint(pt.x, pt.y);\n while (el && getComputedStyle(el).pointerEvents == 'none') {\n el = el.parentElement;\n }\n return el;\n };\n // create drag image from source element\n DragDropTouch.prototype._createImage = function (e) {\n // just in case...\n if (this._img) {\n this._destroyImage();\n }\n // create drag image from custom element or drag source\n var src = this._imgCustom || this._dragSource;\n this._img = src.cloneNode(true);\n this._copyStyle(src, this._img);\n this._img.style.top = this._img.style.left = '-9999px';\n // if creating from drag source, apply offset and opacity\n if (!this._imgCustom) {\n var rc = src.getBoundingClientRect(), pt = this._getPoint(e);\n this._imgOffset = { x: pt.x - rc.left, y: pt.y - rc.top };\n this._img.style.opacity = DragDropTouch._OPACITY.toString();\n }\n // add image to document\n this._moveImage(e);\n document.body.appendChild(this._img);\n };\n // dispose of drag image element\n DragDropTouch.prototype._destroyImage = function () {\n if (this._img && this._img.parentElement) {\n this._img.parentElement.removeChild(this._img);\n }\n this._img = null;\n this._imgCustom = null;\n };\n // move the drag image element\n DragDropTouch.prototype._moveImage = function (e) {\n var _this = this;\n requestAnimationFrame(function () {\n if (_this._img) {\n var pt = _this._getPoint(e, true), s = _this._img.style;\n s.position = 'absolute';\n s.pointerEvents = 'none';\n s.zIndex = '999999';\n s.left = Math.round(pt.x - _this._imgOffset.x) + 'px';\n s.top = Math.round(pt.y - _this._imgOffset.y) + 'px';\n }\n });\n };\n // copy properties from an object to another\n DragDropTouch.prototype._copyProps = function (dst, src, props) {\n for (var i = 0; i < props.length; i++) {\n var p = props[i];\n dst[p] = src[p];\n }\n };\n DragDropTouch.prototype._copyStyle = function (src, dst) {\n // remove potentially troublesome attributes\n DragDropTouch._rmvAtts.forEach(function (att) {\n dst.removeAttribute(att);\n });\n // copy canvas content\n if (src instanceof HTMLCanvasElement) {\n var cSrc = src, cDst = dst;\n cDst.width = cSrc.width;\n cDst.height = cSrc.height;\n cDst.getContext('2d').drawImage(cSrc, 0, 0);\n }\n // copy style (without transitions)\n var cs = getComputedStyle(src);\n for (var i = 0; i < cs.length; i++) {\n var key = cs[i];\n if (key.indexOf('transition') < 0) {\n dst.style[key] = cs[key];\n }\n }\n dst.style.pointerEvents = 'none';\n // and repeat for all children\n for (var i = 0; i < src.children.length; i++) {\n this._copyStyle(src.children[i], dst.children[i]);\n }\n };\n DragDropTouch.prototype._dispatchEvent = function (e, type, target) {\n if (e && target) {\n var evt = document.createEvent('Event'), t = e.touches ? e.touches[0] : e;\n evt.initEvent(type, true, true);\n evt.button = 0;\n evt.which = evt.buttons = 1;\n this._copyProps(evt, e, DragDropTouch._kbdProps);\n this._copyProps(evt, t, DragDropTouch._ptProps);\n evt.dataTransfer = this._dataTransfer;\n target.dispatchEvent(evt);\n return evt.defaultPrevented;\n }\n return false;\n };\n // gets an element's closest draggable ancestor\n DragDropTouch.prototype._closestDraggable = function (e) {\n for (; e; e = e.parentElement) {\n if (e.hasAttribute('draggable') && e.draggable) {\n return e;\n }\n }\n return null;\n };\n return DragDropTouch;\n }());\n /*private*/ DragDropTouch._instance = new DragDropTouch(); // singleton\n // constants\n DragDropTouch._THRESHOLD = 5; // pixels to move before drag starts\n DragDropTouch._OPACITY = 0.5; // drag image opacity\n DragDropTouch._DBLCLICK = 500; // max ms between clicks in a double click\n DragDropTouch._CTXMENU = 900; // ms to hold before raising 'contextmenu' event\n DragDropTouch._ISPRESSHOLDMODE = false; // decides of press & hold mode presence\n DragDropTouch._PRESSHOLDAWAIT = 400; // ms to wait before press & hold is detected\n DragDropTouch._PRESSHOLDMARGIN = 25; // pixels that finger might shiver while pressing\n DragDropTouch._PRESSHOLDTHRESHOLD = 0; // pixels to move before drag starts\n // copy styles/attributes from drag source to drag image element\n DragDropTouch._rmvAtts = 'id,class,style,draggable'.split(',');\n // synthesize and dispatch an event\n // returns true if the event has been handled (e.preventDefault == true)\n DragDropTouch._kbdProps = 'altKey,ctrlKey,metaKey,shiftKey'.split(',');\n DragDropTouch._ptProps = 'pageX,pageY,clientX,clientY,screenX,screenY'.split(',');\n DragDropTouch_1.DragDropTouch = DragDropTouch;\n})(DragDropTouch || (DragDropTouch = {}));\n","import React, { Component } from \"react\";\nimport { FormGroup, ControlLabel, FormControl, Modal } from \"react-bootstrap\";\nimport ImageEditor from \"@toast-ui/react-image-editor\";\nimport \"tui-image-editor/dist/tui-image-editor.css\";\n\n// import { FieldGroup } from \"./bootstrap/Forms.FieldGroup\";\nimport { formDataToJSON } from \"../adukku_utils/array\";\nimport { ENDPOINTS } from \"../constants/endpoints\";\nimport EditProductImage from \"./EditProductImage\";\n\nlet inputWidth = null;\nlet inputHeight = null;\nlet $inputCheckInvert = null;\nlet $inputCheckSepia = null;\nlet $inputCheckSepia2 = null;\nlet $inputCheckBlur = null;\nlet $inputCheckSharpen = null;\nlet $inputCheckEmboss = null;\nlet $inputCheckGrayscale = null;\nlet $inputCheckRemoveWhite = null;\nlet $inputCheckBrightness = null;\nlet $inputCheckNoise = null;\nlet $inputCheckColorFilter = null;\nlet $inputSlideRemoveWhite = null;\nlet $inputSlideBrightness = null;\nlet $inputSlideNoise = null;\nlet $inputSlideColorFilter = null;\n\nexport default class EditProductData extends Component {\n constructor(props) {\n super(props);\n this.state = {\n currentDataId: null,\n isCurrentSaved: false,\n isFileName: null,\n editedFiles: {},\n page: 1,\n perPage: 10,\n showImageEditor: null,\n imageEditorOptions: {\n includeUI: {\n initMenu: \"mask\",\n menuBarPosition: \"bottom\",\n menu: [\"crop\", \"flip\", \"rotate\", \"text\", \"draw\", \"mask\"],\n },\n cssMaxWidth: 700,\n cssMaxHeight: 500,\n selectionStyle: {\n cornerSize: 20,\n rotatingPointOffset: 70,\n },\n usageStatistics: false,\n },\n searchData: {},\n ...props,\n };\n }\n editorRef = React.createRef();\n\n _handleValidSubmit = (e) => {\n e.preventDefault();\n e.stopPropagation();\n let formData = formDataToJSON(new FormData(e.target));\n this.setState({ show: false });\n };\n\n getUploadedData = (isSearch) => {\n if (this.state.dlname == \"DL0\") {\n this.props.getProducts();\n }\n this.props.getUploadedData({\n isSearch: isSearch,\n searchData: this.state.searchData,\n product_id: this.state.product_id,\n dlname: this.state.dlname,\n page: this.state.page,\n per_page: this.state.perPage,\n });\n };\n\n formatBytes = (bytes, decimals = 2) => {\n if (bytes === 0) return \"0 Bytes\";\n\n const k = 1024;\n const dm = decimals < 0 ? 0 : decimals;\n const sizes = [\"Bytes\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\", \"EB\", \"ZB\", \"YB\"];\n\n // i indicates always in KB.\n const i = 1; //Math.floor(Math.log(bytes) / Math.log(k));\n\n return parseFloat((bytes / Math.pow(k, i)).toFixed(dm));\n };\n\n checkAvailSpace = async (fileSize, avail_space) => {\n let uri = `${ENDPOINTS.files.get.uri}?file_size=${fileSize}`;\n return await fetch(uri, {\n method: \"GET\",\n headers: {\n \"content-type\": \"application/json\",\n },\n })\n .then((response) => response.json())\n .then((response) => {\n if (response.data == \"available\") {\n return true;\n } else {\n return false;\n }\n });\n };\n\n UNSAFE_componentWillReceiveProps(ownProps) {\n if (ownProps.uploaded_data != this.state.uploaded_data) {\n let mapped_uploaded_data = {};\n if (ownProps.uploaded_data && ownProps.uploaded_data.uploaded_data) {\n ownProps.uploaded_data.uploaded_data.map((data) => {\n if (data.data) {\n mapped_uploaded_data[data.id] = data.data;\n }\n });\n this.setState({\n uploaded_data: ownProps.uploaded_data,\n mapped_uploaded_data: mapped_uploaded_data,\n product_keys: ownProps.product_keys,\n });\n }\n }\n }\n\n componentDidUpdate(prevProps, prevState) {\n if (\n this.state.currentDataId &&\n prevState.currentDataId &&\n this.state.currentDataId !== prevState.currentDataId &&\n !this.state.currentDataId.toString().includes(\"add_new_\")\n ) {\n if (confirm(\"Do you want to save the previous data?\")) {\n this.handleSaveUploadData(prevState.currentDataId);\n } else {\n let { uploaded_data, mapped_uploaded_data } = this.state;\n uploaded_data.uploaded_data.map((data) => {\n if (data.data && data.id === prevState.currentDataId) {\n mapped_uploaded_data[data.id] = data.data;\n }\n });\n this.setState({\n mapped_uploaded_data: mapped_uploaded_data,\n });\n }\n }\n\n if (\n this.state.page &&\n this.state.perPage &&\n (this.state.page != prevState.page || this.state.perPage != prevState.perPage)\n ) {\n let isSearch = Object.keys(this.state.searchData || {}).length > 0;\n this.props.getUploadedData({\n isSearch: isSearch,\n searchData: this.state.searchData,\n product_id: this.state.product_id,\n dlname: this.state.dlname,\n page: this.state.page,\n per_page: this.state.perPage,\n });\n }\n }\n\n handleSaveUploadData = (id, isEdited = false) => {\n if (!id) return;\n let { mapped_uploaded_data, uploaded_data } = this.state;\n let that = this;\n let formData = new FormData();\n mapped_uploaded_data &&\n mapped_uploaded_data[id] &&\n Object.keys(mapped_uploaded_data[id]).forEach((key) => {\n formData.append(key, mapped_uploaded_data[id][key]);\n console.log(`${key}: ${mapped_uploaded_data[id][key]}`)\n });\n if (id.toString().startsWith(\"add_new_\")) {\n let url = ENDPOINTS.csv.create.uri;\n url = url.replace(\":product_id\", this.state.product_id);\n url = url.replace(\":dlname\", this.state.dlname);\n console.log(\"csv_create_url: \", url)\n \n \n let ajaxCall = fetch(url, {\n method: ENDPOINTS.csv.create.method,\n body: formData,\n });\n return ajaxCall\n .then((response) => response.json())\n .then((response) => {\n if (response.errors) {\n alert(response.errors);\n } else {\n mapped_uploaded_data[response.data.id] = response.data.data;\n uploaded_data.uploaded_data = uploaded_data.uploaded_data.map((dt) => {\n if (dt.id == id) return response.data;\n else return dt;\n });\n that.setState({\n mapped_uploaded_data: mapped_uploaded_data,\n uploaded_data: uploaded_data,\n isFileName: null,\n });\n this.getUploadedData();\n alert(\"Saved Successfully\");\n }\n })\n .catch((error) => {\n throw error;\n });\n } else {\n this.props.updateUploadedData({\n id: id,\n product_id: this.state.product_id,\n dlname: this.state.dlname,\n data: formData,\n });\n // this.getUploadedData();\n if (isEdited) {\n alert(\"Successfully, uploaded file\");\n }\n }\n this.setState({\n currentDataId: null,\n isFileName: null,\n page: 1,\n perPage: 10,\n });\n };\n\n handleAddNewData = (id) => {\n const { mapped_uploaded_data, uploaded_data } = this.state;\n // let newUploadedData = uploaded_data;\n // let formData = new FormData();\n let that = this;\n let newRow = {};\n if (((uploaded_data && uploaded_data.uploaded_data) || []).length == 0) {\n newRow.data = {};\n let data = {};\n uploaded_data.datalevel_attributes.forEach((att) => {\n data[att.name] = null;\n });\n newRow.data = data;\n } else {\n newRow = JSON.parse(\n JSON.stringify(\n uploaded_data &&\n uploaded_data.uploaded_data &&\n uploaded_data.uploaded_data[uploaded_data.uploaded_data.length - 1]\n )\n );\n }\n newRow.id = `add_new_${uploaded_data.uploaded_data.length}`;\n newRow.data &&\n Object.keys(newRow.data).length > 0 &&\n Object.keys(newRow.data).forEach((attribute) => {\n newRow.data[attribute] = null;\n });\n mapped_uploaded_data[newRow.id] = newRow.data;\n uploaded_data.uploaded_data = [newRow, ...uploaded_data.uploaded_data];\n if (Object.keys(newRow.data).length > 0) {\n this.setState({\n uploaded_data: uploaded_data,\n mapped_uploaded_data: mapped_uploaded_data,\n });\n } else {\n alert(\"No datalevels attributes added\");\n }\n };\n\n handleDeleteUploadData = (id) => {\n if (!id) return;\n if (confirm(\"Are you are sure, you want to delete?\")) {\n const { mapped_uploaded_data, uploaded_data } = this.state;\n let newUploadedData = uploaded_data;\n let formData = new FormData();\n let that = this;\n Object.keys(mapped_uploaded_data[id]).forEach((key) => {\n formData.append(key, mapped_uploaded_data[id][key]);\n });\n newUploadedData.uploaded_data =\n (uploaded_data &&\n uploaded_data.uploaded_data &&\n uploaded_data.uploaded_data.filter((data) => data.id !== id)) ||\n [];\n let url = ENDPOINTS.csv.delete.uri;\n url = url.replace(\":product_id\", this.state.product_id);\n url = url.replace(\":dlname\", this.state.dlname);\n url = url.replace(\":data_upload_id\", id);\n if (id.toString().startsWith(\"add_new_\")) {\n that.setState({\n uploaded_data: newUploadedData,\n });\n } else {\n let ajaxCall = fetch(url, {\n method: ENDPOINTS.csv.delete.method,\n });\n return ajaxCall\n .then((response) => {\n that.setState({\n uploaded_data: newUploadedData,\n });\n })\n .catch((error) => {\n throw error;\n });\n }\n }\n };\n\n handleImageEdit = (val) => {\n if (!val) {\n this.setState({ showImageEditor: null });\n document.querySelector(\"#portal_image_editor\").classList.remove(\"show_editor\");\n } else {\n if (\n (typeof val.data.data[val.attribute.name] === \"string\" &&\n val.data.data[val.attribute.name].split(\".\").pop() !== \"svg\") ||\n (typeof val.data.data[val.attribute.name] === \"object\" &&\n val.data.data[val.attribute.name].name.split(\".\").pop() !== \"svg\")\n ) {\n document.querySelector(\"#portal_image_editor\").classList.add(\"show_editor\");\n this.setState({ showImageEditor: val });\n document.querySelector(\".modal\").removeAttribute(\"tabindex\");\n setTimeout(() => {\n this.initializeEditor();\n }, 100);\n } else {\n alert(\"Can't edit the svg images\");\n }\n }\n };\n\n initializeEditor = () => {\n let refInstance = this.editorRef.current.getInstance();\n // Changing buttons\n $(\".tui-image-editor-header-logo\").replaceWith(\"\");\n $(\".tui-image-editor-header-buttons\").replaceWith(\n `
    \n \n \n \n
    \n \n \n
    \n
    `\n );\n\n refInstance.loadImageFromURL(this.state.showImageEditor.image, \"Adukku image\").then(() => {\n refInstance.ui.activeMenuEvent();\n\n $(\".image_editor_file_name\").remove();\n $(\".tui-image-editor-header\").append(\n `

    ${\n this.state.showImageEditor.image.split(\"/\").pop().split(\"?\")[0]\n }

    `\n );\n\n if (!$(\".preset-fixed\").html()) {\n const fixedCrop = `
    \n
    \n
    \n
    \n \n
    `;\n $(\".tie-crop-preset-button\").append(fixedCrop);\n }\n\n if (!$(\".tie-btn-filter\").html()) {\n const filterBtn = `
  • \n \"Filter\"\n
  • \n `;\n $(\".tui-image-editor-menu\").prepend(filterBtn);\n $(\".tie-btn-filter\").bind(\"click\", this.onFilterSelect);\n }\n document.querySelector(\".save-as-container\").style.display = \"none\";\n this.bindActions();\n });\n\n refInstance.on(\"objectScaled\", () => {\n if (inputWidth && inputHeight) {\n this.customImageSizing();\n }\n });\n };\n\n bindActions = () => {\n $(\".tie-btn-crop\").bind(\"mousedown\", this.onCropSelect);\n $(\".tie-btn-flip\").bind(\"mousedown\", this.onFlipSelect);\n $(\".tie-btn-text\").bind(\"mousedown\", this.onTextSelect);\n $(\".tie-btn-rotate\").bind(\"mousedown\", this.onRotateSelect);\n $(\".tie-btn-draw\").bind(\"mousedown\", this.onDrawSelect);\n $(\".tie-btn-mask\").bind(\"mousedown\", this.onMaskSelect);\n $(\".tui-image-editor-close-btn\").bind(\"click\", this.onClose);\n $(\".tui-image-editor-save-btn\").bind(\"click\", this.onSave);\n $(\".tui-image-editor-save-as-btn\").bind(\"click\", this.onSaveas);\n $(\".submit_save_as_file\").bind(\"click\", this.onSubmitFile);\n $(\".preset-fixed\").bind(\"click\", this.onClickFix);\n $(\".preset-none\").bind(\"click\", this.onClickCustom);\n $(\".preset-square\").bind(\"click\", this.onClickSq);\n $(\".preset-3-2\").bind(\"click\", this.onClick32);\n $(\".preset-4-3\").bind(\"click\", this.onClick43);\n $(\".preset-5-4\").bind(\"click\", this.onClick54);\n $(\".preset-7-5\").bind(\"click\", this.onClick75);\n $(\".preset-16-9\").bind(\"click\", this.onClick169);\n };\n\n unBindActions = () => {\n $(\".tie-btn-crop\").unbind(\"mousedown\", this.onCropSelect);\n $(\".tie-btn-flip\").unbind(\"mousedown\", this.onFlipSelect);\n $(\".tie-btn-text\").unbind(\"mousedown\", this.onTextSelect);\n $(\".tie-btn-rotate\").unbind(\"mousedown\", this.onRotateSelect);\n $(\".tie-btn-draw\").unbind(\"mousedown\", this.onDrawSelect);\n $(\".tie-btn-mask\").unbind(\"mousedown\", this.onMaskSelect);\n $(\".tui-image-editor-close-btn\").unbind(\"click\", this.onClose);\n $(\".tui-image-editor-save-btn\").unbind(\"click\", this.onSave);\n $(\".tui-image-editor-save-as-btn\").unbind(\"click\", this.onSaveas);\n $(\".submit_save_as_file\").unbind(\"click\", this.onSubmitFile);\n $(\".preset-fixed\").unbind(\"click\", this.onClickFix);\n $(\".preset-none\").unbind(\"click\", this.onClickCustom);\n $(\".preset-square\").unbind(\"click\", this.onClickSq);\n $(\".preset-3-2\").unbind(\"click\", this.onClick32);\n $(\".preset-4-3\").unbind(\"click\", this.onClick43);\n $(\".preset-5-4\").unbind(\"click\", this.onClick54);\n $(\".preset-7-5\").unbind(\"click\", this.onClick75);\n $(\".preset-16-9\").unbind(\"click\", this.onClick169);\n };\n\n addCropFields = () => {\n const customCrop = `
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    `;\n if (!$(\"#crop_fields\").html()) {\n $(\".tie-crop-preset-button\").append(customCrop);\n inputWidth = document.querySelector(\"#tui_width\");\n inputHeight = document.querySelector(\"#tui_heigt\");\n inputWidth.oninput = this.updatingWidth;\n inputHeight.oninput = this.updatingHeight;\n }\n };\n\n onSaveas = () => {\n document.querySelector(\".save-as-container\").style.display = \"flex\";\n };\n\n removeCropFields = () => {\n if ($(\".custom-crop-container\").html()) {\n $(\".custom-crop-container\").remove();\n }\n };\n\n onCropSelect = () => {\n $(\".tie-btn-filter\").removeClass(\"active\");\n $(\".filter_image\").addClass(\"filter_filter\");\n this.removeCropFields();\n this.removeFilters();\n // setTimeout(() => {\n // let refInstance = this.editorRef.current.getInstance();\n // refInstance.setCropzoneRect(1);\n // }, 500);\n };\n\n onFlipSelect = () => {\n $(\".tie-btn-filter\").removeClass(\"active\");\n $(\".filter_image\").addClass(\"filter_filter\");\n this.removeCropFields();\n this.removeFilters();\n };\n\n onTextSelect = () => {\n $(\".tie-btn-filter\").removeClass(\"active\");\n $(\".filter_image\").addClass(\"filter_filter\");\n this.removeCropFields();\n this.removeFilters();\n };\n\n onRotateSelect = () => {\n $(\".tie-btn-filter\").removeClass(\"active\");\n $(\".filter_image\").addClass(\"filter_filter\");\n this.removeCropFields();\n this.removeFilters();\n };\n\n onFilterSelect = () => {\n this.removeCropFields();\n if ($(\".tie-btn-mask\").hasClass(\"active\")) {\n $(\".tie-btn-mask\").trigger(\"click\");\n }\n if ($(\".tie-btn-draw\").hasClass(\"active\")) {\n $(\".tie-btn-draw\").trigger(\"click\");\n }\n if ($(\".tie-btn-text\").hasClass(\"active\")) {\n $(\".tie-btn-text\").trigger(\"click\");\n }\n if ($(\".tie-btn-rotate\").hasClass(\"active\")) {\n $(\".tie-btn-rotate\").trigger(\"click\");\n }\n if ($(\".tie-btn-flip\").hasClass(\"active\")) {\n $(\".tie-btn-flip\").trigger(\"click\");\n }\n if ($(\".tie-btn-crop\").hasClass(\"active\")) {\n $(\".tie-btn-crop\").trigger(\"click\");\n }\n $(\".tui-image-editor-item\").removeClass(\"active\");\n $(\".tie-btn-filter\").addClass(\"active\");\n $(\".filter_image\").removeClass(\"filter_filter\");\n this.addFilterFields();\n // this.removeNotWorkingFilters();\n };\n\n onDrawSelect = () => {\n $(\".tie-btn-filter\").removeClass(\"active\");\n $(\".filter_image\").addClass(\"filter_filter\");\n this.removeCropFields();\n this.removeFilters();\n };\n\n onMaskSelect = () => {\n $(\".tie-btn-filter\").removeClass(\"active\");\n $(\".filter_image\").addClass(\"filter_filter\");\n this.removeCropFields();\n this.removeFilters();\n };\n\n onClickFix = () => {\n this.addCropFields();\n setTimeout(() => {\n let refInstance = this.editorRef.current.getInstance();\n refInstance.setCropzoneRect(1);\n this.initializeSizeCal();\n }, 500);\n };\n\n onClickCustom = () => {\n // setTimeout(() => {\n // let refInstance = this.editorRef.current.getInstance();\n // refInstance.setCropzoneRect(1);\n // }, 500);\n this.removeCropFields();\n };\n\n onClickSq = () => {\n this.removeCropFields();\n };\n\n onClick32 = () => {\n this.removeCropFields();\n };\n\n onClick43 = () => {\n this.removeCropFields();\n };\n\n onClick54 = () => {\n this.removeCropFields();\n };\n\n onClick75 = () => {\n this.removeCropFields();\n };\n\n onClick169 = () => {\n this.removeCropFields();\n };\n\n addFilterFields = () => {\n if (!$(\".tui-image-editor-menu-filter\").html()) {\n $(\".tui-image-editor-submenu\").css({ display: \"table\" });\n const filFields = `\n
    \n
      \n
    • \n
      \n \n \n \n \n \n \n \n
      \n
    • \n
    • \n
      \n
      \n \n
      \n Distance\n \n
      \n
      \n
      \n \n
      \n \n
      \n
      \n
      \n \n
      \n Threshold\n \n
      \n
      \n
      \n \n
      \n \n
      \n
      \n
      \n
    • \n
    \n
    \n `;\n $(\".tui-image-editor-submenu\").append(filFields);\n const imageRef = this.editorRef.current.getInstance();\n $inputCheckBlur = $(\".blur_check\");\n $inputCheckEmboss = $(\".emboss_check\");\n $inputCheckInvert = $(\".invert_check\");\n $inputCheckSepia = $(\".sepia_check\");\n $inputCheckSepia2 = $(\".sepia2_check\");\n $inputCheckSharpen = $(\".sharpen_check\");\n $inputCheckGrayscale = $(\".gray_check\");\n $inputCheckRemoveWhite = $(\".remove_white_check\");\n $inputCheckBrightness = $(\".brightness_check\");\n $inputCheckNoise = $(\".noise_check\");\n $inputCheckColorFilter = $(\".color_check\");\n $inputSlideRemoveWhite = $(\"#remove_white_check\");\n $inputSlideBrightness = $(\"#brightness_check\");\n $inputSlideNoise = $(\"#noise_check\");\n $inputSlideColorFilter = $(\"#color_check\");\n\n $inputCheckBlur.on(\"change\", (e) => {\n if (e.target.checked) {\n imageRef.applyFilter(\"Blur\", { blur: 0.1 });\n } else {\n imageRef.removeFilter(\"Blur\");\n }\n });\n $inputCheckEmboss.on(\"change\", (e) => {\n if (e.target.checked) {\n imageRef.applyFilter(\"Emboss\");\n } else {\n imageRef.removeFilter(\"Emboss\");\n }\n });\n $inputCheckInvert.on(\"change\", (e) => {\n if (e.target.checked) {\n imageRef.applyFilter(\"Invert\");\n } else {\n imageRef.removeFilter(\"Invert\");\n }\n });\n $inputCheckSepia.on(\"change\", (e) => {\n if (e.target.checked) {\n imageRef.applyFilter(\"Sepia\");\n } else {\n imageRef.removeFilter(\"Sepia\");\n }\n });\n $inputCheckSepia2.on(\"change\", (e) => {\n if (e.target.checked) {\n imageRef.applyFilter(\"vintage\");\n } else {\n imageRef.removeFilter(\"vintage\");\n }\n });\n $inputCheckSharpen.on(\"change\", (e) => {\n if (e.target.checked) {\n imageRef.applyFilter(\"Sharpen\");\n } else {\n imageRef.removeFilter(\"Sharpen\");\n }\n });\n $inputCheckGrayscale.on(\"change\", (e) => {\n if (e.target.checked) {\n imageRef.applyFilter(\"Grayscale\");\n } else {\n imageRef.removeFilter(\"Grayscale\");\n }\n });\n $inputCheckRemoveWhite.on(\"change\", (e) => {\n if (e.target.checked) {\n $(\"#remove_white_check\").removeClass(\"disabled\");\n imageRef.applyFilter(\"removeColor\", {\n color: \"#FFFFFF\",\n useAlpha: false,\n distance: parseInt($inputSlideRemoveWhite.val(), 10) / 255,\n });\n } else {\n $(\"#remove_white_check\").addClass(\"disabled\");\n imageRef.removeFilter(\"removeColor\");\n }\n });\n $inputCheckBrightness.on(\"change\", (e) => {\n if (e.target.checked) {\n $(\"#brightness_check\").removeClass(\"disabled\");\n imageRef.applyFilter(\"brightness\", {\n brightness: parseInt($inputSlideBrightness.val(), 10) / 255,\n });\n } else {\n $(\"#brightness_check\").addClass(\"disabled\");\n imageRef.removeFilter(\"brightness\");\n }\n });\n $inputCheckNoise.on(\"change\", (e) => {\n if (e.target.checked) {\n $(\"#noise_check\").removeClass(\"disabled\");\n imageRef.applyFilter(\"noise\", {\n noise: parseInt($inputSlideNoise.val(), 10),\n });\n } else {\n $(\"#noise_check\").addClass(\"disabled\");\n imageRef.removeFilter(\"noise\");\n }\n });\n $inputCheckColorFilter.on(\"change\", (e) => {\n if (e.target.checked) {\n $(\"#color_check\").removeClass(\"disabled\");\n imageRef.applyFilter(\"removeColor\", {\n color: \"#FFFFFF\",\n distance: $inputSlideColorFilter.val() / 255,\n });\n } else {\n $(\"#color_check\").addClass(\"disabled\");\n imageRef.removeFilter(\"removeColor\");\n }\n });\n $inputSlideRemoveWhite.on(\"input\", (e) => {\n imageRef.applyFilter(\"removeColor\", {\n color: \"#FFFFFF\",\n useAlpha: false,\n distance: parseInt(e.target.value, 10) / 255,\n });\n });\n $inputSlideBrightness.on(\"input\", (e) => {\n imageRef.applyFilter(\"brightness\", {\n brightness: parseInt(e.target.value, 10) / 255,\n });\n });\n $inputSlideNoise.on(\"input\", (e) => {\n imageRef.applyFilter(\"noise\", {\n noise: parseInt(e.target.value, 10),\n });\n });\n $inputSlideColorFilter.on(\"input\", (e) => {\n imageRef.applyFilter(\"removeColor\", {\n color: \"#FFFFFF\",\n distance: e.target.value / 255,\n });\n });\n }\n };\n\n removeFilters = () => {\n if ($(\".tui-image-editor-menu-filter\").html()) {\n $(\".tui-image-editor-menu-filter\").remove();\n }\n };\n\n initializeSizeCal = () => {\n document.querySelector(\".preset-fixed\").classList.add(\"active\");\n this.customImageSizing();\n };\n\n updatingWidth = (e) => {\n if (parseInt(e.data) >= 0 && parseInt(e.data) <= 9) {\n inputWidth.value = e.target.value;\n const imageRef = this.editorRef.current.getInstance();\n imageRef.setCropzoneRect(inputWidth.value / inputHeight.value);\n }\n };\n\n updatingHeight = (e) => {\n if (parseInt(e.data) >= 0 && parseInt(e.data) <= 9) {\n inputHeight.value = e.target.value;\n const imageRef = this.editorRef.current.getInstance();\n imageRef.setCropzoneRect(inputWidth.value / inputHeight.value);\n }\n };\n\n onClose = () => {\n this.unBindActions();\n this.removeCropFields();\n $(\".preset-fixed\").remove();\n $(\".image_editor_file_name\").remove();\n this.handleImageEdit(null, null);\n };\n\n onSave = async () => {\n const imageRef = this.editorRef.current.getInstance();\n let filename = this.state.showImageEditor.data.data[this.state.showImageEditor.attribute.name];\n if (typeof filename === \"object\") {\n filename = filename.name;\n }\n const extension = filename.split(\".\").pop();\n const metadata = `image/${extension}`;\n const dataURL = imageRef.toDataURL(metadata, 1);\n let file = await this.dataURLtoFile(dataURL, filename, metadata);\n this.submitImage(file, this.state.showImageEditor);\n };\n\n dataURLtoFile = async (dataurl, filename, metadata) => {\n let response = await fetch(dataurl);\n let data = await response.blob();\n let bgImgFile = new File([data], filename, { type: metadata });\n return bgImgFile;\n };\n\n addNewDataLevel = () => {\n return new Promise((resolve, reject) => {\n const { mapped_uploaded_data, uploaded_data, showImageEditor } = this.state;\n // let newUploadedData = uploaded_data;\n // let formData = new FormData();\n let that = this;\n let newRow = {};\n if (((uploaded_data && uploaded_data.uploaded_data) || []).length == 0) {\n newRow.data = {};\n let data = {};\n uploaded_data.datalevel_attributes.forEach((att) => {\n data[att.name] = null;\n });\n newRow.data = data;\n } else {\n newRow = JSON.parse(\n JSON.stringify(\n uploaded_data &&\n uploaded_data.uploaded_data &&\n uploaded_data.uploaded_data[uploaded_data.uploaded_data.length - 1]\n )\n );\n }\n newRow.id = `add_new_${uploaded_data.uploaded_data.length}`;\n newRow.data &&\n Object.keys(newRow.data).length > 0 &&\n Object.keys(newRow.data).forEach((attribute) => {\n newRow.data[attribute] = showImageEditor.data.data[attribute];\n });\n mapped_uploaded_data[newRow.id] = newRow.data;\n uploaded_data.uploaded_data = [newRow, ...uploaded_data.uploaded_data];\n if (Object.keys(newRow.data).length > 0) {\n this.setState(\n {\n uploaded_data: uploaded_data,\n mapped_uploaded_data: mapped_uploaded_data,\n },\n () => {\n resolve(newRow.id);\n }\n );\n } else {\n alert(\"No datalevels attributes added\");\n reject(false);\n }\n });\n };\n\n onSubmitFile = async () => {\n let val = await this.addNewDataLevel();\n if (val != false) {\n const { mapped_uploaded_data, showImageEditor } = this.state;\n let imageName = $(\".save-as-input\").val();\n const imageRef = this.editorRef.current.getInstance();\n let filename = showImageEditor.data.data[showImageEditor.attribute.name];\n if (typeof filename === \"object\") {\n filename = filename.name;\n }\n const extension = filename.split(\".\").pop();\n const metadata = `image/${extension}`;\n const dataURL = imageRef.toDataURL(metadata, 1);\n let file = await this.dataURLtoFile(dataURL, `${imageName}.${extension}`, metadata);\n if (await this.checkAvailSpace(file.size, 0)) {\n mapped_uploaded_data[val][showImageEditor.attribute.name] = file;\n this.setImageFromFile(file, val);\n this.setState(\n {\n mapped_uploaded_data: mapped_uploaded_data,\n currentDataId: val,\n },\n () => {\n this.handleSaveUploadData(val, true);\n this.onClose();\n }\n );\n } else {\n alert(\"Storage limit exceeded\");\n }\n }\n };\n\n customImageSizing = () => {\n const imageRef = this.editorRef.current.getInstance();\n let imageMode = imageRef.getDrawingMode();\n if (imageMode === \"CROPPER\") {\n let imgCrop = imageRef.getCropzoneRect();\n if (imgCrop.width == 0.5 && imgCrop.height == 0.5) {\n let imageCanvs = imageRef.getCanvasSize();\n inputWidth.value = imageCanvs.width.toFixed(2);\n inputHeight.value = imageCanvs.height.toFixed(2);\n } else {\n inputWidth.value = imgCrop.width.toFixed(2);\n inputHeight.value = imgCrop.height.toFixed(2);\n }\n }\n };\n\n submitImage = (file, showImageEditor) => {\n const { mapped_uploaded_data } = this.state;\n mapped_uploaded_data[showImageEditor.data.id][showImageEditor.attribute.name] = file;\n this.setImageFromFile(file, showImageEditor.data.id);\n this.setState(\n {\n mapped_uploaded_data: mapped_uploaded_data,\n currentDataId: showImageEditor.data.id,\n },\n () => {\n this.handleSaveUploadData(showImageEditor.data.id, true);\n this.onClose();\n }\n );\n };\n\n setImageFromFile = (rawFile, dataID) => {\n let reader = new FileReader();\n reader.onload = (e) => {\n let dataURL = e.target.result;\n let newEditedFiles = this.state.editedFiles;\n newEditedFiles[dataID] = dataURL;\n this.setState({ editedFiles: newEditedFiles });\n };\n reader.readAsDataURL(rawFile);\n };\n\n render() {\n const { uploaded_data, mapped_uploaded_data, isFileName, editedFiles, dlname } = this.state;\n return (\n \n {\n this.setState({ show: true });\n this.getUploadedData();\n }}\n style={{ marginLeft: \"10px\", marginRight: \"8px\", cursor: \"pointer\" }}\n >\n \n \n {this.state.showImageEditor && (\n \n \n \n )}\n this.setState({ show: false })}\n >\n \n \n
    \n
    \n Edit Data: {dlname}\n
    \n
    \n \n Pages: {uploaded_data && uploaded_data.meta && uploaded_data.meta.total_pages}\n \n \n Rows: {uploaded_data && uploaded_data.meta && uploaded_data.meta.total_count}\n \n \n Per page:\n {\n this.setState({ perPage: value });\n }}\n className=\"product_data_control\"\n >\n \n \n \n \n \n {\n e.preventDefault();\n e.stopPropagation();\n this.setState({ page: uploaded_data.meta.prev_page });\n }}\n />\n \n Page:\n {\n this.setState({ page: value });\n }}\n className=\"product_data_input\"\n >\n \n {\n e.preventDefault();\n e.stopPropagation();\n this.setState({ page: uploaded_data.meta.next_page });\n }}\n data-toggle=\"tooltip\"\n title=\"Go to Next page\"\n src=\"/icons/icon_head.png\"\n alt=\"Next\"\n className=\"product_page_next\"\n />\n
    \n
    \n \n
    \n \n \n \n \n {uploaded_data &&\n uploaded_data.datalevel_attributes &&\n uploaded_data.datalevel_attributes.map((attribute) => {\n return (\n \n {\n this.setState({\n searchData: {\n ...this.state.searchData,\n [attribute.name]: value,\n },\n });\n }}\n />\n \n );\n })}\n \n
    \n {\n e.stopPropagation();\n e.preventDefault();\n this.getUploadedData(true);\n }}\n >\n Go\n \n {\n e.stopPropagation();\n e.preventDefault();\n this.getUploadedData(false);\n this.setState({\n searchData: {},\n });\n }}\n >\n Clear\n \n {\n this.handleAddNewData();\n }}\n >\n Add New Record\n \n
    \n \n
    \n \n
    \n
    \n \n
    \n
    \n \n {/* {\n e.preventDefault();\n e.stopPropagation();\n\n this.props.getUploadedData({\n product_id: this.state.product_id,\n dlname: this.state.dlname,\n page: page,\n per_page: perPage,\n });\n // this.setState({\n // page: uploaded_data.meta.prev_page,\n // });\n }}\n >\n Go\n */}\n \n \n \n \n {uploaded_data &&\n uploaded_data.datalevel_attributes &&\n uploaded_data.datalevel_attributes.map((attribute) => {\n return (\n \n );\n })}\n \n \n \n {uploaded_data && (\n \n {uploaded_data.uploaded_data &&\n uploaded_data.uploaded_data.map((data, index) => {\n let currentPage = (uploaded_data.meta.current_page - 1) * this.state.perPage;\n return (\n \n {mapped_uploaded_data && mapped_uploaded_data[data.id] ? (\n \n \n {uploaded_data.datalevel_attributes &&\n uploaded_data.datalevel_attributes.map((attribute) => {\n // let productKey = product_keys.find(\n // (product_key) => product_key.attribute === attribute.name\n // );\n return (\n \n );\n })}\n \n \n ) : null}\n \n );\n })}\n \n )}\n
    #\n {attribute.name}\n Action
    \n {data.id && data.id.toString().startsWith(\"add_new_\")\n ? 0\n : currentPage + (index + 1)}\n \n {attribute && attribute.type == \"text\" && (\n {\n if (this.state.currentDataId !== data.id)\n this.setState({ currentDataId: data.id });\n }}\n // readOnly={productKey ? true : false}\n name={attribute.name}\n onChange={({ target: { name, value } }) => {\n mapped_uploaded_data[data.id][name] = value;\n this.setState({\n mapped_uploaded_data: mapped_uploaded_data,\n currentDataId: data.id,\n });\n }}\n />\n )}\n {attribute && attribute.type == \"image\" && (\n \n {editedFiles[data.id] && (\n \n this.handleImageEdit({\n image:\n uploaded_data.base_image_url +\n `/uploads/products/${\n this.state.product_id\n }/images/${\n mapped_uploaded_data[data.id][\n attribute.name\n ] &&\n typeof mapped_uploaded_data[data.id][\n attribute.name\n ] === \"object\"\n ? mapped_uploaded_data[data.id][\n attribute.name\n ].name\n : mapped_uploaded_data[data.id][\n attribute.name\n ]\n }?${new Date()}`,\n data,\n attribute,\n })\n }\n src={editedFiles[data.id]}\n />\n )}\n {!editedFiles[data.id] &&\n mapped_uploaded_data[data.id][attribute.name] &&\n typeof mapped_uploaded_data[data.id][attribute.name] !==\n \"object\" && (\n \n this.handleImageEdit({\n image:\n uploaded_data.base_image_url +\n `/uploads/products/${\n this.state.product_id\n }/images/${\n mapped_uploaded_data[data.id][\n attribute.name\n ] &&\n typeof mapped_uploaded_data[data.id][\n attribute.name\n ] === \"object\"\n ? mapped_uploaded_data[data.id][\n attribute.name\n ].name\n : mapped_uploaded_data[data.id][\n attribute.name\n ]\n }?${new Date()}`,\n data,\n attribute,\n })\n }\n src={`${\n uploaded_data.base_image_url\n }/uploads/products/${\n this.state.product_id\n }/images/${\n mapped_uploaded_data[data.id][attribute.name]\n }?${new Date()}`}\n />\n )}\n {isFileName && isFileName === data.id ? (\n {\n let file = files[0];\n mapped_uploaded_data[data.id][name] = files[0];\n let that = this;\n // let fileSize = this.formatBytes(file.size, 6)\n if (await this.checkAvailSpace(file.size, 0)) {\n this.setState({\n mapped_uploaded_data: mapped_uploaded_data,\n currentDataId: data.id,\n });\n } else {\n alert(\"Storage limit exceeded\");\n }\n }}\n />\n ) : (\n {\n if (this.state.currentDataId !== data.id)\n this.setState({ currentDataId: data.id });\n }}\n name={attribute.name}\n onChange={({ target: { name, value } }) => {\n mapped_uploaded_data[data.id][name] = value;\n this.setState({\n mapped_uploaded_data: mapped_uploaded_data,\n currentDataId: data.id,\n });\n }}\n />\n )}\n\n

    \n {mapped_uploaded_data[data.id][\n attribute && attribute.name\n ] &&\n typeof mapped_uploaded_data[data.id][attribute.name] ===\n \"object\"\n ? mapped_uploaded_data[data.id][attribute.name].name\n : mapped_uploaded_data[data.id][attribute.name]}\n {\n this.setState({\n isFileName: isFileName ? null : data.id,\n });\n }}\n />\n

    \n
    \n )}\n
    \n {\n this.handleSaveUploadData(data.id);\n }}\n >\n {\n this.handleDeleteUploadData(data.id);\n }}\n >\n
    \n
    \n {/* \n \n */}\n \n
    \n );\n }\n}\n","import React from \"react\";\nimport ReactDOM from \"react-dom\";\n\nlet portalRoot = null;\n\nclass EditProductImage extends React.Component {\n constructor(props) {\n super(props);\n this.el = document.createElement(\"div\");\n }\n\n componentDidMount() {\n portalRoot = document.getElementById(this.props.portalClass);\n this.el.className = \"react_image_editor\";\n portalRoot.appendChild(this.el);\n }\n\n componentWillUnmount() {\n portalRoot.removeChild(this.el);\n }\n\n render() {\n const { children } = this.props;\n return ReactDOM.createPortal(children, this.el);\n }\n}\n\nexport default EditProductImage;\n","// extracted by mini-css-extract-plugin","import React, { Component, Fragment } from \"react\";\nimport { ENDPOINTS } from \"../constants/endpoints\";\nimport { FieldGroup } from \"./bootstrap/Forms.FieldGroup\";\nimport { formDataToJSON } from \"../adukku_utils/array\";\nimport { Radio, Button, Modal, Form, Dropdown, Row, Col, FormGroup } from \"react-bootstrap\";\nimport EventPayment from \"./UserEvent/EventPayment\";\nimport RPEventPayment from \"./UserEvent/RPEventPayment\";\nimport { formatCurrency } from \"../adukku_utils/formatCurrency\";\nimport html2canvas from \"html2canvas\";\nimport jsPDF from \"jspdf\";\nimport { SPLoader } from \"./Spinner.js\"\nimport './DragDropTouch'\nimport ImageEditor from \"@toast-ui/react-image-editor\";\nimport \"tui-image-editor/dist/tui-image-editor.css\";\nimport EditProductImage from \"./EditProductImage\";\n\nimport { start_video_Recording, delete_Recording, get_Blob, get_Time, getRecordingState } from \"./VideoHelpers\";\n\nlet inputWidth = null;\nlet inputHeight = null;\nlet $inputCheckInvert = null;\nlet $inputCheckSepia = null;\nlet $inputCheckSepia2 = null;\nlet $inputCheckBlur = null;\nlet $inputCheckSharpen = null;\nlet $inputCheckEmboss = null;\nlet $inputCheckGrayscale = null;\nlet $inputCheckRemoveWhite = null;\nlet $inputCheckBrightness = null;\nlet $inputCheckNoise = null;\nlet $inputCheckColorFilter = null;\nlet $inputSlideRemoveWhite = null;\nlet $inputSlideBrightness = null;\nlet $inputSlideNoise = null;\nlet $inputSlideColorFilter = null;\n\nexport class EventsHomePage extends React.Component {\n constructor(props) {\n super(props);\n let customState = { ...props, events: [], presetTemplates: [], invitationProducts: [], chooseEventPictures: false, eventPictures: [], event_video: false,\n birthday_uniqueImages: [], wedding_uniqueImages: [], contributes: [], user_file: false, choosePreset: false, vidFlg: false, uploadVidFlg: false,\n isCreatingEvent: false, isContributions: false, colorPicker: '#293c80', isPayingEvent: false, link: false, presetFolders: [],\n product_id: 0, event_id: \"\", event_image: \"\", event_type: \"Wedding\", title: \"\", file: \"\", img_url: \"\", event_dt: \"\", prepaid_ct: 0, postpaid_ct: 0,\n event_dt: \"\", edit_flg: false, del_flg: false, bride: \"\", bridegroom: \"\", bday_name: \"\", product_id: \"\", status: '', isArrange: false,\n mobile:false, isPaymentModal:false, price: 0.15, showSpinner: false, no_of_pages: 0, eventImg: '', extraWishers: 1, uploadedVideo: '',\n isFileManagerOpen: false, isEditProductClicked: false, purchaseHistory: [], currentOrder: null, isExtraPayingEvent: false,\n updVidTime:'', recVidTime:'', recording:false,\n showImageEditor: null, isUploadImage: false, u_img_url: '', u_file: '', page_no: '', seq_no: '',\n imageEditorOptions: {\n includeUI: {\n initMenu: \"crop\",\n menuBarPosition: \"bottom\",\n menu: [\"crop\"],\n },\n cssMaxWidth: 700,\n cssMaxHeight: 500,\n selectionStyle: {\n cornerSize: 20,\n rotatingPointOffset: 70,\n },\n usageStatistics: false,\n },\n };\n this.state = customState\n this.getEventsfromDB(); \n this.getPresetEvents();\n this.getInvitationProducts();\n \n }\n editorRef = React.createRef();\n \n UNSAFE_componentWillReceiveProps(nextProps) {\n if (nextProps !== this.state) {\n this.setState(nextProps);\n }\n }\n \n UNSAFE_componentWillMount() {\n this.checkDevice();\n this.getPrice();\n this.getEventsfromDB();\n }\n\n componentDidMount() {\n // code to execute\n // this.callCreateEvent();\n this.getEventsfromDB();\n if(localStorage.getItem(\"PayPalPayment\")){\n localStorage.removeItem(\"PayPalPayment\")\n alert(\"Payment done successfully\\nClick 'Event Link' to get the link to share\");\n }\n if(localStorage.getItem(\"PayPalPaymentExtra\")){\n localStorage.removeItem(\"PayPalPaymentExtra\")\n alert(\"Payment done successfully\\nProceed to 'Generate Event Files'\");\n }\n }\n\n \n \n \n callCreateEvent() {\n let cook = this.getCookie(\"editorFlg\").split('_')[0]\n let ev_type = this.getCookie(\"editorFlg\").split('_')[1]\n if (cook.split('_')[0] === 'New') {\n //document.getElementById(\"createNewEvent\").click();\n this.setCookie(\"editorFlg\", '');\n }\n if (cook.split('_')[0] === 'Edit') {\n //document.getElementById(\"createNewEvent\").click();\n this.setCookie(\"editorFlg\", '');\n }\n \n }\n \n createEditInvitation = () => { \n var mylist = document.getElementById(\"myList\"); \n //document.getElementById(\"favourite\").value = mylist.options[mylist.selectedIndex].text; \n var event_type = mylist.options[mylist.selectedIndex].value;\n let invitationproductID = this.invitationProductsindexOf(this.state.invitationProducts, event_type, 'product_id')\n if (invitationproductID === 0) {\n this.cloneInvitationProduct(event_type).then(function(product_id){\n if (product_id > 0) \n window.location = \"/products/\" + product_id + \"/invitation/\" + \"new\";\n else\n alert(\"Operation Failed. Try again.\")\n })\n }\n else{\n window.location = \"/products/\" + invitationproductID + \"/invitation/\" + \"edit\";\n }\n\n } \n\n\n removeDuplicates = (arr) => {\n return arr.filter((item,\n index) => arr.indexOf(item) === index);\n }\n\n\n _handleImageUpload = (e) => {\n\n e.preventDefault();\n e.stopPropagation();\n\n let spinner=document.getElementById(\"mySpinner\") \n spinner.style.display=\"\"\n\n let fileExt = this.state.u_img_url.split('.')[1].toLowerCase()\n let img_fileName = this.state.event_id + '-' + this.state.page_no + '-' + this.state.seq_no + '.' + fileExt\n \n let template_url = \"/api/savecontribute_image?event_id=:event_id&contribute_image_file=:filename\"\n template_url = template_url.replace(\":event_id\", this.state.event_id).replace(\":filename\", img_fileName);\n \n let formData = new FormData();\n formData.append(\"file\", this.state.u_file)\n \n var element = `contributeImage_${img_fileName.split('.')[0]}`\n var elementSrc = `uploads/events/${this.state.event_id}/contributes/${img_fileName}` \n\n \n this.setState({isUploadImage: false})\n\n $.ajax({\n url: template_url,\n type: \"POST\",\n method: \"POST\",\n data: formData,\n processData: false,\n contentType: false,\n }).then(function (data) {\n if (data.message == \"Image saved\") {\n \n \n \n let spinner=document.getElementById(\"mySpinner\") \n spinner.style.display=\"none\"\n var imgElement = document.getElementById(`${element}`)\n \n var imageHash = Date.now()\n imgElement.src = `${elementSrc}?${imageHash}`\n\n alert(\"Image replaced\")\n \n \n } \n else {\n // let spinner=document.getElementById(\"mySpinner\") \n // spinner.style.display=\"none !important\"\n alert(\"Image not saved\\nKindly submit valid Image\")\n }\n });\n }\n\n\n\n\n _handleValidSort = () => {\n const sortIds = []\n const hides = []\n const draggables = document.querySelectorAll(\".myDraggable\")\n draggables.forEach (id => {\n hides.push(id.dataset.hide === 'true'? 1 : 0) \n sortIds.push(id.id.split('_')[0])\n })\n\n let payload = {\n sortIds: sortIds, \n hides: hides,\n };\n let endpoint = ENDPOINTS[\"contributes\"][\"update\"];\n // uri: \"/api/contributes?sort=:sortflg\"\n let url = endpoint.uri.replace(':event_id', this.state.event_id);\n let method = endpoint.method;\n \n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: method,\n body: JSON.stringify(payload),\n });\n return ajaxCall\n .then((response) => {\n return response.json();\n })\n .then((data) => { \n alert(\"Saved successfully\")\n });\n\n }\n\n \n handleVideoSubmit = (event) => {\n event.preventDefault()\n var files = event.target.files;\n if (files.length > 0){\n let videoElementDiv = document.getElementById(\"videoRecordedDiv\");\n videoElementDiv.style.display = \"\";\n let videoElement = document.getElementById(\"videoRecorded\");\n let oldVideoElement = videoElement.src\n const RecUrl = URL.createObjectURL(files[0]);\n videoElement.src = RecUrl\n videoElement.load();\n setTimeout(() => {\n // Code goes here\n var maxRectime = 46\n if (videoElement.duration > maxRectime) {\n videoElement.setAttribute('src', '');\n alert(\"Max Video duration allowed is only \" + maxRectime + \" Seconds!\\nUploaded video duration exceeds max allowed\\nRestoring previous video if any...\")\n videoElement.src = oldVideoElement\n document.getElementById(\"upload\").value=null;\n //videoElement.play();\n }\n else {\n this.setState({\n uploadedVideo: files[0],\n uploadVidFlg: true,\n updVidTime: new Date()\n })\n videoElement.play()\n }\n }, 100)\n }\n }\n\n setDrag = () => {\n const draggables = document.querySelectorAll(\".myDraggable\")\n const containers = document.querySelectorAll(\".myContainer\")\n \n const content = document.querySelector(\".modal-content\")\n if (!this.state.mobile){\n content.style.height = '100vh'\n content.style.width = '90vh'\n content.style.marginLeft = '-50px'\n }\n else {\n content.style.height = '100vh'\n }\n\n draggables.forEach(draggable => {\n draggable.addEventListener('dragstart', () => {\n draggable.classList.add('dragging')\n })\n draggable.addEventListener('dragend', () => {\n draggable.classList.remove('dragging')\n })\n \n })\n\n containers.forEach(container => {\n container.addEventListener('dragover', e => {\n e.preventDefault()\n const afterElement = getDragAfterElement(container, e.clientY)\n const draggable = document.querySelector('.dragging')\n if (afterElement == null) {\n container.appendChild(draggable)\n }\n else {\n container.insertBefore(draggable, afterElement)\n }\n\n })\n\n })\n\n function getDragAfterElement(container, y) {\n const draggableElements = [...container.querySelectorAll('.myDraggable:not(.dragging)')]\n return draggableElements.reduce((closest, child) => {\n const box = child.getBoundingClientRect()\n const offset = y - box.top - box.height / 2\n\n if (offset < 0 && offset > closest.offset) {\n child.scrollIntoView({ behavior: \"smooth\", block: \"end\"});\n return {offset: offset, element: child}\n }\n else {\n return closest\n }\n }, {offset: Number.NEGATIVE_INFINITY}).element\n }\n\n }\n\n presetFoldersindexOf = (array, item) => {\n for (var i = 0; i < array.length; i++) {\n if (array[i][0] === item.toLowerCase()) {\n return array[i][1]\n }\n }\n return ''; // Not found\n }\n\n invitationProductsindexOf = (array, item, type) => {\n for (var i = 0; i < array.length; i++) {\n if (array[i].event_type === item) {\n if (type === 'layout_id')\n return array[i].layout_id\n if (type === 'product_id')\n return array[i].product_id \n }\n }\n return 0; // Not found\n }\n\n videoSetup = () => {\n const buttonStart = document.querySelector('#buttonStart')\n const buttonStop = document.querySelector('#buttonStop')\n const videoLive = document.querySelector('#videoLive')\n const videoRecorded = document.querySelector('#videoRecorded')\n \n const stream = navigator.mediaDevices.getUserMedia({ // <1>\n video: true,\n audio: true,\n })\n \n videoLive.srcObject = stream\n \n if (!MediaRecorder.isTypeSupported('video/webm')) { // <2>\n console.warn('video/webm is not supported')\n }\n \n const mediaRecorder = new MediaRecorder(stream, { // <3>\n mimeType: 'video/webm',\n })\n \n buttonStart.addEventListener('click', () => {\n mediaRecorder.start() // <4>\n buttonStart.setAttribute('disabled', '')\n buttonStop.removeAttribute('disabled')\n })\n \n buttonStop.addEventListener('click', () => {\n mediaRecorder.stop() // <5>\n buttonStart.removeAttribute('disabled')\n buttonStop.setAttribute('disabled', '')\n })\n \n mediaRecorder.addEventListener('dataavailable', event => {\n videoRecorded.src = URL.createObjectURL(event.data) // <6>\n })\n }\n\n\n\n\n\n\n getPrice = () => {\n this.countryCode!==\"IN\"?this.setState({price:0.10}):this.setState({price:10.00})\n }\n\n getPurchaseHistory = (event_id) => {\n\n let uri = ENDPOINTS.user_events.list.uri;\n uri = uri + \"?event_id=\" + event_id\n let that = this;\n return fetch(uri, {\n method: \"GET\",\n headers: { \"content-type\": \"application/json\" },\n })\n .then((response) => response.json())\n .then((response) => {\n that.setState({\n purchaseHistory: response.user_events,\n convenienceCharges: parseFloat(response.convience_charges.transaction_fee || 0.15),\n host_url: response.host_url,\n });\n });\n };\n \n openFileManager = () => {\n this.setState({ isFileManagerOpen: !this.state.isFileManagerOpen });\n this.getPurchaseHistory();\n };\n\n\n getOrderInvoice = (order) => {\n \n \n \n return (\n {\n this.setState({ currentOrder: null, isEditProductClicked: !this.state.isEditProductClicked });\n }}\n >\n
    \n \n Invoice\n \n \n
    \n \n \n \n \n \n \n \n {\" \"}\n \n \n \n {\" \"}\n \n \n \n {\" \"}\n \n \n \n {\" \"}\n \n \n
    \n \n \n \n INVOICE\n \n
    COMPOSZ LLC,Invoice #: INVEVT000{order.id}
    #121 HAUT BRION AVENUEInvoice Date: {order.updated_at}
    NEWARK, DE-19702.\n Invoice Amount:\n {formatCurrency(order.total_amount, 1, \"USD\")} \n {/* {(order.total_amount / 100).toFixed(2)} */}\n
    \n Status: PAID\n
    \n \n BILLED TO\n \n

    \n {order.full_name}\n
    \n {order.email}\n
    \n {order.pg_user_email}\n
    \n {order.address}\n
    \n {/* Bangalore, 560076. */}\n

    \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    DescriptionPriceQuantityAmount
    Wish Collection, Online Services,{formatCurrency(order.price, 1, \"USD\")}{order.no_of_wishers}\n {formatCurrency(order.no_of_wishers * order.price, 1, \"USD\")}\n
    Audio Pictures (.html files)
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    PAYMENT DETAILS
    Paypal Transaction ID: {order.paypal_capture_id}\n Item (s) Subtotal:{\" \"}\n {formatCurrency(order.no_of_wishers * order.price, 1, \"USD\")}\n
    \n Convenience charges ($0.15+3%): {formatCurrency(order.no_of_wishers * order.price * order.pg_transaction_fee + 0.15, 1, \"USD\")}\n {/* {(order.pg_transaction_fee / 100).toFixed(2)} */}\n
    \n Tax to be collected: {formatCurrency(0, 1, \"USD\")}\n {/* ${(order.pg_fixed_fee / 100).toFixed(2)} */}\n
    \n \n GRAND TOTAL: {formatCurrency(order.total_amount, 1, \"USD\")}\n {/* {(order.total_amount / 100).toFixed(2)} */}\n \n
    \n \n \n

    Thanks for your purchase

    \n

    -- team wishcollector

    \n\n

    \n

    \n \n \n \n \n \n \n
    \n wishcollector.com is owned, operated & managed by COMPOSZ LLC\n
    \n
    \n \n
    \n \n {\n this.printDocument(`INVEVT000${order.id}`);\n }}\n >\n Download\n \n {\n this.setState({ isEditProductClicked: !this.state.isEditProductClicked });\n }}\n >\n Cancel\n \n \n
    \n \n );\n };\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n getrazorpayOrderInvoice = (order) => {\n let user = {};\n return (\n \n {\n this.setState({ currentOrder: null, isEditProductClicked: false });\n }}\n >\n
    \n \n Invoice\n \n \n
    \n \n \n \n \n \n \n \n {\" \"}\n \n \n \n {\" \"}\n \n \n \n {\" \"}\n \n \n \n {\" \"}\n \n \n
    \n \n \n \n INVOICE\n \n
    LIFE COLORS,Invoice #: INVEVT000{order.id}
    #9, 4th Cross, Kothanur Main Road,Invoice Date: {order.updated_at}
    Bangalore 560 062.\n Invoice Amount: {\" \"}\n {formatCurrency(order.total_amount, 1, \"INR\")} \n {/* {(order.total_amount / 100).toFixed(2)} */}\n
    GSTIN: 29AUTPB5544P1ZS; GST SAC Code: 998434\n Status: PAID\n
    \n \n BILLED TO\n \n

    \n

    \n {order.user_name}\n

    \n {order.razorpay_capture.email}\n

    \n {order.razorpay_capture.contact}\n
    \n

    \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    DescriptionPriceQuantityAmount
    Wish Collection, Online Services,{formatCurrency(order.price, 1, \"INR\")}{order.no_of_wishers}\n {formatCurrency(order.no_of_wishers * order.price, 1, \"INR\")}\n
    Audio Pictures (.html files)
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    PAYMENT DETAILS
    Razorpay Payment ID: {order.razorpay_capture.id}\n Item (s) Subtotal:{\" \"}\n {formatCurrency(order.no_of_wishers * order.price, 1, \"INR\")}\n
    Payment Mode: {order.razorpay_capture.method} \n {order.razorpay_capture.method == 'netbanking' ? \"-\" + order.razorpay_capture.bank : ''}\n {order.razorpay_capture.method == 'card' ? \"-\" + order.razorpay_capture.card.network + \"-xxxx-\" + order.razorpay_capture.card.last4 : ''}\n {order.razorpay_capture.method == 'upi' ? \"-\" + order.razorpay_capture.vpa + \"-Ph:\" + order.razorpay_capture.acquirer_data.rrn : ''}\n {order.razorpay_capture.method == 'wallet' ? \"-\" + order.razorpay_capture.wallet : ''}\n \n Convenience charges: {formatCurrency(order.no_of_wishers * order.price * order.pg_transaction_fee, 1, \"INR\")}\n {/* {(order.pg_transaction_fee / 100).toFixed(2)} */}\n
    Transaction ID: \n {order.razorpay_capture.method == 'netbanking' ? order.razorpay_capture.acquirer_data.bank_transaction_id : ''}\n {order.razorpay_capture.method == 'card' ? order.razorpay_capture.acquirer_data.auth_code : ''}\n {order.razorpay_capture.method == 'upi' ? order.razorpay_capture.acquirer_data.upi_transaction_id : ''}\n {order.razorpay_capture.method == 'wallet' ? \" N/A\" : ''}\n \n GST 18%: {formatCurrency((order.no_of_wishers * 10.00 + order.no_of_wishers * order.pg_transaction_fee) * 0.18, 1, \"INR\")}\n
    \n \n GRAND TOTAL (rounded): {formatCurrency(order.total_amount, 1, \"INR\")}\n \n
    \n \n

    Thanks for your purchase

    \n

    --team wishcollector

    \n\n

    \n

    \n \n \n \n \n \n \n
    wishcollector.com is owned, operated & managed by LIFE COLORS
    \n \n
    \n \n \n \n
    \n \n {\n this.printDocument(`INVEVT000${order.id}`);\n }}\n >\n Download\n \n {\n this.setState({ isEditProductClicked: false });\n }}\n >\n Cancel\n \n \n
    \n
    \n );\n };\n \n printDocument = (orderId) => {\n const input = document.getElementById(\"divToPrint2\");\n html2canvas(input).then((canvas) => {\n \n const imgData = canvas.toDataURL(\"image/jpeg\");\n const pdf = new jsPDF();\n var width = pdf.internal.pageSize.getWidth();\n var height = pdf.internal.pageSize.getHeight();\n\n \n pdf.addImage(imgData, \"JPEG\", 0, 0, width, height);\n \n //pdf.output('dataurlnewwindow');\n pdf.save(`${orderId}.pdf`);\n \n });\n };\n\n setCookie(cname, cvalue) {\n document.cookie = cname + \"=\" + cvalue + \";\";\n }\n getCookie(cname) {\n let name = cname + \"=\";\n let decodedCookie = decodeURIComponent(document.cookie);\n let ca = decodedCookie.split(';');\n for(let i = 0; i {\n /* Storing user's device details in a variable*/\n let details = navigator.userAgent; \n \n /* Creating a regular expression \n containing some mobile devices keywords \n to search it in details string*/\n let regexp = /android|iphone|kindle|ipad/i; \n \n /* Using test() method to search regexp in details \n it returns boolean value*/\n let isMobileDevice = regexp.test(details); \n \n if (isMobileDevice) { \n this.setState({mobile: true})\n } else { \n this.setState({mobile: false})\n }\n }\n\n\n\n changeColor = () => {\n let colorpicker = document.getElementById('colorpicker');\n this.state.contributes.map( item =>{\n let element = 'myContribute_' + item.id\n //let destColor = document.getElementById('myContribute');\n let destColor = document.getElementById(element);\n // setInterval(()=>{\n let color = colorpicker.value;\n destColor.style.backgroundColor = color;\n // }, 200);\n })\n }\n\n cloneProduct = (event_id, event_type, preset_product_id) => {\n\n let payload = {\n product_id: preset_product_id, \n name: event_id + '_' + event_type,\n cloneType: 'preset',\n };\n let endpoint = ENDPOINTS[\"products\"][\"clone\"];\n let url = endpoint.uri;\n let method = endpoint.method;\n \n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: method,\n body: JSON.stringify(payload),\n });\n return ajaxCall\n .then((response) => {\n return response.json();\n })\n .then((data) => { \n this.updateEventProductIdAfterClone(event_id, data.product.id, 'CLOSED');\n });\n \n }\n\n cloneInvitationProduct = (event_type) => {\n\n let payload = {\n product_id: 142, // hardcoded for Invitation Preset\n name: event_type + '_Invitation',\n cloneType: 'preset',\n };\n let endpoint = ENDPOINTS[\"products\"][\"clone\"];\n let url = endpoint.uri;\n let method = endpoint.method;\n\n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: method,\n body: JSON.stringify(payload),\n async: false,\n });\n return ajaxCall\n .then((response) => {\n return response.json();\n })\n .then((data) => { \n this.getInvitationProducts();\n return data.product.id;\n });\n \n }\n\n\n generateEventFiles = (event_id, event_type, preset_product_id, product_id) => {\n\n // let payload = {\n // product_id: preset_product_id, \n // name: event_id + '_' + event_type,\n // cloneType: 'preset',\n // };\n // let endpoint = ENDPOINTS[\"products\"][\"clone\"];\n // let url = endpoint.uri;\n // let method = endpoint.method;\n \n // let ajaxCall = fetch(url, {\n // headers: {\n // Accept: \"application/json\",\n // \"Content-Type\": \"application/json\",\n // },\n // method: method,\n // body: JSON.stringify(payload),\n // });\n // return ajaxCall\n // .then((response) => {\n // return response.json();\n // })\n // .then((data) => { \n // this.updateEventProductId(event_id, data.product.id, 'CLOSED');\n // });\n\n this.uploadDataStartBatch(event_id, product_id, 'CLOSED');\n\n }\n\n uploadDataStartBatch = (event_id, product_id, status) => {\n\n let formData = new FormData();\n let endpoint = ENDPOINTS.events.update;\n let url = endpoint.uri.replace(\":id\", event_id)\n let method = endpoint.method;\n formData.append(\"product_id\", product_id)\n formData.append(\"event_id\", event_id)\n formData.append(\"status\", status)\n formData.append(\"update_only\", \"N\") // start batch indicator for update method\n \n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n //\"Content-Type\": \"application/json\",\n },\n method: method,\n body: formData,\n });\n return ajaxCall\n .then((response) => response.json())\n .then((data) => { \n if (status === 'CLOSED' && product_id!=0) {\n this.startBatch(event_id, product_id, \"batch_process\");\n ;;\n }\n if (status === 'CLOSED' && product_id ===0) {\n alert('Event closed successfully.\\nProceed to Pay/Reject for extra wishes if any\\nYou can now \"Arrange\" wishes\\nFinally proceed to Generate Event Files');\n window.location.reload()\n }\n });\n }\n\n updateEventProductId = (event_id, product_id, status) => {\n\n let formData = new FormData();\n let endpoint = ENDPOINTS.events.update;\n let url = endpoint.uri.replace(\":id\", event_id)\n let method = endpoint.method;\n formData.append(\"product_id\", product_id)\n formData.append(\"event_id\", event_id)\n formData.append(\"status\", status)\n \n \n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n //\"Content-Type\": \"application/json\",\n },\n method: method,\n body: formData,\n });\n return ajaxCall\n .then((response) => response.json())\n .then((data) => { \n if (status === 'CLOSED' && product_id!=0) {\n this.startBatch(event_id, product_id, \"batch_process\");\n ;;\n }\n if (status === 'CLOSED' && product_id ===0) {\n alert('Event closed successfully.\\nProceed to Pay/Reject for extra wishes if any\\nYou can now \"Arrange\" wishes\\nFinally proceed to Generate Event Files');\n window.location.reload()\n }\n });\n }\n \n updateEventProductIdAfterClone = (event_id, product_id, status) => {\n\n let formData = new FormData();\n let endpoint = ENDPOINTS.events.update;\n let url = endpoint.uri.replace(\":id\", event_id)\n let method = endpoint.method;\n formData.append(\"product_id\", product_id)\n formData.append(\"event_id\", event_id)\n formData.append(\"status\", status)\n formData.append(\"update_only\", \"Y\")\n \n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n //\"Content-Type\": \"application/json\",\n },\n method: method,\n body: formData,\n });\n return ajaxCall\n .then((response) => response.json())\n .then((data) => { \n if (status === 'CLOSED' && product_id!=0) {\n alert (\"Template selection saved successfully\")\n window.location.reload()\n }\n \n });\n }\n\n updateEventPresetProductId = (event_id, preset_product_id) => {\n\n let formData = new FormData();\n let endpoint = ENDPOINTS.events.update;\n let url = endpoint.uri.replace(\":id\", event_id)\n let method = endpoint.method;\n formData.append(\"preset_product_id\", preset_product_id)\n formData.append(\"event_id\", event_id)\n \n \n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n //\"Content-Type\": \"application/json\",\n },\n method: method,\n body: formData,\n });\n return ajaxCall\n .then((response) => {\n alert (\"Template selection saved successfully\")\n window.location.reload()\n // return response.json()\n })\n .catch((error) => {\n throw error;\n }); \n \n }\n\n updateEventPresetProductIdAndCloneProduct = (event_id, event_type, preset_product_id, existing_product_id) => {\n\n let formData = new FormData();\n let endpoint = ENDPOINTS.events.update;\n let url = endpoint.uri.replace(\":id\", event_id)\n let method = endpoint.method;\n formData.append(\"preset_product_id\", preset_product_id)\n formData.append(\"event_id\", event_id)\n formData.append(\"existing_product_id\", existing_product_id)\n \n \n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n //\"Content-Type\": \"application/json\",\n },\n method: method,\n body: formData,\n });\n return ajaxCall\n .then((response) => {\n this.cloneProduct (event_id, event_type, preset_product_id)\n // alert (\"Template selection saved successfully\")\n // window.location.reload()\n // return response.json()\n })\n .catch((error) => {\n throw error;\n }); \n \n }\n\n \n updateCounts = (event_id, extraWishers) => {\n\n let formData = new FormData();\n let endpoint = ENDPOINTS.events.update;\n let url = endpoint.uri.replace(\":id\", event_id)\n let method = endpoint.method;\n formData.append(\"extraWishers\", extraWishers)\n formData.append(\"event_id\", event_id)\n \n \n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n //\"Content-Type\": \"application/json\",\n },\n method: method,\n body: formData,\n });\n return ajaxCall\n .then((response) => {\n if (extraWishers===0)\n alert (\"Deleted successfully. Proceed to Generate Event Files\")\n window.location.reload()\n // return response.json()\n })\n .catch((error) => {\n throw error;\n }); \n \n }\n\n\n startBatch = (event_id, product_id, productState) => {\n \n let endpoint = ENDPOINTS.products.update;\n let url = endpoint.uri;\n let method = endpoint.method;\n \n let payload = {product_state: productState,}\n let ajaxCall = fetch(url + product_id, {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: method,\n body: JSON.stringify(payload),\n });\n return ajaxCall\n .then((response) => {\n if (productState === \"batch_process\") {\n this.updateEventProductId(event_id, product_id, 'BATCH');\n alert(\"Your request is received, queued and will be serviced at the earliest\\nCheck back in few minutes for Files Generation Completion...\");\n window.location.reload();\n }\n })\n .catch((error) => {\n throw error;\n });\n };\n\n\n showInvoices = (event_id) => {\n this.getPurchaseHistory(event_id)\n this.setState({isFileManagerOpen: true})\n }\n\n \n\n checkBatch = (event_id, product_id) => {\n \n let endpoint = ENDPOINTS.events.batch_status;\n let url = endpoint.uri.replace(\":product_id\", product_id);\n let method = endpoint.method;\n let ajaxCall = fetch(url , {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: method,\n });\n return ajaxCall\n .then((response) => response.json())\n .then((data) => { \n if (data.product_state != \"completed\") {\n alert (\"Event Files generation still in progress...\\nCheck back again in a few moments...\")\n }\n if (data.product_state === \"completed\") {\n this.updateEventProductId(event_id, product_id, 'DOWNLOAD');\n alert (\"Event Files generation Completed.\\nProceed to Download files immediately.\")\n window.location.reload();\n }\n \n });\n };\n\n \n\n getEventsfromDB = () => {\n let events_uri = ENDPOINTS.events.list.uri;\n var user_id = this.props.user_id;\n \n var where = \"user_id=\" + user_id;\n var where = \"\"\n \n events_uri = `${events_uri}?${where}`;\n \n let noRecords;\n \n noRecords = fetch(events_uri, {\n method: \"GET\", headers: { \"content-type\": \"application/json\" }, \n })\n .then((response) => response.json())\n .then((data) => { \n this.setState({events: data.events, presetFolders: data.preset_folders});\n //#populate event_type presets (hard coded for now)\n data.preset_folders.map((folder, index) => {\n if (folder[0]===\"birthday\") {\n let fileName = folder[1]\n fileName = fileName.split('public/')[1]\n this.state.birthday_uniqueImages.push(fileName)\n }\n if (folder[0]===\"wedding\") {\n let fileName = folder[1]\n fileName = fileName.split('public/')[1]\n this.state.wedding_uniqueImages.push(fileName)\n }\n })\n\n //set default event_image\n this.setState({event_image: this.state.wedding_uniqueImages[0]})\n });\n \n\n }\n\n getContributions = (event_id, sortFlg) => {\n\n let template_url = \"/api/contributes?event_id=:event_id\"\n template_url = template_url.replace(\":event_id\", event_id);\n\n if (sortFlg) {\n template_url = template_url + '&&sort=true'\n }\n \n let noRecords;\n \n noRecords = fetch(template_url, {\n method: \"GET\", headers: { \"content-type\": \"application/json\" }, \n })\n .then((response) => response.json())\n .then((data) => { \n this.setState({contributes: data.contributes});\n if (sortFlg) this.setDrag()\n });\n\n }\n\n getInvitationProducts = () => {\n let template_url = \"/productid\"\n let ajaxCall = fetch(template_url, {\n method: \"GET\", \n headers: {\n //Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n })\n .then((response) => response.json())\n .then((data) => { \n this.setState({invitationProducts: data.products});\n });\n }\n\n\n getPresetEvents = () => {\n let template_url = \"/presetsevents\"\n let noRecords;\n noRecords = fetch(template_url, {\n method: \"GET\", headers: { \"content-type\": \"application/json\" }, \n })\n .then((response) => response.json())\n .then((data) => { \n this.setState({presetTemplates: data.presets});\n });\n }\n\n getEventPictures = (event_id, img_url, create_flg) => {\n let payload = {\n event_id: event_id,\n img_url: img_url,\n create_flg: create_flg,\n }\n let template_url = \"/eventpictures\"\n template_url = template_url + \"?event_id=\" + event_id + '&&img_url='+img_url + '&&create_flg=' + create_flg\n let noRecords;\n let ajaxCall = fetch(template_url, {\n method: \"GET\", \n headers: {\n //Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n })\n .then((response) => response.json())\n .then((data) => { \n this.setState({no_of_pages: data.no_of_pages, eventPictures: data.eventFiles})\n });\n }\n\n \n getEventImage = (event_id, img_url) => {\n let template_url\n let that = this;\n \n template_url = ENDPOINTS.eventfiles.index;\n template_url = template_url.replace(\":event_id\", event_id).replace(\":img_url\", img_url)\n return fetch(uri, {\n method: \"GET\",\n headers: { \"content-type\": \"application/json\" },\n })\n .then((response) => response.json())\n .then((response) => {\n that.setState({\n img_url: response.file_name,\n file: response.file\n })\n })\n\n }\n\n\n\n\n deleteEvent = (event_id) => {\n \n let endpoint, url\n let formData = new FormData();\n \n endpoint = ENDPOINTS.events.delete;\n url = endpoint.uri.replace(\":event_id\", event_id)\n formData.append(\"event_id\", event_id)\n let method = endpoint.method;\n\n let $ajax = $.ajax({\n url: url,\n type: \"POST\",\n method: \"DELETE\",\n data: formData,\n processData: false,\n contentType: false,\n async: false,\n });\n $ajax.done(function () {\n alert(\"Successfully, Deleted Event\");\n return;\n });\n $ajax.fail(function (data, status) {\n ;;\n //alert(\"Delete failed!\");\n });\n\n this.setState({del_flg: false})\n window.location.reload();\n \n } // deleteEvent\n\n\n _handleValidSubmit = (e) => {\n\n e.preventDefault();\n e.stopPropagation();\n\n //if (getRecordingState()) return\n //if (this.state.recording) {\n if (getRecordingState()) {\n alert (\"Recording in progress!\\n Stop Recording befor proceeding...\")\n return false\n }\n \n let videoElement = document.getElementById(\"videoRecorded\");\n if (videoElement.src === '') {\n let proceed = confirm(\"No Video Invite Recorded.\\nClick 'Cancel' to record Video Invite.\\nClick 'Ok' to proceed without Video Invite\")\n if (!proceed) {\n return false\n }\n }\n\n \n\n if (getRecordingState()) return\n\n let formData = formDataToJSON(new FormData(e.target));\n\n let endpoint, url\n if (!this.state.edit_flg && !this.state.del_flg){\n endpoint = ENDPOINTS.events.create;\n url = endpoint.uri;\n formData.status = 'CREATE';\n }\n if (this.state.edit_flg) {\n endpoint = ENDPOINTS.events.update;\n url = endpoint.uri\n formData.event_id = this.state.event_id;\n }\n \n let method = endpoint.method;\n\n if (formData.img_url.name === \"\" || this.state.img_url === \"\") {\n formData.img_url = this.state.event_image.split('/').pop().toLowerCase()\n }\n else {\n formData.img_url = formData.img_url.name.toLowerCase();\n }\n\n formData.event_image = this.state.event_image\n \n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: method,\n body: JSON.stringify(formData),\n });\n return ajaxCall\n .then((response) => response.json())\n .then((data) => { \n this.setState({event_id: data});\n let vidblob\n if (this.state.vidFlg || this.state.uploadVidFlg) {\n let recVidTime = get_Time()\n if (recVidTime === 'none' || this.state.updVidTime > recVidTime) {\n vidblob = this.state.uploadedVideo \n }\n else{\n vidblob = get_Blob()\n }\n }\n \n if ( (this.state.vidFlg || this.state.uploadVidFlg) && vidblob != 'noVideo') {\n let spinner=document.getElementById(\"mySpinner\") \n spinner.style.display=\"\"\n let vid_fileName = this.state.event_id + '.mp4'\n this.save_video_Recording(vidblob, data, vid_fileName)\n }\n else \n this.closeModal();\n\n \n });\n \n }\n\n save_video_Recording = (blob, event_id, recorded_video_file) => {\n //let uri = \"/api/savecontribute_audio?event_id=\"+event_id+\"&recorded_audio_file=\" + recorded_audio_file\n \n let template_url = \"/api/savecontribute_audio?event_id=:event_id&recorded_video_file=:filename\"\n template_url = template_url.replace(\":event_id\", event_id).replace(\":filename\", recorded_video_file);\n let status = ''\n fetch(template_url, {\n method: \"POST\",\n body: blob,\n header: {\"Content-Type\": 'video/webm', \"Accept\":'video/webm'},\n })\n .then((response) => response.json())\n .then((response) => {\n \n if (response.data===\"available\") {\n //alert(\"Video successfully saved\")\n }\n else {\n //alert(\"Save of Video recording failed. Kindly Record again.\")\n }\n this.closeModal()\n });\n }\n\n save_user_event_image = (event_id, file, file_name, copyTerm) => {\n let template_url = \"/api/saveevent_image?event_id=:event_id&&event_image_file=:filename&&user=true&©Term=:copyTerm\"\n template_url = template_url.replace(\":event_id\", event_id).replace(\":filename\", file_name).replace(\":copyTerm\", copyTerm);\n \n let formData = new FormData();\n formData.append(\"file\", file)\n \n let $ajax = $.ajax({\n url: template_url,\n type: \"POST\",\n method: \"POST\",\n data: formData,\n processData: false,\n contentType: false,\n });\n $ajax.done(function () {\n //alert(\"Successfully, Uplaoded image\");\n });\n $ajax.fail(function () {\n alert(\"Save of image failed!\");\n });\n }\n\n \n save_event_image = () => {\n let template_url = \"/api/saveevent_image?event_id=:event_id&&event_image_file=:filename\"\n template_url = template_url.replace(\":event_id\", this.state.event_id).replace(\":filename\", this.state.img_url);\n\n let formData = new FormData();\n formData.append(\"file\", this.state.file)\n \n let $ajax = $.ajax({\n url: template_url,\n type: \"POST\",\n method: \"POST\",\n data: formData,\n processData: false,\n contentType: false,\n });\n $ajax.done(function () {\n alert(\"Successfully, Uploaded image\");\n });\n $ajax.fail(function () {\n //alert(\"Save of image failed!\");\n });\n }\n\n closeModal = () => {\n\n if (this.state.user_file) {\n this.save_event_image()\n //this.setState({user_file: false})\n }\n\n let spinner=document.getElementById(\"mySpinner\") \n spinner.style.display=\"none\"\n\n if (this.state.edit_flg) \n alert(\"Event Saved successfully\")\n else\n alert(\"Event Saved successfully\\nProceed to Pay for the Event.\")\n\n // this.setState({ \n // isCreatingEvent: false,\n // user_file: false,\n // event_id: \"\", \n // event_image: \"\", \n // event_type: \"Wedding\", \n // title: \"\", \n // file: \"\", \n // img_url: \"\", \n // event_dt: \"\", \n // prepaid_ct: 0, \n // edit_flg: false, \n // del_flg: false, \n // bride: \"\", \n // bridegroom: \"\", \n // bday_name: \"\", \n // vidFlg: false\n // })\n \n window.location.reload();\n }\n\n\n toggleImageEditor = (val) => {\n if (!val) {\n this.setState({ showImageEditor: null });\n document.querySelector(\"#manage_image_editor\").classList.remove(\"show_editor\");\n } else {\n if (val.name.split(\".\").pop() !== \"svg\") {\n document.querySelector(\".modal\").removeAttribute(\"tabindex\");\n document.querySelector(\"#manage_image_editor\").classList.add(\"show_editor\");\n this.setState({ showImageEditor: val });\n setTimeout(() => {\n this.initializeEditor();\n }, 100);\n } else {\n alert(\"Can't edit the svg images\");\n }\n }\n };\n \n initializeEditor = () => {\n let refInstance = this.editorRef.current.getInstance();\n // Changing buttons\n $(\".tui-image-editor-header-logo\").replaceWith(\"\");\n $(\".tui-image-editor-header-buttons\").replaceWith(\n `
    \n \n \n
    `\n );\n \n if (!$(\".tie-btn-filter\").html()) {\n const filterBtn = `
  • \n \"Filter\"\n
  • \n `;\n $(\".tui-image-editor-menu\").prepend(filterBtn);\n $(\".tie-btn-filter\").bind(\"click\", this.onFilterSelect);\n }\n \n refInstance.loadImageFromURL(this.state.showImageEditor.image, \"Adukku image\").then(() => {\n refInstance.ui.activeMenuEvent();\n \n $(\".image_editor_file_name\").remove();\n // $(\".tui-image-editor-header\").append(\n // `

    ${this.state.showImageEditor.name}

    `\n // );\n \n if (!$(\".preset-fixed\").html()) {\n const fixedCrop = `
    \n
    \n
    \n
    \n \n
    `;\n $(\".tie-crop-preset-button\").append(fixedCrop);\n }\n this.bindActions();\n });\n \n refInstance.on(\"objectScaled\", () => {\n if (inputWidth && inputHeight) {\n this.customImageSizing();\n }\n });\n };\n \n bindActions = () => {\n $(\".tie-btn-crop\").bind(\"mousedown\", this.onCropSelect);\n $(\".tui-image-editor-close-btn\").bind(\"click\", this.onClose);\n $(\".tui-image-editor-save-btn\").bind(\"click\", this.onSave);\n $(\".preset-fixed\").bind(\"click\", this.onClickFix);\n $(\".preset-none\").bind(\"click\", this.onClickCustom);\n $(\".preset-square\").bind(\"click\", this.onClickSq);\n $(\".preset-3-2\").bind(\"click\", this.onClick32);\n $(\".preset-4-3\").bind(\"click\", this.onClick43);\n $(\".preset-5-4\").bind(\"click\", this.onClick54);\n $(\".preset-7-5\").bind(\"click\", this.onClick75);\n $(\".preset-16-9\").bind(\"click\", this.onClick169);\n };\n \n unBindActions = () => {\n $(\".tie-btn-crop\").unbind(\"mousedown\", this.onCropSelect);\n $(\".tui-image-editor-close-btn\").unbind(\"click\", this.onClose);\n $(\".tui-image-editor-save-btn\").unbind(\"click\", this.onSave);\n $(\".preset-fixed\").unbind(\"click\", this.onClickFix);\n $(\".preset-none\").unbind(\"click\", this.onClickCustom);\n $(\".preset-square\").unbind(\"click\", this.onClickSq);\n $(\".preset-3-2\").unbind(\"click\", this.onClick32);\n $(\".preset-4-3\").unbind(\"click\", this.onClick43);\n $(\".preset-5-4\").unbind(\"click\", this.onClick54);\n $(\".preset-7-5\").unbind(\"click\", this.onClick75);\n $(\".preset-16-9\").unbind(\"click\", this.onClick169);\n };\n \n addCropFields = () => {\n const customCrop = `
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    `;\n if (!$(\"#crop_fields_1\").html()) {\n $(\".tie-crop-preset-button\").append(customCrop);\n inputWidth = document.querySelector(\"#tui_widt_1\");\n inputHeight = document.querySelector(\"#tui_heig_1\");\n inputWidth.oninput = this.updatingWidth;\n inputHeight.oninput = this.updatingHeight;\n }\n };\n \n \n removeCropFields = () => {\n if ($(\".custom-crop-container\").html()) {\n $(\".custom-crop-container\").remove();\n }\n };\n \n removeNotWorkingFilters = () => {\n const filterParent = document.querySelector(\".tui-image-editor-menu-filter\");\n const middleFilter = document.querySelectorAll(\".tui-image-editor-submenu-align\");\n const lines = filterParent.querySelectorAll(\".tui-image-editor-partition\");\n if (middleFilter.length === 3) {\n $(\".tui-image-editor-submenu-align\").eq(1).remove();\n $(\".tui-image-editor-submenu-align\").eq(1).remove();\n }\n if (lines.length === 3) {\n $(\".tui-image-editor-menu-filter .tui-image-editor-partition\").eq(0).remove();\n }\n };\n \n onCropSelect = () => {\n $(\".tie-btn-filter\").removeClass(\"active\");\n $(\".filter_image\").addClass(\"filter_filter\");\n this.removeCropFields();\n this.removeFilters();\n // setTimeout(() => {\n // let refInstance = this.editorRef.current.getInstance();\n // refInstance.setCropzoneRect(1);\n // }, 1000);\n };\n \n \n onFilterSelect = () => {\n this.removeCropFields();\n if ($(\".tie-btn-crop\").hasClass(\"active\")) {\n $(\".tie-btn-crop\").trigger(\"click\");\n }\n $(\".tui-image-editor-item\").removeClass(\"active\");\n $(\".tie-btn-filter\").addClass(\"active\");\n $(\".filter_image\").removeClass(\"filter_filter\");\n this.addFilterFields();\n // this.removeNotWorkingFilters();\n };\n \n onClickFix = () => {\n this.addCropFields();\n setTimeout(() => {\n let refInstance = this.editorRef.current.getInstance();\n refInstance.setCropzoneRect(1);\n this.initializeSizeCal();\n }, 500);\n };\n \n onClickCustom = () => {\n // setTimeout(() => {\n // let refInstance = this.editorRef.current.getInstance();\n // refInstance.setCropzoneRect(1);\n // }, 500);\n this.removeCropFields();\n };\n \n onClickSq = () => {\n this.removeCropFields();\n };\n \n onClick32 = () => {\n this.removeCropFields();\n };\n \n onClick43 = () => {\n this.removeCropFields();\n };\n \n onClick54 = () => {\n this.removeCropFields();\n };\n \n onClick75 = () => {\n this.removeCropFields();\n };\n \n onClick169 = () => {\n this.removeCropFields();\n };\n \n addFilterFields = () => {\n if (!$(\".tui-image-editor-menu-filter\").html()) {\n $(\".tui-image-editor-submenu\").css({ display: \"table\" });\n const filFields = `\n
    \n
      \n
    • \n
      \n \n \n \n \n
      \n
    • \n
    • \n
      \n
      \n \n
      \n \n
      \n
      \n
      \n
    • \n
    \n
    \n `;\n $(\".tui-image-editor-submenu\").append(filFields);\n const imageRef = this.editorRef.current.getInstance();\n $inputCheckSepia = $(\".sepia_check\");\n $inputCheckSepia2 = $(\".sepia2_check\");\n $inputCheckSharpen = $(\".sharpen_check\");\n $inputCheckGrayscale = $(\".gray_check\");\n $inputCheckBrightness = $(\".brightness_check\");\n $inputSlideBrightness = $(\"#brightness_check\");\n \n $inputCheckSepia.on(\"change\", (e) => {\n if (e.target.checked) {\n imageRef.applyFilter(\"Sepia\");\n } else {\n imageRef.removeFilter(\"Sepia\");\n }\n });\n $inputCheckSepia2.on(\"change\", (e) => {\n if (e.target.checked) {\n imageRef.applyFilter(\"vintage\");\n } else {\n imageRef.removeFilter(\"vintage\");\n }\n });\n $inputCheckSharpen.on(\"change\", (e) => {\n if (e.target.checked) {\n imageRef.applyFilter(\"Sharpen\");\n } else {\n imageRef.removeFilter(\"Sharpen\");\n }\n });\n $inputCheckGrayscale.on(\"change\", (e) => {\n if (e.target.checked) {\n imageRef.applyFilter(\"Grayscale\");\n } else {\n imageRef.removeFilter(\"Grayscale\");\n }\n });\n $inputCheckBrightness.on(\"change\", (e) => {\n if (e.target.checked) {\n $(\"#brightness_check\").removeClass(\"disabled\");\n imageRef.applyFilter(\"brightness\", {\n brightness: parseInt($inputSlideBrightness.val(), 10) / 255,\n });\n } else {\n $(\"#brightness_check\").addClass(\"disabled\");\n imageRef.removeFilter(\"brightness\");\n }\n });\n $inputSlideBrightness.on(\"input\", (e) => {\n imageRef.applyFilter(\"brightness\", {\n brightness: parseInt(e.target.value, 10) / 255,\n });\n });\n }\n };\n \n removeFilters = () => {\n if ($(\".tui-image-editor-menu-filter\").html()) {\n $(\".tui-image-editor-menu-filter\").remove();\n }\n };\n \n initializeSizeCal = () => {\n document.querySelector(\".preset-fixed\").classList.add(\"active\");\n this.customImageSizing();\n };\n \n updatingWidth = (e) => {\n if (parseInt(e.data) >= 0 && parseInt(e.data) <= 9) {\n inputWidth.value = e.target.value;\n const imageRef = this.editorRef.current.getInstance();\n imageRef.setCropzoneRect(inputWidth.value / inputHeight.value);\n }\n };\n \n updatingHeight = (e) => {\n if (parseInt(e.data) >= 0 && parseInt(e.data) <= 9) {\n inputHeight.value = e.target.value;\n const imageRef = this.editorRef.current.getInstance();\n imageRef.setCropzoneRect(inputWidth.value / inputHeight.value);\n }\n };\n \n customImageSizing = () => {\n const imageRef = this.editorRef.current.getInstance();\n let imageMode = imageRef.getDrawingMode();\n if (imageMode === \"CROPPER\") {\n let imgCrop = imageRef.getCropzoneRect();\n if (imgCrop.width == 0.5 && imgCrop.height == 0.5) {\n let imageCanvs = imageRef.getCanvasSize();\n inputWidth.value = imageCanvs.width.toFixed(2);\n inputHeight.value = imageCanvs.height.toFixed(2);\n } else {\n inputWidth.value = imgCrop.width.toFixed(2);\n inputHeight.value = imgCrop.height.toFixed(2);\n }\n }\n };\n \n onClose = () => {\n this.unBindActions();\n this.removeCropFields();\n $(\".preset-fixed\").remove();\n $(\".image_editor_file_name\").remove();\n this.toggleImageEditor(null);\n };\n \n onSave = async () => {\n let spinner=document.getElementById(\"mySpinner\") \n spinner.style.display=\"\"\n //const extension = this.state.showImageEditor.image.split(\".\").pop().split(\"?\")[0];\n const extension = this.state.showImageEditor.name.split(\".\")[1];\n const imageRef = this.editorRef.current.getInstance();\n let metadata = `image/${extension}`;\n const dataURL = imageRef.toDataURL(metadata, 1);\n let file = await this.dataURLtoFile(dataURL, this.state.showImageEditor.name, metadata);\n this.save_contribute_image(file);\n this.onClose();\n };\n \n save_contribute_image = (file) => {\n let fileExt = file.name.split('.')[1].toLowerCase()\n \n let img_fileName = this.state.showImageEditor.name\n\n let template_url = \"/api/savecontribute_image?event_id=:event_id&contribute_image_file=:filename\"\n template_url = template_url.replace(\":event_id\", this.state.event_id).replace(\":filename\", img_fileName);\n \n let formData = new FormData();\n formData.append(\"file\", file)\n \n var element = `contributeImage_${this.state.showImageEditor.name.split('.')[0]}`\n var elementSrc = `uploads/events/${this.state.event_id}/contributes/${this.state.showImageEditor.name}` \n \n $.ajax({\n url: template_url,\n type: \"POST\",\n method: \"POST\",\n data: formData,\n processData: false,\n contentType: false,\n }).then(function (data) {\n if (data.message == \"Image saved\") {\n let spinner=document.getElementById(\"mySpinner\") \n spinner.style.display=\"none\"\n alert(\"Image saved\")\n var imgElement = document.getElementById(`${element}`)\n //imgElement.src = elementSrc\n var imageHash = Date.now()\n imgElement.src = `${elementSrc}?${imageHash}`\n }\n else {\n alert(\"Image not saved\\nTry again.\")\n }\n });\n }\n\n dataURLtoFile = async (dataurl, filename, metadata) => {\n let response = await fetch(dataurl);\n let data = await response.blob();\n let bgImgFile = new File([data], filename, { type: metadata });\n return bgImgFile;\n };\n \n \n\n\n\n\n\n\n\n render() {\n \n let list\n let nolist\n let c_list\n\n if (this.state.events.length > 0) {\n if (this.state.mobile){\n list = this.state.events.map( item =>{\n\n return (\n \n
    \n

    {item.title}

    \n \"\"\n {item.video?\n \n : ''} \n
    \n \n { item.event_type === \"Wedding\" || item.event_type === \"Anniversary\" || item.event_type === \"Engagement\"?\n {item.bride}\n :\n ''\n }\n

    \n { item.event_type === \"Wedding\" || item.event_type === \"Anniversary\" || item.event_type === \"Engagement\"?\n {item.bridegroom}\n :\n ''\n }\n \n { item.event_type != \"Wedding\" && item.event_type != \"Anniversary\" && item.event_type != \"Engagement\"?\n Name: {item.bday_name}\n :\n ''\n }\n \n

    \n Date: {item.event_dt}\n

    \n

    \n\n\n {item.status === 'CREATE'?\n \n : \n ''\n }\n\n {item.status === 'ACTIVE' || item.status === 'CREATE'?\n \n \n \n \n\n \n \n\n \n {item.status != 'CREATE'? \n // \n \n \n \n : ''}\n \n : ''}\n\n {item.status !== 'CREATE'?\n \n \n\n {item.status == 'ACTIVE'? \n \n : ''}\n \n : ''}\n\n {item.status === 'ACTIVE'?\n \n : ''}\n\n {item.status === 'CLOSED'?\n \n : ''}\n\n {item.status === 'CLOSED' && item.prepaid_ct === item.postpaid_ct?\n \n \n\n {item.preset_product_id != null?\n \n :\n \n }\n\n {item.product_id != null && item.product_id != 0?\n \n :\n \n }\n\n {item.preset_product_id != null?\n \n :\n \n }\n \n\n : \n \n {item.status===\"CLOSED\"?\n \n :''}\n \n }\n \n {item.status === 'BATCH' ?\n \n : ''}\n\n {item.status === 'DOWNLOAD' ?\n \n \n \n {\" \"}\n \n : ''}\n\n {item.status != 'CREATE' ?\n\n \n : ''}\n\n\n

    \n

    \n
    \n
    \n \n )\n })\n }\n else {\n list = this.state.events.map( item =>{\n\n return (\n
    \n
    \n
    \n \"\"{window.open(`uploads/events/${item.id}/pictures/`+item.img_url, \"_blank\")}}\n style={{cursor: 'pointer'}}\n />\n {item.video?\n \n : ''} \n\n
    \n

    {item.title}

    \n { item.event_type === \"Wedding\" || item.event_type === \"Anniversary\" || item.event_type === \"Engagement\"?\n

    {item.bride}

    \n :\n ''\n }\n \n { item.event_type === \"Wedding\" || item.event_type === \"Anniversary\" || item.event_type === \"Engagement\"?\n

    {item.bridegroom}

    \n :\n ''\n }\n \n { item.event_type != \"Wedding\" && item.event_type != \"Anniversary\" && item.event_type != \"Engagement\"?\n

    Name: {item.bday_name}

    \n :\n ''\n }\n

    Date: {item.event_dt}

    \n
    \n
    \n\n {item.status === 'CREATE'?\n \n : \n ''\n }\n\n {item.status === 'ACTIVE' || item.status === 'CREATE'?\n \n \n \n\n \n \n\n {item.status != 'CREATE'? \n \n // \n \n \n \n : ''} \n \n : ''} \n\n {item.status != 'CREATE'?\n \n \n\n {item.status == 'ACTIVE'? \n \n :''} \n \n : \n ''\n }\n\n {item.status === 'ACTIVE'?\n \n : ''}\n\n {item.status === 'CLOSED'?\n \n \n : ''}\n \n {item.status === 'CLOSED' && item.prepaid_ct === item.postpaid_ct?\n \n \n\n {item.preset_product_id!=null? \n \n :\n \n }\n\n {item.product_id!=null && item.product_id !=0 ? \n \n :\n \n }\n\n {item.preset_product_id!=null? \n \n :\n \n }\n \n\n\n : \n \n {item.status===\"CLOSED\"?\n \n :''}\n \n }\n\n {item.status === 'BATCH' ?\n \n : ''}\n \n {item.status === 'DOWNLOAD' ?\n \n \n \n {\" \"}\n \n : ''}\n\n {item.status != 'CREATE' ?\n\n \n : ''}\n\n \n\n
    \n
    \n // \n )\n })\n }\n }\n else {\n nolist = [\"No Events Found! Create a New Event now!\"]\n }\n\n const occassions = ['Wedding' , 'Birthday', 'Anniversary'];\n\n \n //const convenienceCharges = .05;\n const convenienceCharges = this.countryCode!==\"IN\" ? 0.03 : 0.05;\n const gst = 0.18;\n\n return (\n \n\n\n {this.setState({ isPaymentModal: false })}}>\n \n Purchase Event\n \n \n
      \n {this.countryCode!==\"IN\"?\n \n
    • \n \n Total Price for {this.state.prepaid_ct} Wishes: {formatCurrency(this.state.prepaid_ct * this.state.price, 1, \"USD\")}\n {/* ${parseFloat(this.state.prepaid_ct * this.state.price).toFixed(2)} */}\n \n \n
    • \n
    • \n \n Convenience Charges ($0.15+3%): $\n {parseFloat(this.state.prepaid_ct * this.state.price * convenienceCharges + (0.15)).toFixed(2)}\n \n
    • \n
    • \n \n TAX : $0.0\n \n
    • \n
    • \n Grand Total: $ {(((this.state.prepaid_ct * this.state.price + this.state.prepaid_ct * this.state.price * convenienceCharges + (0.15)))).toFixed(2)}\n
    • \n
      \n :\n \n
    • \n \n Total Price for {this.state.prepaid_ct} Wishes: {formatCurrency(this.state.prepaid_ct * this.state.price, 1, \"INR\")}\n {/* ₹{parseFloat(this.state.prepaid_ct * this.state.price).toFixed(2)} */}\n \n
    • \n
    • \n \n Convenience Charges : ₹\n {parseFloat(this.state.prepaid_ct * this.state.price * convenienceCharges).toFixed(2)}\n \n
    • \n
    • \n \n GST 18% : ₹\n {parseFloat((this.state.prepaid_ct * this.state.price + this.state.prepaid_ct * this.state.price * convenienceCharges) * gst).toFixed(2)}\n \n
    • \n
    • \n Grand Total (rounded): ₹ {Math.round(((this.state.prepaid_ct * this.state.price + this.state.prepaid_ct * this.state.price * convenienceCharges))+(this.state.prepaid_ct * this.state.price + this.state.prepaid_ct * this.state.price * convenienceCharges) * gst).toFixed(2)}\n
    • \n
      \n }\n \n
    \n {this.countryCode!==\"IN\"?\n \n {this.state.extraWishers > 0?\n \n :\n \n }\n \n :\n \n {this.state.extraWishers > 0?\n \n : \n \n }\n \n }\n {/* */}\n
    \n
    \n \n\n
      \n \n \n Event Purchases\n \n \n {this.state.purchaseHistory && this.state.purchaseHistory.length > 0 && (\n \n \n \n \n \n \n \n \n { this.state.mobile?\n ''\n :\n \n \n \n \n }\n \n \n \n \n {this.state.purchaseHistory &&\n this.state.purchaseHistory.map((event) => {\n return (\n \n \n \n { this.state.mobile?\n ''\n :\n \n \n {this.countryCode!==\"IN\"?\n \n :\n \n }\n \n }\n \n \n );\n })}\n \n
      Purchase Event - History
      Event IDNo of WishesPurchased OnPayment ID
      {event.event_id}{event.no_of_wishers}{`${new Date(event.purchased_on).toLocaleString()}`}{event.pg_reference_id}{event.razorpay_capture.id}\n \n
      \n \n
      \n )}\n
      \n
      \n {this.state.isEditProductClicked && (this.countryCode!==\"IN\"?this.getOrderInvoice(this.state.currentOrder):this.getrazorpayOrderInvoice(this.state.currentOrder))}\n
    \n \n\n\n\n {this.setState({ isExtraPayingEvent: false })}}\n style={{marginTop:'45px', }}\n >\n \n \n Manage Additional Wishes\n \n \n

    No. of Wishes already Paid for : {this.state.prepaid_ct}

    \n

    No. of Collected Wsihes : {this.state.postpaid_ct}

    \n

    No. of Additional Wsihes : {(this.state.postpaid_ct - this.state.prepaid_ct)}

    \n \n {this.countryCode!=='IN'?\n

    Price for each 'Additional Wish' : $0.15

    \n :\n

    Price for each 'Additional Wish' : ₹15

    \n }\n\n\n
    \n \n\n \n\n \n

    Choose your option below:

    \n

    Pay for Additional Wishes : \n {\n var divId = document.getElementById(\"payExtra\")\n divId.style.display=\"\"\n var divId1 = document.getElementById(\"payNothing\")\n divId1.style.display=\"none\"\n }} \n inline>\n \n

    \n \n \n

    Delete All Additional Wishes : \n {\n var divId = document.getElementById(\"payExtra\")\n divId.style.display=\"none\"\n var divId1 = document.getElementById(\"payNothing\")\n divId1.style.display=\"\"\n }} \n inline>\n \n

    \n \n \n
    \n
    \n

    \n

    \n {\n this.setState({ [name]: value });\n }}\n onBlur={({ target: { name, value } }) => {\n if (value < 1) {\n alert(\"Value cannot be less than 1. Updated to 1\")\n //value={(Math.trunc((this.state.postpaid_ct - this.state.prepaid_ct)/20)+1)*20}\n //value=((Math.trunc(value/20)+1)*20)\n this.setState({ [name]: 1 });\n return \n }\n if (value > (this.state.postpaid_ct - this.state.prepaid_ct)) {\n alert (\"Value above Maximum value of \" + (this.state.postpaid_ct - this.state.prepaid_ct)) \n this.setState({ \n extraWishes: ((this.state.postpaid_ct - this.state.prepaid_ct)) \n })\n value=this.state.postpaid_ct - this.state.prepaid_ct\n return \n }\n \n }}\n value={this.state.extraWishers}\n >\n \n\n \n
    \n\n
    \n

    \n

    \n {this.state.mobile?\n \n :\n \n }\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n \n {/* */}\n \n
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n {this.setState({ isPayingEvent: false })}}\n style={{marginTop:'45px', }}\n >\n \n \n Event Payment\n \n \n

    Note:

    \n

    \n - You can invite many Wishers to record their wishes/messages for your event\n



    \n - Price per Wish is {this.countryCode!==\"IN\"? '$0.10' : '₹10'}\n



    \n - Choose your Wish counts wisely! \n



    \n     - as there is no REFUND once payment is made\n

    \n     - price per extra Wish will be {this.countryCode!==\"IN\"? '$0.15' : '₹15'} \n

    \n         - you can pay for the extra wishes later\n

    \n         - or you can reject the extra wishes \n

    \n         - minimum number of wish count is 20 \n

    \n\n
    \n \n {\n this.setState({ [name]: value });\n }}\n onBlur={({ target: { name, value } }) => {\n if (value < 20) {\n alert(\"Minimum wish count is 20\")\n this.setState({ [name]: 20 });\n // return false\n }\n }}\n \n >\n \n\n \n\n \n\n \n {/* */}\n \n
    \n
    \n\n\n {this.setState({ isCreatingEvent: false })}}\n style={{marginTop:'45px', }} \n >\n \n \n {this.state.edit_flg?\n \"Edit Event\"\n :\n \"Create New Event\"\n }\n \n \n\n
    \n \n {\n this.setState({ [name]: value });\n var output = document.getElementById('output');\n\n var pfImage = this.presetFoldersindexOf(this.state.presetFolders, value).split('public/')[1]\n this.setState({ \n img_url: '',\n file: '',\n event_image: pfImage,\n })\n output.src = pfImage\n \n }}\n value={this.state.event_type}\n \n >\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n {\n this.setState({ [name]: value });\n }}\n value={this.state.title}\n >\n \n\n { this.state.event_type === \"Wedding\" || this.state.event_type === \"Anniversary\" || this.state.event_type === \"Engagement\"?\n \n {\n this.setState({ [name]: value });\n }}\n value={this.state.bride}\n >\n \n \n : \n ''\n }\n\n { this.state.event_type === \"Wedding\" || this.state.event_type === \"Anniversary\" || this.state.event_type === \"Engagement\"? \n\n {\n this.setState({ [name]: value });\n }}\n value={this.state.bridegroom}\n >\n \n :\n ''\n }\n\n\n { this.state.event_type != \"Wedding\" && this.state.event_type != \"Anniversary\" && this.state.event_type != \"Engagement\"? \n {\n this.setState({ [name]: value });\n }}\n value={this.state.bday_name}\n >\n \n :\n ''\n }\n\n { this.state.edit_flg ? \n // \"\"\n this.state.img_url === \"\"?\n \"\"{this.state.mobile ? '' : window.open(this.state.event_image, \"_blank\")}}\n onClick={(event)=>{this.state.mobile ? '' : window.open(event.target.src, \"_blank\")}}\n style={{cursor: 'pointer'}}\n /> : \n \"\"{this.state.mobile ? '' : window.open(URL.createObjectURL(this.state.file), \"_blank\")}}\n onClick={(event)=>{this.state.mobile ? '' : window.open(event.target.src, \"_blank\")}}\n style={{cursor: 'pointer'}}\n />\n :\n // this.invitationProductsindexOf(this.state.invitationProducts, this.state.event_type, 'layout_id') != 0 ?\n // \"\"{\n // this.state.mobile ? '' : window.open(`uploads/layout/preview/${this.invitationProductsindexOf(this.state.invitationProducts, this.state.event_type, 'layout_id')}/preview.png`, \"_blank\") }}\n // style={{cursor: 'pointer'}}\n // />\n // :\n \"\"{this.state.mobile ? '' : window.open(this.presetFoldersindexOf(this.state.presetFolders, `${this.state.event_type}`).split('public/')[1], \"_blank\")}}\n onClick={(event)=>{this.state.mobile ? '' : window.open(event.target.src, \"_blank\")}}\n style={{cursor: 'pointer'}}\n />\n }\n \n



    \n\n {\n let invitationLayoutID = this.invitationProductsindexOf(this.state.invitationProducts, this.state.event_type, 'layout_id')\n if (invitationLayoutID !== 0) {\n var output = document.getElementById('output');\n output.src= `uploads/layout/preview/${this.invitationProductsindexOf(this.state.invitationProducts, this.state.event_type, 'layout_id')}/preview.png`\n this.setState({\n file: '',\n img_url: \"\",\n event_image: `uploads/layout/preview/${this.invitationProductsindexOf(this.state.invitationProducts, this.state.event_type, 'layout_id')}/preview.png`,\n user_file: false,\n });\n }\n else\n alert(\"Create your Invitation first\")\n }}\n value=\"Use/Update your Invitation\"\n >\n \n\n {\n this.setState({\n file: event.target.files[0],\n img_url: event.target.value,\n event_image: '',\n user_file: true,\n })\n var output = document.getElementById('output');\n output.src = URL.createObjectURL(event.target.files[0]);\n output.style.display='block'\n }}\n \n value={this.state.img_url}\n >\n \n \n\n \n {\n this.setState({modal2: true})\n }}\n value=\"Presets\"\n >\n \n\n {\n this.setState({ [name]: value });\n }}\n value={this.state.event_dt}\n >\n \n\n \n {this.state.mobile?\n \n\n Record your Video Invite\n

    \n - Max 45 secs\n

    \n\n
    \n \n

    \n
    \n {this.state.edit_flg && this.state.event_video?\n
    \n {this.state.uploadVidFlg?\n \n : \n \n }\n
    \n :\n
    \n \n
    \n }\n \n\n \n\n \n\n {this.state.edit_flg && this.state.event_video?\n \n :\n \n }\n\n
    \n
    Camera
    \n
    Rec
    \n
    Stop
    \n
    Del
    \n
    \n
    \n
    On / Off
    \n
    Re-Rec
    \n
    \n\n
    \n :\n \n\n

    Record your Video Invite - Max 45 secs

    \n \n
    \n \n

    \n
    \n {this.state.edit_flg && this.state.event_video?\n
    \n {this.state.uploadVidFlg?\n \n :\n \n }\n
    \n :\n
    \n \n
    \n }\n \n \n\n \n\n
    \n\n {this.state.edit_flg && this.state.event_video?\n \n :\n \n }\n\n
    \n\n
    \n
    Camera
    \n
    Rec
    \n
    Stop
    \n
    Del
    \n
    \n
    \n
    On / Off
    \n
    Re-Rec
    \n
    \n
    \n } \n
    \n
    \n
    \n 0%\n
    \n
    \n
    \n\n
    \n \n {/* {this.value=null}}/> */}\n {this.handleVideoSubmit(event)}}/>\n
    \n\n\n\n\n\n\n\n
    \n\n \n \n \n
    \n
    \n\n\n {this.setState({ modal2: false })}}>\n \n \n Preset Images - Click to choose\n \n \n\n
    \n \n
    \n {\n this.state.presetFolders.map((pf, index) => (\n pf[0] === this.state.event_type.toLowerCase()?\n {`image-${index}`} {\n var output = document.getElementById('output');\n output.src = pf[1].split('public/')[1]\n this.setState({\n file: '',\n img_url: \"\",\n event_image: pf[1].split('public/')[1],\n user_file: false,\n modal2: false\n })\n }}\n />\n :''\n ))\n }\n
    \n
    \n
    \n
    \n\n\n {this.setState({ isArrange: false })}}>\n \n \n Arrange Wishes-Move Up/Down\n \n \n{/* Bala */}\n
    \n \n {this.state.mobile?\n \n
    \n {\n this.state.contributes.map((cont, index) => (\n \n
    \n {`image-${index}`}\n\n \n
    \n
    {cont.c_name}
    \n
    {cont.c_place}
    \n {cont.sort_order != null?\n
    Sort-order: {cont.sort_order}
    \n :\n
    Sort-order: {cont.page_no * cont.seq_no}
    \n }\n
    \n
    \n \n
    \n
    \n
    \n ))\n }\n
    \n :\n
    \n {\n this.state.contributes.map((cont, index) => (\n \n
    \n {`image-${index}`}\n
    \n
    {cont.c_name}
    \n
    {cont.c_place}
    \n {cont.sort_order != null?\n
    Sort-order: {cont.sort_order}
    \n :\n
    Sort-order: {cont.page_no * cont.seq_no}
    \n }\n
    \n
    \n \n
    \n
    \n
    \n ))\n }\n
    \n }\n
    \n
    \n \n {this.state.mobile?\n \n :\n \n }\n \n
    \n\n\n\n\n {this.setState({ choosePreset: false })}}>\n \n \n Choose an Output Template\n \n \n
    \n \n
    \n { this.state.mobile?\n this.state.presetTemplates.map((rec, index) => (\n {`image-${index}`} {\n let proceed = confirm(\"Are you sure you want to use this Output Template?\")\n if (proceed) {\n // this.updateEventPresetProductId(this.state.event_id, rec.product_id, 'CLOSED');\n this.updateEventPresetProductIdAndCloneProduct(this.state.event_id, this.state.event_type, rec.product_id, this.state.product_id);\n this.setState({ choosePreset: false})\n }\n }}\n />\n ))\n :\n this.state.presetTemplates.map((rec, index) => (\n {`image-${index}`} {\n let proceed = confirm(\"Are you sure you want to use this Output Template?\")\n if (proceed) {\n // this.updateEventPresetProductId(this.state.event_id, rec.product_id, 'CLOSED');\n this.updateEventPresetProductIdAndCloneProduct(this.state.event_id, this.state.event_type, rec.product_id, this.state.product_id);\n this.setState({ choosePreset: false})\n }\n }}\n />\n )) \n } \n
    \n
    \n
    \n
    \n\n\n {this.setState({ chooseEventPictures: false })}}>\n \n \n Upload Event Pictures\n \n \n
    \n \n \n
    \n { this.state.mobile?\n this.state.eventPictures.map((rec, index) => (\n
    \n
    \n

    Page - {index+1}

    \n {`image-${index}`}\n {\n let file_name = rec.page_no // Note no extension\n let proceed = confirm(\"Do you also want to copy this image to rest of the pages?\\nChoose 'Cancel' to change only this image\")\n if (proceed){\n let other_id = \"Page\"\n this.save_user_event_image(this.state.event_id, event.target.files[0], file_name, \"copy\") \n for(let i=index; i\n \n
    \n
    \n ))\n :\n\n this.state.eventPictures.map((rec, index) => (\n
    \n
    \n

    Page - {index+1}

    \n {`image-${index}`}\n {\n let file_name = rec.page_no // Note no extension\n let proceed = confirm(\"Do you also want to copy this image to rest of the pages?\\nChoose 'Cancel' to change only this image\")\n if (proceed){\n let other_id = \"Page\"\n this.save_user_event_image(this.state.event_id, event.target.files[0], file_name, \"copy\") \n for(let i=index; i\n \n
    \n
    \n ))\n } \n \n
    \n
    \n
    \n
    \n\n\n\n\n\n\n\n \n {this.setState({ isContributions: false })}}\n style={{marginTop:'45px', }}\n >\n \n \n {`Collected Wishes - ${this.state.event_type}`}\n \n \n\n
    \n \n\n \n {\n this.setState({ [name]: value });\n this.changeColor()\n }}\n value={this.state.colorPicker}\n >\n \n \n \n\n {this.state.contributes.length > 0 ?\n c_list = this.state.contributes.map( (item, index) =>{\n //const contributionNo = item.page_no * item.seq_no\n const contributionNo = this.state.contributes.length - index\n const date = new Date(item.created_at)\n const formattedDate = date.toLocaleDateString(\"en-GB\", {\n day: \"numeric\",\n month: \"long\",\n year: \"numeric\"\n })\n const formattedTime = date.toLocaleTimeString(\"en-US\")\n \n if (this.state.mobile){\n return (\n \n
    \n
    Wish No: {contributionNo} @ {formattedDate} {formattedTime}
    \n \n \"\"\n \n \n

    \n
    Name: {item.c_name}
    \n
    Place: {item.c_place}
    \n

    \n \n
    \n
    Audio Wishes (if recordered)
    \n {/*
    Audio Wishes (if recordered)
    */}\n \n \n
    \n \n
    \n \n
    \n
    \n
    \n )\n }\n else {\n return (\n \n
    \n
    Wish No: {contributionNo} @ {formattedDate} {formattedTime}
    \n \n \"\"\n \n \n
    Name: {item.c_name}
    \n
    Place: {item.c_place}
    \n

    \n \n
    \n
    Audio Wishes (if recordered)
    \n {/*
    Audio Wishes (if recordered)
    */}\n \n \n
    \n \n
    \n \n
    \n
    \n \n \n \n
    \n \n \n )\n }\n })\n :\n

    No Wsihes yet!

    \n }\n\n \n
    \n\n
    \n\n
    \n\n {this.setState({ link: false })}}>\n \n \n Event Link\n \n \n\n
    \n \n \n \n
    \n\n {this.state.mobile?\n

    \n {/* https://wishcollector.com/contribute?event_id={this.state.event_id}&&event_dt={this.state.event_dt}

    */}\n https://wishcollector.com/contribute?args={window.btoa(\"event_id=\"+this.state.event_id+\"&&event_dt='\"+this.state.event_dt+\"'\")}\n \n :\n

    \n {/* https://wishcollector.com/contribute?event_id={this.state.event_id}&&event_dt={this.state.event_dt}

    */}\n https://wishcollector.com/contribute?args={window.btoa(\"event_id=\"+this.state.event_id+\"&&event_dt='\"+this.state.event_dt+\"'\")}\n \n }\n \n
    \n
    \n

    \n Before sending the 'Event Link' to your Friends & Relatives, test 'Event Link' yourselves on mobile and PC or any device first.\n

    \n

    \n One can also 'Wish Locally' by clicking on the button 'Wish Locally' which will test the 'Event Link' as well.\n

    \n
    \n
    \n
    \n
    \n
    \n\n\n {this.setState({ isUploadImage: false })}}\n style={{marginTop:'45px', }}>\n\n \n \n Replace Image\n \n \n\n \n \n \n \"\"\n\n {\n if (event.target.value) {\n var fileExtensions = [\".jpg\",\".jpeg\",\".bmp\",\".gif\",\".png\"];\n var files = event.target.files;\n var filename = files[0].name\n var extension = filename.split('.')[1].toLowerCase()\n //if (extension !== ('jpg' || 'jpeg' || 'svg' || 'png' || 'gif')) {\n if (fileExtensions.indexOf(extension) != -1) {\n alert (\"Image file rejected\\nAccepted formats (.jpg, .svg, .png, .gif)\\nPlease upload valid Image format\")\n event.target.value = ''\n var output = document.getElementById('output');\n output.src = ''\n return -1\n }\n\n this.setState({u_file: event.target.files[0]})\n this.setState({u_img_url: event.target.value });\n var output = document.getElementById('output');\n output.src = URL.createObjectURL(event.target.files[0]);\n output.style.display='block'\n }\n }}\n \n >\n\n \n \n\n \n \n \n \n \n\n\n\n {this.state.mobile?\n \n \n
    \n {/* My Events */}\n

    My Events

    \n \n \n \n
    \n
    \n \n
    \n\n
      {this.state.events.length>0 ? list : nolist}
    \n
    \n :\n \n \n
    \n\n \n\n

    My Events

    \n\n
    \n \n \n
    \n
    \n\n
      {this.state.events.length>0 ? list : nolist}
    \n \n
    \n }\n\n \n
    \n \n
    \n\n {/*
    \n \n
    */}\n\n {this.state.showImageEditor && (\n \n \n \n )}\n \n
    \n );\n\n }\n}\n\nexport default EventsHomePage \n\n","//import React, {useState, useEffect} from 'react';\nimport React, { Component } from \"react\";\nimport { ENDPOINTS } from \"../constants/endpoints\";\n//import \"babel-polyfill\";\n//import 'bootstrap/dist/css/bootstrap.min.css';\nimport { Button } from \"react-bootstrap\";\n//import { Col, Modal, Button, Row } from \"react-bootstrap\";\n\nclass EventsHomePage extends Component {\n constructor(props) {\n super(props);\n let customState = { ...props, events: [] };\n this.state = customState;\n this.getEventsfromDB();\n }\n \n \n UNSAFE_componentWillReceiveProps(nextProps) {\n if (nextProps !== this.state) {\n this.setState(nextProps);\n }\n }\n \n UNSAFE_componentWillMount() {\n }\n\n getEventsfromDB = () => {\n let events_uri = ENDPOINTS.events.list.uri;\n var user_id = this.props.user_id;\n \n var where = \"user_id=\" + user_id;\n var where = \"\"\n \n events_uri = `${events_uri}?${where}`;\n \n let noRecords;\n \n \n// (async () => {\n// noRecords = await fetch(events_uri, {\n noRecords = fetch(events_uri, {\n method: \"GET\", headers: { \"content-type\": \"application/json\" }, \n })\n .then((response) => response.json())\n .then((data) => { \n this.setState({events: data.events});\n console.log (\"data: \", data.events);\n });\n \n// });\n }\n\n render() {\n \n let list\n let nolist\n\n console.log (\"event.length: \", this.state.events.length)\n if (this.state.events.length > 0) {\n list = this.state.events.map( item =>{\n //return (
  • {item.id}, {item.user_id}, {item.event_type}, {item.title}, {item.img_url}
  • )\n //return (
  • {item.id}, {item.user_id}, {item.event_type}, {item.title}, \n // \"\"
  • )\n\n return (\n
    \n \"\"\n
    \n

    {item.title}

    \n

    {item.event_dt}

    \n
    \n \n
    \n \n\n )\n\n })\n }\n else {\n nolist = [\"No Events Found! Create a New Event now!\"]\n }\n \n \n\n //
      {list}
    \n return (\n \n
    \n

    My Events

    \n {/* {' '} */}\n \n
    \n
      {this.state.events.length>0 ? list : nolist}
    \n\n \n\n\n{/*\n
    \n \n \"\"\n \n My Events\n \n \n \n \n This is some text within a card body.\n \n \n
    \n */}\n\n\n
    \n );\n\n /*\n return (\n \n This is some text within a card body.\n \n );\n */\n\n\n }\n}\n\nexport default EventsHomePage \n","import React, { useState } from \"react\";\nimport { FormGroup, ControlLabel, FormControl, Modal } from \"react-bootstrap\";\nimport ImageEditor from \"@toast-ui/react-image-editor\";\nimport \"tui-image-editor/dist/tui-image-editor.css\";\n// import { FieldGroup } from \"./bootstrap/Forms.FieldGroup\";\nimport { ENDPOINTS } from \"../../constants/endpoints\";\n// import { formDataToJSON } from \"../adukku_utils/array\";\nimport ThumbnailPreview from \"../layouts/ThumbnailPreview\";\nimport EditProductImage from \"../EditProductImage\";\nimport { FieldGroup } from \"../bootstrap/Forms.FieldGroup\";\n\nlet inputWidth = null;\nlet inputHeight = null;\nlet $inputCheckInvert = null;\nlet $inputCheckSepia = null;\nlet $inputCheckSepia2 = null;\nlet $inputCheckBlur = null;\nlet $inputCheckSharpen = null;\nlet $inputCheckEmboss = null;\nlet $inputCheckGrayscale = null;\nlet $inputCheckRemoveWhite = null;\nlet $inputCheckBrightness = null;\nlet $inputCheckNoise = null;\nlet $inputCheckColorFilter = null;\nlet $inputSlideRemoveWhite = null;\nlet $inputSlideBrightness = null;\nlet $inputSlideNoise = null;\nlet $inputSlideColorFilter = null;\n\nexport default class FileManager extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n isLoading: false,\n isFetching: false,\n overlay: props.overlay || { visible: false },\n is_preset_display: false,\n categories: props.categories,\n role: null,\n isFileManagerOpen: false,\n folders: [],\n user_products: {},\n folderHierarchy: {},\n basePath: \"\",\n show: false,\n currentFile: {},\n showImageEditor: null,\n imageEditorOptions: {\n includeUI: {\n initMenu: \"mask\",\n menuBarPosition: \"bottom\",\n menu: [\"crop\", \"flip\", \"rotate\", \"text\", \"draw\", \"mask\"],\n },\n cssMaxWidth: 700,\n cssMaxHeight: 500,\n selectionStyle: {\n cornerSize: 20,\n rotatingPointOffset: 70,\n },\n usageStatistics: false,\n },\n uploadedImages: {\n none: [],\n },\n uploadedImageNames: {\n none: [],\n },\n avail_space: 1,\n total_space: 1,\n reclaimable_space: 0,\n sortBy: \"name\",\n sortType: \"asc\",\n isShowAll: true,\n page: 1,\n perPage: 10,\n storage_unit: \"GB\",\n deletableFiles: {},\n };\n }\n editorRef = React.createRef();\n\n // componentDidMount() {\n // this.getUserFolders({});\n // }\n\n openFileManager = () => {\n this.setState({\n isFileManagerOpen: !this.state.isFileManagerOpen,\n });\n this.getUserFolders({});\n };\n\n getUserFolders = (payload) => {\n const product = this.state.product;\n let uri = ENDPOINTS.files.index.uri;\n let that = this;\n let { folderHierarchy, rootFolders } = this.state;\n const { product_id, dlname, current_path } = payload;\n\n this.setState({ isFetching: true });\n\n uri = current_path ? `${uri}?current_path=${current_path}` : `${uri}?`;\n return fetch(uri, {\n method: \"GET\",\n headers: { \"content-type\": \"application/json\" },\n })\n .then((response) => response.json())\n .then((response) => {\n if (payload.product_id) {\n folderHierarchy[payload.product_id] = folderHierarchy[payload.product_id] || {};\n folderHierarchy[payload.product_id] = response.folders;\n }\n if (payload.dlname) {\n folderHierarchy[payload.product_id] = folderHierarchy[payload.product_id] || {};\n\n folderHierarchy[payload.product_id][dlname] =\n folderHierarchy[payload.product_id][dlname] || response.folders;\n }\n that.setState({\n rootFolders: current_path ? rootFolders : response.folders,\n user_products: response.products,\n folderHierarchy: folderHierarchy,\n folders: this.sortFolders(response.folders),\n basePath: response.base_path,\n current_path: response.current_path,\n prev_path: response.prev_path,\n product_id: product_id,\n avail_space: response.avail_space,\n total_space: response.total_space,\n reclaimable_space: response.reclaimable_space,\n page: 1,\n isFetching: false,\n });\n });\n };\n\n deleteFile = (type) => {\n let uri = ENDPOINTS.files.delete.uri;\n let that = this;\n let { folderHierarchy, rootFolders, folders, deletableFiles } = this.state;\n let deletableFilePaths = [];\n if (type == \"all\") {\n folders.map((folder) => {\n if (folder.is_file) deletableFilePaths.push(folder.path);\n });\n } else {\n deletableFiles &&\n Object.keys(deletableFiles).map((file_path) => {\n if (file_path && deletableFiles[file_path]) deletableFilePaths.push(file_path);\n });\n }\n uri = uri.replace(\":file_path\", \"123\");\n uri = `${uri}?`;\n let updatedFolders = folders.filter((folder) => !deletableFilePaths.includes(folder.path));\n if (confirm(\"Are you sure you wanna delete?\")) {\n return fetch(uri, {\n method: \"DELETE\",\n body: JSON.stringify({\n file_path: deletableFilePaths.join(\",\"),\n }),\n headers: { \"content-type\": \"application/json\" },\n })\n .then((response) => response.json())\n .then((response) => {\n that.setState({\n folders: this.sortFolders(updatedFolders),\n avail_space: response.avail_space,\n total_space: response.total_space,\n reclaimable_space: response.reclaimable_space,\n deletableFiles: {},\n });\n });\n }\n };\n\n sortFolders = (folders) => {\n switch (this.state.sortBy) {\n case \"name\":\n return folders.sort((a, b) => a.name.localeCompare(b.name));\n case \"size\":\n return folders.sort((a, b) => a.size - b.size);\n case \"time\":\n return folders.sort((a, b) => new Date(b.updated_at) - new Date(a.updated_at));\n default:\n return folders.sort((a, b) => a.name.localeCompare(b.name));\n }\n };\n\n checkAvailSpace = async (fileSize, avail_space) => {\n let uri = `${ENDPOINTS.files.get.uri}?file_size=${fileSize}`;\n return fetch(uri, {\n method: \"GET\",\n headers: { \"content-type\": \"application/json\" },\n })\n .then((response) => response.json())\n .then((response) => {\n if (response.data == \"available\") {\n return true;\n } else {\n return false;\n }\n });\n };\n formatBytes = (bytes, decimals = 2, type) => {\n if (bytes === 0) return \"0 Bytes\";\n\n const k = 1024;\n const dm = decimals < 0 ? 0 : decimals;\n const sizes = [\"Bytes\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\", \"EB\", \"ZB\", \"YB\"];\n\n let i = Math.floor(Math.log(bytes) / Math.log(k));\n if (type == \"global\") i = sizes.indexOf(this.state.storage_unit) || i;\n\n return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + \" \" + sizes[i];\n };\n\n uploadImages = async (dlname) => {\n const that = this;\n const product_id = this.state.product_id;\n if (!product_id) return;\n \n const uploadedImages = this.state.uploadedImages;\n let template_url = ENDPOINTS.images.upload;\n\n this.setState({ isLoading: true });\n \n let { folderHierarchy, rootFolders, folders, current_path, basePath } = this.state;\n // const { current_path } = payload;\n let updatedFolders = folders;\n template_url = template_url.replace(\":product_id\", product_id).replace(\":dlname\", dlname);\n let formData = new FormData();\n let totalFilesSize = 0;\n for (let index = 0; index < uploadedImages[dlname].length; index++) {\n let file = uploadedImages[dlname][index];\n formData.append(\"files[]\", uploadedImages[dlname][index]);\n totalFilesSize += file.size;\n }\n if (await this.checkAvailSpace(totalFilesSize, this.state.avail_space)) {\n let $ajax = $.ajax({\n url: template_url,\n type: \"POST\",\n method: \"POST\",\n data: formData,\n processData: false,\n contentType: false,\n });\n $ajax.done(function () {\n that.setState({ isLoading: false });\n alert(\"Successfully, uploaded file(s)\");\n });\n $ajax.fail(function (jqXHR, textStatus, errorThrown) {\n that.setState({ isLoading: false });\n if (jqXHR.status == 406) {\n alert(\"One or more files exceeded the file size of 5MB\\n\\nPlease Upload files again with sizes less than 5MB\");\n }\n if (jqXHR.status == 500) {\n alert(\"only Max of 500 files allowed at a time\\n\\nPlease batch upload 500 or less files at a time\");\n }\n else {\n alert(\"An internal server error occured\");\n //alert (jqXHR.status);\n }\n });\n $ajax.always(function () {\n that.getUserFolders({\n current_path: \"/home/ubuntu/webapps/wishcollector.com/current/public/uploads/products/\" + current_path,\n product_id: current_path.split(\"/\")[0],\n });\n });\n } else {\n this.setState({\n uploadedImages: { none: [] },\n uploadedImageNames: { none: [] },\n isLoading: false,\n });\n alert(\"Available space limit exceeding, cannot upload files\");\n }\n };\n\n handleSubmit(e, dlname) {\n e.preventDefault();\n this.setState({ isLoading: true });\n this.uploadImages(dlname);\n }\n\n fileSelectedHandler = (e, dlname) => {\n // let uploadedImages = this.state.uploadedImages;\n // let uploadedImageNames = this.state.uploadedImageNames;\n // discard the old files if upload files is clicked again\n let uploadedImages = { none: [] };\n let uploadedImageNames = { none: [] };\n let files = e.target.files;\n for (let index = 0; index < files.length; index++) {\n uploadedImages[dlname].push(files[index]);\n uploadedImageNames[dlname].push(files[index].name);\n }\n this.setState({\n uploadedImages: uploadedImages,\n uploadedImageNames: uploadedImageNames,\n });\n };\n\n toggleImageEditor = (val) => {\n if (!val) {\n this.setState({ showImageEditor: null });\n document.querySelector(\"#manage_image_editor\").classList.remove(\"show_editor\");\n } else {\n if (val.name.split(\".\").pop() !== \"svg\") {\n document.querySelector(\".modal\").removeAttribute(\"tabindex\");\n document.querySelector(\"#manage_image_editor\").classList.add(\"show_editor\");\n this.setState({ showImageEditor: val });\n setTimeout(() => {\n this.initializeEditor();\n }, 100);\n } else {\n alert(\"Can't edit the svg images\");\n }\n }\n };\n\n initializeEditor = () => {\n let refInstance = this.editorRef.current.getInstance();\n // Changing buttons\n $(\".tui-image-editor-header-logo\").replaceWith(\"\");\n $(\".tui-image-editor-header-buttons\").replaceWith(\n `
    \n \n \n \n
    \n \n \n
    \n
    `\n );\n\n if (!$(\".tie-btn-filter\").html()) {\n const filterBtn = `
  • \n \"Filter\"\n
  • \n `;\n $(\".tui-image-editor-menu\").prepend(filterBtn);\n $(\".tie-btn-filter\").bind(\"click\", this.onFilterSelect);\n }\n\n refInstance.loadImageFromURL(this.state.showImageEditor.image, \"Adukku image\").then(() => {\n refInstance.ui.activeMenuEvent();\n\n $(\".image_editor_file_name\").remove();\n $(\".tui-image-editor-header\").append(\n `

    ${this.state.showImageEditor.name}

    `\n );\n\n if (!$(\".preset-fixed\").html()) {\n const fixedCrop = `
    \n
    \n
    \n
    \n \n
    `;\n $(\".tie-crop-preset-button\").append(fixedCrop);\n }\n document.querySelector(\".save-as-container\").style.display = \"none\";\n this.bindActions();\n });\n\n refInstance.on(\"objectScaled\", () => {\n if (inputWidth && inputHeight) {\n this.customImageSizing();\n }\n });\n };\n\n bindActions = () => {\n $(\".tie-btn-crop\").bind(\"mousedown\", this.onCropSelect);\n $(\".tie-btn-flip\").bind(\"mousedown\", this.onFlipSelect);\n $(\".tie-btn-text\").bind(\"mousedown\", this.onTextSelect);\n $(\".tie-btn-rotate\").bind(\"mousedown\", this.onRotateSelect);\n $(\".tie-btn-draw\").bind(\"mousedown\", this.onDrawSelect);\n $(\".tie-btn-mask\").bind(\"mousedown\", this.onMaskSelect);\n $(\".tui-image-editor-close-btn\").bind(\"click\", this.onClose);\n $(\".tui-image-editor-save-btn\").bind(\"click\", this.onSave);\n $(\".tui-image-editor-save-as-btn\").bind(\"click\", this.onSaveas);\n $(\".submit_save_as_file\").bind(\"click\", this.onSubmitFile);\n $(\".preset-fixed\").bind(\"click\", this.onClickFix);\n $(\".preset-none\").bind(\"click\", this.onClickCustom);\n $(\".preset-square\").bind(\"click\", this.onClickSq);\n $(\".preset-3-2\").bind(\"click\", this.onClick32);\n $(\".preset-4-3\").bind(\"click\", this.onClick43);\n $(\".preset-5-4\").bind(\"click\", this.onClick54);\n $(\".preset-7-5\").bind(\"click\", this.onClick75);\n $(\".preset-16-9\").bind(\"click\", this.onClick169);\n };\n\n unBindActions = () => {\n $(\".tie-btn-crop\").unbind(\"mousedown\", this.onCropSelect);\n $(\".tie-btn-flip\").unbind(\"mousedown\", this.onFlipSelect);\n $(\".tie-btn-text\").unbind(\"mousedown\", this.onTextSelect);\n $(\".tie-btn-rotate\").unbind(\"mousedown\", this.onRotateSelect);\n $(\".tie-btn-draw\").unbind(\"mousedown\", this.onDrawSelect);\n $(\".tie-btn-mask\").unbind(\"mousedown\", this.onMaskSelect);\n $(\".tui-image-editor-close-btn\").unbind(\"click\", this.onClose);\n $(\".tui-image-editor-save-btn\").unbind(\"click\", this.onSave);\n $(\".tui-image-editor-save-as-btn\").unbind(\"click\", this.onSaveas);\n $(\".submit_save_as_file\").unbind(\"click\", this.onSubmitFile);\n $(\".preset-fixed\").unbind(\"click\", this.onClickFix);\n $(\".preset-none\").unbind(\"click\", this.onClickCustom);\n $(\".preset-square\").unbind(\"click\", this.onClickSq);\n $(\".preset-3-2\").unbind(\"click\", this.onClick32);\n $(\".preset-4-3\").unbind(\"click\", this.onClick43);\n $(\".preset-5-4\").unbind(\"click\", this.onClick54);\n $(\".preset-7-5\").unbind(\"click\", this.onClick75);\n $(\".preset-16-9\").unbind(\"click\", this.onClick169);\n };\n\n addCropFields = () => {\n const customCrop = `
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    `;\n if (!$(\"#crop_fields_1\").html()) {\n $(\".tie-crop-preset-button\").append(customCrop);\n inputWidth = document.querySelector(\"#tui_widt_1\");\n inputHeight = document.querySelector(\"#tui_heig_1\");\n inputWidth.oninput = this.updatingWidth;\n inputHeight.oninput = this.updatingHeight;\n }\n };\n\n onSaveas = () => {\n document.querySelector(\".save-as-container\").style.display = \"flex\";\n };\n\n removeCropFields = () => {\n if ($(\".custom-crop-container\").html()) {\n $(\".custom-crop-container\").remove();\n }\n };\n\n removeNotWorkingFilters = () => {\n const filterParent = document.querySelector(\".tui-image-editor-menu-filter\");\n const middleFilter = document.querySelectorAll(\".tui-image-editor-submenu-align\");\n const lines = filterParent.querySelectorAll(\".tui-image-editor-partition\");\n if (middleFilter.length === 3) {\n $(\".tui-image-editor-submenu-align\").eq(1).remove();\n $(\".tui-image-editor-submenu-align\").eq(1).remove();\n }\n if (lines.length === 3) {\n $(\".tui-image-editor-menu-filter .tui-image-editor-partition\").eq(0).remove();\n }\n };\n\n onCropSelect = () => {\n $(\".tie-btn-filter\").removeClass(\"active\");\n $(\".filter_image\").addClass(\"filter_filter\");\n this.removeCropFields();\n this.removeFilters();\n // setTimeout(() => {\n // let refInstance = this.editorRef.current.getInstance();\n // refInstance.setCropzoneRect(1);\n // }, 1000);\n };\n\n onFlipSelect = () => {\n $(\".tie-btn-filter\").removeClass(\"active\");\n $(\".filter_image\").addClass(\"filter_filter\");\n this.removeCropFields();\n this.removeFilters();\n };\n\n onTextSelect = () => {\n $(\".tie-btn-filter\").removeClass(\"active\");\n $(\".filter_image\").addClass(\"filter_filter\");\n this.removeCropFields();\n this.removeFilters();\n };\n\n onRotateSelect = () => {\n $(\".tie-btn-filter\").removeClass(\"active\");\n $(\".filter_image\").addClass(\"filter_filter\");\n this.removeCropFields();\n this.removeFilters();\n };\n\n onFilterSelect = () => {\n this.removeCropFields();\n if ($(\".tie-btn-mask\").hasClass(\"active\")) {\n $(\".tie-btn-mask\").trigger(\"click\");\n }\n if ($(\".tie-btn-draw\").hasClass(\"active\")) {\n $(\".tie-btn-draw\").trigger(\"click\");\n }\n if ($(\".tie-btn-text\").hasClass(\"active\")) {\n $(\".tie-btn-text\").trigger(\"click\");\n }\n if ($(\".tie-btn-rotate\").hasClass(\"active\")) {\n $(\".tie-btn-rotate\").trigger(\"click\");\n }\n if ($(\".tie-btn-flip\").hasClass(\"active\")) {\n $(\".tie-btn-flip\").trigger(\"click\");\n }\n if ($(\".tie-btn-crop\").hasClass(\"active\")) {\n $(\".tie-btn-crop\").trigger(\"click\");\n }\n $(\".tui-image-editor-item\").removeClass(\"active\");\n $(\".tie-btn-filter\").addClass(\"active\");\n $(\".filter_image\").removeClass(\"filter_filter\");\n this.addFilterFields();\n // this.removeNotWorkingFilters();\n };\n\n onDrawSelect = () => {\n $(\".tie-btn-filter\").removeClass(\"active\");\n $(\".filter_image\").addClass(\"filter_filter\");\n this.removeCropFields();\n this.removeFilters();\n };\n\n onMaskSelect = () => {\n $(\".tie-btn-filter\").removeClass(\"active\");\n $(\".filter_image\").addClass(\"filter_filter\");\n this.removeCropFields();\n this.removeFilters();\n };\n\n onClickFix = () => {\n this.addCropFields();\n setTimeout(() => {\n let refInstance = this.editorRef.current.getInstance();\n refInstance.setCropzoneRect(1);\n this.initializeSizeCal();\n }, 500);\n };\n\n onClickCustom = () => {\n // setTimeout(() => {\n // let refInstance = this.editorRef.current.getInstance();\n // refInstance.setCropzoneRect(1);\n // }, 500);\n this.removeCropFields();\n };\n\n onClickSq = () => {\n this.removeCropFields();\n };\n\n onClick32 = () => {\n this.removeCropFields();\n };\n\n onClick43 = () => {\n this.removeCropFields();\n };\n\n onClick54 = () => {\n this.removeCropFields();\n };\n\n onClick75 = () => {\n this.removeCropFields();\n };\n\n onClick169 = () => {\n this.removeCropFields();\n };\n\n addFilterFields = () => {\n if (!$(\".tui-image-editor-menu-filter\").html()) {\n $(\".tui-image-editor-submenu\").css({ display: \"table\" });\n const filFields = `\n
    \n
      \n
    • \n
      \n \n \n \n \n \n \n \n
      \n
    • \n
    • \n
      \n
      \n \n
      \n Distance\n \n
      \n
      \n
      \n \n
      \n \n
      \n
      \n
      \n \n
      \n Threshold\n \n
      \n
      \n
      \n \n
      \n \n
      \n
      \n
      \n
    • \n
    \n
    \n `;\n $(\".tui-image-editor-submenu\").append(filFields);\n const imageRef = this.editorRef.current.getInstance();\n $inputCheckBlur = $(\".blur_check\");\n $inputCheckEmboss = $(\".emboss_check\");\n $inputCheckInvert = $(\".invert_check\");\n $inputCheckSepia = $(\".sepia_check\");\n $inputCheckSepia2 = $(\".sepia2_check\");\n $inputCheckSharpen = $(\".sharpen_check\");\n $inputCheckGrayscale = $(\".gray_check\");\n $inputCheckRemoveWhite = $(\".remove_white_check\");\n $inputCheckBrightness = $(\".brightness_check\");\n $inputCheckNoise = $(\".noise_check\");\n $inputCheckColorFilter = $(\".color_check\");\n $inputSlideRemoveWhite = $(\"#remove_white_check\");\n $inputSlideBrightness = $(\"#brightness_check\");\n $inputSlideNoise = $(\"#noise_check\");\n $inputSlideColorFilter = $(\"#color_check\");\n\n $inputCheckBlur.on(\"change\", (e) => {\n if (e.target.checked) {\n imageRef.applyFilter(\"Blur\", { blur: 0.1 });\n } else {\n imageRef.removeFilter(\"Blur\");\n }\n });\n $inputCheckEmboss.on(\"change\", (e) => {\n if (e.target.checked) {\n imageRef.applyFilter(\"Emboss\");\n } else {\n imageRef.removeFilter(\"Emboss\");\n }\n });\n $inputCheckInvert.on(\"change\", (e) => {\n if (e.target.checked) {\n imageRef.applyFilter(\"Invert\");\n } else {\n imageRef.removeFilter(\"Invert\");\n }\n });\n $inputCheckSepia.on(\"change\", (e) => {\n if (e.target.checked) {\n imageRef.applyFilter(\"Sepia\");\n } else {\n imageRef.removeFilter(\"Sepia\");\n }\n });\n $inputCheckSepia2.on(\"change\", (e) => {\n if (e.target.checked) {\n imageRef.applyFilter(\"vintage\");\n } else {\n imageRef.removeFilter(\"vintage\");\n }\n });\n $inputCheckSharpen.on(\"change\", (e) => {\n if (e.target.checked) {\n imageRef.applyFilter(\"Sharpen\");\n } else {\n imageRef.removeFilter(\"Sharpen\");\n }\n });\n $inputCheckGrayscale.on(\"change\", (e) => {\n if (e.target.checked) {\n imageRef.applyFilter(\"Grayscale\");\n } else {\n imageRef.removeFilter(\"Grayscale\");\n }\n });\n $inputCheckRemoveWhite.on(\"change\", (e) => {\n if (e.target.checked) {\n $(\"#remove_white_check\").removeClass(\"disabled\");\n imageRef.applyFilter(\"removeColor\", {\n color: \"#FFFFFF\",\n useAlpha: false,\n distance: parseInt($inputSlideRemoveWhite.val(), 10) / 255,\n });\n } else {\n $(\"#remove_white_check\").addClass(\"disabled\");\n imageRef.removeFilter(\"removeColor\");\n }\n });\n $inputCheckBrightness.on(\"change\", (e) => {\n if (e.target.checked) {\n $(\"#brightness_check\").removeClass(\"disabled\");\n imageRef.applyFilter(\"brightness\", {\n brightness: parseInt($inputSlideBrightness.val(), 10) / 255,\n });\n } else {\n $(\"#brightness_check\").addClass(\"disabled\");\n imageRef.removeFilter(\"brightness\");\n }\n });\n $inputCheckNoise.on(\"change\", (e) => {\n if (e.target.checked) {\n $(\"#noise_check\").removeClass(\"disabled\");\n imageRef.applyFilter(\"noise\", {\n noise: parseInt($inputSlideNoise.val(), 10),\n });\n } else {\n $(\"#noise_check\").addClass(\"disabled\");\n imageRef.removeFilter(\"noise\");\n }\n });\n $inputCheckColorFilter.on(\"change\", (e) => {\n if (e.target.checked) {\n $(\"#color_check\").removeClass(\"disabled\");\n imageRef.applyFilter(\"removeColor\", {\n color: \"#FFFFFF\",\n distance: $inputSlideColorFilter.val() / 255,\n });\n } else {\n $(\"#color_check\").addClass(\"disabled\");\n imageRef.removeFilter(\"removeColor\");\n }\n });\n $inputSlideRemoveWhite.on(\"input\", (e) => {\n imageRef.applyFilter(\"removeColor\", {\n color: \"#FFFFFF\",\n useAlpha: false,\n distance: parseInt(e.target.value, 10) / 255,\n });\n });\n $inputSlideBrightness.on(\"input\", (e) => {\n imageRef.applyFilter(\"brightness\", {\n brightness: parseInt(e.target.value, 10) / 255,\n });\n });\n $inputSlideNoise.on(\"input\", (e) => {\n imageRef.applyFilter(\"noise\", {\n noise: parseInt(e.target.value, 10),\n });\n });\n $inputSlideColorFilter.on(\"input\", (e) => {\n imageRef.applyFilter(\"removeColor\", {\n color: \"#FFFFFF\",\n distance: e.target.value / 255,\n });\n });\n }\n };\n\n removeFilters = () => {\n if ($(\".tui-image-editor-menu-filter\").html()) {\n $(\".tui-image-editor-menu-filter\").remove();\n }\n };\n\n initializeSizeCal = () => {\n document.querySelector(\".preset-fixed\").classList.add(\"active\");\n this.customImageSizing();\n };\n\n updatingWidth = (e) => {\n if (parseInt(e.data) >= 0 && parseInt(e.data) <= 9) {\n inputWidth.value = e.target.value;\n const imageRef = this.editorRef.current.getInstance();\n imageRef.setCropzoneRect(inputWidth.value / inputHeight.value);\n }\n };\n\n updatingHeight = (e) => {\n if (parseInt(e.data) >= 0 && parseInt(e.data) <= 9) {\n inputHeight.value = e.target.value;\n const imageRef = this.editorRef.current.getInstance();\n imageRef.setCropzoneRect(inputWidth.value / inputHeight.value);\n }\n };\n\n customImageSizing = () => {\n const imageRef = this.editorRef.current.getInstance();\n let imageMode = imageRef.getDrawingMode();\n if (imageMode === \"CROPPER\") {\n let imgCrop = imageRef.getCropzoneRect();\n if (imgCrop.width == 0.5 && imgCrop.height == 0.5) {\n let imageCanvs = imageRef.getCanvasSize();\n inputWidth.value = imageCanvs.width.toFixed(2);\n inputHeight.value = imageCanvs.height.toFixed(2);\n } else {\n inputWidth.value = imgCrop.width.toFixed(2);\n inputHeight.value = imgCrop.height.toFixed(2);\n }\n }\n };\n\n onClose = () => {\n this.unBindActions();\n this.removeCropFields();\n $(\".preset-fixed\").remove();\n $(\".image_editor_file_name\").remove();\n this.toggleImageEditor(null);\n };\n\n onSave = async () => {\n const extension = this.state.showImageEditor.image.split(\".\").pop().split(\"?\")[0];\n const imageRef = this.editorRef.current.getInstance();\n let metadata = `image/${extension}`;\n const dataURL = imageRef.toDataURL(metadata, 1);\n let file = await this.dataURLtoFile(dataURL, this.state.showImageEditor.name, metadata);\n this.submitImage(file, this.state.showImageEditor);\n this.onClose();\n };\n\n dataURLtoFile = async (dataurl, filename, metadata) => {\n let response = await fetch(dataurl);\n let data = await response.blob();\n let bgImgFile = new File([data], filename, { type: metadata });\n return bgImgFile;\n };\n\n submitImage = (file, showImageEditor) => {\n let uploadedImages = { none: [] };\n let uploadedImageNames = { none: [] };\n uploadedImages[\"none\"].push(file);\n uploadedImageNames[\"none\"].push(file.name);\n this.setState(\n {\n uploadedImages: uploadedImages,\n uploadedImageNames: uploadedImageNames,\n },\n () => {\n this.uploadImages(\"none\");\n }\n );\n // this.setImageFromFile(file, showImageEditor.data.id);\n };\n\n onSubmitFile = async () => {\n let imageName = $(\".save-as-input\").val();\n const extension = this.state.showImageEditor.image.split(\".\").pop().split(\"?\")[0];\n const imageRef = this.editorRef.current.getInstance();\n let metadata = `image/${extension}`;\n const dataURL = imageRef.toDataURL(metadata, 1);\n let file = await this.dataURLtoFile(\n dataURL,\n `${imageName.trim().replaceAll(\" \", \"_\")}.${extension}`,\n metadata\n );\n this.submitImage(file, this.state.showImageEditor);\n this.onClose();\n };\n\n setImageFromFile = (rawFile, dataID) => {\n let reader = new FileReader();\n reader.onload = (e) => {\n let dataURL = e.target.result;\n let newEditedFiles = this.state.editedFiles;\n newEditedFiles[dataID] = dataURL;\n this.setState({ editedFiles: newEditedFiles });\n };\n reader.readAsDataURL(rawFile);\n };\n\n render() {\n const {\n isFileManagerOpen,\n folders,\n user_products,\n basePath,\n current_path,\n prev_path,\n isShowAll,\n searchResults,\n page,\n perPage,\n deletableFiles,\n } = this.state;\n\n let folderPath = (current_path && current_path.split(\"/\")) || [];\n let updatedFolders = isShowAll ? folders : searchResults;\n let total_pages = Math.ceil(updatedFolders && updatedFolders.length / perPage);\n if (folderPath.length > 0) folderPath[0] = user_products[folderPath[0]];\n\n const isShowPagination =\n this.state.product_id && current_path && current_path.includes(\"images\") ? true : false;\n const indexOfLastTodo = page * perPage;\n const indexOfFirstTodo = indexOfLastTodo - perPage;\n const currentFolders = isShowPagination\n ? updatedFolders.slice(indexOfFirstTodo, indexOfLastTodo)\n : updatedFolders;\n return (\n
  • \n {\"View Image Files\"}\n {/* onClick={() => this.deleteFile(\"all\")} */}\n \n \n \n
    \n
    \n File Manager: {folderPath.join(\" / \")}\n {folderPath.length > 0 && (\n {\n e.preventDefault();\n e.stopPropagation();\n this.getUserFolders({ current_path: prev_path, page: 1 });\n }}\n />\n )}\n
    \n
    \n {\n this.setState({ [name]: value });\n }}\n >\n \n \n \n \n \n Avail Space: {this.formatBytes(this.state.avail_space || 0, 3, \"global\")}\n \n \n Total Space: {this.formatBytes(this.state.total_space || 0, 3, \"global\")}\n \n \n Reclaim Space:{\" \"}\n {this.formatBytes(this.state.reclaimable_space || 0, 3, \"global\")}\n \n
    \n
    \n {this.state.product_id && current_path && current_path.includes(\"images\") && (\n \n
    \n Pages: {total_pages}\n Rows: {updatedFolders && updatedFolders.length}\n \n Per page:\n {\n this.setState({ perPage: value });\n }}\n className=\"product_data_control\"\n >\n \n \n \n \n \n {\n e.preventDefault();\n e.stopPropagation();\n if (page > 1 && page <= total_pages) {\n this.setState({ page: page - 1 });\n }\n }}\n />\n \n Page:\n {\n if (value && value >= 1 && value <= total_pages) {\n this.setState({ page: value });\n } else if (value > total_pages) {\n this.setState({ page: total_pages });\n }\n }}\n className=\"product_data_input\"\n >\n \n {\n e.preventDefault();\n e.stopPropagation();\n if (page >= 1 && page < total_pages) {\n this.setState({ page: page + 1 });\n }\n }}\n data-toggle=\"tooltip\"\n title=\"Go to Next page\"\n src=\"/icons/icon_head.png\"\n alt=\"Next\"\n className=\"product_page_next\"\n />\n
    \n
    \n
    \n {\n this.setState({ search_text: value });\n }}\n className=\"search_input\"\n placeholder=\"Search filename\"\n id={\"search_text\"}\n />\n {\n e.preventDefault();\n e.stopPropagation();\n if (this.state.search_text) {\n let searchText = this.state.search_text;\n searchText = searchText.split(\"*\"); //(\"*\", \"\");\n // searchText = searchText.replace(/[^\\w\\s]/gi, \"\");\n let searchResults = folders.filter((f) => {\n // f.name.toLowerCase().includes(searchText)\n let name = f.name.toLowerCase();\n if (searchText.every((s) => name.includes(s))) {\n return f;\n }\n });\n this.setState({\n searchResults: searchResults,\n isShowAll: false,\n page: 1,\n });\n }\n }}\n >\n Go\n \n {\n e.preventDefault();\n e.stopPropagation();\n this.setState({ isShowAll: true, searchText: \"\" });\n }}\n className=\"btn btn-default search_btn btn-danger\"\n >\n Clear\n \n
    \n {\n this.handleSubmit(e, \"none\");\n }}\n encType=\"multipart/form-data\"\n className=\"flex_align override_form\"\n >\n {\n this.fileSelectedHandler(e, \"none\");\n }}\n accept=\"image/x-png,image/jpeg\"\n style={{ display: \"none\" }}\n id={\"upload_images\" + \"none\"}\n />\n \n {this.state.isLoading ?
    Loading...
    :\n \n }\n \n {Object.keys(deletableFiles).length > 0 && (\n this.deleteFile(\"selected\")}\n >\n Delete Selected\n \n )}\n
    \n \n )}\n
    \n
    \n \n \n \n \n {\n let sortedFolders = [];\n if (this.state.sortBy != \"name\") {\n sortedFolders = folders.sort((a, b) => a.name.localeCompare(b.name));\n }\n this.setState({\n folders: this.state.sortBy == \"name\" ? folders.reverse() : sortedFolders,\n sortBy: \"name\",\n sortType: this.state.sortType == \"asc\" ? \"des\" : \"asc\",\n });\n }}\n >\n Name\n {this.state.sortType == \"asc\" ? (\n \n ) : (\n \n )}\n \n {\n let sortedFolders = [];\n if (this.state.sortBy != \"size\") {\n sortedFolders = folders.sort((a, b) => a.size - b.size);\n // .sort(function (a, b) { return a - b; });\n }\n this.setState({\n folders: this.state.sortBy == \"size\" ? folders.reverse() : sortedFolders,\n sortBy: \"size\",\n sortType: this.state.sortType == \"asc\" ? \"des\" : \"asc\",\n });\n }}\n >\n Size\n {this.state.sortType == \"asc\" ? (\n \n ) : (\n \n )}\n \n\n {\n let sortedFolders = [];\n if (this.state.sortBy != \"time\") {\n sortedFolders = folders.sort(\n (a, b) => new Date(b.updated_at) - new Date(a.updated_at)\n );\n\n // .sort(function (a, b) { return a - b; });\n }\n this.setState({\n folders: this.state.sortBy == \"time\" ? folders.reverse() : sortedFolders,\n sortBy: \"time\",\n sortType: this.state.sortType == \"asc\" ? \"des\" : \"asc\",\n });\n }}\n >\n Uploaded Time\n {this.state.sortType == \"asc\" ? (\n \n ) : (\n \n )}\n \n {/* */}\n \n \n \n \n \n {currentFolders &&\n currentFolders.map((folder, fIndex) => {\n let currentFolderPaths = folder.path\n .split(\"public/uploads/products\")[1]\n .split(\"/\");\n let [em, product_id, dlname] = currentFolderPaths;\n let folderJSX = (\n \n \n {folder.name}\n \n );\n if (folder.is_file) {\n folderJSX = (\n \n \n \n {folder.name}\n {` (${folder.height}X${folder.width})`}\n \n \n );\n }\n return (\n \n {this.state.isFetching ? :\n {\n if (!folder.is_file) {\n this.getUserFolders({\n product_id,\n current_path: folder.path,\n dlname,\n });\n } else {\n if(folder.name.split(\".\")[1]!==\"m4a\") {\n this.toggleImageEditor({\n image: `${basePath}${folder.path.split(\"public\")[1]}?${new Date()}`,\n name: folder.name,\n });\n }\n }\n }}\n >\n {folderJSX}\n \n }\n {/* */}\n\n \n \n \n \n \n );\n })}\n \n
    Uploaded TimeView/Edit
    Fetching...
    {folder.is_file ? this.formatBytes(folder.size, 3) : `${folder.size || 0}MB`}{this.formatBytes(folder.size || 0, 3)}{`${new Date(folder.updated_at).toLocaleString()}`}\n {folder.is_file && (\n \n this.setState({\n show: true,\n currentFile: {\n desc: folder.name,\n preview_url: folder.path.split(\"public\")[1],\n },\n })\n }\n >\n View\n \n )}\n \n {folder.is_file && (\n {\n let deletableFiles = this.state.deletableFiles;\n if (checked) {\n deletableFiles[folder.path] = checked;\n } else {\n delete deletableFiles[folder.path];\n }\n this.setState({ deletableFiles });\n }}\n value={deletableFiles[folder.path] || false}\n />\n )}\n
    \n
    \n {/* \n \n */}\n \n {this.state.show && this.state.currentFile && (\n this.setState({ show: false })}\n />\n )}\n {this.state.showImageEditor && (\n \n \n \n )}\n
  • \n );\n }\n}\n","import React, { Component } from \"react\";\nimport { Col, Form, Modal, Button } from \"react-bootstrap\";\n\nimport { FieldGroup } from \"./bootstrap/Forms.FieldGroup\";\nimport { formDataToJSON } from \"../adukku_utils/array\";\nimport { authorized, Authorized } from \"../adukku_utils/authorizeUser\";\n\nexport default class AddUser extends Component {\n constructor(props) {\n super(props);\n this.state = {\n ...props,\n email: props.edit_user && props.edit_user.email,\n login: props.edit_user && props.edit_user.login,\n view_user_product_code: props.view_user && props.view_user.product_code,\n view_user_password: props.view_user && props.view_user.password,\n view_and_pay_user_product_code: props.view_and_pay_user && props.view_and_pay_user.product_code,\n view_and_pay_user_password: props.view_and_pay_user && props.view_and_pay_user.password,\n\n is_update_code: \"Click here to Generate New Product Code\",\n \n };\n this._handleGenerateProductCode = this._handleGenerateProductCode.bind(this);\n this._handleValidSubmit = this._handleValidSubmit.bind(this);\n }\n\n _handleGenerateProductCode = (e) => {\n let newCode = Math.round(Math.random() * (1000000));\n this.setState({ view_user_Product_code: newCode });\n };\n\n _handleValidSubmit = (e) => {\n e.preventDefault();\n e.stopPropagation();\n let formData = formDataToJSON(new FormData(e.target));\n if (formData[\"role\"] === \"editor\") formData[\"name\"] = formData.login;\n this.props.productUser(formData);\n this.setState({ show: false, view_pay_modal: false });\n };\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (this.state.edit_user !== nextProps.edit_user) {\n this.setState({\n ...nextProps,\n email: nextProps.edit_user && nextProps.edit_user.email,\n login: nextProps.edit_user && nextProps.edit_user.login,\n });\n }\n }\n\n render() {\n const { edit_user, email, login, role, labelText, isAddViewUser } = this.state;\n const style = {\n display: \"none\",\n };\n console.log(role, authorized([\"admin\", \"owner\"], [role], \"ANY\"));\n return (\n \n {role && !isAddViewUser && (\n \n
  • \n this.setState({ show: true })}>\n {/*Bala\n {edit_user ? \"Edit Data Correction User\" : \"Add Data Correction User\"}\n */}\n \n \n
    \n \n Data Correction user\n \n \n \n \n \n {\n this.setState({ [name]: value });\n }}\n />\n {\n this.setState({ [name]: value });\n }}\n />\n \n \n
    \n
    \n \n \n \n \n
    \n
    \n
  • \n
    \n )}\n {isAddViewUser && (\n
  • \n this.setState({ view_pay_modal: true })}>\n {this.props.is_password_set ? `Edit ${labelText}` : `Add ${labelText}`}\n \n \n {\n this.setState({ view_pay_modal: true });\n }}\n >\n {labelText}\n \n \n
    \n \n \n \n {/* Bala*/}\n\n
    \n Generate New Product Code : \n {\n let yesNo = confirm(\"Are you sure?\\nOld Product Code (if any) will not work anymore!!!\") \n if (yesNo) {\n this._handleGenerateProductCode()\n alert(\"New Product Code Generated\") \n }\n }}\n >\n
    \n \n \n {\n // this.setState({\n // password: e.target.value,\n // });\n // }}\n placeholder=\"Password\"\n required={this.props.is_password_set ? null : \"required\"}\n />\n \n
    \n \n \n
    \n \n \n \n
    \n
  • \n )}{\" \"}\n
    \n );\n }\n}\n","import React from \"react\";\nimport \"./spinner.css\";\n\n// export default function LoadingSpinner() {\n //
    \n //
    Loading Images...
    \n //
    Loading Images...
    \n //
    \n export default function LoadingSpinner() {\n return (\n
    \n

    Loading Images...

    \n
    \n );\n}","import \"babel-polyfill\";\nimport React from \"react\";\nimport CartState from \"../context/cart/CartState\";\nimport { Provider } from \"react-redux\";\nimport { applyMiddleware, createStore } from \"redux\";\nimport createLogger from \"redux-logger\";\nimport createSagaMiddleware from \"redux-saga\";\nimport rootSaga from \"../sagas/orders_index.saga\";\nimport AdukkuApp from \"../reducers/orders_reducer\";\nimport CartListContainer from \"../containers/cart/CartListContainer\";\nimport ProductComposzNavbar from \"./ProductComposzNavbar\";\n\n//const logger = createLogger({});\nconst sagaMiddleware = createSagaMiddleware();\n//const store = createStore(AdukkuApp, applyMiddleware(logger, sagaMiddleware)); // Bala\nconst store = createStore(AdukkuApp, applyMiddleware(sagaMiddleware));\nsagaMiddleware.run(rootSaga);\n\nclass MyCart extends React.Component {\n render() {\n return (\n
    \n \n \n
    \n \n \n \n
    \n
    \n
    \n );\n }\n}\n\nexport default MyCart;\n","import \"babel-polyfill\";\nimport React from \"react\";\nimport CartState from \"../context/cart/CartState\";\nimport { Provider } from \"react-redux\";\nimport { applyMiddleware, createStore } from \"redux\";\nimport createLogger from \"redux-logger\";\nimport createSagaMiddleware from \"redux-saga\";\nimport rootSaga from \"../sagas/orders_index.saga\";\nimport AdukkuApp from \"../reducers/orders_reducer\";\nimport OrderListContainer from \"../containers/orders/OrderListContainer\";\nimport ProductComposzNavbar from \"./ProductComposzNavbar\";\n\n//const logger = createLogger({});\nconst sagaMiddleware = createSagaMiddleware();\n//const store = createStore(AdukkuApp, applyMiddleware(logger, sagaMiddleware)); // Bala\nconst store = createStore(AdukkuApp, applyMiddleware(sagaMiddleware));\nsagaMiddleware.run(rootSaga);\n\nclass MyOrders extends React.Component {\n render() {\n return (\n
    \n \n \n
    \n \n \n \n
    \n
    \n
    \n );\n }\n}\n\nexport default MyOrders;\n","import \"babel-polyfill\";\nimport React from \"react\";\nimport CartState from \"../context/cart/CartState\";\nimport { render } from \"react-dom\";\nimport { Provider } from \"react-redux\";\nimport { applyMiddleware, createStore } from \"redux\";\nimport createLogger from \"redux-logger\";\nimport createSagaMiddleware from \"redux-saga\";\nimport rootSaga from \"../sagas\";\nimport AdukkuApp from \"../reducers/product_reducers\";\nimport ProductListContainer from \"../containers/ProductListContainer\";\nimport ProductComposzNavbar from \"./ProductComposzNavbar\";\n\n//const logger = createLogger({}); //Bala\nconst sagaMiddleware = createSagaMiddleware();\n//const store = createStore(AdukkuApp, applyMiddleware(logger, sagaMiddleware)); // Bala\nconst store = createStore(AdukkuApp, applyMiddleware(sagaMiddleware));\nsagaMiddleware.run(rootSaga);\n\n$(window).scroll(function () {\n //set scroll position in session storage\n sessionStorage.scrollPos = $(window).scrollTop();\n});\nvar init = function () {\n //return scroll position in session storage\n $(window).scrollTop(sessionStorage.scrollPos || 0);\n};\nwindow.onload = init;\n\nclass MyProducts extends React.Component {\n componentDidMount() {\n let user_role = document.getElementById(\"user_role\");\n user_role = user_role.innerHTML;\n if (localStorage.getItem(\"isOrderPaid\")) {\n alert(\n \"Payment done successfully, \\n Download your files immediately or within the next 3 days.\"\n );\n localStorage.removeItem(\"isOrderPaid\");\n }\n if (localStorage.getItem(\"isStoragePaid\")) {\n alert(\"Payment done successfully, \\n Check expiry date under Storage Purchase History\");\n localStorage.removeItem(\"isStoragePaid\");\n }\n // this.setState({ role: user_role });\n // alert(\n // \"Payment done successfully, \\n Download your files immediately or within the next 3 days.\"\n // );\n }\n render() {\n return (\n
    \n \n {/* */}\n
    \n \n \n \n
    \n
    \n
    \n );\n }\n}\nexport default MyProducts;\n","import React, { useState } from 'react';\nimport { Navbar, Nav, NavItem, MenuItem, NavDropdown, Modal, Button } from 'react-bootstrap';\nimport logo from 'images/Composz-logo-white-trans.png';\nimport logoBlack from 'images/Composz-logo-black-trans.png';\nimport profile from 'images/blankProfile.png';\nimport {useLocation} from 'react-router-dom'\nimport { render } from 'react-dom';\n\nfunction Mynavbar (user_id, user_name, has_view_products) {\n\n const [show3, setShow3] = useState(false);\n const showDropdown3 = (e)=>{\n setShow3(true);\n }\n const hideDropdown3 = e => {\n setShow3(false);\n }\n \n const [show2, setShow2] = useState(false);\n const showDropdown2 = (e)=>{\n setShow2(true);\n }\n const hideDropdown2 = e => {\n setShow2(false);\n }\n \n const [show1, setShow1] = useState(false);\n const showDropdown1 = (e)=>{\n setShow1(true);\n setShow(false);\n }\n const hideDropdown1 = e => {\n setShow1(false);\n }\n \n const [show, setShow] = useState(false);\n const showDropdown = (e)=>{\n setShow(true);\n }\n const hideDropdown = e => {\n setShow(false);\n }\n const toggleShow = e => {\n setShow(!show)\n setShow1(false)\n setShow2(false)\n setShow3(false)\n }\n const toggleShow1 = e => {\n setShow1(!show1)\n setShow(false)\n setShow2(false)\n setShow3(false)\n }\n const toggleShow2 = e => {\n setShow2(!show2)\n setShow(false)\n setShow1(false)\n setShow3(false)\n }\n const toggleShow3 = e => {\n setShow3(!show3)\n setShow(false)\n setShow1(false)\n setShow2(false)\n }\n\n const hideDD = e => {\n toggleShow();\n $(\"#responsive-navbar-nav\").removeClass(\"navbar-collapse collapse in\");\n $(\"#responsive-navbar-nav\").addClass(\"navbar-collapse collapse\");\n const el=document.getElementById(\"nav-toggle\")\n el.click();\n }\n\n const hideDD1 = e => {\n toggleShow1();\n $(\"#responsive-navbar-nav\").removeClass(\"navbar-collapse collapse in\");\n $(\"#responsive-navbar-nav\").addClass(\"navbar-collapse collapse\");\n const el=document.getElementById(\"nav-toggle\")\n el.click();\n }\n \n const handleToggle = e => {\n ;; // do nothing\n }\n\n const [showModal, setshowModal] = useState(false);\n function handlePricing () {\n setshowModal(true);\n }\n\n function handleClosePricing () {\n setshowModal(false);\n }\n\n function getCookie(cname) {\n let name = cname + \"=\";\n let decodedCookie = decodeURIComponent(document.cookie);\n let ca = decodedCookie.split(';');\n for(let i = 0; i 450 ?\n \n \n \n \n\n {countryCode!==\"IN\" ?\n \n \n Pricing\n \n

    \n     1) Composed Image Files (.jpeg): \n

    \n               $1.00 per image file  +

    \n               $0.15 convenience charge per image file\n

    \n
    \n     2) Embedded Audio Files (.html): \n

    \n               $4.00 for all audio files in a Record\n
    \n     3) Storage (Rent for 30 days typically): \n

    \n               $1.00 per Giga Byte   +

    \n               $0.15 convenience charge per Giga Byte\n
    \n     NOTE: \n

    \n         1 Page Composite has:\n

    \n                 1 image file and can have upto 1 audio (.html) file per record\n

    \n         2 Page Graduation Folder has:\n

    \n                 2 image files and can have upto 2 audio (.html) files per record\n
    \n \n \n \n
    \n :\n \n \n Pricing\n \n

    \n     1) Composed Image Files (.jpeg): \n

    \n               ₹75.00 per image file  +

    \n               ₹10.00 convenience charge per image file\n

    \n
    \n     2) Embedded Audio Files (.html): \n



    \n        a) Max audio duration of 15 Seconds: \n

    \n               ₹127.00 for all audio files in a Record\n

    \n        b) Max audio duration of 30 Seconds: \n

    \n               ₹200.00 for all audio files in a Record\n
    \n     3) Storage (Rent for 30 days typically): \n

    \n               $75.00 per Giga Byte   + \n

    \n               ₹10.00 convenience charge per Giga Byte\n
    \n     NOTE: \n

    \n         1 Page Composite has:\n

    \n                 1 image file and can have upto 1 audio (.html) file per record\n

    \n         2 Page Graduation Folder has:\n

    \n                 2 image files and can have upto 2 audio (.html) files per record\n
    \n \n \n \n
    \n }\n\n {user_id!=-1?\n \n :\n \n }\n {user_id!=-1?\n \n : \n \n }\n
    \n
    \n\n :\n\n \n
    \n \n \n \n                      \n                      \n \n \n \n
    \n \n \n\n {countryCode!==\"IN\" ?\n \n \n Pricing\n \n

    \n   1) Composed Image Files (.jpeg): \n

    \n     $1.00 per image file  +

    \n     $0.15 convenience charge per image file\n

    \n
    \n   2) Embedded Audio Files (.html): \n

    \n      $4.00 for all audio files in a Record\n
    \n   3) Storage (Rent for 30 days typically): \n

    \n      $1.00 per Giga Byte   +

    \n      $0.15 convenience charge per Giga Byte\n
    \n   NOTE: \n

    \n   1 Page Composite has:\n

    \n     1 image file and can have upto 1 audio\n

    \n       (.html) file per record\n

    \n   2 Page Graduation Folder has:\n

    \n     2 image files and can have upto 2 audio\n

    \n       (.html) files per record\n
    \n \n \n \n
    \n :\n \n \n Pricing\n \n

    \n   1) Composed Image Files (.jpeg): \n

    \n     ₹75.00 per image file  +

    \n     ₹10.00 convenience charge per image file\n

    \n
    \n   2) Embedded Audio Files (.html): \n



    \n     a) Max audio duration of 15 Seconds: \n

    \n      ₹127.00 for all audio files in a Record\n

    \n     b) Max audio duration of 30 Seconds: \n

    \n      ₹200.00 for all audio files in a Record\n
    \n   3) Storage (Rent for 30 days typically): \n

    \n     $75.00 per Giga Byte   + \n

    \n     ₹10.00 convenience charge per Giga Byte\n
    \n   NOTE: \n

    \n   1 Page Composite has:\n

    \n     1 image file and can have upto 1 audio\n

    \n      (.html) file per record\n

    \n   2 Page Graduation Folder has:\n

    \n     2 image files and can have upto 2 audio\n

    \n      (.html) files per record\n
    \n \n \n \n
    \n }\n\n\n\n\n
    \n
    \n\n );\n}\n\nexport default Mynavbar\n","import \"babel-polyfill\";\nimport React from \"react\";\nimport { render } from \"react-dom\";\nimport { Provider } from \"react-redux\";\nimport { applyMiddleware, createStore } from \"redux\";\nimport createLogger from \"redux-logger\";\nimport createSagaMiddleware from \"redux-saga\";\nimport rootSaga from \"../sagas\";\nimport AdukkuApp from \"../reducers/product_reducers\";\nimport ProductListContainer from \"../containers/ProductListContainer\";\n\n//const logger = createLogger({});\nconst sagaMiddleware = createSagaMiddleware();\n//const store = createStore(AdukkuApp, applyMiddleware(logger, sagaMiddleware)); // Bala\nconst store = createStore(AdukkuApp, applyMiddleware(sagaMiddleware));\nsagaMiddleware.run(rootSaga);\nclass MyProducts extends React.Component {\n componentDidMount() {\n let user_role = document.getElementById(\"user_role\");\n user_role = user_role.innerHTML;\n // this.setState({ role: user_role });\n }\n render() {\n return (\n
    \n \n \n \n
    \n );\n }\n}\nexport default MyProducts;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport ProductDLContainer from \"../containers/ProductDLContainer\";\nimport ProductDataContainer from \"../containers/ProductDataContainer\";\nimport ProductImageUploadContainer from \"../containers/ProductImageUploadContainer\";\nimport ProductKeysContainer from \"../containers/product_keys/ProductKeyListContainer\";\nimport ProductSetListContainer from \"../containers/product_sets/ProductSetListContainer\";\nimport ProductLayoutListContainer from \"../containers/ProductLayoutListContainer\";\nimport AddUserContainer from \"../containers/AddUserContainer\";\nimport { ENDPOINTS } from \"../constants/endpoints\";\nimport { formDataToJSON } from \"../adukku_utils/array\";\n// \"../../adukku_utils/array\";\nimport { authorized, Authorized } from \"../adukku_utils/authorizeUser\";\nimport {\n Row,\n Col,\n Form,\n FormGroup,\n ControlLabel,\n FormControl,\n Modal,\n Fade,\n utils,\n Button,\n} from \"react-bootstrap\";\nimport { FieldGroup } from \"./bootstrap/Forms.FieldGroup\";\nimport FileMangerContainer from \"../containers/FileManagerContainer\";\nimport OrderContainer from \"../containers/orders/OrderContainer\";\nimport DownloadFilesContainer from \"../containers/orders/DownloadFilesContainer\";\n\nimport { TOGGLE_PRODUCT_EXPAND, TOGGLE, TOGGLE_EDIT_PRODUCT } from \"../actions\";\n\nclass Product extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n collapse: props.collapse,\n product: props.product,\n product_datalevels: props.product_datalevels,\n isEdit: false,\n dlExpand: false,\n role: props.role,\n isCopyProductClicked: false,\n name: props.product && props.product.name,\n numpages: props.product && props.product.numpages,\n isProductKeysExpanded: false,\n isProductSetsExpanded: false,\n isDataUploadExpanded: false,\n isImagesUploadExpanded: false,\n cloneable_sets: [],\n isEditProductClicked: false,\n voice: props.product && props.product.prtype,\n countryCode: this.getCookie(\"countryCode\"),\n is_preset: props.product && props.product.is_preset,\n category: props.product && props.product.category,\n sub_category: props.product && props.product.sub_category,\n expiry:\n props.product && props.product.expiry\n ? new Date(props.product.expiry).toISOString().slice(0, 16)\n : \"NOT SET\",\n }; // isEdit: props.isEdit};\n this.onEdit = this.onEdit.bind(this);\n this.handleSubmit = this.handleSubmit.bind(this);\n this.onDataLevelsClick = this.onDataLevelsClick.bind(this);\n this.onExpandToggle = this.onExpandToggle.bind(this);\n this.newDatalevel = this.newDatalevel.bind(this);\n this.onProductKeysToggle = this.onProductKeysToggle.bind(this);\n this.onProductSetsToggle = this.onProductSetsToggle.bind(this);\n }\n onExpandToggle(e) {\n if (e !== undefined) {\n e.stopPropagation();\n e.preventDefault();\n }\n this.props.toggleView({\n reducerKey: TOGGLE_PRODUCT_EXPAND,\n id: this.state.product.id,\n });\n }\n\n onEdit(e) {\n e.stopPropagation();\n e.preventDefault();\n this.props.toggleEdit({\n reducerKey: TOGGLE_EDIT_PRODUCT,\n id: this.state.product.id,\n });\n }\n handleSubmit(e) {\n e.stopPropagation();\n e.preventDefault();\n this.props.toggleEdit({\n reducerKey: TOGGLE_EDIT_PRODUCT,\n id: this.state.product.id,\n });\n }\n newDatalevel(e) {\n e.stopPropagation();\n e.preventDefault();\n this.props.newProductDatalevel(\n this.state.product.id,\n \"DL\" + this.state.product_datalevels.length\n );\n }\n onDataLevelsClick(e) {\n e.stopPropagation();\n e.preventDefault();\n const collapse = this.state.collapse;\n this.state.dlExpand = !this.state.dlExpand;\n this.props.getProductDatalevels(this.state.product.id);\n }\n UNSAFE_componentWillReceiveProps(nextProps) {\n this.setState(nextProps);\n if (nextProps.product.expiry) {\n this.setState({\n expiry:\n nextProps.product && nextProps.product.expiry\n ? new Date(nextProps.product.expiry).toISOString().slice(0, 16)\n : new Date().toISOString().slice(0, 16),\n });\n }\n // if (\n // this.state.product !== nextProps.product ||\n // this.state.product_datalevels !== nextProps.product_datalevels\n // ) {\n // this.setState(nextProps);\n // if (nextProps.product.expiry) {\n // this.setState({\n // expiry:\n // nextProps.product && nextProps.product.expiry\n // ? new Date(nextProps.product.expiry).toISOString().slice(0, 16)\n // : new Date().toISOString().slice(0, 16),\n // });\n // }\n // }\n }\n\n onProductKeysToggle(e) {\n e.stopPropagation();\n e.preventDefault();\n this.setState({\n isProductKeysExpanded: !this.state.isProductKeysExpanded,\n });\n if (!this.state.isProductKeysExpanded) this.props.getKeys(this.state.product.id);\n }\n\n onProductSetsToggle(e) {\n e.stopPropagation();\n e.preventDefault();\n this.setState({\n isProductSetsExpanded: !this.state.isProductSetsExpanded,\n });\n if (!this.state.isProductSetsExpanded) this.props.getSets(this.state.product.id);\n }\n\n componentDidMount() {\n this.props.getProductDatalevels(this.state.product.id);\n let preset_product_id = localStorage.getItem(\"preset_product_id\");\n if (\n preset_product_id &&\n this.state.product.id &&\n preset_product_id === this.state.product.id.toString()\n ) {\n this.onExpandToggle();\n // localStorage.removeItem(\"preset_product_id\");\n }\n\n let preset_url_product_id = document.getElementById(\"preset_product_id\");\n preset_url_product_id = preset_url_product_id ? preset_url_product_id.innerHTML : null;\n let user_role = document.getElementById(\"user_role\");\n user_role = user_role.innerHTML;\n\n this.setState({\n role: user_role,\n preset_product_id: preset_product_id || null,\n preset_url_product_id: preset_url_product_id,\n voice : this.state.voice == 'NORMAL' ? 'NO-VOICE' : this.state.voice\n });\n\n let expandedProduct = localStorage.getItem(\"expandedProduct\");\n expandedProduct = expandedProduct ? JSON.parse(expandedProduct) : {};\n this.props.getOrders({ status: \"pending\" });\n if (this.state.product.id == expandedProduct.productId) {\n this.setState({\n isProductSetsExpanded: true,\n });\n\n this.props.toggleView({\n reducerKey: TOGGLE_PRODUCT_EXPAND,\n id: expandedProduct.productId,\n });\n }\n }\n\n handleProductState = (productState) => {\n let { product } = this.state;\n if (productState !== \"batch_process\")\n productState = productState && productState === \"edit\" ? \"freeze\" : \"edit\";\n // let formData = new FormData();\n // formData.append(\"product_state\", productState);\n let endpoint = ENDPOINTS.products.update;\n let url = endpoint.uri;\n let method = endpoint.method;\n this.props.updateProduct(product.id, url, method, {\n product_state: productState,\n });\n product.product_state = productState;\n this.setState({ product: product });\n if (productState == \"batch_process\") {\n alert(\"Your request is received, queued and will be serviced at the earliest\\nCheck your mail for Files Generation Completion...\");\n }\n\n let expandedProduct = {\n productId: product.id,\n };\n //localStorage.setItem(\"expandedProduct\", JSON.stringify(expandedProduct));\n\n this.props.toggleView({\n reducerKey: TOGGLE_PRODUCT_EXPAND,\n id: expandedProduct.productId,\n });\n };\n\n _handleDeleteProduct(e) {\n e.preventDefault();\n e.stopPropagation();\n if (confirm(\"Are you sure you want to delete the Product set along with data?\")) {\n let payload = {\n id: this.state.product.id,\n product_id: this.state.product.id,\n };\n let endpoint = ENDPOINTS[\"products\"][\"delete\"];\n let url = endpoint.uri;\n let method = endpoint.method;\n this.props.deleteProduct(url, method, payload);\n } else {\n return;\n }\n }\n\n getCookie(cname) {\n let name = cname + \"=\";\n let decodedCookie = decodeURIComponent(document.cookie);\n let ca = decodedCookie.split(';');\n for(let i = 0; i {\n return [\n { label: \"SCHOOL\", value: \"SCHOOL\" },\n { label: \"COLLEGE\", value: \"COLLEGE\" },\n { label: \"UNIVERSITY\", value: \"UNIVERSITY\" },\n { label: \"PRE_SCHOOL\", value: \"PRE_SCHOOL\" },\n { label: \"PLAY_SCHOOL\", value: \"PLAY_SCHOOL\" },\n { label: \"INDIVIDUAL\", value: \"INDIVIDUAL\" },\n { label: \"STUDENT\", value: \"STUDENT\" },\n { label: \"ALUMNI\", value: \"ALUMNI\" },\n { label: \"TEACHER\", value: \"TEACHER\" },\n { label: \"CORPORATE\", value: \"CORPORATE\" },\n { label: \"DOCTORS-CLUB\", value: \"DOCTORS-CLUB\" },\n { label: \"SPORTS\", value: \"SPORTS\" },\n { label: \"BAR-ASSOCIATION\", value: \"BAR-ASSOCIATION\" },\n { label: \"MILITARY\", value: \"MILITARY\" },\n { label: \"NAVY\", value: \"NAVY\" },\n { label: \"NATURE-CLUB\", value: \"NATURE-CLUB\" },\n { label: \"WALLSTREET\", value: \"WALLSTREET\" },\n { label: \"MUSIC-CLUB\", value: \"MUSIC-CLUB\" },\n { label: \"AIRFORCE\", value: \"AIRFORCE\" },\n { label: \"GOVERNMENT\", value: \"GOVERNMENT\" },\n { label: \"EVENTS\", value: \"EVENTS\" },\n { label: \"OTHERS\", value: \"OTHERS\" },\n ];\n };\n\n getProductSubCategories = () => {\n return [\n { label: \"COMPOSITES\", value: \"COMPOSITES\" },\n { label: \"PICTURE_BOOKLET\", value: \"PICTURE_BOOKLET\" },\n { label: \"SPORTS_PICTURE_BOOKLET\", value: \"SPORTS_PICTURE_BOOKLET\" },\n { label: \"FOLDER\", value: \"FOLDER\" },\n { label: \"GRADUATION_FOLDER\", value: \"GRADUATION_FOLDER\" },\n { label: \"PORTRAIT\", value: \"PORTRAIT\" },\n { label: \"PASSPORT\", value: \"PASSPORT\" },\n { label: \"ID_CARD\", value: \"ID_CARD\" },\n { label: \"REPORT_CARD\", value: \"REPORT_CARD\" },\n { label: \"CERTIFICATES\", value: \"CERTIFICATES\" },\n { label: \"YEAR_BOOK\", value: \"YEAR_BOOK\" },\n { label: \"PAST_PRESENT\", value: \"PAST_PRESENT\" },\n { label: \"BUNDLE\", value: \"BUNDLE\" },\n { label: \"ALL_IN_ONE\", value: \"ALL_IN_ONE\" },\n { label: \"WEDDING\", value: \"WEDDING\" },\n { label: \"ANNIVERSARY\", value: \"ANNIVERSARY\" },\n { label: \"ENGAGEMENT\", value: \"ENGAGEMENT\" },\n { label: \"BIRTHDAY\", value: \"BIRTHDAY\" },\n { label: \"GRADUATION\", value: \"GRADUATION\" },\n { label: \"AUTOGRAPHS\", value: \"AUTOGRAPHS\" },\n { label: \"APPRECIATION\", value: \"APPRECIATION\" },\n { label: \"NEW JOB\", value: \"NEW JOB\" },\n { label: \"NEW HOUSE\", value: \"NEW HOUSE\" },\n { label: \"NEW BORN\", value: \"NEW BABY\" },\n { label: \"BABY SHOWER\", value: \"BABY SHOWER\" },\n { label: \"PROMOTION\", value: \"PROMOTION\" },\n { label: \"FAREWELL\", value: \"FAREWELL\" },\n { label: \"RETIREMENT\", value: \"RETIREMENT\" },\n { label: \"GET WELL\", value: \"GET WELL\" },\n { label: \"ACHIEVEMENT\", value: \"ACHIEVEMENT\" },\n { label: \"CONGRATULATIONS\", value: \"CONGRATULATIONS\" },\n { label: \"CONDOLENCES\", value: \"CONDOLENCES\" },\n ];\n };\n\n // More sub categories for Events\n\n getVoiceOptions = () => {\n if (this.state.countryCode == 'IN') {\n return [\n { label: \"NO-VOICE\", value: \"NORMAL\" },\n { label: \"VOICE-30SEC - Additional ₹200 per Record\", value: \"VOICE-30SEC\"},\n { label: \"VOICE-15SEC - Additional ₹127 per Record\", value: \"VOICE-15SEC\"},\n ];\n \n }\n else {\n return [\n { label: \"NO-VOICE\", value: \"NORMAL\" },\n { label: \"VOICE-30SEC - Additional $4 per Record\", value: \"VOICE-30SEC\"},\n ];\n }\n };\n\n handleCancelLayout = (e) => {\n e.preventDefault();\n e.stopPropagation();\n this.setState({\n isCopyProductClicked: false,\n });\n };\n\n getExpandJSX = (expandFlag) => {\n return (\n \n {expandFlag && }\n {!expandFlag && }\n \n );\n };\n\n handlePresetToggle = (e) => {\n this.setState({\n is_preset: !this.state.is_preset,\n category_id: this.state.is_preset ? this.state.category_id : \"\",\n });\n };\n\n getEditProductJSX = (isVisible) => {\n const product = this.state.product;\n const { name, is_preset, category, numpages, sub_category, expiry } = this.state;\n const style = {\n display: is_preset ? \"block\" : \"none\",\n };\n\n const productCategories = this.getProductCategories();\n const productSubCategories = this.getProductSubCategories();\n const voiceOptions = this.getVoiceOptions();\n\n if (isVisible) {\n return (\n {\n this.setState({\n isEditProductClicked: false,\n });\n }}\n >\n
    \n \n Edit Product\n \n \n {\n this.setState({ [name]: value });\n }}\n />\n \n {this.state.role === \"admin\" && (\n \n )}\n {\n this.setState({ [name]: value });\n }}\n >\n \n {productCategories.map((category) => {\n return (\n \n );\n })}\n \n {\n this.setState({ [name]: value });\n }}\n >\n \n {productSubCategories.map((scategory) => {\n return (\n \n );\n })}\n \n {\n if (value != this.state.voice) {\n if (this.state.voice!='NO-VOICE') {\n if (value == 'NORMAL' || value == 'VOICE-15SEC') {\n let alertText=\"*** WARNING ***\\nChanging Audio options will delete any and ALL of Audio Recordings for the Product\\nPlease confirm your choice carefully\"\n if (confirm(alertText)== false)\n return\n \n }\n }\n }\n this.setState({ [name]: value }, ()=>{value=this.state.voice});\n }}\n value={this.state.voice}\n >\n \n {voiceOptions.map((vo) => {\n return (\n \n );\n })}\n \n {this.state.role === \"admin\" && (\n {\n this.setState({ [name]: value });\n }}\n />\n )}\n \n \n \n {/* {\n this.setState({\n isEditProductClicked: false,\n });\n }}\n >\n Cancel\n */}\n \n
    \n \n );\n }\n };\n\n handleEditProduct = (e) => {\n // this.se\n e.preventDefault();\n e.stopPropagation();\n const { product } = this.state;\n let endpoint = ENDPOINTS.products.update;\n let url = endpoint.uri;\n let method = endpoint.method;\n\n let formData = formDataToJSON(new FormData(e.target));\n formData.name = formData.name.trim()\n formData.is_preset = this.state.is_preset;\n formData.prtype = \n this.state.voice == 'NO-VOICE' ? 'NORMAL' : this.state.voice;\n this.props.updateProduct(product.id, url, method, formData);\n this.setState({\n isEditProductClicked: false,\n });\n };\n\n render() {\n const product = this.state.product;\n const role = product.product_state == \"edit\" ? this.state.role : \"viewer\";\n const psets = product.setnos;\n const datalevels = this.state.product_datalevels;\n const collapse = this.state.collapse;\n const isEdit = this.state.isEdit;\n const dlExpand = this.state.dlExpand;\n const preset_url_product_id = this.state.preset_url_product_id;\n var datalevelsDOM = null;\n const { view_user, view_and_pay_user } = this.state.product;\n\n let user_role = document.getElementById(\"user_role\");\n user_role = user_role.innerHTML;\n\n const cloneProductJSX = (\n this._handleCloneProduct(e, product.id, e.target.name.value)}\n >\n
    \n {\n this.setState({ name: value });\n }}\n className=\"form-control dlname\"\n placeholder=\"Enter New Product Name\"\n required=\"required\"\n defaultValue={null}\n />\n
    \n {psets &&\n Object.keys(psets).map((pset) => {\n return (\n
    \n \n {\n let setnos = this.state.cloneable_sets;\n if (checked) {\n setnos.push(value);\n } else {\n setnos.pop(value);\n }\n this.setState({ cloneable_sets: setnos });\n }}\n value={psets[pset]}\n className=\"form-control dlname override_checkbox\"\n />\n
    \n );\n })}\n \n this.handleCancelLayout(e, product.id)}\n >\n Cancel\n \n \n );\n\n if (collapse == true) {\n let orders = product.order || [];\n let isAnyPaidOrders = orders.some((o) => o.status == \"paid\");\n datalevelsDOM = (\n
      \n
    • \n \n {this.getExpandJSX(dlExpand)} Data levels & Attributes\n \n
        \n {dlExpand &&\n datalevels != null &&\n datalevels.length > 0 &&\n datalevels.map((datalevel) => {\n return (\n {\n this.setState(\n {\n dlExpand: true,\n },\n () => {\n this.props.getProductDatalevels(this.state.product.id);\n }\n );\n }}\n />\n );\n })}\n \n {dlExpand && (\n
      • \n Create New Data level\n
      • \n )}\n \n
      \n
    • \n
    • \n this.onProductKeysToggle(e)}>\n {this.getExpandJSX(this.state.isProductKeysExpanded)} Product Set Keys\n \n {this.state.isProductKeysExpanded && (\n \n )}\n
    • \n {/* \n \n */}\n \n
    • \n \n {this.getExpandJSX(this.state.isProductSetsExpanded)} Product Sets\n \n {this.state.isProductSetsExpanded && (\n \n )}\n
    • \n\n \n {product.product_state === \"edit\" && (\n
    • \n {\n e.stopPropagation();\n this.setState({\n isDataUploadExpanded: !this.state.isDataUploadExpanded,\n });\n }}\n >\n {this.getExpandJSX(this.state.isDataUploadExpanded)} Data{\" \"}\n \n {this.state.isDataUploadExpanded && (\n \n )}\n
    • \n )}\n {/* {product.product_state === \"edit\" && (\n
    • \n {\n e.stopPropagation();\n this.setState({\n isImagesUploadExpanded: !this.state\n .isImagesUploadExpanded,\n });\n }}\n >\n {this.getExpandJSX(this.state.isImagesUploadExpanded)} Images{\" \"}\n \n {this.state.isImagesUploadExpanded && (\n \n )}\n
    • \n )} */}\n {product.product_state === \"edit\" && !preset_url_product_id && (\n \n )}\n \n \n \n {/*console.log(\n [preset_url_product_id ? role : user_role, product.product_role],\n \"auth roles::::\"\n )*/}\n {(product.product_state === \"edit\" || product.product_state === \"completed\") && (\n \n )}\n{/* Bala */}\n {product.product_state === \"completed\" && (\n \n \n )}\n {product.product_state === \"completed\" && (\n \n )}\n {/*
    • \n \n Orders\n \n
    • */}\n {(product.product_state == \"edit\" ||\n product.product_state == \"freeze\" ||\n product.product_state == \"completed\") && (\n
    • \n {\n this.handleProductState(product.product_state);\n }}\n >\n {this.state.product.product_state == \"freeze\" ||\n this.state.product.product_state == \"completed\"\n ? \"Unfreeze Product\"\n : \"Freeze Product\"}\n \n
    • \n )}\n {product.product_state == \"freeze\" && (\n
    • \n {\n this.handleProductState(\"batch_process\");\n }}\n >\n Prepare Product Files for the Product\n \n
    • \n )}\n {product.product_state == \"batch_process\" && (\n
    • \n Batch process in progress\n
    • \n )}\n \n {!this.state.is_preset && product.product_state == \"completed\" && (\n \n {/* */}\n \n \n )}\n {product.product_state == \"completed\" &&\n product.product_role != \"viewer\" &&\n isAnyPaidOrders && (\n \n \n \n )}\n {product.product_state == \"completed\" && isAnyPaidOrders && (\n \n \n \n )}\n
    \n );\n }\n const readOnly = (\n \n \n {this.getExpandJSX(collapse)} {product.name} \n \n \n new Date().getTime() + 3 * 86400000 ? \"green\" : \"red\"}} onClick={this.onExpandToggle}>\n {new Date(product.expiry) > new Date().getTime() + 3 * 86400000 ? \"- expires on ( \" : \"- expires soon on ( \"}\n {product.expiry ? new Date(product.expiry).toLocaleDateString() : \"NOT SET\"}\n {\" )\"}\n \n\n {this.state.isCopyProductClicked && cloneProductJSX}\n\n {!this.state.isCopyProductClicked && (\n {\n this._handleCloneProduct(e, product.id);\n }}\n // confirm=\"Are you sure you want to delete the layout?\"\n >\n \n \n )}\n \n {!this.state.isEditProductClicked && (\n {\n e.stopPropagation();\n e.preventDefault();\n this.setState({\n isEditProductClicked: !this.state.isEditProductClicked,\n });\n }}\n >\n \n \n )}\n {\n this._handleDeleteProduct(e);\n }}\n >\n \n \n \n {this.state.isEditProductClicked && this.getEditProductJSX(this.state.isEditProductClicked)}\n \n );\n const editOnly = (\n
    \n
    \n \n
    \n \n
    \n );\n if (product != null && (!preset_url_product_id || preset_url_product_id == product.id)) {\n // return
  • {isEdit ? editOnly : readOnly}\n // { isEdit ? null : Edit }\n // {datalevelsDOM}\n //
  • ;\n return (\n
  • \n {isEdit ? editOnly : readOnly}\n {datalevelsDOM}\n
  • \n );\n } else {\n return null;\n }\n }\n}\n\nProduct.propTypes = {\n id: PropTypes.number.isRequired,\n name: PropTypes.string.isRequired,\n collapse: PropTypes.bool.isRequired,\n product_datalevels: PropTypes.array,\n};\n\nexport default Product;\n","import React, { useState } from 'react';\nimport ProductMynavbar from './ProductNavbar';\nexport class ProductComposzNavbar extends React.Component {\n \n constructor(props) {\n super(props)\n this.state = {\n windowWidth: window.innerWidth,\n windowHeight: window.innerHeight\n };\n document.cookie = \"cartCounter=25;\";\n }\n\n componentDidMount() {\n window.addEventListener(\"resize\", this.handleResize);\n }\n\n componentWillUnmount() {\n window.removeEventListener(\"resize\", this.handleResize);\n}\n\n handleResize = e => {\n const windowWidth = window.innerWidth;\n const windowHeight = window.innerHeight;\n \n this.setState(prevState => {\n return {\n windowWidth,\n windowHeight,\n };\n });\n };\n \n Fnavbar = () => {\n let Usernavbar = ProductMynavbar(this.props.user_id, this.props.user_name, this.props.user_email, this.props.has_view_products)\n return Usernavbar\n }\n\n render() {\n return (\n \n \n \n );\n }\n}\n\nexport default ProductComposzNavbar\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport ProductDLAttrContainer from \"../containers/ProductDLAttrContainer\";\nimport { FormGroup, ControlLabel, FormControl, Button } from \"react-bootstrap\";\nimport { TOGGLE_DATALEVEL_EXPAND, TOGGLE, TOGGLE_EDIT_DATALEVEL } from \"../actions\";\nimport { formDataToJSON } from \"../adukku_utils/array\";\nimport { authorized, Authorized } from \"../adukku_utils/authorizeUser\";\n\nclass ProductDL extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n product_datalevel: props.product_datalevel,\n collapse: props.collapse,\n isEdit: props.isEdit,\n role: props.role,\n product_role: props.product_role,\n };\n this.onExpandToggle = this.onExpandToggle.bind(this);\n // this.onEdit = this.onEdit.bind(this);\n this.onDelete = this.onDelete.bind(this);\n this.handleSubmit = this.handleSubmit.bind(this);\n this.onCreateCancel = this.onCreateCancel.bind(this);\n this.newAttribute = this.newAttribute.bind(this);\n }\n\n onExpandToggle(e) {\n e.stopPropagation();\n e.preventDefault();\n this.props.toggleView({\n reducerKey: TOGGLE_DATALEVEL_EXPAND,\n id: this.state.product_datalevel.id,\n });\n }\n onEdit(e) {\n e.stopPropagation();\n e.preventDefault();\n this.props.toggleView({\n reducerKey: TOGGLE_EDIT_DATALEVEL,\n id: this.state.product_datalevel.id,\n });\n }\n onDelete(e) {\n e.stopPropagation();\n e.preventDefault();\n if (confirm(\"Are you sure ?\")) {\n this.props.deleteProductDataLevel(this.state.product_datalevel.id);\n }\n }\n onCreateCancel(e) {\n e.stopPropagation();\n e.preventDefault();\n if (confirm(\"Are you sure ?\")) {\n this.props.deleteProductDataLevel(this.state.product_datalevel.id, false);\n }\n }\n handleSubmit(e) {\n e.stopPropagation();\n e.preventDefault();\n let formData = formDataToJSON(new FormData(e.target));\n formData.dlname = formData.dlname.trim()\n let datalevel = this.state.product_datalevel;\n datalevel.dlname = formData.dlname;\n datalevel.dltype = formData.dltype;\n datalevel.id = datalevel.product_id + \"/datalevels/\" + datalevel.dlname;\n this.props.createProductDatalevel(datalevel.product_id, datalevel.dlname, datalevel.dltype);\n this.props.setExpand();\n }\n\n onInputClick(e) {\n e.stopPropagation();\n e.preventDefault();\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (this.state !== nextProps) {\n this.setState(nextProps);\n }\n }\n\n newAttribute(e) {\n e.stopPropagation();\n e.preventDefault();\n let dl = this.state.product_datalevel;\n let payload = {\n product_id: dl.product_id,\n dlname: dl.dlname,\n name: \"ATTR\" + dl.attributes.length,\n type: \"text\",\n };\n payload[\"id\"] =\n payload.product_id + \"/datalevels/\" + payload.dlname + \"/attributes/\" + payload.name;\n this.props.newDatalevelAttribute(dl.id, payload);\n }\n\n getExpandJSX = (expandFlag) => {\n return (\n \n {expandFlag && }\n {!expandFlag && }\n \n );\n };\n\n render() {\n const { product_role, role } = this.state;\n const datalevel = this.state.product_datalevel;\n const attributes = datalevel.attributes;\n const collapse = this.state.collapse;\n let attributesDOM = null;\n const isMain = datalevel.dltype == \"main\";\n let label = datalevel.dlname;\n if (isMain) {\n label = label + \"-- main\";\n }\n let readOnlyDOM = [\n \n {this.getExpandJSX(collapse)} {label}\n ,\n\n \n \n \n \n ,\n ];\n const isEdit = !this.props.isEdit ? false : this.state.isEdit;\n const editOnlyDOM = (\n
    \n
    \n \n
    \n \n \n {[\"\", \"main\", \"other\"].map((type, i) => {\n return (\n \n );\n })}\n \n \n \n \n Cancel\n \n
    \n );\n\n if (collapse == true) {\n attributesDOM = (\n \n );\n }\n if (datalevel == null) {\n return null;\n }\n return (\n
  • \n {!isEdit && readOnlyDOM}\n {isEdit && editOnlyDOM}\n {attributesDOM}\n
  • \n );\n }\n}\n\nProductDL.propTypes = {\n product: PropTypes.shape({\n dlname: PropTypes.string.isRequired,\n product_id: PropTypes.number.isRequired,\n collapse: PropTypes.bool.isRequired,\n }),\n attributes: PropTypes.array,\n};\n\nexport default ProductDL;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { TOGGLE_EDIT_DATALEVEL_ATTRIBUTE } from \"../actions\";\nimport { formDataToJSON } from \"../adukku_utils/array\";\nimport { FormGroup, ControlLabel, FormControl, Button } from \"react-bootstrap\";\nimport { authorized, Authorized } from \"../adukku_utils/authorizeUser\";\n\nclass ProductDLAttr extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n attribute: props.attribute,\n isEdit: props.isEdit,\n role: props.role,\n product_role: props.product_role,\n };\n this.onDelete = this.onDelete.bind(this);\n this.toggleEdit = this.toggleEdit.bind(this);\n this.handleSubmit = this.handleSubmit.bind(this);\n }\n\n onDelete(e) {\n e.stopPropagation();\n e.preventDefault();\n if (confirm(\"Are you sure ?\")) {\n this.props.deleteDataLevelAttribute(this.state.attribute.id);\n }\n }\n\n toggleEdit(e) {\n e.stopPropagation();\n e.preventDefault();\n this.props.deleteDataLevelAttribute(this.state.attribute.id, false);\n // this.setState(Object.assign({}, this.state, {isEdit: !this.state.isEdit}))\n }\n\n handleSubmit(e) {\n e.stopPropagation();\n e.preventDefault();\n let formData = formDataToJSON(new FormData(e.target));\n formData.name = formData.name.trim()\n let attribute = Object.assign({}, {}, this.state.attribute);\n let product_id = attribute.product_id;\n let dlname = attribute.dlname;\n attribute.name = formData.name;\n attribute.type = formData.type;\n let dlId = product_id + \"/datalevels/\" + dlname;\n this.props.createDataLevelAttribute(dlId, attribute); // : this.props.updateDataLevelAttribute(attribute)\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (this.state !== nextProps) {\n this.setState(nextProps);\n }\n }\n\n render() {\n const { role, product_role } = this.state;\n const attr = this.state.attribute;\n const isEdit = this.state.isEdit;\n if (attr == null) {\n return null;\n }\n const readOnly = (\n \n {attr.name}\n {attr.type}\n {/* Edit*/}\n \n \n \n \n \n \n \n \n );\n const editOnly = (\n \n \n
    \n
    \n \n
    \n \n \n {[\"\", \"IMAGE\", \"TEXT\"].map((type, i) => {\n return (\n \n );\n })}\n \n \n \n \n Cancel\n \n
    \n \n \n );\n\n return (\n \n {isEdit ? editOnly : readOnly}\n
    \n );\n }\n}\n\nProductDLAttr.propTypes = {\n attribute: PropTypes.shape({\n product_id: PropTypes.number.isRequired,\n dlname: PropTypes.string.isRequired,\n name: PropTypes.string.isRequired,\n type: PropTypes.string.isRequired,\n }),\n};\n\nexport default ProductDLAttr;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { ENDPOINTS } from \"../constants/endpoints\";\nimport EditProductDataContainer from \"../containers/EditProductDataContainer\";\n\nexport default class ProductData extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n isUploading: false,\n UploadinDataLevel: \"\",\n product: props.product,\n product_datalevels: props.product_datalevels,\n uploadedFileNames: {}\n };\n this.handleSubmit = this.handleSubmit.bind(this);\n this.fileInput = React.createRef();\n }\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (nextProps.product !== this.state.product) {\n this.setState({ product: nextProps.product });\n }\n if (nextProps.product_datalevels !== this.state.product_datalevels) {\n this.setState({ product_datalevels: nextProps.product_datalevels });\n }\n }\n handleUploadFile = (e, index) => {\n let temp = {};\n temp[index] = e.target.files[0].name;\n this.setState({ uploadedFileNames: { ...this.state.uploadedFileNames, ...temp } });\n }\n\n handleSubmit(e, dlname) {\n e.preventDefault();\n this.setState({ isUploading: true, UploadinDataLevel: dlname, });\n // alert(\n // `Selected file - ${\n // this.fileInput.current.files[0].name\n // }`\n // );\n let $f = $(e.target);\n const product = this.state.product;\n const that = this;\n let file = $f.find(\"input:file\")[0].files[0];\n let template_url = ENDPOINTS.csv.upload;\n template_url = template_url\n .replace(\":product_id\", product.id)\n .replace(\":dlname\", dlname);\n let f2 = new FormData(e.target);\n f2.append(\"file\", file);\n let $ajax = $.ajax({\n url: template_url,\n type: \"POST\",\n method: \"POST\",\n data: f2,\n processData: false,\n contentType: false\n });\n $ajax.done(function () {\n that.setState({ isUploading: false, UploadinDataLevel: \"\", });\n alert(\"Successfully, uploaded file\");\n });\n $ajax.fail(function (jqXHR, textStatus, errorThrown) {\n that.setState({ isUploading: false, UploadinDataLevel: \"\", });\n if (jqXHR && jqXHR.responseText) alert(jqXHR.responseText)\n else {\n if (jqXHR.status == 406) {\n alert(\"File size is in excess of 5MB\\n\\nPlease Upload file again with size less than 5MB\");\n }\n else\n alert(\"An internal server error occured\");\n }\n });\n $ajax.always(function () {\n $f.find(\"input:file\").val(\"\");\n });\n }\n render() {\n const product = this.state.product;\n const datalevels = this.state.product_datalevels;\n let template_url = ENDPOINTS.csv.download;\n template_url = template_url.replace(\":product_id\", product.id);\n if (datalevels == null || product == null) {\n return (\n
      \n
    • \n Internal error occured\n
    • \n
    \n );\n }\n return (\n
      \n {datalevels.map((p, i) => {\n return (\n
    • \n \n \n \n \n \n \n \n \n \n {/* \n \n \n */}\n \n
      {p.dlname}\n \n\n \n \n \n \n \n {(this.state.isUploading && this.state.UploadinDataLevel == p.dlname) ?
      Uploading Data...
      : \n {\n this.handleSubmit(e, p.dlname);\n }}\n encType=\"multipart/form-data\"\n >\n \n \n \n }\n
      \n {this.state.uploadedFileNames[p.dlname]}\n
      {p.dlname}\n \n
      \n
    • \n );\n })}\n
    \n );\n }\n}\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { ENDPOINTS } from \"../constants/endpoints\";\n\n\nexport default class ProductImageUpload extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n product: props.product,\n product_datalevels: props.product_datalevels,\n uploadedImages: {},\n uploadedImageNames: {},\n };\n this.handleSubmit = this.handleSubmit.bind(this);\n }\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (nextProps.product !== this.state.product) {\n this.setState({ product: nextProps.product });\n }\n if (nextProps.product_datalevels !== this.state.product_datalevels) {\n this.setState({ product_datalevels: nextProps.product_datalevels });\n }\n }\n\n componentDidMount() {\n const { product_datalevels } = this.state;\n if (product_datalevels && product_datalevels.length > 0) {\n let uploadedImages = {};\n let uploadedImageNames = {};\n product_datalevels.map((datalevel) => {\n uploadedImages[datalevel.dlname] = [];\n uploadedImageNames[datalevel.dlname] = [];\n });\n this.setState({\n uploadedImages,\n uploadedImageNames,\n });\n }\n }\n\n uploadImages = (dlname) => {\n const that = this;\n const product = this.state.product;\n const uploadedImages = this.state.uploadedImages;\n\n let template_url = ENDPOINTS.images.upload;\n template_url = template_url\n .replace(\":product_id\", product.id)\n .replace(\":dlname\", dlname);\n let formData = new FormData();\n for (let index = 0; index < uploadedImages[dlname].length; index++) {\n formData.append(\"files[]\", uploadedImages[dlname][index]);\n }\n let $ajax = $.ajax({\n url: template_url,\n type: \"POST\",\n method: \"POST\",\n data: formData,\n processData: false,\n contentType: false,\n });\n $ajax.done(function () {\n alert(\"Successfully, uploaded file\");\n });\n $ajax.fail(function (jqXHR, textStatus, errorThrown) {\n if (jqXHR.status == 406) {\n alert(\"File size is in excess of 5MB\\n\\nPlease Upload file again with size less than 5MB\");\n }\n else\n alert(\"An internal server error occured\");\n });\n $ajax.always(function () {\n // $f.find(\"input:file\").val(\"\");\n uploadedImages[dlname] = [];\n that.setState({ uploadedImages: uploadedImages });\n });\n };\n\n handleSubmit(e, dlname) {\n e.preventDefault();\n const product = this.state.product;\n let uri = ENDPOINTS.csv.uploaded_data;\n let uploadedImages = this.state.uploadedImages;\n let uploadedImageNames = this.state.uploadedImageNames;\n let imageNamesMatched = false;\n uri = uri.replace(\":product_id\", product.id).replace(\":dlname\", dlname);\n this.uploadImages(dlname);\n // return fetch(uri, {\n // method: \"GET\",\n // headers: {\n // \"content-type\": \"application/json\"\n // }\n // })\n // .then(response => response.json())\n // .then(response => {\n // let image_attribute_name =\n // response.image_attributes && response.image_attributes.name;\n // if (\n // image_attribute_name === null ||\n // image_attribute_name === undefined\n // ) {\n // return alert(\"Add Data for \" + dlname);\n // }\n // let studentImageNames = [];\n // if (\n // response.upload_data &&\n // response.upload_data.length === uploadedImages[dlname].length\n // ) {\n // response.upload_data.forEach(item => {\n // if (item.data[image_attribute_name]) {\n // studentImageNames.push(item.data[image_attribute_name]);\n // }\n // });\n // for (\n // let index = 0;\n // index < uploadedImageNames[dlname].length;\n // index++\n // ) {\n // const uploadedImageName = uploadedImageNames[dlname][index];\n // if (studentImageNames.includes(uploadedImageName)) {\n // imageNamesMatched = true;\n // }\n // }\n // if (imageNamesMatched) this.uploadImages(dlname);\n // }\n // else {\n // return alert(\"no of students doesn't match no. of Images uploaded\");\n // }\n // return response;\n // });\n }\n\n fileSelectedHandler = (e, dlname) => {\n let uploadedImages = this.state.uploadedImages;\n let uploadedImageNames = this.state.uploadedImageNames;\n let files = e.target.files;\n for (let index = 0; index < files.length; index++) {\n let file_size = Math.floor(files[index].size / (1024 * 1024));\n if (file_size > 4) {\n // e.target.files = null;\n alert(\n \"file size should be less than 4MB, Skippping File:\" +\n files[index].name\n );\n } else {\n uploadedImages[dlname].push(files[index]);\n uploadedImageNames[dlname].push(files[index].name);\n }\n }\n this.setState({\n uploadedImages: uploadedImages,\n uploadedImageNames: uploadedImageNames,\n });\n };\n\n removeImage = (e, dlname) => {\n //console.log(e.target);\n let imageName = e.target.id;\n let { uploadedImages, uploadedImageNames } = this.state;\n uploadedImages[dlname] = uploadedImages[dlname].filter(\n (fag) => fag.name !== imageName\n );\n uploadedImageNames[dlname] = uploadedImageNames[dlname].filter(\n (fag) => fag.name !== imageName\n );\n this.setState({\n uploadedImages: uploadedImages,\n uploadedImageNames: uploadedImageNames,\n });\n };\n\n getUploadedImages = (dlname) => {\n const uploadedImages = this.state.uploadedImages;\n let imageList = [];\n if (uploadedImages && uploadedImages[dlname])\n for (let index = 0; index < uploadedImages[dlname].length; index++) {\n const element = uploadedImages[dlname][index];\n imageList.push(\n
    \n {element.name}\n \n {\n this.removeImage(e, dlname);\n }}\n style={{ width: \"18px\", marginLeft: \"20px\", cursor: \"pointer\" }}\n />\n \n
    \n );\n }\n return imageList;\n };\n\n render() {\n const product = this.state.product;\n const datalevels = this.state.product_datalevels;\n let template_url = ENDPOINTS.csv.download;\n\n template_url = template_url.replace(\":product_id\", product.id);\n if (datalevels == null || product == null) {\n return (\n
      \n
    • \n Internal error occured\n
    • \n
    \n );\n }\n return (\n
      \n {datalevels.map((p, i) => {\n return (\n
    • \n \n \n \n \n \n \n \n \n \n \n \n
      {p.dlname}\n {\n this.handleSubmit(e, p.dlname);\n }}\n enctype=\"multipart/form-data\"\n style={{\n display: \"flex\",\n marginBottom: 0,\n paddingLeft: \"10px\",\n }}\n >\n {\n this.fileSelectedHandler(e, p.dlname);\n }}\n accept=\"image/x-png,image/jpeg\"\n style={{ display: \"none\" }}\n id={\"upload_images\" + p.dlname}\n />\n \n

      \n Add images\n \n \n \n

      \n \n \n \n
      Uploaded Image files:{this.getUploadedImages(p.dlname)}
      \n
    • \n );\n })}\n
    \n );\n }\n}\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport AddLayoutContainer from \"../containers/layouts/AddLayoutContainer\";\nimport LayoutListContainer from \"../containers/layouts/LayoutListContainer\";\n\nexport default class ProductLayoutList extends React.Component {\n constructor(props) {\n super(props);\n this.state = { ...props };\n this.toggleExpand = this.toggleExpand.bind(this);\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (this.state !== nextProps) {\n this.setState(nextProps);\n }\n }\n\n // componentWillMount() {\n // let user_role = document.getElementById(\"user_role\");\n // user_role = user_role.innerHTML;\n // this.setState({ role: user_role });\n // }\n\n componentDidMount() {\n let expandedProduct = localStorage.getItem(\"expandedProduct\");\n expandedProduct = expandedProduct ? JSON.parse(expandedProduct) : {};\n\n if (\n expandedProduct.layoutId &&\n expandedProduct.productId == this.state.product.id &&\n !expandedProduct.isSet\n ) {\n this.setState({\n expand: true,\n });\n }\n }\n\n toggleExpand(e) {\n e.stopPropagation();\n this.setState(\n Object.assign({}, this.state, { expand: !this.state.expand })\n );\n }\n\n getExpandJSX = (expandFlag) => {\n return (\n \n {expandFlag && }\n {!expandFlag && }\n \n );\n };\n\n render() {\n const { role } = this.state;\n const isExpand = this.state.expand;\n return (\n
  • \n \n {this.getExpandJSX(isExpand)} Layouts\n \n {isExpand && (\n \n )}\n {(role === \"admin\" || role === \"owner\") && isExpand && (\n \n )}\n
  • \n );\n }\n}\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport ProductContainer from \"../containers/ProductContainer\";\nimport AddProductContainer from \"../containers/AddProductContainer\";\nimport FileMangerContainer from \"../containers/FileManagerContainer\";\nimport UserStorageContainer from \"../containers/UserStorageContainer\";\nimport AdminContainer from \"../containers/AdminContainer\";\nimport { ENDPOINTS } from \"../constants/endpoints\";\n\nexport default class ProductList extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n products: [],\n };\n }\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (nextProps.products !== this.state.products) {\n this.setState({ products: nextProps.products });\n }\n }\n UNSAFE_componentWillMount() {\n let user_role = document.getElementById(\"user_role\");\n user_role = user_role.innerHTML;\n let preset_product_id = document.getElementById(\"preset_product_id\");\n preset_product_id = preset_product_id ? preset_product_id.innerHTML : null;\n user_role = preset_product_id ? \"preset\" : user_role;\n localStorage.setItem(\"preset_product_id\", preset_product_id);\n this.setState({\n role: user_role,\n preset_product_id: preset_product_id || null,\n });\n if (preset_product_id) {\n this.props.getProducts({ type: \"presets\" });\n } else this.props.getProducts();\n }\n\n resetDefaults = (e) => {\n e.stopPropagation();\n e.preventDefault();\n let uri = ENDPOINTS.user_storages.update_defaults.uri;\n let that = this;\n let formData = new FormData();\n formData.append(\"type\", \"reset_defults\");\n return fetch(uri, {\n method: \"PUT\",\n body: formData,\n })\n .then((response) => response.json())\n .then((response) => {\n if (response.data == \"success\") alert(\"Space reset successful\");\n });\n };\n\n render() {\n const { role, preset_product_id } = this.state;\n return (\n
    \n {\" \"}\n \n {preset_product_id ? \"Presets\" : \"My Products\"}\n \n
      \n {/* {this.state.products.map((p, i) => (\n \n ))} */}\n {this.state.products.map((p, i) => {\n if (p.is_archived) {\n return null;\n } else {\n return (\n \n );\n }\n })}\n\n {(role === \"admin\" || role === \"owner\") && (\n \n )}\n {!preset_product_id && (\n \n \n \n {role === \"admin\" && (\n \n )}\n {role === \"admin\" && (\n
    • \n {\"Reset Defaults\"}\n
    • \n )}\n
      \n )}\n
    \n
    \n );\n }\n}\nProductList.propTypes = {\n products: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.number.isRequired,\n name: PropTypes.string,\n collapse: PropTypes.bool,\n product_datalevels: PropTypes.array,\n })\n ),\n};\n","import React, { useState } from 'react';\nimport { Navbar, Nav, NavItem, MenuItem, NavDropdown, Dropdown } from 'react-bootstrap';\nimport logo from 'images/Composz-logo-white-trans.png';\nimport logoBlack from 'images/Composz-logo-black-trans.png';\nimport profile from 'images/blankProfile.png';\nimport CartState from \"../context/cart/CartState\";\nimport CartContext from \"../context/cart/CartContext\";\nimport { useContext } from \"react\";\nimport { Container } from 'react-bootstrap/lib/Tab';\n\n\nfunction ProductMynavbar (user_id, user_name, user_email, has_view_products) {\n\n // Extract itemscount from CartContext\n const { cartItems } = useContext(CartContext);\n\n const [show3, setShow3] = useState(false);\n const showDropdown3 = (e)=>{\n setShow3(true);\n }\n const hideDropdown3 = e => {\n setShow3(false);\n }\n \n const [show2, setShow2] = useState(false);\n const showDropdown2 = (e)=>{\n setShow2(true);\n }\n const hideDropdown2 = e => {\n setShow2(false);\n }\n \n const [show1, setShow1] = useState(false);\n const showDropdown1 = (e)=>{\n setShow1(true);\n setShow(false);\n }\n const hideDropdown1 = e => {\n setShow1(false);\n }\n \n const [show, setShow] = useState(false);\n const showDropdown = (e)=>{\n setShow(true);\n }\n const hideDropdown = e => {\n setShow(false);\n }\n const toggleShow = e => {\n setShow(!show)\n setShow1(false)\n setShow2(false)\n setShow3(false)\n }\n const toggleShow1 = e => {\n setShow1(!show1)\n setShow(false)\n setShow2(false)\n setShow3(false)\n }\n const toggleShow2 = e => {\n setShow2(!show2)\n setShow(false)\n setShow1(false)\n setShow3(false)\n }\n const toggleShow3 = e => {\n setShow3(!show3)\n setShow(false)\n setShow1(false)\n setShow2(false)\n }\n\n const handleToggle = e => {\n ;; // do nothing\n } \n \n\n return (\n window.innerWidth > 450 ?\n \n \n \n \n {user_id!=-1?\n \n :\n \n }\n {user_id!=-1?\n \n : \n \n }\n \n \n \n :\n\n \n
    \n \n \n \n                      \n                      \n \n \n \n
    \n \n \n \n
    \n\n );\n}\n\nexport default ProductMynavbar\n","import React, {Component, useState, useEffect, Fragment} from 'react';\n\nexport function SPLoader() {\n\n const [text, setText] = useState('')\n const [showImg, setShowImg] = useState(true)\n\n // useEffect(() => {\n \n // setTimeout(() => {\n // setShowImg(false)\n // setText(\n // 'I waited for 3 seconds. Did you see the spinner?'\n // )\n // }, 3000)\n // }, [])\n\n return(\n
    \n {\n showImg? \n \n {/* */}\n \n

    Please wait...

    \n
    \n : (\n //

    {text}

    \n

    Completed

    \n )\n }\n
    \n )\n}\n\nexport default SPLoader","import React, { Component } from \"react\";\nimport ReactDOM from \"react-dom\";\n\nimport { ENDPOINTS } from \"../../constants/endpoints\";\n\nclass EventPayment extends Component {\n constructor(props) {\n super(props);\n this.state = { no_of_gb: 1, ...props };\n }\n UNSAFE_componentWillReceiveProps(nextProps) {}\n\n componentDidMount() {\n // uncomment below line to generate a image in the background\n // this.props.generateImage(this.state.product_id, this.state.setno);\n \n }\n\n amount = this.props.amount\n \n\n createOrder = (data, actions) => {\n if (this.state.pg_order_id) return this.state.pg_order_id;\n const payload = { \n event_id: this.props.event_id,\n no_of_wishers: this.props.no_of_wishers,\n price: this.props.price,\n //amount: this.props.amount,\n amount: this.amount,\n };\n let uri = ENDPOINTS.user_events.create.uri;\n return fetch(uri, {\n method: ENDPOINTS.user_events.create.method,\n headers: { \"content-type\": \"application/json\" },\n body: JSON.stringify(payload),\n })\n .then((response) => response.json())\n .then((response) => {\n this.setState({ pg_order_id: response.pg_order_id });\n return response.pg_order_id;\n });\n };\n\n onApprove = (data, actions) => {\n localStorage.setItem(\"isEventPaid\", \"true\");\n if (this.props.extraWishersFlg) \n localStorage.setItem(\"PayPalPaymentExtra\", true)\n else\n localStorage.setItem(\"PayPalPayment\", true); \n let uri = ENDPOINTS.user_events.capture.uri;\n //let storage_unit = this.props.storage_unit;\n let no_of_wishers = this.props.no_of_wishers;\n let price = this.props.price;\n let extraWishers = this.props.extraWishers;\n return fetch(uri, {\n method: ENDPOINTS.user_events.capture.method,\n headers: { \"content-type\": \"application/json\" },\n body: JSON.stringify({\n paypal_order_id: data.orderID,\n //storage_unit: storage_unit,\n no_of_wishers: no_of_wishers,\n price: price,\n extraWishersFlg: this.props.extraWishersFlg,\n }),\n })\n .then(function (res) {\n return res.json();\n })\n .then(function (data) {\n //localStorage.setItem(\"PayPalPayment\", true); \n //alert(\"Payment done successfully\\nClick 'Event Link' to get the link to share\");\n window.location.reload();\n return data.pg_order_id;\n });\n };\n\n onSuccess = (details, data) => {\n alert(\"payment done successfully\");\n };\n\n onCancel = (data, actions) => {\n localStorage.removeItem(\"isEventPaid\", \"true\");\n localStorage.removeItem(\"PayPalPaymentExtra\", \"true\")\n localStorage.removeItem(\"PayPalPayment\", \"true\")\n alert(\"Payment cancelled\");\n };\n\n onError = (data, actions) => {\n localStorage.removeItem(\"isEventPaid\", \"true\");\n localStorage.removeItem(\"PayPalPaymentExtra\", \"true\")\n localStorage.removeItem(\"PayPalPayment\", \"true\")\n alert(\"Something went wrong please try again later\");\n };\n\n render() {\n const PaypalButton = window.paypal.Buttons.driver(\"react\", {\n React,\n ReactDOM,\n });\n return (\n this.onApprove(e)}\n onSuccess={this.onSuccess}\n onError={this.onError}\n onCancel={this.onCancel}\n // style={style}\n />\n );\n }\n}\n\nexport default EventPayment;\n","import React, { Component } from \"react\";\nimport ReactDOM from \"react-dom\";\n\nimport { ENDPOINTS } from \"../../constants/endpoints\";\n\nclass RPEventPayment extends Component {\n constructor(props) {\n super(props);\n this.state = { no_of_wishers: 1, ...props };\n }\n UNSAFE_componentWillReceiveProps(nextProps) {}\n\n \n componentDidMount() {\n // uncomment below line to generate a image in the background\n // this.props.generateImage(this.state.product_id, this.state.setno);\n }\n\n \n amount = this.props.amount\n \n render() {\n \n const style = {\n color: \"green\"\n };\n\n const style3 = {\n color: \"white\",\n fontSize: 17,\n background: \"green\"\n };\n\n return (\n
    \n
    \n \n \n \n \n \n \n
    \n
    \n );\n }\n}\n\nexport default RPEventPayment;\n","import React from \"react\";\nimport { Modal } from \"react-bootstrap\";\n\n//import StoragePayment from \"./StoragePayment\";\nimport RPEventPayment from \"./RPEventPayment\";\n\nexport default class RPEventPaymentModal extends React.Component {\n \n render() {\n //const { no_of_gb, storage_unit, convenienceCharges } = this.props.fields;\n const { no_of_wishers, event_id, price } = this.props.fields;\n const convenienceCharges = 0.05;\n const gst = 0.18;\n\n return (\n 0}\n onHide={(e) => {''}}\n >\n \n Purchase This Event\n \n \n
      \n
    • \n \n Total Price for {no_of_wishers} Wishers: ₹{no_of_wishers * price}\n \n
    • \n
    • \n \n Convenience Charges : ₹\n {parseFloat(no_of_wishers * convenienceCharges).toFixed(2)}\n \n
    • \n
    • \n \n GST 18% : ₹\n {parseFloat((no_of_wishers * price + no_of_wishers * convenienceCharges) * gst).toFixed(2)}\n \n
    • \n
    • \n Grand Total: ₹ {Math.round(((no_of_wishers * price + no_of_wishers * convenienceCharges))+(no_of_wishers * price + no_of_wishers * convenienceCharges) * gst).toFixed(2)}\n
    • \n
    \n \n
    \n \n );\n }\n}\n","import React from \"react\";\nimport { Form, Col, Row, Modal, Button } from \"react-bootstrap\";\n\nimport html2canvas from \"html2canvas\";\nimport jsPDF from \"jspdf\";\n\nimport { FieldGroup } from \"../bootstrap/Forms.FieldGroup\";\nimport { ENDPOINTS } from \"../../constants/endpoints\";\nimport ThumbnailPreview from \"../layouts/ThumbnailPreview\";\n//import PaymentModal from \"./PaymentModal\";\n//import CCPaymentModal from \"./CCPaymentModal\";\nimport RPEventPaymentModal from \"./RPEventPaymentModal\";\nimport { formatCurrency } from \"../../adukku_utils/formatCurrency\";\n\nexport default class FileManager extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n no_of_gb:0,\n no_of_wishers: 0,\n event_id: this.props.event_id,\n price: this.props.price,\n overlay: props.overlay || { visible: false },\n is_preset_display: false,\n categories: props.categories,\n role: null,\n isFileManagerOpen: false,\n folders: [],\n user_products: {},\n folderHierarchy: {},\n basePath: \"\",\n show: false,\n currentFile: {},\n uploadedImages: { none: [] },\n uploadedImageNames: { none: [] },\n purchaseHistory: [],\n expiries: {},\n storage_unit: \"GIGA_BYTE\",\n currentOrder: null,\n isEditProductClicked: false,\n };\n }\n\n componentDidMount() {\n if (this.state.isFileManagerOpen) this.getPurchaseHistory();\n this.getPurchaseHistory();\n \n \n }\n\n \n getPurchaseHistory = () => {\n\n let uri = ENDPOINTS.user_events.list.uri;\n let that = this;\n return fetch(uri, {\n method: \"GET\",\n headers: { \"content-type\": \"application/json\" },\n })\n .then((response) => response.json())\n .then((response) => {\n that.setState({\n purchaseHistory: response.user_events,\n convenienceCharges: parseFloat(response.convience_charges.transaction_fee || 0.15),\n host_url: response.host_url,\n });\n console.log(\"user events purchased: \", response.user_events)\n });\n };\n\n openFileManager = () => {\n this.setState({ isFileManagerOpen: !this.state.isFileManagerOpen });\n //this.getPurchaseHistory();\n };\n\n handleSaveExpiry = (id) => {\n // if (!id) return;\n // let { expiries } = this.state;\n // let formData = new FormData();\n // formData.append(\"expires_on\", expiries[id]);\n // let url = ENDPOINTS.user_storages.update.uri;\n // url = url.replace(\":user_storage_id\", id);\n // let ajaxCall = fetch(url, {\n // method: \"PUT\",\n // body: formData,\n // });\n // return ajaxCall\n // .then((response) => response.json())\n // .then((response) => {\n // if (response.errors) {\n // alert(response.errors);\n // } else {\n // }\n // })\n // .catch((error) => {\n // throw error;\n // });\n };\n\n getOrderInvoice = (order) => {\n let user = {};\n // let storageAmount = (order.total_amount - order.pg_transaction_fee) / 100;\n\n return (\n {\n this.setState({ currentOrder: null, isEditProductClicked: false });\n }}\n >\n
    \n \n Invoice\n \n \n
    \n \n \n \n \n \n \n \n {\" \"}\n \n \n \n {\" \"}\n \n \n \n {\" \"}\n \n \n \n {\" \"}\n \n \n
    \n \n \n \n INVOICE\n \n
    COMPOSZ LLC,Invoice #: INVEVT000{order.id}
    #121 HAUT BRION AVENUEInvoice Date: {order.updated_at}
    NEWARK, DE-19702.\n Invoice Amount:\n {formatCurrency(order.total_amount, 1, \"USD\")} \n {/* {(order.total_amount / 100).toFixed(2)} */}\n
    \n Status: PAID\n
    \n \n BILLED TO\n \n

    \n {order.full_name}\n
    \n {order.email}\n
    \n {order.pg_user_email}\n
    \n {order.address}\n
    \n {/* Bangalore, 560076. */}\n

    \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    DescriptionPriceQuantityAmount
    Wish Collection, Online Services,{formatCurrency(order.price, 1, \"USD\")}{order.no_of_wishers}\n {formatCurrency(order.no_of_wishers * order.price, 1, \"USD\")}\n
    Audio Pictures (.html files)
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    PAYMENT DETAILS
    Paypal Transaction ID: {order.paypal_capture_id}\n Item (s) Subtotal:{\" \"}\n {formatCurrency(order.no_of_wishers * order.price, 1, \"USD\")}\n
    \n Convenience charges ($0.15+3%): {formatCurrency(order.no_of_wishers * order.price * order.pg_transaction_fee + 0.15, 1, \"USD\")}\n {/* {(order.pg_transaction_fee / 100).toFixed(2)} */}\n
    \n Tax to be collected: {formatCurrency(0, 1, \"USD\")}\n {/* ${(order.pg_fixed_fee / 100).toFixed(2)} */}\n
    \n \n GRAND TOTAL: {formatCurrency(order.total_amount, 1, \"USD\")}\n {/* {(order.total_amount / 100).toFixed(2)} */}\n \n
    \n \n \n

    Thanks for your purchase

    \n

    -- team wishcollector

    \n\n

    \n

    \n \n \n \n \n \n \n
    \n wishcollector.com is owned, operated & managed by COMPOSZ LLC\n
    \n
    \n \n
    \n \n {\n this.printDocument(`INVEVT000${order.id}`);\n }}\n >\n Download\n \n {\n this.setState({ isEditProductClicked: false });\n }}\n >\n Cancel\n \n \n
    \n \n );\n };\n\n getccavenueOrderInvoice = (order) => {\n let user = {};\n // let storageAmount = (order.total_amount - order.pg_transaction_fee) / 100;\n\n return (\n {\n this.setState({ currentOrder: null, isEditProductClicked: false });\n }}\n >\n
    \n \n Invoice\n \n \n
    \n \n \n \n \n \n \n \n {\" \"}\n \n \n \n {\" \"}\n \n \n \n {\" \"}\n \n \n \n {\" \"}\n \n \n
    \n \n \n \n INVOICE\n \n
    LIFE COLORS,Invoice #: INVEVT000{order.id}
    #9, 4th Cross, Kothanur Main Road,Invoice Date: {order.updated_at}
    Bangalore 560 062.\n Invoice Amount: {\" \"}\n {formatCurrency(order.total_amount, 1, \"INR\")} \n {/* {(order.total_amount / 100).toFixed(2)} */}\n
    GSTIN: 29AUTPB5544P1ZS; GST SAC Code: 998434\n Status: PAID\n
    \n \n BILLED TO\n \n

    \n {order.order_details.billing_name}\n
    \n {order.order_details.billing_address}\n
    \n {order.order_details.billing_city}, {order.order_details.billing_state} - {order.order_details.billing_zip}\n
    \n {order.email}, {order.order_details.billing_tel}\n
    \n

    \n
    \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n
    DescriptionPriceQuantityAmount
    Storage₹{\"75.00\"}{order.no_of_gb}\n {formatCurrency(order.no_of_gb * 75.00, 1, \"INR\")}\n {/* ${storageAmount.toFixed(2)} */}\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    PAYMENT DETAILS
    CCAvenue Tracking ID: {order.paypal_capture_id}\n Item (s) Subtotal:{\" \"}\n {formatCurrency(order.no_of_gb * 75.00, 1, \"INR\")}\n
    Payment Mode: {order.order_details.payment_mode} {\"-\"} {order.order_details.card_name}\n Convenience charges: {formatCurrency(order.no_of_gb * order.pg_transaction_fee, 1, \"INR\")}\n {/* {(order.pg_transaction_fee / 100).toFixed(2)} */}\n
    Bank Ref No: {order.order_details.bank_ref_no}\n GST 18%: {formatCurrency((order.no_of_gb * 75.00 + order.no_of_gb * order.pg_transaction_fee) * 0.18, 1, \"INR\")}\n {/* ${(order.pg_fixed_fee / 100).toFixed(2)} */}\n
    \n \n GRAND TOTAL : {formatCurrency(order.total_amount, 1, \"INR\")}\n {/* {(order.total_amount / 100).toFixed(2)} */}\n \n
    \n\n

    To check the expiry date of storage purchased, login to https://composz.com

    \n

    Thanks for your purchase

    \n

    --team Composz

    \n
    \n \n
    \n \n {\n this.printDocument(`INVEVT000${order.id}`);\n }}\n >\n Download\n \n {\n this.setState({ isEditProductClicked: false });\n }}\n >\n Cancel\n \n \n
    \n \n );\n };\n\n getrazorpayOrderInvoice = (order) => {\n let user = {};\n // let storageAmount = (order.total_amount - order.pg_transaction_fee) / 100;\n\n return (\n {\n this.setState({ currentOrder: null, isEditProductClicked: false });\n }}\n >\n
    \n \n Invoice\n \n \n
    \n \n \n \n \n \n \n \n {\" \"}\n \n \n \n {\" \"}\n \n \n \n {\" \"}\n \n \n \n {\" \"}\n \n \n
    \n \n \n \n INVOICE\n \n
    LIFE COLORS,Invoice #: INVEVT000{order.id}
    #9, 4th Cross, Kothanur Main Road,Invoice Date: {order.updated_at}
    Bangalore 560 062.\n Invoice Amount: {\" \"}\n {formatCurrency(order.total_amount, 1, \"INR\")} \n {/* {(order.total_amount / 100).toFixed(2)} */}\n
    GSTIN: 29AUTPB5544P1ZS; GST SAC Code: 998434\n Status: PAID\n
    \n \n BILLED TO\n \n

    \n

    \n {order.user_name}\n

    \n {order.razorpay_capture.email}\n

    \n {order.razorpay_capture.contact}\n
    \n

    \n
    \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n
    DescriptionPriceQuantityAmount
    Wish Collection, Online Services,{formatCurrency(order.price, 1, \"INR\")}{order.no_of_wishers}\n {formatCurrency(order.no_of_wishers * order.price, 1, \"INR\")}\n
    Audio Pictures (.html files)
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    PAYMENT DETAILS
    Razorpay Payment ID: {order.razorpay_capture.id}\n Item (s) Subtotal:{\" \"}\n {formatCurrency(order.no_of_wishers * order.price, 1, \"INR\")}\n
    Payment Mode: {order.razorpay_capture.method} \n {order.razorpay_capture.method == 'netbanking' ? \"-\" + order.razorpay_capture.bank : ''}\n {order.razorpay_capture.method == 'card' ? \"-\" + order.razorpay_capture.card.network + \"-xxxx-\" + order.razorpay_capture.card.last4 : ''}\n {order.razorpay_capture.method == 'upi' ? \"-\" + order.razorpay_capture.vpa + \"-Ph:\" + order.razorpay_capture.acquirer_data.rrn : ''}\n {order.razorpay_capture.method == 'wallet' ? \"-\" + order.razorpay_capture.wallet : ''}\n \n Convenience charges: {formatCurrency(order.no_of_wishers * order.pg_transaction_fee, 1, \"INR\")}\n {/* {(order.pg_transaction_fee / 100).toFixed(2)} */}\n
    Transaction ID: \n {order.razorpay_capture.method == 'netbanking' ? order.razorpay_capture.acquirer_data.bank_transaction_id : ''}\n {order.razorpay_capture.method == 'card' ? order.razorpay_capture.acquirer_data.auth_code : ''}\n {order.razorpay_capture.method == 'upi' ? order.razorpay_capture.acquirer_data.upi_transaction_id : ''}\n {order.razorpay_capture.method == 'wallet' ? \" N/A\" : ''}\n \n GST 18%: {formatCurrency((order.no_of_wishers * 10.00 + order.no_of_wishers * order.pg_transaction_fee) * 0.18, 1, \"INR\")}\n
    \n \n GRAND TOTAL : {formatCurrency(order.total_amount, 1, \"INR\")}\n \n
    \n\n

    Thanks for your purchase

    \n

    --team Composz

    \n
    \n \n
    \n \n {\n this.printDocument(`INVEVT000${order.id}`);\n }}\n >\n Download\n \n {\n this.setState({ isEditProductClicked: false });\n }}\n >\n Cancel\n \n \n
    \n \n );\n };\n\n printDocument = (orderId) => {\n const input = document.getElementById(\"divToPrint2\");\n html2canvas(input).then((canvas) => {\n const imgData = canvas.toDataURL(\"image/jpeg\");\n const pdf = new jsPDF();\n var width = pdf.internal.pageSize.getWidth();\n var height = pdf.internal.pageSize.getHeight();\n\n pdf.addImage(imgData, \"JPEG\", 0, 0, width, height);\n // pdf.output('dataurlnewwindow');\n pdf.save(`${orderId}.pdf`);\n });\n };\n\n getCookie(cname) {\n let name = cname + \"=\";\n let decodedCookie = decodeURIComponent(document.cookie);\n let ca = decodedCookie.split(';');\n for(let i = 0; i \n \n \n \n Event Purchases\n \n \n {/*
    \n {\n this.setState({ [name]: parseInt(value) });\n }}\n value={this.state.no_of_gb ? this.state.no_of_gb : 0}\n />\n Price for 1GB: {this.countryCode!==\"IN\"?'$1.00':' ₹75.00'} */}\n {/* {\n this.setState({ [name]: value });\n }}\n >\n \n \n \n */}\n {/*
    */}\n {purchaseHistory && purchaseHistory.length > 0 && (\n \n \n \n \n \n \n \n \n \n {/* */}\n {/* */}\n \n \n \n \n \n {purchaseHistory &&\n purchaseHistory.map((event) => {\n return (\n \n \n \n \n {/* */}\n {/* */}\n {/* */}\n {/* */}\n \n \n {/* */}\n \n );\n })}\n \n
    Purchase Event - History
    Event IDNo of WishersPurchased OnExpires OnCredits AddedPayment ID
    {event.event_id}{event.no_of_wishers}{`${new Date(event.purchased_on).toLocaleString()}`}\n {\n expiries[storage.id] = value;\n this.setState({ expiries: expiries });\n }}\n />\n {`${new Date(storage.expires_on).toLocaleString()}`}{storage.credits}{storage.pg_reference_id}{event.razorpay_capture.id}\n \n \n {\n this.handleSaveExpiry(storage.id);\n }}\n >\n
    \n \n
    \n )}\n
    \n {/* \n \n */}\n
    \n {/*\n {this.state.isEditProductClicked && (this.countryCode!==\"IN\"?this.getOrderInvoice(this.state.currentOrder):this.getccavenueOrderInvoice(this.state.currentOrder))}\n */}\n {this.state.isEditProductClicked && (this.countryCode!==\"IN\"?this.getOrderInvoice(this.state.currentOrder):this.getrazorpayOrderInvoice(this.state.currentOrder))}\n \n );\n }\n}\n","import React from \"react\";\nimport { Modal } from \"react-bootstrap\";\n\n//import StoragePayment from \"./StoragePayment\";\nimport CCStoragePayment from \"./CCStoragePayment\";\n\nexport default class CCPaymentModal extends React.Component {\n \n render() {\n //const { no_of_gb, storage_unit, convenienceCharges } = this.props.fields;\n const { no_of_gb, storage_unit } = this.props.fields;\n const convenienceCharges = 10;\n const gst = 0.18;\n\n return (\n 0}\n onHide={(e) => {\n this.props.resetStorage();\n }}\n >\n \n Purchase Storage\n \n \n
      \n
    • \n \n Total Price for {no_of_gb} GB: ₹{no_of_gb * 75}\n \n
    • \n
    • \n \n Convenience Charges : ₹\n {parseFloat(no_of_gb * convenienceCharges).toFixed(2)}\n \n
    • \n
    • \n \n GST 18% : ₹\n {parseFloat((no_of_gb * 75 + no_of_gb * convenienceCharges) * gst).toFixed(2)}\n \n
    • \n
    • \n Grand Total: ₹ {Math.round(((no_of_gb * 75 + no_of_gb * convenienceCharges))+(no_of_gb * 75 + no_of_gb * convenienceCharges) * gst).toFixed(2)}\n
    • \n
    \n \n
    \n \n );\n }\n}\n","import React, { Component } from \"react\";\nimport ReactDOM from \"react-dom\";\n\nimport { ENDPOINTS } from \"../../constants/endpoints\";\n\nclass CCStoragePayment extends Component {\n constructor(props) {\n super(props);\n this.state = { no_of_gb: 1, ...props };\n }\n UNSAFE_componentWillReceiveProps(nextProps) {}\n\n \n componentDidMount() {\n // uncomment below line to generate a image in the background\n // this.props.generateImage(this.state.product_id, this.state.setno);\n }\n\n gst = 0.18;\n storage_amount = this.props.no_of_gb * 75 + this.props.no_of_gb * 10;\n gst_amount = this.storage_amount * this.gst;\n amount = Math.round(this.storage_amount + this.gst_amount).toFixed(2);\n\n render() {\n \n const style = {\n color: \"green\"\n };\n\n const style3 = {\n color: \"white\",\n fontSize: 17,\n background: \"green\"\n };\n\n return (\n
    \n
    \n \n \n \n
    \n
    \n );\n }\n}\n\nexport default CCStoragePayment;\n","import React from \"react\";\nimport { Modal } from \"react-bootstrap\";\n\nimport StoragePayment from \"./StoragePayment\";\n\nexport default class PaymentModal extends React.Component {\n\n \n render() {\n const { no_of_gb, storage_unit, convenienceCharges } = this.props.fields;\n\n return (\n 0}\n onHide={(e) => {\n this.props.resetStorage();\n }}\n >\n \n Invoice\n \n \n
      \n
    • \n \n Total Price for {no_of_gb} GB: ${no_of_gb}\n \n
    • \n
    • \n \n Convenience Charges ({convenienceCharges * 100}%) : $\n {parseFloat(no_of_gb * convenienceCharges).toFixed(2)}\n \n
    • \n
    • \n Grand Total: $ {parseFloat(no_of_gb + no_of_gb * convenienceCharges)}\n
    • \n
    \n \n
    \n \n );\n }\n}\n","import React, { Component } from \"react\";\nimport ReactDOM from \"react-dom\";\n\nimport { ENDPOINTS } from \"../../constants/endpoints\";\n\nclass StoragePayment extends Component {\n constructor(props) {\n super(props);\n this.state = { no_of_gb: 1, ...props };\n }\n UNSAFE_componentWillReceiveProps(nextProps) {}\n\n componentDidMount() {\n // uncomment below line to generate a image in the background\n // this.props.generateImage(this.state.product_id, this.state.setno);\n }\n\n createOrder = (data, actions) => {\n if (this.state.pg_order_id) return this.state.pg_order_id;\n const payload = { no_of_gb: this.props.no_of_gb };\n let uri = ENDPOINTS.user_storages.create.uri;\n return fetch(uri, {\n method: ENDPOINTS.user_storages.create.method,\n headers: { \"content-type\": \"application/json\" },\n body: JSON.stringify(payload),\n })\n .then((response) => response.json())\n .then((response) => {\n this.setState({ pg_order_id: response.pg_order_id });\n return response.pg_order_id;\n });\n };\n\n onApprove = (data, actions) => {\n localStorage.setItem(\"isStoragePaid\", \"true\");\n let uri = ENDPOINTS.user_storages.capture.uri;\n let storage_unit = this.props.storage_unit;\n return fetch(uri, {\n method: ENDPOINTS.user_storages.capture.method,\n headers: { \"content-type\": \"application/json\" },\n body: JSON.stringify({\n paypal_order_id: data.orderID,\n storage_unit: storage_unit,\n }),\n })\n .then(function (res) {\n return res.json();\n })\n .then(function (data) {\n alert(\"payment done successfully\");\n window.location.reload();\n return data.pg_order_id;\n });\n };\n\n onSuccess = (details, data) => {\n alert(\"payment done successfully\");\n };\n\n onCancel = (data, actions) => {\n alert(\"Payment cancelled\");\n };\n\n onError = (data, actions) => {\n localStorage.removeItem(\"isStoragePaid\", \"true\");\n alert(\"Something went wrong please try again later\");\n };\n\n render() {\n const PaypalButton = window.paypal.Buttons.driver(\"react\", {\n React,\n ReactDOM,\n });\n return (\n this.onApprove(e)}\n onSuccess={this.onSuccess}\n onError={this.onError}\n onCancel={this.onCancel}\n // style={style}\n />\n );\n }\n}\n\nexport default StoragePayment;\n","import React from \"react\";\nimport { Form, Col, Row, Modal, Button } from \"react-bootstrap\";\n\nimport html2canvas from \"html2canvas\";\nimport jsPDF from \"jspdf\";\n\nimport { FieldGroup } from \"../bootstrap/Forms.FieldGroup\";\nimport { ENDPOINTS } from \"../../constants/endpoints\";\nimport ThumbnailPreview from \"../layouts/ThumbnailPreview\";\nimport PaymentModal from \"./PaymentModal\";\nimport CCPaymentModal from \"./CCPaymentModal\";\nimport { formatCurrency } from \"../../adukku_utils/formatCurrency\";\n\nexport default class FileManager extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n no_of_gb: 0,\n overlay: props.overlay || { visible: false },\n is_preset_display: false,\n categories: props.categories,\n role: null,\n isFileManagerOpen: false,\n folders: [],\n user_products: {},\n folderHierarchy: {},\n basePath: \"\",\n show: false,\n currentFile: {},\n uploadedImages: { none: [] },\n uploadedImageNames: { none: [] },\n purchaseHistory: [],\n expiries: {},\n storage_unit: \"GIGA_BYTE\",\n currentOrder: null,\n isEditProductClicked: false,\n };\n }\n\n componentDidMount() {\n // if (this.state.isFileManagerOpen) this.getPurchaseHistory();\n // this.getPurchaseHistory();\n }\n\n getPurchaseHistory = () => {\n let uri = ENDPOINTS.user_storages.list.uri;\n let that = this;\n return fetch(uri, {\n method: \"GET\",\n headers: { \"content-type\": \"application/json\" },\n })\n .then((response) => response.json())\n .then((response) => {\n that.setState({\n purchaseHistory: response.user_storages,\n convenienceCharges: parseFloat(response.convience_charges.transaction_fee || 0.15),\n host_url: response.host_url,\n });\n });\n };\n\n openFileManager = () => {\n this.setState({ isFileManagerOpen: !this.state.isFileManagerOpen });\n this.getPurchaseHistory();\n };\n\n handleSaveExpiry = (id) => {\n if (!id) return;\n let { expiries } = this.state;\n let formData = new FormData();\n formData.append(\"expires_on\", expiries[id]);\n let url = ENDPOINTS.user_storages.update.uri;\n url = url.replace(\":user_storage_id\", id);\n let ajaxCall = fetch(url, {\n method: \"PUT\",\n body: formData,\n });\n return ajaxCall\n .then((response) => response.json())\n .then((response) => {\n if (response.errors) {\n alert(response.errors);\n } else {\n }\n })\n .catch((error) => {\n throw error;\n });\n };\n\n getOrderInvoice = (order) => {\n let user = {};\n // let storageAmount = (order.total_amount - order.pg_transaction_fee) / 100;\n\n return (\n {\n this.setState({ currentOrder: null, isEditProductClicked: false });\n }}\n >\n
    \n \n Invoice\n \n \n
    \n \n \n \n \n \n \n \n {\" \"}\n \n \n \n {\" \"}\n \n \n \n {\" \"}\n \n \n \n {\" \"}\n \n \n
    \n \n \n \n INVOICE\n \n
    COMPOSZ LLC,Invoice #: INVSTO00000{order.id}
    #121 HAUT BRION AVENUEInvoice Date: {order.updated_at}
    NEWARK, DE-19702.\n Invoice Amount:\n {formatCurrency(order.total_amount, 100, \"USD\")} \n {/* {(order.total_amount / 100).toFixed(2)} */}\n
    \n Status: PAID\n
    \n \n BILLED TO\n \n

    \n {order.full_name}\n
    \n {order.email}\n
    \n {order.pg_user_email}\n
    \n {order.address}\n
    \n {/* Bangalore, 560076. */}\n

    \n
    \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n
    DescriptionPriceQuantityAmount
    Storage${\"1.00\"}{order.no_of_gb}\n {formatCurrency(order.total_amount - order.pg_transaction_fee, 100, \"USD\")}\n {/* ${storageAmount.toFixed(2)} */}\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    PAYMENT DETAILS
    Paypal Transaction ID: {order.paypal_capture_id}\n Item (s) Subtotal:{\" \"}\n {formatCurrency(order.total_amount - order.pg_transaction_fee, 100, \"USD\")}\n
    \n Convenience charges: {formatCurrency(order.pg_transaction_fee, 100, \"USD\")}\n {/* {(order.pg_transaction_fee / 100).toFixed(2)} */}\n
    \n Tax to be collected: {formatCurrency(order.pg_fixed_fee, 100, \"USD\")}\n {/* ${(order.pg_fixed_fee / 100).toFixed(2)} */}\n
    \n \n GRAND TOTAL: {formatCurrency(order.total_amount, 100, \"USD\")}\n {/* {(order.total_amount / 100).toFixed(2)} */}\n \n
    \n\n

    To check the expiry date of storage purchased, login to https://composz.com

    \n

    Thanks for your purchase

    \n

    --team Composz

    \n
    \n \n
    \n \n {\n this.printDocument(`INVSTO00000${order.id}`);\n }}\n >\n Download\n \n {\n this.setState({ isEditProductClicked: false });\n }}\n >\n Cancel\n \n \n
    \n \n );\n };\n\n getccavenueOrderInvoice = (order) => {\n let user = {};\n // let storageAmount = (order.total_amount - order.pg_transaction_fee) / 100;\n\n return (\n {\n this.setState({ currentOrder: null, isEditProductClicked: false });\n }}\n >\n
    \n \n Invoice\n \n \n
    \n \n \n \n \n \n \n \n {\" \"}\n \n \n \n {\" \"}\n \n \n \n {\" \"}\n \n \n \n {\" \"}\n \n \n
    \n \n \n \n INVOICE\n \n
    LIFE COLORS,Invoice #: INVSTO00000{order.id}
    #9, 4th Cross, Kothanur Main Road,Invoice Date: {order.updated_at}
    Bangalore 560 062.\n Invoice Amount: {\" \"}\n {formatCurrency(order.total_amount, 1, \"INR\")} \n {/* {(order.total_amount / 100).toFixed(2)} */}\n
    GSTIN: 29AUTPB5544P1ZS; GST SAC Code: 998434\n Status: PAID\n
    \n \n BILLED TO\n \n

    \n {order.order_details.billing_name}\n
    \n {order.order_details.billing_address}\n
    \n {order.order_details.billing_city}, {order.order_details.billing_state} - {order.order_details.billing_zip}\n
    \n {order.email}, {order.order_details.billing_tel}\n
    \n

    \n
    \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n
    DescriptionPriceQuantityAmount
    Storage₹{\"75.00\"}{order.no_of_gb}\n {formatCurrency(order.no_of_gb * 75.00, 1, \"INR\")}\n {/* ${storageAmount.toFixed(2)} */}\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    PAYMENT DETAILS
    CCAvenue Tracking ID: {order.paypal_capture_id}\n Item (s) Subtotal:{\" \"}\n {formatCurrency(order.no_of_gb * 75.00, 1, \"INR\")}\n
    Payment Mode: {order.order_details.payment_mode} {\"-\"} {order.order_details.card_name}\n Convenience charges: {formatCurrency(order.no_of_gb * order.pg_transaction_fee, 1, \"INR\")}\n {/* {(order.pg_transaction_fee / 100).toFixed(2)} */}\n
    Bank Ref No: {order.order_details.bank_ref_no}\n GST 18%: {formatCurrency((order.no_of_gb * 75.00 + order.no_of_gb * order.pg_transaction_fee) * 0.18, 1, \"INR\")}\n {/* ${(order.pg_fixed_fee / 100).toFixed(2)} */}\n
    \n \n GRAND TOTAL : {formatCurrency(order.total_amount, 1, \"INR\")}\n {/* {(order.total_amount / 100).toFixed(2)} */}\n \n
    \n\n

    To check the expiry date of storage purchased, login to https://composz.com

    \n

    Thanks for your purchase

    \n

    --team Composz

    \n
    \n \n
    \n \n {\n this.printDocument(`INVSTO00000${order.id}`);\n }}\n >\n Download\n \n {\n this.setState({ isEditProductClicked: false });\n }}\n >\n Cancel\n \n \n
    \n \n );\n };\n\n printDocument = (orderId) => {\n const input = document.getElementById(\"divToPrint2\");\n html2canvas(input).then((canvas) => {\n const imgData = canvas.toDataURL(\"image/jpeg\");\n const pdf = new jsPDF();\n var width = pdf.internal.pageSize.getWidth();\n var height = pdf.internal.pageSize.getHeight();\n\n pdf.addImage(imgData, \"JPEG\", 0, 0, width, height);\n // pdf.output('dataurlnewwindow');\n pdf.save(`${orderId}.pdf`);\n });\n };\n\n getCookie(cname) {\n let name = cname + \"=\";\n let decodedCookie = decodeURIComponent(document.cookie);\n let ca = decodedCookie.split(';');\n for(let i = 0; i \n {\"Buy More storage\"}\n {this.countryCode===\"US\"?\n {\n this.setState({ no_of_gb: 0 });\n }}\n /> :\n {\n this.setState({ no_of_gb: 0 });\n }}\n />\n }\n \n \n Purchase Storage\n \n \n
    \n {\n this.setState({ [name]: parseInt(value) });\n }}\n value={this.state.no_of_gb ? this.state.no_of_gb : 0}\n />\n Price for 1GB: {this.countryCode===\"US\"?'$1.00':' ₹75.00'}\n {/* {\n this.setState({ [name]: value });\n }}\n >\n \n \n \n */}\n
    \n {purchaseHistory && purchaseHistory.length > 0 && (\n \n \n \n \n \n \n \n \n \n {/* */}\n {/* */}\n \n \n \n \n {purchaseHistory &&\n purchaseHistory.map((storage) => {\n return (\n \n \n \n \n {/* */}\n {/* */}\n {/* */}\n \n {/* */}\n \n );\n })}\n \n
    Purchase Storage - History
    No of GBPurchased OnExpires OnCredits AddedPayment ID
    {storage.no_of_gb} GB{`${new Date(storage.purchased_on).toLocaleString()}`}\n {\n expiries[storage.id] = value;\n this.setState({ expiries: expiries });\n }}\n />\n {`${new Date(storage.expires_on).toLocaleString()}`}{storage.credits}{storage.pg_reference_id}\n {\n e.stopPropagation();\n e.preventDefault();\n this.setState({\n currentOrder: storage,\n isEditProductClicked: !this.state.isEditProductClicked,\n });\n }}\n >\n Download Invoice\n \n \n {\n this.handleSaveExpiry(storage.id);\n }}\n >\n
    \n \n
    \n )}\n
    \n {/* \n \n */}\n \n {this.state.isEditProductClicked && (this.countryCode===\"US\"?this.getOrderInvoice(this.state.currentOrder):this.getccavenueOrderInvoice(this.state.currentOrder))}\n \n );\n }\n}\n","var stop = false\nvar show=false\nvar vidblob ='NoVideo';\nvar recVidTime = 'none';\nvar isRecording = false;\n\nexport function delete_Recording(){\n videoRecorded.src = ''\n vidblob = '';\n var buttonDelete = document.getElementById(\"vid_del\")\n buttonDelete.disabled=true\n buttonDelete.innerHTML=\"\"\n document.getElementById(\"myBar\").style.width=\"0%\";\n document.getElementById(\"label\").innerHTML = '0%';\n document.getElementById(\"myProgress\").style.width=\"100%\";\n }\n\nexport function get_Blob(){\n return vidblob;\n }\n\n export function get_Time(){\n return recVidTime;\n } \n\nexport function getRecordingState(){\n\n return isRecording;\n // if (window.MediaRecorder && window.MediaRecorder.state === \"recording\") \n // return true\n // else\n // return false\n}\n\nexport function start_video_Recording(){\n \n const buttonStart = document.querySelector('#vid_st')\n const buttonStop = document.querySelector('#vid_en')\n const videoLive = document.querySelector('#videoLive')\n const videoRecorded = document.querySelector('#videoRecorded')\n const videoLiveDiv = document.querySelector('#videoLiveDiv')\n const videoRecordedDiv = document.querySelector('#videoRecordedDiv')\n\n document.getElementById(\"myBar\").style.width=\"0%\";\n document.getElementById(\"label\").innerHTML = '0%';\n document.getElementById(\"myProgress\").style.width=\"100%\";\n var maxRectime = 45;\n stop=false;\n //show=false;\n\n\n function move(mediaRecorder, stream) {\n var i=0;\n if (i == 0) {\n i = 1;\n var elem = document.getElementById(\"myBar\");\n var width = 0;\n\n var id = setInterval(frame, maxRectime+1);\n \n function frame() {\n if (stop) {\n clearInterval(id);\n isRecording=false;\n stop_Recording(mediaRecorder, stream);\n }\n if (width >= 100) {\n clearInterval(id);\n isRecording=false;\n stop_Recording(mediaRecorder, stream);\n i = 0;\n } else {\n width = width + .1\n elem.style.width = width + \"%\";\n if (width.toFixed(2)%1==0) {\n document.getElementById(\"label\").innerHTML = width.toFixed(2) * 1 + '%';\n }\n }\n }\n }\n }\n\n function stop_Recording(mediaRecorder, stream){\n mediaRecorder.stop() \n isRecording=false;\n var buttonDelete = document.getElementById(\"vid_del\")\n buttonDelete.disabled=false\n buttonDelete.innerHTML=\"\"\n videoLiveDiv.style.display = \"none\"\n videoRecordedDiv.style.display = \"\"\n recVidTime = new Date()\n setTimeout(function() {\n document.getElementById(\"vid_st\").disabled=false\n document.getElementById(\"vid_st\").innerHTML=\"\"\n }, 100)\n }\n\n function start_Recording(stream) {\n if (!show) return\n isRecording=true\n buttonStart.disabled=true\n buttonStart.innerHTML=\"\"\n stop=false;\n videoLiveDiv.style.display = \"\"\n videoRecordedDiv.style.display = \"none\"\n\n\n // if (MediaRecorder.isTypeSupported('video/webm; codecs=vp9')) {\n // var options = {mimeType: 'video/webm; codecs=vp9'};\n // } else if (MediaRecorder.isTypeSupported('video/webm')) {\n // var options = {mimeType: 'video/webm'};\n // } else if (MediaRecorder.isTypeSupported('video/mp4')) {\n // var options = {mimeType: 'video/mp4', videoBitsPerSecond : 100000};\n // } else {\n // console.error(\"no suitable mimetype found for this device\");\n // }\n // window.MediaRecorder = new MediaRecorder(stream, options)\n\n window.mediaRecorder = new MediaRecorder(stream)\n\n window.mediaRecorder.start()\n window.mediaRecorder.stop()\n \n \n\n // function wait(secs){\n // secs = secs - 1\n // if (secs <= 0) {\n // clearInterval(waitintervalId);\n // }\n // }\n \n // const waitintervalId = setInterval(wait(6), 1000);\n\n var index = 6\n function countDown() {\n \n index = index - 1\n document.getElementById(\"CountDown\").innerHTML=`Recording starts in ${index}`\n document.getElementById(\"CountDown\").focus()\n if (index <= 0) {\n clearInterval(intervalId);\n document.getElementById(\"CountDown\").innerHTML=''\n window.mediaRecorder.start()\n move(window.mediaRecorder, stream);\n window.mediaRecorder.addEventListener('dataavailable', event => {\n videoRecorded.src = URL.createObjectURL(event.data) \n vidblob = event.data;\n videoRecorded.play()\n })\n }\n }\n\n\n const intervalId = setInterval(countDown, 1000);\n\n }\n \n if (show) {\n if (window.mediaRecorder && window.mediaRecorder.state === \"recording\") return\n window.localStream.getTracks().forEach(function(track) {\n track.stop();\n });\n videoLiveDiv.style.display = \"none\"\n videoRecordedDiv.style.display = \"\"\n show=false;\n }\n else {\n show=true\n if(navigator.mediaDevices.getUserMedia) {\n navigator.mediaDevices.getUserMedia({audio: true, video:true}).then(function(stream) {\n window.localStream = stream;\n document.getElementById(\"videoLive\").srcObject = stream;\n\n if (!MediaRecorder.isTypeSupported('video/webm')) { \n console.warn('video/webm is not supported')\n }\n // mediaRecorder = new MediaRecorder(stream, { \n // mimeType: 'video/mp4',\n // })\n videoLiveDiv.style.display = \"\"\n videoRecordedDiv.style.display = \"none\"\n document.getElementById(\"vid_st\").disabled=false\n document.getElementById(\"vid_st\").innerHTML=\"\"\n var buttonDelete = document.getElementById(\"vid_del\")\n buttonDelete.disabled=true\n buttonDelete.innerHTML=\"\"\n buttonStart.addEventListener('click', () => {\n start_Recording(window.localStream)\n })\n buttonStop.addEventListener('click', () => {\n isRecording=false\n stop=true\n })\n });\n }\n }//else\n}\n\nexport function save_video_Recording(blob, event_id, recorded_video_file) {\n //let uri = \"/api/savecontribute_audio?event_id=\"+event_id+\"&recorded_audio_file=\" + recorded_audio_file\n \n let template_url = \"/api/savecontribute_audio?event_id=:event_id&recorded_video_file=:filename\"\n template_url = template_url.replace(\":event_id\", event_id).replace(\":filename\", recorded_video_file);\n console.log(\"blob : \", blob)\n let status = ''\n fetch(template_url, {\n method: \"POST\",\n body: blob,\n header: {\"Content-Type\": 'video/webm', \"Accept\":'video/webm'},\n })\n .then((response) => response.json())\n .then((response) => {\n \n if (response.data===\"available\") {\n alert(\"Video successfully saved\")\n status = 'ok'\n return status\n }\n else {\n alert(\"Save of Video recording failed. Kindly Record again.\")\n status = 'not-ok'\n return status\n }\n });\n}\n\n","import \"babel-polyfill\";\nimport React from \"react\";\nimport { Provider } from \"react-redux\";\nimport { applyMiddleware, createStore } from \"redux\";\nimport createLogger from \"redux-logger\";\nimport createSagaMiddleware from \"redux-saga\";\nimport rootSaga from \"../sagas/orders_index.saga\";\nimport AdukkuApp from \"../reducers/orders_reducer\";\nimport ViewProductListContainer from \"../containers/view_products/ViewProductListContainer\";\n\n//const logger = createLogger({});\nconst sagaMiddleware = createSagaMiddleware();\n//const store = createStore(AdukkuApp, applyMiddleware(logger, sagaMiddleware)); // Bala\nconst store = createStore(AdukkuApp, applyMiddleware(sagaMiddleware));\nsagaMiddleware.run(rootSaga);\n\nclass ViewProducts extends React.Component {\n render() {\n return (\n
    \n \n \n \n
    \n );\n }\n}\n\nexport default ViewProducts;\n","import React, { Component, Fragment } from \"react\";\nimport { FieldGroup } from \"./bootstrap/Forms.FieldGroup\";\nimport { Panel, PanelGroup, Radio, Button, Modal, Form, Dropdown, Row, Col, FormGroup } from \"react-bootstrap\";\nimport collage from 'images/WishCollage.jpg';\nimport {startMsg} from './AudioHelpers'\n\n\nexport class WishCollectorHomePage extends React.Component {\n constructor(props) {\n super(props)\n this.state = {\n windowWidth: window.innerWidth,\n windowHeight: window.innerHeight,\n countryCode: this.getCookie(\"countryCode\"),\n events: '',\n index: 0,\n isContributions: false,\n contributes: [],\n mobile:false,\n colorPicker: '#293c80',\n activeKey: '',\n openItem: -1,\n sampleModal: false,\n modalTitle: 'I am the Title',\n modalVideo: '',\n };\n \n }\n\n handleSelect = (activeKey) => {\n this.setState({ activeKey });\n } \n\n handleSignup = () => {\n const link = document.createElement('a');\n link.setAttribute('href', '/users/sign_up');\n document.body.appendChild(link);\n link.click();\n }\n \n checkDevice = () => {\n /* Storing user's device details in a variable*/\n let details = navigator.userAgent; \n \n /* Creating a regular expression \n containing some mobile devices keywords \n to search it in details string*/\n let regexp = /android|iphone|kindle|ipad/i; \n \n /* Using test() method to search regexp in details \n it returns boolean value*/\n let isMobileDevice = regexp.test(details); \n \n if (isMobileDevice) { \n this.setState({mobile: true})\n } else { \n this.setState({mobile: false})\n }\n }\n\n handleResize = e => {\n const windowWidth = window.innerWidth;\n const windowHeight = window.innerHeight;\n \n this.setState(prevState => {\n return {\n windowWidth,\n windowHeight,\n };\n });\n };\n\n componentDidMount() {\n window.addEventListener(\"resize\", this.handleResize);\n this.waitIntervalId = setInterval(this.wait, 4000)\n \n if (this.state.countryCode === ''){\n //fetch country code of user\n //var url = 'https://api.ipregistry.co/?key=64qg4jmpagjha51m';\n var url = \"https://ipinfo.io/?token=f7e161ea50651f\";\n fetch(url)\n .then((response) => response.json())\n .then((responseJson) => {\n this.setState({\n countryCode: responseJson.country\n });\n document.cookie = \"countryCode=\" + responseJson.country + \";\";\n })\n .catch((error) => {\n //console.error(error);\n this.setState({\n countryCode: \"US\"\n });\n });\n }\n \n /*\n this.setState({\n countryCode: document.cookie.split(\"=\")[1] // set the country code from cookie set in application_controller.rb\n });\n */\n }\n\n UNSAFE_componentWillMount() {\n this.checkDevice();\n }\n\n componentWillUnmount() {\n window.removeEventListener(\"resize\", this.handleResize);\n clearInterval(this.waitIntervalId)\n }\n \n //.scrollIntoView({ behavior: \"smooth\", block: \"start, inline: \"nearest\"});\n toggleAll = (newOpenKey) => {\n \n var carets = document.querySelectorAll('.up-down');\n if (this.state.openItem === -1) {\n // open newOpenKey\n carets[newOpenKey-1].getElementsByTagName('span')[0].classList.toggle('fa-caret-down');\n carets[newOpenKey-1].getElementsByTagName('span')[0].classList.toggle('fa-caret-up');\n // document.getElementById(`panel${newOpenKey}`).scrollIntoView({ behavior: \"smooth\", block: \"start\", inline: \"nearest\"});\n this.setState({ openItem: newOpenKey });\n } else if (this.state.openItem === newOpenKey) {\n carets[newOpenKey-1].getElementsByTagName('span')[0].classList.toggle('fa-caret-up');\n carets[newOpenKey-1].getElementsByTagName('span')[0].classList.toggle('fa-caret-down');\n this.setState({ openItem: -1 });\n } else {\n //close openItem\n carets[this.state.openItem-1].getElementsByTagName('span')[0].classList.toggle('fa-caret-up');\n carets[this.state.openItem-1].getElementsByTagName('span')[0].classList.toggle('fa-caret-down');\n //open newOpenKey\n carets[newOpenKey-1].getElementsByTagName('span')[0].classList.toggle('fa-caret-down');\n carets[newOpenKey-1].getElementsByTagName('span')[0].classList.toggle('fa-caret-up');\n if (this.state.mobile) {\n setTimeout(function () {\n document.getElementById(`panel${newOpenKey}-mobile`).scrollIntoView(true, { behavior: \"smooth\"}); \n },500);\n }\n else {\n setTimeout(function () {\n document.getElementById(`panel${newOpenKey}`).scrollIntoView(true, { behavior: \"smooth\"});\n },50);\n }\n this.setState({ openItem: newOpenKey });\n }\n }\n \n getCookie(cname) {\n let name = cname + \"=\";\n let decodedCookie = decodeURIComponent(document.cookie);\n let ca = decodedCookie.split(';');\n for(let i = 0; i {\n\n let template_url = \"/api/contributes?event_id=:event_id\"\n template_url = template_url.replace(\":event_id\", event_id);\n \n \n let noRecords;\n \n noRecords = fetch(template_url, {\n method: \"GET\", headers: { \"content-type\": \"application/json\" }, \n })\n .then((response) => response.json())\n .then((data) => { \n this.setState({contributes: data.contributes});\n });\n \n }\n\n\n\n wait = () => {\n \n var events = [\n \"Marriage\", \n \"Birthday\",\n \"Anniversary\",\n \"Engagement\",\n \"Baby Shower\",\n \"New Baby\",\n \"New House\",\n \"New Vehicle\",\n \"New Job\",\n \"Promotion\",\n \"Farewell\",\n \"Retirement\",\n \"Achievements\",\n \"Get Well\",\n \"Any occassion\",\n \"Graduation\",\n \"Student Autographs\"\n ]\n var steps = [\n \"All you and wishers need is a Mobile\\nCan use PC, Laptops & Tablets too\",\n \"Create an Account & Sign in\\n\",\n \"Create an Event under 5 minutes\\nRight from your mobile\",\n \"Upload Invitation or Create one! \\n(eg. a Marriage Invitation)\",\n \"Record Video Intive\\neven from your mobile!\",\n \"Choose no of wishes & Pay for the event\",\n \"Share event link with video intive to Friends & Relatives via WhatsApp, SMS, Email, etc.\",\n \"Wishers can use Mobile to send their Name, Picture, Audio Wish & Text wishes \\n(many languages)\",\n \"View & Hear wishes in your PC, Mobile, etc. in realtime as people wish\",\n \"Close event after event ends, even after few days\",\n \"Arrange wishes, so that related Wishers are next to each other\",\n \"Choose output format of your choice &\\nDownload wishes to your PC, Mobile, etc. as simple html files\",\n \"Use existing Chrome/Edge browser on mobile to view and hear html files\",\n \"Click on wisher's picture to hear and see wishes (many languages). Usually 20 wishers per page\",\n \"Store html files locally on your PC, Mac, Mobile, etc. or send to recepient\",\n \"Carry your wishes even in Mobile. View and Hear wishes locally. Not online!\",\n \"Create an Event today! \\nStart collecting wishes.\\nPreserve your wishes.\"\n ] \n if (this.state.index > 16) {\n this.setState({index:0})\n }\n else {\n document.getElementById(\"eve\").innerText = events[this.state.index]\n document.getElementById(\"steps\").innerText = steps[this.state.index]\n this.setState({index:this.state.index+1})\n }\n }\n\n render() {\n \n if (window.innerWidth > 450) {\n \n return(\n \n
    \n\n
    \n

    \n Collect multi-language Text & Audio

    \n wishes for Events/Ocassions

    \n \n Download wishes as 'Audio Pictures Collage'

    \n
    \n Marriage

    \n

    \n \n

    \n Easy-to-use

    \n All you and wishers need is a Mobile

    Can use PC, Laptops & Tablets too


    \n

    \n
    \n
    \n \n
    \n
    \n

    \n \n\n

    \n Simple steps to collect wishes\n

    \n \n \n {this.toggleAll(1)}} >\n \n Create Event \n \n \n \n
    \n \n

    Create Event :

    \n

    Use mobile, PC, MAC, Laptops or Tablets to create an Event under 5 minutes.

    \n

    Upload event invitation like a Marriage invitation or choose from preset pictures.

    \n

    Record a short Video Invite even from a mobile. Record, Preview & re-record as many times before final video invite is satisfactory.

    \n

    Provide Title & Date for the event. Can provide past event dates too for collecting wishes for past events!

    \n

    \n

    Pay for the event :

    \n

    After event creation, Pay for the event after choosing no of wishes.

    \n

    Minimum wish count is 20.

    \n

    Choose wish count carefully as prepaid cost & postpaid cost per wish is different and there is no refund for unused wish count.

    \n
    \n
    \n
    \n \n {this.toggleAll(2)}} >\n \n Share event link & Invite \n \n \n \n
    \n \n

    After paying for event, using a mobile or any device, copy the event link and send it to friends, relatives, co-workers, classmates, etc. via WhatsApp, \n SMS, Email, etc.

    \n

    Once wishers receive the event link, they can use their mobile, PC or any device to click on the event link.

    \n

    Event link shows the Video Invite, invitation picture and also the event title and date.

    \n

    Wishers look at \"Video Invite\" and can then \"Confirm\" that the event invite is intended for them.

    \n

    Then wishers can enter their Name & Place, Upload their picture, Record Audio wishes and also enter Text wishes in their preferred language!

    \n

    Once they \"submit\" their details, their wishes along with submit date & time will be automatically be shown to the creator of the event!

    \n

    Multiple wishers can submit their wishes simultaneously from different parts of the world!

    \n
    \n
    \n
    \n \n {this.toggleAll(3)}} >\n \n Manage collected wishes\n \n \n \n
    \n \n

    Watch collected wishes :

    \n

    Once wishers submit their wishes using the event link, event creator can watch and hear all the wishes as they arrive in realtime using their mobile, PC or any device.

    \n

    Keep collecting wishes as long as the event is not closed. Can wait few days before closing the event as well until all intended wishes arrive.

    \n

    After all intended wishes are collected, event can be closed. No more wishes will be collected after the event is closed. Wishers won't be able to submit wishes using the event link anymore.

    \n

    \n

    Pay for additional wishes or Reject :

    \n

    \"Wish Collector\" keeps collecting wishes even beyond what was paid for as wishes are priceless.

    \n

    Event creator has the choice of rejecting all additional wishes or pay for all additional wishes or pay for only partial of wishes.

    \n

    \n

    Exclude wishes :

    \n

    There may be times, certain wishes need to be excluded. \"Wish Collector\" easily provides a simple way to either include or exclude a wish.

    \n

    Excluded wishes will not be included in the output files.

    \n

    \n

    Arrange wishes :

    \n

    Easily drag and drop wishers so that related wishers are next to each other.

    \n

    Output files will be generated based on the sorted order.

    \n
    \n
    \n
    \n \n {this.toggleAll(4)}} >\n \n Generate & Download Wish files\n \n \n \n
    \n \n

    Choose an output Template :

    \n

    After wishes are arranged, choose an output template. Note: Each template accommodates only 20 wishers. If 100 wishes are collected, then 5 html files will be generated based on the template.

    \n

    Same template will be used for all 5 files. If the collected wishes are only say 90, the remaining 10 slots in the template will be blank without distorting the template look.

    \n

    \n

    Upload event pictures :

    \n

    Here, event pictures, say Marriage pictures of couple can be uploaded. This is event pictures and not the wishers pictures.

    \n

    For example, if there are 100 wishes, then 5 files will be generated each containing 20 wishers. So 5 different event pictures can be uploaded or upload one and choose to use the same picture for all 5 files.

    \n

    \n

    Generate Event Files :

    \n

    After a template had been chosen and event pictures are uploaded, Proceed to generate \"Event Files\".

    \n

    Event files generation is an asynchronous process and the request will be put in a queue to be processed.

    \n

    Queue is processed on first come first serve, basis. Wait for a minute or two for low number of wishes. If in 1000's may take just a little longer.

    \n

    Typically, event file generation takes under a minute or two only. Keep checking the status for completion of files generation. Creator will also receive an email once files are generated.

    \n

    \n

    Download Event Files :

    \n

    Once the event files are generated, immediately proceed to download the files.

    \n

    Files can be downloaded in mobile, PC, or any capable device. PC is recommended but not compulsory. There may be only limited time to download the files.

    \n

    Downloaded file is a single '.zip' file. Extract the .html files onto its own directory/folder.

    \n

    \n

    Watch and Hear wishes :

    \n

    If on PC, MAC, or Laptops, you can just double click the .html files to launch them in the web browser. Browser will show the output based upon the template chosen.

    \n

    If on Android Tablet or mobile, open the .html files using Chrome.

    \n

    If on iPad or iPhone, download microsoft Edge browser first. Send/Share the .html file to Edge browser to open the .html files.

    \n

    Once the .html file is opened, here you will see the Event picture and 20 wishers pictures based on the chosen template.

    \n

    Click on each wisher's picture to pop out the window where you can see their text messages and hear their audio wishes.

    \n

    If the wishes are intended for others, send the '.zip' file to the recepient via email, WhatsApp (doc attachment), google drive, etc.

    \n

    Make multiple copies of the '.zip' file and store them in multiple places like hard drive, pen drive, cloud, etc. as \"Wish Collector\" will delete all data related to the event as soon as event files are downloaded and cannot be recovered at all.

    \n

    Have fun and enjoy wishes for a lifetime!

    \n

    Good Luck!

    \n
    \n
    \n
    \n \n\n

    \n Sample Video Invites\n

    \n\n
    \n \n\n \n\n \n\n \n
    \n \n

    \n Sample Collected Wishes\n

    \n
    \n \n \n \n \n
    \n\n

    \n Sample downloaded 'html' files\n

    \n \n (Audio Pictures Collage)\n \n
    \n \n \n \n \n
    \n\n

    \n How to Videos\n

    \n
    \n
    \n\t\t \n

    \n

    How to Create an Account in wish collector

    \n
    \n
    \n \n

    \n

    How to Create a Wedding event and collect wishes

    \n
    \n
    \n



    \n
    \n
    \n \n

    \n

    How to Create a Student Autograph event & collect wishes

    \n
    \n
    \n \n

    \n

    How to Create an Invitation

    \n
    \n
    \n\n\n {this.setState({ isContributions: false })}}\n style={{marginTop:'45px', }}\n >\n \n \n Collected Wsihes\n \n \n
    \n \n {\n this.setState({ [name]: value });\n this.changeColor()\n }}\n value={this.state.colorPicker}\n >\n \n {this.state.contributes.length > 0 ?\n this.state.contributes.map( (item, index) =>{\n const contributionNo = this.state.contributes.length - index\n const date = new Date(item.created_at)\n const formattedDate = date.toLocaleDateString(\"en-GB\", {\n day: \"numeric\",\n month: \"long\",\n year: \"numeric\"\n })\n const formattedTime = date.toLocaleTimeString(\"en-US\")\n \n if (this.state.mobile){\n return (\n \n
    \n
    Wish No: {contributionNo} @ {formattedDate} {formattedTime}
    \n \n \"\"\n \n

    \n
    Name: {item.c_name}
    \n
    Place: {item.c_place}
    \n

    \n \n
    \n
    Audio Wishes (if recordered)
    \n {/*
    Audio Wishes (if recordered)
    */}\n \n \n
    \n \n
    \n \n
    \n
    \n
    \n )\n }\n else {\n return (\n \n
    \n
    Wish No: {contributionNo} @ {formattedDate} {formattedTime}
    \n \n \"\"\n \n \n
    Name: {item.c_name}
    \n
    Place: {item.c_place}
    \n

    \n \n
    \n
    Audio Wishes (if recordered)
    \n {/*
    Audio Wishes (if recordered)
    */}\n \n \n
    \n \n
    \n \n
    \n
    \n
    \n )\n }\n })\n :\n

    No Wishes yet!

    \n }\n
    \n
    \n
    \n\n {this.setState({ sampleModal: false })}}>\n \n \n {this.state.modalTitle}\n \n \n \n
    \n \n
    \n
    \n
    \n\n {this.state.countryCode === 'IN' ?\n
    \n

    \n

    \n

    \n \n
    \n
    \n

    \n

           Contact :

    \n           LIFE COLORS

    \n           #9, 4th Cross,

    \n           Kothanur Main Road,

    \n           Bangalore 560 062.

    \n

    \n           email : wishcollector-team@wishcollector.com

    \n           phone : +91 9620621884

    \n

    \n
    \n\n
    \n

    \n

       Policies :

    \n     Pricing

    \n     Refund & Return

    \n     Shipping

    \n

    \n

    \n

    \n

    \n

    \n
    \n
    \n
    : ''\n } \n\n\n\n
    \n );\n }\n else { // mobile\n return(\n \n \n

    \n Collect multi-language Text & Audio

    \n wishes for Events/Ocassions

    \n \n Download wishes as 'Audio Pictures Collage'

    \n
    \n Marriage

    \n

    \n \n \n

    \n Easy-to-use\n

    \n
    \n All you and wishers need is a Mobile

    Can use PC, Laptops & Tablets too


    \n
    \n

    \n \n \n\n

    \n Simple steps to Collect wishes\n

    \n\n \n \n {this.toggleAll(1)}} >\n \n Create Event \n \n \n \n
    \n \n

    Create Event :

    \n

    Use mobile, PC, MAC, Laptops or Tablets to create an Event under 5 minutes.

    \n

    Upload event invitation like a Marriage invitation or choose from preset pictures.

    \n

    Record a short Video Invite even from a mobile. Record, Preview & re-record as many times before final video invite is satisfactory.

    \n

    Provide Title & Date for the event. Can provide past event dates too for collecting wishes for past events!

    \n

    \n

    Pay for the event :

    \n

    After event creation, Pay for the event after choosing no of wishes.

    \n

    Minimum wish count is 20.

    \n

    Choose wish count carefully as prepaid cost & postpaid cost per wisher is different and there is no refund for unused wish count.

    \n
    \n
    \n
    \n \n {this.toggleAll(2)}} >\n \n Share event link & Invite\n \n \n \n
    \n \n

    After paying for event, using a mobile or any device, copy the event link and send it to friends, relatives, co-workers, classmates, etc. via WhatsApp, \n SMS, Email, etc.

    \n

    Once wishers receive the event link, they can use their mobile, PC or any device to click on the event link.

    \n

    Event link shows the Video Invite, invitation picture and also the event title and date.

    \n

    Wishers look at \"Video Invite\" and can then \"Confirm\" that the event invite is intended for them.

    \n

    Then wishers can enter their Name & Place, Upload their picture, Record Audio wishes and also enter Text wishes in their preferred language!

    \n

    Once they \"submit\" their details, their wishes along with submit date & time will be automatically be shown to the creator of the event!

    \n

    Multiple wishers can submit their wishes simultaneously from different parts of the world!

    \n
    \n
    \n
    \n \n {this.toggleAll(3)}} >\n \n Manage collected Wishes \n \n \n \n
    \n \n

    Watch collected wishes :

    \n

    Once wishers submit their wishes using the event link, event creator can watch and hear all the wishes as they arrive in realtime using their mobile, PC or any device.

    \n

    Keep collecting wishes as long as the event is not closed. Can wait few days before closing the event as well until all intended wishes arrive.

    \n

    After all intended wishes are collected, event can be closed. No more wishes will be collected after the event is closed. Wishers won't be able to submit wishes using the event link anymore.

    \n

    \n

    Pay for additional wishes or Reject :

    \n

    \"Wish Collector\" keeps collecting wishes even beyond what was paid for as wishes are priceless.

    \n

    Event creator has the choice of rejecting all additional wishes or pay for all additional wishes or pay for only partial of wishes.

    \n

    \n

    Exclude wishes :

    \n

    There may be times, certain wishes need to be excluded. \"Wish Collector\" easily provides a simple way to either include or exclude a wish.

    \n

    Excluded wishes will not be included in the output files.

    \n

    \n

    Arrange wishes :

    \n

    Easily drag and drop wishers so that related wishers are next to each other.

    \n

    Output files will be generated based on the sorted order.

    \n
    \n
    \n
    \n \n {this.toggleAll(4)}} >\n \n Generate & Download Wish files\n \n \n \n
    \n \n

    Choose an output Template :

    \n

    After wishes are arranged, choose an output template. Note: Each template accommodates only 20 wishers. If 100 wishes are collected, then 5 html files will be generated based on the template.

    \n

    Same template will be used for all 5 files. If the collected wishes are only say 90, the remaining 10 slots in the template will be blank without distorting the template look.

    \n

    \n

    Upload event pictures :

    \n

    Here, event pictures, say Marriage pictures of couple can be uploaded. This is event pictures and not the wishers pictures.

    \n

    For example, if there are 100 wishes, then 5 files will be generated each containing 20 wishers. So 5 different event pictures can be uploaded or upload one and choose to use the same picture for all 5 files.

    \n

    \n

    Generate Event Files :

    \n

    After a template had been chosen and event pictures are uploaded, Proceed to generate \"Event Files\".

    \n

    Event files generation is an asynchronous process and the request will be put in a queue to be processed.

    \n

    Queue is processed on first come first serve, basis. Wait for a minute or two for low number of wishes. If in 1000's may take just a little longer.

    \n

    Typically, event file generation takes under a minute or two only. Keep checking the status for completion of files generation. Creator will also receive an email once files are generated.

    \n

    \n

    Download Event Files :

    \n

    Once the event files are generated, immediately proceed to download the files.

    \n

    Files can be downloaded in mobile, PC, or any capable device. PC is recommended but not compulsory. There may be only limited time to download the files.

    \n

    Downloaded file is a single '.zip' file. Extract the .html files onto its own directory/folder.

    \n

    \n

    Watch and Hear wishes :

    \n

    If on PC, MAC, or Laptops, you can just double click the .html files to launch them in the web browser. Browser will show the output based upon the template chosen.

    \n

    If on Android Tablet or mobile, open the .html files using Chrome.

    \n

    If on iPad or iPhone, download microsoft Edge browser first. Send/Share the .html file to Edge browser to open the .html files.

    \n

    Once the .html file is opened, here you will see the Event picture and 20 wishers pictures based on the chosen template.

    \n

    Click on each wisher's picture to pop out the window where you can see their text messages and hear their audio wishes.

    \n

    If the wishes are intended for others, send the '.zip' file to the recepient via email, WhatsApp (doc attachment), google drive, etc.

    \n

    Make multiple copies of the '.zip' file and store them in multiple places like hard drive, pen drive, cloud, etc. as \"Wish Collector\" will delete all data related to the event as soon as event files are downloaded and cannot be recovered at all.

    \n

    Have fun and enjoy wishes for a lifetime!

    \n

    Good Luck!

    \n
    \n
    \n
    \n \n \n

    \n Sample Video Invites\n

    \n\n
    \n \n\n \n\n \n\n \n
    \n

    \n Sample Collected Wishes\n

    \n
    \n \n \n \n \n
    \n\n

    \n Sample Downloaded 'html' files\n

    \n \n (Audio Pictures Collage)\n \n
    \n \n \n \n
    \n\n

    \n How to Videos\n

    \n
    \n \n
    How to Create an Account in wish collector
    \n

    \n \n
    How to Create a Wedding event and collect wishes
    \n

    \n \n
    How to Create a Student Autograph event & collect wishes
    \n

    \n \n
    How to Create an Invitation
    \n
    \n\n {this.setState({ isContributions: false })}}\n style={{marginTop:'45px', }}\n >\n \n \n Collected Wishes\n \n \n
    \n \n {\n this.setState({ [name]: value });\n this.changeColor()\n }}\n value={this.state.colorPicker}\n >\n \n {this.state.contributes.length > 0 ?\n this.state.contributes.map( (item, index) =>{\n const contributionNo = this.state.contributes.length - index\n const date = new Date(item.created_at)\n const formattedDate = date.toLocaleDateString(\"en-GB\", {\n day: \"numeric\",\n month: \"long\",\n year: \"numeric\"\n })\n const formattedTime = date.toLocaleTimeString(\"en-US\")\n \n if (this.state.mobile){\n return (\n \n
    \n
    Wish No: {contributionNo} @ {formattedDate} {formattedTime}
    \n \n \"\"\n \n

    \n
    Name: {item.c_name}
    \n
    Place: {item.c_place}
    \n

    \n \n
    \n
    Audio Wishes (if recordered)
    \n {/*
    Audio Wishes (if recordered)
    */}\n \n \n
    \n \n
    \n \n
    \n
    \n
    \n )\n }\n else {\n return (\n \n
    \n
    Wish No: {contributionNo} @ {formattedDate} {formattedTime}
    \n \n \"\"\n \n \n
    Name: {item.c_name}
    \n
    Place: {item.c_place}
    \n

    \n \n
    \n
    Audio Wishes (if recordered)
    \n {/*
    Audio Wishes (if recordered)
    */}\n \n \n
    \n \n
    \n \n
    \n
    \n
    \n )\n }\n })\n :\n

    No Wishes yet!

    \n }\n
    \n
    \n
    \n\n {this.setState({ sampleModal: false })}}>\n \n \n {this.state.modalTitle}\n \n \n \n
    \n \n
    \n
    \n
    \n\n\n {this.state.countryCode === 'IN' ?\n
    \n

    \n

    \n

    \n

    \n

    \n

    \n

    \n

    \n
    \n
    \n

    \n

     Contact :

    \n   LIFE COLORS

    \n   #9, 4th Cross,

    \n   Kothanur Main Road,

    \n   Bangalore 560 062.

    \n

    \n

    \n {/*   email : wishcollector-team@wishcollector.com

    \n   phone : +91 9620621884

    */}\n

    \n
    \n\n
    \n

    \n

    Policies :

    \n Pricing

    \n Refund & Return

    \n Shipping

    \n

    \n

    \n

    \n

    \n
    \n
    \n
    \n   email : wishcollector-team@wishcollector.com

    \n   phone : +91 9620621884

    \n

    \n
    \n
    : ''\n } \n\n \n
    \n );\n }\n\n\n\n\n\n }\n}\n\n\nexport default WishCollectorHomePage \n","import React, { Fragment, useState } from 'react';\nimport { Navbar, Nav, NavItem, MenuItem, NavDropdown, Modal, Button } from 'react-bootstrap';\nimport logo from 'images/wishCollectorLogoOfficial.png';\n\nimport profile from 'images/blankProfile.png';\n//import {useLocation} from 'react-router-dom'\n//import { render } from 'react-dom';\n\nfunction Mynavbar (user_id, user_name, has_view_products) {\n\n const [show3, setShow3] = useState(false);\n const showDropdown3 = (e)=>{\n setShow3(true);\n }\n const hideDropdown3 = e => {\n setShow3(false);\n }\n \n const [show2, setShow2] = useState(false);\n const showDropdown2 = (e)=>{\n setShow2(true);\n }\n const hideDropdown2 = e => {\n setShow2(false);\n }\n \n const [show1, setShow1] = useState(false);\n const showDropdown1 = (e)=>{\n setShow1(true);\n setShow(false);\n }\n const hideDropdown1 = e => {\n setShow1(false);\n }\n \n const [show, setShow] = useState(false);\n const showDropdown = (e)=>{\n setShow(true);\n }\n const hideDropdown = e => {\n setShow(false);\n }\n const toggleShow = e => {\n setShow(!show)\n setShow1(false)\n setShow2(false)\n setShow3(false)\n }\n const toggleShow1 = e => {\n setShow1(!show1)\n setShow(false)\n setShow2(false)\n setShow3(false)\n }\n const toggleShow2 = e => {\n setShow2(!show2)\n setShow(false)\n setShow1(false)\n setShow3(false)\n }\n const toggleShow3 = e => {\n setShow3(!show3)\n setShow(false)\n setShow1(false)\n setShow2(false)\n }\n\n const hideDD = e => {\n toggleShow();\n $(\"#responsive-navbar-nav\").removeClass(\"navbar-collapse collapse in\");\n $(\"#responsive-navbar-nav\").addClass(\"navbar-collapse collapse\");\n const el=document.getElementById(\"nav-toggle\")\n el.click();\n }\n\n const hideDD1 = e => {\n toggleShow1();\n $(\"#responsive-navbar-nav\").removeClass(\"navbar-collapse collapse in\");\n $(\"#responsive-navbar-nav\").addClass(\"navbar-collapse collapse\");\n const el=document.getElementById(\"nav-toggle\")\n el.click();\n }\n \n const handleToggle = e => {\n ;; // do nothing\n }\n\n const [showModal, setshowModal] = useState(false);\n function handlePricing () {\n setshowModal(true);\n }\n\n function handleClosePricing () {\n setshowModal(false);\n }\n\n const [showAbout, setshowAbout] = useState(false);\n function handleAbout () {\n setshowAbout(true);\n }\n\n function handleCloseAbout () {\n setshowAbout(false);\n }\n\n\n\n function getCookie(cname) {\n let name = cname + \"=\";\n let decodedCookie = decodeURIComponent(document.cookie);\n let ca = decodedCookie.split(';');\n for(let i = 0; i 450 ?\n \n \n {/* */}\n \n \n \n \n\n \n \n {user_id!=-1?\n \n \n \n : \n \n \n \n \n\n {countryCode!==\"IN\" ?\n setshowModal(false)} style={{marginTop:'7vh'}}>\n \n Pricing\n \n

    \n

    \n Pricing is based on number of wishes per event.



    If payment is made for 20 wishes at the creation of the event,\n then it is considered as prepaid cost.



    Let's say 30 wishers send their wishes, which is 10 wishes above what was prepaid,\n cost for additional 10 wishes are considered as postpaid.\n

    \n
    \n

    • Prepaid cost per wish :

    \n

    \n $0.10 per wish  +

    \n $0.15 + 3% of total wishes cost (convenience charges)\n

    \n
    \n

    • Postpaid cost per wish :

    \n

    \n $0.15 per wish  +

    \n $0.15 + 3% of total wishes cost (convenience charges)\n

    \n
    \n

    Note :

    \n

    \n Minimum number of wishes is 20.\n

    \n
    \n
    \n :\n setshowModal(false)} style={{marginTop:'7vh'}}>\n \n Pricing\n \n

    \n

    \n Pricing is based on number of wishes per event.



    If payment is made for 20 wishes at the creation of the event,\n then it is considered as prepaid cost.



    Let's say 30 wishers send their wishes, which is 10 wishes above what was prepaid,\n cost for additional 10 wishes are considered as postpaid.\n

    \n

    • Prepaid cost per wish :

    \n

    \n ₹10 per wish  +

    \n 5% (convenience charges)  + GST

    \n

    \n
    \n

    • Postpaid cost per wish :

    \n

    \n ₹15 per wish  +

    \n 5% (convenience charges)  + GST

    \n

    \n
    \n

    Note :

    \n

    \n Minimum number of wishes is 20.\n

    \n
    \n
    \n }\n\n setshowAbout(false)} style={{marginTop:'7vh'}}>\n \n About\n \n

    \n

    \n Welcome to Wish Collector.\n



    \n A whole new exciting way to easily collect 100's of 1000's of wishes all in one place from across the globe for various events/occassions like Marriages, Engagements, New Job, New House, etc. \n



    \n A must have for collecting student Autographs and for celebrations like Graduations, Promotions, etc.\n



    \n Collect 'Text' wishes, along with 'Audio' messages and also the wisher's pictures.\n



    \n All wishes are private and only the event creator can see and hear. \n



    \n All anyone need is a mobile to collect wishes or to wish. \n



    \n Takes less than 5 minutes to setup an event, upload event picture like a Marriage Invitation or a picture of graduating person, etc., record a short Video invitation or upload pre-recorded video, and share the event wish link to anyone you want to invite to provide their wishes.\n



    \n Watch and hear real time as wishes arrive.\n



    \n Download & Carry collected wishes easily even in your mobile and re-live the moment on the go!\n

    \n

    \n
    \n\n

    \n History\n



    \n We all like celebrating events or occasions, both personally and for someone else.\n



    \n We all feel good when we receive wishes irrespective of from Family, Friends, Relatives, Colleagues, Classmates, Neighbors, sometimes from strangers and even occasionally from enemies!\n



    \n We receive wishes via lots of medium like a simple phone call, a crisp SMS, a lengthy email, via messaging platform like WhatsApp, via social media apps like Meta or Instagram or even via snail mail, flowers, chocolates, gifts and finally via greeting cards physical or digital.\n



    \n We feel like we are over the moon…the feeling is priceless for each and every wish.\n



    \n But it lasts for only a few days at most...\n

    \n

    \n
    \n

    \n While we try to re-live that moment by searching for the received wishes in messages, emails, picture books, albums, videos, greeting cards and snail mails, it always was and is very difficult to retrieve some if not all thus making it difficult to re-live that moment and not always possible to even trace the wishes sometimes.\n

    \n

    \n
    \n

    \n Wish collector was created exactly for this one singular purpose, to re-live that moment easily and readily for years to come.\n



    \n How good will that be if you can just open up few files, see all your wishers’ pictures, just tap on each of them, and out pops a window with their text wishes and also hear their wishes in their own voice.\n



    \n Not only that, you can store them in various devices like a Desktop, Laptop, Tablets and even carry them in your mobile so that you can re-live that moment on-the-go.\n

    \n

    \n
    \n

    \n Wish Collector was directly inspired from our other successful product, namely “Audio School Pictures” by Composz, wherein each student in a School can leave audio messages in turn for their classmates, and even Teachers and Principal can leave audio messages for each student. Do checkout Composz here!\n

    \n

    \n
    \n

    \n We sincerely hope that Wish Collector will be lots of fun and also of immense help in easily collecting your wishes for self or others for various events or occassions. All one needs is a mobile with internet access.\n



    \n Good Luck.\n



    \n Cheers,\n

    \n --team Wish Collector.\n

    \n

    \n
    \n
    \n\n\n
    \n }\n
    \n\n : // mobile below\n\n \n
    \n \n \n
    \n
    \n \n {user_id!=-1?\n\n \n :\n \n }\n\n {countryCode!==\"IN\" ?\n setshowModal(false)} style={{marginTop:'7vh'}}>\n \n Pricing\n \n

    \n

    \n Pricing is based on number of wishes per event.



    If payment is made for 20 wishes at the creation of the event,\n then it is considered as prepaid cost.



    Let's say 30 wishers send their wishes, which is 10 wishes above what was prepaid,\n cost for additional 10 wishes are considered as postpaid.\n

    \n

    • Prepaid cost per wish :

    \n

    \n $0.10 per wish  +

    \n $0.15 + 3% of total wishes cost (convenience charges)\n

    \n
    \n

    • Postpaid cost per wish :

    \n

    \n $0.15 per wish  +

    \n $0.15 + 3% of total wishes cost (convenience charges)\n

    \n
    \n

    Note :

    \n

    \n Minimum number of wishes is 20.\n

    \n
    \n
    \n :\n setshowModal(false)} style={{marginTop:'7vh'}}>\n \n Pricing\n \n

    \n

    \n Pricing is based on number of wishes per event.



    If payment is made for 20 wishes at the creation of the event,\n then it is considered as prepaid cost.



    Let's say 30 wishers send their wishes, which is 10 wishes above what was prepaid,\n cost for additional 10 wishes are considered as postpaid.\n

    \n

    • Prepaid cost per wish :

    \n

    \n ₹10 per wish  +

    \n 5% (convenience charges)  + GST

    \n

    \n
    \n

    • Postpaid cost per wish :

    \n

    \n ₹15 per wish  +

    \n 5% (convenience charges)  + GST

    \n

    \n
    \n

    Note :

    \n

    \n Minimum number of wishes is 20.\n

    \n
    \n
    \n }\n\n setshowAbout(false)} style={{marginTop:'7vh'}}>\n \n About\n \n

    \n

    \n Welcome to Wish Collector.\n



    \n A whole new exciting way to easily collect 100's of 1000's of wishes all in one place from across the globe for various events/occassions like Marriages, Engagements, New Job, New House, etc. \n



    \n A must have for collecting student Autographs and for celebrations like Graduations, Promotions, etc.\n



    \n Collect 'Text' wishes, along with 'Audio' messages and also the wisher's pictures.\n



    \n All wishes are private and only the event creator can see and hear. \n



    \n All anyone need is a mobile to collect wishes or to wish. \n



    \n Takes less than 5 minutes to setup an event, upload event picture like a Marriage Invitation or a picture of graduating person, etc., record a short Video invitation or upload pre-recorded video, and share the event wish link to anyone you want to invite to provide their wishes.\n



    \n Watch and hear real time as wishes arrive.\n



    \n Download & Carry collected wishes easily even in your mobile and re-live the moment on the go!\n

    \n

    \n
    \n\n

    \n History\n



    \n We all like celebrating events or occasions, both personally and for someone else.\n



    \n We all feel good when we receive wishes irrespective of from Family, Friends, Relatives, Colleagues, Classmates, Neighbors, sometimes from strangers and even occasionally from enemies!\n



    \n We receive wishes via lots of medium like a simple phone call, a crisp SMS, a lengthy email, via messaging platform like WhatsApp, via social media apps like Meta or Instagram or even via snail mail, flowers, chocolates, gifts and finally via greeting cards physical or digital.\n



    \n We feel like we are over the moon…the feeling is priceless for each and every wish.\n



    \n But it lasts for only a few days at most...\n

    \n

    \n
    \n

    \n While we try to re-live that moment by searching for the received wishes in messages, emails, picture books, albums, videos, greeting cards and snail mails, it always was and is very difficult to retrieve some if not all thus making it difficult to re-live that moment and not always possible to even trace the wishes sometimes.\n

    \n

    \n
    \n

    \n Wish collector was created exactly for this one singular purpose, to re-live that moment easily and readily for years to come.\n



    \n How good will that be if you can just open up few files, see all your wishers’ pictures, just tap on each of them, and out pops a window with their text wishes and also hear their wishes in their own voice.\n



    \n Not only that, you can store them in various devices like a Desktop, Laptop, Tablets and even carry them in your mobile so that you can re-live that moment on-the-go.\n

    \n

    \n
    \n

    \n Wish Collector was directly inspired from our other successful product, namely “Audio School Pictures” by Composz, wherein each student in a School can leave audio messages in turn for their classmates, and even Teachers and Principal can leave audio messages for each student. Do checkout Composz here!\n

    \n

    \n
    \n

    \n We sincerely hope that Wish Collector will be lots of fun and also of immense help in easily collecting your wishes for self or others for various events or occassions. All one needs is a mobile with internet access.\n



    \n Good Luck.\n



    \n Cheers,\n

    \n --team Wish Collector.\n

    \n

    \n
    \n
    \n\n
    \n
    \n
    \n\n );\n}\n\nexport default Mynavbar\n","import React, { useState } from 'react';\nimport { Navbar, Nav, NavItem, MenuItem, NavDropdown, Dropdown } from 'react-bootstrap';\nimport logo from 'images/Composz-logo-white-trans.png';\nimport Mynavbar from './WishCollectorNav';\n\nexport class WishCollectorNavbar extends React.Component {\n \n \n constructor(props) {\n super(props)\n this.state = {\n windowWidth: window.innerWidth,\n windowHeight: window.innerHeight\n };\n document.cookie = \"cartCounter=25;\";\n }\n\n componentDidMount() {\n window.addEventListener(\"resize\", this.handleResize);\n }\n\n componentWillUnmount() {\n window.removeEventListener(\"resize\", this.handleResize);\n}\n\n handleResize = e => {\n const windowWidth = window.innerWidth;\n const windowHeight = window.innerHeight;\n \n this.setState(prevState => {\n return {\n windowWidth,\n windowHeight,\n };\n });\n };\n\n \n Fnavbar = () => {\n let Usernavbar = Mynavbar(this.props.user_id, this.props.user_name, this.props.has_view_products)\n return Usernavbar\n }\n\n render() {\n\n return (\n \n {window.location.pathname!=\"/products\" && \n window.location.pathname!=\"/orders\" &&\n window.location.pathname!=\"/orders/cart\"? \n \n : \n \n }\n \n );\n }\n}\n\nexport default WishCollectorNavbar\n","import React from \"react\";\nimport { FormGroup, ControlLabel, FormControl, HelpBlock } from \"react-bootstrap\";\n\nexport const FieldGroup = ({ id, label, help, ...props }) => {\n return (\n \n {label}\n \n {help && {help}}\n \n );\n};\n","import React, { Component } from \"react\";\nimport { TOGGLE_PRODUCT_EXPAND } from \"../../actions\";\nimport OrderProductSetListContainer from \"../../containers/orders/OrderProductSetListContainer\";\nimport PaymentContainer from \"../../containers/orders/PaymentContainer\";\nimport CCavenuePaymentContainer from \"../../containers/orders/CCavenuePaymentContainer\";\nimport ShareProductContainer from \"../../containers/orders/ShareProductContainer\";\n\nclass Order extends Component {\n constructor(props) {\n super(props);\n this.state = { ...props };\n }\n onExpandToggle = (e) => {\n e.stopPropagation();\n e.preventDefault();\n this.setState({ expand: !this.state.expand });\n // this.props.getSets(this.props.product.id);\n };\n\n onProductSetsToggle = (e) => {\n e.stopPropagation();\n e.preventDefault();\n this.setState({ isProductSetsExpanded: !this.state.isProductSetsExpanded });\n this.props.getSets(this.props.product.id);\n };\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (\n nextProps.product !== this.state.product ||\n (nextProps.product && nextProps.product.product_sets)\n ) {\n this.setState({ product: nextProps.product });\n }\n }\n\n componentDidMount() {\n // this.props.getPrice(this.props.product.id);\n // this.props.getOrders({ status: \"pending\" });\n // this.props.getSets(this.props.product.id);\n }\n\n getPaymentDetails = (order, product) => {\n if (\n (order && order.status == \"paid\") ||\n (product.pricing && product.pricing.price_for_files === 0)\n ) {\n return (\n
      \n
    • Download
    • \n
    \n );\n } else if (order && order.status == \"pending\") {\n return (\n
      \n \n
    \n );\n } else {\n return (\n
      \n \n
    \n );\n }\n };\n\n getCartDetails = (order, product) => {\n if (order && order.status == \"paid\" && this.isProductAddToCart(product.id, \"order\")) {\n return (\n
      \n
    • Download
    • \n
    \n );\n } else {\n return (\n
      \n
    • \n {this.isProductAddToCart(product.id, \"cart\") ? (\n {\n this.props.addToCart({ product_id: product.id, type: \"remove\", setno: \"all\" });\n }}\n >\n Remove from Cart\n \n ) : (\n {\n this.props.addToCart({ product_id: product.id });\n }}\n >\n Add to Cart\n \n )}\n
    • \n
    \n );\n }\n };\n\n isProductAddToCart = (setno) => {\n const { cart_product } = this.props;\n if (cart_product && cart_product.order_details) {\n let sets =\n (cart_product && cart_product.order_details && cart_product.order_details.sets) || {};\n if (Object.keys(sets).includes(\"all\") || sets[setno]) return true;\n return false;\n }\n return false;\n };\n\n getOrderDetails(product) {\n const pricing = product.pricing;\n var costPerAudioFile=0.00;\n var audioFileduration = 0; \n \n product.prtype!==\"NORMAL\"? audioFileduration = parseInt(product.prtype.split('-')[1].split('SEC')[0]) : 0;\n \n if (this.getCookie(\"countryCode\")!==\"IN\") {\n costPerAudioFile = 4.00;\n }\n else { \n if (audioFileduration===15) {\n costPerAudioFile = 127.00\n }\n if (audioFileduration===30) {\n costPerAudioFile = 200.00\n }\n }\n\n const order = (product.order || []).find((o) => o.status == \"pending\");\n if (order && order.status == \"pending\") {\n return (\n this.getCookie(\"countryCode\")!==\"IN\"?\n
      \n
    • Total no. of Records: {order.num_files / product.numpages}
    • \n
    • Total no. of Image files: {order.num_files}
    • \n
    • Price per Image File: ${(order.price_first_page / 100).toFixed(2)}
    • \n
    • Total Image files amount: ${(order.total_files_amount / 100).toFixed(2)}
    • \n {product.prtype!==\"NORMAL\"?
    • Price for Audio Files / Record (.html): ${costPerAudioFile.toFixed(2)}
    • : null}\n {product.prtype!==\"NORMAL\"?
    • Total Audio files: Upto {order.num_files}
    • : null}\n {product.prtype!==\"NORMAL\"?
    • Total Audio files amount: ${(order.num_files / product.numpages * costPerAudioFile).toFixed(2)}
    • : null}\n
    • \n Convenience Charges: $\n {((order.total_amount - order.total_files_amount) / 100).toFixed(2)}\n
    • \n {product.prtype!==\"NORMAL\"? \n
    • Grand Total Amount: ${((order.total_amount / 100) + (order.num_files / product.numpages * costPerAudioFile)).toFixed(2)}
    • \n : \n
    • Grand Total Amount: ${(order.total_amount / 100).toFixed(2)}
    • \n } \n
    :\n
      \n
    • Total no. of Records: {order.num_files / product.numpages}
    • \n
    • Total no. of Image files: {order.num_files}
    • \n
    • Price per Image File: ₹75.00
    • \n
    • Total Image files amount: ₹{(order.num_files * 75).toFixed(2)}
    • \n {product.prtype!==\"NORMAL\"?
    • Price for Audio Files / Record (.html): ${costPerAudioFile.toFixed(2)}
    • : null}\n {product.prtype!==\"NORMAL\"?
    • Total Audio files: Upto {order.num_files}
    • : null}\n {product.prtype!==\"NORMAL\"?
    • Total Audio files amount: ₹{(order.num_files / product.numpages * costPerAudioFile).toFixed(2)}
    • : null}\n
    • \n Convenience Charges: ₹{(order.num_files * 10).toFixed(2)}\n
    • \n
    • \n GST 18% : ₹\n {product.prtype!==\"NORMAL\"? (((order.num_files / product.numpages * costPerAudioFile) + (order.num_files * 75 + order.num_files * 10)) * 0.18).toFixed(2)\n : ((order.num_files * 75 + order.num_files * 10) * 0.18).toFixed(2)}\n
    • \n {product.prtype!==\"NORMAL\"? \n
    • Grand Total Amount: ₹{Math.round(((order.num_files * 75) + (order.num_files * 10)) + (order.num_files / product.numpages * costPerAudioFile) + (((order.num_files / product.numpages * costPerAudioFile) + (order.num_files * 75 + order.num_files * 10)) * 0.18)).toFixed(2)}
    • \n :
    • Grand Total Amount: ₹{Math.round(((order.num_files * 75) + (order.num_files * 10)) + (order.num_files * 75 + order.num_files * 10) * 0.18).toFixed(2)}
    • }\n
    \n \n );\n }\n // if (order && order.status === \"paid\") {\n // return (\n //
      \n //
    • No. of files: {order.num_files}
    • \n //
    • Total Amount: {order.total_amount}
    • \n //
    \n // );\n // } else if (pricing) {\n // return (\n //
      \n //
    • {pricing && pricing.pages_count && pricing.pages_count.total} Files
    • \n //
    • Total Amount: {pricing.price_total}
    • \n //
    \n // );\n // }\n }\n\n getExpandJSX = (expandFlag) => {\n return (\n \n {expandFlag && }\n {!expandFlag && }\n \n );\n };\n\n getCookie(cname) {\n let name = cname + \"=\";\n let decodedCookie = decodeURIComponent(document.cookie);\n let ca = decodedCookie.split(';');\n for(let i = 0; i \n {this.getExpandJSX(expand)} {product.name}\n \n );\n // if (product_sets && product_sets.length) {\n // return null;\n // }\n\n let productSets = null;\n if (expand == true) {\n productSets = (\n \n
  • \n \n {this.getExpandJSX(this.state.isProductSetsExpanded)} Product Sets\n \n {this.state.isProductSetsExpanded &&\n product_sets.length &&\n product_sets.map((ps) => {\n let t = [];\n if (this.isProductAddToCart(ps.setno)) {\n const { cart_product } = this.props;\n let sets = [];\n let counts = (ps.counts || []).find((f) => f.dlname == product.main_dlname);\n if (cart_product && cart_product.order_details) {\n sets =\n (cart_product &&\n cart_product.order_details &&\n cart_product.order_details.sets) ||\n {};\n\n let isAllRecords =\n Object.keys(sets).includes(\"all\") ||\n (sets[ps.setno] &&\n (Object.keys(sets[ps.setno]).includes(\"all\") ||\n Object.keys(sets[ps.setno]).length ==\n ((counts && counts.main_occurence_count) || 0)));\n\n let keys = Object.keys(sets[ps.setno] || {});\n for (let i = 0; i < keys.length; i++) {\n t.push(
  • Record no {parseInt(keys[i]) + 1}
  • );\n }\n // if (isAllRecords && counts.main_occurence_count) {\n // for (let index = 1; index <= counts.main_occurence_count; index++) {\n // t.push(
  • Record no {index}
  • );\n // }\n // } else {\n // // Object.keys(sets[ps.setno]).forEach((recordNo) => {\n // // t.push(
  • Record no {recordNo}
  • );\n // // });\n // let keys = Object.keys(sets[ps.setno] || {});\n // for (let i = 0; i < keys.length; i++) {\n // t.push(
  • Record no {parseInt(keys[i]) + 1}
  • );\n // }\n // }\n }\n return (\n
      \n {\n this.setState({\n [`p_set_${ps.setno}`]: !(this.state[`p_set_${ps.setno}`] || false),\n });\n }}\n >\n {this.getExpandJSX(this.state[`p_set_${ps.setno}`] || false)}\n {\" \" + ps.desc}\n \n {this.state[`p_set_${ps.setno}`] &&
        {t}
      }\n {/*
        {t}
      */}\n
    \n );\n }\n })}\n {/* */}\n \n {cart_product.pg_order_id && (\n
  • \n {this.countryCode!==\"IN\"?\n :\n \n }\n
  • \n )}\n
  • {this.getOrderDetails(this.state.product)}
  • \n {!cart_product.pg_order_id && (\n
  • \n {this.countryCode!==\"IN\"?\n :\n \n }\n
  • \n )}\n
    \n );\n }\n if (cart_product) {\n return (\n \n
  • {readOnly}
  • \n
      {productSets}
    \n
    \n );\n } else {\n return null;\n }\n }\n}\n\nexport default Order;\n","import React, { Component } from \"react\";\nimport { TOGGLE_PRODUCT_EXPAND } from \"../../actions\";\nimport PaymentContainer from \"../../containers/orders/PaymentContainer\";\n\nclass Cart extends Component {\n constructor(props) {\n super(props);\n this.state = { ...props };\n }\n onExpandToggle = e => {\n e.stopPropagation();\n e.preventDefault();\n this.setState({ expand: !this.state.expand });\n this.props.toggleView({\n reducerKey: TOGGLE_PRODUCT_EXPAND,\n id: this.props.product.id\n });\n this.props.getSets(this.props.product.id);\n };\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (nextProps.product !== this.state.product) {\n this.setState({ product: nextProps.product });\n }\n }\n\n componentDidMount() {\n this.props.getPrice(this.props.product.id);\n }\n\n getPaymentDetails = (order, product) => {\n if (\n (order && order.status == \"paid\") ||\n (product.pricing && product.pricing.price_for_files === 0)\n ) {\n return (\n
      \n
    • Download
    • \n
    \n );\n } else if (order && order.status == \"pending\") {\n return (\n
      \n \n
    \n );\n } else {\n return (\n
      \n \n
    \n );\n }\n };\n\n getCartDetails = (order, product) => {\n if (\n (order && order.status == \"paid\") ||\n (product.pricing && product.pricing.price_for_files === 0)\n ) {\n return (\n
      \n
    • Download
    • \n
    \n );\n } else {\n return (\n
      \n
    • \n {this.isProductAddToCart(product.id) ? (\n \"Added to cart\"\n ) : (\n {\n this.props.addToCart({ product_id: product.id });\n }}\n >\n Add to Cart\n \n )}\n
    • \n
    \n );\n }\n };\n\n isProductAddToCart = product_id => {\n const { cart_product } = this.state;\n if (cart_product) {\n let sets =\n cart_product &&\n cart_product.order_details &&\n cart_product.order_details.sets;\n if (Object.keys(sets).includes(\"all\")) return true;\n return false;\n }\n return false;\n };\n\n getOrderDetails(product) {\n const pricing = product.pricing;\n const order = product.order;\n if (order && order.status === \"paid\") {\n return (\n
      \n
    • No. of files: {order.num_files}
    • \n
    • Total Amount: {order.total_amount}
    • \n
    \n );\n } else if (pricing) {\n return (\n
      \n
    • \n {pricing && pricing.pages_count && pricing.pages_count.total} Files\n
    • \n
    • Total Amount: {pricing.price_total}
    • \n
    \n );\n }\n }\n\n render() {}\n}\n\nexport default Cart;\n","import React, { Component } from \"react\";\nimport PaymentContainer from \"../../containers/orders/PaymentContainer\";\nimport CartContainer from \"../../containers/cart/CartContainer\";\n\nclass CartList extends Component {\n UNSAFE_componentWillReceiveProps(nextProps) {}\n\n componentDidMount() {\n this.props.getProducts();\n this.props.getOrders({ status: \"pending\" });\n }\n\n render1() {\n const carts = this.props.carts;\n const cartsList = carts.length ? (\n carts.map((cart) => {\n return (\n
  • \n {cart.product.name}\n
      \n {cart.pg_order_id && (\n
    • \n \n
    • \n )}\n {!cart.pg_order_id && (\n
    • \n \n
    • \n )}\n
    \n
  • \n );\n })\n ) : (\n
    No items in the cart
    \n );\n\n return (\n
    \n

    My Cart

    \n
      {cartsList}
    \n
    \n );\n }\n\n render() {\n const products = this.props.products;\n const productList = products.length ? (\n products.map((product) => {\n return ;\n })\n ) : (\n
    No Items
    \n );\n\n return (\n
    \n

    My Cart

    \n
      {productList}
    \n
    \n );\n }\n}\n\nexport default CartList;\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport {\n Col,\n Form,\n FormGroup,\n InputGroup,\n ControlLabel,\n FormControl,\n Modal,\n Fade,\n utils,\n Button,\n} from \"react-bootstrap\";\nimport { FieldGroup } from \"../bootstrap/Forms.FieldGroup\";\nimport { ENDPOINTS } from \"../../constants/endpoints\";\nimport { formDataToJSON } from \"../../adukku_utils/array\";\n\nexport default class AddLayout extends React.Component {\n constructor(props) {\n super(props);\n this.showCreateLayoutOverlay = this.showCreateLayoutOverlay.bind(this);\n this.hideCreateLayoutOverlay = this.hideCreateLayoutOverlay.bind(this);\n this.state = {\n product: props.product,\n widthI: 12,\n heightI: 10,\n width: 1200,\n height: 1000,\n overlay: props.overlay || { visible: false },\n layoutCategories: [],\n };\n this._handleValidSubmit = this._handleValidSubmit.bind(this);\n this._handleInputChange = this._handleInputChange.bind(this);\n\n // this.handleOrderChange = this.handleOrderChange.bind(this);\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (nextProps !== this.state) {\n this.setState(nextProps);\n }\n }\n\n showCreateLayoutOverlay(e) {\n e.preventDefault();\n e.stopPropagation();\n this.props.showOverlay(this.state.overlay_id);\n }\n\n hideCreateLayoutOverlay(e) {\n e.preventDefault();\n e.stopPropagation();\n this.props.hideOverlay(this.state.overlay_id);\n }\n\n\n _handleInputChange(e) {\n e.preventDefault();\n e.stopPropagation();\n const target = e.target;\n if (target.value>24) {\n alert(\"Value cannot be greater than 24 Inches!\");\n }\n else if\n (target.value<1) {\n alert(\"Value cannot be less than 1 Inches!\");\n }\n else if\n (target.name == \"widthI\") {\n this.setState({\n [\"width\"]: Math.round(target.value * 100),\n [\"widthI\"]: target.value\n });\n }\n else if (target.name == \"heightI\") {\n this.setState({\n [\"height\"]: Math.round(target.value * 100),\n [\"heightI\"]: target.value \n });\n }\n }\n\n _handleValidSubmit(e) {\n e.preventDefault();\n e.stopPropagation();\n let formData = formDataToJSON(new FormData(e.target));\n formData.desc = formData.desc.trim()\n let endpoint = ENDPOINTS[\"layouts\"][\"create\"];\n let url = endpoint.uri;\n let method = endpoint.method;\n this.props.createLayout(url, method, formData);\n }\n\n render() {\n const isVisible = this.state.overlay.visible;\n const product = this.state.product;\n\n return (\n
      \n
    • \n Create New layout \n \n
      \n \n Create New layout\n \n \n
      Width (in Inches):
      \n
      \n \n \n Width in Pixels :\n {this.state.width}\n\n
      \n

      \n \n
      Height (in Inches):
      \n
      \n \n \n Height in Pixels :\n {this.state.height}\n
      \n

      \n \n\n \n \n \n \n
      \n \n \n {/* */}\n \n
      \n
      \n
    • \n
    \n );\n }\n}\n","import React from \"react\";\nimport LyDlListContainer from \"../../containers/layouts/lydl/LyDlListContainer\";\nimport LyDlRelListContainer from \"../../containers/layouts/lydlrel/LyDlRelListContainer\";\nimport LySlotForListContainer from \"../../containers/layouts/lyslotfors/LySlotForListContainer\";\nimport AddLySlotForContainer from \"../../containers/layouts/lyslotfors/AddLySlotForContainer\";\nimport { ENDPOINTS } from \"../../constants/endpoints\";\n\nimport { formDataToJSON } from \"../../adukku_utils/array\";\nimport ThumbnailPreview from \"./ThumbnailPreview\";\n\nimport {\n Row,\n Col,\n Form,\n FormGroup,\n ControlLabel,\n FormControl,\n Modal,\n Fade,\n utils,\n Button,\n} from \"react-bootstrap\";\nimport { FieldGroup } from \"../bootstrap/Forms.FieldGroup\";\nimport { authorized, Authorized } from \"../../adukku_utils/authorizeUser\";\n\nexport default class Layout extends React.Component {\n constructor(props) {\n super(props);\n const layout = (props && props.layout) || {};\n this.state = {\n ...props,\n isCopyLayoutClicked: false,\n description: \"\",\n desc: layout.desc,\n is_preset_bg: layout.is_preset_bg,\n is_preset_sticker: layout.is_preset_sticker,\n height: layout.height,\n width: layout.width,\n isSlotForsExpanded: false,\n show: false,\n isEditLayoutClicked: false,\n layoutCategories: [],\n other_category: \"\",\n sticker_category: layout.sticker_category,\n };\n this.toggleExpand = this.toggleExpand.bind(this);\n }\n\n toggleExpand(e) {\n e.stopPropagation();\n this.props.getLayoutDetails(this.state.layout.id);\n this.setState(Object.assign({}, this.state, { expand: !this.state.expand }));\n }\n\n componentDidMount() {\n let expandedProduct = localStorage.getItem(\"expandedProduct\");\n expandedProduct = expandedProduct ? JSON.parse(expandedProduct) : {};\n\n if (\n expandedProduct.layoutId &&\n this.state.layout.id == expandedProduct.layoutId &&\n !expandedProduct.isSet\n ) {\n this.setState({\n expand: true,\n });\n this.props.getLayoutDetails(this.state.layout.id);\n localStorage.setItem(\"expandedProduct\", JSON.stringify({}));\n }\n let that = this;\n fetch(\"/api/layouts/categories\", {\n method: \"GET\",\n headers: {\n \"content-type\": \"application/json\",\n },\n })\n .then((response) => response.json())\n .then((response) => {\n let layoutCategories =\n (response &&\n response.categories &&\n response.categories.map((category) => {\n return {\n label: category,\n value: category,\n };\n })) ||\n [];\n that.setState({ layoutCategories: layoutCategories || [] });\n });\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (this.state !== nextProps) {\n this.setState(nextProps);\n }\n }\n\n _handleDeletelayout(e, layout_id) {\n e.preventDefault();\n e.stopPropagation();\n if (confirm(\"Are you sure you want to delete the layout along with data?\")) {\n let payload = { id: layout_id, product_id: this.state.product.id };\n let endpoint = ENDPOINTS[\"layouts\"][\"delete\"];\n let url = endpoint.uri;\n let method = endpoint.method;\n this.props.deleteLayout(url, method, payload);\n } else {\n return;\n }\n }\n\n _handleClonelayout(e, layout_id) {\n e.preventDefault();\n e.stopPropagation();\n if (this.state.isCopyLayoutClicked) {\n if (!this.state.description) return alert(\"Please enter layout description\");\n let payload = {\n id: layout_id,\n product_id: this.state.product.id,\n desc: this.state.description,\n };\n let endpoint = ENDPOINTS[\"layouts\"][\"clone\"];\n let url = endpoint.uri;\n let method = endpoint.method;\n this.props.cloneLayout(url, method, payload);\n this.setState({\n isCopyLayoutClicked: false,\n });\n } else {\n this.setState({\n isCopyLayoutClicked: true,\n });\n }\n }\n\n handleCancelLayout = (e) => {\n e.preventDefault();\n e.stopPropagation();\n this.setState({\n isCopyLayoutClicked: false,\n });\n };\n\n getExpandJSX = (expandFlag) => {\n return (\n \n {expandFlag && }\n {!expandFlag && }\n \n );\n };\n\n getEditLayoutJSX = (isVisible) => {\n const layout = this.state.layout;\n const { desc, height, width, is_preset_bg, is_preset_sticker } = this.state;\n const layoutCategories = this.state.layoutCategories || [];\n\n if (isVisible) {\n return (\n {\n this.setState({\n isEditLayoutClicked: false,\n });\n }}\n >\n
    \n \n Edit Layout\n \n \n {\n this.setState({ [name]: value });\n }}\n // disabled={true}\n placeholder=\"Product Name\"\n required=\"required\"\n />\n {/* {\n this.setState({ [name]: value });\n }}\n // disabled={true}\n placeholder=\"Height\"\n required=\"required\"\n />\n {\n this.setState({ [name]: value });\n }}\n // disabled={true}\n placeholder=\"Width\"\n required=\"required\"\n /> */}\n {this.state.role === \"admin\" && (\n \n {\n this.setState({ [name]: checked });\n }}\n />\n {\n this.setState({ [name]: checked });\n }}\n />\n\n {\n this.setState({ [name]: value });\n }}\n value={this.state.sticker_category}\n >\n \n {layoutCategories.map((category) => {\n return (\n \n );\n })}\n \n {this.state.sticker_category == \"other\" && (\n {\n this.setState({ [name]: value });\n }}\n value={this.state.other_category}\n />\n )}\n \n )}\n \n \n \n {/* {\n this.setState({\n isEditLayoutClicked: false,\n });\n }}\n >\n Cancel\n */}\n \n
    \n \n );\n }\n };\n\n handleEditLayout = (e) => {\n // this.se\n e.preventDefault();\n e.stopPropagation();\n const { layout, product } = this.state;\n let endpoint = ENDPOINTS.layouts.update;\n let url = endpoint.uri;\n let method = endpoint.method;\n\n let formData = formDataToJSON(new FormData(e.target));\n formData.is_preset_bg = this.state.is_preset_bg;\n formData.is_preset_sticker = this.state.is_preset_sticker;\n formData.sticker_category =\n this.state.sticker_category == \"other\"\n ? this.state.other_category\n : this.state.sticker_category;\n formData.product_id = product.id;\n this.props.updateLayout(layout.id, url, method, formData);\n this.setState({\n isEditLayoutClicked: false,\n });\n };\n\n render() {\n const layout = this.state.layout;\n const product = this.state.product;\n const isExpand = this.state.expand;\n const role = this.state.role;\n let children = [];\n\n const cloneLayoutJSX = (\n this._handleClonelayout(e, layout.id)}\n >\n
    \n {\n this.setState({ description: value });\n }}\n className=\"form-control dlname\"\n placeholder=\"Enter Layout Description\"\n required=\"required\"\n defaultValue={null}\n />\n
    \n \n this.handleCancelLayout(e, layout.id)}\n >\n Cancel\n \n \n );\n if (isExpand) {\n children.push(\n \n );\n children.push(\n \n );\n children.push(\n \n );\n children.push(\n \n );\n }\n return (\n
  • \n \n {this.getExpandJSX(isExpand)} {layout.desc}\n \n \n {\n e.stopPropagation();\n e.preventDefault();\n let expandedProduct = {\n productId: product.id,\n layoutId: layout.id,\n };\n localStorage.setItem(\"expandedProduct\", JSON.stringify(expandedProduct));\n window.location = \"/products/\" + product.id + \"/layouts/\" + layout.id;\n }}\n // href={\"/products/\" + product.id + \"/layouts/\" + layout.id}\n style={{ paddingLeft: \"15px\" }}\n title=\"Edit Layout\"\n >\n \n \n\n {!this.state.isCopyLayoutClicked && (\n {\n this._handleClonelayout(e, layout.id);\n }}\n style={{ paddingLeft: \"15px\" }}\n title=\"Copy Layout\"\n // confirm=\"Are you sure you want to delete the layout?\"\n >\n \n \n )}\n {\n this._handleDeletelayout(e, layout.id);\n }}\n style={{ paddingLeft: \"15px\" }}\n title=\"Delete\"\n // confirm=\"Are you sure you want to delete the layout?\"\n >\n \n \n {!this.state.isEditLayoutClicked && (\n // \n // \n {\n e.stopPropagation();\n e.preventDefault();\n this.setState({\n isEditLayoutClicked: !this.state.isEditLayoutClicked,\n });\n }}\n >\n \n \n )}\n\n {this.state.isEditLayoutClicked && this.getEditLayoutJSX(this.state.isEditLayoutClicked)}\n \n {this.state.isCopyLayoutClicked && cloneLayoutJSX}\n {layout.preview_url && (\n
    \n this.setState({ show: true })}\n style={{\n height: \"60px\",\n boxShadow: \"5px 5px 10px rgba(0,0,0,.5)\",\n marginBottom: \"15px\",\n margin: \"10px 0 15px 35px\",\n cursor: \"pointer\",\n }}\n src={`${layout.preview_url}?${new Date()}`}\n />\n {this.state.show && (\n this.setState({ show: false })}\n />\n )}\n
    \n )}\n {children}\n
  • \n );\n }\n}\n","import React from \"react\";\nimport LayoutContainer from \"../../containers/layouts/LayoutContainer\";\n\nexport default class LayoutList extends React.Component {\n constructor(props) {\n super(props);\n this.state = { ...props };\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (this.state !== nextProps) {\n this.setState(nextProps);\n }\n }\n\n UNSAFE_componentWillMount() {\n this.props.getLayouts(this.state.product.id);\n }\n\n render() {\n let view = [];\n for (let i = 0; i < this.state.layouts.length; i++) {\n view.push(\n \n );\n }\n return
      {view}
    ;\n }\n}\n","import React from \"react\";\n\nclass ThumbnailPreview extends React.Component {\n handleClose = () => {\n this.closeFullScreen();\n this.props.onClose();\n };\n closeFullScreen = () => {\n var isInFullScreen =\n (document.fullscreenElement && document.fullscreenElement !== null) ||\n (document.webkitFullscreenElement &&\n document.webkitFullscreenElement !== null) ||\n (document.mozFullScreenElement &&\n document.mozFullScreenElement !== null) ||\n (document.msFullscreenElement && document.msFullscreenElement !== null);\n\n if (document.exitFullscreen) {\n if (isInFullScreen) {\n document.exitFullscreen();\n }\n } else if (document.webkitExitFullscreen) {\n document.webkitExitFullscreen();\n } else if (document.mozCancelFullScreen) {\n document.mozCancelFullScreen();\n } else if (document.msExitFullscreen) {\n document.msExitFullscreen();\n }\n };\n render() {\n const { imageSrc, layoutDetails } = this.props;\n let self = this;\n function toggleFullScreen() {\n let element = document.querySelector(\".thumbnail-preview-modal\");\n var isInFullScreen =\n (document.fullscreenElement && document.fullscreenElement !== null) ||\n (document.webkitFullscreenElement &&\n document.webkitFullscreenElement !== null) ||\n (document.mozFullScreenElement &&\n document.mozFullScreenElement !== null) ||\n (document.msFullscreenElement && document.msFullscreenElement !== null);\n\n var docElm = element;\n if (!isInFullScreen) {\n if (docElm.requestFullscreen) {\n docElm.requestFullscreen();\n } else if (docElm.mozRequestFullScreen) {\n docElm.mozRequestFullScreen();\n } else if (docElm.webkitRequestFullScreen) {\n docElm.webkitRequestFullScreen();\n } else if (docElm.msRequestFullscreen) {\n docElm.msRequestFullscreen();\n }\n } else {\n self.closeFullScreen();\n }\n }\n return (\n
    \n
    \n {layoutDetails.desc && (\n
    \n
    {layoutDetails.desc}
    \n
    \n )}\n\n
    \n \n X\n \n
    \n
    \n
    \n
    \n \n
    \n
    \n \n \n
    \n
    \n \n );\n }\n}\nexport default ThumbnailPreview;\n","import React from 'react';\n\nexport default class LyDl extends React.Component {\n constructor(props)\n {\n super(props);\n this.state = {...props};\n }\n\n UNSAFE_componentWillReceiveProps(nextProps){\n if(this.state !== nextProps){\n this.setState(nextProps);\n }\n }\n\n render()\n {\n const lyDl = this.state.layout_datalevel;\n return
  • \n {lyDl.dlname}\n
  • ;\n }\n};","import React from \"react\";\nimport LyDlContainer from \"../../../containers/layouts/lydl/LyDlContainer\";\nimport ManageLyDlContainer from \"../../../containers/layouts/lydl/ManageLyDlContainer\";\nimport { authorized, Authorized } from \"../../../adukku_utils/authorizeUser\";\n\nexport default class LyDlList extends React.Component {\n constructor(props) {\n super(props);\n this.state = { ...props };\n this.toggleExpand = this.toggleExpand.bind(this);\n }\n\n toggleExpand(e) {\n e.stopPropagation();\n this.setState(Object.assign({}, this.state, { expand: !this.state.expand }));\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (this.state !== nextProps) {\n this.setState(nextProps);\n }\n }\n getExpandJSX = (expandFlag) => {\n return (\n \n {expandFlag && }\n {!expandFlag && }\n \n );\n };\n\n render() {\n const layout = this.state.layout;\n const product = this.state.product;\n const role = this.state.role;\n if (layout == null && layout.datalevels == null) {\n return null;\n }\n const ly_datalevels = layout.datalevels;\n const isExpand = this.state.expand;\n let children = [];\n if (isExpand) {\n for (let i = 0; i < ly_datalevels.length; i++) {\n children.push(\n \n );\n }\n\n if (authorized([\"admin\", \"owner\"], [role, product.product_role], \"ANY\")) {\n children.push(\n \n );\n }\n }\n return (\n \n );\n }\n}\n","import React from \"react\";\nimport {\n Col,\n Form,\n FormGroup,\n ControlLabel,\n FormControl,\n Modal,\n Fade,\n utils,\n Button,\n Table,\n} from \"react-bootstrap\";\nimport { formDataToJSON } from \"../../../adukku_utils/array\";\nimport { ENDPOINTS } from \"../../../constants/endpoints\";\n\nexport default class ManageLyDl extends React.Component {\n constructor(props) {\n super(props);\n this.state = { ...props };\n this.toggleExpand = this.toggleExpand.bind(this);\n this._handleValidSubmit = this._handleValidSubmit.bind(this);\n this.hideLayoutDLOverlay = this.hideLayoutDLOverlay.bind(this);\n this.showLayoutDLOverlay = this.showLayoutDLOverlay.bind(this);\n }\n\n _handleValidSubmit(e) {\n e.preventDefault();\n e.stopPropagation();\n let formData = formDataToJSON(new FormData(e.target));\n const datalevels = this.state.datalevels;\n let endpoint = ENDPOINTS[\"layout_datalevels\"][\"create\"];\n let url = endpoint.uri;\n let method = endpoint.method;\n let data = {};\n let product = this.state.product;\n let layout = this.state.layout;\n for (let i = 0; i < datalevels.length; i++) {\n let datalevel = datalevels[i];\n data[\"dlname\"] = formData[\"dl[\" + i + \"][dlname]\"];\n data[\"product_id\"] = product.id;\n data[\"layout_id\"] = layout.id;\n if (formData[\"dl[\" + i + \"][selected]\"] == null && datalevel.saved) {\n let endpoint = ENDPOINTS[\"layout_datalevels\"][\"delete\"];\n let url = endpoint.uri;\n let method = endpoint.method;\n this.props.deleteLyDL(url, method, data);\n }\n if (formData[\"dl[\" + i + \"][selected]\"] != null && !datalevel.saved) {\n let endpoint = ENDPOINTS[\"layout_datalevels\"][\"create\"];\n let url = endpoint.uri;\n let method = endpoint.method;\n this.props.createLyDL(url, method, data);\n }\n }\n this.hideLayoutDLOverlay(e);\n }\n\n toggleExpand(e) {\n e.stopPropagation();\n this.setState(Object.assign({}, this.state, { expand: !this.state.expand }));\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (this.state !== nextProps) {\n this.setState(nextProps);\n }\n }\n\n hideLayoutDLOverlay(e) {\n e.stopPropagation();\n this.setState(Object.assign({}, this.state, { visible: false }));\n }\n\n showLayoutDLOverlay(e) {\n e.stopPropagation();\n this.setState(Object.assign({}, this.state, { visible: true }));\n }\n\n render() {\n const layout = this.state.layout;\n const isVisible = this.state.visible;\n const datalevels = this.state.datalevels;\n let tbodyDOM = [];\n for (let i = 0; i < datalevels.length; i++) {\n let datalevel = datalevels[i];\n tbodyDOM.push(\n \n \n {datalevel.dlname}\n \n \n \n \n );\n }\n return (\n
  • \n {this.props.labelText}\n \n
    \n \n Manage Layout Data Levels\n \n \n \n \n \n \n \n \n \n {tbodyDOM}\n
    Product Data LevelsAdd
    \n
    \n \n \n {/* */}\n \n
    \n
    \n
  • \n );\n }\n}\n","import React from \"react\";\nimport {\n Row,\n Col,\n Form,\n FormGroup,\n ControlLabel,\n FormControl,\n Modal,\n Fade,\n utils,\n Button,\n Table,\n} from \"react-bootstrap\";\nimport serialize from \"form-serialize\";\nimport { ENDPOINTS } from \"../../../constants/endpoints\";\n\nexport default class AddLyDlRel extends React.Component {\n constructor(props) {\n super(props);\n this.state = { ...props, isAddKeyOpen: false };\n this._handleValidSubmit = this._handleValidSubmit.bind(this);\n this.hideOverlay = this.hideOverlay.bind(this);\n }\n\n _handleValidSubmit(e) {\n e.preventDefault();\n e.stopPropagation();\n let formData = serialize(e.target, { hash: true, empty: true });\n const layout = this.state.layout;\n const product = this.state.product;\n formData.cdlcount = 0;\n let endpoint = Object.assign({}, ENDPOINTS.layout_datalevels_rel.create, {});\n let url = endpoint.uri.replace(\":layout_id\", layout.id);\n formData.product_id = product.id;\n formData.layout_id = layout.id;\n formData.pdlname = this.props.type == \"product_key\" ? formData.cdlname : formData.pdlname;\n this.props.createLyDLRel(url, endpoint.method, formData);\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (this.state !== nextProps) {\n this.setState(nextProps);\n }\n }\n\n hideOverlay(e) {\n this.setState(Object.assign({}, this.state, { isVisible: false }));\n }\n\n render() {\n const dlRel = this.state.dlRel;\n const left_dls = this.state.left_dls;\n const right_dls = this.state.right_dls;\n const isVisible = this.state.isVisible;\n const layout_datalevels = this.state.layout.datalevels;\n let dlRelStyle = dlRel.style;\n let popupTitle =\n this.props.type == \"product_key\"\n ? \"Data Level Relationship via Product Set Keys\"\n : \"Data Level Relationship via non Product Set Keys\";\n if (dlRelStyle == null) {\n if (this.props.type == \"product_key\") dlRelStyle = \"P\";\n else dlRelStyle = \"N\";\n }\n let left_view = [];\n if (this.props.type == \"product_key\") {\n left_view.push(\n \n );\n } else {\n left_view.push(\n \n \n {left_dls.map((datalevel, i) => {\n let ld = layout_datalevels.find((l) => l.dlname === datalevel.dlname);\n if (ld)\n return (\n \n );\n })}\n \n );\n }\n \n const a = (\n \n \n {!this.props.type && (\n \n )}\n {left_view}\n \n \n {!this.props.type && }\n {this.props.type && }\n \n \n {right_dls.map((datalevel, i) => {\n let ld = layout_datalevels.find((l) => l.dlname === datalevel.dlname);\n if (ld)\n return (\n \n );\n })}\n \n \n \n \n \n \n );\n\n return (\n {\n this.props.closeAddRel();\n }}\n >\n
    \n \n {popupTitle}\n \n {a}\n \n \n {/* */}\n \n
    \n \n );\n }\n}\n","import React from \"react\";\nimport EditLyDlRelKeyContainer from \"../../../containers/layouts/lydlrel/EditLyDlRelKeyContainer\";\nimport {\n Row,\n Col,\n Form,\n FormGroup,\n ControlLabel,\n FormControl,\n Modal,\n Fade,\n utils,\n Button,\n Table,\n} from \"react-bootstrap\";\nimport serialize from \"form-serialize\";\nimport { ENDPOINTS } from \"../../../constants/endpoints\";\n\nexport default class AddLyDlRelKey extends React.Component {\n constructor(props) {\n super(props);\n this.state = { ...props };\n this._handleValidSubmit = this._handleValidSubmit.bind(this);\n this.hideOverlay = this.hideOverlay.bind(this);\n this.showOverlay = this.showOverlay.bind(this);\n }\n\n hideOverlay(e) {\n e.stopPropagation();\n this.setState(Object.assign({}, this.state, { visible: false }));\n }\n\n showOverlay(e) {\n e.stopPropagation();\n this.setState(Object.assign({}, this.state, { visible: true }));\n }\n\n _handleValidSubmit(e) {\n e.preventDefault();\n e.stopPropagation();\n let formData = serialize(e.target, { hash: true, empty: true });\n const layout = this.state.layout;\n const product = this.state.product;\n const dlRel = this.state.dlRel;\n let endpoint = Object.assign({}, ENDPOINTS.layout_datalevels_keys.create, {});\n let url = endpoint.uri.replace(\":layout_id\", layout.id);\n url.replace(\":pdlname\", dlRel.pdlname);\n url.replace(\":cdlname\", dlRel.cdlname);\n // url.replace(\":relstyle\", dlRel.style);\n formData.pdlname = dlRel.pdlname;\n formData.cdlname = dlRel.cdlname;\n formData.product_id = product.id;\n formData.layout_id = layout.id;\n formData.relstyle = dlRel.style;\n this.props.createLyDLRelKey(url, endpoint.method, formData);\n this.setState(Object.assign({}, this.state, { visible: false }));\n }\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (this.state !== nextProps) {\n this.setState(nextProps);\n }\n }\n\n componentDidMount() {\n let presetProductId = localStorage.getItem(\"preset_product_id\");\n const isPresetProduct =\n !presetProductId || presetProductId == \"null\" || presetProductId == \"undefined\"\n ? false\n : true;\n this.setState({\n isPresetProduct: isPresetProduct,\n });\n }\n\n render() {\n const layout = this.state.layout;\n const product = this.state.product;\n const relation_keys = this.state.dlRel.datalevel_relation_keys || [];\n const attributes = this.state.attributes;\n const isVisible = this.state.visible;\n const dlRelKey = this.state.dlRelKey;\n let children = [];\n const isPresetProduct = this.state.isPresetProduct;\n children.push(\n
    \n \n {/*\n \n */}\n \n \n {attributes.map((attribute, i) => {\n return (\n \n );\n })}\n \n \n \n
    \n );\n return (\n
  • \n {!isPresetProduct && Add key}\n \n
    \n \n Add Layout datalevel relationship key\n \n \n \n {/*Join Key Order*/}\n Join Key\n \n {children}\n \n \n \n {/* */}\n \n
    \n
    \n
  • \n );\n }\n}\n","import React from 'react';\nimport { FormControl, Col, Row } from 'react-bootstrap';\n\nexport default class EditLyDlRel extends React.Component {\n constructor(props) {\n super(props);\n this.state = { ...props };\n this.toggleExpand = this.toggleExpand.bind(this);\n }\n\n toggleExpand(e) {\n e.stopPropagation();\n this.setState(Object.assign({}, this.state, { expand: !this.state.expand }));\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (this.state !== nextProps) {\n this.setState(nextProps);\n }\n }\n\n render() {\n const dlRel = this.state.dlRel;\n const isExpand = this.state.expand;\n const datalevels = this.state.product_datalevels;\n return
    \n \n \n \n {datalevels.map((datalevel, i) => {\n return ;\n }\n )}\n \n \n \n \n {datalevels.map((datalevel, i) => {\n return ;\n }\n )}\n \n \n \n \n {[[\"S\", \"SINGLE\"], [\"R\", \"REPEAT\"], [\"M\", \"MAIN\"]].map((style, i) => {\n return ;\n }\n )}\n \n \n \n \n \n \n
    ;\n }\n};","import React from 'react';\nimport { Col, Row } from 'react-bootstrap';\n\nexport default class EditLyDlRel extends React.Component {\n constructor(props) {\n super(props);\n this.state = { ...props };\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (this.state !== nextProps) {\n this.setState(nextProps);\n }\n }\n\n render() {\n const attribute = this.state.attribute;\n const dlRelKey = this.state.dlRelKey;\n return
    \n \n {dlRelKey.key || attribute.name}\n \n \n \n \n \n \n \n \n
    ;\n }\n};","import React from \"react\";\nimport { Row, Col, Form, FormControl, Modal, Button } from \"react-bootstrap\";\nimport serialize from \"form-serialize\";\n\nimport EditLyDlRelKeyContainer from \"../../../containers/layouts/lydlrel/EditLyDlRelKeyContainer\";\n\nexport default class EditLyDlRelKeyList extends React.Component {\n constructor(props) {\n super(props);\n this.state = { ...props };\n this._handleValidSubmit = this._handleValidSubmit.bind(this);\n this.hideOverlay = this.hideOverlay.bind(this);\n this.showOverlay = this.showOverlay.bind(this);\n }\n\n hideOverlay(e) {\n e.stopPropagation();\n this.setState(Object.assign({}, this.state, { visible: false }));\n }\n\n showOverlay(e) {\n e.stopPropagation();\n this.setState(Object.assign({}, this.state, { visible: true }));\n }\n\n _handleValidSubmit(e) {\n e.preventDefault();\n e.stopPropagation();\n let formData = serialize(e.target, { hash: true, empty: true });\n console.debug(formData);\n }\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (this.state !== nextProps) {\n this.setState(nextProps);\n }\n }\n\n render() {\n const layout = this.state.layout;\n const product = this.state.product;\n const relation_keys = this.state.dlRel.datalevel_relation_keys || [];\n const attributes = this.state.attributes;\n const isVisible = this.state.visible;\n if (attributes == null) {\n return null;\n }\n let children = [];\n if (isVisible) {\n for (let i = 0; i < attributes.length; i++) {\n let attribute = attributes[i];\n let dlRelKey = relation_keys.filter((rel_key) => rel_key.key == attribute)[0] || {};\n children.push(\n \n {dlRelKey.key || attribute}\n \n \n \n \n \n \n \n \n );\n }\n }\n return (\n
  • \n Manage Join keys\n \n
    \n \n Manage Layout datalevel relationship keys\n \n \n
    \n \n Join Key\n Join Key Order\n Action\n \n {children}\n
    \n
    \n \n \n \n \n
    \n
    \n
  • \n );\n }\n}\n","import React from \"react\";\nimport { Row, Col, Form, Modal, Button } from \"react-bootstrap\";\nimport serialize from \"form-serialize\";\n\nimport EditLyDlRelContainer from \"../../../containers/layouts/lydlrel/EditLyDlRelContainer\";\nimport AddLyDlRelContainer from \"../../../containers/layouts/lydlrel/AddLyDlRelContainer\";\nimport { ENDPOINTS } from \"../../../constants/endpoints\";\n\nexport default class EditLyDlRelList extends React.Component {\n constructor(props) {\n super(props);\n this.state = { ...props };\n this._handleValidSubmit = this._handleValidSubmit.bind(this);\n this.hideOverlay = this.hideOverlay.bind(this);\n this.showOverlay = this.showOverlay.bind(this);\n this.addRelKey = this.addRelKey.bind(this);\n }\n\n addRelKey(e) {\n e.preventDefault();\n this.setState(Object.assign({}, this.state, { isAddVisible: true }));\n }\n\n hideOverlay(e) {\n e.stopPropagation();\n this.setState(Object.assign({}, this.state, { visible: false }));\n }\n\n showOverlay(e) {\n e.stopPropagation();\n this.setState(Object.assign({}, this.state, { visible: true }));\n }\n\n _handleValidSubmit(e) {\n e.preventDefault();\n e.stopPropagation();\n let formData = serialize(e.target, { hash: true, empty: true });\n const layout = this.state.layout;\n const product = this.state.product;\n formData.lydlrel.map((data) => {\n if (data.selected.length == 0) {\n let endpoint = Object.assign({}, ENDPOINTS.layout_datalevels_rel.delete, {});\n let url = endpoint.uri.replace(\":layout_id\", layout.id).replace(\":pdlname\", data.pdlname);\n url = url.replace(\":cdlname\", data.cdlname);\n data.product_id = product.id;\n this.props.deleteLyDLRel(url, endpoint.method, data);\n // delete\n } else {\n // create\n let endpoint = Object.assign({}, ENDPOINTS.layout_datalevels_rel.create, {});\n let url = endpoint.uri.replace(\":layout_id\", layout.id);\n data.product_id = product.id;\n this.props.createLyDLRel(url, endpoint.method, data);\n }\n });\n }\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (this.state !== nextProps) {\n this.setState(nextProps);\n }\n }\n\n render() {\n const layout = this.state.layout;\n const product = this.state.product;\n const isVisible = this.state.visible;\n const isAddVisible = this.state.isAddVisible;\n const product_datalevels = this.state.product_datalevels;\n const datalevel_relations = layout.datalevel_relations;\n if (product_datalevels == null) {\n return null;\n }\n let children = [];\n if (isVisible) {\n for (let i = 0; i < product_datalevels.length; i++) {\n let lyDlRel = datalevel_relations[i] || {};\n children.push(\n \n );\n }\n }\n return (\n
  • \n Manage Layout relationships\n \n
    \n \n Manage Layout datalevel relationships\n \n \n
    \n \n Parent Data Level\n Child Data Level\n Datalevel style\n Action\n \n {children}\n
    \n
    \n
  • \n Add new\n
  • \n \n \n \n \n \n \n
    \n
  • \n );\n }\n}\n","import React from \"react\";\nimport { Col, Row } from \"react-bootstrap\";\nimport LyDlRelKeyListContainer from \"../../../containers/layouts/lydlrel/LyDlRelKeyListContainer\";\nimport { ENDPOINTS } from \"../../../constants/endpoints\";\n\nimport { authorized, Authorized } from \"../../../adukku_utils/authorizeUser\";\n\nexport default class LyDlRel extends React.Component {\n constructor(props) {\n super(props);\n this.state = { ...props };\n this.toggleExpand = this.toggleExpand.bind(this);\n this.onDelete = this.onDelete.bind(this);\n }\n\n toggleExpand(e) {\n e.stopPropagation();\n this.setState(Object.assign({}, this.state, { expand: !this.state.expand }));\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (this.state !== nextProps) {\n this.setState(nextProps);\n }\n }\n\n onDelete(e) {\n e.stopPropagation();\n const data = this.state.dlRel;\n const layout = this.state.layout;\n const product = this.state.product;\n let endpoint = Object.assign({}, ENDPOINTS.layout_datalevels_rel.delete, {});\n let url = endpoint.uri.replace(\":layout_id\", layout.id).replace(\":pdlname\", data.pdlname);\n url = url.replace(\":cdlname\", data.cdlname);\n data.product_id = product.id;\n data.layout_id = layout.id;\n this.props.deleteLyDLRel(url, endpoint.method, data);\n }\n\n getExpandJSX = (expandFlag) => {\n return (\n \n {expandFlag && }\n {!expandFlag && }\n \n );\n };\n\n render() {\n const dlRel = this.state.dlRel;\n const isExpand = this.state.expand;\n const role = this.state.role;\n const product = this.state.product;\n return (\n
    \n \n \n {this.getExpandJSX(isExpand)} {dlRel.pdlname}\n \n {this.props.type == \"non_product_key\" && {dlRel.cdlname}}\n {/* {dlRel.cdlcount}\n {dlRel.style} */}\n \n {product.product_state == \"edit\" && (\n \n \n \n \n \n )}\n \n \n {isExpand && (\n \n )}\n
    \n );\n }\n}\n","import React from \"react\";\nimport { Col, Row } from \"react-bootstrap\";\nimport { ENDPOINTS } from \"../../../constants/endpoints\";\n\nexport default class LyDlRel extends React.Component {\n constructor(props) {\n super(props);\n this.state = { ...props };\n this.onDelete = this.onDelete.bind(this);\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (this.state !== nextProps) {\n this.setState(nextProps);\n }\n }\n\n componentDidMount() {\n let presetProductId = localStorage.getItem(\"preset_product_id\");\n const isPresetProduct =\n !presetProductId || presetProductId == \"null\" || presetProductId == \"undefined\"\n ? false\n : true;\n this.setState({\n isPresetProduct: isPresetProduct,\n });\n }\n\n onDelete(e) {\n const layout = this.state.layout;\n const product = this.state.product;\n const dlRel = this.state.dlRel;\n const dlRelKey = this.state.dlRelKey;\n let formData = Object.assign({}, dlRelKey, {});\n let endpoint = Object.assign({}, ENDPOINTS.layout_datalevels_keys.delete, {});\n let url = endpoint.uri.replace(\":layout_id\", layout.id);\n url = url.replace(\":pdlname\", dlRel.pdlname);\n url = url.replace(\":cdlname\", dlRel.cdlname);\n url = url.replace(\":key\", formData.key);\n formData.pdlname = dlRel.pdlname;\n formData.cdlname = dlRel.cdlname;\n formData.product_id = product.id;\n formData.layout_id = layout.id;\n this.props.deleteLyDLRelKey(url, endpoint.method, formData);\n }\n render() {\n const dlRelKey = this.state.dlRelKey;\n const isPresetProduct = this.state.isPresetProduct;\n const product = this.state.product;\n return (\n
    \n \n {dlRelKey.key}\n {dlRelKey.order}\n \n {!isPresetProduct && product.product_state == \"edit\" && (\n \n \"deleteIcon\"\n \n )}\n \n \n
    \n );\n }\n}\n","import React from \"react\";\nimport LyDlRelKeyContainer from \"../../../containers/layouts/lydlrel/LyDlRelKeyContainer\";\nimport { Col, Row } from \"react-bootstrap\";\nimport AddLyDlRelKeyContainer from \"../../../containers/layouts/lydlrel/AddLyDlRelKeyContainer\";\n\nexport default class LyDlRelKeyList extends React.Component {\n constructor(props) {\n super(props);\n this.state = { ...props };\n this.toggleExpand = this.toggleExpand.bind(this);\n }\n\n toggleExpand(e) {\n e.stopPropagation();\n this.setState(Object.assign({}, this.state, { expand: !this.state.expand }));\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (this.state !== nextProps) {\n this.setState(nextProps);\n }\n }\n\n getExpandJSX = (expandFlag) => {\n return (\n \n {expandFlag && }\n {!expandFlag && }\n \n );\n };\n\n render() {\n const layout = this.state.layout;\n const product = this.state.product;\n const dlRel = this.state.dlRel;\n const relation_keys = this.state.dlRel.datalevel_relation_keys;\n\n if (relation_keys == null) {\n return null;\n }\n const isExpand = this.state.expand;\n let children = [];\n if (isExpand) {\n for (let i = 0; i < relation_keys.length; i++) {\n children.push(\n \n );\n }\n }\n return (\n \n );\n }\n}\n","import React from \"react\";\nimport LyDlRelContainer from \"../../../containers/layouts/lydlrel/LyDlRelContainer\";\nimport EditLyDlRelListContainer from \"../../../containers/layouts/lydlrel/EditLyDlRelListContainer\";\nimport AddLyDlRelContainer from \"../../../containers/layouts/lydlrel/AddLyDlRelContainer\";\nimport { Col, Row } from \"react-bootstrap\";\nimport { authorized, Authorized } from \"../../../adukku_utils/authorizeUser\";\n\nexport default class LyDlRelList extends React.Component {\n constructor(props) {\n super(props);\n this.state = { ...props };\n this.toggleExpand = this.toggleExpand.bind(this);\n this.addRelKey = this.addRelKey.bind(this);\n this.getDlRelsByType = this.getDlRelsByType.bind(this);\n }\n\n toggleExpand(e) {\n e.stopPropagation();\n this.setState(Object.assign({}, this.state, { expand: !this.state.expand }));\n }\n componentDidMount() {\n if (this.state.product && this.state.product.id) this.props.getKeys(this.state.product.id);\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (this.state !== nextProps) {\n this.setState(nextProps);\n }\n }\n\n addRelKey(e) {\n e.preventDefault();\n this.setState(Object.assign({}, this.state, { isAddVisible: true }));\n }\n\n getDlRelsByType(type, isExpand) {\n let children = [];\n const layout = this.state.layout;\n const product = this.state.product;\n const isAddVisible = this.state.isAddVisible;\n const datalevel_relations = layout.datalevel_relations;\n const role = this.state.role;\n\n if (isExpand) {\n if (type == \"product_key\")\n for (let i = 0; i < datalevel_relations.length; i++) {\n let dlRel = datalevel_relations[i];\n if (dlRel.style.toUpperCase() == \"P\")\n children.push(\n \n );\n }\n else\n for (let i = 0; i < datalevel_relations.length; i++) {\n let dlRel = datalevel_relations[i];\n if (dlRel.style.toUpperCase() != \"P\")\n children.push(\n \n );\n }\n }\n return children;\n }\n\n getExpandJSX = (expandFlag) => {\n return (\n \n {expandFlag && }\n {!expandFlag && }\n \n );\n };\n\n render() {\n const layout = this.state.layout;\n const product = this.state.product;\n const isAddVisible = this.state.isAddVisible;\n const datalevel_relations = layout.datalevel_relations;\n const role = this.state.role;\n\n if (datalevel_relations == null) {\n return null;\n }\n const isExpand = this.state.expand;\n let children = this.getDlRelsByType(this.props.type, isExpand);\n let label = \"Layout Data Level Relationships & Keys\";\n if (this.props.type == \"product_key\")\n label = \"Layout Data Level Relationships & Keys via Product Set keys\";\n else label = \"Layout Data Level Relationships & Keys via non-Product Set keys\";\n return (\n \n );\n }\n}\n","import React from \"react\";\nimport { Form, FormGroup, ControlLabel, FormControl, Modal, Button } from \"react-bootstrap\";\nimport serialize from \"form-serialize\";\n\nimport Select from \"../../react-select-override/FixRequiredSelect\";\nimport { ENDPOINTS } from \"../../../constants/endpoints\";\nimport { authorized, Authorized } from \"../../../adukku_utils/authorizeUser\";\n\nexport default class AddLySlotFor extends React.Component {\n constructor(props) {\n super(props);\n this.state = { ...props };\n // this.state = {\n // layout: props.layout,\n // layout_datalevels: props.layout_datalevels,\n // product: props.product,\n // };\n this.hideOverlay = this.hideOverlay.bind(this);\n this.showOverlay = this.showOverlay.bind(this);\n this.handleLayoutDLChange = this.handleLayoutDLChange.bind(this);\n this.handleDLAttrChange = this.handleDLAttrChange.bind(this);\n this.handleSubmit = this.handleSubmit.bind(this);\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (this.state !== nextProps) {\n this.setState(nextProps);\n }\n }\n\n componentDidMount() {\n let presetProductId = localStorage.getItem(\"preset_product_id\");\n const isPresetProduct =\n !presetProductId || presetProductId == \"null\" || presetProductId == \"undefined\"\n ? false\n : true;\n this.setState({ isPresetProduct: isPresetProduct });\n }\n\n hideOverlay(e) {\n this.setState(Object.assign({}, this.state, { visible: false }));\n }\n\n showOverlay(e) {\n e.stopPropagation();\n this.setState(Object.assign({}, this.state, { visible: true }));\n }\n\n handleLayoutDLChange(e) {\n e.preventDefault();\n const selected_layout_datalevel = this.state.layout_datalevels.filter((lyDl) => {\n return lyDl.dlname == e.target.value;\n })[0];\n this.setState({ selected_layout_datalevel: selected_layout_datalevel });\n }\n\n handleDLAttrChange(attr_names) {\n // e.preventDefault();\n const selected_layout_datalevel = this.state.selected_layout_datalevel;\n let selected_attrs = selected_layout_datalevel.attributes.filter((attr) => {\n return (\n attr_names.filter((attr_name) => {\n return attr_name.value == attr.name;\n }).length > 0\n );\n });\n this.setState({ selected_attrs: selected_attrs });\n }\n\n handleSubmit(e) {\n e.preventDefault();\n const selected_attrs = this.state.selected_attrs;\n const layout = this.state.layout;\n const product = this.state.product;\n const role = this.state.role;\n\n let formData = serialize(e.target, { hash: true, empty: true });\n let dlname = formData.lyslotfor[\"dlname\"];\n let dl = this.state.layout_datalevels.filter((dl) => dl.dlname == dlname)[0];\n let maxOrder = Math.max.apply(\n Math,\n this.props.slotFors.map(function (o) {\n return o.attributeorder;\n })\n );\n maxOrder = parseInt(maxOrder) || 0;\n let newFormData = [];\n let temp = null;\n for (let i = 0; i < selected_attrs.length; i++) {\n temp = serialize(e.target, { hash: true, empty: true });\n temp.lyslotfor[\"slotforcode\"] = dl.dltype == \"main\" ? \"MA\" : \"OT\";\n temp.lyslotfor[\"attributename\"] = selected_attrs[i].name;\n temp.lyslotfor[\"attributetype\"] = selected_attrs[i].type.toLowerCase();\n temp.lyslotfor[\"layout_id\"] = layout.id;\n temp.lyslotfor[\"layout_id\"] = layout.id;\n temp.lyslotfor[\"product_id\"] = product.id;\n newFormData.push(temp);\n // if (temp.lyslotfor[\"slotforcode\"] == \"MA\") {\n // newFormData.push({\n // ...temp,\n // lyslotfor: {\n // ...temp.lyslotfor,\n // slotforcode: \"MM\"\n // }\n // });\n // }\n temp = null;\n }\n const that = this;\n let endpoint = null;\n newFormData.map((data, i) => {\n console.debug(data);\n endpoint = Object.assign({}, ENDPOINTS.layout_slotfors.create, {});\n endpoint.uri = endpoint.uri.replace(\":slotforcode\", data.lyslotfor.slotforcode);\n endpoint.uri = endpoint.uri.replace(\":layout_id\", layout.id);\n that.props.createLyDLSlotFor(\n endpoint.uri,\n endpoint.method,\n Object.assign({}, data.lyslotfor, { attributeorder: maxOrder + i + 1 })\n );\n endpoint = null;\n });\n this.hideOverlay(e);\n }\n\n render() {\n const slotFors = this.state.slotFors;\n const isVisible = this.state.visible;\n const layout_datalevels = this.state.layout_datalevels;\n const selected_layout_datalevel = this.state.selected_layout_datalevel;\n const selected_attrs = this.state.selected_attrs;\n const datalevel_relations = this.state.layout.datalevel_relations;\n const product = this.state.product;\n const role = this.state.role; \n const { isPresetProduct } = this.state;\n \n if (authorized([\"admin\", \"owner\"], [role, product.product_role], \"ANY\")) {\n return (\n \n \n \n
  • \n {!isPresetProduct && Add Slot For's}\n \n \n
    \n \n Add Slot For's\n \n \n \n Select Data Level:\n \n \n {layout_datalevels.map((layout_datalevel) => {\n let dl = datalevel_relations.find(\n (dl) => dl.cdlname == layout_datalevel.dlname\n );\n if (dl)\n return (\n \n );\n })}\n \n \n \n Select Data Level Attribute:\n \n \n \n \n \n \n \n \n );\n }\n}\n\nexport default CCavenuePayment;","import React, { Component } from \"react\";\nimport { Row, Col, Form, Modal, Button } from \"react-bootstrap\";\nimport jsPDF from \"jspdf\";\nimport html2canvas from \"html2canvas\";\nimport { formatCurrency } from \"../../adukku_utils/formatCurrency\";\n\nclass DownloadFiles extends Component {\n constructor(props) {\n super(props);\n this.state = { ...props, expand: false, isEditProductClicked: false };\n }\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (nextProps !== this.state) {\n this.setState({ ...nextProps });\n }\n }\n\n UNSAFE_componentWillMount() {\n this.props.getSets(this.props.product.id);\n }\n\n onExpandToggle = (e) => {\n e.stopPropagation();\n e.preventDefault();\n this.setState({ expand: !this.state.expand });\n };\n\n getExpandJSX = (expandFlag) => {\n return (\n \n {expandFlag && }\n {!expandFlag && }\n \n );\n };\n\n getOrderedProductSets = (order) => {\n if (order && order.status == \"paid\") {\n let t = [];\n let sets = order && order.order_details && order.order_details.sets;\n let product_sets = this.state.product_sets;\n if (sets && Object.keys(sets).includes(\"all\")) {\n return product_sets.map((product_set, i) => {\n let counts =\n (product_set && product_set.counts && product_set.counts[this.state.main_dlname]) || [];\n const count = (counts || []).find((f) => f.setno == product_set.setno) || {\n main_occurence_count: 0,\n };\n let productSetRecords = [];\n for (let index = 1; index < count.main_occurence_count; index++) {\n productSetRecords.push(
  • {\"Record No \" + index}
  • );\n }\n return (\n {\n this.setState({\n [`p_set_${product_set.setno}`]: !(\n this.state[`p_set_${product_set.setno}`] || false\n ),\n });\n }}\n >\n {this.getExpandJSX(this.state[`p_set_${product_set.setno}`] || false)}\n {product_set && \" \" + product_set.desc}\n {this.state[`p_set_${product_set.setno}`] &&
      {productSetRecords}
    }\n \n );\n });\n } else if (sets && Object.keys(sets).length > 0) {\n return Object.keys(sets).map((setno) => {\n let product_set = (product_sets || []).find((set) => set.setno == setno);\n let counts =\n (product_set && product_set.counts && product_set.counts[this.state.main_dlname]) || [];\n const count = (counts || []).find((f) => f.setno == setno) || {\n main_occurence_count: 0,\n };\n let productSetRecords = [];\n let seq_nos = Object.keys(sets[setno] || {});\n // Object.keys(sets[setno]).map((seq_no) => {});\n for (let index = 0; index < seq_nos.length; index++) {\n productSetRecords.push(
  • {\"Record No \" + (parseInt(seq_nos[index]) + 1)}
  • );\n }\n // if (sets[setno] && Object.keys(sets[setno]).includes(\"all\")) {\n // for (let index = 1; index < count.main_occurence_count; index++) {\n // productSetRecords.push(
  • {\"Record No \" + index}
  • );\n // }\n // } else if (Object.keys(sets[setno]).length > 0) {\n // let seq_nos = Object.keys(sets[setno] || {});\n // // Object.keys(sets[setno]).map((seq_no) => {});\n // for (let index = 1; index < seq_nos.length; index++) {\n // productSetRecords.push(
  • {\"Record No \" + seq_nos[index]}
  • );\n // }\n // }\n return (\n {\n this.setState({\n [`p_set_${product_set.setno}`]: !(\n this.state[`p_set_${product_set.setno}`] || false\n ),\n });\n }}\n >\n {this.getExpandJSX(this.state[`p_set_${product_set.setno}`] || false)}\n {product_set && \" \" + product_set.desc}\n {this.state[`p_set_${product_set.setno}`] &&
      {productSetRecords}
    }\n \n );\n });\n }\n }\n };\n\n printDocument = (orderId) => {\n const input = document.getElementById(\"divToPrint2\");\n html2canvas(input).then((canvas) => {\n const imgData = canvas.toDataURL(\"image/jpeg\");\n const pdf = new jsPDF();\n var width = pdf.internal.pageSize.getWidth();\n var height = pdf.internal.pageSize.getHeight();\n pdf.addImage(imgData, \"JPEG\", 0, 0, width, height);\n // pdf.output('dataurlnewwindow');\n pdf.save(`${orderId}.pdf`);\n });\n };\n\n getOrderInvoice = (order) => {\n let user = {};\n let amount = order.paypal_capture.purchase_units[0].table.payments.table.captures[0].table.amount.table.value;\n console.log(\"paypal_capture.amount=> \", amount)\n // const convenienceCharges = formatCurrency(\n // order.total_amount - order.total_files_amount,\n // 100,\n // \"USD\"\n // );\n return (\n {\n this.setState({\n currentOrder: null,\n isEditProductClicked: false,\n });\n }}\n >\n
    \n \n Invoice\n \n \n
    \n \n \n \n \n \n \n \n {\" \"}\n \n \n \n {\" \"}\n {// \n // Bala Edit - Commented above and added below line with Date Function\n }\n \n \n \n {\" \"}\n \n \n \n {\" \"}\n \n \n
    \n \n \n \n INVOICE\n \n
    COMPOSZ LLC,Invoice #: INVFIL00000{order.id}
    #121 HAUT BRION AVENUEInvoice Date: {order.created_at}Invoice Date: {new Date(order.created_at).toLocaleString().split(',')[0]}
    NEWARK, DE-19702.\n Invoice Amount: {formatCurrency(amount, 1, \"USD\")}\n {/* {(order.total_amount / 100).toFixed(2)} */}\n
    \n Status: PAID\n
    \n \n BILLED TO\n \n

    \n {order.full_name || \"Not Provided\"}\n
    \n {order.email}\n
    \n {order.address || \"Not Provided\"}\n

    \n
    \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n {order.prtype!=='NORMAL'?\n \n \n \n \n \n \n : null\n }\n

    \n \n \n \n
    DescriptionPriceQuantityAmount
     Digital Files - (.jpeg)\n {formatCurrency(order.price_first_page, 100, \"USD\")}\n {/* ${(order.price_first_page / 100).toFixed(2)} */}\n       {order.num_files}\n {formatCurrency(order.total_files_amount, 100, \"USD\")}\n {/* ${(order.total_files_amount / 100).toFixed(2)} */}\n
     Audio Files - {order.prtype} - (.html)\n {formatCurrency(4,1, \"USD\")}/record\n {/* ${(order.price_first_page / 100).toFixed(2)} */}\n Upto {order.num_files}  files\n {formatCurrency(4*(order.num_files/this.state.product.numpages), 1, \"INR\")}\n {/* ${(order.total_files_amount / 100).toFixed(2)} */}\n
    \n \n \n \n \n \n \n \n \n \n \n {order.prtype!=='NORMAL'?\n \n :\n \n }\n \n \n \n \n \n \n \n \n \n \n \n {order.prtype!=='NORMAL'? \n \n :\n \n }\n \n \n \n \n
    PAYMENT DETAILS
    Paypal Transaction ID | {order.paypal_capture_id}\n Item (s) Subtotal:{\" \"}\n {formatCurrency((order.total_files_amount/100) + (4*(order.num_files/this.state.product.numpages)), 1, \"USD\")}\n {/* ${(order.total_files_amount / 100).toFixed(2)} */}\n \n Item (s) Subtotal:{\" \"}\n {formatCurrency(order.total_files_amount, 100, \"USD\")}\n {/* ${(order.total_files_amount / 100).toFixed(2)} */}\n
    \n Convenience charges:{\" \"}\n {formatCurrency(order.total_amount - order.total_files_amount, 100, \"USD\")}\n
    \n Tax to be collected:{\" \"} {formatCurrency(order.pg_fixed_fee, 100, \"USD\")}\n {/* {(order.pg_fixed_fee / 100).toFixed(2)} */}\n
    \n \n GRAND TOTAL :{\" \"}\n {formatCurrency(((order.total_files_amount/100) + (4*(order.num_files/this.state.product.numpages)) + ((order.total_amount - order.total_files_amount)/100)), 1, \"USD\")}\n {/* ${(order.total_amount / 100).toFixed(2)} */}\n \n \n \n GRAND TOTAL :{\" \"}\n {formatCurrency(order.total_amount, 100, \"USD\")}\n {/* ${(order.total_amount / 100).toFixed(2)} */}\n \n
    \n\n

    To download the digital files, login to https://composz.com

    \n

    Thanks for your purchase

    \n

    -- team Composz

    \n

    \n

    \n

    \n {order.prtype!=='NORMAL'?\n \n Note: If no Audio is recorded, no Audio files (.html) will be generated; \n User will still be charged due to user's Product choice of Voice Options\n & provision of Voice recording infrastructure made available to the user.\n It is user's responsibility to record Audio or choose NO-VOICE for Product.\n \n

    \n : null\n }\n \n
    \n \n
    \n \n {\n this.printDocument(`INVFIL00000${order.id}`);\n }}\n >\n Download\n \n {\n this.setState({\n isEditProductClicked: false,\n });\n }}\n >\n Cancel\n \n \n
    \n \n );\n };\n\n getccavenueOrderInvoice = (order) => {\n let user = {};\n console.log(order);\n\n // const convenienceCharges = formatCurrency(\n // order.total_amount - order.total_files_amount,\n // 100,\n // \"USD\"\n // );\n return (\n {\n this.setState({\n currentOrder: null,\n isEditProductClicked: false,\n });\n }}\n >\n
    \n \n Invoice\n \n \n
    \n \n \n \n \n \n \n \n {\" \"}\n \n \n \n {\" \"}\n {// \n // Bala Edit - Commented above and added below line with Date Function\n }\n \n \n \n {\" \"}\n \n \n \n {\" \"}\n \n \n
    \n \n \n \n INVOICE\n \n
    LIFE COLORS,Invoice #: INVFIL00000{order.id}
    #9, 4th Cross, Kothanur Main Road,Invoice Date: {order.created_at}Invoice Date: {new Date(order.created_at).toLocaleString().split(',')[0]}
    Bangalore 560 062.\n Invoice Amount: {formatCurrency(order.ccavenue_capture.amount, 1, \"INR\")}\n {/* {(order.total_amount / 100).toFixed(2)} */}\n
    GSTIN: 29AUTPB5544P1ZS; GST SAC Code: 998434\n Status: PAID\n
    \n \n BILLED TO\n \n

    \n {order.ccavenue_capture.billing_name}\n
    \n {order.ccavenue_capture.billing_address}\n
    \n {order.ccavenue_capture.billing_city}, {order.ccavenue_capture.billing_state} - {order.ccavenue_capture.billing_zip}\n
    \n {order.email}, {order.ccavenue_capture.billing_tel}\n
    \n

    \n
    \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n {order.prtype!=='NORMAL'?\n \n \n \n \n \n \n : null\n }\n

    \n \n \n \n
    DescriptionPriceQuantityAmount
    Digital Files - (.jpeg)\n {formatCurrency(order.price_first_page, 1, \"INR\")}\n {/* ${(order.price_first_page / 100).toFixed(2)} */}\n       {order.num_files}\n {formatCurrency(order.total_files_amount, 1, \"INR\")}\n {/* ${(order.total_files_amount / 100).toFixed(2)} */}\n
    Audio Files - {order.prtype} - (.html)\n {formatCurrency(parseInt(order.prtype.split('-')[1].split('SEC')[0])==15?127:200,1, \"INR\")}/record\n {/* ${(order.price_first_page / 100).toFixed(2)} */}\n Upto {order.num_files} files\n {formatCurrency((parseInt(order.prtype.split('-')[1].split('SEC')[0])==15?127:200)*(order.num_files/this.state.product.numpages), 1, \"INR\")}\n {/* ${(order.total_files_amount / 100).toFixed(2)} */}\n
    \n \n \n \n \n \n \n \n \n \n \n {order.prtype!=='NORMAL'?\n \n :\n \n }\n \n \n \n \n \n \n \n {order.prtype!=='NORMAL'? \n \n :\n \n } \n \n \n \n {order.prtype!=='NORMAL'? \n \n :\n \n }\n \n \n
    PAYMENT DETAILS
    CCAvenue Tracking ID: {order.ccavenue_capture.tracking_id}\n Item (s) Subtotal:{\" \"}\n {formatCurrency(order.total_files_amount + (parseInt(order.prtype.split('-')[1].split('SEC')[0])==15?127:200)*(order.num_files/this.state.product.numpages), 1, \"INR\")}\n {/* ${(order.total_files_amount / 100).toFixed(2)} */}\n \n Item (s) Subtotal:{\" \"}\n {formatCurrency(order.total_files_amount, 1, \"INR\")}\n {/* ${(order.total_files_amount / 100).toFixed(2)} */}\n
    Payment Mode: {order.ccavenue_capture.payment_mode} {\"-\"} {order.ccavenue_capture.card_name}\n Convenience charges:{\" \"}\n {formatCurrency(order.num_files * order.pg_transaction_fee, 1, \"INR\")}\n
    Bank Ref No: {order.ccavenue_capture.bank_ref_no}\n GST 18%: {\" \"} {formatCurrency(((order.num_files * 75.00 + order.num_files * 10.00) + (parseInt(order.prtype.split('-')[1].split('SEC')[0])==15?127:200)*(order.num_files/this.state.product.numpages) )* 0.18, 1, \"INR\")}\n {/* {(order.pg_fixed_fee / 100).toFixed(2)} */}\n \n GST 18%: {\" \"} {formatCurrency((order.num_files * 75.00 + order.num_files * 10.00) * 0.18, 1, \"INR\")}\n {/* {(order.pg_fixed_fee / 100).toFixed(2)} */}\n
    \n \n GRAND TOTAL :{\" \"}\n {formatCurrency(Math.round(((order.num_files * 75.00 + order.num_files * 10.00) + (parseInt(order.prtype.split('-')[1].split('SEC')[0])==15?127:200)*(order.num_files/this.state.product.numpages) + ((order.num_files * 75.00 + order.num_files * 10.00) + (parseInt(order.prtype.split('-')[1].split('SEC')[0])==15?127:200)*(order.num_files/this.state.product.numpages) )* 0.18)) , 1, \"INR\")}\n {/* ${(order.total_amount / 100).toFixed(2)} */}\n \n \n \n GRAND TOTAL:{\" \"}\n {formatCurrency(order.total_amount, 1, \"INR\")}\n {/* ${(order.total_amount / 100).toFixed(2)} */}\n \n
    \n\n

    To download the digital files, login to https://composz.com

    \n

    Thanks for your purchase

    \n

    --team Composz

    \n

    \n

    \n

    \n {order.prtype!=='NORMAL'?\n \n Note: If no Audio is recorded, no Audio files (.html) will be generated; \n User will still be charged due to user's Product choice of Voice Options\n & provision of Voice recording infrastructure made available to the user.\n It is user's responsibility to record Audio or choose NO-VOICE for Product.\n \n

    \n : null\n }\n
    \n \n
    \n \n {\n this.printDocument(`INVFIL00000${order.id}`);\n }}\n >\n Download\n \n {\n this.setState({\n isEditProductClicked: false,\n });\n }}\n >\n Cancel\n \n \n
    \n \n );\n };\n\n\n getCookie(cname) {\n let name = cname + \"=\";\n let decodedCookie = decodeURIComponent(document.cookie);\n let ca = decodedCookie.split(';');\n for(let i = 0; i \n \n {this.getExpandJSX(expand)} {treeName}\n \n {expand && (\n \n
      \n {paidOrders.map((order, i) => {\n return (\n
    • \n {\n this.setState({\n [`order_${order.id}`]: !(this.state[`order_${order.id}`] || false),\n });\n }}\n >\n {this.getExpandJSX(this.state[`order_${order.id}`] || false)}\n {\" Order ID \" +\n order.id +\n \" \" +\n `${new Date(order.created_at).toLocaleString()} `}\n \n \n Download\n {\" \"}\n |{\" \"}\n {\n e.stopPropagation();\n e.preventDefault();\n this.setState({\n currentOrder: order,\n isEditProductClicked: !this.state.isEditProductClicked,\n });\n }}\n >\n Invoice\n \n \n {this.state[`order_${order.id}`] && (\n
        {this.getOrderedProductSets(order)}
      \n )}\n
    • \n );\n })}\n
    \n {this.state.isEditProductClicked && (this.countryCode!==\"IN\"?this.getOrderInvoice(this.state.currentOrder):this.getccavenueOrderInvoice(this.state.currentOrder))}\n
    \n )}\n \n );\n }\n}\n\nexport default DownloadFiles;\n","import React from \"react\";\nimport PaymentContainer from \"../../containers/orders/PaymentContainer\";\n\nexport default class Layout extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n setno: props.setno,\n product: props.product,\n pageno: props.pageno,\n layout: props.layout\n };\n }\n onExpandToggle = e => {\n e.preventDefault();\n e.stopPropagation();\n this.setState({ expand: !this.state.expand });\n };\n\n UNSAFE_componentWillReceiveProps() {}\n\n UNSAFE_componentWillMount() {}\n\n getOrderDetails(pricing, pageno) {\n let charges =\n pricing.pg_charges.transaction_fee + pricing.pg_charges.fixed_fee;\n let first_page_price = pricing.charges.first_page;\n let non_first_page_price = pricing.charges.non_first_page;\n let page_price = pageno === 1 ? first_page_price : non_first_page_price;\n if (pricing && pricing.has_main_page) {\n return (\n \n
  • Price for page: {page_price}
  • \n
  • Total Amount: {page_price} + Additional charges
  • \n
  • {this.getCartDetails(pageno)}
  • \n
    \n );\n }\n }\n\n getCartDetails = pageno => {\n pageno = pageno.toString();\n let product_order = this.state.product.order;\n let product_set = this.props.product_set;\n if (product_order.status === \"paid\") {\n return \"Download\";\n } else if (product_set && product_set.order) {\n let page_order_status = product_set.order.page_no;\n let page_nos =\n product_set.order && product_set.order.page_no\n ? Object.keys(product_set.order.page_no)\n : null;\n\n if (\n (page_nos &&\n (page_nos.includes(pageno) &&\n page_order_status[pageno] === \"paid\")) ||\n (page_nos && page_nos.length === 0)\n ) {\n return \"Download\";\n } else {\n return \"Add to Cart\";\n }\n } else {\n return \"Add to Cart\";\n }\n };\n\n getOrderStatus(pageno) {\n pageno = pageno.toString();\n let product_order = this.state.product.order;\n let product_set = this.props.product_set;\n if (product_order.status === \"paid\") {\n return \"Download\";\n } else if (product_set && product_set.order) {\n let page_order_status = product_set.order.page_no;\n let page_nos =\n product_set.order && product_set.order.page_no\n ? Object.keys(product_set.order.page_no)\n : null;\n\n if (\n (page_nos &&\n (page_nos.includes(pageno) &&\n page_order_status[pageno] === \"paid\")) ||\n (page_nos && page_nos.length === 0)\n ) {\n return \"Download\";\n } else {\n return (\n \n );\n }\n } else {\n return (\n \n );\n }\n }\n\n render() {\n const product = this.state.product;\n const pricing = product.pricing;\n const set_layout = this.state.layout;\n const pageno = this.state.pageno;\n let expandView = [];\n\n if (set_layout.layout_id) {\n let t = (\n
  • \n {\"Page no \" + pageno}\n \n \n \n \n \n \n \n \n \n
    {/* */}
    \n \n Preview final product\n \n
    \n
  • \n );\n expandView.push(t);\n }\n return {expandView};\n }\n}\n","import React, { Component } from \"react\";\nimport CartContext from \"../../context/cart/CartContext\";\nimport { TOGGLE_PRODUCT_EXPAND } from \"../../actions\";\nimport OrderProductSetListContainer from \"../../containers/orders/OrderProductSetListContainer\";\nimport PaymentContainer from \"../../containers/orders/PaymentContainer\";\nimport ShareProductContainer from \"../../containers/orders/ShareProductContainer\";\nimport DownloadFilesContainer from \"../../containers/orders/DownloadFilesContainer\";\n// \"../containers/orders/DownloadFilesContainer\";\n\nexport default class Order extends Component {\n constructor(props) {\n super(props);\n this.state = { ...props, isAllAddedToCart: false };\n }\n onExpandToggle = (e) => {\n e.stopPropagation();\n e.preventDefault();\n this.setState({ expand: !this.state.expand });\n // this.props.toggleView({\n // reducerKey: TOGGLE_PRODUCT_EXPAND,\n // id: this.props.product.id\n // });\n this.props.getSets(this.props.product.id);\n };\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (nextProps.product !== this.state.product) {\n this.setState({ product: nextProps.product });\n }\n }\n\n componentDidMount() {\n this.props.getPrice(this.props.product.id);\n // this.props.getOrders({ status: \"pending\" });\n }\n\n setCartQty(){\n // Timeout is used as state updates are asyn! Important\n setTimeout(() => this.context.setqty(this.props.cart_product.num_files), 1000);\n }\n\n getPaymentDetails = (order, product) => {\n if (\n (order && order.status == \"paid\" && product.freeze_count == order.freeze_count) ||\n (product.pricing && product.pricing.price_for_files === 0)\n ) {\n return (\n
      \n
    • Download
    • \n
    \n );\n } else if (order && order.status == \"pending\") {\n return (\n
      \n \n
    \n );\n } else {\n return (\n
      \n \n
    \n );\n }\n };\n\n getCartDetails = (order, product) => {\n // if (product.product_role == \"viewer\") return null;\n if (\n order &&\n order.status == \"paid\" &&\n product.freeze_count == order.freeze_count &&\n this.isProductAddToCart(product.id, \"order\")\n ) {\n return (\n
      \n
    • Already Ordered
    • \n
    \n );\n } else {\n if (product.product_role == \"viewer\") return null;\n return (\n \n
      \n
    • \n {this.isProductAddToCart(product.id, \"order\") ? (\n {\n this.props.addToCart({ product_id: product.id, setno: \"all\", type: \"remove\", });\n this.setState({\n isAllAddedToCart: !this.state.isAllAddedToCart,\n });\n this.setCartQty();\n }}\n >\n Remove all Product Set Records from cart\n \n ) : (\n {\n this.props.addToCart({ product_id: product.id, });\n this.setState({\n isAllAddedToCart: !this.state.isAllAddedToCart,\n });\n this.setCartQty();\n }}\n >\n Add all Product Set Records to Cart\n \n )}\n
    • \n
    \n \n );\n }\n };\n\n \n isProductAddToCart = (product_id, type) => {\n const { cart_product: product_cart, product_set, product } = this.state;\n let cart_product = {};\n let not_ordered_product = {};\n if (type == \"order\")\n not_ordered_product = product.order.filter(notOrdered=>notOrdered.status != \"paid\")\n //cart_product = type == \"cart\" ? [product_cart] : (product && product.order) || []; Bala introduced this. We may not need this.\n cart_product = type == \"cart\" ? [product_cart] : (product && not_ordered_product) || []; \n let isAddedToCart = this.state.isAllAddedToCart; \n if (cart_product && cart_product[0]) {\n for (let index = 0; index < cart_product.length; index++) {\n const cp = cart_product[index];\n let sets = (cp && cp.order_details && cp.order_details.sets) || {};\n if (Object.keys(sets).includes(\"all\")) {\n isAddedToCart = !this.state.isAllAddedToCart;\n break;\n }\n isAddedToCart = this.state.isAllAddedToCart;\n \n }\n }\n return isAddedToCart;\n \n };\n\n // Add to Cart is not flipping to Remove and vice versa!\n OriginalisProductAddToCart = (product_id, type) => {\n const { cart_product: product_cart, product_set, product } = this.state;\n let cart_product = {};\n cart_product = type == \"cart\" ? [product_cart] : (product && product.order) || [];\n let isAddedToCart = false; \n if (cart_product && cart_product[0]) {\n for (let index = 0; index < cart_product.length; index++) {\n const cp = cart_product[index];\n let sets = (cp && cp.order_details && cp.order_details.sets) || {};\n if (Object.keys(sets).includes(\"all\")) {\n isAddedToCart = true;\n break;\n }\n isAddedToCart = false;\n \n }\n }\n return isAddedToCart;\n \n };\n\n getOrderDetails1 = (product) => {\n const pricing = product.pricing;\n const order = product.order;\n if (order && order.status === \"paid\") {\n return (\n
      \n
    • No. of files: {order.num_files}
    • \n
    • Total Amount: {order.total_amount}
    • \n
    \n );\n } else if (pricing) {\n return (\n
      \n
    • {pricing && pricing.pages_count && pricing.pages_count.total} Files
    • \n
    • Total Amount: {pricing.price_total}
    • \n
    \n );\n }\n };\n\n getOrderDetails(product) {\n const pricing = product.pricing;\n const order = (product.order || []).find((o) => o.status == \"pending\");\n if (order && order.status == \"pending\") {\n return (\n
      \n
    • Total files: {order.num_files}
    • \n
    • Price per File: ${order.price_first_page / 100}
    • \n
    • Total files amount: ${order.total_files_amount / 100}
    • \n
    • Convenience Charges: ${(order.total_amount - order.total_files_amount) / 100}
    • \n
    • Grand Total Amount: ${order.total_amount / 100}
    • \n
    \n );\n }\n // if (order && order.status === \"paid\") {\n // return (\n //
      \n //
    • No. of files: {order.num_files}
    • \n //
    • Total Amount: {order.total_amount}
    • \n //
    \n // );\n // } else if (pricing) {\n // return (\n //
      \n //
    • {pricing && pricing.pages_count && pricing.pages_count.total} Files
    • \n //
    • Total Amount: {pricing.price_total}
    • \n //
    \n // );\n // }\n }\n\n getExpandJSX = (expandFlag) => {\n return (\n \n {expandFlag && }\n {!expandFlag && }\n \n );\n };\n\n render() {\n const product = this.state.product;\n const expand = this.state.expand;\n const order = this.state.product.order;\n const { isShowDownloads } = this.state;\n\n const readOnly = (\n \n {this.getExpandJSX(expand)} {product.name}\n \n );\n\n let productSets = null;\n if (expand == true) {\n productSets = (\n \n
  • \n \n {this.getExpandJSX(expand)} Product Sets\n \n \n
  • \n\n {product.product_role != \"viewer\" ? (\n
  • \n {this.getExpandJSX(expand)} All Product Sets\n\n {/* {this.getOrderDetails(product)} */}\n {/* {this.getPaymentDetails(order, product)} */}\n\n {this.getCartDetails(order, product)}\n
  • ) : (\"\")}\n\n {/* */}\n
    \n );\n }\n let orders = product.order || [];\n \n let isAnyPaidOrders = orders.some((o) => o.status == \"paid\");\n return (\n \n
  • \n \n {this.getExpandJSX(expand)} {this.state.treeName || \"View Final Product Files\"}\n \n
  • \n {this.state.expand &&
      {productSets}
    }\n {product.product_state == \"completed\" && isShowDownloads && isAnyPaidOrders && (\n \n \n \n )}\n
    \n );\n // return (\n //
  • \n // {readOnly}\n // {expand && (\n // \n //
  • {this.getExpandJSX(expand)} View Final Production Files
  • \n //
      {productSets}
    \n // \n // )}\n // \n // );\n }\n}\n\nOrder.contextType=CartContext\n","import React, { Component } from \"react\";\nimport OrderContainer from \"../../containers/orders/OrderContainer\";\n\nclass OrderList extends Component {\n state = {\n expandFlag: false,\n };\n UNSAFE_componentWillReceiveProps(nextProps) {}\n\n componentDidMount() {\n this.props.getProducts();\n this.props.getOrders({ status: \"pending\" });\n }\n\n getExpandJSX = (expandFlag) => {\n return (\n \n {expandFlag && }\n {!expandFlag && }\n \n );\n };\n\n onExpandToggle = (e) => {\n e.stopPropagation();\n e.preventDefault();\n this.setState({ expandFlag: !this.state.expandFlag });\n // this.props.getSets(this.props.product.id);\n };\n\n render() {\n const products = this.props.products;\n const { expandFlag } = this.state;\n const productList = products.length ? (\n products.map((product) => {\n return (\n \n
  • \n \n {this.getExpandJSX(expandFlag)} {product.name}\n \n
  • \n {expandFlag && (\n
      \n \n
    \n )}\n
    \n // \n //
  • \n // \n // {this.getExpandJSX(expand)} {this.state.treeName || \"View Final Production Files\"}\n // \n //
  • \n // {this.state.expand &&
      {productSets}
    }\n //
    \n );\n })\n ) : (\n
    No Orders
    \n );\n\n return (\n
    \n {/*

    My Orders

    */}\n

    View/Pay Products

    \n \n
      {productList}
    \n
    \n
    \n );\n }\n}\n\nexport default OrderList;\n","import React, { component, useEffect } from \"react\";\nimport LayoutContainer from \"../../containers/orders/LayoutContainer\";\nimport PaymentContainer from \"../../containers/orders/PaymentContainer\";\nimport { ENDPOINTS } from \"../../constants/endpoints\";\nimport CartContext from \"../../context/cart/CartContext\";\n\n\n\n\nexport default class ProductSet extends React.Component {\n \n constructor(props) {\n super(props);\n // let customState = { ...props, isAddedToCart: false, myMainOccurenceCount: [], mydbKeyVals: [], filesCountBySet: [] };\n let customState = { ...props, isAddedToCart: false, myMainOccurenceCount: [], filesCountBySet: [] };\n customState.expand = false;\n this.state = customState;\n \n \n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (this.state !== nextProps) {\n this.setState(nextProps);\n }\n }\n\n UNSAFE_componentWillMount() {\n this.props.getPrice(this.props.product.id, this.state.setno);\n }\n \n componentDidMount() {\n // ** Important note: Bala - Compulsarily look at files generated rather than rowcounts from DB!!!\n this.getFinalFilesCountBySet();\n\n if (this.props.cart_product !== undefined && this.props.cart_product !== null){\n this.context.setqty(this.props.cart_product.num_files); \n }\n if (this.props.cart_product == (undefined||null)){\n this.context.setqty(0); \n }\n\n\n // this.getKeyValsfromDB(); \n// this.getMainOccurenceCount();\n //this.mygetRowsCountBySet();\n }\n\n componentWillUnmount() {\n this.context.setqty(null)\n }\n \n setCartQty(){\n // Timeout is used as state updates are asyn! Important\n setTimeout(() => this.context.setqty(this.state.cart_product.num_files), 1000);\n }\n\n \n// Bala Edit Start\n\ngetFinalFilesCountBySet = () => {\n let uri = ENDPOINTS.final_files.index.uri;\n var product_id = this.props.product.id;\n var setno = this.state.setno;\n uri = `${uri}?product_id=${product_id}&setno=${setno}`;\n \n let noOfFiles;\n (async () => {\n noOfFiles = await fetch(uri, {\n method: \"GET\", headers: { \"content-type\": \"application/json\" }, \n })\n .then((response) => response.json())\n .then((data) => { \n this.setState({filesCountBySet: data});\n });\n })();\n}\n\n\n\ngetMainOccurenceCount = () => {\n let counts_uri = ENDPOINTS.productsetcount.index.uri;\n var product_id = this.props.product.id;\n var setno = this.props.setno;\n \n var where = \"product_id=\" + product_id + \" and setno=\" + setno;\n \n counts_uri = `${counts_uri}?where=${where}`;\n let noRecords;\n \n (async () => {\n noRecords = await fetch(counts_uri, {\n method: \"GET\", headers: { \"content-type\": \"application/json\" }, \n })\n .then((response) => response.json())\n .then((data) => { \n this.setState({myMainOccurenceCount: data});\n });\n })(); \n};\n\n\n\ngetKeyValsfromDB = () => {\n let keyVals_uri = ENDPOINTS.productkeyval.index.uri;\n var product_id = this.props.product.id;\n var setno = this.props.setno;\n \n var where = \"product_id=\" + product_id + \" and setno=\" + setno;\n \n keyVals_uri = `${keyVals_uri}?where=${where}`;\n\n let noRecords;\n \n // (async () => {\n noRecords = fetch(keyVals_uri, {\n method: \"GET\", headers: { \"content-type\": \"application/json\" }, \n })\n .then((response) => response.json())\n .then((data) => { \n this.setState({mydbKeyVals: data});\n// this.getRowsCountBySet();\n });\n// })(); \n};\n\ngetRowsCountBySet = () => {\n let uri = ENDPOINTS.maindbrowcountforaset.index.uri;\n var product_id = this.props.product.id;\n var dlname = this.props.main_dlname;\n\n var where = \"product_id=\" + product_id;\n \n let localKeyVals = this.props.product_set.keyvals;\n \n if (localKeyVals == undefined){\n localKeyVals = this.state.mydbKeyVals;\n localKeyVals = JSON.parse(localKeyVals);\n }\n \n // myKeyVals.map(keys => console.log(\"map Key = \" + keys.keyname + \" map Key Val = \" + keys.keyval));\n // DataUpload.mainDbRowCountForAset(\"product_id = 4 and dlname='IMAGES' \n // and JSON_CONTAINS(data, '\\\"ALL\\\"', '$.key')\") \n \n const jsonText=\"and JSON_CONTAINS(data, \";\n var allJson = '';\n let whereKeys = [];\n\n \n localKeyVals.map(keys => { \n allJson = jsonText + \"'\" + '\"' + keys.keyval + '\"' + \"','$.\" + keys.keyname + \"')\" \n whereKeys.push(allJson);\n });\n\n let finalWhereKeys = '';\n whereKeys.forEach(myConcat)\n\n function myConcat(item){\n finalWhereKeys = finalWhereKeys + \" \" + item;\n }\n\n where = \"product_id=\" + product_id + \" and dlname='\" + dlname + \"'\";\n\n where = where + \" \" + finalWhereKeys;\n\n uri = `${uri}?where=${where}`;\n\n let noOfFiles;\n\n (async () => {\n noOfFiles = await fetch(uri, {\n method: \"GET\", headers: { \"content-type\": \"application/json\" }, \n })\n .then((response) => response.json())\n .then((data) => { \n this.setState({filesCountBySet: data});\n });\n \n })();\n \n}\n\n\n// Bala Edit End (2 functions)\n\n\n\n getCartDetails = (order, product_id, setno, seq_no) => {\n const { product_role, cart_product, product } = this.state;\n \n if (product_role == \"viewer\") return null;\n if (this.isProductAddToCart(product_id, setno, seq_no, \"order\")) {\n // Bala Edit return \"Download\"; \n return \"Already Ordered\";\n } else {\n return (\n \n {this.isProductAddToCart(product_id, setno, seq_no, \"cart\") ? (\n {\n this.props.addToCart({\n product_id: product_id,\n setno: setno,\n seq_no,\n type: \"remove\",\n });\n \n if (seq_no == undefined) {\n this.setState({\n isAddedToCart: !this.state.isAddedToCart,\n });\n this.setCartQty();\n }\n if (seq_no != undefined) {\n this.context.decrease();\n // this.context.setqty(this.state.cart_product.num_files); too slow\n }\n }}\n >\n {seq_no!= undefined ? 'Remove from Cart' : 'Remove all records from Cart'}\n \n ) : (\n {\n this.props.addToCart({\n product_id: product_id,\n setno: setno,\n seq_no,\n });\n if (seq_no == undefined) {\n this.setState({\n isAddedToCart: !this.state.isAddedToCart,\n });\n this.setCartQty();\n }\n if (seq_no != undefined) {\n this.context.increase();\n //this.context.setqty(this.state.cart_product.num_files); too slow\n }\n }}\n >\n {seq_no!= undefined ? 'Add Record to Cart' : 'Add all records to Cart'}\n \n )}\n \n );\n }\n };\n\n isProductAddToCart = (product_id, setno, seq_no, type) => {\n const { cart_product: product_cart, product_set, order, product } = this.state;\n let cart_product = {};\n cart_product = type == \"cart\" ? [product_cart] : (order && order) || [];\n \n let isRecordAddedToCart = false;\n let orderedCount = 0;\n let NumFiles = 0;\n let counts =\n (product_set && product_set.counts && product_set.counts[this.state.main_dlname]) || [];\n if (product_set && Array.isArray(product_set.counts)) {\n counts = product_set.counts.filter((ps) => ps.dlname == this.state.main_dlname);\n }\n const count = (counts || []).find((f) => f.setno == setno) || {\n main_occurence_count: 0,\n };\n let addToCartCount = 0;\n\n //let correctCount = this.state.filesCountBySet.maindbrowcountforaset\n let correctCount = this.state.filesCountBySet.filesCount;\n \n if (count.main_occurence_count < correctCount) \n correctCount = count.main_occurence_count;\n\n if (count.main_occurence_count == 0) {\n //count.main_occurence_count = this.state.myMainOccurenceCount[0];\n //correctCount = this.state.filesCountBySet.maindbrowcountforaset;\n correctCount = this.state.filesCountBySet.filesCount;\n } \n \n\n if (cart_product && cart_product[0]) {\n for (let index = 0; index < cart_product.length; index++) {\n const cp = cart_product[index];\n\n if (cp.freeze_count != product.freeze_count || cp.status == \"failed\") {\n continue;\n }\n \n let sets = cp && cp.order_details && cp.order_details.sets;\n if (sets && Object.keys(sets).includes(\"all\")) {\n isRecordAddedToCart =\n type == \"cart\"\n ? true\n : cp.status == \"paid\" && cp.freeze_count == product.freeze_count && true;\n } else if (\n setno &&\n sets[setno.toString()] &&\n Object.keys(sets[setno.toString()]).includes(\"all\")\n ) {\n isRecordAddedToCart =\n type == \"cart\"\n ? true\n : cp.status == \"paid\" && cp.freeze_count == product.freeze_count && true;\n } else if ((seq_no || \"0\") && setno && sets[setno] && sets[setno][seq_no]) {\n isRecordAddedToCart =\n type == \"cart\" \n ? true\n : cp.status == \"paid\" && cp.freeze_count == product.freeze_count && true;\n } else if (sets[setno]) {\n if (type == \"order\" && cp.status == \"paid\") {\n orderedCount += cp.order_details.sets[setno]\n ? Object.keys(cp.order_details.sets[setno]).length\n : 0;\n } else {\n addToCartCount += cp.order_details.sets[setno]\n ? Object.keys(cp.order_details.sets[setno]).length\n : 0;\n }\n \n \n } else if (seq_no == undefined) { // This is the only way to track Add all to Cart!!!!\n\n // can do sometign anout this area. Needs research.\n isRecordAddedToCart = isRecordAddedToCart;\n\n }\n \n }\n \n \n\n if (\n count &&\n (\n (type == \"order\" && orderedCount == correctCount) ||\n (type == \"cart\" && addToCartCount == correctCount) \n )\n ) {\n isRecordAddedToCart = true;\n }\n/*\n if (this.props.cart_product)\n NumFiles = this.props.cart_product.num_files;\n else\n NumFiles = 0;\n\n if (\n count &&\n (\n (type == \"order\" && orderedCount + NumFiles == correctCount)\n ) && seq_no == undefined\n\n ) {\n isRecordAddedToCart = true;\n }\n */ \n \n \n }\n return isRecordAddedToCart;\n };\n\n getOrderStatus = (product_id, setno) => {\n const { order } = this.state.product;\n let payment = null;\n let page_nos = order && order.page_no ? Object.keys(order.page_no) : null;\n if (\n order &&\n order.status == \"paid\" &&\n this.state.product.freeze_count == order.freeze_count &&\n page_nos.length == 0\n ) {\n // payment =
  • Download
  • ;\n payment =
  • Already Ordered
  • ;\n \n } else if (order && order.status == \"pending\" && page_nos) {\n payment = (\n
      \n \n \n
    \n );\n } else {\n payment = (\n
      \n \n
    \n );\n }\n return payment;\n };\n\n onExpandToggle = (e) => {\n e.preventDefault();\n e.stopPropagation();\n this.setState({ expand: !this.state.expand });\n };\n\n getOrderDetails = (product_set) => {\n const pricing = product_set.pricing;\n const order = product_set.order;\n let page_nos = order && order.page_no ? Object.keys(order.page_no) : null;\n if (\n order &&\n order.status === \"paid\" &&\n (page_nos.length === 0 || page_nos.length === this.state.product.numpages)\n ) {\n return (\n \n
  • No. of files: {order.num_files}
  • \n
  • Total Amount: {order.total_amount}
  • \n
    \n );\n } else if (pricing) {\n return (\n \n
  • {pricing && pricing.pages_count && pricing.pages_count.total} Files
  • \n
  • Total Amount: {pricing.price_total}
  • \n
    \n );\n }\n };\n\n\n\n getExpandDetails(product, product_set) {\n const { order, product_role } = this.state.product;\n const product_order_status = this.state.product.order.status;\n let payment = null;\n let expandView = [];\n let t = [];\n \n let product_set_order_status = product_set && product_set.order.status === \"paid\";\n let page_nos =\n product_set.order && product_set.order.page_no\n ? Object.keys(product_set.order.page_no)\n : null;\n\n //product_set_order_status = product_set.order.status\n product_set_order_status = product_set_order_status\n ? page_nos.length === 0 || page_nos.length === product.numpages\n : product_set_order_status;\n \n if (this.isProductAddToCart(product.id, product_set.setno, null, \"order\")) {\n // payment =
  • Download
  • ; \n // payment =
  • Already Ordered
  • ; \n payment =
  • Already Ordered/Added to Cart
  • ; \n \n } else {\n if (product_role != \"viewer\") \n payment =
  • {this.getCartDetails(this.state.order, product.id, this.state.setno)}
  • ;\n \n }\n let counts =\n (product_set && product_set.counts && product_set.counts[this.state.main_dlname]) || [];\n if (product_set && Array.isArray(product_set.counts)) {\n counts = product_set.counts.filter((ps) => ps.dlname == this.state.main_dlname);\n }\n const count = (counts || []).find((f) => f.setno == this.state.setno) || {\n main_occurence_count: 0,\n };\n\n \n // For db Row Count\n \n //let correctCount = this.state.filesCountBySet.maindbrowcountforaset;\n let correctCount = this.state.filesCountBySet.filesCount;\n \n if (count.main_occurence_count < correctCount) \n correctCount = count.main_occurence_count;\n\n if (count.main_occurence_count == 0) { // This is required because View/Pay user don't have the counts state properties!\n //count.main_occurence_count = this.state.myMainOccurenceCount[0];\n //correctCount = this.state.filesCountBySet.maindbrowcountforaset;\n correctCount = this.state.filesCountBySet.filesCount;\n }\n\n\n// Bala Edit for (let i = 1; i <= this.state.filesCountBySet.maindbrowcountforaset; i++) { \n for (let i = 1; i <= correctCount; i++) { \n\n let set_layout = this.state.layouts[i] || {};\n\n t.push(\n
  • \n {\"Record no \" + i} | \n \n \n View\n {\" \"}\n |{\" \"}\n \n {this.getCartDetails(this.state.order, product.id, this.state.setno, i - 1)}\n
  • \n );\n }\n expandView.push(\n \n {t}\n {/* {this.getOrderDetails(product_set)} */}\n {payment}\n \n );\n return expandView;\n }\n\n getExpandJSX = (expandFlag) => {\n return (\n \n {expandFlag && }\n {!expandFlag && }\n \n );\n };\n\n render() {\n const expand = this.state.expand;\n const setno = this.state.setno;\n const product = this.state.product;\n const product_set = this.state.product_set;\n return (\n //
  • \n \n
  • \n \n {this.getExpandJSX(expand)} {product_set && product_set.desc}\n \n
  • \n
      {expand ? this.getExpandDetails(product, product_set) : null}
    \n \n );\n }\n}\nProductSet.contextType=CartContext","import React, { Component } from \"react\";\nimport OrderProductSetContainer from \"../../containers/orders/OrderProductSetContainer\";\nimport { ENDPOINTS } from \"../../constants/endpoints\";\n\n\nclass OrderProductSetList extends Component {\n constructor(props) {\n super(props);\n let customState = { ...props, dbKeyVals: [] };\n this.state = customState;\n this.getKeyValsfromDB();\n }\n\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (nextProps !== this.state) {\n this.setState(nextProps);\n }\n }\n\n UNSAFE_componentWillMount() {\n }\n\n getKeyValsfromDB = () => {\n let keyVals_uri = ENDPOINTS.productkeyval.index.uri;\n var product_id = this.props.product.id;\n \n var where = \"product_id=\" + product_id;\n \n let localKeyVals = [];\n \n keyVals_uri = `${keyVals_uri}?where=${where}`;\n \n let noRecords;\n \n (async () => {\n noRecords = await fetch(keyVals_uri, {\n method: \"GET\", headers: { \"content-type\": \"application/json\" }, \n })\n .then((response) => response.json())\n .then((data) => { \n this.setState({dbKeyVals: data});\n });\n })(); \n };\n \n\n\n render() {\n const product_sets = this.props.product_sets;\n const product = this.props.product;\n const order_status = this.props.product.order.status;\n if (product_sets == null) {\n return null;\n }\n return (\n
      \n {Object.keys(product_sets).map((k, i) => {\n let product_set = product_sets[k];\n let props = { ...product_set };\n props.product = product;\n props.main_dlname = this.props.main_dlname;\n props.dbKeyVals = this.state.dbKeyVals;\n return (\n \n );\n })}\n
    \n );\n }\n}\n\nexport default OrderProductSetList;\n","import React, { Component } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { ENDPOINTS } from \"../../constants/endpoints\";\n\nclass Payment extends Component {\n constructor(props) {\n super(props);\n this.state = { ...props };\n }\n UNSAFE_componentWillReceiveProps(nextProps) {}\n\n componentDidMount() {\n // uncomment below line to generate a image in the background\n // this.props.generateImage(this.state.product_id, this.state.setno);\n }\n\n createOrder = (data, actions) => {\n if (this.state.pg_order_id) return this.state.pg_order_id;\n let uri = ENDPOINTS.orders.create.uri;\n return fetch(uri, {\n method: ENDPOINTS.orders.create.method,\n headers: {\n \"content-type\": \"application/json\",\n },\n body: JSON.stringify(this.state),\n })\n .then((response) => response.json())\n .then((response) => {\n this.setState({ pg_order_id: response.pg_order_id });\n return response.pg_order_id;\n });\n };\n\n onApprove = (data, actions) => {\n localStorage.setItem(\"isOrderPaid\", \"true\");\n let uri = ENDPOINTS.orders.capture.uri;\n return fetch(uri, {\n method: ENDPOINTS.orders.capture.method,\n headers: {\n \"content-type\": \"application/json\",\n },\n body: JSON.stringify({\n paypal_order_id: data.orderID,\n }),\n })\n .then(function (res) {\n return res.json();\n })\n .then(function (data) {\n alert(\"payment done successfully\");\n // if (this.props.isRedirect)\n window.location = \"/products\";\n // window.location.reload();\n return data.pg_order_id;\n });\n };\n\n onSuccess = (details, data) => {\n alert(\"payment done successfully\");\n // if (this.props.isRedirect) window.location = \"/products\";\n };\n\n onCancel = (data, actions) => {\n alert(\"Payment cancelled\");\n };\n onError = (data, actions) => {\n localStorage.removeItem(\"isOrderPaid\", \"true\");\n alert(\"Something went wrong please try again later\");\n };\n\n render() {\n const style = {\n // height: 25,\n size: \"small\",\n color: \"gold\",\n shape: \"pill\",\n label: \"checkout\",\n tagline: \"true\",\n };\n const PaypalButton = window.paypal.Buttons.driver(\"react\", {\n React,\n ReactDOM,\n });\n return (\n
    \n this.onApprove(e)}\n onSuccess={this.onSuccess}\n onError={this.onError}\n onCancel={this.onCancel}\n // style={style}\n />\n
    \n );\n }\n}\n\nexport default Payment;\n","import React, { Component } from \"react\";\r\nimport { Col, Form, Modal, Button, closeButton } from \"react-bootstrap\";\r\nimport { FieldGroup } from \"../bootstrap/Forms.FieldGroup\";\r\nimport { formDataToJSON } from \"../../adukku_utils/array\";\r\n\r\nexport default class ShareProduct extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = { ...props };\r\n }\r\n _handleValidSubmit = (e) => {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n let formData = formDataToJSON(new FormData(e.target));\r\n this.props.shareProduct(formData);\r\n this.setState({ show: false });\r\n };\r\n\r\n render() {\r\n const style = {\r\n display: \"none\",\r\n };\r\n return (\r\n
  • \r\n this.setState({ show: true })}>\r\n Share Product\r\n \r\n \r\n \r\n Share Product\r\n \r\n \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n \r\n \r\n
    \r\n \r\n \r\n \r\n
    \r\n
  • \r\n );\r\n }\r\n}\r\n","import React from \"react\";\nimport { FormControl, Modal, Button, Form } from \"react-bootstrap\";\n\nimport { ENDPOINTS } from \"../../constants/endpoints\";\n// import { formDataToJSON } from \"../../adukku_utils/array\";\n\nexport default class EditProductKey extends React.Component {\n constructor(props) {\n super(props);\n this.state = { ...props };\n this.hideOverlay = this.hideOverlay.bind(this);\n this.showOverlay = this.showOverlay.bind(this);\n this.saveProductKeys = this.saveProductKeys.bind(this);\n this.deleteAttribute = this.deleteAttribute.bind(this);\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (this.state !== nextProps) {\n this.setState(nextProps);\n }\n }\n\n showOverlay(e) {\n e.preventDefault();\n e.stopPropagation();\n this.props.showOverlay(this.state.product.id + \"/keys\");\n }\n\n hideOverlay(e) {\n // e.preventDefault();\n // e.stopPropagation();\n this.props.hideOverlay(this.state.product.id + \"/keys\");\n }\n\n saveProductKeys(e) {\n e.preventDefault();\n e.stopPropagation();\n // let formData = formDataToJSON(new FormData(e.target));\n // const product_keys = this.state.product_keys;\n const selectedKeys = this.state.selectedKeys;\n const attributes = this.state.product_datalevel.attributes;\n // let endpoint = ENDPOINTS[\"keys\"][\"create\"];\n // let url = endpoint.uri;\n // let method = endpoint.method;\n let data = {};\n attributes.map((attr, i) => {\n // data[\"order\"] = this.state.product_key_order;\n // data[\"attribute\"] = formData[\"key[\" + i + \"][attribute]\"];\n data[\"attribute\"] = selectedKeys[attr.name] ? attr.name : null;\n data[\"product_id\"] = this.state.product_id;\n data[\"dlname\"] = this.state.product_datalevel.dlname;\n data[\"order\"] = selectedKeys[data[\"attribute\"]].order;\n if (data.attribute != null && data.order > 0) {\n this.createProductKey(data);\n }\n });\n }\n\n deleteAttribute(attribute) {\n const product_id = this.state.product.id;\n const dlname = this.state.product_datalevel.dlname;\n const payload = {\n product_id: product_id,\n dlname: dlname,\n attribute: attribute,\n };\n const endpoint = ENDPOINTS[\"keys\"][\"delete\"];\n const url = endpoint.uri;\n const method = endpoint.method;\n this.props.deleteKey(url, method, payload);\n }\n\n createProductKey(formData) {\n let endpoint = ENDPOINTS[\"keys\"][\"create\"];\n let url = endpoint.uri;\n let method = endpoint.method;\n this.props.createKey(url, method, formData);\n }\n\n handleCheck(attribute, e) {\n let { selectedKeys, currentKeyOrder } = this.state;\n\n selectedKeys[attribute].checked = !selectedKeys[attribute].checked;\n\n if (selectedKeys[attribute].checked == false && selectedKeys[attribute].saved == true) {\n this.deleteAttribute(attribute);\n } else if (selectedKeys[attribute].checked == true && selectedKeys[attribute].order == 0) {\n currentKeyOrder += 1;\n selectedKeys[attribute].order = currentKeyOrder;\n this.setState({\n selectedKeys: selectedKeys,\n currentKeyOrder: currentKeyOrder,\n });\n } else if (selectedKeys[attribute].checked == false && selectedKeys[attribute].order > 0) {\n currentKeyOrder -= 1;\n selectedKeys[attribute].order = 0;\n this.setState({\n selectedKeys: selectedKeys,\n currentKeyOrder: currentKeyOrder,\n });\n }\n }\n\n render() {\n if (this.state.product_datalevel == null || this.state.product_datalevel.attributes == null) {\n return null;\n }\n const isVisible = this.state.overlay.visible;\n const dlname = this.state.product_datalevel.dlname;\n const attributes = this.state.product_datalevel.attributes;\n const product_keys = this.state.product_keys;\n const anchorDLDeleteStyle = {\n paddingLeft: \"20px\",\n };\n let tbodyDOM = null;\n let selectedKeys = this.state.selectedKeys;\n tbodyDOM = attributes.map((attr, i) => {\n let product_key =\n this.state.product_keys.filter((key) => key.attribute == attr.name)[0] || {};\n let attribute = product_key.attribute || attr.name;\n let defaultChecked = this.state.selectedKeys[attribute];\n if (defaultChecked == null) {\n return null;\n }\n return (\n
    \n

    {attribute}

    \n
    \n \n\n \n \n
    \n
    \n );\n });\n\n return (\n
  • \n {this.props.labelText}\n \n
    \n \n Modify Product Set Keys\n \n \n \n \n
    \n
    \n

    Attributes (Key)

    \n

    Order

    \n
    \n
    {tbodyDOM}
    \n
    \n
    \n \n \n {/* */}\n \n
    \n
    \n
  • \n );\n }\n}\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { authorized, Authorized } from \"../../adukku_utils/authorizeUser\";\nimport { ENDPOINTS } from \"../../constants/endpoints\";\n\nexport default class ProductKey extends React.Component {\n constructor(props) {\n super(props);\n this.state = { ...props };\n this.onDeleteDatalevel = this.onDeleteDatalevel.bind(this);\n this.onExpandToggle = this.onExpandToggle.bind(this);\n this.onClickAddNewAttr = this.onClickAddNewAttr.bind(this);\n }\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (this.state !== nextProps) {\n this.setState(nextProps);\n }\n }\n onExpandToggle(e) {\n e.preventDefault();\n e.stopPropagation();\n }\n onDeleteAttribute(attribute, e) {\n e.preventDefault();\n e.stopPropagation();\n const product_id = this.state.product_id;\n const dlname = this.state.product_datalevel.dlname;\n const payload = {\n product_id: product_id,\n dlname: dlname,\n attribute: attribute\n };\n const endpoint = ENDPOINTS[\"keys\"][\"delete\"];\n const url = endpoint.uri;\n const method = endpoint.method;\n this.props.deleteKey(url, method, payload);\n }\n onDeleteDatalevel(e) {\n e.preventDefault();\n e.stopPropagation();\n const product_id = this.state.product_id;\n const dlname = this.state.product_datalevel.dlname;\n const attributes = this.state.attributes;\n const endpoint = ENDPOINTS[\"keys\"][\"delete\"];\n const url = endpoint.uri;\n const method = endpoint.method;\n let payload = { product_id: product_id, dlname: dlname };\n this.props.deleteKey(url, method, payload);\n }\n\n onClickAddNewAttr(e) {\n e.preventDefault();\n e.stopPropagation();\n let datalevel = this.props.product_datalevel;\n this.props.showOverlay(this.state.product.id);\n this.props.selectDatalevel(this.state.product_id, datalevel);\n }\n\n render() {\n if (\n this.state.product_datalevel == null ||\n this.state.product_datalevel.attributes == null\n ) {\n return null;\n }\n const { role, product_role } = this.state;\n const dlname = this.state.product_datalevel.dlname;\n const product_keys = this.state.product_keys;\n const anchorDLDeleteStyle = {\n paddingLeft: \"20px\"\n };\n return (\n
  • \n \n {dlname}(Data Level)\n \n \n \n Delete\n \n \n
      \n
    • \n \n \n \n \n \n \n \n \n {product_keys.map(key => (\n \n \n \n \n \n ))}\n \n
      KeyOrder
      {key.attribute}{key.order}\n \n \n Delete\n \n \n
      \n
    • \n
    \n
  • \n );\n }\n}\n","import React from \"react\";\n\nimport ProductKeyContainer from \"../../containers/product_keys/ProductKeyContainer\";\nimport EditProductKeyContainer from \"../../containers/product_keys/EditProductKeyContainer\";\nimport { authorized, Authorized } from \"../../adukku_utils/authorizeUser\";\n\nexport default class ProductKeyList extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n product: props.product,\n product_keys: props.product_keys,\n overlay: props.overlay,\n role: props.role,\n product_role: props.product_role,\n };\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (nextProps !== this.state) {\n this.setState(nextProps);\n }\n }\n\n UNSAFE_componentWillMount() {\n this.props.getKeys(this.state.product.id);\n }\n\n render() {\n const { role, product_role } = this.state;\n const product_keys = this.state.product_keys;\n if (product_keys == null) {\n return null;\n }\n const key_cnt = Object.keys(product_keys).length;\n const labelText = key_cnt > 0 ? \"Modify product key\" : \"Add new product key\";\n return (\n
      \n {Object.keys(product_keys).map((k, i) => {\n let product_key = product_keys[k];\n return (\n \n );\n })}\n \n \n \n
    \n );\n }\n}\n","import React from \"react\";\nimport { Form, Modal, Button } from \"react-bootstrap\";\n\nimport { FieldGroup } from \"../bootstrap/Forms.FieldGroup\";\nimport { ENDPOINTS } from \"../../constants/endpoints\";\nimport { formDataToJSON } from \"../../adukku_utils/array\";\n\nexport default class AddProductSet extends React.Component {\n constructor(props) {\n super(props);\n this.showAddSetOverlay = this.showAddSetOverlay.bind(this);\n this.hideAddSetOverlay = this.hideAddSetOverlay.bind(this);\n this.state = {\n product: props.product,\n overlay: props.overlay || { visible: false },\n };\n this._handleValidSubmit = this._handleValidSubmit.bind(this);\n // this.handleOrderChange = this.handleOrderChange.bind(this);\n }\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (nextProps !== this.state) {\n this.setState(nextProps);\n }\n }\n\n showAddSetOverlay(e) {\n e.preventDefault();\n e.stopPropagation();\n this.props.showOverlay(this.state.product.id + \"_sets\");\n }\n\n hideAddSetOverlay(e) {\n e.preventDefault();\n e.stopPropagation();\n this.props.hideOverlay(this.state.product.id + \"_sets\");\n }\n\n _handleValidSubmit(e) {\n e.preventDefault();\n e.stopPropagation();\n let formData = formDataToJSON(new FormData(e.target));\n let endpoint = ENDPOINTS[\"sets\"][\"create\"];\n let url = endpoint.uri;\n let method = endpoint.method;\n this.props.createSet(url, method, formData);\n }\n\n render() {\n const isVisible = this.state.overlay.visible;\n const product = this.state.product;\n return (\n
  • \n {this.props.labelText}\n \n
    \n \n Create Product Set\n \n \n {/* */}\n \n \n \n \n \n {/* */}\n \n
    \n
    \n
  • \n );\n }\n}\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { ENDPOINTS } from \"../../constants/endpoints\";\nimport ProductSetKeyValListContainer from \"../../containers/product_sets/ProductSetKeyValListContainer\";\nimport ProductSetDLValListContainer from \"../../containers/product_sets/ProductSetDLValListContainer\";\nimport ProductSetLayoutContainer from \"../../containers/product_sets/ProductSetLayoutContainer\";\nimport ProductSetCountListContainer from \"../../containers/product_sets/ProductSetCountListContainer\";\nimport { authorized, Authorized } from \"../../adukku_utils/authorizeUser\";\nimport {\n Row,\n Col,\n Form,\n FormGroup,\n ControlLabel,\n FormControl,\n Modal,\n Fade,\n utils,\n Button,\n} from \"react-bootstrap\";\nimport { FieldGroup } from \"../bootstrap/Forms.FieldGroup\";\nimport { formDataToJSON } from \"../../adukku_utils/array\";\n\nexport default class ProductSet extends React.Component {\n constructor(props) {\n super(props);\n let customState = {\n ...props,\n isEditLayoutClicked: false,\n isProductSetLayoutExpanded: false,\n };\n customState.expand = false;\n this.state = customState;\n this.onExpandToggle = this.onExpandToggle.bind(this);\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (this.state !== nextProps) {\n this.setState(nextProps);\n }\n }\n\n componentDidMount() {\n this.props.getSetPlaceholders(this.state.product_id, this.state.setno);\n let expandedProduct = localStorage.getItem(\"expandedProduct\");\n expandedProduct = expandedProduct ? JSON.parse(expandedProduct) : {};\n\n if (\n expandedProduct.productId &&\n this.state.product.id == expandedProduct.productId &&\n this.state.setno == expandedProduct.setNo &&\n (expandedProduct.isSet || expandedProduct.pagePreview)\n ) {\n this.setState({\n expand: true,\n isProductSetLayoutExpanded: true,\n });\n localStorage.setItem(\"expandedProduct\", JSON.stringify({}));\n }\n }\n\n onExpandToggle(e) {\n if (e == undefined) return;\n e.preventDefault();\n e.stopPropagation();\n this.setState({ expand: !this.state.expand }); // TODO set from reducer\n }\n\n _handleDeleteSet(e, setno) {\n e.preventDefault();\n e.stopPropagation();\n if (confirm(\"Are you sure you want to delete the Product set along with data?\")) {\n let payload = {\n setno: setno,\n product_id: this.state.product.id,\n };\n let endpoint = ENDPOINTS[\"sets\"][\"delete\"];\n let url = endpoint.uri;\n let method = endpoint.method;\n this.props.deleteSet(url, method, payload);\n } else {\n return;\n }\n }\n\n getEditLayoutJSX = (isVisible) => {\n const layout = this.state.layout;\n const { desc, height, width, is_preset_bg, is_preset_sticker } = this.state;\n const layoutCategories = this.state.layoutCategories || [];\n\n if (isVisible) {\n return (\n {\n this.setState({\n isEditLayoutClicked: false,\n });\n }}\n >\n
    \n \n Edit Set\n \n \n {\n this.setState({ [name]: value });\n }}\n // disabled={true}\n placeholder=\"Product Set Name\"\n required=\"required\"\n />\n \n \n \n {/* {\n this.setState({\n isEditLayoutClicked: false,\n });\n }}\n >\n Cancel\n */}\n \n
    \n \n );\n }\n };\n\n getExpandJSX = (expandFlag) => {\n return (\n \n {expandFlag && }\n {!expandFlag && }\n \n );\n };\n\n handleEditLayout = (e) => {\n // this.se\n e.preventDefault();\n e.stopPropagation();\n const { setno, product } = this.state;\n let endpoint = ENDPOINTS.sets.update;\n let url = endpoint.uri;\n let method = endpoint.method;\n\n let formData = formDataToJSON(new FormData(e.target));\n // formData.is_preset_bg = this.state.is_preset_bg;\n // formData.is_preset_sticker = this.state.is_preset_sticker;\n // formData.sticker_category =\n // this.state.sticker_category == \"other\"\n // ? this.state.other_category\n // : this.state.sticker_category;\n //console.log(formData);\n formData.product_id = product.id;\n this.props.updateSet(setno, url, method, formData);\n this.setState({\n isEditLayoutClicked: false,\n });\n };\n\n render() {\n const { role, product_role } = this.state;\n const expand = this.state.expand;\n const setno = this.state.setno;\n const desc = this.state.desc;\n const keyvals = this.state.keyvals;\n const dlvals = this.state.dlvals;\n const counts = this.state.counts;\n const layouts = this.state.layouts;\n const product = this.state.product;\n const anchorDLDeleteStyle = {\n paddingLeft: \"20px\",\n };\n let expandView = [];\n let t = [];\n if (expand) {\n expandView.push(\n \n );\n expandView.push(\n \n );\n expandView.push(\n \n );\n for (let i = 1; i <= product.numpages; i++) {\n t.push(\n \n );\n }\n expandView.push(\n
  • \n {\n e.stopPropagation();\n this.setState({\n isProductSetLayoutExpanded: !this.state.isProductSetLayoutExpanded,\n });\n }}\n >\n {this.getExpandJSX(this.state.isProductSetLayoutExpanded)} Layouts\n \n {/* {this.getExpandJSX(expand)} Layouts */}\n {this.state.isProductSetLayoutExpanded &&
      {t}
    }\n
  • \n );\n // expandView.push(
  • Pre-View/Edit Product Set
  • );\n // expandView.push(
  • View Final Product Set
  • );\n }\n return (\n
  • \n \n {this.getExpandJSX(expand)} {`${desc}`}\n {/* {`${desc} -- #${setno}`}\n --{\" \"} */}\n \n\n \n {\n this._handleDeleteSet(e, setno);\n }}\n style={{ paddingLeft: \"15px\" }}\n title=\"Delete\"\n >\n \n \n {!this.state.isEditLayoutClicked && (\n // \n // \n {\n e.stopPropagation();\n e.preventDefault();\n this.setState({\n isEditLayoutClicked: !this.state.isEditLayoutClicked,\n });\n }}\n >\n \n \n )}\n\n {this.state.isEditLayoutClicked && this.getEditLayoutJSX(this.state.isEditLayoutClicked)}\n \n
      \n {expandView}\n \n
    • \n {\n e.stopPropagation();\n e.preventDefault();\n let expandedProduct = {\n productId: product.id,\n setNo: setno,\n pagePreview: true,\n };\n localStorage.setItem(\"expandedProduct\", JSON.stringify(expandedProduct));\n window.location = \"/products/\" + product.id + \"/sets/\" + setno + \"/page_preview\";\n }}\n className=\"no-textcolor\"\n // href={\n // \"/products/\" + product.id + \"/sets/\" + setno + \"/page_preview\"\n // }\n // target=\"_blank\"\n >\n Pre-View/Edit Product Set\n \n
    • \n {/*
    • \n {\n e.stopPropagation();\n e.preventDefault();\n let expandedProduct = {\n productId: product.id,\n setNo: setno,\n pagePreview: true,\n };\n localStorage.setItem(\"expandedProduct\", JSON.stringify(expandedProduct));\n window.location = \"/products/\" + product.id + \"/sets/\" + setno + \"/page_preview\";\n }}\n className=\"no-textcolor\"\n // href={\n // \"/products/\" + product.id + \"/sets/\" + setno + \"/page_preview\"\n // }\n // target=\"_blank\"\n >\n View Final Product Set\n \n
    • */}\n \n
    \n
  • \n );\n }\n}\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { ENDPOINTS } from \"../../constants/endpoints\";\nimport {\n Table,\n Col,\n Form,\n FormGroup,\n ControlLabel,\n FormControl,\n Modal,\n Fade,\n utils,\n Button,\n} from \"react-bootstrap\";\nimport { FieldGroup } from \"../bootstrap/Forms.FieldGroup\";\nimport { formDataToJSON } from \"../../adukku_utils/array\";\nimport { authorized, Authorized } from \"../../adukku_utils/authorizeUser\";\n\nexport default class ProductSetCount extends React.Component {\n constructor(props) {\n super(props);\n this.state = { ...props, editableField: null };\n this.onEditClick = this.onEditClick.bind(this);\n this.onExpandToggle = this.onExpandToggle.bind(this);\n this.hideAddSetOverlay = this.hideAddSetOverlay.bind(this);\n this._handleValidSubmit = this._handleValidSubmit.bind(this);\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (this.state !== nextProps) {\n this.setState(nextProps);\n }\n }\n\n hideAddSetOverlay(e, count) {\n e.preventDefault();\n e.stopPropagation();\n this.props.hideOverlay(count.id);\n }\n\n onEditClick(e, count) {\n e.preventDefault();\n e.stopPropagation();\n this.props.showOverlay(count.id);\n }\n\n _handleValidSubmit(e, count) {\n e.preventDefault();\n e.stopPropagation();\n let formData = formDataToJSON(new FormData(e.target));\n if (count.main_occurence_count == null || count.main_occurence_count == 0) {\n let endpoint = ENDPOINTS.sets.counts.create;\n let url = endpoint.uri;\n let method = endpoint.method;\n this.props.createSetOccurenceCount(url, method, formData);\n } else {\n let endpoint = ENDPOINTS.sets.counts.update;\n let url = endpoint.uri;\n let method = endpoint.method;\n this.props.updateSetOccurenceCount(url, method, formData);\n }\n this.hideAddSetOverlay(e, count);\n }\n\n onExpandToggle(e) {\n e.preventDefault();\n e.stopPropagation();\n this.setState({ expand: !this.state.expand });\n }\n\n getExpandJSX = (expandFlag) => {\n return (\n \n {expandFlag && }\n {!expandFlag && }\n \n );\n };\n\n render() {\n const { role, product_role } = this.state;\n const counts = this.state.counts;\n const isExpand = this.state.expand;\n let that = this;\n let isVisible = null;\n let view = [\n \n {this.getExpandJSX(isExpand)} {\"Product Set Count \"}\n ,\n ];\n if (isExpand) {\n let t = (\n
      \n
    • \n \n \n {counts.map((count, i) => {\n return (\n \n \n \n \n \n \n \n );\n })}\n \n
      {count.dlname}{count.main_occurence_count || \"NA\"}\n this.onEditClick(e, count)}\n style={{ paddingLeft: \"15px\" }}\n title=\"Edit\"\n >\n \n \n
      \n
    • \n
    \n );\n view.push(t);\n counts.map((count, i) => {\n isVisible = (that.state.overlays[count.id] || { visible: false }).visible;\n t = (\n {\n that.hideAddSetOverlay(e, count);\n }}\n >\n {\n that._handleValidSubmit(e, count);\n }}\n >\n \n Add Product Set Count\n \n \n \n \n \n \n \n \n \n {/* {\n that.hideAddSetOverlay(e, count);\n }}\n >\n Cancel\n */}\n \n \n \n );\n view.push(t);\n });\n }\n return
  • {view}
  • ;\n }\n}\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { ENDPOINTS } from \"../../constants/endpoints\";\nimport ProductSetCountContainer from \"../../containers/product_sets/ProductSetCountContainer\";\nimport { Table } from \"react-bootstrap\";\n\nexport default class ProductSetCountList extends React.Component {\n constructor(props) {\n super(props);\n let customState = { ...props };\n customState.expand = false;\n this.state = customState;\n this.onExpandToggle = this.onExpandToggle.bind(this);\n }\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (this.state !== nextProps) {\n this.setState(nextProps);\n }\n }\n\n onExpandToggle(e) {\n e.preventDefault();\n e.stopPropagation();\n this.setState({ expand: !this.state.expand }); // TODO set from reducer\n }\n\n getExpandJSX = (expandFlag) => {\n return (\n \n {expandFlag && }\n {!expandFlag && }\n \n );\n };\n\n render() {\n const { role, product_role } = this.state;\n const setno = this.state.setno;\n const expand = this.state.expand;\n const counts = this.state.counts;\n\n const anchorDLDeleteStyle = {\n paddingLeft: \"20px\",\n };\n return (\n \n {Object.keys(counts).map((dlname, i) => {\n return (\n \n );\n })}\n \n );\n }\n}\n","import React, { Fragment } from \"react\";\nimport { Table, Form, Modal, Button } from \"react-bootstrap\";\n\nimport { ENDPOINTS } from \"../../constants/endpoints\";\nimport { FieldGroup } from \"../bootstrap/Forms.FieldGroup\";\nimport { formDataToJSON } from \"../../adukku_utils/array\";\nimport { authorized, Authorized } from \"../../adukku_utils/authorizeUser\";\n\nexport default class ProductSetKeyVal extends React.Component {\n constructor(props) {\n super(props);\n this.state = { ...props, editableField: null };\n this.onEditClick = this.onEditClick.bind(this);\n this.onExpandToggle = this.onExpandToggle.bind(this);\n this.hideAddSetOverlay = this.hideAddSetOverlay.bind(this);\n this._handleValidSubmit = this._handleValidSubmit.bind(this);\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (this.state !== nextProps) {\n this.setState(nextProps);\n }\n }\n\n hideAddSetOverlay(e, dlval) {\n e.preventDefault();\n e.stopPropagation();\n this.props.hideOverlay(dlval.id);\n }\n\n onEditClick(e, dlval) {\n e.preventDefault();\n e.stopPropagation();\n this.props.showOverlay(dlval.id);\n }\n\n _handleValidSubmit(e, dlval) {\n e.preventDefault();\n e.stopPropagation();\n let formData = formDataToJSON(new FormData(e.target));\n if (dlval.dlcount == null) {\n let endpoint = ENDPOINTS[\"sets\"][\"create_dlval\"];\n let url = endpoint.uri;\n let method = endpoint.method;\n this.props.createSetDLVal(url, method, formData);\n } else {\n let endpoint = ENDPOINTS[\"sets\"][\"update_dlval\"];\n let url = endpoint.uri;\n let method = endpoint.method;\n this.props.updateSetDLVal(url, method, formData);\n }\n this.hideAddSetOverlay(e, dlval);\n }\n\n onExpandToggle(e) {\n e.preventDefault();\n e.stopPropagation();\n this.setState({ expand: !this.state.expand });\n }\n\n getExpandJSX = (expandFlag) => {\n return (\n \n {expandFlag && }\n {!expandFlag && }\n \n );\n };\n\n render() {\n const { role, product_role } = this.state;\n const dlvals = this.state.dlvals;\n const isExpand = this.state.expand;\n let that = this;\n let isVisible = null;\n let view = [\n \n {this.getExpandJSX(isExpand)} {\"PageNo \" + this.state.pageno}\n ,\n ];\n if (isExpand) {\n let t = (\n
      \n
    • \n \n \n {dlvals.map((dlval, i) => {\n return (\n \n \n \n \n \n \n \n );\n })}\n \n
      {dlval.dlname}{dlval.dlcount < 0 ? \"NA\" : dlval.dlcount}\n {!dlval.layout_id ? (\n this.onEditClick(e, dlval)}\n style={{ paddingLeft: \"15px\" }}\n title=\"Edit\"\n >\n \n \n ) : (\n \n )}\n
      \n
    • \n
    \n );\n view.push(t);\n dlvals.map((dlval, i) => {\n isVisible = (that.state.overlays[dlval.id] || { visible: false }).visible;\n t = (\n {\n that.hideAddSetOverlay(e, dlval);\n }}\n >\n {\n that._handleValidSubmit(e, dlval);\n }}\n >\n \n Add Occurence Count\n \n \n \n \n \n \n \n {/* */}\n \n \n \n \n {/* {\n that.hideAddSetOverlay(e, dlval);\n }}\n >\n Cancel\n */}\n \n \n \n );\n view.push(t);\n });\n }\n return
  • {view}
  • ;\n }\n}\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { ENDPOINTS } from \"../../constants/endpoints\";\nimport ProductSetDLValContainer from \"../../containers/product_sets/ProductSetDLValContainer\";\nimport { Table } from \"react-bootstrap\";\n\nexport default class ProductSetKeyValList extends React.Component {\n constructor(props) {\n super(props);\n let customState = { ...props };\n customState.expand = false;\n this.state = customState;\n this.onExpandToggle = this.onExpandToggle.bind(this);\n }\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (this.state !== nextProps) {\n this.setState(nextProps);\n }\n }\n\n onExpandToggle(e) {\n e.preventDefault();\n e.stopPropagation();\n this.setState({ expand: !this.state.expand }); // TODO set from reducer\n }\n\n getExpandJSX = (expandFlag) => {\n return (\n \n {expandFlag && }\n {!expandFlag && }\n \n );\n };\n\n render() {\n const { role, product_role } = this.state;\n const setno = this.state.setno;\n const expand = this.state.expand;\n const dlvals = this.state.dlvals;\n\n const anchorDLDeleteStyle = {\n paddingLeft: \"20px\",\n };\n return (\n
  • \n \n {this.getExpandJSX(expand)} Occurence Counts{\" \"}\n \n
      \n {expand &&\n Object.keys(dlvals).map((pageno, i) => {\n return (\n \n );\n })}\n
    \n
  • \n );\n }\n}\n","import React from \"react\";\nimport { Col, Form, Modal, Button } from \"react-bootstrap\";\n\nimport { ENDPOINTS } from \"../../constants/endpoints\";\nimport { FieldGroup } from \"../bootstrap/Forms.FieldGroup\";\nimport { formDataToJSON } from \"../../adukku_utils/array\";\nimport { authorized, Authorized } from \"../../adukku_utils/authorizeUser\";\n\nexport default class ProductSetKeyVal extends React.Component {\n constructor(props) {\n super(props);\n this.state = { ...props };\n this.onEditClick = this.onEditClick.bind(this);\n this.hideAddSetOverlay = this.hideAddSetOverlay.bind(this);\n this._handleValidSubmit = this._handleValidSubmit.bind(this);\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (this.state !== nextProps) {\n this.setState(nextProps);\n }\n }\n\n onEditClick(e) {\n e.preventDefault();\n e.stopPropagation();\n this.props.showOverlay(\n this.state.product_id + \"/sets/\" + this.state.setno + \"/\" + this.state.keyname\n );\n }\n\n hideAddSetOverlay(e) {\n if (e == undefined) return;\n e.preventDefault();\n e.stopPropagation();\n this.props.hideOverlay(\n this.state.product_id + \"/sets/\" + this.state.setno + \"/\" + this.state.keyname\n );\n }\n\n _handleValidSubmit(e) {\n e.preventDefault();\n e.stopPropagation();\n let formData = formDataToJSON(new FormData(e.target));\n if (this.state.keyval == null) {\n let endpoint = ENDPOINTS[\"sets\"][\"create_key\"];\n let url = endpoint.uri;\n let method = endpoint.method;\n this.props.createSetKey(url, method, formData);\n } else {\n let endpoint = ENDPOINTS[\"sets\"][\"update_key\"];\n let url = endpoint.uri;\n let method = endpoint.method;\n this.props.updateSetKey(url, method, formData);\n }\n }\n\n onExpandToggle(e) {\n e.preventDefault();\n e.stopPropagation();\n this.setState({ expand: !this.state.expand });\n }\n\n render() {\n const { role, product_role } = this.state;\n const keyval = this.state;\n const isVisible = this.state.overlay.visible;\n return (\n \n {keyval.keyname}\n {keyval.keyval}\n \n \n \n \n \n \n
    \n \n Add Key value\n \n \n \n \n \n \n {/* */}\n \n \n \n {/* */}\n \n
    \n
    \n \n \n \n );\n }\n}\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { ENDPOINTS } from \"../../constants/endpoints\";\nimport ProductSetKeyValContainer from \"../../containers/product_sets/ProductSetKeyValContainer\";\nimport { Table } from \"react-bootstrap\";\n\nexport default class ProductSetKeyValList extends React.Component {\n constructor(props) {\n super(props);\n let customState = { ...props };\n customState.expand = false;\n this.state = customState;\n this.onExpandToggle = this.onExpandToggle.bind(this);\n }\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (this.state !== nextProps) {\n this.setState(nextProps);\n }\n }\n\n onExpandToggle(e) {\n e.preventDefault();\n e.stopPropagation();\n this.setState({ expand: !this.state.expand }); // TODO set from reducer\n }\n\n getExpandJSX = (expandFlag) => {\n return (\n \n {expandFlag && }\n {!expandFlag && }\n \n );\n };\n\n render() {\n const { role, product_role } = this.state;\n const setno = this.state.setno;\n const expand = this.state.expand;\n const keyvals = this.state.keyvals;\n // const keyvals = [...new Set(this.state.keyvals.map(item => item.id))];\n const anchorDLDeleteStyle = {\n paddingLeft: \"20px\",\n };\n return (\n
  • \n \n {this.getExpandJSX(expand)} Keys and Values{\" \"}\n \n
      \n {expand && (\n
    • \n \n \n {expand &&\n keyvals.map((keyval, i) => {\n return (\n \n );\n })}\n \n
      \n
    • \n )}\n
    \n
  • \n );\n }\n}\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport {\n Row,\n Col,\n Form,\n FormGroup,\n ControlLabel,\n FormControl,\n Modal,\n Fade,\n utils,\n Button,\n} from \"react-bootstrap\";\nimport { FieldGroup } from \"../bootstrap/Forms.FieldGroup\";\nimport { ENDPOINTS } from \"../../constants/endpoints\";\nimport { formDataToJSON } from \"../../adukku_utils/array\";\n// import { placeholder } from '/svg/placeholder.svg'\nimport { authorized, Authorized } from \"../../adukku_utils/authorizeUser\";\nimport ThumbnailPreview from \"../../components/layouts/ThumbnailPreview\";\nexport default class ProductSetLayout extends React.Component {\n constructor(props) {\n super(props);\n this.showAssignLayoutOverlay = this.showAssignLayoutOverlay.bind(this);\n this.hideAssignLayoutOverlay = this.hideAssignLayoutOverlay.bind(this);\n this.onExpandToggle = this.onExpandToggle.bind(this);\n this.state = {\n supported_layouts: props.supported_layouts,\n setno: props.setno,\n product: props.product,\n pageno: props.pageno,\n layout: props.layout,\n overlay: props.overlay,\n overlay_id: props.overlay_id,\n show: false,\n role: props.role,\n product_role: props.product_role,\n };\n this._handleValidSubmit = this._handleValidSubmit.bind(this);\n }\n onExpandToggle(e) {\n e.preventDefault();\n e.stopPropagation();\n this.setState({ expand: !this.state.expand }); // TODO set from reducer\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (nextProps !== this.state) {\n this.setState(nextProps);\n }\n }\n\n componentDidMount() {\n let expandedProduct = localStorage.getItem(\"expandedProduct\");\n expandedProduct = expandedProduct ? JSON.parse(expandedProduct) : {};\n\n if (expandedProduct.layoutId && this.state.layout.id == expandedProduct.layoutId) {\n this.setState({\n expand: true,\n });\n }\n }\n\n showAssignLayoutOverlay(e) {\n e.preventDefault();\n e.stopPropagation();\n this.props.showOverlay(this.state.overlay_id);\n\n const product = this.state.product;\n const pageno = this.state.pageno;\n const setno = this.state.setno;\n this.props.getSupportedLayouts(product.id, {\n product_id: product.id,\n setno: setno,\n pageno: pageno,\n });\n }\n\n hideAssignLayoutOverlay(e) {\n e.preventDefault();\n e.stopPropagation();\n this.props.hideOverlay(this.state.overlay_id);\n }\n\n UNSAFE_componentWillMount() {\n const product = this.state.product;\n const pageno = this.state.pageno;\n const setno = this.state.setno;\n this.props.getSupportedLayouts(product.id, {\n product_id: product.id,\n setno: setno,\n pageno: pageno,\n });\n }\n\n _handleValidSubmit(e) {\n e.preventDefault();\n e.stopPropagation();\n\n const set_layout = this.state.layout;\n let info = set_layout.layout_id ? confirm(\"Are you sure, you want to Assign layout?\") : true;\n if (info) {\n let formData = formDataToJSON(new FormData(e.target));\n let endpoint = ENDPOINTS[\"sets\"][\"layout_create\"];\n let url = endpoint.uri;\n let method = endpoint.method;\n this.props.createSetLayout(url, method, formData);\n this.props.hideOverlay(this.state.overlay_id);\n }\n }\n\n _handleUnAssignSetLayout(e, pageno) {\n if (confirm(\"Are you sure you UnAssign the layout?\")) {\n e.preventDefault();\n let endpoint = ENDPOINTS[\"sets\"][\"layout_delete\"];\n let url = endpoint.uri;\n let method = endpoint.method;\n let payload = {\n product_id: this.state.product.id,\n setno: this.state.setno,\n pageno: pageno,\n };\n this.props.deleteSetLayout(url, method, payload);\n }\n }\n\n render() {\n const { role, product_role } = this.state;\n const isVisible = this.state.overlay.visible;\n const product = this.state.product;\n const expand = this.state.expand;\n const set_layout = this.state.layout;\n const pageno = this.state.pageno;\n const layouts = this.state.supported_layouts;\n const setno = this.state.setno;\n let expandView = [];\n let formView = null;\n if (isVisible) {\n formView = (\n \n
    \n \n Assign Layout to Product Set\n \n \n {layouts.map((layout) => {\n if (layout.errors && layout.errors.length > 1) {\n for (let i = 0; i < layout.errors.length; i++) {\n alert(\"For layout \" + layout.desc + \"\\nErrors: \" + layout.errors[i]);\n }\n }\n })}\n {\n this.setState({ [name]: value });\n }}\n value={this.state.category}\n required=\"required\"\n >\n \n {layouts.map((layout) => (\n \n {layout.errors && layout.errors.length == 0 && (\n \n )}\n \n ))}\n \n \n \n \n \n \n \n {/* */}\n \n
    \n
    \n );\n }\n\n if (set_layout.layout_id) {\n let t = (\n
  • \n {\"Page No \" + pageno + \" - \" + set_layout.layout_name}\n \n {\n e.stopPropagation();\n e.preventDefault();\n let expandedProduct = {\n productId: product.id,\n layoutId: set_layout.layout_id,\n setNo: setno,\n isSet: true,\n };\n localStorage.setItem(\"expandedProduct\", JSON.stringify(expandedProduct));\n window.location = \"/products/\" + product.id + \"/layouts/\" + set_layout.layout_id;\n }}\n // href={\n // \"/products/\" +\n // product.id +\n // \"/layouts/\" +\n // set_layout.layout_id\n // }\n style={{ paddingLeft: \"15px\" }}\n // target=\"_blank\"\n >\n \n \n this._handleUnAssignSetLayout(e, pageno)}\n style={{ paddingLeft: \"15px\" }}\n >\n \n \n \n \n \n \n
    \n this.setState({ show: true })}\n style={{\n height: \"60px\",\n margin: \"10px 0\",\n boxShadow: \"5px 5px 10px rgba(0,0,0,.5)\",\n cursor: \"pointer\",\n }}\n src={`${set_layout.preview_url}?${new Date()}`}\n />\n {this.state.show && (\n this.setState({ show: false })}\n />\n )}\n
    \n
  • \n );\n expandView.push(t);\n } else {\n if (authorized([\"admin\", \"owner\"], [role, product_role], \"ANY\")) {\n expandView.push(\n
  • \n Page No {pageno}\n \n \n \n \n \n \n \n \n \n \n \n {/* */}\n
  • \n );\n }\n }\n return (\n \n {expandView}\n {formView}\n \n );\n }\n}\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport ProductSetContainer from \"../../containers/product_sets/ProductSetContainer\";\nimport AddSetContainer from \"../../containers/product_sets/AddProductSetContainer\";\nimport { authorized, Authorized } from \"../../adukku_utils/authorizeUser\";\n\nexport default class ProductSetList extends React.Component {\n constructor(props) {\n super(props);\n this.state = { ...props };\n }\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (nextProps !== this.state) {\n this.setState(nextProps);\n }\n }\n UNSAFE_componentWillMount() {\n this.props.getSets(this.state.product.id);\n this.props.getKeys(this.state.product.id);\n\n // let user_role = document.getElementById(\"user_role\");\n // user_role = user_role.innerHTML;\n // this.setState({ role: user_role });\n }\n\n render() {\n const { role, product_role } = this.state;\n const product_sets = this.state.product_sets;\n const product = this.state.product;\n if (product_sets == null) {\n return null;\n }\n return (\n
      \n {Object.keys(product_sets).map((k, i) => {\n let product_set = product_sets[k];\n let props = { ...product_set };\n props.product = product;\n return (\n \n );\n })}\n\n \n \n \n
    \n );\n }\n}\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport BaseSelect from \"react-select\";\n\nconst noop = () => {\n // no operation (do nothing real quick)\n};\n\nclass FixRequiredSelect extends React.Component {\n state = {\n value: this.props.value || \"\",\n };\n\n selectRef = null;\n setSelectRef = (ref) => {\n this.selectRef = ref;\n };\n\n onChange = (value, actionMeta) => {\n this.props.onChange(value, actionMeta);\n this.setState({ value });\n };\n\n getValue = () => {\n if (this.props.value != undefined) return this.props.value;\n return this.state.value || \"\";\n };\n\n render() {\n const { SelectComponent, required, ...props } = this.props;\n const { isLoading, isDisabled } = this.props;\n const enableRequired = !isDisabled;\n\n return (\n
    \n \n {enableRequired && (\n this.selectRef.focus()}\n required={required}\n />\n )}\n
    \n );\n }\n}\n\nFixRequiredSelect.defaultProps = {\n onChange: noop,\n};\n\nFixRequiredSelect.protoTypes = {\n // react-select component class (e.g. Select, Creatable, Async)\n selectComponent: PropTypes.func.isRequired,\n onChange: PropTypes.func,\n required: PropTypes.bool,\n};\n\nconst Select = (props) => (\n \n);\n\nexport default Select;\n","// extracted by mini-css-extract-plugin","import React, { Component } from \"react\";\nimport { TOGGLE_PRODUCT_EXPAND } from \"../../actions\";\nimport ViewProductSetListContainer from \"../../containers/view_products/ViewProductSetListContainer\";\n\nclass ViewProduct extends Component {\n constructor(props) {\n super(props);\n this.state = { ...props };\n }\n onExpandToggle = e => {\n e.stopPropagation();\n e.preventDefault();\n this.setState({ expand: !this.state.expand });\n this.props.toggleView({\n reducerKey: TOGGLE_PRODUCT_EXPAND,\n id: this.props.product.id\n });\n this.props.getSets(this.props.product.id);\n };\n\n componentDidUpdate(nextProps) {\n if (nextProps.product !== this.state.product) {\n this.setState({ product: nextProps.product });\n }\n }\n\n componentDidMount() {\n }\n\n render() {\n const product = this.state.product;\n const expand = this.state.expand;\n const readOnly = (\n \n {product.name}\n \n );\n let productSets = null;\n if (expand == true) {\n productSets = (\n
      \n
    • \n \n Product Sets\n \n \n
    • \n
    \n );\n }\n return (\n
  • \n {readOnly}\n {productSets}\n
  • \n );\n }\n}\n\nexport default ViewProduct;\n","import React, { Component } from \"react\";\nimport ViewProductContainer from \"../../containers/view_products/ViewProductContainer\";\n\nclass ViewProductList extends Component {\n componentDidUpdate(nextProps) {}\n\n componentDidMount() {\n this.props.getViewProducts();\n }\n\n render() {\n const products = this.props.products;\n const productList = products.length ? (\n products.map(product => {\n return (\n \n );\n })\n ) : (\n
    No Products
    \n );\n\n return (\n
    \n

    View Products

    \n
      {productList}
    \n
    \n );\n }\n}\n\nexport default ViewProductList;\n","import React from \"react\";\nimport LayoutContainer from \"../../containers/orders/LayoutContainer\"\n\nexport default class ViewProductSet extends React.Component {\n constructor(props) {\n super(props);\n let customState = { ...props };\n customState.expand = false;\n this.state = customState;\n }\n\n\n onExpandToggle = e => {\n e.preventDefault();\n e.stopPropagation();\n this.setState({ expand: !this.state.expand });\n };\n\n getExpandDetails(product, product_set) {\n let expandView = [];\n let t = [];\n for (let i = 1; i <= product.numpages; i++) {\n t.push(\n \n );\n }\n expandView.push(\n
  • \n Layouts
      {t}
    \n
  • \n );\n return expandView;\n }\n\n render() {\n const expand = this.state.expand;\n const setno = this.state.setno;\n const product = this.state.product;\n const product_set = this.state.product_set;\n return (\n
  • \n \n {setno}\n \n
      {expand ? this.getExpandDetails(product, product_set) : null}
    \n
  • \n );\n }\n}\n","import React, { Component } from \"react\";\nimport ViewProductSetContainer from \"../../containers/view_products/ViewProductSetContainer\";\n\nclass ViewProductSetList extends Component {\n\n render() {\n const product_sets = this.props.product_sets;\n const product = this.props.product;\n if (product_sets == null) {\n return null;\n }\n return (\n
      \n {Object.keys(product_sets).map((k, i) => {\n let product_set = product_sets[k];\n let props = { ...product_set };\n props.product = product;\n return (\n \n );\n })}\n
    \n );\n }\n}\n\nexport default ViewProductSetList;\n","export const ENDPOINTS = {\n events: {\n list: { method: \"GET\", uri: \"/api/events\" },\n create: { method: \"POST\", uri: \"/api/events\" },\n show: { method: \"GET\", uri: \"/api/events/:event_id\" },\n delete: { method: \"DELETE\", uri: \"/api/events/:event_id\" },\n update: { method: \"PUT\", uri: \"/api/events/:id\" },\n upload: { method: \"POST\", uri: \"/api/events\" },\n batch_status: { method: \"GET\", uri: \"/api/events?product_id=:product_id\" },\n },\n contributes: {\n list: { method: \"GET\", uri: \"/api/contributes\" },\n create: { method: \"POST\", uri: \"/api/contributes\" },\n show: { method: \"GET\", uri: \"/api/contributes/:event_id\" },\n delete: { method: \"DELETE\", uri: \"/api/contributes/:event_id\" },\n update: { method: \"PUT\", uri: \"/api/contributes/:event_id\" },\n },\n products: {\n list: { method: \"GET\", uri: \"/api/products\" },\n create: { method: \"POST\", uri: \"/api/products\" },\n update: { method: \"PUT\", uri: \"/api/products/\" },\n clone: { method: \"POST\", uri: \"/api/products/clone\" },\n view: { method: \"GET\", uri: \"/api/products/view\" },\n share: { method: \"POST\", uri: \"/api/products/share\" },\n add_user: { method: \"POST\", uri: \"/api/products/add_user\" },\n add_view_product_user: { method: \"POST\", uri: \"/api/products/add_view_product_user\" },\n get_view_product_user: { method: \"GET\", uri: \"/api/products/get_view_product_user\" },\n delete: { method: \"DELETE\", uri: \"/api/products/:id\" },\n presets: { method: \"GET\", uri: \"/api/products/presets\" },\n },\n datalevels: {\n list: { method: \"GET\", uri: \"/api/products/:id/datalevels\" },\n create: { method: \"POST\", uri: \"/api/products/\" },\n update: { method: \"PUT\", uri: \"/api/products/\" },\n delete: { method: \"DELETE\", uri: \"/api/products/\" },\n },\n attributes: {\n create: { method: \"POST\", uri: \"/api/products/\" },\n update: { method: \"PUT\", uri: \"/api/products/\" },\n delete: { method: \"DELETE\", uri: \"/api/products/\" },\n },\n keys: {\n list: { method: \"GET\", uri: \"/api/products/:product_id/keys\" },\n create: { method: \"POST\", uri: \"/api/products/:product_id/keys/:dlname\" },\n delete: { method: \"DELETE\", uri: \"/api/products/:product_id/keys/:dlname\" },\n },\n sets: {\n list: { method: \"GET\", uri: \"/api/products/:product_id/sets\" },\n placeholders: {\n method: \"GET\",\n uri: \"/api/products/:product_id/sets/:setno/placeholders\",\n },\n create: { method: \"POST\", uri: \"/api/products/:product_id/sets\" },\n delete: { method: \"DELETE\", uri: \"/api/products/:product_id/sets/:setno\" },\n update: { method: \"PUT\", uri: \"/api/products/:product_id/sets/:setno\" },\n create_key: {\n method: \"POST\",\n uri: \"/api/products/:product_id/sets/:setno/keys\",\n },\n update_key: {\n method: \"PUT\",\n uri: \"/api/products/:product_id/sets/:setno/keys/:keyname\",\n },\n create_dlval: {\n method: \"POST\",\n uri: \"/api/products/:product_id/sets/:setno/datalevels\",\n },\n update_dlval: {\n method: \"PUT\",\n uri: \"/api/products/:product_id/sets/:setno/datalevels/:pageno/:dlname\",\n },\n layout_create: {\n method: \"POST\",\n uri: \"/api/products/:product_id/sets/:setno/layouts\",\n },\n layout_update: {\n method: \"POST\",\n uri: \"/api/products/:product_id/sets/:setno/layouts/:pageno\",\n },\n layout_delete: {\n method: \"DELETE\",\n uri: \"/api/products/:product_id/sets/:setno/layouts/:pageno\",\n },\n layout_supported: {\n method: \"GET\",\n uri: \"/api/products/:product_id/sets/:setno/layouts/:pageno/supported\",\n },\n price: { method: \"GET\", uri: \"/api/products/:product_id/sets/price\" },\n counts: {\n create: {\n method: \"POST\",\n uri: \"/api/products/:product_id/sets/:setno/counts\",\n },\n update: {\n method: \"PUT\",\n uri: \"/api/products/:product_id/sets/:setno/counts/:dlname\",\n },\n delete: {\n method: \"DELETE\",\n uri: \"/api/products/:product_id/sets/:setno/counts/:dlname\",\n },\n },\n },\n layouts: {\n list: { method: \"GET\", uri: \"/api/layouts\" },\n create: { method: \"POST\", uri: \"/api/layouts\" },\n show: { method: \"GET\", uri: \"/api/layouts/:id\" },\n delete: { method: \"DELETE\", uri: \"/api/layouts/:id\" },\n update: { method: \"PUT\", uri: \"/api/layouts/:id\" },\n clone: { method: \"POST\", uri: \"/api/layouts/:id/clone\" },\n },\n layout_datalevels: {\n create: { method: \"post\", uri: \"/api/layouts/:layout_id/datalevels\" },\n delete: {\n method: \"delete\",\n uri: \"/api/layouts/:layout_id/datalevels/:dlname\",\n },\n },\n layout_datalevels_rel: {\n create: {\n method: \"post\",\n uri: \"/api/layouts/:layout_id/datalevel_relations\",\n },\n delete: {\n method: \"delete\",\n uri: \"/api/layouts/:layout_id/datalevel_relations/:pdlname/:cdlname\",\n },\n },\n layout_datalevels_keys: {\n create: {\n method: \"post\",\n uri: \"/api/layouts/:layout_id/datalevel_relations/:pdlname/:cdlname/keys\",\n },\n delete: {\n method: \"delete\",\n uri: \"/api/layouts/:layout_id/datalevel_relations/:pdlname/:cdlname/keys/:key\",\n },\n },\n layout_slotfors: {\n create: {\n method: \"post\",\n uri: \"/api/layouts/:layout_id/slotfors/:slotforcode\",\n },\n delete: {\n method: \"delete\",\n uri: \"/api/layouts/:layout_id/slotfors/:slotforcode/:dlname\",\n },\n delete_attribute: {\n method: \"delete\",\n uri: \"/api/layouts/:layout_id/slotfors/:slotforcode/:dlname/:attributename\",\n },\n },\n csv: {\n download: \"/api/products/:product_id/datalevels/:dlname/data/download\",\n upload: \"/api/products/:product_id/datalevels/:dlname/data/upload\",\n uploaded_data: \"/api/products/:product_id/datalevels/:dlname/data/uploaded_data\",\n list: {\n method: \"GET\",\n uri: \"/api/products/:product_id/datalevels/:dlname/data\",\n },\n\n update: {\n method: \"PATCH\",\n uri: \"/api/products/:product_id/datalevels/:dlname/data/:data_upload_id\",\n },\n create: {\n method: \"POST\",\n uri: \"/api/products/:product_id/datalevels/:dlname/data\",\n },\n delete: {\n method: \"DELETE\",\n uri: \"/api/products/:product_id/datalevels/:dlname/data/:data_upload_id\",\n },\n },\n audio: {\n upload: \"/api/products/audio/:product_id/:filename\",\n },\n images: {\n upload: \"/api/products/:product_id/datalevels/:dlname/images/upload\",\n generate: { method: \"POST\", uri: \"/api/products/generate\" },\n },\n orders: {\n products: { method: \"GET\", uri: \"/api/orders/products\" },\n create: { method: \"POST\", uri: \"/api/orders\" },\n capture: { method: \"POST\", uri: \"/api/orders/capture\" },\n show: { method: \"GET\", uri: \"/api/orders/:order_id\" },\n add_to_cart: { method: \"POST\", uri: \"/api/orders/add_to_cart\" },\n list: { method: \"GET\", uri: \"/api/orders\" },\n },\n categories: {\n index: { method: \"GET\", uri: \"/api/products/categories\" },\n },\n // Bala Add - final_files\n final_files: {\n index: { method: \"GET\", uri: \"api/final_files\" },\n },\n audio_files: {\n index: { method: \"GET\", uri: \"api/audio_files\" },\n },\n saveevent_image: {\n index: { method: \"POST\", uri: \"api/saveevent_image\" },\n },\n savecontribute_image: {\n index: { method: \"POST\", uri: \"api/savecontribute_image\" },\n },\n saveaudio_files: {\n index: { method: \"POST\", uri: \"api/saveaudio_files\" },\n },\n savecontribute_audio: {\n index: { method: \"POST\", uri: \"api/savecontribute_audio\" },\n },\n // Bala Add - mainDbRowCount\n maindbrowcountforaset: {\n index: { method: \"GET\", uri: \"api/maindbrowcountforaset\" },\n },\n // Bala Add - productkeyval\n productkeyval: {\n index: { method: \"GET\", uri: \"api/productkeyval\" },\n },\n // Bala Add - productsetcount\n productsetcount: {\n index: { method: \"GET\", uri: \"api/productsetcount\" },\n },\n files: {\n index: { method: \"GET\", uri: \"api/files\" },\n delete: { method: \"DELETE\", uri: \"api/files/:file_path\" },\n get: { method: \"GET\", uri: \"api/files/size\" },\n },\n user_storages: {\n create: { method: \"POST\", uri: \"/api/user_storages\" },\n capture: { method: \"POST\", uri: \"/api/user_storages/capture\" },\n show: { method: \"GET\", uri: \"/api/user_storages/:user_storage_id\" },\n update: { method: \"PUT\", uri: \"/api/user_storages/:user_storage_id\" },\n // add_to_cart: { method: \"POST\", uri: \"/api/orders/add_to_cart\" },\n list: { method: \"GET\", uri: \"/api/user_storages\" },\n update_defaults: { method: \"PUT\", uri: \"/api/user_storages/update_defaults\" },\n get_defaults: { method: \"GET\", uri: \"/api/user_storages/get_defaults\" },\n },\n user_events: {\n create: { method: \"POST\", uri: \"/api/user_events\" },\n capture: { method: \"POST\", uri: \"/api/user_events/capture\" },\n show: { method: \"GET\", uri: \"/api/user_events/:user_event_id\" },\n update: { method: \"PUT\", uri: \"/api/user_events/:user_event_id\" },\n // add_to_cart: { method: \"POST\", uri: \"/api/orders/add_to_cart\" },\n list: { method: \"GET\", uri: \"/api/user_events\" },\n update_defaults: { method: \"PUT\", uri: \"/api/user_events/update_defaults\" },\n get_defaults: { method: \"GET\", uri: \"/api/user_events/get_defaults\" },\n },\n};\n ","import { connect } from \"react-redux\";\nimport { createProduct, getCategories } from \"../actions\";\nimport { hideOverlay, showOverlay } from \"../actions/misc_actions\";\nimport AddProduct from \"../components/AddProduct\";\nimport { bindActionCreators } from \"redux\";\n\nconst mapStateToProps = (state, ownProps) => {\n return Object.assign({}, ownProps, {\n overlay: state.overlays[\"addProduct\"] || { visible: false },\n categories: state.categories.categories || [],\n sub_categories: state.categories.sub_categories || [],\n });\n};\nconst mapDispatchToProps = (dispatch) =>\n bindActionCreators(\n {\n createProduct,\n hideOverlay,\n showOverlay,\n getCategories,\n },\n dispatch\n );\n\nconst AddProductContainer = connect(\n mapStateToProps,\n mapDispatchToProps\n)(AddProduct);\n\nexport default AddProductContainer;\n","import { connect } from 'react-redux';\nimport AddUser from \"../components/AddUser\";\nimport { bindActionCreators } from 'redux';\nimport { productUser } from \"../actions\";\nimport { addViewProductUser } from \"../actions\";\nimport { getViewProductUser } from \"../actions\";\n\nconst mapStateToProps = (state, ownProps) => {\n return Object.assign({}, {}, ownProps);\n};\nconst mapDispatchToProps = dispatch =>\n bindActionCreators(\n {\n productUser,\n addViewProductUser,\n getViewProductUser,\n },\n dispatch\n );\n\nconst AddUserContainer = connect(\n mapStateToProps,\n mapDispatchToProps\n)(AddUser);\n\nexport default AddUserContainer;","import { connect } from \"react-redux\";\nimport { createProduct, getCategories } from \"../actions\";\nimport { hideOverlay, showOverlay } from \"../actions/misc_actions\";\nimport Admin from \"../components/Admin/Admin\";\nimport { bindActionCreators } from \"redux\";\n\nconst mapStateToProps = (state, ownProps) => {\n return Object.assign({}, ownProps, {\n overlay: state.overlays[\"addProduct\"] || { visible: false },\n categories: state.categories,\n });\n};\nconst mapDispatchToProps = (dispatch) =>\n bindActionCreators(\n {\n createProduct,\n hideOverlay,\n showOverlay,\n getCategories,\n },\n dispatch\n );\n\nconst AdminContainer = connect(mapStateToProps, mapDispatchToProps)(Admin);\n\nexport default AdminContainer;\n","import { connect } from \"react-redux\";\r\nimport { bindActionCreators } from \"redux\";\r\nimport { createSelector } from \"reselect\";\r\nimport EditProductData from \"../components/EditProductData\";\r\n\r\nimport { getUploadedData, updateUploadedData, getProducts } from \"../actions\";\r\n\r\nconst mapStateToProps = (state, ownProps) => {\r\n const product = state.products.filter(p => p.id == ownProps.product_id)[0];\r\n const main_dl = state.product_datalevels.find(pdl => pdl.dltype === \"main\");\r\n const main_dlname = main_dl && main_dl.dlname;\r\n const dlname = ownProps.dlname;\r\n const product_id = ownProps.product_id;\r\n const uploaded_data = product.uploaded_data;\r\n const product_keys =\r\n (state.product_keys[ownProps.product_id] || {})[main_dlname] || [];\r\n return Object.assign(\r\n {},\r\n {},\r\n {\r\n product: product,\r\n product_id: product_id,\r\n dlname: dlname,\r\n uploaded_data: uploaded_data,\r\n product_keys: product_keys\r\n }\r\n );\r\n};\r\n\r\nconst mapDispatchToProps = dispatch =>\r\n bindActionCreators(\r\n {\r\n getProducts,\r\n getUploadedData,\r\n updateUploadedData\r\n },\r\n dispatch\r\n );\r\n\r\nconst EditProductDataContainer = connect(\r\n mapStateToProps,\r\n mapDispatchToProps\r\n)(EditProductData);\r\n\r\nexport default EditProductDataContainer;\r\n","import { connect } from \"react-redux\";\nimport { createProduct, getCategories } from \"../actions\";\nimport { hideOverlay, showOverlay } from \"../actions/misc_actions\";\nimport FileManager from \"../components/FileManager/FileManager\";\nimport { bindActionCreators } from \"redux\";\n\nconst mapStateToProps = (state, ownProps) => {\n return Object.assign({}, ownProps, {\n overlay: state.overlays[\"addProduct\"] || { visible: false },\n categories: state.categories,\n });\n};\nconst mapDispatchToProps = (dispatch) =>\n bindActionCreators(\n {\n createProduct,\n hideOverlay,\n showOverlay,\n getCategories,\n },\n dispatch\n );\n\nconst FileManagerContainer = connect(\n mapStateToProps,\n mapDispatchToProps\n)(FileManager);\n\nexport default FileManagerContainer;\n","import { connect } from \"react-redux\";\nimport Product from \"../components/Product\";\nimport {\n getProductDatalevels,\n toggleView,\n newProductDatalevel,\n updateProduct,\n deleteProduct,\n cloneProduct,\n} from \"../actions\";\nimport { bindActionCreators } from \"redux\";\nimport { createSelector } from \"reselect\";\nimport { getSets } from \"../actions/product_sets\";\nimport { getKeys } from \"../actions/product_keys\";\nimport { getOrders } from \"../actions/orders\";\n\nconst dlSelector = createSelector(\n [(state) => state.id, (state) => state.datalevels],\n (product_id, datalevels) => {\n return datalevels.filter((datalevel) => datalevel.product_id == product_id);\n }\n);\n\nconst mapStateToProps = (state, ownProps) => {\n let datalevels = state.product_datalevels;\n let product = state.products.filter((p) => p.id == ownProps.id)[0];\n const collapse = product.collapse == null ? false : product.collapse;\n const isEdit = product.isEdit == null ? false : product.isEdit;\n datalevels = dlSelector(Object.assign({}, { id: product.id }, { datalevels: datalevels }));\n return Object.assign(\n {},\n {},\n {\n product: product,\n product_datalevels: datalevels,\n collapse: collapse,\n isEdit: isEdit,\n role: ownProps.role,\n categories: state.categories,\n }\n );\n};\n\nconst mapDispatchToProps = (dispatch) =>\n bindActionCreators(\n {\n getProductDatalevels,\n toggleView,\n newProductDatalevel,\n getSets,\n getKeys,\n updateProduct,\n deleteProduct,\n cloneProduct,\n getOrders,\n },\n dispatch\n );\n\nconst ProductContainer = connect(mapStateToProps, mapDispatchToProps)(Product);\n\nexport default ProductContainer;\n","import { connect } from \"react-redux\";\nimport ProductDLAttr from \"../components/ProductDLAttr\";\nimport {\n toggleView,\n deleteDataLevelAttribute,\n createDataLevelAttribute\n} from \"../actions\";\nimport { bindActionCreators } from \"redux\";\n\nconst mapStateToProps = (state, ownProps) => {\n return { attribute: ownProps };\n};\n\nconst mapDispatchToProps = dispatch =>\n bindActionCreators(\n {\n toggleView,\n deleteDataLevelAttribute,\n createDataLevelAttribute\n },\n dispatch\n );\n\nconst ProductDLAttrContainer = connect(\n mapStateToProps,\n mapDispatchToProps\n)(ProductDLAttr);\n\nexport default ProductDLAttrContainer;\n","import { connect } from \"react-redux\";\nimport { getProducts } from \"../actions\";\nimport ProductDL from \"../components/ProductDL\";\nimport { bindActionCreators } from \"redux\";\nimport {\n toggleView,\n deleteProductDataLevel,\n createProductDatalevel,\n newDatalevelAttribute,\n} from \"../actions\";\n\nconst mapStateToProps = (state, ownProps) => {\n // read state.datalevel_attributes and return product specific ones\n let product = state.products.filter((p) => p.id == ownProps.id)[0];\n let product_role = product && product.product_role;\n let role = ownProps.role;\n let datalevel = state.product_datalevels.filter(\n (dl) => dl.product_id == ownProps.product_id && dl.dlname == ownProps.dlname\n )[0];\n const collapse = datalevel.collapse == null ? false : datalevel.collapse;\n return {\n product_datalevel: datalevel,\n collapse: collapse,\n role: role,\n product_role: product_role,\n };\n};\nconst mapDispatchToProps = (dispatch) =>\n bindActionCreators(\n {\n deleteProductDataLevel,\n toggleView,\n newDatalevelAttribute,\n createProductDatalevel,\n },\n dispatch\n );\n\nconst ProductContainer = connect(mapStateToProps, mapDispatchToProps)(ProductDL);\nexport default ProductContainer;\n","import { connect } from \"react-redux\";\nimport { bindActionCreators } from \"redux\";\nimport { createSelector } from \"reselect\";\nimport ProductData from \"../components/ProductData\";\n\nconst mapStateToProps = (state, ownProps) => {\n const product = state.products.filter((p) => p.id == ownProps.product_id)[0];\n const datalevels = state.product_datalevels.filter((dl) => dl.product_id == ownProps.product_id);\n return Object.assign({}, {}, { product: product, product_datalevels: datalevels });\n};\n\nconst mapDispatchToProps = (dispatch) => bindActionCreators({}, dispatch);\n\nconst ProductDataContainer = connect(mapStateToProps, mapDispatchToProps)(ProductData);\n\nexport default ProductDataContainer;\n","import { connect } from 'react-redux'\nimport {bindActionCreators} from 'redux';\nimport { createSelector } from 'reselect'\nimport ProductImageUpload from '../components/ProductImageUpload'\n\nconst mapStateToProps = (state, ownProps) => {\n const product = state.products.filter(p => p.id == ownProps.product_id)[0];\n const datalevels = state.product_datalevels.filter(dl => dl.product_id == ownProps.product_id);\n return Object.assign({}, {}, {product: product, product_datalevels: datalevels});\n};\n\nconst mapDispatchToProps = (dispatch) =>bindActionCreators({\n\n},dispatch);\n\nconst ProductImageUploadContainer = connect(mapStateToProps, mapDispatchToProps)(ProductImageUpload);\n\nexport default ProductImageUploadContainer;","import { connect } from \"react-redux\";\nimport ProductLayoutList from \"../components/ProductLayoutList\";\nimport { bindActionCreators } from \"redux\";\n\nconst mapStateToProps = (state, ownProps) => {\n const product = state.products.filter((p) => p.id == ownProps.product_id)[0];\n return Object.assign({}, ownProps, { product: product });\n};\n\nconst mapDispatchToProps = (dispatch) => bindActionCreators({}, dispatch);\n\nconst ProductContainer = connect(\n mapStateToProps,\n mapDispatchToProps\n)(ProductLayoutList);\n\nexport default ProductContainer;\n","import {connect} from 'react-redux'\nimport {getProducts} from '../actions'\nimport ProductList from '../components/ProductList'\nimport {bindActionCreators} from 'redux';\n\n\nconst mapStateToProps = (state, ownProps) => {\n const products = state.products;\n return {products: products}\n};\n\nconst mapDispatchToProps = (dispatch) =>bindActionCreators({\n getProducts\n},dispatch);\n\nconst ProductListContainer = connect(mapStateToProps, mapDispatchToProps)(ProductList);\n\nexport default ProductListContainer","import { connect } from \"react-redux\";\nimport { createProduct, getCategories } from \"../actions\";\nimport { hideOverlay, showOverlay } from \"../actions/misc_actions\";\nimport UserStorage from \"../components/UserStorage/UserStorage\";\nimport { bindActionCreators } from \"redux\";\n\nconst mapStateToProps = (state, ownProps) => {\n return Object.assign({}, ownProps, {\n overlay: state.overlays[\"addProduct\"] || { visible: false },\n categories: state.categories,\n });\n};\nconst mapDispatchToProps = (dispatch) =>\n bindActionCreators(\n {\n createProduct,\n hideOverlay,\n showOverlay,\n getCategories,\n },\n dispatch\n );\n\nconst UserStorageContainer = connect(\n mapStateToProps,\n mapDispatchToProps\n)(UserStorage);\n\nexport default UserStorageContainer;\n","import { connect } from \"react-redux\";\nimport Cart from \"../../components/cart/Cart\";\nimport { toggleView } from \"../../actions\";\nimport { getSets } from \"../../actions/product_sets\";\nimport { bindActionCreators } from \"redux\";\nimport { getPrice, addToCart, getOrders } from \"../../actions/orders\";\n\nconst mapStateToProps = (state, ownProps) => {\n let product = state.products.filter((p) => p.id == ownProps.product_id)[0];\n let cart_product = null;\n let carts = state.carts || (state.orders && state.orders.carts);\n if (carts && carts.length > 0)\n cart_product = carts && carts.find((c) => c.product_id == ownProps.product_id);\n const expand = product.expand == null ? false : product.expand;\n return Object.assign(\n {},\n {},\n {\n product: product,\n expand: expand,\n cart_product: cart_product,\n product_sets: (product && product.product_sets) || [],\n }\n );\n};\n\nconst mapDispatchToProps = (dispatch) =>\n bindActionCreators(\n {\n getSets,\n toggleView,\n getPrice,\n addToCart,\n getOrders,\n },\n dispatch\n );\n\nconst CartContainer = connect(mapStateToProps, mapDispatchToProps)(Cart);\n\nexport default CartContainer;\n","import { connect } from \"react-redux\";\nimport CartList from \"../../components/cart/CartList\";\nimport { getOrders, get } from \"../../actions/orders\";\n\nimport { getProducts } from \"../../actions\";\nimport { bindActionCreators } from \"redux\";\n\nconst mapStateToProps = (state) => {\n return {\n carts: state.carts,\n products: state.products,\n };\n};\n\nconst mapDispatchToProps = (dispatch) =>\n bindActionCreators(\n {\n getOrders,\n getProducts,\n },\n dispatch\n );\n\nconst CartListContainer = connect(mapStateToProps, mapDispatchToProps)(CartList);\n\nexport default CartListContainer;\n","import { connect } from 'react-redux'\nimport {bindActionCreators} from 'redux';\nimport AddLayout from '../../components/layouts/AddLayout';\nimport { createLayout } from '../../actions/layouts';\nimport {\n hideOverlay\n ,showOverlay\n} from '../../actions/misc_actions'\n\nconst mapStateToProps = (state, ownProps) => {\n let overlay_id = ownProps.product_id+\"/layouts\";\n return Object.assign({}, ownProps, {overlay_id: overlay_id, overlay: (state.overlays[overlay_id] || { visible: false }) });\n};\n\nconst mapDispatchToProps = (dispatch) =>bindActionCreators({\n createLayout,\n hideOverlay,\n showOverlay\n}, dispatch);\n\nconst AddLayoutContainer = connect(mapStateToProps, mapDispatchToProps)(AddLayout);\n\nexport default AddLayoutContainer;","import { connect } from \"react-redux\";\nimport LayoutComponent from \"../../components/layouts/Layout\";\nimport { bindActionCreators } from \"redux\";\nimport { getLayoutDetails } from \"../../actions/layouts\";\nimport { deleteLayout, cloneLayout, updateLayout } from \"../../actions/layouts\";\n\nconst mapStateToProps = (state, ownProps) => {\n const product = state.products.filter((p) => p.id == ownProps.product_id)[0];\n const layout = state.layouts.filter((p) => p.id == ownProps.layout_id)[0];\n return Object.assign({}, ownProps, { layout: layout, product: product });\n};\n\nconst mapDispatchToProps = (dispatch) =>\n bindActionCreators(\n {\n getLayoutDetails,\n deleteLayout,\n cloneLayout,\n updateLayout,\n },\n dispatch\n );\n\nconst LayoutContainer = connect(\n mapStateToProps,\n mapDispatchToProps\n)(LayoutComponent);\n\nexport default LayoutContainer;\n","import { connect } from \"react-redux\";\nimport LayoutListComponent from \"../../components/layouts/LayoutList\";\nimport { bindActionCreators } from \"redux\";\nimport { getLayouts } from \"../../actions/layouts\";\n\nconst mapStateToProps = (state, ownProps) => {\n const product = state.products.filter((p) => p.id == ownProps.product_id)[0];\n const layouts = state.layouts.filter(\n (p) => p.product_id == ownProps.product_id\n );\n return Object.assign({}, ownProps, { layouts: layouts, product: product });\n};\n\nconst mapDispatchToProps = (dispatch) =>\n bindActionCreators(\n {\n getLayouts,\n },\n dispatch\n );\n\nconst LayoutListContainer = connect(\n mapStateToProps,\n mapDispatchToProps\n)(LayoutListComponent);\n\nexport default LayoutListContainer;\n","import { connect } from 'react-redux'\nimport LyDl from '../../../components/layouts/lydl/LyDl';\nimport { getLyDatalevels } from '../../../actions/layouts';\n\nimport {bindActionCreators} from 'redux';\nconst mapStateToProps = (state, ownProps) => {\n const layouts = state.layouts.filter(p => p.id == ownProps.layout_id);\n const layout = layouts.filter(p => p.id == ownProps.layout_id)[0];\n let layout_datalevel = layout.datalevels.filter(dl => dl.layout_id == ownProps.layout_id && dl.dlname == ownProps.dlname)[0];\n return Object.assign({}, ownProps, {layout: layout, layout_datalevel: layout_datalevel });\n};\n\nconst mapDispatchToProps = (dispatch) =>bindActionCreators({\n},dispatch);\n\nconst LyDlContainer = connect(mapStateToProps, mapDispatchToProps)(LyDl);\n\nexport default LyDlContainer;","import { connect } from 'react-redux'\nimport LyDlList from '../../../components/layouts/lydl/LyDlList';\nimport { getLayoutDetails } from '../../../actions/layouts';\n\nimport {bindActionCreators} from 'redux';\nconst mapStateToProps = (state, ownProps) => {\n const product = state.products.filter(p => p.id == ownProps.product_id)[0];\n const layout = state.layouts.filter(p => p.id == ownProps.layout_id)[0];\n // let product_datalevels = state.product_datalevels.filter(dl => dl.product_id == ownProps.product_id);\n // let layout_datalevels = layout.layout_datalevels.filter(dl => dl.layout_id == ownProps.layout_id);\n return Object.assign({}, ownProps, {layout: layout, product: product });\n};\n\nconst mapDispatchToProps = (dispatch) =>bindActionCreators({\n getLayoutDetails\n},dispatch);\n\nconst LyDlListContainer = connect(mapStateToProps, mapDispatchToProps)(LyDlList);\n\nexport default LyDlListContainer;","import { connect } from 'react-redux';\nimport ManageLyDl from '../../../components/layouts/lydl/ManageLyDl';\nimport {\n hideOverlay\n ,showOverlay\n ,expandSection\n ,hideSection\n} from '../../../actions/misc_actions';\n\nimport {\n deleteLyDL\n ,createLyDL\n} from '../../../actions/layouts';\n\nimport {bindActionCreators} from 'redux';\nconst mapStateToProps = (state, ownProps) => {\n const product = state.products.filter( p => p.id == ownProps.product_id)[0];\n const layout = state.layouts.filter(l => l.id == ownProps.layout_id)[0];\n const layout_datalevels = layout.datalevels || [];\n const product_datalevels = state.product_datalevels.filter(dl => dl.product_id == ownProps.product_id);\n let datalevels = product_datalevels.map(dl => {\n let t = layout_datalevels.filter(ld => ld.dlname == dl.dlname)[0];\n return Object.assign({}, dl, { saved: (t != null)});\n });\n return Object.assign({}, ownProps, {layout: layout, datalevels: datalevels, product: product });\n};\n\nconst mapDispatchToProps = (dispatch) =>bindActionCreators({\n hideOverlay\n ,showOverlay\n ,hideSection\n ,expandSection\n ,deleteLyDL\n ,createLyDL\n},dispatch);\n\nconst ManageLyDlContainer = connect(mapStateToProps, mapDispatchToProps)(ManageLyDl);\n\nexport default ManageLyDlContainer;","import { connect } from \"react-redux\";\nimport AddLyDlRel from \"../../../components/layouts/lydlrel/AddLyDlRel\";\nimport { createLyDLRel } from \"../../../actions/layouts\";\n\nimport { bindActionCreators } from \"redux\";\nconst mapStateToProps = (state, ownProps) => {\n const product = state.products.filter((p) => p.id == ownProps.product_id)[0];\n const layout = state.layouts.filter((p) => p.id == ownProps.layout_id)[0];\n let product_datalevels = state.product_datalevels.filter(\n (dl) => dl.product_id == ownProps.product_id\n );\n let product_keys = state.product_keys[ownProps.product_id] || {} || [];\n product_keys = [].concat(...Object.values(product_keys));\n let product_key_attrs = product_keys.map((k) => k.attribute);\n let layout_rel_dls = layout.datalevel_relations.filter((rel) => rel.style == \"P\");\n let left_dls = product_datalevels.filter((dl) => {\n let filteredList = dl.attributes.filter((attr) => {\n return product_key_attrs.indexOf(attr.name) != -1;\n });\n return filteredList.length == product_keys.length;\n });\n let right_dls = [];\n if (ownProps.type == \"product_key\") {\n right_dls = left_dls;\n } else {\n left_dls = left_dls.filter((dl) => {\n return layout_rel_dls.map((rel) => rel.pdlname).indexOf(dl.dlname) != -1;\n });\n right_dls = product_datalevels.filter((dl) => {\n let filteredList = dl.attributes.filter((attr) => {\n return product_key_attrs.indexOf(attr.name) != -1;\n });\n return filteredList.length != product_keys.length;\n });\n }\n if (ownProps.type != \"product_key\") {\n left_dls = left_dls.filter((dl) => {\n let currentAttr = dl.attributes;\n let isCommonAttr = false;\n right_dls.forEach((rDl) => {\n let currentRightAttr = rDl.attributes;\n let result = currentAttr.filter((o) => currentRightAttr.some((m) => o.name === m.name));\n if (result.length > 0) {\n isCommonAttr = true;\n }\n });\n if (isCommonAttr) {\n return dl;\n }\n });\n }\n return Object.assign({}, ownProps, {\n layout: layout,\n product: product,\n product_datalevels: product_datalevels,\n left_dls: left_dls,\n right_dls: right_dls,\n });\n};\n\nconst mapDispatchToProps = (dispatch) =>\n bindActionCreators(\n {\n createLyDLRel,\n },\n dispatch\n );\n\nconst AddLyDlRelContainer = connect(mapStateToProps, mapDispatchToProps)(AddLyDlRel);\n\nexport default AddLyDlRelContainer;\n","import { connect } from 'react-redux'\nimport AddLyDlRelKey from '../../../components/layouts/lydlrel/AddLyDlRelKey';\nimport {bindActionCreators} from 'redux';\nimport unique from 'array-unique';\nimport { createLyDLRelKey } from '../../../actions/layouts';\n\nconst mapStateToProps = (state, ownProps) => {\n const product = state.products.filter(p => p.id == ownProps.product_id)[0];\n const layout = state.layouts.filter(p => p.id == ownProps.layout_id)[0];\n let dlRel = layout.datalevel_relations.filter(rel => rel.id == ownProps.dlrel_id)[0];\n // Common attributes\n let attributes = [];\n let pdl = state.product_datalevels.filter(dl => dl.product_id == ownProps.product_id && dl.dlname == dlRel.pdlname)[0];\n let cdl = state.product_datalevels.filter(dl => dl.product_id == ownProps.product_id && dl.dlname == dlRel.cdlname)[0];\n attributes = attributes.concat(pdl.attributes).concat(cdl.attributes);\n attributes = attributes.reduce((attributeResult, attribute) => {\n attributeResult.push(attribute.name);\n return attributeResult;\n }, []);\n attributes = attributes.reduce(function(acc, el, i, arr) {\n if (arr.indexOf(el) !== i && acc.indexOf(el) < 0) acc.push(el); return acc;\n }, []);\n\n let product_keys = ((state.product_keys[ownProps.product_id] || {}) || []);\n product_keys = [].concat(...Object.values(product_keys));\n attributes = unique(attributes);\n let product_key_attrs = product_keys.map(k => k.attribute);\n\n if(dlRel.style == 'P')\n attributes = attributes.filter(attr => product_key_attrs.indexOf(attr) != -1)\n\n return Object.assign({}, ownProps, {layout: layout, product: product, dlRel: dlRel, attributes: unique(attributes) });\n};\n\nconst mapDispatchToProps = (dispatch) =>bindActionCreators({\n createLyDLRelKey\n},dispatch);\n\nconst AddLyDlRelKeyContainer = connect(mapStateToProps, mapDispatchToProps)(AddLyDlRelKey);\n\nexport default AddLyDlRelKeyContainer;","import { connect } from 'react-redux'\nimport EditLyDlRel from '../../../components/layouts/lydlrel/EditLyDlRel';\n\nimport {bindActionCreators} from 'redux';\nconst mapStateToProps = (state, ownProps) => {\n const product = state.products.filter(p => p.id == ownProps.product_id)[0];\n const layout = state.layouts.filter(p => p.id == ownProps.layout_id)[0];\n let dlRel = layout.datalevel_relations.filter(dlrel => dlrel.id == ownProps.dlrel_id)[0] || {};\n let product_datalevels = state.product_datalevels.filter(dl => dl.product_id == ownProps.product_id);\n return Object.assign({}, ownProps, {layout: layout, dlRel: dlRel, product: product, product_datalevels: product_datalevels });\n};\n\nconst mapDispatchToProps = (dispatch) =>bindActionCreators({\n},dispatch);\n\nconst EditLyDlRelContainer = connect(mapStateToProps, mapDispatchToProps)(EditLyDlRel);\n\nexport default EditLyDlRelContainer;","import { connect } from 'react-redux'\nimport EditLyDlRelKey from '../../../components/layouts/lydlrel/EditLyDlRelKey';\n\nimport {bindActionCreators} from 'redux';\nconst mapStateToProps = (state, ownProps) => {\n const product = state.products.filter(p => p.id == ownProps.product_id)[0];\n const layout = state.layouts.filter(p => p.id == ownProps.layout_id)[0];\n let dlRel = layout.datalevel_relations.filter(dlrel => dlrel.id == ownProps.dlrel_id)[0];\n let dlRelKey = dlRel.datalevel_relation_keys.filter(key => key.id == ownProps.dlrelkey_id)[0];\n return Object.assign({}, ownProps, {layout: layout, dlRel: dlRel, product: product, dlRelKey: dlRelKey });\n};\n\nconst mapDispatchToProps = (dispatch) =>bindActionCreators({\n},dispatch);\n\nconst EditLyDlRelKeyContainer = connect(mapStateToProps, mapDispatchToProps)(EditLyDlRelKey);\n\nexport default EditLyDlRelKeyContainer;","import { connect } from 'react-redux'\nimport EditLyDlRelList from '../../../components/layouts/lydlrel/EditLyDlRelList';\nimport {\n hideOverlay\n ,showOverlay\n} from '../../../actions/misc_actions';\nimport { createLyDLRel, deleteLyDLRel } from '../../../actions/layouts';\n\n\nimport {bindActionCreators} from 'redux';\nconst mapStateToProps = (state, ownProps) => {\n const product = state.products.filter(p => p.id == ownProps.product_id)[0];\n const layout = state.layouts.filter(p => p.id == ownProps.layout_id)[0];\n let product_datalevels = state.product_datalevels.filter(dl => dl.product_id == ownProps.product_id);\n // let layout_datalevels = layout.layout_datalevels.filter(dl => dl.layout_id == ownProps.layout_id);\n return Object.assign({}, ownProps, {isAddVisible: false, layout: layout, product: product, product_datalevels: product_datalevels });\n};\n\nconst mapDispatchToProps = (dispatch) =>bindActionCreators({\n hideOverlay\n ,showOverlay\n ,createLyDLRel\n ,deleteLyDLRel\n},dispatch);\n\nconst EditLyDlRelListContainer = connect(mapStateToProps, mapDispatchToProps)(EditLyDlRelList);\n\nexport default EditLyDlRelListContainer;","import { connect } from 'react-redux'\nimport LyDlRel from '../../../components/layouts/lydlrel/LyDlRel';\nimport { deleteLyDLRel } from '../../../actions/layouts';\n\nimport {bindActionCreators} from 'redux';\nconst mapStateToProps = (state, ownProps) => {\n const product = state.products.filter(p => p.id == ownProps.product_id)[0];\n const layout = state.layouts.filter(p => p.id == ownProps.layout_id)[0];\n let dlRel = layout.datalevel_relations.filter(dlrel => dlrel.id == ownProps.dlrel_id)[0];\n return Object.assign({}, ownProps, {layout: layout, dlRel: dlRel, product: product });\n};\n\nconst mapDispatchToProps = (dispatch) =>bindActionCreators({\n deleteLyDLRel\n},dispatch);\n\nconst LyDlRelContainer = connect(mapStateToProps, mapDispatchToProps)(LyDlRel);\n\nexport default LyDlRelContainer;","import { connect } from 'react-redux'\nimport LyDlRelKey from '../../../components/layouts/lydlrel/LyDlRelKey';\nimport { deleteLyDLRelKey } from '../../../actions/layouts';\n\nimport {bindActionCreators} from 'redux';\nconst mapStateToProps = (state, ownProps) => {\n const product = state.products.filter(p => p.id == ownProps.product_id)[0];\n const layout = state.layouts.filter(p => p.id == ownProps.layout_id)[0];\n let dlRel = layout.datalevel_relations.filter(dlrel => dlrel.id == ownProps.dlrel_id)[0];\n let dlRelKey = dlRel.datalevel_relation_keys.filter(key => key.id == ownProps.dlrelkey_id)[0];\n return Object.assign({}, ownProps, {layout: layout, dlRel: dlRel, product: product, dlRelKey: dlRelKey });\n};\n\nconst mapDispatchToProps = (dispatch) =>bindActionCreators({\n deleteLyDLRelKey\n},dispatch);\n\nconst LyDlRelKeyContainer = connect(mapStateToProps, mapDispatchToProps)(LyDlRelKey);\n\nexport default LyDlRelKeyContainer;","import { connect } from 'react-redux'\nimport LyDlRelKeyList from '../../../components/layouts/lydlrel/LyDlRelKeyList';\n\nimport {bindActionCreators} from 'redux';\nconst mapStateToProps = (state, ownProps) => {\n const product = state.products.filter(p => p.id == ownProps.product_id)[0];\n const layout = state.layouts.filter(p => p.id == ownProps.layout_id)[0];\n let dlRel = layout.datalevel_relations.filter(rel => rel.id == ownProps.dlrel_id)[0];\n return Object.assign({}, ownProps, {layout: layout, product: product, dlRel: dlRel});\n};\n\nconst mapDispatchToProps = (dispatch) =>bindActionCreators({\n},dispatch);\n\nconst LyDlRelKeyListContainer = connect(mapStateToProps, mapDispatchToProps)(LyDlRelKeyList);\n\nexport default LyDlRelKeyListContainer;","import { connect } from 'react-redux'\nimport LyDlRelList from '../../../components/layouts/lydlrel/LyDlRelList';\nimport { getKeys } from \"../../../actions/product_keys\"\n\nimport {bindActionCreators} from 'redux';\nconst mapStateToProps = (state, ownProps) => {\n const product = state.products.filter(p => p.id == ownProps.product_id)[0];\n const layout = state.layouts.filter(p => p.id == ownProps.layout_id)[0];\n // let product_datalevels = state.product_datalevels.filter(dl => dl.product_id == ownProps.product_id);\n // let layout_datalevels = layout.layout_datalevels.filter(dl => dl.layout_id == ownProps.layout_id);\n return Object.assign({}, ownProps, {isAddVisible: false, layout: layout, product: product });\n};\n\nconst mapDispatchToProps = (dispatch) => bindActionCreators({\n getKeys\n},dispatch);\n\nconst LyDlRelListContainer = connect(mapStateToProps, mapDispatchToProps)(LyDlRelList);\n\nexport default LyDlRelListContainer;","import { connect } from 'react-redux'\nimport AddLySlotFor from '../../../components/layouts/lyslotfors/AddLySlotFor';\nimport { createLyDLSlotFor } from '../../../actions/layouts';\n\nimport {bindActionCreators} from 'redux';\nconst mapStateToProps = (state, ownProps) => {\n const product = state.products.filter(p => p.id == ownProps.product_id)[0];\n const layout = state.layouts.filter(p => p.id == ownProps.layout_id)[0];\n let product_datalevels = state.product_datalevels.filter(dl => {\n return dl.product_id == ownProps.product_id\n });\n let slotFors = layout.datalevel_slotfors\n let layout_datalevels = layout.datalevels.reduce((accumilator, lyDl) => {\n accumilator.push(lyDl.dlname);\n return accumilator;\n }, [])\n product_datalevels = product_datalevels.filter(pDl => (layout_datalevels.indexOf(pDl.dlname) != -1))\n return Object.assign({}, ownProps, {layout: layout, layout_datalevels: product_datalevels, product: product, slotFors: slotFors });\n};\n\nconst mapDispatchToProps = (dispatch) => bindActionCreators({\n createLyDLSlotFor\n}, dispatch);\n\nconst AddLySlotForContainer = connect(mapStateToProps, mapDispatchToProps)(AddLySlotFor);\n\nexport default AddLySlotForContainer;","import { connect } from 'react-redux'\nimport LySlotFor from '../../../components/layouts/lyslotfors/LySlotFor';\nimport { deleteLyDLSlotFor } from '../../../actions/layouts';\n\nimport {bindActionCreators} from 'redux';\nconst mapStateToProps = (state, ownProps) => {\n const product = state.products.filter(p => p.id == ownProps.product_id)[0];\n const layout = state.layouts.filter(p => p.id == ownProps.layout_id)[0];\n let slotFors = layout.datalevel_slotfors.filter(slotfor => slotfor.dlname == ownProps.dlname && slotfor.slotforcode == ownProps.slotforcode);\n return Object.assign({}, ownProps, {layout: layout, slotFors: slotFors, product: product });\n};\n\nconst mapDispatchToProps = (dispatch) =>bindActionCreators({\n deleteLyDLSlotFor\n},dispatch);\n\nconst LySlotForContainer = connect(mapStateToProps, mapDispatchToProps)(LySlotFor);\n\nexport default LySlotForContainer;","import { connect } from 'react-redux'\nimport LySlotForList from '../../../components/layouts/lyslotfors/LySlotForList';\n\nimport {bindActionCreators} from 'redux';\nconst mapStateToProps = (state, ownProps) => {\n const product = state.products.filter(p => p.id == ownProps.product_id)[0];\n let layout = state.layouts.filter(p => p.id == ownProps.layout_id)[0];\n let datalevel_slotfors = layout.datalevel_slotfors.filter(slotfor => slotfor.slotforcode == ownProps.slotforcode);\n layout = Object.assign({}, layout, {});\n delete layout.datalevel_slotfors;\n delete layout.datalevel_relations;\n delete layout.datalevels;\n datalevel_slotfors = datalevel_slotfors.reduce((accumilator, slotfor)=> {\n accumilator[slotfor.dlname] = accumilator[slotfor.dlname] || [];\n accumilator[slotfor.dlname].push(slotfor);\n return accumilator;\n }, {});\n return Object.assign({}, ownProps, {layout: layout, product: product, dlnames: Object.keys(datalevel_slotfors)});\n};\n\nconst mapDispatchToProps = (dispatch) =>bindActionCreators({\n},dispatch);\n\nconst LySlotForListContainer = connect(mapStateToProps, mapDispatchToProps)(LySlotForList);\n\nexport default LySlotForListContainer;","import { connect } from \"react-redux\";\nimport CCavenuePayment from \"../../components/orders/CCavenuePayment\";\nimport { bindActionCreators } from \"redux\";\nimport { getPrice, generateImage } from \"../../actions/orders\";\n\nconst mapStateToProps = (state, ownProps) => {\n return {\n product_id: ownProps.product_id,\n setno: ownProps.setno,\n pageno: ownProps.pageno,\n no_of_files: ownProps.no_of_files,\n prtype: ownProps.prtype,\n numpages: ownProps.numpages\n };\n};\n\n\nconst mapDispatchToProps = dispatch =>\n bindActionCreators(\n {\n getPrice,\n generateImage\n },\n dispatch\n );\n\nconst CCavenuePaymentContainer = connect(\n mapStateToProps,\n mapDispatchToProps\n)(CCavenuePayment);\n\nexport default CCavenuePaymentContainer;\n","import { connect } from \"react-redux\";\nimport DownloadFiles from \"../../components/orders/DownloadFiles\";\nimport { bindActionCreators } from \"redux\";\nimport { getSets } from \"../../actions/product_sets\";\n\nconst mapStateToProps = (state, ownProps) => {\n let product = state.products.filter((e) => e.id === ownProps.product_id)[0];\n let product_sets = Object.values(\n (state.product_sets && state.product_sets[ownProps.product_id]) || {}\n );\n const orders = (product && product.order) || [];\n const paidOrders = orders.filter((o) => o.status == \"paid\");\n const main_dl = ((state.product_datalevels && state.product_datalevels) || []).find(\n (pdl) => pdl.dltype === \"main\"\n );\n const main_dlname = main_dl && main_dl.dlname;\n product.product_sets =\n product && product.product_sets && product.product_sets.length > 0\n ? product.product_sets\n : product_sets;\n return {\n product: product,\n product_sets: product.product_sets || product_sets,\n main_dlname: main_dlname,\n paidOrders: paidOrders,\n };\n};\n\nconst mapDispatchToProps = (dispatch) => bindActionCreators({ getSets }, dispatch);\n\nconst DownloadFilesContainer = connect(mapStateToProps, mapDispatchToProps)(DownloadFiles);\n\nexport default DownloadFilesContainer;\n","import { connect } from \"react-redux\";\nimport { bindActionCreators } from \"redux\";\nimport Layout from \"../../components/orders/Layout\";\nimport { getPrice } from \"../../actions/orders\";\n\nconst mapStateToProps = (state, ownProps) => {\n const product = state.products.filter((p) => p.id == ownProps.product_id)[0];\n if (product.product_sets) {\n const product_set = product.product_sets.filter(\n (p) => p.product_id === product.id && p.setno === ownProps.setno\n )[0];\n const set_layouts = product_set.layouts || [];\n const set_layout =\n set_layouts.filter((p) => p.pageno == ownProps.pageno)[0] || {};\n return Object.assign({}, ownProps, {\n product: product,\n layout: set_layout,\n product_set: product_set,\n });\n } else {\n return {\n ...state,\n ownProps,\n };\n }\n};\n\nconst mapDispatchToProps = (dispatch) =>\n bindActionCreators(\n {\n getPrice,\n },\n dispatch\n );\n\nconst LayoutContainer = connect(mapStateToProps, mapDispatchToProps)(Layout);\n\nexport default LayoutContainer;\n","import { connect } from \"react-redux\";\nimport Order from \"../../components/orders/Order\";\nimport { toggleView } from \"../../actions\";\nimport { getSets } from \"../../actions/product_sets\";\nimport { bindActionCreators } from \"redux\";\nimport { getPrice, addToCart, getOrders } from \"../../actions/orders\";\n\nconst mapStateToProps = (state, ownProps) => {\n let product = state.products.filter((p) => p.id == ownProps.product_id)[0];\n let cart_product = null;\n let carts = state.carts || (state.orders && state.orders.carts);\n if (carts && carts.length > 0)\n cart_product = carts && carts.find((c) => c.product_id == ownProps.product_id);\n const expand = product.expand == null ? false : product.expand;\n return Object.assign(\n {},\n {},\n {\n product: product,\n expand: expand,\n cart_product: cart_product,\n }\n );\n};\n\nconst mapDispatchToProps = (dispatch) =>\n bindActionCreators(\n {\n getSets,\n toggleView,\n getPrice,\n addToCart,\n getOrders,\n },\n dispatch\n );\n\nconst OrderContainer = connect(mapStateToProps, mapDispatchToProps)(Order);\n\nexport default OrderContainer;\n","import { connect } from \"react-redux\";\nimport OrderList from \"../../components/orders/OrderList\";\nimport { getProducts } from \"../../actions\";\nimport { getOrders } from \"../../actions/orders\";\nimport { bindActionCreators } from \"redux\";\n\nconst mapStateToProps = state => {\n return {\n products: state.products\n };\n};\n\nconst mapDispatchToProps = dispatch =>\n bindActionCreators(\n {\n getProducts,\n getOrders\n },\n dispatch\n );\n\nconst OrderListContainer = connect(\n mapStateToProps,\n mapDispatchToProps\n)(OrderList);\n\nexport default OrderListContainer;\n","import { connect } from \"react-redux\";\nimport OrderProductSet from \"../../components/orders/OrderProductSet\";\nimport { bindActionCreators } from \"redux\";\nimport { getPrice, addToCart } from \"../../actions/orders\";\n\n\n\n\nconst mapStateToProps = (state, ownProps) => {\n let product_set = ownProps.product.product_sets.filter((p) => p.setno === ownProps.setno)[0];\n let counts = product_set[ownProps.main_dlname];\n let cart_product = null;\n let carts = state.carts || (state.orders && state.orders.carts);\n if (carts && carts.length > 0)\n cart_product = carts && carts.find((c) => c.product_id == ownProps.product_id);\n \n return Object.assign(\n {},\n {},\n {\n product: ownProps.product,\n setno: ownProps.setno,\n product_set: product_set,\n order: ownProps.product.order || {},\n layouts: ownProps.layouts,\n cart_product: cart_product,\n counts: counts,\n carts: state.carts,\n main_dlname: ownProps.main_dlname || ownProps.product.main_dlname,\n }\n );\n};\n\nconst mapDispatchToProps = (dispatch) =>\n bindActionCreators(\n {\n getPrice,\n addToCart,\n },\n dispatch\n );\n\n\nconst OrderProductSetContainer = connect(mapStateToProps, mapDispatchToProps)(OrderProductSet);\n\nexport default OrderProductSetContainer;\n","import { connect } from \"react-redux\";\nimport OrderProductSetList from \"../../components/orders/OrderProductSetList\";\nimport { bindActionCreators } from \"redux\";\n\nconst mapStateToProps = (state, ownProps) => {\n let product = state.products.filter((e) => e.id === ownProps.product_id)[0];\n let product_sets = Object.values(\n (state.product_sets && state.product_sets[ownProps.product_id]) || {}\n );\n const main_dl = ((state.product_datalevels && state.product_datalevels) || []).find(\n (pdl) => pdl.dltype === \"main\" && pdl.product_id == product.id\n );\n const main_dlname = (main_dl && main_dl.dlname) || product.main_dlname;\n product.product_sets =\n product.product_sets && product.product_sets.length > 0 ? product.product_sets : product_sets;\n return {\n product: product,\n product_sets: product.product_sets || product_sets,\n order_status: ownProps.order_status,\n main_dlname: main_dlname,\n };\n};\n\nconst mapDispatchToProps = (dispatch) => bindActionCreators({}, dispatch);\n\nconst OrderProductSetListContainer = connect(\n mapStateToProps,\n mapDispatchToProps\n)(OrderProductSetList);\n\nexport default OrderProductSetListContainer;\n","import { connect } from \"react-redux\";\nimport Payment from \"../../components/orders/Payment\";\nimport { bindActionCreators } from \"redux\";\nimport { getPrice, generateImage } from \"../../actions/orders\";\n\nconst mapStateToProps = (state, ownProps) => {\n return {\n product_id: ownProps.product_id,\n setno: ownProps.setno,\n pageno: ownProps.pageno,\n prtype: ownProps.prtype,\n numpages: ownProps.numpages\n };\n};\n\nconst mapDispatchToProps = dispatch =>\n bindActionCreators(\n {\n getPrice,\n generateImage\n },\n dispatch\n );\n\nconst PaymentContainer = connect(\n mapStateToProps,\n mapDispatchToProps\n)(Payment);\n\nexport default PaymentContainer;\n","import { connect } from 'react-redux';\r\nimport ShareProduct from \"../../components/orders/ShareProduct\"\r\nimport { bindActionCreators } from 'redux';\r\nimport { shareProduct } from \"../../actions/orders\";\r\n\r\nconst mapStateToProps = (state, ownProps) => {\r\n return Object.assign({}, {}, ownProps);\r\n};\r\nconst mapDispatchToProps = (dispatch) => bindActionCreators({\r\n shareProduct\r\n}, dispatch);\r\n\r\nconst ShareProductContainer = connect(mapStateToProps, mapDispatchToProps)(ShareProduct);\r\n\r\nexport default ShareProductContainer;","import { connect } from \"react-redux\";\nimport { getKeys, createKey, deleteKey } from \"../../actions/product_keys\";\nimport { getProductDatalevels } from \"../../actions\";\nimport {\n toggleOverlay,\n hideOverlay,\n showOverlay\n} from \"../../actions/misc_actions\";\nimport EditProductKey from \"../../components/product_keys/EditProductKey\";\nimport { bindActionCreators } from \"redux\";\nimport { createSelector } from \"reselect\";\n\nconst dlSelector = createSelector(\n [state => state.id, state => state.datalevels],\n (filter, datalevels) => {\n return datalevels.filter(\n datalevel => datalevel.product_id == filter.product_id\n );\n }\n);\n\nconst mapStateToProps = (state, ownProps) => {\n let datalevels = state.product_datalevels;\n let product = state.products.filter(p => p.id == ownProps.product_id)[0];\n let overlay = state.overlays[ownProps.product_id + \"/keys\"] || {\n visible: false\n };\n let datalevel =\n datalevels.filter(\n datalevel =>\n datalevel.product_id == ownProps.product_id &&\n datalevel.dltype == \"main\"\n )[0] || {};\n const product_keys =\n (state.product_keys[ownProps.product_id] || {})[datalevel.dlname] || [];\n let selectedKeys = {};\n let currentKeyOrder = 0;\n product_keys.map(key => {\n if (key.order > currentKeyOrder) currentKeyOrder = key.order;\n selectedKeys[key.attribute] = {\n checked: true,\n saved: true,\n order: key.order\n };\n });\n if (datalevel != null && datalevel.attributes != null) {\n datalevel.attributes.map(key => {\n if (selectedKeys[key.name] == null) {\n selectedKeys[key.name] = { checked: false, saved: false, order: 0 };\n }\n });\n }\n\n return Object.assign(\n {},\n {},\n {\n product: product,\n product_datalevel: datalevel,\n overlay: overlay,\n product_keys: product_keys,\n label: ownProps.labelText,\n selectedKeys: selectedKeys,\n currentKeyOrder: currentKeyOrder\n }\n );\n};\nconst mapDispatchToProps = dispatch =>\n bindActionCreators(\n {\n getProductDatalevels,\n getKeys,\n createKey,\n deleteKey,\n toggleOverlay,\n hideOverlay,\n showOverlay\n },\n dispatch\n );\n\nconst EditProductKeyContainer = connect(\n mapStateToProps,\n mapDispatchToProps\n)(EditProductKey);\n\nexport default EditProductKeyContainer;\n","import {connect} from 'react-redux';\nimport {getProductDatalevels} from '../../actions';\nimport {getKeys ,deleteKey} from '../../actions/product_keys';\nimport ProductKey from '../../components/product_keys/ProductKey';\nimport {bindActionCreators} from 'redux';\nimport {\n showOverlay\n ,selectDatalevel\n} from '../../actions/misc_actions';\n\nconst mapStateToProps = (state, ownProps) => {\n let datalevels = state.product_datalevels;\n let product = state.products.filter(p => p.id == ownProps.product_id)[0];\n let datalevel = datalevels.filter(\n datalevel => (datalevel.product_id == ownProps.product_id && datalevel.dltype == 'main')\n )[0] || {};\n const product_keys = ((state.product_keys[ownProps.product_id] || {})[datalevel.dlname] || []);\n return Object.assign({}, ownProps, {product_keys: product_keys, product: product, product_datalevel: datalevel, overlay: (state.overlays[ownProps.product_id] || { visible: false } ) });\n};\n\nconst mapDispatchToProps = (dispatch) =>bindActionCreators({\n deleteKey\n ,getProductDatalevels\n ,showOverlay\n ,selectDatalevel\n},dispatch);\n\n\nconst ProductKeyContainer = connect(mapStateToProps, mapDispatchToProps)(ProductKey);\n\nexport default ProductKeyContainer","import { connect } from \"react-redux\";\nimport { getKeys } from \"../../actions/product_keys\";\nimport ProductKeyList from \"../../components/product_keys/ProductKeyList\";\nimport { bindActionCreators } from \"redux\";\n\nconst mapStateToProps = (state, ownProps) => {\n const role = ownProps.role;\n const product = state.products.filter(p => p.id == ownProps.product_id)[0];\n const product_role = product && product.product_role;\n const product_keys = state.product_keys[ownProps.product_id] || [];\n return {\n product: product,\n product_keys: product_keys,\n product_role: product_role,\n role: role\n };\n};\n\nconst mapDispatchToProps = dispatch =>\n bindActionCreators(\n {\n getKeys\n },\n dispatch\n );\n\nconst ProductKeyListContainer = connect(\n mapStateToProps,\n mapDispatchToProps\n)(ProductKeyList);\n\nexport default ProductKeyListContainer;\n","import {connect} from 'react-redux'\nimport {getSets, createSet, deleteSet} from '../../actions/product_sets'\nimport {getProductDatalevels} from '../../actions'\nimport {\n toggleOverlay\n ,hideOverlay\n ,showOverlay\n} from '../../actions/misc_actions'\nimport AddProductSet from '../../components/product_sets/AddProductSet'\nimport {bindActionCreators} from 'redux';\n\nconst mapStateToProps = (state, ownProps) => {\n let datalevels = state.product_datalevels;\n let product = state.products.filter(p => p.id == ownProps.product_id)[0];\n return Object.assign({}, {}, {product: product, overlay: ownProps.overlay, label: ownProps.labelText});\n};\nconst mapDispatchToProps = (dispatch) =>bindActionCreators({\n createSet\n ,hideOverlay\n ,showOverlay\n},dispatch);\n\nconst AddSetContainer = connect(mapStateToProps, mapDispatchToProps)(AddProductSet);\n\nexport default AddSetContainer;","import { connect } from \"react-redux\";\nimport ProductSet from \"../../components/product_sets/ProductSet\";\nimport { bindActionCreators } from \"redux\";\nimport { createSelector } from \"reselect\";\nimport { getSetPlaceholders, deleteSet, updateSet } from \"../../actions/product_sets\";\n\nconst mapStateToProps = (state, ownProps) => {\n return ownProps;\n};\n\nconst mapDispatchToProps = (dispatch) =>\n bindActionCreators(\n {\n getSetPlaceholders,\n deleteSet,\n updateSet,\n },\n dispatch\n );\n\nconst ProductSetContainer = connect(mapStateToProps, mapDispatchToProps)(ProductSet);\n\nexport default ProductSetContainer;\n","import { connect } from \"react-redux\";\nimport ProductSetCount from \"../../components/product_sets/ProductSetCount\";\nimport { bindActionCreators } from \"redux\";\nimport {\n toggleOverlay,\n hideOverlay,\n showOverlay\n} from \"../../actions/misc_actions\";\nimport {\n createSetOccurenceCount,\n updateSetOccurenceCount\n} from \"../../actions/product_sets\";\n\nconst mapStateToProps = (state, ownProps) => {\n return Object.assign({}, ownProps, { overlays: state.overlays });\n};\n\nconst mapDispatchToProps = dispatch =>\n bindActionCreators(\n {\n hideOverlay,\n showOverlay,\n createSetOccurenceCount,\n updateSetOccurenceCount\n },\n dispatch\n );\n\nconst ProductSetCountContainer = connect(\n mapStateToProps,\n mapDispatchToProps\n)(ProductSetCount);\n\nexport default ProductSetCountContainer;\n","import { connect } from \"react-redux\";\nimport ProductSetCountList from \"../../components/product_sets/ProductSetCountList\";\nimport { bindActionCreators } from \"redux\";\nimport { createSelector } from \"reselect\";\nimport {\n toggleOverlay,\n hideOverlay,\n showOverlay\n} from \"../../actions/misc_actions\";\n\nconst mapStateToProps = (state, ownProps) => {\n return Object.assign({}, ownProps, { overlay: state.overlays });\n};\n\nconst mapDispatchToProps = dispatch =>\n bindActionCreators(\n {\n hideOverlay,\n showOverlay\n },\n dispatch\n );\n\nconst ProductSetCountListContainer = connect(\n mapStateToProps,\n mapDispatchToProps\n)(ProductSetCountList);\n\nexport default ProductSetCountListContainer;\n","import {connect} from 'react-redux';\nimport ProductSetDLVal from '../../components/product_sets/ProductSetDLVal';\nimport {bindActionCreators} from 'redux';\nimport {\n toggleOverlay\n ,hideOverlay\n ,showOverlay\n} from '../../actions/misc_actions'\nimport {updateSetDLVal, createSetDLVal} from '../../actions/product_sets'\n\n\nconst mapStateToProps = (state, ownProps) => {\n return Object.assign({}, ownProps, {overlays: state.overlays });\n};\n\nconst mapDispatchToProps = (dispatch) =>bindActionCreators({\n hideOverlay\n ,showOverlay\n ,createSetDLVal\n ,updateSetDLVal\n},dispatch);\n\n\nconst ProductSetDLValContainer = connect(mapStateToProps, mapDispatchToProps)(ProductSetDLVal);\n\nexport default ProductSetDLValContainer;","import {connect} from 'react-redux'\nimport ProductSetDLValList from '../../components/product_sets/ProductSetDLValList'\nimport {bindActionCreators} from 'redux';\nimport { createSelector } from 'reselect'\nimport {\n toggleOverlay\n ,hideOverlay\n ,showOverlay\n} from '../../actions/misc_actions'\n\nconst mapStateToProps = (state, ownProps) => {\n return Object.assign({}, ownProps, {overlay: state.overlays});\n};\n\nconst mapDispatchToProps = (dispatch) =>bindActionCreators({\n hideOverlay\n ,showOverlay\n},dispatch);\n\n\nconst ProductSetDLValListContainer = connect(mapStateToProps, mapDispatchToProps)(ProductSetDLValList);\n\nexport default ProductSetDLValListContainer;","import {connect} from 'react-redux';\nimport ProductSetKeyVal from '../../components/product_sets/ProductSetKeyVal';\nimport {bindActionCreators} from 'redux';\nimport {\n toggleOverlay\n ,hideOverlay\n ,showOverlay\n} from '../../actions/misc_actions'\nimport {createSetKey, updateSetKey} from '../../actions/product_sets'\n\n\nconst mapStateToProps = (state, ownProps) => {\n return Object.assign({}, ownProps, {overlay: state.overlays[ownProps.product_id+\"/sets/\"+ownProps.setno+\"/\"+ownProps.keyname] || {visible: false}});\n};\n\nconst mapDispatchToProps = (dispatch) =>bindActionCreators({\n hideOverlay\n ,showOverlay\n ,createSetKey\n ,updateSetKey\n},dispatch);\n\n\nconst ProductSetKeyValContainer = connect(mapStateToProps, mapDispatchToProps)(ProductSetKeyVal);\n\nexport default ProductSetKeyValContainer;","import {connect} from 'react-redux'\nimport ProductSetKeyValList from '../../components/product_sets/ProductSetKeyValList'\nimport {bindActionCreators} from 'redux';\nimport { createSelector } from 'reselect'\n\nconst mapStateToProps = (state, ownProps) => {\n return Object.assign(ownProps);\n};\n\n\n\nconst ProductSetKeyValListContainer = connect(mapStateToProps, null)(ProductSetKeyValList);\n\nexport default ProductSetKeyValListContainer","import { connect } from \"react-redux\";\nimport ProductSetLayout from \"../../components/product_sets/ProductSetLayout\";\nimport { hideOverlay, showOverlay } from \"../../actions/misc_actions\";\nimport { bindActionCreators } from \"redux\";\nimport { createSetLayout, deleteSetLayout } from \"../../actions/product_sets\";\nimport { getSupportedLayouts } from \"../../actions/product_sets\";\n\nconst mapStateToProps = (state, ownProps) => {\n let overlay_id =\n \"product_\" +\n ownProps.product_id +\n \"_\" +\n \"layout_\" +\n ownProps.setno +\n \"_\" +\n ownProps.pageno;\n const product = state.products.filter(p => p.id == ownProps.product_id)[0];\n const supported_layouts =\n state.product_sets[\n ownProps.product_id + \"_set_\" + ownProps.setno + \"_\" + ownProps.pageno\n ] || [];\n const set_layouts =\n state.product_sets[product.id][ownProps.setno].layouts || [];\n const set_layout =\n set_layouts.filter(p => p.pageno == ownProps.pageno)[0] || {};\n return Object.assign({}, ownProps, {\n supported_layouts: supported_layouts,\n overlay_id: overlay_id,\n product: product,\n layout: set_layout,\n overlay: state.overlays[overlay_id] || { visible: false }\n });\n};\n\nconst mapDispatchToProps = dispatch =>\n bindActionCreators(\n {\n createSetLayout,\n hideOverlay,\n showOverlay,\n deleteSetLayout,\n getSupportedLayouts\n },\n dispatch\n );\n\nconst ProductSetLayoutContainer = connect(\n mapStateToProps,\n mapDispatchToProps\n)(ProductSetLayout);\n\nexport default ProductSetLayoutContainer;\n","import { connect } from \"react-redux\";\nimport { getSets } from \"../../actions/product_sets\";\nimport ProductSetList from \"../../components/product_sets/ProductSetList\";\nimport { bindActionCreators } from \"redux\";\nimport { getKeys } from \"../../actions/product_keys\";\n\nconst mapStateToProps = (state, ownProps) => {\n const product = state.products.filter(p => p.id == ownProps.product_id)[0];\n const product_role = product.product_role;\n const role = ownProps.role;\n const product_sets = state.product_sets[ownProps.product_id] || [];\n const overlays = state.overlays[ownProps.product_id + \"_sets\"] || {\n visible: false\n };\n return {\n product: product,\n product_sets: product_sets,\n overlay: overlays,\n product_role: product_role,\n role: role\n };\n};\n\nconst mapDispatchToProps = dispatch =>\n bindActionCreators(\n {\n getSets,\n getKeys\n },\n dispatch\n );\n\nconst ProductSetListContainer = connect(\n mapStateToProps,\n mapDispatchToProps\n)(ProductSetList);\n\nexport default ProductSetListContainer;\n","import { connect } from \"react-redux\";\nimport ViewProduct from \"../../components/view_products/ViewProduct\";\nimport { toggleView } from \"../../actions\";\nimport { getSets } from \"../../actions/product_sets\";\nimport { bindActionCreators } from \"redux\";\n\nconst mapStateToProps = (state, ownProps) => {\n let product = state.products.filter(p => p.id == ownProps.product_id)[0];\n const expand = product.expand == null ? false : product.expand;\n return Object.assign(\n {},\n {},\n {\n product: product,\n expand: expand\n }\n );\n};\n\nconst mapDispatchToProps = dispatch =>\n bindActionCreators(\n {\n getSets,\n toggleView\n },\n dispatch\n );\n\nconst ViewProductContainer = connect(\n mapStateToProps,\n mapDispatchToProps\n)(ViewProduct);\n\nexport default ViewProductContainer;\n","import { connect } from \"react-redux\";\nimport ViewProductList from \"../../components/view_products/ViewProductList\";\nimport { getViewProducts } from \"../../actions/orders\";\nimport { bindActionCreators } from \"redux\";\n\nconst mapStateToProps = (state) => {\n return {\n products: state.products,\n };\n};\n\nconst mapDispatchToProps = (dispatch) =>\n bindActionCreators(\n {\n getViewProducts,\n },\n dispatch\n );\n\nconst ViewProductListContainer = connect(mapStateToProps, mapDispatchToProps)(ViewProductList);\n\nexport default ViewProductListContainer;\n","import { connect } from \"react-redux\";\nimport ViewProductSet from \"../../components/view_products/ViewProductSet\";\nimport { bindActionCreators } from \"redux\";\n\nconst mapStateToProps = (state, ownProps) => {\n let product_set = ownProps.product.product_sets.filter(\n p => p.setno === ownProps.setno\n )[0];\n return Object.assign(\n {},\n {},\n {\n product: ownProps.product,\n setno: ownProps.setno,\n product_set: product_set,\n order: ownProps.order,\n layouts: ownProps.layouts\n }\n );\n};\n\nconst mapDispatchToProps = dispatch =>\n bindActionCreators(\n {\n },\n dispatch\n );\n\nconst ViewProductSetContainer = connect(\n mapStateToProps,\n mapDispatchToProps\n)(ViewProductSet);\n\nexport default ViewProductSetContainer;\n","import { connect } from \"react-redux\";\nimport ViewProductSetList from \"../../components/view_products/ViewProductSetList\";\nimport { bindActionCreators } from \"redux\";\n\nconst mapStateToProps = (state, ownProps) => {\n let product = state.products.filter(e => e.id === ownProps.product_id)[0];\n return {\n product: product,\n product_sets: product.product_sets\n };\n};\n\nconst mapDispatchToProps = dispatch => bindActionCreators({}, dispatch);\n\nconst ViewProductSetListContainer = connect(\n mapStateToProps,\n mapDispatchToProps\n)(ViewProductSetList);\n\nexport default ViewProductSetListContainer;\n","import { createContext } from \"react\";\n\nconst CartContext = createContext();\n\nexport default CartContext;\n","//Import the Action types\nimport {\n SETQTY,\n INCREASE,\n DECREASE,\n } from \"./CartTypes.js\";\n \n \n // The reducer is listening for an action, which is the type that we defined in the CartTypes.js file\n const CartReducer = (state, action) => {\n // The switch statement is checking the type of action that is being passed in\n switch (action.type) {\n // If the action type is SETQTY, we want to set the quantity with the payload\n case SETQTY:\n state.cartItems.quantity=action.payload;\n return {\n ...state,\n cartItems: state.cartItems,\n };\n \n // If the action type is INCREASE, we want to increase the quantity of the particular item in the cartItems array\n case INCREASE:\n state.cartItems.quantity++;\n return {\n ...state,\n cartItems: state.cartItems,\n };\n \n // If the action type is DECREASE, we want to decrease the quantity of the particular item in the cartItems array\n case DECREASE:\n state.cartItems.quantity--;\n return {\n ...state,\n cartItems: state.cartItems,\n };\n \n \n //Return the state if the action type is not found\n default:\n return state;\n }\n };\n \n export default CartReducer;\n ","import React, { useState } from 'react';\nimport { useReducer } from \"react\";\nimport CartContext from \"./CartContext\";\nimport CartReducer from \"./CartReducer\";\n\n\nconst CartState = ({ children }) => {\n // Initial State of the cart\n const initialState = {\n cartItems: {quantity:null},\n };\n\n //Set up the reducer\n const [state, dispatch] = useReducer(CartReducer, initialState);\n\n //Function to set the value of quantity\n const setqty = (payload) => {\n dispatch({ type: \"SETQTY\", payload});\n };\n \n //Function to handle when an item that is in the cart is added again\n const increase = () => {\n dispatch({ type: \"INCREASE\"});\n };\n\n //Function to handle when an item is removed from the cart\n const decrease = () => {\n dispatch({ type: \"DECREASE\"});\n };\n\n \n\n return (\n //Add the functions that have been defined above into the Context provider, and pass on to the children\n \n {children}\n \n );\n};\n\nfunction getCookie (cname) {\n let name = cname + \"=\";\n let decodedCookie = decodeURIComponent(document.cookie);\n let ca = decodedCookie.split(';');\n for(let i = 0; i { product_id, payload}\nconst layouts = (state = [], action) => {\n let newState = [];\n let t = {};\n let newState2 = [];\n let map = new Map();\n switch (action.type) {\n case ADD_ALL_LAYOUTS:\n for (let i = 0; i < action.payload.length; i++) {\n action.payload[i][\"product_id\"] = action.id;\n action.payload[i][\"datalevel_slotfors\"] = [];\n action.payload[i][\"datalevel_relations\"] = [];\n action.payload[i][\"datalevels\"] = [];\n }\n // newState = [...state, ...action.payload];\n newState = [...action.payload];\n for (const item of newState) {\n if (!map.has(item.id)) {\n map.set(item.id, true);\n newState2.push(item);\n }\n }\n return newState2;\n case ADD_LAYOUT:\n newState = [...state];\n let layout = newState.filter(layout => layout.id == action.payload.id)[0];\n // let datalevel_slotfors = layout.datalevel_slotfors.reduce((slotforLayout, slotfor) => {\n // slotforLayout[slotfor.slotforcode] ||= [];\n // slotforLayout[slotfor.slotforcode].push(slotfor);\n // }, {});\n // delete layout.datalevel_slotfors;\n // layout.datalevel_slotfors = datalevel_slotfors;\n if (layout == null) {\n return state;\n } else {\n newState[newState.indexOf(layout)] = Object.assign({}, action.payload, {\n product_id: layout.product_id\n });\n }\n return newState;\n case DELETE_LAYOUT:\n return state;\n default:\n return state;\n }\n};\n\nexport default layouts;\n","import { distinctObjects } from \"../adukku_utils/array\";\nimport { combineReducers } from \"redux\";\nimport {\n SHOW_OVERLAY,\n HIDE_OVERLAY,\n TOGGLE_OVERLAY,\n SELECTED_DATALEVEL,\n SELECTED_DATALEVEL_ATTRIBUTE,\n SELECTED_ORDER,\n EXPAND_SECTION,\n HIDE_SECTION,\n SET_USER_ROLE\n} from \"../actions/misc_actions\";\n\nconst X = (state = {}, action) => {\n let newState = {};\n switch (action.type) {\n case SHOW_OVERLAY:\n newState[action.id] = { visible: true };\n return { ...state, ...newState };\n case HIDE_OVERLAY:\n newState[action.id] = { visible: false };\n return { ...state, ...newState };\n case EXPAND_SECTION:\n newState[action.id] = { expand: true };\n return { ...state, ...newState };\n case HIDE_SECTION:\n newState[action.id] = { expand: false };\n return { ...state, ...newState };\n case TOGGLE_OVERLAY:\n newState[action.id] = { visible: !state[action.id] };\n return { ...state, ...newState };\n case SELECTED_DATALEVEL:\n newState[action.id] = Object.assign({}, state[action.id] || {}, {\n selectedDatalevel: action.payload\n });\n return { ...state, ...newState };\n case SELECTED_DATALEVEL_ATTRIBUTE:\n newState[action.id] = Object.assign({}, state[action.id] || {}, {\n selectedDatalevelAttribute: action.payload\n });\n return { ...state, ...newState };\n case SELECTED_ORDER:\n newState[action.id] = Object.assign({}, state[action.id] || {}, {\n selectedOrder: parseInt(action.payload)\n });\n return { ...state, ...newState };\n default:\n return state;\n }\n};\nexport default X;\n","import { GET_PRODUCTS, TOGGLE_PRODUCT_EXPAND } from \"../actions\";\nimport { ADD_ALL_SETS } from \"../actions/product_sets\";\nimport {\n ADD_PRICE,\n GENERATE_IMAGE,\n ADD_VIEW_PRODUCTS,\n ADD_SHARE_PRODUCT,\n ADD_TO_CART,\n GET_ORDERS,\n} from \"../actions/orders\";\n\nconst initialState = {\n products: [],\n carts: [],\n orders: [],\n};\n\nconst reducer = (state = initialState, action) => {\n const newState = { ...state };\n let product = {};\n switch (action.type) {\n case GET_PRODUCTS:\n newState.products = action.payload;\n break;\n case ADD_VIEW_PRODUCTS:\n newState.products = action.payload;\n break;\n case TOGGLE_PRODUCT_EXPAND:\n newState.products = state.products.map((product) =>\n product.id === action.id ? { ...product, expand: !(product.expand || false) } : product\n );\n break;\n case ADD_ALL_SETS:\n product = newState.products.filter((product) => product.id == action.id)[0];\n product.product_sets = action.payload;\n newState;\n break;\n case ADD_PRICE:\n product = newState.products.filter((product) => product.id == action.product_id)[0];\n if (action.setno === \"\") {\n product.pricing = action.payload;\n }\n if (action.setno > 0) {\n let product_set = product.product_sets.filter((ps) => ps.setno === action.setno)[0];\n product_set.pricing = action.payload;\n }\n newState;\n break;\n case GENERATE_IMAGE:\n // newState.product_set_pricing = action.payload;\n break;\n case ADD_SHARE_PRODUCT:\n break;\n case ADD_TO_CART:\n const { carts } = newState;\n const newProductCart = action.payload;\n\n let current_product_cart = carts.find(\n (cart) =>\n cart.product_id ==\n (newProductCart.product_id || (newProductCart.order && newProductCart.order.product_id))\n );\n if (current_product_cart) {\n newState.carts = carts.map((cart) => {\n if (cart.product_id == newProductCart.order.product_id) {\n return newProductCart.order;\n }\n return cart;\n });\n } else {\n newState.carts = [...carts, newProductCart.order];\n }\n break;\n case GET_ORDERS:\n newState.carts = action.payload;\n break;\n }\n return newState;\n};\n\nexport default reducer;\n","import { combineReducers } from \"redux\";\nimport { ADD_ALL_KEYS, ADD_KEY, DELETE_KEY } from \"../actions/product_keys\";\n\n// action -> { product_id, payload}\nconst X = (state = {}, action) => {\n let newState = {};\n switch (action.type) {\n case ADD_ALL_KEYS:\n let keys = action.payload.reduce((result, key) => {\n if (result[key.dlname] == null) {\n result[key.dlname] = [];\n }\n result[key.dlname].push(key);\n return result;\n }, {});\n newState[action.id] = keys;\n return Object.assign({}, state, newState);\n case ADD_KEY:\n return { ...state, ...newState };\n case DELETE_KEY:\n return { ...state, ...newState };\n default:\n return state;\n }\n};\nexport default X;\n","import { distinctObjects } from \"../adukku_utils/array\";\nimport product_keys from \"./product_key.reducers\";\nimport product_sets from \"./product_sets.reducers\";\nimport layouts from \"./layouts.reducers\";\nimport overlays from \"./misc_reducer\";\nimport { combineReducers } from \"redux\";\nimport {\n DELETE_PRODUCT_DATA_LEVEL,\n UPDATE_PRODUCT_DATA_LEVEL,\n CREATE_PRODUCT_DATA_LEVEL,\n DELETE_DATA_LEVEL_ATTRIBUTE,\n UPDATE_DATA_LEVEL_ATTRIBUTE,\n CREATE_DATA_LEVEL_ATTRIBUTE,\n DELETE_PRODUCT,\n UPDATE_PRODUCT,\n CREATE_PRODUCT,\n GET_PRODUCTS,\n GET_PRODUCT_DATA_LEVELS,\n TOGGLE_DATALEVEL_EXPAND,\n TOGGLE_PRODUCT_EXPAND,\n TOGGLE_EDIT_DATALEVEL,\n TOGGLE_EDIT_PRODUCT,\n CLEAR_PRODUCT_DATA_LEVELS,\n TOGGLE_EDIT_DATALEVEL_ATTRIBUTE,\n NEW_PRODUCT_DATA_LEVEL,\n NEW_DATA_LEVEL_ATTRIBUTE,\n ADD_CATEGORIES,\n ADD_PRODUCT_USER,\n ADD_VIEW_PRODUCT_USER,\n GET_UPLOADED_DATA,\n UPDATE_UPLOADED_DATA,\n} from \"../actions\";\nimport orders from \"./orders_reducer\";\n\nconst DatalevelHandle = (state = [], action) => {\n let newState = null;\n switch (action.type) {\n case NEW_PRODUCT_DATA_LEVEL: {\n return [...state, action.payload];\n }\n case CREATE_PRODUCT_DATA_LEVEL: {\n const payload = action.payload;\n let datalevels = state.filter((datalevel) => datalevel.isEdit !== true);\n newState = [...datalevels, payload.datalevel];\n return newState;\n }\n case TOGGLE_DATALEVEL_EXPAND: {\n return state.map((datalevel) =>\n datalevel.id === action.id ? { ...datalevel, collapse: !datalevel.collapse } : datalevel\n );\n }\n case CLEAR_PRODUCT_DATA_LEVELS: {\n return [];\n }\n case DELETE_PRODUCT_DATA_LEVEL: {\n return state.filter((datalevel) => datalevel.id !== action.id);\n }\n case DELETE_DATA_LEVEL_ATTRIBUTE: {\n newState = state.map((datalevel) => {\n let nDl = Object.assign({}, datalevel); // copies element\n let attrs = nDl.attributes.filter((attribute) => attribute.id !== action.id);\n return Object.assign({}, nDl, { attributes: attrs });\n });\n return newState;\n }\n case CREATE_DATA_LEVEL_ATTRIBUTE:\n {\n newState = state.map((datalevel) => {\n if (datalevel.id === action.dl_id) {\n let attributes = datalevel.attributes.filter((attribute) => attribute.isEdit !== true);\n if (action.payload.attribute != null) {\n attributes.push(action.payload.attribute);\n }\n return Object.assign({}, datalevel, { attributes: attributes });\n } else {\n return datalevel;\n }\n });\n }\n return newState;\n\n case NEW_DATA_LEVEL_ATTRIBUTE: {\n newState = state.map((datalevel) => {\n if (datalevel.id === action.dl_id) {\n let attributes = datalevel.attributes;\n attributes.push(action.payload);\n return Object.assign({}, datalevel, { attributes: attributes });\n } else {\n return datalevel;\n }\n });\n return newState;\n }\n\n case UPDATE_DATA_LEVEL_ATTRIBUTE: {\n newState = state.map((datalevel) => {\n let nDl = Object.assign({}, datalevel); // copies element\n let attrs = nDl.attributes.filter((attribute) => attribute.isEdit !== true);\n attrs.push(action.payload);\n return Object.assign({}, nDl, { attributes: attrs });\n });\n return newState;\n }\n case GET_PRODUCT_DATA_LEVELS: {\n newState = state.concat(action.payload || []);\n newState = newState.filter(\n (s, index, self) => index === self.findIndex((t) => t.id === s.id)\n );\n return newState;\n }\n default:\n return state;\n }\n};\n\nconst ProductHandle = (state = [], action) => {\n switch (action.type) {\n case TOGGLE_EDIT_PRODUCT:\n return state.map((product) =>\n product.id === action.id ? { ...product, isEdit: !(product.isEdit || false) } : product\n );\n case TOGGLE_PRODUCT_EXPAND:\n return state.map((product) =>\n product.id === action.id ? { ...product, collapse: !(product.collapse || false) } : product\n );\n case GET_PRODUCTS:\n return action.payload;\n case CREATE_PRODUCT:\n return [...state, action.payload];\n case DELETE_PRODUCT:\n let currentProduct1 = state.find((product) => product.id == action.id);\n //return state.filter(({ product }) => product.id !== action.id);\n return state.filter(({ product }) => currentProduct1.id !== action.id);\n case UPDATE_PRODUCT:\n return state;\n case ADD_PRODUCT_USER:\n let currentProduct = state.find((product) => product.id == action.id);\n if (action.payload && action.payload.is_edit_user_set)\n currentProduct.edit_user = action.payload.user;\n if (action.payload && action.payload.is_password_set)\n currentProduct.is_password_set = action.payload.is_password_set;\n\n return state.map((product) => (product.id === action.id ? { ...currentProduct } : product));\n case ADD_VIEW_PRODUCT_USER: {\n let currentProduct = state.find((product) => product.id == action.id);\n if (action.payload && action.payload.add_view_product_user) \n currentProduct.product_code = action.payload.product_code;\n if (action.payload && action.payload.add_view_product_user) \n currentProduct.password = action.payload.password;\n \n return state.map((product) => (product.id === action.id ? { ...currentProduct } : product)); \n }\n case GET_UPLOADED_DATA: {\n let currentProduct = state.find((product) => product.id == action.id);\n currentProduct.uploaded_data = action.payload;\n return state.map((product) => (product.id === action.id ? { ...currentProduct } : product));\n }\n case UPDATE_UPLOADED_DATA: {\n let currentProduct = state.find((product) => product.id == action.id);\n currentProduct.uploaded_data = action.payload;\n return state.map((product) => (product.id === action.id ? { ...currentProduct } : product));\n }\n\n default:\n return state;\n }\n};\n\nconst CategoryHandle = (state = { categories: [], sub_categories: [] }, action) => {\n switch (action.type) {\n case ADD_CATEGORIES:\n return action.payload;\n default:\n return state;\n }\n};\n\nconst AdukkuApp = combineReducers({\n products: ProductHandle,\n product_datalevels: DatalevelHandle,\n product_keys: product_keys,\n product_sets: product_sets,\n layouts: layouts,\n overlays: overlays,\n categories: CategoryHandle,\n orders: orders,\n});\nexport default AdukkuApp;\n","import { combineReducers } from \"redux\";\nimport {\n ADD_ALL_SETS,\n ADD_SET_KEYVALS,\n ADD_ALL_SUPPORTED_LAYOUTS\n} from \"../actions/product_sets\";\n\n// {\n// 1: { 1: { keyvals: [], dlvals: [], layouts: [] } }\n// }\nconst X = (state = {}, action) => {\n let newState = {};\n let product_id = null;\n let setno = null;\n let data = null;\n let product_set = null;\n let product_set_list = null;\n switch (action.type) {\n case ADD_ALL_SETS:\n let product_sets = action.payload.reduce((result, product_set) => {\n if (result[product_set.setno] == null) {\n result[product_set.setno] = {};\n }\n let dlvals = (product_set.dlvals || []).reduce((dlvalResult, dlval) => {\n if (dlvalResult[dlval.pageno] == null) {\n dlvalResult[dlval.pageno] = [];\n }\n dlvalResult[dlval.pageno].push(dlval);\n return dlvalResult;\n }, {});\n delete product_set.dlvals;\n product_set.dlvals = dlvals || {};\n\n let counts = (product_set.counts || []).reduce((countResult, count) => {\n if (count && countResult[count.dlname] == null) {\n countResult[count.dlname] = [];\n }\n if (count) {\n countResult[count.dlname].push(count);\n return countResult;\n }\n }, {});\n delete product_set.counts;\n product_set.counts = counts || {};\n result[product_set.setno] = product_set;\n return result;\n let layouts = (product_set.layouts || []).reduce(\n (layoutResult, layout) => {\n layoutResult[layout.pageno] = layout;\n return layoutResult;\n },\n {}\n );\n delete product_set.dlvals;\n delete product_set.layouts;\n product_set.layouts = layouts || {};\n product_set.dlvals = dlvals || {};\n result[product_set.setno] = product_set;\n return result;\n }, {});\n newState[action.id] = product_sets;\n return newState;\n case ADD_SET_KEYVALS:\n data = action.payload;\n setno = action.setno;\n product_id = action.id;\n product_set_list = Object.assign({}, state[product_id], {});\n product_set = product_set_list[setno];\n product_set.keyvals = product_set.keyvals.concat(data.keyvals).flat();\n data.dlvals = Object.values(product_set.dlvals)\n .concat(data.dlvals)\n .flat();\n let dlvals = data.dlvals.reduce((dlvalResult, dlval) => {\n if (dlvalResult[dlval.pageno] == null) {\n dlvalResult[dlval.pageno] = [];\n }\n dlvalResult[dlval.pageno].push(dlval);\n return dlvalResult;\n }, {});\n product_set.dlvals = dlvals;\n data.counts = Object.values(product_set.counts)\n .concat(data.counts)\n .flat();\n let counts = data.counts.reduce((countResult, count) => {\n if (countResult[count.dlname] == null) {\n countResult[count.dlname] = [];\n }\n countResult[count.dlname].push(count);\n return countResult;\n }, {});\n product_set.counts = counts;\n newState = {};\n newState[product_id] = product_set_list;\n return Object.assign({}, state, newState);\n case ADD_ALL_SUPPORTED_LAYOUTS:\n data = action.payload;\n setno = action.setno;\n newState[\n action.product_id + \"_set_\" + setno + \"_\" + action.pageno\n ] = data;\n return Object.assign({}, state, newState);\n default:\n return state;\n }\n};\nexport default X;\n","import { put, takeEvery, all, fork } from \"redux-saga/effects\";\nimport {\n createProductSaga,\n deleteProductSaga,\n cloneProductSaga,\n fetchProductsSaga,\n fetchDatalevelsSaga,\n toggleSaga,\n updateResourceSaga,\n createResourceSaga,\n fetchCategoriesSaga,\n updateProductSaga,\n productUserSaga,\n addViewProductUserSaga,\n getViewProductUserSaga,\n getUploadedDataSaga,\n updateUploadedDataSaga,\n} from \"./products.saga\";\nimport {\n fetchProductKeysSaga,\n createProductKeySaga,\n deleteProductKeySaga,\n} from \"./product_keys.saga\";\nimport {\n getProductSetsSaga,\n createProductSetSaga,\n deleteProductSetSaga,\n getProductSetsPlaceholdersSaga,\n updateProductSetKeySaga,\n createProductSetKeySaga,\n createProductSetDLValSaga,\n updateProductSetDLValSaga,\n createProductSetLayoutSaga,\n deleteProductSetLayoutSaga,\n getSupportedLayoutsSaga,\n createSetOcurrenceCountSaga,\n updateSetOcurrenceCountSaga,\n updateProductSetSaga,\n} from \"./product_sets.saga\";\nimport {\n getLayoutListSaga,\n createLayoutSaga,\n cloneLayoutSaga,\n deleteLayoutSaga,\n getLayoutDetailsSaga,\n createLyDlSaga,\n deleteLyDlSaga,\n createLyDlSlotForSaga,\n deleteLyDlSlotForSaga,\n createLyDLRelSaga,\n deleteLyDlRelSaga,\n createLyDLRelKeySaga,\n deleteLyDlRelKeySaga,\n updateLayoutSaga,\n} from \"./layouts.saga\";\nimport {\n fetchProductsSaga as ofetchProductsSaga,\n toggleSaga as otoggleSaga,\n getProductSetsSaga as ogetProductSetsSaga,\n fetchPriceSaga,\n generateImageSaga,\n fetchViewProductsSaga,\n shareProductSaga,\n addToCartSaga,\n getOrdersSaga,\n} from \"./orders.saga\";\nimport { updateSetOccurenceCount } from \"../actions/product_sets\";\nexport default function* rootSaga() {\n yield all([\n fork(fetchDatalevelsSaga),\n fork(fetchProductsSaga),\n fork(toggleSaga),\n fork(updateResourceSaga),\n fork(createResourceSaga),\n fork(fetchProductKeysSaga),\n fork(createProductKeySaga),\n fork(deleteProductKeySaga),\n fork(getProductSetsSaga),\n fork(createProductSetSaga),\n fork(deleteProductSetSaga),\n fork(updateProductSetSaga),\n fork(updateProductSetKeySaga),\n fork(createProductSetKeySaga),\n fork(updateProductSetDLValSaga),\n fork(createProductSetDLValSaga),\n fork(getProductSetsPlaceholdersSaga),\n fork(createProductSaga),\n fork(cloneProductSaga),\n fork(deleteProductSaga),\n fork(createProductSetLayoutSaga),\n fork(deleteProductSetLayoutSaga),\n fork(getSupportedLayoutsSaga),\n fork(getLayoutListSaga),\n fork(createLayoutSaga),\n fork(cloneLayoutSaga),\n fork(deleteLayoutSaga),\n fork(getLayoutDetailsSaga),\n fork(createLyDlSaga),\n fork(deleteLyDlSaga),\n fork(createLyDlSlotForSaga),\n fork(deleteLyDlSlotForSaga),\n fork(deleteLyDlRelSaga),\n fork(createLyDLRelSaga),\n fork(deleteLyDlRelKeySaga),\n fork(createLyDLRelKeySaga),\n fork(fetchCategoriesSaga),\n fork(updateProductSaga),\n fork(productUserSaga),\n fork(addViewProductUserSaga),\n fork(getViewProductUserSaga),\n fork(getUploadedDataSaga),\n fork(updateUploadedDataSaga),\n fork(createSetOcurrenceCountSaga),\n fork(updateSetOcurrenceCountSaga),\n fork(updateLayoutSaga),\n // fork(ofetchProductsSaga),\n // fork(otoggleSaga),\n fork(ogetProductSetsSaga),\n fork(fetchPriceSaga),\n fork(generateImageSaga),\n fork(fetchViewProductsSaga),\n fork(shareProductSaga),\n fork(addToCartSaga),\n fork(getOrdersSaga),\n ]);\n}\n","import { hideOverlay } from \"../actions/misc_actions\";\nimport { takeEvery } from \"redux-saga/effects\";\nimport { ENDPOINTS } from \"../constants/endpoints\";\nimport { put, call } from \"redux-saga/effects\";\nimport {\n getLayouts as getActionLayouts,\n getLayoutDetails,\n} from \"../actions/layouts\";\nimport {\n ADD_ALL_LAYOUTS,\n CREATE_PRODUCT_LAYOUT,\n DELETE_PRODUCT_LAYOUT,\n UPDATE_PRODUCT_LAYOUT,\n GET_PRODUCT_LAYOUTS,\n GET_LAYOUT_DETAILS,\n ADD_LAYOUT,\n CREATE_LY_DATALEVEL,\n DELETE_LY_DATALEVEL,\n CREATE_LY_DATALEVEL_REL,\n DELETE_LY_DATALEVEL_REL,\n CREATE_LY_DATALEVEL_REL_KEY,\n DELETE_LY_DATALEVEL_REL_KEY,\n CREATE_LY_SLOTFOR,\n DELETE_LY_SLOTFOR,\n CLONE_PRODUCT_LAYOUT,\n} from \"../actions/layouts\";\n\nfunction* getLayouts(action) {\n const apiCall = (action) => {\n let url =\n ENDPOINTS.layouts.list.uri +\n \"?product_id=\" +\n encodeURIComponent(action.id);\n return fetch(url, action.payload)\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n yield put(\n Object.assign({}, action, {\n type: ADD_ALL_LAYOUTS,\n payload: data.layouts,\n })\n );\n } catch (error) {\n throw error;\n }\n}\n\nfunction* getLayout(action) {\n const apiCall = (action) => {\n let url = ENDPOINTS.layouts.show.uri;\n url = url.replace(\":id\", action.id);\n return fetch(url, action.payload)\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n yield put(\n Object.assign({}, action, { type: ADD_LAYOUT, payload: data.layout })\n );\n } catch (error) {\n throw error;\n }\n}\n\nfunction* createLayout(action) {\n const apiCall = (action) => {\n let payload = action.payload;\n let url = action.url;\n url = url.replace(\":layout_id\", payload.layout_id);\n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: action.method,\n body: JSON.stringify(payload),\n });\n return ajaxCall\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n let payload = action.payload;\n const errors = data.errors;\n let overlay_id = payload.product_id + \"/layouts\";\n if (errors == null || errors.length == 0) {\n yield put(getActionLayouts(payload.product_id));\n yield put(hideOverlay(overlay_id));\n } else {\n setTimeout(function () {\n alert(errors.join(\"\\n\"));\n }, 100);\n }\n } catch (error) {\n throw error;\n }\n}\n\nfunction* updateLayout(action) {\n const apiCall = (action) => {\n let payload = action.payload;\n let url = action.url;\n url = url.replace(\":id\", action.id);\n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: action.method,\n body: JSON.stringify(payload),\n });\n return ajaxCall\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n let payload = action.payload;\n const errors = data.errors;\n let overlay_id = payload.product_id + \"/layouts\";\n if (errors == null || errors.length == 0) {\n yield put(getActionLayouts(payload.product_id));\n yield put(hideOverlay(overlay_id));\n } else {\n setTimeout(function () {\n alert(errors.join(\"\\n\"));\n }, 100);\n }\n } catch (error) {\n throw error;\n }\n}\n\nfunction* cloneLayout(action) {\n const apiCall = (action) => {\n let payload = action.payload;\n let url = action.url;\n url = url.replace(\":id\", payload.id);\n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: action.method,\n body: JSON.stringify(payload),\n });\n return ajaxCall\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n let payload = action.payload;\n const errors = data.errors;\n let overlay_id = payload.product_id + \"/layouts\";\n if (errors == null || errors.length == 0) {\n yield put(getActionLayouts(payload.product_id));\n yield put(hideOverlay(overlay_id));\n } else {\n setTimeout(function () {\n alert(errors.join(\"\\n\"));\n }, 100);\n }\n } catch (error) {\n throw error;\n }\n}\n\nfunction* deleteLayout(action) {\n const apiCall = (action) => {\n let payload = action.payload;\n let url = ENDPOINTS.layouts.show.uri;\n url = url.replace(\":id\", action.id);\n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: action.method,\n });\n return ajaxCall\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n let payload = action.payload;\n const errors = data.errors;\n let overlay_id = payload.product_id + \"/layouts\";\n if (errors == null || errors.length == 0) {\n yield put(getActionLayouts(payload.product_id));\n yield put(hideOverlay(overlay_id));\n } else {\n setTimeout(function () {\n alert(errors.join(\"\\n\"));\n }, 100);\n }\n } catch (error) {\n throw error;\n }\n}\n\nfunction* deleteLyDl(action) {\n const apiCall = (action) => {\n let payload = action.payload;\n let url = action.url;\n url = url.replace(\":layout_id\", payload.layout_id);\n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: action.method,\n body: JSON.stringify(payload),\n });\n return ajaxCall\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n let payload = action.payload;\n const errors = data.errors;\n if (errors == null || errors.length == 0) {\n yield put(getActionLayouts(payload.product_id));\n } else {\n setTimeout(function () {\n alert(errors.join(\"\\n\"));\n }, 100);\n }\n } catch (error) {\n throw error;\n }\n}\n\nfunction* createLyDL(action) {\n const apiCall = (action) => {\n let payload = action.payload;\n let url = action.url;\n url = url.replace(\":layout_id\", payload.layout_id);\n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: action.method,\n body: JSON.stringify(payload),\n });\n return ajaxCall\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n let payload = action.payload;\n const errors = data.errors;\n if (errors == null || errors.length == 0) {\n yield put(getLayoutDetails(payload.layout_id));\n } else {\n setTimeout(function () {\n alert(errors.join(\"\\n\"));\n }, 100);\n }\n } catch (error) {\n throw error;\n }\n}\n\nfunction* deleteLyDL(action) {\n const apiCall = (action) => {\n let payload = action.payload;\n let url = action.url;\n url = url.replace(\":layout_id\", payload.layout_id);\n url = url.replace(\":dlname\", payload.dlname);\n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: action.method,\n body: JSON.stringify(payload),\n });\n return ajaxCall\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n let payload = action.payload;\n const errors = data.errors;\n if (errors == null || errors.length == 0) {\n yield put(getLayoutDetails(payload.layout_id));\n } else {\n setTimeout(function () {\n alert(errors.join(\"\\n\"));\n }, 100);\n }\n } catch (error) {\n throw error;\n }\n}\n\nfunction* deleteLyDLRel(action) {\n const apiCall = (action) => {\n let payload = action.payload;\n let url = action.url;\n url = url.replace(\":layout_id\", payload.layout_id);\n url = url.replace(\":pdlname\", payload.pdlname);\n url = url.replace(\":cdlname\", payload.cdlname);\n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: action.method,\n body: JSON.stringify(payload),\n });\n return ajaxCall\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n let payload = action.payload;\n const errors = data.errors;\n if (errors == null || errors.length == 0) {\n yield put(getLayoutDetails(payload.layout_id));\n } else {\n setTimeout(function () {\n alert(errors.join(\"\\n\"));\n }, 100);\n }\n } catch (error) {\n throw error;\n }\n}\n\nfunction* createLyDLRel(action) {\n const apiCall = (action) => {\n let payload = action.payload;\n let url = action.url;\n url = url.replace(\":layout_id\", payload.layout_id);\n url = url.replace(\":pdlname\", payload.pdlname);\n url = url.replace(\":cdlname\", payload.cdlname);\n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: action.method,\n body: JSON.stringify(payload),\n });\n return ajaxCall\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n let payload = action.payload;\n const errors = data.errors;\n if (errors == null || errors.length == 0) {\n yield put(getActionLayouts(payload.product_id));\n yield put(getLayoutDetails(payload.layout_id));\n } else {\n setTimeout(function () {\n let err = errors.join(\"\\n\");\n err = err.replace(\"Relstyle\", \"Datalevel\")\n alert(err);\n }, 100);\n }\n } catch (error) {\n throw error;\n }\n}\n\nfunction* createLyDLSlotFor(action) {\n const apiCall = (action) => {\n let payload = action.payload;\n let url = action.url;\n url = url.replace(\":layout_id\", payload.layout_id);\n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: action.method,\n body: JSON.stringify(payload),\n });\n return ajaxCall\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n let payload = action.payload;\n const errors = data.errors;\n if (errors == null || errors.length == 0) {\n yield put(getLayoutDetails(payload.layout_id));\n } else {\n setTimeout(function () {\n alert(errors.join(\"\\n\"));\n }, 100);\n }\n } catch (error) {\n throw error;\n }\n}\n\nfunction* deleteLyDLSlotFor(action) {\n const apiCall = (action) => {\n let payload = action.payload;\n let url = action.url;\n url = url.replace(\":layout_id\", payload.layout_id);\n url = url.replace(\":dlname\", payload.dlname);\n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: action.method,\n body: JSON.stringify(payload),\n });\n return ajaxCall\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n let payload = action.payload;\n const errors = data.errors;\n if (errors == null || errors.length == 0) {\n yield put(getLayoutDetails(payload.layout_id));\n } else {\n setTimeout(function () {\n alert(errors.join(\"\\n\"));\n }, 100);\n }\n } catch (error) {\n throw error;\n }\n}\n\nexport function* createLayoutSaga() {\n yield takeEvery(CREATE_PRODUCT_LAYOUT, createLayout);\n}\n\nexport function* updateLayoutSaga() {\n yield takeEvery(UPDATE_PRODUCT_LAYOUT, updateLayout);\n}\n\nexport function* cloneLayoutSaga() {\n yield takeEvery(CLONE_PRODUCT_LAYOUT, cloneLayout);\n}\n\nexport function* deleteLayoutSaga() {\n yield takeEvery(DELETE_PRODUCT_LAYOUT, deleteLayout);\n}\n\nexport function* getLayoutListSaga() {\n yield takeEvery(GET_PRODUCT_LAYOUTS, getLayouts);\n}\n\nexport function* getLayoutDetailsSaga() {\n yield takeEvery(GET_LAYOUT_DETAILS, getLayout);\n}\n\nexport function* createLyDlSaga() {\n yield takeEvery(CREATE_LY_DATALEVEL, createLyDL);\n}\n\nexport function* deleteLyDlSaga() {\n yield takeEvery(DELETE_LY_DATALEVEL, deleteLyDL);\n}\n\nexport function* createLyDlSlotForSaga() {\n yield takeEvery(CREATE_LY_SLOTFOR, createLyDLSlotFor);\n}\n\nexport function* deleteLyDlSlotForSaga() {\n yield takeEvery(DELETE_LY_SLOTFOR, deleteLyDLSlotFor);\n}\n\nexport function* createLyDLRelSaga() {\n yield takeEvery(CREATE_LY_DATALEVEL_REL, createLyDLRel);\n}\n\nexport function* deleteLyDlRelSaga() {\n yield takeEvery(DELETE_LY_DATALEVEL_REL, deleteLyDLRel);\n}\n\nexport function* createLyDLRelKeySaga() {\n yield takeEvery(CREATE_LY_DATALEVEL_REL_KEY, createLyDLRel);\n}\n\nexport function* deleteLyDlRelKeySaga() {\n yield takeEvery(DELETE_LY_DATALEVEL_REL_KEY, deleteLyDLRel);\n}\n","import { GET_PRODUCTS, PRODUCTS, TOGGLE } from \"../actions\";\nimport {\n GET_PRICE,\n ADD_PRICE,\n GENERATE_IMAGE_SAGA,\n GENERATE_IMAGE,\n GET_VIEW_PRODUCTS,\n ADD_VIEW_PRODUCTS,\n SHARE_PRODUCT,\n ADD_SHARE_PRODUCT,\n ADD_TO_CART,\n ADD_TO_CART_SAGA,\n GET_ORDERS,\n GET_ORDERS_SAGA,\n} from \"../actions/orders\";\nimport { GET_PRODUCT_SETS } from \"../actions/product_sets\";\nimport { takeEvery } from \"redux-saga/effects\";\nimport { ENDPOINTS } from \"../constants/endpoints\";\nimport { put, call } from \"redux-saga/effects\";\n\nfunction* fetchProducts(action) {\n const apiCall = () => {\n return fetch(ENDPOINTS.products.list.uri + \"?type=orders\")\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n const apiCallViewProducts = () => {\n return fetch(ENDPOINTS.products.view.uri)\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const user_products = yield call(apiCall);\n const view_products = yield call(apiCallViewProducts);\n const products = view_products.products.concat(user_products.products);\n let p = {};\n\n products.map((pr) => {\n p[pr.id] = pr;\n });\n\n yield put({ type: GET_PRODUCTS, payload: Object.values(p) });\n } catch (error) {\n throw error;\n }\n}\n\nfunction* fetchViewProducts(action) {\n const apiCall = () => {\n return fetch(ENDPOINTS.products.view.uri)\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall);\n yield put({ type: ADD_VIEW_PRODUCTS, payload: data.products });\n } catch (error) {\n throw error;\n }\n}\n\nfunction* toggle(action) {\n yield put({ type: action.payload.reducerKey, id: action.payload.id });\n}\n\nfunction* getSets(action) {\n const apiCall = (action) => {\n let url = ENDPOINTS.sets.list.uri;\n url = url.replace(\":product_id\", action.id);\n return fetch(url)\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n yield put(\n Object.assign({}, action, {\n type: action.reducerKey,\n payload: data.product_sets,\n })\n );\n } catch (error) {\n throw error;\n }\n}\n\nfunction* fetchPrice(action) {\n const apiCall = (action) => {\n let url = ENDPOINTS.sets.price.uri;\n url = url.replace(\":product_id\", action.product_id);\n if (action.setno !== \"\") url = url + \"?setno=\" + action.setno;\n return fetch(url)\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n yield put(\n Object.assign({}, action, {\n type: ADD_PRICE,\n payload: data.pricing,\n })\n );\n } catch (error) {\n throw error;\n }\n}\n\nfunction* generateImage(action) {\n const apiCall = (action) => {\n let payload = action.payload;\n let url = ENDPOINTS.images.generate.uri;\n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: ENDPOINTS.images.generate.method,\n body: JSON.stringify(payload),\n });\n return ajaxCall\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n yield put({ type: GENERATE_IMAGE, payload: data });\n } catch (error) {\n throw error;\n }\n}\n\nfunction* shareProduct(action) {\n const apiCall = (action) => {\n let payload = action.payload;\n let url = ENDPOINTS.products.share.uri;\n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: ENDPOINTS.products.share.method,\n body: JSON.stringify(payload),\n });\n return ajaxCall\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n yield put({ type: ADD_SHARE_PRODUCT, payload: data });\n } catch (error) {\n throw error;\n }\n}\n\nfunction* addToCart(action) {\n const apiCall = (action) => {\n let payload = action.payload;\n let url = ENDPOINTS.orders.add_to_cart.uri;\n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: ENDPOINTS.orders.add_to_cart.method,\n body: JSON.stringify(payload),\n });\n return ajaxCall\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n yield put({ type: ADD_TO_CART, payload: data });\n } catch (error) {\n throw error;\n }\n}\n\nfunction* getOrders(action) {\n const apiCall = (action) => {\n let payload = action.payload;\n return fetch(ENDPOINTS.orders.list.uri + \"?status=\" + payload.status)\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n yield put({ type: GET_ORDERS, payload: data.orders });\n } catch (error) {\n throw error;\n }\n}\n\nexport function* fetchProductsSaga() {\n yield takeEvery(PRODUCTS, fetchProducts);\n}\n\nexport function* fetchViewProductsSaga() {\n yield takeEvery(GET_VIEW_PRODUCTS, fetchViewProducts);\n}\n\nexport function* toggleSaga() {\n yield takeEvery(TOGGLE, toggle);\n}\n\nexport function* getProductSetsSaga() {\n yield takeEvery(GET_PRODUCT_SETS, getSets);\n}\n\nexport function* fetchPriceSaga() {\n yield takeEvery(GET_PRICE, fetchPrice);\n}\n\nexport function* shareProductSaga() {\n yield takeEvery(SHARE_PRODUCT, shareProduct);\n}\n\nexport function* generateImageSaga() {\n yield takeEvery(GENERATE_IMAGE_SAGA, generateImage);\n}\n\nexport function* addToCartSaga() {\n yield takeEvery(ADD_TO_CART_SAGA, addToCart);\n}\n\nexport function* getOrdersSaga() {\n yield takeEvery(GET_ORDERS_SAGA, getOrders);\n}\n","import { all, fork } from \"redux-saga/effects\";\nimport {\n fetchProductsSaga,\n toggleSaga,\n getProductSetsSaga,\n fetchPriceSaga,\n generateImageSaga,\n fetchViewProductsSaga,\n shareProductSaga,\n addToCartSaga,\n getOrdersSaga\n} from \"./orders.saga\";\nimport { addToCart } from \"../actions/orders\";\n\nexport default function* rootSaga() {\n // getProductSetsSaga;\n yield all([\n fork(fetchProductsSaga),\n fork(toggleSaga),\n fork(getProductSetsSaga),\n fork(fetchPriceSaga),\n fork(generateImageSaga),\n fork(fetchViewProductsSaga),\n fork(shareProductSaga),\n fork(addToCartSaga),\n fork(getOrdersSaga)\n ]);\n}\n","import {\n GET_PRODUCT_KEYS\n ,CREATE_PRODUCT_KEY\n ,DELETE_PRODUCT_KEY\n ,DELETE_KEY\n ,ADD_KEY\n ,ADD_ALL_KEYS\n} from \"../actions/product_keys\";\nimport {takeEvery} from 'redux-saga/effects';\nimport {ENDPOINTS} from \"../constants/endpoints\";\nimport {put, call} from 'redux-saga/effects';\nimport { hideOverlay } from \"../actions/misc_actions\";\n\nfunction* fetchKeys(action) {\n const apiCall = (action) => {\n let url = ENDPOINTS.keys.list.uri;\n url = url.replace(\":product_id\", action.id);\n return fetch(url)\n .then(response => {\n return response.json()\n })\n .catch(error => {\n throw error;\n })\n };\n try {\n const data = yield call(apiCall, action);\n yield put(Object.assign({}, action, {type: action.reducerKey, payload: data.keys}));\n }\n catch (error) {\n throw error;\n }\n}\n\nfunction* createKey(action) {\n const apiCall = (action) => {\n let payload = action.payload;\n let url = action.url;\n url = url.replace(\":product_id\", payload.product_id);\n url = url.replace(\":dlname\", payload.dlname);\n let ajaxCall = fetch(url, \n { \n headers: {\n Accept: 'application/json',\n 'Content-Type': 'application/json'\n },\n method: action.method,\n body: JSON.stringify(payload)\n }\n );\n return ajaxCall.then(response => {\n return response.json()\n })\n .catch(error => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n let payload = action.payload;\n const errors = data.errors;\n if(errors == null || errors.length == 0)\n {\n yield* fetchKeys({ type: GET_PRODUCT_KEYS, id: payload.product_id, reducerKey: ADD_ALL_KEYS })\n yield put(hideOverlay(payload.product_id+\"/keys\"));\n }\n else\n {\n alert(errors.join(\"\\n\"));\n }\n }\n catch (error) {\n throw error;\n }\n}\n\nfunction* deleteKey(action) {\n const apiCall = (action) => {\n let payload = action.payload\n let url = action.url;\n url = url.replace(\":product_id\", payload.product_id);\n url = url.replace(\":dlname\", payload.dlname);\n let ajaxCall = fetch(url, \n { \n headers: {\n Accept: 'application/json',\n 'Content-Type': 'application/json'\n },\n method: action.method,\n body: JSON.stringify(payload)\n }\n );\n return ajaxCall.then(response => {\n return response.json()\n })\n .catch(error => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n let payload = action.payload;\n const errors = data.errors;\n if(errors == null || errors.length == 0)\n {\n yield* fetchKeys({ type: GET_PRODUCT_KEYS, id: payload.product_id, reducerKey: ADD_ALL_KEYS })\n }\n else\n {\n alert(errors.join(\"\\n\"));\n }\n }\n catch (error) {\n throw error;\n }\n}\n\n\nexport function* createProductKeySaga() {\n yield takeEvery(CREATE_PRODUCT_KEY, createKey);\n}\n\nexport function* deleteProductKeySaga() {\n yield takeEvery(DELETE_PRODUCT_KEY, deleteKey);\n}\n\nexport function* fetchProductKeysSaga() {\n yield takeEvery(GET_PRODUCT_KEYS, fetchKeys);\n}","import {\n GET_PRODUCT_SETS,\n CREATE_PRODUCT_SET,\n DELETE_PRODUCT_SET,\n DELETE_SET,\n ADD_SET,\n ADD_ALL_SETS,\n CREATE_PRODUCT_SET_KEY,\n UPDATE_PRODUCT_SET_KEY,\n CREATE_PRODUCT_SET_DLVAL,\n UPDATE_PRODUCT_SET_DLVAL,\n GET_PRODUCT_SET_PLACEHOLDERS,\n CREATE_PRODUCT_SET_LAYOUT,\n DELETE_PRODUCT_SET_LAYOUT,\n ADD_ALL_SUPPORTED_LAYOUTS,\n GET_SUPPORTED_PRODUCT_LAYOUTS,\n ADD_SET_OCCURENCE_COUNT,\n UPDATE_SET_OCCURENCE_COUNT,\n UPDATE_PRODUCT_SET,\n} from \"../actions/product_sets\";\nimport { hideOverlay } from \"../actions/misc_actions\";\nimport { getSetPlaceholders as getActionSetPlaceHolders } from \"../actions/product_sets\";\nimport { takeEvery } from \"redux-saga/effects\";\nimport { ENDPOINTS } from \"../constants/endpoints\";\nimport { put, call } from \"redux-saga/effects\";\n\nfunction* getSetPlaceholders(action) {\n const apiCall = (action) => {\n let url = ENDPOINTS.sets.placeholders.uri;\n url = url.replace(\":product_id\", action.id);\n url = url.replace(\":setno\", action.setno);\n return fetch(url)\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n yield put(\n Object.assign({}, action, {\n type: action.reducerKey,\n id: action.id,\n setno: action.setno,\n payload: data,\n })\n );\n } catch (error) {\n throw error;\n }\n}\n\nfunction* getSupportedLayouts(action) {\n const apiCall = (action) => {\n let uri = ENDPOINTS.sets.layout_supported.uri;\n let payload = action.payload;\n uri = uri.replace(\":product_id\", payload.product_id);\n uri = uri.replace(\":setno\", payload.setno);\n uri = uri.replace(\":pageno\", payload.pageno);\n return fetch(uri, action.payload)\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n let payload = action.payload;\n yield put(\n Object.assign({}, action, {\n type: ADD_ALL_SUPPORTED_LAYOUTS,\n payload: data.layouts,\n setno: payload.setno,\n pageno: payload.pageno,\n product_id: payload.product_id,\n })\n );\n } catch (error) {\n throw error;\n }\n}\n\nfunction* getSets(action) {\n const apiCall = (action) => {\n let url = ENDPOINTS.sets.list.uri;\n url = url.replace(\":product_id\", action.id);\n return fetch(url)\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n yield put(\n Object.assign({}, action, {\n type: action.reducerKey,\n payload: data.product_sets,\n })\n );\n } catch (error) {\n throw error;\n }\n}\n\nfunction* createSet(action) {\n const apiCall = (action) => {\n let payload = action.payload;\n let url = action.url;\n url = url.replace(\":product_id\", payload.product_id);\n url = url.replace(\":setno\", payload.setno);\n url = url.replace(\":keyname\", payload.keyname);\n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: action.method,\n body: JSON.stringify(payload),\n });\n return ajaxCall\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n let payload = action.payload;\n const errors = data.errors;\n if (errors == null || errors.length == 0) {\n yield put(hideOverlay(payload.product_id + \"_sets\"));\n yield* getSets({\n type: GET_PRODUCT_SETS,\n id: payload.product_id,\n reducerKey: ADD_ALL_SETS,\n });\n // yield put(getActionSetPlaceHolders(payload.product_id, payload.setno));\n } else {\n setTimeout(function () {\n alert(errors.join(\"\\n\"));\n }, 100);\n }\n } catch (error) {\n throw error;\n }\n}\n\nfunction* deleteSet(action) {\n const apiCall = (action) => {\n let payload = action.payload;\n let url = action.url;\n url = url.replace(\":product_id\", payload.product_id);\n url = url.replace(\":setno\", payload.setno);\n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: action.method,\n });\n return ajaxCall\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n let payload = action.payload;\n const errors = data.errors;\n if (errors == null || errors.length == 0) {\n yield put(hideOverlay(payload.product_id + \"_sets\"));\n yield* getSets({\n type: GET_PRODUCT_SETS,\n id: payload.product_id,\n reducerKey: ADD_ALL_SETS,\n });\n // yield put(getActionSetPlaceHolders(payload.product_id, payload.setno));\n } else {\n setTimeout(function () {\n alert(errors.join(\"\\n\"));\n }, 100);\n }\n } catch (error) {\n throw error;\n }\n}\n\nfunction* updateSet(action) {\n const apiCall = (action) => {\n let payload = action.payload;\n let url = action.url;\n url = url.replace(\":product_id\", payload.product_id);\n url = url.replace(\":setno\", action.id);\n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: action.method,\n body: JSON.stringify(payload),\n });\n return ajaxCall\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n let payload = action.payload;\n const errors = data.errors;\n if (errors == null || errors.length == 0) {\n yield put(hideOverlay(payload.product_id + \"_sets\"));\n yield* getSets({\n type: GET_PRODUCT_SETS,\n id: payload.product_id,\n reducerKey: ADD_ALL_SETS,\n });\n // yield put(getActionSetPlaceHolders(payload.product_id, payload.setno));\n } else {\n setTimeout(function () {\n alert(errors.join(\"\\n\"));\n }, 100);\n }\n } catch (error) {\n throw error;\n }\n}\n\nfunction* createSetKey(action) {\n const apiCall = (action) => {\n let payload = action.payload;\n let url = action.url;\n url = url.replace(\":product_id\", payload.product_id);\n url = url.replace(\":setno\", payload.setno);\n url = url.replace(\":keyname\", payload.keyname);\n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: action.method,\n body: JSON.stringify(payload),\n });\n return ajaxCall\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n let payload = action.payload;\n const errors = data.errors;\n if (errors == null || errors.length == 0) {\n yield put(hideOverlay(payload.product_id + \"/sets/\" + payload.setno + \"/\" + payload.keyname));\n yield* getSets({\n type: GET_PRODUCT_SETS,\n id: payload.product_id,\n reducerKey: ADD_ALL_SETS,\n });\n yield put(getActionSetPlaceHolders(payload.product_id, payload.setno));\n } else {\n setTimeout(function () {\n alert(errors.join(\"\\n\"));\n }, 100);\n }\n } catch (error) {\n throw error;\n }\n}\n\nfunction* createSetLayout(action) {\n const apiCall = (action) => {\n let payload = action.payload;\n let url = action.url;\n url = url.replace(\":product_id\", payload.product_id);\n url = url.replace(\":setno\", payload.setno);\n url = url.replace(\":pageno\", payload.pageno);\n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: action.method,\n body: JSON.stringify(payload),\n });\n return ajaxCall\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n let payload = action.payload;\n const errors = data.errors;\n if (errors == null || errors.length == 0) {\n yield put(\n hideOverlay(payload.product_id + \"_layout_\" + payload.setno + \"_\" + payload.keyname)\n );\n yield* getSets({\n type: GET_PRODUCT_SETS,\n id: payload.product_id,\n reducerKey: ADD_ALL_SETS,\n });\n yield put(getActionSetPlaceHolders(payload.product_id, payload.setno));\n } else {\n setTimeout(function () {\n alert(errors.join(\"\\n\"));\n }, 100);\n }\n } catch (error) {\n throw error;\n }\n}\n\nfunction* deleteSetLayout(action) {\n const apiCall = (action) => {\n let payload = action.payload;\n let url = action.url;\n url = url.replace(\":product_id\", payload.product_id);\n url = url.replace(\":setno\", payload.setno);\n url = url.replace(\":pageno\", payload.pageno);\n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: action.method,\n body: JSON.stringify(payload),\n });\n return ajaxCall\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n let payload = action.payload;\n const errors = data.errors;\n if (errors == null || errors.length == 0) {\n yield put(\n hideOverlay(payload.product_id + \"_layout_\" + payload.setno + \"_\" + payload.keyname)\n );\n yield* getSets({\n type: GET_PRODUCT_SETS,\n id: payload.product_id,\n reducerKey: ADD_ALL_SETS,\n });\n yield put(getActionSetPlaceHolders(payload.product_id, payload.setno));\n } else {\n setTimeout(function () {\n alert(errors.join(\"\\n\"));\n }, 100);\n }\n } catch (error) {\n throw error;\n }\n}\n\nfunction* updateSetKey(action) {\n const apiCall = (action) => {\n let payload = action.payload;\n let url = action.url;\n url = url.replace(\":product_id\", payload.product_id);\n url = url.replace(\":setno\", payload.setno);\n url = url.replace(\":keyname\", payload.keyname);\n url = url.replace(\":dlname\", payload.dlname);\n url = url.replace(\":pageno\", payload.pageno);\n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: action.method,\n body: JSON.stringify(payload),\n });\n return ajaxCall\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n let payload = action.payload;\n const errors = data.errors;\n if (errors == null || errors.length == 0) {\n yield put(hideOverlay(payload.product_id + \"/sets/\" + payload.setno + \"/\" + payload.keyname));\n yield* getSets({\n type: GET_PRODUCT_SETS,\n id: payload.product_id,\n reducerKey: ADD_ALL_SETS,\n });\n yield put(getActionSetPlaceHolders(payload.product_id, payload.setno));\n } else {\n setTimeout(function () {\n alert(errors.join(\"\\n\"));\n }, 100);\n }\n } catch (error) {\n throw error;\n }\n}\n\nfunction* createSetDLVal(action) {\n const apiCall = (action) => {\n let payload = action.payload;\n let url = action.url;\n url = url.replace(\":product_id\", payload.product_id);\n url = url.replace(\":setno\", payload.setno);\n url = url.replace(\":pageno\", payload.pageno);\n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: action.method,\n body: JSON.stringify(payload),\n });\n return ajaxCall\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n let payload = action.payload;\n const errors = data.errors;\n if (errors == null || errors.length == 0) {\n yield put(hideOverlay(data.dlval.id));\n yield* getSets({\n type: GET_PRODUCT_SETS,\n id: payload.product_id,\n reducerKey: ADD_ALL_SETS,\n });\n yield put(getActionSetPlaceHolders(payload.product_id, payload.setno));\n } else {\n setTimeout(function () {\n alert(errors.join(\"\\n\"));\n }, 100);\n }\n } catch (error) {\n throw error;\n }\n}\n\nfunction* updateSetDLVal(action) {\n const apiCall = (action) => {\n let payload = action.payload;\n let url = action.url;\n url = url.replace(\":product_id\", payload.product_id);\n url = url.replace(\":setno\", payload.setno);\n url = url.replace(\":pageno\", payload.pageno);\n url = url.replace(\":dlname\", payload.dlname);\n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: action.method,\n body: JSON.stringify(payload),\n });\n return ajaxCall\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n let payload = action.payload;\n const errors = data.errors;\n if (errors == null || errors.length == 0) {\n yield put(hideOverlay(data.dlval.id));\n yield* getSets({\n type: GET_PRODUCT_SETS,\n id: payload.product_id,\n reducerKey: ADD_ALL_SETS,\n });\n yield put(getActionSetPlaceHolders(payload.product_id, payload.setno));\n } else {\n setTimeout(function () {\n alert(errors.join(\"\\n\"));\n }, 100);\n }\n } catch (error) {\n throw error;\n }\n}\n\nfunction* deleteSetUnused(action) {\n const apiCall = (action) => {\n let payload = action.payload;\n let url = action.url;\n url = url.replace(\":product_id\", payload.product_id);\n url = url.replace(\":dlname\", payload.dlname);\n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: action.method,\n body: JSON.stringify(payload),\n });\n return ajaxCall\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n let payload = action.payload;\n const errors = data.errors;\n if (errors == null || errors.length == 0) {\n yield* fetchKeys({\n type: GET_PRODUCT_SETS,\n id: payload.product_id,\n reducerKey: ADD_ALL_SETS,\n });\n } else {\n alert(errors.join(\"\\n\"));\n }\n } catch (error) {\n throw error;\n }\n}\n\nfunction* createProductSetLayout(action) {\n const apiCall = (action) => {\n let payload = action.payload;\n let url = action.url;\n url = url.replace(\":product_id\", payload.product_id);\n url = url.replace(\":setno\", payload.setno);\n url = url.replace(\":keyname\", payload.keyname);\n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: action.method,\n body: JSON.stringify(payload),\n });\n return ajaxCall\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n let payload = action.payload;\n const errors = data.errors;\n let overlay_id =\n \"product_\" + action.product_id + \"_\" + \"layout_\" + payload.setno + \"_\" + payload.pageno;\n if (errors == null || errors.length == 0) {\n yield put(hideOverlay(overlay_id));\n yield* getSets({\n type: GET_PRODUCT_SETS,\n id: payload.product_id,\n reducerKey: ADD_ALL_SETS,\n });\n yield put(getActionSetPlaceHolders(payload.product_id, payload.setno));\n } else {\n setTimeout(function () {\n alert(errors.join(\"\\n\"));\n }, 100);\n }\n } catch (error) {\n throw error;\n }\n}\n\nfunction* createSetOccurenceCount(action) {\n const apiCall = (action) => {\n let payload = action.payload;\n let url = action.url;\n url = url.replace(\":product_id\", payload.product_id);\n url = url.replace(\":setno\", payload.setno);\n // url = url.replace(\":dlname\", payload.dlname);\n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: action.method,\n body: JSON.stringify(payload),\n });\n return ajaxCall\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n let payload = action.payload;\n const errors = data.errors;\n if (errors == null || errors.length == 0) {\n yield put(\n hideOverlay(payload.product_id + \"/sets/\" + payload.setno + \"/counts/\" + payload.dlname)\n );\n yield* getSets({\n type: GET_PRODUCT_SETS,\n id: payload.product_id,\n reducerKey: ADD_ALL_SETS,\n });\n yield put(getActionSetPlaceHolders(payload.product_id, payload.setno));\n } else {\n setTimeout(function () {\n alert(errors.join(\"\\n\"));\n }, 100);\n }\n } catch (error) {\n throw error;\n }\n}\nfunction* updateSetOccurenceCount(action) {\n const apiCall = (action) => {\n let payload = action.payload;\n let url = action.url;\n url = url.replace(\":product_id\", payload.product_id);\n url = url.replace(\":setno\", payload.setno);\n url = url.replace(\":dlname\", payload.dlname);\n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: action.method,\n body: JSON.stringify(payload),\n });\n return ajaxCall\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n let payload = action.payload;\n const errors = data.errors;\n if (errors == null || errors.length == 0) {\n yield put(\n hideOverlay(payload.product_id + \"/sets/\" + payload.setno + \"/counts/\" + payload.dlname)\n );\n yield* getSets({\n type: GET_PRODUCT_SETS,\n id: payload.product_id,\n reducerKey: ADD_ALL_SETS,\n });\n yield put(getActionSetPlaceHolders(payload.product_id, payload.setno));\n } else {\n setTimeout(function () {\n alert(errors.join(\"\\n\"));\n }, 100);\n }\n } catch (error) {\n throw error;\n }\n}\n\nexport function* createProductSetSaga() {\n yield takeEvery(CREATE_PRODUCT_SET, createSet);\n}\n\nexport function* createProductSetKeySaga() {\n yield takeEvery(CREATE_PRODUCT_SET_KEY, createSetKey);\n}\n\nexport function* createProductSetLayoutSaga() {\n yield takeEvery(CREATE_PRODUCT_SET_LAYOUT, createSetLayout);\n}\n\nexport function* deleteProductSetLayoutSaga() {\n yield takeEvery(DELETE_PRODUCT_SET_LAYOUT, deleteSetLayout);\n}\n\nexport function* updateProductSetKeySaga() {\n yield takeEvery(UPDATE_PRODUCT_SET_KEY, updateSetKey);\n}\n\nexport function* createProductSetDLValSaga() {\n yield takeEvery(CREATE_PRODUCT_SET_DLVAL, createSetKey);\n}\n\nexport function* updateProductSetDLValSaga() {\n yield takeEvery(UPDATE_PRODUCT_SET_DLVAL, updateSetKey);\n}\n\nexport function* deleteProductSetSaga() {\n yield takeEvery(DELETE_PRODUCT_SET, deleteSet);\n}\n\nexport function* updateProductSetSaga() {\n yield takeEvery(UPDATE_PRODUCT_SET, updateSet);\n}\n\nexport function* getProductSetsSaga() {\n yield takeEvery(GET_PRODUCT_SETS, getSets);\n}\n\nexport function* getProductSetsPlaceholdersSaga() {\n yield takeEvery(GET_PRODUCT_SET_PLACEHOLDERS, getSetPlaceholders);\n}\n\nexport function* getSupportedLayoutsSaga() {\n yield takeEvery(GET_SUPPORTED_PRODUCT_LAYOUTS, getSupportedLayouts);\n}\n\nexport function* createSetOcurrenceCountSaga() {\n yield takeEvery(ADD_SET_OCCURENCE_COUNT, createSetOccurenceCount);\n}\nexport function* updateSetOcurrenceCountSaga() {\n yield takeEvery(UPDATE_SET_OCCURENCE_COUNT, updateSetOccurenceCount);\n}\n","import {\n GET_PRODUCTS,\n PRODUCTS,\n GET_PRODUCT_DATA_LEVELS,\n PRODUCT_DATA_LEVELS,\n TOGGLE,\n UPDATE_OR_DELETE_RESOURCE,\n CREATE_RESOURCE,\n CREATE_PRODUCT,\n CLEAR_PRODUCT_DATA_LEVELS,\n GET_CATEGORIES,\n ADD_CATEGORIES,\n UPDATE_PRODUCT,\n UPDATE_PRODUCT_SAGA,\n DELETE_PRODUCT,\n DELETE_PRODUCT_SAGA,\n ADD_PRODUCT_USER,\n PRODUCT_USER,\n ADD_VIEW_PRODUCT_USER,\n GET_VIEW_PRODUCT_USER,\n GET_UPLOADED_DATA,\n GET_UPLOADED_DATA_SAGA,\n UPDATE_UPLOADED_DATA,\n UPDATE_UPLOADED_DATA_SAGA,\n CLONE_PRODUCT,\n DELETE_PRODUCT_DATA_LEVEL,\n TOGGLE_PRODUCT_EXPAND,\n} from \"../actions\";\nimport { getSets } from \"../actions/product_sets\";\nimport { getKeys } from \"../actions/product_keys\";\nimport { hideOverlay } from \"../actions/misc_actions\";\nimport { getProducts, getProductDatalevels } from \"../actions\";\nimport { takeEvery } from \"redux-saga/effects\";\nimport { ENDPOINTS } from \"../constants/endpoints\";\nimport { put, call } from \"redux-saga/effects\";\n\n// todo common logic for fetching end points\nfunction* fetchDatalevels(action) {\n const apiCall = (action) => {\n let url = ENDPOINTS.datalevels.list.uri;\n url = url.replace(\":id\", action.product_id);\n return fetch(url)\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n yield put({ type: GET_PRODUCT_DATA_LEVELS, payload: data.datalevels });\n } catch (error) {\n throw error;\n }\n}\n\nfunction* fetchProducts(action) {\n const apiCall = () => {\n return fetch(ENDPOINTS.products.list.uri + \"?type=\" + action.products_type)\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall);\n yield put({ type: GET_PRODUCTS, payload: data.products });\n } catch (error) {\n throw error;\n }\n}\n\nfunction* updateResource(action) {\n const apiCall = (action) => {\n const endpoint = ENDPOINTS[action.resource][action.method];\n const url = action.id == null ? endpoint.uri : endpoint.uri + action.id;\n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: endpoint.method,\n body: JSON.stringify(action.payload || {}),\n });\n return ajaxCall\n .then((response) => {\n if (response.status===400) {\n alert(\"Action not performed. Entity in use\")\n window.location.reload()\n }\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n let data = null;\n let product_id = null;\n try {\n data = yield call(apiCall, action);\n data.attribute = data.attribute || {};\n data.datalevel = data.datalevel || {};\n data.datalevel.attribute = data.datalevel.attribute || {};\n if (data.errors == null || data.errors.length == 0) {\n yield put({ type: DELETE_PRODUCT_DATA_LEVEL, id: action.id });\n yield put({ type: action.payload.reducerKey, id: action.id });\n product_id =\n data.product_id || data.attribute.product_id || data.datalevel.attribute.product_id;\n } else {\n alert(data.errors.join(\"\\n\"));\n }\n } catch (error) {\n console.error(error);\n }\n try {\n if (product_id) {\n yield push(getProductDatalevels(product_id));\n yield put(getKeys(product_id));\n yield put(getSets(product_id));\n }\n } catch (error) {\n console.error(error);\n // alert(\"Error -> \" + error.message);\n }\n}\n\nfunction* createResource(action) {\n const apiCall = (action) => {\n const endpoint = ENDPOINTS[action.resource][\"create\"];\n const url = endpoint.uri + action.id;\n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: endpoint.method,\n body: JSON.stringify(action.payload || {}),\n });\n return ajaxCall\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n let data = null;\n let product_id = null;\n try {\n data = yield call(apiCall, action);\n data.attribute = data.attribute || {};\n data.datalevel = data.datalevel || {};\n data.datalevel.attribute = data.datalevel.attribute || {};\n if (data.errors == null || data.errors.length == 0) {\n product_id =\n data.product_id || data.attribute.product_id || data.datalevel.attribute.product_id;\n yield put(\n Object.assign({}, action, {\n type: action.payload.reducerKey,\n payload: data,\n })\n );\n } else {\n alert(data.errors.join(\"\\n\"));\n }\n } catch (error) {\n console.error(error);\n console.error(error);\n // alert(\"Error -> \"+error.message);\n }\n try {\n if (product_id) {\n yield put(getKeys(product_id));\n yield put(getSets(product_id));\n yield push(getProductDatalevels(product_id));\n }\n } catch (error) {\n console.error(error);\n // alert(\"Error -> \" + error.message);\n }\n}\n\nfunction* createProduct(action) {\n const apiCall = (action) => {\n let payload = action.payload;\n let url = action.url;\n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: action.method,\n body: JSON.stringify(payload),\n });\n return ajaxCall\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n const errors = data.errors;\n if (errors == null || errors.length == 0) {\n yield* fetchProducts({});\n yield put(hideOverlay(\"addProduct\"));\n } else {\n setTimeout(function () {\n alert(errors.join(\"\\n\"));\n }, 100);\n yield* fetchProducts({});\n yield put(hideOverlay(\"addProduct\"));\n }\n } catch (error) {\n throw error;\n }\n}\n\nfunction* cloneProduct(action) {\n const apiCall = (action) => {\n let payload = action.payload;\n let url = action.url;\n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: action.method,\n body: JSON.stringify(payload),\n });\n return ajaxCall\n .then((response) => {\n alert(\"Product copied successfully to 'My Products' under 'Dashboard'\");\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n const errors = data.errors;\n if (errors == null || errors.length == 0) {\n yield* fetchProducts({});\n yield put(hideOverlay(\"addProduct\"));\n } else {\n setTimeout(function () {\n alert(errors.join(\"\\n\"));\n }, 100);\n }\n // const data = yield call(apiCall, action);\n // const errors = data.errors;\n // if (\n // (errors == null || errors.length == 0) &&\n // payload.cloneType != \"preset\"\n // ) {\n // yield* fetchProducts({});\n // yield put(hideOverlay(\"addProduct\"));\n // } else {\n // setTimeout(function () {\n // alert(errors.join(\"\\n\"));\n // }, 100);\n // }\n } catch (error) {\n throw error;\n }\n}\n\nfunction* deleteProduct(action) {\n const apiCall = (action) => {\n let payload = action.payload;\n let url = action.url;\n url = url.replace(\":id\", action.payload.id);\n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: action.method,\n body: JSON.stringify(payload),\n });\n return ajaxCall\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n const errors = data.errors;\n if (errors == null || errors.length == 0) {\n yield put({ type: DELETE_PRODUCT, id: action.id });\n yield* fetchProducts({});\n } else {\n setTimeout(function () {\n alert(errors.join(\"\\n\"));\n }, 100);\n }\n } catch (error) {\n throw error;\n }\n}\n\nfunction* fetchCategories(action) {\n const apiCall = () => {\n return fetch(ENDPOINTS.categories.index.uri)\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall);\n yield put({\n type: ADD_CATEGORIES,\n payload: { categories: data.categories, sub_categories: data.sub_categories },\n });\n } catch (error) {\n throw error;\n }\n}\n\nfunction* updateProduct(action) {\n const apiCall = (action) => {\n let payload = action.payload;\n let url = action.url;\n let ajaxCall = fetch(url + action.id, {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: action.method,\n body: JSON.stringify(payload),\n });\n return ajaxCall\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n const errors = data.errors;\n if (errors == null || errors.length == 0) {\n if (data.product.product_state !== \"batch_process\") {\n yield put({ type: UPDATE_PRODUCT, payload: data, id: action.id });\n yield* fetchProducts({});\n yield put({ type: TOGGLE_PRODUCT_EXPAND, id: action.id });\n } else {\n yield put({ type: DELETE_PRODUCT, id: action.id });\n yield* fetchProducts({});\n }\n // yield* fetchProducts(null);\n // yield put(hideOverlay(\"addProduct\"));\n } else {\n setTimeout(function () {\n alert(errors.join(\"\\n\"));\n }, 100);\n }\n } catch (error) {\n throw error;\n }\n}\n\nfunction* toggle(action) {\n yield put({ type: action.payload.reducerKey, id: action.payload.id });\n}\n\nfunction* productUser(action) {\n const apiCall = (action) => {\n let payload = action.payload;\n let url = ENDPOINTS.products.add_user.uri;\n url = url.replace(\":id\", action.payload.product_id);\n //console.log(\"Payload = \" + payload);\n //console.log(\"url = \" + url);\n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: ENDPOINTS.products.add_user.method,\n body: JSON.stringify(payload),\n });\n return ajaxCall\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n yield put({\n type: ADD_PRODUCT_USER,\n payload: data,\n id: action.payload.product_id,\n });\n } catch (error) {\n throw error;\n }\n}\n\n// Bala start\n\nfunction* addViewProductUser(action) {\n const apiCall = (action) => {\n let payload = action.payload;\n let url = ENDPOINTS.products.add_view_product_user.uri;\n url = url.replace(\":id\", action.payload.product_id);\n //console.log(\"Payload = \" + payload);\n //console.log(\"url = \" + url);\n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: ENDPOINTS.products.add_view_product_user.method,\n body: JSON.stringify(payload),\n });\n return ajaxCall\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n yield put({\n type: ADD_VIEW_PRODUCT_USER,\n payload: data,\n id: action.payload.product_id,\n });\n } catch (error) {\n throw error;\n }\n}\n\n\nfunction* getViewProductUser(action) {\n const apiCall = (action) => {\n let payload = action.payload;\n let url = ENDPOINTS.products.get_view_product_user.uri;\n url = url.replace(\":id\", action.payload.product_id);\n //console.log(\"Payload = \" + payload);\n //console.log(\"url = \" + url);\n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: ENDPOINTS.products.get_view_product_user.method,\n body: JSON.stringify(payload),\n });\n return ajaxCall\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n yield put({\n type: GET_VIEW_PRODUCT_USER,\n payload: data,\n id: action.payload.product_id,\n });\n } catch (error) {\n throw error;\n }\n}\n\n\n// Bala end\n\nfunction* getUploadedData(action) { \n const apiCall = (action) => {\n let url = ENDPOINTS.csv.list.uri;\n url = url.replace(\":product_id\", action.product_id);\n url = url.replace(\":dlname\", action.dlname);\n url = url + `?page=${action.page || 0}&per_page=${action.per_page || 10}`;\n if (action.is_search) {\n let searchAtt = Object.keys(action.search_data || {});\n if (searchAtt.length > 0) {\n url = url + `&search=true`;\n for (let index = 0; index < searchAtt.length; index++) {\n let attribute = searchAtt[index];\n url = url + `&${attribute}=${action.search_data[attribute]}`;\n }\n }\n }\n let ajaxCall = fetch(url, {\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: ENDPOINTS.csv.list.method,\n });\n return ajaxCall\n .then((response) => {\n return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n if (data.no_results) {\n alert(\"No Matching results\");\n }\n yield put({\n type: GET_UPLOADED_DATA,\n payload: data,\n id: action.product_id,\n });\n } catch (error) {\n throw error;\n }\n}\n\nfunction* updateUploadedData(action) { \n const apiCall = (action) => {\n let url = ENDPOINTS.csv.update.uri;\n url = url.replace(\":product_id\", action.product_id);\n url = url.replace(\":dlname\", action.dlname);\n url = url.replace(\":data_upload_id\", action.id);\n let ajaxCall = fetch(url, {\n method: ENDPOINTS.csv.update.method,\n body: action.data, // JSON.stringify(action.data || {})\n });\n return ajaxCall\n .then((response) => response.json())\n .then((response) => {\n if (response.errors) {\n alert(\"File size is in excess of 5MB\\n\\nPlease Upload file again with size less than 5MB\\n\\nReturning to Dashboard\");\n window.location.reload(false);\n } \n // return response.json();\n })\n .catch((error) => {\n throw error;\n });\n };\n try {\n const data = yield call(apiCall, action);\n yield* getUploadedData(action);\n // yield put({\n // type: GET_UPLOADED_DATA,\n // payload: data,\n // id: action.product_id,\n // });\n } catch (error) {\n throw error;\n }\n}\n\nexport function* fetchDatalevelsSaga() {\n yield takeEvery(PRODUCT_DATA_LEVELS, fetchDatalevels);\n}\nexport function* fetchProductsSaga() {\n yield takeEvery(PRODUCTS, fetchProducts);\n}\n\nexport function* toggleSaga() {\n yield takeEvery(TOGGLE, toggle);\n}\n\nexport function* updateResourceSaga() {\n yield takeEvery(UPDATE_OR_DELETE_RESOURCE, updateResource);\n}\n\nexport function* createResourceSaga() {\n yield takeEvery(CREATE_RESOURCE, createResource);\n}\n\nexport function* createProductSaga() {\n yield takeEvery(CREATE_PRODUCT, createProduct);\n}\n\nexport function* cloneProductSaga() {\n yield takeEvery(CLONE_PRODUCT, cloneProduct);\n}\n\nexport function* deleteProductSaga() {\n yield takeEvery(DELETE_PRODUCT_SAGA, deleteProduct);\n}\n\nexport function* fetchCategoriesSaga() {\n yield takeEvery(GET_CATEGORIES, fetchCategories);\n}\n\nexport function* updateProductSaga() {\n yield takeEvery(UPDATE_PRODUCT_SAGA, updateProduct);\n}\n\nexport function* productUserSaga() {\n yield takeEvery(PRODUCT_USER, productUser);\n}\n\nexport function* viewProductSaga() {\n yield takeEvery(VIEW_PRODUCT, productUser);\n}\n\nexport function* addViewProductUserSaga() {\n yield takeEvery(ADD_VIEW_PRODUCT_USER, addViewProductUser);\n}\n\nexport function* getViewProductUserSaga() {\n yield takeEvery(GET_VIEW_PRODUCT_USER, getViewProductUser);\n}\n\nexport function* getUploadedDataSaga() {\n yield takeEvery(GET_UPLOADED_DATA_SAGA, getUploadedData);\n}\n\nexport function* updateUploadedDataSaga() {\n yield takeEvery(UPDATE_UPLOADED_DATA_SAGA, updateUploadedData);\n}\n","module.exports = require(\"core-js/library/fn/array/from\");","module.exports = require(\"core-js/library/fn/array/is-array\");","module.exports = require(\"core-js/library/fn/object/assign\");","module.exports = require(\"core-js/library/fn/object/entries\");","module.exports = require(\"core-js/library/fn/object/values\");","module.exports = require(\"core-js/library/fn/parse-int\");","function _assertThisInitialized(e) {\n if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return e;\n}\nmodule.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _assertThisInitialized(e) {\n if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return e;\n}\nexport { _assertThisInitialized as default };","import _Object$assign from \"core-js/library/fn/object/assign.js\";\nfunction _extends() {\n return _extends = _Object$assign ? _Object$assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, _extends.apply(null, arguments);\n}\nexport { _extends as default };","import _Object$create from \"core-js/library/fn/object/create.js\";\nimport setPrototypeOf from \"./setPrototypeOf.js\";\nfunction _inheritsLoose(t, o) {\n t.prototype = _Object$create(o.prototype), t.prototype.constructor = t, setPrototypeOf(t, o);\n}\nexport { _inheritsLoose as default };","function _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (-1 !== e.indexOf(n)) continue;\n t[n] = r[n];\n }\n return t;\n}\nexport { _objectWithoutPropertiesLoose as default };","import _Object$setPrototypeOf from \"core-js/library/fn/object/set-prototype-of.js\";\nfunction _setPrototypeOf(t, e) {\n return _setPrototypeOf = _Object$setPrototypeOf ? _Object$setPrototypeOf.bind() : function (t, e) {\n return t.__proto__ = e, t;\n }, _setPrototypeOf(t, e);\n}\nexport { _setPrototypeOf as default };","var _Object$assign = require(\"core-js/library/fn/object/assign.js\");\nfunction _extends() {\n return module.exports = _extends = _Object$assign ? _Object$assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _extends.apply(null, arguments);\n}\nmodule.exports = _extends, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _Object$create = require(\"core-js/library/fn/object/create.js\");\nvar setPrototypeOf = require(\"./setPrototypeOf.js\");\nfunction _inheritsLoose(t, o) {\n t.prototype = _Object$create(o.prototype), t.prototype.constructor = t, setPrototypeOf(t, o);\n}\nmodule.exports = _inheritsLoose, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _interopRequireDefault(e) {\n return e && e.__esModule ? e : {\n \"default\": e\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nvar _WeakMap = require(\"core-js/library/fn/weak-map.js\");\nvar _Object$defineProperty = require(\"core-js/library/fn/object/define-property.js\");\nvar _Object$getOwnPropertyDescriptor = require(\"core-js/library/fn/object/get-own-property-descriptor.js\");\nfunction _getRequireWildcardCache(e) {\n if (\"function\" != typeof _WeakMap) return null;\n var r = new _WeakMap(),\n t = new _WeakMap();\n return (_getRequireWildcardCache = function _getRequireWildcardCache(e) {\n return e ? t : r;\n })(e);\n}\nfunction _interopRequireWildcard(e, r) {\n if (!r && e && e.__esModule) return e;\n if (null === e || \"object\" != _typeof(e) && \"function\" != typeof e) return {\n \"default\": e\n };\n var t = _getRequireWildcardCache(r);\n if (t && t.has(e)) return t.get(e);\n var n = {\n __proto__: null\n },\n a = _Object$defineProperty && _Object$getOwnPropertyDescriptor;\n for (var u in e) if (\"default\" !== u && {}.hasOwnProperty.call(e, u)) {\n var i = a ? _Object$getOwnPropertyDescriptor(e, u) : null;\n i && (i.get || i.set) ? _Object$defineProperty(n, u, i) : n[u] = e[u];\n }\n return n[\"default\"] = e, t && t.set(e, n), n;\n}\nmodule.exports = _interopRequireWildcard, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (-1 !== e.indexOf(n)) continue;\n t[n] = r[n];\n }\n return t;\n}\nmodule.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _Object$setPrototypeOf = require(\"core-js/library/fn/object/set-prototype-of.js\");\nfunction _setPrototypeOf(t, e) {\n return module.exports = _setPrototypeOf = _Object$setPrototypeOf ? _Object$setPrototypeOf.bind() : function (t, e) {\n return t.__proto__ = e, t;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _setPrototypeOf(t, e);\n}\nmodule.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _Symbol = require(\"core-js/library/fn/symbol/index.js\");\nvar _Symbol$iterator = require(\"core-js/library/fn/symbol/iterator.js\");\nfunction _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return module.exports = _typeof = \"function\" == typeof _Symbol && \"symbol\" == typeof _Symbol$iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof _Symbol && o.constructor === _Symbol && o !== _Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _arrayLikeToArray(r, a) {\n (null == a || a > r.length) && (a = r.length);\n for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n return n;\n}\nmodule.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _arrayWithHoles(r) {\n if (Array.isArray(r)) return r;\n}\nmodule.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\nfunction _arrayWithoutHoles(r) {\n if (Array.isArray(r)) return arrayLikeToArray(r);\n}\nmodule.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _assertThisInitialized(e) {\n if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return e;\n}\nmodule.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _classCallCheck(a, n) {\n if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\");\n}\nmodule.exports = _classCallCheck, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var toPropertyKey = require(\"./toPropertyKey.js\");\nfunction _defineProperties(e, r) {\n for (var t = 0; t < r.length; t++) {\n var o = r[t];\n o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o);\n }\n}\nfunction _createClass(e, r, t) {\n return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", {\n writable: !1\n }), e;\n}\nmodule.exports = _createClass, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var getPrototypeOf = require(\"./getPrototypeOf.js\");\nvar isNativeReflectConstruct = require(\"./isNativeReflectConstruct.js\");\nvar possibleConstructorReturn = require(\"./possibleConstructorReturn.js\");\nfunction _createSuper(t) {\n var r = isNativeReflectConstruct();\n return function () {\n var e,\n o = getPrototypeOf(t);\n if (r) {\n var s = getPrototypeOf(this).constructor;\n e = Reflect.construct(o, arguments, s);\n } else e = o.apply(this, arguments);\n return possibleConstructorReturn(this, e);\n };\n}\nmodule.exports = _createSuper, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var toPropertyKey = require(\"./toPropertyKey.js\");\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _arrayLikeToArray(r, a) {\n (null == a || a > r.length) && (a = r.length);\n for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n return n;\n}\nexport { _arrayLikeToArray as default };","function _arrayWithHoles(r) {\n if (Array.isArray(r)) return r;\n}\nexport { _arrayWithHoles as default };","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nfunction _arrayWithoutHoles(r) {\n if (Array.isArray(r)) return arrayLikeToArray(r);\n}\nexport { _arrayWithoutHoles as default };","function _assertThisInitialized(e) {\n if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return e;\n}\nexport { _assertThisInitialized as default };","function _classCallCheck(a, n) {\n if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\");\n}\nexport { _classCallCheck as default };","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(e, r) {\n for (var t = 0; t < r.length; t++) {\n var o = r[t];\n o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o);\n }\n}\nfunction _createClass(e, r, t) {\n return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", {\n writable: !1\n }), e;\n}\nexport { _createClass as default };","import getPrototypeOf from \"./getPrototypeOf.js\";\nimport isNativeReflectConstruct from \"./isNativeReflectConstruct.js\";\nimport possibleConstructorReturn from \"./possibleConstructorReturn.js\";\nfunction _createSuper(t) {\n var r = isNativeReflectConstruct();\n return function () {\n var e,\n o = getPrototypeOf(t);\n if (r) {\n var s = getPrototypeOf(this).constructor;\n e = Reflect.construct(o, arguments, s);\n } else e = o.apply(this, arguments);\n return possibleConstructorReturn(this, e);\n };\n}\nexport { _createSuper as default };","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nexport { _defineProperty as default };","function _extends() {\n return _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, _extends.apply(null, arguments);\n}\nexport { _extends as default };","function _getPrototypeOf(t) {\n return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {\n return t.__proto__ || Object.getPrototypeOf(t);\n }, _getPrototypeOf(t);\n}\nexport { _getPrototypeOf as default };","import setPrototypeOf from \"./setPrototypeOf.js\";\nfunction _inherits(t, e) {\n if (\"function\" != typeof e && null !== e) throw new TypeError(\"Super expression must either be null or a function\");\n t.prototype = Object.create(e && e.prototype, {\n constructor: {\n value: t,\n writable: !0,\n configurable: !0\n }\n }), Object.defineProperty(t, \"prototype\", {\n writable: !1\n }), e && setPrototypeOf(t, e);\n}\nexport { _inherits as default };","function _isNativeReflectConstruct() {\n try {\n var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n } catch (t) {}\n return (_isNativeReflectConstruct = function _isNativeReflectConstruct() {\n return !!t;\n })();\n}\nexport { _isNativeReflectConstruct as default };","function _iterableToArray(r) {\n if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r);\n}\nexport { _iterableToArray as default };","function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}\nexport { _iterableToArrayLimit as default };","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nexport { _nonIterableRest as default };","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nexport { _nonIterableSpread as default };","import defineProperty from \"./defineProperty.js\";\nfunction ownKeys(e, r) {\n var t = Object.keys(e);\n if (Object.getOwnPropertySymbols) {\n var o = Object.getOwnPropertySymbols(e);\n r && (o = o.filter(function (r) {\n return Object.getOwnPropertyDescriptor(e, r).enumerable;\n })), t.push.apply(t, o);\n }\n return t;\n}\nfunction _objectSpread2(e) {\n for (var r = 1; r < arguments.length; r++) {\n var t = null != arguments[r] ? arguments[r] : {};\n r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {\n defineProperty(e, r, t[r]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {\n Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));\n });\n }\n return e;\n}\nexport { _objectSpread2 as default };","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nfunction _objectWithoutProperties(e, t) {\n if (null == e) return {};\n var o,\n r,\n i = objectWithoutPropertiesLoose(e, t);\n if (Object.getOwnPropertySymbols) {\n var n = Object.getOwnPropertySymbols(e);\n for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);\n }\n return i;\n}\nexport { _objectWithoutProperties as default };","function _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (-1 !== e.indexOf(n)) continue;\n t[n] = r[n];\n }\n return t;\n}\nexport { _objectWithoutPropertiesLoose as default };","import _typeof from \"./typeof.js\";\nimport assertThisInitialized from \"./assertThisInitialized.js\";\nfunction _possibleConstructorReturn(t, e) {\n if (e && (\"object\" == _typeof(e) || \"function\" == typeof e)) return e;\n if (void 0 !== e) throw new TypeError(\"Derived constructors may only return object or undefined\");\n return assertThisInitialized(t);\n}\nexport { _possibleConstructorReturn as default };","function _setPrototypeOf(t, e) {\n return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n return t.__proto__ = e, t;\n }, _setPrototypeOf(t, e);\n}\nexport { _setPrototypeOf as default };","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nfunction _slicedToArray(r, e) {\n return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest();\n}\nexport { _slicedToArray as default };","function _taggedTemplateLiteral(e, t) {\n return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, {\n raw: {\n value: Object.freeze(t)\n }\n }));\n}\nexport { _taggedTemplateLiteral as default };","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nfunction _toConsumableArray(r) {\n return arrayWithoutHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableSpread();\n}\nexport { _toConsumableArray as default };","import _typeof from \"./typeof.js\";\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nexport { toPrimitive as default };","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nexport { toPropertyKey as default };","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}\nexport { _typeof as default };","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nfunction _unsupportedIterableToArray(r, a) {\n if (r) {\n if (\"string\" == typeof r) return arrayLikeToArray(r, a);\n var t = {}.toString.call(r).slice(8, -1);\n return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0;\n }\n}\nexport { _unsupportedIterableToArray as default };","function _extends() {\n return module.exports = _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _extends.apply(null, arguments);\n}\nmodule.exports = _extends, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _getPrototypeOf(t) {\n return module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {\n return t.__proto__ || Object.getPrototypeOf(t);\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _getPrototypeOf(t);\n}\nmodule.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var setPrototypeOf = require(\"./setPrototypeOf.js\");\nfunction _inherits(t, e) {\n if (\"function\" != typeof e && null !== e) throw new TypeError(\"Super expression must either be null or a function\");\n t.prototype = Object.create(e && e.prototype, {\n constructor: {\n value: t,\n writable: !0,\n configurable: !0\n }\n }), Object.defineProperty(t, \"prototype\", {\n writable: !1\n }), e && setPrototypeOf(t, e);\n}\nmodule.exports = _inherits, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _interopRequireDefault(e) {\n return e && e.__esModule ? e : {\n \"default\": e\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _isNativeReflectConstruct() {\n try {\n var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n } catch (t) {}\n return (module.exports = _isNativeReflectConstruct = function _isNativeReflectConstruct() {\n return !!t;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports)();\n}\nmodule.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _iterableToArray(r) {\n if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r);\n}\nmodule.exports = _iterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}\nmodule.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nmodule.exports = _nonIterableRest, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nmodule.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var defineProperty = require(\"./defineProperty.js\");\nfunction ownKeys(e, r) {\n var t = Object.keys(e);\n if (Object.getOwnPropertySymbols) {\n var o = Object.getOwnPropertySymbols(e);\n r && (o = o.filter(function (r) {\n return Object.getOwnPropertyDescriptor(e, r).enumerable;\n })), t.push.apply(t, o);\n }\n return t;\n}\nfunction _objectSpread2(e) {\n for (var r = 1; r < arguments.length; r++) {\n var t = null != arguments[r] ? arguments[r] : {};\n r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {\n defineProperty(e, r, t[r]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {\n Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));\n });\n }\n return e;\n}\nmodule.exports = _objectSpread2, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var objectWithoutPropertiesLoose = require(\"./objectWithoutPropertiesLoose.js\");\nfunction _objectWithoutProperties(e, t) {\n if (null == e) return {};\n var o,\n r,\n i = objectWithoutPropertiesLoose(e, t);\n if (Object.getOwnPropertySymbols) {\n var n = Object.getOwnPropertySymbols(e);\n for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);\n }\n return i;\n}\nmodule.exports = _objectWithoutProperties, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (-1 !== e.indexOf(n)) continue;\n t[n] = r[n];\n }\n return t;\n}\nmodule.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nvar assertThisInitialized = require(\"./assertThisInitialized.js\");\nfunction _possibleConstructorReturn(t, e) {\n if (e && (\"object\" == _typeof(e) || \"function\" == typeof e)) return e;\n if (void 0 !== e) throw new TypeError(\"Derived constructors may only return object or undefined\");\n return assertThisInitialized(t);\n}\nmodule.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _setPrototypeOf(t, e) {\n return module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n return t.__proto__ = e, t;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _setPrototypeOf(t, e);\n}\nmodule.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayWithHoles = require(\"./arrayWithHoles.js\");\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit.js\");\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\nvar nonIterableRest = require(\"./nonIterableRest.js\");\nfunction _slicedToArray(r, e) {\n return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest();\n}\nmodule.exports = _slicedToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _taggedTemplateLiteral(e, t) {\n return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, {\n raw: {\n value: Object.freeze(t)\n }\n }));\n}\nmodule.exports = _taggedTemplateLiteral, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayWithoutHoles = require(\"./arrayWithoutHoles.js\");\nvar iterableToArray = require(\"./iterableToArray.js\");\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\nvar nonIterableSpread = require(\"./nonIterableSpread.js\");\nfunction _toConsumableArray(r) {\n return arrayWithoutHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableSpread();\n}\nmodule.exports = _toConsumableArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nmodule.exports = toPrimitive, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nvar toPrimitive = require(\"./toPrimitive.js\");\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nmodule.exports = toPropertyKey, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\nfunction _unsupportedIterableToArray(r, a) {\n if (r) {\n if (\"string\" == typeof r) return arrayLikeToArray(r, a);\n var t = {}.toString.call(r).slice(8, -1);\n return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0;\n }\n}\nmodule.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","import { StyleSheet } from '@emotion/sheet';\nimport { dealloc, alloc, next, token, from, peek, delimit, slice, position, RULESET, combine, match, serialize, copy, replace, WEBKIT, MOZ, MS, KEYFRAMES, DECLARATION, hash, charat, strlen, indexof, stringify, rulesheet, middleware, compile } from 'stylis';\nimport weakMemoize from '@emotion/weak-memoize';\nimport memoize from '@emotion/memoize';\nvar isBrowser = typeof document !== 'undefined';\nvar identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {\n var previous = 0;\n var character = 0;\n while (true) {\n previous = character;\n character = peek(); // &\\f\n\n if (previous === 38 && character === 12) {\n points[index] = 1;\n }\n if (token(character)) {\n break;\n }\n next();\n }\n return slice(begin, position);\n};\nvar toRules = function toRules(parsed, points) {\n // pretend we've started with a comma\n var index = -1;\n var character = 44;\n do {\n switch (token(character)) {\n case 0:\n // &\\f\n if (character === 38 && peek() === 12) {\n // this is not 100% correct, we don't account for literal sequences here - like for example quoted strings\n // stylis inserts \\f after & to know when & where it should replace this sequence with the context selector\n // and when it should just concatenate the outer and inner selectors\n // it's very unlikely for this sequence to actually appear in a different context, so we just leverage this fact here\n points[index] = 1;\n }\n parsed[index] += identifierWithPointTracking(position - 1, points, index);\n break;\n case 2:\n parsed[index] += delimit(character);\n break;\n case 4:\n // comma\n if (character === 44) {\n // colon\n parsed[++index] = peek() === 58 ? '&\\f' : '';\n points[index] = parsed[index].length;\n break;\n }\n\n // fallthrough\n\n default:\n parsed[index] += from(character);\n }\n } while (character = next());\n return parsed;\n};\nvar getRules = function getRules(value, points) {\n return dealloc(toRules(alloc(value), points));\n}; // WeakSet would be more appropriate, but only WeakMap is supported in IE11\n\nvar fixedElements = /* #__PURE__ */new WeakMap();\nvar compat = function compat(element) {\n if (element.type !== 'rule' || !element.parent ||\n // positive .length indicates that this rule contains pseudo\n // negative .length indicates that this rule has been already prefixed\n element.length < 1) {\n return;\n }\n var value = element.value;\n var parent = element.parent;\n var isImplicitRule = element.column === parent.column && element.line === parent.line;\n while (parent.type !== 'rule') {\n parent = parent.parent;\n if (!parent) return;\n } // short-circuit for the simplest case\n\n if (element.props.length === 1 && value.charCodeAt(0) !== 58\n /* colon */ && !fixedElements.get(parent)) {\n return;\n } // if this is an implicitly inserted rule (the one eagerly inserted at the each new nested level)\n // then the props has already been manipulated beforehand as they that array is shared between it and its \"rule parent\"\n\n if (isImplicitRule) {\n return;\n }\n fixedElements.set(element, true);\n var points = [];\n var rules = getRules(value, points);\n var parentRules = parent.props;\n for (var i = 0, k = 0; i < rules.length; i++) {\n for (var j = 0; j < parentRules.length; j++, k++) {\n element.props[k] = points[i] ? rules[i].replace(/&\\f/g, parentRules[j]) : parentRules[j] + \" \" + rules[i];\n }\n }\n};\nvar removeLabel = function removeLabel(element) {\n if (element.type === 'decl') {\n var value = element.value;\n if (\n // charcode for l\n value.charCodeAt(0) === 108 &&\n // charcode for b\n value.charCodeAt(2) === 98) {\n // this ignores label\n element[\"return\"] = '';\n element.value = '';\n }\n }\n};\n\n/* eslint-disable no-fallthrough */\n\nfunction prefix(value, length) {\n switch (hash(value, length)) {\n // color-adjust\n case 5103:\n return WEBKIT + 'print-' + value + value;\n // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)\n\n case 5737:\n case 4201:\n case 3177:\n case 3433:\n case 1641:\n case 4457:\n case 2921: // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break\n\n case 5572:\n case 6356:\n case 5844:\n case 3191:\n case 6645:\n case 3005: // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,\n\n case 6391:\n case 5879:\n case 5623:\n case 6135:\n case 4599:\n case 4855: // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)\n\n case 4215:\n case 6389:\n case 5109:\n case 5365:\n case 5621:\n case 3829:\n return WEBKIT + value + value;\n // appearance, user-select, transform, hyphens, text-size-adjust\n\n case 5349:\n case 4246:\n case 4810:\n case 6968:\n case 2756:\n return WEBKIT + value + MOZ + value + MS + value + value;\n // flex, flex-direction\n\n case 6828:\n case 4268:\n return WEBKIT + value + MS + value + value;\n // order\n\n case 6165:\n return WEBKIT + value + MS + 'flex-' + value + value;\n // align-items\n\n case 5187:\n return WEBKIT + value + replace(value, /(\\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value;\n // align-self\n\n case 5443:\n return WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/, '') + value;\n // align-content\n\n case 4675:\n return WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/, '') + value;\n // flex-shrink\n\n case 5548:\n return WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value;\n // flex-basis\n\n case 5292:\n return WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value;\n // flex-grow\n\n case 6060:\n return WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value;\n // transition\n\n case 4554:\n return WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value;\n // cursor\n\n case 6187:\n return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value;\n // background, background-image\n\n case 5495:\n case 3959:\n return replace(value, /(image-set\\([^]*)/, WEBKIT + '$1' + '$`$1');\n // justify-content\n\n case 4968:\n return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + WEBKIT + value + value;\n // (margin|padding)-inline-(start|end)\n\n case 4095:\n case 3583:\n case 4068:\n case 2532:\n return replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value;\n // (min|max)?(width|height|inline-size|block-size)\n\n case 8116:\n case 7059:\n case 5753:\n case 5535:\n case 5445:\n case 5701:\n case 4933:\n case 4677:\n case 5533:\n case 5789:\n case 5021:\n case 4765:\n // stretch, max-content, min-content, fill-available\n if (strlen(value) - 1 - length > 6) switch (charat(value, length + 1)) {\n // (m)ax-content, (m)in-content\n case 109:\n // -\n if (charat(value, length + 4) !== 45) break;\n // (f)ill-available, (f)it-content\n\n case 102:\n return replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value;\n // (s)tretch\n\n case 115:\n return ~indexof(value, 'stretch') ? prefix(replace(value, 'stretch', 'fill-available'), length) + value : value;\n }\n break;\n // position: sticky\n\n case 4949:\n // (s)ticky?\n if (charat(value, length + 1) !== 115) break;\n // display: (flex|inline-flex)\n\n case 6444:\n switch (charat(value, strlen(value) - 3 - (~indexof(value, '!important') && 10))) {\n // stic(k)y\n case 107:\n return replace(value, ':', ':' + WEBKIT) + value;\n // (inline-)?fl(e)x\n\n case 101:\n return replace(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value;\n }\n break;\n // writing-mode\n\n case 5936:\n switch (charat(value, length + 11)) {\n // vertical-l(r)\n case 114:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb') + value;\n // vertical-r(l)\n\n case 108:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb-rl') + value;\n // horizontal(-)tb\n\n case 45:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'lr') + value;\n }\n return WEBKIT + value + MS + value + value;\n }\n return value;\n}\nvar prefixer = function prefixer(element, index, children, callback) {\n if (element.length > -1) if (!element[\"return\"]) switch (element.type) {\n case DECLARATION:\n element[\"return\"] = prefix(element.value, element.length);\n break;\n case KEYFRAMES:\n return serialize([copy(element, {\n value: replace(element.value, '@', '@' + WEBKIT)\n })], callback);\n case RULESET:\n if (element.length) return combine(element.props, function (value) {\n switch (match(value, /(::plac\\w+|:read-\\w+)/)) {\n // :read-(only|write)\n case ':read-only':\n case ':read-write':\n return serialize([copy(element, {\n props: [replace(value, /:(read-\\w+)/, ':' + MOZ + '$1')]\n })], callback);\n // :placeholder\n\n case '::placeholder':\n return serialize([copy(element, {\n props: [replace(value, /:(plac\\w+)/, ':' + WEBKIT + 'input-$1')]\n }), copy(element, {\n props: [replace(value, /:(plac\\w+)/, ':' + MOZ + '$1')]\n }), copy(element, {\n props: [replace(value, /:(plac\\w+)/, MS + 'input-$1')]\n })], callback);\n }\n return '';\n });\n }\n};\nvar getServerStylisCache = isBrowser ? undefined : weakMemoize(function () {\n return memoize(function () {\n return {};\n });\n});\nvar defaultStylisPlugins = [prefixer];\nvar createCache = function createCache(options) {\n var key = options.key;\n if (isBrowser && key === 'css') {\n var ssrStyles = document.querySelectorAll(\"style[data-emotion]:not([data-s])\"); // get SSRed styles out of the way of React's hydration\n // document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be)\n // note this very very intentionally targets all style elements regardless of the key to ensure\n // that creating a cache works inside of render of a React component\n\n Array.prototype.forEach.call(ssrStyles, function (node) {\n // we want to only move elements which have a space in the data-emotion attribute value\n // because that indicates that it is an Emotion 11 server-side rendered style elements\n // while we will already ignore Emotion 11 client-side inserted styles because of the :not([data-s]) part in the selector\n // Emotion 10 client-side inserted styles did not have data-s (but importantly did not have a space in their data-emotion attributes)\n // so checking for the space ensures that loading Emotion 11 after Emotion 10 has inserted some styles\n // will not result in the Emotion 10 styles being destroyed\n var dataEmotionAttribute = node.getAttribute('data-emotion');\n if (dataEmotionAttribute.indexOf(' ') === -1) {\n return;\n }\n document.head.appendChild(node);\n node.setAttribute('data-s', '');\n });\n }\n var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;\n var inserted = {};\n var container;\n var nodesToHydrate = [];\n if (isBrowser) {\n container = options.container || document.head;\n Array.prototype.forEach.call(\n // this means we will ignore elements which don't have a space in them which\n // means that the style elements we're looking at are only Emotion 11 server-rendered style elements\n document.querySelectorAll(\"style[data-emotion^=\\\"\" + key + \" \\\"]\"), function (node) {\n var attrib = node.getAttribute(\"data-emotion\").split(' ');\n for (var i = 1; i < attrib.length; i++) {\n inserted[attrib[i]] = true;\n }\n nodesToHydrate.push(node);\n });\n }\n var _insert;\n var omnipresentPlugins = [compat, removeLabel];\n if (!getServerStylisCache) {\n var currentSheet;\n var finalizingPlugins = [stringify, rulesheet(function (rule) {\n currentSheet.insert(rule);\n })];\n var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));\n var stylis = function stylis(styles) {\n return serialize(compile(styles), serializer);\n };\n _insert = function insert(selector, serialized, sheet, shouldCache) {\n currentSheet = sheet;\n stylis(selector ? selector + \"{\" + serialized.styles + \"}\" : serialized.styles);\n if (shouldCache) {\n cache.inserted[serialized.name] = true;\n }\n };\n } else {\n var _finalizingPlugins = [stringify];\n var _serializer = middleware(omnipresentPlugins.concat(stylisPlugins, _finalizingPlugins));\n var _stylis = function _stylis(styles) {\n return serialize(compile(styles), _serializer);\n };\n var serverStylisCache = getServerStylisCache(stylisPlugins)(key);\n var getRules = function getRules(selector, serialized) {\n var name = serialized.name;\n if (serverStylisCache[name] === undefined) {\n serverStylisCache[name] = _stylis(selector ? selector + \"{\" + serialized.styles + \"}\" : serialized.styles);\n }\n return serverStylisCache[name];\n };\n _insert = function _insert(selector, serialized, sheet, shouldCache) {\n var name = serialized.name;\n var rules = getRules(selector, serialized);\n if (cache.compat === undefined) {\n // in regular mode, we don't set the styles on the inserted cache\n // since we don't need to and that would be wasting memory\n // we return them so that they are rendered in a style tag\n if (shouldCache) {\n cache.inserted[name] = true;\n }\n return rules;\n } else {\n // in compat mode, we put the styles on the inserted cache so\n // that emotion-server can pull out the styles\n // except when we don't want to cache it which was in Global but now\n // is nowhere but we don't want to do a major right now\n // and just in case we're going to leave the case here\n // it's also not affecting client side bundle size\n // so it's really not a big deal\n if (shouldCache) {\n cache.inserted[name] = rules;\n } else {\n return rules;\n }\n }\n };\n }\n var cache = {\n key: key,\n sheet: new StyleSheet({\n key: key,\n container: container,\n nonce: options.nonce,\n speedy: options.speedy,\n prepend: options.prepend,\n insertionPoint: options.insertionPoint\n }),\n nonce: options.nonce,\n inserted: inserted,\n registered: {},\n insert: _insert\n };\n cache.sheet.hydrate(nodesToHydrate);\n return cache;\n};\nexport { createCache as default };","/* eslint-disable */\n// Inspired by https://github.com/garycourt/murmurhash-js\n// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86\nfunction murmur2(str) {\n // 'm' and 'r' are mixing constants generated offline.\n // They're not really 'magic', they just happen to work well.\n // const m = 0x5bd1e995;\n // const r = 24;\n // Initialize the hash\n var h = 0; // Mix 4 bytes at a time into the hash\n\n var k,\n i = 0,\n len = str.length;\n for (; len >= 4; ++i, len -= 4) {\n k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;\n k = /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);\n k ^= /* k >>> r: */\n k >>> 24;\n h = /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^ /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Handle the last few bytes of the input array\n\n switch (len) {\n case 3:\n h ^= (str.charCodeAt(i + 2) & 0xff) << 16;\n case 2:\n h ^= (str.charCodeAt(i + 1) & 0xff) << 8;\n case 1:\n h ^= str.charCodeAt(i) & 0xff;\n h = /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Do a few final mixes of the hash to ensure the last few\n // bytes are well-incorporated.\n\n h ^= h >>> 13;\n h = /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n return ((h ^ h >>> 15) >>> 0).toString(36);\n}\nexport { murmur2 as default };","function memoize(fn) {\n var cache = Object.create(null);\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\nexport { memoize as default };","import hoistNonReactStatics$1 from 'hoist-non-react-statics';\n\n// this file isolates this package that is not tree-shakeable\n// and if this module doesn't actually contain any logic of its own\n// then Rollup just use 'hoist-non-react-statics' directly in other chunks\n\nvar hoistNonReactStatics = function hoistNonReactStatics(targetComponent, sourceComponent) {\n return hoistNonReactStatics$1(targetComponent, sourceComponent);\n};\nexport { hoistNonReactStatics as default };","import * as React from 'react';\nimport { useContext, forwardRef } from 'react';\nimport createCache from '@emotion/cache';\nimport _extends from '@babel/runtime/helpers/esm/extends';\nimport weakMemoize from '@emotion/weak-memoize';\nimport hoistNonReactStatics from '../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.esm.js';\nimport { getRegisteredStyles, registerStyles, insertStyles } from '@emotion/utils';\nimport { serializeStyles } from '@emotion/serialize';\nimport { useInsertionEffectAlwaysWithSyncFallback } from '@emotion/use-insertion-effect-with-fallbacks';\nvar isDevelopment = false;\nvar isBrowser = typeof document !== 'undefined';\nvar EmotionCacheContext = /* #__PURE__ */React.createContext(\n// we're doing this to avoid preconstruct's dead code elimination in this one case\n// because this module is primarily intended for the browser and node\n// but it's also required in react native and similar environments sometimes\n// and we could have a special build just for that\n// but this is much easier and the native packages\n// might use a different theme context in the future anyway\ntypeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({\n key: 'css'\n}) : null);\nvar CacheProvider = EmotionCacheContext.Provider;\nvar __unsafe_useEmotionCache = function useEmotionCache() {\n return useContext(EmotionCacheContext);\n};\nvar withEmotionCache = function withEmotionCache(func) {\n return /*#__PURE__*/forwardRef(function (props, ref) {\n // the cache will never be null in the browser\n var cache = useContext(EmotionCacheContext);\n return func(props, cache, ref);\n });\n};\nif (!isBrowser) {\n withEmotionCache = function withEmotionCache(func) {\n return function (props) {\n var cache = useContext(EmotionCacheContext);\n if (cache === null) {\n // yes, we're potentially creating this on every render\n // it doesn't actually matter though since it's only on the server\n // so there will only every be a single render\n // that could change in the future because of suspense and etc. but for now,\n // this works and i don't want to optimise for a future thing that we aren't sure about\n cache = createCache({\n key: 'css'\n });\n return /*#__PURE__*/React.createElement(EmotionCacheContext.Provider, {\n value: cache\n }, func(props, cache));\n } else {\n return func(props, cache);\n }\n };\n };\n}\nvar ThemeContext = /* #__PURE__ */React.createContext({});\nvar useTheme = function useTheme() {\n return React.useContext(ThemeContext);\n};\nvar getTheme = function getTheme(outerTheme, theme) {\n if (typeof theme === 'function') {\n var mergedTheme = theme(outerTheme);\n return mergedTheme;\n }\n return _extends({}, outerTheme, theme);\n};\nvar createCacheWithTheme = /* #__PURE__ */weakMemoize(function (outerTheme) {\n return weakMemoize(function (theme) {\n return getTheme(outerTheme, theme);\n });\n});\nvar ThemeProvider = function ThemeProvider(props) {\n var theme = React.useContext(ThemeContext);\n if (props.theme !== theme) {\n theme = createCacheWithTheme(theme)(props.theme);\n }\n return /*#__PURE__*/React.createElement(ThemeContext.Provider, {\n value: theme\n }, props.children);\n};\nfunction withTheme(Component) {\n var componentName = Component.displayName || Component.name || 'Component';\n var WithTheme = /*#__PURE__*/React.forwardRef(function render(props, ref) {\n var theme = React.useContext(ThemeContext);\n return /*#__PURE__*/React.createElement(Component, _extends({\n theme: theme,\n ref: ref\n }, props));\n });\n WithTheme.displayName = \"WithTheme(\" + componentName + \")\";\n return hoistNonReactStatics(WithTheme, Component);\n}\nvar hasOwn = {}.hasOwnProperty;\nvar typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';\nvar createEmotionProps = function createEmotionProps(type, props) {\n var newProps = {};\n for (var _key in props) {\n if (hasOwn.call(props, _key)) {\n newProps[_key] = props[_key];\n }\n }\n newProps[typePropName] = type; // Runtime labeling is an opt-in feature because:\n\n return newProps;\n};\nvar Insertion = function Insertion(_ref) {\n var cache = _ref.cache,\n serialized = _ref.serialized,\n isStringTag = _ref.isStringTag;\n registerStyles(cache, serialized, isStringTag);\n var rules = useInsertionEffectAlwaysWithSyncFallback(function () {\n return insertStyles(cache, serialized, isStringTag);\n });\n if (!isBrowser && rules !== undefined) {\n var _ref2;\n var serializedNames = serialized.name;\n var next = serialized.next;\n while (next !== undefined) {\n serializedNames += ' ' + next.name;\n next = next.next;\n }\n return /*#__PURE__*/React.createElement(\"style\", (_ref2 = {}, _ref2[\"data-emotion\"] = cache.key + \" \" + serializedNames, _ref2.dangerouslySetInnerHTML = {\n __html: rules\n }, _ref2.nonce = cache.sheet.nonce, _ref2));\n }\n return null;\n};\nvar Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {\n var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works\n // not passing the registered cache to serializeStyles because it would\n // make certain babel optimisations not possible\n\n if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {\n cssProp = cache.registered[cssProp];\n }\n var WrappedComponent = props[typePropName];\n var registeredStyles = [cssProp];\n var className = '';\n if (typeof props.className === 'string') {\n className = getRegisteredStyles(cache.registered, registeredStyles, props.className);\n } else if (props.className != null) {\n className = props.className + \" \";\n }\n var serialized = serializeStyles(registeredStyles, undefined, React.useContext(ThemeContext));\n className += cache.key + \"-\" + serialized.name;\n var newProps = {};\n for (var _key2 in props) {\n if (hasOwn.call(props, _key2) && _key2 !== 'css' && _key2 !== typePropName && !isDevelopment) {\n newProps[_key2] = props[_key2];\n }\n }\n newProps.className = className;\n if (ref) {\n newProps.ref = ref;\n }\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {\n cache: cache,\n serialized: serialized,\n isStringTag: typeof WrappedComponent === 'string'\n }), /*#__PURE__*/React.createElement(WrappedComponent, newProps));\n});\nvar Emotion$1 = Emotion;\nexport { CacheProvider as C, Emotion$1 as E, ThemeContext as T, __unsafe_useEmotionCache as _, isDevelopment as a, ThemeProvider as b, createEmotionProps as c, withTheme as d, hasOwn as h, isBrowser as i, useTheme as u, withEmotionCache as w };","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); }\nimport { h as hasOwn, E as Emotion, c as createEmotionProps, w as withEmotionCache, T as ThemeContext, i as isBrowser, a as isDevelopment } from './emotion-element-d59e098f.esm.js';\nexport { C as CacheProvider, T as ThemeContext, b as ThemeProvider, _ as __unsafe_useEmotionCache, u as useTheme, w as withEmotionCache, d as withTheme } from './emotion-element-d59e098f.esm.js';\nimport * as React from 'react';\nimport { insertStyles, registerStyles, getRegisteredStyles } from '@emotion/utils';\nimport { useInsertionEffectWithLayoutFallback, useInsertionEffectAlwaysWithSyncFallback } from '@emotion/use-insertion-effect-with-fallbacks';\nimport { serializeStyles } from '@emotion/serialize';\nimport '@emotion/cache';\nimport '@babel/runtime/helpers/extends';\nimport '@emotion/weak-memoize';\nimport '../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.esm.js';\nimport 'hoist-non-react-statics';\nvar jsx = function jsx(type, props) {\n // eslint-disable-next-line prefer-rest-params\n var args = arguments;\n if (props == null || !hasOwn.call(props, 'css')) {\n return React.createElement.apply(undefined, args);\n }\n var argsLength = args.length;\n var createElementArgArray = new Array(argsLength);\n createElementArgArray[0] = Emotion;\n createElementArgArray[1] = createEmotionProps(type, props);\n for (var i = 2; i < argsLength; i++) {\n createElementArgArray[i] = args[i];\n }\n return React.createElement.apply(null, createElementArgArray);\n};\n(function (_jsx) {\n var JSX;\n (function (_JSX) {})(JSX || (JSX = _jsx.JSX || (_jsx.JSX = {})));\n})(jsx || (jsx = {}));\n\n// initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild\n// initial client-side render from SSR, use place of hydrating tag\n\nvar Global = /* #__PURE__ */withEmotionCache(function (props, cache) {\n var styles = props.styles;\n var serialized = serializeStyles([styles], undefined, React.useContext(ThemeContext));\n if (!isBrowser) {\n var _ref;\n var serializedNames = serialized.name;\n var serializedStyles = serialized.styles;\n var next = serialized.next;\n while (next !== undefined) {\n serializedNames += ' ' + next.name;\n serializedStyles += next.styles;\n next = next.next;\n }\n var shouldCache = cache.compat === true;\n var rules = cache.insert(\"\", {\n name: serializedNames,\n styles: serializedStyles\n }, cache.sheet, shouldCache);\n if (shouldCache) {\n return null;\n }\n return /*#__PURE__*/React.createElement(\"style\", (_ref = {}, _ref[\"data-emotion\"] = cache.key + \"-global \" + serializedNames, _ref.dangerouslySetInnerHTML = {\n __html: rules\n }, _ref.nonce = cache.sheet.nonce, _ref));\n } // yes, i know these hooks are used conditionally\n // but it is based on a constant that will never change at runtime\n // it's effectively like having two implementations and switching them out\n // so it's not actually breaking anything\n\n var sheetRef = React.useRef();\n useInsertionEffectWithLayoutFallback(function () {\n var key = cache.key + \"-global\"; // use case of https://github.com/emotion-js/emotion/issues/2675\n\n var sheet = new cache.sheet.constructor({\n key: key,\n nonce: cache.sheet.nonce,\n container: cache.sheet.container,\n speedy: cache.sheet.isSpeedy\n });\n var rehydrating = false;\n var node = document.querySelector(\"style[data-emotion=\\\"\" + key + \" \" + serialized.name + \"\\\"]\");\n if (cache.sheet.tags.length) {\n sheet.before = cache.sheet.tags[0];\n }\n if (node !== null) {\n rehydrating = true; // clear the hash so this node won't be recognizable as rehydratable by other s\n\n node.setAttribute('data-emotion', key);\n sheet.hydrate([node]);\n }\n sheetRef.current = [sheet, rehydrating];\n return function () {\n sheet.flush();\n };\n }, [cache]);\n useInsertionEffectWithLayoutFallback(function () {\n var sheetRefCurrent = sheetRef.current;\n var sheet = sheetRefCurrent[0],\n rehydrating = sheetRefCurrent[1];\n if (rehydrating) {\n sheetRefCurrent[1] = false;\n return;\n }\n if (serialized.next !== undefined) {\n // insert keyframes\n insertStyles(cache, serialized.next, true);\n }\n if (sheet.tags.length) {\n // if this doesn't exist then it will be null so the style element will be appended\n var element = sheet.tags[sheet.tags.length - 1].nextElementSibling;\n sheet.before = element;\n sheet.flush();\n }\n cache.insert(\"\", serialized, sheet, false);\n }, [cache, serialized.name]);\n return null;\n});\nfunction css() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return serializeStyles(args);\n}\nfunction keyframes() {\n var insertable = css.apply(void 0, arguments);\n var name = \"animation-\" + insertable.name;\n return {\n name: name,\n styles: \"@keyframes \" + name + \"{\" + insertable.styles + \"}\",\n anim: 1,\n toString: function toString() {\n return \"_EMO_\" + this.name + \"_\" + this.styles + \"_EMO_\";\n }\n };\n}\nvar classnames = function classnames(args) {\n var len = args.length;\n var i = 0;\n var cls = '';\n for (; i < len; i++) {\n var arg = args[i];\n if (arg == null) continue;\n var toAdd = void 0;\n switch (_typeof(arg)) {\n case 'boolean':\n break;\n case 'object':\n {\n if (Array.isArray(arg)) {\n toAdd = classnames(arg);\n } else {\n toAdd = '';\n for (var k in arg) {\n if (arg[k] && k) {\n toAdd && (toAdd += ' ');\n toAdd += k;\n }\n }\n }\n break;\n }\n default:\n {\n toAdd = arg;\n }\n }\n if (toAdd) {\n cls && (cls += ' ');\n cls += toAdd;\n }\n }\n return cls;\n};\nfunction merge(registered, css, className) {\n var registeredStyles = [];\n var rawClassName = getRegisteredStyles(registered, registeredStyles, className);\n if (registeredStyles.length < 2) {\n return className;\n }\n return rawClassName + css(registeredStyles);\n}\nvar Insertion = function Insertion(_ref) {\n var cache = _ref.cache,\n serializedArr = _ref.serializedArr;\n var rules = useInsertionEffectAlwaysWithSyncFallback(function () {\n var rules = '';\n for (var i = 0; i < serializedArr.length; i++) {\n var res = insertStyles(cache, serializedArr[i], false);\n if (!isBrowser && res !== undefined) {\n rules += res;\n }\n }\n if (!isBrowser) {\n return rules;\n }\n });\n if (!isBrowser && rules.length !== 0) {\n var _ref2;\n return /*#__PURE__*/React.createElement(\"style\", (_ref2 = {}, _ref2[\"data-emotion\"] = cache.key + \" \" + serializedArr.map(function (serialized) {\n return serialized.name;\n }).join(' '), _ref2.dangerouslySetInnerHTML = {\n __html: rules\n }, _ref2.nonce = cache.sheet.nonce, _ref2));\n }\n return null;\n};\nvar ClassNames = /* #__PURE__ */withEmotionCache(function (props, cache) {\n var hasRendered = false;\n var serializedArr = [];\n var css = function css() {\n if (hasRendered && isDevelopment) {\n throw new Error('css can only be used during render');\n }\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n var serialized = serializeStyles(args, cache.registered);\n serializedArr.push(serialized); // registration has to happen here as the result of this might get consumed by `cx`\n\n registerStyles(cache, serialized, false);\n return cache.key + \"-\" + serialized.name;\n };\n var cx = function cx() {\n if (hasRendered && isDevelopment) {\n throw new Error('cx can only be used during render');\n }\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n return merge(cache.registered, css, classnames(args));\n };\n var content = {\n css: css,\n cx: cx,\n theme: React.useContext(ThemeContext)\n };\n var ele = props.children(content);\n hasRendered = true;\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {\n cache: cache,\n serializedArr: serializedArr\n }), ele);\n});\nexport { ClassNames, Global, jsx as createElement, css, jsx, keyframes };","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); }\nimport hashString from '@emotion/hash';\nimport unitless from '@emotion/unitless';\nimport memoize from '@emotion/memoize';\nvar isDevelopment = false;\nvar hyphenateRegex = /[A-Z]|^ms/g;\nvar animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;\nvar isCustomProperty = function isCustomProperty(property) {\n return property.charCodeAt(1) === 45;\n};\nvar isProcessableValue = function isProcessableValue(value) {\n return value != null && typeof value !== 'boolean';\n};\nvar processStyleName = /* #__PURE__ */memoize(function (styleName) {\n return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase();\n});\nvar processStyleValue = function processStyleValue(key, value) {\n switch (key) {\n case 'animation':\n case 'animationName':\n {\n if (typeof value === 'string') {\n return value.replace(animationRegex, function (match, p1, p2) {\n cursor = {\n name: p1,\n styles: p2,\n next: cursor\n };\n return p1;\n });\n }\n }\n }\n if (unitless[key] !== 1 && !isCustomProperty(key) && typeof value === 'number' && value !== 0) {\n return value + 'px';\n }\n return value;\n};\nvar noComponentSelectorMessage = 'Component selectors can only be used in conjunction with ' + '@emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware ' + 'compiler transform.';\nfunction handleInterpolation(mergedProps, registered, interpolation) {\n if (interpolation == null) {\n return '';\n }\n var componentSelector = interpolation;\n if (componentSelector.__emotion_styles !== undefined) {\n return componentSelector;\n }\n switch (_typeof(interpolation)) {\n case 'boolean':\n {\n return '';\n }\n case 'object':\n {\n var keyframes = interpolation;\n if (keyframes.anim === 1) {\n cursor = {\n name: keyframes.name,\n styles: keyframes.styles,\n next: cursor\n };\n return keyframes.name;\n }\n var serializedStyles = interpolation;\n if (serializedStyles.styles !== undefined) {\n var next = serializedStyles.next;\n if (next !== undefined) {\n // not the most efficient thing ever but this is a pretty rare case\n // and there will be very few iterations of this generally\n while (next !== undefined) {\n cursor = {\n name: next.name,\n styles: next.styles,\n next: cursor\n };\n next = next.next;\n }\n }\n var styles = serializedStyles.styles + \";\";\n return styles;\n }\n return createStringFromObject(mergedProps, registered, interpolation);\n }\n case 'function':\n {\n if (mergedProps !== undefined) {\n var previousCursor = cursor;\n var result = interpolation(mergedProps);\n cursor = previousCursor;\n return handleInterpolation(mergedProps, registered, result);\n }\n break;\n }\n } // finalize string values (regular strings and functions interpolated into css calls)\n\n var asString = interpolation;\n if (registered == null) {\n return asString;\n }\n var cached = registered[asString];\n return cached !== undefined ? cached : asString;\n}\nfunction createStringFromObject(mergedProps, registered, obj) {\n var string = '';\n if (Array.isArray(obj)) {\n for (var i = 0; i < obj.length; i++) {\n string += handleInterpolation(mergedProps, registered, obj[i]) + \";\";\n }\n } else {\n for (var key in obj) {\n var value = obj[key];\n if (_typeof(value) !== 'object') {\n var asString = value;\n if (registered != null && registered[asString] !== undefined) {\n string += key + \"{\" + registered[asString] + \"}\";\n } else if (isProcessableValue(asString)) {\n string += processStyleName(key) + \":\" + processStyleValue(key, asString) + \";\";\n }\n } else {\n if (key === 'NO_COMPONENT_SELECTOR' && isDevelopment) {\n throw new Error(noComponentSelectorMessage);\n }\n if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) {\n for (var _i = 0; _i < value.length; _i++) {\n if (isProcessableValue(value[_i])) {\n string += processStyleName(key) + \":\" + processStyleValue(key, value[_i]) + \";\";\n }\n }\n } else {\n var interpolated = handleInterpolation(mergedProps, registered, value);\n switch (key) {\n case 'animation':\n case 'animationName':\n {\n string += processStyleName(key) + \":\" + interpolated + \";\";\n break;\n }\n default:\n {\n string += key + \"{\" + interpolated + \"}\";\n }\n }\n }\n }\n }\n }\n return string;\n}\nvar labelPattern = /label:\\s*([^\\s;{]+)\\s*(;|$)/g; // this is the cursor for keyframes\n// keyframes are stored on the SerializedStyles object as a linked list\n\nvar cursor;\nfunction serializeStyles(args, registered, mergedProps) {\n if (args.length === 1 && _typeof(args[0]) === 'object' && args[0] !== null && args[0].styles !== undefined) {\n return args[0];\n }\n var stringMode = true;\n var styles = '';\n cursor = undefined;\n var strings = args[0];\n if (strings == null || strings.raw === undefined) {\n stringMode = false;\n styles += handleInterpolation(mergedProps, registered, strings);\n } else {\n var asTemplateStringsArr = strings;\n styles += asTemplateStringsArr[0];\n } // we start at 1 since we've already handled the first arg\n\n for (var i = 1; i < args.length; i++) {\n styles += handleInterpolation(mergedProps, registered, args[i]);\n if (stringMode) {\n var templateStringsArr = strings;\n styles += templateStringsArr[i];\n }\n } // using a global regex with .exec is stateful so lastIndex has to be reset each time\n\n labelPattern.lastIndex = 0;\n var identifierName = '';\n var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5\n\n while ((match = labelPattern.exec(styles)) !== null) {\n identifierName += '-' + match[1];\n }\n var name = hashString(styles) + identifierName;\n return {\n name: name,\n styles: styles,\n next: cursor\n };\n}\nexport { serializeStyles };","var isDevelopment = false;\n\n/*\n\nBased off glamor's StyleSheet, thanks Sunil ❤️\n\nhigh performance StyleSheet for css-in-js systems\n\n- uses multiple style tags behind the scenes for millions of rules\n- uses `insertRule` for appending in production for *much* faster performance\n\n// usage\n\nimport { StyleSheet } from '@emotion/sheet'\n\nlet styleSheet = new StyleSheet({ key: '', container: document.head })\n\nstyleSheet.insert('#box { border: 1px solid red; }')\n- appends a css rule into the stylesheet\n\nstyleSheet.flush()\n- empties the stylesheet of all its contents\n\n*/\n\nfunction sheetForTag(tag) {\n if (tag.sheet) {\n return tag.sheet;\n } // this weirdness brought to you by firefox\n\n /* istanbul ignore next */\n\n for (var i = 0; i < document.styleSheets.length; i++) {\n if (document.styleSheets[i].ownerNode === tag) {\n return document.styleSheets[i];\n }\n } // this function should always return with a value\n // TS can't understand it though so we make it stop complaining here\n\n return undefined;\n}\nfunction createStyleElement(options) {\n var tag = document.createElement('style');\n tag.setAttribute('data-emotion', options.key);\n if (options.nonce !== undefined) {\n tag.setAttribute('nonce', options.nonce);\n }\n tag.appendChild(document.createTextNode(''));\n tag.setAttribute('data-s', '');\n return tag;\n}\nvar StyleSheet = /*#__PURE__*/function () {\n // Using Node instead of HTMLElement since container may be a ShadowRoot\n function StyleSheet(options) {\n var _this = this;\n this._insertTag = function (tag) {\n var before;\n if (_this.tags.length === 0) {\n if (_this.insertionPoint) {\n before = _this.insertionPoint.nextSibling;\n } else if (_this.prepend) {\n before = _this.container.firstChild;\n } else {\n before = _this.before;\n }\n } else {\n before = _this.tags[_this.tags.length - 1].nextSibling;\n }\n _this.container.insertBefore(tag, before);\n _this.tags.push(tag);\n };\n this.isSpeedy = options.speedy === undefined ? !isDevelopment : options.speedy;\n this.tags = [];\n this.ctr = 0;\n this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets\n\n this.key = options.key;\n this.container = options.container;\n this.prepend = options.prepend;\n this.insertionPoint = options.insertionPoint;\n this.before = null;\n }\n var _proto = StyleSheet.prototype;\n _proto.hydrate = function hydrate(nodes) {\n nodes.forEach(this._insertTag);\n };\n _proto.insert = function insert(rule) {\n // the max length is how many rules we have per style tag, it's 65000 in speedy mode\n // it's 1 in dev because we insert source maps that map a single rule to a location\n // and you can only have one source map per style tag\n if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) {\n this._insertTag(createStyleElement(this));\n }\n var tag = this.tags[this.tags.length - 1];\n if (this.isSpeedy) {\n var sheet = sheetForTag(tag);\n try {\n // this is the ultrafast version, works across browsers\n // the big drawback is that the css won't be editable in devtools\n sheet.insertRule(rule, sheet.cssRules.length);\n } catch (e) {}\n } else {\n tag.appendChild(document.createTextNode(rule));\n }\n this.ctr++;\n };\n _proto.flush = function flush() {\n this.tags.forEach(function (tag) {\n var _tag$parentNode;\n return (_tag$parentNode = tag.parentNode) == null ? void 0 : _tag$parentNode.removeChild(tag);\n });\n this.tags = [];\n this.ctr = 0;\n };\n return StyleSheet;\n}();\nexport { StyleSheet };","var unitlessKeys = {\n animationIterationCount: 1,\n aspectRatio: 1,\n borderImageOutset: 1,\n borderImageSlice: 1,\n borderImageWidth: 1,\n boxFlex: 1,\n boxFlexGroup: 1,\n boxOrdinalGroup: 1,\n columnCount: 1,\n columns: 1,\n flex: 1,\n flexGrow: 1,\n flexPositive: 1,\n flexShrink: 1,\n flexNegative: 1,\n flexOrder: 1,\n gridRow: 1,\n gridRowEnd: 1,\n gridRowSpan: 1,\n gridRowStart: 1,\n gridColumn: 1,\n gridColumnEnd: 1,\n gridColumnSpan: 1,\n gridColumnStart: 1,\n msGridRow: 1,\n msGridRowSpan: 1,\n msGridColumn: 1,\n msGridColumnSpan: 1,\n fontWeight: 1,\n lineHeight: 1,\n opacity: 1,\n order: 1,\n orphans: 1,\n scale: 1,\n tabSize: 1,\n widows: 1,\n zIndex: 1,\n zoom: 1,\n WebkitLineClamp: 1,\n // SVG-related properties\n fillOpacity: 1,\n floodOpacity: 1,\n stopOpacity: 1,\n strokeDasharray: 1,\n strokeDashoffset: 1,\n strokeMiterlimit: 1,\n strokeOpacity: 1,\n strokeWidth: 1\n};\nexport { unitlessKeys as default };","import * as React from 'react';\nvar isBrowser = typeof document !== 'undefined';\nvar syncFallback = function syncFallback(create) {\n return create();\n};\nvar useInsertionEffect = React['useInsertion' + 'Effect'] ? React['useInsertion' + 'Effect'] : false;\nvar useInsertionEffectAlwaysWithSyncFallback = !isBrowser ? syncFallback : useInsertionEffect || syncFallback;\nvar useInsertionEffectWithLayoutFallback = useInsertionEffect || React.useLayoutEffect;\nexport { useInsertionEffectAlwaysWithSyncFallback, useInsertionEffectWithLayoutFallback };","var isBrowser = typeof document !== 'undefined';\nfunction getRegisteredStyles(registered, registeredStyles, classNames) {\n var rawClassName = '';\n classNames.split(' ').forEach(function (className) {\n if (registered[className] !== undefined) {\n registeredStyles.push(registered[className] + \";\");\n } else if (className) {\n rawClassName += className + \" \";\n }\n });\n return rawClassName;\n}\nvar registerStyles = function registerStyles(cache, serialized, isStringTag) {\n var className = cache.key + \"-\" + serialized.name;\n if (\n // we only need to add the styles to the registered cache if the\n // class name could be used further down\n // the tree but if it's a string tag, we know it won't\n // so we don't have to add it to registered cache.\n // this improves memory usage since we can avoid storing the whole style string\n (isStringTag === false ||\n // we need to always store it if we're in compat mode and\n // in node since emotion-server relies on whether a style is in\n // the registered cache to know whether a style is global or not\n // also, note that this check will be dead code eliminated in the browser\n isBrowser === false && cache.compat !== undefined) && cache.registered[className] === undefined) {\n cache.registered[className] = serialized.styles;\n }\n};\nvar insertStyles = function insertStyles(cache, serialized, isStringTag) {\n registerStyles(cache, serialized, isStringTag);\n var className = cache.key + \"-\" + serialized.name;\n if (cache.inserted[serialized.name] === undefined) {\n var stylesForSSR = '';\n var current = serialized;\n do {\n var maybeStyles = cache.insert(serialized === current ? \".\" + className : '', current, cache.sheet, true);\n if (!isBrowser && maybeStyles !== undefined) {\n stylesForSSR += maybeStyles;\n }\n current = current.next;\n } while (current !== undefined);\n if (!isBrowser && stylesForSSR.length !== 0) {\n return stylesForSSR;\n }\n }\n};\nexport { getRegisteredStyles, insertStyles, registerStyles };","var weakMemoize = function weakMemoize(func) {\n var cache = new WeakMap();\n return function (arg) {\n if (cache.has(arg)) {\n // Use non-null assertion because we just checked that the cache `has` it\n // This allows us to remove `undefined` from the return value\n return cache.get(arg);\n }\n var ret = func(arg);\n cache.set(arg, ret);\n return ret;\n };\n};\nexport { weakMemoize as default };","var _excluded = [\"crossAxis\", \"alignment\", \"allowedPlacements\", \"autoAlignment\"],\n _excluded2 = [\"mainAxis\", \"crossAxis\", \"fallbackPlacements\", \"fallbackStrategy\", \"fallbackAxisSideDirection\", \"flipAlignment\"],\n _excluded3 = [\"strategy\"],\n _excluded4 = [\"mainAxis\", \"crossAxis\", \"limiter\"],\n _excluded5 = [\"apply\"];\nfunction _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }\nfunction _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }\nfunction _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }\nfunction _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.\"); }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _iterableToArray(r) { if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r); }\nfunction _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\nfunction _regeneratorRuntime() { \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _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 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 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 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; }\nfunction _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); }\nfunction 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; }\nfunction _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; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _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); }\nfunction asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }\nfunction _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"next\", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"throw\", n); } _next(void 0); }); }; }\nimport { getSideAxis, getAlignmentAxis, getAxisLength, getSide, getAlignment, evaluate, getPaddingObject, rectToClientRect, min, clamp, placements, getAlignmentSides, getOppositeAlignmentPlacement, getOppositePlacement, getExpandedPlacements, getOppositeAxisPlacements, sides, max, getOppositeAxis } from '@floating-ui/utils';\nexport { rectToClientRect } from '@floating-ui/utils';\nfunction computeCoordsFromPlacement(_ref, placement, rtl) {\n var reference = _ref.reference,\n floating = _ref.floating;\n var sideAxis = getSideAxis(placement);\n var alignmentAxis = getAlignmentAxis(placement);\n var alignLength = getAxisLength(alignmentAxis);\n var side = getSide(placement);\n var isVertical = sideAxis === 'y';\n var commonX = reference.x + reference.width / 2 - floating.width / 2;\n var commonY = reference.y + reference.height / 2 - floating.height / 2;\n var commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;\n var coords;\n switch (side) {\n case 'top':\n coords = {\n x: commonX,\n y: reference.y - floating.height\n };\n break;\n case 'bottom':\n coords = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n case 'right':\n coords = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n case 'left':\n coords = {\n x: reference.x - floating.width,\n y: commonY\n };\n break;\n default:\n coords = {\n x: reference.x,\n y: reference.y\n };\n }\n switch (getAlignment(placement)) {\n case 'start':\n coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n case 'end':\n coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n }\n return coords;\n}\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n *\n * This export does not have any `platform` interface logic. You will need to\n * write one for the platform you are using Floating UI with.\n */\nvar computePosition = /*#__PURE__*/function () {\n var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(reference, floating, config) {\n var _config$placement, placement, _config$strategy, strategy, _config$middleware, middleware, platform, validMiddleware, rtl, rects, _computeCoordsFromPla, x, y, statefulPlacement, middlewareData, resetCount, i, _validMiddleware$i, name, fn, _yield$fn, nextX, nextY, data, reset, _computeCoordsFromPla2;\n return _regeneratorRuntime().wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n _config$placement = config.placement, placement = _config$placement === void 0 ? 'bottom' : _config$placement, _config$strategy = config.strategy, strategy = _config$strategy === void 0 ? 'absolute' : _config$strategy, _config$middleware = config.middleware, middleware = _config$middleware === void 0 ? [] : _config$middleware, platform = config.platform;\n validMiddleware = middleware.filter(Boolean);\n _context.next = 4;\n return platform.isRTL == null ? void 0 : platform.isRTL(floating);\n case 4:\n rtl = _context.sent;\n _context.next = 7;\n return platform.getElementRects({\n reference: reference,\n floating: floating,\n strategy: strategy\n });\n case 7:\n rects = _context.sent;\n _computeCoordsFromPla = computeCoordsFromPlacement(rects, placement, rtl), x = _computeCoordsFromPla.x, y = _computeCoordsFromPla.y;\n statefulPlacement = placement;\n middlewareData = {};\n resetCount = 0;\n i = 0;\n case 13:\n if (!(i < validMiddleware.length)) {\n _context.next = 45;\n break;\n }\n _validMiddleware$i = validMiddleware[i], name = _validMiddleware$i.name, fn = _validMiddleware$i.fn;\n _context.next = 17;\n return fn({\n x: x,\n y: y,\n initialPlacement: placement,\n placement: statefulPlacement,\n strategy: strategy,\n middlewareData: middlewareData,\n rects: rects,\n platform: platform,\n elements: {\n reference: reference,\n floating: floating\n }\n });\n case 17:\n _yield$fn = _context.sent;\n nextX = _yield$fn.x;\n nextY = _yield$fn.y;\n data = _yield$fn.data;\n reset = _yield$fn.reset;\n x = nextX != null ? nextX : x;\n y = nextY != null ? nextY : y;\n middlewareData = _objectSpread(_objectSpread({}, middlewareData), {}, _defineProperty({}, name, _objectSpread(_objectSpread({}, middlewareData[name]), data)));\n if (!(reset && resetCount <= 50)) {\n _context.next = 42;\n break;\n }\n resetCount++;\n if (!(_typeof(reset) === 'object')) {\n _context.next = 41;\n break;\n }\n if (reset.placement) {\n statefulPlacement = reset.placement;\n }\n if (!reset.rects) {\n _context.next = 38;\n break;\n }\n if (!(reset.rects === true)) {\n _context.next = 36;\n break;\n }\n _context.next = 33;\n return platform.getElementRects({\n reference: reference,\n floating: floating,\n strategy: strategy\n });\n case 33:\n _context.t0 = _context.sent;\n _context.next = 37;\n break;\n case 36:\n _context.t0 = reset.rects;\n case 37:\n rects = _context.t0;\n case 38:\n _computeCoordsFromPla2 = computeCoordsFromPlacement(rects, statefulPlacement, rtl);\n x = _computeCoordsFromPla2.x;\n y = _computeCoordsFromPla2.y;\n case 41:\n i = -1;\n case 42:\n i++;\n _context.next = 13;\n break;\n case 45:\n return _context.abrupt(\"return\", {\n x: x,\n y: y,\n placement: statefulPlacement,\n strategy: strategy,\n middlewareData: middlewareData\n });\n case 46:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return function computePosition(_x, _x2, _x3) {\n return _ref2.apply(this, arguments);\n };\n}();\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nfunction detectOverflow(_x4, _x5) {\n return _detectOverflow.apply(this, arguments);\n}\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nfunction _detectOverflow() {\n _detectOverflow = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee10(state, options) {\n var _await$platform$isEle, x, y, platform, rects, elements, strategy, _evaluate8, _evaluate8$boundary, boundary, _evaluate8$rootBounda, rootBoundary, _evaluate8$elementCon, elementContext, _evaluate8$altBoundar, altBoundary, _evaluate8$padding, padding, paddingObject, altContext, element, clippingClientRect, rect, offsetParent, offsetScale, elementClientRect;\n return _regeneratorRuntime().wrap(function _callee10$(_context10) {\n while (1) switch (_context10.prev = _context10.next) {\n case 0:\n if (options === void 0) {\n options = {};\n }\n x = state.x, y = state.y, platform = state.platform, rects = state.rects, elements = state.elements, strategy = state.strategy;\n _evaluate8 = evaluate(options, state), _evaluate8$boundary = _evaluate8.boundary, boundary = _evaluate8$boundary === void 0 ? 'clippingAncestors' : _evaluate8$boundary, _evaluate8$rootBounda = _evaluate8.rootBoundary, rootBoundary = _evaluate8$rootBounda === void 0 ? 'viewport' : _evaluate8$rootBounda, _evaluate8$elementCon = _evaluate8.elementContext, elementContext = _evaluate8$elementCon === void 0 ? 'floating' : _evaluate8$elementCon, _evaluate8$altBoundar = _evaluate8.altBoundary, altBoundary = _evaluate8$altBoundar === void 0 ? false : _evaluate8$altBoundar, _evaluate8$padding = _evaluate8.padding, padding = _evaluate8$padding === void 0 ? 0 : _evaluate8$padding;\n paddingObject = getPaddingObject(padding);\n altContext = elementContext === 'floating' ? 'reference' : 'floating';\n element = elements[altBoundary ? altContext : elementContext];\n _context10.t0 = rectToClientRect;\n _context10.t1 = platform;\n _context10.next = 10;\n return platform.isElement == null ? void 0 : platform.isElement(element);\n case 10:\n _context10.t2 = _await$platform$isEle = _context10.sent;\n if (!(_context10.t2 != null)) {\n _context10.next = 15;\n break;\n }\n _context10.t3 = _await$platform$isEle;\n _context10.next = 16;\n break;\n case 15:\n _context10.t3 = true;\n case 16:\n if (!_context10.t3) {\n _context10.next = 20;\n break;\n }\n _context10.t4 = element;\n _context10.next = 26;\n break;\n case 20:\n _context10.t5 = element.contextElement;\n if (_context10.t5) {\n _context10.next = 25;\n break;\n }\n _context10.next = 24;\n return platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating);\n case 24:\n _context10.t5 = _context10.sent;\n case 25:\n _context10.t4 = _context10.t5;\n case 26:\n _context10.t6 = _context10.t4;\n _context10.t7 = boundary;\n _context10.t8 = rootBoundary;\n _context10.t9 = strategy;\n _context10.t10 = {\n element: _context10.t6,\n boundary: _context10.t7,\n rootBoundary: _context10.t8,\n strategy: _context10.t9\n };\n _context10.next = 33;\n return _context10.t1.getClippingRect.call(_context10.t1, _context10.t10);\n case 33:\n _context10.t11 = _context10.sent;\n clippingClientRect = (0, _context10.t0)(_context10.t11);\n rect = elementContext === 'floating' ? {\n x: x,\n y: y,\n width: rects.floating.width,\n height: rects.floating.height\n } : rects.reference;\n _context10.next = 38;\n return platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating);\n case 38:\n offsetParent = _context10.sent;\n _context10.next = 41;\n return platform.isElement == null ? void 0 : platform.isElement(offsetParent);\n case 41:\n if (!_context10.sent) {\n _context10.next = 50;\n break;\n }\n _context10.next = 44;\n return platform.getScale == null ? void 0 : platform.getScale(offsetParent);\n case 44:\n _context10.t13 = _context10.sent;\n if (_context10.t13) {\n _context10.next = 47;\n break;\n }\n _context10.t13 = {\n x: 1,\n y: 1\n };\n case 47:\n _context10.t12 = _context10.t13;\n _context10.next = 51;\n break;\n case 50:\n _context10.t12 = {\n x: 1,\n y: 1\n };\n case 51:\n offsetScale = _context10.t12;\n _context10.t14 = rectToClientRect;\n if (!platform.convertOffsetParentRelativeRectToViewportRelativeRect) {\n _context10.next = 59;\n break;\n }\n _context10.next = 56;\n return platform.convertOffsetParentRelativeRectToViewportRelativeRect({\n elements: elements,\n rect: rect,\n offsetParent: offsetParent,\n strategy: strategy\n });\n case 56:\n _context10.t15 = _context10.sent;\n _context10.next = 60;\n break;\n case 59:\n _context10.t15 = rect;\n case 60:\n _context10.t16 = _context10.t15;\n elementClientRect = (0, _context10.t14)(_context10.t16);\n return _context10.abrupt(\"return\", {\n top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,\n bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,\n left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,\n right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x\n });\n case 63:\n case \"end\":\n return _context10.stop();\n }\n }, _callee10);\n }));\n return _detectOverflow.apply(this, arguments);\n}\nvar arrow = function arrow(options) {\n return {\n name: 'arrow',\n options: options,\n fn: function fn(state) {\n return _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {\n var x, y, placement, rects, platform, elements, middlewareData, _ref3, element, _ref3$padding, padding, paddingObject, coords, axis, length, arrowDimensions, isYAxis, minProp, maxProp, clientProp, endDiff, startDiff, arrowOffsetParent, clientSize, centerToReference, largestPossiblePadding, minPadding, maxPadding, min$1, max, center, offset, shouldAddOffset, alignmentOffset;\n return _regeneratorRuntime().wrap(function _callee2$(_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n x = state.x, y = state.y, placement = state.placement, rects = state.rects, platform = state.platform, elements = state.elements, middlewareData = state.middlewareData; // Since `element` is required, we don't Partial<> the type.\n _ref3 = evaluate(options, state) || {}, element = _ref3.element, _ref3$padding = _ref3.padding, padding = _ref3$padding === void 0 ? 0 : _ref3$padding;\n if (!(element == null)) {\n _context2.next = 4;\n break;\n }\n return _context2.abrupt(\"return\", {});\n case 4:\n paddingObject = getPaddingObject(padding);\n coords = {\n x: x,\n y: y\n };\n axis = getAlignmentAxis(placement);\n length = getAxisLength(axis);\n _context2.next = 10;\n return platform.getDimensions(element);\n case 10:\n arrowDimensions = _context2.sent;\n isYAxis = axis === 'y';\n minProp = isYAxis ? 'top' : 'left';\n maxProp = isYAxis ? 'bottom' : 'right';\n clientProp = isYAxis ? 'clientHeight' : 'clientWidth';\n endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];\n startDiff = coords[axis] - rects.reference[axis];\n _context2.next = 19;\n return platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element);\n case 19:\n arrowOffsetParent = _context2.sent;\n clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0; // DOM platform can return `window` as the `offsetParent`.\n _context2.t0 = !clientSize;\n if (_context2.t0) {\n _context2.next = 26;\n break;\n }\n _context2.next = 25;\n return platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent);\n case 25:\n _context2.t0 = !_context2.sent;\n case 26:\n if (!_context2.t0) {\n _context2.next = 28;\n break;\n }\n clientSize = elements.floating[clientProp] || rects.floating[length];\n case 28:\n centerToReference = endDiff / 2 - startDiff / 2; // If the padding is large enough that it causes the arrow to no longer be\n // centered, modify the padding so that it is centered.\n largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;\n minPadding = min(paddingObject[minProp], largestPossiblePadding);\n maxPadding = min(paddingObject[maxProp], largestPossiblePadding); // Make sure the arrow doesn't overflow the floating element if the center\n // point is outside the floating element's bounds.\n min$1 = minPadding;\n max = clientSize - arrowDimensions[length] - maxPadding;\n center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;\n offset = clamp(min$1, center, max); // If the reference is small enough that the arrow's padding causes it to\n // to point to nothing for an aligned placement, adjust the offset of the\n // floating element itself. To ensure `shift()` continues to take action,\n // a single reset is performed when this is true.\n shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;\n alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;\n return _context2.abrupt(\"return\", _defineProperty(_defineProperty(_defineProperty({}, axis, coords[axis] + alignmentOffset), \"data\", _objectSpread(_defineProperty(_defineProperty({}, axis, offset), \"centerOffset\", center - offset - alignmentOffset), shouldAddOffset && {\n alignmentOffset: alignmentOffset\n })), \"reset\", shouldAddOffset));\n case 39:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2);\n }))();\n }\n };\n};\nfunction getPlacementList(alignment, autoAlignment, allowedPlacements) {\n var allowedPlacementsSortedByAlignment = alignment ? [].concat(_toConsumableArray(allowedPlacements.filter(function (placement) {\n return getAlignment(placement) === alignment;\n })), _toConsumableArray(allowedPlacements.filter(function (placement) {\n return getAlignment(placement) !== alignment;\n }))) : allowedPlacements.filter(function (placement) {\n return getSide(placement) === placement;\n });\n return allowedPlacementsSortedByAlignment.filter(function (placement) {\n if (alignment) {\n return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);\n }\n return true;\n });\n}\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nvar autoPlacement = function autoPlacement(options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'autoPlacement',\n options: options,\n fn: function fn(state) {\n return _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {\n var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE, rects, middlewareData, placement, platform, elements, _evaluate, _evaluate$crossAxis, crossAxis, alignment, _evaluate$allowedPlac, allowedPlacements, _evaluate$autoAlignme, autoAlignment, detectOverflowOptions, placements$1, overflow, currentIndex, currentPlacement, alignmentSides, currentOverflows, allOverflows, nextPlacement, placementsSortedByMostSpace, placementsThatFitOnEachSide, resetPlacement;\n return _regeneratorRuntime().wrap(function _callee3$(_context3) {\n while (1) switch (_context3.prev = _context3.next) {\n case 0:\n rects = state.rects, middlewareData = state.middlewareData, placement = state.placement, platform = state.platform, elements = state.elements;\n _evaluate = evaluate(options, state), _evaluate$crossAxis = _evaluate.crossAxis, crossAxis = _evaluate$crossAxis === void 0 ? false : _evaluate$crossAxis, alignment = _evaluate.alignment, _evaluate$allowedPlac = _evaluate.allowedPlacements, allowedPlacements = _evaluate$allowedPlac === void 0 ? placements : _evaluate$allowedPlac, _evaluate$autoAlignme = _evaluate.autoAlignment, autoAlignment = _evaluate$autoAlignme === void 0 ? true : _evaluate$autoAlignme, detectOverflowOptions = _objectWithoutProperties(_evaluate, _excluded);\n placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;\n _context3.next = 5;\n return detectOverflow(state, detectOverflowOptions);\n case 5:\n overflow = _context3.sent;\n currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;\n currentPlacement = placements$1[currentIndex];\n if (!(currentPlacement == null)) {\n _context3.next = 10;\n break;\n }\n return _context3.abrupt(\"return\", {});\n case 10:\n _context3.t0 = getAlignmentSides;\n _context3.t1 = currentPlacement;\n _context3.t2 = rects;\n _context3.next = 15;\n return platform.isRTL == null ? void 0 : platform.isRTL(elements.floating);\n case 15:\n _context3.t3 = _context3.sent;\n alignmentSides = (0, _context3.t0)(_context3.t1, _context3.t2, _context3.t3);\n if (!(placement !== currentPlacement)) {\n _context3.next = 19;\n break;\n }\n return _context3.abrupt(\"return\", {\n reset: {\n placement: placements$1[0]\n }\n });\n case 19:\n currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];\n allOverflows = [].concat(_toConsumableArray(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), [{\n placement: currentPlacement,\n overflows: currentOverflows\n }]);\n nextPlacement = placements$1[currentIndex + 1]; // There are more placements to check.\n if (!nextPlacement) {\n _context3.next = 24;\n break;\n }\n return _context3.abrupt(\"return\", {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: nextPlacement\n }\n });\n case 24:\n placementsSortedByMostSpace = allOverflows.map(function (d) {\n var alignment = getAlignment(d.placement);\n return [d.placement, alignment && crossAxis ?\n // Check along the mainAxis and main crossAxis side.\n d.overflows.slice(0, 2).reduce(function (acc, v) {\n return acc + v;\n }, 0) :\n // Check only the mainAxis.\n d.overflows[0], d.overflows];\n }).sort(function (a, b) {\n return a[1] - b[1];\n });\n placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(function (d) {\n return d[2].slice(0,\n // Aligned placements should not check their opposite crossAxis\n // side.\n getAlignment(d[0]) ? 2 : 3).every(function (v) {\n return v <= 0;\n });\n });\n resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];\n if (!(resetPlacement !== placement)) {\n _context3.next = 29;\n break;\n }\n return _context3.abrupt(\"return\", {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: resetPlacement\n }\n });\n case 29:\n return _context3.abrupt(\"return\", {});\n case 30:\n case \"end\":\n return _context3.stop();\n }\n }, _callee3);\n }))();\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nvar flip = function flip(options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'flip',\n options: options,\n fn: function fn(state) {\n return _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {\n var _middlewareData$arrow, _middlewareData$flip, placement, middlewareData, rects, initialPlacement, platform, elements, _evaluate2, _evaluate2$mainAxis, checkMainAxis, _evaluate2$crossAxis, checkCrossAxis, specifiedFallbackPlacements, _evaluate2$fallbackSt, fallbackStrategy, _evaluate2$fallbackAx, fallbackAxisSideDirection, _evaluate2$flipAlignm, flipAlignment, detectOverflowOptions, side, initialSideAxis, isBasePlacement, rtl, fallbackPlacements, hasFallbackAxisSideDirection, placements, overflow, overflows, overflowsData, _sides, _middlewareData$flip2, _overflowsData$filter, nextIndex, nextPlacement, resetPlacement, _overflowsData$filter2, _placement;\n return _regeneratorRuntime().wrap(function _callee4$(_context4) {\n while (1) switch (_context4.prev = _context4.next) {\n case 0:\n placement = state.placement, middlewareData = state.middlewareData, rects = state.rects, initialPlacement = state.initialPlacement, platform = state.platform, elements = state.elements;\n _evaluate2 = evaluate(options, state), _evaluate2$mainAxis = _evaluate2.mainAxis, checkMainAxis = _evaluate2$mainAxis === void 0 ? true : _evaluate2$mainAxis, _evaluate2$crossAxis = _evaluate2.crossAxis, checkCrossAxis = _evaluate2$crossAxis === void 0 ? true : _evaluate2$crossAxis, specifiedFallbackPlacements = _evaluate2.fallbackPlacements, _evaluate2$fallbackSt = _evaluate2.fallbackStrategy, fallbackStrategy = _evaluate2$fallbackSt === void 0 ? 'bestFit' : _evaluate2$fallbackSt, _evaluate2$fallbackAx = _evaluate2.fallbackAxisSideDirection, fallbackAxisSideDirection = _evaluate2$fallbackAx === void 0 ? 'none' : _evaluate2$fallbackAx, _evaluate2$flipAlignm = _evaluate2.flipAlignment, flipAlignment = _evaluate2$flipAlignm === void 0 ? true : _evaluate2$flipAlignm, detectOverflowOptions = _objectWithoutProperties(_evaluate2, _excluded2); // If a reset by the arrow was caused due to an alignment offset being\n // added, we should skip any logic now since `flip()` has already done its\n // work.\n // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643\n if (!((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset)) {\n _context4.next = 4;\n break;\n }\n return _context4.abrupt(\"return\", {});\n case 4:\n side = getSide(placement);\n initialSideAxis = getSideAxis(initialPlacement);\n isBasePlacement = getSide(initialPlacement) === initialPlacement;\n _context4.next = 9;\n return platform.isRTL == null ? void 0 : platform.isRTL(elements.floating);\n case 9:\n rtl = _context4.sent;\n fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));\n hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';\n if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {\n fallbackPlacements.push.apply(fallbackPlacements, _toConsumableArray(getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl)));\n }\n placements = [initialPlacement].concat(_toConsumableArray(fallbackPlacements));\n _context4.next = 16;\n return detectOverflow(state, detectOverflowOptions);\n case 16:\n overflow = _context4.sent;\n overflows = [];\n overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];\n if (checkMainAxis) {\n overflows.push(overflow[side]);\n }\n if (checkCrossAxis) {\n _sides = getAlignmentSides(placement, rects, rtl);\n overflows.push(overflow[_sides[0]], overflow[_sides[1]]);\n }\n overflowsData = [].concat(_toConsumableArray(overflowsData), [{\n placement: placement,\n overflows: overflows\n }]);\n\n // One or more sides is overflowing.\n if (overflows.every(function (side) {\n return side <= 0;\n })) {\n _context4.next = 39;\n break;\n }\n nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;\n nextPlacement = placements[nextIndex];\n if (!nextPlacement) {\n _context4.next = 27;\n break;\n }\n return _context4.abrupt(\"return\", {\n data: {\n index: nextIndex,\n overflows: overflowsData\n },\n reset: {\n placement: nextPlacement\n }\n });\n case 27:\n // First, find the candidates that fit on the mainAxis side of overflow,\n // then find the placement that fits the best on the main crossAxis side.\n resetPlacement = (_overflowsData$filter = overflowsData.filter(function (d) {\n return d.overflows[0] <= 0;\n }).sort(function (a, b) {\n return a.overflows[1] - b.overflows[1];\n })[0]) == null ? void 0 : _overflowsData$filter.placement; // Otherwise fallback.\n if (resetPlacement) {\n _context4.next = 37;\n break;\n }\n _context4.t0 = fallbackStrategy;\n _context4.next = _context4.t0 === 'bestFit' ? 32 : _context4.t0 === 'initialPlacement' ? 35 : 37;\n break;\n case 32:\n _placement = (_overflowsData$filter2 = overflowsData.filter(function (d) {\n if (hasFallbackAxisSideDirection) {\n var currentSideAxis = getSideAxis(d.placement);\n return currentSideAxis === initialSideAxis ||\n // Create a bias to the `y` side axis due to horizontal\n // reading directions favoring greater width.\n currentSideAxis === 'y';\n }\n return true;\n }).map(function (d) {\n return [d.placement, d.overflows.filter(function (overflow) {\n return overflow > 0;\n }).reduce(function (acc, overflow) {\n return acc + overflow;\n }, 0)];\n }).sort(function (a, b) {\n return a[1] - b[1];\n })[0]) == null ? void 0 : _overflowsData$filter2[0];\n if (_placement) {\n resetPlacement = _placement;\n }\n return _context4.abrupt(\"break\", 37);\n case 35:\n resetPlacement = initialPlacement;\n return _context4.abrupt(\"break\", 37);\n case 37:\n if (!(placement !== resetPlacement)) {\n _context4.next = 39;\n break;\n }\n return _context4.abrupt(\"return\", {\n reset: {\n placement: resetPlacement\n }\n });\n case 39:\n return _context4.abrupt(\"return\", {});\n case 40:\n case \"end\":\n return _context4.stop();\n }\n }, _callee4);\n }))();\n }\n };\n};\nfunction getSideOffsets(overflow, rect) {\n return {\n top: overflow.top - rect.height,\n right: overflow.right - rect.width,\n bottom: overflow.bottom - rect.height,\n left: overflow.left - rect.width\n };\n}\nfunction isAnySideFullyClipped(overflow) {\n return sides.some(function (side) {\n return overflow[side] >= 0;\n });\n}\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nvar hide = function hide(options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'hide',\n options: options,\n fn: function fn(state) {\n return _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {\n var rects, _evaluate3, _evaluate3$strategy, strategy, detectOverflowOptions, overflow, offsets, _overflow, _offsets;\n return _regeneratorRuntime().wrap(function _callee5$(_context5) {\n while (1) switch (_context5.prev = _context5.next) {\n case 0:\n rects = state.rects;\n _evaluate3 = evaluate(options, state), _evaluate3$strategy = _evaluate3.strategy, strategy = _evaluate3$strategy === void 0 ? 'referenceHidden' : _evaluate3$strategy, detectOverflowOptions = _objectWithoutProperties(_evaluate3, _excluded3);\n _context5.t0 = strategy;\n _context5.next = _context5.t0 === 'referenceHidden' ? 5 : _context5.t0 === 'escaped' ? 10 : 15;\n break;\n case 5:\n _context5.next = 7;\n return detectOverflow(state, _objectSpread(_objectSpread({}, detectOverflowOptions), {}, {\n elementContext: 'reference'\n }));\n case 7:\n overflow = _context5.sent;\n offsets = getSideOffsets(overflow, rects.reference);\n return _context5.abrupt(\"return\", {\n data: {\n referenceHiddenOffsets: offsets,\n referenceHidden: isAnySideFullyClipped(offsets)\n }\n });\n case 10:\n _context5.next = 12;\n return detectOverflow(state, _objectSpread(_objectSpread({}, detectOverflowOptions), {}, {\n altBoundary: true\n }));\n case 12:\n _overflow = _context5.sent;\n _offsets = getSideOffsets(_overflow, rects.floating);\n return _context5.abrupt(\"return\", {\n data: {\n escapedOffsets: _offsets,\n escaped: isAnySideFullyClipped(_offsets)\n }\n });\n case 15:\n return _context5.abrupt(\"return\", {});\n case 16:\n case \"end\":\n return _context5.stop();\n }\n }, _callee5);\n }))();\n }\n };\n};\nfunction getBoundingRect(rects) {\n var minX = min.apply(void 0, _toConsumableArray(rects.map(function (rect) {\n return rect.left;\n })));\n var minY = min.apply(void 0, _toConsumableArray(rects.map(function (rect) {\n return rect.top;\n })));\n var maxX = max.apply(void 0, _toConsumableArray(rects.map(function (rect) {\n return rect.right;\n })));\n var maxY = max.apply(void 0, _toConsumableArray(rects.map(function (rect) {\n return rect.bottom;\n })));\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY\n };\n}\nfunction getRectsByLine(rects) {\n var sortedRects = rects.slice().sort(function (a, b) {\n return a.y - b.y;\n });\n var groups = [];\n var prevRect = null;\n for (var i = 0; i < sortedRects.length; i++) {\n var rect = sortedRects[i];\n if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {\n groups.push([rect]);\n } else {\n groups[groups.length - 1].push(rect);\n }\n prevRect = rect;\n }\n return groups.map(function (rect) {\n return rectToClientRect(getBoundingRect(rect));\n });\n}\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nvar inline = function inline(options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'inline',\n options: options,\n fn: function fn(state) {\n return _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {\n var placement, elements, rects, platform, strategy, _evaluate4, _evaluate4$padding, padding, x, y, nativeClientRects, clientRects, fallback, paddingObject, getBoundingClientRect, resetRects;\n return _regeneratorRuntime().wrap(function _callee6$(_context6) {\n while (1) switch (_context6.prev = _context6.next) {\n case 0:\n getBoundingClientRect = function _getBoundingClientRec() {\n // There are two rects and they are disjoined.\n if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {\n // Find the first rect in which the point is fully inside.\n return clientRects.find(function (rect) {\n return x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom;\n }) || fallback;\n }\n\n // There are 2 or more connected rects.\n if (clientRects.length >= 2) {\n if (getSideAxis(placement) === 'y') {\n var firstRect = clientRects[0];\n var lastRect = clientRects[clientRects.length - 1];\n var isTop = getSide(placement) === 'top';\n var _top = firstRect.top;\n var _bottom = lastRect.bottom;\n var _left = isTop ? firstRect.left : lastRect.left;\n var _right = isTop ? firstRect.right : lastRect.right;\n var _width = _right - _left;\n var _height = _bottom - _top;\n return {\n top: _top,\n bottom: _bottom,\n left: _left,\n right: _right,\n width: _width,\n height: _height,\n x: _left,\n y: _top\n };\n }\n var isLeftSide = getSide(placement) === 'left';\n var maxRight = max.apply(void 0, _toConsumableArray(clientRects.map(function (rect) {\n return rect.right;\n })));\n var minLeft = min.apply(void 0, _toConsumableArray(clientRects.map(function (rect) {\n return rect.left;\n })));\n var measureRects = clientRects.filter(function (rect) {\n return isLeftSide ? rect.left === minLeft : rect.right === maxRight;\n });\n var top = measureRects[0].top;\n var bottom = measureRects[measureRects.length - 1].bottom;\n var left = minLeft;\n var right = maxRight;\n var width = right - left;\n var height = bottom - top;\n return {\n top: top,\n bottom: bottom,\n left: left,\n right: right,\n width: width,\n height: height,\n x: left,\n y: top\n };\n }\n return fallback;\n };\n placement = state.placement, elements = state.elements, rects = state.rects, platform = state.platform, strategy = state.strategy; // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a\n // ClientRect's bounds, despite the event listener being triggered. A\n // padding of 2 seems to handle this issue.\n _evaluate4 = evaluate(options, state), _evaluate4$padding = _evaluate4.padding, padding = _evaluate4$padding === void 0 ? 2 : _evaluate4$padding, x = _evaluate4.x, y = _evaluate4.y;\n _context6.t0 = Array;\n _context6.next = 6;\n return platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference);\n case 6:\n _context6.t1 = _context6.sent;\n if (_context6.t1) {\n _context6.next = 9;\n break;\n }\n _context6.t1 = [];\n case 9:\n _context6.t2 = _context6.t1;\n nativeClientRects = _context6.t0.from.call(_context6.t0, _context6.t2);\n clientRects = getRectsByLine(nativeClientRects);\n fallback = rectToClientRect(getBoundingRect(nativeClientRects));\n paddingObject = getPaddingObject(padding);\n _context6.next = 16;\n return platform.getElementRects({\n reference: {\n getBoundingClientRect: getBoundingClientRect\n },\n floating: elements.floating,\n strategy: strategy\n });\n case 16:\n resetRects = _context6.sent;\n if (!(rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height)) {\n _context6.next = 19;\n break;\n }\n return _context6.abrupt(\"return\", {\n reset: {\n rects: resetRects\n }\n });\n case 19:\n return _context6.abrupt(\"return\", {});\n case 20:\n case \"end\":\n return _context6.stop();\n }\n }, _callee6);\n }))();\n }\n };\n};\n\n// For type backwards-compatibility, the `OffsetOptions` type was also\n// Derivable.\nfunction convertValueToCoords(_x6, _x7) {\n return _convertValueToCoords.apply(this, arguments);\n}\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nfunction _convertValueToCoords() {\n _convertValueToCoords = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee11(state, options) {\n var placement, platform, elements, rtl, side, alignment, isVertical, mainAxisMulti, crossAxisMulti, rawValue, _ref6, mainAxis, crossAxis, alignmentAxis;\n return _regeneratorRuntime().wrap(function _callee11$(_context11) {\n while (1) switch (_context11.prev = _context11.next) {\n case 0:\n placement = state.placement, platform = state.platform, elements = state.elements;\n _context11.next = 3;\n return platform.isRTL == null ? void 0 : platform.isRTL(elements.floating);\n case 3:\n rtl = _context11.sent;\n side = getSide(placement);\n alignment = getAlignment(placement);\n isVertical = getSideAxis(placement) === 'y';\n mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;\n crossAxisMulti = rtl && isVertical ? -1 : 1;\n rawValue = evaluate(options, state); // eslint-disable-next-line prefer-const\n _ref6 = typeof rawValue === 'number' ? {\n mainAxis: rawValue,\n crossAxis: 0,\n alignmentAxis: null\n } : {\n mainAxis: rawValue.mainAxis || 0,\n crossAxis: rawValue.crossAxis || 0,\n alignmentAxis: rawValue.alignmentAxis\n }, mainAxis = _ref6.mainAxis, crossAxis = _ref6.crossAxis, alignmentAxis = _ref6.alignmentAxis;\n if (alignment && typeof alignmentAxis === 'number') {\n crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;\n }\n return _context11.abrupt(\"return\", isVertical ? {\n x: crossAxis * crossAxisMulti,\n y: mainAxis * mainAxisMulti\n } : {\n x: mainAxis * mainAxisMulti,\n y: crossAxis * crossAxisMulti\n });\n case 13:\n case \"end\":\n return _context11.stop();\n }\n }, _callee11);\n }));\n return _convertValueToCoords.apply(this, arguments);\n}\nvar offset = function offset(options) {\n if (options === void 0) {\n options = 0;\n }\n return {\n name: 'offset',\n options: options,\n fn: function fn(state) {\n return _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {\n var _middlewareData$offse, _middlewareData$arrow, x, y, placement, middlewareData, diffCoords;\n return _regeneratorRuntime().wrap(function _callee7$(_context7) {\n while (1) switch (_context7.prev = _context7.next) {\n case 0:\n x = state.x, y = state.y, placement = state.placement, middlewareData = state.middlewareData;\n _context7.next = 3;\n return convertValueToCoords(state, options);\n case 3:\n diffCoords = _context7.sent;\n if (!(placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset)) {\n _context7.next = 6;\n break;\n }\n return _context7.abrupt(\"return\", {});\n case 6:\n return _context7.abrupt(\"return\", {\n x: x + diffCoords.x,\n y: y + diffCoords.y,\n data: _objectSpread(_objectSpread({}, diffCoords), {}, {\n placement: placement\n })\n });\n case 7:\n case \"end\":\n return _context7.stop();\n }\n }, _callee7);\n }))();\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nvar shift = function shift(options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'shift',\n options: options,\n fn: function fn(state) {\n return _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {\n var x, y, placement, _evaluate5, _evaluate5$mainAxis, checkMainAxis, _evaluate5$crossAxis, checkCrossAxis, _evaluate5$limiter, limiter, detectOverflowOptions, coords, overflow, crossAxis, mainAxis, mainAxisCoord, crossAxisCoord, minSide, maxSide, _min, _max, _minSide, _maxSide, _min2, _max2, limitedCoords;\n return _regeneratorRuntime().wrap(function _callee8$(_context8) {\n while (1) switch (_context8.prev = _context8.next) {\n case 0:\n x = state.x, y = state.y, placement = state.placement;\n _evaluate5 = evaluate(options, state), _evaluate5$mainAxis = _evaluate5.mainAxis, checkMainAxis = _evaluate5$mainAxis === void 0 ? true : _evaluate5$mainAxis, _evaluate5$crossAxis = _evaluate5.crossAxis, checkCrossAxis = _evaluate5$crossAxis === void 0 ? false : _evaluate5$crossAxis, _evaluate5$limiter = _evaluate5.limiter, limiter = _evaluate5$limiter === void 0 ? {\n fn: function fn(_ref) {\n var x = _ref.x,\n y = _ref.y;\n return {\n x: x,\n y: y\n };\n }\n } : _evaluate5$limiter, detectOverflowOptions = _objectWithoutProperties(_evaluate5, _excluded4);\n coords = {\n x: x,\n y: y\n };\n _context8.next = 5;\n return detectOverflow(state, detectOverflowOptions);\n case 5:\n overflow = _context8.sent;\n crossAxis = getSideAxis(getSide(placement));\n mainAxis = getOppositeAxis(crossAxis);\n mainAxisCoord = coords[mainAxis];\n crossAxisCoord = coords[crossAxis];\n if (checkMainAxis) {\n minSide = mainAxis === 'y' ? 'top' : 'left';\n maxSide = mainAxis === 'y' ? 'bottom' : 'right';\n _min = mainAxisCoord + overflow[minSide];\n _max = mainAxisCoord - overflow[maxSide];\n mainAxisCoord = clamp(_min, mainAxisCoord, _max);\n }\n if (checkCrossAxis) {\n _minSide = crossAxis === 'y' ? 'top' : 'left';\n _maxSide = crossAxis === 'y' ? 'bottom' : 'right';\n _min2 = crossAxisCoord + overflow[_minSide];\n _max2 = crossAxisCoord - overflow[_maxSide];\n crossAxisCoord = clamp(_min2, crossAxisCoord, _max2);\n }\n limitedCoords = limiter.fn(_objectSpread(_objectSpread({}, state), {}, _defineProperty(_defineProperty({}, mainAxis, mainAxisCoord), crossAxis, crossAxisCoord)));\n return _context8.abrupt(\"return\", _objectSpread(_objectSpread({}, limitedCoords), {}, {\n data: {\n x: limitedCoords.x - x,\n y: limitedCoords.y - y,\n enabled: _defineProperty(_defineProperty({}, mainAxis, checkMainAxis), crossAxis, checkCrossAxis)\n }\n }));\n case 14:\n case \"end\":\n return _context8.stop();\n }\n }, _callee8);\n }))();\n }\n };\n};\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nvar limitShift = function limitShift(options) {\n if (options === void 0) {\n options = {};\n }\n return {\n options: options,\n fn: function fn(state) {\n var x = state.x,\n y = state.y,\n placement = state.placement,\n rects = state.rects,\n middlewareData = state.middlewareData;\n var _evaluate6 = evaluate(options, state),\n _evaluate6$offset = _evaluate6.offset,\n offset = _evaluate6$offset === void 0 ? 0 : _evaluate6$offset,\n _evaluate6$mainAxis = _evaluate6.mainAxis,\n checkMainAxis = _evaluate6$mainAxis === void 0 ? true : _evaluate6$mainAxis,\n _evaluate6$crossAxis = _evaluate6.crossAxis,\n checkCrossAxis = _evaluate6$crossAxis === void 0 ? true : _evaluate6$crossAxis;\n var coords = {\n x: x,\n y: y\n };\n var crossAxis = getSideAxis(placement);\n var mainAxis = getOppositeAxis(crossAxis);\n var mainAxisCoord = coords[mainAxis];\n var crossAxisCoord = coords[crossAxis];\n var rawOffset = evaluate(offset, state);\n var computedOffset = typeof rawOffset === 'number' ? {\n mainAxis: rawOffset,\n crossAxis: 0\n } : _objectSpread({\n mainAxis: 0,\n crossAxis: 0\n }, rawOffset);\n if (checkMainAxis) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n var limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;\n var limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;\n if (mainAxisCoord < limitMin) {\n mainAxisCoord = limitMin;\n } else if (mainAxisCoord > limitMax) {\n mainAxisCoord = limitMax;\n }\n }\n if (checkCrossAxis) {\n var _middlewareData$offse, _middlewareData$offse2;\n var _len = mainAxis === 'y' ? 'width' : 'height';\n var isOriginSide = ['top', 'left'].includes(getSide(placement));\n var _limitMin = rects.reference[crossAxis] - rects.floating[_len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);\n var _limitMax = rects.reference[crossAxis] + rects.reference[_len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);\n if (crossAxisCoord < _limitMin) {\n crossAxisCoord = _limitMin;\n } else if (crossAxisCoord > _limitMax) {\n crossAxisCoord = _limitMax;\n }\n }\n return _defineProperty(_defineProperty({}, mainAxis, mainAxisCoord), crossAxis, crossAxisCoord);\n }\n };\n};\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nvar size = function size(options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'size',\n options: options,\n fn: function fn(state) {\n return _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {\n var _state$middlewareData, _state$middlewareData2, placement, rects, platform, elements, _evaluate7, _evaluate7$apply, apply, detectOverflowOptions, overflow, side, alignment, isYAxis, _rects$floating, width, height, heightSide, widthSide, maximumClippingHeight, maximumClippingWidth, overflowAvailableHeight, overflowAvailableWidth, noShift, availableHeight, availableWidth, xMin, xMax, yMin, yMax, nextDimensions;\n return _regeneratorRuntime().wrap(function _callee9$(_context9) {\n while (1) switch (_context9.prev = _context9.next) {\n case 0:\n placement = state.placement, rects = state.rects, platform = state.platform, elements = state.elements;\n _evaluate7 = evaluate(options, state), _evaluate7$apply = _evaluate7.apply, apply = _evaluate7$apply === void 0 ? function () {} : _evaluate7$apply, detectOverflowOptions = _objectWithoutProperties(_evaluate7, _excluded5);\n _context9.next = 4;\n return detectOverflow(state, detectOverflowOptions);\n case 4:\n overflow = _context9.sent;\n side = getSide(placement);\n alignment = getAlignment(placement);\n isYAxis = getSideAxis(placement) === 'y';\n _rects$floating = rects.floating, width = _rects$floating.width, height = _rects$floating.height;\n if (!(side === 'top' || side === 'bottom')) {\n _context9.next = 28;\n break;\n }\n heightSide = side;\n _context9.t0 = alignment;\n _context9.next = 14;\n return platform.isRTL == null ? void 0 : platform.isRTL(elements.floating);\n case 14:\n if (!_context9.sent) {\n _context9.next = 18;\n break;\n }\n _context9.t1 = 'start';\n _context9.next = 19;\n break;\n case 18:\n _context9.t1 = 'end';\n case 19:\n _context9.t2 = _context9.t1;\n if (!(_context9.t0 === _context9.t2)) {\n _context9.next = 24;\n break;\n }\n _context9.t3 = 'left';\n _context9.next = 25;\n break;\n case 24:\n _context9.t3 = 'right';\n case 25:\n widthSide = _context9.t3;\n _context9.next = 30;\n break;\n case 28:\n widthSide = side;\n heightSide = alignment === 'end' ? 'top' : 'bottom';\n case 30:\n maximumClippingHeight = height - overflow.top - overflow.bottom;\n maximumClippingWidth = width - overflow.left - overflow.right;\n overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);\n overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);\n noShift = !state.middlewareData.shift;\n availableHeight = overflowAvailableHeight;\n availableWidth = overflowAvailableWidth;\n if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) {\n availableWidth = maximumClippingWidth;\n }\n if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {\n availableHeight = maximumClippingHeight;\n }\n if (noShift && !alignment) {\n xMin = max(overflow.left, 0);\n xMax = max(overflow.right, 0);\n yMin = max(overflow.top, 0);\n yMax = max(overflow.bottom, 0);\n if (isYAxis) {\n availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));\n } else {\n availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));\n }\n }\n _context9.next = 42;\n return apply(_objectSpread(_objectSpread({}, state), {}, {\n availableWidth: availableWidth,\n availableHeight: availableHeight\n }));\n case 42:\n _context9.next = 44;\n return platform.getDimensions(elements.floating);\n case 44:\n nextDimensions = _context9.sent;\n if (!(width !== nextDimensions.width || height !== nextDimensions.height)) {\n _context9.next = 47;\n break;\n }\n return _context9.abrupt(\"return\", {\n reset: {\n rects: true\n }\n });\n case 47:\n return _context9.abrupt(\"return\", {});\n case 48:\n case \"end\":\n return _context9.stop();\n }\n }, _callee9);\n }))();\n }\n };\n};\nexport { arrow, autoPlacement, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, shift, size };","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); }\nfunction _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }\nfunction _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.\"); }\nfunction _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; } }\nfunction _arrayWithHoles(r) { if (Array.isArray(r)) return r; }\nfunction 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; }\nfunction _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; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _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); }\nfunction _regeneratorRuntime() { \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _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 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 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 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; }\nfunction asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }\nfunction _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"next\", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"throw\", n); } _next(void 0); }); }; }\nfunction _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }\nfunction _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.\"); }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _iterableToArray(r) { if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r); }\nfunction _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\nimport { rectToClientRect, detectOverflow as detectOverflow$1, offset as offset$1, autoPlacement as autoPlacement$1, shift as shift$1, flip as flip$1, size as size$1, hide as hide$1, arrow as arrow$1, inline as inline$1, limitShift as limitShift$1, computePosition as computePosition$1 } from '@floating-ui/core';\nimport { round, createCoords, max, min, floor } from '@floating-ui/utils';\nimport { getComputedStyle, isHTMLElement, isElement, getWindow, isWebKit, getFrameElement, getNodeScroll, getDocumentElement, isTopLayer, getNodeName, isOverflowElement, getOverflowAncestors, getParentNode, isLastTraversableNode, isContainingBlock, isTableElement, getContainingBlock } from '@floating-ui/utils/dom';\nexport { getOverflowAncestors } from '@floating-ui/utils/dom';\nfunction getCssDimensions(element) {\n var css = getComputedStyle(element);\n // In testing environments, the `width` and `height` properties are empty\n // strings for SVG elements, returning NaN. Fallback to `0` in this case.\n var width = parseFloat(css.width) || 0;\n var height = parseFloat(css.height) || 0;\n var hasOffset = isHTMLElement(element);\n var offsetWidth = hasOffset ? element.offsetWidth : width;\n var offsetHeight = hasOffset ? element.offsetHeight : height;\n var shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;\n if (shouldFallback) {\n width = offsetWidth;\n height = offsetHeight;\n }\n return {\n width: width,\n height: height,\n $: shouldFallback\n };\n}\nfunction unwrapElement(element) {\n return !isElement(element) ? element.contextElement : element;\n}\nfunction getScale(element) {\n var domElement = unwrapElement(element);\n if (!isHTMLElement(domElement)) {\n return createCoords(1);\n }\n var rect = domElement.getBoundingClientRect();\n var _getCssDimensions = getCssDimensions(domElement),\n width = _getCssDimensions.width,\n height = _getCssDimensions.height,\n $ = _getCssDimensions.$;\n var x = ($ ? round(rect.width) : rect.width) / width;\n var y = ($ ? round(rect.height) : rect.height) / height;\n\n // 0, NaN, or Infinity should always fallback to 1.\n\n if (!x || !Number.isFinite(x)) {\n x = 1;\n }\n if (!y || !Number.isFinite(y)) {\n y = 1;\n }\n return {\n x: x,\n y: y\n };\n}\nvar noOffsets = /*#__PURE__*/createCoords(0);\nfunction getVisualOffsets(element) {\n var win = getWindow(element);\n if (!isWebKit() || !win.visualViewport) {\n return noOffsets;\n }\n return {\n x: win.visualViewport.offsetLeft,\n y: win.visualViewport.offsetTop\n };\n}\nfunction shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {\n return false;\n }\n return isFixed;\n}\nfunction getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n var clientRect = element.getBoundingClientRect();\n var domElement = unwrapElement(element);\n var scale = createCoords(1);\n if (includeScale) {\n if (offsetParent) {\n if (isElement(offsetParent)) {\n scale = getScale(offsetParent);\n }\n } else {\n scale = getScale(element);\n }\n }\n var visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);\n var x = (clientRect.left + visualOffsets.x) / scale.x;\n var y = (clientRect.top + visualOffsets.y) / scale.y;\n var width = clientRect.width / scale.x;\n var height = clientRect.height / scale.y;\n if (domElement) {\n var win = getWindow(domElement);\n var offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;\n var currentWin = win;\n var currentIFrame = getFrameElement(currentWin);\n while (currentIFrame && offsetParent && offsetWin !== currentWin) {\n var iframeScale = getScale(currentIFrame);\n var iframeRect = currentIFrame.getBoundingClientRect();\n var css = getComputedStyle(currentIFrame);\n var left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;\n var top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;\n x *= iframeScale.x;\n y *= iframeScale.y;\n width *= iframeScale.x;\n height *= iframeScale.y;\n x += left;\n y += top;\n currentWin = getWindow(currentIFrame);\n currentIFrame = getFrameElement(currentWin);\n }\n }\n return rectToClientRect({\n width: width,\n height: height,\n x: x,\n y: y\n });\n}\n\n// If has a CSS width greater than the viewport, then this will be\n// incorrect for RTL.\nfunction getWindowScrollBarX(element, rect) {\n var leftScroll = getNodeScroll(element).scrollLeft;\n if (!rect) {\n return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;\n }\n return rect.left + leftScroll;\n}\nfunction getHTMLOffset(documentElement, scroll, ignoreScrollbarX) {\n if (ignoreScrollbarX === void 0) {\n ignoreScrollbarX = false;\n }\n var htmlRect = documentElement.getBoundingClientRect();\n var x = htmlRect.left + scroll.scrollLeft - (ignoreScrollbarX ? 0 :\n // RTL scrollbar.\n getWindowScrollBarX(documentElement, htmlRect));\n var y = htmlRect.top + scroll.scrollTop;\n return {\n x: x,\n y: y\n };\n}\nfunction convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {\n var elements = _ref.elements,\n rect = _ref.rect,\n offsetParent = _ref.offsetParent,\n strategy = _ref.strategy;\n var isFixed = strategy === 'fixed';\n var documentElement = getDocumentElement(offsetParent);\n var topLayer = elements ? isTopLayer(elements.floating) : false;\n if (offsetParent === documentElement || topLayer && isFixed) {\n return rect;\n }\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var scale = createCoords(1);\n var offsets = createCoords(0);\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isHTMLElement(offsetParent)) {\n var offsetRect = getBoundingClientRect(offsetParent);\n scale = getScale(offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n }\n var htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll, true) : createCoords(0);\n return {\n width: rect.width * scale.x,\n height: rect.height * scale.y,\n x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,\n y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y\n };\n}\nfunction getClientRects(element) {\n return Array.from(element.getClientRects());\n}\n\n// Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable.\nfunction getDocumentRect(element) {\n var html = getDocumentElement(element);\n var scroll = getNodeScroll(element);\n var body = element.ownerDocument.body;\n var width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);\n var height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);\n var x = -scroll.scrollLeft + getWindowScrollBarX(element);\n var y = -scroll.scrollTop;\n if (getComputedStyle(body).direction === 'rtl') {\n x += max(html.clientWidth, body.clientWidth) - width;\n }\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}\nfunction getViewportRect(element, strategy) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0;\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n var visualViewportBased = isWebKit();\n if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}\n\n// Returns the inner client rect, subtracting scrollbars if present.\nfunction getInnerBoundingClientRect(element, strategy) {\n var clientRect = getBoundingClientRect(element, true, strategy === 'fixed');\n var top = clientRect.top + element.clientTop;\n var left = clientRect.left + element.clientLeft;\n var scale = isHTMLElement(element) ? getScale(element) : createCoords(1);\n var width = element.clientWidth * scale.x;\n var height = element.clientHeight * scale.y;\n var x = left * scale.x;\n var y = top * scale.y;\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}\nfunction getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {\n var rect;\n if (clippingAncestor === 'viewport') {\n rect = getViewportRect(element, strategy);\n } else if (clippingAncestor === 'document') {\n rect = getDocumentRect(getDocumentElement(element));\n } else if (isElement(clippingAncestor)) {\n rect = getInnerBoundingClientRect(clippingAncestor, strategy);\n } else {\n var visualOffsets = getVisualOffsets(element);\n rect = {\n x: clippingAncestor.x - visualOffsets.x,\n y: clippingAncestor.y - visualOffsets.y,\n width: clippingAncestor.width,\n height: clippingAncestor.height\n };\n }\n return rectToClientRect(rect);\n}\nfunction hasFixedPositionAncestor(element, stopNode) {\n var parentNode = getParentNode(element);\n if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {\n return false;\n }\n return getComputedStyle(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);\n}\n\n// A \"clipping ancestor\" is an `overflow` element with the characteristic of\n// clipping (or hiding) child elements. This returns all clipping ancestors\n// of the given element up the tree.\nfunction getClippingElementAncestors(element, cache) {\n var cachedResult = cache.get(element);\n if (cachedResult) {\n return cachedResult;\n }\n var result = getOverflowAncestors(element, [], false).filter(function (el) {\n return isElement(el) && getNodeName(el) !== 'body';\n });\n var currentContainingBlockComputedStyle = null;\n var elementIsFixed = getComputedStyle(element).position === 'fixed';\n var currentNode = elementIsFixed ? getParentNode(element) : element;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {\n var computedStyle = getComputedStyle(currentNode);\n var currentNodeIsContaining = isContainingBlock(currentNode);\n if (!currentNodeIsContaining && computedStyle.position === 'fixed') {\n currentContainingBlockComputedStyle = null;\n }\n var shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);\n if (shouldDropCurrentNode) {\n // Drop non-containing blocks.\n result = result.filter(function (ancestor) {\n return ancestor !== currentNode;\n });\n } else {\n // Record last containing block for next iteration.\n currentContainingBlockComputedStyle = computedStyle;\n }\n currentNode = getParentNode(currentNode);\n }\n cache.set(element, result);\n return result;\n}\n\n// Gets the maximum area that the element is visible in due to any number of\n// clipping ancestors.\nfunction getClippingRect(_ref) {\n var element = _ref.element,\n boundary = _ref.boundary,\n rootBoundary = _ref.rootBoundary,\n strategy = _ref.strategy;\n var elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);\n var clippingAncestors = [].concat(_toConsumableArray(elementClippingAncestors), [rootBoundary]);\n var firstClippingAncestor = clippingAncestors[0];\n var clippingRect = clippingAncestors.reduce(function (accRect, clippingAncestor) {\n var rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));\n return {\n width: clippingRect.right - clippingRect.left,\n height: clippingRect.bottom - clippingRect.top,\n x: clippingRect.left,\n y: clippingRect.top\n };\n}\nfunction getDimensions(element) {\n var _getCssDimensions2 = getCssDimensions(element),\n width = _getCssDimensions2.width,\n height = _getCssDimensions2.height;\n return {\n width: width,\n height: height\n };\n}\nfunction getRectRelativeToOffsetParent(element, offsetParent, strategy) {\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var isFixed = strategy === 'fixed';\n var rect = getBoundingClientRect(element, true, isFixed, offsetParent);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = createCoords(0);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isOffsetParentAnElement) {\n var offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n } else if (documentElement) {\n // If the scrollbar appears on the left (e.g. RTL systems). Use\n // Firefox with layout.scrollbar.side = 3 in about:config to test this.\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n var htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n var x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;\n var y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;\n return {\n x: x,\n y: y,\n width: rect.width,\n height: rect.height\n };\n}\nfunction isStaticPositioned(element) {\n return getComputedStyle(element).position === 'static';\n}\nfunction getTrueOffsetParent(element, polyfill) {\n if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {\n return null;\n }\n if (polyfill) {\n return polyfill(element);\n }\n var rawOffsetParent = element.offsetParent;\n\n // Firefox returns the element as the offsetParent if it's non-static,\n // while Chrome and Safari return the element. The element must\n // be used to perform the correct calculations even if the element is\n // non-static.\n if (getDocumentElement(element) === rawOffsetParent) {\n rawOffsetParent = rawOffsetParent.ownerDocument.body;\n }\n return rawOffsetParent;\n}\n\n// Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\nfunction getOffsetParent(element, polyfill) {\n var win = getWindow(element);\n if (isTopLayer(element)) {\n return win;\n }\n if (!isHTMLElement(element)) {\n var svgOffsetParent = getParentNode(element);\n while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {\n if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {\n return svgOffsetParent;\n }\n svgOffsetParent = getParentNode(svgOffsetParent);\n }\n return win;\n }\n var offsetParent = getTrueOffsetParent(element, polyfill);\n while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {\n offsetParent = getTrueOffsetParent(offsetParent, polyfill);\n }\n if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {\n return win;\n }\n return offsetParent || getContainingBlock(element) || win;\n}\nvar getElementRects = /*#__PURE__*/function () {\n var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {\n var getOffsetParentFn, getDimensionsFn, floatingDimensions;\n return _regeneratorRuntime().wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n getOffsetParentFn = this.getOffsetParent || getOffsetParent;\n getDimensionsFn = this.getDimensions;\n _context.next = 4;\n return getDimensionsFn(data.floating);\n case 4:\n floatingDimensions = _context.sent;\n _context.t0 = getRectRelativeToOffsetParent;\n _context.t1 = data.reference;\n _context.next = 9;\n return getOffsetParentFn(data.floating);\n case 9:\n _context.t2 = _context.sent;\n _context.t3 = data.strategy;\n _context.t4 = (0, _context.t0)(_context.t1, _context.t2, _context.t3);\n _context.t5 = {\n x: 0,\n y: 0,\n width: floatingDimensions.width,\n height: floatingDimensions.height\n };\n return _context.abrupt(\"return\", {\n reference: _context.t4,\n floating: _context.t5\n });\n case 14:\n case \"end\":\n return _context.stop();\n }\n }, _callee, this);\n }));\n return function getElementRects(_x) {\n return _ref2.apply(this, arguments);\n };\n}();\nfunction isRTL(element) {\n return getComputedStyle(element).direction === 'rtl';\n}\nvar platform = {\n convertOffsetParentRelativeRectToViewportRelativeRect: convertOffsetParentRelativeRectToViewportRelativeRect,\n getDocumentElement: getDocumentElement,\n getClippingRect: getClippingRect,\n getOffsetParent: getOffsetParent,\n getElementRects: getElementRects,\n getClientRects: getClientRects,\n getDimensions: getDimensions,\n getScale: getScale,\n isElement: isElement,\n isRTL: isRTL\n};\nfunction rectsAreEqual(a, b) {\n return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;\n}\n\n// https://samthor.au/2021/observing-dom/\nfunction observeMove(element, onMove) {\n var io = null;\n var timeoutId;\n var root = getDocumentElement(element);\n function cleanup() {\n var _io;\n clearTimeout(timeoutId);\n (_io = io) == null || _io.disconnect();\n io = null;\n }\n function refresh(skip, threshold) {\n if (skip === void 0) {\n skip = false;\n }\n if (threshold === void 0) {\n threshold = 1;\n }\n cleanup();\n var elementRectForRootMargin = element.getBoundingClientRect();\n var left = elementRectForRootMargin.left,\n top = elementRectForRootMargin.top,\n width = elementRectForRootMargin.width,\n height = elementRectForRootMargin.height;\n if (!skip) {\n onMove();\n }\n if (!width || !height) {\n return;\n }\n var insetTop = floor(top);\n var insetRight = floor(root.clientWidth - (left + width));\n var insetBottom = floor(root.clientHeight - (top + height));\n var insetLeft = floor(left);\n var rootMargin = -insetTop + \"px \" + -insetRight + \"px \" + -insetBottom + \"px \" + -insetLeft + \"px\";\n var options = {\n rootMargin: rootMargin,\n threshold: max(0, min(1, threshold)) || 1\n };\n var isFirstUpdate = true;\n function handleObserve(entries) {\n var ratio = entries[0].intersectionRatio;\n if (ratio !== threshold) {\n if (!isFirstUpdate) {\n return refresh();\n }\n if (!ratio) {\n // If the reference is clipped, the ratio is 0. Throttle the refresh\n // to prevent an infinite loop of updates.\n timeoutId = setTimeout(function () {\n refresh(false, 1e-7);\n }, 1000);\n } else {\n refresh(false, ratio);\n }\n }\n if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {\n // It's possible that even though the ratio is reported as 1, the\n // element is not actually fully within the IntersectionObserver's root\n // area anymore. This can happen under performance constraints. This may\n // be a bug in the browser's IntersectionObserver implementation. To\n // work around this, we compare the element's bounding rect now with\n // what it was at the time we created the IntersectionObserver. If they\n // are not equal then the element moved, so we refresh.\n refresh();\n }\n isFirstUpdate = false;\n }\n\n // Older browsers don't support a `document` as the root and will throw an\n // error.\n try {\n io = new IntersectionObserver(handleObserve, _objectSpread(_objectSpread({}, options), {}, {\n // Handle ',\n g = n.open();\n if (null !== g && (g.document.write(p), g.document.title = e.filename), g || \"undefined\" == typeof safari) return g;\n break;\n case \"datauri\":\n case \"dataurl\":\n return n.document.location.href = this.output(\"datauristring\", e);\n default:\n return null;\n }\n }),\n Ge = function Ge(t) {\n return !0 === Array.isArray(Ut) && Ut.indexOf(t) > -1;\n };\n switch (o) {\n case \"pt\":\n _t = 1;\n break;\n case \"mm\":\n _t = 72 / 25.4;\n break;\n case \"cm\":\n _t = 72 / 2.54;\n break;\n case \"in\":\n _t = 72;\n break;\n case \"px\":\n _t = 1 == Ge(\"px_scaling\") ? .75 : 96 / 72;\n break;\n case \"pc\":\n case \"em\":\n _t = 12;\n break;\n case \"ex\":\n _t = 6;\n break;\n default:\n if (\"number\" != typeof o) throw new Error(\"Invalid unit: \" + o);\n _t = o;\n }\n var Ye = null;\n K(), Y();\n var Je = function Je(t) {\n return null !== m ? Ye.encryptor(t, 0) : function (t) {\n return t;\n };\n },\n Xe = y.__private__.getPageInfo = y.getPageInfo = function (t) {\n if (isNaN(t) || t % 1 != 0) throw new Error(\"Invalid argument passed to jsPDF.getPageInfo\");\n return {\n objId: Rt[t].objId,\n pageNumber: t,\n pageContext: Rt[t]\n };\n },\n Ke = y.__private__.getPageInfoByObjId = function (t) {\n if (isNaN(t) || t % 1 != 0) throw new Error(\"Invalid argument passed to jsPDF.getPageInfoByObjId\");\n for (var e in Rt) if (Rt[e].objId === t) break;\n return Xe(e);\n },\n Ze = y.__private__.getCurrentPageInfo = y.getCurrentPageInfo = function () {\n return {\n objId: Rt[$].objId,\n pageNumber: $,\n pageContext: Rt[$]\n };\n };\n y.addPage = function () {\n return Oe.apply(this, arguments), this;\n }, y.setPage = function () {\n return Me.apply(this, arguments), ht.call(this, ot[$]), this;\n }, y.insertPage = function (t) {\n return this.addPage(), this.movePage($, t), this;\n }, y.movePage = function (t, e) {\n var r, n;\n if (t > e) {\n r = ot[t], n = Rt[t];\n for (var i = t; i > e; i--) ot[i] = ot[i - 1], Rt[i] = Rt[i - 1];\n ot[e] = r, Rt[e] = n, this.setPage(e);\n } else if (t < e) {\n r = ot[t], n = Rt[t];\n for (var a = t; a < e; a++) ot[a] = ot[a + 1], Rt[a] = Rt[a + 1];\n ot[e] = r, Rt[e] = n, this.setPage(e);\n }\n return this;\n }, y.deletePage = function () {\n return Be.apply(this, arguments), this;\n }, y.__private__.text = y.text = function (e, r, n, i, a) {\n var o,\n s,\n c,\n u,\n h,\n l,\n f,\n d,\n p,\n g = (i = i || {}).scope || this;\n if (\"number\" == typeof e && \"number\" == typeof r && (\"string\" == typeof n || Array.isArray(n))) {\n var m = n;\n n = r, r = e, e = m;\n }\n if (arguments[3] instanceof Vt == !1 ? (c = arguments[4], u = arguments[5], \"object\" === t(f = arguments[3]) && null !== f || (\"string\" == typeof c && (u = c, c = null), \"string\" == typeof f && (u = f, f = null), \"number\" == typeof f && (c = f, f = null), i = {\n flags: f,\n angle: c,\n align: u\n })) : (q(\"The transform parameter of text() with a Matrix value\"), p = a), isNaN(r) || isNaN(n) || null == e) throw new Error(\"Invalid arguments passed to jsPDF.text\");\n if (0 === e.length) return g;\n var v = \"\",\n y = !1,\n w = \"number\" == typeof i.lineHeightFactor ? i.lineHeightFactor : lr,\n N = g.internal.scaleFactor;\n function L(t) {\n return t = t.split(\"\\t\").join(Array(i.TabLen || 9).join(\" \")), Ce(t, f);\n }\n function A(t) {\n for (var e, r = t.concat(), n = [], i = r.length; i--;) \"string\" == typeof (e = r.shift()) ? n.push(e) : Array.isArray(t) && (1 === e.length || void 0 === e[1] && void 0 === e[2]) ? n.push(e[0]) : n.push([e[0], e[1], e[2]]);\n return n;\n }\n function _(t, e) {\n var r;\n if (\"string\" == typeof t) r = e(t)[0];else if (Array.isArray(t)) {\n for (var n, i, a = t.concat(), o = [], s = a.length; s--;) \"string\" == typeof (n = a.shift()) ? o.push(e(n)[0]) : Array.isArray(n) && \"string\" == typeof n[0] && (i = e(n[0], n[1], n[2]), o.push([i[0], i[1], i[2]]));\n r = o;\n }\n return r;\n }\n var P = !1,\n k = !0;\n if (\"string\" == typeof e) P = !0;else if (Array.isArray(e)) {\n var I = e.concat();\n s = [];\n for (var F, C = I.length; C--;) (\"string\" != typeof (F = I.shift()) || Array.isArray(F) && \"string\" != typeof F[0]) && (k = !1);\n P = k;\n }\n if (!1 === P) throw new Error('Type of text must be string or Array. \"' + e + '\" is not recognized.');\n \"string\" == typeof e && (e = e.match(/[\\r?\\n]/) ? e.split(/\\r\\n|\\r|\\n/g) : [e]);\n var j = gt / g.internal.scaleFactor,\n B = j * (w - 1);\n switch (i.baseline) {\n case \"bottom\":\n n -= B;\n break;\n case \"top\":\n n += j - B;\n break;\n case \"hanging\":\n n += j - 2 * B;\n break;\n case \"middle\":\n n += j / 2 - B;\n }\n if ((l = i.maxWidth || 0) > 0 && (\"string\" == typeof e ? e = g.splitTextToSize(e, l) : \"[object Array]\" === Object.prototype.toString.call(e) && (e = e.reduce(function (t, e) {\n return t.concat(g.splitTextToSize(e, l));\n }, []))), o = {\n text: e,\n x: r,\n y: n,\n options: i,\n mutex: {\n pdfEscape: Ce,\n activeFontKey: St,\n fonts: Ft,\n activeFontSize: gt\n }\n }, Tt.publish(\"preProcessText\", o), e = o.text, c = (i = o.options).angle, p instanceof Vt == !1 && c && \"number\" == typeof c) {\n c *= Math.PI / 180, 0 === i.rotationDirection && (c = -c), S === x.ADVANCED && (c = -c);\n var M = Math.cos(c),\n E = Math.sin(c);\n p = new Vt(M, E, -E, M, 0, 0);\n } else c && c instanceof Vt && (p = c);\n S !== x.ADVANCED || p || (p = Yt), void 0 !== (h = i.charSpace || _r) && (v += O(U(h)) + \" Tc\\n\", this.setCharSpace(this.getCharSpace() || 0)), void 0 !== (d = i.horizontalScale) && (v += O(100 * d) + \" Tz\\n\");\n i.lang;\n var D = -1,\n R = void 0 !== i.renderingMode ? i.renderingMode : i.stroke,\n T = g.internal.getCurrentPageInfo().pageContext;\n switch (R) {\n case 0:\n case !1:\n case \"fill\":\n D = 0;\n break;\n case 1:\n case !0:\n case \"stroke\":\n D = 1;\n break;\n case 2:\n case \"fillThenStroke\":\n D = 2;\n break;\n case 3:\n case \"invisible\":\n D = 3;\n break;\n case 4:\n case \"fillAndAddForClipping\":\n D = 4;\n break;\n case 5:\n case \"strokeAndAddPathForClipping\":\n D = 5;\n break;\n case 6:\n case \"fillThenStrokeAndAddToPathForClipping\":\n D = 6;\n break;\n case 7:\n case \"addToPathForClipping\":\n D = 7;\n }\n var z = void 0 !== T.usedRenderingMode ? T.usedRenderingMode : -1;\n -1 !== D ? v += D + \" Tr\\n\" : -1 !== z && (v += \"0 Tr\\n\"), -1 !== D && (T.usedRenderingMode = D), u = i.align || \"left\";\n var H,\n W = gt * w,\n V = g.internal.pageSize.getWidth(),\n G = Ft[St];\n h = i.charSpace || _r, l = i.maxWidth || 0, f = Object.assign({\n autoencode: !0,\n noBOM: !0\n }, i.flags);\n var Y = [],\n J = function J(t) {\n return g.getStringUnitWidth(t, {\n font: G,\n charSpace: h,\n fontSize: gt,\n doKerning: !1\n }) * gt / N;\n };\n if (\"[object Array]\" === Object.prototype.toString.call(e)) {\n var X;\n s = A(e), \"left\" !== u && (H = s.map(J));\n var K,\n Z = 0;\n if (\"right\" === u) {\n r -= H[0], e = [], C = s.length;\n for (var $ = 0; $ < C; $++) 0 === $ ? (K = br(r), X = yr(n)) : (K = U(Z - H[$]), X = -W), e.push([s[$], K, X]), Z = H[$];\n } else if (\"center\" === u) {\n r -= H[0] / 2, e = [], C = s.length;\n for (var Q = 0; Q < C; Q++) 0 === Q ? (K = br(r), X = yr(n)) : (K = U((Z - H[Q]) / 2), X = -W), e.push([s[Q], K, X]), Z = H[Q];\n } else if (\"left\" === u) {\n e = [], C = s.length;\n for (var tt = 0; tt < C; tt++) e.push(s[tt]);\n } else if (\"justify\" === u && \"Identity-H\" === G.encoding) {\n e = [], C = s.length, l = 0 !== l ? l : V;\n for (var et = 0, rt = 0; rt < C; rt++) if (X = 0 === rt ? yr(n) : -W, K = 0 === rt ? br(r) : et, rt < C - 1) {\n var nt = U((l - H[rt]) / (s[rt].split(\" \").length - 1)),\n it = s[rt].split(\" \");\n e.push([it[0] + \" \", K, X]), et = 0;\n for (var at = 1; at < it.length; at++) {\n var ot = (J(it[at - 1] + \" \" + it[at]) - J(it[at])) * N + nt;\n at == it.length - 1 ? e.push([it[at], ot, 0]) : e.push([it[at] + \" \", ot, 0]), et -= ot;\n }\n } else e.push([s[rt], K, X]);\n e.push([\"\", et, 0]);\n } else {\n if (\"justify\" !== u) throw new Error('Unrecognized alignment option, use \"left\", \"center\", \"right\" or \"justify\".');\n e = [], C = s.length, l = 0 !== l ? l : V;\n for (rt = 0; rt < C; rt++) X = 0 === rt ? yr(n) : -W, K = 0 === rt ? br(r) : 0, rt < C - 1 ? Y.push(O(U((l - H[rt]) / (s[rt].split(\" \").length - 1)))) : Y.push(0), e.push([s[rt], K, X]);\n }\n }\n var st = \"boolean\" == typeof i.R2L ? i.R2L : bt;\n !0 === st && (e = _(e, function (t, e, r) {\n return [t.split(\"\").reverse().join(\"\"), e, r];\n })), o = {\n text: e,\n x: r,\n y: n,\n options: i,\n mutex: {\n pdfEscape: Ce,\n activeFontKey: St,\n fonts: Ft,\n activeFontSize: gt\n }\n }, Tt.publish(\"postProcessText\", o), e = o.text, y = o.mutex.isHex || !1;\n var ct = Ft[St].encoding;\n \"WinAnsiEncoding\" !== ct && \"StandardEncoding\" !== ct || (e = _(e, function (t, e, r) {\n return [L(t), e, r];\n })), s = A(e), e = [];\n for (var ut, ht, ft, dt = 0, pt = 1, mt = Array.isArray(s[0]) ? pt : dt, vt = \"\", yt = function yt(t, e, r) {\n var n = \"\";\n return r instanceof Vt ? (r = \"number\" == typeof i.angle ? Gt(r, new Vt(1, 0, 0, 1, t, e)) : Gt(new Vt(1, 0, 0, 1, t, e), r), S === x.ADVANCED && (r = Gt(new Vt(1, 0, 0, -1, 0, 0), r)), n = r.join(\" \") + \" Tm\\n\") : n = O(t) + \" \" + O(e) + \" Td\\n\", n;\n }, wt = 0; wt < s.length; wt++) {\n switch (vt = \"\", mt) {\n case pt:\n ft = (y ? \"<\" : \"(\") + s[wt][0] + (y ? \">\" : \")\"), ut = parseFloat(s[wt][1]), ht = parseFloat(s[wt][2]);\n break;\n case dt:\n ft = (y ? \"<\" : \"(\") + s[wt] + (y ? \">\" : \")\"), ut = br(r), ht = yr(n);\n }\n void 0 !== Y && void 0 !== Y[wt] && (vt = Y[wt] + \" Tw\\n\"), 0 === wt ? e.push(vt + yt(ut, ht, p) + ft) : mt === dt ? e.push(vt + ft) : mt === pt && e.push(vt + yt(ut, ht, p) + ft);\n }\n e = mt === dt ? e.join(\" Tj\\nT* \") : e.join(\" Tj\\n\"), e += \" Tj\\n\";\n var Nt = \"BT\\n/\";\n return Nt += St + \" \" + gt + \" Tf\\n\", Nt += O(gt * w) + \" TL\\n\", Nt += xr + \"\\n\", Nt += v, Nt += e, lt(Nt += \"ET\"), b[St] = !0, g;\n };\n var $e = y.__private__.clip = y.clip = function (t) {\n return lt(\"evenodd\" === t ? \"W*\" : \"W\"), this;\n };\n y.clipEvenOdd = function () {\n return $e(\"evenodd\");\n }, y.__private__.discardPath = y.discardPath = function () {\n return lt(\"n\"), this;\n };\n var Qe = y.__private__.isValidStyle = function (t) {\n var e = !1;\n return -1 !== [void 0, null, \"S\", \"D\", \"F\", \"DF\", \"FD\", \"f\", \"f*\", \"B\", \"B*\", \"n\"].indexOf(t) && (e = !0), e;\n };\n y.__private__.setDefaultPathOperation = y.setDefaultPathOperation = function (t) {\n return Qe(t) && (g = t), this;\n };\n var tr = y.__private__.getStyle = y.getStyle = function (t) {\n var e = g;\n switch (t) {\n case \"D\":\n case \"S\":\n e = \"S\";\n break;\n case \"F\":\n e = \"f\";\n break;\n case \"FD\":\n case \"DF\":\n e = \"B\";\n break;\n case \"f\":\n case \"f*\":\n case \"B\":\n case \"B*\":\n e = t;\n }\n return e;\n },\n er = y.close = function () {\n return lt(\"h\"), this;\n };\n y.stroke = function () {\n return lt(\"S\"), this;\n }, y.fill = function (t) {\n return rr(\"f\", t), this;\n }, y.fillEvenOdd = function (t) {\n return rr(\"f*\", t), this;\n }, y.fillStroke = function (t) {\n return rr(\"B\", t), this;\n }, y.fillStrokeEvenOdd = function (t) {\n return rr(\"B*\", t), this;\n };\n var rr = function rr(e, r) {\n \"object\" === t(r) ? ar(r, e) : lt(e);\n },\n nr = function nr(t) {\n null === t || S === x.ADVANCED && void 0 === t || (t = tr(t), lt(t));\n };\n function ir(t, e, r, n, i) {\n var a = new M(e || this.boundingBox, r || this.xStep, n || this.yStep, this.gState, i || this.matrix);\n a.stream = this.stream;\n var o = t + \"$$\" + this.cloneIndex++ + \"$$\";\n return Jt(o, a), a;\n }\n var ar = function ar(t, e) {\n var r = Bt[t.key],\n n = Ot[r];\n if (n instanceof B) lt(\"q\"), lt(or(e)), n.gState && y.setGState(n.gState), lt(t.matrix.toString() + \" cm\"), lt(\"/\" + r + \" sh\"), lt(\"Q\");else if (n instanceof M) {\n var i = new Vt(1, 0, 0, -1, 0, Rr());\n t.matrix && (i = i.multiply(t.matrix || Yt), r = ir.call(n, t.key, t.boundingBox, t.xStep, t.yStep, i).id), lt(\"q\"), lt(\"/Pattern cs\"), lt(\"/\" + r + \" scn\"), n.gState && y.setGState(n.gState), lt(e), lt(\"Q\");\n }\n },\n or = function or(t) {\n switch (t) {\n case \"f\":\n case \"F\":\n return \"W n\";\n case \"f*\":\n return \"W* n\";\n case \"B\":\n return \"W S\";\n case \"B*\":\n return \"W* S\";\n case \"S\":\n return \"W S\";\n case \"n\":\n return \"W n\";\n }\n },\n sr = y.moveTo = function (t, e) {\n return lt(O(U(t)) + \" \" + O(H(e)) + \" m\"), this;\n },\n cr = y.lineTo = function (t, e) {\n return lt(O(U(t)) + \" \" + O(H(e)) + \" l\"), this;\n },\n ur = y.curveTo = function (t, e, r, n, i, a) {\n return lt([O(U(t)), O(H(e)), O(U(r)), O(H(n)), O(U(i)), O(H(a)), \"c\"].join(\" \")), this;\n };\n y.__private__.line = y.line = function (t, e, r, n, i) {\n if (isNaN(t) || isNaN(e) || isNaN(r) || isNaN(n) || !Qe(i)) throw new Error(\"Invalid arguments passed to jsPDF.line\");\n return S === x.COMPAT ? this.lines([[r - t, n - e]], t, e, [1, 1], i || \"S\") : this.lines([[r - t, n - e]], t, e, [1, 1]).stroke();\n }, y.__private__.lines = y.lines = function (t, e, r, n, i, a) {\n var o, s, c, u, h, l, f, d, p, g, m, v;\n if (\"number\" == typeof t && (v = r, r = e, e = t, t = v), n = n || [1, 1], a = a || !1, isNaN(e) || isNaN(r) || !Array.isArray(t) || !Array.isArray(n) || !Qe(i) || \"boolean\" != typeof a) throw new Error(\"Invalid arguments passed to jsPDF.lines\");\n for (sr(e, r), o = n[0], s = n[1], u = t.length, g = e, m = r, c = 0; c < u; c++) 2 === (h = t[c]).length ? (g = h[0] * o + g, m = h[1] * s + m, cr(g, m)) : (l = h[0] * o + g, f = h[1] * s + m, d = h[2] * o + g, p = h[3] * s + m, g = h[4] * o + g, m = h[5] * s + m, ur(l, f, d, p, g, m));\n return a && er(), nr(i), this;\n }, y.path = function (t) {\n for (var e = 0; e < t.length; e++) {\n var r = t[e],\n n = r.c;\n switch (r.op) {\n case \"m\":\n sr(n[0], n[1]);\n break;\n case \"l\":\n cr(n[0], n[1]);\n break;\n case \"c\":\n ur.apply(this, n);\n break;\n case \"h\":\n er();\n }\n }\n return this;\n }, y.__private__.rect = y.rect = function (t, e, r, n, i) {\n if (isNaN(t) || isNaN(e) || isNaN(r) || isNaN(n) || !Qe(i)) throw new Error(\"Invalid arguments passed to jsPDF.rect\");\n return S === x.COMPAT && (n = -n), lt([O(U(t)), O(H(e)), O(U(r)), O(U(n)), \"re\"].join(\" \")), nr(i), this;\n }, y.__private__.triangle = y.triangle = function (t, e, r, n, i, a, o) {\n if (isNaN(t) || isNaN(e) || isNaN(r) || isNaN(n) || isNaN(i) || isNaN(a) || !Qe(o)) throw new Error(\"Invalid arguments passed to jsPDF.triangle\");\n return this.lines([[r - t, n - e], [i - r, a - n], [t - i, e - a]], t, e, [1, 1], o, !0), this;\n }, y.__private__.roundedRect = y.roundedRect = function (t, e, r, n, i, a, o) {\n if (isNaN(t) || isNaN(e) || isNaN(r) || isNaN(n) || isNaN(i) || isNaN(a) || !Qe(o)) throw new Error(\"Invalid arguments passed to jsPDF.roundedRect\");\n var s = 4 / 3 * (Math.SQRT2 - 1);\n return i = Math.min(i, .5 * r), a = Math.min(a, .5 * n), this.lines([[r - 2 * i, 0], [i * s, 0, i, a - a * s, i, a], [0, n - 2 * a], [0, a * s, -i * s, a, -i, a], [2 * i - r, 0], [-i * s, 0, -i, -a * s, -i, -a], [0, 2 * a - n], [0, -a * s, i * s, -a, i, -a]], t + i, e, [1, 1], o, !0), this;\n }, y.__private__.ellipse = y.ellipse = function (t, e, r, n, i) {\n if (isNaN(t) || isNaN(e) || isNaN(r) || isNaN(n) || !Qe(i)) throw new Error(\"Invalid arguments passed to jsPDF.ellipse\");\n var a = 4 / 3 * (Math.SQRT2 - 1) * r,\n o = 4 / 3 * (Math.SQRT2 - 1) * n;\n return sr(t + r, e), ur(t + r, e - o, t + a, e - n, t, e - n), ur(t - a, e - n, t - r, e - o, t - r, e), ur(t - r, e + o, t - a, e + n, t, e + n), ur(t + a, e + n, t + r, e + o, t + r, e), nr(i), this;\n }, y.__private__.circle = y.circle = function (t, e, r, n) {\n if (isNaN(t) || isNaN(e) || isNaN(r) || !Qe(n)) throw new Error(\"Invalid arguments passed to jsPDF.circle\");\n return this.ellipse(t, e, r, r, n);\n }, y.setFont = function (t, e, r) {\n return r && (e = k(e, r)), St = qe(t, e, {\n disableWarning: !1\n }), this;\n };\n var hr = y.__private__.getFont = y.getFont = function () {\n return Ft[qe.apply(y, arguments)];\n };\n y.__private__.getFontList = y.getFontList = function () {\n var t,\n e,\n r = {};\n for (t in Ct) if (Ct.hasOwnProperty(t)) for (e in r[t] = [], Ct[t]) Ct[t].hasOwnProperty(e) && r[t].push(e);\n return r;\n }, y.addFont = function (t, e, r, n, i) {\n var a = [\"StandardEncoding\", \"MacRomanEncoding\", \"Identity-H\", \"WinAnsiEncoding\"];\n return arguments[3] && -1 !== a.indexOf(arguments[3]) ? i = arguments[3] : arguments[3] && -1 == a.indexOf(arguments[3]) && (r = k(r, n)), i = i || \"Identity-H\", Pe.call(this, t, e, r, i);\n };\n var lr,\n fr = e.lineWidth || .200025,\n dr = y.__private__.getLineWidth = y.getLineWidth = function () {\n return fr;\n },\n pr = y.__private__.setLineWidth = y.setLineWidth = function (t) {\n return fr = t, lt(O(U(t)) + \" w\"), this;\n };\n y.__private__.setLineDash = E.API.setLineDash = E.API.setLineDashPattern = function (t, e) {\n if (t = t || [], e = e || 0, isNaN(e) || !Array.isArray(t)) throw new Error(\"Invalid arguments passed to jsPDF.setLineDash\");\n return t = t.map(function (t) {\n return O(U(t));\n }).join(\" \"), e = O(U(e)), lt(\"[\" + t + \"] \" + e + \" d\"), this;\n };\n var gr = y.__private__.getLineHeight = y.getLineHeight = function () {\n return gt * lr;\n };\n y.__private__.getLineHeight = y.getLineHeight = function () {\n return gt * lr;\n };\n var mr = y.__private__.setLineHeightFactor = y.setLineHeightFactor = function (t) {\n return \"number\" == typeof (t = t || 1.15) && (lr = t), this;\n },\n vr = y.__private__.getLineHeightFactor = y.getLineHeightFactor = function () {\n return lr;\n };\n mr(e.lineHeight);\n var br = y.__private__.getHorizontalCoordinate = function (t) {\n return U(t);\n },\n yr = y.__private__.getVerticalCoordinate = function (t) {\n return S === x.ADVANCED ? t : Rt[$].mediaBox.topRightY - Rt[$].mediaBox.bottomLeftY - U(t);\n },\n wr = y.__private__.getHorizontalCoordinateString = y.getHorizontalCoordinateString = function (t) {\n return O(br(t));\n },\n Nr = y.__private__.getVerticalCoordinateString = y.getVerticalCoordinateString = function (t) {\n return O(yr(t));\n },\n Lr = e.strokeColor || \"0 G\";\n y.__private__.getStrokeColor = y.getDrawColor = function () {\n return ee(Lr);\n }, y.__private__.setStrokeColor = y.setDrawColor = function (t, e, r, n) {\n return Lr = re({\n ch1: t,\n ch2: e,\n ch3: r,\n ch4: n,\n pdfColorType: \"draw\",\n precision: 2\n }), lt(Lr), this;\n };\n var Ar = e.fillColor || \"0 g\";\n y.__private__.getFillColor = y.getFillColor = function () {\n return ee(Ar);\n }, y.__private__.setFillColor = y.setFillColor = function (t, e, r, n) {\n return Ar = re({\n ch1: t,\n ch2: e,\n ch3: r,\n ch4: n,\n pdfColorType: \"fill\",\n precision: 2\n }), lt(Ar), this;\n };\n var xr = e.textColor || \"0 g\",\n Sr = y.__private__.getTextColor = y.getTextColor = function () {\n return ee(xr);\n };\n y.__private__.setTextColor = y.setTextColor = function (t, e, r, n) {\n return xr = re({\n ch1: t,\n ch2: e,\n ch3: r,\n ch4: n,\n pdfColorType: \"text\",\n precision: 3\n }), this;\n };\n var _r = e.charSpace,\n Pr = y.__private__.getCharSpace = y.getCharSpace = function () {\n return parseFloat(_r || 0);\n };\n y.__private__.setCharSpace = y.setCharSpace = function (t) {\n if (isNaN(t)) throw new Error(\"Invalid argument passed to jsPDF.setCharSpace\");\n return _r = t, this;\n };\n var kr = 0;\n y.CapJoinStyles = {\n 0: 0,\n butt: 0,\n but: 0,\n miter: 0,\n 1: 1,\n round: 1,\n rounded: 1,\n circle: 1,\n 2: 2,\n projecting: 2,\n project: 2,\n square: 2,\n bevel: 2\n }, y.__private__.setLineCap = y.setLineCap = function (t) {\n var e = y.CapJoinStyles[t];\n if (void 0 === e) throw new Error(\"Line cap style of '\" + t + \"' is not recognized. See or extend .CapJoinStyles property for valid styles\");\n return kr = e, lt(e + \" J\"), this;\n };\n var Ir = 0;\n y.__private__.setLineJoin = y.setLineJoin = function (t) {\n var e = y.CapJoinStyles[t];\n if (void 0 === e) throw new Error(\"Line join style of '\" + t + \"' is not recognized. See or extend .CapJoinStyles property for valid styles\");\n return Ir = e, lt(e + \" j\"), this;\n }, y.__private__.setLineMiterLimit = y.__private__.setMiterLimit = y.setLineMiterLimit = y.setMiterLimit = function (t) {\n if (t = t || 0, isNaN(t)) throw new Error(\"Invalid argument passed to jsPDF.setLineMiterLimit\");\n return lt(O(U(t)) + \" M\"), this;\n }, y.GState = j, y.setGState = function (t) {\n (t = \"string\" == typeof t ? Mt[Et[t]] : Fr(null, t)).equals(qt) || (lt(\"/\" + t.id + \" gs\"), qt = t);\n };\n var Fr = function Fr(t, e) {\n if (!t || !Et[t]) {\n var r = !1;\n for (var n in Mt) if (Mt.hasOwnProperty(n) && Mt[n].equals(e)) {\n r = !0;\n break;\n }\n if (r) e = Mt[n];else {\n var i = \"GS\" + (Object.keys(Mt).length + 1).toString(10);\n Mt[i] = e, e.id = i;\n }\n return t && (Et[t] = e.id), Tt.publish(\"addGState\", e), e;\n }\n };\n y.addGState = function (t, e) {\n return Fr(t, e), this;\n }, y.saveGraphicsState = function () {\n return lt(\"q\"), jt.push({\n key: St,\n size: gt,\n color: xr\n }), this;\n }, y.restoreGraphicsState = function () {\n lt(\"Q\");\n var t = jt.pop();\n return St = t.key, gt = t.size, xr = t.color, qt = null, this;\n }, y.setCurrentTransformationMatrix = function (t) {\n return lt(t.toString() + \" cm\"), this;\n }, y.comment = function (t) {\n return lt(\"#\" + t), this;\n };\n var Cr = function Cr(t, e) {\n var r = t || 0;\n Object.defineProperty(this, \"x\", {\n enumerable: !0,\n get: function get() {\n return r;\n },\n set: function set(t) {\n isNaN(t) || (r = parseFloat(t));\n }\n });\n var n = e || 0;\n Object.defineProperty(this, \"y\", {\n enumerable: !0,\n get: function get() {\n return n;\n },\n set: function set(t) {\n isNaN(t) || (n = parseFloat(t));\n }\n });\n var i = \"pt\";\n return Object.defineProperty(this, \"type\", {\n enumerable: !0,\n get: function get() {\n return i;\n },\n set: function set(t) {\n i = t.toString();\n }\n }), this;\n },\n jr = function jr(t, e, r, n) {\n Cr.call(this, t, e), this.type = \"rect\";\n var i = r || 0;\n Object.defineProperty(this, \"w\", {\n enumerable: !0,\n get: function get() {\n return i;\n },\n set: function set(t) {\n isNaN(t) || (i = parseFloat(t));\n }\n });\n var a = n || 0;\n return Object.defineProperty(this, \"h\", {\n enumerable: !0,\n get: function get() {\n return a;\n },\n set: function set(t) {\n isNaN(t) || (a = parseFloat(t));\n }\n }), this;\n },\n Or = function Or() {\n this.page = Dt, this.currentPage = $, this.pages = ot.slice(0), this.pagesContext = Rt.slice(0), this.x = Pt, this.y = kt, this.matrix = It, this.width = qr($), this.height = Rr($), this.outputDestination = ct, this.id = \"\", this.objectNumber = -1;\n };\n Or.prototype.restore = function () {\n Dt = this.page, $ = this.currentPage, Rt = this.pagesContext, ot = this.pages, Pt = this.x, kt = this.y, It = this.matrix, Dr($, this.width), Tr($, this.height), ct = this.outputDestination;\n };\n var Br = function Br(t, e, r, n, i) {\n Wt.push(new Or()), Dt = $ = 0, ot = [], Pt = t, kt = e, It = i, je([r, n]);\n },\n Mr = function Mr(t) {\n if (Ht[t]) Wt.pop().restore();else {\n var e = new Or(),\n r = \"Xo\" + (Object.keys(zt).length + 1).toString(10);\n e.id = r, Ht[t] = r, zt[r] = e, Tt.publish(\"addFormObject\", e), Wt.pop().restore();\n }\n };\n for (var Er in y.beginFormObject = function (t, e, r, n, i) {\n return Br(t, e, r, n, i), this;\n }, y.endFormObject = function (t) {\n return Mr(t), this;\n }, y.doFormObject = function (t, e) {\n var r = zt[Ht[t]];\n return lt(\"q\"), lt(e.toString() + \" cm\"), lt(\"/\" + r.id + \" Do\"), lt(\"Q\"), this;\n }, y.getFormObject = function (t) {\n var e = zt[Ht[t]];\n return {\n x: e.x,\n y: e.y,\n width: e.width,\n height: e.height,\n matrix: e.matrix\n };\n }, y.save = function (t, e) {\n return t = t || \"generated.pdf\", (e = e || {}).returnPromise = e.returnPromise || !1, !1 === e.returnPromise ? (l(We(He()), t), \"function\" == typeof l.unload && n.setTimeout && setTimeout(l.unload, 911), this) : new Promise(function (e, r) {\n try {\n var i = l(We(He()), t);\n \"function\" == typeof l.unload && n.setTimeout && setTimeout(l.unload, 911), e(i);\n } catch (t) {\n r(t.message);\n }\n });\n }, E.API) E.API.hasOwnProperty(Er) && (\"events\" === Er && E.API.events.length ? function (t, e) {\n var r, n, i;\n for (i = e.length - 1; -1 !== i; i--) r = e[i][0], n = e[i][1], t.subscribe.apply(t, [r].concat(\"function\" == typeof n ? [n] : n));\n }(Tt, E.API.events) : y[Er] = E.API[Er]);\n var qr = y.getPageWidth = function (t) {\n return (Rt[t = t || $].mediaBox.topRightX - Rt[t].mediaBox.bottomLeftX) / _t;\n },\n Dr = y.setPageWidth = function (t, e) {\n Rt[t].mediaBox.topRightX = e * _t + Rt[t].mediaBox.bottomLeftX;\n },\n Rr = y.getPageHeight = function (t) {\n return (Rt[t = t || $].mediaBox.topRightY - Rt[t].mediaBox.bottomLeftY) / _t;\n },\n Tr = y.setPageHeight = function (t, e) {\n Rt[t].mediaBox.topRightY = e * _t + Rt[t].mediaBox.bottomLeftY;\n };\n return y.internal = {\n pdfEscape: Ce,\n getStyle: tr,\n getFont: hr,\n getFontSize: vt,\n getCharSpace: Pr,\n getTextColor: Sr,\n getLineHeight: gr,\n getLineHeightFactor: vr,\n getLineWidth: dr,\n write: ft,\n getHorizontalCoordinate: br,\n getVerticalCoordinate: yr,\n getCoordinateString: wr,\n getVerticalCoordinateString: Nr,\n collections: {},\n newObject: Xt,\n newAdditionalObject: $t,\n newObjectDeferred: Kt,\n newObjectDeferredBegin: Zt,\n getFilters: ne,\n putStream: ie,\n events: Tt,\n scaleFactor: _t,\n pageSize: {\n getWidth: function getWidth() {\n return qr($);\n },\n setWidth: function setWidth(t) {\n Dr($, t);\n },\n getHeight: function getHeight() {\n return Rr($);\n },\n setHeight: function setHeight(t) {\n Tr($, t);\n }\n },\n encryptionOptions: m,\n encryption: Ye,\n getEncryptor: Je,\n output: Ve,\n getNumberOfPages: Ee,\n pages: ot,\n out: lt,\n f2: R,\n f3: T,\n getPageInfo: Xe,\n getPageInfoByObjId: Ke,\n getCurrentPageInfo: Ze,\n getPDFVersion: N,\n Point: Cr,\n Rectangle: jr,\n Matrix: Vt,\n hasHotfix: Ge\n }, Object.defineProperty(y.internal.pageSize, \"width\", {\n get: function get() {\n return qr($);\n },\n set: function set(t) {\n Dr($, t);\n },\n enumerable: !0,\n configurable: !0\n }), Object.defineProperty(y.internal.pageSize, \"height\", {\n get: function get() {\n return Rr($);\n },\n set: function set(t) {\n Tr($, t);\n },\n enumerable: !0,\n configurable: !0\n }), ke.call(y, pt), St = \"F1\", Oe(s, i), Tt.publish(\"initialized\"), y;\n}\nI.prototype.lsbFirstWord = function (t) {\n return String.fromCharCode(t >> 0 & 255, t >> 8 & 255, t >> 16 & 255, t >> 24 & 255);\n}, I.prototype.toHexString = function (t) {\n return t.split(\"\").map(function (t) {\n return (\"0\" + (255 & t.charCodeAt(0)).toString(16)).slice(-2);\n }).join(\"\");\n}, I.prototype.hexToBytes = function (t) {\n for (var e = [], r = 0; r < t.length; r += 2) e.push(String.fromCharCode(parseInt(t.substr(r, 2), 16)));\n return e.join(\"\");\n}, I.prototype.processOwnerPassword = function (t, e) {\n return P(x(e).substr(0, 5), t);\n}, I.prototype.encryptor = function (t, e) {\n var r = x(this.encryptionKey + String.fromCharCode(255 & t, t >> 8 & 255, t >> 16 & 255, 255 & e, e >> 8 & 255)).substr(0, 10);\n return function (t) {\n return P(r, t);\n };\n}, j.prototype.equals = function (e) {\n var r,\n n = \"id,objectNumber,equals\";\n if (!e || t(e) !== t(this)) return !1;\n var i = 0;\n for (r in this) if (!(n.indexOf(r) >= 0)) {\n if (this.hasOwnProperty(r) && !e.hasOwnProperty(r)) return !1;\n if (this[r] !== e[r]) return !1;\n i++;\n }\n for (r in e) e.hasOwnProperty(r) && n.indexOf(r) < 0 && i--;\n return 0 === i;\n}, E.API = {\n events: []\n}, E.version = \"2.5.2\";\nvar q = E.API,\n D = 1,\n R = function R(t) {\n return t.replace(/\\\\/g, \"\\\\\\\\\").replace(/\\(/g, \"\\\\(\").replace(/\\)/g, \"\\\\)\");\n },\n T = function T(t) {\n return t.replace(/\\\\\\\\/g, \"\\\\\").replace(/\\\\\\(/g, \"(\").replace(/\\\\\\)/g, \")\");\n },\n U = function U(t) {\n return t.toFixed(2);\n },\n z = function z(t) {\n return t.toFixed(5);\n };\nq.__acroform__ = {};\nvar H = function H(t, e) {\n t.prototype = Object.create(e.prototype), t.prototype.constructor = t;\n },\n W = function W(t) {\n return t * D;\n },\n V = function V(t) {\n var e = new ut(),\n r = At.internal.getHeight(t) || 0,\n n = At.internal.getWidth(t) || 0;\n return e.BBox = [0, 0, Number(U(n)), Number(U(r))], e;\n },\n G = q.__acroform__.setBit = function (t, e) {\n if (t = t || 0, e = e || 0, isNaN(t) || isNaN(e)) throw new Error(\"Invalid arguments passed to jsPDF.API.__acroform__.setBit\");\n return t |= 1 << e;\n },\n Y = q.__acroform__.clearBit = function (t, e) {\n if (t = t || 0, e = e || 0, isNaN(t) || isNaN(e)) throw new Error(\"Invalid arguments passed to jsPDF.API.__acroform__.clearBit\");\n return t &= ~(1 << e);\n },\n J = q.__acroform__.getBit = function (t, e) {\n if (isNaN(t) || isNaN(e)) throw new Error(\"Invalid arguments passed to jsPDF.API.__acroform__.getBit\");\n return 0 == (t & 1 << e) ? 0 : 1;\n },\n X = q.__acroform__.getBitForPdf = function (t, e) {\n if (isNaN(t) || isNaN(e)) throw new Error(\"Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf\");\n return J(t, e - 1);\n },\n K = q.__acroform__.setBitForPdf = function (t, e) {\n if (isNaN(t) || isNaN(e)) throw new Error(\"Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf\");\n return G(t, e - 1);\n },\n Z = q.__acroform__.clearBitForPdf = function (t, e) {\n if (isNaN(t) || isNaN(e)) throw new Error(\"Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf\");\n return Y(t, e - 1);\n },\n $ = q.__acroform__.calculateCoordinates = function (t, e) {\n var r = e.internal.getHorizontalCoordinate,\n n = e.internal.getVerticalCoordinate,\n i = t[0],\n a = t[1],\n o = t[2],\n s = t[3],\n c = {};\n return c.lowerLeft_X = r(i) || 0, c.lowerLeft_Y = n(a + s) || 0, c.upperRight_X = r(i + o) || 0, c.upperRight_Y = n(a) || 0, [Number(U(c.lowerLeft_X)), Number(U(c.lowerLeft_Y)), Number(U(c.upperRight_X)), Number(U(c.upperRight_Y))];\n },\n Q = function Q(t) {\n if (t.appearanceStreamContent) return t.appearanceStreamContent;\n if (t.V || t.DV) {\n var e = [],\n r = t._V || t.DV,\n n = tt(t, r),\n i = t.scope.internal.getFont(t.fontName, t.fontStyle).id;\n e.push(\"/Tx BMC\"), e.push(\"q\"), e.push(\"BT\"), e.push(t.scope.__private__.encodeColorString(t.color)), e.push(\"/\" + i + \" \" + U(n.fontSize) + \" Tf\"), e.push(\"1 0 0 1 0 0 Tm\"), e.push(n.text), e.push(\"ET\"), e.push(\"Q\"), e.push(\"EMC\");\n var a = V(t);\n return a.scope = t.scope, a.stream = e.join(\"\\n\"), a;\n }\n },\n tt = function tt(t, e) {\n var r = 0 === t.fontSize ? t.maxFontSize : t.fontSize,\n n = {\n text: \"\",\n fontSize: \"\"\n },\n i = (e = \")\" == (e = \"(\" == e.substr(0, 1) ? e.substr(1) : e).substr(e.length - 1) ? e.substr(0, e.length - 1) : e).split(\" \");\n i = t.multiline ? i.map(function (t) {\n return t.split(\"\\n\");\n }) : i.map(function (t) {\n return [t];\n });\n var a = r,\n o = At.internal.getHeight(t) || 0;\n o = o < 0 ? -o : o;\n var s = At.internal.getWidth(t) || 0;\n s = s < 0 ? -s : s;\n var c = function c(e, r, n) {\n if (e + 1 < i.length) {\n var a = r + \" \" + i[e + 1][0];\n return et(a, t, n).width <= s - 4;\n }\n return !1;\n };\n a++;\n t: for (; a > 0;) {\n e = \"\", a--;\n var u,\n h,\n l = et(\"3\", t, a).height,\n f = t.multiline ? o - a : (o - l) / 2,\n d = f += 2,\n p = 0,\n g = 0,\n m = 0;\n if (a <= 0) {\n e = \"(...) Tj\\n\", e += \"% Width of Text: \" + et(e, t, a = 12).width + \", FieldWidth:\" + s + \"\\n\";\n break;\n }\n for (var v = \"\", b = 0, y = 0; y < i.length; y++) if (i.hasOwnProperty(y)) {\n var w = !1;\n if (1 !== i[y].length && m !== i[y].length - 1) {\n if ((l + 2) * (b + 2) + 2 > o) continue t;\n v += i[y][m], w = !0, g = y, y--;\n } else {\n v = \" \" == (v += i[y][m] + \" \").substr(v.length - 1) ? v.substr(0, v.length - 1) : v;\n var N = parseInt(y),\n L = c(N, v, a),\n A = y >= i.length - 1;\n if (L && !A) {\n v += \" \", m = 0;\n continue;\n }\n if (L || A) {\n if (A) g = N;else if (t.multiline && (l + 2) * (b + 2) + 2 > o) continue t;\n } else {\n if (!t.multiline) continue t;\n if ((l + 2) * (b + 2) + 2 > o) continue t;\n g = N;\n }\n }\n for (var x = \"\", S = p; S <= g; S++) {\n var _ = i[S];\n if (t.multiline) {\n if (S === g) {\n x += _[m] + \" \", m = (m + 1) % _.length;\n continue;\n }\n if (S === p) {\n x += _[_.length - 1] + \" \";\n continue;\n }\n }\n x += _[0] + \" \";\n }\n switch (x = \" \" == x.substr(x.length - 1) ? x.substr(0, x.length - 1) : x, h = et(x, t, a).width, t.textAlign) {\n case \"right\":\n u = s - h - 2;\n break;\n case \"center\":\n u = (s - h) / 2;\n break;\n case \"left\":\n default:\n u = 2;\n }\n e += U(u) + \" \" + U(d) + \" Td\\n\", e += \"(\" + R(x) + \") Tj\\n\", e += -U(u) + \" 0 Td\\n\", d = -(a + 2), h = 0, p = w ? g : g + 1, b++, v = \"\";\n } else ;\n break;\n }\n return n.text = e, n.fontSize = a, n;\n },\n et = function et(t, e, r) {\n var n = e.scope.internal.getFont(e.fontName, e.fontStyle),\n i = e.scope.getStringUnitWidth(t, {\n font: n,\n fontSize: parseFloat(r),\n charSpace: 0\n }) * parseFloat(r);\n return {\n height: e.scope.getStringUnitWidth(\"3\", {\n font: n,\n fontSize: parseFloat(r),\n charSpace: 0\n }) * parseFloat(r) * 1.5,\n width: i\n };\n },\n rt = {\n fields: [],\n xForms: [],\n acroFormDictionaryRoot: null,\n printedOut: !1,\n internal: null,\n isInitialized: !1\n },\n nt = function nt(t, e) {\n var r = {\n type: \"reference\",\n object: t\n };\n void 0 === e.internal.getPageInfo(t.page).pageContext.annotations.find(function (t) {\n return t.type === r.type && t.object === r.object;\n }) && e.internal.getPageInfo(t.page).pageContext.annotations.push(r);\n },\n it = function it(e, r) {\n for (var n in e) if (e.hasOwnProperty(n)) {\n var i = n,\n a = e[n];\n r.internal.newObjectDeferredBegin(a.objId, !0), \"object\" === t(a) && \"function\" == typeof a.putStream && a.putStream(), delete e[i];\n }\n },\n at = function at(e, r) {\n if (r.scope = e, void 0 !== e.internal && (void 0 === e.internal.acroformPlugin || !1 === e.internal.acroformPlugin.isInitialized)) {\n if (lt.FieldNum = 0, e.internal.acroformPlugin = JSON.parse(JSON.stringify(rt)), e.internal.acroformPlugin.acroFormDictionaryRoot) throw new Error(\"Exception while creating AcroformDictionary\");\n D = e.internal.scaleFactor, e.internal.acroformPlugin.acroFormDictionaryRoot = new ht(), e.internal.acroformPlugin.acroFormDictionaryRoot.scope = e, e.internal.acroformPlugin.acroFormDictionaryRoot._eventID = e.internal.events.subscribe(\"postPutResources\", function () {\n !function (t) {\n t.internal.events.unsubscribe(t.internal.acroformPlugin.acroFormDictionaryRoot._eventID), delete t.internal.acroformPlugin.acroFormDictionaryRoot._eventID, t.internal.acroformPlugin.printedOut = !0;\n }(e);\n }), e.internal.events.subscribe(\"buildDocument\", function () {\n !function (t) {\n t.internal.acroformPlugin.acroFormDictionaryRoot.objId = void 0;\n var e = t.internal.acroformPlugin.acroFormDictionaryRoot.Fields;\n for (var r in e) if (e.hasOwnProperty(r)) {\n var n = e[r];\n n.objId = void 0, n.hasAnnotation && nt(n, t);\n }\n }(e);\n }), e.internal.events.subscribe(\"putCatalog\", function () {\n !function (t) {\n if (void 0 === t.internal.acroformPlugin.acroFormDictionaryRoot) throw new Error(\"putCatalogCallback: Root missing.\");\n t.internal.write(\"/AcroForm \" + t.internal.acroformPlugin.acroFormDictionaryRoot.objId + \" 0 R\");\n }(e);\n }), e.internal.events.subscribe(\"postPutPages\", function (r) {\n !function (e, r) {\n var n = !e;\n for (var i in e || (r.internal.newObjectDeferredBegin(r.internal.acroformPlugin.acroFormDictionaryRoot.objId, !0), r.internal.acroformPlugin.acroFormDictionaryRoot.putStream()), e = e || r.internal.acroformPlugin.acroFormDictionaryRoot.Kids) if (e.hasOwnProperty(i)) {\n var a = e[i],\n o = [],\n s = a.Rect;\n if (a.Rect && (a.Rect = $(a.Rect, r)), r.internal.newObjectDeferredBegin(a.objId, !0), a.DA = At.createDefaultAppearanceStream(a), \"object\" === t(a) && \"function\" == typeof a.getKeyValueListForStream && (o = a.getKeyValueListForStream()), a.Rect = s, a.hasAppearanceStream && !a.appearanceStreamContent) {\n var c = Q(a);\n o.push({\n key: \"AP\",\n value: \"<>\"\n }), r.internal.acroformPlugin.xForms.push(c);\n }\n if (a.appearanceStreamContent) {\n var u = \"\";\n for (var h in a.appearanceStreamContent) if (a.appearanceStreamContent.hasOwnProperty(h)) {\n var l = a.appearanceStreamContent[h];\n if (u += \"/\" + h + \" \", u += \"<<\", Object.keys(l).length >= 1 || Array.isArray(l)) {\n for (var i in l) if (l.hasOwnProperty(i)) {\n var f = l[i];\n \"function\" == typeof f && (f = f.call(r, a)), u += \"/\" + i + \" \" + f + \" \", r.internal.acroformPlugin.xForms.indexOf(f) >= 0 || r.internal.acroformPlugin.xForms.push(f);\n }\n } else \"function\" == typeof (f = l) && (f = f.call(r, a)), u += \"/\" + i + \" \" + f, r.internal.acroformPlugin.xForms.indexOf(f) >= 0 || r.internal.acroformPlugin.xForms.push(f);\n u += \">>\";\n }\n o.push({\n key: \"AP\",\n value: \"<<\\n\" + u + \">>\"\n });\n }\n r.internal.putStream({\n additionalKeyValues: o,\n objectId: a.objId\n }), r.internal.out(\"endobj\");\n }\n n && it(r.internal.acroformPlugin.xForms, r);\n }(r, e);\n }), e.internal.acroformPlugin.isInitialized = !0;\n }\n },\n ot = q.__acroform__.arrayToPdfArray = function (e, r, n) {\n var i = function i(t) {\n return t;\n };\n if (Array.isArray(e)) {\n for (var a = \"[\", o = 0; o < e.length; o++) switch (0 !== o && (a += \" \"), t(e[o])) {\n case \"boolean\":\n case \"number\":\n case \"object\":\n a += e[o].toString();\n break;\n case \"string\":\n \"/\" !== e[o].substr(0, 1) ? (void 0 !== r && n && (i = n.internal.getEncryptor(r)), a += \"(\" + R(i(e[o].toString())) + \")\") : a += e[o].toString();\n }\n return a += \"]\";\n }\n throw new Error(\"Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray\");\n };\nvar st = function st(t, e, r) {\n var n = function n(t) {\n return t;\n };\n return void 0 !== e && r && (n = r.internal.getEncryptor(e)), (t = t || \"\").toString(), t = \"(\" + R(n(t)) + \")\";\n },\n ct = function ct() {\n this._objId = void 0, this._scope = void 0, Object.defineProperty(this, \"objId\", {\n get: function get() {\n if (void 0 === this._objId) {\n if (void 0 === this.scope) return;\n this._objId = this.scope.internal.newObjectDeferred();\n }\n return this._objId;\n },\n set: function set(t) {\n this._objId = t;\n }\n }), Object.defineProperty(this, \"scope\", {\n value: this._scope,\n writable: !0\n });\n };\nct.prototype.toString = function () {\n return this.objId + \" 0 R\";\n}, ct.prototype.putStream = function () {\n var t = this.getKeyValueListForStream();\n this.scope.internal.putStream({\n data: this.stream,\n additionalKeyValues: t,\n objectId: this.objId\n }), this.scope.internal.out(\"endobj\");\n}, ct.prototype.getKeyValueListForStream = function () {\n var t = [],\n e = Object.getOwnPropertyNames(this).filter(function (t) {\n return \"content\" != t && \"appearanceStreamContent\" != t && \"scope\" != t && \"objId\" != t && \"_\" != t.substring(0, 1);\n });\n for (var r in e) if (!1 === Object.getOwnPropertyDescriptor(this, e[r]).configurable) {\n var n = e[r],\n i = this[n];\n i && (Array.isArray(i) ? t.push({\n key: n,\n value: ot(i, this.objId, this.scope)\n }) : i instanceof ct ? (i.scope = this.scope, t.push({\n key: n,\n value: i.objId + \" 0 R\"\n })) : \"function\" != typeof i && t.push({\n key: n,\n value: i\n }));\n }\n return t;\n};\nvar ut = function ut() {\n ct.call(this), Object.defineProperty(this, \"Type\", {\n value: \"/XObject\",\n configurable: !1,\n writable: !0\n }), Object.defineProperty(this, \"Subtype\", {\n value: \"/Form\",\n configurable: !1,\n writable: !0\n }), Object.defineProperty(this, \"FormType\", {\n value: 1,\n configurable: !1,\n writable: !0\n });\n var t,\n e = [];\n Object.defineProperty(this, \"BBox\", {\n configurable: !1,\n get: function get() {\n return e;\n },\n set: function set(t) {\n e = t;\n }\n }), Object.defineProperty(this, \"Resources\", {\n value: \"2 0 R\",\n configurable: !1,\n writable: !0\n }), Object.defineProperty(this, \"stream\", {\n enumerable: !1,\n configurable: !0,\n set: function set(e) {\n t = e.trim();\n },\n get: function get() {\n return t || null;\n }\n });\n};\nH(ut, ct);\nvar ht = function ht() {\n ct.call(this);\n var t,\n e = [];\n Object.defineProperty(this, \"Kids\", {\n enumerable: !1,\n configurable: !0,\n get: function get() {\n return e.length > 0 ? e : void 0;\n }\n }), Object.defineProperty(this, \"Fields\", {\n enumerable: !1,\n configurable: !1,\n get: function get() {\n return e;\n }\n }), Object.defineProperty(this, \"DA\", {\n enumerable: !1,\n configurable: !1,\n get: function get() {\n if (t) {\n var e = function e(t) {\n return t;\n };\n return this.scope && (e = this.scope.internal.getEncryptor(this.objId)), \"(\" + R(e(t)) + \")\";\n }\n },\n set: function set(e) {\n t = e;\n }\n });\n};\nH(ht, ct);\nvar lt = function t() {\n ct.call(this);\n var e = 4;\n Object.defineProperty(this, \"F\", {\n enumerable: !1,\n configurable: !1,\n get: function get() {\n return e;\n },\n set: function set(t) {\n if (isNaN(t)) throw new Error('Invalid value \"' + t + '\" for attribute F supplied.');\n e = t;\n }\n }), Object.defineProperty(this, \"showWhenPrinted\", {\n enumerable: !0,\n configurable: !0,\n get: function get() {\n return Boolean(X(e, 3));\n },\n set: function set(t) {\n !0 === Boolean(t) ? this.F = K(e, 3) : this.F = Z(e, 3);\n }\n });\n var r = 0;\n Object.defineProperty(this, \"Ff\", {\n enumerable: !1,\n configurable: !1,\n get: function get() {\n return r;\n },\n set: function set(t) {\n if (isNaN(t)) throw new Error('Invalid value \"' + t + '\" for attribute Ff supplied.');\n r = t;\n }\n });\n var n = [];\n Object.defineProperty(this, \"Rect\", {\n enumerable: !1,\n configurable: !1,\n get: function get() {\n if (0 !== n.length) return n;\n },\n set: function set(t) {\n n = void 0 !== t ? t : [];\n }\n }), Object.defineProperty(this, \"x\", {\n enumerable: !0,\n configurable: !0,\n get: function get() {\n return !n || isNaN(n[0]) ? 0 : n[0];\n },\n set: function set(t) {\n n[0] = t;\n }\n }), Object.defineProperty(this, \"y\", {\n enumerable: !0,\n configurable: !0,\n get: function get() {\n return !n || isNaN(n[1]) ? 0 : n[1];\n },\n set: function set(t) {\n n[1] = t;\n }\n }), Object.defineProperty(this, \"width\", {\n enumerable: !0,\n configurable: !0,\n get: function get() {\n return !n || isNaN(n[2]) ? 0 : n[2];\n },\n set: function set(t) {\n n[2] = t;\n }\n }), Object.defineProperty(this, \"height\", {\n enumerable: !0,\n configurable: !0,\n get: function get() {\n return !n || isNaN(n[3]) ? 0 : n[3];\n },\n set: function set(t) {\n n[3] = t;\n }\n });\n var i = \"\";\n Object.defineProperty(this, \"FT\", {\n enumerable: !0,\n configurable: !1,\n get: function get() {\n return i;\n },\n set: function set(t) {\n switch (t) {\n case \"/Btn\":\n case \"/Tx\":\n case \"/Ch\":\n case \"/Sig\":\n i = t;\n break;\n default:\n throw new Error('Invalid value \"' + t + '\" for attribute FT supplied.');\n }\n }\n });\n var a = null;\n Object.defineProperty(this, \"T\", {\n enumerable: !0,\n configurable: !1,\n get: function get() {\n if (!a || a.length < 1) {\n if (this instanceof yt) return;\n a = \"FieldObject\" + t.FieldNum++;\n }\n var e = function e(t) {\n return t;\n };\n return this.scope && (e = this.scope.internal.getEncryptor(this.objId)), \"(\" + R(e(a)) + \")\";\n },\n set: function set(t) {\n a = t.toString();\n }\n }), Object.defineProperty(this, \"fieldName\", {\n configurable: !0,\n enumerable: !0,\n get: function get() {\n return a;\n },\n set: function set(t) {\n a = t;\n }\n });\n var o = \"helvetica\";\n Object.defineProperty(this, \"fontName\", {\n enumerable: !0,\n configurable: !0,\n get: function get() {\n return o;\n },\n set: function set(t) {\n o = t;\n }\n });\n var s = \"normal\";\n Object.defineProperty(this, \"fontStyle\", {\n enumerable: !0,\n configurable: !0,\n get: function get() {\n return s;\n },\n set: function set(t) {\n s = t;\n }\n });\n var c = 0;\n Object.defineProperty(this, \"fontSize\", {\n enumerable: !0,\n configurable: !0,\n get: function get() {\n return c;\n },\n set: function set(t) {\n c = t;\n }\n });\n var u = void 0;\n Object.defineProperty(this, \"maxFontSize\", {\n enumerable: !0,\n configurable: !0,\n get: function get() {\n return void 0 === u ? 50 / D : u;\n },\n set: function set(t) {\n u = t;\n }\n });\n var h = \"black\";\n Object.defineProperty(this, \"color\", {\n enumerable: !0,\n configurable: !0,\n get: function get() {\n return h;\n },\n set: function set(t) {\n h = t;\n }\n });\n var l = \"/F1 0 Tf 0 g\";\n Object.defineProperty(this, \"DA\", {\n enumerable: !0,\n configurable: !1,\n get: function get() {\n if (!(!l || this instanceof yt || this instanceof Nt)) return st(l, this.objId, this.scope);\n },\n set: function set(t) {\n t = t.toString(), l = t;\n }\n });\n var f = null;\n Object.defineProperty(this, \"DV\", {\n enumerable: !1,\n configurable: !1,\n get: function get() {\n if (f) return this instanceof mt == !1 ? st(f, this.objId, this.scope) : f;\n },\n set: function set(t) {\n t = t.toString(), f = this instanceof mt == !1 ? \"(\" === t.substr(0, 1) ? T(t.substr(1, t.length - 2)) : T(t) : t;\n }\n }), Object.defineProperty(this, \"defaultValue\", {\n enumerable: !0,\n configurable: !0,\n get: function get() {\n return this instanceof mt == !0 ? T(f.substr(1, f.length - 1)) : f;\n },\n set: function set(t) {\n t = t.toString(), f = this instanceof mt == !0 ? \"/\" + t : t;\n }\n });\n var d = null;\n Object.defineProperty(this, \"_V\", {\n enumerable: !1,\n configurable: !1,\n get: function get() {\n if (d) return d;\n },\n set: function set(t) {\n this.V = t;\n }\n }), Object.defineProperty(this, \"V\", {\n enumerable: !1,\n configurable: !1,\n get: function get() {\n if (d) return this instanceof mt == !1 ? st(d, this.objId, this.scope) : d;\n },\n set: function set(t) {\n t = t.toString(), d = this instanceof mt == !1 ? \"(\" === t.substr(0, 1) ? T(t.substr(1, t.length - 2)) : T(t) : t;\n }\n }), Object.defineProperty(this, \"value\", {\n enumerable: !0,\n configurable: !0,\n get: function get() {\n return this instanceof mt == !0 ? T(d.substr(1, d.length - 1)) : d;\n },\n set: function set(t) {\n t = t.toString(), d = this instanceof mt == !0 ? \"/\" + t : t;\n }\n }), Object.defineProperty(this, \"hasAnnotation\", {\n enumerable: !0,\n configurable: !0,\n get: function get() {\n return this.Rect;\n }\n }), Object.defineProperty(this, \"Type\", {\n enumerable: !0,\n configurable: !1,\n get: function get() {\n return this.hasAnnotation ? \"/Annot\" : null;\n }\n }), Object.defineProperty(this, \"Subtype\", {\n enumerable: !0,\n configurable: !1,\n get: function get() {\n return this.hasAnnotation ? \"/Widget\" : null;\n }\n });\n var p,\n g = !1;\n Object.defineProperty(this, \"hasAppearanceStream\", {\n enumerable: !0,\n configurable: !0,\n get: function get() {\n return g;\n },\n set: function set(t) {\n t = Boolean(t), g = t;\n }\n }), Object.defineProperty(this, \"page\", {\n enumerable: !0,\n configurable: !0,\n get: function get() {\n if (p) return p;\n },\n set: function set(t) {\n p = t;\n }\n }), Object.defineProperty(this, \"readOnly\", {\n enumerable: !0,\n configurable: !0,\n get: function get() {\n return Boolean(X(this.Ff, 1));\n },\n set: function set(t) {\n !0 === Boolean(t) ? this.Ff = K(this.Ff, 1) : this.Ff = Z(this.Ff, 1);\n }\n }), Object.defineProperty(this, \"required\", {\n enumerable: !0,\n configurable: !0,\n get: function get() {\n return Boolean(X(this.Ff, 2));\n },\n set: function set(t) {\n !0 === Boolean(t) ? this.Ff = K(this.Ff, 2) : this.Ff = Z(this.Ff, 2);\n }\n }), Object.defineProperty(this, \"noExport\", {\n enumerable: !0,\n configurable: !0,\n get: function get() {\n return Boolean(X(this.Ff, 3));\n },\n set: function set(t) {\n !0 === Boolean(t) ? this.Ff = K(this.Ff, 3) : this.Ff = Z(this.Ff, 3);\n }\n });\n var m = null;\n Object.defineProperty(this, \"Q\", {\n enumerable: !0,\n configurable: !1,\n get: function get() {\n if (null !== m) return m;\n },\n set: function set(t) {\n if (-1 === [0, 1, 2].indexOf(t)) throw new Error('Invalid value \"' + t + '\" for attribute Q supplied.');\n m = t;\n }\n }), Object.defineProperty(this, \"textAlign\", {\n get: function get() {\n var t;\n switch (m) {\n case 0:\n default:\n t = \"left\";\n break;\n case 1:\n t = \"center\";\n break;\n case 2:\n t = \"right\";\n }\n return t;\n },\n configurable: !0,\n enumerable: !0,\n set: function set(t) {\n switch (t) {\n case \"right\":\n case 2:\n m = 2;\n break;\n case \"center\":\n case 1:\n m = 1;\n break;\n case \"left\":\n case 0:\n default:\n m = 0;\n }\n }\n });\n};\nH(lt, ct);\nvar ft = function ft() {\n lt.call(this), this.FT = \"/Ch\", this.V = \"()\", this.fontName = \"zapfdingbats\";\n var t = 0;\n Object.defineProperty(this, \"TI\", {\n enumerable: !0,\n configurable: !1,\n get: function get() {\n return t;\n },\n set: function set(e) {\n t = e;\n }\n }), Object.defineProperty(this, \"topIndex\", {\n enumerable: !0,\n configurable: !0,\n get: function get() {\n return t;\n },\n set: function set(e) {\n t = e;\n }\n });\n var e = [];\n Object.defineProperty(this, \"Opt\", {\n enumerable: !0,\n configurable: !1,\n get: function get() {\n return ot(e, this.objId, this.scope);\n },\n set: function set(t) {\n var r, n;\n n = [], \"string\" == typeof (r = t) && (n = function (t, e, r) {\n r || (r = 1);\n for (var n, i = []; n = e.exec(t);) i.push(n[r]);\n return i;\n }(r, /\\((.*?)\\)/g)), e = n;\n }\n }), this.getOptions = function () {\n return e;\n }, this.setOptions = function (t) {\n e = t, this.sort && e.sort();\n }, this.addOption = function (t) {\n t = (t = t || \"\").toString(), e.push(t), this.sort && e.sort();\n }, this.removeOption = function (t, r) {\n for (r = r || !1, t = (t = t || \"\").toString(); -1 !== e.indexOf(t) && (e.splice(e.indexOf(t), 1), !1 !== r););\n }, Object.defineProperty(this, \"combo\", {\n enumerable: !0,\n configurable: !0,\n get: function get() {\n return Boolean(X(this.Ff, 18));\n },\n set: function set(t) {\n !0 === Boolean(t) ? this.Ff = K(this.Ff, 18) : this.Ff = Z(this.Ff, 18);\n }\n }), Object.defineProperty(this, \"edit\", {\n enumerable: !0,\n configurable: !0,\n get: function get() {\n return Boolean(X(this.Ff, 19));\n },\n set: function set(t) {\n !0 === this.combo && (!0 === Boolean(t) ? this.Ff = K(this.Ff, 19) : this.Ff = Z(this.Ff, 19));\n }\n }), Object.defineProperty(this, \"sort\", {\n enumerable: !0,\n configurable: !0,\n get: function get() {\n return Boolean(X(this.Ff, 20));\n },\n set: function set(t) {\n !0 === Boolean(t) ? (this.Ff = K(this.Ff, 20), e.sort()) : this.Ff = Z(this.Ff, 20);\n }\n }), Object.defineProperty(this, \"multiSelect\", {\n enumerable: !0,\n configurable: !0,\n get: function get() {\n return Boolean(X(this.Ff, 22));\n },\n set: function set(t) {\n !0 === Boolean(t) ? this.Ff = K(this.Ff, 22) : this.Ff = Z(this.Ff, 22);\n }\n }), Object.defineProperty(this, \"doNotSpellCheck\", {\n enumerable: !0,\n configurable: !0,\n get: function get() {\n return Boolean(X(this.Ff, 23));\n },\n set: function set(t) {\n !0 === Boolean(t) ? this.Ff = K(this.Ff, 23) : this.Ff = Z(this.Ff, 23);\n }\n }), Object.defineProperty(this, \"commitOnSelChange\", {\n enumerable: !0,\n configurable: !0,\n get: function get() {\n return Boolean(X(this.Ff, 27));\n },\n set: function set(t) {\n !0 === Boolean(t) ? this.Ff = K(this.Ff, 27) : this.Ff = Z(this.Ff, 27);\n }\n }), this.hasAppearanceStream = !1;\n};\nH(ft, lt);\nvar dt = function dt() {\n ft.call(this), this.fontName = \"helvetica\", this.combo = !1;\n};\nH(dt, ft);\nvar pt = function pt() {\n dt.call(this), this.combo = !0;\n};\nH(pt, dt);\nvar gt = function gt() {\n pt.call(this), this.edit = !0;\n};\nH(gt, pt);\nvar mt = function mt() {\n lt.call(this), this.FT = \"/Btn\", Object.defineProperty(this, \"noToggleToOff\", {\n enumerable: !0,\n configurable: !0,\n get: function get() {\n return Boolean(X(this.Ff, 15));\n },\n set: function set(t) {\n !0 === Boolean(t) ? this.Ff = K(this.Ff, 15) : this.Ff = Z(this.Ff, 15);\n }\n }), Object.defineProperty(this, \"radio\", {\n enumerable: !0,\n configurable: !0,\n get: function get() {\n return Boolean(X(this.Ff, 16));\n },\n set: function set(t) {\n !0 === Boolean(t) ? this.Ff = K(this.Ff, 16) : this.Ff = Z(this.Ff, 16);\n }\n }), Object.defineProperty(this, \"pushButton\", {\n enumerable: !0,\n configurable: !0,\n get: function get() {\n return Boolean(X(this.Ff, 17));\n },\n set: function set(t) {\n !0 === Boolean(t) ? this.Ff = K(this.Ff, 17) : this.Ff = Z(this.Ff, 17);\n }\n }), Object.defineProperty(this, \"radioIsUnison\", {\n enumerable: !0,\n configurable: !0,\n get: function get() {\n return Boolean(X(this.Ff, 26));\n },\n set: function set(t) {\n !0 === Boolean(t) ? this.Ff = K(this.Ff, 26) : this.Ff = Z(this.Ff, 26);\n }\n });\n var e,\n r = {};\n Object.defineProperty(this, \"MK\", {\n enumerable: !1,\n configurable: !1,\n get: function get() {\n var t = function t(_t2) {\n return _t2;\n };\n if (this.scope && (t = this.scope.internal.getEncryptor(this.objId)), 0 !== Object.keys(r).length) {\n var e,\n n = [];\n for (e in n.push(\"<<\"), r) n.push(\"/\" + e + \" (\" + R(t(r[e])) + \")\");\n return n.push(\">>\"), n.join(\"\\n\");\n }\n },\n set: function set(e) {\n \"object\" === t(e) && (r = e);\n }\n }), Object.defineProperty(this, \"caption\", {\n enumerable: !0,\n configurable: !0,\n get: function get() {\n return r.CA || \"\";\n },\n set: function set(t) {\n \"string\" == typeof t && (r.CA = t);\n }\n }), Object.defineProperty(this, \"AS\", {\n enumerable: !1,\n configurable: !1,\n get: function get() {\n return e;\n },\n set: function set(t) {\n e = t;\n }\n }), Object.defineProperty(this, \"appearanceState\", {\n enumerable: !0,\n configurable: !0,\n get: function get() {\n return e.substr(1, e.length - 1);\n },\n set: function set(t) {\n e = \"/\" + t;\n }\n });\n};\nH(mt, lt);\nvar vt = function vt() {\n mt.call(this), this.pushButton = !0;\n};\nH(vt, mt);\nvar bt = function bt() {\n mt.call(this), this.radio = !0, this.pushButton = !1;\n var t = [];\n Object.defineProperty(this, \"Kids\", {\n enumerable: !0,\n configurable: !1,\n get: function get() {\n return t;\n },\n set: function set(e) {\n t = void 0 !== e ? e : [];\n }\n });\n};\nH(bt, mt);\nvar yt = function yt() {\n var e, r;\n lt.call(this), Object.defineProperty(this, \"Parent\", {\n enumerable: !1,\n configurable: !1,\n get: function get() {\n return e;\n },\n set: function set(t) {\n e = t;\n }\n }), Object.defineProperty(this, \"optionName\", {\n enumerable: !1,\n configurable: !0,\n get: function get() {\n return r;\n },\n set: function set(t) {\n r = t;\n }\n });\n var n,\n i = {};\n Object.defineProperty(this, \"MK\", {\n enumerable: !1,\n configurable: !1,\n get: function get() {\n var t = function t(_t3) {\n return _t3;\n };\n this.scope && (t = this.scope.internal.getEncryptor(this.objId));\n var e,\n r = [];\n for (e in r.push(\"<<\"), i) r.push(\"/\" + e + \" (\" + R(t(i[e])) + \")\");\n return r.push(\">>\"), r.join(\"\\n\");\n },\n set: function set(e) {\n \"object\" === t(e) && (i = e);\n }\n }), Object.defineProperty(this, \"caption\", {\n enumerable: !0,\n configurable: !0,\n get: function get() {\n return i.CA || \"\";\n },\n set: function set(t) {\n \"string\" == typeof t && (i.CA = t);\n }\n }), Object.defineProperty(this, \"AS\", {\n enumerable: !1,\n configurable: !1,\n get: function get() {\n return n;\n },\n set: function set(t) {\n n = t;\n }\n }), Object.defineProperty(this, \"appearanceState\", {\n enumerable: !0,\n configurable: !0,\n get: function get() {\n return n.substr(1, n.length - 1);\n },\n set: function set(t) {\n n = \"/\" + t;\n }\n }), this.caption = \"l\", this.appearanceState = \"Off\", this._AppearanceType = At.RadioButton.Circle, this.appearanceStreamContent = this._AppearanceType.createAppearanceStream(this.optionName);\n};\nH(yt, lt), bt.prototype.setAppearance = function (t) {\n if (!(\"createAppearanceStream\" in t) || !(\"getCA\" in t)) throw new Error(\"Couldn't assign Appearance to RadioButton. Appearance was Invalid!\");\n for (var e in this.Kids) if (this.Kids.hasOwnProperty(e)) {\n var r = this.Kids[e];\n r.appearanceStreamContent = t.createAppearanceStream(r.optionName), r.caption = t.getCA();\n }\n}, bt.prototype.createOption = function (t) {\n var e = new yt();\n return e.Parent = this, e.optionName = t, this.Kids.push(e), xt.call(this.scope, e), e;\n};\nvar wt = function wt() {\n mt.call(this), this.fontName = \"zapfdingbats\", this.caption = \"3\", this.appearanceState = \"On\", this.value = \"On\", this.textAlign = \"center\", this.appearanceStreamContent = At.CheckBox.createAppearanceStream();\n};\nH(wt, mt);\nvar Nt = function Nt() {\n lt.call(this), this.FT = \"/Tx\", Object.defineProperty(this, \"multiline\", {\n enumerable: !0,\n configurable: !0,\n get: function get() {\n return Boolean(X(this.Ff, 13));\n },\n set: function set(t) {\n !0 === Boolean(t) ? this.Ff = K(this.Ff, 13) : this.Ff = Z(this.Ff, 13);\n }\n }), Object.defineProperty(this, \"fileSelect\", {\n enumerable: !0,\n configurable: !0,\n get: function get() {\n return Boolean(X(this.Ff, 21));\n },\n set: function set(t) {\n !0 === Boolean(t) ? this.Ff = K(this.Ff, 21) : this.Ff = Z(this.Ff, 21);\n }\n }), Object.defineProperty(this, \"doNotSpellCheck\", {\n enumerable: !0,\n configurable: !0,\n get: function get() {\n return Boolean(X(this.Ff, 23));\n },\n set: function set(t) {\n !0 === Boolean(t) ? this.Ff = K(this.Ff, 23) : this.Ff = Z(this.Ff, 23);\n }\n }), Object.defineProperty(this, \"doNotScroll\", {\n enumerable: !0,\n configurable: !0,\n get: function get() {\n return Boolean(X(this.Ff, 24));\n },\n set: function set(t) {\n !0 === Boolean(t) ? this.Ff = K(this.Ff, 24) : this.Ff = Z(this.Ff, 24);\n }\n }), Object.defineProperty(this, \"comb\", {\n enumerable: !0,\n configurable: !0,\n get: function get() {\n return Boolean(X(this.Ff, 25));\n },\n set: function set(t) {\n !0 === Boolean(t) ? this.Ff = K(this.Ff, 25) : this.Ff = Z(this.Ff, 25);\n }\n }), Object.defineProperty(this, \"richText\", {\n enumerable: !0,\n configurable: !0,\n get: function get() {\n return Boolean(X(this.Ff, 26));\n },\n set: function set(t) {\n !0 === Boolean(t) ? this.Ff = K(this.Ff, 26) : this.Ff = Z(this.Ff, 26);\n }\n });\n var t = null;\n Object.defineProperty(this, \"MaxLen\", {\n enumerable: !0,\n configurable: !1,\n get: function get() {\n return t;\n },\n set: function set(e) {\n t = e;\n }\n }), Object.defineProperty(this, \"maxLength\", {\n enumerable: !0,\n configurable: !0,\n get: function get() {\n return t;\n },\n set: function set(e) {\n Number.isInteger(e) && (t = e);\n }\n }), Object.defineProperty(this, \"hasAppearanceStream\", {\n enumerable: !0,\n configurable: !0,\n get: function get() {\n return this.V || this.DV;\n }\n });\n};\nH(Nt, lt);\nvar Lt = function Lt() {\n Nt.call(this), Object.defineProperty(this, \"password\", {\n enumerable: !0,\n configurable: !0,\n get: function get() {\n return Boolean(X(this.Ff, 14));\n },\n set: function set(t) {\n !0 === Boolean(t) ? this.Ff = K(this.Ff, 14) : this.Ff = Z(this.Ff, 14);\n }\n }), this.password = !0;\n};\nH(Lt, Nt);\nvar At = {\n CheckBox: {\n createAppearanceStream: function createAppearanceStream() {\n return {\n N: {\n On: At.CheckBox.YesNormal\n },\n D: {\n On: At.CheckBox.YesPushDown,\n Off: At.CheckBox.OffPushDown\n }\n };\n },\n YesPushDown: function YesPushDown(t) {\n var e = V(t);\n e.scope = t.scope;\n var r = [],\n n = t.scope.internal.getFont(t.fontName, t.fontStyle).id,\n i = t.scope.__private__.encodeColorString(t.color),\n a = tt(t, t.caption);\n return r.push(\"0.749023 g\"), r.push(\"0 0 \" + U(At.internal.getWidth(t)) + \" \" + U(At.internal.getHeight(t)) + \" re\"), r.push(\"f\"), r.push(\"BMC\"), r.push(\"q\"), r.push(\"0 0 1 rg\"), r.push(\"/\" + n + \" \" + U(a.fontSize) + \" Tf \" + i), r.push(\"BT\"), r.push(a.text), r.push(\"ET\"), r.push(\"Q\"), r.push(\"EMC\"), e.stream = r.join(\"\\n\"), e;\n },\n YesNormal: function YesNormal(t) {\n var e = V(t);\n e.scope = t.scope;\n var r = t.scope.internal.getFont(t.fontName, t.fontStyle).id,\n n = t.scope.__private__.encodeColorString(t.color),\n i = [],\n a = At.internal.getHeight(t),\n o = At.internal.getWidth(t),\n s = tt(t, t.caption);\n return i.push(\"1 g\"), i.push(\"0 0 \" + U(o) + \" \" + U(a) + \" re\"), i.push(\"f\"), i.push(\"q\"), i.push(\"0 0 1 rg\"), i.push(\"0 0 \" + U(o - 1) + \" \" + U(a - 1) + \" re\"), i.push(\"W\"), i.push(\"n\"), i.push(\"0 g\"), i.push(\"BT\"), i.push(\"/\" + r + \" \" + U(s.fontSize) + \" Tf \" + n), i.push(s.text), i.push(\"ET\"), i.push(\"Q\"), e.stream = i.join(\"\\n\"), e;\n },\n OffPushDown: function OffPushDown(t) {\n var e = V(t);\n e.scope = t.scope;\n var r = [];\n return r.push(\"0.749023 g\"), r.push(\"0 0 \" + U(At.internal.getWidth(t)) + \" \" + U(At.internal.getHeight(t)) + \" re\"), r.push(\"f\"), e.stream = r.join(\"\\n\"), e;\n }\n },\n RadioButton: {\n Circle: {\n createAppearanceStream: function createAppearanceStream(t) {\n var e = {\n D: {\n Off: At.RadioButton.Circle.OffPushDown\n },\n N: {}\n };\n return e.N[t] = At.RadioButton.Circle.YesNormal, e.D[t] = At.RadioButton.Circle.YesPushDown, e;\n },\n getCA: function getCA() {\n return \"l\";\n },\n YesNormal: function YesNormal(t) {\n var e = V(t);\n e.scope = t.scope;\n var r = [],\n n = At.internal.getWidth(t) <= At.internal.getHeight(t) ? At.internal.getWidth(t) / 4 : At.internal.getHeight(t) / 4;\n n = Number((.9 * n).toFixed(5));\n var i = At.internal.Bezier_C,\n a = Number((n * i).toFixed(5));\n return r.push(\"q\"), r.push(\"1 0 0 1 \" + z(At.internal.getWidth(t) / 2) + \" \" + z(At.internal.getHeight(t) / 2) + \" cm\"), r.push(n + \" 0 m\"), r.push(n + \" \" + a + \" \" + a + \" \" + n + \" 0 \" + n + \" c\"), r.push(\"-\" + a + \" \" + n + \" -\" + n + \" \" + a + \" -\" + n + \" 0 c\"), r.push(\"-\" + n + \" -\" + a + \" -\" + a + \" -\" + n + \" 0 -\" + n + \" c\"), r.push(a + \" -\" + n + \" \" + n + \" -\" + a + \" \" + n + \" 0 c\"), r.push(\"f\"), r.push(\"Q\"), e.stream = r.join(\"\\n\"), e;\n },\n YesPushDown: function YesPushDown(t) {\n var e = V(t);\n e.scope = t.scope;\n var r = [],\n n = At.internal.getWidth(t) <= At.internal.getHeight(t) ? At.internal.getWidth(t) / 4 : At.internal.getHeight(t) / 4;\n n = Number((.9 * n).toFixed(5));\n var i = Number((2 * n).toFixed(5)),\n a = Number((i * At.internal.Bezier_C).toFixed(5)),\n o = Number((n * At.internal.Bezier_C).toFixed(5));\n return r.push(\"0.749023 g\"), r.push(\"q\"), r.push(\"1 0 0 1 \" + z(At.internal.getWidth(t) / 2) + \" \" + z(At.internal.getHeight(t) / 2) + \" cm\"), r.push(i + \" 0 m\"), r.push(i + \" \" + a + \" \" + a + \" \" + i + \" 0 \" + i + \" c\"), r.push(\"-\" + a + \" \" + i + \" -\" + i + \" \" + a + \" -\" + i + \" 0 c\"), r.push(\"-\" + i + \" -\" + a + \" -\" + a + \" -\" + i + \" 0 -\" + i + \" c\"), r.push(a + \" -\" + i + \" \" + i + \" -\" + a + \" \" + i + \" 0 c\"), r.push(\"f\"), r.push(\"Q\"), r.push(\"0 g\"), r.push(\"q\"), r.push(\"1 0 0 1 \" + z(At.internal.getWidth(t) / 2) + \" \" + z(At.internal.getHeight(t) / 2) + \" cm\"), r.push(n + \" 0 m\"), r.push(n + \" \" + o + \" \" + o + \" \" + n + \" 0 \" + n + \" c\"), r.push(\"-\" + o + \" \" + n + \" -\" + n + \" \" + o + \" -\" + n + \" 0 c\"), r.push(\"-\" + n + \" -\" + o + \" -\" + o + \" -\" + n + \" 0 -\" + n + \" c\"), r.push(o + \" -\" + n + \" \" + n + \" -\" + o + \" \" + n + \" 0 c\"), r.push(\"f\"), r.push(\"Q\"), e.stream = r.join(\"\\n\"), e;\n },\n OffPushDown: function OffPushDown(t) {\n var e = V(t);\n e.scope = t.scope;\n var r = [],\n n = At.internal.getWidth(t) <= At.internal.getHeight(t) ? At.internal.getWidth(t) / 4 : At.internal.getHeight(t) / 4;\n n = Number((.9 * n).toFixed(5));\n var i = Number((2 * n).toFixed(5)),\n a = Number((i * At.internal.Bezier_C).toFixed(5));\n return r.push(\"0.749023 g\"), r.push(\"q\"), r.push(\"1 0 0 1 \" + z(At.internal.getWidth(t) / 2) + \" \" + z(At.internal.getHeight(t) / 2) + \" cm\"), r.push(i + \" 0 m\"), r.push(i + \" \" + a + \" \" + a + \" \" + i + \" 0 \" + i + \" c\"), r.push(\"-\" + a + \" \" + i + \" -\" + i + \" \" + a + \" -\" + i + \" 0 c\"), r.push(\"-\" + i + \" -\" + a + \" -\" + a + \" -\" + i + \" 0 -\" + i + \" c\"), r.push(a + \" -\" + i + \" \" + i + \" -\" + a + \" \" + i + \" 0 c\"), r.push(\"f\"), r.push(\"Q\"), e.stream = r.join(\"\\n\"), e;\n }\n },\n Cross: {\n createAppearanceStream: function createAppearanceStream(t) {\n var e = {\n D: {\n Off: At.RadioButton.Cross.OffPushDown\n },\n N: {}\n };\n return e.N[t] = At.RadioButton.Cross.YesNormal, e.D[t] = At.RadioButton.Cross.YesPushDown, e;\n },\n getCA: function getCA() {\n return \"8\";\n },\n YesNormal: function YesNormal(t) {\n var e = V(t);\n e.scope = t.scope;\n var r = [],\n n = At.internal.calculateCross(t);\n return r.push(\"q\"), r.push(\"1 1 \" + U(At.internal.getWidth(t) - 2) + \" \" + U(At.internal.getHeight(t) - 2) + \" re\"), r.push(\"W\"), r.push(\"n\"), r.push(U(n.x1.x) + \" \" + U(n.x1.y) + \" m\"), r.push(U(n.x2.x) + \" \" + U(n.x2.y) + \" l\"), r.push(U(n.x4.x) + \" \" + U(n.x4.y) + \" m\"), r.push(U(n.x3.x) + \" \" + U(n.x3.y) + \" l\"), r.push(\"s\"), r.push(\"Q\"), e.stream = r.join(\"\\n\"), e;\n },\n YesPushDown: function YesPushDown(t) {\n var e = V(t);\n e.scope = t.scope;\n var r = At.internal.calculateCross(t),\n n = [];\n return n.push(\"0.749023 g\"), n.push(\"0 0 \" + U(At.internal.getWidth(t)) + \" \" + U(At.internal.getHeight(t)) + \" re\"), n.push(\"f\"), n.push(\"q\"), n.push(\"1 1 \" + U(At.internal.getWidth(t) - 2) + \" \" + U(At.internal.getHeight(t) - 2) + \" re\"), n.push(\"W\"), n.push(\"n\"), n.push(U(r.x1.x) + \" \" + U(r.x1.y) + \" m\"), n.push(U(r.x2.x) + \" \" + U(r.x2.y) + \" l\"), n.push(U(r.x4.x) + \" \" + U(r.x4.y) + \" m\"), n.push(U(r.x3.x) + \" \" + U(r.x3.y) + \" l\"), n.push(\"s\"), n.push(\"Q\"), e.stream = n.join(\"\\n\"), e;\n },\n OffPushDown: function OffPushDown(t) {\n var e = V(t);\n e.scope = t.scope;\n var r = [];\n return r.push(\"0.749023 g\"), r.push(\"0 0 \" + U(At.internal.getWidth(t)) + \" \" + U(At.internal.getHeight(t)) + \" re\"), r.push(\"f\"), e.stream = r.join(\"\\n\"), e;\n }\n }\n },\n createDefaultAppearanceStream: function createDefaultAppearanceStream(t) {\n var e = t.scope.internal.getFont(t.fontName, t.fontStyle).id,\n r = t.scope.__private__.encodeColorString(t.color);\n return \"/\" + e + \" \" + t.fontSize + \" Tf \" + r;\n }\n};\nAt.internal = {\n Bezier_C: .551915024494,\n calculateCross: function calculateCross(t) {\n var e = At.internal.getWidth(t),\n r = At.internal.getHeight(t),\n n = Math.min(e, r);\n return {\n x1: {\n x: (e - n) / 2,\n y: (r - n) / 2 + n\n },\n x2: {\n x: (e - n) / 2 + n,\n y: (r - n) / 2\n },\n x3: {\n x: (e - n) / 2,\n y: (r - n) / 2\n },\n x4: {\n x: (e - n) / 2 + n,\n y: (r - n) / 2 + n\n }\n };\n }\n}, At.internal.getWidth = function (e) {\n var r = 0;\n return \"object\" === t(e) && (r = W(e.Rect[2])), r;\n}, At.internal.getHeight = function (e) {\n var r = 0;\n return \"object\" === t(e) && (r = W(e.Rect[3])), r;\n};\nvar xt = q.addField = function (t) {\n if (at(this, t), !(t instanceof lt)) throw new Error(\"Invalid argument passed to jsPDF.addField.\");\n var e;\n return (e = t).scope.internal.acroformPlugin.printedOut && (e.scope.internal.acroformPlugin.printedOut = !1, e.scope.internal.acroformPlugin.acroFormDictionaryRoot = null), e.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(e), t.page = t.scope.internal.getCurrentPageInfo().pageNumber, this;\n};\nq.AcroFormChoiceField = ft, q.AcroFormListBox = dt, q.AcroFormComboBox = pt, q.AcroFormEditBox = gt, q.AcroFormButton = mt, q.AcroFormPushButton = vt, q.AcroFormRadioButton = bt, q.AcroFormCheckBox = wt, q.AcroFormTextField = Nt, q.AcroFormPasswordField = Lt, q.AcroFormAppearance = At, q.AcroForm = {\n ChoiceField: ft,\n ListBox: dt,\n ComboBox: pt,\n EditBox: gt,\n Button: mt,\n PushButton: vt,\n RadioButton: bt,\n CheckBox: wt,\n TextField: Nt,\n PasswordField: Lt,\n Appearance: At\n}, E.AcroForm = {\n ChoiceField: ft,\n ListBox: dt,\n ComboBox: pt,\n EditBox: gt,\n Button: mt,\n PushButton: vt,\n RadioButton: bt,\n CheckBox: wt,\n TextField: Nt,\n PasswordField: Lt,\n Appearance: At\n};\nvar St = E.AcroForm;\nfunction _t(t) {\n return t.reduce(function (t, e, r) {\n return t[e] = r, t;\n }, {});\n}\n!function (e) {\n e.__addimage__ = {};\n var r = \"UNKNOWN\",\n n = {\n PNG: [[137, 80, 78, 71]],\n TIFF: [[77, 77, 0, 42], [73, 73, 42, 0]],\n JPEG: [[255, 216, 255, 224, void 0, void 0, 74, 70, 73, 70, 0], [255, 216, 255, 225, void 0, void 0, 69, 120, 105, 102, 0, 0], [255, 216, 255, 219], [255, 216, 255, 238]],\n JPEG2000: [[0, 0, 0, 12, 106, 80, 32, 32]],\n GIF87a: [[71, 73, 70, 56, 55, 97]],\n GIF89a: [[71, 73, 70, 56, 57, 97]],\n WEBP: [[82, 73, 70, 70, void 0, void 0, void 0, void 0, 87, 69, 66, 80]],\n BMP: [[66, 77], [66, 65], [67, 73], [67, 80], [73, 67], [80, 84]]\n },\n i = e.__addimage__.getImageFileTypeByImageData = function (t, e) {\n var i,\n a,\n o,\n s,\n c,\n u = r;\n if (\"RGBA\" === (e = e || r) || void 0 !== t.data && t.data instanceof Uint8ClampedArray && \"height\" in t && \"width\" in t) return \"RGBA\";\n if (x(t)) for (c in n) for (o = n[c], i = 0; i < o.length; i += 1) {\n for (s = !0, a = 0; a < o[i].length; a += 1) if (void 0 !== o[i][a] && o[i][a] !== t[a]) {\n s = !1;\n break;\n }\n if (!0 === s) {\n u = c;\n break;\n }\n } else for (c in n) for (o = n[c], i = 0; i < o.length; i += 1) {\n for (s = !0, a = 0; a < o[i].length; a += 1) if (void 0 !== o[i][a] && o[i][a] !== t.charCodeAt(a)) {\n s = !1;\n break;\n }\n if (!0 === s) {\n u = c;\n break;\n }\n }\n return u === r && e !== r && (u = e), u;\n },\n a = function t(e) {\n for (var r = this.internal.write, n = this.internal.putStream, i = (0, this.internal.getFilters)(); -1 !== i.indexOf(\"FlateEncode\");) i.splice(i.indexOf(\"FlateEncode\"), 1);\n e.objectId = this.internal.newObject();\n var a = [];\n if (a.push({\n key: \"Type\",\n value: \"/XObject\"\n }), a.push({\n key: \"Subtype\",\n value: \"/Image\"\n }), a.push({\n key: \"Width\",\n value: e.width\n }), a.push({\n key: \"Height\",\n value: e.height\n }), e.colorSpace === b.INDEXED ? a.push({\n key: \"ColorSpace\",\n value: \"[/Indexed /DeviceRGB \" + (e.palette.length / 3 - 1) + \" \" + (\"sMask\" in e && void 0 !== e.sMask ? e.objectId + 2 : e.objectId + 1) + \" 0 R]\"\n }) : (a.push({\n key: \"ColorSpace\",\n value: \"/\" + e.colorSpace\n }), e.colorSpace === b.DEVICE_CMYK && a.push({\n key: \"Decode\",\n value: \"[1 0 1 0 1 0 1 0]\"\n })), a.push({\n key: \"BitsPerComponent\",\n value: e.bitsPerComponent\n }), \"decodeParameters\" in e && void 0 !== e.decodeParameters && a.push({\n key: \"DecodeParms\",\n value: \"<<\" + e.decodeParameters + \">>\"\n }), \"transparency\" in e && Array.isArray(e.transparency)) {\n for (var o = \"\", s = 0, c = e.transparency.length; s < c; s++) o += e.transparency[s] + \" \" + e.transparency[s] + \" \";\n a.push({\n key: \"Mask\",\n value: \"[\" + o + \"]\"\n });\n }\n void 0 !== e.sMask && a.push({\n key: \"SMask\",\n value: e.objectId + 1 + \" 0 R\"\n });\n var u = void 0 !== e.filter ? [\"/\" + e.filter] : void 0;\n if (n({\n data: e.data,\n additionalKeyValues: a,\n alreadyAppliedFilters: u,\n objectId: e.objectId\n }), r(\"endobj\"), \"sMask\" in e && void 0 !== e.sMask) {\n var h = \"/Predictor \" + e.predictor + \" /Colors 1 /BitsPerComponent \" + e.bitsPerComponent + \" /Columns \" + e.width,\n l = {\n width: e.width,\n height: e.height,\n colorSpace: \"DeviceGray\",\n bitsPerComponent: e.bitsPerComponent,\n decodeParameters: h,\n data: e.sMask\n };\n \"filter\" in e && (l.filter = e.filter), t.call(this, l);\n }\n if (e.colorSpace === b.INDEXED) {\n var f = this.internal.newObject();\n n({\n data: _(new Uint8Array(e.palette)),\n objectId: f\n }), r(\"endobj\");\n }\n },\n o = function o() {\n var t = this.internal.collections.addImage_images;\n for (var e in t) a.call(this, t[e]);\n },\n s = function s() {\n var t,\n e = this.internal.collections.addImage_images,\n r = this.internal.write;\n for (var n in e) r(\"/I\" + (t = e[n]).index, t.objectId, \"0\", \"R\");\n },\n c = function c() {\n this.internal.collections.addImage_images || (this.internal.collections.addImage_images = {}, this.internal.events.subscribe(\"putResources\", o), this.internal.events.subscribe(\"putXobjectDict\", s));\n },\n h = function h() {\n var t = this.internal.collections.addImage_images;\n return c.call(this), t;\n },\n l = function l() {\n return Object.keys(this.internal.collections.addImage_images).length;\n },\n f = function f(t) {\n return \"function\" == typeof e[\"process\" + t.toUpperCase()];\n },\n d = function d(e) {\n return \"object\" === t(e) && 1 === e.nodeType;\n },\n p = function p(t, r) {\n if (\"IMG\" === t.nodeName && t.hasAttribute(\"src\")) {\n var n = \"\" + t.getAttribute(\"src\");\n if (0 === n.indexOf(\"data:image/\")) return u(unescape(n).split(\"base64,\").pop());\n var i = e.loadFile(n, !0);\n if (void 0 !== i) return i;\n }\n if (\"CANVAS\" === t.nodeName) {\n if (0 === t.width || 0 === t.height) throw new Error(\"Given canvas must have data. Canvas width: \" + t.width + \", height: \" + t.height);\n var a;\n switch (r) {\n case \"PNG\":\n a = \"image/png\";\n break;\n case \"WEBP\":\n a = \"image/webp\";\n break;\n case \"JPEG\":\n case \"JPG\":\n default:\n a = \"image/jpeg\";\n }\n return u(t.toDataURL(a, 1).split(\"base64,\").pop());\n }\n },\n g = function g(t) {\n var e = this.internal.collections.addImage_images;\n if (e) for (var r in e) if (t === e[r].alias) return e[r];\n },\n m = function m(t, e, r) {\n return t || e || (t = -96, e = -96), t < 0 && (t = -1 * r.width * 72 / t / this.internal.scaleFactor), e < 0 && (e = -1 * r.height * 72 / e / this.internal.scaleFactor), 0 === t && (t = e * r.width / r.height), 0 === e && (e = t * r.height / r.width), [t, e];\n },\n v = function v(t, e, r, n, i, a) {\n var o = m.call(this, r, n, i),\n s = this.internal.getCoordinateString,\n c = this.internal.getVerticalCoordinateString,\n u = h.call(this);\n if (r = o[0], n = o[1], u[i.index] = i, a) {\n a *= Math.PI / 180;\n var l = Math.cos(a),\n f = Math.sin(a),\n d = function d(t) {\n return t.toFixed(4);\n },\n p = [d(l), d(f), d(-1 * f), d(l), 0, 0, \"cm\"];\n }\n this.internal.write(\"q\"), a ? (this.internal.write([1, \"0\", \"0\", 1, s(t), c(e + n), \"cm\"].join(\" \")), this.internal.write(p.join(\" \")), this.internal.write([s(r), \"0\", \"0\", s(n), \"0\", \"0\", \"cm\"].join(\" \"))) : this.internal.write([s(r), \"0\", \"0\", s(n), s(t), c(e + n), \"cm\"].join(\" \")), this.isAdvancedAPI() && this.internal.write([1, 0, 0, -1, 0, 0, \"cm\"].join(\" \")), this.internal.write(\"/I\" + i.index + \" Do\"), this.internal.write(\"Q\");\n },\n b = e.color_spaces = {\n DEVICE_RGB: \"DeviceRGB\",\n DEVICE_GRAY: \"DeviceGray\",\n DEVICE_CMYK: \"DeviceCMYK\",\n CAL_GREY: \"CalGray\",\n CAL_RGB: \"CalRGB\",\n LAB: \"Lab\",\n ICC_BASED: \"ICCBased\",\n INDEXED: \"Indexed\",\n PATTERN: \"Pattern\",\n SEPARATION: \"Separation\",\n DEVICE_N: \"DeviceN\"\n };\n e.decode = {\n DCT_DECODE: \"DCTDecode\",\n FLATE_DECODE: \"FlateDecode\",\n LZW_DECODE: \"LZWDecode\",\n JPX_DECODE: \"JPXDecode\",\n JBIG2_DECODE: \"JBIG2Decode\",\n ASCII85_DECODE: \"ASCII85Decode\",\n ASCII_HEX_DECODE: \"ASCIIHexDecode\",\n RUN_LENGTH_DECODE: \"RunLengthDecode\",\n CCITT_FAX_DECODE: \"CCITTFaxDecode\"\n };\n var y = e.image_compression = {\n NONE: \"NONE\",\n FAST: \"FAST\",\n MEDIUM: \"MEDIUM\",\n SLOW: \"SLOW\"\n },\n w = e.__addimage__.sHashCode = function (t) {\n var e,\n r,\n n = 0;\n if (\"string\" == typeof t) for (r = t.length, e = 0; e < r; e++) n = (n << 5) - n + t.charCodeAt(e), n |= 0;else if (x(t)) for (r = t.byteLength / 2, e = 0; e < r; e++) n = (n << 5) - n + t[e], n |= 0;\n return n;\n },\n N = e.__addimage__.validateStringAsBase64 = function (t) {\n (t = t || \"\").toString().trim();\n var e = !0;\n return 0 === t.length && (e = !1), t.length % 4 != 0 && (e = !1), !1 === /^[A-Za-z0-9+/]+$/.test(t.substr(0, t.length - 2)) && (e = !1), !1 === /^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(t.substr(-2)) && (e = !1), e;\n },\n L = e.__addimage__.extractImageFromDataUrl = function (t) {\n var e = (t = t || \"\").split(\"base64,\"),\n r = null;\n if (2 === e.length) {\n var n = /^data:(\\w*\\/\\w*);*(charset=(?!charset=)[\\w=-]*)*;*$/.exec(e[0]);\n Array.isArray(n) && (r = {\n mimeType: n[1],\n charset: n[2],\n data: e[1]\n });\n }\n return r;\n },\n A = e.__addimage__.supportsArrayBuffer = function () {\n return \"undefined\" != typeof ArrayBuffer && \"undefined\" != typeof Uint8Array;\n };\n e.__addimage__.isArrayBuffer = function (t) {\n return A() && t instanceof ArrayBuffer;\n };\n var x = e.__addimage__.isArrayBufferView = function (t) {\n return A() && \"undefined\" != typeof Uint32Array && (t instanceof Int8Array || t instanceof Uint8Array || \"undefined\" != typeof Uint8ClampedArray && t instanceof Uint8ClampedArray || t instanceof Int16Array || t instanceof Uint16Array || t instanceof Int32Array || t instanceof Uint32Array || t instanceof Float32Array || t instanceof Float64Array);\n },\n S = e.__addimage__.binaryStringToUint8Array = function (t) {\n for (var e = t.length, r = new Uint8Array(e), n = 0; n < e; n++) r[n] = t.charCodeAt(n);\n return r;\n },\n _ = e.__addimage__.arrayBufferToBinaryString = function (t) {\n for (var e = \"\", r = x(t) ? t : new Uint8Array(t), n = 0; n < r.length; n += 8192) e += String.fromCharCode.apply(null, r.subarray(n, n + 8192));\n return e;\n };\n e.addImage = function () {\n var e, n, i, a, o, s, u, h, l;\n if (\"number\" == typeof arguments[1] ? (n = r, i = arguments[1], a = arguments[2], o = arguments[3], s = arguments[4], u = arguments[5], h = arguments[6], l = arguments[7]) : (n = arguments[1], i = arguments[2], a = arguments[3], o = arguments[4], s = arguments[5], u = arguments[6], h = arguments[7], l = arguments[8]), \"object\" === t(e = arguments[0]) && !d(e) && \"imageData\" in e) {\n var f = e;\n e = f.imageData, n = f.format || n || r, i = f.x || i || 0, a = f.y || a || 0, o = f.w || f.width || o, s = f.h || f.height || s, u = f.alias || u, h = f.compression || h, l = f.rotation || f.angle || l;\n }\n var p = this.internal.getFilters();\n if (void 0 === h && -1 !== p.indexOf(\"FlateEncode\") && (h = \"SLOW\"), isNaN(i) || isNaN(a)) throw new Error(\"Invalid coordinates passed to jsPDF.addImage\");\n c.call(this);\n var g = P.call(this, e, n, u, h);\n return v.call(this, i, a, o, s, g, l), this;\n };\n var P = function P(t, n, a, o) {\n var s, c, u;\n if (\"string\" == typeof t && i(t) === r) {\n t = unescape(t);\n var h = k(t, !1);\n (\"\" !== h || void 0 !== (h = e.loadFile(t, !0))) && (t = h);\n }\n if (d(t) && (t = p(t, n)), n = i(t, n), !f(n)) throw new Error(\"addImage does not support files of type '\" + n + \"', please ensure that a plugin for '\" + n + \"' support is added.\");\n if ((null == (u = a) || 0 === u.length) && (a = function (t) {\n return \"string\" == typeof t || x(t) ? w(t) : x(t.data) ? w(t.data) : null;\n }(t)), (s = g.call(this, a)) || (A() && (t instanceof Uint8Array || \"RGBA\" === n || (c = t, t = S(t))), s = this[\"process\" + n.toUpperCase()](t, l.call(this), a, function (t) {\n return t && \"string\" == typeof t && (t = t.toUpperCase()), t in e.image_compression ? t : y.NONE;\n }(o), c)), !s) throw new Error(\"An unknown error occurred whilst processing the image.\");\n return s;\n },\n k = e.__addimage__.convertBase64ToBinaryString = function (t, e) {\n var r;\n e = \"boolean\" != typeof e || e;\n var n,\n i = \"\";\n if (\"string\" == typeof t) {\n n = null !== (r = L(t)) ? r.data : t;\n try {\n i = u(n);\n } catch (t) {\n if (e) throw N(n) ? new Error(\"atob-Error in jsPDF.convertBase64ToBinaryString \" + t.message) : new Error(\"Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString \");\n }\n }\n return i;\n };\n e.getImageProperties = function (t) {\n var n,\n a,\n o = \"\";\n if (d(t) && (t = p(t)), \"string\" == typeof t && i(t) === r && (\"\" === (o = k(t, !1)) && (o = e.loadFile(t) || \"\"), t = o), a = i(t), !f(a)) throw new Error(\"addImage does not support files of type '\" + a + \"', please ensure that a plugin for '\" + a + \"' support is added.\");\n if (!A() || t instanceof Uint8Array || (t = S(t)), !(n = this[\"process\" + a.toUpperCase()](t))) throw new Error(\"An unknown error occurred whilst processing the image\");\n return n.fileType = a, n;\n };\n}(E.API),\n/**\n * @license\n * Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\nfunction (t) {\n var e = function e(t) {\n if (void 0 !== t && \"\" != t) return !0;\n };\n E.API.events.push([\"addPage\", function (t) {\n this.internal.getPageInfo(t.pageNumber).pageContext.annotations = [];\n }]), t.events.push([\"putPage\", function (t) {\n for (var r, n, i, a = this.internal.getCoordinateString, o = this.internal.getVerticalCoordinateString, s = this.internal.getPageInfoByObjId(t.objId), c = t.pageContext.annotations, u = !1, h = 0; h < c.length && !u; h++) switch ((r = c[h]).type) {\n case \"link\":\n (e(r.options.url) || e(r.options.pageNumber)) && (u = !0);\n break;\n case \"reference\":\n case \"text\":\n case \"freetext\":\n u = !0;\n }\n if (0 != u) {\n this.internal.write(\"/Annots [\");\n for (var l = 0; l < c.length; l++) {\n r = c[l];\n var f = this.internal.pdfEscape,\n d = this.internal.getEncryptor(t.objId);\n switch (r.type) {\n case \"reference\":\n this.internal.write(\" \" + r.object.objId + \" 0 R \");\n break;\n case \"text\":\n var p = this.internal.newAdditionalObject(),\n g = this.internal.newAdditionalObject(),\n m = this.internal.getEncryptor(p.objId),\n v = r.title || \"Note\";\n i = \"<>\", p.content = i;\n var b = p.objId + \" 0 R\";\n i = \"<>\", g.content = i, this.internal.write(p.objId, \"0 R\", g.objId, \"0 R\");\n break;\n case \"freetext\":\n n = \"/Rect [\" + a(r.bounds.x) + \" \" + o(r.bounds.y) + \" \" + a(r.bounds.x + r.bounds.w) + \" \" + o(r.bounds.y + r.bounds.h) + \"] \";\n var y = r.color || \"#000000\";\n i = \"<>\", this.internal.write(i);\n break;\n case \"link\":\n if (r.options.name) {\n var w = this.annotations._nameMap[r.options.name];\n r.options.pageNumber = w.page, r.options.top = w.y;\n } else r.options.top || (r.options.top = 0);\n if (n = \"/Rect [\" + r.finalBounds.x + \" \" + r.finalBounds.y + \" \" + r.finalBounds.w + \" \" + r.finalBounds.h + \"] \", i = \"\", r.options.url) i = \"<>\";else if (r.options.pageNumber) {\n switch (i = \"<>\", this.internal.write(i));\n }\n }\n this.internal.write(\"]\");\n }\n }]), t.createAnnotation = function (t) {\n var e = this.internal.getCurrentPageInfo();\n switch (t.type) {\n case \"link\":\n this.link(t.bounds.x, t.bounds.y, t.bounds.w, t.bounds.h, t);\n break;\n case \"text\":\n case \"freetext\":\n e.pageContext.annotations.push(t);\n }\n }, t.link = function (t, e, r, n, i) {\n var a = this.internal.getCurrentPageInfo(),\n o = this.internal.getCoordinateString,\n s = this.internal.getVerticalCoordinateString;\n a.pageContext.annotations.push({\n finalBounds: {\n x: o(t),\n y: s(e),\n w: o(t + r),\n h: s(e + n)\n },\n options: i,\n type: \"link\"\n });\n }, t.textWithLink = function (t, e, r, n) {\n var i,\n a,\n o = this.getTextWidth(t),\n s = this.internal.getLineHeight() / this.internal.scaleFactor;\n if (void 0 !== n.maxWidth) {\n a = n.maxWidth;\n var c = this.splitTextToSize(t, a).length;\n i = Math.ceil(s * c);\n } else a = o, i = s;\n return this.text(t, e, r, n), r += .2 * s, \"center\" === n.align && (e -= o / 2), \"right\" === n.align && (e -= o), this.link(e, r - s, a, i, n), o;\n }, t.getTextWidth = function (t) {\n var e = this.internal.getFontSize();\n return this.getStringUnitWidth(t) * e / this.internal.scaleFactor;\n };\n}(E.API),\n/**\n * @license\n * Copyright (c) 2017 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\nfunction (t) {\n var e = {\n 1569: [65152],\n 1570: [65153, 65154],\n 1571: [65155, 65156],\n 1572: [65157, 65158],\n 1573: [65159, 65160],\n 1574: [65161, 65162, 65163, 65164],\n 1575: [65165, 65166],\n 1576: [65167, 65168, 65169, 65170],\n 1577: [65171, 65172],\n 1578: [65173, 65174, 65175, 65176],\n 1579: [65177, 65178, 65179, 65180],\n 1580: [65181, 65182, 65183, 65184],\n 1581: [65185, 65186, 65187, 65188],\n 1582: [65189, 65190, 65191, 65192],\n 1583: [65193, 65194],\n 1584: [65195, 65196],\n 1585: [65197, 65198],\n 1586: [65199, 65200],\n 1587: [65201, 65202, 65203, 65204],\n 1588: [65205, 65206, 65207, 65208],\n 1589: [65209, 65210, 65211, 65212],\n 1590: [65213, 65214, 65215, 65216],\n 1591: [65217, 65218, 65219, 65220],\n 1592: [65221, 65222, 65223, 65224],\n 1593: [65225, 65226, 65227, 65228],\n 1594: [65229, 65230, 65231, 65232],\n 1601: [65233, 65234, 65235, 65236],\n 1602: [65237, 65238, 65239, 65240],\n 1603: [65241, 65242, 65243, 65244],\n 1604: [65245, 65246, 65247, 65248],\n 1605: [65249, 65250, 65251, 65252],\n 1606: [65253, 65254, 65255, 65256],\n 1607: [65257, 65258, 65259, 65260],\n 1608: [65261, 65262],\n 1609: [65263, 65264, 64488, 64489],\n 1610: [65265, 65266, 65267, 65268],\n 1649: [64336, 64337],\n 1655: [64477],\n 1657: [64358, 64359, 64360, 64361],\n 1658: [64350, 64351, 64352, 64353],\n 1659: [64338, 64339, 64340, 64341],\n 1662: [64342, 64343, 64344, 64345],\n 1663: [64354, 64355, 64356, 64357],\n 1664: [64346, 64347, 64348, 64349],\n 1667: [64374, 64375, 64376, 64377],\n 1668: [64370, 64371, 64372, 64373],\n 1670: [64378, 64379, 64380, 64381],\n 1671: [64382, 64383, 64384, 64385],\n 1672: [64392, 64393],\n 1676: [64388, 64389],\n 1677: [64386, 64387],\n 1678: [64390, 64391],\n 1681: [64396, 64397],\n 1688: [64394, 64395],\n 1700: [64362, 64363, 64364, 64365],\n 1702: [64366, 64367, 64368, 64369],\n 1705: [64398, 64399, 64400, 64401],\n 1709: [64467, 64468, 64469, 64470],\n 1711: [64402, 64403, 64404, 64405],\n 1713: [64410, 64411, 64412, 64413],\n 1715: [64406, 64407, 64408, 64409],\n 1722: [64414, 64415],\n 1723: [64416, 64417, 64418, 64419],\n 1726: [64426, 64427, 64428, 64429],\n 1728: [64420, 64421],\n 1729: [64422, 64423, 64424, 64425],\n 1733: [64480, 64481],\n 1734: [64473, 64474],\n 1735: [64471, 64472],\n 1736: [64475, 64476],\n 1737: [64482, 64483],\n 1739: [64478, 64479],\n 1740: [64508, 64509, 64510, 64511],\n 1744: [64484, 64485, 64486, 64487],\n 1746: [64430, 64431],\n 1747: [64432, 64433]\n },\n r = {\n 65247: {\n 65154: 65269,\n 65156: 65271,\n 65160: 65273,\n 65166: 65275\n },\n 65248: {\n 65154: 65270,\n 65156: 65272,\n 65160: 65274,\n 65166: 65276\n },\n 65165: {\n 65247: {\n 65248: {\n 65258: 65010\n }\n }\n },\n 1617: {\n 1612: 64606,\n 1613: 64607,\n 1614: 64608,\n 1615: 64609,\n 1616: 64610\n }\n },\n n = {\n 1612: 64606,\n 1613: 64607,\n 1614: 64608,\n 1615: 64609,\n 1616: 64610\n },\n i = [1570, 1571, 1573, 1575];\n t.__arabicParser__ = {};\n var a = t.__arabicParser__.isInArabicSubstitutionA = function (t) {\n return void 0 !== e[t.charCodeAt(0)];\n },\n o = t.__arabicParser__.isArabicLetter = function (t) {\n return \"string\" == typeof t && /^[\\u0600-\\u06FF\\u0750-\\u077F\\u08A0-\\u08FF\\uFB50-\\uFDFF\\uFE70-\\uFEFF]+$/.test(t);\n },\n s = t.__arabicParser__.isArabicEndLetter = function (t) {\n return o(t) && a(t) && e[t.charCodeAt(0)].length <= 2;\n },\n c = t.__arabicParser__.isArabicAlfLetter = function (t) {\n return o(t) && i.indexOf(t.charCodeAt(0)) >= 0;\n };\n t.__arabicParser__.arabicLetterHasIsolatedForm = function (t) {\n return o(t) && a(t) && e[t.charCodeAt(0)].length >= 1;\n };\n var u = t.__arabicParser__.arabicLetterHasFinalForm = function (t) {\n return o(t) && a(t) && e[t.charCodeAt(0)].length >= 2;\n };\n t.__arabicParser__.arabicLetterHasInitialForm = function (t) {\n return o(t) && a(t) && e[t.charCodeAt(0)].length >= 3;\n };\n var h = t.__arabicParser__.arabicLetterHasMedialForm = function (t) {\n return o(t) && a(t) && 4 == e[t.charCodeAt(0)].length;\n },\n l = t.__arabicParser__.resolveLigatures = function (t) {\n var e = 0,\n n = r,\n i = \"\",\n a = 0;\n for (e = 0; e < t.length; e += 1) void 0 !== n[t.charCodeAt(e)] ? (a++, \"number\" == typeof (n = n[t.charCodeAt(e)]) && (i += String.fromCharCode(n), n = r, a = 0), e === t.length - 1 && (n = r, i += t.charAt(e - (a - 1)), e -= a - 1, a = 0)) : (n = r, i += t.charAt(e - a), e -= a, a = 0);\n return i;\n };\n t.__arabicParser__.isArabicDiacritic = function (t) {\n return void 0 !== t && void 0 !== n[t.charCodeAt(0)];\n };\n var f = t.__arabicParser__.getCorrectForm = function (t, e, r) {\n return o(t) ? !1 === a(t) ? -1 : !u(t) || !o(e) && !o(r) || !o(r) && s(e) || s(t) && !o(e) || s(t) && c(e) || s(t) && s(e) ? 0 : h(t) && o(e) && !s(e) && o(r) && u(r) ? 3 : s(t) || !o(r) ? 1 : 2 : -1;\n },\n d = function d(t) {\n var r = 0,\n n = 0,\n i = 0,\n a = \"\",\n s = \"\",\n c = \"\",\n u = (t = t || \"\").split(\"\\\\s+\"),\n h = [];\n for (r = 0; r < u.length; r += 1) {\n for (h.push(\"\"), n = 0; n < u[r].length; n += 1) a = u[r][n], s = u[r][n - 1], c = u[r][n + 1], o(a) ? (i = f(a, s, c), h[r] += -1 !== i ? String.fromCharCode(e[a.charCodeAt(0)][i]) : a) : h[r] += a;\n h[r] = l(h[r]);\n }\n return h.join(\" \");\n },\n p = t.__arabicParser__.processArabic = t.processArabic = function () {\n var t,\n e = \"string\" == typeof arguments[0] ? arguments[0] : arguments[0].text,\n r = [];\n if (Array.isArray(e)) {\n var n = 0;\n for (r = [], n = 0; n < e.length; n += 1) Array.isArray(e[n]) ? r.push([d(e[n][0]), e[n][1], e[n][2]]) : r.push([d(e[n])]);\n t = r;\n } else t = d(e);\n return \"string\" == typeof arguments[0] ? t : (arguments[0].text = t, arguments[0]);\n };\n t.events.push([\"preProcessText\", p]);\n}(E.API), E.API.autoPrint = function (t) {\n var e;\n switch ((t = t || {}).variant = t.variant || \"non-conform\", t.variant) {\n case \"javascript\":\n this.addJS(\"print({});\");\n break;\n case \"non-conform\":\n default:\n this.internal.events.subscribe(\"postPutResources\", function () {\n e = this.internal.newObject(), this.internal.out(\"<<\"), this.internal.out(\"/S /Named\"), this.internal.out(\"/Type /Action\"), this.internal.out(\"/N /Print\"), this.internal.out(\">>\"), this.internal.out(\"endobj\");\n }), this.internal.events.subscribe(\"putCatalog\", function () {\n this.internal.out(\"/OpenAction \" + e + \" 0 R\");\n });\n }\n return this;\n},\n/**\n * @license\n * Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\nfunction (t) {\n var e = function e() {\n var t = void 0;\n Object.defineProperty(this, \"pdf\", {\n get: function get() {\n return t;\n },\n set: function set(e) {\n t = e;\n }\n });\n var e = 150;\n Object.defineProperty(this, \"width\", {\n get: function get() {\n return e;\n },\n set: function set(t) {\n e = isNaN(t) || !1 === Number.isInteger(t) || t < 0 ? 150 : t, this.getContext(\"2d\").pageWrapXEnabled && (this.getContext(\"2d\").pageWrapX = e + 1);\n }\n });\n var r = 300;\n Object.defineProperty(this, \"height\", {\n get: function get() {\n return r;\n },\n set: function set(t) {\n r = isNaN(t) || !1 === Number.isInteger(t) || t < 0 ? 300 : t, this.getContext(\"2d\").pageWrapYEnabled && (this.getContext(\"2d\").pageWrapY = r + 1);\n }\n });\n var n = [];\n Object.defineProperty(this, \"childNodes\", {\n get: function get() {\n return n;\n },\n set: function set(t) {\n n = t;\n }\n });\n var i = {};\n Object.defineProperty(this, \"style\", {\n get: function get() {\n return i;\n },\n set: function set(t) {\n i = t;\n }\n }), Object.defineProperty(this, \"parentNode\", {});\n };\n e.prototype.getContext = function (t, e) {\n var r;\n if (\"2d\" !== (t = t || \"2d\")) return null;\n for (r in e) this.pdf.context2d.hasOwnProperty(r) && (this.pdf.context2d[r] = e[r]);\n return this.pdf.context2d._canvas = this, this.pdf.context2d;\n }, e.prototype.toDataURL = function () {\n throw new Error(\"toDataURL is not implemented.\");\n }, t.events.push([\"initialized\", function () {\n this.canvas = new e(), this.canvas.pdf = this;\n }]);\n}(E.API), function (e) {\n var r = {\n left: 0,\n top: 0,\n bottom: 0,\n right: 0\n },\n n = !1,\n i = function i() {\n void 0 === this.internal.__cell__ && (this.internal.__cell__ = {}, this.internal.__cell__.padding = 3, this.internal.__cell__.headerFunction = void 0, this.internal.__cell__.margins = Object.assign({}, r), this.internal.__cell__.margins.width = this.getPageWidth(), a.call(this));\n },\n a = function a() {\n this.internal.__cell__.lastCell = new o(), this.internal.__cell__.pages = 1;\n },\n o = function o() {\n var t = arguments[0];\n Object.defineProperty(this, \"x\", {\n enumerable: !0,\n get: function get() {\n return t;\n },\n set: function set(e) {\n t = e;\n }\n });\n var e = arguments[1];\n Object.defineProperty(this, \"y\", {\n enumerable: !0,\n get: function get() {\n return e;\n },\n set: function set(t) {\n e = t;\n }\n });\n var r = arguments[2];\n Object.defineProperty(this, \"width\", {\n enumerable: !0,\n get: function get() {\n return r;\n },\n set: function set(t) {\n r = t;\n }\n });\n var n = arguments[3];\n Object.defineProperty(this, \"height\", {\n enumerable: !0,\n get: function get() {\n return n;\n },\n set: function set(t) {\n n = t;\n }\n });\n var i = arguments[4];\n Object.defineProperty(this, \"text\", {\n enumerable: !0,\n get: function get() {\n return i;\n },\n set: function set(t) {\n i = t;\n }\n });\n var a = arguments[5];\n Object.defineProperty(this, \"lineNumber\", {\n enumerable: !0,\n get: function get() {\n return a;\n },\n set: function set(t) {\n a = t;\n }\n });\n var o = arguments[6];\n return Object.defineProperty(this, \"align\", {\n enumerable: !0,\n get: function get() {\n return o;\n },\n set: function set(t) {\n o = t;\n }\n }), this;\n };\n o.prototype.clone = function () {\n return new o(this.x, this.y, this.width, this.height, this.text, this.lineNumber, this.align);\n }, o.prototype.toArray = function () {\n return [this.x, this.y, this.width, this.height, this.text, this.lineNumber, this.align];\n }, e.setHeaderFunction = function (t) {\n return i.call(this), this.internal.__cell__.headerFunction = \"function\" == typeof t ? t : void 0, this;\n }, e.getTextDimensions = function (t, e) {\n i.call(this);\n var r = (e = e || {}).fontSize || this.getFontSize(),\n n = e.font || this.getFont(),\n a = e.scaleFactor || this.internal.scaleFactor,\n o = 0,\n s = 0,\n c = 0,\n u = this;\n if (!Array.isArray(t) && \"string\" != typeof t) {\n if (\"number\" != typeof t) throw new Error(\"getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.\");\n t = String(t);\n }\n var h = e.maxWidth;\n h > 0 ? \"string\" == typeof t ? t = this.splitTextToSize(t, h) : \"[object Array]\" === Object.prototype.toString.call(t) && (t = t.reduce(function (t, e) {\n return t.concat(u.splitTextToSize(e, h));\n }, [])) : t = Array.isArray(t) ? t : [t];\n for (var l = 0; l < t.length; l++) o < (c = this.getStringUnitWidth(t[l], {\n font: n\n }) * r) && (o = c);\n return 0 !== o && (s = t.length), {\n w: o /= a,\n h: Math.max((s * r * this.getLineHeightFactor() - r * (this.getLineHeightFactor() - 1)) / a, 0)\n };\n }, e.cellAddPage = function () {\n i.call(this), this.addPage();\n var t = this.internal.__cell__.margins || r;\n return this.internal.__cell__.lastCell = new o(t.left, t.top, void 0, void 0), this.internal.__cell__.pages += 1, this;\n };\n var s = e.cell = function () {\n var t;\n t = arguments[0] instanceof o ? arguments[0] : new o(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]), i.call(this);\n var e = this.internal.__cell__.lastCell,\n a = this.internal.__cell__.padding,\n s = this.internal.__cell__.margins || r,\n c = this.internal.__cell__.tableHeaderRow,\n u = this.internal.__cell__.printHeaders;\n return void 0 !== e.lineNumber && (e.lineNumber === t.lineNumber ? (t.x = (e.x || 0) + (e.width || 0), t.y = e.y || 0) : e.y + e.height + t.height + s.bottom > this.getPageHeight() ? (this.cellAddPage(), t.y = s.top, u && c && (this.printHeaderRow(t.lineNumber, !0), t.y += c[0].height)) : t.y = e.y + e.height || t.y), void 0 !== t.text[0] && (this.rect(t.x, t.y, t.width, t.height, !0 === n ? \"FD\" : void 0), \"right\" === t.align ? this.text(t.text, t.x + t.width - a, t.y + a, {\n align: \"right\",\n baseline: \"top\"\n }) : \"center\" === t.align ? this.text(t.text, t.x + t.width / 2, t.y + a, {\n align: \"center\",\n baseline: \"top\",\n maxWidth: t.width - a - a\n }) : this.text(t.text, t.x + a, t.y + a, {\n align: \"left\",\n baseline: \"top\",\n maxWidth: t.width - a - a\n })), this.internal.__cell__.lastCell = t, this;\n };\n e.table = function (e, n, u, h, l) {\n if (i.call(this), !u) throw new Error(\"No data for PDF table.\");\n var f,\n d,\n p,\n g,\n m = [],\n v = [],\n b = [],\n y = {},\n w = {},\n N = [],\n L = [],\n A = (l = l || {}).autoSize || !1,\n x = !1 !== l.printHeaders,\n S = l.css && void 0 !== l.css[\"font-size\"] ? 16 * l.css[\"font-size\"] : l.fontSize || 12,\n _ = l.margins || Object.assign({\n width: this.getPageWidth()\n }, r),\n P = \"number\" == typeof l.padding ? l.padding : 3,\n k = l.headerBackgroundColor || \"#c8c8c8\",\n I = l.headerTextColor || \"#000\";\n if (a.call(this), this.internal.__cell__.printHeaders = x, this.internal.__cell__.margins = _, this.internal.__cell__.table_font_size = S, this.internal.__cell__.padding = P, this.internal.__cell__.headerBackgroundColor = k, this.internal.__cell__.headerTextColor = I, this.setFontSize(S), null == h) v = m = Object.keys(u[0]), b = m.map(function () {\n return \"left\";\n });else if (Array.isArray(h) && \"object\" === t(h[0])) for (m = h.map(function (t) {\n return t.name;\n }), v = h.map(function (t) {\n return t.prompt || t.name || \"\";\n }), b = h.map(function (t) {\n return t.align || \"left\";\n }), f = 0; f < h.length; f += 1) w[h[f].name] = h[f].width * (19.049976 / 25.4);else Array.isArray(h) && \"string\" == typeof h[0] && (v = m = h, b = m.map(function () {\n return \"left\";\n }));\n if (A || Array.isArray(h) && \"string\" == typeof h[0]) for (f = 0; f < m.length; f += 1) {\n for (y[g = m[f]] = u.map(function (t) {\n return t[g];\n }), this.setFont(void 0, \"bold\"), N.push(this.getTextDimensions(v[f], {\n fontSize: this.internal.__cell__.table_font_size,\n scaleFactor: this.internal.scaleFactor\n }).w), d = y[g], this.setFont(void 0, \"normal\"), p = 0; p < d.length; p += 1) N.push(this.getTextDimensions(d[p], {\n fontSize: this.internal.__cell__.table_font_size,\n scaleFactor: this.internal.scaleFactor\n }).w);\n w[g] = Math.max.apply(null, N) + P + P, N = [];\n }\n if (x) {\n var F = {};\n for (f = 0; f < m.length; f += 1) F[m[f]] = {}, F[m[f]].text = v[f], F[m[f]].align = b[f];\n var C = c.call(this, F, w);\n L = m.map(function (t) {\n return new o(e, n, w[t], C, F[t].text, void 0, F[t].align);\n }), this.setTableHeaderRow(L), this.printHeaderRow(1, !1);\n }\n var j = h.reduce(function (t, e) {\n return t[e.name] = e.align, t;\n }, {});\n for (f = 0; f < u.length; f += 1) {\n \"rowStart\" in l && l.rowStart instanceof Function && l.rowStart({\n row: f,\n data: u[f]\n }, this);\n var O = c.call(this, u[f], w);\n for (p = 0; p < m.length; p += 1) {\n var B = u[f][m[p]];\n \"cellStart\" in l && l.cellStart instanceof Function && l.cellStart({\n row: f,\n col: p,\n data: B\n }, this), s.call(this, new o(e, n, w[m[p]], O, B, f + 2, j[m[p]]));\n }\n }\n return this.internal.__cell__.table_x = e, this.internal.__cell__.table_y = n, this;\n };\n var c = function c(t, e) {\n var r = this.internal.__cell__.padding,\n n = this.internal.__cell__.table_font_size,\n i = this.internal.scaleFactor;\n return Object.keys(t).map(function (n) {\n var i = t[n];\n return this.splitTextToSize(i.hasOwnProperty(\"text\") ? i.text : i, e[n] - r - r);\n }, this).map(function (t) {\n return this.getLineHeightFactor() * t.length * n / i + r + r;\n }, this).reduce(function (t, e) {\n return Math.max(t, e);\n }, 0);\n };\n e.setTableHeaderRow = function (t) {\n i.call(this), this.internal.__cell__.tableHeaderRow = t;\n }, e.printHeaderRow = function (t, e) {\n if (i.call(this), !this.internal.__cell__.tableHeaderRow) throw new Error(\"Property tableHeaderRow does not exist.\");\n var r;\n if (n = !0, \"function\" == typeof this.internal.__cell__.headerFunction) {\n var a = this.internal.__cell__.headerFunction(this, this.internal.__cell__.pages);\n this.internal.__cell__.lastCell = new o(a[0], a[1], a[2], a[3], void 0, -1);\n }\n this.setFont(void 0, \"bold\");\n for (var c = [], u = 0; u < this.internal.__cell__.tableHeaderRow.length; u += 1) {\n r = this.internal.__cell__.tableHeaderRow[u].clone(), e && (r.y = this.internal.__cell__.margins.top || 0, c.push(r)), r.lineNumber = t;\n var h = this.getTextColor();\n this.setTextColor(this.internal.__cell__.headerTextColor), this.setFillColor(this.internal.__cell__.headerBackgroundColor), s.call(this, r), this.setTextColor(h);\n }\n c.length > 0 && this.setTableHeaderRow(c), this.setFont(void 0, \"normal\"), n = !1;\n };\n}(E.API);\nvar Pt = {\n italic: [\"italic\", \"oblique\", \"normal\"],\n oblique: [\"oblique\", \"italic\", \"normal\"],\n normal: [\"normal\", \"oblique\", \"italic\"]\n },\n kt = [\"ultra-condensed\", \"extra-condensed\", \"condensed\", \"semi-condensed\", \"normal\", \"semi-expanded\", \"expanded\", \"extra-expanded\", \"ultra-expanded\"],\n It = _t(kt),\n Ft = [100, 200, 300, 400, 500, 600, 700, 800, 900],\n Ct = _t(Ft);\nfunction jt(t) {\n var e = t.family.replace(/\"|'/g, \"\").toLowerCase(),\n r = function (t) {\n return Pt[t = t || \"normal\"] ? t : \"normal\";\n }(t.style),\n n = function (t) {\n if (!t) return 400;\n if (\"number\" == typeof t) return t >= 100 && t <= 900 && t % 100 == 0 ? t : 400;\n if (/^\\d00$/.test(t)) return parseInt(t);\n switch (t) {\n case \"bold\":\n return 700;\n case \"normal\":\n default:\n return 400;\n }\n }(t.weight),\n i = function (t) {\n return \"number\" == typeof It[t = t || \"normal\"] ? t : \"normal\";\n }(t.stretch);\n return {\n family: e,\n style: r,\n weight: n,\n stretch: i,\n src: t.src || [],\n ref: t.ref || {\n name: e,\n style: [i, r, n].join(\" \")\n }\n };\n}\nfunction Ot(t, e, r, n) {\n var i;\n for (i = r; i >= 0 && i < e.length; i += n) if (t[e[i]]) return t[e[i]];\n for (i = r; i >= 0 && i < e.length; i -= n) if (t[e[i]]) return t[e[i]];\n}\nvar Bt = {\n \"sans-serif\": \"helvetica\",\n fixed: \"courier\",\n monospace: \"courier\",\n terminal: \"courier\",\n cursive: \"times\",\n fantasy: \"times\",\n serif: \"times\"\n },\n Mt = {\n caption: \"times\",\n icon: \"times\",\n menu: \"times\",\n \"message-box\": \"times\",\n \"small-caption\": \"times\",\n \"status-bar\": \"times\"\n };\nfunction Et(t) {\n return [t.stretch, t.style, t.weight, t.family].join(\" \");\n}\nfunction qt(t, e, r) {\n for (var n = (r = r || {}).defaultFontFamily || \"times\", i = Object.assign({}, Bt, r.genericFontFamilies || {}), a = null, o = null, s = 0; s < e.length; ++s) if (i[(a = jt(e[s])).family] && (a.family = i[a.family]), t.hasOwnProperty(a.family)) {\n o = t[a.family];\n break;\n }\n if (!(o = o || t[n])) throw new Error(\"Could not find a font-family for the rule '\" + Et(a) + \"' and default family '\" + n + \"'.\");\n if (o = function (t, e) {\n if (e[t]) return e[t];\n var r = It[t],\n n = r <= It.normal ? -1 : 1,\n i = Ot(e, kt, r, n);\n if (!i) throw new Error(\"Could not find a matching font-stretch value for \" + t);\n return i;\n }(a.stretch, o), o = function (t, e) {\n if (e[t]) return e[t];\n for (var r = Pt[t], n = 0; n < r.length; ++n) if (e[r[n]]) return e[r[n]];\n throw new Error(\"Could not find a matching font-style for \" + t);\n }(a.style, o), !(o = function (t, e) {\n if (e[t]) return e[t];\n if (400 === t && e[500]) return e[500];\n if (500 === t && e[400]) return e[400];\n var r = Ct[t],\n n = Ot(e, Ft, r, t < 400 ? -1 : 1);\n if (!n) throw new Error(\"Could not find a matching font-weight for value \" + t);\n return n;\n }(a.weight, o))) throw new Error(\"Failed to resolve a font for the rule '\" + Et(a) + \"'.\");\n return o;\n}\nfunction Dt(t) {\n return t.trimLeft();\n}\nfunction Rt(t, e) {\n for (var r = 0; r < t.length;) {\n if (t.charAt(r) === e) return [t.substring(0, r), t.substring(r + 1)];\n r += 1;\n }\n return null;\n}\nfunction Tt(t) {\n var e = t.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);\n return null === e ? null : [e[0], t.substring(e[0].length)];\n}\nvar Ut,\n zt,\n Ht,\n Wt = [\"times\"];\n!function (e) {\n var r,\n n,\n i,\n o,\n s,\n c,\n u,\n h,\n l,\n d = function d(t) {\n return t = t || {}, this.isStrokeTransparent = t.isStrokeTransparent || !1, this.strokeOpacity = t.strokeOpacity || 1, this.strokeStyle = t.strokeStyle || \"#000000\", this.fillStyle = t.fillStyle || \"#000000\", this.isFillTransparent = t.isFillTransparent || !1, this.fillOpacity = t.fillOpacity || 1, this.font = t.font || \"10px sans-serif\", this.textBaseline = t.textBaseline || \"alphabetic\", this.textAlign = t.textAlign || \"left\", this.lineWidth = t.lineWidth || 1, this.lineJoin = t.lineJoin || \"miter\", this.lineCap = t.lineCap || \"butt\", this.path = t.path || [], this.transform = void 0 !== t.transform ? t.transform.clone() : new h(), this.globalCompositeOperation = t.globalCompositeOperation || \"normal\", this.globalAlpha = t.globalAlpha || 1, this.clip_path = t.clip_path || [], this.currentPoint = t.currentPoint || new c(), this.miterLimit = t.miterLimit || 10, this.lastPoint = t.lastPoint || new c(), this.lineDashOffset = t.lineDashOffset || 0, this.lineDash = t.lineDash || [], this.margin = t.margin || [0, 0, 0, 0], this.prevPageLastElemOffset = t.prevPageLastElemOffset || 0, this.ignoreClearRect = \"boolean\" != typeof t.ignoreClearRect || t.ignoreClearRect, this;\n };\n e.events.push([\"initialized\", function () {\n this.context2d = new p(this), r = this.internal.f2, n = this.internal.getCoordinateString, i = this.internal.getVerticalCoordinateString, o = this.internal.getHorizontalCoordinate, s = this.internal.getVerticalCoordinate, c = this.internal.Point, u = this.internal.Rectangle, h = this.internal.Matrix, l = new d();\n }]);\n var p = function p(t) {\n Object.defineProperty(this, \"canvas\", {\n get: function get() {\n return {\n parentNode: !1,\n style: !1\n };\n }\n });\n var e = t;\n Object.defineProperty(this, \"pdf\", {\n get: function get() {\n return e;\n }\n });\n var r = !1;\n Object.defineProperty(this, \"pageWrapXEnabled\", {\n get: function get() {\n return r;\n },\n set: function set(t) {\n r = Boolean(t);\n }\n });\n var n = !1;\n Object.defineProperty(this, \"pageWrapYEnabled\", {\n get: function get() {\n return n;\n },\n set: function set(t) {\n n = Boolean(t);\n }\n });\n var i = 0;\n Object.defineProperty(this, \"posX\", {\n get: function get() {\n return i;\n },\n set: function set(t) {\n isNaN(t) || (i = t);\n }\n });\n var a = 0;\n Object.defineProperty(this, \"posY\", {\n get: function get() {\n return a;\n },\n set: function set(t) {\n isNaN(t) || (a = t);\n }\n }), Object.defineProperty(this, \"margin\", {\n get: function get() {\n return l.margin;\n },\n set: function set(t) {\n var e;\n \"number\" == typeof t ? e = [t, t, t, t] : ((e = new Array(4))[0] = t[0], e[1] = t.length >= 2 ? t[1] : e[0], e[2] = t.length >= 3 ? t[2] : e[0], e[3] = t.length >= 4 ? t[3] : e[1]), l.margin = e;\n }\n });\n var o = !1;\n Object.defineProperty(this, \"autoPaging\", {\n get: function get() {\n return o;\n },\n set: function set(t) {\n o = t;\n }\n });\n var s = 0;\n Object.defineProperty(this, \"lastBreak\", {\n get: function get() {\n return s;\n },\n set: function set(t) {\n s = t;\n }\n });\n var c = [];\n Object.defineProperty(this, \"pageBreaks\", {\n get: function get() {\n return c;\n },\n set: function set(t) {\n c = t;\n }\n }), Object.defineProperty(this, \"ctx\", {\n get: function get() {\n return l;\n },\n set: function set(t) {\n t instanceof d && (l = t);\n }\n }), Object.defineProperty(this, \"path\", {\n get: function get() {\n return l.path;\n },\n set: function set(t) {\n l.path = t;\n }\n });\n var u = [];\n Object.defineProperty(this, \"ctxStack\", {\n get: function get() {\n return u;\n },\n set: function set(t) {\n u = t;\n }\n }), Object.defineProperty(this, \"fillStyle\", {\n get: function get() {\n return this.ctx.fillStyle;\n },\n set: function set(t) {\n var e;\n e = g(t), this.ctx.fillStyle = e.style, this.ctx.isFillTransparent = 0 === e.a, this.ctx.fillOpacity = e.a, this.pdf.setFillColor(e.r, e.g, e.b, {\n a: e.a\n }), this.pdf.setTextColor(e.r, e.g, e.b, {\n a: e.a\n });\n }\n }), Object.defineProperty(this, \"strokeStyle\", {\n get: function get() {\n return this.ctx.strokeStyle;\n },\n set: function set(t) {\n var e = g(t);\n this.ctx.strokeStyle = e.style, this.ctx.isStrokeTransparent = 0 === e.a, this.ctx.strokeOpacity = e.a, 0 === e.a ? this.pdf.setDrawColor(255, 255, 255) : (e.a, this.pdf.setDrawColor(e.r, e.g, e.b));\n }\n }), Object.defineProperty(this, \"lineCap\", {\n get: function get() {\n return this.ctx.lineCap;\n },\n set: function set(t) {\n -1 !== [\"butt\", \"round\", \"square\"].indexOf(t) && (this.ctx.lineCap = t, this.pdf.setLineCap(t));\n }\n }), Object.defineProperty(this, \"lineWidth\", {\n get: function get() {\n return this.ctx.lineWidth;\n },\n set: function set(t) {\n isNaN(t) || (this.ctx.lineWidth = t, this.pdf.setLineWidth(t));\n }\n }), Object.defineProperty(this, \"lineJoin\", {\n get: function get() {\n return this.ctx.lineJoin;\n },\n set: function set(t) {\n -1 !== [\"bevel\", \"round\", \"miter\"].indexOf(t) && (this.ctx.lineJoin = t, this.pdf.setLineJoin(t));\n }\n }), Object.defineProperty(this, \"miterLimit\", {\n get: function get() {\n return this.ctx.miterLimit;\n },\n set: function set(t) {\n isNaN(t) || (this.ctx.miterLimit = t, this.pdf.setMiterLimit(t));\n }\n }), Object.defineProperty(this, \"textBaseline\", {\n get: function get() {\n return this.ctx.textBaseline;\n },\n set: function set(t) {\n this.ctx.textBaseline = t;\n }\n }), Object.defineProperty(this, \"textAlign\", {\n get: function get() {\n return this.ctx.textAlign;\n },\n set: function set(t) {\n -1 !== [\"right\", \"end\", \"center\", \"left\", \"start\"].indexOf(t) && (this.ctx.textAlign = t);\n }\n });\n var h = null;\n function f(t, e) {\n if (null === h) {\n var r = function (t) {\n var e = [];\n return Object.keys(t).forEach(function (r) {\n t[r].forEach(function (t) {\n var n = null;\n switch (t) {\n case \"bold\":\n n = {\n family: r,\n weight: \"bold\"\n };\n break;\n case \"italic\":\n n = {\n family: r,\n style: \"italic\"\n };\n break;\n case \"bolditalic\":\n n = {\n family: r,\n weight: \"bold\",\n style: \"italic\"\n };\n break;\n case \"\":\n case \"normal\":\n n = {\n family: r\n };\n }\n null !== n && (n.ref = {\n name: r,\n style: t\n }, e.push(n));\n });\n }), e;\n }(t.getFontList());\n h = function (t) {\n for (var e = {}, r = 0; r < t.length; ++r) {\n var n = jt(t[r]),\n i = n.family,\n a = n.stretch,\n o = n.style,\n s = n.weight;\n e[i] = e[i] || {}, e[i][a] = e[i][a] || {}, e[i][a][o] = e[i][a][o] || {}, e[i][a][o][s] = n;\n }\n return e;\n }(r.concat(e));\n }\n return h;\n }\n var p = null;\n Object.defineProperty(this, \"fontFaces\", {\n get: function get() {\n return p;\n },\n set: function set(t) {\n h = null, p = t;\n }\n }), Object.defineProperty(this, \"font\", {\n get: function get() {\n return this.ctx.font;\n },\n set: function set(t) {\n var e;\n if (this.ctx.font = t, null !== (e = /^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))(?:\\s*\\/\\s*(normal|[.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])))?\\s*([-_,\\\"\\'\\sa-z]+?)\\s*$/i.exec(t))) {\n var r = e[1],\n n = (e[2], e[3]),\n i = e[4],\n a = (e[5], e[6]),\n o = /^([.\\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(i)[2];\n i = \"px\" === o ? Math.floor(parseFloat(i) * this.pdf.internal.scaleFactor) : \"em\" === o ? Math.floor(parseFloat(i) * this.pdf.getFontSize()) : Math.floor(parseFloat(i) * this.pdf.internal.scaleFactor), this.pdf.setFontSize(i);\n var s = function (t) {\n var e,\n r,\n n = [],\n i = t.trim();\n if (\"\" === i) return Wt;\n if (i in Mt) return [Mt[i]];\n for (; \"\" !== i;) {\n switch (r = null, e = (i = Dt(i)).charAt(0)) {\n case '\"':\n case \"'\":\n r = Rt(i.substring(1), e);\n break;\n default:\n r = Tt(i);\n }\n if (null === r) return Wt;\n if (n.push(r[0]), \"\" !== (i = Dt(r[1])) && \",\" !== i.charAt(0)) return Wt;\n i = i.replace(/^,/, \"\");\n }\n return n;\n }(a);\n if (this.fontFaces) {\n var c = qt(f(this.pdf, this.fontFaces), s.map(function (t) {\n return {\n family: t,\n stretch: \"normal\",\n weight: n,\n style: r\n };\n }));\n this.pdf.setFont(c.ref.name, c.ref.style);\n } else {\n var u = \"\";\n (\"bold\" === n || parseInt(n, 10) >= 700 || \"bold\" === r) && (u = \"bold\"), \"italic\" === r && (u += \"italic\"), 0 === u.length && (u = \"normal\");\n for (var h = \"\", l = {\n arial: \"Helvetica\",\n Arial: \"Helvetica\",\n verdana: \"Helvetica\",\n Verdana: \"Helvetica\",\n helvetica: \"Helvetica\",\n Helvetica: \"Helvetica\",\n \"sans-serif\": \"Helvetica\",\n fixed: \"Courier\",\n monospace: \"Courier\",\n terminal: \"Courier\",\n cursive: \"Times\",\n fantasy: \"Times\",\n serif: \"Times\"\n }, d = 0; d < s.length; d++) {\n if (void 0 !== this.pdf.internal.getFont(s[d], u, {\n noFallback: !0,\n disableWarning: !0\n })) {\n h = s[d];\n break;\n }\n if (\"bolditalic\" === u && void 0 !== this.pdf.internal.getFont(s[d], \"bold\", {\n noFallback: !0,\n disableWarning: !0\n })) h = s[d], u = \"bold\";else if (void 0 !== this.pdf.internal.getFont(s[d], \"normal\", {\n noFallback: !0,\n disableWarning: !0\n })) {\n h = s[d], u = \"normal\";\n break;\n }\n }\n if (\"\" === h) for (var p = 0; p < s.length; p++) if (l[s[p]]) {\n h = l[s[p]];\n break;\n }\n h = \"\" === h ? \"Times\" : h, this.pdf.setFont(h, u);\n }\n }\n }\n }), Object.defineProperty(this, \"globalCompositeOperation\", {\n get: function get() {\n return this.ctx.globalCompositeOperation;\n },\n set: function set(t) {\n this.ctx.globalCompositeOperation = t;\n }\n }), Object.defineProperty(this, \"globalAlpha\", {\n get: function get() {\n return this.ctx.globalAlpha;\n },\n set: function set(t) {\n this.ctx.globalAlpha = t;\n }\n }), Object.defineProperty(this, \"lineDashOffset\", {\n get: function get() {\n return this.ctx.lineDashOffset;\n },\n set: function set(t) {\n this.ctx.lineDashOffset = t, T.call(this);\n }\n }), Object.defineProperty(this, \"lineDash\", {\n get: function get() {\n return this.ctx.lineDash;\n },\n set: function set(t) {\n this.ctx.lineDash = t, T.call(this);\n }\n }), Object.defineProperty(this, \"ignoreClearRect\", {\n get: function get() {\n return this.ctx.ignoreClearRect;\n },\n set: function set(t) {\n this.ctx.ignoreClearRect = Boolean(t);\n }\n });\n };\n p.prototype.setLineDash = function (t) {\n this.lineDash = t;\n }, p.prototype.getLineDash = function () {\n return this.lineDash.length % 2 ? this.lineDash.concat(this.lineDash) : this.lineDash.slice();\n }, p.prototype.fill = function () {\n A.call(this, \"fill\", !1);\n }, p.prototype.stroke = function () {\n A.call(this, \"stroke\", !1);\n }, p.prototype.beginPath = function () {\n this.path = [{\n type: \"begin\"\n }];\n }, p.prototype.moveTo = function (t, e) {\n if (isNaN(t) || isNaN(e)) throw a.error(\"jsPDF.context2d.moveTo: Invalid arguments\", arguments), new Error(\"Invalid arguments passed to jsPDF.context2d.moveTo\");\n var r = this.ctx.transform.applyToPoint(new c(t, e));\n this.path.push({\n type: \"mt\",\n x: r.x,\n y: r.y\n }), this.ctx.lastPoint = new c(t, e);\n }, p.prototype.closePath = function () {\n var e = new c(0, 0),\n r = 0;\n for (r = this.path.length - 1; -1 !== r; r--) if (\"begin\" === this.path[r].type && \"object\" === t(this.path[r + 1]) && \"number\" == typeof this.path[r + 1].x) {\n e = new c(this.path[r + 1].x, this.path[r + 1].y);\n break;\n }\n this.path.push({\n type: \"close\"\n }), this.ctx.lastPoint = new c(e.x, e.y);\n }, p.prototype.lineTo = function (t, e) {\n if (isNaN(t) || isNaN(e)) throw a.error(\"jsPDF.context2d.lineTo: Invalid arguments\", arguments), new Error(\"Invalid arguments passed to jsPDF.context2d.lineTo\");\n var r = this.ctx.transform.applyToPoint(new c(t, e));\n this.path.push({\n type: \"lt\",\n x: r.x,\n y: r.y\n }), this.ctx.lastPoint = new c(r.x, r.y);\n }, p.prototype.clip = function () {\n this.ctx.clip_path = JSON.parse(JSON.stringify(this.path)), A.call(this, null, !0);\n }, p.prototype.quadraticCurveTo = function (t, e, r, n) {\n if (isNaN(r) || isNaN(n) || isNaN(t) || isNaN(e)) throw a.error(\"jsPDF.context2d.quadraticCurveTo: Invalid arguments\", arguments), new Error(\"Invalid arguments passed to jsPDF.context2d.quadraticCurveTo\");\n var i = this.ctx.transform.applyToPoint(new c(r, n)),\n o = this.ctx.transform.applyToPoint(new c(t, e));\n this.path.push({\n type: \"qct\",\n x1: o.x,\n y1: o.y,\n x: i.x,\n y: i.y\n }), this.ctx.lastPoint = new c(i.x, i.y);\n }, p.prototype.bezierCurveTo = function (t, e, r, n, i, o) {\n if (isNaN(i) || isNaN(o) || isNaN(t) || isNaN(e) || isNaN(r) || isNaN(n)) throw a.error(\"jsPDF.context2d.bezierCurveTo: Invalid arguments\", arguments), new Error(\"Invalid arguments passed to jsPDF.context2d.bezierCurveTo\");\n var s = this.ctx.transform.applyToPoint(new c(i, o)),\n u = this.ctx.transform.applyToPoint(new c(t, e)),\n h = this.ctx.transform.applyToPoint(new c(r, n));\n this.path.push({\n type: \"bct\",\n x1: u.x,\n y1: u.y,\n x2: h.x,\n y2: h.y,\n x: s.x,\n y: s.y\n }), this.ctx.lastPoint = new c(s.x, s.y);\n }, p.prototype.arc = function (t, e, r, n, i, o) {\n if (isNaN(t) || isNaN(e) || isNaN(r) || isNaN(n) || isNaN(i)) throw a.error(\"jsPDF.context2d.arc: Invalid arguments\", arguments), new Error(\"Invalid arguments passed to jsPDF.context2d.arc\");\n if (o = Boolean(o), !this.ctx.transform.isIdentity) {\n var s = this.ctx.transform.applyToPoint(new c(t, e));\n t = s.x, e = s.y;\n var u = this.ctx.transform.applyToPoint(new c(0, r)),\n h = this.ctx.transform.applyToPoint(new c(0, 0));\n r = Math.sqrt(Math.pow(u.x - h.x, 2) + Math.pow(u.y - h.y, 2));\n }\n Math.abs(i - n) >= 2 * Math.PI && (n = 0, i = 2 * Math.PI), this.path.push({\n type: \"arc\",\n x: t,\n y: e,\n radius: r,\n startAngle: n,\n endAngle: i,\n counterclockwise: o\n });\n }, p.prototype.arcTo = function (t, e, r, n, i) {\n throw new Error(\"arcTo not implemented.\");\n }, p.prototype.rect = function (t, e, r, n) {\n if (isNaN(t) || isNaN(e) || isNaN(r) || isNaN(n)) throw a.error(\"jsPDF.context2d.rect: Invalid arguments\", arguments), new Error(\"Invalid arguments passed to jsPDF.context2d.rect\");\n this.moveTo(t, e), this.lineTo(t + r, e), this.lineTo(t + r, e + n), this.lineTo(t, e + n), this.lineTo(t, e), this.lineTo(t + r, e), this.lineTo(t, e);\n }, p.prototype.fillRect = function (t, e, r, n) {\n if (isNaN(t) || isNaN(e) || isNaN(r) || isNaN(n)) throw a.error(\"jsPDF.context2d.fillRect: Invalid arguments\", arguments), new Error(\"Invalid arguments passed to jsPDF.context2d.fillRect\");\n if (!m.call(this)) {\n var i = {};\n \"butt\" !== this.lineCap && (i.lineCap = this.lineCap, this.lineCap = \"butt\"), \"miter\" !== this.lineJoin && (i.lineJoin = this.lineJoin, this.lineJoin = \"miter\"), this.beginPath(), this.rect(t, e, r, n), this.fill(), i.hasOwnProperty(\"lineCap\") && (this.lineCap = i.lineCap), i.hasOwnProperty(\"lineJoin\") && (this.lineJoin = i.lineJoin);\n }\n }, p.prototype.strokeRect = function (t, e, r, n) {\n if (isNaN(t) || isNaN(e) || isNaN(r) || isNaN(n)) throw a.error(\"jsPDF.context2d.strokeRect: Invalid arguments\", arguments), new Error(\"Invalid arguments passed to jsPDF.context2d.strokeRect\");\n v.call(this) || (this.beginPath(), this.rect(t, e, r, n), this.stroke());\n }, p.prototype.clearRect = function (t, e, r, n) {\n if (isNaN(t) || isNaN(e) || isNaN(r) || isNaN(n)) throw a.error(\"jsPDF.context2d.clearRect: Invalid arguments\", arguments), new Error(\"Invalid arguments passed to jsPDF.context2d.clearRect\");\n this.ignoreClearRect || (this.fillStyle = \"#ffffff\", this.fillRect(t, e, r, n));\n }, p.prototype.save = function (t) {\n t = \"boolean\" != typeof t || t;\n for (var e = this.pdf.internal.getCurrentPageInfo().pageNumber, r = 0; r < this.pdf.internal.getNumberOfPages(); r++) this.pdf.setPage(r + 1), this.pdf.internal.out(\"q\");\n if (this.pdf.setPage(e), t) {\n this.ctx.fontSize = this.pdf.internal.getFontSize();\n var n = new d(this.ctx);\n this.ctxStack.push(this.ctx), this.ctx = n;\n }\n }, p.prototype.restore = function (t) {\n t = \"boolean\" != typeof t || t;\n for (var e = this.pdf.internal.getCurrentPageInfo().pageNumber, r = 0; r < this.pdf.internal.getNumberOfPages(); r++) this.pdf.setPage(r + 1), this.pdf.internal.out(\"Q\");\n this.pdf.setPage(e), t && 0 !== this.ctxStack.length && (this.ctx = this.ctxStack.pop(), this.fillStyle = this.ctx.fillStyle, this.strokeStyle = this.ctx.strokeStyle, this.font = this.ctx.font, this.lineCap = this.ctx.lineCap, this.lineWidth = this.ctx.lineWidth, this.lineJoin = this.ctx.lineJoin, this.lineDash = this.ctx.lineDash, this.lineDashOffset = this.ctx.lineDashOffset);\n }, p.prototype.toDataURL = function () {\n throw new Error(\"toDataUrl not implemented.\");\n };\n var g = function g(t) {\n var e, r, n, i;\n if (!0 === t.isCanvasGradient && (t = t.getColor()), !t) return {\n r: 0,\n g: 0,\n b: 0,\n a: 0,\n style: t\n };\n if (/transparent|rgba\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*0+\\s*\\)/.test(t)) e = 0, r = 0, n = 0, i = 0;else {\n var a = /rgb\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*\\)/.exec(t);\n if (null !== a) e = parseInt(a[1]), r = parseInt(a[2]), n = parseInt(a[3]), i = 1;else if (null !== (a = /rgba\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*([\\d.]+)\\s*\\)/.exec(t))) e = parseInt(a[1]), r = parseInt(a[2]), n = parseInt(a[3]), i = parseFloat(a[4]);else {\n if (i = 1, \"string\" == typeof t && \"#\" !== t.charAt(0)) {\n var o = new f(t);\n t = o.ok ? o.toHex() : \"#000000\";\n }\n 4 === t.length ? (e = t.substring(1, 2), e += e, r = t.substring(2, 3), r += r, n = t.substring(3, 4), n += n) : (e = t.substring(1, 3), r = t.substring(3, 5), n = t.substring(5, 7)), e = parseInt(e, 16), r = parseInt(r, 16), n = parseInt(n, 16);\n }\n }\n return {\n r: e,\n g: r,\n b: n,\n a: i,\n style: t\n };\n },\n m = function m() {\n return this.ctx.isFillTransparent || 0 == this.globalAlpha;\n },\n v = function v() {\n return Boolean(this.ctx.isStrokeTransparent || 0 == this.globalAlpha);\n };\n p.prototype.fillText = function (t, e, r, n) {\n if (isNaN(e) || isNaN(r) || \"string\" != typeof t) throw a.error(\"jsPDF.context2d.fillText: Invalid arguments\", arguments), new Error(\"Invalid arguments passed to jsPDF.context2d.fillText\");\n if (n = isNaN(n) ? void 0 : n, !m.call(this)) {\n var i = q(this.ctx.transform.rotation),\n o = this.ctx.transform.scaleX;\n C.call(this, {\n text: t,\n x: e,\n y: r,\n scale: o,\n angle: i,\n align: this.textAlign,\n maxWidth: n\n });\n }\n }, p.prototype.strokeText = function (t, e, r, n) {\n if (isNaN(e) || isNaN(r) || \"string\" != typeof t) throw a.error(\"jsPDF.context2d.strokeText: Invalid arguments\", arguments), new Error(\"Invalid arguments passed to jsPDF.context2d.strokeText\");\n if (!v.call(this)) {\n n = isNaN(n) ? void 0 : n;\n var i = q(this.ctx.transform.rotation),\n o = this.ctx.transform.scaleX;\n C.call(this, {\n text: t,\n x: e,\n y: r,\n scale: o,\n renderingMode: \"stroke\",\n angle: i,\n align: this.textAlign,\n maxWidth: n\n });\n }\n }, p.prototype.measureText = function (t) {\n if (\"string\" != typeof t) throw a.error(\"jsPDF.context2d.measureText: Invalid arguments\", arguments), new Error(\"Invalid arguments passed to jsPDF.context2d.measureText\");\n var e = this.pdf,\n r = this.pdf.internal.scaleFactor,\n n = e.internal.getFontSize(),\n i = e.getStringUnitWidth(t) * n / e.internal.scaleFactor,\n o = function o(t) {\n var e = (t = t || {}).width || 0;\n return Object.defineProperty(this, \"width\", {\n get: function get() {\n return e;\n }\n }), this;\n };\n return new o({\n width: i *= Math.round(96 * r / 72 * 1e4) / 1e4\n });\n }, p.prototype.scale = function (t, e) {\n if (isNaN(t) || isNaN(e)) throw a.error(\"jsPDF.context2d.scale: Invalid arguments\", arguments), new Error(\"Invalid arguments passed to jsPDF.context2d.scale\");\n var r = new h(t, 0, 0, e, 0, 0);\n this.ctx.transform = this.ctx.transform.multiply(r);\n }, p.prototype.rotate = function (t) {\n if (isNaN(t)) throw a.error(\"jsPDF.context2d.rotate: Invalid arguments\", arguments), new Error(\"Invalid arguments passed to jsPDF.context2d.rotate\");\n var e = new h(Math.cos(t), Math.sin(t), -Math.sin(t), Math.cos(t), 0, 0);\n this.ctx.transform = this.ctx.transform.multiply(e);\n }, p.prototype.translate = function (t, e) {\n if (isNaN(t) || isNaN(e)) throw a.error(\"jsPDF.context2d.translate: Invalid arguments\", arguments), new Error(\"Invalid arguments passed to jsPDF.context2d.translate\");\n var r = new h(1, 0, 0, 1, t, e);\n this.ctx.transform = this.ctx.transform.multiply(r);\n }, p.prototype.transform = function (t, e, r, n, i, o) {\n if (isNaN(t) || isNaN(e) || isNaN(r) || isNaN(n) || isNaN(i) || isNaN(o)) throw a.error(\"jsPDF.context2d.transform: Invalid arguments\", arguments), new Error(\"Invalid arguments passed to jsPDF.context2d.transform\");\n var s = new h(t, e, r, n, i, o);\n this.ctx.transform = this.ctx.transform.multiply(s);\n }, p.prototype.setTransform = function (t, e, r, n, i, a) {\n t = isNaN(t) ? 1 : t, e = isNaN(e) ? 0 : e, r = isNaN(r) ? 0 : r, n = isNaN(n) ? 1 : n, i = isNaN(i) ? 0 : i, a = isNaN(a) ? 0 : a, this.ctx.transform = new h(t, e, r, n, i, a);\n };\n var b = function b() {\n return this.margin[0] > 0 || this.margin[1] > 0 || this.margin[2] > 0 || this.margin[3] > 0;\n };\n p.prototype.drawImage = function (t, e, r, n, i, a, o, s, c) {\n var l = this.pdf.getImageProperties(t),\n f = 1,\n d = 1,\n p = 1,\n g = 1;\n void 0 !== n && void 0 !== s && (p = s / n, g = c / i, f = l.width / n * s / n, d = l.height / i * c / i), void 0 === a && (a = e, o = r, e = 0, r = 0), void 0 !== n && void 0 === s && (s = n, c = i), void 0 === n && void 0 === s && (s = l.width, c = l.height);\n for (var m, v = this.ctx.transform.decompose(), w = q(v.rotate.shx), A = new h(), S = (A = (A = (A = A.multiply(v.translate)).multiply(v.skew)).multiply(v.scale)).applyToRectangle(new u(a - e * p, o - r * g, n * f, i * d)), _ = y.call(this, S), P = [], k = 0; k < _.length; k += 1) -1 === P.indexOf(_[k]) && P.push(_[k]);\n if (L(P), this.autoPaging) for (var I = P[0], F = P[P.length - 1], C = I; C < F + 1; C++) {\n this.pdf.setPage(C);\n var j = this.pdf.internal.pageSize.width - this.margin[3] - this.margin[1],\n O = 1 === C ? this.posY + this.margin[0] : this.margin[0],\n B = this.pdf.internal.pageSize.height - this.posY - this.margin[0] - this.margin[2],\n M = this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2],\n E = 1 === C ? 0 : B + (C - 2) * M;\n if (0 !== this.ctx.clip_path.length) {\n var D = this.path;\n m = JSON.parse(JSON.stringify(this.ctx.clip_path)), this.path = N(m, this.posX + this.margin[3], -E + O + this.ctx.prevPageLastElemOffset), x.call(this, \"fill\", !0), this.path = D;\n }\n var R = JSON.parse(JSON.stringify(S));\n R = N([R], this.posX + this.margin[3], -E + O + this.ctx.prevPageLastElemOffset)[0];\n var T = (C > I || C < F) && b.call(this);\n T && (this.pdf.saveGraphicsState(), this.pdf.rect(this.margin[3], this.margin[0], j, M, null).clip().discardPath()), this.pdf.addImage(t, \"JPEG\", R.x, R.y, R.w, R.h, null, null, w), T && this.pdf.restoreGraphicsState();\n } else this.pdf.addImage(t, \"JPEG\", S.x, S.y, S.w, S.h, null, null, w);\n };\n var y = function y(t, e, r) {\n var n = [];\n e = e || this.pdf.internal.pageSize.width, r = r || this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2];\n var i = this.posY + this.ctx.prevPageLastElemOffset;\n switch (t.type) {\n default:\n case \"mt\":\n case \"lt\":\n n.push(Math.floor((t.y + i) / r) + 1);\n break;\n case \"arc\":\n n.push(Math.floor((t.y + i - t.radius) / r) + 1), n.push(Math.floor((t.y + i + t.radius) / r) + 1);\n break;\n case \"qct\":\n var a = D(this.ctx.lastPoint.x, this.ctx.lastPoint.y, t.x1, t.y1, t.x, t.y);\n n.push(Math.floor((a.y + i) / r) + 1), n.push(Math.floor((a.y + a.h + i) / r) + 1);\n break;\n case \"bct\":\n var o = R(this.ctx.lastPoint.x, this.ctx.lastPoint.y, t.x1, t.y1, t.x2, t.y2, t.x, t.y);\n n.push(Math.floor((o.y + i) / r) + 1), n.push(Math.floor((o.y + o.h + i) / r) + 1);\n break;\n case \"rect\":\n n.push(Math.floor((t.y + i) / r) + 1), n.push(Math.floor((t.y + t.h + i) / r) + 1);\n }\n for (var s = 0; s < n.length; s += 1) for (; this.pdf.internal.getNumberOfPages() < n[s];) w.call(this);\n return n;\n },\n w = function w() {\n var t = this.fillStyle,\n e = this.strokeStyle,\n r = this.font,\n n = this.lineCap,\n i = this.lineWidth,\n a = this.lineJoin;\n this.pdf.addPage(), this.fillStyle = t, this.strokeStyle = e, this.font = r, this.lineCap = n, this.lineWidth = i, this.lineJoin = a;\n },\n N = function N(t, e, r) {\n for (var n = 0; n < t.length; n++) switch (t[n].type) {\n case \"bct\":\n t[n].x2 += e, t[n].y2 += r;\n case \"qct\":\n t[n].x1 += e, t[n].y1 += r;\n case \"mt\":\n case \"lt\":\n case \"arc\":\n default:\n t[n].x += e, t[n].y += r;\n }\n return t;\n },\n L = function L(t) {\n return t.sort(function (t, e) {\n return t - e;\n });\n },\n A = function A(t, e) {\n for (var r, n, i = this.fillStyle, a = this.strokeStyle, o = this.lineCap, s = this.lineWidth, c = Math.abs(s * this.ctx.transform.scaleX), u = this.lineJoin, h = JSON.parse(JSON.stringify(this.path)), l = JSON.parse(JSON.stringify(this.path)), f = [], d = 0; d < l.length; d++) if (void 0 !== l[d].x) for (var p = y.call(this, l[d]), g = 0; g < p.length; g += 1) -1 === f.indexOf(p[g]) && f.push(p[g]);\n for (var m = 0; m < f.length; m++) for (; this.pdf.internal.getNumberOfPages() < f[m];) w.call(this);\n if (L(f), this.autoPaging) for (var v = f[0], A = f[f.length - 1], S = v; S < A + 1; S++) {\n this.pdf.setPage(S), this.fillStyle = i, this.strokeStyle = a, this.lineCap = o, this.lineWidth = c, this.lineJoin = u;\n var _ = this.pdf.internal.pageSize.width - this.margin[3] - this.margin[1],\n P = 1 === S ? this.posY + this.margin[0] : this.margin[0],\n k = this.pdf.internal.pageSize.height - this.posY - this.margin[0] - this.margin[2],\n I = this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2],\n F = 1 === S ? 0 : k + (S - 2) * I;\n if (0 !== this.ctx.clip_path.length) {\n var C = this.path;\n r = JSON.parse(JSON.stringify(this.ctx.clip_path)), this.path = N(r, this.posX + this.margin[3], -F + P + this.ctx.prevPageLastElemOffset), x.call(this, t, !0), this.path = C;\n }\n if (n = JSON.parse(JSON.stringify(h)), this.path = N(n, this.posX + this.margin[3], -F + P + this.ctx.prevPageLastElemOffset), !1 === e || 0 === S) {\n var j = (S > v || S < A) && b.call(this);\n j && (this.pdf.saveGraphicsState(), this.pdf.rect(this.margin[3], this.margin[0], _, I, null).clip().discardPath()), x.call(this, t, e), j && this.pdf.restoreGraphicsState();\n }\n this.lineWidth = s;\n } else this.lineWidth = c, x.call(this, t, e), this.lineWidth = s;\n this.path = h;\n },\n x = function x(t, e) {\n if ((\"stroke\" !== t || e || !v.call(this)) && (\"stroke\" === t || e || !m.call(this))) {\n for (var r, n, i = [], a = this.path, o = 0; o < a.length; o++) {\n var s = a[o];\n switch (s.type) {\n case \"begin\":\n i.push({\n begin: !0\n });\n break;\n case \"close\":\n i.push({\n close: !0\n });\n break;\n case \"mt\":\n i.push({\n start: s,\n deltas: [],\n abs: []\n });\n break;\n case \"lt\":\n var c = i.length;\n if (a[o - 1] && !isNaN(a[o - 1].x) && (r = [s.x - a[o - 1].x, s.y - a[o - 1].y], c > 0)) for (; c >= 0; c--) if (!0 !== i[c - 1].close && !0 !== i[c - 1].begin) {\n i[c - 1].deltas.push(r), i[c - 1].abs.push(s);\n break;\n }\n break;\n case \"bct\":\n r = [s.x1 - a[o - 1].x, s.y1 - a[o - 1].y, s.x2 - a[o - 1].x, s.y2 - a[o - 1].y, s.x - a[o - 1].x, s.y - a[o - 1].y], i[i.length - 1].deltas.push(r);\n break;\n case \"qct\":\n var u = a[o - 1].x + 2 / 3 * (s.x1 - a[o - 1].x),\n h = a[o - 1].y + 2 / 3 * (s.y1 - a[o - 1].y),\n l = s.x + 2 / 3 * (s.x1 - s.x),\n f = s.y + 2 / 3 * (s.y1 - s.y),\n d = s.x,\n p = s.y;\n r = [u - a[o - 1].x, h - a[o - 1].y, l - a[o - 1].x, f - a[o - 1].y, d - a[o - 1].x, p - a[o - 1].y], i[i.length - 1].deltas.push(r);\n break;\n case \"arc\":\n i.push({\n deltas: [],\n abs: [],\n arc: !0\n }), Array.isArray(i[i.length - 1].abs) && i[i.length - 1].abs.push(s);\n }\n }\n n = e ? null : \"stroke\" === t ? \"stroke\" : \"fill\";\n for (var g = !1, b = 0; b < i.length; b++) if (i[b].arc) for (var y = i[b].abs, w = 0; w < y.length; w++) {\n var N = y[w];\n \"arc\" === N.type ? P.call(this, N.x, N.y, N.radius, N.startAngle, N.endAngle, N.counterclockwise, void 0, e, !g) : j.call(this, N.x, N.y), g = !0;\n } else if (!0 === i[b].close) this.pdf.internal.out(\"h\"), g = !1;else if (!0 !== i[b].begin) {\n var L = i[b].start.x,\n A = i[b].start.y;\n O.call(this, i[b].deltas, L, A), g = !0;\n }\n n && k.call(this, n), e && I.call(this);\n }\n },\n S = function S(t) {\n var e = this.pdf.internal.getFontSize() / this.pdf.internal.scaleFactor,\n r = e * (this.pdf.internal.getLineHeightFactor() - 1);\n switch (this.ctx.textBaseline) {\n case \"bottom\":\n return t - r;\n case \"top\":\n return t + e - r;\n case \"hanging\":\n return t + e - 2 * r;\n case \"middle\":\n return t + e / 2 - r;\n case \"ideographic\":\n return t;\n case \"alphabetic\":\n default:\n return t;\n }\n },\n _ = function _(t) {\n return t + this.pdf.internal.getFontSize() / this.pdf.internal.scaleFactor * (this.pdf.internal.getLineHeightFactor() - 1);\n };\n p.prototype.createLinearGradient = function () {\n var t = function t() {};\n return t.colorStops = [], t.addColorStop = function (t, e) {\n this.colorStops.push([t, e]);\n }, t.getColor = function () {\n return 0 === this.colorStops.length ? \"#000000\" : this.colorStops[0][1];\n }, t.isCanvasGradient = !0, t;\n }, p.prototype.createPattern = function () {\n return this.createLinearGradient();\n }, p.prototype.createRadialGradient = function () {\n return this.createLinearGradient();\n };\n var P = function P(t, e, r, n, i, a, o, s, c) {\n for (var u = M.call(this, r, n, i, a), h = 0; h < u.length; h++) {\n var l = u[h];\n 0 === h && (c ? F.call(this, l.x1 + t, l.y1 + e) : j.call(this, l.x1 + t, l.y1 + e)), B.call(this, t, e, l.x2, l.y2, l.x3, l.y3, l.x4, l.y4);\n }\n s ? I.call(this) : k.call(this, o);\n },\n k = function k(t) {\n switch (t) {\n case \"stroke\":\n this.pdf.internal.out(\"S\");\n break;\n case \"fill\":\n this.pdf.internal.out(\"f\");\n }\n },\n I = function I() {\n this.pdf.clip(), this.pdf.discardPath();\n },\n F = function F(t, e) {\n this.pdf.internal.out(n(t) + \" \" + i(e) + \" m\");\n },\n C = function C(t) {\n var e;\n switch (t.align) {\n case \"right\":\n case \"end\":\n e = \"right\";\n break;\n case \"center\":\n e = \"center\";\n break;\n case \"left\":\n case \"start\":\n default:\n e = \"left\";\n }\n var r = this.pdf.getTextDimensions(t.text),\n n = S.call(this, t.y),\n i = _.call(this, n) - r.h,\n a = this.ctx.transform.applyToPoint(new c(t.x, n)),\n o = this.ctx.transform.decompose(),\n s = new h();\n s = (s = (s = s.multiply(o.translate)).multiply(o.skew)).multiply(o.scale);\n for (var l, f, d, p = this.ctx.transform.applyToRectangle(new u(t.x, n, r.w, r.h)), g = s.applyToRectangle(new u(t.x, i, r.w, r.h)), m = y.call(this, g), v = [], w = 0; w < m.length; w += 1) -1 === v.indexOf(m[w]) && v.push(m[w]);\n if (L(v), this.autoPaging) for (var A = v[0], P = v[v.length - 1], k = A; k < P + 1; k++) {\n this.pdf.setPage(k);\n var I = 1 === k ? this.posY + this.margin[0] : this.margin[0],\n F = this.pdf.internal.pageSize.height - this.posY - this.margin[0] - this.margin[2],\n C = this.pdf.internal.pageSize.height - this.margin[2],\n j = C - this.margin[0],\n O = this.pdf.internal.pageSize.width - this.margin[1],\n B = O - this.margin[3],\n M = 1 === k ? 0 : F + (k - 2) * j;\n if (0 !== this.ctx.clip_path.length) {\n var E = this.path;\n l = JSON.parse(JSON.stringify(this.ctx.clip_path)), this.path = N(l, this.posX + this.margin[3], -1 * M + I), x.call(this, \"fill\", !0), this.path = E;\n }\n var q = N([JSON.parse(JSON.stringify(g))], this.posX + this.margin[3], -M + I + this.ctx.prevPageLastElemOffset)[0];\n t.scale >= .01 && (f = this.pdf.internal.getFontSize(), this.pdf.setFontSize(f * t.scale), d = this.lineWidth, this.lineWidth = d * t.scale);\n var D = \"text\" !== this.autoPaging;\n if (D || q.y + q.h <= C) {\n if (D || q.y >= I && q.x <= O) {\n var R = D ? t.text : this.pdf.splitTextToSize(t.text, t.maxWidth || O - q.x)[0],\n T = N([JSON.parse(JSON.stringify(p))], this.posX + this.margin[3], -M + I + this.ctx.prevPageLastElemOffset)[0],\n U = D && (k > A || k < P) && b.call(this);\n U && (this.pdf.saveGraphicsState(), this.pdf.rect(this.margin[3], this.margin[0], B, j, null).clip().discardPath()), this.pdf.text(R, T.x, T.y, {\n angle: t.angle,\n align: e,\n renderingMode: t.renderingMode\n }), U && this.pdf.restoreGraphicsState();\n }\n } else q.y < C && (this.ctx.prevPageLastElemOffset += C - q.y);\n t.scale >= .01 && (this.pdf.setFontSize(f), this.lineWidth = d);\n } else t.scale >= .01 && (f = this.pdf.internal.getFontSize(), this.pdf.setFontSize(f * t.scale), d = this.lineWidth, this.lineWidth = d * t.scale), this.pdf.text(t.text, a.x + this.posX, a.y + this.posY, {\n angle: t.angle,\n align: e,\n renderingMode: t.renderingMode,\n maxWidth: t.maxWidth\n }), t.scale >= .01 && (this.pdf.setFontSize(f), this.lineWidth = d);\n },\n j = function j(t, e, r, a) {\n r = r || 0, a = a || 0, this.pdf.internal.out(n(t + r) + \" \" + i(e + a) + \" l\");\n },\n O = function O(t, e, r) {\n return this.pdf.lines(t, e, r, null, null);\n },\n B = function B(t, e, n, i, a, c, u, h) {\n this.pdf.internal.out([r(o(n + t)), r(s(i + e)), r(o(a + t)), r(s(c + e)), r(o(u + t)), r(s(h + e)), \"c\"].join(\" \"));\n },\n M = function M(t, e, r, n) {\n for (var i = 2 * Math.PI, a = Math.PI / 2; e > r;) e -= i;\n var o = Math.abs(r - e);\n o < i && n && (o = i - o);\n for (var s = [], c = n ? -1 : 1, u = e; o > 1e-5;) {\n var h = u + c * Math.min(o, a);\n s.push(E.call(this, t, u, h)), o -= Math.abs(h - u), u = h;\n }\n return s;\n },\n E = function E(t, e, r) {\n var n = (r - e) / 2,\n i = t * Math.cos(n),\n a = t * Math.sin(n),\n o = i,\n s = -a,\n c = o * o + s * s,\n u = c + o * i + s * a,\n h = 4 / 3 * (Math.sqrt(2 * c * u) - u) / (o * a - s * i),\n l = o - h * s,\n f = s + h * o,\n d = l,\n p = -f,\n g = n + e,\n m = Math.cos(g),\n v = Math.sin(g);\n return {\n x1: t * Math.cos(e),\n y1: t * Math.sin(e),\n x2: l * m - f * v,\n y2: l * v + f * m,\n x3: d * m - p * v,\n y3: d * v + p * m,\n x4: t * Math.cos(r),\n y4: t * Math.sin(r)\n };\n },\n q = function q(t) {\n return 180 * t / Math.PI;\n },\n D = function D(t, e, r, n, i, a) {\n var o = t + .5 * (r - t),\n s = e + .5 * (n - e),\n c = i + .5 * (r - i),\n h = a + .5 * (n - a),\n l = Math.min(t, i, o, c),\n f = Math.max(t, i, o, c),\n d = Math.min(e, a, s, h),\n p = Math.max(e, a, s, h);\n return new u(l, d, f - l, p - d);\n },\n R = function R(t, e, r, n, i, a, o, s) {\n var c,\n h,\n l,\n f,\n d,\n p,\n g,\n m,\n v,\n b,\n y,\n w,\n N,\n L,\n A = r - t,\n x = n - e,\n S = i - r,\n _ = a - n,\n P = o - i,\n k = s - a;\n for (h = 0; h < 41; h++) v = (g = (l = t + (c = h / 40) * A) + c * ((d = r + c * S) - l)) + c * (d + c * (i + c * P - d) - g), b = (m = (f = e + c * x) + c * ((p = n + c * _) - f)) + c * (p + c * (a + c * k - p) - m), 0 == h ? (y = v, w = b, N = v, L = b) : (y = Math.min(y, v), w = Math.min(w, b), N = Math.max(N, v), L = Math.max(L, b));\n return new u(Math.round(y), Math.round(w), Math.round(N - y), Math.round(L - w));\n },\n T = function T() {\n if (this.prevLineDash || this.ctx.lineDash.length || this.ctx.lineDashOffset) {\n var t,\n e,\n r = (t = this.ctx.lineDash, e = this.ctx.lineDashOffset, JSON.stringify({\n lineDash: t,\n lineDashOffset: e\n }));\n this.prevLineDash !== r && (this.pdf.setLineDash(this.ctx.lineDash, this.ctx.lineDashOffset), this.prevLineDash = r);\n }\n };\n}(E.API),\n/**\n * @license\n * jsPDF filters PlugIn\n * Copyright (c) 2014 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\nfunction (t) {\n var r = function r(t) {\n var e, r, n, i, a, o, s, c, u, h;\n for (/[^\\x00-\\xFF]/.test(t), r = [], n = 0, i = (t += e = \"\\0\\0\\0\\0\".slice(t.length % 4 || 4)).length; i > n; n += 4) 0 !== (a = (t.charCodeAt(n) << 24) + (t.charCodeAt(n + 1) << 16) + (t.charCodeAt(n + 2) << 8) + t.charCodeAt(n + 3)) ? (o = (a = ((a = ((a = ((a = (a - (h = a % 85)) / 85) - (u = a % 85)) / 85) - (c = a % 85)) / 85) - (s = a % 85)) / 85) % 85, r.push(o + 33, s + 33, c + 33, u + 33, h + 33)) : r.push(122);\n return function (t, e) {\n for (var r = e; r > 0; r--) t.pop();\n }(r, e.length), String.fromCharCode.apply(String, r) + \"~>\";\n },\n n = function n(t) {\n var e,\n r,\n n,\n i,\n a,\n o = String,\n s = \"length\",\n c = 255,\n u = \"charCodeAt\",\n h = \"slice\",\n l = \"replace\";\n for (t[h](-2), t = t[h](0, -2)[l](/\\s/g, \"\")[l](\"z\", \"!!!!!\"), n = [], i = 0, a = (t += e = \"uuuuu\"[h](t[s] % 5 || 5))[s]; a > i; i += 5) r = 52200625 * (t[u](i) - 33) + 614125 * (t[u](i + 1) - 33) + 7225 * (t[u](i + 2) - 33) + 85 * (t[u](i + 3) - 33) + (t[u](i + 4) - 33), n.push(c & r >> 24, c & r >> 16, c & r >> 8, c & r);\n return function (t, e) {\n for (var r = e; r > 0; r--) t.pop();\n }(n, e[s]), o.fromCharCode.apply(o, n);\n },\n i = function i(t) {\n var e = new RegExp(/^([0-9A-Fa-f]{2})+$/);\n if (-1 !== (t = t.replace(/\\s/g, \"\")).indexOf(\">\") && (t = t.substr(0, t.indexOf(\">\"))), t.length % 2 && (t += \"0\"), !1 === e.test(t)) return \"\";\n for (var r = \"\", n = 0; n < t.length; n += 2) r += String.fromCharCode(\"0x\" + (t[n] + t[n + 1]));\n return r;\n },\n a = function a(t) {\n for (var r = new Uint8Array(t.length), n = t.length; n--;) r[n] = t.charCodeAt(n);\n return t = (r = e(r)).reduce(function (t, e) {\n return t + String.fromCharCode(e);\n }, \"\");\n };\n t.processDataByFilters = function (t, e) {\n var o = 0,\n s = t || \"\",\n c = [];\n for (\"string\" == typeof (e = e || []) && (e = [e]), o = 0; o < e.length; o += 1) switch (e[o]) {\n case \"ASCII85Decode\":\n case \"/ASCII85Decode\":\n s = n(s), c.push(\"/ASCII85Encode\");\n break;\n case \"ASCII85Encode\":\n case \"/ASCII85Encode\":\n s = r(s), c.push(\"/ASCII85Decode\");\n break;\n case \"ASCIIHexDecode\":\n case \"/ASCIIHexDecode\":\n s = i(s), c.push(\"/ASCIIHexEncode\");\n break;\n case \"ASCIIHexEncode\":\n case \"/ASCIIHexEncode\":\n s = s.split(\"\").map(function (t) {\n return (\"0\" + t.charCodeAt().toString(16)).slice(-2);\n }).join(\"\") + \">\", c.push(\"/ASCIIHexDecode\");\n break;\n case \"FlateEncode\":\n case \"/FlateEncode\":\n s = a(s), c.push(\"/FlateDecode\");\n break;\n default:\n throw new Error('The filter: \"' + e[o] + '\" is not implemented');\n }\n return {\n data: s,\n reverseChain: c.reverse().join(\" \")\n };\n };\n}(E.API),\n/**\n * @license\n * jsPDF fileloading PlugIn\n * Copyright (c) 2018 Aras Abbasi (aras.abbasi@gmail.com)\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\nfunction (t) {\n t.loadFile = function (t, e, r) {\n return function (t, e, r) {\n e = !1 !== e, r = \"function\" == typeof r ? r : function () {};\n var n = void 0;\n try {\n n = function (t, e, r) {\n var n = new XMLHttpRequest(),\n i = 0,\n a = function a(t) {\n var e = t.length,\n r = [],\n n = String.fromCharCode;\n for (i = 0; i < e; i += 1) r.push(n(255 & t.charCodeAt(i)));\n return r.join(\"\");\n };\n if (n.open(\"GET\", t, !e), n.overrideMimeType(\"text/plain; charset=x-user-defined\"), !1 === e && (n.onload = function () {\n 200 === n.status ? r(a(this.responseText)) : r(void 0);\n }), n.send(null), e && 200 === n.status) return a(n.responseText);\n }(t, e, r);\n } catch (t) {}\n return n;\n }(t, e, r);\n }, t.loadImageFile = t.loadFile;\n}(E.API), function (e) {\n function r() {\n return (n.html2canvas ? Promise.resolve(n.html2canvas) : import(\"html2canvas\"))[\"catch\"](function (t) {\n return Promise.reject(new Error(\"Could not load html2canvas: \" + t));\n }).then(function (t) {\n return t[\"default\"] ? t[\"default\"] : t;\n });\n }\n function i() {\n return (n.DOMPurify ? Promise.resolve(n.DOMPurify) : import(\"dompurify\"))[\"catch\"](function (t) {\n return Promise.reject(new Error(\"Could not load dompurify: \" + t));\n }).then(function (t) {\n return t[\"default\"] ? t[\"default\"] : t;\n });\n }\n var a = function a(e) {\n var r = t(e);\n return \"undefined\" === r ? \"undefined\" : \"string\" === r || e instanceof String ? \"string\" : \"number\" === r || e instanceof Number ? \"number\" : \"function\" === r || e instanceof Function ? \"function\" : e && e.constructor === Array ? \"array\" : e && 1 === e.nodeType ? \"element\" : \"object\" === r ? \"object\" : \"unknown\";\n },\n o = function o(t, e) {\n var r = document.createElement(t);\n for (var n in e.className && (r.className = e.className), e.innerHTML && e.dompurify && (r.innerHTML = e.dompurify.sanitize(e.innerHTML)), e.style) r.style[n] = e.style[n];\n return r;\n },\n s = function t(e) {\n var r = Object.assign(t.convert(Promise.resolve()), JSON.parse(JSON.stringify(t.template))),\n n = t.convert(Promise.resolve(), r);\n return n = (n = n.setProgress(1, t, 1, [t])).set(e);\n };\n (s.prototype = Object.create(Promise.prototype)).constructor = s, s.convert = function (t, e) {\n return t.__proto__ = e || s.prototype, t;\n }, s.template = {\n prop: {\n src: null,\n container: null,\n overlay: null,\n canvas: null,\n img: null,\n pdf: null,\n pageSize: null,\n callback: function callback() {}\n },\n progress: {\n val: 0,\n state: null,\n n: 0,\n stack: []\n },\n opt: {\n filename: \"file.pdf\",\n margin: [0, 0, 0, 0],\n enableLinks: !0,\n x: 0,\n y: 0,\n html2canvas: {},\n jsPDF: {},\n backgroundColor: \"transparent\"\n }\n }, s.prototype.from = function (t, e) {\n return this.then(function () {\n switch (e = e || function (t) {\n switch (a(t)) {\n case \"string\":\n return \"string\";\n case \"element\":\n return \"canvas\" === t.nodeName.toLowerCase() ? \"canvas\" : \"element\";\n default:\n return \"unknown\";\n }\n }(t)) {\n case \"string\":\n return this.then(i).then(function (e) {\n return this.set({\n src: o(\"div\", {\n innerHTML: t,\n dompurify: e\n })\n });\n });\n case \"element\":\n return this.set({\n src: t\n });\n case \"canvas\":\n return this.set({\n canvas: t\n });\n case \"img\":\n return this.set({\n img: t\n });\n default:\n return this.error(\"Unknown source type.\");\n }\n });\n }, s.prototype.to = function (t) {\n switch (t) {\n case \"container\":\n return this.toContainer();\n case \"canvas\":\n return this.toCanvas();\n case \"img\":\n return this.toImg();\n case \"pdf\":\n return this.toPdf();\n default:\n return this.error(\"Invalid target.\");\n }\n }, s.prototype.toContainer = function () {\n return this.thenList([function () {\n return this.prop.src || this.error(\"Cannot duplicate - no source HTML.\");\n }, function () {\n return this.prop.pageSize || this.setPageSize();\n }]).then(function () {\n var t = {\n position: \"relative\",\n display: \"inline-block\",\n width: (\"number\" != typeof this.opt.width || isNaN(this.opt.width) || \"number\" != typeof this.opt.windowWidth || isNaN(this.opt.windowWidth) ? Math.max(this.prop.src.clientWidth, this.prop.src.scrollWidth, this.prop.src.offsetWidth) : this.opt.windowWidth) + \"px\",\n left: 0,\n right: 0,\n top: 0,\n margin: \"auto\",\n backgroundColor: this.opt.backgroundColor\n },\n e = function t(e, r) {\n for (var n = 3 === e.nodeType ? document.createTextNode(e.nodeValue) : e.cloneNode(!1), i = e.firstChild; i; i = i.nextSibling) !0 !== r && 1 === i.nodeType && \"SCRIPT\" === i.nodeName || n.appendChild(t(i, r));\n return 1 === e.nodeType && (\"CANVAS\" === e.nodeName ? (n.width = e.width, n.height = e.height, n.getContext(\"2d\").drawImage(e, 0, 0)) : \"TEXTAREA\" !== e.nodeName && \"SELECT\" !== e.nodeName || (n.value = e.value), n.addEventListener(\"load\", function () {\n n.scrollTop = e.scrollTop, n.scrollLeft = e.scrollLeft;\n }, !0)), n;\n }(this.prop.src, this.opt.html2canvas.javascriptEnabled);\n \"BODY\" === e.tagName && (t.height = Math.max(document.body.scrollHeight, document.body.offsetHeight, document.documentElement.clientHeight, document.documentElement.scrollHeight, document.documentElement.offsetHeight) + \"px\"), this.prop.overlay = o(\"div\", {\n className: \"html2pdf__overlay\",\n style: {\n position: \"fixed\",\n overflow: \"hidden\",\n zIndex: 1e3,\n left: \"-100000px\",\n right: 0,\n bottom: 0,\n top: 0\n }\n }), this.prop.container = o(\"div\", {\n className: \"html2pdf__container\",\n style: t\n }), this.prop.container.appendChild(e), this.prop.container.firstChild.appendChild(o(\"div\", {\n style: {\n clear: \"both\",\n border: \"0 none transparent\",\n margin: 0,\n padding: 0,\n height: 0\n }\n })), this.prop.container.style[\"float\"] = \"none\", this.prop.overlay.appendChild(this.prop.container), document.body.appendChild(this.prop.overlay), this.prop.container.firstChild.style.position = \"relative\", this.prop.container.height = Math.max(this.prop.container.firstChild.clientHeight, this.prop.container.firstChild.scrollHeight, this.prop.container.firstChild.offsetHeight) + \"px\";\n });\n }, s.prototype.toCanvas = function () {\n var t = [function () {\n return document.body.contains(this.prop.container) || this.toContainer();\n }];\n return this.thenList(t).then(r).then(function (t) {\n var e = Object.assign({}, this.opt.html2canvas);\n return delete e.onrendered, t(this.prop.container, e);\n }).then(function (t) {\n (this.opt.html2canvas.onrendered || function () {})(t), this.prop.canvas = t, document.body.removeChild(this.prop.overlay);\n });\n }, s.prototype.toContext2d = function () {\n var t = [function () {\n return document.body.contains(this.prop.container) || this.toContainer();\n }];\n return this.thenList(t).then(r).then(function (t) {\n var e = this.opt.jsPDF,\n r = this.opt.fontFaces,\n n = \"number\" != typeof this.opt.width || isNaN(this.opt.width) || \"number\" != typeof this.opt.windowWidth || isNaN(this.opt.windowWidth) ? 1 : this.opt.width / this.opt.windowWidth,\n i = Object.assign({\n async: !0,\n allowTaint: !0,\n scale: n,\n scrollX: this.opt.scrollX || 0,\n scrollY: this.opt.scrollY || 0,\n backgroundColor: \"#ffffff\",\n imageTimeout: 15e3,\n logging: !0,\n proxy: null,\n removeContainer: !0,\n foreignObjectRendering: !1,\n useCORS: !1\n }, this.opt.html2canvas);\n if (delete i.onrendered, e.context2d.autoPaging = void 0 === this.opt.autoPaging || this.opt.autoPaging, e.context2d.posX = this.opt.x, e.context2d.posY = this.opt.y, e.context2d.margin = this.opt.margin, e.context2d.fontFaces = r, r) for (var a = 0; a < r.length; ++a) {\n var o = r[a],\n s = o.src.find(function (t) {\n return \"truetype\" === t.format;\n });\n s && e.addFont(s.url, o.ref.name, o.ref.style);\n }\n return i.windowHeight = i.windowHeight || 0, i.windowHeight = 0 == i.windowHeight ? Math.max(this.prop.container.clientHeight, this.prop.container.scrollHeight, this.prop.container.offsetHeight) : i.windowHeight, e.context2d.save(!0), t(this.prop.container, i);\n }).then(function (t) {\n this.opt.jsPDF.context2d.restore(!0), (this.opt.html2canvas.onrendered || function () {})(t), this.prop.canvas = t, document.body.removeChild(this.prop.overlay);\n });\n }, s.prototype.toImg = function () {\n return this.thenList([function () {\n return this.prop.canvas || this.toCanvas();\n }]).then(function () {\n var t = this.prop.canvas.toDataURL(\"image/\" + this.opt.image.type, this.opt.image.quality);\n this.prop.img = document.createElement(\"img\"), this.prop.img.src = t;\n });\n }, s.prototype.toPdf = function () {\n return this.thenList([function () {\n return this.toContext2d();\n }]).then(function () {\n this.prop.pdf = this.prop.pdf || this.opt.jsPDF;\n });\n }, s.prototype.output = function (t, e, r) {\n return \"img\" === (r = r || \"pdf\").toLowerCase() || \"image\" === r.toLowerCase() ? this.outputImg(t, e) : this.outputPdf(t, e);\n }, s.prototype.outputPdf = function (t, e) {\n return this.thenList([function () {\n return this.prop.pdf || this.toPdf();\n }]).then(function () {\n return this.prop.pdf.output(t, e);\n });\n }, s.prototype.outputImg = function (t) {\n return this.thenList([function () {\n return this.prop.img || this.toImg();\n }]).then(function () {\n switch (t) {\n case void 0:\n case \"img\":\n return this.prop.img;\n case \"datauristring\":\n case \"dataurlstring\":\n return this.prop.img.src;\n case \"datauri\":\n case \"dataurl\":\n return document.location.href = this.prop.img.src;\n default:\n throw 'Image output type \"' + t + '\" is not supported.';\n }\n });\n }, s.prototype.save = function (t) {\n return this.thenList([function () {\n return this.prop.pdf || this.toPdf();\n }]).set(t ? {\n filename: t\n } : null).then(function () {\n this.prop.pdf.save(this.opt.filename);\n });\n }, s.prototype.doCallback = function () {\n return this.thenList([function () {\n return this.prop.pdf || this.toPdf();\n }]).then(function () {\n this.prop.callback(this.prop.pdf);\n });\n }, s.prototype.set = function (t) {\n if (\"object\" !== a(t)) return this;\n var e = Object.keys(t || {}).map(function (e) {\n if (e in s.template.prop) return function () {\n this.prop[e] = t[e];\n };\n switch (e) {\n case \"margin\":\n return this.setMargin.bind(this, t.margin);\n case \"jsPDF\":\n return function () {\n return this.opt.jsPDF = t.jsPDF, this.setPageSize();\n };\n case \"pageSize\":\n return this.setPageSize.bind(this, t.pageSize);\n default:\n return function () {\n this.opt[e] = t[e];\n };\n }\n }, this);\n return this.then(function () {\n return this.thenList(e);\n });\n }, s.prototype.get = function (t, e) {\n return this.then(function () {\n var r = t in s.template.prop ? this.prop[t] : this.opt[t];\n return e ? e(r) : r;\n });\n }, s.prototype.setMargin = function (t) {\n return this.then(function () {\n switch (a(t)) {\n case \"number\":\n t = [t, t, t, t];\n case \"array\":\n if (2 === t.length && (t = [t[0], t[1], t[0], t[1]]), 4 === t.length) break;\n default:\n return this.error(\"Invalid margin array.\");\n }\n this.opt.margin = t;\n }).then(this.setPageSize);\n }, s.prototype.setPageSize = function (t) {\n function e(t, e) {\n return Math.floor(t * e / 72 * 96);\n }\n return this.then(function () {\n (t = t || E.getPageSize(this.opt.jsPDF)).hasOwnProperty(\"inner\") || (t.inner = {\n width: t.width - this.opt.margin[1] - this.opt.margin[3],\n height: t.height - this.opt.margin[0] - this.opt.margin[2]\n }, t.inner.px = {\n width: e(t.inner.width, t.k),\n height: e(t.inner.height, t.k)\n }, t.inner.ratio = t.inner.height / t.inner.width), this.prop.pageSize = t;\n });\n }, s.prototype.setProgress = function (t, e, r, n) {\n return null != t && (this.progress.val = t), null != e && (this.progress.state = e), null != r && (this.progress.n = r), null != n && (this.progress.stack = n), this.progress.ratio = this.progress.val / this.progress.state, this;\n }, s.prototype.updateProgress = function (t, e, r, n) {\n return this.setProgress(t ? this.progress.val + t : null, e || null, r ? this.progress.n + r : null, n ? this.progress.stack.concat(n) : null);\n }, s.prototype.then = function (t, e) {\n var r = this;\n return this.thenCore(t, e, function (t, e) {\n return r.updateProgress(null, null, 1, [t]), Promise.prototype.then.call(this, function (e) {\n return r.updateProgress(null, t), e;\n }).then(t, e).then(function (t) {\n return r.updateProgress(1), t;\n });\n });\n }, s.prototype.thenCore = function (t, e, r) {\n r = r || Promise.prototype.then;\n t && (t = t.bind(this)), e && (e = e.bind(this));\n var n = -1 !== Promise.toString().indexOf(\"[native code]\") && \"Promise\" === Promise.name ? this : s.convert(Object.assign({}, this), Promise.prototype),\n i = r.call(n, t, e);\n return s.convert(i, this.__proto__);\n }, s.prototype.thenExternal = function (t, e) {\n return Promise.prototype.then.call(this, t, e);\n }, s.prototype.thenList = function (t) {\n var e = this;\n return t.forEach(function (t) {\n e = e.thenCore(t);\n }), e;\n }, s.prototype[\"catch\"] = function (t) {\n t && (t = t.bind(this));\n var e = Promise.prototype[\"catch\"].call(this, t);\n return s.convert(e, this);\n }, s.prototype.catchExternal = function (t) {\n return Promise.prototype[\"catch\"].call(this, t);\n }, s.prototype.error = function (t) {\n return this.then(function () {\n throw new Error(t);\n });\n }, s.prototype.using = s.prototype.set, s.prototype.saveAs = s.prototype.save, s.prototype[\"export\"] = s.prototype.output, s.prototype.run = s.prototype.then, E.getPageSize = function (e, r, n) {\n if (\"object\" === t(e)) {\n var i = e;\n e = i.orientation, r = i.unit || r, n = i.format || n;\n }\n r = r || \"mm\", n = n || \"a4\", e = (\"\" + (e || \"P\")).toLowerCase();\n var a,\n o = (\"\" + n).toLowerCase(),\n s = {\n a0: [2383.94, 3370.39],\n a1: [1683.78, 2383.94],\n a2: [1190.55, 1683.78],\n a3: [841.89, 1190.55],\n a4: [595.28, 841.89],\n a5: [419.53, 595.28],\n a6: [297.64, 419.53],\n a7: [209.76, 297.64],\n a8: [147.4, 209.76],\n a9: [104.88, 147.4],\n a10: [73.7, 104.88],\n b0: [2834.65, 4008.19],\n b1: [2004.09, 2834.65],\n b2: [1417.32, 2004.09],\n b3: [1000.63, 1417.32],\n b4: [708.66, 1000.63],\n b5: [498.9, 708.66],\n b6: [354.33, 498.9],\n b7: [249.45, 354.33],\n b8: [175.75, 249.45],\n b9: [124.72, 175.75],\n b10: [87.87, 124.72],\n c0: [2599.37, 3676.54],\n c1: [1836.85, 2599.37],\n c2: [1298.27, 1836.85],\n c3: [918.43, 1298.27],\n c4: [649.13, 918.43],\n c5: [459.21, 649.13],\n c6: [323.15, 459.21],\n c7: [229.61, 323.15],\n c8: [161.57, 229.61],\n c9: [113.39, 161.57],\n c10: [79.37, 113.39],\n dl: [311.81, 623.62],\n letter: [612, 792],\n \"government-letter\": [576, 756],\n legal: [612, 1008],\n \"junior-legal\": [576, 360],\n ledger: [1224, 792],\n tabloid: [792, 1224],\n \"credit-card\": [153, 243]\n };\n switch (r) {\n case \"pt\":\n a = 1;\n break;\n case \"mm\":\n a = 72 / 25.4;\n break;\n case \"cm\":\n a = 72 / 2.54;\n break;\n case \"in\":\n a = 72;\n break;\n case \"px\":\n a = .75;\n break;\n case \"pc\":\n case \"em\":\n a = 12;\n break;\n case \"ex\":\n a = 6;\n break;\n default:\n throw \"Invalid unit: \" + r;\n }\n var c,\n u = 0,\n h = 0;\n if (s.hasOwnProperty(o)) u = s[o][1] / a, h = s[o][0] / a;else try {\n u = n[1], h = n[0];\n } catch (t) {\n throw new Error(\"Invalid format: \" + n);\n }\n if (\"p\" === e || \"portrait\" === e) e = \"p\", h > u && (c = h, h = u, u = c);else {\n if (\"l\" !== e && \"landscape\" !== e) throw \"Invalid orientation: \" + e;\n e = \"l\", u > h && (c = h, h = u, u = c);\n }\n return {\n width: h,\n height: u,\n unit: r,\n k: a,\n orientation: e\n };\n }, e.html = function (t, e) {\n (e = e || {}).callback = e.callback || function () {}, e.html2canvas = e.html2canvas || {}, e.html2canvas.canvas = e.html2canvas.canvas || this.canvas, e.jsPDF = e.jsPDF || this, e.fontFaces = e.fontFaces ? e.fontFaces.map(jt) : null;\n var r = new s(e);\n return e.worker ? r : r.from(t).doCallback();\n };\n}(E.API), E.API.addJS = function (t) {\n return Ht = t, this.internal.events.subscribe(\"postPutResources\", function () {\n Ut = this.internal.newObject(), this.internal.out(\"<<\"), this.internal.out(\"/Names [(EmbeddedJS) \" + (Ut + 1) + \" 0 R]\"), this.internal.out(\">>\"), this.internal.out(\"endobj\"), zt = this.internal.newObject(), this.internal.out(\"<<\"), this.internal.out(\"/S /JavaScript\"), this.internal.out(\"/JS (\" + Ht + \")\"), this.internal.out(\">>\"), this.internal.out(\"endobj\");\n }), this.internal.events.subscribe(\"putCatalog\", function () {\n void 0 !== Ut && void 0 !== zt && this.internal.out(\"/Names <>\");\n }), this;\n},\n/**\n * @license\n * Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\nfunction (t) {\n var e;\n t.events.push([\"postPutResources\", function () {\n var t = this,\n r = /^(\\d+) 0 obj$/;\n if (this.outline.root.children.length > 0) for (var n = t.outline.render().split(/\\r\\n/), i = 0; i < n.length; i++) {\n var a = n[i],\n o = r.exec(a);\n if (null != o) {\n var s = o[1];\n t.internal.newObjectDeferredBegin(s, !1);\n }\n t.internal.write(a);\n }\n if (this.outline.createNamedDestinations) {\n var c = this.internal.pages.length,\n u = [];\n for (i = 0; i < c; i++) {\n var h = t.internal.newObject();\n u.push(h);\n var l = t.internal.getPageInfo(i + 1);\n t.internal.write(\"<< /D[\" + l.objId + \" 0 R /XYZ null null null]>> endobj\");\n }\n var f = t.internal.newObject();\n t.internal.write(\"<< /Names [ \");\n for (i = 0; i < u.length; i++) t.internal.write(\"(page_\" + (i + 1) + \")\" + u[i] + \" 0 R\");\n t.internal.write(\" ] >>\", \"endobj\"), e = t.internal.newObject(), t.internal.write(\"<< /Dests \" + f + \" 0 R\"), t.internal.write(\">>\", \"endobj\");\n }\n }]), t.events.push([\"putCatalog\", function () {\n this.outline.root.children.length > 0 && (this.internal.write(\"/Outlines\", this.outline.makeRef(this.outline.root)), this.outline.createNamedDestinations && this.internal.write(\"/Names \" + e + \" 0 R\"));\n }]), t.events.push([\"initialized\", function () {\n var t = this;\n t.outline = {\n createNamedDestinations: !1,\n root: {\n children: []\n }\n }, t.outline.add = function (t, e, r) {\n var n = {\n title: e,\n options: r,\n children: []\n };\n return null == t && (t = this.root), t.children.push(n), n;\n }, t.outline.render = function () {\n return this.ctx = {}, this.ctx.val = \"\", this.ctx.pdf = t, this.genIds_r(this.root), this.renderRoot(this.root), this.renderItems(this.root), this.ctx.val;\n }, t.outline.genIds_r = function (e) {\n e.id = t.internal.newObjectDeferred();\n for (var r = 0; r < e.children.length; r++) this.genIds_r(e.children[r]);\n }, t.outline.renderRoot = function (t) {\n this.objStart(t), this.line(\"/Type /Outlines\"), t.children.length > 0 && (this.line(\"/First \" + this.makeRef(t.children[0])), this.line(\"/Last \" + this.makeRef(t.children[t.children.length - 1]))), this.line(\"/Count \" + this.count_r({\n count: 0\n }, t)), this.objEnd();\n }, t.outline.renderItems = function (e) {\n for (var r = this.ctx.pdf.internal.getVerticalCoordinateString, n = 0; n < e.children.length; n++) {\n var i = e.children[n];\n this.objStart(i), this.line(\"/Title \" + this.makeString(i.title)), this.line(\"/Parent \" + this.makeRef(e)), n > 0 && this.line(\"/Prev \" + this.makeRef(e.children[n - 1])), n < e.children.length - 1 && this.line(\"/Next \" + this.makeRef(e.children[n + 1])), i.children.length > 0 && (this.line(\"/First \" + this.makeRef(i.children[0])), this.line(\"/Last \" + this.makeRef(i.children[i.children.length - 1])));\n var a = this.count = this.count_r({\n count: 0\n }, i);\n if (a > 0 && this.line(\"/Count \" + a), i.options && i.options.pageNumber) {\n var o = t.internal.getPageInfo(i.options.pageNumber);\n this.line(\"/Dest [\" + o.objId + \" 0 R /XYZ 0 \" + r(0) + \" 0]\");\n }\n this.objEnd();\n }\n for (var s = 0; s < e.children.length; s++) this.renderItems(e.children[s]);\n }, t.outline.line = function (t) {\n this.ctx.val += t + \"\\r\\n\";\n }, t.outline.makeRef = function (t) {\n return t.id + \" 0 R\";\n }, t.outline.makeString = function (e) {\n return \"(\" + t.internal.pdfEscape(e) + \")\";\n }, t.outline.objStart = function (t) {\n this.ctx.val += \"\\r\\n\" + t.id + \" 0 obj\\r\\n<<\\r\\n\";\n }, t.outline.objEnd = function () {\n this.ctx.val += \">> \\r\\nendobj\\r\\n\";\n }, t.outline.count_r = function (t, e) {\n for (var r = 0; r < e.children.length; r++) t.count++, this.count_r(t, e.children[r]);\n return t.count;\n };\n }]);\n}(E.API),\n/**\n * @license\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\nfunction (t) {\n var e = [192, 193, 194, 195, 196, 197, 198, 199];\n t.processJPEG = function (t, r, n, i, a, o) {\n var s,\n c = this.decode.DCT_DECODE,\n u = null;\n if (\"string\" == typeof t || this.__addimage__.isArrayBuffer(t) || this.__addimage__.isArrayBufferView(t)) {\n switch (t = a || t, t = this.__addimage__.isArrayBuffer(t) ? new Uint8Array(t) : t, (s = function (t) {\n for (var r, n = 256 * t.charCodeAt(4) + t.charCodeAt(5), i = t.length, a = {\n width: 0,\n height: 0,\n numcomponents: 1\n }, o = 4; o < i; o += 2) {\n if (o += n, -1 !== e.indexOf(t.charCodeAt(o + 1))) {\n r = 256 * t.charCodeAt(o + 5) + t.charCodeAt(o + 6), a = {\n width: 256 * t.charCodeAt(o + 7) + t.charCodeAt(o + 8),\n height: r,\n numcomponents: t.charCodeAt(o + 9)\n };\n break;\n }\n n = 256 * t.charCodeAt(o + 2) + t.charCodeAt(o + 3);\n }\n return a;\n }(t = this.__addimage__.isArrayBufferView(t) ? this.__addimage__.arrayBufferToBinaryString(t) : t)).numcomponents) {\n case 1:\n o = this.color_spaces.DEVICE_GRAY;\n break;\n case 4:\n o = this.color_spaces.DEVICE_CMYK;\n break;\n case 3:\n o = this.color_spaces.DEVICE_RGB;\n }\n u = {\n data: t,\n width: s.width,\n height: s.height,\n colorSpace: o,\n bitsPerComponent: 8,\n filter: c,\n index: r,\n alias: n\n };\n }\n return u;\n };\n}(E.API);\nvar Vt,\n Gt,\n Yt,\n Jt,\n Xt,\n Kt = function () {\n var t, e, i;\n function a(t) {\n var e, r, n, i, a, o, s, c, u, h, l, f, d, p;\n for (this.data = t, this.pos = 8, this.palette = [], this.imgData = [], this.transparency = {}, this.animation = null, this.text = {}, o = null;;) {\n switch (e = this.readUInt32(), u = function () {\n var t, e;\n for (e = [], t = 0; t < 4; ++t) e.push(String.fromCharCode(this.data[this.pos++]));\n return e;\n }.call(this).join(\"\")) {\n case \"IHDR\":\n this.width = this.readUInt32(), this.height = this.readUInt32(), this.bits = this.data[this.pos++], this.colorType = this.data[this.pos++], this.compressionMethod = this.data[this.pos++], this.filterMethod = this.data[this.pos++], this.interlaceMethod = this.data[this.pos++];\n break;\n case \"acTL\":\n this.animation = {\n numFrames: this.readUInt32(),\n numPlays: this.readUInt32() || 1 / 0,\n frames: []\n };\n break;\n case \"PLTE\":\n this.palette = this.read(e);\n break;\n case \"fcTL\":\n o && this.animation.frames.push(o), this.pos += 4, o = {\n width: this.readUInt32(),\n height: this.readUInt32(),\n xOffset: this.readUInt32(),\n yOffset: this.readUInt32()\n }, a = this.readUInt16(), i = this.readUInt16() || 100, o.delay = 1e3 * a / i, o.disposeOp = this.data[this.pos++], o.blendOp = this.data[this.pos++], o.data = [];\n break;\n case \"IDAT\":\n case \"fdAT\":\n for (\"fdAT\" === u && (this.pos += 4, e -= 4), t = (null != o ? o.data : void 0) || this.imgData, f = 0; 0 <= e ? f < e : f > e; 0 <= e ? ++f : --f) t.push(this.data[this.pos++]);\n break;\n case \"tRNS\":\n switch (this.transparency = {}, this.colorType) {\n case 3:\n if (n = this.palette.length / 3, this.transparency.indexed = this.read(e), this.transparency.indexed.length > n) throw new Error(\"More transparent colors than palette size\");\n if ((h = n - this.transparency.indexed.length) > 0) for (d = 0; 0 <= h ? d < h : d > h; 0 <= h ? ++d : --d) this.transparency.indexed.push(255);\n break;\n case 0:\n this.transparency.grayscale = this.read(e)[0];\n break;\n case 2:\n this.transparency.rgb = this.read(e);\n }\n break;\n case \"tEXt\":\n s = (l = this.read(e)).indexOf(0), c = String.fromCharCode.apply(String, l.slice(0, s)), this.text[c] = String.fromCharCode.apply(String, l.slice(s + 1));\n break;\n case \"IEND\":\n return o && this.animation.frames.push(o), this.colors = function () {\n switch (this.colorType) {\n case 0:\n case 3:\n case 4:\n return 1;\n case 2:\n case 6:\n return 3;\n }\n }.call(this), this.hasAlphaChannel = 4 === (p = this.colorType) || 6 === p, r = this.colors + (this.hasAlphaChannel ? 1 : 0), this.pixelBitlength = this.bits * r, this.colorSpace = function () {\n switch (this.colors) {\n case 1:\n return \"DeviceGray\";\n case 3:\n return \"DeviceRGB\";\n }\n }.call(this), void (this.imgData = new Uint8Array(this.imgData));\n default:\n this.pos += e;\n }\n if (this.pos += 4, this.pos > this.data.length) throw new Error(\"Incomplete or corrupt PNG file\");\n }\n }\n a.prototype.read = function (t) {\n var e, r;\n for (r = [], e = 0; 0 <= t ? e < t : e > t; 0 <= t ? ++e : --e) r.push(this.data[this.pos++]);\n return r;\n }, a.prototype.readUInt32 = function () {\n return this.data[this.pos++] << 24 | this.data[this.pos++] << 16 | this.data[this.pos++] << 8 | this.data[this.pos++];\n }, a.prototype.readUInt16 = function () {\n return this.data[this.pos++] << 8 | this.data[this.pos++];\n }, a.prototype.decodePixels = function (t) {\n var e = this.pixelBitlength / 8,\n n = new Uint8Array(this.width * this.height * e),\n i = 0,\n a = this;\n if (null == t && (t = this.imgData), 0 === t.length) return new Uint8Array(0);\n function o(r, o, s, c) {\n var u,\n h,\n l,\n f,\n d,\n p,\n g,\n m,\n v,\n b,\n y,\n w,\n N,\n L,\n A,\n x,\n S,\n _,\n P,\n k,\n I,\n F = Math.ceil((a.width - r) / s),\n C = Math.ceil((a.height - o) / c),\n j = a.width == F && a.height == C;\n for (L = e * F, w = j ? n : new Uint8Array(L * C), p = t.length, N = 0, h = 0; N < C && i < p;) {\n switch (t[i++]) {\n case 0:\n for (f = S = 0; S < L; f = S += 1) w[h++] = t[i++];\n break;\n case 1:\n for (f = _ = 0; _ < L; f = _ += 1) u = t[i++], d = f < e ? 0 : w[h - e], w[h++] = (u + d) % 256;\n break;\n case 2:\n for (f = P = 0; P < L; f = P += 1) u = t[i++], l = (f - f % e) / e, A = N && w[(N - 1) * L + l * e + f % e], w[h++] = (A + u) % 256;\n break;\n case 3:\n for (f = k = 0; k < L; f = k += 1) u = t[i++], l = (f - f % e) / e, d = f < e ? 0 : w[h - e], A = N && w[(N - 1) * L + l * e + f % e], w[h++] = (u + Math.floor((d + A) / 2)) % 256;\n break;\n case 4:\n for (f = I = 0; I < L; f = I += 1) u = t[i++], l = (f - f % e) / e, d = f < e ? 0 : w[h - e], 0 === N ? A = x = 0 : (A = w[(N - 1) * L + l * e + f % e], x = l && w[(N - 1) * L + (l - 1) * e + f % e]), g = d + A - x, m = Math.abs(g - d), b = Math.abs(g - A), y = Math.abs(g - x), v = m <= b && m <= y ? d : b <= y ? A : x, w[h++] = (u + v) % 256;\n break;\n default:\n throw new Error(\"Invalid filter algorithm: \" + t[i - 1]);\n }\n if (!j) {\n var O = ((o + N * c) * a.width + r) * e,\n B = N * L;\n for (f = 0; f < F; f += 1) {\n for (var M = 0; M < e; M += 1) n[O++] = w[B++];\n O += (s - 1) * e;\n }\n }\n N++;\n }\n }\n return t = r(t), 1 == a.interlaceMethod ? (o(0, 0, 8, 8), o(4, 0, 8, 8), o(0, 4, 4, 8), o(2, 0, 4, 4), o(0, 2, 2, 4), o(1, 0, 2, 2), o(0, 1, 1, 2)) : o(0, 0, 1, 1), n;\n }, a.prototype.decodePalette = function () {\n var t, e, r, n, i, a, o, s, c;\n for (r = this.palette, a = this.transparency.indexed || [], i = new Uint8Array((a.length || 0) + r.length), n = 0, t = 0, e = o = 0, s = r.length; o < s; e = o += 3) i[n++] = r[e], i[n++] = r[e + 1], i[n++] = r[e + 2], i[n++] = null != (c = a[t++]) ? c : 255;\n return i;\n }, a.prototype.copyToImageData = function (t, e) {\n var r, n, i, a, o, s, c, u, h, l, f;\n if (n = this.colors, h = null, r = this.hasAlphaChannel, this.palette.length && (h = null != (f = this._decodedPalette) ? f : this._decodedPalette = this.decodePalette(), n = 4, r = !0), u = (i = t.data || t).length, o = h || e, a = s = 0, 1 === n) for (; a < u;) c = h ? 4 * e[a / 4] : s, l = o[c++], i[a++] = l, i[a++] = l, i[a++] = l, i[a++] = r ? o[c++] : 255, s = c;else for (; a < u;) c = h ? 4 * e[a / 4] : s, i[a++] = o[c++], i[a++] = o[c++], i[a++] = o[c++], i[a++] = r ? o[c++] : 255, s = c;\n }, a.prototype.decode = function () {\n var t;\n return t = new Uint8Array(this.width * this.height * 4), this.copyToImageData(t, this.decodePixels()), t;\n };\n var o = function o() {\n if (\"[object Window]\" === Object.prototype.toString.call(n)) {\n try {\n e = n.document.createElement(\"canvas\"), i = e.getContext(\"2d\");\n } catch (t) {\n return !1;\n }\n return !0;\n }\n return !1;\n };\n return o(), t = function t(_t4) {\n var r;\n if (!0 === o()) return i.width = _t4.width, i.height = _t4.height, i.clearRect(0, 0, _t4.width, _t4.height), i.putImageData(_t4, 0, 0), (r = new Image()).src = e.toDataURL(), r;\n throw new Error(\"This method requires a Browser with Canvas-capability.\");\n }, a.prototype.decodeFrames = function (e) {\n var r, n, i, a, o, s, c, u;\n if (this.animation) {\n for (u = [], n = o = 0, s = (c = this.animation.frames).length; o < s; n = ++o) r = c[n], i = e.createImageData(r.width, r.height), a = this.decodePixels(new Uint8Array(r.data)), this.copyToImageData(i, a), r.imageData = i, u.push(r.image = t(i));\n return u;\n }\n }, a.prototype.renderFrame = function (t, e) {\n var r, n, i;\n return r = (n = this.animation.frames)[e], i = n[e - 1], 0 === e && t.clearRect(0, 0, this.width, this.height), 1 === (null != i ? i.disposeOp : void 0) ? t.clearRect(i.xOffset, i.yOffset, i.width, i.height) : 2 === (null != i ? i.disposeOp : void 0) && t.putImageData(i.imageData, i.xOffset, i.yOffset), 0 === r.blendOp && t.clearRect(r.xOffset, r.yOffset, r.width, r.height), t.drawImage(r.image, r.xOffset, r.yOffset);\n }, a.prototype.animate = function (t) {\n var _e2,\n r,\n n,\n i,\n a,\n o,\n s = this;\n return r = 0, o = this.animation, i = o.numFrames, n = o.frames, a = o.numPlays, (_e2 = function e() {\n var o, c;\n if (o = r++ % i, c = n[o], s.renderFrame(t, o), i > 1 && r / i < a) return s.animation._timeout = setTimeout(_e2, c.delay);\n })();\n }, a.prototype.stopAnimation = function () {\n var t;\n return clearTimeout(null != (t = this.animation) ? t._timeout : void 0);\n }, a.prototype.render = function (t) {\n var e, r;\n return t._png && t._png.stopAnimation(), t._png = this, t.width = this.width, t.height = this.height, e = t.getContext(\"2d\"), this.animation ? (this.decodeFrames(e), this.animate(e)) : (r = e.createImageData(this.width, this.height), this.copyToImageData(r, this.decodePixels()), e.putImageData(r, 0, 0));\n }, a;\n }();\n/**\n * @license\n *\n * Copyright (c) 2014 James Robb, https://github.com/jamesbrobb\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n/**\n * @license\n * (c) Dean McNamee , 2013.\n *\n * https://github.com/deanm/omggif\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n *\n * omggif is a JavaScript implementation of a GIF 89a encoder and decoder,\n * including animation and compression. It does not rely on any specific\n * underlying system, so should run in the browser, Node, or Plask.\n */\nfunction Zt(t) {\n var e = 0;\n if (71 !== t[e++] || 73 !== t[e++] || 70 !== t[e++] || 56 !== t[e++] || 56 != (t[e++] + 1 & 253) || 97 !== t[e++]) throw new Error(\"Invalid GIF 87a/89a header.\");\n var r = t[e++] | t[e++] << 8,\n n = t[e++] | t[e++] << 8,\n i = t[e++],\n a = i >> 7,\n o = 1 << (7 & i) + 1;\n t[e++];\n t[e++];\n var s = null,\n c = null;\n a && (s = e, c = o, e += 3 * o);\n var u = !0,\n h = [],\n l = 0,\n f = null,\n d = 0,\n p = null;\n for (this.width = r, this.height = n; u && e < t.length;) switch (t[e++]) {\n case 33:\n switch (t[e++]) {\n case 255:\n if (11 !== t[e] || 78 == t[e + 1] && 69 == t[e + 2] && 84 == t[e + 3] && 83 == t[e + 4] && 67 == t[e + 5] && 65 == t[e + 6] && 80 == t[e + 7] && 69 == t[e + 8] && 50 == t[e + 9] && 46 == t[e + 10] && 48 == t[e + 11] && 3 == t[e + 12] && 1 == t[e + 13] && 0 == t[e + 16]) e += 14, p = t[e++] | t[e++] << 8, e++;else for (e += 12;;) {\n if (!((P = t[e++]) >= 0)) throw Error(\"Invalid block size\");\n if (0 === P) break;\n e += P;\n }\n break;\n case 249:\n if (4 !== t[e++] || 0 !== t[e + 4]) throw new Error(\"Invalid graphics extension block.\");\n var g = t[e++];\n l = t[e++] | t[e++] << 8, f = t[e++], 0 == (1 & g) && (f = null), d = g >> 2 & 7, e++;\n break;\n case 254:\n for (;;) {\n if (!((P = t[e++]) >= 0)) throw Error(\"Invalid block size\");\n if (0 === P) break;\n e += P;\n }\n break;\n default:\n throw new Error(\"Unknown graphic control label: 0x\" + t[e - 1].toString(16));\n }\n break;\n case 44:\n var m = t[e++] | t[e++] << 8,\n v = t[e++] | t[e++] << 8,\n b = t[e++] | t[e++] << 8,\n y = t[e++] | t[e++] << 8,\n w = t[e++],\n N = w >> 6 & 1,\n L = 1 << (7 & w) + 1,\n A = s,\n x = c,\n S = !1;\n if (w >> 7) {\n S = !0;\n A = e, x = L, e += 3 * L;\n }\n var _ = e;\n for (e++;;) {\n var P;\n if (!((P = t[e++]) >= 0)) throw Error(\"Invalid block size\");\n if (0 === P) break;\n e += P;\n }\n h.push({\n x: m,\n y: v,\n width: b,\n height: y,\n has_local_palette: S,\n palette_offset: A,\n palette_size: x,\n data_offset: _,\n data_length: e - _,\n transparent_index: f,\n interlaced: !!N,\n delay: l,\n disposal: d\n });\n break;\n case 59:\n u = !1;\n break;\n default:\n throw new Error(\"Unknown gif block: 0x\" + t[e - 1].toString(16));\n }\n this.numFrames = function () {\n return h.length;\n }, this.loopCount = function () {\n return p;\n }, this.frameInfo = function (t) {\n if (t < 0 || t >= h.length) throw new Error(\"Frame index out of range.\");\n return h[t];\n }, this.decodeAndBlitFrameBGRA = function (e, n) {\n var i = this.frameInfo(e),\n a = i.width * i.height,\n o = new Uint8Array(a);\n $t(t, i.data_offset, o, a);\n var s = i.palette_offset,\n c = i.transparent_index;\n null === c && (c = 256);\n var u = i.width,\n h = r - u,\n l = u,\n f = 4 * (i.y * r + i.x),\n d = 4 * ((i.y + i.height) * r + i.x),\n p = f,\n g = 4 * h;\n !0 === i.interlaced && (g += 4 * r * 7);\n for (var m = 8, v = 0, b = o.length; v < b; ++v) {\n var y = o[v];\n if (0 === l && (l = u, (p += g) >= d && (g = 4 * h + 4 * r * (m - 1), p = f + (u + h) * (m << 1), m >>= 1)), y === c) p += 4;else {\n var w = t[s + 3 * y],\n N = t[s + 3 * y + 1],\n L = t[s + 3 * y + 2];\n n[p++] = L, n[p++] = N, n[p++] = w, n[p++] = 255;\n }\n --l;\n }\n }, this.decodeAndBlitFrameRGBA = function (e, n) {\n var i = this.frameInfo(e),\n a = i.width * i.height,\n o = new Uint8Array(a);\n $t(t, i.data_offset, o, a);\n var s = i.palette_offset,\n c = i.transparent_index;\n null === c && (c = 256);\n var u = i.width,\n h = r - u,\n l = u,\n f = 4 * (i.y * r + i.x),\n d = 4 * ((i.y + i.height) * r + i.x),\n p = f,\n g = 4 * h;\n !0 === i.interlaced && (g += 4 * r * 7);\n for (var m = 8, v = 0, b = o.length; v < b; ++v) {\n var y = o[v];\n if (0 === l && (l = u, (p += g) >= d && (g = 4 * h + 4 * r * (m - 1), p = f + (u + h) * (m << 1), m >>= 1)), y === c) p += 4;else {\n var w = t[s + 3 * y],\n N = t[s + 3 * y + 1],\n L = t[s + 3 * y + 2];\n n[p++] = w, n[p++] = N, n[p++] = L, n[p++] = 255;\n }\n --l;\n }\n };\n}\nfunction $t(t, e, r, n) {\n for (var i = t[e++], o = 1 << i, s = o + 1, c = s + 1, u = i + 1, h = (1 << u) - 1, l = 0, f = 0, d = 0, p = t[e++], g = new Int32Array(4096), m = null;;) {\n for (; l < 16 && 0 !== p;) f |= t[e++] << l, l += 8, 1 === p ? p = t[e++] : --p;\n if (l < u) break;\n var v = f & h;\n if (f >>= u, l -= u, v !== o) {\n if (v === s) break;\n for (var b = v < c ? v : m, y = 0, w = b; w > o;) w = g[w] >> 8, ++y;\n var N = w;\n if (d + y + (b !== v ? 1 : 0) > n) return void a.log(\"Warning, gif stream longer than expected.\");\n r[d++] = N;\n var L = d += y;\n for (b !== v && (r[d++] = N), w = b; y--;) w = g[w], r[--L] = 255 & w, w >>= 8;\n null !== m && c < 4096 && (g[c++] = m << 8 | N, c >= h + 1 && u < 12 && (++u, h = h << 1 | 1)), m = v;\n } else c = s + 1, h = (1 << (u = i + 1)) - 1, m = null;\n }\n return d !== n && a.log(\"Warning, gif stream shorter than expected.\"), r;\n}\n/**\n * @license\n Copyright (c) 2008, Adobe Systems Incorporated\n All rights reserved.\n\n Redistribution and use in source and binary forms, with or without \n modification, are permitted provided that the following conditions are\n met:\n\n * Redistributions of source code must retain the above copyright notice, \n this list of conditions and the following disclaimer.\n \n * Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the \n documentation and/or other materials provided with the distribution.\n \n * Neither the name of Adobe Systems Incorporated nor the names of its \n contributors may be used to endorse or promote products derived from \n this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS\n IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\n THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \n CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\nfunction Qt(t) {\n var e,\n r,\n n,\n i,\n a,\n o = Math.floor,\n s = new Array(64),\n c = new Array(64),\n u = new Array(64),\n h = new Array(64),\n l = new Array(65535),\n f = new Array(65535),\n d = new Array(64),\n p = new Array(64),\n g = [],\n m = 0,\n v = 7,\n b = new Array(64),\n y = new Array(64),\n w = new Array(64),\n N = new Array(256),\n L = new Array(2048),\n A = [0, 1, 5, 6, 14, 15, 27, 28, 2, 4, 7, 13, 16, 26, 29, 42, 3, 8, 12, 17, 25, 30, 41, 43, 9, 11, 18, 24, 31, 40, 44, 53, 10, 19, 23, 32, 39, 45, 52, 54, 20, 22, 33, 38, 46, 51, 55, 60, 21, 34, 37, 47, 50, 56, 59, 61, 35, 36, 48, 49, 57, 58, 62, 63],\n x = [0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0],\n S = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11],\n _ = [0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 125],\n P = [1, 2, 3, 0, 4, 17, 5, 18, 33, 49, 65, 6, 19, 81, 97, 7, 34, 113, 20, 50, 129, 145, 161, 8, 35, 66, 177, 193, 21, 82, 209, 240, 36, 51, 98, 114, 130, 9, 10, 22, 23, 24, 25, 26, 37, 38, 39, 40, 41, 42, 52, 53, 54, 55, 56, 57, 58, 67, 68, 69, 70, 71, 72, 73, 74, 83, 84, 85, 86, 87, 88, 89, 90, 99, 100, 101, 102, 103, 104, 105, 106, 115, 116, 117, 118, 119, 120, 121, 122, 131, 132, 133, 134, 135, 136, 137, 138, 146, 147, 148, 149, 150, 151, 152, 153, 154, 162, 163, 164, 165, 166, 167, 168, 169, 170, 178, 179, 180, 181, 182, 183, 184, 185, 186, 194, 195, 196, 197, 198, 199, 200, 201, 202, 210, 211, 212, 213, 214, 215, 216, 217, 218, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250],\n k = [0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0],\n I = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11],\n F = [0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 119],\n C = [0, 1, 2, 3, 17, 4, 5, 33, 49, 6, 18, 65, 81, 7, 97, 113, 19, 34, 50, 129, 8, 20, 66, 145, 161, 177, 193, 9, 35, 51, 82, 240, 21, 98, 114, 209, 10, 22, 36, 52, 225, 37, 241, 23, 24, 25, 26, 38, 39, 40, 41, 42, 53, 54, 55, 56, 57, 58, 67, 68, 69, 70, 71, 72, 73, 74, 83, 84, 85, 86, 87, 88, 89, 90, 99, 100, 101, 102, 103, 104, 105, 106, 115, 116, 117, 118, 119, 120, 121, 122, 130, 131, 132, 133, 134, 135, 136, 137, 138, 146, 147, 148, 149, 150, 151, 152, 153, 154, 162, 163, 164, 165, 166, 167, 168, 169, 170, 178, 179, 180, 181, 182, 183, 184, 185, 186, 194, 195, 196, 197, 198, 199, 200, 201, 202, 210, 211, 212, 213, 214, 215, 216, 217, 218, 226, 227, 228, 229, 230, 231, 232, 233, 234, 242, 243, 244, 245, 246, 247, 248, 249, 250];\n function j(t, e) {\n for (var r = 0, n = 0, i = new Array(), a = 1; a <= 16; a++) {\n for (var o = 1; o <= t[a]; o++) i[e[n]] = [], i[e[n]][0] = r, i[e[n]][1] = a, n++, r++;\n r *= 2;\n }\n return i;\n }\n function O(t) {\n for (var e = t[0], r = t[1] - 1; r >= 0;) e & 1 << r && (m |= 1 << v), r--, --v < 0 && (255 == m ? (B(255), B(0)) : B(m), v = 7, m = 0);\n }\n function B(t) {\n g.push(t);\n }\n function M(t) {\n B(t >> 8 & 255), B(255 & t);\n }\n function E(t, e, r, n, i) {\n for (var a, o = i[0], s = i[240], c = function (t, e) {\n var r,\n n,\n i,\n a,\n o,\n s,\n c,\n u,\n h,\n l,\n f = 0;\n for (h = 0; h < 8; ++h) {\n r = t[f], n = t[f + 1], i = t[f + 2], a = t[f + 3], o = t[f + 4], s = t[f + 5], c = t[f + 6];\n var p = r + (u = t[f + 7]),\n g = r - u,\n m = n + c,\n v = n - c,\n b = i + s,\n y = i - s,\n w = a + o,\n N = a - o,\n L = p + w,\n A = p - w,\n x = m + b,\n S = m - b;\n t[f] = L + x, t[f + 4] = L - x;\n var _ = .707106781 * (S + A);\n t[f + 2] = A + _, t[f + 6] = A - _;\n var P = .382683433 * ((L = N + y) - (S = v + g)),\n k = .5411961 * L + P,\n I = 1.306562965 * S + P,\n F = .707106781 * (x = y + v),\n C = g + F,\n j = g - F;\n t[f + 5] = j + k, t[f + 3] = j - k, t[f + 1] = C + I, t[f + 7] = C - I, f += 8;\n }\n for (f = 0, h = 0; h < 8; ++h) {\n r = t[f], n = t[f + 8], i = t[f + 16], a = t[f + 24], o = t[f + 32], s = t[f + 40], c = t[f + 48];\n var O = r + (u = t[f + 56]),\n B = r - u,\n M = n + c,\n E = n - c,\n q = i + s,\n D = i - s,\n R = a + o,\n T = a - o,\n U = O + R,\n z = O - R,\n H = M + q,\n W = M - q;\n t[f] = U + H, t[f + 32] = U - H;\n var V = .707106781 * (W + z);\n t[f + 16] = z + V, t[f + 48] = z - V;\n var G = .382683433 * ((U = T + D) - (W = E + B)),\n Y = .5411961 * U + G,\n J = 1.306562965 * W + G,\n X = .707106781 * (H = D + E),\n K = B + X,\n Z = B - X;\n t[f + 40] = Z + Y, t[f + 24] = Z - Y, t[f + 8] = K + J, t[f + 56] = K - J, f++;\n }\n for (h = 0; h < 64; ++h) l = t[h] * e[h], d[h] = l > 0 ? l + .5 | 0 : l - .5 | 0;\n return d;\n }(t, e), u = 0; u < 64; ++u) p[A[u]] = c[u];\n var h = p[0] - r;\n r = p[0], 0 == h ? O(n[0]) : (O(n[f[a = 32767 + h]]), O(l[a]));\n for (var g = 63; g > 0 && 0 == p[g];) g--;\n if (0 == g) return O(o), r;\n for (var m, v = 1; v <= g;) {\n for (var b = v; 0 == p[v] && v <= g;) ++v;\n var y = v - b;\n if (y >= 16) {\n m = y >> 4;\n for (var w = 1; w <= m; ++w) O(s);\n y &= 15;\n }\n a = 32767 + p[v], O(i[(y << 4) + f[a]]), O(l[a]), v++;\n }\n return 63 != g && O(o), r;\n }\n function q(t) {\n (t = Math.min(Math.max(t, 1), 100), a != t) && (!function (t) {\n for (var e = [16, 11, 10, 16, 24, 40, 51, 61, 12, 12, 14, 19, 26, 58, 60, 55, 14, 13, 16, 24, 40, 57, 69, 56, 14, 17, 22, 29, 51, 87, 80, 62, 18, 22, 37, 56, 68, 109, 103, 77, 24, 35, 55, 64, 81, 104, 113, 92, 49, 64, 78, 87, 103, 121, 120, 101, 72, 92, 95, 98, 112, 100, 103, 99], r = 0; r < 64; r++) {\n var n = o((e[r] * t + 50) / 100);\n n = Math.min(Math.max(n, 1), 255), s[A[r]] = n;\n }\n for (var i = [17, 18, 24, 47, 99, 99, 99, 99, 18, 21, 26, 66, 99, 99, 99, 99, 24, 26, 56, 99, 99, 99, 99, 99, 47, 66, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99], a = 0; a < 64; a++) {\n var l = o((i[a] * t + 50) / 100);\n l = Math.min(Math.max(l, 1), 255), c[A[a]] = l;\n }\n for (var f = [1, 1.387039845, 1.306562965, 1.175875602, 1, .785694958, .5411961, .275899379], d = 0, p = 0; p < 8; p++) for (var g = 0; g < 8; g++) u[d] = 1 / (s[A[d]] * f[p] * f[g] * 8), h[d] = 1 / (c[A[d]] * f[p] * f[g] * 8), d++;\n }(t < 50 ? Math.floor(5e3 / t) : Math.floor(200 - 2 * t)), a = t);\n }\n this.encode = function (t, a) {\n a && q(a), g = new Array(), m = 0, v = 7, M(65496), M(65504), M(16), B(74), B(70), B(73), B(70), B(0), B(1), B(1), B(0), M(1), M(1), B(0), B(0), function () {\n M(65499), M(132), B(0);\n for (var t = 0; t < 64; t++) B(s[t]);\n B(1);\n for (var e = 0; e < 64; e++) B(c[e]);\n }(), function (t, e) {\n M(65472), M(17), B(8), M(e), M(t), B(3), B(1), B(17), B(0), B(2), B(17), B(1), B(3), B(17), B(1);\n }(t.width, t.height), function () {\n M(65476), M(418), B(0);\n for (var t = 0; t < 16; t++) B(x[t + 1]);\n for (var e = 0; e <= 11; e++) B(S[e]);\n B(16);\n for (var r = 0; r < 16; r++) B(_[r + 1]);\n for (var n = 0; n <= 161; n++) B(P[n]);\n B(1);\n for (var i = 0; i < 16; i++) B(k[i + 1]);\n for (var a = 0; a <= 11; a++) B(I[a]);\n B(17);\n for (var o = 0; o < 16; o++) B(F[o + 1]);\n for (var s = 0; s <= 161; s++) B(C[s]);\n }(), M(65498), M(12), B(3), B(1), B(0), B(2), B(17), B(3), B(17), B(0), B(63), B(0);\n var o = 0,\n l = 0,\n f = 0;\n m = 0, v = 7, this.encode.displayName = \"_encode_\";\n for (var d, p, N, A, j, D, R, T, U, z = t.data, H = t.width, W = t.height, V = 4 * H, G = 0; G < W;) {\n for (d = 0; d < V;) {\n for (j = V * G + d, R = -1, T = 0, U = 0; U < 64; U++) D = j + (T = U >> 3) * V + (R = 4 * (7 & U)), G + T >= W && (D -= V * (G + 1 + T - W)), d + R >= V && (D -= d + R - V + 4), p = z[D++], N = z[D++], A = z[D++], b[U] = (L[p] + L[N + 256 >> 0] + L[A + 512 >> 0] >> 16) - 128, y[U] = (L[p + 768 >> 0] + L[N + 1024 >> 0] + L[A + 1280 >> 0] >> 16) - 128, w[U] = (L[p + 1280 >> 0] + L[N + 1536 >> 0] + L[A + 1792 >> 0] >> 16) - 128;\n o = E(b, u, o, e, n), l = E(y, h, l, r, i), f = E(w, h, f, r, i), d += 32;\n }\n G += 8;\n }\n if (v >= 0) {\n var Y = [];\n Y[1] = v + 1, Y[0] = (1 << v + 1) - 1, O(Y);\n }\n return M(65497), new Uint8Array(g);\n }, t = t || 50, function () {\n for (var t = String.fromCharCode, e = 0; e < 256; e++) N[e] = t(e);\n }(), e = j(x, S), r = j(k, I), n = j(_, P), i = j(F, C), function () {\n for (var t = 1, e = 2, r = 1; r <= 15; r++) {\n for (var n = t; n < e; n++) f[32767 + n] = r, l[32767 + n] = [], l[32767 + n][1] = r, l[32767 + n][0] = n;\n for (var i = -(e - 1); i <= -t; i++) f[32767 + i] = r, l[32767 + i] = [], l[32767 + i][1] = r, l[32767 + i][0] = e - 1 + i;\n t <<= 1, e <<= 1;\n }\n }(), function () {\n for (var t = 0; t < 256; t++) L[t] = 19595 * t, L[t + 256 >> 0] = 38470 * t, L[t + 512 >> 0] = 7471 * t + 32768, L[t + 768 >> 0] = -11059 * t, L[t + 1024 >> 0] = -21709 * t, L[t + 1280 >> 0] = 32768 * t + 8421375, L[t + 1536 >> 0] = -27439 * t, L[t + 1792 >> 0] = -5329 * t;\n }(), q(t);\n}\n/**\n * @license\n * Copyright (c) 2017 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\nfunction te(t, e) {\n if (this.pos = 0, this.buffer = t, this.datav = new DataView(t.buffer), this.is_with_alpha = !!e, this.bottom_up = !0, this.flag = String.fromCharCode(this.buffer[0]) + String.fromCharCode(this.buffer[1]), this.pos += 2, -1 === [\"BM\", \"BA\", \"CI\", \"CP\", \"IC\", \"PT\"].indexOf(this.flag)) throw new Error(\"Invalid BMP File\");\n this.parseHeader(), this.parseBGR();\n}\nfunction ee(t) {\n function e(t) {\n if (!t) throw Error(\"assert :P\");\n }\n function r(t, e, r) {\n for (var n = 0; 4 > n; n++) if (t[e + n] != r.charCodeAt(n)) return !0;\n return !1;\n }\n function n(t, e, r, n, i) {\n for (var a = 0; a < i; a++) t[e + a] = r[n + a];\n }\n function i(t, e, r, n) {\n for (var i = 0; i < n; i++) t[e + i] = r;\n }\n function a(t) {\n return new Int32Array(t);\n }\n function o(t, e) {\n for (var r = [], n = 0; n < t; n++) r.push(new e());\n return r;\n }\n function s(t, e) {\n var r = [];\n return function t(r, n, i) {\n for (var a = i[n], o = 0; o < a && (r.push(i.length > n + 1 ? [] : new e()), !(i.length < n + 1)); o++) t(r[o], n + 1, i);\n }(r, 0, t), r;\n }\n var c = function c() {\n var t = this;\n function c(t, e) {\n for (var r = 1 << e - 1 >>> 0; t & r;) r >>>= 1;\n return r ? (t & r - 1) + r : t;\n }\n function u(t, r, n, i, a) {\n e(!(i % n));\n do {\n t[r + (i -= n)] = a;\n } while (0 < i);\n }\n function h(t, r, n, i, o) {\n if (e(2328 >= o), 512 >= o) var s = a(512);else if (null == (s = a(o))) return 0;\n return function (t, r, n, i, o, s) {\n var h,\n f,\n d = r,\n p = 1 << n,\n g = a(16),\n m = a(16);\n for (e(0 != o), e(null != i), e(null != t), e(0 < n), f = 0; f < o; ++f) {\n if (15 < i[f]) return 0;\n ++g[i[f]];\n }\n if (g[0] == o) return 0;\n for (m[1] = 0, h = 1; 15 > h; ++h) {\n if (g[h] > 1 << h) return 0;\n m[h + 1] = m[h] + g[h];\n }\n for (f = 0; f < o; ++f) h = i[f], 0 < i[f] && (s[m[h]++] = f);\n if (1 == m[15]) return (i = new l()).g = 0, i.value = s[0], u(t, d, 1, p, i), p;\n var v,\n b = -1,\n y = p - 1,\n w = 0,\n N = 1,\n L = 1,\n A = 1 << n;\n for (f = 0, h = 1, o = 2; h <= n; ++h, o <<= 1) {\n if (N += L <<= 1, 0 > (L -= g[h])) return 0;\n for (; 0 < g[h]; --g[h]) (i = new l()).g = h, i.value = s[f++], u(t, d + w, o, A, i), w = c(w, h);\n }\n for (h = n + 1, o = 2; 15 >= h; ++h, o <<= 1) {\n if (N += L <<= 1, 0 > (L -= g[h])) return 0;\n for (; 0 < g[h]; --g[h]) {\n if (i = new l(), (w & y) != b) {\n for (d += A, v = 1 << (b = h) - n; 15 > b && !(0 >= (v -= g[b]));) ++b, v <<= 1;\n p += A = 1 << (v = b - n), t[r + (b = w & y)].g = v + n, t[r + b].value = d - r - b;\n }\n i.g = h - n, i.value = s[f++], u(t, d + (w >> n), o, A, i), w = c(w, h);\n }\n }\n return N != 2 * m[15] - 1 ? 0 : p;\n }(t, r, n, i, o, s);\n }\n function l() {\n this.value = this.g = 0;\n }\n function f() {\n this.value = this.g = 0;\n }\n function d() {\n this.G = o(5, l), this.H = a(5), this.jc = this.Qb = this.qb = this.nd = 0, this.pd = o(Dr, f);\n }\n function p(t, r, n, i) {\n e(null != t), e(null != r), e(2147483648 > i), t.Ca = 254, t.I = 0, t.b = -8, t.Ka = 0, t.oa = r, t.pa = n, t.Jd = r, t.Yc = n + i, t.Zc = 4 <= i ? n + i - 4 + 1 : n, _(t);\n }\n function g(t, e) {\n for (var r = 0; 0 < e--;) r |= k(t, 128) << e;\n return r;\n }\n function m(t, e) {\n var r = g(t, e);\n return P(t) ? -r : r;\n }\n function v(t, r, n, i) {\n var a,\n o = 0;\n for (e(null != t), e(null != r), e(4294967288 > i), t.Sb = i, t.Ra = 0, t.u = 0, t.h = 0, 4 < i && (i = 4), a = 0; a < i; ++a) o += r[n + a] << 8 * a;\n t.Ra = o, t.bb = i, t.oa = r, t.pa = n;\n }\n function b(t) {\n for (; 8 <= t.u && t.bb < t.Sb;) t.Ra >>>= 8, t.Ra += t.oa[t.pa + t.bb] << Ur - 8 >>> 0, ++t.bb, t.u -= 8;\n A(t) && (t.h = 1, t.u = 0);\n }\n function y(t, r) {\n if (e(0 <= r), !t.h && r <= Tr) {\n var n = L(t) & Rr[r];\n return t.u += r, b(t), n;\n }\n return t.h = 1, t.u = 0;\n }\n function w() {\n this.b = this.Ca = this.I = 0, this.oa = [], this.pa = 0, this.Jd = [], this.Yc = 0, this.Zc = [], this.Ka = 0;\n }\n function N() {\n this.Ra = 0, this.oa = [], this.h = this.u = this.bb = this.Sb = this.pa = 0;\n }\n function L(t) {\n return t.Ra >>> (t.u & Ur - 1) >>> 0;\n }\n function A(t) {\n return e(t.bb <= t.Sb), t.h || t.bb == t.Sb && t.u > Ur;\n }\n function x(t, e) {\n t.u = e, t.h = A(t);\n }\n function S(t) {\n t.u >= zr && (e(t.u >= zr), b(t));\n }\n function _(t) {\n e(null != t && null != t.oa), t.pa < t.Zc ? (t.I = (t.oa[t.pa++] | t.I << 8) >>> 0, t.b += 8) : (e(null != t && null != t.oa), t.pa < t.Yc ? (t.b += 8, t.I = t.oa[t.pa++] | t.I << 8) : t.Ka ? t.b = 0 : (t.I <<= 8, t.b += 8, t.Ka = 1));\n }\n function P(t) {\n return g(t, 1);\n }\n function k(t, e) {\n var r = t.Ca;\n 0 > t.b && _(t);\n var n = t.b,\n i = r * e >>> 8,\n a = (t.I >>> n > i) + 0;\n for (a ? (r -= i, t.I -= i + 1 << n >>> 0) : r = i + 1, n = r, i = 0; 256 <= n;) i += 8, n >>= 8;\n return n = 7 ^ i + Hr[n], t.b -= n, t.Ca = (r << n) - 1, a;\n }\n function I(t, e, r) {\n t[e + 0] = r >> 24 & 255, t[e + 1] = r >> 16 & 255, t[e + 2] = r >> 8 & 255, t[e + 3] = r >> 0 & 255;\n }\n function F(t, e) {\n return t[e + 0] << 0 | t[e + 1] << 8;\n }\n function C(t, e) {\n return F(t, e) | t[e + 2] << 16;\n }\n function j(t, e) {\n return F(t, e) | F(t, e + 2) << 16;\n }\n function O(t, r) {\n var n = 1 << r;\n return e(null != t), e(0 < r), t.X = a(n), null == t.X ? 0 : (t.Mb = 32 - r, t.Xa = r, 1);\n }\n function B(t, r) {\n e(null != t), e(null != r), e(t.Xa == r.Xa), n(r.X, 0, t.X, 0, 1 << r.Xa);\n }\n function M() {\n this.X = [], this.Xa = this.Mb = 0;\n }\n function E(t, r, n, i) {\n e(null != n), e(null != i);\n var a = n[0],\n o = i[0];\n return 0 == a && (a = (t * o + r / 2) / r), 0 == o && (o = (r * a + t / 2) / t), 0 >= a || 0 >= o ? 0 : (n[0] = a, i[0] = o, 1);\n }\n function q(t, e) {\n return t + (1 << e) - 1 >>> e;\n }\n function D(t, e) {\n return ((4278255360 & t) + (4278255360 & e) >>> 0 & 4278255360) + ((16711935 & t) + (16711935 & e) >>> 0 & 16711935) >>> 0;\n }\n function R(e, r) {\n t[r] = function (r, n, i, a, o, s, c) {\n var u;\n for (u = 0; u < o; ++u) {\n var h = t[e](s[c + u - 1], i, a + u);\n s[c + u] = D(r[n + u], h);\n }\n };\n }\n function T() {\n this.ud = this.hd = this.jd = 0;\n }\n function U(t, e) {\n return ((4278124286 & (t ^ e)) >>> 1) + (t & e) >>> 0;\n }\n function z(t) {\n return 0 <= t && 256 > t ? t : 0 > t ? 0 : 255 < t ? 255 : void 0;\n }\n function H(t, e) {\n return z(t + (t - e + .5 >> 1));\n }\n function W(t, e, r) {\n return Math.abs(e - r) - Math.abs(t - r);\n }\n function V(t, e, r, n, i, a, o) {\n for (n = a[o - 1], r = 0; r < i; ++r) a[o + r] = n = D(t[e + r], n);\n }\n function G(t, e, r, n, i) {\n var a;\n for (a = 0; a < r; ++a) {\n var o = t[e + a],\n s = o >> 8 & 255,\n c = 16711935 & (c = (c = 16711935 & o) + ((s << 16) + s));\n n[i + a] = (4278255360 & o) + c >>> 0;\n }\n }\n function Y(t, e) {\n e.jd = t >> 0 & 255, e.hd = t >> 8 & 255, e.ud = t >> 16 & 255;\n }\n function J(t, e, r, n, i, a) {\n var o;\n for (o = 0; o < n; ++o) {\n var s = e[r + o],\n c = s >>> 8,\n u = s,\n h = 255 & (h = (h = s >>> 16) + ((t.jd << 24 >> 24) * (c << 24 >> 24) >>> 5));\n u = 255 & (u = (u = u + ((t.hd << 24 >> 24) * (c << 24 >> 24) >>> 5)) + ((t.ud << 24 >> 24) * (h << 24 >> 24) >>> 5));\n i[a + o] = (4278255360 & s) + (h << 16) + u;\n }\n }\n function X(e, r, n, i, a) {\n t[r] = function (t, e, r, n, o, s, c, u, h) {\n for (n = c; n < u; ++n) for (c = 0; c < h; ++c) o[s++] = a(r[i(t[e++])]);\n }, t[e] = function (e, r, o, s, c, u, h) {\n var l = 8 >> e.b,\n f = e.Ea,\n d = e.K[0],\n p = e.w;\n if (8 > l) for (e = (1 << e.b) - 1, p = (1 << l) - 1; r < o; ++r) {\n var g,\n m = 0;\n for (g = 0; g < f; ++g) g & e || (m = i(s[c++])), u[h++] = a(d[m & p]), m >>= l;\n } else t[\"VP8LMapColor\" + n](s, c, d, p, u, h, r, o, f);\n };\n }\n function K(t, e, r, n, i) {\n for (r = e + r; e < r;) {\n var a = t[e++];\n n[i++] = a >> 16 & 255, n[i++] = a >> 8 & 255, n[i++] = a >> 0 & 255;\n }\n }\n function Z(t, e, r, n, i) {\n for (r = e + r; e < r;) {\n var a = t[e++];\n n[i++] = a >> 16 & 255, n[i++] = a >> 8 & 255, n[i++] = a >> 0 & 255, n[i++] = a >> 24 & 255;\n }\n }\n function $(t, e, r, n, i) {\n for (r = e + r; e < r;) {\n var a = (o = t[e++]) >> 16 & 240 | o >> 12 & 15,\n o = o >> 0 & 240 | o >> 28 & 15;\n n[i++] = a, n[i++] = o;\n }\n }\n function Q(t, e, r, n, i) {\n for (r = e + r; e < r;) {\n var a = (o = t[e++]) >> 16 & 248 | o >> 13 & 7,\n o = o >> 5 & 224 | o >> 3 & 31;\n n[i++] = a, n[i++] = o;\n }\n }\n function tt(t, e, r, n, i) {\n for (r = e + r; e < r;) {\n var a = t[e++];\n n[i++] = a >> 0 & 255, n[i++] = a >> 8 & 255, n[i++] = a >> 16 & 255;\n }\n }\n function et(t, e, r, i, a, o) {\n if (0 == o) for (r = e + r; e < r;) I(i, ((o = t[e++])[0] >> 24 | o[1] >> 8 & 65280 | o[2] << 8 & 16711680 | o[3] << 24) >>> 0), a += 32;else n(i, a, t, e, r);\n }\n function rt(e, r) {\n t[r][0] = t[e + \"0\"], t[r][1] = t[e + \"1\"], t[r][2] = t[e + \"2\"], t[r][3] = t[e + \"3\"], t[r][4] = t[e + \"4\"], t[r][5] = t[e + \"5\"], t[r][6] = t[e + \"6\"], t[r][7] = t[e + \"7\"], t[r][8] = t[e + \"8\"], t[r][9] = t[e + \"9\"], t[r][10] = t[e + \"10\"], t[r][11] = t[e + \"11\"], t[r][12] = t[e + \"12\"], t[r][13] = t[e + \"13\"], t[r][14] = t[e + \"0\"], t[r][15] = t[e + \"0\"];\n }\n function nt(t) {\n return t == Hn || t == Wn || t == Vn || t == Gn;\n }\n function it() {\n this.eb = [], this.size = this.A = this.fb = 0;\n }\n function at() {\n this.y = [], this.f = [], this.ea = [], this.F = [], this.Tc = this.Ed = this.Cd = this.Fd = this.lb = this.Db = this.Ab = this.fa = this.J = this.W = this.N = this.O = 0;\n }\n function ot() {\n this.Rd = this.height = this.width = this.S = 0, this.f = {}, this.f.RGBA = new it(), this.f.kb = new at(), this.sd = null;\n }\n function st() {\n this.width = [0], this.height = [0], this.Pd = [0], this.Qd = [0], this.format = [0];\n }\n function ct() {\n this.Id = this.fd = this.Md = this.hb = this.ib = this.da = this.bd = this.cd = this.j = this.v = this.Da = this.Sd = this.ob = 0;\n }\n function ut(t) {\n return alert(\"todo:WebPSamplerProcessPlane\"), t.T;\n }\n function ht(t, e) {\n var r = t.T,\n i = e.ba.f.RGBA,\n a = i.eb,\n o = i.fb + t.ka * i.A,\n s = vi[e.ba.S],\n c = t.y,\n u = t.O,\n h = t.f,\n l = t.N,\n f = t.ea,\n d = t.W,\n p = e.cc,\n g = e.dc,\n m = e.Mc,\n v = e.Nc,\n b = t.ka,\n y = t.ka + t.T,\n w = t.U,\n N = w + 1 >> 1;\n for (0 == b ? s(c, u, null, null, h, l, f, d, h, l, f, d, a, o, null, null, w) : (s(e.ec, e.fc, c, u, p, g, m, v, h, l, f, d, a, o - i.A, a, o, w), ++r); b + 2 < y; b += 2) p = h, g = l, m = f, v = d, l += t.Rc, d += t.Rc, o += 2 * i.A, s(c, (u += 2 * t.fa) - t.fa, c, u, p, g, m, v, h, l, f, d, a, o - i.A, a, o, w);\n return u += t.fa, t.j + y < t.o ? (n(e.ec, e.fc, c, u, w), n(e.cc, e.dc, h, l, N), n(e.Mc, e.Nc, f, d, N), r--) : 1 & y || s(c, u, null, null, h, l, f, d, h, l, f, d, a, o + i.A, null, null, w), r;\n }\n function lt(t, r, n) {\n var i = t.F,\n a = [t.J];\n if (null != i) {\n var o = t.U,\n s = r.ba.S,\n c = s == Tn || s == Vn;\n r = r.ba.f.RGBA;\n var u = [0],\n h = t.ka;\n u[0] = t.T, t.Kb && (0 == h ? --u[0] : (--h, a[0] -= t.width), t.j + t.ka + t.T == t.o && (u[0] = t.o - t.j - h));\n var l = r.eb;\n h = r.fb + h * r.A;\n t = Sn(i, a[0], t.width, o, u, l, h + (c ? 0 : 3), r.A), e(n == u), t && nt(s) && An(l, h, c, o, u, r.A);\n }\n return 0;\n }\n function ft(t) {\n var e = t.ma,\n r = e.ba.S,\n n = 11 > r,\n i = r == qn || r == Rn || r == Tn || r == Un || 12 == r || nt(r);\n if (e.memory = null, e.Ib = null, e.Jb = null, e.Nd = null, !Mr(e.Oa, t, i ? 11 : 12)) return 0;\n if (i && nt(r) && br(), t.da) alert(\"todo:use_scaling\");else {\n if (n) {\n if (e.Ib = ut, t.Kb) {\n if (r = t.U + 1 >> 1, e.memory = a(t.U + 2 * r), null == e.memory) return 0;\n e.ec = e.memory, e.fc = 0, e.cc = e.ec, e.dc = e.fc + t.U, e.Mc = e.cc, e.Nc = e.dc + r, e.Ib = ht, br();\n }\n } else alert(\"todo:EmitYUV\");\n i && (e.Jb = lt, n && mr());\n }\n if (n && !Ci) {\n for (t = 0; 256 > t; ++t) ji[t] = 89858 * (t - 128) + _i >> Si, Mi[t] = -22014 * (t - 128) + _i, Bi[t] = -45773 * (t - 128), Oi[t] = 113618 * (t - 128) + _i >> Si;\n for (t = Pi; t < ki; ++t) e = 76283 * (t - 16) + _i >> Si, Ei[t - Pi] = Vt(e, 255), qi[t - Pi] = Vt(e + 8 >> 4, 15);\n Ci = 1;\n }\n return 1;\n }\n function dt(t) {\n var r = t.ma,\n n = t.U,\n i = t.T;\n return e(!(1 & t.ka)), 0 >= n || 0 >= i ? 0 : (n = r.Ib(t, r), null != r.Jb && r.Jb(t, r, n), r.Dc += n, 1);\n }\n function pt(t) {\n t.ma.memory = null;\n }\n function gt(t, e, r, n) {\n return 47 != y(t, 8) ? 0 : (e[0] = y(t, 14) + 1, r[0] = y(t, 14) + 1, n[0] = y(t, 1), 0 != y(t, 3) ? 0 : !t.h);\n }\n function mt(t, e) {\n if (4 > t) return t + 1;\n var r = t - 2 >> 1;\n return (2 + (1 & t) << r) + y(e, r) + 1;\n }\n function vt(t, e) {\n return 120 < e ? e - 120 : 1 <= (r = ((r = $n[e - 1]) >> 4) * t + (8 - (15 & r))) ? r : 1;\n var r;\n }\n function bt(t, e, r) {\n var n = L(r),\n i = t[e += 255 & n].g - 8;\n return 0 < i && (x(r, r.u + 8), n = L(r), e += t[e].value, e += n & (1 << i) - 1), x(r, r.u + t[e].g), t[e].value;\n }\n function yt(t, r, n) {\n return n.g += t.g, n.value += t.value << r >>> 0, e(8 >= n.g), t.g;\n }\n function wt(t, r, n) {\n var i = t.xc;\n return e((r = 0 == i ? 0 : t.vc[t.md * (n >> i) + (r >> i)]) < t.Wb), t.Ya[r];\n }\n function Nt(t, r, i, a) {\n var o = t.ab,\n s = t.c * r,\n c = t.C;\n r = c + r;\n var u = i,\n h = a;\n for (a = t.Ta, i = t.Ua; 0 < o--;) {\n var l = t.gc[o],\n f = c,\n d = r,\n p = u,\n g = h,\n m = (h = a, u = i, l.Ea);\n switch (e(f < d), e(d <= l.nc), l.hc) {\n case 2:\n Gr(p, g, (d - f) * m, h, u);\n break;\n case 0:\n var v = f,\n b = d,\n y = h,\n w = u,\n N = (_ = l).Ea;\n 0 == v && (Wr(p, g, null, null, 1, y, w), V(p, g + 1, 0, 0, N - 1, y, w + 1), g += N, w += N, ++v);\n for (var L = 1 << _.b, A = L - 1, x = q(N, _.b), S = _.K, _ = _.w + (v >> _.b) * x; v < b;) {\n var P = S,\n k = _,\n I = 1;\n for (Vr(p, g, y, w - N, 1, y, w); I < N;) {\n var F = (I & ~A) + L;\n F > N && (F = N), (0, Zr[P[k++] >> 8 & 15])(p, g + +I, y, w + I - N, F - I, y, w + I), I = F;\n }\n g += N, w += N, ++v & A || (_ += x);\n }\n d != l.nc && n(h, u - m, h, u + (d - f - 1) * m, m);\n break;\n case 1:\n for (m = p, b = g, N = (p = l.Ea) - (w = p & ~(y = (g = 1 << l.b) - 1)), v = q(p, l.b), L = l.K, l = l.w + (f >> l.b) * v; f < d;) {\n for (A = L, x = l, S = new T(), _ = b + w, P = b + p; b < _;) Y(A[x++], S), $r(S, m, b, g, h, u), b += g, u += g;\n b < P && (Y(A[x++], S), $r(S, m, b, N, h, u), b += N, u += N), ++f & y || (l += v);\n }\n break;\n case 3:\n if (p == h && g == u && 0 < l.b) {\n for (b = h, p = m = u + (d - f) * m - (w = (d - f) * q(l.Ea, l.b)), g = h, y = u, v = [], w = (N = w) - 1; 0 <= w; --w) v[w] = g[y + w];\n for (w = N - 1; 0 <= w; --w) b[p + w] = v[w];\n Yr(l, f, d, h, m, h, u);\n } else Yr(l, f, d, p, g, h, u);\n }\n u = a, h = i;\n }\n h != i && n(a, i, u, h, s);\n }\n function Lt(t, r) {\n var n = t.V,\n i = t.Ba + t.c * t.C,\n a = r - t.C;\n if (e(r <= t.l.o), e(16 >= a), 0 < a) {\n var o = t.l,\n s = t.Ta,\n c = t.Ua,\n u = o.width;\n if (Nt(t, a, n, i), a = c = [c], e((n = t.C) < (i = r)), e(o.v < o.va), i > o.o && (i = o.o), n < o.j) {\n var h = o.j - n;\n n = o.j;\n a[0] += h * u;\n }\n if (n >= i ? n = 0 : (a[0] += 4 * o.v, o.ka = n - o.j, o.U = o.va - o.v, o.T = i - n, n = 1), n) {\n if (c = c[0], 11 > (n = t.ca).S) {\n var l = n.f.RGBA,\n f = (i = n.S, a = o.U, o = o.T, h = l.eb, l.A),\n d = o;\n for (l = l.fb + t.Ma * l.A; 0 < d--;) {\n var p = s,\n g = c,\n m = a,\n v = h,\n b = l;\n switch (i) {\n case En:\n Qr(p, g, m, v, b);\n break;\n case qn:\n tn(p, g, m, v, b);\n break;\n case Hn:\n tn(p, g, m, v, b), An(v, b, 0, m, 1, 0);\n break;\n case Dn:\n nn(p, g, m, v, b);\n break;\n case Rn:\n et(p, g, m, v, b, 1);\n break;\n case Wn:\n et(p, g, m, v, b, 1), An(v, b, 0, m, 1, 0);\n break;\n case Tn:\n et(p, g, m, v, b, 0);\n break;\n case Vn:\n et(p, g, m, v, b, 0), An(v, b, 1, m, 1, 0);\n break;\n case Un:\n en(p, g, m, v, b);\n break;\n case Gn:\n en(p, g, m, v, b), xn(v, b, m, 1, 0);\n break;\n case zn:\n rn(p, g, m, v, b);\n break;\n default:\n e(0);\n }\n c += u, l += f;\n }\n t.Ma += o;\n } else alert(\"todo:EmitRescaledRowsYUVA\");\n e(t.Ma <= n.height);\n }\n }\n t.C = r, e(t.C <= t.i);\n }\n function At(t) {\n var e;\n if (0 < t.ua) return 0;\n for (e = 0; e < t.Wb; ++e) {\n var r = t.Ya[e].G,\n n = t.Ya[e].H;\n if (0 < r[1][n[1] + 0].g || 0 < r[2][n[2] + 0].g || 0 < r[3][n[3] + 0].g) return 0;\n }\n return 1;\n }\n function xt(t, r, n, i, a, o) {\n if (0 != t.Z) {\n var s = t.qd,\n c = t.rd;\n for (e(null != mi[t.Z]); r < n; ++r) mi[t.Z](s, c, i, a, i, a, o), s = i, c = a, a += o;\n t.qd = s, t.rd = c;\n }\n }\n function St(t, r) {\n var n = t.l.ma,\n i = 0 == n.Z || 1 == n.Z ? t.l.j : t.C;\n i = t.C < i ? i : t.C;\n if (e(r <= t.l.o), r > i) {\n var a = t.l.width,\n o = n.ca,\n s = n.tb + a * i,\n c = t.V,\n u = t.Ba + t.c * i,\n h = t.gc;\n e(1 == t.ab), e(3 == h[0].hc), Xr(h[0], i, r, c, u, o, s), xt(n, i, r, o, s, a);\n }\n t.C = t.Ma = r;\n }\n function _t(t, r, n, i, a, o, s) {\n var c = t.$ / i,\n u = t.$ % i,\n h = t.m,\n l = t.s,\n f = n + t.$,\n d = f;\n a = n + i * a;\n var p = n + i * o,\n g = 280 + l.ua,\n m = t.Pb ? c : 16777216,\n v = 0 < l.ua ? l.Wa : null,\n b = l.wc,\n y = f < p ? wt(l, u, c) : null;\n e(t.C < o), e(p <= a);\n var w = !1;\n t: for (;;) {\n for (; w || f < p;) {\n var N = 0;\n if (c >= m) {\n var _ = f - n;\n e((m = t).Pb), m.wd = m.m, m.xd = _, 0 < m.s.ua && B(m.s.Wa, m.s.vb), m = c + ti;\n }\n if (u & b || (y = wt(l, u, c)), e(null != y), y.Qb && (r[f] = y.qb, w = !0), !w) if (S(h), y.jc) {\n N = h, _ = r;\n var P = f,\n k = y.pd[L(N) & Dr - 1];\n e(y.jc), 256 > k.g ? (x(N, N.u + k.g), _[P] = k.value, N = 0) : (x(N, N.u + k.g - 256), e(256 <= k.value), N = k.value), 0 == N && (w = !0);\n } else N = bt(y.G[0], y.H[0], h);\n if (h.h) break;\n if (w || 256 > N) {\n if (!w) if (y.nd) r[f] = (y.qb | N << 8) >>> 0;else {\n if (S(h), w = bt(y.G[1], y.H[1], h), S(h), _ = bt(y.G[2], y.H[2], h), P = bt(y.G[3], y.H[3], h), h.h) break;\n r[f] = (P << 24 | w << 16 | N << 8 | _) >>> 0;\n }\n if (w = !1, ++f, ++u >= i && (u = 0, ++c, null != s && c <= o && !(c % 16) && s(t, c), null != v)) for (; d < f;) N = r[d++], v.X[(506832829 * N & 4294967295) >>> v.Mb] = N;\n } else if (280 > N) {\n if (N = mt(N - 256, h), _ = bt(y.G[4], y.H[4], h), S(h), _ = vt(i, _ = mt(_, h)), h.h) break;\n if (f - n < _ || a - f < N) break t;\n for (P = 0; P < N; ++P) r[f + P] = r[f + P - _];\n for (f += N, u += N; u >= i;) u -= i, ++c, null != s && c <= o && !(c % 16) && s(t, c);\n if (e(f <= a), u & b && (y = wt(l, u, c)), null != v) for (; d < f;) N = r[d++], v.X[(506832829 * N & 4294967295) >>> v.Mb] = N;\n } else {\n if (!(N < g)) break t;\n for (w = N - 280, e(null != v); d < f;) N = r[d++], v.X[(506832829 * N & 4294967295) >>> v.Mb] = N;\n N = f, e(!(w >>> (_ = v).Xa)), r[N] = _.X[w], w = !0;\n }\n w || e(h.h == A(h));\n }\n if (t.Pb && h.h && f < a) e(t.m.h), t.a = 5, t.m = t.wd, t.$ = t.xd, 0 < t.s.ua && B(t.s.vb, t.s.Wa);else {\n if (h.h) break t;\n null != s && s(t, c > o ? o : c), t.a = 0, t.$ = f - n;\n }\n return 1;\n }\n return t.a = 3, 0;\n }\n function Pt(t) {\n e(null != t), t.vc = null, t.yc = null, t.Ya = null;\n var r = t.Wa;\n null != r && (r.X = null), t.vb = null, e(null != t);\n }\n function kt() {\n var e = new or();\n return null == e ? null : (e.a = 0, e.xb = gi, rt(\"Predictor\", \"VP8LPredictors\"), rt(\"Predictor\", \"VP8LPredictors_C\"), rt(\"PredictorAdd\", \"VP8LPredictorsAdd\"), rt(\"PredictorAdd\", \"VP8LPredictorsAdd_C\"), Gr = G, $r = J, Qr = K, tn = Z, en = $, rn = Q, nn = tt, t.VP8LMapColor32b = Jr, t.VP8LMapColor8b = Kr, e);\n }\n function It(t, r, n, s, c) {\n var u = 1,\n f = [t],\n p = [r],\n g = s.m,\n m = s.s,\n v = null,\n b = 0;\n t: for (;;) {\n if (n) for (; u && y(g, 1);) {\n var w = f,\n N = p,\n A = s,\n _ = 1,\n P = A.m,\n k = A.gc[A.ab],\n I = y(P, 2);\n if (A.Oc & 1 << I) u = 0;else {\n switch (A.Oc |= 1 << I, k.hc = I, k.Ea = w[0], k.nc = N[0], k.K = [null], ++A.ab, e(4 >= A.ab), I) {\n case 0:\n case 1:\n k.b = y(P, 3) + 2, _ = It(q(k.Ea, k.b), q(k.nc, k.b), 0, A, k.K), k.K = k.K[0];\n break;\n case 3:\n var F,\n C = y(P, 8) + 1,\n j = 16 < C ? 0 : 4 < C ? 1 : 2 < C ? 2 : 3;\n if (w[0] = q(k.Ea, j), k.b = j, F = _ = It(C, 1, 0, A, k.K)) {\n var B,\n M = C,\n E = k,\n R = 1 << (8 >> E.b),\n T = a(R);\n if (null == T) F = 0;else {\n var U = E.K[0],\n z = E.w;\n for (T[0] = E.K[0][0], B = 1; B < 1 * M; ++B) T[B] = D(U[z + B], T[B - 1]);\n for (; B < 4 * R; ++B) T[B] = 0;\n E.K[0] = null, E.K[0] = T, F = 1;\n }\n }\n _ = F;\n break;\n case 2:\n break;\n default:\n e(0);\n }\n u = _;\n }\n }\n if (f = f[0], p = p[0], u && y(g, 1) && !(u = 1 <= (b = y(g, 4)) && 11 >= b)) {\n s.a = 3;\n break t;\n }\n var H;\n if (H = u) e: {\n var W,\n V,\n G,\n Y = s,\n J = f,\n X = p,\n K = b,\n Z = n,\n $ = Y.m,\n Q = Y.s,\n tt = [null],\n et = 1,\n rt = 0,\n nt = Qn[K];\n r: for (;;) {\n if (Z && y($, 1)) {\n var it = y($, 3) + 2,\n at = q(J, it),\n ot = q(X, it),\n st = at * ot;\n if (!It(at, ot, 0, Y, tt)) break r;\n for (tt = tt[0], Q.xc = it, W = 0; W < st; ++W) {\n var ct = tt[W] >> 8 & 65535;\n tt[W] = ct, ct >= et && (et = ct + 1);\n }\n }\n if ($.h) break r;\n for (V = 0; 5 > V; ++V) {\n var ut = Xn[V];\n !V && 0 < K && (ut += 1 << K), rt < ut && (rt = ut);\n }\n var ht = o(et * nt, l),\n lt = et,\n ft = o(lt, d);\n if (null == ft) var dt = null;else e(65536 >= lt), dt = ft;\n var pt = a(rt);\n if (null == dt || null == pt || null == ht) {\n Y.a = 1;\n break r;\n }\n var gt = ht;\n for (W = G = 0; W < et; ++W) {\n var mt = dt[W],\n vt = mt.G,\n bt = mt.H,\n wt = 0,\n Nt = 1,\n Lt = 0;\n for (V = 0; 5 > V; ++V) {\n ut = Xn[V], vt[V] = gt, bt[V] = G, !V && 0 < K && (ut += 1 << K);\n n: {\n var At,\n xt = ut,\n St = Y,\n kt = pt,\n Ft = gt,\n Ct = G,\n jt = 0,\n Ot = St.m,\n Bt = y(Ot, 1);\n if (i(kt, 0, 0, xt), Bt) {\n var Mt = y(Ot, 1) + 1,\n Et = y(Ot, 1),\n qt = y(Ot, 0 == Et ? 1 : 8);\n kt[qt] = 1, 2 == Mt && (kt[qt = y(Ot, 8)] = 1);\n var Dt = 1;\n } else {\n var Rt = a(19),\n Tt = y(Ot, 4) + 4;\n if (19 < Tt) {\n St.a = 3;\n var Ut = 0;\n break n;\n }\n for (At = 0; At < Tt; ++At) Rt[Zn[At]] = y(Ot, 3);\n var zt = void 0,\n Ht = void 0,\n Wt = St,\n Vt = Rt,\n Gt = xt,\n Yt = kt,\n Jt = 0,\n Xt = Wt.m,\n Kt = 8,\n Zt = o(128, l);\n i: for (; h(Zt, 0, 7, Vt, 19);) {\n if (y(Xt, 1)) {\n var $t = 2 + 2 * y(Xt, 3);\n if ((zt = 2 + y(Xt, $t)) > Gt) break i;\n } else zt = Gt;\n for (Ht = 0; Ht < Gt && zt--;) {\n S(Xt);\n var Qt = Zt[0 + (127 & L(Xt))];\n x(Xt, Xt.u + Qt.g);\n var te = Qt.value;\n if (16 > te) Yt[Ht++] = te, 0 != te && (Kt = te);else {\n var ee = 16 == te,\n re = te - 16,\n ne = Jn[re],\n ie = y(Xt, Yn[re]) + ne;\n if (Ht + ie > Gt) break i;\n for (var ae = ee ? Kt : 0; 0 < ie--;) Yt[Ht++] = ae;\n }\n }\n Jt = 1;\n break i;\n }\n Jt || (Wt.a = 3), Dt = Jt;\n }\n (Dt = Dt && !Ot.h) && (jt = h(Ft, Ct, 8, kt, xt)), Dt && 0 != jt ? Ut = jt : (St.a = 3, Ut = 0);\n }\n if (0 == Ut) break r;\n if (Nt && 1 == Kn[V] && (Nt = 0 == gt[G].g), wt += gt[G].g, G += Ut, 3 >= V) {\n var oe,\n se = pt[0];\n for (oe = 1; oe < ut; ++oe) pt[oe] > se && (se = pt[oe]);\n Lt += se;\n }\n }\n if (mt.nd = Nt, mt.Qb = 0, Nt && (mt.qb = (vt[3][bt[3] + 0].value << 24 | vt[1][bt[1] + 0].value << 16 | vt[2][bt[2] + 0].value) >>> 0, 0 == wt && 256 > vt[0][bt[0] + 0].value && (mt.Qb = 1, mt.qb += vt[0][bt[0] + 0].value << 8)), mt.jc = !mt.Qb && 6 > Lt, mt.jc) {\n var ce,\n ue = mt;\n for (ce = 0; ce < Dr; ++ce) {\n var he = ce,\n le = ue.pd[he],\n fe = ue.G[0][ue.H[0] + he];\n 256 <= fe.value ? (le.g = fe.g + 256, le.value = fe.value) : (le.g = 0, le.value = 0, he >>= yt(fe, 8, le), he >>= yt(ue.G[1][ue.H[1] + he], 16, le), he >>= yt(ue.G[2][ue.H[2] + he], 0, le), yt(ue.G[3][ue.H[3] + he], 24, le));\n }\n }\n }\n Q.vc = tt, Q.Wb = et, Q.Ya = dt, Q.yc = ht, H = 1;\n break e;\n }\n H = 0;\n }\n if (!(u = H)) {\n s.a = 3;\n break t;\n }\n if (0 < b) {\n if (m.ua = 1 << b, !O(m.Wa, b)) {\n s.a = 1, u = 0;\n break t;\n }\n } else m.ua = 0;\n var de = s,\n pe = f,\n ge = p,\n me = de.s,\n ve = me.xc;\n if (de.c = pe, de.i = ge, me.md = q(pe, ve), me.wc = 0 == ve ? -1 : (1 << ve) - 1, n) {\n s.xb = pi;\n break t;\n }\n if (null == (v = a(f * p))) {\n s.a = 1, u = 0;\n break t;\n }\n u = (u = _t(s, v, 0, f, p, p, null)) && !g.h;\n break t;\n }\n return u ? (null != c ? c[0] = v : (e(null == v), e(n)), s.$ = 0, n || Pt(m)) : Pt(m), u;\n }\n function Ft(t, r) {\n var n = t.c * t.i,\n i = n + r + 16 * r;\n return e(t.c <= r), t.V = a(i), null == t.V ? (t.Ta = null, t.Ua = 0, t.a = 1, 0) : (t.Ta = t.V, t.Ua = t.Ba + n + r, 1);\n }\n function Ct(t, r) {\n var n = t.C,\n i = r - n,\n a = t.V,\n o = t.Ba + t.c * n;\n for (e(r <= t.l.o); 0 < i;) {\n var s = 16 < i ? 16 : i,\n c = t.l.ma,\n u = t.l.width,\n h = u * s,\n l = c.ca,\n f = c.tb + u * n,\n d = t.Ta,\n p = t.Ua;\n Nt(t, s, a, o), _n(d, p, l, f, h), xt(c, n, n + s, l, f, u), i -= s, a += s * t.c, n += s;\n }\n e(n == r), t.C = t.Ma = r;\n }\n function jt() {\n this.ub = this.yd = this.td = this.Rb = 0;\n }\n function Ot() {\n this.Kd = this.Ld = this.Ud = this.Td = this.i = this.c = 0;\n }\n function Bt() {\n this.Fb = this.Bb = this.Cb = 0, this.Zb = a(4), this.Lb = a(4);\n }\n function Mt() {\n this.Yb = function () {\n var t = [];\n return function t(e, r, n) {\n for (var i = n[r], a = 0; a < i && (e.push(n.length > r + 1 ? [] : 0), !(n.length < r + 1)); a++) t(e[a], r + 1, n);\n }(t, 0, [3, 11]), t;\n }();\n }\n function Et() {\n this.jb = a(3), this.Wc = s([4, 8], Mt), this.Xc = s([4, 17], Mt);\n }\n function qt() {\n this.Pc = this.wb = this.Tb = this.zd = 0, this.vd = new a(4), this.od = new a(4);\n }\n function Dt() {\n this.ld = this.La = this.dd = this.tc = 0;\n }\n function Rt() {\n this.Na = this.la = 0;\n }\n function Tt() {\n this.Sc = [0, 0], this.Eb = [0, 0], this.Qc = [0, 0], this.ia = this.lc = 0;\n }\n function Ut() {\n this.ad = a(384), this.Za = 0, this.Ob = a(16), this.$b = this.Ad = this.ia = this.Gc = this.Hc = this.Dd = 0;\n }\n function zt() {\n this.uc = this.M = this.Nb = 0, this.wa = Array(new Dt()), this.Y = 0, this.ya = Array(new Ut()), this.aa = 0, this.l = new Gt();\n }\n function Ht() {\n this.y = a(16), this.f = a(8), this.ea = a(8);\n }\n function Wt() {\n this.cb = this.a = 0, this.sc = \"\", this.m = new w(), this.Od = new jt(), this.Kc = new Ot(), this.ed = new qt(), this.Qa = new Bt(), this.Ic = this.$c = this.Aa = 0, this.D = new zt(), this.Xb = this.Va = this.Hb = this.zb = this.yb = this.Ub = this.za = 0, this.Jc = o(8, w), this.ia = 0, this.pb = o(4, Tt), this.Pa = new Et(), this.Bd = this.kc = 0, this.Ac = [], this.Bc = 0, this.zc = [0, 0, 0, 0], this.Gd = Array(new Ht()), this.Hd = 0, this.rb = Array(new Rt()), this.sb = 0, this.wa = Array(new Dt()), this.Y = 0, this.oc = [], this.pc = 0, this.sa = [], this.ta = 0, this.qa = [], this.ra = 0, this.Ha = [], this.B = this.R = this.Ia = 0, this.Ec = [], this.M = this.ja = this.Vb = this.Fc = 0, this.ya = Array(new Ut()), this.L = this.aa = 0, this.gd = s([4, 2], Dt), this.ga = null, this.Fa = [], this.Cc = this.qc = this.P = 0, this.Gb = [], this.Uc = 0, this.mb = [], this.nb = 0, this.rc = [], this.Ga = this.Vc = 0;\n }\n function Vt(t, e) {\n return 0 > t ? 0 : t > e ? e : t;\n }\n function Gt() {\n this.T = this.U = this.ka = this.height = this.width = 0, this.y = [], this.f = [], this.ea = [], this.Rc = this.fa = this.W = this.N = this.O = 0, this.ma = \"void\", this.put = \"VP8IoPutHook\", this.ac = \"VP8IoSetupHook\", this.bc = \"VP8IoTeardownHook\", this.ha = this.Kb = 0, this.data = [], this.hb = this.ib = this.da = this.o = this.j = this.va = this.v = this.Da = this.ob = this.w = 0, this.F = [], this.J = 0;\n }\n function Yt() {\n var t = new Wt();\n return null != t && (t.a = 0, t.sc = \"OK\", t.cb = 0, t.Xb = 0, ni || (ni = Zt)), t;\n }\n function Jt(t, e, r) {\n return 0 == t.a && (t.a = e, t.sc = r, t.cb = 0), 0;\n }\n function Xt(t, e, r) {\n return 3 <= r && 157 == t[e + 0] && 1 == t[e + 1] && 42 == t[e + 2];\n }\n function Kt(t, r) {\n if (null == t) return 0;\n if (t.a = 0, t.sc = \"OK\", null == r) return Jt(t, 2, \"null VP8Io passed to VP8GetHeaders()\");\n var n = r.data,\n a = r.w,\n o = r.ha;\n if (4 > o) return Jt(t, 7, \"Truncated header.\");\n var s = n[a + 0] | n[a + 1] << 8 | n[a + 2] << 16,\n c = t.Od;\n if (c.Rb = !(1 & s), c.td = s >> 1 & 7, c.yd = s >> 4 & 1, c.ub = s >> 5, 3 < c.td) return Jt(t, 3, \"Incorrect keyframe parameters.\");\n if (!c.yd) return Jt(t, 4, \"Frame not displayable.\");\n a += 3, o -= 3;\n var u = t.Kc;\n if (c.Rb) {\n if (7 > o) return Jt(t, 7, \"cannot parse picture header\");\n if (!Xt(n, a, o)) return Jt(t, 3, \"Bad code word\");\n u.c = 16383 & (n[a + 4] << 8 | n[a + 3]), u.Td = n[a + 4] >> 6, u.i = 16383 & (n[a + 6] << 8 | n[a + 5]), u.Ud = n[a + 6] >> 6, a += 7, o -= 7, t.za = u.c + 15 >> 4, t.Ub = u.i + 15 >> 4, r.width = u.c, r.height = u.i, r.Da = 0, r.j = 0, r.v = 0, r.va = r.width, r.o = r.height, r.da = 0, r.ib = r.width, r.hb = r.height, r.U = r.width, r.T = r.height, i((s = t.Pa).jb, 0, 255, s.jb.length), e(null != (s = t.Qa)), s.Cb = 0, s.Bb = 0, s.Fb = 1, i(s.Zb, 0, 0, s.Zb.length), i(s.Lb, 0, 0, s.Lb);\n }\n if (c.ub > o) return Jt(t, 7, \"bad partition length\");\n p(s = t.m, n, a, c.ub), a += c.ub, o -= c.ub, c.Rb && (u.Ld = P(s), u.Kd = P(s)), u = t.Qa;\n var h,\n l = t.Pa;\n if (e(null != s), e(null != u), u.Cb = P(s), u.Cb) {\n if (u.Bb = P(s), P(s)) {\n for (u.Fb = P(s), h = 0; 4 > h; ++h) u.Zb[h] = P(s) ? m(s, 7) : 0;\n for (h = 0; 4 > h; ++h) u.Lb[h] = P(s) ? m(s, 6) : 0;\n }\n if (u.Bb) for (h = 0; 3 > h; ++h) l.jb[h] = P(s) ? g(s, 8) : 255;\n } else u.Bb = 0;\n if (s.Ka) return Jt(t, 3, \"cannot parse segment header\");\n if ((u = t.ed).zd = P(s), u.Tb = g(s, 6), u.wb = g(s, 3), u.Pc = P(s), u.Pc && P(s)) {\n for (l = 0; 4 > l; ++l) P(s) && (u.vd[l] = m(s, 6));\n for (l = 0; 4 > l; ++l) P(s) && (u.od[l] = m(s, 6));\n }\n if (t.L = 0 == u.Tb ? 0 : u.zd ? 1 : 2, s.Ka) return Jt(t, 3, \"cannot parse filter header\");\n var f = o;\n if (o = h = a, a = h + f, u = f, t.Xb = (1 << g(t.m, 2)) - 1, f < 3 * (l = t.Xb)) n = 7;else {\n for (h += 3 * l, u -= 3 * l, f = 0; f < l; ++f) {\n var d = n[o + 0] | n[o + 1] << 8 | n[o + 2] << 16;\n d > u && (d = u), p(t.Jc[+f], n, h, d), h += d, u -= d, o += 3;\n }\n p(t.Jc[+l], n, h, u), n = h < a ? 0 : 5;\n }\n if (0 != n) return Jt(t, n, \"cannot parse partitions\");\n for (n = g(h = t.m, 7), o = P(h) ? m(h, 4) : 0, a = P(h) ? m(h, 4) : 0, u = P(h) ? m(h, 4) : 0, l = P(h) ? m(h, 4) : 0, h = P(h) ? m(h, 4) : 0, f = t.Qa, d = 0; 4 > d; ++d) {\n if (f.Cb) {\n var v = f.Zb[d];\n f.Fb || (v += n);\n } else {\n if (0 < d) {\n t.pb[d] = t.pb[0];\n continue;\n }\n v = n;\n }\n var b = t.pb[d];\n b.Sc[0] = ei[Vt(v + o, 127)], b.Sc[1] = ri[Vt(v + 0, 127)], b.Eb[0] = 2 * ei[Vt(v + a, 127)], b.Eb[1] = 101581 * ri[Vt(v + u, 127)] >> 16, 8 > b.Eb[1] && (b.Eb[1] = 8), b.Qc[0] = ei[Vt(v + l, 117)], b.Qc[1] = ri[Vt(v + h, 127)], b.lc = v + h;\n }\n if (!c.Rb) return Jt(t, 4, \"Not a key frame.\");\n for (P(s), c = t.Pa, n = 0; 4 > n; ++n) {\n for (o = 0; 8 > o; ++o) for (a = 0; 3 > a; ++a) for (u = 0; 11 > u; ++u) l = k(s, ui[n][o][a][u]) ? g(s, 8) : si[n][o][a][u], c.Wc[n][o].Yb[a][u] = l;\n for (o = 0; 17 > o; ++o) c.Xc[n][o] = c.Wc[n][hi[o]];\n }\n return t.kc = P(s), t.kc && (t.Bd = g(s, 8)), t.cb = 1;\n }\n function Zt(t, e, r, n, i, a, o) {\n var s = e[i].Yb[r];\n for (r = 0; 16 > i; ++i) {\n if (!k(t, s[r + 0])) return i;\n for (; !k(t, s[r + 1]);) if (s = e[++i].Yb[0], r = 0, 16 == i) return 16;\n var c = e[i + 1].Yb;\n if (k(t, s[r + 2])) {\n var u = t,\n h = 0;\n if (k(u, (f = s)[(l = r) + 3])) {\n if (k(u, f[l + 6])) {\n for (s = 0, l = 2 * (h = k(u, f[l + 8])) + (f = k(u, f[l + 9 + h])), h = 0, f = ii[l]; f[s]; ++s) h += h + k(u, f[s]);\n h += 3 + (8 << l);\n } else k(u, f[l + 7]) ? (h = 7 + 2 * k(u, 165), h += k(u, 145)) : h = 5 + k(u, 159);\n } else h = k(u, f[l + 4]) ? 3 + k(u, f[l + 5]) : 2;\n s = c[2];\n } else h = 1, s = c[1];\n c = o + ai[i], 0 > (u = t).b && _(u);\n var l,\n f = u.b,\n d = (l = u.Ca >> 1) - (u.I >> f) >> 31;\n --u.b, u.Ca += d, u.Ca |= 1, u.I -= (l + 1 & d) << f, a[c] = ((h ^ d) - d) * n[(0 < i) + 0];\n }\n return 16;\n }\n function $t(t) {\n var e = t.rb[t.sb - 1];\n e.la = 0, e.Na = 0, i(t.zc, 0, 0, t.zc.length), t.ja = 0;\n }\n function Qt(t, r) {\n if (null == t) return 0;\n if (null == r) return Jt(t, 2, \"NULL VP8Io parameter in VP8Decode().\");\n if (!t.cb && !Kt(t, r)) return 0;\n if (e(t.cb), null == r.ac || r.ac(r)) {\n r.ob && (t.L = 0);\n var s = Ri[t.L];\n if (2 == t.L ? (t.yb = 0, t.zb = 0) : (t.yb = r.v - s >> 4, t.zb = r.j - s >> 4, 0 > t.yb && (t.yb = 0), 0 > t.zb && (t.zb = 0)), t.Va = r.o + 15 + s >> 4, t.Hb = r.va + 15 + s >> 4, t.Hb > t.za && (t.Hb = t.za), t.Va > t.Ub && (t.Va = t.Ub), 0 < t.L) {\n var c = t.ed;\n for (s = 0; 4 > s; ++s) {\n var u;\n if (t.Qa.Cb) {\n var h = t.Qa.Lb[s];\n t.Qa.Fb || (h += c.Tb);\n } else h = c.Tb;\n for (u = 0; 1 >= u; ++u) {\n var l = t.gd[s][u],\n f = h;\n if (c.Pc && (f += c.vd[0], u && (f += c.od[0])), 0 < (f = 0 > f ? 0 : 63 < f ? 63 : f)) {\n var d = f;\n 0 < c.wb && (d = 4 < c.wb ? d >> 2 : d >> 1) > 9 - c.wb && (d = 9 - c.wb), 1 > d && (d = 1), l.dd = d, l.tc = 2 * f + d, l.ld = 40 <= f ? 2 : 15 <= f ? 1 : 0;\n } else l.tc = 0;\n l.La = u;\n }\n }\n }\n s = 0;\n } else Jt(t, 6, \"Frame setup failed\"), s = t.a;\n if (s = 0 == s) {\n if (s) {\n t.$c = 0, 0 < t.Aa || (t.Ic = Ui);\n t: {\n s = t.Ic;\n c = 4 * (d = t.za);\n var p = 32 * d,\n g = d + 1,\n m = 0 < t.L ? d * (0 < t.Aa ? 2 : 1) : 0,\n v = (2 == t.Aa ? 2 : 1) * d;\n if ((l = c + 832 + (u = 3 * (16 * s + Ri[t.L]) / 2 * p) + (h = null != t.Fa && 0 < t.Fa.length ? t.Kc.c * t.Kc.i : 0)) != l) s = 0;else {\n if (l > t.Vb) {\n if (t.Vb = 0, t.Ec = a(l), t.Fc = 0, null == t.Ec) {\n s = Jt(t, 1, \"no memory during frame initialization.\");\n break t;\n }\n t.Vb = l;\n }\n l = t.Ec, f = t.Fc, t.Ac = l, t.Bc = f, f += c, t.Gd = o(p, Ht), t.Hd = 0, t.rb = o(g + 1, Rt), t.sb = 1, t.wa = m ? o(m, Dt) : null, t.Y = 0, t.D.Nb = 0, t.D.wa = t.wa, t.D.Y = t.Y, 0 < t.Aa && (t.D.Y += d), e(!0), t.oc = l, t.pc = f, f += 832, t.ya = o(v, Ut), t.aa = 0, t.D.ya = t.ya, t.D.aa = t.aa, 2 == t.Aa && (t.D.aa += d), t.R = 16 * d, t.B = 8 * d, d = (p = Ri[t.L]) * t.R, p = p / 2 * t.B, t.sa = l, t.ta = f + d, t.qa = t.sa, t.ra = t.ta + 16 * s * t.R + p, t.Ha = t.qa, t.Ia = t.ra + 8 * s * t.B + p, t.$c = 0, f += u, t.mb = h ? l : null, t.nb = h ? f : null, e(f + h <= t.Fc + t.Vb), $t(t), i(t.Ac, t.Bc, 0, c), s = 1;\n }\n }\n if (s) {\n if (r.ka = 0, r.y = t.sa, r.O = t.ta, r.f = t.qa, r.N = t.ra, r.ea = t.Ha, r.Vd = t.Ia, r.fa = t.R, r.Rc = t.B, r.F = null, r.J = 0, !Cn) {\n for (s = -255; 255 >= s; ++s) Pn[255 + s] = 0 > s ? -s : s;\n for (s = -1020; 1020 >= s; ++s) kn[1020 + s] = -128 > s ? -128 : 127 < s ? 127 : s;\n for (s = -112; 112 >= s; ++s) In[112 + s] = -16 > s ? -16 : 15 < s ? 15 : s;\n for (s = -255; 510 >= s; ++s) Fn[255 + s] = 0 > s ? 0 : 255 < s ? 255 : s;\n Cn = 1;\n }\n an = ue, on = ae, cn = oe, un = se, hn = ce, sn = ie, ln = Je, fn = Xe, dn = $e, pn = Qe, gn = Ke, mn = Ze, vn = tr, bn = er, yn = ze, wn = He, Nn = We, Ln = Ve, fi[0] = xe, fi[1] = le, fi[2] = Le, fi[3] = Ae, fi[4] = Se, fi[5] = Pe, fi[6] = _e, fi[7] = ke, fi[8] = Fe, fi[9] = Ie, li[0] = ve, li[1] = de, li[2] = pe, li[3] = ge, li[4] = be, li[5] = ye, li[6] = we, di[0] = Be, di[1] = fe, di[2] = Ce, di[3] = je, di[4] = Ee, di[5] = Me, di[6] = qe, s = 1;\n } else s = 0;\n }\n s && (s = function (t, r) {\n for (t.M = 0; t.M < t.Va; ++t.M) {\n var o,\n s = t.Jc[t.M & t.Xb],\n c = t.m,\n u = t;\n for (o = 0; o < u.za; ++o) {\n var h = c,\n l = u,\n f = l.Ac,\n d = l.Bc + 4 * o,\n p = l.zc,\n g = l.ya[l.aa + o];\n if (l.Qa.Bb ? g.$b = k(h, l.Pa.jb[0]) ? 2 + k(h, l.Pa.jb[2]) : k(h, l.Pa.jb[1]) : g.$b = 0, l.kc && (g.Ad = k(h, l.Bd)), g.Za = !k(h, 145) + 0, g.Za) {\n var m = g.Ob,\n v = 0;\n for (l = 0; 4 > l; ++l) {\n var b,\n y = p[0 + l];\n for (b = 0; 4 > b; ++b) {\n y = ci[f[d + b]][y];\n for (var w = oi[k(h, y[0])]; 0 < w;) w = oi[2 * w + k(h, y[w])];\n y = -w, f[d + b] = y;\n }\n n(m, v, f, d, 4), v += 4, p[0 + l] = y;\n }\n } else y = k(h, 156) ? k(h, 128) ? 1 : 3 : k(h, 163) ? 2 : 0, g.Ob[0] = y, i(f, d, y, 4), i(p, 0, y, 4);\n g.Dd = k(h, 142) ? k(h, 114) ? k(h, 183) ? 1 : 3 : 2 : 0;\n }\n if (u.m.Ka) return Jt(t, 7, \"Premature end-of-partition0 encountered.\");\n for (; t.ja < t.za; ++t.ja) {\n if (u = s, h = (c = t).rb[c.sb - 1], f = c.rb[c.sb + c.ja], o = c.ya[c.aa + c.ja], d = c.kc ? o.Ad : 0) h.la = f.la = 0, o.Za || (h.Na = f.Na = 0), o.Hc = 0, o.Gc = 0, o.ia = 0;else {\n var N, L;\n h = f, f = u, d = c.Pa.Xc, p = c.ya[c.aa + c.ja], g = c.pb[p.$b];\n if (l = p.ad, m = 0, v = c.rb[c.sb - 1], y = b = 0, i(l, m, 0, 384), p.Za) var A = 0,\n x = d[3];else {\n w = a(16);\n var S = h.Na + v.Na;\n if (S = ni(f, d[1], S, g.Eb, 0, w, 0), h.Na = v.Na = (0 < S) + 0, 1 < S) an(w, 0, l, m);else {\n var _ = w[0] + 3 >> 3;\n for (w = 0; 256 > w; w += 16) l[m + w] = _;\n }\n A = 1, x = d[0];\n }\n var P = 15 & h.la,\n I = 15 & v.la;\n for (w = 0; 4 > w; ++w) {\n var F = 1 & I;\n for (_ = L = 0; 4 > _; ++_) P = P >> 1 | (F = (S = ni(f, x, S = F + (1 & P), g.Sc, A, l, m)) > A) << 7, L = L << 2 | (3 < S ? 3 : 1 < S ? 2 : 0 != l[m + 0]), m += 16;\n P >>= 4, I = I >> 1 | F << 7, b = (b << 8 | L) >>> 0;\n }\n for (x = P, A = I >> 4, N = 0; 4 > N; N += 2) {\n for (L = 0, P = h.la >> 4 + N, I = v.la >> 4 + N, w = 0; 2 > w; ++w) {\n for (F = 1 & I, _ = 0; 2 > _; ++_) S = F + (1 & P), P = P >> 1 | (F = 0 < (S = ni(f, d[2], S, g.Qc, 0, l, m))) << 3, L = L << 2 | (3 < S ? 3 : 1 < S ? 2 : 0 != l[m + 0]), m += 16;\n P >>= 2, I = I >> 1 | F << 5;\n }\n y |= L << 4 * N, x |= P << 4 << N, A |= (240 & I) << N;\n }\n h.la = x, v.la = A, p.Hc = b, p.Gc = y, p.ia = 43690 & y ? 0 : g.ia, d = !(b | y);\n }\n if (0 < c.L && (c.wa[c.Y + c.ja] = c.gd[o.$b][o.Za], c.wa[c.Y + c.ja].La |= !d), u.Ka) return Jt(t, 7, \"Premature end-of-file encountered.\");\n }\n if ($t(t), c = r, u = 1, o = (s = t).D, h = 0 < s.L && s.M >= s.zb && s.M <= s.Va, 0 == s.Aa) t: {\n if (o.M = s.M, o.uc = h, Or(s, o), u = 1, o = (L = s.D).Nb, h = (y = Ri[s.L]) * s.R, f = y / 2 * s.B, w = 16 * o * s.R, _ = 8 * o * s.B, d = s.sa, p = s.ta - h + w, g = s.qa, l = s.ra - f + _, m = s.Ha, v = s.Ia - f + _, I = 0 == (P = L.M), b = P >= s.Va - 1, 2 == s.Aa && Or(s, L), L.uc) for (F = (S = s).D.M, e(S.D.uc), L = S.yb; L < S.Hb; ++L) {\n A = L, x = F;\n var C = (j = (U = S).D).Nb;\n N = U.R;\n var j = j.wa[j.Y + A],\n O = U.sa,\n B = U.ta + 16 * C * N + 16 * A,\n M = j.dd,\n E = j.tc;\n if (0 != E) if (e(3 <= E), 1 == U.L) 0 < A && wn(O, B, N, E + 4), j.La && Ln(O, B, N, E), 0 < x && yn(O, B, N, E + 4), j.La && Nn(O, B, N, E);else {\n var q = U.B,\n D = U.qa,\n R = U.ra + 8 * C * q + 8 * A,\n T = U.Ha,\n U = U.Ia + 8 * C * q + 8 * A;\n C = j.ld;\n 0 < A && (fn(O, B, N, E + 4, M, C), pn(D, R, T, U, q, E + 4, M, C)), j.La && (mn(O, B, N, E, M, C), bn(D, R, T, U, q, E, M, C)), 0 < x && (ln(O, B, N, E + 4, M, C), dn(D, R, T, U, q, E + 4, M, C)), j.La && (gn(O, B, N, E, M, C), vn(D, R, T, U, q, E, M, C));\n }\n }\n if (s.ia && alert(\"todo:DitherRow\"), null != c.put) {\n if (L = 16 * P, P = 16 * (P + 1), I ? (c.y = s.sa, c.O = s.ta + w, c.f = s.qa, c.N = s.ra + _, c.ea = s.Ha, c.W = s.Ia + _) : (L -= y, c.y = d, c.O = p, c.f = g, c.N = l, c.ea = m, c.W = v), b || (P -= y), P > c.o && (P = c.o), c.F = null, c.J = null, null != s.Fa && 0 < s.Fa.length && L < P && (c.J = lr(s, c, L, P - L), c.F = s.mb, null == c.F && 0 == c.F.length)) {\n u = Jt(s, 3, \"Could not decode alpha data.\");\n break t;\n }\n L < c.j && (y = c.j - L, L = c.j, e(!(1 & y)), c.O += s.R * y, c.N += s.B * (y >> 1), c.W += s.B * (y >> 1), null != c.F && (c.J += c.width * y)), L < P && (c.O += c.v, c.N += c.v >> 1, c.W += c.v >> 1, null != c.F && (c.J += c.v), c.ka = L - c.j, c.U = c.va - c.v, c.T = P - L, u = c.put(c));\n }\n o + 1 != s.Ic || b || (n(s.sa, s.ta - h, d, p + 16 * s.R, h), n(s.qa, s.ra - f, g, l + 8 * s.B, f), n(s.Ha, s.Ia - f, m, v + 8 * s.B, f));\n }\n if (!u) return Jt(t, 6, \"Output aborted.\");\n }\n return 1;\n }(t, r)), null != r.bc && r.bc(r), s &= 1;\n }\n return s ? (t.cb = 0, s) : 0;\n }\n function te(t, e, r, n, i) {\n i = t[e + r + 32 * n] + (i >> 3), t[e + r + 32 * n] = -256 & i ? 0 > i ? 0 : 255 : i;\n }\n function ee(t, e, r, n, i, a) {\n te(t, e, 0, r, n + i), te(t, e, 1, r, n + a), te(t, e, 2, r, n - a), te(t, e, 3, r, n - i);\n }\n function re(t) {\n return (20091 * t >> 16) + t;\n }\n function ne(t, e, r, n) {\n var i,\n o = 0,\n s = a(16);\n for (i = 0; 4 > i; ++i) {\n var c = t[e + 0] + t[e + 8],\n u = t[e + 0] - t[e + 8],\n h = (35468 * t[e + 4] >> 16) - re(t[e + 12]),\n l = re(t[e + 4]) + (35468 * t[e + 12] >> 16);\n s[o + 0] = c + l, s[o + 1] = u + h, s[o + 2] = u - h, s[o + 3] = c - l, o += 4, e++;\n }\n for (i = o = 0; 4 > i; ++i) c = (t = s[o + 0] + 4) + s[o + 8], u = t - s[o + 8], h = (35468 * s[o + 4] >> 16) - re(s[o + 12]), te(r, n, 0, 0, c + (l = re(s[o + 4]) + (35468 * s[o + 12] >> 16))), te(r, n, 1, 0, u + h), te(r, n, 2, 0, u - h), te(r, n, 3, 0, c - l), o++, n += 32;\n }\n function ie(t, e, r, n) {\n var i = t[e + 0] + 4,\n a = 35468 * t[e + 4] >> 16,\n o = re(t[e + 4]),\n s = 35468 * t[e + 1] >> 16;\n ee(r, n, 0, i + o, t = re(t[e + 1]), s), ee(r, n, 1, i + a, t, s), ee(r, n, 2, i - a, t, s), ee(r, n, 3, i - o, t, s);\n }\n function ae(t, e, r, n, i) {\n ne(t, e, r, n), i && ne(t, e + 16, r, n + 4);\n }\n function oe(t, e, r, n) {\n on(t, e + 0, r, n, 1), on(t, e + 32, r, n + 128, 1);\n }\n function se(t, e, r, n) {\n var i;\n for (t = t[e + 0] + 4, i = 0; 4 > i; ++i) for (e = 0; 4 > e; ++e) te(r, n, e, i, t);\n }\n function ce(t, e, r, n) {\n t[e + 0] && un(t, e + 0, r, n), t[e + 16] && un(t, e + 16, r, n + 4), t[e + 32] && un(t, e + 32, r, n + 128), t[e + 48] && un(t, e + 48, r, n + 128 + 4);\n }\n function ue(t, e, r, n) {\n var i,\n o = a(16);\n for (i = 0; 4 > i; ++i) {\n var s = t[e + 0 + i] + t[e + 12 + i],\n c = t[e + 4 + i] + t[e + 8 + i],\n u = t[e + 4 + i] - t[e + 8 + i],\n h = t[e + 0 + i] - t[e + 12 + i];\n o[0 + i] = s + c, o[8 + i] = s - c, o[4 + i] = h + u, o[12 + i] = h - u;\n }\n for (i = 0; 4 > i; ++i) s = (t = o[0 + 4 * i] + 3) + o[3 + 4 * i], c = o[1 + 4 * i] + o[2 + 4 * i], u = o[1 + 4 * i] - o[2 + 4 * i], h = t - o[3 + 4 * i], r[n + 0] = s + c >> 3, r[n + 16] = h + u >> 3, r[n + 32] = s - c >> 3, r[n + 48] = h - u >> 3, n += 64;\n }\n function he(t, e, r) {\n var n,\n i = e - 32,\n a = Bn,\n o = 255 - t[i - 1];\n for (n = 0; n < r; ++n) {\n var s,\n c = a,\n u = o + t[e - 1];\n for (s = 0; s < r; ++s) t[e + s] = c[u + t[i + s]];\n e += 32;\n }\n }\n function le(t, e) {\n he(t, e, 4);\n }\n function fe(t, e) {\n he(t, e, 8);\n }\n function de(t, e) {\n he(t, e, 16);\n }\n function pe(t, e) {\n var r;\n for (r = 0; 16 > r; ++r) n(t, e + 32 * r, t, e - 32, 16);\n }\n function ge(t, e) {\n var r;\n for (r = 16; 0 < r; --r) i(t, e, t[e - 1], 16), e += 32;\n }\n function me(t, e, r) {\n var n;\n for (n = 0; 16 > n; ++n) i(e, r + 32 * n, t, 16);\n }\n function ve(t, e) {\n var r,\n n = 16;\n for (r = 0; 16 > r; ++r) n += t[e - 1 + 32 * r] + t[e + r - 32];\n me(n >> 5, t, e);\n }\n function be(t, e) {\n var r,\n n = 8;\n for (r = 0; 16 > r; ++r) n += t[e - 1 + 32 * r];\n me(n >> 4, t, e);\n }\n function ye(t, e) {\n var r,\n n = 8;\n for (r = 0; 16 > r; ++r) n += t[e + r - 32];\n me(n >> 4, t, e);\n }\n function we(t, e) {\n me(128, t, e);\n }\n function Ne(t, e, r) {\n return t + 2 * e + r + 2 >> 2;\n }\n function Le(t, e) {\n var r,\n i = e - 32;\n i = new Uint8Array([Ne(t[i - 1], t[i + 0], t[i + 1]), Ne(t[i + 0], t[i + 1], t[i + 2]), Ne(t[i + 1], t[i + 2], t[i + 3]), Ne(t[i + 2], t[i + 3], t[i + 4])]);\n for (r = 0; 4 > r; ++r) n(t, e + 32 * r, i, 0, i.length);\n }\n function Ae(t, e) {\n var r = t[e - 1],\n n = t[e - 1 + 32],\n i = t[e - 1 + 64],\n a = t[e - 1 + 96];\n I(t, e + 0, 16843009 * Ne(t[e - 1 - 32], r, n)), I(t, e + 32, 16843009 * Ne(r, n, i)), I(t, e + 64, 16843009 * Ne(n, i, a)), I(t, e + 96, 16843009 * Ne(i, a, a));\n }\n function xe(t, e) {\n var r,\n n = 4;\n for (r = 0; 4 > r; ++r) n += t[e + r - 32] + t[e - 1 + 32 * r];\n for (n >>= 3, r = 0; 4 > r; ++r) i(t, e + 32 * r, n, 4);\n }\n function Se(t, e) {\n var r = t[e - 1 + 0],\n n = t[e - 1 + 32],\n i = t[e - 1 + 64],\n a = t[e - 1 - 32],\n o = t[e + 0 - 32],\n s = t[e + 1 - 32],\n c = t[e + 2 - 32],\n u = t[e + 3 - 32];\n t[e + 0 + 96] = Ne(n, i, t[e - 1 + 96]), t[e + 1 + 96] = t[e + 0 + 64] = Ne(r, n, i), t[e + 2 + 96] = t[e + 1 + 64] = t[e + 0 + 32] = Ne(a, r, n), t[e + 3 + 96] = t[e + 2 + 64] = t[e + 1 + 32] = t[e + 0 + 0] = Ne(o, a, r), t[e + 3 + 64] = t[e + 2 + 32] = t[e + 1 + 0] = Ne(s, o, a), t[e + 3 + 32] = t[e + 2 + 0] = Ne(c, s, o), t[e + 3 + 0] = Ne(u, c, s);\n }\n function _e(t, e) {\n var r = t[e + 1 - 32],\n n = t[e + 2 - 32],\n i = t[e + 3 - 32],\n a = t[e + 4 - 32],\n o = t[e + 5 - 32],\n s = t[e + 6 - 32],\n c = t[e + 7 - 32];\n t[e + 0 + 0] = Ne(t[e + 0 - 32], r, n), t[e + 1 + 0] = t[e + 0 + 32] = Ne(r, n, i), t[e + 2 + 0] = t[e + 1 + 32] = t[e + 0 + 64] = Ne(n, i, a), t[e + 3 + 0] = t[e + 2 + 32] = t[e + 1 + 64] = t[e + 0 + 96] = Ne(i, a, o), t[e + 3 + 32] = t[e + 2 + 64] = t[e + 1 + 96] = Ne(a, o, s), t[e + 3 + 64] = t[e + 2 + 96] = Ne(o, s, c), t[e + 3 + 96] = Ne(s, c, c);\n }\n function Pe(t, e) {\n var r = t[e - 1 + 0],\n n = t[e - 1 + 32],\n i = t[e - 1 + 64],\n a = t[e - 1 - 32],\n o = t[e + 0 - 32],\n s = t[e + 1 - 32],\n c = t[e + 2 - 32],\n u = t[e + 3 - 32];\n t[e + 0 + 0] = t[e + 1 + 64] = a + o + 1 >> 1, t[e + 1 + 0] = t[e + 2 + 64] = o + s + 1 >> 1, t[e + 2 + 0] = t[e + 3 + 64] = s + c + 1 >> 1, t[e + 3 + 0] = c + u + 1 >> 1, t[e + 0 + 96] = Ne(i, n, r), t[e + 0 + 64] = Ne(n, r, a), t[e + 0 + 32] = t[e + 1 + 96] = Ne(r, a, o), t[e + 1 + 32] = t[e + 2 + 96] = Ne(a, o, s), t[e + 2 + 32] = t[e + 3 + 96] = Ne(o, s, c), t[e + 3 + 32] = Ne(s, c, u);\n }\n function ke(t, e) {\n var r = t[e + 0 - 32],\n n = t[e + 1 - 32],\n i = t[e + 2 - 32],\n a = t[e + 3 - 32],\n o = t[e + 4 - 32],\n s = t[e + 5 - 32],\n c = t[e + 6 - 32],\n u = t[e + 7 - 32];\n t[e + 0 + 0] = r + n + 1 >> 1, t[e + 1 + 0] = t[e + 0 + 64] = n + i + 1 >> 1, t[e + 2 + 0] = t[e + 1 + 64] = i + a + 1 >> 1, t[e + 3 + 0] = t[e + 2 + 64] = a + o + 1 >> 1, t[e + 0 + 32] = Ne(r, n, i), t[e + 1 + 32] = t[e + 0 + 96] = Ne(n, i, a), t[e + 2 + 32] = t[e + 1 + 96] = Ne(i, a, o), t[e + 3 + 32] = t[e + 2 + 96] = Ne(a, o, s), t[e + 3 + 64] = Ne(o, s, c), t[e + 3 + 96] = Ne(s, c, u);\n }\n function Ie(t, e) {\n var r = t[e - 1 + 0],\n n = t[e - 1 + 32],\n i = t[e - 1 + 64],\n a = t[e - 1 + 96];\n t[e + 0 + 0] = r + n + 1 >> 1, t[e + 2 + 0] = t[e + 0 + 32] = n + i + 1 >> 1, t[e + 2 + 32] = t[e + 0 + 64] = i + a + 1 >> 1, t[e + 1 + 0] = Ne(r, n, i), t[e + 3 + 0] = t[e + 1 + 32] = Ne(n, i, a), t[e + 3 + 32] = t[e + 1 + 64] = Ne(i, a, a), t[e + 3 + 64] = t[e + 2 + 64] = t[e + 0 + 96] = t[e + 1 + 96] = t[e + 2 + 96] = t[e + 3 + 96] = a;\n }\n function Fe(t, e) {\n var r = t[e - 1 + 0],\n n = t[e - 1 + 32],\n i = t[e - 1 + 64],\n a = t[e - 1 + 96],\n o = t[e - 1 - 32],\n s = t[e + 0 - 32],\n c = t[e + 1 - 32],\n u = t[e + 2 - 32];\n t[e + 0 + 0] = t[e + 2 + 32] = r + o + 1 >> 1, t[e + 0 + 32] = t[e + 2 + 64] = n + r + 1 >> 1, t[e + 0 + 64] = t[e + 2 + 96] = i + n + 1 >> 1, t[e + 0 + 96] = a + i + 1 >> 1, t[e + 3 + 0] = Ne(s, c, u), t[e + 2 + 0] = Ne(o, s, c), t[e + 1 + 0] = t[e + 3 + 32] = Ne(r, o, s), t[e + 1 + 32] = t[e + 3 + 64] = Ne(n, r, o), t[e + 1 + 64] = t[e + 3 + 96] = Ne(i, n, r), t[e + 1 + 96] = Ne(a, i, n);\n }\n function Ce(t, e) {\n var r;\n for (r = 0; 8 > r; ++r) n(t, e + 32 * r, t, e - 32, 8);\n }\n function je(t, e) {\n var r;\n for (r = 0; 8 > r; ++r) i(t, e, t[e - 1], 8), e += 32;\n }\n function Oe(t, e, r) {\n var n;\n for (n = 0; 8 > n; ++n) i(e, r + 32 * n, t, 8);\n }\n function Be(t, e) {\n var r,\n n = 8;\n for (r = 0; 8 > r; ++r) n += t[e + r - 32] + t[e - 1 + 32 * r];\n Oe(n >> 4, t, e);\n }\n function Me(t, e) {\n var r,\n n = 4;\n for (r = 0; 8 > r; ++r) n += t[e + r - 32];\n Oe(n >> 3, t, e);\n }\n function Ee(t, e) {\n var r,\n n = 4;\n for (r = 0; 8 > r; ++r) n += t[e - 1 + 32 * r];\n Oe(n >> 3, t, e);\n }\n function qe(t, e) {\n Oe(128, t, e);\n }\n function De(t, e, r) {\n var n = t[e - r],\n i = t[e + 0],\n a = 3 * (i - n) + jn[1020 + t[e - 2 * r] - t[e + r]],\n o = On[112 + (a + 4 >> 3)];\n t[e - r] = Bn[255 + n + On[112 + (a + 3 >> 3)]], t[e + 0] = Bn[255 + i - o];\n }\n function Re(t, e, r, n) {\n var i = t[e + 0],\n a = t[e + r];\n return Mn[255 + t[e - 2 * r] - t[e - r]] > n || Mn[255 + a - i] > n;\n }\n function Te(t, e, r, n) {\n return 4 * Mn[255 + t[e - r] - t[e + 0]] + Mn[255 + t[e - 2 * r] - t[e + r]] <= n;\n }\n function Ue(t, e, r, n, i) {\n var a = t[e - 3 * r],\n o = t[e - 2 * r],\n s = t[e - r],\n c = t[e + 0],\n u = t[e + r],\n h = t[e + 2 * r],\n l = t[e + 3 * r];\n return 4 * Mn[255 + s - c] + Mn[255 + o - u] > n ? 0 : Mn[255 + t[e - 4 * r] - a] <= i && Mn[255 + a - o] <= i && Mn[255 + o - s] <= i && Mn[255 + l - h] <= i && Mn[255 + h - u] <= i && Mn[255 + u - c] <= i;\n }\n function ze(t, e, r, n) {\n var i = 2 * n + 1;\n for (n = 0; 16 > n; ++n) Te(t, e + n, r, i) && De(t, e + n, r);\n }\n function He(t, e, r, n) {\n var i = 2 * n + 1;\n for (n = 0; 16 > n; ++n) Te(t, e + n * r, 1, i) && De(t, e + n * r, 1);\n }\n function We(t, e, r, n) {\n var i;\n for (i = 3; 0 < i; --i) ze(t, e += 4 * r, r, n);\n }\n function Ve(t, e, r, n) {\n var i;\n for (i = 3; 0 < i; --i) He(t, e += 4, r, n);\n }\n function Ge(t, e, r, n, i, a, o, s) {\n for (a = 2 * a + 1; 0 < i--;) {\n if (Ue(t, e, r, a, o)) if (Re(t, e, r, s)) De(t, e, r);else {\n var c = t,\n u = e,\n h = r,\n l = c[u - 2 * h],\n f = c[u - h],\n d = c[u + 0],\n p = c[u + h],\n g = c[u + 2 * h],\n m = 27 * (b = jn[1020 + 3 * (d - f) + jn[1020 + l - p]]) + 63 >> 7,\n v = 18 * b + 63 >> 7,\n b = 9 * b + 63 >> 7;\n c[u - 3 * h] = Bn[255 + c[u - 3 * h] + b], c[u - 2 * h] = Bn[255 + l + v], c[u - h] = Bn[255 + f + m], c[u + 0] = Bn[255 + d - m], c[u + h] = Bn[255 + p - v], c[u + 2 * h] = Bn[255 + g - b];\n }\n e += n;\n }\n }\n function Ye(t, e, r, n, i, a, o, s) {\n for (a = 2 * a + 1; 0 < i--;) {\n if (Ue(t, e, r, a, o)) if (Re(t, e, r, s)) De(t, e, r);else {\n var c = t,\n u = e,\n h = r,\n l = c[u - h],\n f = c[u + 0],\n d = c[u + h],\n p = On[112 + ((g = 3 * (f - l)) + 4 >> 3)],\n g = On[112 + (g + 3 >> 3)],\n m = p + 1 >> 1;\n c[u - 2 * h] = Bn[255 + c[u - 2 * h] + m], c[u - h] = Bn[255 + l + g], c[u + 0] = Bn[255 + f - p], c[u + h] = Bn[255 + d - m];\n }\n e += n;\n }\n }\n function Je(t, e, r, n, i, a) {\n Ge(t, e, r, 1, 16, n, i, a);\n }\n function Xe(t, e, r, n, i, a) {\n Ge(t, e, 1, r, 16, n, i, a);\n }\n function Ke(t, e, r, n, i, a) {\n var o;\n for (o = 3; 0 < o; --o) Ye(t, e += 4 * r, r, 1, 16, n, i, a);\n }\n function Ze(t, e, r, n, i, a) {\n var o;\n for (o = 3; 0 < o; --o) Ye(t, e += 4, 1, r, 16, n, i, a);\n }\n function $e(t, e, r, n, i, a, o, s) {\n Ge(t, e, i, 1, 8, a, o, s), Ge(r, n, i, 1, 8, a, o, s);\n }\n function Qe(t, e, r, n, i, a, o, s) {\n Ge(t, e, 1, i, 8, a, o, s), Ge(r, n, 1, i, 8, a, o, s);\n }\n function tr(t, e, r, n, i, a, o, s) {\n Ye(t, e + 4 * i, i, 1, 8, a, o, s), Ye(r, n + 4 * i, i, 1, 8, a, o, s);\n }\n function er(t, e, r, n, i, a, o, s) {\n Ye(t, e + 4, 1, i, 8, a, o, s), Ye(r, n + 4, 1, i, 8, a, o, s);\n }\n function rr() {\n this.ba = new ot(), this.ec = [], this.cc = [], this.Mc = [], this.Dc = this.Nc = this.dc = this.fc = 0, this.Oa = new ct(), this.memory = 0, this.Ib = \"OutputFunc\", this.Jb = \"OutputAlphaFunc\", this.Nd = \"OutputRowFunc\";\n }\n function nr() {\n this.data = [], this.offset = this.kd = this.ha = this.w = 0, this.na = [], this.xa = this.gb = this.Ja = this.Sa = this.P = 0;\n }\n function ir() {\n this.nc = this.Ea = this.b = this.hc = 0, this.K = [], this.w = 0;\n }\n function ar() {\n this.ua = 0, this.Wa = new M(), this.vb = new M(), this.md = this.xc = this.wc = 0, this.vc = [], this.Wb = 0, this.Ya = new d(), this.yc = new l();\n }\n function or() {\n this.xb = this.a = 0, this.l = new Gt(), this.ca = new ot(), this.V = [], this.Ba = 0, this.Ta = [], this.Ua = 0, this.m = new N(), this.Pb = 0, this.wd = new N(), this.Ma = this.$ = this.C = this.i = this.c = this.xd = 0, this.s = new ar(), this.ab = 0, this.gc = o(4, ir), this.Oc = 0;\n }\n function sr() {\n this.Lc = this.Z = this.$a = this.i = this.c = 0, this.l = new Gt(), this.ic = 0, this.ca = [], this.tb = 0, this.qd = null, this.rd = 0;\n }\n function cr(t, e, r, n, i, a, o) {\n for (t = null == t ? 0 : t[e + 0], e = 0; e < o; ++e) i[a + e] = t + r[n + e] & 255, t = i[a + e];\n }\n function ur(t, e, r, n, i, a, o) {\n var s;\n if (null == t) cr(null, null, r, n, i, a, o);else for (s = 0; s < o; ++s) i[a + s] = t[e + s] + r[n + s] & 255;\n }\n function hr(t, e, r, n, i, a, o) {\n if (null == t) cr(null, null, r, n, i, a, o);else {\n var s,\n c = t[e + 0],\n u = c,\n h = c;\n for (s = 0; s < o; ++s) u = h + (c = t[e + s]) - u, h = r[n + s] + (-256 & u ? 0 > u ? 0 : 255 : u) & 255, u = c, i[a + s] = h;\n }\n }\n function lr(t, r, i, o) {\n var s = r.width,\n c = r.o;\n if (e(null != t && null != r), 0 > i || 0 >= o || i + o > c) return null;\n if (!t.Cc) {\n if (null == t.ga) {\n var u;\n if (t.ga = new sr(), (u = null == t.ga) || (u = r.width * r.o, e(0 == t.Gb.length), t.Gb = a(u), t.Uc = 0, null == t.Gb ? u = 0 : (t.mb = t.Gb, t.nb = t.Uc, t.rc = null, u = 1), u = !u), !u) {\n u = t.ga;\n var h = t.Fa,\n l = t.P,\n f = t.qc,\n d = t.mb,\n p = t.nb,\n g = l + 1,\n m = f - 1,\n b = u.l;\n if (e(null != h && null != d && null != r), mi[0] = null, mi[1] = cr, mi[2] = ur, mi[3] = hr, u.ca = d, u.tb = p, u.c = r.width, u.i = r.height, e(0 < u.c && 0 < u.i), 1 >= f) r = 0;else if (u.$a = h[l + 0] >> 0 & 3, u.Z = h[l + 0] >> 2 & 3, u.Lc = h[l + 0] >> 4 & 3, l = h[l + 0] >> 6 & 3, 0 > u.$a || 1 < u.$a || 4 <= u.Z || 1 < u.Lc || l) r = 0;else if (b.put = dt, b.ac = ft, b.bc = pt, b.ma = u, b.width = r.width, b.height = r.height, b.Da = r.Da, b.v = r.v, b.va = r.va, b.j = r.j, b.o = r.o, u.$a) t: {\n e(1 == u.$a), r = kt();\n e: for (;;) {\n if (null == r) {\n r = 0;\n break t;\n }\n if (e(null != u), u.mc = r, r.c = u.c, r.i = u.i, r.l = u.l, r.l.ma = u, r.l.width = u.c, r.l.height = u.i, r.a = 0, v(r.m, h, g, m), !It(u.c, u.i, 1, r, null)) break e;\n if (1 == r.ab && 3 == r.gc[0].hc && At(r.s) ? (u.ic = 1, h = r.c * r.i, r.Ta = null, r.Ua = 0, r.V = a(h), r.Ba = 0, null == r.V ? (r.a = 1, r = 0) : r = 1) : (u.ic = 0, r = Ft(r, u.c)), !r) break e;\n r = 1;\n break t;\n }\n u.mc = null, r = 0;\n } else r = m >= u.c * u.i;\n u = !r;\n }\n if (u) return null;\n 1 != t.ga.Lc ? t.Ga = 0 : o = c - i;\n }\n e(null != t.ga), e(i + o <= c);\n t: {\n if (r = (h = t.ga).c, c = h.l.o, 0 == h.$a) {\n if (g = t.rc, m = t.Vc, b = t.Fa, l = t.P + 1 + i * r, f = t.mb, d = t.nb + i * r, e(l <= t.P + t.qc), 0 != h.Z) for (e(null != mi[h.Z]), u = 0; u < o; ++u) mi[h.Z](g, m, b, l, f, d, r), g = f, m = d, d += r, l += r;else for (u = 0; u < o; ++u) n(f, d, b, l, r), g = f, m = d, d += r, l += r;\n t.rc = g, t.Vc = m;\n } else {\n if (e(null != h.mc), r = i + o, e(null != (u = h.mc)), e(r <= u.i), u.C >= r) r = 1;else if (h.ic || mr(), h.ic) {\n h = u.V, g = u.Ba, m = u.c;\n var y = u.i,\n w = (b = 1, l = u.$ / m, f = u.$ % m, d = u.m, p = u.s, u.$),\n N = m * y,\n L = m * r,\n x = p.wc,\n _ = w < L ? wt(p, f, l) : null;\n e(w <= N), e(r <= y), e(At(p));\n e: for (;;) {\n for (; !d.h && w < L;) {\n if (f & x || (_ = wt(p, f, l)), e(null != _), S(d), 256 > (y = bt(_.G[0], _.H[0], d))) h[g + w] = y, ++w, ++f >= m && (f = 0, ++l <= r && !(l % 16) && St(u, l));else {\n if (!(280 > y)) {\n b = 0;\n break e;\n }\n y = mt(y - 256, d);\n var P,\n k = bt(_.G[4], _.H[4], d);\n if (S(d), !(w >= (k = vt(m, k = mt(k, d))) && N - w >= y)) {\n b = 0;\n break e;\n }\n for (P = 0; P < y; ++P) h[g + w + P] = h[g + w + P - k];\n for (w += y, f += y; f >= m;) f -= m, ++l <= r && !(l % 16) && St(u, l);\n w < L && f & x && (_ = wt(p, f, l));\n }\n e(d.h == A(d));\n }\n St(u, l > r ? r : l);\n break e;\n }\n !b || d.h && w < N ? (b = 0, u.a = d.h ? 5 : 3) : u.$ = w, r = b;\n } else r = _t(u, u.V, u.Ba, u.c, u.i, r, Ct);\n if (!r) {\n o = 0;\n break t;\n }\n }\n i + o >= c && (t.Cc = 1), o = 1;\n }\n if (!o) return null;\n if (t.Cc && (null != (o = t.ga) && (o.mc = null), t.ga = null, 0 < t.Ga)) return alert(\"todo:WebPDequantizeLevels\"), null;\n }\n return t.nb + i * s;\n }\n function fr(t, e, r, n, i, a) {\n for (; 0 < i--;) {\n var o,\n s = t,\n c = e + (r ? 1 : 0),\n u = t,\n h = e + (r ? 0 : 3);\n for (o = 0; o < n; ++o) {\n var l = u[h + 4 * o];\n 255 != l && (l *= 32897, s[c + 4 * o + 0] = s[c + 4 * o + 0] * l >> 23, s[c + 4 * o + 1] = s[c + 4 * o + 1] * l >> 23, s[c + 4 * o + 2] = s[c + 4 * o + 2] * l >> 23);\n }\n e += a;\n }\n }\n function dr(t, e, r, n, i) {\n for (; 0 < n--;) {\n var a;\n for (a = 0; a < r; ++a) {\n var o = t[e + 2 * a + 0],\n s = 15 & (u = t[e + 2 * a + 1]),\n c = 4369 * s,\n u = (240 & u | u >> 4) * c >> 16;\n t[e + 2 * a + 0] = (240 & o | o >> 4) * c >> 16 & 240 | (15 & o | o << 4) * c >> 16 >> 4 & 15, t[e + 2 * a + 1] = 240 & u | s;\n }\n e += i;\n }\n }\n function pr(t, e, r, n, i, a, o, s) {\n var c,\n u,\n h = 255;\n for (u = 0; u < i; ++u) {\n for (c = 0; c < n; ++c) {\n var l = t[e + c];\n a[o + 4 * c] = l, h &= l;\n }\n e += r, o += s;\n }\n return 255 != h;\n }\n function gr(t, e, r, n, i) {\n var a;\n for (a = 0; a < i; ++a) r[n + a] = t[e + a] >> 8;\n }\n function mr() {\n An = fr, xn = dr, Sn = pr, _n = gr;\n }\n function vr(r, n, i) {\n t[r] = function (t, r, a, o, s, c, u, h, l, f, d, p, g, m, v, b, y) {\n var w,\n N = y - 1 >> 1,\n L = s[c + 0] | u[h + 0] << 16,\n A = l[f + 0] | d[p + 0] << 16;\n e(null != t);\n var x = 3 * L + A + 131074 >> 2;\n for (n(t[r + 0], 255 & x, x >> 16, g, m), null != a && (x = 3 * A + L + 131074 >> 2, n(a[o + 0], 255 & x, x >> 16, v, b)), w = 1; w <= N; ++w) {\n var S = s[c + w] | u[h + w] << 16,\n _ = l[f + w] | d[p + w] << 16,\n P = L + S + A + _ + 524296,\n k = P + 2 * (S + A) >> 3;\n x = k + L >> 1, L = (P = P + 2 * (L + _) >> 3) + S >> 1, n(t[r + 2 * w - 1], 255 & x, x >> 16, g, m + (2 * w - 1) * i), n(t[r + 2 * w - 0], 255 & L, L >> 16, g, m + (2 * w - 0) * i), null != a && (x = P + A >> 1, L = k + _ >> 1, n(a[o + 2 * w - 1], 255 & x, x >> 16, v, b + (2 * w - 1) * i), n(a[o + 2 * w + 0], 255 & L, L >> 16, v, b + (2 * w + 0) * i)), L = S, A = _;\n }\n 1 & y || (x = 3 * L + A + 131074 >> 2, n(t[r + y - 1], 255 & x, x >> 16, g, m + (y - 1) * i), null != a && (x = 3 * A + L + 131074 >> 2, n(a[o + y - 1], 255 & x, x >> 16, v, b + (y - 1) * i)));\n };\n }\n function br() {\n vi[En] = bi, vi[qn] = wi, vi[Dn] = yi, vi[Rn] = Ni, vi[Tn] = Li, vi[Un] = Ai, vi[zn] = xi, vi[Hn] = wi, vi[Wn] = Ni, vi[Vn] = Li, vi[Gn] = Ai;\n }\n function yr(t) {\n return t & ~Fi ? 0 > t ? 0 : 255 : t >> Ii;\n }\n function wr(t, e) {\n return yr((19077 * t >> 8) + (26149 * e >> 8) - 14234);\n }\n function Nr(t, e, r) {\n return yr((19077 * t >> 8) - (6419 * e >> 8) - (13320 * r >> 8) + 8708);\n }\n function Lr(t, e) {\n return yr((19077 * t >> 8) + (33050 * e >> 8) - 17685);\n }\n function Ar(t, e, r, n, i) {\n n[i + 0] = wr(t, r), n[i + 1] = Nr(t, e, r), n[i + 2] = Lr(t, e);\n }\n function xr(t, e, r, n, i) {\n n[i + 0] = Lr(t, e), n[i + 1] = Nr(t, e, r), n[i + 2] = wr(t, r);\n }\n function Sr(t, e, r, n, i) {\n var a = Nr(t, e, r);\n e = a << 3 & 224 | Lr(t, e) >> 3, n[i + 0] = 248 & wr(t, r) | a >> 5, n[i + 1] = e;\n }\n function _r(t, e, r, n, i) {\n var a = 240 & Lr(t, e) | 15;\n n[i + 0] = 240 & wr(t, r) | Nr(t, e, r) >> 4, n[i + 1] = a;\n }\n function Pr(t, e, r, n, i) {\n n[i + 0] = 255, Ar(t, e, r, n, i + 1);\n }\n function kr(t, e, r, n, i) {\n xr(t, e, r, n, i), n[i + 3] = 255;\n }\n function Ir(t, e, r, n, i) {\n Ar(t, e, r, n, i), n[i + 3] = 255;\n }\n function Vt(t, e) {\n return 0 > t ? 0 : t > e ? e : t;\n }\n function Fr(e, r, n) {\n t[e] = function (t, e, i, a, o, s, c, u, h) {\n for (var l = u + (-2 & h) * n; u != l;) r(t[e + 0], i[a + 0], o[s + 0], c, u), r(t[e + 1], i[a + 0], o[s + 0], c, u + n), e += 2, ++a, ++s, u += 2 * n;\n 1 & h && r(t[e + 0], i[a + 0], o[s + 0], c, u);\n };\n }\n function Cr(t, e, r) {\n return 0 == r ? 0 == t ? 0 == e ? 6 : 5 : 0 == e ? 4 : 0 : r;\n }\n function jr(t, e, r, n, i) {\n switch (t >>> 30) {\n case 3:\n on(e, r, n, i, 0);\n break;\n case 2:\n sn(e, r, n, i);\n break;\n case 1:\n un(e, r, n, i);\n }\n }\n function Or(t, e) {\n var r,\n a,\n o = e.M,\n s = e.Nb,\n c = t.oc,\n u = t.pc + 40,\n h = t.oc,\n l = t.pc + 584,\n f = t.oc,\n d = t.pc + 600;\n for (r = 0; 16 > r; ++r) c[u + 32 * r - 1] = 129;\n for (r = 0; 8 > r; ++r) h[l + 32 * r - 1] = 129, f[d + 32 * r - 1] = 129;\n for (0 < o ? c[u - 1 - 32] = h[l - 1 - 32] = f[d - 1 - 32] = 129 : (i(c, u - 32 - 1, 127, 21), i(h, l - 32 - 1, 127, 9), i(f, d - 32 - 1, 127, 9)), a = 0; a < t.za; ++a) {\n var p = e.ya[e.aa + a];\n if (0 < a) {\n for (r = -1; 16 > r; ++r) n(c, u + 32 * r - 4, c, u + 32 * r + 12, 4);\n for (r = -1; 8 > r; ++r) n(h, l + 32 * r - 4, h, l + 32 * r + 4, 4), n(f, d + 32 * r - 4, f, d + 32 * r + 4, 4);\n }\n var g = t.Gd,\n m = t.Hd + a,\n v = p.ad,\n b = p.Hc;\n if (0 < o && (n(c, u - 32, g[m].y, 0, 16), n(h, l - 32, g[m].f, 0, 8), n(f, d - 32, g[m].ea, 0, 8)), p.Za) {\n var y = c,\n w = u - 32 + 16;\n for (0 < o && (a >= t.za - 1 ? i(y, w, g[m].y[15], 4) : n(y, w, g[m + 1].y, 0, 4)), r = 0; 4 > r; r++) y[w + 128 + r] = y[w + 256 + r] = y[w + 384 + r] = y[w + 0 + r];\n for (r = 0; 16 > r; ++r, b <<= 2) y = c, w = u + Di[r], fi[p.Ob[r]](y, w), jr(b, v, 16 * +r, y, w);\n } else if (y = Cr(a, o, p.Ob[0]), li[y](c, u), 0 != b) for (r = 0; 16 > r; ++r, b <<= 2) jr(b, v, 16 * +r, c, u + Di[r]);\n for (r = p.Gc, y = Cr(a, o, p.Dd), di[y](h, l), di[y](f, d), b = v, y = h, w = l, 255 & (p = r >> 0) && (170 & p ? cn(b, 256, y, w) : hn(b, 256, y, w)), p = f, b = d, 255 & (r >>= 8) && (170 & r ? cn(v, 320, p, b) : hn(v, 320, p, b)), o < t.Ub - 1 && (n(g[m].y, 0, c, u + 480, 16), n(g[m].f, 0, h, l + 224, 8), n(g[m].ea, 0, f, d + 224, 8)), r = 8 * s * t.B, g = t.sa, m = t.ta + 16 * a + 16 * s * t.R, v = t.qa, p = t.ra + 8 * a + r, b = t.Ha, y = t.Ia + 8 * a + r, r = 0; 16 > r; ++r) n(g, m + r * t.R, c, u + 32 * r, 16);\n for (r = 0; 8 > r; ++r) n(v, p + r * t.B, h, l + 32 * r, 8), n(b, y + r * t.B, f, d + 32 * r, 8);\n }\n }\n function Br(t, n, i, a, o, s, c, u, h) {\n var l = [0],\n f = [0],\n d = 0,\n p = null != h ? h.kd : 0,\n g = null != h ? h : new nr();\n if (null == t || 12 > i) return 7;\n g.data = t, g.w = n, g.ha = i, n = [n], i = [i], g.gb = [g.gb];\n t: {\n var m = n,\n b = i,\n y = g.gb;\n if (e(null != t), e(null != b), e(null != y), y[0] = 0, 12 <= b[0] && !r(t, m[0], \"RIFF\")) {\n if (r(t, m[0] + 8, \"WEBP\")) {\n y = 3;\n break t;\n }\n var w = j(t, m[0] + 4);\n if (12 > w || 4294967286 < w) {\n y = 3;\n break t;\n }\n if (p && w > b[0] - 8) {\n y = 7;\n break t;\n }\n y[0] = w, m[0] += 12, b[0] -= 12;\n }\n y = 0;\n }\n if (0 != y) return y;\n for (w = 0 < g.gb[0], i = i[0];;) {\n t: {\n var L = t;\n b = n, y = i;\n var A = l,\n x = f,\n S = m = [0];\n if ((k = d = [d])[0] = 0, 8 > y[0]) y = 7;else {\n if (!r(L, b[0], \"VP8X\")) {\n if (10 != j(L, b[0] + 4)) {\n y = 3;\n break t;\n }\n if (18 > y[0]) {\n y = 7;\n break t;\n }\n var _ = j(L, b[0] + 8),\n P = 1 + C(L, b[0] + 12);\n if (2147483648 <= P * (L = 1 + C(L, b[0] + 15))) {\n y = 3;\n break t;\n }\n null != S && (S[0] = _), null != A && (A[0] = P), null != x && (x[0] = L), b[0] += 18, y[0] -= 18, k[0] = 1;\n }\n y = 0;\n }\n }\n if (d = d[0], m = m[0], 0 != y) return y;\n if (b = !!(2 & m), !w && d) return 3;\n if (null != s && (s[0] = !!(16 & m)), null != c && (c[0] = b), null != u && (u[0] = 0), c = l[0], m = f[0], d && b && null == h) {\n y = 0;\n break;\n }\n if (4 > i) {\n y = 7;\n break;\n }\n if (w && d || !w && !d && !r(t, n[0], \"ALPH\")) {\n i = [i], g.na = [g.na], g.P = [g.P], g.Sa = [g.Sa];\n t: {\n _ = t, y = n, w = i;\n var k = g.gb;\n A = g.na, x = g.P, S = g.Sa;\n P = 22, e(null != _), e(null != w), L = y[0];\n var I = w[0];\n for (e(null != A), e(null != S), A[0] = null, x[0] = null, S[0] = 0;;) {\n if (y[0] = L, w[0] = I, 8 > I) {\n y = 7;\n break t;\n }\n var F = j(_, L + 4);\n if (4294967286 < F) {\n y = 3;\n break t;\n }\n var O = 8 + F + 1 & -2;\n if (P += O, 0 < k && P > k) {\n y = 3;\n break t;\n }\n if (!r(_, L, \"VP8 \") || !r(_, L, \"VP8L\")) {\n y = 0;\n break t;\n }\n if (I[0] < O) {\n y = 7;\n break t;\n }\n r(_, L, \"ALPH\") || (A[0] = _, x[0] = L + 8, S[0] = F), L += O, I -= O;\n }\n }\n if (i = i[0], g.na = g.na[0], g.P = g.P[0], g.Sa = g.Sa[0], 0 != y) break;\n }\n i = [i], g.Ja = [g.Ja], g.xa = [g.xa];\n t: if (k = t, y = n, w = i, A = g.gb[0], x = g.Ja, S = g.xa, _ = y[0], L = !r(k, _, \"VP8 \"), P = !r(k, _, \"VP8L\"), e(null != k), e(null != w), e(null != x), e(null != S), 8 > w[0]) y = 7;else {\n if (L || P) {\n if (k = j(k, _ + 4), 12 <= A && k > A - 12) {\n y = 3;\n break t;\n }\n if (p && k > w[0] - 8) {\n y = 7;\n break t;\n }\n x[0] = k, y[0] += 8, w[0] -= 8, S[0] = P;\n } else S[0] = 5 <= w[0] && 47 == k[_ + 0] && !(k[_ + 4] >> 5), x[0] = w[0];\n y = 0;\n }\n if (i = i[0], g.Ja = g.Ja[0], g.xa = g.xa[0], n = n[0], 0 != y) break;\n if (4294967286 < g.Ja) return 3;\n if (null == u || b || (u[0] = g.xa ? 2 : 1), c = [c], m = [m], g.xa) {\n if (5 > i) {\n y = 7;\n break;\n }\n u = c, p = m, b = s, null == t || 5 > i ? t = 0 : 5 <= i && 47 == t[n + 0] && !(t[n + 4] >> 5) ? (w = [0], k = [0], A = [0], v(x = new N(), t, n, i), gt(x, w, k, A) ? (null != u && (u[0] = w[0]), null != p && (p[0] = k[0]), null != b && (b[0] = A[0]), t = 1) : t = 0) : t = 0;\n } else {\n if (10 > i) {\n y = 7;\n break;\n }\n u = m, null == t || 10 > i || !Xt(t, n + 3, i - 3) ? t = 0 : (p = t[n + 0] | t[n + 1] << 8 | t[n + 2] << 16, b = 16383 & (t[n + 7] << 8 | t[n + 6]), t = 16383 & (t[n + 9] << 8 | t[n + 8]), 1 & p || 3 < (p >> 1 & 7) || !(p >> 4 & 1) || p >> 5 >= g.Ja || !b || !t ? t = 0 : (c && (c[0] = b), u && (u[0] = t), t = 1));\n }\n if (!t) return 3;\n if (c = c[0], m = m[0], d && (l[0] != c || f[0] != m)) return 3;\n null != h && (h[0] = g, h.offset = n - h.w, e(4294967286 > n - h.w), e(h.offset == h.ha - i));\n break;\n }\n return 0 == y || 7 == y && d && null == h ? (null != s && (s[0] |= null != g.na && 0 < g.na.length), null != a && (a[0] = c), null != o && (o[0] = m), 0) : y;\n }\n function Mr(t, e, r) {\n var n = e.width,\n i = e.height,\n a = 0,\n o = 0,\n s = n,\n c = i;\n if (e.Da = null != t && 0 < t.Da, e.Da && (s = t.cd, c = t.bd, a = t.v, o = t.j, 11 > r || (a &= -2, o &= -2), 0 > a || 0 > o || 0 >= s || 0 >= c || a + s > n || o + c > i)) return 0;\n if (e.v = a, e.j = o, e.va = a + s, e.o = o + c, e.U = s, e.T = c, e.da = null != t && 0 < t.da, e.da) {\n if (!E(s, c, r = [t.ib], a = [t.hb])) return 0;\n e.ib = r[0], e.hb = a[0];\n }\n return e.ob = null != t && t.ob, e.Kb = null == t || !t.Sd, e.da && (e.ob = e.ib < 3 * n / 4 && e.hb < 3 * i / 4, e.Kb = 0), 1;\n }\n function Er(t) {\n if (null == t) return 2;\n if (11 > t.S) {\n var e = t.f.RGBA;\n e.fb += (t.height - 1) * e.A, e.A = -e.A;\n } else e = t.f.kb, t = t.height, e.O += (t - 1) * e.fa, e.fa = -e.fa, e.N += (t - 1 >> 1) * e.Ab, e.Ab = -e.Ab, e.W += (t - 1 >> 1) * e.Db, e.Db = -e.Db, null != e.F && (e.J += (t - 1) * e.lb, e.lb = -e.lb);\n return 0;\n }\n function qr(t, e, r, n) {\n if (null == n || 0 >= t || 0 >= e) return 2;\n if (null != r) {\n if (r.Da) {\n var i = r.cd,\n o = r.bd,\n s = -2 & r.v,\n c = -2 & r.j;\n if (0 > s || 0 > c || 0 >= i || 0 >= o || s + i > t || c + o > e) return 2;\n t = i, e = o;\n }\n if (r.da) {\n if (!E(t, e, i = [r.ib], o = [r.hb])) return 2;\n t = i[0], e = o[0];\n }\n }\n n.width = t, n.height = e;\n t: {\n var u = n.width,\n h = n.height;\n if (t = n.S, 0 >= u || 0 >= h || !(t >= En && 13 > t)) t = 2;else {\n if (0 >= n.Rd && null == n.sd) {\n s = o = i = e = 0;\n var l = (c = u * zi[t]) * h;\n if (11 > t || (o = (h + 1) / 2 * (e = (u + 1) / 2), 12 == t && (s = (i = u) * h)), null == (h = a(l + 2 * o + s))) {\n t = 1;\n break t;\n }\n n.sd = h, 11 > t ? ((u = n.f.RGBA).eb = h, u.fb = 0, u.A = c, u.size = l) : ((u = n.f.kb).y = h, u.O = 0, u.fa = c, u.Fd = l, u.f = h, u.N = 0 + l, u.Ab = e, u.Cd = o, u.ea = h, u.W = 0 + l + o, u.Db = e, u.Ed = o, 12 == t && (u.F = h, u.J = 0 + l + 2 * o), u.Tc = s, u.lb = i);\n }\n if (e = 1, i = n.S, o = n.width, s = n.height, i >= En && 13 > i) {\n if (11 > i) t = n.f.RGBA, e &= (c = Math.abs(t.A)) * (s - 1) + o <= t.size, e &= c >= o * zi[i], e &= null != t.eb;else {\n t = n.f.kb, c = (o + 1) / 2, l = (s + 1) / 2, u = Math.abs(t.fa);\n h = Math.abs(t.Ab);\n var f = Math.abs(t.Db),\n d = Math.abs(t.lb),\n p = d * (s - 1) + o;\n e &= u * (s - 1) + o <= t.Fd, e &= h * (l - 1) + c <= t.Cd, e = (e &= f * (l - 1) + c <= t.Ed) & u >= o & h >= c & f >= c, e &= null != t.y, e &= null != t.f, e &= null != t.ea, 12 == i && (e &= d >= o, e &= p <= t.Tc, e &= null != t.F);\n }\n } else e = 0;\n t = e ? 0 : 2;\n }\n }\n return 0 != t || null != r && r.fd && (t = Er(n)), t;\n }\n var Dr = 64,\n Rr = [0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, 65535, 131071, 262143, 524287, 1048575, 2097151, 4194303, 8388607, 16777215],\n Tr = 24,\n Ur = 32,\n zr = 8,\n Hr = [0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7];\n R(\"Predictor0\", \"PredictorAdd0\"), t.Predictor0 = function () {\n return 4278190080;\n }, t.Predictor1 = function (t) {\n return t;\n }, t.Predictor2 = function (t, e, r) {\n return e[r + 0];\n }, t.Predictor3 = function (t, e, r) {\n return e[r + 1];\n }, t.Predictor4 = function (t, e, r) {\n return e[r - 1];\n }, t.Predictor5 = function (t, e, r) {\n return U(U(t, e[r + 1]), e[r + 0]);\n }, t.Predictor6 = function (t, e, r) {\n return U(t, e[r - 1]);\n }, t.Predictor7 = function (t, e, r) {\n return U(t, e[r + 0]);\n }, t.Predictor8 = function (t, e, r) {\n return U(e[r - 1], e[r + 0]);\n }, t.Predictor9 = function (t, e, r) {\n return U(e[r + 0], e[r + 1]);\n }, t.Predictor10 = function (t, e, r) {\n return U(U(t, e[r - 1]), U(e[r + 0], e[r + 1]));\n }, t.Predictor11 = function (t, e, r) {\n var n = e[r + 0];\n return 0 >= W(n >> 24 & 255, t >> 24 & 255, (e = e[r - 1]) >> 24 & 255) + W(n >> 16 & 255, t >> 16 & 255, e >> 16 & 255) + W(n >> 8 & 255, t >> 8 & 255, e >> 8 & 255) + W(255 & n, 255 & t, 255 & e) ? n : t;\n }, t.Predictor12 = function (t, e, r) {\n var n = e[r + 0];\n return (z((t >> 24 & 255) + (n >> 24 & 255) - ((e = e[r - 1]) >> 24 & 255)) << 24 | z((t >> 16 & 255) + (n >> 16 & 255) - (e >> 16 & 255)) << 16 | z((t >> 8 & 255) + (n >> 8 & 255) - (e >> 8 & 255)) << 8 | z((255 & t) + (255 & n) - (255 & e))) >>> 0;\n }, t.Predictor13 = function (t, e, r) {\n var n = e[r - 1];\n return (H((t = U(t, e[r + 0])) >> 24 & 255, n >> 24 & 255) << 24 | H(t >> 16 & 255, n >> 16 & 255) << 16 | H(t >> 8 & 255, n >> 8 & 255) << 8 | H(t >> 0 & 255, n >> 0 & 255)) >>> 0;\n };\n var Wr = t.PredictorAdd0;\n t.PredictorAdd1 = V, R(\"Predictor2\", \"PredictorAdd2\"), R(\"Predictor3\", \"PredictorAdd3\"), R(\"Predictor4\", \"PredictorAdd4\"), R(\"Predictor5\", \"PredictorAdd5\"), R(\"Predictor6\", \"PredictorAdd6\"), R(\"Predictor7\", \"PredictorAdd7\"), R(\"Predictor8\", \"PredictorAdd8\"), R(\"Predictor9\", \"PredictorAdd9\"), R(\"Predictor10\", \"PredictorAdd10\"), R(\"Predictor11\", \"PredictorAdd11\"), R(\"Predictor12\", \"PredictorAdd12\"), R(\"Predictor13\", \"PredictorAdd13\");\n var Vr = t.PredictorAdd2;\n X(\"ColorIndexInverseTransform\", \"MapARGB\", \"32b\", function (t) {\n return t >> 8 & 255;\n }, function (t) {\n return t;\n }), X(\"VP8LColorIndexInverseTransformAlpha\", \"MapAlpha\", \"8b\", function (t) {\n return t;\n }, function (t) {\n return t >> 8 & 255;\n });\n var Gr,\n Yr = t.ColorIndexInverseTransform,\n Jr = t.MapARGB,\n Xr = t.VP8LColorIndexInverseTransformAlpha,\n Kr = t.MapAlpha,\n Zr = t.VP8LPredictorsAdd = [];\n Zr.length = 16, (t.VP8LPredictors = []).length = 16, (t.VP8LPredictorsAdd_C = []).length = 16, (t.VP8LPredictors_C = []).length = 16;\n var $r,\n Qr,\n tn,\n en,\n rn,\n nn,\n an,\n on,\n sn,\n cn,\n un,\n hn,\n ln,\n fn,\n dn,\n pn,\n gn,\n mn,\n vn,\n bn,\n yn,\n wn,\n Nn,\n Ln,\n An,\n xn,\n Sn,\n _n,\n Pn = a(511),\n kn = a(2041),\n In = a(225),\n Fn = a(767),\n Cn = 0,\n jn = kn,\n On = In,\n Bn = Fn,\n Mn = Pn,\n En = 0,\n qn = 1,\n Dn = 2,\n Rn = 3,\n Tn = 4,\n Un = 5,\n zn = 6,\n Hn = 7,\n Wn = 8,\n Vn = 9,\n Gn = 10,\n Yn = [2, 3, 7],\n Jn = [3, 3, 11],\n Xn = [280, 256, 256, 256, 40],\n Kn = [0, 1, 1, 1, 0],\n Zn = [17, 18, 0, 1, 2, 3, 4, 5, 16, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],\n $n = [24, 7, 23, 25, 40, 6, 39, 41, 22, 26, 38, 42, 56, 5, 55, 57, 21, 27, 54, 58, 37, 43, 72, 4, 71, 73, 20, 28, 53, 59, 70, 74, 36, 44, 88, 69, 75, 52, 60, 3, 87, 89, 19, 29, 86, 90, 35, 45, 68, 76, 85, 91, 51, 61, 104, 2, 103, 105, 18, 30, 102, 106, 34, 46, 84, 92, 67, 77, 101, 107, 50, 62, 120, 1, 119, 121, 83, 93, 17, 31, 100, 108, 66, 78, 118, 122, 33, 47, 117, 123, 49, 63, 99, 109, 82, 94, 0, 116, 124, 65, 79, 16, 32, 98, 110, 48, 115, 125, 81, 95, 64, 114, 126, 97, 111, 80, 113, 127, 96, 112],\n Qn = [2954, 2956, 2958, 2962, 2970, 2986, 3018, 3082, 3212, 3468, 3980, 5004],\n ti = 8,\n ei = [4, 5, 6, 7, 8, 9, 10, 10, 11, 12, 13, 14, 15, 16, 17, 17, 18, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 25, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 91, 93, 95, 96, 98, 100, 101, 102, 104, 106, 108, 110, 112, 114, 116, 118, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 143, 145, 148, 151, 154, 157],\n ri = [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 119, 122, 125, 128, 131, 134, 137, 140, 143, 146, 149, 152, 155, 158, 161, 164, 167, 170, 173, 177, 181, 185, 189, 193, 197, 201, 205, 209, 213, 217, 221, 225, 229, 234, 239, 245, 249, 254, 259, 264, 269, 274, 279, 284],\n ni = null,\n ii = [[173, 148, 140, 0], [176, 155, 140, 135, 0], [180, 157, 141, 134, 130, 0], [254, 254, 243, 230, 196, 177, 153, 140, 133, 130, 129, 0]],\n ai = [0, 1, 4, 8, 5, 2, 3, 6, 9, 12, 13, 10, 7, 11, 14, 15],\n oi = [-0, 1, -1, 2, -2, 3, 4, 6, -3, 5, -4, -5, -6, 7, -7, 8, -8, -9],\n si = [[[[128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128], [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128], [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128]], [[253, 136, 254, 255, 228, 219, 128, 128, 128, 128, 128], [189, 129, 242, 255, 227, 213, 255, 219, 128, 128, 128], [106, 126, 227, 252, 214, 209, 255, 255, 128, 128, 128]], [[1, 98, 248, 255, 236, 226, 255, 255, 128, 128, 128], [181, 133, 238, 254, 221, 234, 255, 154, 128, 128, 128], [78, 134, 202, 247, 198, 180, 255, 219, 128, 128, 128]], [[1, 185, 249, 255, 243, 255, 128, 128, 128, 128, 128], [184, 150, 247, 255, 236, 224, 128, 128, 128, 128, 128], [77, 110, 216, 255, 236, 230, 128, 128, 128, 128, 128]], [[1, 101, 251, 255, 241, 255, 128, 128, 128, 128, 128], [170, 139, 241, 252, 236, 209, 255, 255, 128, 128, 128], [37, 116, 196, 243, 228, 255, 255, 255, 128, 128, 128]], [[1, 204, 254, 255, 245, 255, 128, 128, 128, 128, 128], [207, 160, 250, 255, 238, 128, 128, 128, 128, 128, 128], [102, 103, 231, 255, 211, 171, 128, 128, 128, 128, 128]], [[1, 152, 252, 255, 240, 255, 128, 128, 128, 128, 128], [177, 135, 243, 255, 234, 225, 128, 128, 128, 128, 128], [80, 129, 211, 255, 194, 224, 128, 128, 128, 128, 128]], [[1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128], [246, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128], [255, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128]]], [[[198, 35, 237, 223, 193, 187, 162, 160, 145, 155, 62], [131, 45, 198, 221, 172, 176, 220, 157, 252, 221, 1], [68, 47, 146, 208, 149, 167, 221, 162, 255, 223, 128]], [[1, 149, 241, 255, 221, 224, 255, 255, 128, 128, 128], [184, 141, 234, 253, 222, 220, 255, 199, 128, 128, 128], [81, 99, 181, 242, 176, 190, 249, 202, 255, 255, 128]], [[1, 129, 232, 253, 214, 197, 242, 196, 255, 255, 128], [99, 121, 210, 250, 201, 198, 255, 202, 128, 128, 128], [23, 91, 163, 242, 170, 187, 247, 210, 255, 255, 128]], [[1, 200, 246, 255, 234, 255, 128, 128, 128, 128, 128], [109, 178, 241, 255, 231, 245, 255, 255, 128, 128, 128], [44, 130, 201, 253, 205, 192, 255, 255, 128, 128, 128]], [[1, 132, 239, 251, 219, 209, 255, 165, 128, 128, 128], [94, 136, 225, 251, 218, 190, 255, 255, 128, 128, 128], [22, 100, 174, 245, 186, 161, 255, 199, 128, 128, 128]], [[1, 182, 249, 255, 232, 235, 128, 128, 128, 128, 128], [124, 143, 241, 255, 227, 234, 128, 128, 128, 128, 128], [35, 77, 181, 251, 193, 211, 255, 205, 128, 128, 128]], [[1, 157, 247, 255, 236, 231, 255, 255, 128, 128, 128], [121, 141, 235, 255, 225, 227, 255, 255, 128, 128, 128], [45, 99, 188, 251, 195, 217, 255, 224, 128, 128, 128]], [[1, 1, 251, 255, 213, 255, 128, 128, 128, 128, 128], [203, 1, 248, 255, 255, 128, 128, 128, 128, 128, 128], [137, 1, 177, 255, 224, 255, 128, 128, 128, 128, 128]]], [[[253, 9, 248, 251, 207, 208, 255, 192, 128, 128, 128], [175, 13, 224, 243, 193, 185, 249, 198, 255, 255, 128], [73, 17, 171, 221, 161, 179, 236, 167, 255, 234, 128]], [[1, 95, 247, 253, 212, 183, 255, 255, 128, 128, 128], [239, 90, 244, 250, 211, 209, 255, 255, 128, 128, 128], [155, 77, 195, 248, 188, 195, 255, 255, 128, 128, 128]], [[1, 24, 239, 251, 218, 219, 255, 205, 128, 128, 128], [201, 51, 219, 255, 196, 186, 128, 128, 128, 128, 128], [69, 46, 190, 239, 201, 218, 255, 228, 128, 128, 128]], [[1, 191, 251, 255, 255, 128, 128, 128, 128, 128, 128], [223, 165, 249, 255, 213, 255, 128, 128, 128, 128, 128], [141, 124, 248, 255, 255, 128, 128, 128, 128, 128, 128]], [[1, 16, 248, 255, 255, 128, 128, 128, 128, 128, 128], [190, 36, 230, 255, 236, 255, 128, 128, 128, 128, 128], [149, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128]], [[1, 226, 255, 128, 128, 128, 128, 128, 128, 128, 128], [247, 192, 255, 128, 128, 128, 128, 128, 128, 128, 128], [240, 128, 255, 128, 128, 128, 128, 128, 128, 128, 128]], [[1, 134, 252, 255, 255, 128, 128, 128, 128, 128, 128], [213, 62, 250, 255, 255, 128, 128, 128, 128, 128, 128], [55, 93, 255, 128, 128, 128, 128, 128, 128, 128, 128]], [[128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128], [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128], [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128]]], [[[202, 24, 213, 235, 186, 191, 220, 160, 240, 175, 255], [126, 38, 182, 232, 169, 184, 228, 174, 255, 187, 128], [61, 46, 138, 219, 151, 178, 240, 170, 255, 216, 128]], [[1, 112, 230, 250, 199, 191, 247, 159, 255, 255, 128], [166, 109, 228, 252, 211, 215, 255, 174, 128, 128, 128], [39, 77, 162, 232, 172, 180, 245, 178, 255, 255, 128]], [[1, 52, 220, 246, 198, 199, 249, 220, 255, 255, 128], [124, 74, 191, 243, 183, 193, 250, 221, 255, 255, 128], [24, 71, 130, 219, 154, 170, 243, 182, 255, 255, 128]], [[1, 182, 225, 249, 219, 240, 255, 224, 128, 128, 128], [149, 150, 226, 252, 216, 205, 255, 171, 128, 128, 128], [28, 108, 170, 242, 183, 194, 254, 223, 255, 255, 128]], [[1, 81, 230, 252, 204, 203, 255, 192, 128, 128, 128], [123, 102, 209, 247, 188, 196, 255, 233, 128, 128, 128], [20, 95, 153, 243, 164, 173, 255, 203, 128, 128, 128]], [[1, 222, 248, 255, 216, 213, 128, 128, 128, 128, 128], [168, 175, 246, 252, 235, 205, 255, 255, 128, 128, 128], [47, 116, 215, 255, 211, 212, 255, 255, 128, 128, 128]], [[1, 121, 236, 253, 212, 214, 255, 255, 128, 128, 128], [141, 84, 213, 252, 201, 202, 255, 219, 128, 128, 128], [42, 80, 160, 240, 162, 185, 255, 205, 128, 128, 128]], [[1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128], [244, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128], [238, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128]]]],\n ci = [[[231, 120, 48, 89, 115, 113, 120, 152, 112], [152, 179, 64, 126, 170, 118, 46, 70, 95], [175, 69, 143, 80, 85, 82, 72, 155, 103], [56, 58, 10, 171, 218, 189, 17, 13, 152], [114, 26, 17, 163, 44, 195, 21, 10, 173], [121, 24, 80, 195, 26, 62, 44, 64, 85], [144, 71, 10, 38, 171, 213, 144, 34, 26], [170, 46, 55, 19, 136, 160, 33, 206, 71], [63, 20, 8, 114, 114, 208, 12, 9, 226], [81, 40, 11, 96, 182, 84, 29, 16, 36]], [[134, 183, 89, 137, 98, 101, 106, 165, 148], [72, 187, 100, 130, 157, 111, 32, 75, 80], [66, 102, 167, 99, 74, 62, 40, 234, 128], [41, 53, 9, 178, 241, 141, 26, 8, 107], [74, 43, 26, 146, 73, 166, 49, 23, 157], [65, 38, 105, 160, 51, 52, 31, 115, 128], [104, 79, 12, 27, 217, 255, 87, 17, 7], [87, 68, 71, 44, 114, 51, 15, 186, 23], [47, 41, 14, 110, 182, 183, 21, 17, 194], [66, 45, 25, 102, 197, 189, 23, 18, 22]], [[88, 88, 147, 150, 42, 46, 45, 196, 205], [43, 97, 183, 117, 85, 38, 35, 179, 61], [39, 53, 200, 87, 26, 21, 43, 232, 171], [56, 34, 51, 104, 114, 102, 29, 93, 77], [39, 28, 85, 171, 58, 165, 90, 98, 64], [34, 22, 116, 206, 23, 34, 43, 166, 73], [107, 54, 32, 26, 51, 1, 81, 43, 31], [68, 25, 106, 22, 64, 171, 36, 225, 114], [34, 19, 21, 102, 132, 188, 16, 76, 124], [62, 18, 78, 95, 85, 57, 50, 48, 51]], [[193, 101, 35, 159, 215, 111, 89, 46, 111], [60, 148, 31, 172, 219, 228, 21, 18, 111], [112, 113, 77, 85, 179, 255, 38, 120, 114], [40, 42, 1, 196, 245, 209, 10, 25, 109], [88, 43, 29, 140, 166, 213, 37, 43, 154], [61, 63, 30, 155, 67, 45, 68, 1, 209], [100, 80, 8, 43, 154, 1, 51, 26, 71], [142, 78, 78, 16, 255, 128, 34, 197, 171], [41, 40, 5, 102, 211, 183, 4, 1, 221], [51, 50, 17, 168, 209, 192, 23, 25, 82]], [[138, 31, 36, 171, 27, 166, 38, 44, 229], [67, 87, 58, 169, 82, 115, 26, 59, 179], [63, 59, 90, 180, 59, 166, 93, 73, 154], [40, 40, 21, 116, 143, 209, 34, 39, 175], [47, 15, 16, 183, 34, 223, 49, 45, 183], [46, 17, 33, 183, 6, 98, 15, 32, 183], [57, 46, 22, 24, 128, 1, 54, 17, 37], [65, 32, 73, 115, 28, 128, 23, 128, 205], [40, 3, 9, 115, 51, 192, 18, 6, 223], [87, 37, 9, 115, 59, 77, 64, 21, 47]], [[104, 55, 44, 218, 9, 54, 53, 130, 226], [64, 90, 70, 205, 40, 41, 23, 26, 57], [54, 57, 112, 184, 5, 41, 38, 166, 213], [30, 34, 26, 133, 152, 116, 10, 32, 134], [39, 19, 53, 221, 26, 114, 32, 73, 255], [31, 9, 65, 234, 2, 15, 1, 118, 73], [75, 32, 12, 51, 192, 255, 160, 43, 51], [88, 31, 35, 67, 102, 85, 55, 186, 85], [56, 21, 23, 111, 59, 205, 45, 37, 192], [55, 38, 70, 124, 73, 102, 1, 34, 98]], [[125, 98, 42, 88, 104, 85, 117, 175, 82], [95, 84, 53, 89, 128, 100, 113, 101, 45], [75, 79, 123, 47, 51, 128, 81, 171, 1], [57, 17, 5, 71, 102, 57, 53, 41, 49], [38, 33, 13, 121, 57, 73, 26, 1, 85], [41, 10, 67, 138, 77, 110, 90, 47, 114], [115, 21, 2, 10, 102, 255, 166, 23, 6], [101, 29, 16, 10, 85, 128, 101, 196, 26], [57, 18, 10, 102, 102, 213, 34, 20, 43], [117, 20, 15, 36, 163, 128, 68, 1, 26]], [[102, 61, 71, 37, 34, 53, 31, 243, 192], [69, 60, 71, 38, 73, 119, 28, 222, 37], [68, 45, 128, 34, 1, 47, 11, 245, 171], [62, 17, 19, 70, 146, 85, 55, 62, 70], [37, 43, 37, 154, 100, 163, 85, 160, 1], [63, 9, 92, 136, 28, 64, 32, 201, 85], [75, 15, 9, 9, 64, 255, 184, 119, 16], [86, 6, 28, 5, 64, 255, 25, 248, 1], [56, 8, 17, 132, 137, 255, 55, 116, 128], [58, 15, 20, 82, 135, 57, 26, 121, 40]], [[164, 50, 31, 137, 154, 133, 25, 35, 218], [51, 103, 44, 131, 131, 123, 31, 6, 158], [86, 40, 64, 135, 148, 224, 45, 183, 128], [22, 26, 17, 131, 240, 154, 14, 1, 209], [45, 16, 21, 91, 64, 222, 7, 1, 197], [56, 21, 39, 155, 60, 138, 23, 102, 213], [83, 12, 13, 54, 192, 255, 68, 47, 28], [85, 26, 85, 85, 128, 128, 32, 146, 171], [18, 11, 7, 63, 144, 171, 4, 4, 246], [35, 27, 10, 146, 174, 171, 12, 26, 128]], [[190, 80, 35, 99, 180, 80, 126, 54, 45], [85, 126, 47, 87, 176, 51, 41, 20, 32], [101, 75, 128, 139, 118, 146, 116, 128, 85], [56, 41, 15, 176, 236, 85, 37, 9, 62], [71, 30, 17, 119, 118, 255, 17, 18, 138], [101, 38, 60, 138, 55, 70, 43, 26, 142], [146, 36, 19, 30, 171, 255, 97, 27, 20], [138, 45, 61, 62, 219, 1, 81, 188, 64], [32, 41, 20, 117, 151, 142, 20, 21, 163], [112, 19, 12, 61, 195, 128, 48, 4, 24]]],\n ui = [[[[255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[176, 246, 255, 255, 255, 255, 255, 255, 255, 255, 255], [223, 241, 252, 255, 255, 255, 255, 255, 255, 255, 255], [249, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 244, 252, 255, 255, 255, 255, 255, 255, 255, 255], [234, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255], [253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 246, 254, 255, 255, 255, 255, 255, 255, 255, 255], [239, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255], [254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255], [251, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255], [251, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255], [254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 254, 253, 255, 254, 255, 255, 255, 255, 255, 255], [250, 255, 254, 255, 254, 255, 255, 255, 255, 255, 255], [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]]], [[[217, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [225, 252, 241, 253, 255, 255, 254, 255, 255, 255, 255], [234, 250, 241, 250, 253, 255, 253, 254, 255, 255, 255]], [[255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255], [223, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255], [238, 253, 254, 254, 255, 255, 255, 255, 255, 255, 255]], [[255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255], [249, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255], [247, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255], [252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255], [253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255], [250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]]], [[[186, 251, 250, 255, 255, 255, 255, 255, 255, 255, 255], [234, 251, 244, 254, 255, 255, 255, 255, 255, 255, 255], [251, 251, 243, 253, 254, 255, 254, 255, 255, 255, 255]], [[255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255], [236, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255], [251, 253, 253, 254, 254, 255, 255, 255, 255, 255, 255]], [[255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255], [254, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255], [254, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255], [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]]], [[[248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [250, 254, 252, 254, 255, 255, 255, 255, 255, 255, 255], [248, 254, 249, 253, 255, 255, 255, 255, 255, 255, 255]], [[255, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255], [246, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255], [252, 254, 251, 254, 254, 255, 255, 255, 255, 255, 255]], [[255, 254, 252, 255, 255, 255, 255, 255, 255, 255, 255], [248, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255], [253, 255, 254, 254, 255, 255, 255, 255, 255, 255, 255]], [[255, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255], [245, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255], [253, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 251, 253, 255, 255, 255, 255, 255, 255, 255, 255], [252, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255], [255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255], [249, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 255, 253, 255, 255, 255, 255, 255, 255, 255, 255], [250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], [[255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]]]],\n hi = [0, 1, 2, 3, 6, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 0],\n li = [],\n fi = [],\n di = [],\n pi = 1,\n gi = 2,\n mi = [],\n vi = [];\n vr(\"UpsampleRgbLinePair\", Ar, 3), vr(\"UpsampleBgrLinePair\", xr, 3), vr(\"UpsampleRgbaLinePair\", Ir, 4), vr(\"UpsampleBgraLinePair\", kr, 4), vr(\"UpsampleArgbLinePair\", Pr, 4), vr(\"UpsampleRgba4444LinePair\", _r, 2), vr(\"UpsampleRgb565LinePair\", Sr, 2);\n var bi = t.UpsampleRgbLinePair,\n yi = t.UpsampleBgrLinePair,\n wi = t.UpsampleRgbaLinePair,\n Ni = t.UpsampleBgraLinePair,\n Li = t.UpsampleArgbLinePair,\n Ai = t.UpsampleRgba4444LinePair,\n xi = t.UpsampleRgb565LinePair,\n Si = 16,\n _i = 1 << Si - 1,\n Pi = -227,\n ki = 482,\n Ii = 6,\n Fi = (256 << Ii) - 1,\n Ci = 0,\n ji = a(256),\n Oi = a(256),\n Bi = a(256),\n Mi = a(256),\n Ei = a(ki - Pi),\n qi = a(ki - Pi);\n Fr(\"YuvToRgbRow\", Ar, 3), Fr(\"YuvToBgrRow\", xr, 3), Fr(\"YuvToRgbaRow\", Ir, 4), Fr(\"YuvToBgraRow\", kr, 4), Fr(\"YuvToArgbRow\", Pr, 4), Fr(\"YuvToRgba4444Row\", _r, 2), Fr(\"YuvToRgb565Row\", Sr, 2);\n var Di = [0, 4, 8, 12, 128, 132, 136, 140, 256, 260, 264, 268, 384, 388, 392, 396],\n Ri = [0, 2, 8],\n Ti = [8, 7, 6, 4, 4, 2, 2, 2, 1, 1, 1, 1],\n Ui = 1;\n this.WebPDecodeRGBA = function (t, r, n, i, a) {\n var o = qn,\n s = new rr(),\n c = new ot();\n s.ba = c, c.S = o, c.width = [c.width], c.height = [c.height];\n var u = c.width,\n h = c.height,\n l = new st();\n if (null == l || null == t) var f = 2;else e(null != l), f = Br(t, r, n, l.width, l.height, l.Pd, l.Qd, l.format, null);\n if (0 != f ? u = 0 : (null != u && (u[0] = l.width[0]), null != h && (h[0] = l.height[0]), u = 1), u) {\n c.width = c.width[0], c.height = c.height[0], null != i && (i[0] = c.width), null != a && (a[0] = c.height);\n t: {\n if (i = new Gt(), (a = new nr()).data = t, a.w = r, a.ha = n, a.kd = 1, r = [0], e(null != a), (0 == (t = Br(a.data, a.w, a.ha, null, null, null, r, null, a)) || 7 == t) && r[0] && (t = 4), 0 == (r = t)) {\n if (e(null != s), i.data = a.data, i.w = a.w + a.offset, i.ha = a.ha - a.offset, i.put = dt, i.ac = ft, i.bc = pt, i.ma = s, a.xa) {\n if (null == (t = kt())) {\n s = 1;\n break t;\n }\n if (function (t, r) {\n var n = [0],\n i = [0],\n a = [0];\n e: for (;;) {\n if (null == t) return 0;\n if (null == r) return t.a = 2, 0;\n if (t.l = r, t.a = 0, v(t.m, r.data, r.w, r.ha), !gt(t.m, n, i, a)) {\n t.a = 3;\n break e;\n }\n if (t.xb = gi, r.width = n[0], r.height = i[0], !It(n[0], i[0], 1, t, null)) break e;\n return 1;\n }\n return e(0 != t.a), 0;\n }(t, i)) {\n if (i = 0 == (r = qr(i.width, i.height, s.Oa, s.ba))) {\n e: {\n i = t;\n r: for (;;) {\n if (null == i) {\n i = 0;\n break e;\n }\n if (e(null != i.s.yc), e(null != i.s.Ya), e(0 < i.s.Wb), e(null != (n = i.l)), e(null != (a = n.ma)), 0 != i.xb) {\n if (i.ca = a.ba, i.tb = a.tb, e(null != i.ca), !Mr(a.Oa, n, Rn)) {\n i.a = 2;\n break r;\n }\n if (!Ft(i, n.width)) break r;\n if (n.da) break r;\n if ((n.da || nt(i.ca.S)) && mr(), 11 > i.ca.S || (alert(\"todo:WebPInitConvertARGBToYUV\"), null != i.ca.f.kb.F && mr()), i.Pb && 0 < i.s.ua && null == i.s.vb.X && !O(i.s.vb, i.s.Wa.Xa)) {\n i.a = 1;\n break r;\n }\n i.xb = 0;\n }\n if (!_t(i, i.V, i.Ba, i.c, i.i, n.o, Lt)) break r;\n a.Dc = i.Ma, i = 1;\n break e;\n }\n e(0 != i.a), i = 0;\n }\n i = !i;\n }\n i && (r = t.a);\n } else r = t.a;\n } else {\n if (null == (t = new Yt())) {\n s = 1;\n break t;\n }\n if (t.Fa = a.na, t.P = a.P, t.qc = a.Sa, Kt(t, i)) {\n if (0 == (r = qr(i.width, i.height, s.Oa, s.ba))) {\n if (t.Aa = 0, n = s.Oa, e(null != (a = t)), null != n) {\n if (0 < (u = 0 > (u = n.Md) ? 0 : 100 < u ? 255 : 255 * u / 100)) {\n for (h = l = 0; 4 > h; ++h) 12 > (f = a.pb[h]).lc && (f.ia = u * Ti[0 > f.lc ? 0 : f.lc] >> 3), l |= f.ia;\n l && (alert(\"todo:VP8InitRandom\"), a.ia = 1);\n }\n a.Ga = n.Id, 100 < a.Ga ? a.Ga = 100 : 0 > a.Ga && (a.Ga = 0);\n }\n Qt(t, i) || (r = t.a);\n }\n } else r = t.a;\n }\n 0 == r && null != s.Oa && s.Oa.fd && (r = Er(s.ba));\n }\n s = r;\n }\n o = 0 != s ? null : 11 > o ? c.f.RGBA.eb : c.f.kb.y;\n } else o = null;\n return o;\n };\n var zi = [3, 4, 3, 4, 4, 2, 2, 4, 4, 4, 2, 1, 1];\n };\n function u(t, e) {\n for (var r = \"\", n = 0; n < 4; n++) r += String.fromCharCode(t[e++]);\n return r;\n }\n function h(t, e) {\n return (t[e + 0] << 0 | t[e + 1] << 8 | t[e + 2] << 16) >>> 0;\n }\n function l(t, e) {\n return (t[e + 0] << 0 | t[e + 1] << 8 | t[e + 2] << 16 | t[e + 3] << 24) >>> 0;\n }\n new c();\n var f = [0],\n d = [0],\n p = [],\n g = new c(),\n m = t,\n v = function (t, e) {\n var r = {},\n n = 0,\n i = !1,\n a = 0,\n o = 0;\n if (r.frames = [], !\n /** @license\n * Copyright (c) 2017 Dominik Homberger\n Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n https://webpjs.appspot.com\n WebPRiffParser dominikhlbg@gmail.com\n */\n function (t, e, r, n) {\n for (var i = 0; i < n; i++) if (t[e + i] != r.charCodeAt(i)) return !0;\n return !1;\n }(t, e, \"RIFF\", 4)) {\n var s, c;\n l(t, e += 4);\n for (e += 8; e < t.length;) {\n var f = u(t, e),\n d = l(t, e += 4);\n e += 4;\n var p = d + (1 & d);\n switch (f) {\n case \"VP8 \":\n case \"VP8L\":\n void 0 === r.frames[n] && (r.frames[n] = {});\n (v = r.frames[n]).src_off = i ? o : e - 8, v.src_size = a + d + 8, n++, i && (i = !1, a = 0, o = 0);\n break;\n case \"VP8X\":\n (v = r.header = {}).feature_flags = t[e];\n var g = e + 4;\n v.canvas_width = 1 + h(t, g);\n g += 3;\n v.canvas_height = 1 + h(t, g);\n g += 3;\n break;\n case \"ALPH\":\n i = !0, a = p + 8, o = e - 8;\n break;\n case \"ANIM\":\n (v = r.header).bgcolor = l(t, e);\n g = e + 4;\n v.loop_count = (s = t)[(c = g) + 0] << 0 | s[c + 1] << 8;\n g += 2;\n break;\n case \"ANMF\":\n var m, v;\n (v = r.frames[n] = {}).offset_x = 2 * h(t, e), e += 3, v.offset_y = 2 * h(t, e), e += 3, v.width = 1 + h(t, e), e += 3, v.height = 1 + h(t, e), e += 3, v.duration = h(t, e), e += 3, m = t[e++], v.dispose = 1 & m, v.blend = m >> 1 & 1;\n }\n \"ANMF\" != f && (e += p);\n }\n return r;\n }\n }(m, 0);\n v.response = m, v.rgbaoutput = !0, v.dataurl = !1;\n var b = v.header ? v.header : null,\n y = v.frames ? v.frames : null;\n if (b) {\n b.loop_counter = b.loop_count, f = [b.canvas_height], d = [b.canvas_width];\n for (var w = 0; w < y.length && 0 != y[w].blend; w++);\n }\n var N = y[0],\n L = g.WebPDecodeRGBA(m, N.src_off, N.src_size, d, f);\n N.rgba = L, N.imgwidth = d[0], N.imgheight = f[0];\n for (var A = 0; A < d[0] * f[0] * 4; A++) p[A] = L[A];\n return this.width = d, this.height = f, this.data = p, this;\n}\n!function (t) {\n var r = function r() {\n return \"function\" == typeof e;\n },\n n = function n(r, _n2, a, h) {\n var l = 4,\n f = s;\n switch (h) {\n case t.image_compression.FAST:\n l = 1, f = o;\n break;\n case t.image_compression.MEDIUM:\n l = 6, f = c;\n break;\n case t.image_compression.SLOW:\n l = 9, f = u;\n }\n r = i(r, _n2, a, f);\n var d = e(r, {\n level: l\n });\n return t.__addimage__.arrayBufferToBinaryString(d);\n },\n i = function i(t, e, r, n) {\n for (var i, a, o, s = t.length / e, c = new Uint8Array(t.length + s), u = l(), h = 0; h < s; h += 1) {\n if (o = h * e, i = t.subarray(o, o + e), n) c.set(n(i, r, a), o + h);else {\n for (var d, p = u.length, g = []; d < p; d += 1) g[d] = u[d](i, r, a);\n var m = f(g.concat());\n c.set(g[m], o + h);\n }\n a = i;\n }\n return c;\n },\n a = function a(t) {\n var e = Array.apply([], t);\n return e.unshift(0), e;\n },\n o = function o(t, e) {\n var r,\n n = [],\n i = t.length;\n n[0] = 1;\n for (var a = 0; a < i; a += 1) r = t[a - e] || 0, n[a + 1] = t[a] - r + 256 & 255;\n return n;\n },\n s = function s(t, e, r) {\n var n,\n i = [],\n a = t.length;\n i[0] = 2;\n for (var o = 0; o < a; o += 1) n = r && r[o] || 0, i[o + 1] = t[o] - n + 256 & 255;\n return i;\n },\n c = function c(t, e, r) {\n var n,\n i,\n a = [],\n o = t.length;\n a[0] = 3;\n for (var s = 0; s < o; s += 1) n = t[s - e] || 0, i = r && r[s] || 0, a[s + 1] = t[s] + 256 - (n + i >>> 1) & 255;\n return a;\n },\n u = function u(t, e, r) {\n var n,\n i,\n a,\n o,\n s = [],\n c = t.length;\n s[0] = 4;\n for (var u = 0; u < c; u += 1) n = t[u - e] || 0, i = r && r[u] || 0, a = r && r[u - e] || 0, o = h(n, i, a), s[u + 1] = t[u] - o + 256 & 255;\n return s;\n },\n h = function h(t, e, r) {\n if (t === e && e === r) return t;\n var n = Math.abs(e - r),\n i = Math.abs(t - r),\n a = Math.abs(t + e - r - r);\n return n <= i && n <= a ? t : i <= a ? e : r;\n },\n l = function l() {\n return [a, o, s, c, u];\n },\n f = function f(t) {\n var e = t.map(function (t) {\n return t.reduce(function (t, e) {\n return t + Math.abs(e);\n }, 0);\n });\n return e.indexOf(Math.min.apply(null, e));\n };\n t.processPNG = function (e, i, a, o) {\n var s,\n c,\n u,\n h,\n l,\n f,\n d,\n p,\n g,\n m,\n v,\n b,\n y,\n w,\n N,\n L = this.decode.FLATE_DECODE,\n A = \"\";\n if (this.__addimage__.isArrayBuffer(e) && (e = new Uint8Array(e)), this.__addimage__.isArrayBufferView(e)) {\n if (e = (u = new Kt(e)).imgData, c = u.bits, s = u.colorSpace, l = u.colors, -1 !== [4, 6].indexOf(u.colorType)) {\n if (8 === u.bits) {\n g = (p = 32 == u.pixelBitlength ? new Uint32Array(u.decodePixels().buffer) : 16 == u.pixelBitlength ? new Uint16Array(u.decodePixels().buffer) : new Uint8Array(u.decodePixels().buffer)).length, v = new Uint8Array(g * u.colors), m = new Uint8Array(g);\n var x,\n S = u.pixelBitlength - u.bits;\n for (w = 0, N = 0; w < g; w++) {\n for (y = p[w], x = 0; x < S;) v[N++] = y >>> x & 255, x += u.bits;\n m[w] = y >>> x & 255;\n }\n }\n if (16 === u.bits) {\n g = (p = new Uint32Array(u.decodePixels().buffer)).length, v = new Uint8Array(g * (32 / u.pixelBitlength) * u.colors), m = new Uint8Array(g * (32 / u.pixelBitlength)), b = u.colors > 1, w = 0, N = 0;\n for (var _ = 0; w < g;) y = p[w++], v[N++] = y >>> 0 & 255, b && (v[N++] = y >>> 16 & 255, y = p[w++], v[N++] = y >>> 0 & 255), m[_++] = y >>> 16 & 255;\n c = 8;\n }\n o !== t.image_compression.NONE && r() ? (e = n(v, u.width * u.colors, u.colors, o), d = n(m, u.width, 1, o)) : (e = v, d = m, L = void 0);\n }\n if (3 === u.colorType && (s = this.color_spaces.INDEXED, f = u.palette, u.transparency.indexed)) {\n var P = u.transparency.indexed,\n k = 0;\n for (w = 0, g = P.length; w < g; ++w) k += P[w];\n if ((k /= 255) === g - 1 && -1 !== P.indexOf(0)) h = [P.indexOf(0)];else if (k !== g) {\n for (p = u.decodePixels(), m = new Uint8Array(p.length), w = 0, g = p.length; w < g; w++) m[w] = P[p[w]];\n d = n(m, u.width, 1);\n }\n }\n var I = function (e) {\n var r;\n switch (e) {\n case t.image_compression.FAST:\n r = 11;\n break;\n case t.image_compression.MEDIUM:\n r = 13;\n break;\n case t.image_compression.SLOW:\n r = 14;\n break;\n default:\n r = 12;\n }\n return r;\n }(o);\n return L === this.decode.FLATE_DECODE && (A = \"/Predictor \" + I + \" \"), A += \"/Colors \" + l + \" /BitsPerComponent \" + c + \" /Columns \" + u.width, (this.__addimage__.isArrayBuffer(e) || this.__addimage__.isArrayBufferView(e)) && (e = this.__addimage__.arrayBufferToBinaryString(e)), (d && this.__addimage__.isArrayBuffer(d) || this.__addimage__.isArrayBufferView(d)) && (d = this.__addimage__.arrayBufferToBinaryString(d)), {\n alias: a,\n data: e,\n index: i,\n filter: L,\n decodeParameters: A,\n transparency: h,\n palette: f,\n sMask: d,\n predictor: I,\n width: u.width,\n height: u.height,\n bitsPerComponent: c,\n colorSpace: s\n };\n }\n };\n}(E.API), function (t) {\n t.processGIF89A = function (e, r, n, i) {\n var a = new Zt(e),\n o = a.width,\n s = a.height,\n c = [];\n a.decodeAndBlitFrameRGBA(0, c);\n var u = {\n data: c,\n width: o,\n height: s\n },\n h = new Qt(100).encode(u, 100);\n return t.processJPEG.call(this, h, r, n, i);\n }, t.processGIF87A = t.processGIF89A;\n}(E.API), te.prototype.parseHeader = function () {\n if (this.fileSize = this.datav.getUint32(this.pos, !0), this.pos += 4, this.reserved = this.datav.getUint32(this.pos, !0), this.pos += 4, this.offset = this.datav.getUint32(this.pos, !0), this.pos += 4, this.headerSize = this.datav.getUint32(this.pos, !0), this.pos += 4, this.width = this.datav.getUint32(this.pos, !0), this.pos += 4, this.height = this.datav.getInt32(this.pos, !0), this.pos += 4, this.planes = this.datav.getUint16(this.pos, !0), this.pos += 2, this.bitPP = this.datav.getUint16(this.pos, !0), this.pos += 2, this.compress = this.datav.getUint32(this.pos, !0), this.pos += 4, this.rawSize = this.datav.getUint32(this.pos, !0), this.pos += 4, this.hr = this.datav.getUint32(this.pos, !0), this.pos += 4, this.vr = this.datav.getUint32(this.pos, !0), this.pos += 4, this.colors = this.datav.getUint32(this.pos, !0), this.pos += 4, this.importantColors = this.datav.getUint32(this.pos, !0), this.pos += 4, 16 === this.bitPP && this.is_with_alpha && (this.bitPP = 15), this.bitPP < 15) {\n var t = 0 === this.colors ? 1 << this.bitPP : this.colors;\n this.palette = new Array(t);\n for (var e = 0; e < t; e++) {\n var r = this.datav.getUint8(this.pos++, !0),\n n = this.datav.getUint8(this.pos++, !0),\n i = this.datav.getUint8(this.pos++, !0),\n a = this.datav.getUint8(this.pos++, !0);\n this.palette[e] = {\n red: i,\n green: n,\n blue: r,\n quad: a\n };\n }\n }\n this.height < 0 && (this.height *= -1, this.bottom_up = !1);\n}, te.prototype.parseBGR = function () {\n this.pos = this.offset;\n try {\n var t = \"bit\" + this.bitPP,\n e = this.width * this.height * 4;\n this.data = new Uint8Array(e), this[t]();\n } catch (t) {\n a.log(\"bit decode error:\" + t);\n }\n}, te.prototype.bit1 = function () {\n var t,\n e = Math.ceil(this.width / 8),\n r = e % 4;\n for (t = this.height - 1; t >= 0; t--) {\n for (var n = this.bottom_up ? t : this.height - 1 - t, i = 0; i < e; i++) for (var a = this.datav.getUint8(this.pos++, !0), o = n * this.width * 4 + 8 * i * 4, s = 0; s < 8 && 8 * i + s < this.width; s++) {\n var c = this.palette[a >> 7 - s & 1];\n this.data[o + 4 * s] = c.blue, this.data[o + 4 * s + 1] = c.green, this.data[o + 4 * s + 2] = c.red, this.data[o + 4 * s + 3] = 255;\n }\n 0 !== r && (this.pos += 4 - r);\n }\n}, te.prototype.bit4 = function () {\n for (var t = Math.ceil(this.width / 2), e = t % 4, r = this.height - 1; r >= 0; r--) {\n for (var n = this.bottom_up ? r : this.height - 1 - r, i = 0; i < t; i++) {\n var a = this.datav.getUint8(this.pos++, !0),\n o = n * this.width * 4 + 2 * i * 4,\n s = a >> 4,\n c = 15 & a,\n u = this.palette[s];\n if (this.data[o] = u.blue, this.data[o + 1] = u.green, this.data[o + 2] = u.red, this.data[o + 3] = 255, 2 * i + 1 >= this.width) break;\n u = this.palette[c], this.data[o + 4] = u.blue, this.data[o + 4 + 1] = u.green, this.data[o + 4 + 2] = u.red, this.data[o + 4 + 3] = 255;\n }\n 0 !== e && (this.pos += 4 - e);\n }\n}, te.prototype.bit8 = function () {\n for (var t = this.width % 4, e = this.height - 1; e >= 0; e--) {\n for (var r = this.bottom_up ? e : this.height - 1 - e, n = 0; n < this.width; n++) {\n var i = this.datav.getUint8(this.pos++, !0),\n a = r * this.width * 4 + 4 * n;\n if (i < this.palette.length) {\n var o = this.palette[i];\n this.data[a] = o.red, this.data[a + 1] = o.green, this.data[a + 2] = o.blue, this.data[a + 3] = 255;\n } else this.data[a] = 255, this.data[a + 1] = 255, this.data[a + 2] = 255, this.data[a + 3] = 255;\n }\n 0 !== t && (this.pos += 4 - t);\n }\n}, te.prototype.bit15 = function () {\n for (var t = this.width % 3, e = parseInt(\"11111\", 2), r = this.height - 1; r >= 0; r--) {\n for (var n = this.bottom_up ? r : this.height - 1 - r, i = 0; i < this.width; i++) {\n var a = this.datav.getUint16(this.pos, !0);\n this.pos += 2;\n var o = (a & e) / e * 255 | 0,\n s = (a >> 5 & e) / e * 255 | 0,\n c = (a >> 10 & e) / e * 255 | 0,\n u = a >> 15 ? 255 : 0,\n h = n * this.width * 4 + 4 * i;\n this.data[h] = c, this.data[h + 1] = s, this.data[h + 2] = o, this.data[h + 3] = u;\n }\n this.pos += t;\n }\n}, te.prototype.bit16 = function () {\n for (var t = this.width % 3, e = parseInt(\"11111\", 2), r = parseInt(\"111111\", 2), n = this.height - 1; n >= 0; n--) {\n for (var i = this.bottom_up ? n : this.height - 1 - n, a = 0; a < this.width; a++) {\n var o = this.datav.getUint16(this.pos, !0);\n this.pos += 2;\n var s = (o & e) / e * 255 | 0,\n c = (o >> 5 & r) / r * 255 | 0,\n u = (o >> 11) / e * 255 | 0,\n h = i * this.width * 4 + 4 * a;\n this.data[h] = u, this.data[h + 1] = c, this.data[h + 2] = s, this.data[h + 3] = 255;\n }\n this.pos += t;\n }\n}, te.prototype.bit24 = function () {\n for (var t = this.height - 1; t >= 0; t--) {\n for (var e = this.bottom_up ? t : this.height - 1 - t, r = 0; r < this.width; r++) {\n var n = this.datav.getUint8(this.pos++, !0),\n i = this.datav.getUint8(this.pos++, !0),\n a = this.datav.getUint8(this.pos++, !0),\n o = e * this.width * 4 + 4 * r;\n this.data[o] = a, this.data[o + 1] = i, this.data[o + 2] = n, this.data[o + 3] = 255;\n }\n this.pos += this.width % 4;\n }\n}, te.prototype.bit32 = function () {\n for (var t = this.height - 1; t >= 0; t--) for (var e = this.bottom_up ? t : this.height - 1 - t, r = 0; r < this.width; r++) {\n var n = this.datav.getUint8(this.pos++, !0),\n i = this.datav.getUint8(this.pos++, !0),\n a = this.datav.getUint8(this.pos++, !0),\n o = this.datav.getUint8(this.pos++, !0),\n s = e * this.width * 4 + 4 * r;\n this.data[s] = a, this.data[s + 1] = i, this.data[s + 2] = n, this.data[s + 3] = o;\n }\n}, te.prototype.getData = function () {\n return this.data;\n},\n/**\n * @license\n * Copyright (c) 2018 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\nfunction (t) {\n t.processBMP = function (e, r, n, i) {\n var a = new te(e, !1),\n o = a.width,\n s = a.height,\n c = {\n data: a.getData(),\n width: o,\n height: s\n },\n u = new Qt(100).encode(c, 100);\n return t.processJPEG.call(this, u, r, n, i);\n };\n}(E.API), ee.prototype.getData = function () {\n return this.data;\n},\n/**\n * @license\n * Copyright (c) 2019 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\nfunction (t) {\n t.processWEBP = function (e, r, n, i) {\n var a = new ee(e, !1),\n o = a.width,\n s = a.height,\n c = {\n data: a.getData(),\n width: o,\n height: s\n },\n u = new Qt(100).encode(c, 100);\n return t.processJPEG.call(this, u, r, n, i);\n };\n}(E.API), E.API.processRGBA = function (t, e, r) {\n for (var n = t.data, i = n.length, a = new Uint8Array(i / 4 * 3), o = new Uint8Array(i / 4), s = 0, c = 0, u = 0; u < i; u += 4) {\n var h = n[u],\n l = n[u + 1],\n f = n[u + 2],\n d = n[u + 3];\n a[s++] = h, a[s++] = l, a[s++] = f, o[c++] = d;\n }\n var p = this.__addimage__.arrayBufferToBinaryString(a);\n return {\n alpha: this.__addimage__.arrayBufferToBinaryString(o),\n data: p,\n index: e,\n alias: r,\n colorSpace: \"DeviceRGB\",\n bitsPerComponent: 8,\n width: t.width,\n height: t.height\n };\n}, E.API.setLanguage = function (t) {\n return void 0 === this.internal.languageSettings && (this.internal.languageSettings = {}, this.internal.languageSettings.isSubscribed = !1), void 0 !== {\n af: \"Afrikaans\",\n sq: \"Albanian\",\n ar: \"Arabic (Standard)\",\n \"ar-DZ\": \"Arabic (Algeria)\",\n \"ar-BH\": \"Arabic (Bahrain)\",\n \"ar-EG\": \"Arabic (Egypt)\",\n \"ar-IQ\": \"Arabic (Iraq)\",\n \"ar-JO\": \"Arabic (Jordan)\",\n \"ar-KW\": \"Arabic (Kuwait)\",\n \"ar-LB\": \"Arabic (Lebanon)\",\n \"ar-LY\": \"Arabic (Libya)\",\n \"ar-MA\": \"Arabic (Morocco)\",\n \"ar-OM\": \"Arabic (Oman)\",\n \"ar-QA\": \"Arabic (Qatar)\",\n \"ar-SA\": \"Arabic (Saudi Arabia)\",\n \"ar-SY\": \"Arabic (Syria)\",\n \"ar-TN\": \"Arabic (Tunisia)\",\n \"ar-AE\": \"Arabic (U.A.E.)\",\n \"ar-YE\": \"Arabic (Yemen)\",\n an: \"Aragonese\",\n hy: \"Armenian\",\n as: \"Assamese\",\n ast: \"Asturian\",\n az: \"Azerbaijani\",\n eu: \"Basque\",\n be: \"Belarusian\",\n bn: \"Bengali\",\n bs: \"Bosnian\",\n br: \"Breton\",\n bg: \"Bulgarian\",\n my: \"Burmese\",\n ca: \"Catalan\",\n ch: \"Chamorro\",\n ce: \"Chechen\",\n zh: \"Chinese\",\n \"zh-HK\": \"Chinese (Hong Kong)\",\n \"zh-CN\": \"Chinese (PRC)\",\n \"zh-SG\": \"Chinese (Singapore)\",\n \"zh-TW\": \"Chinese (Taiwan)\",\n cv: \"Chuvash\",\n co: \"Corsican\",\n cr: \"Cree\",\n hr: \"Croatian\",\n cs: \"Czech\",\n da: \"Danish\",\n nl: \"Dutch (Standard)\",\n \"nl-BE\": \"Dutch (Belgian)\",\n en: \"English\",\n \"en-AU\": \"English (Australia)\",\n \"en-BZ\": \"English (Belize)\",\n \"en-CA\": \"English (Canada)\",\n \"en-IE\": \"English (Ireland)\",\n \"en-JM\": \"English (Jamaica)\",\n \"en-NZ\": \"English (New Zealand)\",\n \"en-PH\": \"English (Philippines)\",\n \"en-ZA\": \"English (South Africa)\",\n \"en-TT\": \"English (Trinidad & Tobago)\",\n \"en-GB\": \"English (United Kingdom)\",\n \"en-US\": \"English (United States)\",\n \"en-ZW\": \"English (Zimbabwe)\",\n eo: \"Esperanto\",\n et: \"Estonian\",\n fo: \"Faeroese\",\n fj: \"Fijian\",\n fi: \"Finnish\",\n fr: \"French (Standard)\",\n \"fr-BE\": \"French (Belgium)\",\n \"fr-CA\": \"French (Canada)\",\n \"fr-FR\": \"French (France)\",\n \"fr-LU\": \"French (Luxembourg)\",\n \"fr-MC\": \"French (Monaco)\",\n \"fr-CH\": \"French (Switzerland)\",\n fy: \"Frisian\",\n fur: \"Friulian\",\n gd: \"Gaelic (Scots)\",\n \"gd-IE\": \"Gaelic (Irish)\",\n gl: \"Galacian\",\n ka: \"Georgian\",\n de: \"German (Standard)\",\n \"de-AT\": \"German (Austria)\",\n \"de-DE\": \"German (Germany)\",\n \"de-LI\": \"German (Liechtenstein)\",\n \"de-LU\": \"German (Luxembourg)\",\n \"de-CH\": \"German (Switzerland)\",\n el: \"Greek\",\n gu: \"Gujurati\",\n ht: \"Haitian\",\n he: \"Hebrew\",\n hi: \"Hindi\",\n hu: \"Hungarian\",\n is: \"Icelandic\",\n id: \"Indonesian\",\n iu: \"Inuktitut\",\n ga: \"Irish\",\n it: \"Italian (Standard)\",\n \"it-CH\": \"Italian (Switzerland)\",\n ja: \"Japanese\",\n kn: \"Kannada\",\n ks: \"Kashmiri\",\n kk: \"Kazakh\",\n km: \"Khmer\",\n ky: \"Kirghiz\",\n tlh: \"Klingon\",\n ko: \"Korean\",\n \"ko-KP\": \"Korean (North Korea)\",\n \"ko-KR\": \"Korean (South Korea)\",\n la: \"Latin\",\n lv: \"Latvian\",\n lt: \"Lithuanian\",\n lb: \"Luxembourgish\",\n mk: \"North Macedonia\",\n ms: \"Malay\",\n ml: \"Malayalam\",\n mt: \"Maltese\",\n mi: \"Maori\",\n mr: \"Marathi\",\n mo: \"Moldavian\",\n nv: \"Navajo\",\n ng: \"Ndonga\",\n ne: \"Nepali\",\n no: \"Norwegian\",\n nb: \"Norwegian (Bokmal)\",\n nn: \"Norwegian (Nynorsk)\",\n oc: \"Occitan\",\n or: \"Oriya\",\n om: \"Oromo\",\n fa: \"Persian\",\n \"fa-IR\": \"Persian/Iran\",\n pl: \"Polish\",\n pt: \"Portuguese\",\n \"pt-BR\": \"Portuguese (Brazil)\",\n pa: \"Punjabi\",\n \"pa-IN\": \"Punjabi (India)\",\n \"pa-PK\": \"Punjabi (Pakistan)\",\n qu: \"Quechua\",\n rm: \"Rhaeto-Romanic\",\n ro: \"Romanian\",\n \"ro-MO\": \"Romanian (Moldavia)\",\n ru: \"Russian\",\n \"ru-MO\": \"Russian (Moldavia)\",\n sz: \"Sami (Lappish)\",\n sg: \"Sango\",\n sa: \"Sanskrit\",\n sc: \"Sardinian\",\n sd: \"Sindhi\",\n si: \"Singhalese\",\n sr: \"Serbian\",\n sk: \"Slovak\",\n sl: \"Slovenian\",\n so: \"Somani\",\n sb: \"Sorbian\",\n es: \"Spanish\",\n \"es-AR\": \"Spanish (Argentina)\",\n \"es-BO\": \"Spanish (Bolivia)\",\n \"es-CL\": \"Spanish (Chile)\",\n \"es-CO\": \"Spanish (Colombia)\",\n \"es-CR\": \"Spanish (Costa Rica)\",\n \"es-DO\": \"Spanish (Dominican Republic)\",\n \"es-EC\": \"Spanish (Ecuador)\",\n \"es-SV\": \"Spanish (El Salvador)\",\n \"es-GT\": \"Spanish (Guatemala)\",\n \"es-HN\": \"Spanish (Honduras)\",\n \"es-MX\": \"Spanish (Mexico)\",\n \"es-NI\": \"Spanish (Nicaragua)\",\n \"es-PA\": \"Spanish (Panama)\",\n \"es-PY\": \"Spanish (Paraguay)\",\n \"es-PE\": \"Spanish (Peru)\",\n \"es-PR\": \"Spanish (Puerto Rico)\",\n \"es-ES\": \"Spanish (Spain)\",\n \"es-UY\": \"Spanish (Uruguay)\",\n \"es-VE\": \"Spanish (Venezuela)\",\n sx: \"Sutu\",\n sw: \"Swahili\",\n sv: \"Swedish\",\n \"sv-FI\": \"Swedish (Finland)\",\n \"sv-SV\": \"Swedish (Sweden)\",\n ta: \"Tamil\",\n tt: \"Tatar\",\n te: \"Teluga\",\n th: \"Thai\",\n tig: \"Tigre\",\n ts: \"Tsonga\",\n tn: \"Tswana\",\n tr: \"Turkish\",\n tk: \"Turkmen\",\n uk: \"Ukrainian\",\n hsb: \"Upper Sorbian\",\n ur: \"Urdu\",\n ve: \"Venda\",\n vi: \"Vietnamese\",\n vo: \"Volapuk\",\n wa: \"Walloon\",\n cy: \"Welsh\",\n xh: \"Xhosa\",\n ji: \"Yiddish\",\n zu: \"Zulu\"\n }[t] && (this.internal.languageSettings.languageCode = t, !1 === this.internal.languageSettings.isSubscribed && (this.internal.events.subscribe(\"putCatalog\", function () {\n this.internal.write(\"/Lang (\" + this.internal.languageSettings.languageCode + \")\");\n }), this.internal.languageSettings.isSubscribed = !0)), this;\n}, Vt = E.API, Gt = Vt.getCharWidthsArray = function (e, r) {\n var n,\n i,\n a = (r = r || {}).font || this.internal.getFont(),\n o = r.fontSize || this.internal.getFontSize(),\n s = r.charSpace || this.internal.getCharSpace(),\n c = r.widths ? r.widths : a.metadata.Unicode.widths,\n u = c.fof ? c.fof : 1,\n h = r.kerning ? r.kerning : a.metadata.Unicode.kerning,\n l = h.fof ? h.fof : 1,\n f = !1 !== r.doKerning,\n d = 0,\n p = e.length,\n g = 0,\n m = c[0] || u,\n v = [];\n for (n = 0; n < p; n++) i = e.charCodeAt(n), \"function\" == typeof a.metadata.widthOfString ? v.push((a.metadata.widthOfGlyph(a.metadata.characterToGlyph(i)) + s * (1e3 / o) || 0) / 1e3) : (d = f && \"object\" === t(h[i]) && !isNaN(parseInt(h[i][g], 10)) ? h[i][g] / l : 0, v.push((c[i] || m) / u + d)), g = i;\n return v;\n}, Yt = Vt.getStringUnitWidth = function (t, e) {\n var r = (e = e || {}).fontSize || this.internal.getFontSize(),\n n = e.font || this.internal.getFont(),\n i = e.charSpace || this.internal.getCharSpace();\n return Vt.processArabic && (t = Vt.processArabic(t)), \"function\" == typeof n.metadata.widthOfString ? n.metadata.widthOfString(t, r, i) / r : Gt.apply(this, arguments).reduce(function (t, e) {\n return t + e;\n }, 0);\n}, Jt = function Jt(t, e, r, n) {\n for (var i = [], a = 0, o = t.length, s = 0; a !== o && s + e[a] < r;) s += e[a], a++;\n i.push(t.slice(0, a));\n var c = a;\n for (s = 0; a !== o;) s + e[a] > n && (i.push(t.slice(c, a)), s = 0, c = a), s += e[a], a++;\n return c !== a && i.push(t.slice(c, a)), i;\n}, Xt = function Xt(t, e, r) {\n r || (r = {});\n var n,\n i,\n a,\n o,\n s,\n c,\n u,\n h = [],\n l = [h],\n f = r.textIndent || 0,\n d = 0,\n p = 0,\n g = t.split(\" \"),\n m = Gt.apply(this, [\" \", r])[0];\n if (c = -1 === r.lineIndent ? g[0].length + 2 : r.lineIndent || 0) {\n var v = Array(c).join(\" \"),\n b = [];\n g.map(function (t) {\n (t = t.split(/\\s*\\n/)).length > 1 ? b = b.concat(t.map(function (t, e) {\n return (e && t.length ? \"\\n\" : \"\") + t;\n })) : b.push(t[0]);\n }), g = b, c = Yt.apply(this, [v, r]);\n }\n for (a = 0, o = g.length; a < o; a++) {\n var y = 0;\n if (n = g[a], c && \"\\n\" == n[0] && (n = n.substr(1), y = 1), f + d + (p = (i = Gt.apply(this, [n, r])).reduce(function (t, e) {\n return t + e;\n }, 0)) > e || y) {\n if (p > e) {\n for (s = Jt.apply(this, [n, i, e - (f + d), e]), h.push(s.shift()), h = [s.pop()]; s.length;) l.push([s.shift()]);\n p = i.slice(n.length - (h[0] ? h[0].length : 0)).reduce(function (t, e) {\n return t + e;\n }, 0);\n } else h = [n];\n l.push(h), f = p + c, d = m;\n } else h.push(n), f += d + p, d = m;\n }\n return u = c ? function (t, e) {\n return (e ? v : \"\") + t.join(\" \");\n } : function (t) {\n return t.join(\" \");\n }, l.map(u);\n}, Vt.splitTextToSize = function (t, e, r) {\n var n,\n i = (r = r || {}).fontSize || this.internal.getFontSize(),\n a = function (t) {\n if (t.widths && t.kerning) return {\n widths: t.widths,\n kerning: t.kerning\n };\n var e = this.internal.getFont(t.fontName, t.fontStyle);\n return e.metadata.Unicode ? {\n widths: e.metadata.Unicode.widths || {\n 0: 1\n },\n kerning: e.metadata.Unicode.kerning || {}\n } : {\n font: e.metadata,\n fontSize: this.internal.getFontSize(),\n charSpace: this.internal.getCharSpace()\n };\n }.call(this, r);\n n = Array.isArray(t) ? t : String(t).split(/\\r?\\n/);\n var o = 1 * this.internal.scaleFactor * e / i;\n a.textIndent = r.textIndent ? 1 * r.textIndent * this.internal.scaleFactor / i : 0, a.lineIndent = r.lineIndent;\n var s,\n c,\n u = [];\n for (s = 0, c = n.length; s < c; s++) u = u.concat(Xt.apply(this, [n[s], o, a]));\n return u;\n}, function (e) {\n e.__fontmetrics__ = e.__fontmetrics__ || {};\n for (var r = \"klmnopqrstuvwxyz\", n = {}, i = {}, a = 0; a < r.length; a++) n[r[a]] = \"0123456789abcdef\"[a], i[\"0123456789abcdef\"[a]] = r[a];\n var o = function o(t) {\n return \"0x\" + parseInt(t, 10).toString(16);\n },\n s = e.__fontmetrics__.compress = function (e) {\n var r,\n n,\n a,\n c,\n u = [\"{\"];\n for (var h in e) {\n if (r = e[h], isNaN(parseInt(h, 10)) ? n = \"'\" + h + \"'\" : (h = parseInt(h, 10), n = (n = o(h).slice(2)).slice(0, -1) + i[n.slice(-1)]), \"number\" == typeof r) r < 0 ? (a = o(r).slice(3), c = \"-\") : (a = o(r).slice(2), c = \"\"), a = c + a.slice(0, -1) + i[a.slice(-1)];else {\n if (\"object\" !== t(r)) throw new Error(\"Don't know what to do with value type \" + t(r) + \".\");\n a = s(r);\n }\n u.push(n + a);\n }\n return u.push(\"}\"), u.join(\"\");\n },\n c = e.__fontmetrics__.uncompress = function (t) {\n if (\"string\" != typeof t) throw new Error(\"Invalid argument passed to uncompress.\");\n for (var e, r, i, a, o = {}, s = 1, c = o, u = [], h = \"\", l = \"\", f = t.length - 1, d = 1; d < f; d += 1) \"'\" == (a = t[d]) ? e ? (i = e.join(\"\"), e = void 0) : e = [] : e ? e.push(a) : \"{\" == a ? (u.push([c, i]), c = {}, i = void 0) : \"}\" == a ? ((r = u.pop())[0][r[1]] = c, i = void 0, c = r[0]) : \"-\" == a ? s = -1 : void 0 === i ? n.hasOwnProperty(a) ? (h += n[a], i = parseInt(h, 16) * s, s = 1, h = \"\") : h += a : n.hasOwnProperty(a) ? (l += n[a], c[i] = parseInt(l, 16) * s, s = 1, i = void 0, l = \"\") : l += a;\n return o;\n },\n u = {\n codePages: [\"WinAnsiEncoding\"],\n WinAnsiEncoding: c(\"{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}\")\n },\n h = {\n Unicode: {\n Courier: u,\n \"Courier-Bold\": u,\n \"Courier-BoldOblique\": u,\n \"Courier-Oblique\": u,\n Helvetica: u,\n \"Helvetica-Bold\": u,\n \"Helvetica-BoldOblique\": u,\n \"Helvetica-Oblique\": u,\n \"Times-Roman\": u,\n \"Times-Bold\": u,\n \"Times-BoldItalic\": u,\n \"Times-Italic\": u\n }\n },\n l = {\n Unicode: {\n \"Courier-Oblique\": c(\"{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}\"),\n \"Times-BoldItalic\": c(\"{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}\"),\n \"Helvetica-Bold\": c(\"{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}\"),\n Courier: c(\"{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}\"),\n \"Courier-BoldOblique\": c(\"{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}\"),\n \"Times-Bold\": c(\"{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}\"),\n Symbol: c(\"{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}\"),\n Helvetica: c(\"{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}\"),\n \"Helvetica-BoldOblique\": c(\"{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}\"),\n ZapfDingbats: c(\"{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}\"),\n \"Courier-Bold\": c(\"{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}\"),\n \"Times-Italic\": c(\"{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}\"),\n \"Times-Roman\": c(\"{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}\"),\n \"Helvetica-Oblique\": c(\"{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}\")\n }\n };\n e.events.push([\"addFont\", function (t) {\n var e = t.font,\n r = l.Unicode[e.postScriptName];\n r && (e.metadata.Unicode = {}, e.metadata.Unicode.widths = r.widths, e.metadata.Unicode.kerning = r.kerning);\n var n = h.Unicode[e.postScriptName];\n n && (e.metadata.Unicode.encoding = n, e.encoding = n.codePages[0]);\n }]);\n}(E.API),\n/**\n * @license\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\nfunction (t) {\n var e = function e(t) {\n for (var e = t.length, r = new Uint8Array(e), n = 0; n < e; n++) r[n] = t.charCodeAt(n);\n return r;\n };\n t.API.events.push([\"addFont\", function (r) {\n var n = void 0,\n i = r.font,\n a = r.instance;\n if (!i.isStandardFont) {\n if (void 0 === a) throw new Error(\"Font does not exist in vFS, import fonts or remove declaration doc.addFont('\" + i.postScriptName + \"').\");\n if (\"string\" != typeof (n = !1 === a.existsFileInVFS(i.postScriptName) ? a.loadFile(i.postScriptName) : a.getFileFromVFS(i.postScriptName))) throw new Error(\"Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('\" + i.postScriptName + \"').\");\n !function (r, n) {\n n = /^\\x00\\x01\\x00\\x00/.test(n) ? e(n) : e(u(n)), r.metadata = t.API.TTFFont.open(n), r.metadata.Unicode = r.metadata.Unicode || {\n encoding: {},\n kerning: {},\n widths: []\n }, r.metadata.glyIdsUsed = [0];\n }(i, n);\n }\n }]);\n}(E),\n/** @license\n * Copyright (c) 2012 Willow Systems Corporation, https://github.com/willowsystems\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\nfunction (t) {\n function e() {\n return (n.canvg ? Promise.resolve(n.canvg) : import(\"canvg\"))[\"catch\"](function (t) {\n return Promise.reject(new Error(\"Could not load canvg: \" + t));\n }).then(function (t) {\n return t[\"default\"] ? t[\"default\"] : t;\n });\n }\n E.API.addSvgAsImage = function (t, r, n, i, o, s, c, u) {\n if (isNaN(r) || isNaN(n)) throw a.error(\"jsPDF.addSvgAsImage: Invalid coordinates\", arguments), new Error(\"Invalid coordinates passed to jsPDF.addSvgAsImage\");\n if (isNaN(i) || isNaN(o)) throw a.error(\"jsPDF.addSvgAsImage: Invalid measurements\", arguments), new Error(\"Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage\");\n var h = document.createElement(\"canvas\");\n h.width = i, h.height = o;\n var l = h.getContext(\"2d\");\n l.fillStyle = \"#fff\", l.fillRect(0, 0, h.width, h.height);\n var f = {\n ignoreMouse: !0,\n ignoreAnimation: !0,\n ignoreDimensions: !0\n },\n d = this;\n return e().then(function (e) {\n return e.fromString(l, t, f);\n }, function () {\n return Promise.reject(new Error(\"Could not load canvg.\"));\n }).then(function (t) {\n return t.render(f);\n }).then(function () {\n d.addImage(h.toDataURL(\"image/jpeg\", 1), r, n, i, o, c, u);\n });\n };\n}(), E.API.putTotalPages = function (t) {\n var e,\n r = 0;\n parseInt(this.internal.getFont().id.substr(1), 10) < 15 ? (e = new RegExp(t, \"g\"), r = this.internal.getNumberOfPages()) : (e = new RegExp(this.pdfEscape16(t, this.internal.getFont()), \"g\"), r = this.pdfEscape16(this.internal.getNumberOfPages() + \"\", this.internal.getFont()));\n for (var n = 1; n <= this.internal.getNumberOfPages(); n++) for (var i = 0; i < this.internal.pages[n].length; i++) this.internal.pages[n][i] = this.internal.pages[n][i].replace(e, r);\n return this;\n}, E.API.viewerPreferences = function (e, r) {\n var n;\n e = e || {}, r = r || !1;\n var i,\n a,\n o,\n s = {\n HideToolbar: {\n defaultValue: !1,\n value: !1,\n type: \"boolean\",\n explicitSet: !1,\n valueSet: [!0, !1],\n pdfVersion: 1.3\n },\n HideMenubar: {\n defaultValue: !1,\n value: !1,\n type: \"boolean\",\n explicitSet: !1,\n valueSet: [!0, !1],\n pdfVersion: 1.3\n },\n HideWindowUI: {\n defaultValue: !1,\n value: !1,\n type: \"boolean\",\n explicitSet: !1,\n valueSet: [!0, !1],\n pdfVersion: 1.3\n },\n FitWindow: {\n defaultValue: !1,\n value: !1,\n type: \"boolean\",\n explicitSet: !1,\n valueSet: [!0, !1],\n pdfVersion: 1.3\n },\n CenterWindow: {\n defaultValue: !1,\n value: !1,\n type: \"boolean\",\n explicitSet: !1,\n valueSet: [!0, !1],\n pdfVersion: 1.3\n },\n DisplayDocTitle: {\n defaultValue: !1,\n value: !1,\n type: \"boolean\",\n explicitSet: !1,\n valueSet: [!0, !1],\n pdfVersion: 1.4\n },\n NonFullScreenPageMode: {\n defaultValue: \"UseNone\",\n value: \"UseNone\",\n type: \"name\",\n explicitSet: !1,\n valueSet: [\"UseNone\", \"UseOutlines\", \"UseThumbs\", \"UseOC\"],\n pdfVersion: 1.3\n },\n Direction: {\n defaultValue: \"L2R\",\n value: \"L2R\",\n type: \"name\",\n explicitSet: !1,\n valueSet: [\"L2R\", \"R2L\"],\n pdfVersion: 1.3\n },\n ViewArea: {\n defaultValue: \"CropBox\",\n value: \"CropBox\",\n type: \"name\",\n explicitSet: !1,\n valueSet: [\"MediaBox\", \"CropBox\", \"TrimBox\", \"BleedBox\", \"ArtBox\"],\n pdfVersion: 1.4\n },\n ViewClip: {\n defaultValue: \"CropBox\",\n value: \"CropBox\",\n type: \"name\",\n explicitSet: !1,\n valueSet: [\"MediaBox\", \"CropBox\", \"TrimBox\", \"BleedBox\", \"ArtBox\"],\n pdfVersion: 1.4\n },\n PrintArea: {\n defaultValue: \"CropBox\",\n value: \"CropBox\",\n type: \"name\",\n explicitSet: !1,\n valueSet: [\"MediaBox\", \"CropBox\", \"TrimBox\", \"BleedBox\", \"ArtBox\"],\n pdfVersion: 1.4\n },\n PrintClip: {\n defaultValue: \"CropBox\",\n value: \"CropBox\",\n type: \"name\",\n explicitSet: !1,\n valueSet: [\"MediaBox\", \"CropBox\", \"TrimBox\", \"BleedBox\", \"ArtBox\"],\n pdfVersion: 1.4\n },\n PrintScaling: {\n defaultValue: \"AppDefault\",\n value: \"AppDefault\",\n type: \"name\",\n explicitSet: !1,\n valueSet: [\"AppDefault\", \"None\"],\n pdfVersion: 1.6\n },\n Duplex: {\n defaultValue: \"\",\n value: \"none\",\n type: \"name\",\n explicitSet: !1,\n valueSet: [\"Simplex\", \"DuplexFlipShortEdge\", \"DuplexFlipLongEdge\", \"none\"],\n pdfVersion: 1.7\n },\n PickTrayByPDFSize: {\n defaultValue: !1,\n value: !1,\n type: \"boolean\",\n explicitSet: !1,\n valueSet: [!0, !1],\n pdfVersion: 1.7\n },\n PrintPageRange: {\n defaultValue: \"\",\n value: \"\",\n type: \"array\",\n explicitSet: !1,\n valueSet: null,\n pdfVersion: 1.7\n },\n NumCopies: {\n defaultValue: 1,\n value: 1,\n type: \"integer\",\n explicitSet: !1,\n valueSet: null,\n pdfVersion: 1.7\n }\n },\n c = Object.keys(s),\n u = [],\n h = 0,\n l = 0,\n f = 0;\n function d(t, e) {\n var r,\n n = !1;\n for (r = 0; r < t.length; r += 1) t[r] === e && (n = !0);\n return n;\n }\n if (void 0 === this.internal.viewerpreferences && (this.internal.viewerpreferences = {}, this.internal.viewerpreferences.configuration = JSON.parse(JSON.stringify(s)), this.internal.viewerpreferences.isSubscribed = !1), n = this.internal.viewerpreferences.configuration, \"reset\" === e || !0 === r) {\n var p = c.length;\n for (f = 0; f < p; f += 1) n[c[f]].value = n[c[f]].defaultValue, n[c[f]].explicitSet = !1;\n }\n if (\"object\" === t(e)) for (a in e) if (o = e[a], d(c, a) && void 0 !== o) {\n if (\"boolean\" === n[a].type && \"boolean\" == typeof o) n[a].value = o;else if (\"name\" === n[a].type && d(n[a].valueSet, o)) n[a].value = o;else if (\"integer\" === n[a].type && Number.isInteger(o)) n[a].value = o;else if (\"array\" === n[a].type) {\n for (h = 0; h < o.length; h += 1) if (i = !0, 1 === o[h].length && \"number\" == typeof o[h][0]) u.push(String(o[h] - 1));else if (o[h].length > 1) {\n for (l = 0; l < o[h].length; l += 1) \"number\" != typeof o[h][l] && (i = !1);\n !0 === i && u.push([o[h][0] - 1, o[h][1] - 1].join(\" \"));\n }\n n[a].value = \"[\" + u.join(\" \") + \"]\";\n } else n[a].value = n[a].defaultValue;\n n[a].explicitSet = !0;\n }\n return !1 === this.internal.viewerpreferences.isSubscribed && (this.internal.events.subscribe(\"putCatalog\", function () {\n var t,\n e = [];\n for (t in n) !0 === n[t].explicitSet && (\"name\" === n[t].type ? e.push(\"/\" + t + \" /\" + n[t].value) : e.push(\"/\" + t + \" \" + n[t].value));\n 0 !== e.length && this.internal.write(\"/ViewerPreferences\\n<<\\n\" + e.join(\"\\n\") + \"\\n>>\");\n }), this.internal.viewerpreferences.isSubscribed = !0), this.internal.viewerpreferences.configuration = n, this;\n},\n/** ====================================================================\n * @license\n * jsPDF XMP metadata plugin\n * Copyright (c) 2016 Jussi Utunen, u-jussi@suomi24.fi\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\nfunction (t) {\n var e = function e() {\n var t = '',\n e = unescape(encodeURIComponent('')),\n r = unescape(encodeURIComponent(t)),\n n = unescape(encodeURIComponent(this.internal.__metadata__.metadata)),\n i = unescape(encodeURIComponent(\"\")),\n a = unescape(encodeURIComponent(\"\")),\n o = r.length + n.length + i.length + e.length + a.length;\n this.internal.__metadata__.metadata_object_number = this.internal.newObject(), this.internal.write(\"<< /Type /Metadata /Subtype /XML /Length \" + o + \" >>\"), this.internal.write(\"stream\"), this.internal.write(e + r + n + i + a), this.internal.write(\"endstream\"), this.internal.write(\"endobj\");\n },\n r = function r() {\n this.internal.__metadata__.metadata_object_number && this.internal.write(\"/Metadata \" + this.internal.__metadata__.metadata_object_number + \" 0 R\");\n };\n t.addMetadata = function (t, n) {\n return void 0 === this.internal.__metadata__ && (this.internal.__metadata__ = {\n metadata: t,\n namespaceuri: n || \"http://jspdf.default.namespaceuri/\"\n }, this.internal.events.subscribe(\"putCatalog\", r), this.internal.events.subscribe(\"postPutResources\", e)), this;\n };\n}(E.API), function (t) {\n var e = t.API,\n r = e.pdfEscape16 = function (t, e) {\n for (var r, n = e.metadata.Unicode.widths, i = [\"\", \"0\", \"00\", \"000\", \"0000\"], a = [\"\"], o = 0, s = t.length; o < s; ++o) {\n if (r = e.metadata.characterToGlyph(t.charCodeAt(o)), e.metadata.glyIdsUsed.push(r), e.metadata.toUnicode[r] = t.charCodeAt(o), -1 == n.indexOf(r) && (n.push(r), n.push([parseInt(e.metadata.widthOfGlyph(r), 10)])), \"0\" == r) return a.join(\"\");\n r = r.toString(16), a.push(i[4 - r.length], r);\n }\n return a.join(\"\");\n },\n n = function n(t) {\n var e, r, n, i, a, o, s;\n for (a = \"/CIDInit /ProcSet findresource begin\\n12 dict begin\\nbegincmap\\n/CIDSystemInfo <<\\n /Registry (Adobe)\\n /Ordering (UCS)\\n /Supplement 0\\n>> def\\n/CMapName /Adobe-Identity-UCS def\\n/CMapType 2 def\\n1 begincodespacerange\\n<0000>\\nendcodespacerange\", n = [], o = 0, s = (r = Object.keys(t).sort(function (t, e) {\n return t - e;\n })).length; o < s; o++) e = r[o], n.length >= 100 && (a += \"\\n\" + n.length + \" beginbfchar\\n\" + n.join(\"\\n\") + \"\\nendbfchar\", n = []), void 0 !== t[e] && null !== t[e] && \"function\" == typeof t[e].toString && (i = (\"0000\" + t[e].toString(16)).slice(-4), e = (\"0000\" + (+e).toString(16)).slice(-4), n.push(\"<\" + e + \"><\" + i + \">\"));\n return n.length && (a += \"\\n\" + n.length + \" beginbfchar\\n\" + n.join(\"\\n\") + \"\\nendbfchar\\n\"), a += \"endcmap\\nCMapName currentdict /CMap defineresource pop\\nend\\nend\";\n };\n e.events.push([\"putFont\", function (e) {\n !function (e) {\n var r = e.font,\n i = e.out,\n a = e.newObject,\n o = e.putStream;\n if (r.metadata instanceof t.API.TTFFont && \"Identity-H\" === r.encoding) {\n for (var s = r.metadata.Unicode.widths, c = r.metadata.subset.encode(r.metadata.glyIdsUsed, 1), u = \"\", h = 0; h < c.length; h++) u += String.fromCharCode(c[h]);\n var l = a();\n o({\n data: u,\n addLength1: !0,\n objectId: l\n }), i(\"endobj\");\n var f = a();\n o({\n data: n(r.metadata.toUnicode),\n addLength1: !0,\n objectId: f\n }), i(\"endobj\");\n var d = a();\n i(\"<<\"), i(\"/Type /FontDescriptor\"), i(\"/FontName /\" + F(r.fontName)), i(\"/FontFile2 \" + l + \" 0 R\"), i(\"/FontBBox \" + t.API.PDFObject.convert(r.metadata.bbox)), i(\"/Flags \" + r.metadata.flags), i(\"/StemV \" + r.metadata.stemV), i(\"/ItalicAngle \" + r.metadata.italicAngle), i(\"/Ascent \" + r.metadata.ascender), i(\"/Descent \" + r.metadata.decender), i(\"/CapHeight \" + r.metadata.capHeight), i(\">>\"), i(\"endobj\");\n var p = a();\n i(\"<<\"), i(\"/Type /Font\"), i(\"/BaseFont /\" + F(r.fontName)), i(\"/FontDescriptor \" + d + \" 0 R\"), i(\"/W \" + t.API.PDFObject.convert(s)), i(\"/CIDToGIDMap /Identity\"), i(\"/DW 1000\"), i(\"/Subtype /CIDFontType2\"), i(\"/CIDSystemInfo\"), i(\"<<\"), i(\"/Supplement 0\"), i(\"/Registry (Adobe)\"), i(\"/Ordering (\" + r.encoding + \")\"), i(\">>\"), i(\">>\"), i(\"endobj\"), r.objectNumber = a(), i(\"<<\"), i(\"/Type /Font\"), i(\"/Subtype /Type0\"), i(\"/ToUnicode \" + f + \" 0 R\"), i(\"/BaseFont /\" + F(r.fontName)), i(\"/Encoding /\" + r.encoding), i(\"/DescendantFonts [\" + p + \" 0 R]\"), i(\">>\"), i(\"endobj\"), r.isAlreadyPutted = !0;\n }\n }(e);\n }]);\n e.events.push([\"putFont\", function (e) {\n !function (e) {\n var r = e.font,\n i = e.out,\n a = e.newObject,\n o = e.putStream;\n if (r.metadata instanceof t.API.TTFFont && \"WinAnsiEncoding\" === r.encoding) {\n for (var s = r.metadata.rawData, c = \"\", u = 0; u < s.length; u++) c += String.fromCharCode(s[u]);\n var h = a();\n o({\n data: c,\n addLength1: !0,\n objectId: h\n }), i(\"endobj\");\n var l = a();\n o({\n data: n(r.metadata.toUnicode),\n addLength1: !0,\n objectId: l\n }), i(\"endobj\");\n var f = a();\n i(\"<<\"), i(\"/Descent \" + r.metadata.decender), i(\"/CapHeight \" + r.metadata.capHeight), i(\"/StemV \" + r.metadata.stemV), i(\"/Type /FontDescriptor\"), i(\"/FontFile2 \" + h + \" 0 R\"), i(\"/Flags 96\"), i(\"/FontBBox \" + t.API.PDFObject.convert(r.metadata.bbox)), i(\"/FontName /\" + F(r.fontName)), i(\"/ItalicAngle \" + r.metadata.italicAngle), i(\"/Ascent \" + r.metadata.ascender), i(\">>\"), i(\"endobj\"), r.objectNumber = a();\n for (var d = 0; d < r.metadata.hmtx.widths.length; d++) r.metadata.hmtx.widths[d] = parseInt(r.metadata.hmtx.widths[d] * (1e3 / r.metadata.head.unitsPerEm));\n i(\"<>\"), i(\"endobj\"), r.isAlreadyPutted = !0;\n }\n }(e);\n }]);\n var i = function i(t) {\n var e,\n n = t.text || \"\",\n i = t.x,\n a = t.y,\n o = t.options || {},\n s = t.mutex || {},\n c = s.pdfEscape,\n u = s.activeFontKey,\n h = s.fonts,\n l = u,\n f = \"\",\n d = 0,\n p = \"\",\n g = h[l].encoding;\n if (\"Identity-H\" !== h[l].encoding) return {\n text: n,\n x: i,\n y: a,\n options: o,\n mutex: s\n };\n for (p = n, l = u, Array.isArray(n) && (p = n[0]), d = 0; d < p.length; d += 1) h[l].metadata.hasOwnProperty(\"cmap\") && (e = h[l].metadata.cmap.unicode.codeMap[p[d].charCodeAt(0)]), e || p[d].charCodeAt(0) < 256 && h[l].metadata.hasOwnProperty(\"Unicode\") ? f += p[d] : f += \"\";\n var m = \"\";\n return parseInt(l.slice(1)) < 14 || \"WinAnsiEncoding\" === g ? m = c(f, l).split(\"\").map(function (t) {\n return t.charCodeAt(0).toString(16);\n }).join(\"\") : \"Identity-H\" === g && (m = r(f, h[l])), s.isHex = !0, {\n text: m,\n x: i,\n y: a,\n options: o,\n mutex: s\n };\n };\n e.events.push([\"postProcessText\", function (t) {\n var e = t.text || \"\",\n r = [],\n n = {\n text: e,\n x: t.x,\n y: t.y,\n options: t.options,\n mutex: t.mutex\n };\n if (Array.isArray(e)) {\n var a = 0;\n for (a = 0; a < e.length; a += 1) Array.isArray(e[a]) && 3 === e[a].length ? r.push([i(Object.assign({}, n, {\n text: e[a][0]\n })).text, e[a][1], e[a][2]]) : r.push(i(Object.assign({}, n, {\n text: e[a]\n })).text);\n t.text = r;\n } else t.text = i(Object.assign({}, n, {\n text: e\n })).text;\n }]);\n}(E),\n/**\n * @license\n * jsPDF virtual FileSystem functionality\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\nfunction (t) {\n var e = function e() {\n return void 0 === this.internal.vFS && (this.internal.vFS = {}), !0;\n };\n t.existsFileInVFS = function (t) {\n return e.call(this), void 0 !== this.internal.vFS[t];\n }, t.addFileToVFS = function (t, r) {\n return e.call(this), this.internal.vFS[t] = r, this;\n }, t.getFileFromVFS = function (t) {\n return e.call(this), void 0 !== this.internal.vFS[t] ? this.internal.vFS[t] : null;\n };\n}(E.API),\n/**\n * @license\n * Unicode Bidi Engine based on the work of Alex Shensis (@asthensis)\n * MIT License\n */\nfunction (t) {\n t.__bidiEngine__ = t.prototype.__bidiEngine__ = function (t) {\n var r,\n n,\n i,\n a,\n o,\n s,\n c,\n u = e,\n h = [[0, 3, 0, 1, 0, 0, 0], [0, 3, 0, 1, 2, 2, 0], [0, 3, 0, 17, 2, 0, 1], [0, 3, 5, 5, 4, 1, 0], [0, 3, 21, 21, 4, 0, 1], [0, 3, 5, 5, 4, 2, 0]],\n l = [[2, 0, 1, 1, 0, 1, 0], [2, 0, 1, 1, 0, 2, 0], [2, 0, 2, 1, 3, 2, 0], [2, 0, 2, 33, 3, 1, 1]],\n f = {\n L: 0,\n R: 1,\n EN: 2,\n AN: 3,\n N: 4,\n B: 5,\n S: 6\n },\n d = {\n 0: 0,\n 5: 1,\n 6: 2,\n 7: 3,\n 32: 4,\n 251: 5,\n 254: 6,\n 255: 7\n },\n p = [\"(\", \")\", \"(\", \"<\", \">\", \"<\", \"[\", \"]\", \"[\", \"{\", \"}\", \"{\", \"«\", \"»\", \"«\", \"‹\", \"›\", \"‹\", \"⁅\", \"⁆\", \"⁅\", \"⁽\", \"⁾\", \"⁽\", \"₍\", \"₎\", \"₍\", \"≤\", \"≥\", \"≤\", \"〈\", \"〉\", \"〈\", \"﹙\", \"﹚\", \"﹙\", \"﹛\", \"﹜\", \"﹛\", \"﹝\", \"﹞\", \"﹝\", \"﹤\", \"﹥\", \"﹤\"],\n g = new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),\n m = !1,\n v = 0;\n this.__bidiEngine__ = {};\n var b = function b(t) {\n var e = t.charCodeAt(),\n r = e >> 8,\n n = d[r];\n return void 0 !== n ? u[256 * n + (255 & e)] : 252 === r || 253 === r ? \"AL\" : g.test(r) ? \"L\" : 8 === r ? \"R\" : \"N\";\n },\n y = function y(t) {\n for (var e, r = 0; r < t.length; r++) {\n if (\"L\" === (e = b(t.charAt(r)))) return !1;\n if (\"R\" === e) return !0;\n }\n return !1;\n },\n w = function w(t, e, o, s) {\n var c,\n u,\n h,\n l,\n f = e[s];\n switch (f) {\n case \"L\":\n case \"R\":\n m = !1;\n break;\n case \"N\":\n case \"AN\":\n break;\n case \"EN\":\n m && (f = \"AN\");\n break;\n case \"AL\":\n m = !0, f = \"R\";\n break;\n case \"WS\":\n f = \"N\";\n break;\n case \"CS\":\n s < 1 || s + 1 >= e.length || \"EN\" !== (c = o[s - 1]) && \"AN\" !== c || \"EN\" !== (u = e[s + 1]) && \"AN\" !== u ? f = \"N\" : m && (u = \"AN\"), f = u === c ? u : \"N\";\n break;\n case \"ES\":\n f = \"EN\" === (c = s > 0 ? o[s - 1] : \"B\") && s + 1 < e.length && \"EN\" === e[s + 1] ? \"EN\" : \"N\";\n break;\n case \"ET\":\n if (s > 0 && \"EN\" === o[s - 1]) {\n f = \"EN\";\n break;\n }\n if (m) {\n f = \"N\";\n break;\n }\n for (h = s + 1, l = e.length; h < l && \"ET\" === e[h];) h++;\n f = h < l && \"EN\" === e[h] ? \"EN\" : \"N\";\n break;\n case \"NSM\":\n if (i && !a) {\n for (l = e.length, h = s + 1; h < l && \"NSM\" === e[h];) h++;\n if (h < l) {\n var d = t[s],\n p = d >= 1425 && d <= 2303 || 64286 === d;\n if (c = e[h], p && (\"R\" === c || \"AL\" === c)) {\n f = \"R\";\n break;\n }\n }\n }\n f = s < 1 || \"B\" === (c = e[s - 1]) ? \"N\" : o[s - 1];\n break;\n case \"B\":\n m = !1, r = !0, f = v;\n break;\n case \"S\":\n n = !0, f = \"N\";\n break;\n case \"LRE\":\n case \"RLE\":\n case \"LRO\":\n case \"RLO\":\n case \"PDF\":\n m = !1;\n break;\n case \"BN\":\n f = \"N\";\n }\n return f;\n },\n N = function N(t, e, r) {\n var n = t.split(\"\");\n return r && L(n, r, {\n hiLevel: v\n }), n.reverse(), e && e.reverse(), n.join(\"\");\n },\n L = function L(t, e, i) {\n var a,\n o,\n s,\n c,\n u,\n d = -1,\n p = t.length,\n g = 0,\n y = [],\n N = v ? l : h,\n L = [];\n for (m = !1, r = !1, n = !1, o = 0; o < p; o++) L[o] = b(t[o]);\n for (s = 0; s < p; s++) {\n if (u = g, y[s] = w(t, L, y, s), a = 240 & (g = N[u][f[y[s]]]), g &= 15, e[s] = c = N[g][5], a > 0) if (16 === a) {\n for (o = d; o < s; o++) e[o] = 1;\n d = -1;\n } else d = -1;\n if (N[g][6]) -1 === d && (d = s);else if (d > -1) {\n for (o = d; o < s; o++) e[o] = c;\n d = -1;\n }\n \"B\" === L[s] && (e[s] = 0), i.hiLevel |= c;\n }\n n && function (t, e, r) {\n for (var n = 0; n < r; n++) if (\"S\" === t[n]) {\n e[n] = v;\n for (var i = n - 1; i >= 0 && \"WS\" === t[i]; i--) e[i] = v;\n }\n }(L, e, p);\n },\n A = function A(t, e, n, i, a) {\n if (!(a.hiLevel < t)) {\n if (1 === t && 1 === v && !r) return e.reverse(), void (n && n.reverse());\n for (var o, s, c, u, h = e.length, l = 0; l < h;) {\n if (i[l] >= t) {\n for (c = l + 1; c < h && i[c] >= t;) c++;\n for (u = l, s = c - 1; u < s; u++, s--) o = e[u], e[u] = e[s], e[s] = o, n && (o = n[u], n[u] = n[s], n[s] = o);\n l = c;\n }\n l++;\n }\n }\n },\n x = function x(t, e, r) {\n var n = t.split(\"\"),\n i = {\n hiLevel: v\n };\n return r || (r = []), L(n, r, i), function (t, e, r) {\n if (0 !== r.hiLevel && c) for (var n, i = 0; i < t.length; i++) 1 === e[i] && (n = p.indexOf(t[i])) >= 0 && (t[i] = p[n + 1]);\n }(n, r, i), A(2, n, e, r, i), A(1, n, e, r, i), n.join(\"\");\n };\n return this.__bidiEngine__.doBidiReorder = function (t, e, r) {\n if (function (t, e) {\n if (e) for (var r = 0; r < t.length; r++) e[r] = r;\n void 0 === a && (a = y(t)), void 0 === s && (s = y(t));\n }(t, e), i || !o || s) {\n if (i && o && a ^ s) v = a ? 1 : 0, t = N(t, e, r);else if (!i && o && s) v = a ? 1 : 0, t = x(t, e, r), t = N(t, e);else if (!i || a || o || s) {\n if (i && !o && a ^ s) t = N(t, e), a ? (v = 0, t = x(t, e, r)) : (v = 1, t = x(t, e, r), t = N(t, e));else if (i && a && !o && s) v = 1, t = x(t, e, r), t = N(t, e);else if (!i && !o && a ^ s) {\n var n = c;\n a ? (v = 1, t = x(t, e, r), v = 0, c = !1, t = x(t, e, r), c = n) : (v = 0, t = x(t, e, r), t = N(t, e), v = 1, c = !1, t = x(t, e, r), c = n, t = N(t, e));\n }\n } else v = 0, t = x(t, e, r);\n } else v = a ? 1 : 0, t = x(t, e, r);\n return t;\n }, this.__bidiEngine__.setOptions = function (t) {\n t && (i = t.isInputVisual, o = t.isOutputVisual, a = t.isInputRtl, s = t.isOutputRtl, c = t.isSymmetricSwapping);\n }, this.__bidiEngine__.setOptions(t), this.__bidiEngine__;\n };\n var e = [\"BN\", \"BN\", \"BN\", \"BN\", \"BN\", \"BN\", \"BN\", \"BN\", \"BN\", \"S\", \"B\", \"S\", \"WS\", \"B\", \"BN\", \"BN\", \"BN\", \"BN\", \"BN\", \"BN\", \"BN\", \"BN\", \"BN\", \"BN\", \"BN\", \"BN\", \"BN\", \"BN\", \"B\", \"B\", \"B\", \"S\", \"WS\", \"N\", \"N\", \"ET\", \"ET\", \"ET\", \"N\", \"N\", \"N\", \"N\", \"N\", \"ES\", \"CS\", \"ES\", \"CS\", \"CS\", \"EN\", \"EN\", \"EN\", \"EN\", \"EN\", \"EN\", \"EN\", \"EN\", \"EN\", \"EN\", \"CS\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"N\", \"N\", \"N\", \"N\", \"BN\", \"BN\", \"BN\", \"BN\", \"BN\", \"BN\", \"B\", \"BN\", \"BN\", \"BN\", \"BN\", \"BN\", \"BN\", \"BN\", \"BN\", \"BN\", \"BN\", \"BN\", \"BN\", \"BN\", \"BN\", \"BN\", \"BN\", \"BN\", \"BN\", \"BN\", \"BN\", \"BN\", \"BN\", \"BN\", \"BN\", \"BN\", \"BN\", \"CS\", \"N\", \"ET\", \"ET\", \"ET\", \"ET\", \"N\", \"N\", \"N\", \"N\", \"L\", \"N\", \"N\", \"BN\", \"N\", \"N\", \"ET\", \"ET\", \"EN\", \"EN\", \"N\", \"L\", \"N\", \"N\", \"N\", \"EN\", \"L\", \"N\", \"N\", \"N\", \"N\", \"N\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"N\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"N\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"N\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"N\", \"N\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"N\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"N\", \"L\", \"N\", \"N\", \"N\", \"N\", \"N\", \"ET\", \"N\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"R\", \"NSM\", \"R\", \"NSM\", \"NSM\", \"R\", \"NSM\", \"NSM\", \"R\", \"NSM\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"N\", \"N\", \"N\", \"N\", \"N\", \"R\", \"R\", \"R\", \"R\", \"R\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"AN\", \"AN\", \"AN\", \"AN\", \"AN\", \"AN\", \"N\", \"N\", \"AL\", \"ET\", \"ET\", \"AL\", \"CS\", \"AL\", \"N\", \"N\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"AL\", \"AL\", \"N\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"AN\", \"AN\", \"AN\", \"AN\", \"AN\", \"AN\", \"AN\", \"AN\", \"AN\", \"AN\", \"ET\", \"AN\", \"AN\", \"AL\", \"AL\", \"AL\", \"NSM\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"AN\", \"N\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"AL\", \"AL\", \"NSM\", \"NSM\", \"N\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"AL\", \"AL\", \"EN\", \"EN\", \"EN\", \"EN\", \"EN\", \"EN\", \"EN\", \"EN\", \"EN\", \"EN\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"N\", \"AL\", \"AL\", \"NSM\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"N\", \"N\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"AL\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"R\", \"R\", \"N\", \"N\", \"N\", \"N\", \"R\", \"N\", \"N\", \"N\", \"N\", \"N\", \"WS\", \"WS\", \"WS\", \"WS\", \"WS\", \"WS\", \"WS\", \"WS\", \"WS\", \"WS\", \"WS\", \"BN\", \"BN\", \"BN\", \"L\", \"R\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"WS\", \"B\", \"LRE\", \"RLE\", \"PDF\", \"LRO\", \"RLO\", \"CS\", \"ET\", \"ET\", \"ET\", \"ET\", \"ET\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"CS\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"WS\", \"BN\", \"BN\", \"BN\", \"BN\", \"BN\", \"N\", \"LRI\", \"RLI\", \"FSI\", \"PDI\", \"BN\", \"BN\", \"BN\", \"BN\", \"BN\", \"BN\", \"EN\", \"L\", \"N\", \"N\", \"EN\", \"EN\", \"EN\", \"EN\", \"EN\", \"EN\", \"ES\", \"ES\", \"N\", \"N\", \"N\", \"L\", \"EN\", \"EN\", \"EN\", \"EN\", \"EN\", \"EN\", \"EN\", \"EN\", \"EN\", \"EN\", \"ES\", \"ES\", \"N\", \"N\", \"N\", \"N\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"N\", \"N\", \"N\", \"ET\", \"ET\", \"ET\", \"ET\", \"ET\", \"ET\", \"ET\", \"ET\", \"ET\", \"ET\", \"ET\", \"ET\", \"ET\", \"ET\", \"ET\", \"ET\", \"ET\", \"ET\", \"ET\", \"ET\", \"ET\", \"ET\", \"ET\", \"ET\", \"ET\", \"ET\", \"ET\", \"ET\", \"ET\", \"ET\", \"ET\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"L\", \"L\", \"L\", \"L\", \"L\", \"N\", \"N\", \"N\", \"N\", \"N\", \"R\", \"NSM\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"ES\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"N\", \"R\", \"R\", \"R\", \"R\", \"R\", \"N\", \"R\", \"N\", \"R\", \"R\", \"N\", \"R\", \"R\", \"N\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"R\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"NSM\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"CS\", \"N\", \"CS\", \"N\", \"N\", \"CS\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"ET\", \"N\", \"N\", \"ES\", \"ES\", \"N\", \"N\", \"N\", \"N\", \"N\", \"ET\", \"ET\", \"N\", \"N\", \"N\", \"N\", \"N\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"N\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"AL\", \"N\", \"N\", \"BN\", \"N\", \"N\", \"N\", \"ET\", \"ET\", \"ET\", \"N\", \"N\", \"N\", \"N\", \"N\", \"ES\", \"CS\", \"ES\", \"CS\", \"CS\", \"EN\", \"EN\", \"EN\", \"EN\", \"EN\", \"EN\", \"EN\", \"EN\", \"EN\", \"EN\", \"CS\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"N\", \"N\", \"N\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"N\", \"N\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"N\", \"N\", \"L\", \"L\", \"L\", \"L\", \"L\", \"L\", \"N\", \"N\", \"L\", \"L\", \"L\", \"N\", \"N\", \"N\", \"ET\", \"ET\", \"N\", \"N\", \"N\", \"ET\", \"ET\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\", \"N\"],\n r = new t.__bidiEngine__({\n isInputVisual: !0\n });\n t.API.events.push([\"postProcessText\", function (t) {\n var e = t.text,\n n = (t.x, t.y, t.options || {}),\n i = (t.mutex, n.lang, []);\n if (n.isInputVisual = \"boolean\" != typeof n.isInputVisual || n.isInputVisual, r.setOptions(n), \"[object Array]\" === Object.prototype.toString.call(e)) {\n var a = 0;\n for (i = [], a = 0; a < e.length; a += 1) \"[object Array]\" === Object.prototype.toString.call(e[a]) ? i.push([r.doBidiReorder(e[a][0]), e[a][1], e[a][2]]) : i.push([r.doBidiReorder(e[a])]);\n t.text = i;\n } else t.text = r.doBidiReorder(e);\n r.setOptions({\n isInputVisual: !0\n });\n }]);\n}(E), E.API.TTFFont = function () {\n function t(t) {\n var e;\n if (this.rawData = t, e = this.contents = new ne(t), this.contents.pos = 4, \"ttcf\" === e.readString(4)) throw new Error(\"TTCF not supported.\");\n e.pos = 0, this.parse(), this.subset = new Le(this), this.registerTTF();\n }\n return t.open = function (e) {\n return new t(e);\n }, t.prototype.parse = function () {\n return this.directory = new ie(this.contents), this.head = new se(this), this.name = new pe(this), this.cmap = new ue(this), this.toUnicode = {}, this.hhea = new he(this), this.maxp = new ge(this), this.hmtx = new me(this), this.post = new fe(this), this.os2 = new le(this), this.loca = new Ne(this), this.glyf = new be(this), this.ascender = this.os2.exists && this.os2.ascender || this.hhea.ascender, this.decender = this.os2.exists && this.os2.decender || this.hhea.decender, this.lineGap = this.os2.exists && this.os2.lineGap || this.hhea.lineGap, this.bbox = [this.head.xMin, this.head.yMin, this.head.xMax, this.head.yMax];\n }, t.prototype.registerTTF = function () {\n var t, e, r, n, i;\n if (this.scaleFactor = 1e3 / this.head.unitsPerEm, this.bbox = function () {\n var e, r, n, i;\n for (i = [], e = 0, r = (n = this.bbox).length; e < r; e++) t = n[e], i.push(Math.round(t * this.scaleFactor));\n return i;\n }.call(this), this.stemV = 0, this.post.exists ? (r = 255 & (n = this.post.italic_angle), 0 != (32768 & (e = n >> 16)) && (e = -(1 + (65535 ^ e))), this.italicAngle = +(e + \".\" + r)) : this.italicAngle = 0, this.ascender = Math.round(this.ascender * this.scaleFactor), this.decender = Math.round(this.decender * this.scaleFactor), this.lineGap = Math.round(this.lineGap * this.scaleFactor), this.capHeight = this.os2.exists && this.os2.capHeight || this.ascender, this.xHeight = this.os2.exists && this.os2.xHeight || 0, this.familyClass = (this.os2.exists && this.os2.familyClass || 0) >> 8, this.isSerif = 1 === (i = this.familyClass) || 2 === i || 3 === i || 4 === i || 5 === i || 7 === i, this.isScript = 10 === this.familyClass, this.flags = 0, this.post.isFixedPitch && (this.flags |= 1), this.isSerif && (this.flags |= 2), this.isScript && (this.flags |= 8), 0 !== this.italicAngle && (this.flags |= 64), this.flags |= 32, !this.cmap.unicode) throw new Error(\"No unicode cmap for font\");\n }, t.prototype.characterToGlyph = function (t) {\n var e;\n return (null != (e = this.cmap.unicode) ? e.codeMap[t] : void 0) || 0;\n }, t.prototype.widthOfGlyph = function (t) {\n var e;\n return e = 1e3 / this.head.unitsPerEm, this.hmtx.forGlyph(t).advance * e;\n }, t.prototype.widthOfString = function (t, e, r) {\n var n, i, a, o;\n for (a = 0, i = 0, o = (t = \"\" + t).length; 0 <= o ? i < o : i > o; i = 0 <= o ? ++i : --i) n = t.charCodeAt(i), a += this.widthOfGlyph(this.characterToGlyph(n)) + r * (1e3 / e) || 0;\n return a * (e / 1e3);\n }, t.prototype.lineHeight = function (t, e) {\n var r;\n return null == e && (e = !1), r = e ? this.lineGap : 0, (this.ascender + r - this.decender) / 1e3 * t;\n }, t;\n}();\nvar re,\n ne = function () {\n function t(t) {\n this.data = null != t ? t : [], this.pos = 0, this.length = this.data.length;\n }\n return t.prototype.readByte = function () {\n return this.data[this.pos++];\n }, t.prototype.writeByte = function (t) {\n return this.data[this.pos++] = t;\n }, t.prototype.readUInt32 = function () {\n return 16777216 * this.readByte() + (this.readByte() << 16) + (this.readByte() << 8) + this.readByte();\n }, t.prototype.writeUInt32 = function (t) {\n return this.writeByte(t >>> 24 & 255), this.writeByte(t >> 16 & 255), this.writeByte(t >> 8 & 255), this.writeByte(255 & t);\n }, t.prototype.readInt32 = function () {\n var t;\n return (t = this.readUInt32()) >= 2147483648 ? t - 4294967296 : t;\n }, t.prototype.writeInt32 = function (t) {\n return t < 0 && (t += 4294967296), this.writeUInt32(t);\n }, t.prototype.readUInt16 = function () {\n return this.readByte() << 8 | this.readByte();\n }, t.prototype.writeUInt16 = function (t) {\n return this.writeByte(t >> 8 & 255), this.writeByte(255 & t);\n }, t.prototype.readInt16 = function () {\n var t;\n return (t = this.readUInt16()) >= 32768 ? t - 65536 : t;\n }, t.prototype.writeInt16 = function (t) {\n return t < 0 && (t += 65536), this.writeUInt16(t);\n }, t.prototype.readString = function (t) {\n var e, r;\n for (r = [], e = 0; 0 <= t ? e < t : e > t; e = 0 <= t ? ++e : --e) r[e] = String.fromCharCode(this.readByte());\n return r.join(\"\");\n }, t.prototype.writeString = function (t) {\n var e, r, n;\n for (n = [], e = 0, r = t.length; 0 <= r ? e < r : e > r; e = 0 <= r ? ++e : --e) n.push(this.writeByte(t.charCodeAt(e)));\n return n;\n }, t.prototype.readShort = function () {\n return this.readInt16();\n }, t.prototype.writeShort = function (t) {\n return this.writeInt16(t);\n }, t.prototype.readLongLong = function () {\n var t, e, r, n, i, a, o, s;\n return t = this.readByte(), e = this.readByte(), r = this.readByte(), n = this.readByte(), i = this.readByte(), a = this.readByte(), o = this.readByte(), s = this.readByte(), 128 & t ? -1 * (72057594037927940 * (255 ^ t) + 281474976710656 * (255 ^ e) + 1099511627776 * (255 ^ r) + 4294967296 * (255 ^ n) + 16777216 * (255 ^ i) + 65536 * (255 ^ a) + 256 * (255 ^ o) + (255 ^ s) + 1) : 72057594037927940 * t + 281474976710656 * e + 1099511627776 * r + 4294967296 * n + 16777216 * i + 65536 * a + 256 * o + s;\n }, t.prototype.writeLongLong = function (t) {\n var e, r;\n return e = Math.floor(t / 4294967296), r = 4294967295 & t, this.writeByte(e >> 24 & 255), this.writeByte(e >> 16 & 255), this.writeByte(e >> 8 & 255), this.writeByte(255 & e), this.writeByte(r >> 24 & 255), this.writeByte(r >> 16 & 255), this.writeByte(r >> 8 & 255), this.writeByte(255 & r);\n }, t.prototype.readInt = function () {\n return this.readInt32();\n }, t.prototype.writeInt = function (t) {\n return this.writeInt32(t);\n }, t.prototype.read = function (t) {\n var e, r;\n for (e = [], r = 0; 0 <= t ? r < t : r > t; r = 0 <= t ? ++r : --r) e.push(this.readByte());\n return e;\n }, t.prototype.write = function (t) {\n var e, r, n, i;\n for (i = [], r = 0, n = t.length; r < n; r++) e = t[r], i.push(this.writeByte(e));\n return i;\n }, t;\n }(),\n ie = function () {\n var t;\n function e(t) {\n var e, r, n;\n for (this.scalarType = t.readInt(), this.tableCount = t.readShort(), this.searchRange = t.readShort(), this.entrySelector = t.readShort(), this.rangeShift = t.readShort(), this.tables = {}, r = 0, n = this.tableCount; 0 <= n ? r < n : r > n; r = 0 <= n ? ++r : --r) e = {\n tag: t.readString(4),\n checksum: t.readInt(),\n offset: t.readInt(),\n length: t.readInt()\n }, this.tables[e.tag] = e;\n }\n return e.prototype.encode = function (e) {\n var r, n, i, a, o, s, c, u, h, l, f, d, p;\n for (p in f = Object.keys(e).length, s = Math.log(2), h = 16 * Math.floor(Math.log(f) / s), a = Math.floor(h / s), u = 16 * f - h, (n = new ne()).writeInt(this.scalarType), n.writeShort(f), n.writeShort(h), n.writeShort(a), n.writeShort(u), i = 16 * f, c = n.pos + i, o = null, d = [], e) for (l = e[p], n.writeString(p), n.writeInt(t(l)), n.writeInt(c), n.writeInt(l.length), d = d.concat(l), \"head\" === p && (o = c), c += l.length; c % 4;) d.push(0), c++;\n return n.write(d), r = 2981146554 - t(n.data), n.pos = o + 8, n.writeUInt32(r), n.data;\n }, t = function t(_t5) {\n var e, r, n, i;\n for (_t5 = ve.call(_t5); _t5.length % 4;) _t5.push(0);\n for (n = new ne(_t5), r = 0, e = 0, i = _t5.length; e < i; e = e += 4) r += n.readUInt32();\n return 4294967295 & r;\n }, e;\n }(),\n ae = {}.hasOwnProperty,\n oe = function oe(t, e) {\n for (var r in e) ae.call(e, r) && (t[r] = e[r]);\n function n() {\n this.constructor = t;\n }\n return n.prototype = e.prototype, t.prototype = new n(), t.__super__ = e.prototype, t;\n };\nre = function () {\n function t(t) {\n var e;\n this.file = t, e = this.file.directory.tables[this.tag], this.exists = !!e, e && (this.offset = e.offset, this.length = e.length, this.parse(this.file.contents));\n }\n return t.prototype.parse = function () {}, t.prototype.encode = function () {}, t.prototype.raw = function () {\n return this.exists ? (this.file.contents.pos = this.offset, this.file.contents.read(this.length)) : null;\n }, t;\n}();\nvar se = function (t) {\n function e() {\n return e.__super__.constructor.apply(this, arguments);\n }\n return oe(e, re), e.prototype.tag = \"head\", e.prototype.parse = function (t) {\n return t.pos = this.offset, this.version = t.readInt(), this.revision = t.readInt(), this.checkSumAdjustment = t.readInt(), this.magicNumber = t.readInt(), this.flags = t.readShort(), this.unitsPerEm = t.readShort(), this.created = t.readLongLong(), this.modified = t.readLongLong(), this.xMin = t.readShort(), this.yMin = t.readShort(), this.xMax = t.readShort(), this.yMax = t.readShort(), this.macStyle = t.readShort(), this.lowestRecPPEM = t.readShort(), this.fontDirectionHint = t.readShort(), this.indexToLocFormat = t.readShort(), this.glyphDataFormat = t.readShort();\n }, e.prototype.encode = function (t) {\n var e;\n return (e = new ne()).writeInt(this.version), e.writeInt(this.revision), e.writeInt(this.checkSumAdjustment), e.writeInt(this.magicNumber), e.writeShort(this.flags), e.writeShort(this.unitsPerEm), e.writeLongLong(this.created), e.writeLongLong(this.modified), e.writeShort(this.xMin), e.writeShort(this.yMin), e.writeShort(this.xMax), e.writeShort(this.yMax), e.writeShort(this.macStyle), e.writeShort(this.lowestRecPPEM), e.writeShort(this.fontDirectionHint), e.writeShort(t), e.writeShort(this.glyphDataFormat), e.data;\n }, e;\n }(),\n ce = function () {\n function t(t, e) {\n var r, n, i, a, o, s, c, u, h, l, f, d, p, g, m, v, b;\n switch (this.platformID = t.readUInt16(), this.encodingID = t.readShort(), this.offset = e + t.readInt(), h = t.pos, t.pos = this.offset, this.format = t.readUInt16(), this.length = t.readUInt16(), this.language = t.readUInt16(), this.isUnicode = 3 === this.platformID && 1 === this.encodingID && 4 === this.format || 0 === this.platformID && 4 === this.format, this.codeMap = {}, this.format) {\n case 0:\n for (s = 0; s < 256; ++s) this.codeMap[s] = t.readByte();\n break;\n case 4:\n for (f = t.readUInt16(), l = f / 2, t.pos += 6, i = function () {\n var e, r;\n for (r = [], s = e = 0; 0 <= l ? e < l : e > l; s = 0 <= l ? ++e : --e) r.push(t.readUInt16());\n return r;\n }(), t.pos += 2, p = function () {\n var e, r;\n for (r = [], s = e = 0; 0 <= l ? e < l : e > l; s = 0 <= l ? ++e : --e) r.push(t.readUInt16());\n return r;\n }(), c = function () {\n var e, r;\n for (r = [], s = e = 0; 0 <= l ? e < l : e > l; s = 0 <= l ? ++e : --e) r.push(t.readUInt16());\n return r;\n }(), u = function () {\n var e, r;\n for (r = [], s = e = 0; 0 <= l ? e < l : e > l; s = 0 <= l ? ++e : --e) r.push(t.readUInt16());\n return r;\n }(), n = (this.length - t.pos + this.offset) / 2, o = function () {\n var e, r;\n for (r = [], s = e = 0; 0 <= n ? e < n : e > n; s = 0 <= n ? ++e : --e) r.push(t.readUInt16());\n return r;\n }(), s = m = 0, b = i.length; m < b; s = ++m) for (g = i[s], r = v = d = p[s]; d <= g ? v <= g : v >= g; r = d <= g ? ++v : --v) 0 === u[s] ? a = r + c[s] : 0 !== (a = o[u[s] / 2 + (r - d) - (l - s)] || 0) && (a += c[s]), this.codeMap[r] = 65535 & a;\n }\n t.pos = h;\n }\n return t.encode = function (t, e) {\n var r, n, i, a, o, s, c, u, h, l, f, d, p, g, m, v, b, y, w, N, L, A, x, S, _, P, k, I, F, C, j, O, B, M, E, q, D, R, T, U, z, H, W, V, G, Y;\n switch (I = new ne(), a = Object.keys(t).sort(function (t, e) {\n return t - e;\n }), e) {\n case \"macroman\":\n for (p = 0, g = function () {\n var t = [];\n for (d = 0; d < 256; ++d) t.push(0);\n return t;\n }(), v = {\n 0: 0\n }, i = {}, F = 0, B = a.length; F < B; F++) null == v[W = t[n = a[F]]] && (v[W] = ++p), i[n] = {\n old: t[n],\n \"new\": v[t[n]]\n }, g[n] = v[t[n]];\n return I.writeUInt16(1), I.writeUInt16(0), I.writeUInt32(12), I.writeUInt16(0), I.writeUInt16(262), I.writeUInt16(0), I.write(g), {\n charMap: i,\n subtable: I.data,\n maxGlyphID: p + 1\n };\n case \"unicode\":\n for (P = [], h = [], b = 0, v = {}, r = {}, m = c = null, C = 0, M = a.length; C < M; C++) null == v[w = t[n = a[C]]] && (v[w] = ++b), r[n] = {\n old: w,\n \"new\": v[w]\n }, o = v[w] - n, null != m && o === c || (m && h.push(m), P.push(n), c = o), m = n;\n for (m && h.push(m), h.push(65535), P.push(65535), S = 2 * (x = P.length), A = 2 * Math.pow(Math.log(x) / Math.LN2, 2), l = Math.log(A / 2) / Math.LN2, L = 2 * x - A, s = [], N = [], f = [], d = j = 0, E = P.length; j < E; d = ++j) {\n if (_ = P[d], u = h[d], 65535 === _) {\n s.push(0), N.push(0);\n break;\n }\n if (_ - (k = r[_][\"new\"]) >= 32768) for (s.push(0), N.push(2 * (f.length + x - d)), n = O = _; _ <= u ? O <= u : O >= u; n = _ <= u ? ++O : --O) f.push(r[n][\"new\"]);else s.push(k - _), N.push(0);\n }\n for (I.writeUInt16(3), I.writeUInt16(1), I.writeUInt32(12), I.writeUInt16(4), I.writeUInt16(16 + 8 * x + 2 * f.length), I.writeUInt16(0), I.writeUInt16(S), I.writeUInt16(A), I.writeUInt16(l), I.writeUInt16(L), z = 0, q = h.length; z < q; z++) n = h[z], I.writeUInt16(n);\n for (I.writeUInt16(0), H = 0, D = P.length; H < D; H++) n = P[H], I.writeUInt16(n);\n for (V = 0, R = s.length; V < R; V++) o = s[V], I.writeUInt16(o);\n for (G = 0, T = N.length; G < T; G++) y = N[G], I.writeUInt16(y);\n for (Y = 0, U = f.length; Y < U; Y++) p = f[Y], I.writeUInt16(p);\n return {\n charMap: r,\n subtable: I.data,\n maxGlyphID: b + 1\n };\n }\n }, t;\n }(),\n ue = function (t) {\n function e() {\n return e.__super__.constructor.apply(this, arguments);\n }\n return oe(e, re), e.prototype.tag = \"cmap\", e.prototype.parse = function (t) {\n var e, r, n;\n for (t.pos = this.offset, this.version = t.readUInt16(), n = t.readUInt16(), this.tables = [], this.unicode = null, r = 0; 0 <= n ? r < n : r > n; r = 0 <= n ? ++r : --r) e = new ce(t, this.offset), this.tables.push(e), e.isUnicode && null == this.unicode && (this.unicode = e);\n return !0;\n }, e.encode = function (t, e) {\n var r, n;\n return null == e && (e = \"macroman\"), r = ce.encode(t, e), (n = new ne()).writeUInt16(0), n.writeUInt16(1), r.table = n.data.concat(r.subtable), r;\n }, e;\n }(),\n he = function (t) {\n function e() {\n return e.__super__.constructor.apply(this, arguments);\n }\n return oe(e, re), e.prototype.tag = \"hhea\", e.prototype.parse = function (t) {\n return t.pos = this.offset, this.version = t.readInt(), this.ascender = t.readShort(), this.decender = t.readShort(), this.lineGap = t.readShort(), this.advanceWidthMax = t.readShort(), this.minLeftSideBearing = t.readShort(), this.minRightSideBearing = t.readShort(), this.xMaxExtent = t.readShort(), this.caretSlopeRise = t.readShort(), this.caretSlopeRun = t.readShort(), this.caretOffset = t.readShort(), t.pos += 8, this.metricDataFormat = t.readShort(), this.numberOfMetrics = t.readUInt16();\n }, e;\n }(),\n le = function (t) {\n function e() {\n return e.__super__.constructor.apply(this, arguments);\n }\n return oe(e, re), e.prototype.tag = \"OS/2\", e.prototype.parse = function (t) {\n if (t.pos = this.offset, this.version = t.readUInt16(), this.averageCharWidth = t.readShort(), this.weightClass = t.readUInt16(), this.widthClass = t.readUInt16(), this.type = t.readShort(), this.ySubscriptXSize = t.readShort(), this.ySubscriptYSize = t.readShort(), this.ySubscriptXOffset = t.readShort(), this.ySubscriptYOffset = t.readShort(), this.ySuperscriptXSize = t.readShort(), this.ySuperscriptYSize = t.readShort(), this.ySuperscriptXOffset = t.readShort(), this.ySuperscriptYOffset = t.readShort(), this.yStrikeoutSize = t.readShort(), this.yStrikeoutPosition = t.readShort(), this.familyClass = t.readShort(), this.panose = function () {\n var e, r;\n for (r = [], e = 0; e < 10; ++e) r.push(t.readByte());\n return r;\n }(), this.charRange = function () {\n var e, r;\n for (r = [], e = 0; e < 4; ++e) r.push(t.readInt());\n return r;\n }(), this.vendorID = t.readString(4), this.selection = t.readShort(), this.firstCharIndex = t.readShort(), this.lastCharIndex = t.readShort(), this.version > 0 && (this.ascent = t.readShort(), this.descent = t.readShort(), this.lineGap = t.readShort(), this.winAscent = t.readShort(), this.winDescent = t.readShort(), this.codePageRange = function () {\n var e, r;\n for (r = [], e = 0; e < 2; e = ++e) r.push(t.readInt());\n return r;\n }(), this.version > 1)) return this.xHeight = t.readShort(), this.capHeight = t.readShort(), this.defaultChar = t.readShort(), this.breakChar = t.readShort(), this.maxContext = t.readShort();\n }, e;\n }(),\n fe = function (t) {\n function e() {\n return e.__super__.constructor.apply(this, arguments);\n }\n return oe(e, re), e.prototype.tag = \"post\", e.prototype.parse = function (t) {\n var e, r, n;\n switch (t.pos = this.offset, this.format = t.readInt(), this.italicAngle = t.readInt(), this.underlinePosition = t.readShort(), this.underlineThickness = t.readShort(), this.isFixedPitch = t.readInt(), this.minMemType42 = t.readInt(), this.maxMemType42 = t.readInt(), this.minMemType1 = t.readInt(), this.maxMemType1 = t.readInt(), this.format) {\n case 65536:\n break;\n case 131072:\n var i;\n for (r = t.readUInt16(), this.glyphNameIndex = [], i = 0; 0 <= r ? i < r : i > r; i = 0 <= r ? ++i : --i) this.glyphNameIndex.push(t.readUInt16());\n for (this.names = [], n = []; t.pos < this.offset + this.length;) e = t.readByte(), n.push(this.names.push(t.readString(e)));\n return n;\n case 151552:\n return r = t.readUInt16(), this.offsets = t.read(r);\n case 196608:\n break;\n case 262144:\n return this.map = function () {\n var e, r, n;\n for (n = [], i = e = 0, r = this.file.maxp.numGlyphs; 0 <= r ? e < r : e > r; i = 0 <= r ? ++e : --e) n.push(t.readUInt32());\n return n;\n }.call(this);\n }\n }, e;\n }(),\n de = function de(t, e) {\n this.raw = t, this.length = t.length, this.platformID = e.platformID, this.encodingID = e.encodingID, this.languageID = e.languageID;\n },\n pe = function (t) {\n function e() {\n return e.__super__.constructor.apply(this, arguments);\n }\n return oe(e, re), e.prototype.tag = \"name\", e.prototype.parse = function (t) {\n var e, r, n, i, a, o, s, c, u, h, l;\n for (t.pos = this.offset, t.readShort(), e = t.readShort(), o = t.readShort(), r = [], i = 0; 0 <= e ? i < e : i > e; i = 0 <= e ? ++i : --i) r.push({\n platformID: t.readShort(),\n encodingID: t.readShort(),\n languageID: t.readShort(),\n nameID: t.readShort(),\n length: t.readShort(),\n offset: this.offset + o + t.readShort()\n });\n for (s = {}, i = u = 0, h = r.length; u < h; i = ++u) n = r[i], t.pos = n.offset, c = t.readString(n.length), a = new de(c, n), null == s[l = n.nameID] && (s[l] = []), s[n.nameID].push(a);\n this.strings = s, this.copyright = s[0], this.fontFamily = s[1], this.fontSubfamily = s[2], this.uniqueSubfamily = s[3], this.fontName = s[4], this.version = s[5];\n try {\n this.postscriptName = s[6][0].raw.replace(/[\\x00-\\x19\\x80-\\xff]/g, \"\");\n } catch (t) {\n this.postscriptName = s[4][0].raw.replace(/[\\x00-\\x19\\x80-\\xff]/g, \"\");\n }\n return this.trademark = s[7], this.manufacturer = s[8], this.designer = s[9], this.description = s[10], this.vendorUrl = s[11], this.designerUrl = s[12], this.license = s[13], this.licenseUrl = s[14], this.preferredFamily = s[15], this.preferredSubfamily = s[17], this.compatibleFull = s[18], this.sampleText = s[19];\n }, e;\n }(),\n ge = function (t) {\n function e() {\n return e.__super__.constructor.apply(this, arguments);\n }\n return oe(e, re), e.prototype.tag = \"maxp\", e.prototype.parse = function (t) {\n return t.pos = this.offset, this.version = t.readInt(), this.numGlyphs = t.readUInt16(), this.maxPoints = t.readUInt16(), this.maxContours = t.readUInt16(), this.maxCompositePoints = t.readUInt16(), this.maxComponentContours = t.readUInt16(), this.maxZones = t.readUInt16(), this.maxTwilightPoints = t.readUInt16(), this.maxStorage = t.readUInt16(), this.maxFunctionDefs = t.readUInt16(), this.maxInstructionDefs = t.readUInt16(), this.maxStackElements = t.readUInt16(), this.maxSizeOfInstructions = t.readUInt16(), this.maxComponentElements = t.readUInt16(), this.maxComponentDepth = t.readUInt16();\n }, e;\n }(),\n me = function (t) {\n function e() {\n return e.__super__.constructor.apply(this, arguments);\n }\n return oe(e, re), e.prototype.tag = \"hmtx\", e.prototype.parse = function (t) {\n var e, r, n, i, a, o, s;\n for (t.pos = this.offset, this.metrics = [], e = 0, o = this.file.hhea.numberOfMetrics; 0 <= o ? e < o : e > o; e = 0 <= o ? ++e : --e) this.metrics.push({\n advance: t.readUInt16(),\n lsb: t.readInt16()\n });\n for (n = this.file.maxp.numGlyphs - this.file.hhea.numberOfMetrics, this.leftSideBearings = function () {\n var r, i;\n for (i = [], e = r = 0; 0 <= n ? r < n : r > n; e = 0 <= n ? ++r : --r) i.push(t.readInt16());\n return i;\n }(), this.widths = function () {\n var t, e, r, n;\n for (n = [], t = 0, e = (r = this.metrics).length; t < e; t++) i = r[t], n.push(i.advance);\n return n;\n }.call(this), r = this.widths[this.widths.length - 1], s = [], e = a = 0; 0 <= n ? a < n : a > n; e = 0 <= n ? ++a : --a) s.push(this.widths.push(r));\n return s;\n }, e.prototype.forGlyph = function (t) {\n return t in this.metrics ? this.metrics[t] : {\n advance: this.metrics[this.metrics.length - 1].advance,\n lsb: this.leftSideBearings[t - this.metrics.length]\n };\n }, e;\n }(),\n ve = [].slice,\n be = function (t) {\n function e() {\n return e.__super__.constructor.apply(this, arguments);\n }\n return oe(e, re), e.prototype.tag = \"glyf\", e.prototype.parse = function () {\n return this.cache = {};\n }, e.prototype.glyphFor = function (t) {\n var e, r, n, i, a, o, s, c, u, h;\n return t in this.cache ? this.cache[t] : (i = this.file.loca, e = this.file.contents, r = i.indexOf(t), 0 === (n = i.lengthOf(t)) ? this.cache[t] = null : (e.pos = this.offset + r, a = (o = new ne(e.read(n))).readShort(), c = o.readShort(), h = o.readShort(), s = o.readShort(), u = o.readShort(), this.cache[t] = -1 === a ? new we(o, c, h, s, u) : new ye(o, a, c, h, s, u), this.cache[t]));\n }, e.prototype.encode = function (t, e, r) {\n var n, i, a, o, s;\n for (a = [], i = [], o = 0, s = e.length; o < s; o++) n = t[e[o]], i.push(a.length), n && (a = a.concat(n.encode(r)));\n return i.push(a.length), {\n table: a,\n offsets: i\n };\n }, e;\n }(),\n ye = function () {\n function t(t, e, r, n, i, a) {\n this.raw = t, this.numberOfContours = e, this.xMin = r, this.yMin = n, this.xMax = i, this.yMax = a, this.compound = !1;\n }\n return t.prototype.encode = function () {\n return this.raw.data;\n }, t;\n }(),\n we = function () {\n function t(t, e, r, n, i) {\n var a, o;\n for (this.raw = t, this.xMin = e, this.yMin = r, this.xMax = n, this.yMax = i, this.compound = !0, this.glyphIDs = [], this.glyphOffsets = [], a = this.raw; o = a.readShort(), this.glyphOffsets.push(a.pos), this.glyphIDs.push(a.readUInt16()), 32 & o;) a.pos += 1 & o ? 4 : 2, 128 & o ? a.pos += 8 : 64 & o ? a.pos += 4 : 8 & o && (a.pos += 2);\n }\n return 1, 8, 32, 64, 128, t.prototype.encode = function () {\n var t, e, r;\n for (e = new ne(ve.call(this.raw.data)), t = 0, r = this.glyphIDs.length; t < r; ++t) e.pos = this.glyphOffsets[t];\n return e.data;\n }, t;\n }(),\n Ne = function (t) {\n function e() {\n return e.__super__.constructor.apply(this, arguments);\n }\n return oe(e, re), e.prototype.tag = \"loca\", e.prototype.parse = function (t) {\n var e, r;\n return t.pos = this.offset, e = this.file.head.indexToLocFormat, this.offsets = 0 === e ? function () {\n var e, n;\n for (n = [], r = 0, e = this.length; r < e; r += 2) n.push(2 * t.readUInt16());\n return n;\n }.call(this) : function () {\n var e, n;\n for (n = [], r = 0, e = this.length; r < e; r += 4) n.push(t.readUInt32());\n return n;\n }.call(this);\n }, e.prototype.indexOf = function (t) {\n return this.offsets[t];\n }, e.prototype.lengthOf = function (t) {\n return this.offsets[t + 1] - this.offsets[t];\n }, e.prototype.encode = function (t, e) {\n for (var r = new Uint32Array(this.offsets.length), n = 0, i = 0, a = 0; a < r.length; ++a) if (r[a] = n, i < e.length && e[i] == a) {\n ++i, r[a] = n;\n var o = this.offsets[a],\n s = this.offsets[a + 1] - o;\n s > 0 && (n += s);\n }\n for (var c = new Array(4 * r.length), u = 0; u < r.length; ++u) c[4 * u + 3] = 255 & r[u], c[4 * u + 2] = (65280 & r[u]) >> 8, c[4 * u + 1] = (16711680 & r[u]) >> 16, c[4 * u] = (4278190080 & r[u]) >> 24;\n return c;\n }, e;\n }(),\n Le = function () {\n function t(t) {\n this.font = t, this.subset = {}, this.unicodes = {}, this.next = 33;\n }\n return t.prototype.generateCmap = function () {\n var t, e, r, n, i;\n for (e in n = this.font.cmap.tables[0].codeMap, t = {}, i = this.subset) r = i[e], t[e] = n[r];\n return t;\n }, t.prototype.glyphsFor = function (t) {\n var e, r, n, i, a, o, s;\n for (n = {}, a = 0, o = t.length; a < o; a++) n[i = t[a]] = this.font.glyf.glyphFor(i);\n for (i in e = [], n) (null != (r = n[i]) ? r.compound : void 0) && e.push.apply(e, r.glyphIDs);\n if (e.length > 0) for (i in s = this.glyphsFor(e)) r = s[i], n[i] = r;\n return n;\n }, t.prototype.encode = function (t, e) {\n var r, n, i, a, o, s, c, u, h, l, f, d, p, g, m;\n for (n in r = ue.encode(this.generateCmap(), \"unicode\"), a = this.glyphsFor(t), f = {\n 0: 0\n }, m = r.charMap) f[(s = m[n]).old] = s[\"new\"];\n for (d in l = r.maxGlyphID, a) d in f || (f[d] = l++);\n return u = function (t) {\n var e, r;\n for (e in r = {}, t) r[t[e]] = e;\n return r;\n }(f), h = Object.keys(u).sort(function (t, e) {\n return t - e;\n }), p = function () {\n var t, e, r;\n for (r = [], t = 0, e = h.length; t < e; t++) o = h[t], r.push(u[o]);\n return r;\n }(), i = this.font.glyf.encode(a, p, f), c = this.font.loca.encode(i.offsets, p), g = {\n cmap: this.font.cmap.raw(),\n glyf: i.table,\n loca: c,\n hmtx: this.font.hmtx.raw(),\n hhea: this.font.hhea.raw(),\n maxp: this.font.maxp.raw(),\n post: this.font.post.raw(),\n name: this.font.name.raw(),\n head: this.font.head.encode(e)\n }, this.font.os2.exists && (g[\"OS/2\"] = this.font.os2.raw()), this.font.directory.encode(g);\n }, t;\n }();\nE.API.PDFObject = function () {\n var t;\n function e() {}\n return t = function t(_t6, e) {\n return (Array(e + 1).join(\"0\") + _t6).slice(-e);\n }, e.convert = function (r) {\n var n, i, a, o;\n if (Array.isArray(r)) return \"[\" + function () {\n var t, i, a;\n for (a = [], t = 0, i = r.length; t < i; t++) n = r[t], a.push(e.convert(n));\n return a;\n }().join(\" \") + \"]\";\n if (\"string\" == typeof r) return \"/\" + r;\n if (null != r ? r.isString : void 0) return \"(\" + r + \")\";\n if (r instanceof Date) return \"(D:\" + t(r.getUTCFullYear(), 4) + t(r.getUTCMonth(), 2) + t(r.getUTCDate(), 2) + t(r.getUTCHours(), 2) + t(r.getUTCMinutes(), 2) + t(r.getUTCSeconds(), 2) + \"Z)\";\n if (\"[object Object]\" === {}.toString.call(r)) {\n for (i in a = [\"<<\"], r) o = r[i], a.push(\"/\" + i + \" \" + e.convert(o));\n return a.push(\">>\"), a.join(\"\\n\");\n }\n return \"\" + r;\n }, e;\n}();\nexport default E;\nexport { St as AcroForm, At as AcroFormAppearance, mt as AcroFormButton, wt as AcroFormCheckBox, ft as AcroFormChoiceField, pt as AcroFormComboBox, gt as AcroFormEditBox, dt as AcroFormListBox, Lt as AcroFormPasswordField, vt as AcroFormPushButton, bt as AcroFormRadioButton, Nt as AcroFormTextField, j as GState, B as ShadingPattern, M as TilingPattern, E as jsPDF };","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); }\n// Source: http://jsfiddle.net/vWx8V/\n// http://stackoverflow.com/questions/5603195/full-list-of-javascript-keycodes\n\n/**\n * Conenience method returns corresponding value for given keyName or keyCode.\n *\n * @param {Mixed} keyCode {Number} or keyName {String}\n * @return {Mixed}\n * @api public\n */\n\nfunction keyCode(searchInput) {\n // Keyboard Events\n if (searchInput && 'object' === _typeof(searchInput)) {\n var hasKeyCode = searchInput.which || searchInput.keyCode || searchInput.charCode;\n if (hasKeyCode) searchInput = hasKeyCode;\n }\n\n // Numbers\n if ('number' === typeof searchInput) return names[searchInput];\n\n // Everything else (cast to string)\n var search = String(searchInput);\n\n // check codes\n var foundNamedKey = codes[search.toLowerCase()];\n if (foundNamedKey) return foundNamedKey;\n\n // check aliases\n var foundNamedKey = aliases[search.toLowerCase()];\n if (foundNamedKey) return foundNamedKey;\n\n // weird character?\n if (search.length === 1) return search.charCodeAt(0);\n return undefined;\n}\n\n/**\n * Compares a keyboard event with a given keyCode or keyName.\n *\n * @param {Event} event Keyboard event that should be tested\n * @param {Mixed} keyCode {Number} or keyName {String}\n * @return {Boolean}\n * @api public\n */\nkeyCode.isEventKey = function isEventKey(event, nameOrCode) {\n if (event && 'object' === _typeof(event)) {\n var keyCode = event.which || event.keyCode || event.charCode;\n if (keyCode === null || keyCode === undefined) {\n return false;\n }\n if (typeof nameOrCode === 'string') {\n // check codes\n var foundNamedKey = codes[nameOrCode.toLowerCase()];\n if (foundNamedKey) {\n return foundNamedKey === keyCode;\n }\n\n // check aliases\n var foundNamedKey = aliases[nameOrCode.toLowerCase()];\n if (foundNamedKey) {\n return foundNamedKey === keyCode;\n }\n } else if (typeof nameOrCode === 'number') {\n return nameOrCode === keyCode;\n }\n return false;\n }\n};\nexports = module.exports = keyCode;\n\n/**\n * Get by name\n *\n * exports.code['enter'] // => 13\n */\n\nvar codes = exports.code = exports.codes = {\n 'backspace': 8,\n 'tab': 9,\n 'enter': 13,\n 'shift': 16,\n 'ctrl': 17,\n 'alt': 18,\n 'pause/break': 19,\n 'caps lock': 20,\n 'esc': 27,\n 'space': 32,\n 'page up': 33,\n 'page down': 34,\n 'end': 35,\n 'home': 36,\n 'left': 37,\n 'up': 38,\n 'right': 39,\n 'down': 40,\n 'insert': 45,\n 'delete': 46,\n 'command': 91,\n 'left command': 91,\n 'right command': 93,\n 'numpad *': 106,\n 'numpad +': 107,\n 'numpad -': 109,\n 'numpad .': 110,\n 'numpad /': 111,\n 'num lock': 144,\n 'scroll lock': 145,\n 'my computer': 182,\n 'my calculator': 183,\n ';': 186,\n '=': 187,\n ',': 188,\n '-': 189,\n '.': 190,\n '/': 191,\n '`': 192,\n '[': 219,\n '\\\\': 220,\n ']': 221,\n \"'\": 222\n};\n\n// Helper aliases\n\nvar aliases = exports.aliases = {\n 'windows': 91,\n '⇧': 16,\n '⌥': 18,\n '⌃': 17,\n '⌘': 91,\n 'ctl': 17,\n 'control': 17,\n 'option': 18,\n 'pause': 19,\n 'break': 19,\n 'caps': 20,\n 'return': 13,\n 'escape': 27,\n 'spc': 32,\n 'spacebar': 32,\n 'pgup': 33,\n 'pgdn': 34,\n 'ins': 45,\n 'del': 46,\n 'cmd': 91\n};\n\n/*!\n * Programatically add the following\n */\n\n// lower case chars\nfor (i = 97; i < 123; i++) codes[String.fromCharCode(i)] = i - 32;\n\n// numbers\nfor (var i = 48; i < 58; i++) codes[i - 48] = i;\n\n// function keys\nfor (i = 1; i < 13; i++) codes['f' + i] = i + 111;\n\n// numpad keys\nfor (i = 0; i < 10; i++) codes['numpad ' + i] = i + 96;\n\n/**\n * Get by code\n *\n * exports.name[13] // => 'Enter'\n */\n\nvar names = exports.names = exports.title = {}; // title for backward compat\n\n// Create reverse mapping\nfor (i in codes) names[codes[i]] = i;\n\n// Add aliases\nfor (var alias in aliases) {\n codes[alias] = aliases[alias];\n}","import root from './_root.js';\n\n/** Built-in value references. */\nvar _Symbol = root.Symbol;\nexport default _Symbol;","import _Symbol from './_Symbol.js';\nimport getRawTag from './_getRawTag.js';\nimport objectToString from './_objectToString.js';\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);\n}\nexport default baseGetTag;","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); }\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = (typeof global === \"undefined\" ? \"undefined\" : _typeof(global)) == 'object' && global && global.Object === Object && global;\nexport default freeGlobal;","import overArg from './_overArg.js';\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\nexport default getPrototype;","import _Symbol from './_Symbol.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\nexport default getRawTag;","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\nexport default objectToString;","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function (arg) {\n return func(transform(arg));\n };\n}\nexport default overArg;","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); }\nimport freeGlobal from './_freeGlobal.js';\n\n/** Detect free variable `self`. */\nvar freeSelf = (typeof self === \"undefined\" ? \"undefined\" : _typeof(self)) == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\nexport default root;","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); }\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && _typeof(value) == 'object';\n}\nexport default isObjectLike;","import baseGetTag from './_baseGetTag.js';\nimport getPrototype from './_getPrototype.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;\n}\nexport default isPlainObject;","var root = require('./_root');\n\n/** Built-in value references. */\nvar _Symbol = root.Symbol;\nmodule.exports = _Symbol;","var _Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);\n}\nmodule.exports = baseGetTag;","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); }\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = (typeof global === \"undefined\" ? \"undefined\" : _typeof(global)) == 'object' && global && global.Object === Object && global;\nmodule.exports = freeGlobal;","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\nmodule.exports = getPrototype;","var _Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\nmodule.exports = getRawTag;","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\nmodule.exports = objectToString;","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function (arg) {\n return func(transform(arg));\n };\n}\nmodule.exports = overArg;","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); }\nvar freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = (typeof self === \"undefined\" ? \"undefined\" : _typeof(self)) == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\nmodule.exports = root;","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); }\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && _typeof(value) == 'object';\n}\nmodule.exports = isObjectLike;","var baseGetTag = require('./_baseGetTag'),\n getPrototype = require('./_getPrototype'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;\n}\nmodule.exports = isPlainObject;","var safeIsNaN = Number.isNaN || function ponyfill(value) {\n return typeof value === 'number' && value !== value;\n};\nfunction isEqual(first, second) {\n if (first === second) {\n return true;\n }\n if (safeIsNaN(first) && safeIsNaN(second)) {\n return true;\n }\n return false;\n}\nfunction areInputsEqual(newInputs, lastInputs) {\n if (newInputs.length !== lastInputs.length) {\n return false;\n }\n for (var i = 0; i < newInputs.length; i++) {\n if (!isEqual(newInputs[i], lastInputs[i])) {\n return false;\n }\n }\n return true;\n}\nfunction memoizeOne(resultFn, isEqual) {\n if (isEqual === void 0) {\n isEqual = areInputsEqual;\n }\n var cache = null;\n function memoized() {\n var newArgs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n newArgs[_i] = arguments[_i];\n }\n if (cache && cache.lastThis === this && isEqual(newArgs, cache.lastArgs)) {\n return cache.lastResult;\n }\n var lastResult = resultFn.apply(this, newArgs);\n cache = {\n lastResult: lastResult,\n lastArgs: newArgs,\n lastThis: this\n };\n return lastResult;\n }\n memoized.clear = function clear() {\n cache = null;\n };\n return memoized;\n}\nexport { memoizeOne as default };","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict';\n\nvar base64 = require('base64-js');\nvar ieee754 = require('ieee754');\nvar isArray = require('isarray');\nexports.Buffer = Buffer;\nexports.SlowBuffer = SlowBuffer;\nexports.INSPECT_MAX_BYTES = 50;\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined ? global.TYPED_ARRAY_SUPPORT : typedArraySupport();\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength();\nfunction typedArraySupport() {\n try {\n var arr = new Uint8Array(1);\n arr.__proto__ = {\n __proto__: Uint8Array.prototype,\n foo: function foo() {\n return 42;\n }\n };\n return arr.foo() === 42 &&\n // typed array instances can be augmented\n typeof arr.subarray === 'function' &&\n // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0; // ie10 has broken `subarray`\n } catch (e) {\n return false;\n }\n}\nfunction kMaxLength() {\n return Buffer.TYPED_ARRAY_SUPPORT ? 0x7fffffff : 0x3fffffff;\n}\nfunction createBuffer(that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length');\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length);\n that.__proto__ = Buffer.prototype;\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length);\n }\n that.length = length;\n }\n return that;\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer(arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length);\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error('If encoding is specified then the first argument must be a string');\n }\n return allocUnsafe(this, arg);\n }\n return from(this, arg, encodingOrOffset, length);\n}\nBuffer.poolSize = 8192; // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype;\n return arr;\n};\nfunction from(that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number');\n }\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length);\n }\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset);\n }\n return fromObject(that, value);\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length);\n};\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype;\n Buffer.__proto__ = Uint8Array;\n if (typeof Symbol !== 'undefined' && Symbol.species && Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n });\n }\n}\nfunction assertSize(size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number');\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative');\n }\n}\nfunction alloc(that, size, fill, encoding) {\n assertSize(size);\n if (size <= 0) {\n return createBuffer(that, size);\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string' ? createBuffer(that, size).fill(fill, encoding) : createBuffer(that, size).fill(fill);\n }\n return createBuffer(that, size);\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding);\n};\nfunction allocUnsafe(that, size) {\n assertSize(size);\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0);\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0;\n }\n }\n return that;\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size);\n};\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size);\n};\nfunction fromString(that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8';\n }\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding');\n }\n var length = byteLength(string, encoding) | 0;\n that = createBuffer(that, length);\n var actual = that.write(string, encoding);\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual);\n }\n return that;\n}\nfunction fromArrayLike(that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0;\n that = createBuffer(that, length);\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255;\n }\n return that;\n}\nfunction fromArrayBuffer(that, array, byteOffset, length) {\n array.byteLength; // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds');\n }\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds');\n }\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array);\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset);\n } else {\n array = new Uint8Array(array, byteOffset, length);\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array;\n that.__proto__ = Buffer.prototype;\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array);\n }\n return that;\n}\nfunction fromObject(that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0;\n that = createBuffer(that, len);\n if (that.length === 0) {\n return that;\n }\n obj.copy(that, 0, 0, len);\n return that;\n }\n if (obj) {\n if (typeof ArrayBuffer !== 'undefined' && obj.buffer instanceof ArrayBuffer || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0);\n }\n return fromArrayLike(that, obj);\n }\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data);\n }\n }\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.');\n}\nfunction checked(length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' + 'size: 0x' + kMaxLength().toString(16) + ' bytes');\n }\n return length | 0;\n}\nfunction SlowBuffer(length) {\n if (+length != length) {\n // eslint-disable-line eqeqeq\n length = 0;\n }\n return Buffer.alloc(+length);\n}\nBuffer.isBuffer = function isBuffer(b) {\n return !!(b != null && b._isBuffer);\n};\nBuffer.compare = function compare(a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers');\n }\n if (a === b) return 0;\n var x = a.length;\n var y = b.length;\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n if (x < y) return -1;\n if (y < x) return 1;\n return 0;\n};\nBuffer.isEncoding = function isEncoding(encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true;\n default:\n return false;\n }\n};\nBuffer.concat = function concat(list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers');\n }\n if (list.length === 0) {\n return Buffer.alloc(0);\n }\n var i;\n if (length === undefined) {\n length = 0;\n for (i = 0; i < list.length; ++i) {\n length += list[i].length;\n }\n }\n var buffer = Buffer.allocUnsafe(length);\n var pos = 0;\n for (i = 0; i < list.length; ++i) {\n var buf = list[i];\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers');\n }\n buf.copy(buffer, pos);\n pos += buf.length;\n }\n return buffer;\n};\nfunction byteLength(string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length;\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength;\n }\n if (typeof string !== 'string') {\n string = '' + string;\n }\n var len = string.length;\n if (len === 0) return 0;\n\n // Use a for loop to avoid recursion\n var loweredCase = false;\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len;\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length;\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2;\n case 'hex':\n return len >>> 1;\n case 'base64':\n return base64ToBytes(string).length;\n default:\n if (loweredCase) return utf8ToBytes(string).length; // assume utf8\n encoding = ('' + encoding).toLowerCase();\n loweredCase = true;\n }\n }\n}\nBuffer.byteLength = byteLength;\nfunction slowToString(encoding, start, end) {\n var loweredCase = false;\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0;\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return '';\n }\n if (end === undefined || end > this.length) {\n end = this.length;\n }\n if (end <= 0) {\n return '';\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0;\n start >>>= 0;\n if (end <= start) {\n return '';\n }\n if (!encoding) encoding = 'utf8';\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end);\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end);\n case 'ascii':\n return asciiSlice(this, start, end);\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end);\n case 'base64':\n return base64Slice(this, start, end);\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end);\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);\n encoding = (encoding + '').toLowerCase();\n loweredCase = true;\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true;\nfunction swap(b, n, m) {\n var i = b[n];\n b[n] = b[m];\n b[m] = i;\n}\nBuffer.prototype.swap16 = function swap16() {\n var len = this.length;\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits');\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1);\n }\n return this;\n};\nBuffer.prototype.swap32 = function swap32() {\n var len = this.length;\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits');\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3);\n swap(this, i + 1, i + 2);\n }\n return this;\n};\nBuffer.prototype.swap64 = function swap64() {\n var len = this.length;\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits');\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7);\n swap(this, i + 1, i + 6);\n swap(this, i + 2, i + 5);\n swap(this, i + 3, i + 4);\n }\n return this;\n};\nBuffer.prototype.toString = function toString() {\n var length = this.length | 0;\n if (length === 0) return '';\n if (arguments.length === 0) return utf8Slice(this, 0, length);\n return slowToString.apply(this, arguments);\n};\nBuffer.prototype.equals = function equals(b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer');\n if (this === b) return true;\n return Buffer.compare(this, b) === 0;\n};\nBuffer.prototype.inspect = function inspect() {\n var str = '';\n var max = exports.INSPECT_MAX_BYTES;\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ');\n if (this.length > max) str += ' ... ';\n }\n return '';\n};\nBuffer.prototype.compare = function compare(target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer');\n }\n if (start === undefined) {\n start = 0;\n }\n if (end === undefined) {\n end = target ? target.length : 0;\n }\n if (thisStart === undefined) {\n thisStart = 0;\n }\n if (thisEnd === undefined) {\n thisEnd = this.length;\n }\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index');\n }\n if (thisStart >= thisEnd && start >= end) {\n return 0;\n }\n if (thisStart >= thisEnd) {\n return -1;\n }\n if (start >= end) {\n return 1;\n }\n start >>>= 0;\n end >>>= 0;\n thisStart >>>= 0;\n thisEnd >>>= 0;\n if (this === target) return 0;\n var x = thisEnd - thisStart;\n var y = end - start;\n var len = Math.min(x, y);\n var thisCopy = this.slice(thisStart, thisEnd);\n var targetCopy = target.slice(start, end);\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i];\n y = targetCopy[i];\n break;\n }\n }\n if (x < y) return -1;\n if (y < x) return 1;\n return 0;\n};\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1;\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset;\n byteOffset = 0;\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff;\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000;\n }\n byteOffset = +byteOffset; // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : buffer.length - 1;\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset;\n if (byteOffset >= buffer.length) {\n if (dir) return -1;else byteOffset = buffer.length - 1;\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0;else return -1;\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding);\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1;\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir);\n } else if (typeof val === 'number') {\n val = val & 0xFF; // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT && typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir);\n }\n throw new TypeError('val must be string, number or Buffer');\n}\nfunction arrayIndexOf(arr, val, byteOffset, encoding, dir) {\n var indexSize = 1;\n var arrLength = arr.length;\n var valLength = val.length;\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase();\n if (encoding === 'ucs2' || encoding === 'ucs-2' || encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1;\n }\n indexSize = 2;\n arrLength /= 2;\n valLength /= 2;\n byteOffset /= 2;\n }\n }\n function read(buf, i) {\n if (indexSize === 1) {\n return buf[i];\n } else {\n return buf.readUInt16BE(i * indexSize);\n }\n }\n var i;\n if (dir) {\n var foundIndex = -1;\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i;\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize;\n } else {\n if (foundIndex !== -1) i -= i - foundIndex;\n foundIndex = -1;\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;\n for (i = byteOffset; i >= 0; i--) {\n var found = true;\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false;\n break;\n }\n }\n if (found) return i;\n }\n }\n return -1;\n}\nBuffer.prototype.includes = function includes(val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1;\n};\nBuffer.prototype.indexOf = function indexOf(val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true);\n};\nBuffer.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false);\n};\nfunction hexWrite(buf, string, offset, length) {\n offset = Number(offset) || 0;\n var remaining = buf.length - offset;\n if (!length) {\n length = remaining;\n } else {\n length = Number(length);\n if (length > remaining) {\n length = remaining;\n }\n }\n\n // must be an even number of digits\n var strLen = string.length;\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string');\n if (length > strLen / 2) {\n length = strLen / 2;\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16);\n if (isNaN(parsed)) return i;\n buf[offset + i] = parsed;\n }\n return i;\n}\nfunction utf8Write(buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length);\n}\nfunction asciiWrite(buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length);\n}\nfunction latin1Write(buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length);\n}\nfunction base64Write(buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length);\n}\nfunction ucs2Write(buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length);\n}\nBuffer.prototype.write = function write(string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8';\n length = this.length;\n offset = 0;\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset;\n length = this.length;\n offset = 0;\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0;\n if (isFinite(length)) {\n length = length | 0;\n if (encoding === undefined) encoding = 'utf8';\n } else {\n encoding = length;\n length = undefined;\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported');\n }\n var remaining = this.length - offset;\n if (length === undefined || length > remaining) length = remaining;\n if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds');\n }\n if (!encoding) encoding = 'utf8';\n var loweredCase = false;\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length);\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length);\n case 'ascii':\n return asciiWrite(this, string, offset, length);\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length);\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length);\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length);\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);\n encoding = ('' + encoding).toLowerCase();\n loweredCase = true;\n }\n }\n};\nBuffer.prototype.toJSON = function toJSON() {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n };\n};\nfunction base64Slice(buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf);\n } else {\n return base64.fromByteArray(buf.slice(start, end));\n }\n}\nfunction utf8Slice(buf, start, end) {\n end = Math.min(buf.length, end);\n var res = [];\n var i = start;\n while (i < end) {\n var firstByte = buf[i];\n var codePoint = null;\n var bytesPerSequence = firstByte > 0xEF ? 4 : firstByte > 0xDF ? 3 : firstByte > 0xBF ? 2 : 1;\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint;\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte;\n }\n break;\n case 2:\n secondByte = buf[i + 1];\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | secondByte & 0x3F;\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint;\n }\n }\n break;\n case 3:\n secondByte = buf[i + 1];\n thirdByte = buf[i + 2];\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | thirdByte & 0x3F;\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint;\n }\n }\n break;\n case 4:\n secondByte = buf[i + 1];\n thirdByte = buf[i + 2];\n fourthByte = buf[i + 3];\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | fourthByte & 0x3F;\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint;\n }\n }\n }\n }\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD;\n bytesPerSequence = 1;\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000;\n res.push(codePoint >>> 10 & 0x3FF | 0xD800);\n codePoint = 0xDC00 | codePoint & 0x3FF;\n }\n res.push(codePoint);\n i += bytesPerSequence;\n }\n return decodeCodePointsArray(res);\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000;\nfunction decodeCodePointsArray(codePoints) {\n var len = codePoints.length;\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints); // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = '';\n var i = 0;\n while (i < len) {\n res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH));\n }\n return res;\n}\nfunction asciiSlice(buf, start, end) {\n var ret = '';\n end = Math.min(buf.length, end);\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F);\n }\n return ret;\n}\nfunction latin1Slice(buf, start, end) {\n var ret = '';\n end = Math.min(buf.length, end);\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i]);\n }\n return ret;\n}\nfunction hexSlice(buf, start, end) {\n var len = buf.length;\n if (!start || start < 0) start = 0;\n if (!end || end < 0 || end > len) end = len;\n var out = '';\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i]);\n }\n return out;\n}\nfunction utf16leSlice(buf, start, end) {\n var bytes = buf.slice(start, end);\n var res = '';\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);\n }\n return res;\n}\nBuffer.prototype.slice = function slice(start, end) {\n var len = this.length;\n start = ~~start;\n end = end === undefined ? len : ~~end;\n if (start < 0) {\n start += len;\n if (start < 0) start = 0;\n } else if (start > len) {\n start = len;\n }\n if (end < 0) {\n end += len;\n if (end < 0) end = 0;\n } else if (end > len) {\n end = len;\n }\n if (end < start) end = start;\n var newBuf;\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end);\n newBuf.__proto__ = Buffer.prototype;\n } else {\n var sliceLen = end - start;\n newBuf = new Buffer(sliceLen, undefined);\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start];\n }\n }\n return newBuf;\n};\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset(offset, ext, length) {\n if (offset % 1 !== 0 || offset < 0) throw new RangeError('offset is not uint');\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length');\n}\nBuffer.prototype.readUIntLE = function readUIntLE(offset, byteLength, noAssert) {\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) checkOffset(offset, byteLength, this.length);\n var val = this[offset];\n var mul = 1;\n var i = 0;\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul;\n }\n return val;\n};\nBuffer.prototype.readUIntBE = function readUIntBE(offset, byteLength, noAssert) {\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length);\n }\n var val = this[offset + --byteLength];\n var mul = 1;\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul;\n }\n return val;\n};\nBuffer.prototype.readUInt8 = function readUInt8(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length);\n return this[offset];\n};\nBuffer.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length);\n return this[offset] | this[offset + 1] << 8;\n};\nBuffer.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length);\n return this[offset] << 8 | this[offset + 1];\n};\nBuffer.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 0x1000000;\n};\nBuffer.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n return this[offset] * 0x1000000 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);\n};\nBuffer.prototype.readIntLE = function readIntLE(offset, byteLength, noAssert) {\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) checkOffset(offset, byteLength, this.length);\n var val = this[offset];\n var mul = 1;\n var i = 0;\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul;\n }\n mul *= 0x80;\n if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n return val;\n};\nBuffer.prototype.readIntBE = function readIntBE(offset, byteLength, noAssert) {\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) checkOffset(offset, byteLength, this.length);\n var i = byteLength;\n var mul = 1;\n var val = this[offset + --i];\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul;\n }\n mul *= 0x80;\n if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n return val;\n};\nBuffer.prototype.readInt8 = function readInt8(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length);\n if (!(this[offset] & 0x80)) return this[offset];\n return (0xff - this[offset] + 1) * -1;\n};\nBuffer.prototype.readInt16LE = function readInt16LE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length);\n var val = this[offset] | this[offset + 1] << 8;\n return val & 0x8000 ? val | 0xFFFF0000 : val;\n};\nBuffer.prototype.readInt16BE = function readInt16BE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length);\n var val = this[offset + 1] | this[offset] << 8;\n return val & 0x8000 ? val | 0xFFFF0000 : val;\n};\nBuffer.prototype.readInt32LE = function readInt32LE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;\n};\nBuffer.prototype.readInt32BE = function readInt32BE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];\n};\nBuffer.prototype.readFloatLE = function readFloatLE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n return ieee754.read(this, offset, true, 23, 4);\n};\nBuffer.prototype.readFloatBE = function readFloatBE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n return ieee754.read(this, offset, false, 23, 4);\n};\nBuffer.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length);\n return ieee754.read(this, offset, true, 52, 8);\n};\nBuffer.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length);\n return ieee754.read(this, offset, false, 52, 8);\n};\nfunction checkInt(buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance');\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds');\n if (offset + ext > buf.length) throw new RangeError('Index out of range');\n}\nBuffer.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1;\n checkInt(this, value, offset, byteLength, maxBytes, 0);\n }\n var mul = 1;\n var i = 0;\n this[offset] = value & 0xFF;\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = value / mul & 0xFF;\n }\n return offset + byteLength;\n};\nBuffer.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1;\n checkInt(this, value, offset, byteLength, maxBytes, 0);\n }\n var i = byteLength - 1;\n var mul = 1;\n this[offset + i] = value & 0xFF;\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = value / mul & 0xFF;\n }\n return offset + byteLength;\n};\nBuffer.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0);\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value);\n this[offset] = value & 0xff;\n return offset + 1;\n};\nfunction objectWriteUInt16(buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1;\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & 0xff << 8 * (littleEndian ? i : 1 - i)) >>> (littleEndian ? i : 1 - i) * 8;\n }\n}\nBuffer.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value & 0xff;\n this[offset + 1] = value >>> 8;\n } else {\n objectWriteUInt16(this, value, offset, true);\n }\n return offset + 2;\n};\nBuffer.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value >>> 8;\n this[offset + 1] = value & 0xff;\n } else {\n objectWriteUInt16(this, value, offset, false);\n }\n return offset + 2;\n};\nfunction objectWriteUInt32(buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1;\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = value >>> (littleEndian ? i : 3 - i) * 8 & 0xff;\n }\n}\nBuffer.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = value >>> 24;\n this[offset + 2] = value >>> 16;\n this[offset + 1] = value >>> 8;\n this[offset] = value & 0xff;\n } else {\n objectWriteUInt32(this, value, offset, true);\n }\n return offset + 4;\n};\nBuffer.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value >>> 24;\n this[offset + 1] = value >>> 16;\n this[offset + 2] = value >>> 8;\n this[offset + 3] = value & 0xff;\n } else {\n objectWriteUInt32(this, value, offset, false);\n }\n return offset + 4;\n};\nBuffer.prototype.writeIntLE = function writeIntLE(value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1);\n checkInt(this, value, offset, byteLength, limit - 1, -limit);\n }\n var i = 0;\n var mul = 1;\n var sub = 0;\n this[offset] = value & 0xFF;\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1;\n }\n this[offset + i] = (value / mul >> 0) - sub & 0xFF;\n }\n return offset + byteLength;\n};\nBuffer.prototype.writeIntBE = function writeIntBE(value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1);\n checkInt(this, value, offset, byteLength, limit - 1, -limit);\n }\n var i = byteLength - 1;\n var mul = 1;\n var sub = 0;\n this[offset + i] = value & 0xFF;\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1;\n }\n this[offset + i] = (value / mul >> 0) - sub & 0xFF;\n }\n return offset + byteLength;\n};\nBuffer.prototype.writeInt8 = function writeInt8(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80);\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value);\n if (value < 0) value = 0xff + value + 1;\n this[offset] = value & 0xff;\n return offset + 1;\n};\nBuffer.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value & 0xff;\n this[offset + 1] = value >>> 8;\n } else {\n objectWriteUInt16(this, value, offset, true);\n }\n return offset + 2;\n};\nBuffer.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value >>> 8;\n this[offset + 1] = value & 0xff;\n } else {\n objectWriteUInt16(this, value, offset, false);\n }\n return offset + 2;\n};\nBuffer.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value & 0xff;\n this[offset + 1] = value >>> 8;\n this[offset + 2] = value >>> 16;\n this[offset + 3] = value >>> 24;\n } else {\n objectWriteUInt32(this, value, offset, true);\n }\n return offset + 4;\n};\nBuffer.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);\n if (value < 0) value = 0xffffffff + value + 1;\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value >>> 24;\n this[offset + 1] = value >>> 16;\n this[offset + 2] = value >>> 8;\n this[offset + 3] = value & 0xff;\n } else {\n objectWriteUInt32(this, value, offset, false);\n }\n return offset + 4;\n};\nfunction checkIEEE754(buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range');\n if (offset < 0) throw new RangeError('Index out of range');\n}\nfunction writeFloat(buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38);\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4);\n return offset + 4;\n}\nBuffer.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert);\n};\nBuffer.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert);\n};\nfunction writeDouble(buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308);\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8);\n return offset + 8;\n}\nBuffer.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert);\n};\nBuffer.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert);\n};\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy(target, targetStart, start, end) {\n if (!start) start = 0;\n if (!end && end !== 0) end = this.length;\n if (targetStart >= target.length) targetStart = target.length;\n if (!targetStart) targetStart = 0;\n if (end > 0 && end < start) end = start;\n\n // Copy 0 bytes; we're done\n if (end === start) return 0;\n if (target.length === 0 || this.length === 0) return 0;\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds');\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds');\n if (end < 0) throw new RangeError('sourceEnd out of bounds');\n\n // Are we oob?\n if (end > this.length) end = this.length;\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start;\n }\n var len = end - start;\n var i;\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start];\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start];\n }\n } else {\n Uint8Array.prototype.set.call(target, this.subarray(start, start + len), targetStart);\n }\n return len;\n};\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill(val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start;\n start = 0;\n end = this.length;\n } else if (typeof end === 'string') {\n encoding = end;\n end = this.length;\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0);\n if (code < 256) {\n val = code;\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string');\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding);\n }\n } else if (typeof val === 'number') {\n val = val & 255;\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index');\n }\n if (end <= start) {\n return this;\n }\n start = start >>> 0;\n end = end === undefined ? this.length : end >>> 0;\n if (!val) val = 0;\n var i;\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val;\n }\n } else {\n var bytes = Buffer.isBuffer(val) ? val : utf8ToBytes(new Buffer(val, encoding).toString());\n var len = bytes.length;\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len];\n }\n }\n return this;\n};\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g;\nfunction base64clean(str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '');\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return '';\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '=';\n }\n return str;\n}\nfunction stringtrim(str) {\n if (str.trim) return str.trim();\n return str.replace(/^\\s+|\\s+$/g, '');\n}\nfunction toHex(n) {\n if (n < 16) return '0' + n.toString(16);\n return n.toString(16);\n}\nfunction utf8ToBytes(string, units) {\n units = units || Infinity;\n var codePoint;\n var length = string.length;\n var leadSurrogate = null;\n var bytes = [];\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i);\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n continue;\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n continue;\n }\n\n // valid lead\n leadSurrogate = codePoint;\n continue;\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n leadSurrogate = codePoint;\n continue;\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000;\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n }\n leadSurrogate = null;\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break;\n bytes.push(codePoint);\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break;\n bytes.push(codePoint >> 0x6 | 0xC0, codePoint & 0x3F | 0x80);\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break;\n bytes.push(codePoint >> 0xC | 0xE0, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break;\n bytes.push(codePoint >> 0x12 | 0xF0, codePoint >> 0xC & 0x3F | 0x80, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);\n } else {\n throw new Error('Invalid code point');\n }\n }\n return bytes;\n}\nfunction asciiToBytes(str) {\n var byteArray = [];\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF);\n }\n return byteArray;\n}\nfunction utf16leToBytes(str, units) {\n var c, hi, lo;\n var byteArray = [];\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break;\n c = str.charCodeAt(i);\n hi = c >> 8;\n lo = c % 256;\n byteArray.push(lo);\n byteArray.push(hi);\n }\n return byteArray;\n}\nfunction base64ToBytes(str) {\n return base64.toByteArray(base64clean(str));\n}\nfunction blitBuffer(src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if (i + offset >= dst.length || i >= src.length) break;\n dst[i + offset] = src[i];\n }\n return i;\n}\nfunction isnan(val) {\n return val !== val; // eslint-disable-line no-self-compare\n}","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\nfunction toObject(val) {\n if (val === null || val === undefined) {\n throw new TypeError('Object.assign cannot be called with null or undefined');\n }\n return Object(val);\n}\nfunction shouldUseNative() {\n try {\n if (!Object.assign) {\n return false;\n }\n\n // Detect buggy property enumeration order in older V8 versions.\n\n // https://bugs.chromium.org/p/v8/issues/detail?id=4118\n var test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n test1[5] = 'de';\n if (Object.getOwnPropertyNames(test1)[0] === '5') {\n return false;\n }\n\n // https://bugs.chromium.org/p/v8/issues/detail?id=3056\n var test2 = {};\n for (var i = 0; i < 10; i++) {\n test2['_' + String.fromCharCode(i)] = i;\n }\n var order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n return test2[n];\n });\n if (order2.join('') !== '0123456789') {\n return false;\n }\n\n // https://bugs.chromium.org/p/v8/issues/detail?id=3056\n var test3 = {};\n 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n test3[letter] = letter;\n });\n if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') {\n return false;\n }\n return true;\n } catch (err) {\n // We don't expect any of the above to throw, but better to be safe.\n return false;\n }\n}\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n var from;\n var to = toObject(target);\n var symbols;\n for (var s = 1; s < arguments.length; s++) {\n from = Object(arguments[s]);\n for (var key in from) {\n if (hasOwnProperty.call(from, key)) {\n to[key] = from[key];\n }\n }\n if (getOwnPropertySymbols) {\n symbols = getOwnPropertySymbols(from);\n for (var i = 0; i < symbols.length; i++) {\n if (propIsEnumerable.call(from, symbols[i])) {\n to[symbols[i]] = from[symbols[i]];\n }\n }\n }\n }\n return to;\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = all;\nvar _createChainableTypeChecker = require('./utils/createChainableTypeChecker');\nvar _createChainableTypeChecker2 = _interopRequireDefault(_createChainableTypeChecker);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\nfunction all() {\n for (var _len = arguments.length, validators = Array(_len), _key = 0; _key < _len; _key++) {\n validators[_key] = arguments[_key];\n }\n function allPropTypes() {\n for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n var error = null;\n validators.forEach(function (validator) {\n if (error != null) {\n return;\n }\n var result = validator.apply(undefined, args);\n if (result != null) {\n error = result;\n }\n });\n return error;\n }\n return (0, _createChainableTypeChecker2[\"default\"])(allPropTypes);\n}\nmodule.exports = exports['default'];","'use strict';\n\nfunction _typeof2(o) { \"@babel/helpers - typeof\"; return _typeof2 = \"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; }, _typeof2(o); }\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar _typeof = typeof Symbol === \"function\" && _typeof2(Symbol.iterator) === \"symbol\" ? function (obj) {\n return _typeof2(obj);\n} : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : _typeof2(obj);\n};\nvar _react = require('react');\nvar _react2 = _interopRequireDefault(_react);\nvar _createChainableTypeChecker = require('./utils/createChainableTypeChecker');\nvar _createChainableTypeChecker2 = _interopRequireDefault(_createChainableTypeChecker);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\nfunction validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = typeof propValue === 'undefined' ? 'undefined' : _typeof(propValue);\n if (_react2[\"default\"].isValidElement(propValue)) {\n return new Error('Invalid ' + location + ' `' + propFullName + '` of type ReactElement ' + ('supplied to `' + componentName + '`, expected a ReactComponent or a ') + 'DOMElement. You can usually obtain a ReactComponent or DOMElement ' + 'from a ReactElement by attaching a ref to it.');\n }\n if ((propType !== 'object' || typeof propValue.render !== 'function') && propValue.nodeType !== 1) {\n return new Error('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected a ReactComponent or a ') + 'DOMElement.');\n }\n return null;\n}\nexports[\"default\"] = (0, _createChainableTypeChecker2[\"default\"])(validate);\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = deprecated;\nvar _warning = require('warning');\nvar _warning2 = _interopRequireDefault(_warning);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\nvar warned = {};\nfunction deprecated(validator, reason) {\n return function validate(props, propName, componentName, location, propFullName) {\n var componentNameSafe = componentName || '<>';\n var propFullNameSafe = propFullName || propName;\n if (props[propName] != null) {\n var messageKey = componentName + '.' + propName;\n (0, _warning2[\"default\"])(warned[messageKey], 'The ' + location + ' `' + propFullNameSafe + '` of ' + ('`' + componentNameSafe + '` is deprecated. ' + reason + '.'));\n warned[messageKey] = true;\n }\n for (var _len = arguments.length, args = Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) {\n args[_key - 5] = arguments[_key];\n }\n return validator.apply(undefined, [props, propName, componentName, location, propFullName].concat(args));\n };\n}\n\n/* eslint-disable no-underscore-dangle */\nfunction _resetWarned() {\n warned = {};\n}\ndeprecated._resetWarned = _resetWarned;\n/* eslint-enable no-underscore-dangle */\n\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar _react = require('react');\nvar _react2 = _interopRequireDefault(_react);\nvar _reactIs = require('react-is');\nvar _createChainableTypeChecker = require('./utils/createChainableTypeChecker');\nvar _createChainableTypeChecker2 = _interopRequireDefault(_createChainableTypeChecker);\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\nfunction elementType(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (_react2[\"default\"].isValidElement(propValue)) {\n return new Error('Invalid ' + location + ' `' + propFullName + '` of type ReactElement ' + ('supplied to `' + componentName + '`,expected an element type (a string ') + ', component class, or function component).');\n }\n if (!(0, _reactIs.isValidElementType)(propValue)) {\n return new Error('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected an element type (a string ') + ', component class, or function component).');\n }\n return null;\n}\nexports[\"default\"] = (0, _createChainableTypeChecker2[\"default\"])(elementType);\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = isRequiredForA11y;\nfunction isRequiredForA11y(validator) {\n return function validate(props, propName, componentName, location, propFullName) {\n var componentNameSafe = componentName || '<>';\n var propFullNameSafe = propFullName || propName;\n if (props[propName] == null) {\n return new Error('The ' + location + ' `' + propFullNameSafe + '` is required to make ' + ('`' + componentNameSafe + '` accessible for users of assistive ') + 'technologies such as screen readers.');\n }\n for (var _len = arguments.length, args = Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) {\n args[_key - 5] = arguments[_key];\n }\n return validator.apply(undefined, [props, propName, componentName, location, propFullName].concat(args));\n };\n}\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = createChainableTypeChecker;\n/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n// Mostly taken from ReactPropTypes.\n\nfunction createChainableTypeChecker(validate) {\n function checkType(isRequired, props, propName, componentName, location, propFullName) {\n var componentNameSafe = componentName || '<>';\n var propFullNameSafe = propFullName || propName;\n if (props[propName] == null) {\n if (isRequired) {\n return new Error('Required ' + location + ' `' + propFullNameSafe + '` was not specified ' + ('in `' + componentNameSafe + '`.'));\n }\n return null;\n }\n for (var _len = arguments.length, args = Array(_len > 6 ? _len - 6 : 0), _key = 6; _key < _len; _key++) {\n args[_key - 6] = arguments[_key];\n }\n return validate.apply(undefined, [props, propName, componentNameSafe, location, propFullNameSafe].concat(args));\n }\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n return chainedCheckType;\n}\nmodule.exports = exports['default'];","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\nvar __DEV__ = process.env.NODE_ENV !== 'production';\nvar warning = function warning() {};\nif (__DEV__) {\n var printWarning = function printWarning(format, args) {\n var len = arguments.length;\n args = new Array(len > 1 ? len - 1 : 0);\n for (var key = 1; key < len; key++) {\n args[key - 1] = arguments[key];\n }\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n warning = function warning(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n if (format === undefined) {\n throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n if (!condition) {\n printWarning.apply(null, [format].concat(args));\n }\n };\n}\nmodule.exports = warning;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nfunction _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); }\nvar printWarning = function printWarning() {};\nif (process.env.NODE_ENV !== 'production') {\n var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n var loggedTypeFailures = {};\n var has = require('./lib/has');\n printWarning = function printWarning(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {/**/}\n };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + _typeof(typeSpecs[typeSpecName]) + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n if (error && !(error instanceof Error)) {\n printWarning((componentName || 'React class') + ': type specification of ' + location + ' `' + typeSpecName + '` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a ' + _typeof(error) + '. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).');\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n var stack = getStack ? getStack() : '';\n printWarning('Failed ' + location + ' type: ' + error.message + (stack != null ? stack : ''));\n }\n }\n }\n }\n}\n\n/**\n * Resets warning cache when testing.\n *\n * @private\n */\ncheckPropTypes.resetWarningCache = function () {\n if (process.env.NODE_ENV !== 'production') {\n loggedTypeFailures = {};\n }\n};\nmodule.exports = checkPropTypes;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nfunction _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); }\nvar ReactIs = require('react-is');\nvar assign = require('object-assign');\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar has = require('./lib/has');\nvar checkPropTypes = require('./checkPropTypes');\nvar printWarning = function printWarning() {};\nif (process.env.NODE_ENV !== 'production') {\n printWarning = function printWarning(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\nfunction emptyFunctionThatReturnsNull() {\n return null;\n}\nmodule.exports = function (isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bigint: createPrimitiveTypeChecker('bigint'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n elementType: createElementTypeTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message, data) {\n this.message = message;\n this.data = data && _typeof(data) === 'object' ? data : {};\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n function createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use `PropTypes.checkPropTypes()` to call them. ' + 'Read more at http://fb.me/use-check-prop-types');\n err.name = 'Invariant Violation';\n throw err;\n } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (!manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3) {\n printWarning('You are manually calling a React.PropTypes validation ' + 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' + 'and will throw in the standalone `prop-types` package. ' + 'You may be seeing this warning due to a third-party PropTypes ' + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.');\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n return chainedCheckType;\n }\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'), {\n expectedType: expectedType\n });\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n }\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n function createElementTypeTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!ReactIs.isValidElementType(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n if (process.env.NODE_ENV !== 'production') {\n if (arguments.length > 1) {\n printWarning('Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' + 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).');\n } else {\n printWarning('Invalid argument supplied to oneOf, expected an array.');\n }\n }\n return emptyFunctionThatReturnsNull;\n }\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n var type = getPreciseType(value);\n if (type === 'symbol') {\n return String(value);\n }\n return value;\n });\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (has(propValue, key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunctionThatReturnsNull;\n }\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n printWarning('Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.');\n return emptyFunctionThatReturnsNull;\n }\n }\n function validate(props, propName, componentName, location, propFullName) {\n var expectedTypes = [];\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);\n if (checkerResult == null) {\n return null;\n }\n if (checkerResult.data && has(checkerResult.data, 'expectedType')) {\n expectedTypes.push(checkerResult.data.expectedType);\n }\n }\n var expectedTypesMessage = expectedTypes.length > 0 ? ', expected one of type [' + expectedTypes.join(', ') + ']' : '';\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n function invalidValidatorError(componentName, location, propFullName, key, type) {\n return new PropTypeError((componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.');\n }\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (has(shapeTypes, key) && typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n if (!checker) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' + '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') + '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' '));\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n function isNode(propValue) {\n switch (_typeof(propValue)) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n return true;\n default:\n return false;\n }\n }\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // falsy value can't be a Symbol\n if (!propValue) {\n return false;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = _typeof(propValue);\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\n ReactPropTypes.PropTypes = ReactPropTypes;\n return ReactPropTypes;\n};","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\nmodule.exports = ReactPropTypesSecret;","module.exports = Function.call.bind(Object.prototype.hasOwnProperty);","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport React from 'react';\nimport PanelGroup from './PanelGroup';\nvar Accordion = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Accordion, _React$Component);\n function Accordion() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = Accordion.prototype;\n _proto.render = function render() {\n return /*#__PURE__*/React.createElement(PanelGroup, _extends({}, this.props, {\n accordion: true\n }), this.props.children);\n };\n return Accordion;\n}(React.Component);\nexport default Accordion;","import _Object$values from \"@babel/runtime-corejs2/core-js/object/values\";\nimport _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { bsClass, bsStyles, getClassSet, prefix, splitBsProps } from './utils/bootstrapUtils';\nimport { State } from './utils/StyleConfig';\nimport CloseButton from './CloseButton';\nvar propTypes = {\n onDismiss: PropTypes.func,\n closeLabel: PropTypes.string\n};\nvar defaultProps = {\n closeLabel: 'Close alert'\n};\nvar Alert = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Alert, _React$Component);\n function Alert() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = Alert.prototype;\n _proto.render = function render() {\n var _extends2;\n var _this$props = this.props,\n onDismiss = _this$props.onDismiss,\n closeLabel = _this$props.closeLabel,\n className = _this$props.className,\n children = _this$props.children,\n props = _objectWithoutPropertiesLoose(_this$props, [\"onDismiss\", \"closeLabel\", \"className\", \"children\"]);\n var _splitBsProps = splitBsProps(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n var dismissable = !!onDismiss;\n var classes = _extends({}, getClassSet(bsProps), (_extends2 = {}, _extends2[prefix(bsProps, 'dismissable')] = dismissable, _extends2));\n return /*#__PURE__*/React.createElement(\"div\", _extends({}, elementProps, {\n role: \"alert\",\n className: classNames(className, classes)\n }), dismissable && /*#__PURE__*/React.createElement(CloseButton, {\n onClick: onDismiss,\n label: closeLabel\n }), children);\n };\n return Alert;\n}(React.Component);\nAlert.propTypes = propTypes;\nAlert.defaultProps = defaultProps;\nexport default bsStyles(_Object$values(State), State.INFO, bsClass('alert', Alert));","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils'; // TODO: `pullRight` doesn't belong here. There's no special handling here.\n\nvar propTypes = {\n pullRight: PropTypes.bool\n};\nvar defaultProps = {\n pullRight: false\n};\nvar Badge = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Badge, _React$Component);\n function Badge() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = Badge.prototype;\n _proto.hasContent = function hasContent(children) {\n var result = false;\n React.Children.forEach(children, function (child) {\n if (result) {\n return;\n }\n if (child || child === 0) {\n result = true;\n }\n });\n return result;\n };\n _proto.render = function render() {\n var _this$props = this.props,\n pullRight = _this$props.pullRight,\n className = _this$props.className,\n children = _this$props.children,\n props = _objectWithoutPropertiesLoose(_this$props, [\"pullRight\", \"className\", \"children\"]);\n var _splitBsProps = splitBsProps(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n var classes = _extends({}, getClassSet(bsProps), {\n 'pull-right': pullRight,\n // Hack for collapsing on IE8.\n hidden: !this.hasContent(children)\n });\n return /*#__PURE__*/React.createElement(\"span\", _extends({}, elementProps, {\n className: classNames(className, classes)\n }), children);\n };\n return Badge;\n}(React.Component);\nBadge.propTypes = propTypes;\nBadge.defaultProps = defaultProps;\nexport default bsClass('badge', Badge);","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport BreadcrumbItem from './BreadcrumbItem';\nimport { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';\nvar Breadcrumb = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Breadcrumb, _React$Component);\n function Breadcrumb() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = Breadcrumb.prototype;\n _proto.render = function render() {\n var _this$props = this.props,\n className = _this$props.className,\n props = _objectWithoutPropertiesLoose(_this$props, [\"className\"]);\n var _splitBsProps = splitBsProps(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n var classes = getClassSet(bsProps);\n return /*#__PURE__*/React.createElement(\"ol\", _extends({}, elementProps, {\n role: \"navigation\",\n \"aria-label\": \"breadcrumbs\",\n className: classNames(className, classes)\n }));\n };\n return Breadcrumb;\n}(React.Component);\nBreadcrumb.Item = BreadcrumbItem;\nexport default bsClass('breadcrumb', Breadcrumb);","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport SafeAnchor from './SafeAnchor';\nvar propTypes = {\n /**\n * If set to true, renders `span` instead of `a`\n */\n active: PropTypes.bool,\n /**\n * `href` attribute for the inner `a` element\n */\n href: PropTypes.string,\n /**\n * `title` attribute for the inner `a` element\n */\n title: PropTypes.node,\n /**\n * `target` attribute for the inner `a` element\n */\n target: PropTypes.string\n};\nvar defaultProps = {\n active: false\n};\nvar BreadcrumbItem = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(BreadcrumbItem, _React$Component);\n function BreadcrumbItem() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = BreadcrumbItem.prototype;\n _proto.render = function render() {\n var _this$props = this.props,\n active = _this$props.active,\n href = _this$props.href,\n title = _this$props.title,\n target = _this$props.target,\n className = _this$props.className,\n props = _objectWithoutPropertiesLoose(_this$props, [\"active\", \"href\", \"title\", \"target\", \"className\"]); // Don't try to render these props on non-active .\n\n var linkProps = {\n href: href,\n title: title,\n target: target\n };\n return /*#__PURE__*/React.createElement(\"li\", {\n className: classNames(className, {\n active: active\n })\n }, active ? /*#__PURE__*/React.createElement(\"span\", props) : /*#__PURE__*/React.createElement(SafeAnchor, _extends({}, props, linkProps)));\n };\n return BreadcrumbItem;\n}(React.Component);\nBreadcrumbItem.propTypes = propTypes;\nBreadcrumbItem.defaultProps = defaultProps;\nexport default BreadcrumbItem;","import _Object$values from \"@babel/runtime-corejs2/core-js/object/values\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport elementType from 'prop-types-extra/lib/elementType';\nimport { bsClass, bsSizes, bsStyles, getClassSet, prefix, splitBsProps } from './utils/bootstrapUtils';\nimport { Size, State, Style } from './utils/StyleConfig';\nimport SafeAnchor from './SafeAnchor';\nvar propTypes = {\n active: PropTypes.bool,\n disabled: PropTypes.bool,\n block: PropTypes.bool,\n onClick: PropTypes.func,\n componentClass: elementType,\n href: PropTypes.string,\n /**\n * Defines HTML button type attribute\n * @defaultValue 'button'\n */\n type: PropTypes.oneOf(['button', 'reset', 'submit'])\n};\nvar defaultProps = {\n active: false,\n block: false,\n disabled: false\n};\nvar Button = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Button, _React$Component);\n function Button() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = Button.prototype;\n _proto.renderAnchor = function renderAnchor(elementProps, className) {\n return /*#__PURE__*/React.createElement(SafeAnchor, _extends({}, elementProps, {\n className: classNames(className, elementProps.disabled && 'disabled')\n }));\n };\n _proto.renderButton = function renderButton(_ref, className) {\n var componentClass = _ref.componentClass,\n elementProps = _objectWithoutPropertiesLoose(_ref, [\"componentClass\"]);\n var Component = componentClass || 'button';\n return /*#__PURE__*/React.createElement(Component, _extends({}, elementProps, {\n type: elementProps.type || 'button',\n className: className\n }));\n };\n _proto.render = function render() {\n var _extends2;\n var _this$props = this.props,\n active = _this$props.active,\n block = _this$props.block,\n className = _this$props.className,\n props = _objectWithoutPropertiesLoose(_this$props, [\"active\", \"block\", \"className\"]);\n var _splitBsProps = splitBsProps(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n var classes = _extends({}, getClassSet(bsProps), (_extends2 = {\n active: active\n }, _extends2[prefix(bsProps, 'block')] = block, _extends2));\n var fullClassName = classNames(className, classes);\n if (elementProps.href) {\n return this.renderAnchor(elementProps, fullClassName);\n }\n return this.renderButton(elementProps, fullClassName);\n };\n return Button;\n}(React.Component);\nButton.propTypes = propTypes;\nButton.defaultProps = defaultProps;\nexport default bsClass('btn', bsSizes([Size.LARGE, Size.SMALL, Size.XSMALL], bsStyles(_Object$values(State).concat([Style.DEFAULT, Style.PRIMARY, Style.LINK]), Style.DEFAULT, Button)));","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport all from 'prop-types-extra/lib/all';\nimport Button from './Button';\nimport { bsClass, getClassSet, prefix, splitBsProps } from './utils/bootstrapUtils';\nvar propTypes = {\n vertical: PropTypes.bool,\n justified: PropTypes.bool,\n /**\n * Display block buttons; only useful when used with the \"vertical\" prop.\n * @type {bool}\n */\n block: all(PropTypes.bool, function (_ref) {\n var block = _ref.block,\n vertical = _ref.vertical;\n return block && !vertical ? new Error('`block` requires `vertical` to be set to have any effect') : null;\n })\n};\nvar defaultProps = {\n block: false,\n justified: false,\n vertical: false\n};\nvar ButtonGroup = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(ButtonGroup, _React$Component);\n function ButtonGroup() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = ButtonGroup.prototype;\n _proto.render = function render() {\n var _extends2;\n var _this$props = this.props,\n block = _this$props.block,\n justified = _this$props.justified,\n vertical = _this$props.vertical,\n className = _this$props.className,\n props = _objectWithoutPropertiesLoose(_this$props, [\"block\", \"justified\", \"vertical\", \"className\"]);\n var _splitBsProps = splitBsProps(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n var classes = _extends({}, getClassSet(bsProps), (_extends2 = {}, _extends2[prefix(bsProps)] = !vertical, _extends2[prefix(bsProps, 'vertical')] = vertical, _extends2[prefix(bsProps, 'justified')] = justified, _extends2[prefix(Button.defaultProps, 'block')] = block, _extends2));\n return /*#__PURE__*/React.createElement(\"div\", _extends({}, elementProps, {\n className: classNames(className, classes)\n }));\n };\n return ButtonGroup;\n}(React.Component);\nButtonGroup.propTypes = propTypes;\nButtonGroup.defaultProps = defaultProps;\nexport default bsClass('btn-group', ButtonGroup);","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';\nvar ButtonToolbar = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(ButtonToolbar, _React$Component);\n function ButtonToolbar() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = ButtonToolbar.prototype;\n _proto.render = function render() {\n var _this$props = this.props,\n className = _this$props.className,\n props = _objectWithoutPropertiesLoose(_this$props, [\"className\"]);\n var _splitBsProps = splitBsProps(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n var classes = getClassSet(bsProps);\n return /*#__PURE__*/React.createElement(\"div\", _extends({}, elementProps, {\n role: \"toolbar\",\n className: classNames(className, classes)\n }));\n };\n return ButtonToolbar;\n}(React.Component);\nexport default bsClass('btn-toolbar', ButtonToolbar);","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport _assertThisInitialized from \"@babel/runtime-corejs2/helpers/esm/assertThisInitialized\";\nimport classNames from 'classnames';\nimport React, { cloneElement } from 'react';\nimport PropTypes from 'prop-types';\nimport CarouselCaption from './CarouselCaption';\nimport CarouselItem from './CarouselItem';\nimport Glyphicon from './Glyphicon';\nimport SafeAnchor from './SafeAnchor';\nimport { bsClass, getClassSet, prefix, splitBsPropsAndOmit } from './utils/bootstrapUtils';\nimport ValidComponentChildren from './utils/ValidComponentChildren'; // TODO: `slide` should be `animate`.\n// TODO: Use uncontrollable.\n\nvar propTypes = {\n slide: PropTypes.bool,\n indicators: PropTypes.bool,\n /**\n * The amount of time to delay between automatically cycling an item.\n * If `null`, carousel will not automatically cycle.\n */\n interval: PropTypes.number,\n controls: PropTypes.bool,\n pauseOnHover: PropTypes.bool,\n wrap: PropTypes.bool,\n /**\n * Callback fired when the active item changes.\n *\n * ```js\n * (eventKey: any, ?event: Object) => any\n * ```\n *\n * If this callback takes two or more arguments, the second argument will\n * be a persisted event object with `direction` set to the direction of the\n * transition.\n */\n onSelect: PropTypes.func,\n onSlideEnd: PropTypes.func,\n activeIndex: PropTypes.number,\n defaultActiveIndex: PropTypes.number,\n direction: PropTypes.oneOf(['prev', 'next']),\n prevIcon: PropTypes.node,\n /**\n * Label shown to screen readers only, can be used to show the previous element\n * in the carousel.\n * Set to null to deactivate.\n */\n prevLabel: PropTypes.string,\n nextIcon: PropTypes.node,\n /**\n * Label shown to screen readers only, can be used to show the next element\n * in the carousel.\n * Set to null to deactivate.\n */\n nextLabel: PropTypes.string\n};\nvar defaultProps = {\n slide: true,\n interval: 5000,\n pauseOnHover: true,\n wrap: true,\n indicators: true,\n controls: true,\n prevIcon: /*#__PURE__*/React.createElement(Glyphicon, {\n glyph: \"chevron-left\"\n }),\n prevLabel: 'Previous',\n nextIcon: /*#__PURE__*/React.createElement(Glyphicon, {\n glyph: \"chevron-right\"\n }),\n nextLabel: 'Next'\n};\nvar Carousel = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Carousel, _React$Component);\n function Carousel(props, context) {\n var _this;\n _this = _React$Component.call(this, props, context) || this;\n _this.handleMouseOver = _this.handleMouseOver.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n _this.handleMouseOut = _this.handleMouseOut.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n _this.handlePrev = _this.handlePrev.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n _this.handleNext = _this.handleNext.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n _this.handleItemAnimateOutEnd = _this.handleItemAnimateOutEnd.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n var defaultActiveIndex = props.defaultActiveIndex;\n _this.state = {\n activeIndex: defaultActiveIndex != null ? defaultActiveIndex : 0,\n previousActiveIndex: null,\n direction: null\n };\n _this.isUnmounted = false;\n return _this;\n }\n var _proto = Carousel.prototype;\n _proto.componentDidMount = function componentDidMount() {\n this.waitForNext();\n };\n _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n var activeIndex = this.getActiveIndex();\n if (nextProps.activeIndex != null && nextProps.activeIndex !== activeIndex) {\n clearTimeout(this.timeout);\n this.setState({\n previousActiveIndex: activeIndex,\n direction: nextProps.direction != null ? nextProps.direction : this.getDirection(activeIndex, nextProps.activeIndex)\n });\n }\n if (nextProps.activeIndex == null && this.state.activeIndex >= nextProps.children.length) {\n this.setState({\n activeIndex: 0,\n previousActiveIndex: null,\n direction: null\n });\n }\n };\n _proto.componentWillUnmount = function componentWillUnmount() {\n clearTimeout(this.timeout);\n this.isUnmounted = true;\n };\n _proto.getActiveIndex = function getActiveIndex() {\n var activeIndexProp = this.props.activeIndex;\n return activeIndexProp != null ? activeIndexProp : this.state.activeIndex;\n };\n _proto.getDirection = function getDirection(prevIndex, index) {\n if (prevIndex === index) {\n return null;\n }\n return prevIndex > index ? 'prev' : 'next';\n };\n _proto.handleItemAnimateOutEnd = function handleItemAnimateOutEnd() {\n var _this2 = this;\n this.setState({\n previousActiveIndex: null,\n direction: null\n }, function () {\n _this2.waitForNext();\n if (_this2.props.onSlideEnd) {\n _this2.props.onSlideEnd();\n }\n });\n };\n _proto.handleMouseOut = function handleMouseOut() {\n if (this.isPaused) {\n this.play();\n }\n };\n _proto.handleMouseOver = function handleMouseOver() {\n if (this.props.pauseOnHover) {\n this.pause();\n }\n };\n _proto.handleNext = function handleNext(e) {\n var index = this.getActiveIndex() + 1;\n var count = ValidComponentChildren.count(this.props.children);\n if (index > count - 1) {\n if (!this.props.wrap) {\n return;\n }\n index = 0;\n }\n this.select(index, e, 'next');\n };\n _proto.handlePrev = function handlePrev(e) {\n var index = this.getActiveIndex() - 1;\n if (index < 0) {\n if (!this.props.wrap) {\n return;\n }\n index = ValidComponentChildren.count(this.props.children) - 1;\n }\n this.select(index, e, 'prev');\n }; // This might be a public API.\n\n _proto.pause = function pause() {\n this.isPaused = true;\n clearTimeout(this.timeout);\n }; // This might be a public API.\n\n _proto.play = function play() {\n this.isPaused = false;\n this.waitForNext();\n };\n _proto.select = function select(index, e, direction) {\n clearTimeout(this.timeout); // TODO: Is this necessary? Seems like the only risk is if the component\n // unmounts while handleItemAnimateOutEnd fires.\n\n if (this.isUnmounted) {\n return;\n }\n var previousActiveIndex = this.props.slide ? this.getActiveIndex() : null;\n direction = direction || this.getDirection(previousActiveIndex, index);\n var onSelect = this.props.onSelect;\n if (onSelect) {\n if (onSelect.length > 1) {\n // React SyntheticEvents are pooled, so we need to remove this event\n // from the pool to add a custom property. To avoid unnecessarily\n // removing objects from the pool, only do this when the listener\n // actually wants the event.\n if (e) {\n e.persist();\n e.direction = direction;\n } else {\n e = {\n direction: direction\n };\n }\n onSelect(index, e);\n } else {\n onSelect(index);\n }\n }\n if (this.props.activeIndex == null && index !== previousActiveIndex) {\n if (this.state.previousActiveIndex != null) {\n // If currently animating don't activate the new index.\n // TODO: look into queueing this canceled call and\n // animating after the current animation has ended.\n return;\n }\n this.setState({\n activeIndex: index,\n previousActiveIndex: previousActiveIndex,\n direction: direction\n });\n }\n };\n _proto.waitForNext = function waitForNext() {\n var _this$props = this.props,\n slide = _this$props.slide,\n interval = _this$props.interval,\n activeIndexProp = _this$props.activeIndex;\n if (!this.isPaused && slide && interval && activeIndexProp == null) {\n this.timeout = setTimeout(this.handleNext, interval);\n }\n };\n _proto.renderControls = function renderControls(properties) {\n var wrap = properties.wrap,\n children = properties.children,\n activeIndex = properties.activeIndex,\n prevIcon = properties.prevIcon,\n nextIcon = properties.nextIcon,\n bsProps = properties.bsProps,\n prevLabel = properties.prevLabel,\n nextLabel = properties.nextLabel;\n var controlClassName = prefix(bsProps, 'control');\n var count = ValidComponentChildren.count(children);\n return [(wrap || activeIndex !== 0) && /*#__PURE__*/React.createElement(SafeAnchor, {\n key: \"prev\",\n className: classNames(controlClassName, 'left'),\n onClick: this.handlePrev\n }, prevIcon, prevLabel && /*#__PURE__*/React.createElement(\"span\", {\n className: \"sr-only\"\n }, prevLabel)), (wrap || activeIndex !== count - 1) && /*#__PURE__*/React.createElement(SafeAnchor, {\n key: \"next\",\n className: classNames(controlClassName, 'right'),\n onClick: this.handleNext\n }, nextIcon, nextLabel && /*#__PURE__*/React.createElement(\"span\", {\n className: \"sr-only\"\n }, nextLabel))];\n };\n _proto.renderIndicators = function renderIndicators(children, activeIndex, bsProps) {\n var _this3 = this;\n var indicators = [];\n ValidComponentChildren.forEach(children, function (child, index) {\n indicators.push(/*#__PURE__*/React.createElement(\"li\", {\n key: index,\n className: index === activeIndex ? 'active' : null,\n onClick: function onClick(e) {\n return _this3.select(index, e);\n }\n }),\n // Force whitespace between indicator elements. Bootstrap requires\n // this for correct spacing of elements.\n ' ');\n });\n return /*#__PURE__*/React.createElement(\"ol\", {\n className: prefix(bsProps, 'indicators')\n }, indicators);\n };\n _proto.render = function render() {\n var _this4 = this;\n var _this$props2 = this.props,\n slide = _this$props2.slide,\n indicators = _this$props2.indicators,\n controls = _this$props2.controls,\n wrap = _this$props2.wrap,\n prevIcon = _this$props2.prevIcon,\n prevLabel = _this$props2.prevLabel,\n nextIcon = _this$props2.nextIcon,\n nextLabel = _this$props2.nextLabel,\n className = _this$props2.className,\n children = _this$props2.children,\n props = _objectWithoutPropertiesLoose(_this$props2, [\"slide\", \"indicators\", \"controls\", \"wrap\", \"prevIcon\", \"prevLabel\", \"nextIcon\", \"nextLabel\", \"className\", \"children\"]);\n var _this$state = this.state,\n previousActiveIndex = _this$state.previousActiveIndex,\n direction = _this$state.direction;\n var _splitBsPropsAndOmit = splitBsPropsAndOmit(props, ['interval', 'pauseOnHover', 'onSelect', 'onSlideEnd', 'activeIndex',\n // Accessed via this.getActiveIndex().\n 'defaultActiveIndex', 'direction']),\n bsProps = _splitBsPropsAndOmit[0],\n elementProps = _splitBsPropsAndOmit[1];\n var activeIndex = this.getActiveIndex();\n var classes = _extends({}, getClassSet(bsProps), {\n slide: slide\n });\n return /*#__PURE__*/React.createElement(\"div\", _extends({}, elementProps, {\n className: classNames(className, classes),\n onMouseOver: this.handleMouseOver,\n onMouseOut: this.handleMouseOut\n }), indicators && this.renderIndicators(children, activeIndex, bsProps), /*#__PURE__*/React.createElement(\"div\", {\n className: prefix(bsProps, 'inner')\n }, ValidComponentChildren.map(children, function (child, index) {\n var active = index === activeIndex;\n var previousActive = slide && index === previousActiveIndex;\n return /*#__PURE__*/cloneElement(child, {\n active: active,\n index: index,\n animateOut: previousActive,\n animateIn: active && previousActiveIndex != null && slide,\n direction: direction,\n onAnimateOutEnd: previousActive ? _this4.handleItemAnimateOutEnd : null\n });\n })), controls && this.renderControls({\n wrap: wrap,\n children: children,\n activeIndex: activeIndex,\n prevIcon: prevIcon,\n prevLabel: prevLabel,\n nextIcon: nextIcon,\n nextLabel: nextLabel,\n bsProps: bsProps\n }));\n };\n return Carousel;\n}(React.Component);\nCarousel.propTypes = propTypes;\nCarousel.defaultProps = defaultProps;\nCarousel.Caption = CarouselCaption;\nCarousel.Item = CarouselItem;\nexport default bsClass('carousel', Carousel);","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport elementType from 'prop-types-extra/lib/elementType';\nimport { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';\nvar propTypes = {\n componentClass: elementType\n};\nvar defaultProps = {\n componentClass: 'div'\n};\nvar CarouselCaption = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(CarouselCaption, _React$Component);\n function CarouselCaption() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = CarouselCaption.prototype;\n _proto.render = function render() {\n var _this$props = this.props,\n Component = _this$props.componentClass,\n className = _this$props.className,\n props = _objectWithoutPropertiesLoose(_this$props, [\"componentClass\", \"className\"]);\n var _splitBsProps = splitBsProps(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n var classes = getClassSet(bsProps);\n return /*#__PURE__*/React.createElement(Component, _extends({}, elementProps, {\n className: classNames(className, classes)\n }));\n };\n return CarouselCaption;\n}(React.Component);\nCarouselCaption.propTypes = propTypes;\nCarouselCaption.defaultProps = defaultProps;\nexport default bsClass('carousel-caption', CarouselCaption);","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport _assertThisInitialized from \"@babel/runtime-corejs2/helpers/esm/assertThisInitialized\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport ReactDOM from 'react-dom';\nimport transition from 'dom-helpers/transition';\nvar propTypes = {\n direction: PropTypes.oneOf(['prev', 'next']),\n onAnimateOutEnd: PropTypes.func,\n active: PropTypes.bool,\n animateIn: PropTypes.bool,\n animateOut: PropTypes.bool,\n index: PropTypes.number\n};\nvar defaultProps = {\n active: false,\n animateIn: false,\n animateOut: false\n};\nvar CarouselItem = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(CarouselItem, _React$Component);\n function CarouselItem(props, context) {\n var _this;\n _this = _React$Component.call(this, props, context) || this;\n _this.handleAnimateOutEnd = _this.handleAnimateOutEnd.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n _this.state = {\n direction: null\n };\n _this.isUnmounted = false;\n return _this;\n }\n var _proto = CarouselItem.prototype;\n _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n if (this.props.active !== nextProps.active) {\n this.setState({\n direction: null\n });\n }\n };\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var _this2 = this;\n var active = this.props.active;\n var prevActive = prevProps.active;\n if (!active && prevActive) {\n transition.end(ReactDOM.findDOMNode(this), this.handleAnimateOutEnd);\n }\n if (active !== prevActive) {\n setTimeout(function () {\n return _this2.startAnimation();\n }, 20);\n }\n };\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.isUnmounted = true;\n };\n _proto.handleAnimateOutEnd = function handleAnimateOutEnd() {\n if (this.isUnmounted) {\n return;\n }\n if (this.props.onAnimateOutEnd) {\n this.props.onAnimateOutEnd(this.props.index);\n }\n };\n _proto.startAnimation = function startAnimation() {\n if (this.isUnmounted) {\n return;\n }\n this.setState({\n direction: this.props.direction === 'prev' ? 'right' : 'left'\n });\n };\n _proto.render = function render() {\n var _this$props = this.props,\n direction = _this$props.direction,\n active = _this$props.active,\n animateIn = _this$props.animateIn,\n animateOut = _this$props.animateOut,\n className = _this$props.className,\n props = _objectWithoutPropertiesLoose(_this$props, [\"direction\", \"active\", \"animateIn\", \"animateOut\", \"className\"]);\n delete props.onAnimateOutEnd;\n delete props.index;\n var classes = {\n item: true,\n active: active && !animateIn || animateOut\n };\n if (direction && active && animateIn) {\n classes[direction] = true;\n }\n if (this.state.direction && (animateIn || animateOut)) {\n classes[this.state.direction] = true;\n }\n return /*#__PURE__*/React.createElement(\"div\", _extends({}, props, {\n className: classNames(className, classes)\n }));\n };\n return CarouselItem;\n}(React.Component);\nCarouselItem.propTypes = propTypes;\nCarouselItem.defaultProps = defaultProps;\nexport default CarouselItem;","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\n\n/* eslint-disable jsx-a11y/label-has-for */\nimport classNames from 'classnames';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport warning from 'warning';\nimport { bsClass, getClassSet, prefix, splitBsProps } from './utils/bootstrapUtils';\nvar propTypes = {\n inline: PropTypes.bool,\n disabled: PropTypes.bool,\n title: PropTypes.string,\n /**\n * Only valid if `inline` is not set.\n */\n validationState: PropTypes.oneOf(['success', 'warning', 'error', null]),\n /**\n * Attaches a ref to the `` element. Only functions can be used here.\n *\n * ```js\n * { this.input = ref; }} />\n * ```\n */\n inputRef: PropTypes.func\n};\nvar defaultProps = {\n inline: false,\n disabled: false,\n title: ''\n};\nvar Checkbox = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Checkbox, _React$Component);\n function Checkbox() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = Checkbox.prototype;\n _proto.render = function render() {\n var _this$props = this.props,\n inline = _this$props.inline,\n disabled = _this$props.disabled,\n validationState = _this$props.validationState,\n inputRef = _this$props.inputRef,\n className = _this$props.className,\n style = _this$props.style,\n title = _this$props.title,\n children = _this$props.children,\n props = _objectWithoutPropertiesLoose(_this$props, [\"inline\", \"disabled\", \"validationState\", \"inputRef\", \"className\", \"style\", \"title\", \"children\"]);\n var _splitBsProps = splitBsProps(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n var input = /*#__PURE__*/React.createElement(\"input\", _extends({}, elementProps, {\n ref: inputRef,\n type: \"checkbox\",\n disabled: disabled\n }));\n if (inline) {\n var _classes2;\n var _classes = (_classes2 = {}, _classes2[prefix(bsProps, 'inline')] = true, _classes2.disabled = disabled, _classes2); // Use a warning here instead of in propTypes to get better-looking\n // generated documentation.\n\n process.env.NODE_ENV !== \"production\" ? warning(!validationState, '`validationState` is ignored on ``. To display ' + 'validation state on an inline checkbox, set `validationState` on a ' + 'parent `` or other element instead.') : void 0;\n return /*#__PURE__*/React.createElement(\"label\", {\n className: classNames(className, _classes),\n style: style,\n title: title\n }, input, children);\n }\n var classes = _extends({}, getClassSet(bsProps), {\n disabled: disabled\n });\n if (validationState) {\n classes[\"has-\" + validationState] = true;\n }\n return /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(className, classes),\n style: style\n }, /*#__PURE__*/React.createElement(\"label\", {\n title: title\n }, input, children));\n };\n return Checkbox;\n}(React.Component);\nCheckbox.propTypes = propTypes;\nCheckbox.defaultProps = defaultProps;\nexport default bsClass('checkbox', Checkbox);","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport elementType from 'prop-types-extra/lib/elementType';\nimport { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';\nimport capitalize from './utils/capitalize';\nimport { DEVICE_SIZES } from './utils/StyleConfig';\nvar propTypes = {\n componentClass: elementType,\n /**\n * Apply clearfix\n *\n * on Extra small devices Phones\n *\n * adds class `visible-xs-block`\n */\n visibleXsBlock: PropTypes.bool,\n /**\n * Apply clearfix\n *\n * on Small devices Tablets\n *\n * adds class `visible-sm-block`\n */\n visibleSmBlock: PropTypes.bool,\n /**\n * Apply clearfix\n *\n * on Medium devices Desktops\n *\n * adds class `visible-md-block`\n */\n visibleMdBlock: PropTypes.bool,\n /**\n * Apply clearfix\n *\n * on Large devices Desktops\n *\n * adds class `visible-lg-block`\n */\n visibleLgBlock: PropTypes.bool\n};\nvar defaultProps = {\n componentClass: 'div'\n};\nvar Clearfix = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Clearfix, _React$Component);\n function Clearfix() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = Clearfix.prototype;\n _proto.render = function render() {\n var _this$props = this.props,\n Component = _this$props.componentClass,\n className = _this$props.className,\n props = _objectWithoutPropertiesLoose(_this$props, [\"componentClass\", \"className\"]);\n var _splitBsProps = splitBsProps(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n var classes = getClassSet(bsProps);\n DEVICE_SIZES.forEach(function (size) {\n var propName = \"visible\" + capitalize(size) + \"Block\";\n if (elementProps[propName]) {\n classes[\"visible-\" + size + \"-block\"] = true;\n }\n delete elementProps[propName];\n });\n return /*#__PURE__*/React.createElement(Component, _extends({}, elementProps, {\n className: classNames(className, classes)\n }));\n };\n return Clearfix;\n}(React.Component);\nClearfix.propTypes = propTypes;\nClearfix.defaultProps = defaultProps;\nexport default bsClass('clearfix', Clearfix);","import _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nvar propTypes = {\n label: PropTypes.string.isRequired,\n onClick: PropTypes.func\n};\nvar defaultProps = {\n label: 'Close'\n};\nvar CloseButton = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(CloseButton, _React$Component);\n function CloseButton() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = CloseButton.prototype;\n _proto.render = function render() {\n var _this$props = this.props,\n label = _this$props.label,\n onClick = _this$props.onClick;\n return /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n className: \"close\",\n onClick: onClick\n }, /*#__PURE__*/React.createElement(\"span\", {\n \"aria-hidden\": \"true\"\n }, \"\\xD7\"), /*#__PURE__*/React.createElement(\"span\", {\n className: \"sr-only\"\n }, label));\n };\n return CloseButton;\n}(React.Component);\nCloseButton.propTypes = propTypes;\nCloseButton.defaultProps = defaultProps;\nexport default CloseButton;","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport elementType from 'prop-types-extra/lib/elementType';\nimport { bsClass, prefix, splitBsProps } from './utils/bootstrapUtils';\nimport { DEVICE_SIZES } from './utils/StyleConfig';\nvar propTypes = {\n componentClass: elementType,\n /**\n * The number of columns you wish to span\n *\n * for Extra small devices Phones (<768px)\n *\n * class-prefix `col-xs-`\n */\n xs: PropTypes.number,\n /**\n * The number of columns you wish to span\n *\n * for Small devices Tablets (≥768px)\n *\n * class-prefix `col-sm-`\n */\n sm: PropTypes.number,\n /**\n * The number of columns you wish to span\n *\n * for Medium devices Desktops (≥992px)\n *\n * class-prefix `col-md-`\n */\n md: PropTypes.number,\n /**\n * The number of columns you wish to span\n *\n * for Large devices Desktops (≥1200px)\n *\n * class-prefix `col-lg-`\n */\n lg: PropTypes.number,\n /**\n * Hide column\n *\n * on Extra small devices Phones\n *\n * adds class `hidden-xs`\n */\n xsHidden: PropTypes.bool,\n /**\n * Hide column\n *\n * on Small devices Tablets\n *\n * adds class `hidden-sm`\n */\n smHidden: PropTypes.bool,\n /**\n * Hide column\n *\n * on Medium devices Desktops\n *\n * adds class `hidden-md`\n */\n mdHidden: PropTypes.bool,\n /**\n * Hide column\n *\n * on Large devices Desktops\n *\n * adds class `hidden-lg`\n */\n lgHidden: PropTypes.bool,\n /**\n * Move columns to the right\n *\n * for Extra small devices Phones\n *\n * class-prefix `col-xs-offset-`\n */\n xsOffset: PropTypes.number,\n /**\n * Move columns to the right\n *\n * for Small devices Tablets\n *\n * class-prefix `col-sm-offset-`\n */\n smOffset: PropTypes.number,\n /**\n * Move columns to the right\n *\n * for Medium devices Desktops\n *\n * class-prefix `col-md-offset-`\n */\n mdOffset: PropTypes.number,\n /**\n * Move columns to the right\n *\n * for Large devices Desktops\n *\n * class-prefix `col-lg-offset-`\n */\n lgOffset: PropTypes.number,\n /**\n * Change the order of grid columns to the right\n *\n * for Extra small devices Phones\n *\n * class-prefix `col-xs-push-`\n */\n xsPush: PropTypes.number,\n /**\n * Change the order of grid columns to the right\n *\n * for Small devices Tablets\n *\n * class-prefix `col-sm-push-`\n */\n smPush: PropTypes.number,\n /**\n * Change the order of grid columns to the right\n *\n * for Medium devices Desktops\n *\n * class-prefix `col-md-push-`\n */\n mdPush: PropTypes.number,\n /**\n * Change the order of grid columns to the right\n *\n * for Large devices Desktops\n *\n * class-prefix `col-lg-push-`\n */\n lgPush: PropTypes.number,\n /**\n * Change the order of grid columns to the left\n *\n * for Extra small devices Phones\n *\n * class-prefix `col-xs-pull-`\n */\n xsPull: PropTypes.number,\n /**\n * Change the order of grid columns to the left\n *\n * for Small devices Tablets\n *\n * class-prefix `col-sm-pull-`\n */\n smPull: PropTypes.number,\n /**\n * Change the order of grid columns to the left\n *\n * for Medium devices Desktops\n *\n * class-prefix `col-md-pull-`\n */\n mdPull: PropTypes.number,\n /**\n * Change the order of grid columns to the left\n *\n * for Large devices Desktops\n *\n * class-prefix `col-lg-pull-`\n */\n lgPull: PropTypes.number\n};\nvar defaultProps = {\n componentClass: 'div'\n};\nvar Col = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Col, _React$Component);\n function Col() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = Col.prototype;\n _proto.render = function render() {\n var _this$props = this.props,\n Component = _this$props.componentClass,\n className = _this$props.className,\n props = _objectWithoutPropertiesLoose(_this$props, [\"componentClass\", \"className\"]);\n var _splitBsProps = splitBsProps(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n var classes = [];\n DEVICE_SIZES.forEach(function (size) {\n function popProp(propSuffix, modifier) {\n var propName = \"\" + size + propSuffix;\n var propValue = elementProps[propName];\n if (propValue != null) {\n classes.push(prefix(bsProps, \"\" + size + modifier + \"-\" + propValue));\n }\n delete elementProps[propName];\n }\n popProp('', '');\n popProp('Offset', '-offset');\n popProp('Push', '-push');\n popProp('Pull', '-pull');\n var hiddenPropName = size + \"Hidden\";\n if (elementProps[hiddenPropName]) {\n classes.push(\"hidden-\" + size);\n }\n delete elementProps[hiddenPropName];\n });\n return /*#__PURE__*/React.createElement(Component, _extends({}, elementProps, {\n className: classNames(className, classes)\n }));\n };\n return Col;\n}(React.Component);\nCol.propTypes = propTypes;\nCol.defaultProps = defaultProps;\nexport default bsClass('col', Col);","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport _parseInt from \"@babel/runtime-corejs2/core-js/parse-int\";\nvar _collapseStyles;\nimport classNames from 'classnames';\nimport css from 'dom-helpers/style';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport Transition, { EXITED, ENTERED, ENTERING, EXITING } from 'react-transition-group/Transition';\nimport capitalize from './utils/capitalize';\nimport createChainedFunction from './utils/createChainedFunction';\nvar MARGINS = {\n height: ['marginTop', 'marginBottom'],\n width: ['marginLeft', 'marginRight']\n}; // reading a dimension prop will cause the browser to recalculate,\n// which will let our animations work\n\nfunction triggerBrowserReflow(node) {\n node.offsetHeight; // eslint-disable-line no-unused-expressions\n}\nfunction getDimensionValue(dimension, elem) {\n var value = elem[\"offset\" + capitalize(dimension)];\n var margins = MARGINS[dimension];\n return value + _parseInt(css(elem, margins[0]), 10) + _parseInt(css(elem, margins[1]), 10);\n}\nvar collapseStyles = (_collapseStyles = {}, _collapseStyles[EXITED] = 'collapse', _collapseStyles[EXITING] = 'collapsing', _collapseStyles[ENTERING] = 'collapsing', _collapseStyles[ENTERED] = 'collapse in', _collapseStyles);\nvar propTypes = {\n /**\n * Show the component; triggers the expand or collapse animation\n */\n \"in\": PropTypes.bool,\n /**\n * Wait until the first \"enter\" transition to mount the component (add it to the DOM)\n */\n mountOnEnter: PropTypes.bool,\n /**\n * Unmount the component (remove it from the DOM) when it is collapsed\n */\n unmountOnExit: PropTypes.bool,\n /**\n * Run the expand animation when the component mounts, if it is initially\n * shown\n */\n appear: PropTypes.bool,\n /**\n * Duration of the collapse animation in milliseconds, to ensure that\n * finishing callbacks are fired even if the original browser transition end\n * events are canceled\n */\n timeout: PropTypes.number,\n /**\n * Callback fired before the component expands\n */\n onEnter: PropTypes.func,\n /**\n * Callback fired after the component starts to expand\n */\n onEntering: PropTypes.func,\n /**\n * Callback fired after the component has expanded\n */\n onEntered: PropTypes.func,\n /**\n * Callback fired before the component collapses\n */\n onExit: PropTypes.func,\n /**\n * Callback fired after the component starts to collapse\n */\n onExiting: PropTypes.func,\n /**\n * Callback fired after the component has collapsed\n */\n onExited: PropTypes.func,\n /**\n * The dimension used when collapsing, or a function that returns the\n * dimension\n *\n * _Note: Bootstrap only partially supports 'width'!\n * You will need to supply your own CSS animation for the `.width` CSS class._\n */\n dimension: PropTypes.oneOfType([PropTypes.oneOf(['height', 'width']), PropTypes.func]),\n /**\n * Function that returns the height or width of the animating DOM node\n *\n * Allows for providing some custom logic for how much the Collapse component\n * should animate in its specified dimension. Called with the current\n * dimension prop value and the DOM node.\n */\n getDimensionValue: PropTypes.func,\n /**\n * ARIA role of collapsible element\n */\n role: PropTypes.string\n};\nvar defaultProps = {\n \"in\": false,\n timeout: 300,\n mountOnEnter: false,\n unmountOnExit: false,\n appear: false,\n dimension: 'height',\n getDimensionValue: getDimensionValue\n};\nvar Collapse = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Collapse, _React$Component);\n function Collapse() {\n var _this;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.handleEnter = function (elem) {\n elem.style[_this.getDimension()] = '0';\n };\n _this.handleEntering = function (elem) {\n var dimension = _this.getDimension();\n elem.style[dimension] = _this._getScrollDimensionValue(elem, dimension);\n };\n _this.handleEntered = function (elem) {\n elem.style[_this.getDimension()] = null;\n };\n _this.handleExit = function (elem) {\n var dimension = _this.getDimension();\n elem.style[dimension] = _this.props.getDimensionValue(dimension, elem) + \"px\";\n triggerBrowserReflow(elem);\n };\n _this.handleExiting = function (elem) {\n elem.style[_this.getDimension()] = '0';\n };\n return _this;\n }\n var _proto = Collapse.prototype;\n _proto.getDimension = function getDimension() {\n return typeof this.props.dimension === 'function' ? this.props.dimension() : this.props.dimension;\n }; // for testing\n\n _proto._getScrollDimensionValue = function _getScrollDimensionValue(elem, dimension) {\n return elem[\"scroll\" + capitalize(dimension)] + \"px\";\n };\n /* -- Expanding -- */\n\n _proto.render = function render() {\n var _this2 = this;\n var _this$props = this.props,\n onEnter = _this$props.onEnter,\n onEntering = _this$props.onEntering,\n onEntered = _this$props.onEntered,\n onExit = _this$props.onExit,\n onExiting = _this$props.onExiting,\n className = _this$props.className,\n children = _this$props.children,\n props = _objectWithoutPropertiesLoose(_this$props, [\"onEnter\", \"onEntering\", \"onEntered\", \"onExit\", \"onExiting\", \"className\", \"children\"]);\n delete props.dimension;\n delete props.getDimensionValue;\n var handleEnter = createChainedFunction(this.handleEnter, onEnter);\n var handleEntering = createChainedFunction(this.handleEntering, onEntering);\n var handleEntered = createChainedFunction(this.handleEntered, onEntered);\n var handleExit = createChainedFunction(this.handleExit, onExit);\n var handleExiting = createChainedFunction(this.handleExiting, onExiting);\n return /*#__PURE__*/React.createElement(Transition, _extends({}, props, {\n \"aria-expanded\": props.role ? props[\"in\"] : null,\n onEnter: handleEnter,\n onEntering: handleEntering,\n onEntered: handleEntered,\n onExit: handleExit,\n onExiting: handleExiting\n }), function (state, innerProps) {\n return /*#__PURE__*/React.cloneElement(children, _extends({}, innerProps, {\n className: classNames(className, children.props.className, collapseStyles[state], _this2.getDimension() === 'width' && 'width')\n }));\n });\n };\n return Collapse;\n}(React.Component);\nCollapse.propTypes = propTypes;\nCollapse.defaultProps = defaultProps;\nexport default Collapse;","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport warning from 'warning';\nimport { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';\nvar propTypes = {\n /**\n * Uses `controlId` from `` if not explicitly specified.\n */\n htmlFor: PropTypes.string,\n srOnly: PropTypes.bool\n};\nvar defaultProps = {\n srOnly: false\n};\nvar contextTypes = {\n $bs_formGroup: PropTypes.object\n};\nvar ControlLabel = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(ControlLabel, _React$Component);\n function ControlLabel() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = ControlLabel.prototype;\n _proto.render = function render() {\n var formGroup = this.context.$bs_formGroup;\n var controlId = formGroup && formGroup.controlId;\n var _this$props = this.props,\n _this$props$htmlFor = _this$props.htmlFor,\n htmlFor = _this$props$htmlFor === void 0 ? controlId : _this$props$htmlFor,\n srOnly = _this$props.srOnly,\n className = _this$props.className,\n props = _objectWithoutPropertiesLoose(_this$props, [\"htmlFor\", \"srOnly\", \"className\"]);\n var _splitBsProps = splitBsProps(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n process.env.NODE_ENV !== \"production\" ? warning(controlId == null || htmlFor === controlId, '`controlId` is ignored on `` when `htmlFor` is specified.') : void 0;\n var classes = _extends({}, getClassSet(bsProps), {\n 'sr-only': srOnly\n });\n return /*#__PURE__*/React.createElement(\"label\", _extends({}, elementProps, {\n htmlFor: htmlFor,\n className: classNames(className, classes)\n }));\n };\n return ControlLabel;\n}(React.Component);\nControlLabel.propTypes = propTypes;\nControlLabel.defaultProps = defaultProps;\nControlLabel.contextTypes = contextTypes;\nexport default bsClass('control-label', ControlLabel);","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport _assertThisInitialized from \"@babel/runtime-corejs2/helpers/esm/assertThisInitialized\";\nimport classNames from 'classnames';\nimport activeElement from 'dom-helpers/activeElement';\nimport contains from 'dom-helpers/query/contains';\nimport keycode from 'keycode';\nimport React, { cloneElement } from 'react';\nimport PropTypes from 'prop-types';\nimport ReactDOM from 'react-dom';\nimport all from 'prop-types-extra/lib/all';\nimport elementType from 'prop-types-extra/lib/elementType';\nimport isRequiredForA11y from 'prop-types-extra/lib/isRequiredForA11y';\nimport uncontrollable from 'uncontrollable';\nimport warning from 'warning';\nimport ButtonGroup from './ButtonGroup';\nimport DropdownMenu from './DropdownMenu';\nimport DropdownToggle from './DropdownToggle';\nimport { bsClass as setBsClass, prefix } from './utils/bootstrapUtils';\nimport createChainedFunction from './utils/createChainedFunction';\nimport { exclusiveRoles, requiredRoles } from './utils/PropTypes';\nimport ValidComponentChildren from './utils/ValidComponentChildren';\nvar TOGGLE_ROLE = DropdownToggle.defaultProps.bsRole;\nvar MENU_ROLE = DropdownMenu.defaultProps.bsRole;\nvar propTypes = {\n /**\n * The menu will open above the dropdown button, instead of below it.\n */\n dropup: PropTypes.bool,\n /**\n * An html id attribute, necessary for assistive technologies, such as screen readers.\n * @type {string|number}\n * @required\n */\n id: isRequiredForA11y(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),\n componentClass: elementType,\n /**\n * The children of a Dropdown may be a `` or a ``.\n * @type {node}\n */\n children: all(requiredRoles(TOGGLE_ROLE, MENU_ROLE), exclusiveRoles(MENU_ROLE)),\n /**\n * Whether or not component is disabled.\n */\n disabled: PropTypes.bool,\n /**\n * Align the menu to the right side of the Dropdown toggle\n */\n pullRight: PropTypes.bool,\n /**\n * Whether or not the Dropdown is visible.\n *\n * @controllable onToggle\n */\n open: PropTypes.bool,\n defaultOpen: PropTypes.bool,\n /**\n * A callback fired when the Dropdown wishes to change visibility. Called with the requested\n * `open` value, the DOM event, and the source that fired it: `'click'`,`'keydown'`,`'rootClose'`, or `'select'`.\n *\n * ```js\n * function(Boolean isOpen, Object event, { String source }) {}\n * ```\n * @controllable open\n */\n onToggle: PropTypes.func,\n /**\n * A callback fired when a menu item is selected.\n *\n * ```js\n * (eventKey: any, event: Object) => any\n * ```\n */\n onSelect: PropTypes.func,\n /**\n * If `'menuitem'`, causes the dropdown to behave like a menu item rather than\n * a menu button.\n */\n role: PropTypes.string,\n /**\n * Which event when fired outside the component will cause it to be closed\n *\n * *Note: For custom dropdown components, you will have to pass the\n * `rootCloseEvent` to `` in your custom dropdown menu\n * component ([similarly to how it is implemented in ``](https://github.com/react-bootstrap/react-bootstrap/blob/v0.31.5/src/DropdownMenu.js#L115-L119)).*\n */\n rootCloseEvent: PropTypes.oneOf(['click', 'mousedown']),\n /**\n * @private\n */\n onMouseEnter: PropTypes.func,\n /**\n * @private\n */\n onMouseLeave: PropTypes.func\n};\nvar defaultProps = {\n componentClass: ButtonGroup\n};\nvar Dropdown = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Dropdown, _React$Component);\n function Dropdown(props, context) {\n var _this;\n _this = _React$Component.call(this, props, context) || this;\n _this.handleClick = _this.handleClick.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n _this.handleKeyDown = _this.handleKeyDown.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n _this.handleClose = _this.handleClose.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n _this._focusInDropdown = false;\n _this.lastOpenEventType = null;\n return _this;\n }\n var _proto = Dropdown.prototype;\n _proto.componentDidMount = function componentDidMount() {\n this.focusNextOnOpen();\n };\n _proto.componentWillUpdate = function componentWillUpdate(nextProps) {\n if (!nextProps.open && this.props.open) {\n this._focusInDropdown = contains(ReactDOM.findDOMNode(this.menu), activeElement(document));\n }\n };\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var open = this.props.open;\n var prevOpen = prevProps.open;\n if (open && !prevOpen) {\n this.focusNextOnOpen();\n }\n if (!open && prevOpen) {\n // if focus hasn't already moved from the menu let's return it\n // to the toggle\n if (this._focusInDropdown) {\n this._focusInDropdown = false;\n this.focus();\n }\n }\n };\n _proto.focus = function focus() {\n var toggle = ReactDOM.findDOMNode(this.toggle);\n if (toggle && toggle.focus) {\n toggle.focus();\n }\n };\n _proto.focusNextOnOpen = function focusNextOnOpen() {\n var menu = this.menu;\n if (!menu || !menu.focusNext) {\n return;\n }\n if (this.lastOpenEventType === 'keydown' || this.props.role === 'menuitem') {\n menu.focusNext();\n }\n };\n _proto.handleClick = function handleClick(event) {\n if (this.props.disabled) {\n return;\n }\n this.toggleOpen(event, {\n source: 'click'\n });\n };\n _proto.handleClose = function handleClose(event, eventDetails) {\n if (!this.props.open) {\n return;\n }\n this.toggleOpen(event, eventDetails);\n };\n _proto.handleKeyDown = function handleKeyDown(event) {\n if (this.props.disabled) {\n return;\n }\n switch (event.keyCode) {\n case keycode.codes.down:\n if (!this.props.open) {\n this.toggleOpen(event, {\n source: 'keydown'\n });\n } else if (this.menu.focusNext) {\n this.menu.focusNext();\n }\n event.preventDefault();\n break;\n case keycode.codes.esc:\n case keycode.codes.tab:\n this.handleClose(event, {\n source: 'keydown'\n });\n break;\n default:\n }\n };\n _proto.toggleOpen = function toggleOpen(event, eventDetails) {\n var open = !this.props.open;\n if (open) {\n this.lastOpenEventType = eventDetails.source;\n }\n if (this.props.onToggle) {\n this.props.onToggle(open, event, eventDetails);\n }\n };\n _proto.renderMenu = function renderMenu(child, _ref) {\n var _this2 = this;\n var id = _ref.id,\n onSelect = _ref.onSelect,\n rootCloseEvent = _ref.rootCloseEvent,\n props = _objectWithoutPropertiesLoose(_ref, [\"id\", \"onSelect\", \"rootCloseEvent\"]);\n var ref = function ref(c) {\n _this2.menu = c;\n };\n if (typeof child.ref === 'string') {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'String refs are not supported on `` components. ' + 'To apply a ref to the component use the callback signature:\\n\\n ' + 'https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute') : void 0;\n } else {\n ref = createChainedFunction(child.ref, ref);\n }\n return /*#__PURE__*/cloneElement(child, _extends({}, props, {\n ref: ref,\n labelledBy: id,\n bsClass: prefix(props, 'menu'),\n onClose: createChainedFunction(child.props.onClose, this.handleClose),\n onSelect: createChainedFunction(child.props.onSelect, onSelect, function (key, event) {\n return _this2.handleClose(event, {\n source: 'select'\n });\n }),\n rootCloseEvent: rootCloseEvent\n }));\n };\n _proto.renderToggle = function renderToggle(child, props) {\n var _this3 = this;\n var ref = function ref(c) {\n _this3.toggle = c;\n };\n if (typeof child.ref === 'string') {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'String refs are not supported on `` components. ' + 'To apply a ref to the component use the callback signature:\\n\\n ' + 'https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute') : void 0;\n } else {\n ref = createChainedFunction(child.ref, ref);\n }\n return /*#__PURE__*/cloneElement(child, _extends({}, props, {\n ref: ref,\n bsClass: prefix(props, 'toggle'),\n onClick: createChainedFunction(child.props.onClick, this.handleClick),\n onKeyDown: createChainedFunction(child.props.onKeyDown, this.handleKeyDown)\n }));\n };\n _proto.render = function render() {\n var _classes,\n _this4 = this;\n var _this$props = this.props,\n Component = _this$props.componentClass,\n id = _this$props.id,\n dropup = _this$props.dropup,\n disabled = _this$props.disabled,\n pullRight = _this$props.pullRight,\n open = _this$props.open,\n onSelect = _this$props.onSelect,\n role = _this$props.role,\n bsClass = _this$props.bsClass,\n className = _this$props.className,\n rootCloseEvent = _this$props.rootCloseEvent,\n children = _this$props.children,\n props = _objectWithoutPropertiesLoose(_this$props, [\"componentClass\", \"id\", \"dropup\", \"disabled\", \"pullRight\", \"open\", \"onSelect\", \"role\", \"bsClass\", \"className\", \"rootCloseEvent\", \"children\"]);\n delete props.onToggle;\n var classes = (_classes = {}, _classes[bsClass] = true, _classes.open = open, _classes.disabled = disabled, _classes);\n if (dropup) {\n classes[bsClass] = false;\n classes.dropup = true;\n } // This intentionally forwards bsSize and bsStyle (if set) to the\n // underlying component, to allow it to render size and style variants.\n\n return /*#__PURE__*/React.createElement(Component, _extends({}, props, {\n className: classNames(className, classes)\n }), ValidComponentChildren.map(children, function (child) {\n switch (child.props.bsRole) {\n case TOGGLE_ROLE:\n return _this4.renderToggle(child, {\n id: id,\n disabled: disabled,\n open: open,\n role: role,\n bsClass: bsClass\n });\n case MENU_ROLE:\n return _this4.renderMenu(child, {\n id: id,\n open: open,\n pullRight: pullRight,\n bsClass: bsClass,\n onSelect: onSelect,\n rootCloseEvent: rootCloseEvent\n });\n default:\n return child;\n }\n }));\n };\n return Dropdown;\n}(React.Component);\nDropdown.propTypes = propTypes;\nDropdown.defaultProps = defaultProps;\nsetBsClass('dropdown', Dropdown);\nvar UncontrolledDropdown = uncontrollable(Dropdown, {\n open: 'onToggle'\n});\nUncontrolledDropdown.Toggle = DropdownToggle;\nUncontrolledDropdown.Menu = DropdownMenu;\nexport default UncontrolledDropdown;","import _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport Dropdown from './Dropdown';\nimport splitComponentProps from './utils/splitComponentProps';\nvar propTypes = _extends({}, Dropdown.propTypes, {\n // Toggle props.\n bsStyle: PropTypes.string,\n bsSize: PropTypes.string,\n title: PropTypes.node.isRequired,\n noCaret: PropTypes.bool,\n // Override generated docs from .\n\n /**\n * @private\n */\n children: PropTypes.node\n});\nvar DropdownButton = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(DropdownButton, _React$Component);\n function DropdownButton() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = DropdownButton.prototype;\n _proto.render = function render() {\n var _this$props = this.props,\n bsSize = _this$props.bsSize,\n bsStyle = _this$props.bsStyle,\n title = _this$props.title,\n children = _this$props.children,\n props = _objectWithoutPropertiesLoose(_this$props, [\"bsSize\", \"bsStyle\", \"title\", \"children\"]);\n var _splitComponentProps = splitComponentProps(props, Dropdown.ControlledComponent),\n dropdownProps = _splitComponentProps[0],\n toggleProps = _splitComponentProps[1];\n return /*#__PURE__*/React.createElement(Dropdown, _extends({}, dropdownProps, {\n bsSize: bsSize,\n bsStyle: bsStyle\n }), /*#__PURE__*/React.createElement(Dropdown.Toggle, _extends({}, toggleProps, {\n bsSize: bsSize,\n bsStyle: bsStyle\n }), title), /*#__PURE__*/React.createElement(Dropdown.Menu, null, children));\n };\n return DropdownButton;\n}(React.Component);\nDropdownButton.propTypes = propTypes;\nexport default DropdownButton;","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _Array$from from \"@babel/runtime-corejs2/core-js/array/from\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport _assertThisInitialized from \"@babel/runtime-corejs2/helpers/esm/assertThisInitialized\";\nimport classNames from 'classnames';\nimport keycode from 'keycode';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport ReactDOM from 'react-dom';\nimport RootCloseWrapper from 'react-overlays/lib/RootCloseWrapper';\nimport { bsClass, getClassSet, prefix, splitBsPropsAndOmit } from './utils/bootstrapUtils';\nimport createChainedFunction from './utils/createChainedFunction';\nimport ValidComponentChildren from './utils/ValidComponentChildren';\nvar propTypes = {\n open: PropTypes.bool,\n pullRight: PropTypes.bool,\n onClose: PropTypes.func,\n labelledBy: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n onSelect: PropTypes.func,\n rootCloseEvent: PropTypes.oneOf(['click', 'mousedown'])\n};\nvar defaultProps = {\n bsRole: 'menu',\n pullRight: false\n};\nvar DropdownMenu = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(DropdownMenu, _React$Component);\n function DropdownMenu(props) {\n var _this;\n _this = _React$Component.call(this, props) || this;\n _this.handleRootClose = _this.handleRootClose.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n _this.handleKeyDown = _this.handleKeyDown.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n return _this;\n }\n var _proto = DropdownMenu.prototype;\n _proto.getFocusableMenuItems = function getFocusableMenuItems() {\n var node = ReactDOM.findDOMNode(this);\n if (!node) {\n return [];\n }\n return _Array$from(node.querySelectorAll('[tabIndex=\"-1\"]'));\n };\n _proto.getItemsAndActiveIndex = function getItemsAndActiveIndex() {\n var items = this.getFocusableMenuItems();\n var activeIndex = items.indexOf(document.activeElement);\n return {\n items: items,\n activeIndex: activeIndex\n };\n };\n _proto.focusNext = function focusNext() {\n var _this$getItemsAndActi = this.getItemsAndActiveIndex(),\n items = _this$getItemsAndActi.items,\n activeIndex = _this$getItemsAndActi.activeIndex;\n if (items.length === 0) {\n return;\n }\n var nextIndex = activeIndex === items.length - 1 ? 0 : activeIndex + 1;\n items[nextIndex].focus();\n };\n _proto.focusPrevious = function focusPrevious() {\n var _this$getItemsAndActi2 = this.getItemsAndActiveIndex(),\n items = _this$getItemsAndActi2.items,\n activeIndex = _this$getItemsAndActi2.activeIndex;\n if (items.length === 0) {\n return;\n }\n var prevIndex = activeIndex === 0 ? items.length - 1 : activeIndex - 1;\n items[prevIndex].focus();\n };\n _proto.handleKeyDown = function handleKeyDown(event) {\n switch (event.keyCode) {\n case keycode.codes.down:\n this.focusNext();\n event.preventDefault();\n break;\n case keycode.codes.up:\n this.focusPrevious();\n event.preventDefault();\n break;\n case keycode.codes.esc:\n case keycode.codes.tab:\n this.props.onClose(event, {\n source: 'keydown'\n });\n break;\n default:\n }\n };\n _proto.handleRootClose = function handleRootClose(event) {\n this.props.onClose(event, {\n source: 'rootClose'\n });\n };\n _proto.render = function render() {\n var _extends2,\n _this2 = this;\n var _this$props = this.props,\n open = _this$props.open,\n pullRight = _this$props.pullRight,\n labelledBy = _this$props.labelledBy,\n onSelect = _this$props.onSelect,\n className = _this$props.className,\n rootCloseEvent = _this$props.rootCloseEvent,\n children = _this$props.children,\n props = _objectWithoutPropertiesLoose(_this$props, [\"open\", \"pullRight\", \"labelledBy\", \"onSelect\", \"className\", \"rootCloseEvent\", \"children\"]);\n var _splitBsPropsAndOmit = splitBsPropsAndOmit(props, ['onClose']),\n bsProps = _splitBsPropsAndOmit[0],\n elementProps = _splitBsPropsAndOmit[1];\n var classes = _extends({}, getClassSet(bsProps), (_extends2 = {}, _extends2[prefix(bsProps, 'right')] = pullRight, _extends2));\n return /*#__PURE__*/React.createElement(RootCloseWrapper, {\n disabled: !open,\n onRootClose: this.handleRootClose,\n event: rootCloseEvent\n }, /*#__PURE__*/React.createElement(\"ul\", _extends({}, elementProps, {\n role: \"menu\",\n className: classNames(className, classes),\n \"aria-labelledby\": labelledBy\n }), ValidComponentChildren.map(children, function (child) {\n return /*#__PURE__*/React.cloneElement(child, {\n onKeyDown: createChainedFunction(child.props.onKeyDown, _this2.handleKeyDown),\n onSelect: createChainedFunction(child.props.onSelect, onSelect)\n });\n })));\n };\n return DropdownMenu;\n}(React.Component);\nDropdownMenu.propTypes = propTypes;\nDropdownMenu.defaultProps = defaultProps;\nexport default bsClass('dropdown-menu', DropdownMenu);","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport Button from './Button';\nimport SafeAnchor from './SafeAnchor';\nimport { bsClass as setBsClass } from './utils/bootstrapUtils';\nvar propTypes = {\n noCaret: PropTypes.bool,\n open: PropTypes.bool,\n title: PropTypes.string,\n useAnchor: PropTypes.bool\n};\nvar defaultProps = {\n open: false,\n useAnchor: false,\n bsRole: 'toggle'\n};\nvar DropdownToggle = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(DropdownToggle, _React$Component);\n function DropdownToggle() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = DropdownToggle.prototype;\n _proto.render = function render() {\n var _this$props = this.props,\n noCaret = _this$props.noCaret,\n open = _this$props.open,\n useAnchor = _this$props.useAnchor,\n bsClass = _this$props.bsClass,\n className = _this$props.className,\n children = _this$props.children,\n props = _objectWithoutPropertiesLoose(_this$props, [\"noCaret\", \"open\", \"useAnchor\", \"bsClass\", \"className\", \"children\"]);\n delete props.bsRole;\n var Component = useAnchor ? SafeAnchor : Button;\n var useCaret = !noCaret; // This intentionally forwards bsSize and bsStyle (if set) to the\n // underlying component, to allow it to render size and style variants.\n // FIXME: Should this really fall back to `title` as children?\n\n return /*#__PURE__*/React.createElement(Component, _extends({}, props, {\n role: \"button\",\n className: classNames(className, bsClass),\n \"aria-haspopup\": true,\n \"aria-expanded\": open\n }), children || props.title, useCaret && ' ', useCaret && /*#__PURE__*/React.createElement(\"span\", {\n className: \"caret\"\n }));\n };\n return DropdownToggle;\n}(React.Component);\nDropdownToggle.propTypes = propTypes;\nDropdownToggle.defaultProps = defaultProps;\nexport default setBsClass('dropdown-toggle', DropdownToggle);","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nvar _fadeStyles;\nimport classNames from 'classnames';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport Transition, { ENTERED, ENTERING } from 'react-transition-group/Transition';\nvar propTypes = {\n /**\n * Show the component; triggers the fade in or fade out animation\n */\n \"in\": PropTypes.bool,\n /**\n * Wait until the first \"enter\" transition to mount the component (add it to the DOM)\n */\n mountOnEnter: PropTypes.bool,\n /**\n * Unmount the component (remove it from the DOM) when it is faded out\n */\n unmountOnExit: PropTypes.bool,\n /**\n * Run the fade in animation when the component mounts, if it is initially\n * shown\n */\n appear: PropTypes.bool,\n /**\n * Duration of the fade animation in milliseconds, to ensure that finishing\n * callbacks are fired even if the original browser transition end events are\n * canceled\n */\n timeout: PropTypes.number,\n /**\n * Callback fired before the component fades in\n */\n onEnter: PropTypes.func,\n /**\n * Callback fired after the component starts to fade in\n */\n onEntering: PropTypes.func,\n /**\n * Callback fired after the has component faded in\n */\n onEntered: PropTypes.func,\n /**\n * Callback fired before the component fades out\n */\n onExit: PropTypes.func,\n /**\n * Callback fired after the component starts to fade out\n */\n onExiting: PropTypes.func,\n /**\n * Callback fired after the component has faded out\n */\n onExited: PropTypes.func\n};\nvar defaultProps = {\n \"in\": false,\n timeout: 300,\n mountOnEnter: false,\n unmountOnExit: false,\n appear: false\n};\nvar fadeStyles = (_fadeStyles = {}, _fadeStyles[ENTERING] = 'in', _fadeStyles[ENTERED] = 'in', _fadeStyles);\nvar Fade = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Fade, _React$Component);\n function Fade() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = Fade.prototype;\n _proto.render = function render() {\n var _this$props = this.props,\n className = _this$props.className,\n children = _this$props.children,\n props = _objectWithoutPropertiesLoose(_this$props, [\"className\", \"children\"]);\n return /*#__PURE__*/React.createElement(Transition, props, function (status, innerProps) {\n return /*#__PURE__*/React.cloneElement(children, _extends({}, innerProps, {\n className: classNames('fade', className, children.props.className, fadeStyles[status])\n }));\n });\n };\n return Fade;\n}(React.Component);\nFade.propTypes = propTypes;\nFade.defaultProps = defaultProps;\nexport default Fade;","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport elementType from 'prop-types-extra/lib/elementType';\nimport { bsClass, prefix, splitBsProps } from './utils/bootstrapUtils';\nvar propTypes = {\n horizontal: PropTypes.bool,\n inline: PropTypes.bool,\n componentClass: elementType\n};\nvar defaultProps = {\n horizontal: false,\n inline: false,\n componentClass: 'form'\n};\nvar Form = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Form, _React$Component);\n function Form() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = Form.prototype;\n _proto.render = function render() {\n var _this$props = this.props,\n horizontal = _this$props.horizontal,\n inline = _this$props.inline,\n Component = _this$props.componentClass,\n className = _this$props.className,\n props = _objectWithoutPropertiesLoose(_this$props, [\"horizontal\", \"inline\", \"componentClass\", \"className\"]);\n var _splitBsProps = splitBsProps(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n var classes = [];\n if (horizontal) {\n classes.push(prefix(bsProps, 'horizontal'));\n }\n if (inline) {\n classes.push(prefix(bsProps, 'inline'));\n }\n return /*#__PURE__*/React.createElement(Component, _extends({}, elementProps, {\n className: classNames(className, classes)\n }));\n };\n return Form;\n}(React.Component);\nForm.propTypes = propTypes;\nForm.defaultProps = defaultProps;\nexport default bsClass('form', Form);","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport elementType from 'prop-types-extra/lib/elementType';\nimport warning from 'warning';\nimport FormControlFeedback from './FormControlFeedback';\nimport FormControlStatic from './FormControlStatic';\nimport { prefix, bsClass, getClassSet, splitBsProps, bsSizes } from './utils/bootstrapUtils';\nimport { SIZE_MAP, Size } from './utils/StyleConfig';\nvar propTypes = {\n componentClass: elementType,\n /**\n * Only relevant if `componentClass` is `'input'`.\n */\n type: PropTypes.string,\n /**\n * Uses `controlId` from `` if not explicitly specified.\n */\n id: PropTypes.string,\n /**\n * Attaches a ref to the `` element. Only functions can be used here.\n *\n * ```js\n * { this.input = ref; }} />\n * ```\n */\n inputRef: PropTypes.func\n};\nvar defaultProps = {\n componentClass: 'input'\n};\nvar contextTypes = {\n $bs_formGroup: PropTypes.object\n};\nvar FormControl = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(FormControl, _React$Component);\n function FormControl() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = FormControl.prototype;\n _proto.render = function render() {\n var formGroup = this.context.$bs_formGroup;\n var controlId = formGroup && formGroup.controlId;\n var _this$props = this.props,\n Component = _this$props.componentClass,\n type = _this$props.type,\n _this$props$id = _this$props.id,\n id = _this$props$id === void 0 ? controlId : _this$props$id,\n inputRef = _this$props.inputRef,\n className = _this$props.className,\n bsSize = _this$props.bsSize,\n props = _objectWithoutPropertiesLoose(_this$props, [\"componentClass\", \"type\", \"id\", \"inputRef\", \"className\", \"bsSize\"]);\n var _splitBsProps = splitBsProps(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n process.env.NODE_ENV !== \"production\" ? warning(controlId == null || id === controlId, '`controlId` is ignored on `` when `id` is specified.') : void 0; // input[type=\"file\"] should not have .form-control.\n\n var classes;\n if (type !== 'file') {\n classes = getClassSet(bsProps);\n } // If user provides a size, make sure to append it to classes as input-\n // e.g. if bsSize is small, it will append input-sm\n\n if (bsSize) {\n var size = SIZE_MAP[bsSize] || bsSize;\n classes[prefix({\n bsClass: 'input'\n }, size)] = true;\n }\n return /*#__PURE__*/React.createElement(Component, _extends({}, elementProps, {\n type: type,\n id: id,\n ref: inputRef,\n className: classNames(className, classes)\n }));\n };\n return FormControl;\n}(React.Component);\nFormControl.propTypes = propTypes;\nFormControl.defaultProps = defaultProps;\nFormControl.contextTypes = contextTypes;\nFormControl.Feedback = FormControlFeedback;\nFormControl.Static = FormControlStatic;\nexport default bsClass('form-control', bsSizes([Size.SMALL, Size.LARGE], FormControl));","import _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport Glyphicon from './Glyphicon';\nimport { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';\nvar defaultProps = {\n bsRole: 'feedback'\n};\nvar contextTypes = {\n $bs_formGroup: PropTypes.object\n};\nvar FormControlFeedback = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(FormControlFeedback, _React$Component);\n function FormControlFeedback() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = FormControlFeedback.prototype;\n _proto.getGlyph = function getGlyph(validationState) {\n switch (validationState) {\n case 'success':\n return 'ok';\n case 'warning':\n return 'warning-sign';\n case 'error':\n return 'remove';\n default:\n return null;\n }\n };\n _proto.renderDefaultFeedback = function renderDefaultFeedback(formGroup, className, classes, elementProps) {\n var glyph = this.getGlyph(formGroup && formGroup.validationState);\n if (!glyph) {\n return null;\n }\n return /*#__PURE__*/React.createElement(Glyphicon, _extends({}, elementProps, {\n glyph: glyph,\n className: classNames(className, classes)\n }));\n };\n _proto.render = function render() {\n var _this$props = this.props,\n className = _this$props.className,\n children = _this$props.children,\n props = _objectWithoutPropertiesLoose(_this$props, [\"className\", \"children\"]);\n var _splitBsProps = splitBsProps(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n var classes = getClassSet(bsProps);\n if (!children) {\n return this.renderDefaultFeedback(this.context.$bs_formGroup, className, classes, elementProps);\n }\n var child = React.Children.only(children);\n return /*#__PURE__*/React.cloneElement(child, _extends({}, elementProps, {\n className: classNames(child.props.className, className, classes)\n }));\n };\n return FormControlFeedback;\n}(React.Component);\nFormControlFeedback.defaultProps = defaultProps;\nFormControlFeedback.contextTypes = contextTypes;\nexport default bsClass('form-control-feedback', FormControlFeedback);","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport elementType from 'prop-types-extra/lib/elementType';\nimport { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';\nvar propTypes = {\n componentClass: elementType\n};\nvar defaultProps = {\n componentClass: 'p'\n};\nvar FormControlStatic = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(FormControlStatic, _React$Component);\n function FormControlStatic() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = FormControlStatic.prototype;\n _proto.render = function render() {\n var _this$props = this.props,\n Component = _this$props.componentClass,\n className = _this$props.className,\n props = _objectWithoutPropertiesLoose(_this$props, [\"componentClass\", \"className\"]);\n var _splitBsProps = splitBsProps(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n var classes = getClassSet(bsProps);\n return /*#__PURE__*/React.createElement(Component, _extends({}, elementProps, {\n className: classNames(className, classes)\n }));\n };\n return FormControlStatic;\n}(React.Component);\nFormControlStatic.propTypes = propTypes;\nFormControlStatic.defaultProps = defaultProps;\nexport default bsClass('form-control-static', FormControlStatic);","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { bsClass, bsSizes, getClassSet, splitBsPropsAndOmit } from './utils/bootstrapUtils';\nimport { Size } from './utils/StyleConfig';\nimport ValidComponentChildren from './utils/ValidComponentChildren';\nvar propTypes = {\n /**\n * Sets `id` on `` and `htmlFor` on ``.\n */\n controlId: PropTypes.string,\n validationState: PropTypes.oneOf(['success', 'warning', 'error', null])\n};\nvar childContextTypes = {\n $bs_formGroup: PropTypes.object.isRequired\n};\nvar FormGroup = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(FormGroup, _React$Component);\n function FormGroup() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = FormGroup.prototype;\n _proto.getChildContext = function getChildContext() {\n var _this$props = this.props,\n controlId = _this$props.controlId,\n validationState = _this$props.validationState;\n return {\n $bs_formGroup: {\n controlId: controlId,\n validationState: validationState\n }\n };\n };\n _proto.hasFeedback = function hasFeedback(children) {\n var _this = this;\n return ValidComponentChildren.some(children, function (child) {\n return child.props.bsRole === 'feedback' || child.props.children && _this.hasFeedback(child.props.children);\n });\n };\n _proto.render = function render() {\n var _this$props2 = this.props,\n validationState = _this$props2.validationState,\n className = _this$props2.className,\n children = _this$props2.children,\n props = _objectWithoutPropertiesLoose(_this$props2, [\"validationState\", \"className\", \"children\"]);\n var _splitBsPropsAndOmit = splitBsPropsAndOmit(props, ['controlId']),\n bsProps = _splitBsPropsAndOmit[0],\n elementProps = _splitBsPropsAndOmit[1];\n var classes = _extends({}, getClassSet(bsProps), {\n 'has-feedback': this.hasFeedback(children)\n });\n if (validationState) {\n classes[\"has-\" + validationState] = true;\n }\n return /*#__PURE__*/React.createElement(\"div\", _extends({}, elementProps, {\n className: classNames(className, classes)\n }), children);\n };\n return FormGroup;\n}(React.Component);\nFormGroup.propTypes = propTypes;\nFormGroup.childContextTypes = childContextTypes;\nexport default bsClass('form-group', bsSizes([Size.LARGE, Size.SMALL], FormGroup));","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { bsClass, getClassSet, prefix, splitBsProps } from './utils/bootstrapUtils';\nvar propTypes = {\n /**\n * An icon name without \"glyphicon-\" prefix. See e.g. http://getbootstrap.com/components/#glyphicons\n */\n glyph: PropTypes.string.isRequired\n};\nvar Glyphicon = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Glyphicon, _React$Component);\n function Glyphicon() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = Glyphicon.prototype;\n _proto.render = function render() {\n var _extends2;\n var _this$props = this.props,\n glyph = _this$props.glyph,\n className = _this$props.className,\n props = _objectWithoutPropertiesLoose(_this$props, [\"glyph\", \"className\"]);\n var _splitBsProps = splitBsProps(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n var classes = _extends({}, getClassSet(bsProps), (_extends2 = {}, _extends2[prefix(bsProps, glyph)] = true, _extends2));\n return /*#__PURE__*/React.createElement(\"span\", _extends({}, elementProps, {\n className: classNames(className, classes)\n }));\n };\n return Glyphicon;\n}(React.Component);\nGlyphicon.propTypes = propTypes;\nexport default bsClass('glyphicon', Glyphicon);","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport elementType from 'prop-types-extra/lib/elementType';\nimport { bsClass, prefix, splitBsProps } from './utils/bootstrapUtils';\nvar propTypes = {\n /**\n * Turn any fixed-width grid layout into a full-width layout by this property.\n *\n * Adds `container-fluid` class.\n */\n fluid: PropTypes.bool,\n /**\n * You can use a custom element for this component\n */\n componentClass: elementType\n};\nvar defaultProps = {\n componentClass: 'div',\n fluid: false\n};\nvar Grid = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Grid, _React$Component);\n function Grid() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = Grid.prototype;\n _proto.render = function render() {\n var _this$props = this.props,\n fluid = _this$props.fluid,\n Component = _this$props.componentClass,\n className = _this$props.className,\n props = _objectWithoutPropertiesLoose(_this$props, [\"fluid\", \"componentClass\", \"className\"]);\n var _splitBsProps = splitBsProps(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n var classes = prefix(bsProps, fluid && 'fluid');\n return /*#__PURE__*/React.createElement(Component, _extends({}, elementProps, {\n className: classNames(className, classes)\n }));\n };\n return Grid;\n}(React.Component);\nGrid.propTypes = propTypes;\nGrid.defaultProps = defaultProps;\nexport default bsClass('container', Grid);","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';\nvar HelpBlock = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(HelpBlock, _React$Component);\n function HelpBlock() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = HelpBlock.prototype;\n _proto.render = function render() {\n var _this$props = this.props,\n className = _this$props.className,\n props = _objectWithoutPropertiesLoose(_this$props, [\"className\"]);\n var _splitBsProps = splitBsProps(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n var classes = getClassSet(bsProps);\n return /*#__PURE__*/React.createElement(\"span\", _extends({}, elementProps, {\n className: classNames(className, classes)\n }));\n };\n return HelpBlock;\n}(React.Component);\nexport default bsClass('help-block', HelpBlock);","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { bsClass, prefix, splitBsProps } from './utils/bootstrapUtils';\nvar propTypes = {\n /**\n * Sets image as responsive image\n */\n responsive: PropTypes.bool,\n /**\n * Sets image shape as rounded\n */\n rounded: PropTypes.bool,\n /**\n * Sets image shape as circle\n */\n circle: PropTypes.bool,\n /**\n * Sets image shape as thumbnail\n */\n thumbnail: PropTypes.bool\n};\nvar defaultProps = {\n responsive: false,\n rounded: false,\n circle: false,\n thumbnail: false\n};\nvar Image = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Image, _React$Component);\n function Image() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = Image.prototype;\n _proto.render = function render() {\n var _classes;\n var _this$props = this.props,\n responsive = _this$props.responsive,\n rounded = _this$props.rounded,\n circle = _this$props.circle,\n thumbnail = _this$props.thumbnail,\n className = _this$props.className,\n props = _objectWithoutPropertiesLoose(_this$props, [\"responsive\", \"rounded\", \"circle\", \"thumbnail\", \"className\"]);\n var _splitBsProps = splitBsProps(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n var classes = (_classes = {}, _classes[prefix(bsProps, 'responsive')] = responsive, _classes[prefix(bsProps, 'rounded')] = rounded, _classes[prefix(bsProps, 'circle')] = circle, _classes[prefix(bsProps, 'thumbnail')] = thumbnail, _classes);\n return /*#__PURE__*/React.createElement(\"img\", _extends({}, elementProps, {\n className: classNames(className, classes)\n }));\n };\n return Image;\n}(React.Component);\nImage.propTypes = propTypes;\nImage.defaultProps = defaultProps;\nexport default bsClass('img', Image);","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport InputGroupAddon from './InputGroupAddon';\nimport InputGroupButton from './InputGroupButton';\nimport { bsClass, bsSizes, getClassSet, splitBsProps } from './utils/bootstrapUtils';\nimport { Size } from './utils/StyleConfig';\nvar InputGroup = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(InputGroup, _React$Component);\n function InputGroup() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = InputGroup.prototype;\n _proto.render = function render() {\n var _this$props = this.props,\n className = _this$props.className,\n props = _objectWithoutPropertiesLoose(_this$props, [\"className\"]);\n var _splitBsProps = splitBsProps(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n var classes = getClassSet(bsProps);\n return /*#__PURE__*/React.createElement(\"span\", _extends({}, elementProps, {\n className: classNames(className, classes)\n }));\n };\n return InputGroup;\n}(React.Component);\nInputGroup.Addon = InputGroupAddon;\nInputGroup.Button = InputGroupButton;\nexport default bsClass('input-group', bsSizes([Size.LARGE, Size.SMALL], InputGroup));","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';\nvar InputGroupAddon = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(InputGroupAddon, _React$Component);\n function InputGroupAddon() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = InputGroupAddon.prototype;\n _proto.render = function render() {\n var _this$props = this.props,\n className = _this$props.className,\n props = _objectWithoutPropertiesLoose(_this$props, [\"className\"]);\n var _splitBsProps = splitBsProps(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n var classes = getClassSet(bsProps);\n return /*#__PURE__*/React.createElement(\"span\", _extends({}, elementProps, {\n className: classNames(className, classes)\n }));\n };\n return InputGroupAddon;\n}(React.Component);\nexport default bsClass('input-group-addon', InputGroupAddon);","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';\nvar InputGroupButton = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(InputGroupButton, _React$Component);\n function InputGroupButton() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = InputGroupButton.prototype;\n _proto.render = function render() {\n var _this$props = this.props,\n className = _this$props.className,\n props = _objectWithoutPropertiesLoose(_this$props, [\"className\"]);\n var _splitBsProps = splitBsProps(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n var classes = getClassSet(bsProps);\n return /*#__PURE__*/React.createElement(\"span\", _extends({}, elementProps, {\n className: classNames(className, classes)\n }));\n };\n return InputGroupButton;\n}(React.Component);\nexport default bsClass('input-group-btn', InputGroupButton);","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport React from 'react';\nimport classNames from 'classnames';\nimport elementType from 'prop-types-extra/lib/elementType';\nimport { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';\nvar propTypes = {\n componentClass: elementType\n};\nvar defaultProps = {\n componentClass: 'div'\n};\nvar Jumbotron = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Jumbotron, _React$Component);\n function Jumbotron() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = Jumbotron.prototype;\n _proto.render = function render() {\n var _this$props = this.props,\n Component = _this$props.componentClass,\n className = _this$props.className,\n props = _objectWithoutPropertiesLoose(_this$props, [\"componentClass\", \"className\"]);\n var _splitBsProps = splitBsProps(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n var classes = getClassSet(bsProps);\n return /*#__PURE__*/React.createElement(Component, _extends({}, elementProps, {\n className: classNames(className, classes)\n }));\n };\n return Jumbotron;\n}(React.Component);\nJumbotron.propTypes = propTypes;\nJumbotron.defaultProps = defaultProps;\nexport default bsClass('jumbotron', Jumbotron);","import _Object$values from \"@babel/runtime-corejs2/core-js/object/values\";\nimport _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport { bsClass, bsStyles, getClassSet, splitBsProps } from './utils/bootstrapUtils';\nimport { State, Style } from './utils/StyleConfig';\nvar Label = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Label, _React$Component);\n function Label() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = Label.prototype;\n _proto.hasContent = function hasContent(children) {\n var result = false;\n React.Children.forEach(children, function (child) {\n if (result) {\n return;\n }\n if (child || child === 0) {\n result = true;\n }\n });\n return result;\n };\n _proto.render = function render() {\n var _this$props = this.props,\n className = _this$props.className,\n children = _this$props.children,\n props = _objectWithoutPropertiesLoose(_this$props, [\"className\", \"children\"]);\n var _splitBsProps = splitBsProps(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n var classes = _extends({}, getClassSet(bsProps), {\n // Hack for collapsing on IE8.\n hidden: !this.hasContent(children)\n });\n return /*#__PURE__*/React.createElement(\"span\", _extends({}, elementProps, {\n className: classNames(className, classes)\n }), children);\n };\n return Label;\n}(React.Component);\nexport default bsClass('label', bsStyles(_Object$values(State).concat([Style.DEFAULT, Style.PRIMARY]), Style.DEFAULT, Label));","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport classNames from 'classnames';\nimport React, { cloneElement } from 'react';\nimport elementType from 'prop-types-extra/lib/elementType';\nimport ListGroupItem from './ListGroupItem';\nimport { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';\nimport ValidComponentChildren from './utils/ValidComponentChildren';\nvar propTypes = {\n /**\n * You can use a custom element type for this component.\n *\n * If not specified, it will be treated as `'li'` if every child is a\n * non-actionable ``, and `'div'` otherwise.\n */\n componentClass: elementType\n};\nfunction getDefaultComponent(children) {\n if (!children) {\n // FIXME: This is the old behavior. Is this right?\n return 'div';\n }\n if (ValidComponentChildren.some(children, function (child) {\n return child.type !== ListGroupItem || child.props.href || child.props.onClick;\n })) {\n return 'div';\n }\n return 'ul';\n}\nvar ListGroup = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(ListGroup, _React$Component);\n function ListGroup() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = ListGroup.prototype;\n _proto.render = function render() {\n var _this$props = this.props,\n children = _this$props.children,\n _this$props$component = _this$props.componentClass,\n Component = _this$props$component === void 0 ? getDefaultComponent(children) : _this$props$component,\n className = _this$props.className,\n props = _objectWithoutPropertiesLoose(_this$props, [\"children\", \"componentClass\", \"className\"]);\n var _splitBsProps = splitBsProps(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n var classes = getClassSet(bsProps);\n var useListItem = Component === 'ul' && ValidComponentChildren.every(children, function (child) {\n return child.type === ListGroupItem;\n });\n return /*#__PURE__*/React.createElement(Component, _extends({}, elementProps, {\n className: classNames(className, classes)\n }), useListItem ? ValidComponentChildren.map(children, function (child) {\n return /*#__PURE__*/cloneElement(child, {\n listItem: true\n });\n }) : children);\n };\n return ListGroup;\n}(React.Component);\nListGroup.propTypes = propTypes;\nexport default bsClass('list-group', ListGroup);","import _Object$values from \"@babel/runtime-corejs2/core-js/object/values\";\nimport _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport classNames from 'classnames';\nimport React, { cloneElement } from 'react';\nimport PropTypes from 'prop-types';\nimport { bsClass, bsStyles, getClassSet, prefix, splitBsProps } from './utils/bootstrapUtils';\nimport { State } from './utils/StyleConfig';\nvar propTypes = {\n active: PropTypes.any,\n disabled: PropTypes.any,\n header: PropTypes.node,\n listItem: PropTypes.bool,\n onClick: PropTypes.func,\n href: PropTypes.string,\n type: PropTypes.string\n};\nvar defaultProps = {\n listItem: false\n};\nvar ListGroupItem = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(ListGroupItem, _React$Component);\n function ListGroupItem() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = ListGroupItem.prototype;\n _proto.renderHeader = function renderHeader(header, headingClassName) {\n if (/*#__PURE__*/React.isValidElement(header)) {\n return /*#__PURE__*/cloneElement(header, {\n className: classNames(header.props.className, headingClassName)\n });\n }\n return /*#__PURE__*/React.createElement(\"h4\", {\n className: headingClassName\n }, header);\n };\n _proto.render = function render() {\n var _this$props = this.props,\n active = _this$props.active,\n disabled = _this$props.disabled,\n className = _this$props.className,\n header = _this$props.header,\n listItem = _this$props.listItem,\n children = _this$props.children,\n props = _objectWithoutPropertiesLoose(_this$props, [\"active\", \"disabled\", \"className\", \"header\", \"listItem\", \"children\"]);\n var _splitBsProps = splitBsProps(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n var classes = _extends({}, getClassSet(bsProps), {\n active: active,\n disabled: disabled\n });\n var Component;\n if (elementProps.href) {\n Component = 'a';\n } else if (elementProps.onClick) {\n Component = 'button';\n elementProps.type = elementProps.type || 'button';\n } else if (listItem) {\n Component = 'li';\n } else {\n Component = 'span';\n }\n elementProps.className = classNames(className, classes); // TODO: Deprecate `header` prop.\n\n if (header) {\n return /*#__PURE__*/React.createElement(Component, elementProps, this.renderHeader(header, prefix(bsProps, 'heading')), /*#__PURE__*/React.createElement(\"p\", {\n className: prefix(bsProps, 'text')\n }, children));\n }\n return /*#__PURE__*/React.createElement(Component, elementProps, children);\n };\n return ListGroupItem;\n}(React.Component);\nListGroupItem.propTypes = propTypes;\nListGroupItem.defaultProps = defaultProps;\nexport default bsClass('list-group-item', bsStyles(_Object$values(State), ListGroupItem));","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport elementType from 'prop-types-extra/lib/elementType';\nimport MediaBody from './MediaBody';\nimport MediaHeading from './MediaHeading';\nimport MediaLeft from './MediaLeft';\nimport MediaList from './MediaList';\nimport MediaListItem from './MediaListItem';\nimport MediaRight from './MediaRight';\nimport { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';\nvar propTypes = {\n componentClass: elementType\n};\nvar defaultProps = {\n componentClass: 'div'\n};\nvar Media = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Media, _React$Component);\n function Media() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = Media.prototype;\n _proto.render = function render() {\n var _this$props = this.props,\n Component = _this$props.componentClass,\n className = _this$props.className,\n props = _objectWithoutPropertiesLoose(_this$props, [\"componentClass\", \"className\"]);\n var _splitBsProps = splitBsProps(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n var classes = getClassSet(bsProps);\n return /*#__PURE__*/React.createElement(Component, _extends({}, elementProps, {\n className: classNames(className, classes)\n }));\n };\n return Media;\n}(React.Component);\nMedia.propTypes = propTypes;\nMedia.defaultProps = defaultProps;\nMedia.Heading = MediaHeading;\nMedia.Body = MediaBody;\nMedia.Left = MediaLeft;\nMedia.Right = MediaRight;\nMedia.List = MediaList;\nMedia.ListItem = MediaListItem;\nexport default bsClass('media', Media);","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport elementType from 'prop-types-extra/lib/elementType';\nimport Media from './Media';\nimport { bsClass, getClassSet, prefix, splitBsProps } from './utils/bootstrapUtils';\nvar propTypes = {\n /**\n * Align the media to the top, middle, or bottom of the media object.\n */\n align: PropTypes.oneOf(['top', 'middle', 'bottom']),\n componentClass: elementType\n};\nvar defaultProps = {\n componentClass: 'div'\n};\nvar MediaBody = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(MediaBody, _React$Component);\n function MediaBody() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = MediaBody.prototype;\n _proto.render = function render() {\n var _this$props = this.props,\n Component = _this$props.componentClass,\n align = _this$props.align,\n className = _this$props.className,\n props = _objectWithoutPropertiesLoose(_this$props, [\"componentClass\", \"align\", \"className\"]);\n var _splitBsProps = splitBsProps(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n var classes = getClassSet(bsProps);\n if (align) {\n // The class is e.g. `media-top`, not `media-left-top`.\n classes[prefix(Media.defaultProps, align)] = true;\n }\n return /*#__PURE__*/React.createElement(Component, _extends({}, elementProps, {\n className: classNames(className, classes)\n }));\n };\n return MediaBody;\n}(React.Component);\nMediaBody.propTypes = propTypes;\nMediaBody.defaultProps = defaultProps;\nexport default bsClass('media-body', MediaBody);","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport elementType from 'prop-types-extra/lib/elementType';\nimport { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';\nvar propTypes = {\n componentClass: elementType\n};\nvar defaultProps = {\n componentClass: 'h4'\n};\nvar MediaHeading = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(MediaHeading, _React$Component);\n function MediaHeading() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = MediaHeading.prototype;\n _proto.render = function render() {\n var _this$props = this.props,\n Component = _this$props.componentClass,\n className = _this$props.className,\n props = _objectWithoutPropertiesLoose(_this$props, [\"componentClass\", \"className\"]);\n var _splitBsProps = splitBsProps(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n var classes = getClassSet(bsProps);\n return /*#__PURE__*/React.createElement(Component, _extends({}, elementProps, {\n className: classNames(className, classes)\n }));\n };\n return MediaHeading;\n}(React.Component);\nMediaHeading.propTypes = propTypes;\nMediaHeading.defaultProps = defaultProps;\nexport default bsClass('media-heading', MediaHeading);","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport Media from './Media';\nimport { bsClass, getClassSet, prefix, splitBsProps } from './utils/bootstrapUtils';\nvar propTypes = {\n /**\n * Align the media to the top, middle, or bottom of the media object.\n */\n align: PropTypes.oneOf(['top', 'middle', 'bottom'])\n};\nvar MediaLeft = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(MediaLeft, _React$Component);\n function MediaLeft() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = MediaLeft.prototype;\n _proto.render = function render() {\n var _this$props = this.props,\n align = _this$props.align,\n className = _this$props.className,\n props = _objectWithoutPropertiesLoose(_this$props, [\"align\", \"className\"]);\n var _splitBsProps = splitBsProps(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n var classes = getClassSet(bsProps);\n if (align) {\n // The class is e.g. `media-top`, not `media-left-top`.\n classes[prefix(Media.defaultProps, align)] = true;\n }\n return /*#__PURE__*/React.createElement(\"div\", _extends({}, elementProps, {\n className: classNames(className, classes)\n }));\n };\n return MediaLeft;\n}(React.Component);\nMediaLeft.propTypes = propTypes;\nexport default bsClass('media-left', MediaLeft);","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';\nvar MediaList = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(MediaList, _React$Component);\n function MediaList() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = MediaList.prototype;\n _proto.render = function render() {\n var _this$props = this.props,\n className = _this$props.className,\n props = _objectWithoutPropertiesLoose(_this$props, [\"className\"]);\n var _splitBsProps = splitBsProps(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n var classes = getClassSet(bsProps);\n return /*#__PURE__*/React.createElement(\"ul\", _extends({}, elementProps, {\n className: classNames(className, classes)\n }));\n };\n return MediaList;\n}(React.Component);\nexport default bsClass('media-list', MediaList);","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';\nvar MediaListItem = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(MediaListItem, _React$Component);\n function MediaListItem() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = MediaListItem.prototype;\n _proto.render = function render() {\n var _this$props = this.props,\n className = _this$props.className,\n props = _objectWithoutPropertiesLoose(_this$props, [\"className\"]);\n var _splitBsProps = splitBsProps(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n var classes = getClassSet(bsProps);\n return /*#__PURE__*/React.createElement(\"li\", _extends({}, elementProps, {\n className: classNames(className, classes)\n }));\n };\n return MediaListItem;\n}(React.Component);\nexport default bsClass('media', MediaListItem);","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport Media from './Media';\nimport { bsClass, getClassSet, prefix, splitBsProps } from './utils/bootstrapUtils';\nvar propTypes = {\n /**\n * Align the media to the top, middle, or bottom of the media object.\n */\n align: PropTypes.oneOf(['top', 'middle', 'bottom'])\n};\nvar MediaRight = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(MediaRight, _React$Component);\n function MediaRight() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = MediaRight.prototype;\n _proto.render = function render() {\n var _this$props = this.props,\n align = _this$props.align,\n className = _this$props.className,\n props = _objectWithoutPropertiesLoose(_this$props, [\"align\", \"className\"]);\n var _splitBsProps = splitBsProps(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n var classes = getClassSet(bsProps);\n if (align) {\n // The class is e.g. `media-top`, not `media-right-top`.\n classes[prefix(Media.defaultProps, align)] = true;\n }\n return /*#__PURE__*/React.createElement(\"div\", _extends({}, elementProps, {\n className: classNames(className, classes)\n }));\n };\n return MediaRight;\n}(React.Component);\nMediaRight.propTypes = propTypes;\nexport default bsClass('media-right', MediaRight);","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport _assertThisInitialized from \"@babel/runtime-corejs2/helpers/esm/assertThisInitialized\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport all from 'prop-types-extra/lib/all';\nimport SafeAnchor from './SafeAnchor';\nimport { bsClass, prefix, splitBsPropsAndOmit } from './utils/bootstrapUtils';\nimport createChainedFunction from './utils/createChainedFunction';\nvar propTypes = {\n /**\n * Highlight the menu item as active.\n */\n active: PropTypes.bool,\n /**\n * Disable the menu item, making it unselectable.\n */\n disabled: PropTypes.bool,\n /**\n * Styles the menu item as a horizontal rule, providing visual separation between\n * groups of menu items.\n */\n divider: all(PropTypes.bool, function (_ref) {\n var divider = _ref.divider,\n children = _ref.children;\n return divider && children ? new Error('Children will not be rendered for dividers') : null;\n }),\n /**\n * Value passed to the `onSelect` handler, useful for identifying the selected menu item.\n */\n eventKey: PropTypes.any,\n /**\n * Styles the menu item as a header label, useful for describing a group of menu items.\n */\n header: PropTypes.bool,\n /**\n * HTML `href` attribute corresponding to `a.href`.\n */\n href: PropTypes.string,\n /**\n * Callback fired when the menu item is clicked.\n */\n onClick: PropTypes.func,\n /**\n * Callback fired when the menu item is selected.\n *\n * ```js\n * (eventKey: any, event: Object) => any\n * ```\n */\n onSelect: PropTypes.func\n};\nvar defaultProps = {\n divider: false,\n disabled: false,\n header: false\n};\nvar MenuItem = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(MenuItem, _React$Component);\n function MenuItem(props, context) {\n var _this;\n _this = _React$Component.call(this, props, context) || this;\n _this.handleClick = _this.handleClick.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n return _this;\n }\n var _proto = MenuItem.prototype;\n _proto.handleClick = function handleClick(event) {\n var _this$props = this.props,\n href = _this$props.href,\n disabled = _this$props.disabled,\n onSelect = _this$props.onSelect,\n eventKey = _this$props.eventKey;\n if (!href || disabled) {\n event.preventDefault();\n }\n if (disabled) {\n return;\n }\n if (onSelect) {\n onSelect(eventKey, event);\n }\n };\n _proto.render = function render() {\n var _this$props2 = this.props,\n active = _this$props2.active,\n disabled = _this$props2.disabled,\n divider = _this$props2.divider,\n header = _this$props2.header,\n onClick = _this$props2.onClick,\n className = _this$props2.className,\n style = _this$props2.style,\n props = _objectWithoutPropertiesLoose(_this$props2, [\"active\", \"disabled\", \"divider\", \"header\", \"onClick\", \"className\", \"style\"]);\n var _splitBsPropsAndOmit = splitBsPropsAndOmit(props, ['eventKey', 'onSelect']),\n bsProps = _splitBsPropsAndOmit[0],\n elementProps = _splitBsPropsAndOmit[1];\n if (divider) {\n // Forcibly blank out the children; separators shouldn't render any.\n elementProps.children = undefined;\n return /*#__PURE__*/React.createElement(\"li\", _extends({}, elementProps, {\n role: \"separator\",\n className: classNames(className, 'divider'),\n style: style\n }));\n }\n if (header) {\n return /*#__PURE__*/React.createElement(\"li\", _extends({}, elementProps, {\n role: \"heading\",\n className: classNames(className, prefix(bsProps, 'header')),\n style: style\n }));\n }\n return /*#__PURE__*/React.createElement(\"li\", {\n role: \"presentation\",\n className: classNames(className, {\n active: active,\n disabled: disabled\n }),\n style: style\n }, /*#__PURE__*/React.createElement(SafeAnchor, _extends({}, elementProps, {\n role: \"menuitem\",\n tabIndex: \"-1\",\n onClick: createChainedFunction(onClick, this.handleClick)\n })));\n };\n return MenuItem;\n}(React.Component);\nMenuItem.propTypes = propTypes;\nMenuItem.defaultProps = defaultProps;\nexport default bsClass('dropdown', MenuItem);","import _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport _assertThisInitialized from \"@babel/runtime-corejs2/helpers/esm/assertThisInitialized\";\nimport _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport classNames from 'classnames';\nimport events from 'dom-helpers/events';\nimport ownerDocument from 'dom-helpers/ownerDocument';\nimport canUseDOM from 'dom-helpers/util/inDOM';\nimport getScrollbarSize from 'dom-helpers/util/scrollbarSize';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport ReactDOM from 'react-dom';\nimport BaseModal from 'react-overlays/lib/Modal';\nimport isOverflowing from 'react-overlays/lib/utils/isOverflowing';\nimport elementType from 'prop-types-extra/lib/elementType';\nimport Fade from './Fade';\nimport Body from './ModalBody';\nimport ModalDialog from './ModalDialog';\nimport Footer from './ModalFooter';\nimport Header from './ModalHeader';\nimport Title from './ModalTitle';\nimport { bsClass, bsSizes, prefix } from './utils/bootstrapUtils';\nimport createChainedFunction from './utils/createChainedFunction';\nimport splitComponentProps from './utils/splitComponentProps';\nimport { Size } from './utils/StyleConfig';\nvar propTypes = _extends({}, BaseModal.propTypes, ModalDialog.propTypes, {\n /**\n * Include a backdrop component. Specify 'static' for a backdrop that doesn't\n * trigger an \"onHide\" when clicked.\n */\n backdrop: PropTypes.oneOf(['static', true, false]),\n /**\n * Add an optional extra class name to .modal-backdrop\n * It could end up looking like class=\"modal-backdrop foo-modal-backdrop in\".\n */\n backdropClassName: PropTypes.string,\n /**\n * Close the modal when escape key is pressed\n */\n keyboard: PropTypes.bool,\n /**\n * Open and close the Modal with a slide and fade animation.\n */\n animation: PropTypes.bool,\n /**\n * A Component type that provides the modal content Markup. This is a useful\n * prop when you want to use your own styles and markup to create a custom\n * modal component.\n */\n dialogComponentClass: elementType,\n /**\n * When `true` The modal will automatically shift focus to itself when it\n * opens, and replace it to the last focused element when it closes.\n * Generally this should never be set to false as it makes the Modal less\n * accessible to assistive technologies, like screen-readers.\n */\n autoFocus: PropTypes.bool,\n /**\n * When `true` The modal will prevent focus from leaving the Modal while\n * open. Consider leaving the default value here, as it is necessary to make\n * the Modal work well with assistive technologies, such as screen readers.\n */\n enforceFocus: PropTypes.bool,\n /**\n * When `true` The modal will restore focus to previously focused element once\n * modal is hidden\n */\n restoreFocus: PropTypes.bool,\n /**\n * When `true` The modal will show itself.\n */\n show: PropTypes.bool,\n /**\n * A callback fired when the header closeButton or non-static backdrop is\n * clicked. Required if either are specified.\n */\n onHide: PropTypes.func,\n /**\n * Callback fired before the Modal transitions in\n */\n onEnter: PropTypes.func,\n /**\n * Callback fired as the Modal begins to transition in\n */\n onEntering: PropTypes.func,\n /**\n * Callback fired after the Modal finishes transitioning in\n */\n onEntered: PropTypes.func,\n /**\n * Callback fired right before the Modal transitions out\n */\n onExit: PropTypes.func,\n /**\n * Callback fired as the Modal begins to transition out\n */\n onExiting: PropTypes.func,\n /**\n * Callback fired after the Modal finishes transitioning out\n */\n onExited: PropTypes.func,\n /**\n * @private\n */\n container: BaseModal.propTypes.container\n});\nvar defaultProps = _extends({}, BaseModal.defaultProps, {\n animation: true,\n dialogComponentClass: ModalDialog\n});\nvar childContextTypes = {\n $bs_modal: PropTypes.shape({\n onHide: PropTypes.func\n })\n};\n/* eslint-disable no-use-before-define, react/no-multi-comp */\n\nfunction DialogTransition(props) {\n return /*#__PURE__*/React.createElement(Fade, _extends({}, props, {\n timeout: Modal.TRANSITION_DURATION\n }));\n}\nfunction BackdropTransition(props) {\n return /*#__PURE__*/React.createElement(Fade, _extends({}, props, {\n timeout: Modal.BACKDROP_TRANSITION_DURATION\n }));\n}\n/* eslint-enable no-use-before-define */\n\nvar Modal = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Modal, _React$Component);\n function Modal(props, context) {\n var _this;\n _this = _React$Component.call(this, props, context) || this;\n _this.handleEntering = _this.handleEntering.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n _this.handleExited = _this.handleExited.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n _this.handleWindowResize = _this.handleWindowResize.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n _this.handleDialogClick = _this.handleDialogClick.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n _this.setModalRef = _this.setModalRef.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n _this.state = {\n style: {}\n };\n return _this;\n }\n var _proto = Modal.prototype;\n _proto.getChildContext = function getChildContext() {\n return {\n $bs_modal: {\n onHide: this.props.onHide\n }\n };\n };\n _proto.componentWillUnmount = function componentWillUnmount() {\n // Clean up the listener if we need to.\n this.handleExited();\n };\n _proto.setModalRef = function setModalRef(ref) {\n this._modal = ref;\n };\n _proto.handleDialogClick = function handleDialogClick(e) {\n if (e.target !== e.currentTarget) {\n return;\n }\n this.props.onHide();\n };\n _proto.handleEntering = function handleEntering() {\n // FIXME: This should work even when animation is disabled.\n events.on(window, 'resize', this.handleWindowResize);\n this.updateStyle();\n };\n _proto.handleExited = function handleExited() {\n // FIXME: This should work even when animation is disabled.\n events.off(window, 'resize', this.handleWindowResize);\n };\n _proto.handleWindowResize = function handleWindowResize() {\n this.updateStyle();\n };\n _proto.updateStyle = function updateStyle() {\n if (!canUseDOM) {\n return;\n }\n var dialogNode = this._modal.getDialogElement();\n var dialogHeight = dialogNode.scrollHeight;\n var document = ownerDocument(dialogNode);\n var bodyIsOverflowing = isOverflowing(ReactDOM.findDOMNode(this.props.container || document.body));\n var modalIsOverflowing = dialogHeight > document.documentElement.clientHeight;\n this.setState({\n style: {\n paddingRight: bodyIsOverflowing && !modalIsOverflowing ? getScrollbarSize() : undefined,\n paddingLeft: !bodyIsOverflowing && modalIsOverflowing ? getScrollbarSize() : undefined\n }\n });\n };\n _proto.render = function render() {\n var _this$props = this.props,\n backdrop = _this$props.backdrop,\n backdropClassName = _this$props.backdropClassName,\n animation = _this$props.animation,\n show = _this$props.show,\n Dialog = _this$props.dialogComponentClass,\n className = _this$props.className,\n style = _this$props.style,\n children = _this$props.children,\n onEntering = _this$props.onEntering,\n onExited = _this$props.onExited,\n props = _objectWithoutPropertiesLoose(_this$props, [\"backdrop\", \"backdropClassName\", \"animation\", \"show\", \"dialogComponentClass\", \"className\", \"style\", \"children\", \"onEntering\", \"onExited\"]);\n var _splitComponentProps = splitComponentProps(props, BaseModal),\n baseModalProps = _splitComponentProps[0],\n dialogProps = _splitComponentProps[1];\n var inClassName = show && !animation && 'in';\n return /*#__PURE__*/React.createElement(BaseModal, _extends({}, baseModalProps, {\n ref: this.setModalRef,\n show: show,\n containerClassName: prefix(props, 'open'),\n transition: animation ? DialogTransition : undefined,\n backdrop: backdrop,\n backdropTransition: animation ? BackdropTransition : undefined,\n backdropClassName: classNames(prefix(props, 'backdrop'), backdropClassName, inClassName),\n onEntering: createChainedFunction(onEntering, this.handleEntering),\n onExited: createChainedFunction(onExited, this.handleExited)\n }), /*#__PURE__*/React.createElement(Dialog, _extends({}, dialogProps, {\n style: _extends({}, this.state.style, style),\n className: classNames(className, inClassName),\n onClick: backdrop === true ? this.handleDialogClick : null\n }), children));\n };\n return Modal;\n}(React.Component);\nModal.propTypes = propTypes;\nModal.defaultProps = defaultProps;\nModal.childContextTypes = childContextTypes;\nModal.Body = Body;\nModal.Header = Header;\nModal.Title = Title;\nModal.Footer = Footer;\nModal.Dialog = ModalDialog;\nModal.TRANSITION_DURATION = 300;\nModal.BACKDROP_TRANSITION_DURATION = 150;\nexport default bsClass('modal', bsSizes([Size.LARGE, Size.SMALL], Modal));","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport elementType from 'prop-types-extra/lib/elementType';\nimport { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';\nvar propTypes = {\n componentClass: elementType\n};\nvar defaultProps = {\n componentClass: 'div'\n};\nvar ModalBody = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(ModalBody, _React$Component);\n function ModalBody() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = ModalBody.prototype;\n _proto.render = function render() {\n var _this$props = this.props,\n Component = _this$props.componentClass,\n className = _this$props.className,\n props = _objectWithoutPropertiesLoose(_this$props, [\"componentClass\", \"className\"]);\n var _splitBsProps = splitBsProps(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n var classes = getClassSet(bsProps);\n return /*#__PURE__*/React.createElement(Component, _extends({}, elementProps, {\n className: classNames(className, classes)\n }));\n };\n return ModalBody;\n}(React.Component);\nModalBody.propTypes = propTypes;\nModalBody.defaultProps = defaultProps;\nexport default bsClass('modal-body', ModalBody);","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { bsClass, bsSizes, getClassSet, prefix, splitBsProps } from './utils/bootstrapUtils';\nimport { Size } from './utils/StyleConfig';\nvar propTypes = {\n /**\n * A css class to apply to the Modal dialog DOM node.\n */\n dialogClassName: PropTypes.string\n};\nvar ModalDialog = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(ModalDialog, _React$Component);\n function ModalDialog() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = ModalDialog.prototype;\n _proto.render = function render() {\n var _extends2;\n var _this$props = this.props,\n dialogClassName = _this$props.dialogClassName,\n className = _this$props.className,\n style = _this$props.style,\n children = _this$props.children,\n props = _objectWithoutPropertiesLoose(_this$props, [\"dialogClassName\", \"className\", \"style\", \"children\"]);\n var _splitBsProps = splitBsProps(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n var bsClassName = prefix(bsProps);\n var modalStyle = _extends({\n display: 'block'\n }, style);\n var dialogClasses = _extends({}, getClassSet(bsProps), (_extends2 = {}, _extends2[bsClassName] = false, _extends2[prefix(bsProps, 'dialog')] = true, _extends2));\n return /*#__PURE__*/React.createElement(\"div\", _extends({}, elementProps, {\n tabIndex: \"-1\",\n role: \"dialog\",\n style: modalStyle,\n className: classNames(className, bsClassName)\n }), /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(dialogClassName, dialogClasses)\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: prefix(bsProps, 'content'),\n role: \"document\"\n }, children)));\n };\n return ModalDialog;\n}(React.Component);\nModalDialog.propTypes = propTypes;\nexport default bsClass('modal', bsSizes([Size.LARGE, Size.SMALL], ModalDialog));","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport elementType from 'prop-types-extra/lib/elementType';\nimport { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';\nvar propTypes = {\n componentClass: elementType\n};\nvar defaultProps = {\n componentClass: 'div'\n};\nvar ModalFooter = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(ModalFooter, _React$Component);\n function ModalFooter() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = ModalFooter.prototype;\n _proto.render = function render() {\n var _this$props = this.props,\n Component = _this$props.componentClass,\n className = _this$props.className,\n props = _objectWithoutPropertiesLoose(_this$props, [\"componentClass\", \"className\"]);\n var _splitBsProps = splitBsProps(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n var classes = getClassSet(bsProps);\n return /*#__PURE__*/React.createElement(Component, _extends({}, elementProps, {\n className: classNames(className, classes)\n }));\n };\n return ModalFooter;\n}(React.Component);\nModalFooter.propTypes = propTypes;\nModalFooter.defaultProps = defaultProps;\nexport default bsClass('modal-footer', ModalFooter);","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';\nimport createChainedFunction from './utils/createChainedFunction';\nimport CloseButton from './CloseButton'; // TODO: `aria-label` should be `closeLabel`.\n\nvar propTypes = {\n /**\n * Provides an accessible label for the close\n * button. It is used for Assistive Technology when the label text is not\n * readable.\n */\n closeLabel: PropTypes.string,\n /**\n * Specify whether the Component should contain a close button\n */\n closeButton: PropTypes.bool,\n /**\n * A Callback fired when the close button is clicked. If used directly inside\n * a Modal component, the onHide will automatically be propagated up to the\n * parent Modal `onHide`.\n */\n onHide: PropTypes.func\n};\nvar defaultProps = {\n closeLabel: 'Close',\n closeButton: false\n};\nvar contextTypes = {\n $bs_modal: PropTypes.shape({\n onHide: PropTypes.func\n })\n};\nvar ModalHeader = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(ModalHeader, _React$Component);\n function ModalHeader() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = ModalHeader.prototype;\n _proto.render = function render() {\n var _this$props = this.props,\n closeLabel = _this$props.closeLabel,\n closeButton = _this$props.closeButton,\n onHide = _this$props.onHide,\n className = _this$props.className,\n children = _this$props.children,\n props = _objectWithoutPropertiesLoose(_this$props, [\"closeLabel\", \"closeButton\", \"onHide\", \"className\", \"children\"]);\n var modal = this.context.$bs_modal;\n var _splitBsProps = splitBsProps(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n var classes = getClassSet(bsProps);\n return /*#__PURE__*/React.createElement(\"div\", _extends({}, elementProps, {\n className: classNames(className, classes)\n }), closeButton && /*#__PURE__*/React.createElement(CloseButton, {\n label: closeLabel,\n onClick: createChainedFunction(modal && modal.onHide, onHide)\n }), children);\n };\n return ModalHeader;\n}(React.Component);\nModalHeader.propTypes = propTypes;\nModalHeader.defaultProps = defaultProps;\nModalHeader.contextTypes = contextTypes;\nexport default bsClass('modal-header', ModalHeader);","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport classNames from 'classnames';\nimport React from 'react';\nimport elementType from 'prop-types-extra/lib/elementType';\nimport { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';\nvar propTypes = {\n componentClass: elementType\n};\nvar defaultProps = {\n componentClass: 'h4'\n};\nvar ModalTitle = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(ModalTitle, _React$Component);\n function ModalTitle() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = ModalTitle.prototype;\n _proto.render = function render() {\n var _this$props = this.props,\n Component = _this$props.componentClass,\n className = _this$props.className,\n props = _objectWithoutPropertiesLoose(_this$props, [\"componentClass\", \"className\"]);\n var _splitBsProps = splitBsProps(props),\n bsProps = _splitBsProps[0],\n elementProps = _splitBsProps[1];\n var classes = getClassSet(bsProps);\n return /*#__PURE__*/React.createElement(Component, _extends({}, elementProps, {\n className: classNames(className, classes)\n }));\n };\n return ModalTitle;\n}(React.Component);\nModalTitle.propTypes = propTypes;\nModalTitle.defaultProps = defaultProps;\nexport default bsClass('modal-title', ModalTitle);","import _extends from \"@babel/runtime-corejs2/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime-corejs2/helpers/esm/inheritsLoose\";\nimport classNames from 'classnames';\nimport keycode from 'keycode';\nimport React, { cloneElement } from 'react';\nimport PropTypes from 'prop-types';\nimport ReactDOM from 'react-dom';\nimport all from 'prop-types-extra/lib/all';\nimport warning from 'warning';\nimport { bsClass, bsStyles, getClassSet, prefix, splitBsProps } from './utils/bootstrapUtils';\nimport createChainedFunction from './utils/createChainedFunction';\nimport ValidComponentChildren from './utils/ValidComponentChildren'; // TODO: Should we expose `` as ``?\n// TODO: This `bsStyle` is very unlike the others. Should we rename it?\n// TODO: `pullRight` and `pullLeft` don't render right outside of `navbar`.\n// Consider renaming or replacing them.\n\nvar propTypes = {\n /**\n * Marks the NavItem with a matching `eventKey` as active. Has a\n * higher precedence over `activeHref`.\n */\n activeKey: PropTypes.any,\n /**\n * Marks the child NavItem with a matching `href` prop as active.\n */\n activeHref: PropTypes.string,\n /**\n * NavItems are be positioned vertically.\n */\n stacked: PropTypes.bool,\n justified: all(PropTypes.bool, function (_ref) {\n var justified = _ref.justified,\n navbar = _ref.navbar;\n return justified && navbar ? Error('justified navbar `Nav`s are not supported') : null;\n }),\n /**\n * A callback fired when a NavItem is selected.\n *\n * ```js\n * function (\n * Any eventKey,\n * SyntheticEvent event?\n * )\n * ```\n */\n onSelect: PropTypes.func,\n /**\n * ARIA role for the Nav, in the context of a TabContainer, the default will\n * be set to \"tablist\", but can be overridden by the Nav when set explicitly.\n *\n * When the role is set to \"tablist\" NavItem focus is managed according to\n * the ARIA authoring practices for tabs:\n * https://www.w3.org/TR/2013/WD-wai-aria-practices-20130307/#tabpanel\n */\n role: PropTypes.string,\n /**\n * Apply styling an alignment for use in a Navbar. This prop will be set\n * automatically when the Nav is used inside a Navbar.\n */\n navbar: PropTypes.bool,\n /**\n * Float the Nav to the right. When `navbar` is `true` the appropriate\n * contextual classes are added as well.\n */\n pullRight: PropTypes.bool,\n /**\n * Float the Nav to the left. When `navbar` is `true` the appropriate\n * contextual classes are added as well.\n */\n pullLeft: PropTypes.bool\n};\nvar defaultProps = {\n justified: false,\n pullRight: false,\n pullLeft: false,\n stacked: false\n};\nvar contextTypes = {\n $bs_navbar: PropTypes.shape({\n bsClass: PropTypes.string,\n onSelect: PropTypes.func\n }),\n $bs_tabContainer: PropTypes.shape({\n activeKey: PropTypes.any,\n onSelect: PropTypes.func.isRequired,\n getTabId: PropTypes.func.isRequired,\n getPaneId: PropTypes.func.isRequired\n })\n};\nvar Nav = /*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Nav, _React$Component);\n function Nav() {\n return _React$Component.apply(this, arguments) || this;\n }\n var _proto = Nav.prototype;\n _proto.componentDidUpdate = function componentDidUpdate() {\n var _this = this;\n if (!this._needsRefocus) {\n return;\n }\n this._needsRefocus = false;\n var children = this.props.children;\n var _this$getActiveProps = this.getActiveProps(),\n activeKey = _this$getActiveProps.activeKey,\n activeHref = _this$getActiveProps.activeHref;\n var activeChild = ValidComponentChildren.find(children, function (child) {\n return _this.isActive(child, activeKey, activeHref);\n });\n var childrenArray = ValidComponentChildren.toArray(children);\n var activeChildIndex = childrenArray.indexOf(activeChild);\n var childNodes = ReactDOM.findDOMNode(this).children;\n var activeNode = childNodes && childNodes[activeChildIndex];\n if (!activeNode || !activeNode.firstChild) {\n return;\n }\n activeNode.firstChild.focus();\n };\n _proto.getActiveProps = function getActiveProps() {\n var tabContainer = this.context.$bs_tabContainer;\n if (tabContainer) {\n process.env.NODE_ENV !== \"production\" ? warning(this.props.activeKey == null && !this.props.activeHref, 'Specifying a `