From 8e2973526ab85660d4774d7550dc2c027c5acea9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phan=20Sainl=C3=A9ger?= Date: Tue, 19 Apr 2022 11:54:03 +0200 Subject: [PATCH] [NEW] Addons creation - product_rental_bookings --- product_rental_bookings/.DS_Store | Bin 0 -> 6148 bytes product_rental_bookings/__init__.py | 4 + product_rental_bookings/__manifest__.py | 81 + product_rental_bookings/data/data.xml | 84 + product_rental_bookings/i18n/fr.po | 2587 +++++++++++++++++ product_rental_bookings/models/__init__.py | 13 + .../models/account_move.py | 106 + product_rental_bookings/models/product.py | 15 + .../models/product_book.py | 368 +++ .../models/product_contract.py | 851 ++++++ .../models/product_logs.py | 17 + .../models/product_operation.py | 91 + .../models/product_order.py | 866 ++++++ .../models/res_config_settings.py | 45 + .../models/session_config_settings.py | 27 + product_rental_bookings/models/stock_move.py | 10 + .../models/stock_picking.py | 163 ++ .../report/rental_contract_recurring.xml | 130 + .../report/rental_contract_report.xml | 157 + .../report/rental_order.xml | 38 + .../report/rental_order_report.xml | 143 + .../security/ir.model.access.csv | 24 + product_rental_bookings/security/security.xml | 34 + product_rental_bookings/static/.DS_Store | Bin 0 -> 6148 bytes .../static/description/icon.png | Bin 0 -> 24096 bytes .../static/src/css/backend.css | 4 + .../static/src/css/fullcalendar.css | 1403 +++++++++ .../static/src/css/scheduler.css | 463 +++ .../static/src/css/scheduler.min.css | 5 + .../static/src/js/fabric.min.js | 9 + .../static/src/js/lib/fullcalendar.js | 23 + .../static/src/js/lib/popper.min.js | 184 ++ .../static/src/js/lib/scheduler.js | 9 + .../static/src/js/lib/tooltip.min.js | 287 ++ .../static/src/js/product_booking_calender.js | 451 +++ .../static/src/js/product_contract_sign.js | 124 + .../static/src/xml/delivery_sign.xml | 27 + .../src/xml/product_booking_calender.xml | 68 + .../views/account_invoice_view.xml | 24 + product_rental_bookings/views/assets.xml | 24 + product_rental_bookings/views/menus.xml | 56 + .../views/product_book.xml | 80 + .../views/product_contract.xml | 191 ++ .../views/product_move.xml | 80 + .../views/product_operation.xml | 134 + .../views/product_order.xml | 195 ++ .../views/product_view.xml | 25 + .../views/res_config_settings_view.xml | 60 + .../views/sales_config_view.xml | 39 + product_rental_bookings/views/sequence.xml | 49 + .../views/session_config_settings_view.xml | 48 + .../views/stock_picking.xml | 31 + product_rental_bookings/wizard/__init__.py | 3 + .../wizard/advance_payment_invoice.py | 177 ++ .../wizard/advance_payment_invoice.xml | 56 + 55 files changed, 10183 insertions(+) create mode 100644 product_rental_bookings/.DS_Store create mode 100755 product_rental_bookings/__init__.py create mode 100755 product_rental_bookings/__manifest__.py create mode 100755 product_rental_bookings/data/data.xml create mode 100644 product_rental_bookings/i18n/fr.po create mode 100755 product_rental_bookings/models/__init__.py create mode 100644 product_rental_bookings/models/account_move.py create mode 100755 product_rental_bookings/models/product.py create mode 100755 product_rental_bookings/models/product_book.py create mode 100755 product_rental_bookings/models/product_contract.py create mode 100644 product_rental_bookings/models/product_logs.py create mode 100755 product_rental_bookings/models/product_operation.py create mode 100755 product_rental_bookings/models/product_order.py create mode 100755 product_rental_bookings/models/res_config_settings.py create mode 100644 product_rental_bookings/models/session_config_settings.py create mode 100644 product_rental_bookings/models/stock_move.py create mode 100644 product_rental_bookings/models/stock_picking.py create mode 100755 product_rental_bookings/report/rental_contract_recurring.xml create mode 100755 product_rental_bookings/report/rental_contract_report.xml create mode 100755 product_rental_bookings/report/rental_order.xml create mode 100755 product_rental_bookings/report/rental_order_report.xml create mode 100755 product_rental_bookings/security/ir.model.access.csv create mode 100755 product_rental_bookings/security/security.xml create mode 100644 product_rental_bookings/static/.DS_Store create mode 100644 product_rental_bookings/static/description/icon.png create mode 100755 product_rental_bookings/static/src/css/backend.css create mode 100755 product_rental_bookings/static/src/css/fullcalendar.css create mode 100755 product_rental_bookings/static/src/css/scheduler.css create mode 100755 product_rental_bookings/static/src/css/scheduler.min.css create mode 100755 product_rental_bookings/static/src/js/fabric.min.js create mode 100755 product_rental_bookings/static/src/js/lib/fullcalendar.js create mode 100755 product_rental_bookings/static/src/js/lib/popper.min.js create mode 100755 product_rental_bookings/static/src/js/lib/scheduler.js create mode 100755 product_rental_bookings/static/src/js/lib/tooltip.min.js create mode 100755 product_rental_bookings/static/src/js/product_booking_calender.js create mode 100755 product_rental_bookings/static/src/js/product_contract_sign.js create mode 100755 product_rental_bookings/static/src/xml/delivery_sign.xml create mode 100755 product_rental_bookings/static/src/xml/product_booking_calender.xml create mode 100755 product_rental_bookings/views/account_invoice_view.xml create mode 100644 product_rental_bookings/views/assets.xml create mode 100644 product_rental_bookings/views/menus.xml create mode 100755 product_rental_bookings/views/product_book.xml create mode 100755 product_rental_bookings/views/product_contract.xml create mode 100755 product_rental_bookings/views/product_move.xml create mode 100755 product_rental_bookings/views/product_operation.xml create mode 100755 product_rental_bookings/views/product_order.xml create mode 100755 product_rental_bookings/views/product_view.xml create mode 100755 product_rental_bookings/views/res_config_settings_view.xml create mode 100755 product_rental_bookings/views/sales_config_view.xml create mode 100755 product_rental_bookings/views/sequence.xml create mode 100644 product_rental_bookings/views/session_config_settings_view.xml create mode 100644 product_rental_bookings/views/stock_picking.xml create mode 100755 product_rental_bookings/wizard/__init__.py create mode 100755 product_rental_bookings/wizard/advance_payment_invoice.py create mode 100755 product_rental_bookings/wizard/advance_payment_invoice.xml diff --git a/product_rental_bookings/.DS_Store b/product_rental_bookings/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..6e89f52b43ce7803851d8a323b7d8680dbc7dc81 GIT binary patch literal 6148 zcmeHK%Wl&^6upzU!6Be#fz&R&L1Gc11c^sgRkG5u=nlyU7JyPaHq?@1N48U|O@qAQ zAAmnVdeO={h`M0(UcM}b4q~`t^lR1+9%tou?+IjUruh#?@i6GLo-D6 z5i@GU{MztM;WvkWN_jPI%dPpE7-N7ZU%;1ZRU2jNbIrdaG~rJi(zF`8eegS9ugK;~ z`%m6H3bTAT{K8soW2xyph>j-x-Q{w$cXwdjzqcA#%h8?T-oSb= z9IaMebLZyh;P_;AezCkDl!Vw%2Po2H;@+pK_kQD$#*v#!+&Xa)Xb1^D;DLgHvEEG3Fh z2QqO402-(khBE(I;2cY#t+14c78sLMprkT )$+dQ17)3QLKSPD~v>nCh9S6ABZ( zBfcfviP;i$t`*P`_. In case of trouble, please +check there if your issue has already been reported. If you spotted it first, +help us smashing it by providing a detailed and welcomed feedback. + +Credits +======= + +Images +------ +* Elabore: `Icon `_. + +Contributors +------------ +* Stéphan Sainléger + +Funders +------- +The development of this module has been financially supported by: +* Elabore (https://elabore.coop) + +Maintainer +---------- +This module is maintained by ELABORE. + +""", + "depends": ["base", "account", "website_sale", "hr", "stock"], + "data": [ + "security/ir.model.access.csv", + "security/security.xml", + "views/assets.xml", + "views/sequence.xml", + "views/account_invoice_view.xml", + "views/product_book.xml", + "views/product_view.xml", + "views/product_contract.xml", + "wizard/advance_payment_invoice.xml", + "views/product_operation.xml", + "views/product_order.xml", + "views/product_move.xml", + "views/res_config_settings_view.xml", + "views/stock_picking.xml", + "report/rental_order.xml", + "report/rental_order_report.xml", + "report/rental_contract_report.xml", + "report/rental_contract_recurring.xml", + "data/data.xml", + "views/session_config_settings_view.xml", + "views/menus.xml", + ], + "qweb": [ + "static/src/xml/delivery_sign.xml", + "static/src/xml/product_booking_calender.xml", + ], +} diff --git a/product_rental_bookings/data/data.xml b/product_rental_bookings/data/data.xml new file mode 100755 index 0000000..a5e371c --- /dev/null +++ b/product_rental_bookings/data/data.xml @@ -0,0 +1,84 @@ + + + + + + Extra charge + service + + + + + + + + + + Generate Rental contracts costs + + code + model.run_scheduler() + + 1 + days + -1 + + + + + Product Order- Send by Email + + ${(object.create_uid.email and '%s <%s>' % (object.create_uid.name, object.create_uid.email)or + '')|safe}> + + Order (Ref ${object.res_number or 'n/a' }) + ${object.customer_name.id} + + ${(object.res_number)} + ${object.customer_name.lang} + + Dear ${object.customer_name.name},
+

+

You can reply to this email if you have any questions.

+

Thank you,

+ +

+ % if object.user_id and object.user_id.signature: + ${object.user_id.signature | safe} + % endif +

+ ]]> +
+
+ + + Product Coontract- Send by Email + + ${(object.create_uid.email and '%s <%s>' % (object.create_uid.name, object.create_uid.email)or + '')|safe}> + + Order (Ref ${object.name or 'n/a' }) + ${object.partner_id.id} + + + ${(object.name)} + ${object.partner_id.lang} + + Dear ${object.partner_id.name},

+

Your Rental contract has been created,Here we attached contract detail

+

+

You can reply to this email if you have any questions.

+

Thank you,

+ +

+ % if object.user_id and object.user_id.signature: + ${object.user_id.signature | safe} + % endif +

+ ]]> +
+
+
+ + +
\ No newline at end of file diff --git a/product_rental_bookings/i18n/fr.po b/product_rental_bookings/i18n/fr.po new file mode 100644 index 0000000..a5bf562 --- /dev/null +++ b/product_rental_bookings/i18n/fr.po @@ -0,0 +1,2587 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_rental_bookings +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-09-29 14:44+0000\n" +"PO-Revision-Date: 2021-09-29 14:44+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: product_rental_bookings +#: model:mail.template,body_html:product_rental_bookings.email_template_product_rental +msgid "" +"\n" +"

Dear ${object.customer_name.name},
\n" +"

\n" +"

You can reply to this email if you have any questions.

\n" +"

Thank you,

\n" +"\n" +"

\n" +" % if object.user_id and object.user_id.signature:\n" +" ${object.user_id.signature | safe}\n" +" % endif\n" +"

\n" +" \n" +" " +msgstr "" +"\n" +"

Cher ${object.customer_name.name},
\n" +"

\n" +"

Vous pouvez répondre à ce courriel si vous avez la moindre question.

\n" +"

Merci,

\n" +"\n" +"

\n" +" % if object.user_id and object.user_id.signature:\n" +" ${object.user_id.signature | safe}\n" +" % endif\n" +"

\n" +" \n" +" " + +#. module: product_rental_bookings +#: model:mail.template,body_html:product_rental_bookings.email_template_product_contract +msgid "" +"\n" +"

Dear ${object.partner_id.name},

\n" +"

Your Rental contract has been created,Here we attached contract detail

\n" +"

\n" +"

You can reply to this email if you have any questions.

\n" +"

Thank you,

\n" +"\n" +"

\n" +" % if object.user_id and object.user_id.signature:\n" +" ${object.user_id.signature | safe}\n" +" % endif\n" +"

\n" +" \n" +" " +msgstr "" +"\n" +"

Cher ${object.partner_id.name},

\n" +"

Votre contrat de location a été créé. Vous en trouverez les détails en pièce jointe

\n" +"

\n" +"

Vous pouvez répondre à ce courriel si vous avez la moindre question.

\n" +"

Merci,

\n" +"\n" +"

\n" +" % if object.user_id and object.user_id.signature:\n" +" ${object.user_id.signature | safe}\n" +" % endif\n" +"

\n" +" \n" +" " + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__invoice_count +msgid "# Invoice" +msgstr "# Facture" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_advance_payment_invoice__count +msgid "# of Orders" +msgstr "# de Commandes" + + +#. module: product_rental_bookings +#: model:mail.template,report_name:product_rental_bookings.email_template_product_contract +msgid "${(object.name)}" +msgstr "" + +#. module: product_rental_bookings +#: model:mail.template,report_name:product_rental_bookings.email_template_product_rental +msgid "${(object.res_number)}" +msgstr "" + + + +#. module: product_rental_bookings +#: model:ir.actions.report,print_report_name:product_rental_bookings.product_contract_recurring_report +msgid "'Recurring Invoice'" +msgstr "'Facture récurrente'" + +#. module: product_rental_bookings +#: model:ir.actions.report,print_report_name:product_rental_bookings.product_rental_contract_report +msgid "'Rental Contract'" +msgstr "'Contrat de Location'" + +#. module: product_rental_bookings +#: model:ir.actions.report,print_report_name:product_rental_bookings.product_rental_order_report +msgid "'Rental/Order'" +msgstr "'Commande de Location'" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.product_search +msgid "/Day" +msgstr "/Jour" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.product_search +msgid "/Hour" +msgstr "/Heure" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.product_search +msgid "/Session" +msgstr "/Session" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product +msgid "" +"30-day money-back guarantee\n" +"
\n" +"
" +msgstr "" +"Remboursement sous 30 jours garanti\n" +"
\n" +"
" + +#. module: product_rental_bookings +#: code:addons/product_rental_bookings/models/product_contract.py:0 +#, python-format +msgid "" +"

Expiration Of Rental Contract


Dear %s,
Our record indicate" +" that your rental contract %s, expire soon,
If you want to renew " +"this contract Then contact to our agency before last date of " +"contract.



Contract " +"Ref%s
Responsible Person %s - " +"%s
" +msgstr "" +"

Fin de Contrat de Location


Cher %s,
Votre dossier indique" +" que votre contrat de location %s, se termine bientôt,
Si vous voulez le renouveler, " +"veuillez contacter notre magasin d'ici le dernier jour de " +"location.



Contrat " +"Ref%s
Responsable %s - " +"%s
" + +#. module: product_rental_bookings +#: code:addons/product_rental_bookings/models/product_contract.py:0 +#, python-format +msgid "" +"

First Payment!


Hi %s,
This is to notify that You have to " +"pay amount as per mention below.

Please find the details " +"below:

Reference Number " +"%s
Date %s
Amount " +"%s
" +msgstr "" +"

Premier paiement !


Bonjour %s,
Ceci est une notification de demande de paiement " +"du montant mentionné ci-dessous.

Voici les détails :" +"

Numéro de référence " +"%s
Date %s
Montant " +"%s
" + +#. module: product_rental_bookings +#: code:addons/product_rental_bookings/models/product_contract.py:0 +#, python-format +msgid "" +"

Reminder Recurrent Payment!


Hi %s,
This is to remind you " +"that the recurrent payment for the rental contract has to be done.Please " +"make the payment at the earliest.

Please find the details " +"below:

Amount %s
Due Date" +" %s
Responsible Person %s, " +"%s
" +msgstr "" +"

Rappel de paiement récurrent !


Bonjour %s,
Nous vous rappelons être en " +"attente de la mise en place du paiement récurrent pour le contrat de location. Veuillez " +"effectuer le paiement au plus tôt.

Voici les détails :" +"

Montant %s
Date due " +" %s
Personne référente %s, " +"%s
" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.payment +msgid "" +"\n" +" Add payment acquirers" +msgstr "" +"\n" +" Ajouter des intermédiaires de paiement" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product_type_kanban +msgid "" +msgstr "" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product_cart_update +msgid "" +"\n" +" Rent More" +msgstr "" +"\n" +" Louer d'avantage" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.payment +msgid "Pay Now" +msgstr "Payer maintenant" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product_order_form_id +msgid "Contract" +msgstr "Contrat" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product_order_form_id +msgid "Invoiced" +msgstr "Facturé" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product_order_form_id +msgid "Move" +msgstr "Déplacer" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_res_config_settings_form_inherit +msgid "Days" +msgstr "Jours" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.recurring_report +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_contract +msgid "Contract -" +msgstr "Contrat -" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.recurring_report +msgid "Recurring Invoice Details :" +msgstr "Détail des factures récurrentes :" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.report_product_rental_order +msgid "Rental Order -" +msgstr "Rental Commande -" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_order_comfirmation +msgid "" +"Your Order has been confirmed\n" +"
\n" +" We will contact you soon\n" +"
" +msgstr "" +"Votre commande a été confirmée\n" +"
\n" +" Nous vous contacterons bientôt\n" +"
" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.recurring_report +msgid "Amount" +msgstr "Montant" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_contract +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.report_product_rental_order +msgid "Based On" +msgstr "Unité de location" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_contract +msgid "" +"Contractor Signature\n" +"
" +msgstr "" +"Signature du loueur\n" +"
" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.recurring_report +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_contract +msgid "Contractor:" +msgstr "Loueur:" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.recurring_report +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_contract +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.report_product_rental_order +msgid "Customer Details:" +msgstr "Détails du client:" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_contract +msgid "" +"Customer Signature\n" +"
" +msgstr "" +"Signature du client\n" +"
" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.recurring_report +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_contract +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.report_product_rental_order +msgid "Date Ordered:" +msgstr "Date de commande:" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.recurring_report +msgid "Date" +msgstr "Date" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_contract +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.report_product_rental_order +msgid "Days" +msgstr "Jours" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_contract +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.report_product_rental_order +msgid "Description" +msgstr "Description" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.recurring_report +msgid "First Payment Amount:" +msgstr "Montant du premier paiement :" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.recurring_report +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_contract +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.report_product_rental_order +msgid "From Date:" +msgstr "Date de début :" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.recurring_report +msgid "Interval Type:" +msgstr "Type d'interval :" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.recurring_report +msgid "Payment State" +msgstr "État du paiement" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.recurring_report +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_contract +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.report_product_rental_order +msgid "Payment Terms:" +msgstr "Conditions de paiement :" "" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_contract +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.report_product_rental_order +msgid "Price" +msgstr "Prix" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.recurring_report +msgid "Recurring Amount:" +msgstr "Montant récurrent :" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.report_product_rental_order +msgid "Salesperson:" +msgstr "Vendeur :" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.recurring_report +msgid "Security Deposite:" +msgstr "Caution :" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_contract +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.report_product_rental_order +msgid "Subtotal" +msgstr "Sous-total" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_contract +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.report_product_rental_order +msgid "Tax" +msgstr "Taxes" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.recurring_report +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_contract +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.report_product_rental_order +msgid "To Date:" +msgstr "Date de fin :" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.checkout_process +msgid "Total:-" +msgstr "Total :-" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.recurring_report +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_contract +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.report_product_rental_order +msgid "Total" +msgstr "Total" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_contract +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.report_product_rental_order +msgid "subtotal" +msgstr "sous-total" + +#. module: product_rental_bookings +#: code:addons/product_rental_bookings/models/product_order.py:0 +#, python-format +msgid "A journal must be specified of the acquirer %s." +msgstr "Un journal doit être spécifié pour l'acheteur %s." + +#. module: product_rental_bookings +#: code:addons/product_rental_bookings/models/product_order.py:0 +#, python-format +msgid "A payment acquirer is required to create a transaction." +msgstr "Un intermédiaire de paiement est requis pour créer une transaction." + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__account_type +msgid "Account" +msgstr "Compte" + +#. module: product_rental_bookings +#: model:ir.model.fields,help:product_rental_bookings.field_product_advance_payment_invoice__deposit_account_id +msgid "Account used for deposits" +msgstr "Compte utilisé pour les dépôts" + +#. module: product_rental_bookings +#. openerp-web +#: code:addons/product_rental_bookings/static/src/xml/delivery_sign.xml:0 +#, python-format +msgid "Add Signature" +msgstr "Ajouter une signature" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product +msgid "Add To Cart" +msgstr "Ajouter au panier" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__additional_charges +msgid "Additional Charges" +msgstr "Charges additionnelles" + +#. module: product_rental_bookings +#: code:addons/product_rental_bookings/wizard/advance_payment_invoice.py:0 +#, python-format +msgid "Advance: %s" +msgstr "Avance : %s" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_rental_line__recurring_amount +msgid "Amount" +msgstr "Montant" + +#. module: product_rental_bookings +#: model:ir.ui.menu,name:product_rental_bookings.rental_product_analysis +msgid "Analysis" +msgstr "Analyse" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__attachment_ids +msgid "Attachments" +msgstr "Pièces jointes" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_rental_line__auto_generated +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__auto_generated +msgid "Automatically Generated" +msgstr "Généré automatiquement" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_booking__product_line_ids +msgid "Available Product" +msgstr "Produit disponible" + +#. module: product_rental_bookings +#: code:addons/product_rental_bookings/models/product_book.py:0 +#, python-format +msgid "Available quantity for %s is %d" +msgstr "La quantité disponible de %s est %d" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_booking__price_based +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_contract_lines__price_based +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_order_line__price_based +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.product_search +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product +msgid "Based On" +msgstr "Basé en" + +#. module: product_rental_bookings +#: model:ir.model,name:product_rental_bookings.model_product_booking +msgid "Book" +msgstr "Réserver" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_booking__book_number +msgid "Book Number" +msgstr "Numéro de réservation" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.header_company_menu_11 +msgid "Book Product" +msgstr "Réserver un produit" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__book_date +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__book_date +msgid "Booking Date" +msgstr "Date de location" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__button_name +msgid "Button Name" +msgstr "Bouton Nom" + +#. module: product_rental_bookings +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__rental_product_order__state__cancel +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__wizard_product_service__state__cancel +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product_order_form_id +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.view_product_advance_payment_invoice +msgid "Cancel" +msgstr "Annuler" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__cancel_policy_ids +msgid "Cancel Policy" +msgstr "Politique d'annulation" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product_contract_form +msgid "Cancellation Policy" +msgstr "Politique d'annulation"e" + +#. module: product_rental_bookings +#. openerp-web +#: code:addons/product_rental_bookings/static/src/xml/product_booking_calender.xml:0 +#, python-format +msgid "Category:" +msgstr "Categorie:" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_policy__policy_charged +msgid "Charge(In Percentage)" +msgstr "Charge (en pourcentage)" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.customer_registration_template +msgid "City" +msgstr "Ville" + +#. module: product_rental_bookings +#: model_terms:ir.actions.act_window,help:product_rental_bookings.action_rental_product_contract +#: model_terms:ir.actions.act_window,help:product_rental_bookings.action_rental_product_contract_form +msgid "Click to add Products Contract" +msgstr "Cliquer pour ajouter des Contrats" + +#. module: product_rental_bookings +#: model_terms:ir.actions.act_window,help:product_rental_bookings.action_product_operation_type +msgid "Click to create a new operation type." +msgstr "Cliquer pour créer un nouveau type d'opération" + +#. module: product_rental_bookings +#: model_terms:ir.actions.act_window,help:product_rental_bookings.action_picking_type_list +msgid "Click to define a new transfer." +msgstr "Cliquer pour définir un nouveau transfert" + +#. module: product_rental_bookings +#. openerp-web +#: code:addons/product_rental_bookings/static/src/xml/delivery_sign.xml:0 +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__rental_product_order__state__close +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__wizard_product_service__state__close +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.product_search +#, python-format +msgid "Close" +msgstr "Fermer" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product_contract_form +msgid "Close Contract" +msgstr "Fermer les contrats" + +#. module: product_rental_bookings +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__rental_product_contract__state__closed +msgid "Closed" +msgstr "Fermé" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_operation__color +msgid "Color" +msgstr "Couleur" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_booking__company_id +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__company_id +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_logs__company_id +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_operation__company_id +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__company_id +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__company_id +msgid "Company" +msgstr "Société" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.customer_registration_template +msgid "Company Name" +msgstr "Nom de société" + +#. module: product_rental_bookings +#: model:ir.model,name:product_rental_bookings.model_res_config_settings +msgid "Config Settings" +msgstr "Paramètres de config" + +#. module: product_rental_bookings +#: model:ir.ui.menu,name:product_rental_bookings.product_configuration_menu +msgid "Configuration" +msgstr "Configuration" + +#. module: product_rental_bookings +#: model:ir.ui.menu,name:product_rental_bookings.menu_configuration_action +msgid "Configuration" +msgstr "Configuration" + +#. module: product_rental_bookings +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__rental_product_order__state__confirm +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__wizard_product_service__state__confirm +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product_order_form_id +msgid "Confirm" +msgstr "Confirmer" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.payment +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product_cart_update +msgid "Confirm Order" +msgstr "Confirmer la commande" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_customer_document__contract_id +msgid "Conrtract" +msgstr "Contrat" + +#. module: product_rental_bookings +#: model:ir.actions.act_window,name:product_rental_bookings.action_rental_contract_view_tree +#: model:ir.model.fields,field_description:product_rental_bookings.field_account_bank_statement_line__contract_id +#: model:ir.model.fields,field_description:product_rental_bookings.field_account_move__contract_id +#: model:ir.model.fields,field_description:product_rental_bookings.field_account_payment__contract_id +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_contract_lines__product_contract_id +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_policy__contract_id +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__document_ids +msgid "Contract" +msgstr "Contrat" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__contract_date +msgid "Contract Date" +msgstr "Date de contrat" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__contract_ids +#: model:ir.model.fields,field_description:product_rental_bookings.field_stock_picking__contract_ids +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__contract_ids +msgid "Contract Id" +msgstr "ID de contrat" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__contractor_id +msgid "Contractor Name" +msgstr "Nom du contractuel" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__signature_contractor +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product_contract_form +msgid "Contractor Signature" +msgstr "Signature du contractuel" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__signature +msgid "Contractor Signature " +msgstr "Signature du contractuel " + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__is_agreement +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__is_agreement +msgid "Contracts Require?" +msgstr "Contrats requis ?" + + +#. module: product_rental_bookings +#: model:ir.model.fields,help:product_rental_bookings.field_rental_product_contract__cost_generated +msgid "Costs paid at regular intervals, depending on the cost frequency" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_account_bank_statement_line__cotract_order_id +#: model:ir.model.fields,field_description:product_rental_bookings.field_account_move__cotract_order_id +#: model:ir.model.fields,field_description:product_rental_bookings.field_account_payment__cotract_order_id +msgid "Cotract Ref" +msgstr "Référence de contrat" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__count +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__count +msgid "Count" +msgstr "Quantité" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_operation__count_operation_on_rent +msgid "Count Operation On Rent" +msgstr "Nombre d'opérations En Location" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_operation__count_operation_ready +msgid "Count Operation Ready" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_operation__count_operation_service +msgid "Count Operation Service" +msgstr "" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.customer_registration_template +msgid "Country" +msgstr "Pays" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.customer_registration_template +msgid "Country..." +msgstr "Pays..." + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.product_booking_id +msgid "Create" +msgstr "Créer" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.view_product_advance_payment_invoice +msgid "Create Invoices" +msgstr "Créer les factures" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product_contract_form +msgid "" +"Create a new contract automatically with all the" +" same informations except for the date that will" +" start at the end of current contract" +msgstr "" +"Créer un nouveau contrat automatiquement avec toujours les" +" mêmes informations, sauf pour la date qui va" +" commencer à la fin du contrat en cours" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.view_product_advance_payment_invoice +msgid "Create and View Invoices" +msgstr "Créer et voir les factures" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product_contract_form +msgid "Create invoice" +msgstr "Créer une facture" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_customer_document__create_uid +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_advance_payment_invoice__create_uid +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_booking__create_uid +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_contract_lines__create_uid +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_rental_line__create_uid +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_order_line__create_uid +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_policy__create_uid +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__create_uid +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_logs__create_uid +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_operation__create_uid +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__create_uid +#: model:ir.model.fields,field_description:product_rental_bookings.field_session_config__create_uid +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__create_uid +msgid "Created by" +msgstr "Créer par" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_customer_document__create_date +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_advance_payment_invoice__create_date +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_booking__create_date +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_contract_lines__create_date +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_rental_line__create_date +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_order_line__create_date +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_policy__create_date +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__create_date +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_logs__create_date +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_operation__create_date +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__create_date +#: model:ir.model.fields,field_description:product_rental_bookings.field_session_config__create_date +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__create_date +msgid "Created on" +msgstr "Créer le" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_booking__currency_id +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_contract_lines__currency_id +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_order_line__currency_id +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__currency_id +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__currency_id +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__currency_id +msgid "Currency" +msgstr "Devise" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__partner_id +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_logs__customer_id +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product_order_search +msgid "Customer" +msgstr "Client" + +#. module: product_rental_bookings +#: model:ir.model,name:product_rental_bookings.model_customer_document +msgid "Customer Document" +msgstr "Document Client" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__customer_name +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__customer_name +msgid "Customer Name" +msgstr "Nom du client" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__signature_customer +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product_contract_form +msgid "Customer Signature" +msgstr "Signature du client" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_advance_payment_invoice__deposit_taxes_id +msgid "Customer Taxes" +msgstr "Taxes client" + +#. module: product_rental_bookings +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__rental_product_operation__rental_move_type__outgoing +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__stock_picking__rental_move_type__outgoing +msgid "Customers" +msgstr "Clients" + +#. module: product_rental_bookings +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__rental_product_contract__cost_frequency__daily +msgid "Daily" +msgstr "Quotidien" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__damage_charge +msgid "Damage Charge" +msgstr "Coût d'endommagement" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_rental_line__date_today +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.product_booking_id +msgid "Date" +msgstr "Date" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__date_order +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__date_order +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product +msgid "Date From" +msgstr "Du" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product +msgid "Date To" +msgstr "Au" + +#. module: product_rental_bookings +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__account_move__interval_type__days +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__product_contract_lines__price_based__per_day +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__product_order_line__price_based__per_day +msgid "Day" +msgstr "Jour" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_res_config_settings__enabled_day_rent +msgid "Day Rent" +msgstr "Jour loué" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_account_bank_statement_line__is_days +#: model:ir.model.fields,field_description:product_rental_bookings.field_account_move__is_days +#: model:ir.model.fields,field_description:product_rental_bookings.field_account_move_line__enter_days +#: model:ir.model.fields,field_description:product_rental_bookings.field_account_payment__is_days +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_contract_lines__enter_days +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_order_line__enter_days +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__is_days +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__is_days +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__is_days +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.checkout_process +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.product_search +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product +msgid "Days" +msgstr "Jours" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__user_id +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__user_id +msgid "Dealer" +msgstr "Distributeur" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product_type_kanban +msgid "Deliveries of Product" +msgstr "Livraisons de produits" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.stock_picking_form_inherit +msgid "Delivery" +msgstr "Livraison" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__partner_shipping_id +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__partner_shipping_id +msgid "Delivery Address" +msgstr "Adresse de livraison" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_contract_lines__description +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_order_line__name +msgid "Description" +msgstr "Description" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_operation__destination_location +msgid "Destination Location" +msgstr "Emplacement de destination" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_account_move__display_name +#: model:ir.model.fields,field_description:product_rental_bookings.field_account_move_line__display_name +#: model:ir.model.fields,field_description:product_rental_bookings.field_customer_document__display_name +#: model:ir.model.fields,field_description:product_rental_bookings.field_payment_transaction__display_name +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_advance_payment_invoice__display_name +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_booking__display_name +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_contract_lines__display_name +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_product__display_name +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_rental_line__display_name +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_order_line__display_name +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_policy__display_name +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__display_name +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_logs__display_name +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_operation__display_name +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__display_name +#: model:ir.model.fields,field_description:product_rental_bookings.field_res_config_settings__display_name +#: model:ir.model.fields,field_description:product_rental_bookings.field_session_config__display_name +#: model:ir.model.fields,field_description:product_rental_bookings.field_stock_move__display_name +#: model:ir.model.fields,field_description:product_rental_bookings.field_stock_picking__display_name +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__display_name +msgid "Display Name" +msgstr "Nom affiché" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_customer_document__name +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product_contract_form +msgid "Document" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__rental_product_operation__state__done +msgid "Done" +msgstr "Fait" + +#. module: product_rental_bookings +#: code:addons/product_rental_bookings/wizard/advance_payment_invoice.py:0 +#, python-format +msgid "Down Payment" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_advance_payment_invoice__amount +msgid "Down Payment Amount" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_advance_payment_invoice__product_id +msgid "Down Payment Product" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__product_advance_payment_invoice__advance_payment_method__fixed +msgid "Down payment (fixed amount)" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__product_advance_payment_invoice__advance_payment_method__percentage +msgid "Down payment (percentage)" +msgstr "" + +#. module: product_rental_bookings +#: code:addons/product_rental_bookings/wizard/advance_payment_invoice.py:0 +#, python-format +msgid "Down payment of %s%%" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__rental_product_order__state__draft +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__wizard_product_service__state__draft +msgid "Draft" +msgstr "Brouillon" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.customer_registration_template +msgid "E-mail" +msgstr "Courriel" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_res_config_settings__email_template_id +msgid "Email template" +msgstr "Template de courriel" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_res_config_settings__day_interval +msgid "Email/Interval" +msgstr "Courriel/Interval" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_session_config__end_time +msgid "End Time" +msgstr "Entrer le nombre d'heure" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product +msgid "Enter quantity" +msgstr "Entrer la quantité" + +#. module: product_rental_bookings +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__rental_product_contract__state__expired +msgid "Expired" +msgstr "Expiré" + +#. module: product_rental_bookings +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__rental_product_contract__state__diesoon +msgid "Expiring Soon" +msgstr "Expire bientôt" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_booking__extra_charges +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__extra_charges +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__extra_charges +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__extra_charges +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_contract +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.report_product_rental_order +msgid "Extra Charges" +msgstr "Charges supplémentaires" + +#. module: product_rental_bookings +#: model:product.product,name:product_rental_bookings.extra_charge_product_id +#: model:product.template,name:product_rental_bookings.extra_charge_product_id_product_template +msgid "Extra charge" +msgstr "Charge supplémentaire" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__first_invoice_created +msgid "First Invoice Created" +msgstr "Première facture créée" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__first_payment +msgid "First Payment" +msgstr "Premier paiement" + +#. module: product_rental_bookings +#: code:addons/product_rental_bookings/models/product_book.py:0 +#, python-format +msgid "First Please Select the Product" +msgstr "Sélectionner le produit en premier SVP" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_booking__from_date +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_policy__from_date +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__from_date +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_logs__from_date +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__from_date +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__from_date +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.product_search +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_order +msgid "From Date" +msgstr "Du" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.product_search +msgid "From DateTime" +msgstr "Du" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product_contract_form +msgid "Generate Policy" +msgstr "Politique générale" + +#. module: product_rental_bookings +#: model:ir.actions.server,name:product_rental_bookings.ir_cron_rental_contract_costs_ir_actions_server +#: model:ir.cron,cron_name:product_rental_bookings.ir_cron_rental_contract_costs +#: model:ir.cron,name:product_rental_bookings.ir_cron_rental_contract_costs +msgid "Generate Rental contracts costs" +msgstr "Coûts généraux des contrats de location" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__generated_cost_ids +msgid "Generated Costs" +msgstr "Coûts générés" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_account_move_line__enter_hour +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_contract_lines__enter_hour +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_order_line__enter_hour +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__product_contract_lines__price_based__per_hour +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__product_order_line__price_based__per_hour +msgid "Hour" +msgstr "Heure" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_res_config_settings__enabled_hour_rent +msgid "Hour Rent" +msgstr "Heures louées" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_account_bank_statement_line__is_hours +#: model:ir.model.fields,field_description:product_rental_bookings.field_account_move__is_hours +#: model:ir.model.fields,field_description:product_rental_bookings.field_account_payment__is_hours +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__is_hours +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__is_hours +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__is_hours +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.checkout_process +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.product_search +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product +msgid "Hours" +msgstr "Heures" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_account_move__id +#: model:ir.model.fields,field_description:product_rental_bookings.field_account_move_line__idid +#: model:ir.model.fields,field_description:product_rental_bookings.field_customer_document__id +#: model:ir.model.fields,field_description:product_rental_bookings.field_payment_transaction__id +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_advance_payment_invoice__id +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_booking__id +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_contract_lines__id +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_product__id +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_rental_line__id +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_order_line__id +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_policy__id +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__id +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_logs__id +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_operation__id +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__id +#: model:ir.model.fields,field_description:product_rental_bookings.field_res_config_settings__id +#: model:ir.model.fields,field_description:product_rental_bookings.field_session_config__id +#: model:ir.model.fields,field_description:product_rental_bookings.field_stock_move__id +#: model:ir.model.fields,field_description:product_rental_bookings.field_stock_picking__id +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__id +msgid "ID" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_customer_document__id_number +msgid "ID Number" +msgstr "Numéro ID" + +#. module: product_rental_bookings +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__rental_product_contract__state__open +msgid "In Progress" +msgstr "En cours" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_advance_payment_invoice__deposit_account_id +msgid "Income Account" +msgstr "Montant à venir" + +#. module: product_rental_bookings +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__rental_product_contract__state__futur +msgid "Incoming" +msgstr "A venir" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product_type_kanban +msgid "Incoming Products" +msgstr "Produits à venir" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__sum_cost +msgid "Indicative Costs Total" +msgstr "Tarifs totaux indicatifs" + +#. module: product_rental_bookings +#. openerp-web +#: code:addons/product_rental_bookings/static/src/js/product_contract_sign.js:0 +#, python-format +msgid "Information" +msgstr "" + + +#. module: product_rental_bookings +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__rental_product_operation__rental_move_type__internal +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__stock_picking__rental_move_type__internal +msgid "Internal" +msgstr "Interne" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product_type_kanban +msgid "Internal Moves" +msgstr "Mouvements internes" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_account_bank_statement_line__interval_number +#: model:ir.model.fields,field_description:product_rental_bookings.field_account_move__interval_number +#: model:ir.model.fields,field_description:product_rental_bookings.field_account_payment__interval_number +msgid "Interval Number" +msgstr "Numéro d'interval" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_account_bank_statement_line__interval_type +#: model:ir.model.fields,field_description:product_rental_bookings.field_account_move__interval_type +#: model:ir.model.fields,field_description:product_rental_bookings.field_account_payment__interval_type +msgid "Interval Type" +msgstr "Type d'interval" + +#. module: product_rental_bookings +#: code:addons/product_rental_bookings/models/product_order.py:0 +#, python-format +msgid "Invalid token found! Token acquirer %s != %s" +msgstr "" + +#. module: product_rental_bookings +#: code:addons/product_rental_bookings/models/product_order.py:0 +#, python-format +msgid "Invalid token found! Token partner %s != %s" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_rental_line__invoice_number +msgid "Invoice ID" +msgstr "ID facture" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__invoice_ids +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__invoice_ids +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__invoice_ids +msgid "Invoice Id" +msgstr "ID facture" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_rental_line__invoice_ref +msgid "Invoice Ref" +msgstr "Référence facture" + +#. module: product_rental_bookings +#: model:ir.actions.act_window,name:product_rental_bookings.action_view_product_advance_payment_invoice +msgid "Invoice Rental Orders" +msgstr "Facture commandes de location" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.view_product_advance_payment_invoice +msgid "Invoice Rentals Order" +msgstr "Facture commande de location" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__invoice_status +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__invoice_status +msgid "Invoice Status" +msgstr "Statut de la facture" + +#. module: product_rental_bookings +#: code:addons/product_rental_bookings/models/product_order.py:0 +#, python-format +msgid "Invoice must be in draft state in order to validate it." +msgstr "La facture doit être en Brouillon pour être validée." + +#. module: product_rental_bookings +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__product_advance_payment_invoice__advance_payment_method__delivered +msgid "Invoiceable lines" +msgstr "Lignes facturables" + +#. module: product_rental_bookings +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__product_advance_payment_invoice__advance_payment_method__all +msgid "Invoiceable lines (deduct down payments)" +msgstr "" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.view_product_advance_payment_invoice +msgid "" +"Invoices will be created in draft so that you can review\n" +" them before validation." +msgstr "" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__partner_invoice_id +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__partner_invoice_id +msgid "Invoicing Address" +msgstr "Adresse de facturation" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__is_damaged +msgid "Is Damaged" +msgstr "Est endommagé" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_booking__is_search +msgid "Is Search" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.model,name:product_rental_bookings.model_account_move +msgid "Journal Entry" +msgstr "Pièce comptable" + +#. module: product_rental_bookings +#: model:ir.model,name:product_rental_bookings.model_account_move_line +msgid "Journal Item" +msgstr "Écriture comptable" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_order_line__enter_kms +msgid "KM" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_account_move____last_update +#: model:ir.model.fields,field_description:product_rental_bookings.field_account_move_line____last_update +#: model:ir.model.fields,field_description:product_rental_bookings.field_customer_document____last_update +#: model:ir.model.fields,field_description:product_rental_bookings.field_payment_transaction____last_update +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_advance_payment_invoice____last_update +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_booking____last_update +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_contract_lines____last_update +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_product____last_update +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_rental_line____last_update +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_order_line____last_update +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_policy____last_update +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract____last_update +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_logs____last_update +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_operation____last_update +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order____last_update +#: model:ir.model.fields,field_description:product_rental_bookings.field_res_config_settings____last_update +#: model:ir.model.fields,field_description:product_rental_bookings.field_session_config____last_update +#: model:ir.model.fields,field_description:product_rental_bookings.field_stock_move____last_update +#: model:ir.model.fields,field_description:product_rental_bookings.field_stock_picking____last_update +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service____last_update +msgid "Last Modified on" +msgstr "Dernière modification le" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_customer_document__write_uid +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_advance_payment_invoice__write_uid +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_booking__write_uid +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_contract_lines__write_uid +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_rental_line__write_uid +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_order_line__write_uid +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_policy__write_uid +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__write_uid +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_logs__write_uid +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_operation__write_uid +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__write_uid +#: model:ir.model.fields,field_description:product_rental_bookings.field_session_config__write_uid +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__write_uid +msgid "Last Updated by" +msgstr "Dernière mise à jour par" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_customer_document__write_date +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_advance_payment_invoice__write_date +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_booking__write_date +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_contract_lines__write_date +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_rental_line__write_date +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_order_line__write_date +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_policy__write_date +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__write_date +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_logs__write_date +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_operation__write_date +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__write_date +#: model:ir.model.fields,field_description:product_rental_bookings.field_session_config__write_date +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__write_date +msgid "Last Updated on" +msgstr "Dernière mise à jour le" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_booking__location_id +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_operation__location_id +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__location_id +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__location_id +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.product_search +msgid "Location" +msgstr "Point de vente" + +#. module: product_rental_bookings +#: code:addons/product_rental_bookings/models/product_book.py:0 +#, python-format +msgid "Manage Multiple Stock Locations need to be assign." +msgstr "" + +#. module: product_rental_bookings +#. openerp-web +#: code:addons/product_rental_bookings/static/src/xml/product_booking_calender.xml:0 +#: code:addons/product_rental_bookings/static/src/xml/product_booking_calender.xml:0 +#, python-format +msgid "Model" +msgstr "Modèle" + +#. module: product_rental_bookings +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__account_move__interval_type__months +msgid "Month" +msgstr "Mois" + +#. module: product_rental_bookings +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__rental_product_contract__cost_frequency__monthly +msgid "Monthly" +msgstr "Mensuel" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_stock_picking__product_move_line_id +msgid "Move Lines" +msgstr "Déplacer les lignes" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.stock_picking_form_inherit +msgid "Move to Store" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_rental_line__name +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__name +#: model:ir.model.fields,field_description:product_rental_bookings.field_session_config__name +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.customer_registration_template +msgid "Name" +msgstr "Nom" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product_contract_form +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product_order_form_id +msgid "New" +msgstr "Nouveau" + +#. module: product_rental_bookings +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__rental_product_contract__cost_frequency__no +msgid "No" +msgstr "Non" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_res_config_settings__number_of_email +msgid "Number of Email" +msgstr "Nombre de courriel" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__number_of_slot +msgid "Number of Slot" +msgstr "Nombre de créneaux" + +#. module: product_rental_bookings +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__rental_product_operation__state__on_rent +msgid "On Rent" +msgstr "A louer" + +#. module: product_rental_bookings +#: model:ir.ui.menu,name:product_rental_bookings.rental_product_branch_menu +msgid "Operation" +msgstr "Opération" + +#. module: product_rental_bookings +#: model:ir.actions.act_window,name:product_rental_bookings.action_picking_type_list +#: model:ir.actions.act_window,name:product_rental_bookings.action_product_operation_type +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_operation__operation_type_id +msgid "Operation Type" +msgstr "Type d'opération" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product_operation_form_id +msgid "Operation Type Name" +msgstr "Nom du Type d'opération" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_operation__name +msgid "Operation Types Name" +msgstr "Nom des Types d'opération" + +#. module: product_rental_bookings +#: model:ir.ui.menu,name:product_rental_bookings.menu_operation_type +msgid "Operations Types" +msgstr "Types d'opération" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_product__product_registration_id +msgid "Order" +msgstr "Commande" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_order_comfirmation +msgid "Order #" +msgstr "Commande #" + +#. module: product_rental_bookings +#: model:mail.template,subject:product_rental_bookings.email_template_product_contract +msgid "Order (Ref ${object.name or 'n/a' })" +msgstr "Commande (Ref ${object.name or 'n/a' })" + +#. module: product_rental_bookings +#: model:mail.template,subject:product_rental_bookings.email_template_product_rental +msgid "Order (Ref ${object.res_number or 'n/a' })" +msgstr "Commande (Ref ${object.res_number or 'n/a' })" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__product_contract_lines_ids +msgid "Order Line" +msgstr "Ligne de commande" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__product_order_lines_ids +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__product_order_lines_ids +msgid "Order Line " +msgstr "Ligne de commande" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_order +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product_order_search +msgid "Order Number" +msgstr "Numéro de commande" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__origin +msgid "Order Reference" +msgstr "Référence de commande" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__res_number +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__res_number +msgid "Order number" +msgstr "Numéro de commande" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product_order_form_id +msgid "Other Information" +msgstr "Autres informations" + +#. module: product_rental_bookings +#: code:addons/product_rental_bookings/models/product_order.py:0 +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.payment +#, python-format +msgid "Pay Now" +msgstr "Payer maintenant" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.payment +msgid "Pay with" +msgstr "Payer avec" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product_contract_form +msgid "Payment Details" +msgstr "Détails du paiement" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_rental_line__payment_info +msgid "Payment Stage" +msgstr "État du paiement" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__account_payment_term +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__account_payment_term +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__account_payment_term +msgid "Payment Term" +msgstr "Conditions de paiement" + +#. module: product_rental_bookings +#: model:ir.model,name:product_rental_bookings.model_payment_transaction +msgid "Payment Transaction" +msgstr "Transaction" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.customer_registration_template +msgid "Phone" +msgstr "Téléphone" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__picking_id +msgid "Picking" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__stock_picking_ids +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__stock_picking_ids +msgid "Picking Id" +msgstr "" + +#. module: product_rental_bookings +#: code:addons/product_rental_bookings/models/product_order.py:0 +#, python-format +msgid "Please Select From date Or to date!!!" +msgstr "Veuillez sélectionner du date de début et de fin" + +#. module: product_rental_bookings +#: code:addons/product_rental_bookings/models/stock_picking.py:0 +#, python-format +msgid "Please Select Some Product to Move" +msgstr "" + +#. module: product_rental_bookings +#. openerp-web +#: code:addons/product_rental_bookings/static/src/js/product_contract_sign.js:0 +#, python-format +msgid "Please add signature and try again." +msgstr "" + +#. module: product_rental_bookings +#: code:addons/product_rental_bookings/models/product_contract.py:0 +#, python-format +msgid "Please enter the sufficient Number of Slot" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_contract_lines__price +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_order_line__price +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.cart_lines +msgid "Price" +msgstr Prix"" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__pricelist_id +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__pricelist_id +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__pricelist_id +msgid "Pricelist" +msgstr "Liste de prix" + +#. module: product_rental_bookings +#: model:ir.model,name:product_rental_bookings.model_product_product +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_logs__product_id +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__rental_product_ids +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__rental_product_ids +#: model:ir.ui.menu,name:product_rental_bookings.product_product_product +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.cart_lines +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.checkout_process +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product_contract_form +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product_order_form_id +msgid "Product" +msgstr "Article" + +#. module: product_rental_bookings +#: code:addons/product_rental_bookings/models/product_book.py:0 +#, python-format +msgid "Product Booking" +msgstr "Réservation de produits" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product_cart_update +msgid "Product Cart" +msgstr "Panier" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_booking__categ_id +msgid "Product Category" +msgstr "Catégorie de produit" + +#. module: product_rental_bookings +#: code:addons/product_rental_bookings/models/product_contract.py:0 +#, python-format +msgid "Product Contract" +msgstr "Contrat de produit" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.product_booking_id +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product_contract_form +msgid "Product Details" +msgstr "Détails du produit" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_account_move_line__product_id +msgid "Product ID" +msgstr "ID du produit" + + + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__product_location_id +msgid "Product Location" +msgstr "Emplacement du produit" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_stock_move__product_move_id +msgid "Product Move" +msgstr "Mouvement du produit" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__product_name +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__product_name +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product +msgid "Product Name" +msgstr "Nom du produit" + +#. module: product_rental_bookings +#: code:addons/product_rental_bookings/models/product_order.py:0 +#, python-format +msgid "Product Register" +msgstr "Enregistrement du produit" + +#. module: product_rental_bookings +#. openerp-web +#: code:addons/product_rental_bookings/static/src/js/product_booking_calender.js:0 +#: model:ir.actions.client,name:product_rental_bookings.action_product_calender_product_booking1 +#, python-format +msgid "Product Rental Booking" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.model,name:product_rental_bookings.model_rental_product_contract +msgid "Product Rental Contract" +msgstr "Contract de location du produit" + +#. module: product_rental_bookings +#: model:ir.model,name:product_rental_bookings.model_product_contract_lines +msgid "Product Retnal Contract Lines" +msgstr "Lignes de contrat de location du produit" + +#. module: product_rental_bookings +#: model:ir.actions.act_window,name:product_rental_bookings.action_product_quick_product_booking +msgid "Product booking" +msgstr "Réservation du produit" + + + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_order_line__product_id +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.product_booking_calendar +msgid "product" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.actions.act_window,name:product_rental_bookings.action_rental_product_logs_analysis +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.view_product_logs_graph +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.view_product_logs_pivot +msgid "product Logs" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_contract_lines__product_id +msgid "product Name" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_stock_picking__product_order_rel_id +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product_order_form_id +msgid "product Order" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.model,name:product_rental_bookings.model_product_order_line +msgid "product Order Line" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.actions.act_window,name:product_rental_bookings.product_action_quotations +msgid "product Quotations" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_order_line__product_order_id +msgid "product order" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_contract_lines__qty_needed +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_product__rental_qyt +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_order_line__qty_needed +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.cart_lines +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.checkout_process +msgid "Quantity" +msgstr "Quantité" + +#. module: product_rental_bookings +#: model:ir.ui.menu,name:product_rental_bookings.feet_product_quick_booking_menu +msgid "Quick Search" +msgstr "Recherche rapide" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product +msgid "Rate Per Day" +msgstr "Coût journalier" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product +msgid "Rate Per Hour" +msgstr "Coût horaire" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product +msgid "Rate Per Session" +msgstr "Coût par session" + +#. module: product_rental_bookings +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__rental_product_operation__state__ready +msgid "Ready" +msgstr "Prêt" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.stock_picking_form_inherit +msgid "Receive" +msgstr "Recevoir" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__cost_generated +msgid "Recurring Cost" +msgstr "Coût récurrent" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__cost_frequency +msgid "Recurring Cost Frequency" +msgstr "Fréquence des tarifs récurrent" + +#. module: product_rental_bookings +#: model:ir.actions.report,name:product_rental_bookings.product_contract_recurring_report +#: model:ir.model.fields,field_description:product_rental_bookings.field_account_bank_statement_line__is_recuuring +#: model:ir.model.fields,field_description:product_rental_bookings.field_account_move__is_recuuring +#: model:ir.model.fields,field_description:product_rental_bookings.field_account_payment__is_recuuring +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product_contract_form +msgid "Recurring Invoice" +msgstr "Facture récurrente" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__recurring_line +msgid "Recurring Line" +msgstr "Ligne récurrente" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.cart_lines +msgid "Remove from cart" +msgstr "Retirer du panier" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product_contract_form +msgid "Renew Contract" +msgstr "Renouveller le contrat" + +#. module: product_rental_bookings +#: code:addons/product_rental_bookings/models/product_contract.py:0 +#, python-format +msgid "Renew Contract" +msgstr "Renouveller le contrat" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__cost +msgid "Rent Cost" +msgstr "Tarif de location" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_product__rental_amount +msgid "Rent Per Day Rate" +msgstr "Tarif à la journée" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_product__rental_amount_per_hour +msgid "Rent Per Hour Rate" +msgstr "Tarif à l'heure" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_product__rental_amount_per_session +msgid "Rent Per Session Rate" +msgstr "Tarif de la session" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.product_search +msgid "Rent Product not available right Now" +msgstr "Produit de location non disponible actuellement" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_product__is_rental +#: model:ir.ui.menu,name:product_rental_bookings.rental_product_booking_menu +#: model:ir.ui.menu,name:product_rental_bookings.rental_product_main_menu +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_res_config_settings_form_inherit +msgid "Rental" +msgstr "Location" + +#. module: product_rental_bookings +#: model:ir.ui.menu,name:product_rental_bookings.feet_product_calender_booking_menu +msgid "Rental Bookings" +msgstr "Calendrier de location" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_res_config_settings_form_inherit +msgid "Rental Configuration" +msgstr "Configuration de location" + +#. module: product_rental_bookings +#: model:ir.actions.report,name:product_rental_bookings.product_rental_contract_report +msgid "Rental Contract" +msgstr "Contrat de location" + +#. module: product_rental_bookings +#: model:ir.actions.act_window,name:product_rental_bookings.action_rental_product_contract +#: model:ir.actions.act_window,name:product_rental_bookings.action_rental_product_contract_form +#: model:ir.ui.menu,name:product_rental_bookings.feet_product_contract_sub_menu +msgid "Rental Contracts" +msgstr "Contrats de location" + +#. module: product_rental_bookings +#: model:ir.model,name:product_rental_bookings.model_product_rental_line +msgid "Rental Lines" +msgstr "Lignes de location" + +#. module: product_rental_bookings +#: model:ir.ui.menu,name:product_rental_bookings.feet_product_logs_analysis +msgid "Rental Log" +msgstr "Logs de location" + +#. module: product_rental_bookings +#: model:ir.actions.act_window,name:product_rental_bookings.action_rental_product_logs +#: model:ir.ui.menu,name:product_rental_bookings.feet_product_logs_menu +msgid "Rental Logs" +msgstr "Logs de location" + +#. module: product_rental_bookings +#: model:ir.actions.act_window,name:product_rental_bookings.action_rental_product_move +#: model:ir.model.fields,field_description:product_rental_bookings.field_stock_picking__is_rental +msgid "Rental Move" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_rental_line__rental_number +msgid "Rental Number" +msgstr "Numéro de location" + +#. module: product_rental_bookings +#. openerp-web +#: code:addons/product_rental_bookings/static/src/js/product_booking_calender.js:0 +#: model:ir.actions.act_window,name:product_rental_bookings.action_product_order_id +#: model:ir.actions.act_window,name:product_rental_bookings.action_product_order_id_new +#: model:ir.actions.act_window,name:product_rental_bookings.action_rental_order_analysis +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_order +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product_order_form_id +#, python-format +msgid "Rental Order" +msgstr "Commande de location" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__rental_id +msgid "Rental Order Id" +msgstr "ID Commande de location" + +#. module: product_rental_bookings +#: model:ir.ui.menu,name:product_rental_bookings.product_order_menu +#: model:ir.ui.menu,name:product_rental_bookings.product_rental_order_analysis +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.portal_my_rental_orders +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.product_rental_order +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.view_product_rental_order_graph +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.view_product_rental_order_pivot +msgid "Rental Orders" +msgstr "Commandes de location" + +#. module: product_rental_bookings +#: model:ir.model,name:product_rental_bookings.model_rental_policy +msgid "Rental Policy" +msgstr "Politique de location" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_account_bank_statement_line__rental_order_id +#: model:ir.model.fields,field_description:product_rental_bookings.field_account_move__rental_order_id +#: model:ir.model.fields,field_description:product_rental_bookings.field_account_payment__rental_order_id +msgid "Rental ref " +msgstr "Référence de location " + +#. module: product_rental_bookings +#: model:ir.actions.report,name:product_rental_bookings.product_rental_order_report +msgid "Rental/Order" +msgstr "Location/Commande" + +#. module: product_rental_bookings +#. openerp-web +#: code:addons/product_rental_bookings/static/src/xml/delivery_sign.xml:0 +#, python-format +msgid "Reset" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__rental_product_operation__rental_move_type__incoming +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__stock_picking__rental_move_type__incoming +msgid "Return" +msgstr "Retourner" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__return_date +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__return_date +msgid "Return Date" +msgstr "Date de retour" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.payment +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product_cart_update +msgid "Review Order" +msgstr "" + +#. module: product_rental_bookings +#. openerp-web +#: code:addons/product_rental_bookings/static/src/xml/delivery_sign.xml:0 +#, python-format +msgid "Save" +msgstr "Sauvegarder" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.product_search +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.product_booking_id +msgid "Search" +msgstr "Lancer la recherche" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_product__selected_product +msgid "Select" +msgstr "Sélectionner" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.product_search +msgid "Select Product Categoty" +msgstr "Sélectionner la catégorie" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_stock_move__products_checked +msgid "Select Products" +msgstr "Sélectionner les produits" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.product_search +msgid "Select Session" +msgstr "Sélectionner la session" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product_contract_form +msgid "Send Contract by Email" +msgstr "Envoyer le contrat par courriel" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_res_config_settings__send_mail_after +msgid "Send Mail After" +msgstr "Envoier un courriel après" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product_order_form_id +msgid "Send by Email" +msgstr "Envoyer par courriel" + +#. module: product_rental_bookings +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__rental_product_operation__state__service +msgid "Service" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__service_location_id +msgid "Service Location" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_booking__session_id +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__product_contract_lines__price_based__per_session +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__product_order_line__price_based__per_session +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.product_search +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product +msgid "Session" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.actions.act_window,name:product_rental_bookings.action_session_config +#: model:ir.ui.menu,name:product_rental_bookings.menu_session_config +msgid "Session Configuration" +msgstr "Configuration de session" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_res_config_settings__enabled_session_rent +msgid "Session Rent" +msgstr "Location par session" + +#. module: product_rental_bookings +#: model:ir.model,name:product_rental_bookings.model_session_config +msgid "Session configuration settings" +msgstr "Paramètres de configuration des sessions" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product_contract_form +msgid "Set Contract In Progress" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.actions.act_window,name:product_rental_bookings.rental_config_settings_action +#: model:ir.ui.menu,name:product_rental_bookings.rental_menu_configuration +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product_type_kanban +msgid "Settings" +msgstr "Configurations" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.payment +msgid "Shop - Select Payment Acquirer" +msgstr "" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product +msgid "Sign in" +msgstr "Se connecter" + +#. module: product_rental_bookings +#. openerp-web +#: code:addons/product_rental_bookings/static/src/js/product_contract_sign.js:0 +#, python-format +msgid "Signature stored successfully." +msgstr "Signature enregistrée avec succès" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product_contract_form +msgid "Source Document" +msgstr "Document source" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_operation__source_location +msgid "Source Location" +msgstr "Emplacement d'origine" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_session_config__start_time +msgid "Start Time" +msgstr "Heure de début" + +#. module: product_rental_bookings +#: code:addons/product_rental_bookings/models/session_config_settings.py:0 +#, python-format +msgid "Start time must be smaller than End time" +msgstr "L'heure de début doit être avant l'heure de fin" + +#. module: product_rental_bookings +#: code:addons/product_rental_bookings/models/session_config_settings.py:0 +#, python-format +msgid "Start time or End time is wrong" +msgstr "L'heure de début ou l'heure de fin est incorrecte" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_operation__state +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__state +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__state +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_order +msgid "State" +msgstr "État" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__state +msgid "Status" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.model,name:product_rental_bookings.model_stock_move +msgid "Stock Move" +msgstr "Mouvement de stock" + +#. module: product_rental_bookings +#: model:ir.ui.menu,name:product_rental_bookings.stock_inventory_sub_menu +msgid "Stock inventory" +msgstr "Inventaire" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.customer_registration_template +msgid "Street and Number" +msgstr "Numéro et rue" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.customer_registration_template +msgid "Street2" +msgstr "Rue 2" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_contract_lines__sub_total +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_order_line__sub_total +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__subtotal +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.checkout_process +msgid "Sub Total" +msgstr "Sous-total" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_booking__sub_total +msgid "Sub Total(Exclusive Tax)" +msgstr "Sous-total (taxes exclues)" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.customer_registration_template +msgid "Submit" +msgstr "Soumettre" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.customer_registration_template +msgid "TIN/VAT" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_contract_lines__tax_id +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_order_line__tax_id +msgid "Tax" +msgstr "Taxe" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_contract_lines__price_tax +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_order_line__price_tax +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__taxes +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__taxes +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__taxes +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_contract +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.report_product_rental_order +msgid "Taxes" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.model.fields,help:product_rental_bookings.field_product_advance_payment_invoice__deposit_taxes_id +msgid "Taxes used for deposits" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__terms_condition +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__terms_condition +msgid "Terms And Condition" +msgstr "Conditions générales de vente" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__terms_condition +msgid "Terms and Condition" +msgstr "Conditions générales de vente" + +#. module: product_rental_bookings +#: model:ir.model.fields,help:product_rental_bookings.field_product_advance_payment_invoice__amount +msgid "The amount to be invoiced in advance, taxes excluded." +msgstr "Le montant à facturer en avance, taxes exclues." + +#. module: product_rental_bookings +#: code:addons/product_rental_bookings/wizard/advance_payment_invoice.py:0 +#, python-format +msgid "The value of the down payment amount must be positive." +msgstr "" + +#. module: product_rental_bookings +#: model:ir.model.fields,help:product_rental_bookings.field_rental_product_contract__cost +msgid "This fields is to determine the cost of rent" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_booking__to_date +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_policy__to_date +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__to_date +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_logs__to_date +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__to_date +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__to_date +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.product_search +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_order +msgid "To Date" +msgstr "Au" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.product_search +msgid "To DateTime" +msgstr "Au" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_booking__total +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_contract_lines__total +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_order_line__total +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__total +msgid "Total" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_contract_lines__price_total +msgid "Total " +msgstr "" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__total_amount +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__total_amount +#: model:ir.model.fields,field_description:product_rental_bookings.field_stock_picking__total_amount +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__total_amount +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product +msgid "Total Amount" +msgstr "Montant total" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__contract_count +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__contract_count +msgid "Total Contract" +msgstr "Total du contrat" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_booking__total_days +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product +msgid "Total Days" +msgstr "Nombre de jours total" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.cart_lines +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.checkout_process +msgid "Total Days/Hour" +msgstr "Total Jours/Heures" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_booking__total_hours +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product +msgid "Total Hours" +msgstr "Nombre d'heures totales" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__invoice_count +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__invoice_count +msgid "Total Invoiced" +msgstr "Total facturé" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__picking_count +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__picking_count +msgid "Total Invoiced " +msgstr "Total facturé" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_order_line__price_total +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.cart_lines +msgid "Total Price" +msgstr "Prix total" + +#. module: product_rental_bookings +#: model:ir.model,name:product_rental_bookings.model_stock_picking +msgid "Transfer" +msgstr "Transfert" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__is_true +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__is_true +msgid "True" +msgstr "Vrai" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.product_search +msgid "Type" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_operation__rental_move_type +#: model:ir.model.fields,field_description:product_rental_bookings.field_stock_picking__rental_move_type +msgid "Types of Operation" +msgstr "Type d'opération" + +#. module: product_rental_bookings +#: model:product.product,uom_name:product_rental_bookings.extra_charge_product_id +#: model:product.template,uom_name:product_rental_bookings.extra_charge_product_id_product_template +msgid "Units" +msgstr "Unités" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__untaxed_amount +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__untaxed_amount +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__untaxed_amount +msgid "Untaxed Amount" +msgstr "Montant hors-taxes" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__amount_untaxed +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__amount_untaxed +msgid "Untaxed Amount 1" +msgstr "Montant hors-taxes 1" + +#. module: product_rental_bookings +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__account_move__interval_type__weeks +msgid "Week" +msgstr "Semaine" + +#. module: product_rental_bookings +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__rental_product_contract__cost_frequency__weekly +msgid "Weekly" +msgstr "Hebdomadaire" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_product_advance_payment_invoice__advance_payment_method +msgid "What do you want to invoice?" +msgstr "Que voulez-vous facturer ?" + +#. module: product_rental_bookings +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__rental_product_contract__cost_frequency__yearly +msgid "Yearly" +msgstr "Annuel" + +#. module: product_rental_bookings +#: code:addons/product_rental_bookings/models/product_contract.py:0 +#, python-format +msgid "You First Payment For: %s" +msgstr "Votre premier paiement pour :" + +#. module: product_rental_bookings +#: code:addons/product_rental_bookings/models/product_book.py:0 +#: code:addons/product_rental_bookings/models/product_book.py:0 +#, python-format +msgid "You cannot enter past date" +msgstr "Vous ne pouvez pas entrer une date passée" + +#. module: product_rental_bookings +#: code:addons/product_rental_bookings/models/product_order.py:0 +#, python-format +msgid "" +"You cannot validate an invoice with a negative total amount. You should " +"create a credit note instead." +msgstr "" +"Vous ne pouvez pas valider une facture avec un montant négatif. Vous devez " +"créer une notre de crédit à la place." + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.customer_registration_template +msgid "Zip" +msgstr "Code postal" + +#. module: product_rental_bookings +#: model:ir.ui.menu,name:product_rental_bookings.feet_product_move_sub_menu +msgid "product_rental_bookings.feet_product_move_sub_menu" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.ui.menu,name:product_rental_bookings.rental_product_operation_dashboard +msgid "product_rental_bookings.rental_product_operation_dashboard" +msgstr "" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.cart_lines +msgid "days" +msgstr "jours" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.product_search +msgid "dd-mm-yyyy" +msgstr "jj-mm-yyyy" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.product_search +msgid "dd-mm-yyyy HH:MM" +msgstr "jj-mm-aaaa HH:MM" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__end_date +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__end_date +msgid "end Date" +msgstr "Date de fin" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.cart_lines +msgid "hours" +msgstr "heures" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__is_invoice +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__is_invoice +msgid "invoice" +msgstr "facture" + +#. module: product_rental_bookings +#. openerp-web +#: code:addons/product_rental_bookings/static/src/xml/delivery_sign.xml:0 +#, python-format +msgid "or" +msgstr "ou" + +#. module: product_rental_bookings +#: model:ir.model,name:product_rental_bookings.model_product_advance_payment_invoice +msgid "product Advance Payment Invoice" +msgstr "" + +#. module: product_rental_bookings +#: code:addons/product_rental_bookings/models/product_order.py:0 +#, python-format +msgid "product Contract" +msgstr "Contrat de produit" + +#. module: product_rental_bookings +#: model:ir.model,name:product_rental_bookings.model_rental_product_order +msgid "product Product Order" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.model,name:product_rental_bookings.model_rental_product_logs +msgid "product Products Logs" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.model,name:product_rental_bookings.model_rental_product_operation +msgid "product Products Operation" +msgstr "" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.product_booking_id +msgid "product product Booking" +msgstr "" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product_contract_form +msgid "product Reccurring Lines" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.model,name:product_rental_bookings.model_wizard_product_service +msgid "product Service" +msgstr "" + +#. module: product_rental_bookings +#: model_terms:ir.ui.view,arch_db:product_rental_bookings.rental_product_contract_form +msgid "recurring_amount" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__start_date +#: model:ir.model.fields,field_description:product_rental_bookings.field_wizard_product_service__start_date +msgid "start Date" +msgstr "Date de début" + +#. module: product_rental_bookings +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__rental_product_operation__rental_move_type__outgoing +msgid "Customers" +msgstr "Clients" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__display_name +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_operation__display_name +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__display_name +msgid "Display Name" +msgstr "Nom affiché" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract__id +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_operation__id +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order__id +msgid "ID" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__rental_product_operation__rental_move_type__internal +msgid "Internal" +msgstr "Interne" + +#. module: product_rental_bookings +#: model:ir.ui.menu,name:product_rental_bookings.rental_product_inventory_menu +msgid "Inventory" +msgstr "Inventaire" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_contract____last_update +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_operation____last_update +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_order____last_update +msgid "Last Modified on" +msgstr "Dernière modification le" + +#. module: product_rental_bookings +#: model:ir.ui.menu,name:product_rental_bookings.feet_product_internal_inventory_sub_menu +msgid "On Charge order" +msgstr "Bon de charge" + +#. module: product_rental_bookings +#: model:ir.model,name:product_rental_bookings.model_rental_product_contract +msgid "Product Rental Contract" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.model.fields.selection,name:product_rental_bookings.selection__rental_product_operation__rental_move_type__incoming +msgid "Return" +msgstr "Retourner" + +#. module: product_rental_bookings +#: model:ir.model.fields,field_description:product_rental_bookings.field_rental_product_operation__rental_move_type +msgid "Types of Operation" +msgstr "Type d'opération" + +#. module: product_rental_bookings +#: model:ir.model,name:product_rental_bookings.model_rental_product_order +msgid "product Product Order" +msgstr "" + +#. module: product_rental_bookings +#: model:ir.model,name:product_rental_bookings.model_rental_product_operation +msgid "product Products Operation" +msgstr "" diff --git a/product_rental_bookings/models/__init__.py b/product_rental_bookings/models/__init__.py new file mode 100755 index 0000000..c153329 --- /dev/null +++ b/product_rental_bookings/models/__init__.py @@ -0,0 +1,13 @@ +# -*- coding: utf-8 -*- + +from . import account_move +from . import product +from . import product_book +from . import product_contract +from . import product_operation +from . import product_order +from . import product_logs +from . import res_config_settings +from . import stock_move +from . import stock_picking +from . import session_config_settings diff --git a/product_rental_bookings/models/account_move.py b/product_rental_bookings/models/account_move.py new file mode 100644 index 0000000..39ad6ac --- /dev/null +++ b/product_rental_bookings/models/account_move.py @@ -0,0 +1,106 @@ +# -*- coding: utf-8 -*- + +from datetime import datetime + +from odoo import models, fields +from odoo.exceptions import UserError + + +class AccountInvoice(models.Model): + _inherit = "account.move" + + rental_order_id = fields.Many2one("rental.product.order", string="Rental ref ") + interval_type = fields.Selection( + [("days", "Day"), ("weeks", "Week"), ("months", "Month")], + string="Interval Type", + ) + interval_number = fields.Integer(string="Interval Number", readonly=1) + is_recurring = fields.Boolean(string="Recurring Invoice", default=False) + contract_id = fields.Many2one("rental.product.contract", string="Contract") + is_hours = fields.Boolean(string="Hours") + is_days = fields.Boolean(string="Days") + + def action_invoice_open(self): + # lots of duplicate calls to action_invoice_open, so we remove those already open + to_open_invoices = self.filtered(lambda inv: inv.state != "open") + if to_open_invoices.filtered(lambda inv: inv.state != "draft"): + raise UserError( + _("Invoice must be in draft state in order to validate it.") + ) + if to_open_invoices.filtered(lambda inv: inv.amount_total < 0): + raise UserError( + _( + "You cannot validate an invoice with a negative total amount. You should create a credit note instead." + ) + ) + to_open_invoices.action_date_assign() + to_open_invoices.action_move_create() + if ( + self.interval_number > 0 + and self.is_recuuring == False + and self.date_due >= datetime.now().strftime("%y-%m-%d-%H-%M") + ): + self.is_recuuring = True + sub_name = ( + str(self.number) + + str("-" + self.interval_type if self.interval_type else "") + + "-" + + datetime.now().strftime("%Y-%m-%d") + ) + model_id = self.env["ir.model"].search([("model", "=", self._name)]) + + subscription_document_id = self.env["subscription.document"].search( + [("name", "=", "Account Invoice"), ("model", "=", model_id.id)], limit=1 + ) + if not subscription_document_id: + subscription_document_id = self.env["subscription.document"].create( + {"name": "Account Invoice", "model": model_id.id} + ) + subscription_doc_source = ( + str(subscription_document_id.model.model) + "," + str(self.id) + ) + subscription_id = self.env["subscription.subscription"].create( + { + "name": sub_name, + "partner_id": self.partner_id.id, + "interval_number": self.interval_number, + "interval_type": self.interval_type, + "doc_source": subscription_doc_source, + } + ) + subscription_id.set_process() + return to_open_invoices.action_invoice_open() + + +class AccountInvoiceLine(models.Model): + _inherit = "account.move.line" + + product_id = fields.Many2one("product.product", string="Product ID") + enter_hour = fields.Float(string="Hour") + enter_days = fields.Float(string="Days") + + def _get_computed_price_unit(self): + self.ensure_one() + + if not self.product_id: + return self.price_unit + elif self.move_id.is_sale_document(include_receipts=True): + # Out invoice. + price_unit = self.product_id.lst_price + elif self.move_id.is_purchase_document(include_receipts=True): + # In invoice. + price_unit = self.product_id.standard_price + else: + return self.price_unit + + if self.product_uom_id != self.product_id.uom_id: + price_unit = self.product_id.uom_id._compute_price( + price_unit, self.product_uom_id + ) + + if self.enter_days: + price_unit = price_unit * self.enter_days + elif self.enter_hour: + price_unit = price_unit * self.enter_hour + + return price_unit diff --git a/product_rental_bookings/models/product.py b/product_rental_bookings/models/product.py new file mode 100755 index 0000000..3d84ae1 --- /dev/null +++ b/product_rental_bookings/models/product.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- + +from odoo import models, fields + + +class ProductProduct(models.Model): + _inherit = "product.product" + + is_rental = fields.Boolean(string="Rental", default=False) + selected_product = fields.Boolean(string="Select", default=False) + rental_amount = fields.Float(string="Rent Per Day Rate") + rental_amount_per_hour = fields.Float(string="Rent Per Hour Rate") + rental_amount_per_session = fields.Float(string="Rent Per Session Rate") + product_registration_id = fields.Many2one("rental.product.order", string="Order") + rental_qyt = fields.Float("Quantity", default=1.0) diff --git a/product_rental_bookings/models/product_book.py b/product_rental_bookings/models/product_book.py new file mode 100755 index 0000000..653f6ef --- /dev/null +++ b/product_rental_bookings/models/product_book.py @@ -0,0 +1,368 @@ +# -*- coding: utf-8 -*- + +from datetime import datetime, date + +from odoo import models, fields, api, _ +from odoo.exceptions import ValidationError, AccessError + + +class ProductBooking(models.TransientModel): + _name = "product.booking" + _rec_name = "book_number" + _description = "Book" + + @api.depends( + "product_line_ids", + "total_days", + "extra_charges", + "price_based", + "from_date", + "to_date", + ) + def compute_rate(self): + for record in self: + record.total = 0 + record.sub_total = 0 + record.total_days = 0 + record.total_hours = 0 + if record.from_date and record.to_date: + date_from = datetime.strptime( + str(record.from_date), "%Y-%m-%d %H:%M:%S" + ) + date_to = datetime.strptime(str(record.to_date), "%Y-%m-%d %H:%M:%S") + delta = date_from - date_to + record.total_days = abs(delta.days) + record.total_hours = abs(delta.total_seconds() / 3600.0) + sub_total = 0.0 + with_tax_total = 0.0 + for product in record.product_line_ids.filtered( + lambda fv: fv.selected_product + ): + if record.price_based == "per_day": + taxes = product.taxes_id.compute_all( + product.rental_qyt, + product.currency_id, + product.rental_amount * record.total_days, + ) + sub_total += taxes["total_excluded"] + with_tax_total += taxes["total_included"] + elif record.price_based == "per_hour": + taxes = product.taxes_id.compute_all( + product.rental_qyt, + product.currency_id, + product.rental_amount_per_hour * record.total_hours, + ) + sub_total += taxes["total_excluded"] + with_tax_total += taxes["total_included"] + else: + taxes = product.taxes_id.compute_all( + product.rental_qyt, + product.currency_id, + product.rental_amount_per_session, + ) + sub_total += taxes["total_excluded"] + with_tax_total += taxes["total_included"] + record.sub_total = sub_total + record.total = with_tax_total + record.extra_charges + + @api.model + def _get_based_on_selections(self): + enabled_day_rent = ( + self.env["ir.config_parameter"].sudo().get_param("enabled_day_rent") + ) + enabled_hour_rent = ( + self.env["ir.config_parameter"].sudo().get_param("enabled_hour_rent") + ) + enabled_session_rent = ( + self.env["ir.config_parameter"].sudo().get_param("enabled_session_rent") + ) + selection = [] + if enabled_day_rent: + selection.append(("per_day", "Day")) + if enabled_hour_rent: + selection.append(("per_hour", "Hour")) + if enabled_session_rent: + selection.append(("per_session", "Session")) + return selection + + book_number = fields.Char(string="Book Number") + from_date = fields.Datetime(string="From Date") + to_date = fields.Datetime(string="To Date") + product_line_ids = fields.Many2many( + "product.product", + "product_search_table", + "product_search_id", + "product_book_id", + string="Available Product", + ) + is_search = fields.Boolean(string="Is Search", default=False) + total_days = fields.Float(string="Total Days", compute="compute_rate") + extra_charges = fields.Monetary(string="Extra Charges") + sub_total = fields.Float(string="Sub Total(Exclusive Tax)", compute="compute_rate") + total = fields.Float(string="Total", compute="compute_rate") + categ_id = fields.Many2one( + "product.category", required=True, string="Product Category" + ) + company_id = fields.Many2one( + "res.company", string="Company", default=lambda self: self.env.user.company_id + ) + currency_id = fields.Many2one("res.currency", related="company_id.currency_id") + location_id = fields.Many2one("stock.location", string="Location") + price_based = fields.Selection( + selection=_get_based_on_selections, default="per_day", string="Based On" + ) + total_hours = fields.Float(string="Total Hours", compute="compute_rate") + session_id = fields.Many2one("session.config", string="Session") + + @api.constrains("from_date", "to_date") + def check_date(self): + for record in self: + if ( + date.strftime( + datetime.strptime(str(record.from_date), "%Y-%m-%d %H:%M:%S"), + "%Y-%m-%d", + ) + < str(date.today()) + ): + raise ValidationError(_("You cannot enter past date")) + if date.strftime( + datetime.strptime(str(record.to_date), "%Y-%m-%d %H:%M:%S"), "%Y-%m-%d" + ) < str(date.today()): + raise ValidationError(_("You cannot enter past date")) + + @api.model + def convert_float_to_hh_mm(self, session_id, from_date): + start_date = "{0:02.0f}:{1:02.0f}".format( + *divmod(session_id.start_time * 60, 60) + ) + end_date = "{0:02.0f}:{1:02.0f}".format(*divmod(session_id.end_time * 60, 60)) + start_date_fmt = ( + "%Y-%m-%d " + + start_date.split(":")[0] + + ":" + + start_date.split(":")[1] + + ":" + + "00" + ) + end_date_fmt = ( + "%Y-%m-%d " + + end_date.split(":")[0] + + ":" + + end_date.split(":")[1] + + ":" + + "00" + ) + start_str_datetime = from_date.strftime(start_date_fmt) + end_str_datetime = from_date.strftime(end_date_fmt) + start_date = self.env["rental.product.order"].convert_TZ_UTC(start_str_datetime) + end_date = self.env["rental.product.order"].convert_TZ_UTC(end_str_datetime) + return start_date, end_date + + @api.onchange("price_based", "from_date", "session_id") + def onchange_date_from_price_based(self): + if self.price_based == "per_session" and self.from_date and self.session_id: + start_time, end_time = self.convert_float_to_hh_mm( + self.session_id, self.from_date + ) + self.to_date = end_time + self.from_date = start_time + + @api.model + def create(self, vals): + vals.update( + { + "book_number": self.env["ir.sequence"].next_by_code("product_booking") + or _("Product Booking") + } + ) + return super(ProductBooking, self).create(vals) + + def search_product(self): + product_id = [] + if self.from_date and self.to_date: + if self.from_date > self.to_date: + raise ValidationError("To Date must be greater than From date") + elif not self.env.user.has_group("stock.group_stock_multi_locations"): + raise AccessError( + _("Manage Multiple Stock Locations need to be assign.") + ) + else: + categ_ids = self.env["product.category"].search( + [("parent_id", "child_of", self.categ_id.id)] + ) + self.env.cr.execute( + """ + SELECT + propro.id + FROM product_product propro + JOIN product_template protmp ON protmp.id = propro.product_tmpl_id + WHERE + protmp.categ_id IN %s AND + propro.is_rental='t' AND + propro.id IN ( + Select product_id from stock_quant where location_id = %s); + """, + ( + tuple(categ_ids.ids), + self.location_id.id, + ), + ) + product_data = self.env.cr.fetchall() + if product_data: + for products in product_data: + product = ( + self.env["product.product"] + .sudo() + .search([("id", "in", products)]) + ) + available_product_stock = self.env["stock.quant"].search( + [ + ("product_id", "=", product.id), + ("quantity", ">", 0), + ("location_id", "=", self.location_id.id), + ] + ) + available_product_stock.product_id.rental_qyt = 1.0 + available_product_stock.product_id.selected_product = False + product_id.extend(available_product_stock.product_id.ids) + self.update( + { + "product_line_ids": [(6, 0, product_id)], + "total": self.total, + "is_search": True, + } + ) + else: + raise ValidationError("Sorry!!! No any Product Available!!!") + + def book_product(self): + product = False + for product_line in self.product_line_ids: + if product_line.selected_product: + product = True + if product: + product_order_id = [] + for product_id in self.product_line_ids.filtered( + lambda fv: fv.selected_product + ): + # available_product_stock = self.env['stock.quant'].search([('product_id', '=', product_id.id), + # ('location_id', '=', + # self.location_id.id)]) + # if product_id.rental_qyt > available_product_stock.quantity: + # raise ValidationError(_('Available quantity for %s is %d') % (product_id.name, + # available_product_stock.quantity)) + order_line_obj = self.env["product.order.line"] + start_date = self.from_date + end_date = self.to_date + order_line_ids = order_line_obj.sudo().search( + [ + ("product_order_id.state", "=", "confirm"), + ("product_id", "=", product_id.id), + ] + ) + total_in_order_qty = 0 + for order_line in order_line_ids: + if ( + ( + start_date + <= order_line.product_order_id.from_date + <= end_date + ) + or ( + start_date + <= order_line.product_order_id.to_date + <= end_date + ) + and order_line.product_order_id.picking_count == 1 + ): + total_in_order_qty += ( + order_line.qty_needed + if order_line.product_order_id.picking_count == 1 + else 0 + ) + elif ( + ( + order_line.product_order_id.from_date + <= start_date + <= order_line.product_order_id.to_date + ) + or ( + order_line.product_order_id.from_date + <= end_date + <= order_line.product_order_id.to_date + ) + and order_line.product_order_id.picking_count == 1 + ): + total_in_order_qty += ( + order_line.qty_needed + if order_line.product_order_id.picking_count == 1 + else 0 + ) + if product_id.sudo().qty_available and total_in_order_qty: + qty_available = product_id.sudo().qty_available - total_in_order_qty + else: + total_in_order_qty = order_line_ids.filtered( + lambda x: x.qty_needed + if x.product_order_id.picking_count > 1 + else 0 + ) + qty_available = product_id.sudo().qty_available + sum( + total_in_order_qty.mapped("qty_needed") + ) + if ( + not product_id.rental_qyt + or not qty_available >= product_id.rental_qyt + ): + raise ValidationError( + _("Available quantity for %s is %d") + % (product_id.name, qty_available) + ) + else: + if self.price_based == "per_day": + rate_total = product_id.rental_amount + else: + if self.price_based == "per_hour": + rate_total = product_id.rental_amount_per_hour + else: + rate_total = product_id.rental_amount_per_session + product_order_id.append( + ( + 0, + 0, + { + "product_id": product_id.id, + "name": product_id.name, + "price_based": self.price_based, + "enter_days": self.total_days + if self.price_based == "per_day" + else 0, + "enter_hour": self.total_hours + if self.price_based in ["per_hour", "per_session"] + else 0, + "price": rate_total, + "qty_needed": product_id.rental_qyt, + "tax_id": [(6, 0, product_id.taxes_id.ids)], + }, + ) + ) + return { + "name": "product order", + "view_type": "form", + "view_mode": "form", + "res_model": "rental.product.order", + "type": "ir.actions.act_window", + "context": { + "default_from_date": self.from_date, + "default_to_date": self.to_date, + "default_extra_charges": self.extra_charges, + "default_is_days": True if self.price_based == "per_day" else False, + "default_is_hours": True + if self.price_based in ["per_hour", "per_session"] + else False, + "default_product_order_lines_ids": product_order_id, + "default_location_id": self.location_id.id, + "default_price_based": self.price_based, + }, + } + else: + raise ValidationError(_("First Please Select the Product")) diff --git a/product_rental_bookings/models/product_contract.py b/product_rental_bookings/models/product_contract.py new file mode 100755 index 0000000..1e25709 --- /dev/null +++ b/product_rental_bookings/models/product_contract.py @@ -0,0 +1,851 @@ +# -*- coding: utf-8 -*- + +from datetime import datetime, date, timedelta + +from dateutil.relativedelta import relativedelta +from odoo import fields, api, models, _ +from odoo.exceptions import UserError, ValidationError + + +class RentalProductContract(models.Model): + _name = "rental.product.contract" + _description = "Product Rental Contract" + + name = fields.Char("Name") + partner_id = fields.Many2one("res.partner", string="Customer", required=True) + rental_id = fields.Many2one("rental.product.order", string="Rental Order Id") + contract_date = fields.Date( + string="Contract Date", + ) + contractor_id = fields.Many2one("res.users", string="Contractor Name") + from_date = fields.Date(string="From Date") + to_date = fields.Date(string="To Date") + account_payment_term = fields.Many2one( + "account.payment.term", string="Payment Term", required=True + ) + damage_charge = fields.Monetary(string="Damage Charge") + additional_charges = fields.Monetary(string="Additional Charges") + subtotal = fields.Monetary(string="Sub Total", readonly=True) + taxes = fields.Float(string="Taxes", compute="_compute_amount", readonly=True) + untaxed_amount = fields.Monetary( + string="Untaxed Amount", + compute="_compute_amount", + ) + extra_charges = fields.Monetary(string="Extra Charges") + invoice_ids = fields.Many2one("account.move", string="Invoice Id") + signature = fields.Binary(string="Contractor Signature ") + signature_contractor = fields.Binary(string="Contractor Signature") + signature_customer = fields.Binary(string="Customer Signature") + button_name = fields.Char(string="Button Name") + terms_condition = fields.Text(string="Terms and Condition") + product_contract_lines_ids = fields.One2many( + "product.contract.lines", "product_contract_id", string="Order Line" + ) + pricelist_id = fields.Many2one("product.pricelist", string="Pricelist") + total_amount = fields.Monetary(string="Total Amount", compute="_compute_amount") + total = fields.Monetary(string="Total", compute="_compute_total") + cost_generated = fields.Monetary( + string="Recurring Cost", + help="Costs paid at regular intervals, depending on the cost frequency", + ) + cost_frequency = fields.Selection( + [ + ("no", "No"), + ("daily", "Daily"), + ("weekly", "Weekly"), + ("monthly", "Monthly"), + ("yearly", "Yearly"), + ], + string="Recurring Cost Frequency", + required=True, + ) + state = fields.Selection( + [ + ("futur", "Incoming"), + ("open", "In Progress"), + ("expired", "Expired"), + ("diesoon", "Expiring Soon"), + ("closed", "Closed"), + ], + "Status", + default="open", + readonly=True, + ) + cost = fields.Monetary( + string="Rent Cost", + help="This fields is to determine the cost of rent", + required=True, + ) + account_type = fields.Many2one( + "account.account", + "Account", + default=lambda self: self.env["account.account"].search([("id", "=", 17)]), + ) + recurring_line = fields.One2many( + "product.rental.line", "rental_number", readonly=True + ) + attachment_ids = fields.Many2many( + "ir.attachment", + "product_rent_ir_attachments_rel", + "rental_id", + "attachment_id", + string="Attachments", + ) + sum_cost = fields.Float( + compute="_compute_sum_cost", string="Indicative Costs Total" + ) + auto_generated = fields.Boolean("Automatically Generated", readonly=True) + generated_cost_ids = fields.One2many( + "product.rental.line", "rental_number", string="Generated Costs" + ) + invoice_count = fields.Integer( + compute="_invoice_count", string="# Invoice", copy=False + ) + first_payment = fields.Float(string="First Payment", compute="_compute_amount") + first_invoice_created = fields.Boolean( + string="First Invoice Created", default=False + ) + origin = fields.Char(string="Order Reference") + picking_id = fields.Many2one("stock.picking", string="Picking") + document_ids = fields.One2many( + "customer.document", "contract_id", string="Contract" + ) + company_id = fields.Many2one( + "res.company", string="Company", default=lambda self: self.env.user.company_id + ) + currency_id = fields.Many2one("res.currency", related="company_id.currency_id") + cancel_policy_ids = fields.One2many( + "rental.policy", "contract_id", string="Cancel Policy" + ) + number_of_slot = fields.Integer(string="Number of Slot") + is_hours = fields.Boolean(string="Hours") + is_days = fields.Boolean(string="Days") + + def generate_policy(self): + if not self.cancel_policy_ids and self.number_of_slot != 0: + number_of_days = self.from_date - self.contract_date + cancel_policy_list = [] + if number_of_days.days >= (self.number_of_slot * 2): + day_per_slot = int(number_of_days.days / self.number_of_slot - 1) + day = 0 + for i in range(self.number_of_slot - 1): + cancel_policy_list.append( + ( + 0, + 0, + { + "from_date": self.contract_date + timedelta(day), + "to_date": self.contract_date + + timedelta(day_per_slot + day), + }, + ) + ) + day += day_per_slot + 1 + cancel_policy_list.append( + ( + 0, + 0, + { + "from_date": self.contract_date + timedelta(day), + "to_date": self.from_date - timedelta(days=2), + }, + ) + ) + cancel_policy_list.append( + ( + 0, + 0, + { + "from_date": self.from_date - timedelta(days=1), + "policy_charged": 100, + }, + ) + ) + self.cancel_policy_ids = cancel_policy_list + else: + raise ValidationError(_("Please enter the sufficient Number of Slot")) + + def write(self, vals): + if "button_name" in vals.keys(): + if vals["button_name"] == "signature_contractor": + vals["signature_contractor"] = vals["signature"] + elif vals["button_name"] == "signature_customer": + vals["signature_customer"] = vals["signature"] + return super(RentalProductContract, self).write(vals) + + @api.depends("product_contract_lines_ids") + def _compute_amount(self): + """ + Compute the total amounts of the SO. + """ + for order in self: + untaxed_amount = 0.0 + taxes = 0.0 + total_amount = 0.0 + for line in order.product_contract_lines_ids: + untaxed_amount += line.sub_total + taxes += line.price_tax + total_amount += line.sub_total + line.price_tax + order.update( + { + "untaxed_amount": untaxed_amount, + "taxes": taxes, + "total_amount": untaxed_amount + taxes + order.extra_charges, + "first_payment": untaxed_amount + taxes + order.extra_charges, + } + ) + + @api.depends("recurring_line.recurring_amount") + def _compute_sum_cost(self): + for contract in self: + contract.sum_cost = sum(contract.recurring_line.mapped("recurring_amount")) + + def _invoice_count(self): + invoice_ids = self.env["account.move"].search( + [("invoice_origin", "=", self.name)] + ) + self.invoice_count = len(invoice_ids) + + @api.model + def create(self, vals): + sequence_no = self.env["ir.sequence"].next_by_code("product_contract") or _( + "Product Contract" + ) + vals.update({"name": sequence_no}) + return super(RentalProductContract, self).create(vals) + + @api.depends("product_contract_lines_ids", "damage_charge") + def _compute_total(self): + self.total = self.total_amount + self.damage_charge + + def contract_close(self): + invoice_ids = self.env["account.move"].search( + [("invoice_origin", "=", self.name)] + ) + order_ids = self.env["rental.product.order"].search( + [("res_number", "=", self.origin)] + ) + is_paid = 0 + for each in invoice_ids: + if each.state != "posted": + is_paid = 1 + break + + if is_paid == 0: + self.state = "closed" + order_ids.state = "close" + else: + raise UserError("Please Check invoices There are Some Invoices are pending") + + def contract_open(self): + for record in self: + order_ids = self.env["rental.product.order"].search( + [("res_number", "=", record.origin)] + ) + record.state = "open" + order_ids.state = "draft" + + def act_renew_contract(self): + product_list = [] + for product_line in self.product_contract_lines_ids: + product_list.append( + ( + 0, + 0, + { + "product_id": product_line.product_id.id, + "price_based": product_line.price_based, + "enter_days": product_line.enter_days, + "price": product_line.price, + "enter_hour": product_line.enter_hour, + }, + ) + ) + assert ( + len(self.ids) == 1 + ), "This operation should only be done for 1 single contract at a time, as it it suppose to open a window as result" + for element in self: + # compute end date + startdate = fields.Date.from_string(element.from_date) + enddate = fields.Date.from_string(element.to_date) + diffdate = enddate - startdate + default = { + "contract_date": fields.Date.context_today(self), + "from_date": fields.Date.to_string( + fields.Date.from_string(element.to_date) + relativedelta(days=1) + ), + "to_date": fields.Date.to_string(enddate + diffdate), + "cost_generated": self.cost_generated, + "product_contract_lines_ids": product_list, + } + newid = element.copy(default).id + return { + "name": _("Renew Contract"), + "view_mode": "form", + "view_id": self.env.ref( + "product_rental_bookings.rental_product_contract_form" + ).id, + "view_type": "tree,form", + "res_model": "rental.product.contract", + "type": "ir.actions.act_window", + "res_id": newid, + } + + def send_product_contract(self): + """ + This is Email for send contract Detail + """ + self.ensure_one() + ir_model_data = self.env["ir.model.data"] + try: + template_id = ir_model_data.get_object_reference( + "product_rental_bookings", "email_template_product_contract" + )[1] + except ValueError: + template_id = False + try: + compose_form_id = ir_model_data.get_object_reference( + "mail", "email_compose_message_wizard_form" + )[1] + except ValueError: + compose_form_id = False + ctx = { + "default_model": "rental.product.contract", + "default_res_id": self.ids[0], + "default_use_template": bool(template_id), + "default_template_id": template_id, + "mark_so_as_sent": True, + } + return { + "type": "ir.actions.act_window", + "view_type": "form", + "view_mode": "form", + "res_model": "mail.compose.message", + "views": [(compose_form_id, "form")], + "view_id": compose_form_id, + "target": "new", + "context": ctx, + } + + def send_email_for_firstpayment(self, inv_id, contracts): + """ + Send email for payment. + """ + mail_content = _( + "

First Payment!


Hi %s,
This is to notify that You have to pay amount as per mention below.

" + "Please find the details below:

" + "
" + "
Reference Number %s
Date %s
Amount %s
" + ) % ( + contracts.partner_id.name, + inv_id.invoice_origin, + date.today(), + inv_id.amount_total, + ) + main_content = { + "subject": _("You First Payment For: %s") % inv_id.invoice_origin, + "author_id": contracts.env.user.partner_id.id, + "body_html": mail_content, + "email_to": contracts.partner_id.email, + } + self.env["mail.mail"].create(main_content).send() + + def notification_email_for_expire_contract(self, contracts): + mail_content = _( + "

Expiration Of Rental Contract

" + "
Dear %s,
" + "Our record indicate that your rental contract %s, expire soon,
" + "If you want to renew this contract Then contact to our agency before last date of contract." + "
" + "
" + "
" + "
" + "
" + "" + "" + "" + "" + "
Contract Ref" + "%s" + "
Responsible Person " + " %s - %s" + "
" + ) % ( + contracts.partner_id.name, + contracts.name, + contracts.name, + contracts.contractor_id.name, + contracts.contractor_id.mobile, + ) + main_content = { + "subject": "Expiration Of Rental Contract!", + "author_id": contracts.env.user.partner_id.id, + "body_html": mail_content, + "email_to": contracts.partner_id.email, + } + self.env["mail.mail"].create(main_content).send() + + def send_email_for_recurring_invoice(self, inv_id, contracts): + mail_content = _( + "

Reminder Recurrent Payment!

" + "
Hi %s,
This is to remind you that the " + "recurrent payment for the " + "rental contract has to be done." + "Please make the payment at the earliest." + "
" + "
" + "Please find the details below:" + "
" + "
" + "
" + "" + "" + "" + "" + "" + "" + "
Amount " + " %s" + "
Due Date " + " %s" + "
Responsible Person " + " %s, %s" + "
" + ) % ( + contracts.partner_id.name, + inv_id.amount_total, + date.today(), + inv_id.user_id.name, + inv_id.user_id.mobile, + ) + main_content = { + "subject": "Reminder Recurrent Payment!", + "author_id": contracts.env.user.partner_id.id, + "body_html": mail_content, + "email_to": contracts.partner_id.email, + } + self.env["mail.mail"].create(main_content).send() + + def create_invoice(self): + inv_obj = self.env["account.move"] + recurring_obj = self.env["product.rental.line"] + inv_line = [] + today = date.today() + journal_id = ( + self.env["account.journal"] + .sudo() + .search( + [("type", "=", "sale"), ("company_id", "=", self.company_id.id)], + limit=1, + ) + ) + for contracts in self.search([]): + if not contracts.first_invoice_created: + contracts.first_invoice_created = True + supplier = contracts.partner_id + account_id = self.env["account.account"].search( + [ + ("code", "like", "708000"), + ("company_id", "=", self.company_id.id), + ] + ) + if not account_id: + user_type_id = self.env.ref("account.data_account_type_revenue") + account_id = self.env["account.account"].create( + { + "code": "708000", + "name": "Location", + "company_id": self.company_id.id, + "user_type_id": user_type_id.id, + } + ) + for each_product in contracts.product_contract_lines_ids: + if each_product.price_based == "per_hour": + total_qty = each_product.enter_hour + else: + total_qty = each_product.enter_days + inv_line_data = ( + 0, + 0, + { + "name": each_product.product_id.name or "Deposit", + "product_id": each_product.product_id.id or False, + "product_id": each_product.product_id.id or False, + "account_id": account_id.id, + "price_unit": each_product.price * total_qty or 0.0, + "quantity": each_product.qty_needed, + "enter_hour": each_product.enter_hour, + "enter_days": each_product.enter_days, + "tax_ids": [(6, 0, each_product.tax_id.ids)], + }, + ) + inv_line.append(inv_line_data) + if self.extra_charges: + extra_charge_p_id = self.env.ref( + "product_rental_bookings.extra_charge_product_id" + ) + extra_charge_inv_line = ( + 0, + 0, + { + "name": extra_charge_p_id.name, + "product_id": extra_charge_p_id.id or False, + "price_unit": self.extra_charges, + "account_id": account_id.id, + "quantity": 1.0, + }, + ) + inv_line.append(extra_charge_inv_line) + inv_data = { + "move_type": "out_invoice", + "amount_residual": self.total_amount, + "currency_id": self.env.company.currency_id.id, + "journal_id": journal_id.id, + "company_id": self.env.company.id, + "partner_id": supplier.id, + "invoice_date_due": self.to_date, + "invoice_origin": contracts.name, + "contract_id": self.id, + "is_hours": self.is_hours, + "is_days": self.is_days, + "rental_order_id": self.rental_id.id, + "invoice_line_ids": inv_line, + } + bokeh = self.env["ir.module.module"].search( + [("name", "in", ["l10n_in", "l10n_in_purchase", "l10n_in_sale"])], + limit=1, + ) + if bokeh and bokeh.state == "installed": + inv_data.update( + { + "l10n_in_gst_treatment": supplier.l10n_in_gst_treatment + or "unregistered", + } + ) + inv_id = inv_obj.create(inv_data) + inv_id.action_post() + + recurring_data = { + "name": "demo", + "date_today": today, + "rental_number": contracts.id, + "recurring_amount": contracts.first_payment, + "invoice_number": inv_id.id, + "invoice_ref": inv_id.id, + } + recurring_obj.create(recurring_data) + # self.send_email_for_firstpayment(inv_id, contracts) + if inv_id: + return { + "name": _("Account Move"), + "view_mode": "form", + "view_id": self.env.ref("account.view_move_form").id, + "view_type": "tree,form", + "res_model": "account.move", + "type": "ir.actions.act_window", + "res_id": inv_id.id, + } + + @api.model + def scheduler_manage_invoice(self): + journal_id = self.env["account.move"].default_get(["journal_id"])["journal_id"] + inv_obj = self.env["account.move"] + recurring_obj = self.env["product.rental.line"] + _inv_line_data = {} + today = date.today() + for contracts in self.search([]): + account_id = self.env["account.account"].search( + [ + ("code", "like", "708000"), + ("company_id", "=", contracts.company_id.id), + ] + ) + if not account_id: + user_type_id = self.env.ref("account.data_account_type_revenue") + account_id = self.env["account.account"].create( + { + "code": "708000", + "name": "Location", + "company_id": contracts.company_id.id, + "user_type_id": user_type_id.id, + } + ) + start_date = datetime.strptime(str(contracts.from_date), "%Y-%m-%d").date() + end_date = datetime.strptime(str(contracts.to_date), "%Y-%m-%d").date() + if end_date >= date.today(): + is_recurring = 0 + if contracts.cost_frequency == "daily": + is_recurring = 1 + elif contracts.cost_frequency == "weekly": + week_days = (date.today() - start_date).days + if week_days % 7 == 0 and week_days != 0: + is_recurring = 1 + elif contracts.cost_frequency == "monthly": + if ( + start_date.day == date.today().day + and start_date != date.today() + ): + is_recurring = 1 + elif contracts.cost_frequency == "yearly": + if ( + start_date.day == date.today().day + and start_date.month == date.today().month + and start_date != date.today() + ): + is_recurring = 1 + if ( + is_recurring == 1 + and contracts.cost_frequency != "no" + and contracts.state != "expire" + and contracts.state != "close" + and contracts.state != "futur" + and contracts.first_invoice_created == True + ): + inv_line = [] + supplier = contracts.partner_id + line_len = len(contracts.product_contract_lines_ids) + for each_product in contracts.product_contract_lines_ids: + unit_price = contracts.cost_generated / line_len + inv_line_data = ( + 0, + 0, + { + "product_id": each_product.product_id.id, + "name": each_product.product_id.name, + "product_id": each_product.product_id.id, + "account_id": account_id.id, + "price_unit": float(unit_price), + "quantity": 1, + "exclude_from_invoice_tab": False, + }, + ) + inv_line.append(inv_line_data) + inv_data = { + "type": "out_invoice", + "currency_id": contracts.account_type.company_id.currency_id.id, + "journal_id": journal_id, + "company_id": contracts.account_type.company_id.id, + "name": supplier.name, + "partner_id": supplier.id, + "invoice_date_due": contracts.to_date, + "invoice_origin": contracts.name, + "contract_id": contracts.id, + "invoice_line_ids": inv_line, + "is_hours": contracts.is_hours, + "is_days": contracts.is_days, + } + + inv_id = inv_obj.create(inv_data) + payment_id = self.env["account.payment"].create( + { + "payment_type": "inbound", + "partner_type": "supplier", + "partner_id": supplier.id, + "amount": inv_id.amount_total, + "journal_id": journal_id, + "payment_date": date.today(), + "payment_method_id": "1", + "communication": inv_id.name, + } + ) + recurring_data = { + "name": "demo", + "date_today": today, + "rental_number": contracts.id, + "recurring_amount": contracts.cost_generated, + "invoice_number": inv_id.id, + "invoice_ref": inv_id.id, + } + recurring_obj.create(recurring_data) + # self.send_email_for_recurring_invoice(inv_id, contracts) + else: + inv_line = [] + if ( + not contracts.first_invoice_created + and contracts.state != "futur" + and contracts.state != "expired" + ): + contracts.first_invoice_created = True + supplier = contracts.partner_id + for each_product in contracts.product_contract_lines_ids: + if each_product.price_based == "per_day": + total_qty = each_product.enter_days + else: + total_qty = each_product.enter_hour + inv_line_data = ( + 0, + 0, + { + "product_id": each_product.product_id.id, + "name": each_product.product_id.name, + "product_id": each_product.product_id.id, + "account_id": supplier.property_account_payable_id.id, + "price_unit": each_product.price, + "quantity": total_qty, + "tax_ids": [(6, 0, each_product.tax_id.ids)], + "exclude_from_invoice_tab": False, + }, + ) + inv_line.append(inv_line_data) + inv_data = { + "name": supplier.name, + "partner_id": supplier.id, + "currency_id": contracts.account_type.company_id.currency_id.id, + "journal_id": journal_id, + "invoice_origin": contracts.name, + "company_id": contracts.account_type.company_id.id, + "invoice_date_due": self.to_date, + "invoice_line_ids": inv_line, + } + inv_id = inv_obj.create(inv_data) + recurring_data = { + "name": "demo", + "date_today": today, + "rental_number": contracts.id, + "recurring_amount": contracts.first_payment, + "invoice_number": inv_id.id, + "invoice_ref": inv_id.id, + } + recurring_obj.create(recurring_data) + # self.send_email_for_firstpayment(inv_id, contracts) + + @api.model + def shedule_manage_contract(self): + date_today = fields.Date.from_string(fields.Date.today()) + in_fifteen_days = fields.Date.to_string(date_today + relativedelta(days=+15)) + nearly_expired_contracts = self.search( + [("state", "=", "open"), ("to_date", "<", in_fifteen_days)] + ) + res = {} + for contract in nearly_expired_contracts: + if contract.partner_id.id in res: + res[contract.partner_id.id] += 1 + else: + res[contract.partner_id.id] = 1 + # contract.notification_email_for_expire_contract(contract) + + nearly_expired_contracts.write({"state": "diesoon"}) + + expired_contracts = self.search( + [("state", "!=", "expired"), ("to_date", "<", fields.Date.today())] + ) + expired_contracts.write({"state": "expired"}) + + futur_contracts = self.search( + [ + ("state", "not in", ["futur", "closed"]), + ("from_date", ">", fields.Date.today()), + ] + ) + futur_contracts.write({"state": "futur"}) + + now_running_contracts = self.search( + [("state", "=", "futur"), ("from_date", "<=", fields.Date.today())] + ) + now_running_contracts.write({"state": "open"}) + + @api.model + def run_scheduler(self): + self.shedule_manage_contract() + self.scheduler_manage_invoice() + + +class productConLines(models.Model): + _name = "product.contract.lines" + _description = "Product Rental Contract Lines" + + product_id = fields.Many2one("product.product", string="product Name") + price_based = fields.Selection( + [("per_day", "Day"), ("per_hour", "Hour"), ("per_session", "Session")], + default="per_day", + string="Based On", + ) + enter_hour = fields.Float(string="Hour") + enter_days = fields.Float(string="Days") + price = fields.Monetary(string="Price") + total = fields.Monetary(string="Total") + product_contract_id = fields.Many2one("rental.product.contract", string="Contract") + tax_id = fields.Many2many("account.tax", "product_contract_tax_rel", string="Tax") + sub_total = fields.Monetary(string="Sub Total", compute="_get_subtotal", store=True) + price_tax = fields.Float( + compute="_get_subtotal", string="Taxes", readonly=True, store=True + ) + price_total = fields.Monetary( + compute="_get_subtotal", string="Total ", readonly=True, store=True + ) + description = fields.Char(string="Description") + currency_id = fields.Many2one( + "res.currency", + related="product_contract_id.currency_id", + store=True, + readonly=True, + ) + qty_needed = fields.Integer(string="Quantity", default=1) + + @api.depends("product_id", "enter_hour", "enter_days", "price", "tax_id") + def _get_subtotal(self): + for line in self: + if line.price_based == "per_day": + qty = line.enter_days * line.qty_needed + elif line.price_based == "per_session": + qty = line.qty_needed + else: + qty = line.enter_hour * line.qty_needed + print("\n\n\n\n\n\n------>", qty) + taxes = line.tax_id.compute_all( + qty, line.product_contract_id.currency_id, line.price + ) + line.update( + { + "price_tax": sum( + t.get("amount", 0.0) for t in taxes.get("taxes", []) + ), + "price_total": taxes["total_included"], + "sub_total": taxes["total_excluded"], + } + ) + + +class ProductRentalLine(models.Model): + _name = "product.rental.line" + _description = "Rental Lines" + + name = fields.Char(string="Name") + date_today = fields.Date("Date") + recurring_amount = fields.Float("Amount") + rental_number = fields.Many2one("rental.product.contract", string="Rental Number") + payment_info = fields.Char( + compute="paid_info", string="Payment Stage", default="draft" + ) + auto_generated = fields.Boolean("Automatically Generated", readonly=True) + invoice_number = fields.Integer(string="Invoice ID") + invoice_ref = fields.Many2one("account.move", string="Invoice Ref") + + @api.depends("payment_info") + def paid_info(self): + for record in self: + if self.env["account.move"].browse(record.invoice_number): + record.payment_info = ( + self.env["account.move"].browse(record.invoice_number).state + ) + else: + record.payment_info = "Record Deleted" + + +class CustomerDocument(models.Model): + _name = "customer.document" + _description = "Customer Document" + + name = fields.Binary(string="Document") + id_number = fields.Char(string="ID Number") + contract_id = fields.Many2one("rental.product.contract", string="Conrtract") + + +class RentalPolicy(models.Model): + _name = "rental.policy" + _description = "Rental Policy" + + contract_id = fields.Many2one("rental.product.contract", string="Contract") + from_date = fields.Date(string="From Date") + to_date = fields.Date(string="To Date") + policy_charged = fields.Float(string="Charge(In Percentage)") diff --git a/product_rental_bookings/models/product_logs.py b/product_rental_bookings/models/product_logs.py new file mode 100644 index 0000000..6ba2c93 --- /dev/null +++ b/product_rental_bookings/models/product_logs.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- + +from odoo import models, fields + + +class RentalProductLogs(models.Model): + _name = "rental.product.logs" + _description = "product Products Logs" + _rec_name = "product_id" + + product_id = fields.Many2one("product.product", string="Product") + customer_id = fields.Many2one("res.partner", string="Customer") + from_date = fields.Date(string="From Date") + to_date = fields.Date(string="To Date") + company_id = fields.Many2one( + "res.company", string="Company", default=lambda self: self.env.user.company_id + ) diff --git a/product_rental_bookings/models/product_operation.py b/product_rental_bookings/models/product_operation.py new file mode 100755 index 0000000..8724950 --- /dev/null +++ b/product_rental_bookings/models/product_operation.py @@ -0,0 +1,91 @@ +# -*- coding: utf-8 -*- + +from odoo import models, fields + + +class RentalProductOperation(models.Model): + _name = "rental.product.operation" + _description = "product Products Operation" + + name = fields.Char(string="Operation Types Name", required=True, translate=True) + color = fields.Integer(string="Color") + rental_move_type = fields.Selection( + [("outgoing", "Customers"), ("incoming", "Return"), ("internal", "Internal")], + string="Types of Operation", + required=True, + default="outgoing", + ) + source_location = fields.Many2one("stock.location", string="Source Location") + destination_location = fields.Many2one( + "stock.location", string="Destination Location" + ) + location_id = fields.Many2one("stock.location", string="Location") + state = fields.Selection( + [ + ("ready", "Ready"), + ("on_rent", "On Rent"), + ("service", "Service"), + ("done", "Done"), + ] + ) + count_operation_ready = fields.Integer(compute="_compute_operation_count") + count_operation_on_rent = fields.Integer(compute="_compute_operation_count") + count_operation_service = fields.Integer(compute="_compute_operation_count") + operation_type_id = fields.Many2one( + "rental.product.operation", string="Operation Type" + ) + company_id = fields.Many2one( + "res.company", string="Company", default=lambda self: self.env.user.company_id + ) + + rental_move_type = fields.Selection( + [("outgoing", "Customers"), ("incoming", "Return"), ("internal", "Internal")], + string="Types of Operation", + required=True, + default="internal", + ) + + def _compute_operation_count(self): + for each in self: + ready_state = self.env["stock.picking"].search_count( + [ + ("state", "in", ["draft"]), + ("location_id", "=", each.location_id.id), + ("is_rental", "=", True), + ] + ) + each.count_operation_ready = ready_state + on_rent_state = self.env["stock.picking"].search_count( + [ + ("location_id", "=", each.location_id.id), + ("state", "=", "confirmed"), + ("is_rental", "=", True), + ] + ) + each.count_operation_on_rent = on_rent_state + service_state = self.env["stock.picking"].search_count( + [ + ("state", "=", "assigned"), + ("location_id", "=", each.location_id.id), + ("is_rental", "=", True), + ] + ) + each.count_operation_service = service_state + + def get_action_operation(self): + if self.rental_move_type == "outgoing": + state = ["draft"] + elif self.rental_move_type == "incoming": + state = ["confirmed"] + elif self.rental_move_type == "internal": + state = ["assigned"] + action_id = self.env.ref( + "product_rental_bookings.action_rental_product_move" + ).read()[0] + action_id["context"] = {"default_rental_move_type": self.rental_move_type} + action_id["domain"] = [ + ("state", "in", state), + ("rental_move_type", "=", self.rental_move_type), + ("location_id", "in", self.location_id.ids), + ] + return action_id diff --git a/product_rental_bookings/models/product_order.py b/product_rental_bookings/models/product_order.py new file mode 100755 index 0000000..9cd0be7 --- /dev/null +++ b/product_rental_bookings/models/product_order.py @@ -0,0 +1,866 @@ +# -*- coding: utf-8 -*- + +from datetime import timedelta, date, datetime + +import pytz +from odoo import models, fields, api, _ +from odoo.exceptions import ValidationError + + +class PaymentTransaction(models.Model): + _inherit = "payment.transaction" + + @api.model + def _compute_reference_prefix(self, values): + prefix = super(PaymentTransaction, self)._compute_reference_prefix(values) + if not prefix and values: + prefix = "Rental Order" + return prefix + + def render_rental_button(self, order, submit_txt=None, render_values=None): + values = { + "partner_id": order.partner_shipping_id.id or order.partner_invoice_id.id, + "billing_partner_id": order.partner_invoice_id.id, + "type": "form_save", + } + if render_values: + values.update(render_values) + self._log_payment_transaction_sent() + return ( + self.acquirer_id.with_context( + submit_class="btn btn-primary", submit_txt=submit_txt or _("Pay Now") + ) + .sudo() + .render( + self.reference, + order.total_amount, + order.currency_id.id, + values=values, + ) + ) + + +class RentalProductOrder(models.Model): + _name = "rental.product.order" + _description = "product Product Order" + _rec_name = "res_number" + + def _default_price_list(self): + return ( + self.env["product.pricelist"] + .search( + [ + ("company_id", "in", (False, self.env.company.id)), + ("currency_id", "=", self.env.company.currency_id.id), + ], + limit=1, + ) + .id + ) + + res_number = fields.Char(string="Order number", readonly=True, default="New") + product_name = fields.Many2one("product.product", string="Product Name") + from_date = fields.Datetime(string="From Date") + date_order = fields.Datetime(string="Date From") + to_date = fields.Datetime(string="To Date") + start_date = fields.Char(string="start Date") + end_date = fields.Char(string="end Date") + customer_name = fields.Many2one("res.partner", string="Customer Name") + book_date = fields.Datetime(string="Booking Date", default=datetime.now()) + account_payment_term = fields.Many2one( + "account.payment.term", string="Payment Term", required=True, default=1 + ) + state = fields.Selection( + [ + ("draft", "Draft"), + ("confirm", "Confirm"), + ("cancel", "Cancel"), + ("close", "Close"), + ], + default="draft", + ) + is_invoice = fields.Boolean(string="invoice") + rental_product_ids = fields.One2many( + "product.product", "product_registration_id", string="Product" + ) + is_agreement = fields.Boolean(string="Contracts Require?", default=True) + product_order_lines_ids = fields.One2many( + "product.order.line", "product_order_id", string="Order Line " + ) + invoice_count = fields.Integer(compute="_invoice_total", string="Total Invoiced") + contract_count = fields.Integer(compute="_contract_total", string="Total Contract") + picking_count = fields.Integer(compute="_picking_total", string="Total Invoiced ") + stock_picking_ids = fields.One2many( + "stock.picking", "product_order_rel_id", string="Picking Id" + ) + invoice_ids = fields.One2many( + "account.move", "rental_order_id", string="Invoice Id" + ) + contract_ids = fields.One2many( + "rental.product.contract", "rental_id", string="Contract Id" + ) + pricelist_id = fields.Many2one( + "product.pricelist", string="Pricelist", default=_default_price_list + ) # _default_pricelist + extra_charges = fields.Monetary(string="Extra Charges", readonly=True) + total_amount = fields.Monetary( + string="Total Amount", compute="_compute_amount", store=True + ) + taxes = fields.Float(string="Taxes", compute="_compute_amount", store=True) + untaxed_amount = fields.Monetary( + string="Untaxed Amount", compute="_compute_amount", store=True + ) + amount_untaxed = fields.Monetary(string="Untaxed Amount 1") + + user_id = fields.Many2one( + "res.users", string="Dealer", default=lambda self: self.env.user + ) + terms_condition = fields.Text(string="Terms And Condition") + invoice_status = fields.Char(compute="get_invoice_status", string="Invoice Status") + company_id = fields.Many2one( + "res.company", + string="Company", + readonly=True, + default=lambda self: self.env.user.company_id, + ) + currency_id = fields.Many2one("res.currency", related="company_id.currency_id") + count = fields.Integer( + string="Count", compute="_compute_count", store=True, invisible=True + ) + is_true = fields.Boolean(string="True") + partner_shipping_id = fields.Many2one( + "res.partner", related="customer_name", string="Delivery Address" + ) + partner_invoice_id = fields.Many2one( + "res.partner", "Invoicing Address", related="customer_name" + ) + return_date = fields.Datetime("Return Date") + location_id = fields.Many2one("stock.location", string="Location") + is_hours = fields.Boolean(string="Hours") + is_days = fields.Boolean(string="Days") + + def _create_payment_transaction(self, vals): + """Similar to self.env['payment.transaction'].create(vals) but the values are filled with the + current sales orders fields (e.g. the partner or the currency). + :param vals: The values to create a new payment.transaction. + :return: The newly created payment.transaction record. + """ + # Try to retrieve the acquirer. However, fallback to the token's acquirer. + acquirer_id = int(vals.get("acquirer_id")) + acquirer = False + payment_token_id = vals.get("payment_token_id") + acquirer = self.env["payment.acquirer"].browse(acquirer_id) + partner = self.env["res.partner"].browse(vals.get("partner_id")) + if payment_token_id and acquirer_id: + payment_token = ( + self.env["payment.token"].sudo().browse(int(payment_token_id)) + ) + if payment_token and payment_token.acquirer_id != acquirer: + raise ValidationError( + _("Invalid token found! Token acquirer %s != %s") + % (payment_token.acquirer_id.name, acquirer.name) + ) + if payment_token and payment_token.partner_id != partner: + raise ValidationError( + _("Invalid token found! Token partner %s != %s") + % (payment_token.partner_id.name, partner.name) + ) + else: + acquirer = payment_token.acquirer_id + # Check an acquirer is there. + if not acquirer_id and not acquirer: + raise ValidationError( + _("A payment acquirer is required to create a transaction.") + ) + if not acquirer: + acquirer = self.env["payment.acquirer"].browse(acquirer_id) + # Check a journal is set on acquirer. + if not acquirer.journal_id: + raise ValidationError( + _("A journal must be specified of the acquirer %s." % acquirer.name) + ) + if not acquirer_id and acquirer: + vals["acquirer_id"] = acquirer.id + vals.update( + { + "date": datetime.now(), + "amount": vals.get("amount"), + "currency_id": vals.get("currency_id"), + "partner_id": vals.get("partner_id"), + } + ) + transaction = self.env["payment.transaction"].create(vals) + # Process directly if payment_token + if transaction.payment_token_id: + transaction.s2s_do_transaction() + return transaction + + @api.depends("customer_name") + def _compute_count(self): + self.ensure_one() + self.count = len(self.search([("customer_name", "=", self.customer_name.id)])) + + @api.depends("invoice_status") + def get_invoice_status(self): + for record in self: + record.invoice_status = "" + for invoice in record.invoice_ids: + record.invoice_status = invoice.state + + @api.onchange("customer_name") + def onchange_customer(self): + self.account_payment_term = self.customer_name.property_payment_term_id.id + + @api.depends("stock_picking_ids") + def _picking_total(self): + for order in self: + order.picking_count = len(order.stock_picking_ids) + + @api.depends("invoice_ids") + def _invoice_total(self): + for order in self: + order.invoice_count = len(order.invoice_ids) + + def convert_TZ_UTC(self, TZ_datetime): + fmt = "%Y-%m-%d %H:%M:%S" + # Current time in UTC + now_utc = datetime.now(pytz.timezone("UTC")) + # Convert to current user time zone + now_timezone = now_utc.astimezone(pytz.timezone(self.env.user.tz)) + UTC_OFFSET_TIMEDELTA = datetime.strptime( + now_utc.strftime(fmt), fmt + ) - datetime.strptime(now_timezone.strftime(fmt), fmt) + local_datetime = datetime.strptime(TZ_datetime, fmt) + result_utc_datetime = local_datetime + UTC_OFFSET_TIMEDELTA + return result_utc_datetime.strftime(fmt) + + def action_view_order_invoices(self): + action = self.env.ref("account.action_move_out_invoice_type").read()[0] + invoices = self.mapped("invoice_ids") + if len(invoices) > 1: + action["domain"] = [("id", "in", invoices.ids)] + elif invoices: + action["views"] = [(self.env.ref("account.view_move_form").id, "form")] + action["res_id"] = invoices.id + return action + + @api.depends("contract_ids") + def _contract_total(self): + for contract in self: + contract.contract_count = len(contract.contract_ids) + + def action_view_order_contract(self): + action = self.env.ref( + "product_rental_bookings.action_rental_contract_view_tree" + ).read()[0] + contracts = self.mapped("contract_ids") + if len(contracts) > 1: + action["domain"] = [("id", "in", contracts.ids)] + elif contracts: + action["views"] = [ + ( + self.env.ref( + "product_rental_bookings.rental_product_contract_form" + ).id, + "form", + ) + ] + action["res_id"] = contracts.id + return action + + @api.onchange("customer_name") + def customer_pricelist(self): + values = { + "pricelist_id": self.customer_name.property_product_pricelist + and self.customer_name.property_product_pricelist.id + or False, + } + self.update(values) + + @api.model + def create(self, vals): + product_order_line = [] + if vals.get("is_true"): + for order_line in vals.get("product_order_lines_ids"): + if order_line[2] and order_line[0] != 0: + product_order_line.append([0, False, order_line[2]]) + elif order_line[2] and order_line[0] == 0: + product_order_line.append(order_line) + vals.update({"product_order_lines_ids": product_order_line}) + sequence = self.env["ir.sequence"].next_by_code("product_registration") or _( + "Product Register" + ) + vals.update({"res_number": sequence}) + res = super(RentalProductOrder, self).create(vals) + from_date, to_date = self.start_end_date_global(res.from_date, res.to_date) + res.start_date = from_date + res.end_date = to_date + return res + + @api.depends("product_order_lines_ids", "customer_name") + def _compute_amount(self): + """ + Compute the total amounts of the RO. + """ + for order in self: + untaxed_amount = 0.0 + taxes = 0.0 + for line in order.product_order_lines_ids: + untaxed_amount += line.sub_total + taxes += line.price_tax + if order.pricelist_id: + order.update( + { + "untaxed_amount": order.pricelist_id.currency_id.round( + untaxed_amount + ), + "taxes": order.pricelist_id.currency_id.round(taxes), + "total_amount": untaxed_amount + taxes + order.extra_charges, + } + ) + else: + order.update( + { + "untaxed_amount": untaxed_amount, + "taxes": taxes, + "total_amount": untaxed_amount + taxes + order.extra_charges, + } + ) + + def book(self): + self.state = "book" + + @api.model + def _get_picking_type(self, company_id): + picking_type = self.env["stock.picking.type"].search( + [("code", "=", "incoming"), ("warehouse_id.company_id", "=", company_id)] + ) + if not picking_type: + picking_type = self.env["stock.picking.type"].search( + [("code", "=", "incoming"), ("warehouse_id", "=", False)] + ) + return picking_type[:1].id + + def confirm(self): + product_order_id = [] + move_ids_without_package = [] + for each in self.product_order_lines_ids: + product_order_id.append((0, 0, {"product_id": each.product_id.id})) + move_ids_without_package.append( + ( + 0, + 0, + { + "product_id": each.product_id.id, + "product_uom_qty": each.qty_needed, + "product_uom": each.product_id.uom_id.id, + "location_id": self.location_id.id + or each.product_id.location_id.id, + "location_dest_id": self.env.ref( + "stock.stock_location_customers" + ).id, + "name": each.product_id.name, + "company_id": self.company_id.id, + }, + ) + ) + + stock_picking_id = self.env["stock.picking"].create( + { + "partner_id": self.customer_name.id, + "location_id": self.location_id.id, + "location_dest_id": self.env.ref("stock.stock_location_customers").id, + "rental_move_type": "outgoing", + "picking_type_id": self._get_picking_type(self.company_id.id), + "product_order_rel_id": self.id, + "is_rental": True, + "origin": self.res_number, + "move_ids_without_package": move_ids_without_package, + } + ) + self.state = "confirm" + if self.is_agreement: + rental_product_contract_obj = self.env["rental.product.contract"] + product_order_id = [] + for each in self.product_order_lines_ids: + product_order_id.append( + ( + 0, + 0, + { + "product_id": each.product_id.id or "", + "price_based": each.price_based or "", + "enter_days": each.enter_days or "", + "enter_hour": each.enter_hour or "", + "price": each.price or "", + "qty_needed": each.qty_needed, + "sub_total": each.sub_total or "", + "tax_id": [(6, 0, each.tax_id.ids)], + }, + ) + ) + self.state = "confirm" + view_id = self.env.ref( + "product_rental_bookings.rental_product_contract_form" + ) + contract = rental_product_contract_obj.create( + { + "partner_id": self.customer_name.id, + "from_date": self.from_date, + "to_date": self.to_date, + "total_amount": self.total_amount, + "rental_id": self.id, + "product_contract_lines_ids": product_order_id, + "cost_frequency": "no", + "contract_date": self.book_date, + "account_payment_term": self.account_payment_term.id, + "contractor_id": self.user_id.id, + "origin": self.res_number, + "cost": 12, + "is_hours": self.is_hours, + "is_days": self.is_days, + "picking_id": stock_picking_id.id, + "company_id": self.company_id.id, + "name": "New", + } + ) + return { + "name": _("product Contract"), + "type": "ir.actions.act_window", + "view_type": "form", + "view_mode": "form", + "res_model": "rental.product.contract", + "res_id": contract.id, + "view_id": view_id.id, + } + self.state = "confirm" + + def action_view_invoice(self): + invoices = self.mapped("invoice_ids") + action = self.env.ref("account.action_invoice_tree1").read()[0] + if len(invoices) > 1: + action["domain"] = [("id", "in", invoices.ids)] + elif len(invoices) == 1: + action["views"] = [(self.env.ref("account.move_form").id, "form")] + action["res_id"] = invoices.ids[0] + else: + action = {"type": "ir.actions.act_window_close"} + return action + + def action_view_stock_pickings(self): + pickings = self.mapped("stock_picking_ids") + return { + "name": "Pickings", + "view_mode": "tree,form", + "res_model": "stock.picking", + "domain": [("id", "in", pickings.ids)], + "res_id": self.id, + "type": "ir.actions.act_window", + } + + def cancel(self): + inv_obj = self.env["account.move"] + order_id = self.env["product.order.line"].browse(int(self.id)).product_order_id + self = order_id + for contract in order_id.contract_ids: + for cancel_policy in contract.cancel_policy_ids: + if cancel_policy.from_date and cancel_policy.to_date: + if ( + date.today() >= cancel_policy.from_date + and date.today() <= cancel_policy.to_date + ): + invoice_browse = ( + self.env["account.move"] + .sudo() + .search( + [ + ("contract_id", "=", contract.id), + ("type", "=", "out_invoice"), + ] + ) + ) + for each_invoice in invoice_browse: + if each_invoice.state == "draft": + invoice_line_data = [] + invoice_line_data.append( + ( + 0, + 0, + { + "product_id": self.product_name.id, + "name": "Cancel Policy " + self.res_number, + "account_id": self.customer_name.property_account_receivable_id.id, + "price_unit": ( + contract.total_amount + * cancel_policy.policy_charged + ) + / 100, + "quantity": 1, + }, + ) + ) + invoice = inv_obj.create( + { + "name": self.res_number, + "origin": self.res_number, + "partner_id": self.customer_name.id, + "type": "out_invoice", + "date_invoice": date.today(), + "reference": False, + "account_id": self.customer_name.property_account_receivable_id.id, + "invoice_line_ids": invoice_line_data, + } + ) + + elif each_invoice.state == "paid": + invoice_line_data = [] + invoice_line_data.append( + ( + 0, + 0, + { + "product_id": self.product_name.id, + "name": "Cancel Policy " + self.res_number, + "account_id": self.customer_name.property_account_receivable_id.id, + "price_unit": each_invoice.total_amount + - ( + ( + contract.total_amount + * cancel_policy.policy_charged + ) + / 100 + ), + "quantity": 1, + }, + ) + ) + invoice = inv_obj.create( + { + "name": self.res_number, + "origin": self.res_number, + "partner_id": self.customer_name.id, + "type": "in_refund", + "date_invoice": date.today(), + "reference": False, + "account_id": self.customer_name.property_account_receivable_id.id, + "invoice_line_ids": invoice_line_data, + } + ) + + if not cancel_policy.to_date: + if date.today() >= cancel_policy.from_date: + invoice_browse = self.env["account.move"].search( + [ + ("contract_id", "=", contract.id), + ("type", "=", "out_invoice"), + ] + ) + for each_invoice in invoice_browse: + if each_invoice.state == "draft": + each_invoice.state = "paid" + self.state = "cancel" + + def send_product_quote(self): + """ + This is Email for send quotation product order inquiry + """ + self.ensure_one() + ir_model_data = self.env["ir.model.data"] + try: + template_id = ir_model_data.get_object_reference( + "product_rental_bookings", "email_template_product_rental" + )[1] + except ValueError: + template_id = False + try: + compose_form_id = ir_model_data.get_object_reference( + "mail", "email_compose_message_wizard_form" + )[1] + except ValueError: + compose_form_id = False + ctx = { + "default_model": "rental.product.order", + "default_res_id": self.ids[0], + "default_use_template": bool(template_id), + "default_template_id": template_id, + "mark_so_as_sent": True, + } + return { + "type": "ir.actions.act_window", + "view_type": "form", + "view_mode": "form", + "res_model": "mail.compose.message", + "views": [(compose_form_id, "form")], + "view_id": compose_form_id, + "target": "new", + "context": ctx, + } + + def close(self): + view_id = self.env.ref("rental_product_rental") + return { + "name": "product Service", + "type": "ir.actions.act_window", + "view_type": "form", + "view_mode": "form", + "res_model": "wizard.product.service", + "view_id": view_id.id, + "target": "new", + } + + @api.model + def start_end_date_global(self, start, end): + tz = pytz.utc + current_time = datetime.now(tz) + hour_tz = int(str(current_time)[-5:][:2]) + min_tz = int(str(current_time)[-5:][3:]) + sign = str(current_time)[-6][:1] + sdate = str(start) + edate = str(end) + + if sign == "+": + start_date = ( + datetime.strptime(sdate, "%Y-%m-%d %H:%M:%S") + + timedelta(hours=hour_tz, minutes=min_tz) + ).strftime("%Y-%m-%d %H:%M:%S") + end_date = ( + datetime.strptime(edate, "%Y-%m-%d %H:%M:%S") + + timedelta(hours=hour_tz, minutes=min_tz) + ).strftime("%Y-%m-%d %H:%M:%S") + + if sign == "-": + start_date = ( + datetime.strptime(sdate, "%Y-%m-%d %H:%M:%S") + - timedelta(hours=hour_tz, minutes=min_tz) + ).strftime("%Y-%m-%d %H:%M:%S") + end_date = ( + datetime.strptime(edate, "%Y-%m-%d %H:%M:%S") + - timedelta(hours=hour_tz, minutes=min_tz) + ).strftime("%Y-%m-%d %H:%M:%S") + return start_date, end_date + + @api.model + def start_and_end_date_global(self, start, end): + tz = pytz.timezone(self.env.user.tz) or "UTC" + current_time = datetime.now(tz) + hour_tz = int(str(current_time)[-5:][:2]) + min_tz = int(str(current_time)[-5:][3:]) + sign = str(current_time)[-6][:1] + sdate = str(start) + edate = str(end) + + if sign == "-": + start_date = ( + datetime.strptime(sdate.split(".")[0], "%Y-%m-%d %H:%M:%S") + + timedelta(hours=hour_tz, minutes=min_tz) + ).strftime("%Y-%m-%d %H:%M:%S") + end_date = ( + datetime.strptime(edate.split(".")[0], "%Y-%m-%d %H:%M:%S") + + timedelta(hours=hour_tz, minutes=min_tz) + ).strftime("%Y-%m-%d %H:%M:%S") + + if sign == "+": + start_date = ( + datetime.strptime(sdate.split(".")[0], "%Y-%m-%d %H:%M:%S") + - timedelta(hours=hour_tz, minutes=min_tz) + ).strftime("%Y-%m-%d %H:%M:%S") + end_date = ( + datetime.strptime(edate.split(".")[0], "%Y-%m-%d %H:%M:%S") + - timedelta(hours=hour_tz, minutes=min_tz) + ).strftime("%Y-%m-%d %H:%M:%S") + return start_date, end_date + + @api.model + def utc_to_tz(self, start, end): + start_date = pytz.utc.localize( + datetime.strptime(start, "%Y-%m-%d %H:%M:%S") + ).astimezone(pytz.timezone(self.env.user.tz)) + + end_date = pytz.utc.localize( + datetime.strptime(end, "%Y-%m-%d %H:%M:%S") + ).astimezone(pytz.timezone(self.env.user.tz)) + + return start_date, end_date + + @api.model + def get_booking_data(self, model_id): + resourcelist = [] + eventlist = [] + id_list = [] + product_booking = self.env["rental.product.order"].search( + [("state", "in", ["confirm"])] + ) + categ_ids = self.env["product.category"].search( + [("parent_id", "child_of", int(model_id))] + ) + for data in product_booking: + if data.product_order_lines_ids and data.from_date.date() >= date.today(): + for line in data.product_order_lines_ids: + if ( + line.product_id.categ_id.id in categ_ids.ids + and line.product_id.id not in id_list + ): + resourcelist.append( + { + "id": line.product_id.id, + "building": line.product_id.categ_id.name, + "title": line.product_id.name, + "type": line.product_id.categ_id.id or False, + "product_id": line.product_id.id, + } + ) + id_list.append(line.product_id.id) + if line.product_id.categ_id.id in categ_ids.ids: + if data.start_date and data.end_date: + start_date, end_date = self.utc_to_tz( + data.start_date, data.end_date + ) + start = ( + str(start_date.date()) + "T" + str(start_date.time()) + ) + end = str(end_date.date()) + "T" + str(end_date.time()) + else: + start_date, end_date = self.utc_to_tz( + data.start_date, data.end_date + ) + start = ( + str(start_date.date()) + "T" + str(start_date.time()) + ) + end = str(end_date.date()) + "T" + str(end_date.time()) + eventlist.append( + { + "id": line.id, + "line_id": line.id, + "resourceId": line.product_id.id, + "start": start, + "end": end, + "title": data.res_number, + "type": model_id or False, + "product_id": line.product_id.id, + } + ) + product_model = self.env["product.product"].search([("is_rental", "=", True)]) + for product in product_model: + if product.categ_id.id in categ_ids.ids and product.id not in id_list: + id_list.append(product.id) + resourcelist.append( + { + "id": product.id, + "building": product.categ_id.name, + "title": product.name, + "type": product.categ_id.id or False, + "product_id": product.id, + } + ) + if not resourcelist: + eventlist = [] + return [resourcelist, eventlist] + + @api.model + def remove_event(self, line_id): + record_line_id = self.env["product.order.line"].browse(int(line_id)) + if len(record_line_id.product_order_id.product_order_lines_ids.ids) == 1: + record_line_id.product_order_id.state = "cancel" + elif len(record_line_id.product_order_id.product_order_lines_ids.ids) > 1: + record_line_id.unlink() + + +class productOrderLine(models.Model): + _name = "product.order.line" + _description = "product Order Line" + + product_order_id = fields.Many2one("rental.product.order", string="product order") + product_id = fields.Many2one("product.product", string="product") + price_based = fields.Selection( + [("per_day", "Day"), ("per_hour", "Hour"), ("per_session", "Session")], + default="per_day", + string="Based On", + ) + tax_id = fields.Many2many("account.tax", "product_order_tax_rel", string="Tax") + enter_kms = fields.Float(string="KM") + enter_hour = fields.Float(string="Hour") + enter_days = fields.Float(string="Days") + price = fields.Monetary(string="Price") + total = fields.Monetary(string="Total") + sub_total = fields.Monetary(string="Sub Total", compute="_get_subtotal", store=True) + price_tax = fields.Float(compute="_get_subtotal", string="Taxes", store=True) + price_total = fields.Monetary( + compute="`_get_subtotal`", string="Total Price", store=True + ) + name = fields.Char(string="Description") + currency_id = fields.Many2one( + "res.currency", related="product_order_id.currency_id" + ) + qty_needed = fields.Integer(string="Quantity", default=1) + + @api.onchange("price_based") + def get_price_value(self): + self.sub_total = 0.0 + if self.price_based == "per_day": + self.price = self.product_id.rental_amount + self.sub_total = ( + self.enter_days * self.qty_needed * self.product_id.rental_amount + ) + elif self.price_based == "per_hour": + self.price = self.product_id.rental_amount_per_hour + self.sub_total = ( + self.enter_hour + * self.qty_needed + * self.product_id.rental_amount_per_hour + ) + else: + self.price = self.product_id.rental_amount_per_session + self.sub_total = ( + self.enter_hour + * self.qty_needed + * self.product_id.rental_amount_per_session + ) + + @api.onchange("product_id") + def get_line_value(self): + if self.product_order_id.from_date and self.product_order_id.to_date: + if self.price_based == "per_hour": + self.price = self.product_id.rental_amount_per_hour + elif self.price_based == "per_day": + self.price = self.product_id.rental_amount + else: + self.price = self.product_id.rental_amount_per_session + + else: + raise ValidationError(_("Please Select From date Or to date!!!")) + + @api.depends("product_id", "price", "tax_id") + def _get_subtotal(self): + for line in self: + if line.price_based == "per_day": + qty = line.enter_days * line.qty_needed + elif line.price_based == "per_session": + qty = line.qty_needed + else: + qty = line.enter_hour * line.qty_needed + taxes = line.tax_id.compute_all( + qty, line.product_order_id.currency_id, line.price + ) + line.update( + { + "price_tax": sum( + t.get("amount", 0.0) for t in taxes.get("taxes", []) + ), + "price_total": taxes["total_included"], + "sub_total": taxes["total_excluded"], + } + ) + line.get_line_value() + + +class WizardProductServiceModel(models.TransientModel): + _name = "wizard.product.service" + _description = "product Service" + _inherit = "rental.product.order" + + is_damaged = fields.Boolean(string="Is Damaged") + service_location_id = fields.Many2one("stock.location", string="Service Location") + product_location_id = fields.Many2one("stock.location", string="Product Location") + + def confirm_service(self): + self.state = "confirm" \ No newline at end of file diff --git a/product_rental_bookings/models/res_config_settings.py b/product_rental_bookings/models/res_config_settings.py new file mode 100755 index 0000000..4ddf9a3 --- /dev/null +++ b/product_rental_bookings/models/res_config_settings.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- + +from odoo import models, fields, api, _ + + +class ResConfigSettings(models.TransientModel): + _inherit = "res.config.settings" + + enabled_day_rent = fields.Boolean(string="Day Rent") + enabled_hour_rent = fields.Boolean(string="Hour Rent") + enabled_session_rent = fields.Boolean(string="Session Rent") + + @api.model + def get_values(self): + res = super(ResConfigSettings, self).get_values() + get_param = self.env["ir.config_parameter"].sudo().get_param + res.update( + enabled_day_rent=get_param("enabled_day_rent"), + enabled_hour_rent=get_param("enabled_hour_rent"), + enabled_session_rent=get_param("enabled_session_rent"), + ) + return res + + def set_values(self): + self.env["ir.config_parameter"].sudo().set_param( + "enabled_day_rent", self.enabled_day_rent + ) + self.env["ir.config_parameter"].sudo().set_param( + "enabled_hour_rent", self.enabled_hour_rent + ) + self.env["ir.config_parameter"].sudo().set_param( + "enabled_session_rent", self.enabled_session_rent + ) + res = super(ResConfigSettings, self).set_values() + ICPSudo = self.env["ir.config_parameter"].sudo() + ICPSudo.set_param( + "product_rental_bookings.enabled_day_rent", self.enabled_day_rent + ) + ICPSudo.set_param( + "product_rental_bookings.enabled_day_rent", self.enabled_hour_rent + ) + ICPSudo.set_param( + "product_rental_bookings.enabled_day_rent", self.enabled_session_rent + ) + return res diff --git a/product_rental_bookings/models/session_config_settings.py b/product_rental_bookings/models/session_config_settings.py new file mode 100644 index 0000000..484e0a9 --- /dev/null +++ b/product_rental_bookings/models/session_config_settings.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- + + +from odoo import models, fields, api, _ +from odoo.exceptions import ValidationError + + +class SessionConfigSettings(models.Model): + _name = "session.config" + _description = "Session configuration settings" + + name = fields.Char("Name") + start_time = fields.Float("Start Time") + end_time = fields.Float("End Time") + + @api.constrains("start_time", "end_time") + def _check_time_constraint(self): + for record in self: + if ( + record.start_time < 0.0 + or 24.0 < record.start_time + or record.end_time < 0.0 + or 24.0 < record.end_time + ): + raise ValidationError(_("Start time or End time is wrong")) + elif record.start_time > record.end_time: + raise ValidationError(_("Start time must be smaller than End time")) diff --git a/product_rental_bookings/models/stock_move.py b/product_rental_bookings/models/stock_move.py new file mode 100644 index 0000000..3b68a73 --- /dev/null +++ b/product_rental_bookings/models/stock_move.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- + +from odoo import models, fields + + +class StockMove(models.Model): + _inherit = "stock.move" + + product_move_id = fields.Many2one("stock.picking", string="Product Move") + products_checked = fields.Boolean(string="Select Products") diff --git a/product_rental_bookings/models/stock_picking.py b/product_rental_bookings/models/stock_picking.py new file mode 100644 index 0000000..4ab5847 --- /dev/null +++ b/product_rental_bookings/models/stock_picking.py @@ -0,0 +1,163 @@ +# -*- coding: utf-8 -*- + +from datetime import datetime + +from odoo import models, fields, api, _ +from odoo.exceptions import UserError +from odoo.tests import Form + + +class StockPicking(models.Model): + _inherit = "stock.picking" + + product_order_rel_id = fields.Many2one( + "rental.product.order", string="product Order" + ) + contract_ids = fields.One2many( + "rental.product.contract", "picking_id", string="Contract Id" + ) + is_rental = fields.Boolean(string="Rental Move") + product_move_line_id = fields.One2many( + "stock.move", "product_move_id", string="Move Lines" + ) + rental_move_type = fields.Selection( + [("outgoing", "Customers"), ("incoming", "Return"), ("internal", "Internal")], + string="Types of Operation", + required=True, + default="outgoing", + ) + + def delivery(self): + move_ids_without_package = [] + if all([each.products_checked for each in self.move_ids_without_package]): + self.action_confirm() + self.action_assign() + res = self.button_validate() + if isinstance(res, bool): + pass + else: + Form( + self.env["stock.immediate.transfer"].with_context(res["context"]) + ).save().process() + + for each in self.move_ids_without_package.filtered( + lambda l: l.products_checked + ): + move_ids_without_package.append( + ( + 0, + 0, + { + "product_id": each.product_id.id, + "products_checked": each.products_checked, + "name": each.product_id.name, + "product_uom": each.product_uom.id, + "product_uom_qty": each.product_uom_qty, + "location_id": self.env.ref( + "stock.stock_location_customers" + ).id, + "location_dest_id": each.picking_id.location_id.id, + }, + ) + ) + + stock_picking_receipt = self.env["stock.picking"].create( + { + "partner_id": self.partner_id.id, + "location_id": self.env.ref("stock.stock_location_customers").id, + "rental_move_type": "incoming", + "location_dest_id": self.location_id.id, + "product_order_rel_id": self.product_order_rel_id.id, + "picking_type_id": self.picking_type_id.id, + "is_rental": True, + "origin": self.origin, + "move_ids_without_package": move_ids_without_package, + } + ) + stock_picking_receipt.state = "confirmed" + return stock_picking_receipt + elif any([each.products_checked for each in self.move_ids_without_package]): + deliver_move_id = self.copy() + for each in self.move_ids_without_package: + if not each.product_id: + self.unlink() + for each in self.product_move_line_id.filtered( + lambda l: l.products_checked + ): + move_ids_without_package.append( + ( + 0, + 0, + { + "product_id": each.product_id.id, + "products_checked": each.products_checked, + "name": each.product_id.name, + "product_uom_qty": each.product_uom_qty, + "product_uom": each.product_uom.id, + "location_id": each.picking_id.location_id.id, + "location_dest_id": self.env.ref( + "stock.stock_location_customers" + ).id, + }, + ) + ) + each.unlink() + deliver_move_id.write( + { + "rental_move_type": "incoming", + "state": "confirmed", + "move_ids_without_package": move_ids_without_package, + } + ) + return deliver_move_id + else: + raise UserError(_("Please Select Some Product to Move")) + + def incoming(self): + self.write({"rental_move_type": "incoming"}) + product_order_id = [] + for each in self.move_ids_without_package: + product_order_id.append( + ( + 0, + 0, + { + "product_id": each.product_id.id, + "products_checked": each.products_checked, + "name": each.product_id.name, + "product_uom": each.product_uom.id, + "location_id": each.picking_id.location_id.id, + "location_dest_id": self.env.ref( + "stock.stock_location_customers" + ).id, + }, + ) + ) + self.env["rental.product.logs"].create( + { + "customer_id": self.partner_id.id, + "product_id": each.product_id.id, + "from_date": self.scheduled_date, + "to_date": self.scheduled_date, + } + ) + + order_id = self.env["rental.product.order"].search( + [("res_number", "=", self.origin)] + ) + for each_order in order_id: + each_order.state = "close" + each_order.return_date = datetime.now() + self.state = "assigned" + + def move(self): + self.state = "done" + self.action_confirm() + self.action_assign() + res = self.button_validate() + if isinstance(res, bool): + pass + else: + Form( + self.env["stock.immediate.transfer"].with_context(res["context"]) + ).save().process() diff --git a/product_rental_bookings/report/rental_contract_recurring.xml b/product_rental_bookings/report/rental_contract_recurring.xml new file mode 100755 index 0000000..05feec0 --- /dev/null +++ b/product_rental_bookings/report/rental_contract_recurring.xml @@ -0,0 +1,130 @@ + + + + + \ No newline at end of file diff --git a/product_rental_bookings/report/rental_contract_report.xml b/product_rental_bookings/report/rental_contract_report.xml new file mode 100755 index 0000000..7e92347 --- /dev/null +++ b/product_rental_bookings/report/rental_contract_report.xml @@ -0,0 +1,157 @@ + + + + + \ No newline at end of file diff --git a/product_rental_bookings/report/rental_order.xml b/product_rental_bookings/report/rental_order.xml new file mode 100755 index 0000000..ccf75b4 --- /dev/null +++ b/product_rental_bookings/report/rental_order.xml @@ -0,0 +1,38 @@ + + + + + Rental/Order + rental.product.order + qweb-pdf + product_rental_bookings.rental_order_template + product_rental_bookings.rental_order_report + 'Rental/Order' + + report + + + + Rental Contract + rental.product.contract + qweb-pdf + product_rental_bookings.rental_contract_report_template + product_rental_bookings.rental_contract_report + 'Rental Contract' + + report + + + + Recurring Invoice + rental.product.contract + qweb-pdf + product_rental_bookings.rental_recurring_report_template + product_rental_bookings.rental_contract_recurring + 'Recurring Invoice' + + report + + + + \ No newline at end of file diff --git a/product_rental_bookings/report/rental_order_report.xml b/product_rental_bookings/report/rental_order_report.xml new file mode 100755 index 0000000..a6b33e6 --- /dev/null +++ b/product_rental_bookings/report/rental_order_report.xml @@ -0,0 +1,143 @@ + + + + + \ No newline at end of file diff --git a/product_rental_bookings/security/ir.model.access.csv b/product_rental_bookings/security/ir.model.access.csv new file mode 100755 index 0000000..c567218 --- /dev/null +++ b/product_rental_bookings/security/ir.model.access.csv @@ -0,0 +1,24 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_rental_product_order,access_rental_product_order,model_rental_product_order,,1,1,1,1 +access_product_book,access_product_book,model_product_booking,,1,1,1,1 +access_product_order_line,access_product_order_line,model_product_order_line,,1,1,1,1 +access_rental_product_contract,access_rental_product_contract,model_rental_product_contract,,1,1,1,1 +access_product_contract_lines,access_product_contract_lines,model_product_contract_lines,base.group_user,1,1,1,1 +access_rental_product_operation,access_rental_product_operation,model_rental_product_operation,,1,1,1,1 +access_product_rental_line,access_product_rental_line,model_product_rental_line,,1,1,1,1 +access_rental_product_logs,access_rental_product_logs,model_rental_product_logs,,1,1,1,1 +access_customer_document,access_customer_document,model_customer_document,base.group_user,1,1,1,1 +access_rental_policy,access_rental_policy,model_rental_policy,base.group_user,1,1,1,1 +access_wizard_product_service,access_wizard_product_service,model_wizard_product_service,base.group_user,1,1,1,1 +access_product_advance_payment_invoice,access_product_advance_payment_invoice,model_product_advance_payment_invoice,base.group_user,1,1,1,1 +access_product_category_portal_user,access_product_category_portal_user,product.model_product_category,base.group_portal,1,1,1,1 +access_product_category_public,access_product_category_public,product.model_product_category,base.group_public,1,0,1,0 +access_product_product_portal,access_product_product_portal,product.model_product_product,base.group_portal,1,0,1,0 +access_product_product_public,access_product_product_public,product.model_product_product,base.group_public,1,0,1,0 +access_product_template_portal,access_product_template_portal,product.model_product_template,base.group_portal,1,0,1,0 +access_product_template_public,access_product_template_public,product.model_product_template,base.group_public,1,0,1,0 +access_ir_sequence_group_public,access_ir_sequence group_public,base.model_ir_sequence,base.group_public,1,0,1,0 +access_ir_sequence_group_portal,access_ir_sequence_group_portal,base.model_ir_sequence,,base.group_portal,1,0,1,0 +access_stock_quant_group_public,access_stock_quant group_public,stock.model_stock_quant,base.group_public,1,0,1,0 +access_stock_quant_group_portal,access_stock_quant_group_portal,stock.model_stock_quant,,base.group_portal,1,0,1,0 +access_session_config,access_session_config,model_session_config,base.group_user,1,1,1,1 \ No newline at end of file diff --git a/product_rental_bookings/security/security.xml b/product_rental_bookings/security/security.xml new file mode 100755 index 0000000..4d7b76d --- /dev/null +++ b/product_rental_bookings/security/security.xml @@ -0,0 +1,34 @@ + + + + + + product Contract Rule + + + ['|',('company_id','=',user.company_id.id),('company_id','=',False)] + + + + product product + + + ['|',('company_id','=',user.company_id.id),('company_id','=',False)] + + + + product Order Rule + + + ['|',('company_id','=',user.company_id.id),('company_id','=',False)] + + + + product Log Rule + + + ['|',('company_id','=',user.company_id.id),('company_id','=',False)] + + + + \ No newline at end of file diff --git a/product_rental_bookings/static/.DS_Store b/product_rental_bookings/static/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..9d66d52b5dc590c1c9f4bdf2df8823f83f1305dd GIT binary patch literal 6148 zcmeHK&2G~`5S~o}O;jOrK%&RJRN|0BjKoickgT*l^oHcB900X;98pWg8`%yKq^bNG zB%8S5u$$ zBbnw|RS${~6=`M1iCl-B=(xYNSOh!I2KvSGq^T Z(5~45hn^e9XaVFPU}ca(6!@nKTmtuSZm|FW literal 0 HcmV?d00001 diff --git a/product_rental_bookings/static/description/icon.png b/product_rental_bookings/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..cadee868b65d34a18b69b6d4023b509b90b94fc4 GIT binary patch literal 24096 zcmXtAbySn@`<8AdEv+IsI;CNVNJulr6af_(-5@0mf&xl6OlbxT7$DssC6n%wPNkdQ z%jbK3f3S1dIeVV_dEPs&`?~HeLRVXjf|QB$&Ye3H>d&6&-?@XsfBQ#F2)yIv7wvxM z&iy;;Pm~SczuL(lYG748>K<$?YZiaT8GpA(8JGAG4t@@g>V`l;$Q`Z`Y?^q&!{=1A zytufeFeO7>DrLRP>AUzi%0=-Zx&{x95`1n9JUp!4<j%d9mrb! zO6OH-SwmMkn$#o9y#_}KYj%uz=*O66#u^+L&CwhAp%CRW*IKPojPIeXscN}t@%+5s zAd3INV4fYVP8Y1zcJ{+SYSH63$sWfg?939cCxS~#o^SDnx+r~AxQnzb^)P6Eh|$Vm zM6QH9Z4OL~%!>ZCJ5DHt+4h>Tm~MJaC%q~p$e-!Gk|$MFB{_)s#YHU8&2O3lxhv)N z>$m^|lc-&Y(dZK{@+leWWk6L{9*nueJrz7QM<6xVT(!j@#e-;N+fwP}h}SC4G-W;E zSO`Kj)d|5iMax-rOjzWV91bmf`QbxwlvHxXV2(r*?>F`9m^i@(Tg3Fj@i5YNC>6+_wBJ8I(S>;==2%Cs(ta(p6O6l#nba5eyJ-ww@+pZ zJd)43DY7o#Lqi0z3C!zyNX|ayU{_qaJ5+C5Ch_`vVZB}5qbh}t=Iw@q&?tlBvyS4Z zDAgt1K|YILvY!@qyx4KWjd=acs&pOfRx*5!ZCu@3(&gM9tI+YumVI*V7%uupf$xP* zem8*G$LnRseQD<9J3me2`F{4V)sy75soZOAHfP7eM@^od&jqhVQ!bpZJuQxs6FB|n z;Slg{(8R%lHx5NN2kpDKR!T@ty}c=C26iCbxH1^3xz=j0+L&?_3Za# za*kY=l-c=T;tDlg?mgP*k zMm(WoVSk?HxevdznMp2X6E)B9SZQ>ut`?8_esjG{=4x>)OBUSER%so)ik!nE7}2vv z4h<3I+1D|zYkX=_lmJOhBPgJ%9jr&ojN$$^`W91#QcmrRa*XwhIEE%m>}cj3eW zht`wbROgueqL-JdCCrTQ_V6f1=;Q5~=@>Stcc%lD^QOc)*Pf-OnS}Q~BG|%|Srh2_ z1PtMuu=4WY>x?3P($Z+U3?f?XAIrP*H8m1`tH|c&eh9r5`@DuGu|V+d*4=kMyw`2a zOFTG&HBFO`M(fKQ7d9=R^}xHYENYaC3(KiIGBIrN8Y{A7+^;+aH68m+(f^8FS7lcM z%icW1{NQBK*I6IlZ((5l=b@SZ%Nf47NSw0O&Fb>CQG@dVXlZ<_M1rL&hV|e3MU>-} zOONCAUZ`^E^WOF0iezD~4h{?pAFDCQdL?_PNXvSsX|{`uRPB|M@mbbQ%76?bq>oFq zJw0cmj0(66j%2Lda{52AJ8@n=Rzj+>(HG@X@oNqBJj}M4SAnaHZ4S@Bam-m;=T{2I zED2=X8&DAk)uz9WK5081ZZ>^|hE1A%)adKIX9zzg0XH~csbVyWsdFWKVa&8#Y)-1R z#r3j$;dJMi%UJpW6|17EoMxmBnIHVR{1HmLVvv!P=D1OON8&8%^X?s8aZo#y!1)Nv zZ*u!&BaPssXstUCH946j(^ro_5BKV9IwNt2OYR|70z$F+;rX(qd^3)5rxYUEeM*Xk zaN-hkL=P8oCJ8I&=KioY?=F1(WBw;t0p{iP4>&;*6J6p!Vf5;Q)Nlmbs_p$gQ~9=KGQfc$xuF{15wG1{a00l5$NT~2*26-^_(I3JkI%d(td6Sm6)XUvs?D%dEQD8->!jpfbr!oq=)mOeL)aJZP<550+L|Ooh#r%g&!(x z1>;GOWaILOBzjeP7W90cem}#=bQhjODEu%}uSP#N0q@pa%aPdk=updS%eDDaF3Hcs z`vUMYV^CDf?c#UgRJC;lP8xjV$d$i;7-ftwL)6+Qci9uBKgA_^t$$Rzz2o0hdo)TS z*a|*=y@4i16-Ubc{RNlLy;XF(cJG?of(1TrtEgSJxOC8%|Ni`axBnY)$>S8TSyc3U zw~lE;u5-+iADjdo%R7Ud2mGq!B}Fy|8|%Mi9oxepKuW;!hefEUkIp!W` z-5MoNEI^3ch5;OZ3zIcI#+BNC;%AbqA<# zSvMJZl6&denvSTE@`ph6l_~YCci*lLL$c`4F|Umfxe5XV|5-Eh&zG-d)~q1i$?=_g zvGDcvyq?)uNyG|Wn zh-63pB)T1G2c~F>xE8Y0o++%Fu?WwPCR)u3z&H0kmJtI%aeIl7+!Z3kb)=0kh>Us1 zU0wPuSy-V{0p?lB!ko&O1myf~m$gNDVsTl>^6={x(j6yafme97fwyN|oNH%ctN2V) zWdJzsUAWB0hgZ)3nOS^|o%*=iuHiAt0bGM*b4b$yL?-G;UmR3f^iQ_&&!%%WHx9qB z`EL*eyklv@t&*D?r#=Gw)2|A|iktf>dya5+KI6y4S{^AVvw{e848e0%Jr= z(5qX+W0U%>oL2q%^JWJ8bz+tCxRAbdw{iUt^O>4PEUE6&)q>Hy*hIb`%&*7x-{pm3 zA4=TKNghfq62ff%FXqKTCDC$*@Zx9IjL#wBAXYJ3KIM#8)>$;r>vAu`_Qvoo(ym|u zSXJ_QzY?*R6Bu}k^3lrVUTA6U-&8Ttr{0g3+5#6$+i|`UH2{Y zHl~cXKI+gVdi|}Hedv(ttDe=v4$IGjVePTO)iPg&5ncR`v#Fr0du#M;?J z|BLsd=LotUX^IzikD02|(Og-D=+L+N(VDIa(RDP~8geX#wq!U6H_Llr(ci zFSlyP7c;}NLj4<0+0K}dmae!XV%mKqC~S0U3gKeZy_<@!dMj)vX|D>;l_albq~1&$ zLEcW{4GVxA>;qDW>3t{y_XchY*&DZmD9+ntXC+{voZE0acEi- zavJ0ix{u+fd%=*)87>hbUZD2lZy8Wqh9YdgV<;!A@g8q!`ar(Ql;nUQeKWGEjUk2i zWiOw{op8ilF$mW0+ywmn(ks>V%u7ULU8%XqpC5vg#SBi@R$5#JLEp&Z~ z?oA1-K2|~;$zdFBR^}JOL2}G?CfP%g#&CStVX{z7gr&`Sa$ux_z>D^flkVL@NK zg*ISwJ-v5s=H8QK`YiejJGMTAHN6fUk0&QU{t%S>f!WRf7ed%I#G49tNF=^`5Ik+M z{BhKxctDZxyBcLo(aFug2lnWuFoX*;6 zEUv1awg@@MsfZAmV)>}L_xwQDj1F~w82*mEWLiKtj_W3DH)zkTt&p&OEX?0dp#s~4 zktX&1k~A~W=R{Mx8}MN7RWC~)vf|tQY<9f<7iB)yUx?m;(gbsV>T|eemAgDmizNO# zDggoCg){r^#=87mAYu0{1*bfDCiGY0+m1G##nG3xqGyD^jdc`=DJSgp9aehqOU}p` zTGiKlX)?X8=~PBjh&~{g58V-y=A7%Db2`CvZ|()ZV5FS77~_)$g&$tIg@m9m#y{wiZHon-4qsM}%P(PiWBOBlg?q zy6&9w{8tZJz(*#XXW|q}R>;;wEmZ}QOl!^_zx2Ca)M(YR+}Pd@vgYPP=REWc@W@;0~Co^lvBLNr+IEOUSs~ z36K^Oir&LV6-e)2^+gAkaF?#(Q@K~{VfIAqICXDmnNpDx6S$#ac@6wErxku5=w}Z_ z#-XPz$d^vVYOrutuz3m&E{IndXpLDq{QaDhlc$uWQn`g%}Xk4fKt6$TOs#@)p zuoOG8`>aoncAeWwNLW_jq-D&8aFfOe4+)@710fQdVDvSXk5Laa=OKv_agngKKyWA= z^^-YG{4>)lwMMX#M%lL`pDEGd;ons8t-QSRwTv8x!btqVc<9S^Kb^BtB@+|6h>auz zs21#Z?7`6RXuJLz>H14a_FmJzA=t;&Rj$*6GKU9EoltHJrSw6#u+RWd3HDEfnwtS! z5ds}l(v-sEMXhJ^f0?{wKY2+mAi(IR#aXx3G~XUN-;m;OWEZgd;0+R4H~>4%Zq2+D zb>pnAQP$)EJB&rx2w$Ko5|qo8l9MtnQ$^i`Ztlt?4G~a$D9iG@A)P=3JDW6lt3cY` z2sIJCN^QjAzBYtcQ?0sn^l5tzQ;e{`*e1T1piGq*&H|yo5V1nHVwfrZj586uc}i(n zd7?giVt%w1S??XogX+%ojV{C~LXn30zSFDqvRNFC?8#s8ub%SadyYFXI!e(8b!%x* z)imF&CtIkR+*7t&RPrCDIHiQ(+}j=Ug=6ATLE{KK{xO6~ttYy%x0+X>r$UMvr7UoZ~q!&E)+E z3X7@-JH6`(vgLboBH)y~*5C8h|J>Z%T3yTf0~O_uaWAhO2iw{@HH}Wmh>LPPFpJN?@bAl!Tf62OnPF`m<4Va zm!%M zTIHsDNK2CibpP{jO@_c;n}j7Qo+j+SlFO6atB;h4kqNGnMuth>{xn~Y5jpLvDh8Ys zL?jPIcAJzFbQzjhmcOw3$f>cF>YCTa&Fz|BzoC-ldY+&d%5Cpw4GaT`itaV~UfN_fJYGZlR7-yn1WVp!I5Rx)q&@?cE%z+%;_=F0(LQl2uhjr=Vm zOLAHWQK}0pg07od4;D@xYDq-jczFok4a*2QQt!`oHqqHJotRirDUwTu}==8YyP?<^~(W zA&o^lZ;Onj(5Hxx=?^Z)x1`9wo^LpwKXclsICEWyF4opP#yxKd!jeu4!9WL2W1%&z zG&f$e2*P(H*VI;W)&;i2Xa#j#wNW&2l@*zJZ8p~pZbG7&HQm@C=U=hEBuKhk3=isf z>Ws!|C8_xyOTMa;NtJe_<~hkFu^@mNsM!juytu%tosp+;X1PqXHonC!$qP<-#n2A8av zc~ktlIY0W_27Vi+qkz0iY$I!(ZtOpw8A`7fGB+95%o+XuT>Jd#sBso=?O8hFJJrb@H1oF%tNc`ZY$zzQtp}Pv7U3&$>Xv7TqXO)XJ|nbGRw1W^F_*>I{quemBx+t-ng0(-d#<7gVgC4tZ>5(cSO z6NV&~P+x(a$e|eB zPDx&HqTY$_Kc{aZd01TE;xSrRzjgilL>n%GKOvcw7+ZpaqyybTgH-Zpcjx;gC(!V4 z|M$@}5R6FX^};I zYcG%6q{Xk))!%?_f;1g}WU1B5!oTvNcDU1OR-zfWaOt80=!;{v_uP@}tvRQp<7Yw3zwl{A=ZnJ+s?4nx=io5#<|y z^@qKu@@Z+z3uT}gLi>_Uk|*c5KgEQ8g}wPzpQ57_9bjQWT~{i7RKZTrX%RZY%U9At zVXmK#?}}_^a=iN`V;L_scF69%Q_j zQK_v?QUO0I5z+aPggucKYxGdSCpk zG%w3trbg4Z?1?4MwK-b6MMX&bc2+Og66l$AkMTbc3&>)$&`YdEsFdDt-48$9^acF(2r#4z#}_E%}1!s;Ho*^q`a;ZOse}W!^A-RN_2NT9;LJ zhap`7k8;*uDpXzulNg7}mG%4g`j5muyL)~;$zyVuo2|C~Q}%e@c@7Lhfu9$poTYjf z?uBrMSqd(UghO;19?(72sZF{3SKc9RvO%jk?svnM7~E)C<=&&nRAoyLz}+;I8|V7vZ(v>{UqC`Gkp8!*`MfzP2=mI*l#rbl0=2!-pNYN1GOU?ziL)L z#!#ly!tB^Iw3r5)3_}wACa`t?@}50KSYoMr`O+q7!X0tJzsrsL{iED;T@2&bhUM%8 zmTH(fN_#y=u0bXJt=d;w-zrY?-uxqi3wi4n6x^VG84}e8&^1T@#)S%|Q*^VJE3){H zw01$iA|+N@$kNBLLcHi|?hQ*f0)d+Ewa2i zfhWf96v*;soB+&=mP;_Rv*FydNf#9+q{i$Q2V(jntDvQywa`ODl>A!lyME=CBWw;)qA$)oTZ}Abi9m>$ZuG!KU&j^FhQzT0v8JE$BU0^tXAvf_U?; zrWZ8kE6*V*+K07<7H2~OeJvHreZ&C5HNuh-jwyvEqEHh|3FP4NI>DpU(v?q0*B&3X z6?|;P`D6Mf^YcS1#2M@MOVixxmn>A#1Sd|N)AN@NF~&29DEmE9l-KKT4-GL zD9oC*T)~8KBx5Jm^fgJS~P4 z+CYQZEv(UElrxmkvc8Uvb(V{6p30iZAx}fU1UyR)`Q`Bxp{fkVNi5CSjte@?Q!HZ> z&7xzKd!5i@PB>&TfBFwSPsDqbd4&U)gpquiVBL08<|x*U3pSOH{L~%+7U(S?haT>U zfo2kUP>peA+tN!bMi6EU5a<-}3J@8RvtRMz4v7ee6YvKF#ZUCon$*`n;YBr}Gq~oI|XRX4a!aG$9SfEx*1{DBXL* zG!j_WNFF0@PGN^gG4H%+WU0&ca12Q_jS|BeSiNTgah@9=hYJ(cACeEzA7(zaRQ3B5 zThZI^Nh!|?yBum56796uzzzi_;0c}K&1&*guYQzLLKu;h94Y#!*HTxi?B-py%H^PK za!eRv>Gs9zAEgb%)l|U(^R$2TNv5??5&4mFq138pzkEIDW!`HWWcOxS4x}7P~)=cJrb3`u5V-zamP7n2gt%dSth*YPyqbz5?u9p2*5B#Ih|3>-oJe z8Oq6I00pXZ&yl}`^fM!nEtdNsGrD0X8e0(^MGH%y3~MUIyoHfu(J^BpD~56t7*`KH zzlVcDi5z8#QqwBF5U|3>=Z}PE4&&6$bBA2cP$5&!t$fUf`ZlbcRtW`|4&*Od#wy2i#e=pI~k4^RlK%4Ngh5AHvhcmt#*H4WB;Ax@|tFHT#K8Rncadvt5;nw|#A>o4Z4M@L3~1QJ-VOzu=wu*VI|K z0@$zqIlW}8D!Nz!%#@#y@iRS46lTuJ=e??&_11!-G{*j*@|v0I@g}KYF3F`Ed*TQ7 zL+eguFcC_FD0t?sUu*tKP{JJr%{NQCbG42!SC{#VIU7EyR7vC`ySvnOwR^R-wyy*9 ztz|pqI0)f|i~@6!eQbpEejH-P=&nHf$p4=Om{D;EHj;FnVA<~Z`XZu&nk&B)wXBgx zx^=oSW9aF({t99y-xK&<5>bx-fiCMZJswb&=IE%s9PpvJ!N@YDK0>e;N9DbMrs(3n z$v@3MnA4pm9L6YxWKLFn{3aj2yBsv|A7f_uw~-pcmXQSk@0sV5juC;IgEPPaI8V*s zZ!DC3P0|IhQswha!yF?UYJ zG$Fs^nuNK75kyn!v#X_g8==;_?6A3QMWDEO5c#}jt3XJfJPg}zcd05&FKPA2;B_(# zPuy3EX~i+B5lXDGMG4#?K2kS~*Va&@>1vjO*voe(a+ z&hoQoL}o@<7wI(Bte%n^m@jn0N5-5J!T|6ERie+`)dJmpE0T0a(l%rafDTN?c%h&m zZN24pj_xf42?`h;M<%pJs)3ze>9I#LL%DKCXC{cn@^*1A{NCBZTn{&~*ld|qd%Vdp zlFp+Ms+;2rvPI(RsU!i9HH!^j0@pFD;nhcQhzg# zFdvkin8i}JeDgFu;VD|daQ=;(#xgwC*fY~x;DKlww7}EOwc2c~oX$@4Y&vPIGr|kJ z{w`Z2^#3MUL{pH>(Rw!T+N!k)PCFEliL5k(Llb|HPzcIzd}BvYtoi1s{r1XXdGm?$ zvzd?Ghx+H&a{x>_d47{vZ97N)R@)VXx}@}w#k>VtFuF8nLr2Dczw)t-A&J3;Dx1s+ z&{x(3VE*4c38xxRI?Ohjx;HX8d=49mIwaawU=-ATjq+tJg(LiSWKWLk?B$MkBu!XT z+U|4~PHY(U_N!j2=tKEAf>lj6l#$1h!YZ0XKm`yqkBAt`LoYkK^yaz=Exz8;`m?2S zrf!lYf9i9-`{!crLkx<|?_^VQykqdw3gNC!vy~TvphVO2;;ek zDV3&@yn!W#&z{uVWFPTMV_l~h$9>}CUbq{H*210}Pcc@hXuD3^lbcFX$OyZ`J`F}f z`s$>FO(-xr*-L417_Amj;whI?K%Vq5pbgg+Aij>h<@yf5YMY=g#tUs*1m3-($Y{G(MC+ci?wGDHF?6 zxIdmkw$Q)F@~3@>xh|HmVNSz#GUzRbSP2VTa-3oOVC!yp;+;fms7K&;YJ|XxChBVW z(_*^8-d*jxlqFw$p}ii=WT+=z%L?s!@u;AC{Vm%+$}Z=W{LN^M-|lJ9jgdq@^Zc#- z;OnlT#cx*0I|6oA<6&5EAa(@VD)e+bFAF(wAqRUP8#754f=X$I1vJqLL!o#K!NZR!+4lqpy#I zji7Ix0245k+#q7+Wsh7{W1?nFC`m#EnAdj}Y%ij*wfxDS*x!5GE6M3V=EW6X$DH={ zusx(^df6;c2%ibUwmwf`!r*d2%UZQ03bJHREEdw5x@kBhsonzcM|$d0!BjvKO+>OA zE_^H_K`(dxj2v~v##(UZe^j@6w+SYBS-rL*rBeKf#Z$q4kJsr~eHd9=%j-7^=PQYh z);{fW_iTyrKfo8qP?&PI<}T(>=ZGoSeVtT?_3}dNH~EXh&Wm@4_Re52af1@U2pMzCUS?;BwR>ox*)2ePcBH} zo$&Nj&ziYav3SH_Bwhd4hg5Or5LRspCo+0NbX&K{ky+kE<#Q*6<7jXIxh*`AR})L(|GBEB;nvh zcGzJ}RS@*+9a|OC!_nu~&M?llpNr-?WOu&|Mh?(Dpx z;UCk0XC;+Y;%E{^fhjeW`UrrgK&jrQl0Hp%oF-iN@Bw1w59+k9uUNf~@t&C2T5+t3 zZD*Tw$0Kp}SQ`$_+(CPU4L8@KOy0K<7I;wwbz?^Z)6Y%mzo+j>i!VKx?SJceGgo>c zKFlV2(~bAGxF`cV;4qmj@XTxe#8We6*OPoHuhoSfq|ymY7-|A3^)b_sc4Of%?gD1`8JcU-;0754UA8s$8N$viW3~%E$E4KPB=yCE zhg3ie6%uTET$8)U(lGmUvjuLyIyd>7`_0tBx(dQO#W(WptQ`4lYGr%;Kt>$H^yQ@n z{o_b%5gRah<6SufREMd1zle|TEOfcK&|rFV9eCUUj>6L_dul1^Eb|4AB&58Sm6T#K zLiQ*qv8Oe2n)&ByneTcKQtvhsmt&u^rC<4_=b zm?pimB_=OcKG3yK^<}?*r3!^L8d(b@{G!M~Q-`a-4or^jV0>BOrRQH%@#Fa7_VhG! z>1w2OJNOHbWF$dicZnX&f8PX%OGzU>U?5{^Q(p<_c}gV{{b1Ew@rRQ8aYbj|STL86_ zc0=0__Ercf+GDFCnsnQZNMKMcn-tiJRt+9-b^ivbi4uYrj}IS;QE>IaV?_PX(S$-@ zzWVL-@#mjEx!JGYfX1$2-~(OHy6N*@V;6;L=#v?4VZn5B67`0{eGJEO8|k|%1{$UduCFlW}Redp8M zRJBB3sxvLpNCW^|a5^k$Xo6-mSYoIhE8}~^y4cs9no%EfebDT*$?2(N zuU>Rvsmdw@h+*<1B{0~LBqEAUf%d~muq(1w-E} zy!4TwWvKOA(gP4m4%6h?%8)WVdq|~}0}uy~R4Xb~?qh-U4=X`o zbJ1pMhzwzSsmF`x*@o+gh%9-qUld&BQ*f}PA#Mq66eDW8I8ej7qDVVF!P)UX!@I(Y zp#ddFpJx>C(JHnBUBW~%c-*n#{7`2_9g@^mO)W<@G*Or&cn%=$@k=5BJ^EG+UVXAU zM=C&yG8y(5gy8WLBn0LT&RMRf^EtD=P_nT99#{jLRe0VOL;3cH~MZw6mp%0HgKp zzWoH2CdG#XgOBbYci1YBLEGR6M3Y1A4$loe@e3&<w>lG2TD*{&pI!Yq}$2hbbA zxLLlMHI5>I)`;PjpxBYAJ2O#85?;Tef@=c-hqB3D**A%plrIRBAK9P#-nF{;FWiqw zTTbr4VshUvEx?EZ^VZUG0NRSGP99Y%O5g78PCFs2W8I!RF8J=nqXjWwe2eH&;D6!O z?03CJ$DX($L&=}|ip!uwc`pWA0V%dIH^ME+J>(Ib`fNy!R+l!xPlDpT(SEyYoh#wp zp*vwQ)NM|CW)1qKiCJVJ)8 zwh5j`(bg`qrwtA5VSi5&jL#gu`0=NyImfJa>p`JZFeA^0eDUW?A3b*{`pXEXR2cew z@O-#$SsMy?o)P2{5jkb*|JQ67jeOcEBhm4aGkHghWS}u!5rG3f>k}xTXP&p6wHf;Ag`dr z%~I#i^CJ`96o@>MZ1s4{^fu8MIxqv&r=|I1wk07wq?idY$^zp;)LL|Y+Iv9@6bA48 z>%Q!gDrur|ZzbEa$mm1-*Q#XYk-hC29SS6fjd$ksb@xfYUfcL(grw8MEUlT2`Ez(B z-#2PQ5`o<2QXjy1UPH-GgIRw-I|DQoAt_25LcjAnyG=`cVcv1XSGdh@a0f6tVOSuT{mq(09+)sx{NQ;tKhu+C*6_R!Y_7T{hMdTW>O;}x z5PNJ6lTQA$V-F}ElcQ}}Dzg;&1oR?P+ij09M;6}xli|PwVY{8yDY1!se1MTG0_a*N zr9F;ETQ12C6%g+3{DCSb6Sz$-=UNB{2mQ#Gnh5#*q;3m9+*ElZrnm}zv=u}NE>FUy zrre)Q=zq-lV)-?lUU0(Cx&?Ph8;Z%ac>38?6}rUJiOn!R{;a950PwKYse3e?$}y7W zm#KDueWj*9`+5E#wgSF*ZGz=2wWHeRC-RB493N+_xHu6+l)%K((i1CLxa=OYy<@3n z_jRb*vC#E-0iUtS9(_)IKH%rccDW=K(-KuPPd1AsFIm1nnvLnQ3A(WREW|9=IHp?8c!s9((Jm*OwA+O*!ekXqu_{GLav68VYMrEOb&%~+4 z%`IOy(*)|1KkJ=(o%mHl4DW2|qZ{}ErdIx$^BZxzH}jQJw*buB#O*dePWz-nNserv z10zR3Q%DONh4c}Do&CK6P6-_y4d8twXb6xNi7H=#4o{vOLoPl>r56Wo%UC;_SN}5! zHL}4i$A&H^##X$hQD?H^Ob9czooBvxky*?HFwT7h0CD8ttwV!86nP5_KNq_ocw35S z;fG%g9A14%$$Z}HK;&ZOiHV=8FZI7Jzb z=N+1WuRv$jazfvHlHO`2ml;<^hY_wl)0prWXqQLMu z9a#xE^fgDNu+R+UaT9S#X#%_Q+EVQ{!4`qQVxG!_`evBt@;7glz~lqKh99)!%IsZP2fr#b5rA z{T~hTrqAzJxeY?E%w?f~0)AW~y}2`M!(t3tk*vV&BNC7WvZ4k{E89V#5Ttmd7FQ-o zD1=(?`&R%Y-*Pztu(y~?Qpt{S zh<(ZIQE1pdmC7qv>K#avoZ59v?!OM1bn^AB;3+5}%p1JxgJ-byg_=)9z<@omh}u#N zd;ZJs9zZqqU|+Xa7ul3T5UmH9roIwde=ASCskIrRfs|KpN)?GjqYBY2{XxF7ETa(0L4HcKJoxkql z&=4f~O*SlxbEr=Gt-kyAGS;Wod?7djr5_as(T{1m_|df1qQBL8%1;VTq&@pUIW$qX05a7oe^&;Yp2=)F_6=aTQ^GtLO2|)y z0m|l;f{14F!^lbIdrF--7(Z6{3!RrBhuUofV)U4KNZDodggsz-_lm|?ZYfT1G_;g3 zk|4?n_D`Kx4^9Z)3zgXVc~xOkb6OChz8;jg>n1fi7{M@a(I38IaIZms~a#s>rIKO>T>$7pNma(-W~WGmAWL=z6ky-TlmHnmYNHB$;Oq-d4aaWimtQ| zmF1FdnU(QNj)?(boCRfr>BmU4Mt&F=pay7l`HM69t!C_$#a4`ndncpChrw=QRJ6<* zmq!$}RcA|%Lybr~AD-!UAXQu52}SZXf{oPtpZDN-$((lNuxY)dHOv-Q@vMmjwkcw^ z5Bpn%!w1aDyU3>mstUp-W6B8Ye4(SPoui7#qugN6u*&E;*_|XVgn(%^H5aQ=jLO=A z&L7nJFL`UnY-Z?T{_@H4&1=ffA4NFN0i6xta&z%Cn-i~3s(K2gxy~LD!U*}*2@r}( zh)!Ms4m1ynX<|-EByXGY7)vT8Vdqcob=wFm02&8RnQhP*mrr`DIp=2fvmE_u$Qv;{ zdxheTe%D9yf9AR`nZA@=o!=5!0Ib1H{IKK6>O<05bvthVju86*pdne%Z(+{kAN?h; z;~OOeE9X;J?)&y;&K+q1opbtPAgRee{fDyz8t>(~jxsKy23xiNV4gkI4IbUQYNooj2>ATq&{ZPx`1Y*+#vJeNN`aK^pREOC`_)w~Z{YkodL4TS0cU^O9 zFF7&sp3(HxAS6Z0BO$4s2?>*zMtP_oLmF3aaL}Y_jXUrkWhl0~08SNvSoYp=pBiJC zeg!E)_a6mgi}2y(Fa=md7rAn;Qoz_cm5N2TI*s|^Po%F!(9(m#^q#b+@SW<^g|}im zGvl*oUtFF?q<36iUxF5eZoI!LZ_iwTL{KM8<&zX~?m+6TwOh{lrv^>IsChIJeifgv%Sx!81bJ-ylX-2>n|I*m~ zw;oTt{qF91KX%%^>#U~Te~n+09XKExJhXh8MddwxBCnyGLpEeJ3ee2hpVRt%}Foe%kd9sdCC2O?Rq!1VS+{|#HW69Gu({o`%| z+NZT0evU6{{oRftlxk*A6{>XMItn*3TCy2zIU2vb=)wL^vl1wvlZSwYclu#`oaLXP zMMkpSfb*>kUVV~~pIuwzr(f9Nin;E3PfH?7A4+|n>h&juZ9oWljPhrZcE0)Yx~C+t@H?!#x;q)x7$ zr_{dNcyaAJ;WKsugLF9&e2RYm#!_9Oq;0}J#J})CH3ncl`{Fg$h5^1oq_N$=+c@CId=$@1$bW6?1=?BM_&v=5*2LO8rCG8 zHW%3Hj6P!7MI5{7cYwuD|uyKs!E^uE92U zXW_!s(F4d?fErJUis~-IF_Yi8pZw#W%rAb>H?dj28xE(QD#gI#-!#vdt1bP=Z|S~! z=$Y>B?x?UY#eNxcQH@`?N4oPz%Mp};Pl(bFa|@lYO<515%br5;L}(z2g22S=ECn#2 zf9Jz>n%Y9$^asM(m8ULW_#zI}xz{djvZ<};paP`XV0)tZJ#R3^4q%h2c3RB>zZQcm z^5#pYpNE*%%*M0e#y(%)zu3~SwNxY8cI`O(3#gA4*ogsT!3pSg7Um(>1JAl~TU1u~pC~kp>mES2t+qyBi|)bsQLR#M_QO6gQ#>#ZmmeRq zhh*x?=Bh@Ot*|$=Z9Xu_A$gW#Iga*)s!x)jp2a74Io?nC{X)&}vs^SGTW_?dPGmCL zhVhHWRo$mK`*^(Dq<5Vqy{4XpQhZPMb$;j$n=beDeNB7tC4P-v7JAE$!TDSzs= z`2B#2w)d_S6Qq>VXSXOc@$u}tm2XmkY~OmfG!x)^0?ms`Ro(mls1}dQ#W+u<0P!lt&3+0V`_apc0a=(y$Kq;!- zRJnJ*R2}$Qkf;%tDjnmMxCHK5^X)*#~Aj#r4RVhy|)#3&YbR**Z^5JOt7} zv*3@1LY@`TgM4r(^pTO)v2&}2-CJ!ft)+t87t&1AYD|*ypJdN-X&`;%k$=`#t-hg$ zQr$ZABWzz{y-#&+0?3-YWcgqG&Y*Za1e$v4&k`B6`t1ExlZnN)0Tp4A#&`7&i*iNe zkVer1F}zBduNm{cl3x;xa=AtO-kCGiW~N3|XX}O}x-ZB+;sIDYwuB5#SmDsO>moFXg9u=V%|MJb6lJ=yP>Mf79lErNOEY;TKhm`$8w$y zqPf>vXyg9g(tgzf7z*=b&DPMAz_X;`cYV$K%PlxK!`RIo-76}7Dv9L4yv_!IX^a>R%hm$NsN`^A2b0@xpkG8mT>6wW%G{-jtw-tpsUR z%%Vo?Yu7BXT3fWLN{m`bt(dh(shJvW(4uOKJzD#BJ->hRJjuu%LJtH~HxI8!>?@L%=ny~xqaHvp2W_XjW>2{&7Y%l*J#%GzQ>JxOA-c^Gu z{qpWE9@%oce;a*@5pgp@-;gcYB7MSBnC5(w@A3WF&eU8TelW=zMYU9 z6lrKO#d9BQr*x9*x@{ts9Fxb?wsq#ZA>hXJIh87PU zc6R7L%#ur>F(A1h*ojb_$2+ z@AH-H`JDT2SN@Hn!=8Gpv3}=KR8V}m7!rJV*nk+-HXRZLlYn=fPI6-F9R$u|JmZBx zgNIsflXP&0j`b2epl5%tE+=s4SGW%>Z*w#%<|H9!aEKi5+M#;lCf1Ni|>YyIE0S4NY=D zS8kF@rskvNysp6Zh`{x_bO$S5jdCF-7HGrI_<)^;IP4~{B~iSOUw4qibWRqXJ0Id# z5GAbE!?PWy-YU!rQwWJ-A>b6wXZ3z3=7h7V8O~Tfyr2jtrxVzJR$=@jdZtn>d0Svd zq_*4ipP1Uw;(y{?{?+~>at)OxH?PeY@VD{xm)O`#{94kf z5^i9^97Uw{QzndGurw)FRXn{tq~aNvG~y;Q z4Bd<4%>KDm9-uWqSR>nS&q#Og1HPjuB6CsbjhX(TzZ3zI53f1tvv0SnKdX>#%9}+T z%unopIuSivPZMT@%g5fdg8g_Op%jfW_`S{=K9dr09Y~VJ;oFX2_~}m{0;2IX{-ZP$ zd{X5%;Y?L$Om%m)!9EmYiAR+bGP3-RK8PQCy5fc1b#HR1DT#Hjs!_(#E9iEO8$V_* zcw1CXTScB7t0vg1|5e;iRUtev`Nev4e(>FSj5ot%@4411idS19^UrrK;(kea=3)tV zA-qpy-68CZT)SIv8Brj=e$EUJ$g?_X!})q1WB#r4ZFJevK9oTQ06C?R-v1D}bzeH} zwEyE)rW*)NMte!MXsm<!!i%!!rkxqG9px%!Df&C**wHLp$nFx|enw zWh;yo^sy;EjS8Mp-nhD1&%=x8ybE^8&s)NH8D}|a(qFt(zV&hcW(_X5AYeK;1>*3o z+c78cjDv%aoTDRNfUp#==^|JdD(A$%o zxSNPWdbeW-L4HEUHM5lH+`vbGpv3S{`O;s+ztXv_^0W7uN~p(Y2}XD<`zkHIATEMa zVS_(t8L5nk@!R*kqi$$+%8Lu3#Bp}4&)`9ERx)4#@jYdNEnPs!&HRrTi;A?+9|n6a z{u1Yr*{K!u95n6!ek(e39}?qyU@~lryOyt_d}JSldg$^H!i?R+mIiX>XDNA{D$RkN z^eHS@DLKr5d5dDOCkwOssdi6Cvf6>yfA%kN+U< zSSbYz={K%?2Rodp9DDIOc38`>F~Bcu=dS;(@NT@}eLBT6o+C%gZY+Z=-~F!?M^tFz z_~I`^zh-_I-k{wfxFBRcGOy3;8$EQ4j?Whp@xD{b*_^6UUi2+hk!-3(>)fV`r_#l4 z_3W9XA9j(F2|rrOSkcX;_=tvC*qQDZoQC2`1T4KB^jpz8>IKh%fu#~(2HM_Nduzoxm;GN&!IZ|+EaffQ_^|q_n z2JN0*y;gH^)9tGihmzmrFRXk#^p$mzPh{LD?vJgCw)sJS&x4<>U$^d-z1v=h(;A=u zwwTHPg8K+=B-s|2o)=XSx6H>xA}%BvTAKcm>vE`MR(xSLHvR2T$4~P|Bo$G%tE6>| z=X3#RoQ~0(mNeykmolH`jpU5q1$TL#$TKp+>*8)E)i&=xq3@8NJC*jkIU%8dbd<%V zObJ9lYfBoe$4scO>zOctst{q^BMophh~p#XKna|9w;|eY(b=?{v&h86N>fkM_qy%7E$cr*Cn+LRFpr{Nppi$!R=%qL*C{7f}rMUp0|8t;_~t zn3&-GTOAy=bI29@Gaj{z?Ukv^z&Fj=F0(Q=oSyIGEoGHWu)#Yb#qN%l4CfAl8HPi$ zc(qJSom9zZ_fp-r&;0k?sa<*@G-FTtFN(w;h&(+gO&Y4Hftoz7S0bP|iLoA{C>6BR zH%?NC7mLlbu1(2Y=9_09(kkQ`UCsQ=X`*M&8}T)-zQ!KKJAXr-KV)LTbU@XrX^geM z3uqNMz1EE<0YMD0T_Ivv5G(Ba>W2$#I51nk|5oGh_xrGB_)}R76L!?%OAHwNowgW{ z6xjFErwb??Tj$4z+<@Ahm7cz(hrIfc70gR;=nWx{vf4;Zn~o<sYZUL0(4bGmmRmkINA(#GDWcYx)4bV395+sDcX+AUoe~laxz8gPr~Po`5Ek+q^&R%<1^0Pt7SmCrJ5+!`(Q15KgX~3G+U(!+q4HRsJC(MCQw;lPke!OV4!%^h~TzfPCS*wZTRo1 zg}v8AW&!jK3GFZG@d3v_H6t#QNI)-GAYd*Qd22Z8wCW&={r9(01~?$-jC3WBE?lPR zRIP9k-E}EM!RjMogMT+I^d;TCWjExIX9e7~XLAwa$0>ycsV|1XFzWs9$KERuMBlT| z#AQr;DV)lVIwFaI4w65dZ6Ee$2JOKi7571gG&3h!V8E1>I=^&{Qq{NvG1!a%!Vn9X zuGz`!66R0+3jG56EJOk&<9w|ttJOa1-$G}blc_>&%mwOWRch^&M%pq|oq>8M3J}W{ z4g9!}TORrolEbCul5(1=)Yl~NxG#$W%dyL$dm1rWD6Ow*K8Yw0@m1EB3Rav4jks!3 z(l%o$uJN<#E?05;b5%mGY3K{G-g-?SV>2YmP5F8Bl5bX-9DaOKw)uM7>ZJ+vpLCI* z{^ip2IAq@)&{|ch&2)|1*Mt&oQYKaT$h_f6#INVz%gL%du2v!jflds&-B1h#6b?xz zU#zsys2~<`p3Z8Xnm=+VWJWKI8*8{_hrw82x?=?CDhnZ|IU|pM8WSuv>Xcl&^=BoePIg9Azo-uskyy4=n?ZwCv7pbJ^gkG97x|#YW(|J! zcD>@shD;b&6rdwvs-VW*RYvH7+FFP0=T*X5@PjVPUL?0~;xbwQv1C;Px`u`He8Tw2 zO2Llv$3Qu^h7X%PLgD@tFcA_=96oOvRczq)5DO$s}s=EyC@VM2tDUvh)8k&-qJ07c8H2sEdE zuk_EJl^6FBZ`Dsc2+HUbW5tBbARXLBnBLb~`21!v$Abd4&iuQT5^a?|2DHmle{t6_XD6Gjil_^}&-<;Y=>zdHjB9ncs_{0RFsaJ8Zt=02c(Q(-?u zW{q|}j_oYuhumU-pEJRc^7YEGM8~o(_RQs&gN=V0Qucf5f+J#6+Cl+oE`gbYqknJ^ z8RP&sMI*_~j_Y`9WX^g11gBQTzr)B#G~bNGuLlC#ASk6_F|lkukQ0`GfcDkavx_{j zOU*=aQkFa0nRPLyzX+B=f?QZ%W|nrQS7f9L)9AP%y9ZX8_Yc)$VC^qqAk2rDta40` zW^h=2PKC<5$pMvWElV$NbG-!&lny_z zO=}4w6SOHFf6z0p<<>MKMox;FI4ysf1;Vh4Vy8P2hZ_>$1(!fK_^jCweM3vs5wAvL zrnkE@pi&#=!~2j{uA@A?GaApXgdZTQfVxfI1XhUOn4QI4^GRU*Lwq8-G>{4tJQFpW zgciEk!h>Qumg8OA^1E-7!(dDq86P_2J0%NN$;V;vTK8< z@<*oo7HSKW31sVB0No+|X$Kuf-)-_1Y;mj1pOFq+8|;uhN(Q8L2UF`>d2Qg6q5aGu zf7a0+6gR&rM=9r_LJ>NetyjRMH5=Ibt&btpHtNLNz|4(`buWg31t?!IsF6|t)S9Kc z(x;eoyxmrz454o#VbkIhyJjFCatUA(ZHlD)K3klSn1e zI<6;auNwCGDBtXa)&X@Jw(x-pn>f4|wKxtU%eoGS*s|8NN*i4a9+azNR_{zy#l0oF z!vH^w%;Erkr{E24;G`Vo5h>#!$}9?rUo?xk)g=hj*CsX_wCSKwS~*|>tO9*{0f3r- zh#qf-+4G+SS)}Xf@j|WSzhO-@=78!*Y6YiZ*;?B=%A)Z4JT;wM{f9>gQVlK4wHt1e zz?{95{$k@AaFiNNu!(~-t#0#&cWqE}7*6*4C=Jf5ftsVAN}_~$K&*FoU4#=>mIDn@ zgBY5VjKuDKM;&ck5XTcqvm7Zb?s`DAzUpK&SoOHtmGX{=Jp}`q>i%z&Ope@NxqzynJ6o2f~&WJeOU28p#| z>66`WnX{ev37gs~A$}pQ8o``>zf>33ZJH|E0{fXg*2V`iQO7#2_b_Je$3no@ya9iV zxPBd(E==&PT2bt>XimFdhVVfUc8V%F!i#Ald4p(dicyMWhs@cODV(?XX~&;l(W886 zt;U1=NWoOFE}9~;sfF5winy;OTU9c{zkmOsLc7R3AZma=h_VRCN_p340@y0Ye3$Dm z7EEKT)9)dLJXSKTlum#_r0v&YYA9YxsFA!zb6fuL3r+|)G*L%Stpcp~CQUbn(T24X zN+q7Ipp*U}u||x6(rYMT2t|%uR)zkYH$Wo#-3jNjYMCgj1YGVGVl>n0arT!<)hhxV zAAW$OLd+(C-Q9_=Ifi(2p;)0NE>J$Uwe-pgc2|qx5amnFSC;=k5xT zidFlE$|A+Q>qrdz<=LLsNwcWUC!S|z^C0dK5u-mT-s25$!={7U=ZTXTFFSEEhl`!-i!HFOOdO{21*-x=|a#{C}*_iJ83bk2(d{JyF$XPlVH2p0wmEkoy@#CNGq0+5%I) zhvvH$vCTh?AtL0gGlu$+sL-HaGN;(1D#wP89ZaMBIZ-GDH=2UIA9T)F?c5Nb=0(ZP zsw)zrA@_glY$^8YmXU&Ujqg1@>b)Aix-J(5_7Q1|meGQgs*u5yx%G8@KcgD5H}V3TFQPM z2~aY?rTM;N!OF0z*bm<4f$$^;K3Jtqd&f3=jA>J^%UC?_y@ieFM^4D#*WbW%IxlOw zVeAqlOHT&uaVui0pu)i~v+U=)5%ZYn`pezX}N+ugybF%kv3V-0NAu0sF{Z%hx3<NU#x(FsK3Y@!v`1AGnE*(cmU;zKgpEXPLOjPD0H}tp{32 zpVXRGH13g!yq-Ck-y8VC__N1}#{|oO?G2pj@6-IDv_T3?q?xeq$!g5^!w^X5AU(J^ z8FIHTmGTB|5MSkYw9qxJ+iKXsDlJXgwGD#MQLE&$gtwU9QoThcO?_!)^K<~`Tm4koPmUSY z`{rVd%8jSCW_Zlf_FMm&N*Dv21P>TCi5ByE&ruExH$YfZFgkd3`_z0#s~9CJG4_Nb zYgF(+@}fw}b?mjpf58rDOSh;`v1lVHR;orqJuQ88OxJ*d%#SBh&k`MVTD7uDTBg`zJVN;0hM>$j|C5?oB>6BR&T8F3gkN=oTJ*BvXn*Foc;|cQf$U zOtazok44O!v-Qj;yrz9Q@ zEKS<@*uU6Y8AMu8<|K*YnqOfPg4xPz4(^waA~fCB4l%KkRFt1F7;;R{-PX?Fi{0f` zQuGp*zw)r)r$gksI2p_U^2h>p3ZeucXpZ{p{v7M$Vwo^V zb#!Doj^D|=dTnm>p5HH+k!C`B@_WAnJ+I>H(YD@?)*c8g^ZEC`Aspql{M@@mj<$N} zc8s_#<;Fs7M^$>{!TNH$wGkq`M9cP%@2^aE)`k4M%aR6HkxKe2(t*cb>LHzFH2p-o z!th%MBU>S_!yZfFRu>pZEYYw2Ralq_x`^I-L-UlUW_d3BFe!xv@$HgLeQk9sYwWCG zNbt7#5=7QMPE5h&;D#HXK*u^BY!^29sPlQQYPtBgTYdg*zDxmKWTrLaUOh!xIR##I z)mdnF$@dm|{^jf!ucv3#f~3fC2@$*}gOBahPr`cZe*oHI{oHZvf1aW5YeOe|On5}f z%KXxq_syR7G_G*B`I)HLuCYpcj7k5(R#j0gc^{$fF8rFyBvJnoWYCk#_2z^_t|*kz zg}TYExK{nC4r4QK-%y%@aD>lowXq$)h^dP5JNERZP|L5fp@Jz~YE1)a-1B$yD&;Ybu*w9c)ks8j#itBb)$F+~ewTgI!1AX4W`cUtdZZu&hkhgp znZ#ZJL_!t?#H&j`tI#XNz@`lf^PN_w&D&Fe7W4sLOhLW1s@UnYAtG#FrZw@s8hhRF zx8kg^IHY6QIF$C%jEdYu;sbsgt!po34s+JFVgqiZv)lku*h2U4(0wTrR{eW2HuigW zUf9lhpQqO{vl%h)PJA}OhA6IpQYE;q@H0dT_C-$e07%oIKVN}FYq_&Dnb+{954QC7 z;|Q9o9s=#^QwGG}2xqQMW*7El=-pdjl`M^elRI+}ql!&u_aYizM;>m>!2t66H3MA} Kolg+N%l`o+7h|OW literal 0 HcmV?d00001 diff --git a/product_rental_bookings/static/src/css/backend.css b/product_rental_bookings/static/src/css/backend.css new file mode 100755 index 0000000..2eba7d4 --- /dev/null +++ b/product_rental_bookings/static/src/css/backend.css @@ -0,0 +1,4 @@ +.model-body-sign .canvas-container{ + border: 2px dotted #999999; + margin: 0 auto; +} \ No newline at end of file diff --git a/product_rental_bookings/static/src/css/fullcalendar.css b/product_rental_bookings/static/src/css/fullcalendar.css new file mode 100755 index 0000000..d28f527 --- /dev/null +++ b/product_rental_bookings/static/src/css/fullcalendar.css @@ -0,0 +1,1403 @@ +/*! + * FullCalendar v3.0.1 Stylesheet + * Docs & License: http://fullcalendar.io/ + * (c) 2016 Adam Shaw + */ + + +.fc { + direction: ltr; + text-align: left; +} + +.fc-rtl { + text-align: right; +} + +body .fc { /* extra precedence to overcome jqui */ + font-size: 1em; +} + + +/* Colors +--------------------------------------------------------------------------------------------------*/ + +.fc-unthemed th, +.fc-unthemed td, +.fc-unthemed thead, +.fc-unthemed tbody, +.fc-unthemed .fc-divider, +.fc-unthemed .fc-row, +.fc-unthemed .fc-content, /* for gutter border */ +.fc-unthemed .fc-popover, +.fc-unthemed .fc-list-view, +.fc-unthemed .fc-list-heading td { + border-color: #ddd; +} + +.fc-unthemed .fc-popover { + background-color: #fff; +} + +.fc-unthemed .fc-divider, +.fc-unthemed .fc-popover .fc-header, +.fc-unthemed .fc-list-heading td { + background: #eee; +} + +.fc-unthemed .fc-popover .fc-header .fc-close { + color: #666; +} + +.fc-unthemed .fc-today { + background: #fcf8e3; +} + +.fc-highlight { /* when user is selecting cells */ + background: #bce8f1; + opacity: .3; +} + +.fc-bgevent { /* default look for background events */ + background: rgb(143, 223, 130); + opacity: .3; +} + +.fc-nonbusiness { /* default look for non-business-hours areas */ + /* will inherit .fc-bgevent's styles */ + background: #d7d7d7; +} + + +/* Icons (inline elements with styled text that mock arrow icons) +--------------------------------------------------------------------------------------------------*/ + +.fc-icon { + display: inline-block; + height: 1em; + line-height: 1em; + font-size: 1em; + text-align: center; + overflow: hidden; + font-family: "Courier New", Courier, monospace; + + /* don't allow browser text-selection */ + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + } + +/* +Acceptable font-family overrides for individual icons: + "Arial", sans-serif + "Times New Roman", serif + +NOTE: use percentage font sizes or else old IE chokes +*/ + +.fc-icon:after { + position: relative; +} + +.fc-icon-left-single-arrow:after { + content: "\02794"; + font-weight: bold; + font-size: 200%; + top: -7%; +} + + +.fc-icon-right-single-arrow:after { + content: "\02794"; + font-weight: bold; + font-size: 200%; + top: -7%; +} + +.fc-icon-left-double-arrow:after { + content: "\000AB"; + font-size: 160%; + top: -7%; +} + +.fc-icon-right-double-arrow:after { + content: "\000BB"; + font-size: 160%; + top: -7%; +} + +.fc-icon-left-triangle:after { + content: "\25C4"; + font-size: 125%; + top: 3%; +} + +.fc-icon-right-triangle:after { + content: "\25BA"; + font-size: 125%; + top: 3%; +} + +.fc-icon-down-triangle:after { + content: "\25BC"; + font-size: 125%; + top: 2%; +} + +.fc-icon-x:after { + content: "\000D7"; + font-size: 200%; + top: 6%; +} + + +/* Buttons (styled "+(this.isRTL?"":this.renderHeadIntroHtml())+this.renderHeadDateCellsHtml()+(this.isRTL?this.renderHeadIntroHtml():"")+""},renderHeadDateCellsHtml:function(){var t,e,n=[];for(t=0;t1?' colspan="'+e+'"':"")+(n?" "+n:"")+">"+(r?i.buildGotoAnchorHtml({date:t,forceOff:this.rowCnt>1||1===this.colCnt},o):o)+""},renderBgTrHtml:function(t){return""+(this.isRTL?"":this.renderBgIntroHtml(t))+this.renderBgCellsHtml(t)+(this.isRTL?this.renderBgIntroHtml(t):"")+""},renderBgIntroHtml:function(t){return this.renderIntroHtml()},renderBgCellsHtml:function(t){var e,n,i=[];for(e=0;e"},renderIntroHtml:function(){},bookendCells:function(t){var e=this.renderIntroHtml();e&&(this.isRTL?t.append(e):t.prepend(e))}},De=Zt.DayGrid=be.extend(Ee,{numbersVisible:!1,bottomCoordPadding:0,rowEls:null,cellEls:null,helperEls:null,rowCoordCache:null,colCoordCache:null,renderDates:function(t){var e,n,i=this.view,r=this.rowCnt,s=this.colCnt,o="";for(e=0;e
s are globally styled */ + border-color: transparent; + + /* don't put a border between events and/or the day number */ + border-bottom: 0; +} + +.fc-row .fc-content-skeleton tbody td, /* cells with events inside (so NOT the day number cell) */ +.fc-row .fc-helper-skeleton tbody td { + /* don't put a border between event cells */ + border-top: 0; +} + + +/* Scrolling Container +--------------------------------------------------------------------------------------------------*/ + +.fc-scroller { + -webkit-overflow-scrolling: touch; +} + +/* TODO: move to agenda/basic */ +.fc-scroller > .fc-day-grid, +.fc-scroller > .fc-time-grid { + position: relative; /* re-scope all positions */ + width: 100%; /* hack to force re-sizing this inner element when scrollbars appear/disappear */ +} + + +/* Global Event Styles +--------------------------------------------------------------------------------------------------*/ + +.fc-event { + position: relative; /* for resize handle and other inner positioning */ + display: block; /* make the tag block */ + font-size: .85em; + line-height: 1.3; + border-radius: 3px; + border: 1px solid #3a87ad; /* default BORDER color */ + font-weight: normal; /* undo jqui's ui-widget-header bold */ +} + +.fc-event, +.fc-event-dot { + background-color: #3a87ad; /* default BACKGROUND color */ +} + +/* overpower some of bootstrap's and jqui's styles on tags */ +.fc-event, +.fc-event:hover, +.ui-widget .fc-event { + color: #fff; /* default TEXT color */ + text-decoration: none; /* if has an href */ +} + +.fc-event[href], +.fc-event.fc-draggable { + cursor: pointer; /* give events with links and draggable events a hand mouse pointer */ +} + +.fc-not-allowed, /* causes a "warning" cursor. applied on body */ +.fc-not-allowed .fc-event { /* to override an event's custom cursor */ + cursor: not-allowed; +} + +.fc-event .fc-bg { /* the generic .fc-bg already does position */ + z-index: 1; + background: #fff; + opacity: .25; +} + +.fc-event .fc-content { + position: relative; + z-index: 2; +} + +/* resizer (cursor AND touch devices) */ + +.fc-event .fc-resizer { + position: absolute; + z-index: 4; +} + +/* resizer (touch devices) */ + +.fc-event .fc-resizer { + display: none; +} + +.fc-event.fc-allow-mouse-resize .fc-resizer, +.fc-event.fc-selected .fc-resizer { + /* only show when hovering or selected (with touch) */ + display: block; +} + +/* hit area */ + +.fc-event.fc-selected .fc-resizer:before { + /* 40x40 touch area */ + content: ""; + position: absolute; + z-index: 9999; /* user of this util can scope within a lower z-index */ + top: 50%; + left: 50%; + width: 40px; + height: 40px; + margin-left: -20px; + margin-top: -20px; +} + + +/* Event Selection (only for touch devices) +--------------------------------------------------------------------------------------------------*/ + +.fc-event.fc-selected { + z-index: 9999 !important; /* overcomes inline z-index */ + box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); +} + +.fc-event.fc-selected.fc-dragging { + box-shadow: 0 2px 7px rgba(0, 0, 0, 0.3); +} + + +/* Horizontal Events +--------------------------------------------------------------------------------------------------*/ + +/* bigger touch area when selected */ +.fc-h-event.fc-selected:before { + content: ""; + position: absolute; + z-index: 3; /* below resizers */ + top: -10px; + bottom: -10px; + left: 0; + right: 0; +} + +/* events that are continuing to/from another week. kill rounded corners and butt up against edge */ + +.fc-ltr .fc-h-event.fc-not-start, +.fc-rtl .fc-h-event.fc-not-end { + margin-left: 0; + border-left-width: 0; + padding-left: 1px; /* replace the border with padding */ + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} + +.fc-ltr .fc-h-event.fc-not-end, +.fc-rtl .fc-h-event.fc-not-start { + margin-right: 0; + border-right-width: 0; + padding-right: 1px; /* replace the border with padding */ + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} + +/* resizer (cursor AND touch devices) */ + +/* left resizer */ +.fc-ltr .fc-h-event .fc-start-resizer, +.fc-rtl .fc-h-event .fc-end-resizer { + cursor: w-resize; + left: -1px; /* overcome border */ +} + +/* right resizer */ +.fc-ltr .fc-h-event .fc-end-resizer, +.fc-rtl .fc-h-event .fc-start-resizer { + cursor: e-resize; + right: -1px; /* overcome border */ +} + +/* resizer (mouse devices) */ + +.fc-h-event.fc-allow-mouse-resize .fc-resizer { + width: 7px; + top: -1px; /* overcome top border */ + bottom: -1px; /* overcome bottom border */ +} + +/* resizer (touch devices) */ + +.fc-h-event.fc-selected .fc-resizer { + /* 8x8 little dot */ + border-radius: 4px; + border-width: 1px; + width: 6px; + height: 6px; + border-style: solid; + border-color: inherit; + background: #fff; + /* vertically center */ + top: 50%; + margin-top: -4px; +} + +/* left resizer */ +.fc-ltr .fc-h-event.fc-selected .fc-start-resizer, +.fc-rtl .fc-h-event.fc-selected .fc-end-resizer { + margin-left: -4px; /* centers the 8x8 dot on the left edge */ +} + +/* right resizer */ +.fc-ltr .fc-h-event.fc-selected .fc-end-resizer, +.fc-rtl .fc-h-event.fc-selected .fc-start-resizer { + margin-right: -4px; /* centers the 8x8 dot on the right edge */ +} + + +/* DayGrid events +---------------------------------------------------------------------------------------------------- +We use the full "fc-day-grid-event" class instead of using descendants because the event won't +be a descendant of the grid when it is being dragged. +*/ + +.fc-day-grid-event { + margin: 1px 2px 0; /* spacing between events and edges */ + padding: 0 1px; +} + +tr:first-child > td > .fc-day-grid-event { + margin-top: 2px; /* a little bit more space before the first event */ +} + +.fc-day-grid-event.fc-selected:after { + content: ""; + position: absolute; + z-index: 1; /* same z-index as fc-bg, behind text */ + /* overcome the borders */ + top: -1px; + right: -1px; + bottom: -1px; + left: -1px; + /* darkening effect */ + background: #000; + opacity: .25; +} + +.fc-day-grid-event .fc-content { /* force events to be one-line tall */ + white-space: nowrap; + overflow: hidden; +} + +.fc-day-grid-event .fc-time { + font-weight: bold; +} + +/* resizer (cursor devices) */ + +/* left resizer */ +.fc-ltr .fc-day-grid-event.fc-allow-mouse-resize .fc-start-resizer, +.fc-rtl .fc-day-grid-event.fc-allow-mouse-resize .fc-end-resizer { + margin-left: -2px; /* to the day cell's edge */ +} + +/* right resizer */ +.fc-ltr .fc-day-grid-event.fc-allow-mouse-resize .fc-end-resizer, +.fc-rtl .fc-day-grid-event.fc-allow-mouse-resize .fc-start-resizer { + margin-right: -2px; /* to the day cell's edge */ +} + + +/* Event Limiting +--------------------------------------------------------------------------------------------------*/ + +/* "more" link that represents hidden events */ + +a.fc-more { + margin: 1px 3px; + font-size: .85em; + cursor: pointer; + text-decoration: none; +} + +a.fc-more:hover { + text-decoration: underline; +} + +.fc-limited { /* rows and cells that are hidden because of a "more" link */ + display: none; +} + +/* popover that appears when "more" link is clicked */ + +.fc-day-grid .fc-row { + z-index: 1; /* make the "more" popover one higher than this */ +} + +.fc-more-popover { + z-index: 2; + width: 220px; +} + +.fc-more-popover .fc-event-container { + padding: 10px; +} + + +/* Now Indicator +--------------------------------------------------------------------------------------------------*/ + +.fc-now-indicator { + position: absolute; + border: 0 solid red; +} + + +/* Utilities +--------------------------------------------------------------------------------------------------*/ + +.fc-unselectable { + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + -webkit-touch-callout: none; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); +} + + + +/* Toolbar +--------------------------------------------------------------------------------------------------*/ + +.fc-toolbar { + text-align: center; + margin-bottom: 1em; +} + +.fc-toolbar .fc-left { + float: left; +} + +.fc-toolbar .fc-right { + float: right; +} + +.fc-toolbar .fc-center { + display: inline-block; +} + +/* the things within each left/right/center section */ +.fc .fc-toolbar > * > * { /* extra precedence to override button border margins */ + float: left; + margin-left: .75em; +} + +/* the first thing within each left/center/right section */ +.fc .fc-toolbar > * > :first-child { /* extra precedence to override button border margins */ + margin-left: 0; +} + +/* title text */ + +.fc-toolbar h2 { + margin: 0; +} + +/* button layering (for border precedence) */ + +.fc-toolbar button { + position: relative; +} + +.fc-toolbar .fc-state-hover, +.fc-toolbar .ui-state-hover { + z-index: 2; +} + +.fc-toolbar .fc-state-down { + z-index: 3; +} + +.fc-toolbar .fc-state-active, +.fc-toolbar .ui-state-active { + z-index: 4; +} + +.fc-toolbar button:focus { + z-index: 5; +} + + +/* View Structure +--------------------------------------------------------------------------------------------------*/ + +/* undo twitter bootstrap's box-sizing rules. normalizes positioning techniques */ +/* don't do this for the toolbar because we'll want bootstrap to style those buttons as some pt */ +.fc-view-container *, +.fc-view-container *:before, +.fc-view-container *:after { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; +} + +.fc-view, /* scope positioning and z-index's for everything within the view */ +.fc-view > table { /* so dragged elements can be above the view's main element */ + position: relative; + z-index: 1; +} + + + +/* BasicView +--------------------------------------------------------------------------------------------------*/ + +/* day row structure */ + +.fc-basicWeek-view .fc-content-skeleton, +.fc-basicDay-view .fc-content-skeleton { + /* there may be week numbers in these views, so no padding-top */ + padding-bottom: 1em; /* ensure a space at bottom of cell for user selecting/clicking */ +} + +.fc-basic-view .fc-body .fc-row { + min-height: 4em; /* ensure that all rows are at least this tall */ +} + +/* a "rigid" row will take up a constant amount of height because content-skeleton is absolute */ + +.fc-row.fc-rigid { + overflow: hidden; +} + +.fc-row.fc-rigid .fc-content-skeleton { + position: absolute; + top: 0; + left: 0; + right: 0; +} + +/* week and day number styling */ + +.fc-day-top.fc-other-month { + opacity: 0.3; +} + +.fc-basic-view .fc-week-number, +.fc-basic-view .fc-day-number { + padding: 2px; +} + +.fc-basic-view th.fc-week-number, +.fc-basic-view th.fc-day-number { + padding: 0 2px; /* column headers can't have as much v space */ +} + +.fc-ltr .fc-basic-view .fc-day-top .fc-day-number { float: right; } +.fc-rtl .fc-basic-view .fc-day-top .fc-day-number { float: left; } + +.fc-ltr .fc-basic-view .fc-day-top .fc-week-number { float: left; border-radius: 0 0 3px 0; } +.fc-rtl .fc-basic-view .fc-day-top .fc-week-number { float: right; border-radius: 0 0 0 3px; } + +.fc-basic-view .fc-day-top .fc-week-number { + min-width: 1.5em; + text-align: center; + background-color: #f2f2f2; + color: #808080; +} + +/* when week/day number have own column */ + +.fc-basic-view td.fc-week-number { + text-align: center; +} + +.fc-basic-view td.fc-week-number > * { + /* work around the way we do column resizing and ensure a minimum width */ + display: inline-block; + min-width: 1.25em; +} + + +/* AgendaView all-day area +--------------------------------------------------------------------------------------------------*/ + +.fc-agenda-view .fc-day-grid { + position: relative; + z-index: 2; /* so the "more.." popover will be over the time grid */ +} + +.fc-agenda-view .fc-day-grid .fc-row { + min-height: 3em; /* all-day section will never get shorter than this */ +} + +.fc-agenda-view .fc-day-grid .fc-row .fc-content-skeleton { + padding-bottom: 1em; /* give space underneath events for clicking/selecting days */ +} + + +/* TimeGrid axis running down the side (for both the all-day area and the slot area) +--------------------------------------------------------------------------------------------------*/ + +.fc .fc-axis { /* .fc to overcome default cell styles */ + vertical-align: middle; + padding: 0 4px; + white-space: nowrap; +} + +.fc-ltr .fc-axis { + text-align: right; +} + +.fc-rtl .fc-axis { + text-align: left; +} + +.ui-widget td.fc-axis { + font-weight: normal; /* overcome jqui theme making it bold */ +} + + +/* TimeGrid Structure +--------------------------------------------------------------------------------------------------*/ + +.fc-time-grid-container, /* so scroll container's z-index is below all-day */ +.fc-time-grid { /* so slats/bg/content/etc positions get scoped within here */ + position: relative; + z-index: 1; +} + +.fc-time-grid { + min-height: 100%; /* so if height setting is 'auto', .fc-bg stretches to fill height */ +} + +.fc-time-grid table { /* don't put outer borders on slats/bg/content/etc */ + border: 0 hidden transparent; +} + +.fc-time-grid > .fc-bg { + z-index: 1; +} + +.fc-time-grid .fc-slats, +.fc-time-grid > hr { /* the
AgendaView injects when grid is shorter than scroller */ + position: relative; + z-index: 2; +} + +.fc-time-grid .fc-content-col { + position: relative; /* because now-indicator lives directly inside */ +} + +.fc-time-grid .fc-content-skeleton { + position: absolute; + z-index: 3; + top: 0; + left: 0; + right: 0; +} + +/* divs within a cell within the fc-content-skeleton */ + +.fc-time-grid .fc-business-container { + position: relative; + z-index: 1; +} + +.fc-time-grid .fc-bgevent-container { + position: relative; + z-index: 2; +} + +.fc-time-grid .fc-highlight-container { + position: relative; + z-index: 3; +} + +.fc-time-grid .fc-event-container { + position: relative; + z-index: 4; +} + +.fc-time-grid .fc-now-indicator-line { + z-index: 5; +} + +.fc-time-grid .fc-helper-container { /* also is fc-event-container */ + position: relative; + z-index: 6; +} + + +/* TimeGrid Slats (lines that run horizontally) +--------------------------------------------------------------------------------------------------*/ + +.fc-time-grid .fc-slats td { + height: 1.5em; + border-bottom: 0; /* each cell is responsible for its top border */ +} + +.fc-time-grid .fc-slats .fc-minor td { + border-top-style: dotted; +} + +.fc-time-grid .fc-slats .ui-widget-content { /* for jqui theme */ + background: none; /* see through to fc-bg */ +} + + +/* TimeGrid Highlighting Slots +--------------------------------------------------------------------------------------------------*/ + +.fc-time-grid .fc-highlight-container { /* a div within a cell within the fc-highlight-skeleton */ + position: relative; /* scopes the left/right of the fc-highlight to be in the column */ +} + +.fc-time-grid .fc-highlight { + position: absolute; + left: 0; + right: 0; + /* top and bottom will be in by JS */ +} + + +/* TimeGrid Event Containment +--------------------------------------------------------------------------------------------------*/ + +.fc-ltr .fc-time-grid .fc-event-container { /* space on the sides of events for LTR (default) */ + margin: 0 2.5% 0 2px; +} + +.fc-rtl .fc-time-grid .fc-event-container { /* space on the sides of events for RTL */ + margin: 0 2px 0 2.5%; +} + +.fc-time-grid .fc-event, +.fc-time-grid .fc-bgevent { + position: absolute; + z-index: 1; /* scope inner z-index's */ +} + +.fc-time-grid .fc-bgevent { + /* background events always span full width */ + left: 0; + right: 0; +} + + +/* Generic Vertical Event +--------------------------------------------------------------------------------------------------*/ + +.fc-v-event.fc-not-start { /* events that are continuing from another day */ + /* replace space made by the top border with padding */ + border-top-width: 0; + padding-top: 1px; + + /* remove top rounded corners */ + border-top-left-radius: 0; + border-top-right-radius: 0; +} + +.fc-v-event.fc-not-end { + /* replace space made by the top border with padding */ + border-bottom-width: 0; + padding-bottom: 1px; + + /* remove bottom rounded corners */ + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; +} + + +/* TimeGrid Event Styling +---------------------------------------------------------------------------------------------------- +We use the full "fc-time-grid-event" class instead of using descendants because the event won't +be a descendant of the grid when it is being dragged. +*/ + +.fc-time-grid-event { + overflow: hidden; /* don't let the bg flow over rounded corners */ +} + +.fc-time-grid-event.fc-selected { + /* need to allow touch resizers to extend outside event's bounding box */ + /* common fc-selected styles hide the fc-bg, so don't need this anyway */ + overflow: visible; +} + +.fc-time-grid-event.fc-selected .fc-bg { + display: none; /* hide semi-white background, to appear darker */ +} + +.fc-time-grid-event .fc-content { + overflow: hidden; /* for when .fc-selected */ +} + +.fc-time-grid-event .fc-time, +.fc-time-grid-event .fc-title { + padding: 0 1px; +} + +.fc-time-grid-event .fc-time { + font-size: .85em; + white-space: nowrap; +} + +/* short mode, where time and title are on the same line */ + +.fc-time-grid-event.fc-short .fc-content { + /* don't wrap to second line (now that contents will be inline) */ + white-space: nowrap; +} + +.fc-time-grid-event.fc-short .fc-time, +.fc-time-grid-event.fc-short .fc-title { + /* put the time and title on the same line */ + display: inline-block; + vertical-align: top; +} + +.fc-time-grid-event.fc-short .fc-time span { + display: none; /* don't display the full time text... */ +} + +.fc-time-grid-event.fc-short .fc-time:before { + content: attr(data-start); /* ...instead, display only the start time */ +} + +.fc-time-grid-event.fc-short .fc-time:after { + content: "\000A0-\000A0"; /* seperate with a dash, wrapped in nbsp's */ +} + +.fc-time-grid-event.fc-short .fc-title { + font-size: .85em; /* make the title text the same size as the time */ + padding: 0; /* undo padding from above */ +} + +/* resizer (cursor device) */ + +.fc-time-grid-event.fc-allow-mouse-resize .fc-resizer { + left: 0; + right: 0; + bottom: 0; + height: 8px; + overflow: hidden; + line-height: 8px; + font-size: 11px; + font-family: monospace; + text-align: center; + cursor: s-resize; +} +.fc-time-grid-event.fc-allow-mouse-resize .fc-start-resizer { + top: 0; + bottom: auto; + cursor: n-resize; +} + +.fc-time-grid-event.fc-allow-mouse-resize .fc-resizer:after { + content: "="; +} + +/* resizer (touch device) */ + +.fc-time-grid-event.fc-selected .fc-resizer { + /* 10x10 dot */ + border-radius: 5px; + border-width: 1px; + width: 8px; + height: 8px; + border-style: solid; + border-color: inherit; + background: #fff; + /* horizontally center */ + left: 50%; + margin-left: -5px; + /* center on the bottom edge */ + bottom: -5px; +} + + +/* Now Indicator +--------------------------------------------------------------------------------------------------*/ + +.fc-time-grid .fc-now-indicator-line { + border-top-width: 1px; + left: 0; + right: 0; +} + +/* arrow on axis */ + +.fc-time-grid .fc-now-indicator-arrow { + margin-top: -5px; /* vertically center on top coordinate */ +} + +.fc-ltr .fc-time-grid .fc-now-indicator-arrow { + left: 0; + /* triangle pointing right... */ + border-width: 5px 0 5px 6px; + border-top-color: transparent; + border-bottom-color: transparent; +} + +.fc-rtl .fc-time-grid .fc-now-indicator-arrow { + right: 0; + /* triangle pointing left... */ + border-width: 5px 6px 5px 0; + border-top-color: transparent; + border-bottom-color: transparent; +} + + + +/* List View +--------------------------------------------------------------------------------------------------*/ + +/* possibly reusable */ + +.fc-event-dot { + display: inline-block; + width: 10px; + height: 10px; + border-radius: 5px; +} + +/* view wrapper */ + +.fc-rtl .fc-list-view { + direction: rtl; /* unlike core views, leverage browser RTL */ +} + +.fc-list-view { + border-width: 1px; + border-style: solid; +} + +/* table resets */ + +.fc .fc-list-table { + table-layout: auto; /* for shrinkwrapping cell content */ +} + +.fc-list-table td { + border-width: 1px 0 0; + padding: 8px 14px; +} + +.fc-list-table tr:first-child td { + border-top-width: 0; +} + +/* day headings with the list */ + +.fc-list-heading { + border-bottom-width: 1px; +} + +.fc-list-heading td { + font-weight: bold; +} + +.fc-ltr .fc-list-heading-main { float: left; } +.fc-ltr .fc-list-heading-alt { float: right; } + +.fc-rtl .fc-list-heading-main { float: right; } +.fc-rtl .fc-list-heading-alt { float: left; } + +/* event list items */ + +.fc-list-item.fc-has-url { + cursor: pointer; /* whole row will be clickable */ +} + +.fc-list-item:hover td { + background-color: #f5f5f5; +} + +.fc-list-item-marker, +.fc-list-item-time { + white-space: nowrap; + width: 1px; +} + +/* make the dot closer to the event title */ +.fc-ltr .fc-list-item-marker { padding-right: 0; } +.fc-rtl .fc-list-item-marker { padding-left: 0; } + +.fc-list-item-title a { + /* every event title cell has an
tag */ + text-decoration: none; + color: inherit; +} + +.fc-list-item-title a[href]:hover { + /* hover effect only on titles with hrefs */ + text-decoration: underline; +} + +/* message when no events */ + +.fc-list-empty-wrap2 { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; +} + +.fc-list-empty-wrap1 { + width: 100%; + height: 100%; + display: table; +} + +.fc-list-empty { + display: table-cell; + vertical-align: middle; + text-align: center; +} + +.fc-unthemed .fc-list-empty { /* theme will provide own background */ + background-color: #eee; +} diff --git a/product_rental_bookings/static/src/css/scheduler.css b/product_rental_bookings/static/src/css/scheduler.css new file mode 100755 index 0000000..ff9c3d8 --- /dev/null +++ b/product_rental_bookings/static/src/css/scheduler.css @@ -0,0 +1,463 @@ +/*! + * FullCalendar Scheduler v1.9.4 + * Docs & License: https://fullcalendar.io/scheduler/ + * (c) 2018 Adam Shaw + */ +/* TODO: break this file up */ +/* Scroller +--------------------------------------------------------------------------------------------------*/ +.fc-scroller-clip { + overflow: hidden; + /* for clipping scrollbars */ + position: relative; + /* so things like scrollfollowers can attach to this */ } + +/* supresses rendering of native scrollbars */ +/* on .fc-scroller */ +.fc-no-scrollbars { + background: rgba(255, 255, 255, 0); + /* hack for dynamic DOM nodes (in Chrome OSX at least) */ } + +.fc-no-scrollbars::-webkit-scrollbar { + width: 0; + height: 0; } + +.fc-scroller-canvas { + position: relative; + /* origin for bg */ + box-sizing: border-box; + /* so that padding (for gutter) will be part of height */ + min-height: 100%; } + +.fc-scroller-canvas > .fc-bg { + z-index: 1; + /* make default? */ } + +.fc-scroller-canvas > .fc-content { + z-index: 2; + /* make default? */ + position: relative; + /* origin for inner content */ + border-style: solid; + border-width: 0; } + +/* for themed, hard to get the border-color, so just forget it (REVISIT) */ +.ui-widget .fc-scroller-canvas > .fc-content { + border-color: transparent; } + +.fc-scroller-canvas.fc-gutter-left > .fc-content { + border-left-width: 1px; + margin-left: -1px; } + +.fc-scroller-canvas.fc-gutter-right > .fc-content { + border-right-width: 1px; + margin-right: -1px; } + +.fc-scroller-canvas.fc-gutter-top > .fc-content { + border-top-width: 1px; + margin-top: -1px; } + +/* content is responsible for bottom border */ +/* View Structure +--------------------------------------------------------------------------------------------------*/ +.fc-rtl .fc-timeline { + direction: rtl; } + +.fc-timeline .fc-divider { + width: 3px; + border-style: double; + /* overcome neighboring borders */ } + +.fc-timeline .fc-head > tr > .fc-divider { + border-bottom: 0; } + +.fc-timeline .fc-body > tr > .fc-divider { + border-top: 0; } + +.fc-timeline .fc-body .fc-divider.ui-widget-header { + background-image: none; } + +.fc-scrolled .fc-head .fc-scroller { + z-index: 2; + /* so drop shadow will go above body panes */ } + +.fc-timeline.fc-scrolled .fc-head .fc-scroller { + box-shadow: 0 3px 4px rgba(0, 0, 0, 0.075); } + +.fc-timeline .fc-body .fc-scroller { + z-index: 1; } + +/* +on most tables that expand to the edges, kill the outer border, +because the container elements take care of it. +example tables: +.fc-scroller-canvas .fc-content table +.fc-scroller-canvas .fc-bg .fc-slats table +*/ +.fc-timeline .fc-scroller-canvas > div > table, +.fc-timeline .fc-scroller-canvas > div > div > table { + border-style: hidden; } + +/* +for resource rows (in both the spreadsheet and timeline areas), +undo previous rule in order to always show last border. +*/ +.fc-timeline .fc-scroller-canvas > .fc-content > .fc-rows > table { + border-bottom-style: none; } + +/* Table Cell Common +--------------------------------------------------------------------------------------------------*/ +.fc-timeline th, +.fc-timeline td { + white-space: nowrap; } + +.fc-timeline .fc-cell-content { + overflow: hidden; } + +.fc-timeline .fc-cell-text { + padding-left: 4px; + padding-right: 4px; } + +.fc-timeline .fc-col-resizer { + cursor: col-resize; } + +/* +Cells at the start of a week +TODO: figure out better styling + +.fc-ltr .fc-timeline .fc-em-cell div { + border-left: 3px solid #eee; + height: 100%; +} +.fc-rtl .fc-timeline .fc-em-cell { + border-right-width: 3px; +} +*/ +/* head */ +.fc-timeline th { + vertical-align: middle; } + +.fc-timeline .fc-head .fc-cell-content { + padding-top: 3px; + padding-bottom: 3px; } + +/* body */ +.fc-timeline .fc-body .ui-widget-content { + background-image: none; } + +/* Resource Area +--------------------------------------------------------------------------------------------------*/ +.fc-resource-area { + width: 30%; } + +.fc-resource-area col { + width: 40%; + min-width: 70px; + /* will be read by JS */ } + +.fc-resource-area col.fc-main-col { + width: 60%; + /* make the first column in a nested setup bigger */ } + +.fc-flat .fc-expander-space { + /* fc-flat is opposite of fc-nested */ + display: none; } + +.fc-ltr .fc-resource-area tr > * { + text-align: left; } + +.fc-rtl .fc-resource-area tr > * { + text-align: right; } + +.fc-resource-area .fc-cell-content { + padding-left: 4px; + padding-right: 4px; } + +/* head */ +.fc-resource-area .fc-super th { + text-align: center; } + +.fc-resource-area th > div { + position: relative; } + +.fc-resource-area th .fc-cell-content { + position: relative; + z-index: 1; } + +.fc-resource-area th .fc-col-resizer { + position: absolute; + z-index: 2; + top: 0; + bottom: 0; + width: 5px; } + +.fc-ltr .fc-resource-area th .fc-col-resizer { + right: -3px; } + +.fc-rtl .fc-resource-area th .fc-col-resizer { + left: -3px; } + +/* body */ +tr.fc-collapsed > td, +tr.fc-transitioning > td { + /* during the transition */ + overflow: hidden; + /* prevents absolutely-positioned events from bleeding out */ } + +tr.fc-transitioning > td > div { + transition: margin-top 0.2s; } + +tr.fc-collapsed > td > div { + margin-top: -10px; } + +.fc-body .fc-resource-area .fc-cell-content { + /* might BE the cell */ + position: relative; + /* optimization for ScrollFollower */ + padding-top: 8px; + padding-bottom: 8px; } + +.fc-no-overlap .fc-body .fc-resource-area .fc-cell-content { + /* might BE the cell */ + padding-top: 5px; + padding-bottom: 5px; } + +.fc-resource-area .fc-icon { + /* the expander and spacers before the expander */ + width: 1em; + /* ensure constant width, esp for empty icons */ + font-size: .9em; + vertical-align: middle; + margin-top: -1%; } + +.fc-resource-area .fc-expander { + cursor: pointer; + color: #666; + /* for the icon within */ } + +/* Time Area +--------------------------------------------------------------------------------------------------*/ +.fc-time-area col { + min-width: 2.2em; + /* detected by JS */ } + +/* head */ +.fc-ltr .fc-time-area .fc-chrono th { + text-align: left; } + +.fc-rtl .fc-time-area .fc-chrono th { + text-align: right; } + +/* body slats (vertical lines) */ +.fc-time-area .fc-slats { + /* fc-bg is responsible for a lot of this now! */ + position: absolute; + z-index: 1; + top: 0; + left: 0; + right: 0; + bottom: 0; } + +.fc-time-area .fc-slats table { + height: 100%; } + +.fc-time-area .fc-slats .fc-minor { + border-style: dotted; } + +.fc-time-area .fc-slats td { + border-width: 0 1px; + /* need to do this. sometimes -1 margin wouldn't hide the dotted */ } + +.fc-ltr .fc-time-area .fc-slats td { + border-right-width: 0; } + +.fc-rtl .fc-time-area .fc-slats td { + border-left-width: 0; } + +/* body content containers + can be within rows or directly within the pane's content +*/ +.fc-time-area .fc-bgevent-container, +.fc-time-area .fc-highlight-container { + position: absolute; + z-index: 2; + /* only for directly within pane. not for row. overridden later */ + top: 0; + bottom: 0; + width: 0; } + +.fc-ltr .fc-time-area .fc-helper-container, +.fc-ltr .fc-time-area .fc-bgevent-container, +.fc-ltr .fc-time-area .fc-highlight-container { + left: 0; } + +.fc-rtl .fc-time-area .fc-helper-container, +.fc-rtl .fc-time-area .fc-bgevent-container, +.fc-rtl .fc-time-area .fc-highlight-container { + right: 0; } + +.fc-time-area .fc-bgevent, +.fc-time-area .fc-highlight { + position: absolute; + top: 0; + bottom: 0; } + +/* body resource rows */ +.fc-time-area .fc-rows { + position: relative; + z-index: 3; } + +.fc-time-area .fc-rows .ui-widget-content { + background: none; } + +.fc-time-area .fc-rows td > div { + position: relative; } + +.fc-time-area .fc-rows .fc-bgevent-container, +.fc-time-area .fc-rows .fc-highlight-container { + z-index: 1; } + +.fc-time-area .fc-event-container { + position: relative; + z-index: 2; + /* above bgevent and highlight */ + width: 0; + /* for event positioning. will end up on correct side based on dir */ } + +.fc-time-area .fc-helper-container { + /* also an fc-event-container */ + position: absolute; + z-index: 3; + top: 0; } + +.fc-time-area .fc-event-container { + padding-bottom: 8px; + top: -1px; } + +.fc-time-area tr:first-child .fc-event-container { + top: 0; } + +.fc-no-overlap .fc-time-area .fc-event-container { + padding-bottom: 0; + top: 0; } + +/* Now Indicator +--------------------------------------------------------------------------------------------------*/ +.fc-timeline .fc-now-indicator { + /* both the arrow and the line */ + z-index: 3; + /* one above scroller's fc-content */ + top: 0; } + +.fc-time-area .fc-now-indicator-arrow { + margin: 0 -6px; + /* 5, then one more to counteract scroller's negative margins */ + /* triangle pointing down... */ + border-width: 6px 5px 0 5px; + border-left-color: transparent; + border-right-color: transparent; } + +.fc-time-area .fc-now-indicator-line { + margin: 0 -1px; + /* counteract scroller's negative margins */ + bottom: 0; + border-left-width: 1px; } + +/* Time Grid Events +--------------------------------------------------------------------------------------------------*/ +.fc-timeline-event { + position: absolute; + border-radius: 0; + padding: 2px 0; + margin-bottom: 1px; } + +.fc-no-overlap .fc-timeline-event { + padding: 5px 0; + margin-bottom: 0; } + +/* don't overlap grid lines at the event's end */ +.fc-ltr .fc-timeline-event { + margin-right: 1px; } + +.fc-rtl .fc-timeline-event { + margin-left: 1px; } + +.fc-timeline-event .fc-content { + padding: 0 1px; + white-space: nowrap; + overflow: hidden; } + +.fc-timeline-event .fc-time { + font-weight: bold; + padding: 0 1px; } + +.fc-rtl .fc-timeline-event .fc-time { + display: inline-block; + /* will force it on the other side */ } + +.fc-timeline-event .fc-title { + position: relative; + /* optimization for ScrollFollower */ + padding: 0 1px; } + +.fc-timeline-event.fc-selected .fc-bg { + display: none; + /* hide semi-white background, to appear darker */ } + +/* follower logic */ +.fc-ltr .fc-timeline-event .fc-title { + padding-left: 10px; + margin-left: -8px; } + +.fc-rtl .fc-timeline-event .fc-title { + padding-right: 10px; + margin-right: -8px; } + +.fc-ltr .fc-timeline-event.fc-not-start .fc-title { + margin-left: -2px; } + +.fc-rtl .fc-timeline-event.fc-not-start .fc-title { + margin-right: -2px; } + +.fc-timeline-event.fc-not-start .fc-title, +.fc-body .fc-time-area .fc-following { + position: relative; } + +.fc-timeline-event.fc-not-start .fc-title:before, +.fc-body .fc-time-area .fc-following:before { + /* generic arrow */ + content: ""; + position: absolute; + top: 50%; + margin-top: -5px; + border: 5px solid #000; + border-top-color: transparent; + border-bottom-color: transparent; + opacity: .5; } + +.fc-ltr .fc-timeline-event.fc-not-start .fc-title:before, +.fc-ltr .fc-body .fc-time-area .fc-following:before { + /* LTR. left pointing arrow */ + border-left: 0; + left: 2px; } + +.fc-rtl .fc-timeline-event.fc-not-start .fc-title:before, +.fc-rtl .fc-body .fc-time-area .fc-following:before { + /* RTL. right pointing arrow */ + border-right: 0; + right: 2px; } + +/* License Message +--------------------------------------------------------------------------------------------------*/ +.fc-license-message { + position: absolute; + z-index: 99999; + bottom: 1px; + left: 1px; + background: #eee; + border-color: #ddd; + border-style: solid; + border-width: 1px 1px 0 0; + padding: 2px 4px; + font-size: 12px; + border-top-right-radius: 3px; } diff --git a/product_rental_bookings/static/src/css/scheduler.min.css b/product_rental_bookings/static/src/css/scheduler.min.css new file mode 100755 index 0000000..da0e2e5 --- /dev/null +++ b/product_rental_bookings/static/src/css/scheduler.min.css @@ -0,0 +1,5 @@ +/*! + * FullCalendar Scheduler v1.9.4 + * Docs & License: https://fullcalendar.io/scheduler/ + * (c) 2018 Adam Shaw + */.fc-resource-area .fc-cell-content,.fc-timeline .fc-cell-text{padding-left:4px;padding-right:4px}.fc-resource-area th>div,.fc-scroller-canvas,.fc-scroller-canvas>.fc-content,.fc-scroller-clip{position:relative}.fc-scroller-clip,.fc-timeline .fc-cell-content,tr.fc-collapsed>td,tr.fc-transitioning>td{overflow:hidden}.fc-no-scrollbars{background:rgba(255,255,255,0)}.fc-timeline .fc-body .fc-divider.ui-widget-header,.fc-timeline .fc-body .ui-widget-content{background-image:none}.fc-no-scrollbars::-webkit-scrollbar{width:0;height:0}.fc-scroller-canvas{box-sizing:border-box;min-height:100%}.fc-scroller-canvas>.fc-bg{z-index:1}.fc-scroller-canvas>.fc-content{z-index:2;border-style:solid;border-width:0}.ui-widget .fc-scroller-canvas>.fc-content{border-color:transparent}.fc-scroller-canvas.fc-gutter-left>.fc-content{border-left-width:1px;margin-left:-1px}.fc-scroller-canvas.fc-gutter-right>.fc-content{border-right-width:1px;margin-right:-1px}.fc-scroller-canvas.fc-gutter-top>.fc-content{border-top-width:1px;margin-top:-1px}.fc-rtl .fc-timeline{direction:rtl}.fc-timeline .fc-divider{width:3px;border-style:double}.fc-timeline .fc-head>tr>.fc-divider{border-bottom:0}.fc-timeline .fc-body>tr>.fc-divider{border-top:0}.fc-scrolled .fc-head .fc-scroller{z-index:2}.fc-timeline.fc-scrolled .fc-head .fc-scroller{box-shadow:0 3px 4px rgba(0,0,0,.075)}.fc-timeline .fc-body .fc-scroller{z-index:1}.fc-timeline .fc-scroller-canvas>div>div>table,.fc-timeline .fc-scroller-canvas>div>table{border-style:hidden}.fc-timeline .fc-scroller-canvas>.fc-content>.fc-rows>table{border-bottom-style:none}.fc-timeline td,.fc-timeline th{white-space:nowrap}.fc-timeline .fc-col-resizer{cursor:col-resize}.fc-timeline th{vertical-align:middle}.fc-timeline .fc-head .fc-cell-content{padding-top:3px;padding-bottom:3px}.fc-resource-area{width:30%}.fc-resource-area col{width:40%;min-width:70px}.fc-resource-area col.fc-main-col{width:60%}.fc-flat .fc-expander-space{display:none}.fc-ltr .fc-resource-area tr>*{text-align:left}.fc-rtl .fc-resource-area tr>*{text-align:right}.fc-resource-area .fc-super th{text-align:center}.fc-resource-area th .fc-cell-content{position:relative;z-index:1}.fc-resource-area th .fc-col-resizer{position:absolute;z-index:2;top:0;bottom:0;width:5px}.fc-ltr .fc-resource-area th .fc-col-resizer{right:-3px}.fc-rtl .fc-resource-area th .fc-col-resizer{left:-3px}tr.fc-transitioning>td>div{transition:margin-top .2s}tr.fc-collapsed>td>div{margin-top:-10px}.fc-body .fc-resource-area .fc-cell-content{position:relative;padding-top:8px;padding-bottom:8px}.fc-time-area .fc-bgevent,.fc-time-area .fc-highlight,.fc-time-area .fc-slats{position:absolute;top:0;bottom:0}.fc-no-overlap .fc-body .fc-resource-area .fc-cell-content{padding-top:5px;padding-bottom:5px}.fc-resource-area .fc-icon{width:1em;font-size:.9em;vertical-align:middle;margin-top:-1%}.fc-resource-area .fc-expander{cursor:pointer;color:#666}.fc-time-area col{min-width:2.2em}.fc-ltr .fc-time-area .fc-chrono th{text-align:left}.fc-rtl .fc-time-area .fc-chrono th{text-align:right}.fc-time-area .fc-slats{z-index:1;left:0;right:0}.fc-time-area .fc-slats table{height:100%}.fc-time-area .fc-slats .fc-minor{border-style:dotted}.fc-time-area .fc-slats td{border-width:0 1px}.fc-ltr .fc-time-area .fc-slats td{border-right-width:0}.fc-rtl .fc-time-area .fc-slats td{border-left-width:0}.fc-time-area .fc-bgevent-container,.fc-time-area .fc-highlight-container{position:absolute;z-index:2;top:0;bottom:0;width:0}.fc-ltr .fc-time-area .fc-bgevent-container,.fc-ltr .fc-time-area .fc-helper-container,.fc-ltr .fc-time-area .fc-highlight-container{left:0}.fc-rtl .fc-time-area .fc-bgevent-container,.fc-rtl .fc-time-area .fc-helper-container,.fc-rtl .fc-time-area .fc-highlight-container{right:0}.fc-time-area .fc-rows{position:relative;z-index:3}.fc-time-area .fc-rows .ui-widget-content{background:0 0}.fc-time-area .fc-rows td>div{position:relative}.fc-time-area .fc-rows .fc-bgevent-container,.fc-time-area .fc-rows .fc-highlight-container{z-index:1}.fc-time-area .fc-event-container{position:relative;z-index:2;width:0}.fc-time-area .fc-helper-container{position:absolute;z-index:3;top:0}.fc-time-area .fc-event-container{padding-bottom:8px;top:-1px}.fc-time-area tr:first-child .fc-event-container{top:0}.fc-no-overlap .fc-time-area .fc-event-container{padding-bottom:0;top:0}.fc-timeline .fc-now-indicator{z-index:3;top:0}.fc-time-area .fc-now-indicator-arrow{margin:0 -6px;border-width:6px 5px 0;border-left-color:transparent;border-right-color:transparent}.fc-time-area .fc-now-indicator-line{margin:0 -1px;bottom:0;border-left-width:1px}.fc-timeline-event{position:absolute;border-radius:0;padding:2px 0;margin-bottom:1px}.fc-no-overlap .fc-timeline-event{padding:5px 0;margin-bottom:0}.fc-ltr .fc-timeline-event{margin-right:1px}.fc-rtl .fc-timeline-event{margin-left:1px}.fc-timeline-event .fc-content{padding:0 1px;white-space:nowrap;overflow:hidden}.fc-timeline-event .fc-time{font-weight:700;padding:0 1px}.fc-rtl .fc-timeline-event .fc-time{display:inline-block}.fc-timeline-event .fc-title{position:relative;padding:0 1px}.fc-timeline-event.fc-selected .fc-bg{display:none}.fc-ltr .fc-timeline-event .fc-title{padding-left:10px;margin-left:-8px}.fc-rtl .fc-timeline-event .fc-title{padding-right:10px;margin-right:-8px}.fc-ltr .fc-timeline-event.fc-not-start .fc-title{margin-left:-2px}.fc-rtl .fc-timeline-event.fc-not-start .fc-title{margin-right:-2px}.fc-body .fc-time-area .fc-following,.fc-timeline-event.fc-not-start .fc-title{position:relative}.fc-body .fc-time-area .fc-following:before,.fc-timeline-event.fc-not-start .fc-title:before{content:"";position:absolute;top:50%;margin-top:-5px;border:5px solid #000;border-top-color:transparent;border-bottom-color:transparent;opacity:.5}.fc-ltr .fc-body .fc-time-area .fc-following:before,.fc-ltr .fc-timeline-event.fc-not-start .fc-title:before{border-left:0;left:2px}.fc-rtl .fc-body .fc-time-area .fc-following:before,.fc-rtl .fc-timeline-event.fc-not-start .fc-title:before{border-right:0;right:2px}.fc-license-message{position:absolute;z-index:99999;bottom:1px;left:1px;background:#eee;border-color:#ddd;border-style:solid;border-width:1px 1px 0 0;padding:2px 4px;font-size:12px;border-top-right-radius:3px} \ No newline at end of file diff --git a/product_rental_bookings/static/src/js/fabric.min.js b/product_rental_bookings/static/src/js/fabric.min.js new file mode 100755 index 0000000..bce268d --- /dev/null +++ b/product_rental_bookings/static/src/js/fabric.min.js @@ -0,0 +1,9 @@ +var fabric=fabric||{version:"2.0.0-beta2"};"undefined"!=typeof exports&&(exports.fabric=fabric),"undefined"!=typeof document&&"undefined"!=typeof window?(fabric.document=document,fabric.window=window,window.fabric=fabric):(fabric.document=require("jsdom").jsdom(decodeURIComponent("%3C!DOCTYPE%20html%3E%3Chtml%3E%3Chead%3E%3C%2Fhead%3E%3Cbody%3E%3C%2Fbody%3E%3C%2Fhtml%3E"),{features:{FetchExternalResources:["img"]}}),fabric.window=fabric.document.defaultView),fabric.isTouchSupported="ontouchstart"in fabric.document.documentElement,fabric.isLikelyNode="undefined"!=typeof Buffer&&"undefined"==typeof window,fabric.SHARED_ATTRIBUTES=["display","transform","fill","fill-opacity","fill-rule","opacity","stroke","stroke-dasharray","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","id"],fabric.DPI=96,fabric.reNum="(?:[-+]?(?:\\d+|\\d*\\.\\d+)(?:e[-+]?\\d+)?)",fabric.fontPaths={},fabric.iMatrix=[1,0,0,1,0,0],fabric.canvasModule="canvas-prebuilt",fabric.charWidthsCache={},fabric.textureSize=2048,fabric.enableGLFiltering=!0,fabric.devicePixelRatio=fabric.window.devicePixelRatio||fabric.window.webkitDevicePixelRatio||fabric.window.mozDevicePixelRatio||1,fabric.initFilterBackend=function(){return fabric.isWebglSupported&&fabric.isWebglSupported(fabric.textureSize)&&fabric.enableGLFiltering?(console.log("max texture size: "+fabric.maxTextureSize),new fabric.WebglFilterBackend({tileSize:fabric.textureSize})):fabric.Canvas2dFilterBackend?new fabric.Canvas2dFilterBackend:void 0},function(){function t(t,e){if(this.__eventListeners[t]){var i=this.__eventListeners[t];e?i[i.indexOf(e)]=!1:fabric.util.array.fill(i,!1)}}function e(t,e){if(this.__eventListeners||(this.__eventListeners={}),1===arguments.length)for(var i in t)this.on(i,t[i]);else this.__eventListeners[t]||(this.__eventListeners[t]=[]),this.__eventListeners[t].push(e);return this}function i(e,i){if(this.__eventListeners){if(0===arguments.length)for(e in this.__eventListeners)t.call(this,e);else if(1===arguments.length&&"object"==typeof arguments[0])for(var r in e)t.call(this,r,e[r]);else t.call(this,e,i);return this}}function r(t,e){if(this.__eventListeners){var i=this.__eventListeners[t];if(i){for(var r=0,n=i.length;r-1},complexity:function(){return this.getObjects().reduce(function(t,e){return t+=e.complexity?e.complexity():0},0)}},fabric.CommonMethods={_setOptions:function(t){for(var e in t)this.set(e,t[e])},_initGradient:function(t,e){!t||!t.colorStops||t instanceof fabric.Gradient||this.set(e,new fabric.Gradient(t))},_initPattern:function(t,e,i){!t||!t.source||t instanceof fabric.Pattern?i&&i():this.set(e,new fabric.Pattern(t,i))},_initClipping:function(t){if(t.clipTo&&"string"==typeof t.clipTo){var e=fabric.util.getFunctionBody(t.clipTo);"undefined"!=typeof e&&(this.clipTo=new Function("ctx",e))}},_setObject:function(t){for(var e in t)this._set(e,t[e])},set:function(t,e){return"object"==typeof t?this._setObject(t):"function"==typeof e&&"clipTo"!==t?this._set(t,e(this.get(t))):this._set(t,e),this},_set:function(t,e){this[t]=e},toggle:function(t){var e=this.get(t);return"boolean"==typeof e&&this.set(t,!e),this},get:function(t){return this[t]}},function(t){var e=Math.sqrt,i=Math.atan2,r=Math.pow,n=Math.abs,s=Math.PI/180;fabric.util={removeFromArray:function(t,e){var i=t.indexOf(e);return i!==-1&&t.splice(i,1),t},getRandomInt:function(t,e){return Math.floor(Math.random()*(e-t+1))+t},degreesToRadians:function(t){return t*s},radiansToDegrees:function(t){return t/s},rotatePoint:function(t,e,i){t.subtractEquals(e);var r=fabric.util.rotateVector(t,i);return new fabric.Point(r.x,r.y).addEquals(e)},rotateVector:function(t,e){var i=Math.sin(e),r=Math.cos(e),n=t.x*r-t.y*i,s=t.x*i+t.y*r;return{x:n,y:s}},transformPoint:function(t,e,i){return i?new fabric.Point(e[0]*t.x+e[2]*t.y,e[1]*t.x+e[3]*t.y):new fabric.Point(e[0]*t.x+e[2]*t.y+e[4],e[1]*t.x+e[3]*t.y+e[5])},makeBoundingBoxFromPoints:function(t){var e=[t[0].x,t[1].x,t[2].x,t[3].x],i=fabric.util.array.min(e),r=fabric.util.array.max(e),n=Math.abs(i-r),s=[t[0].y,t[1].y,t[2].y,t[3].y],o=fabric.util.array.min(s),a=fabric.util.array.max(s),h=Math.abs(o-a);return{left:i,top:o,width:n,height:h}},invertTransform:function(t){var e=1/(t[0]*t[3]-t[1]*t[2]),i=[e*t[3],-e*t[1],-e*t[2],e*t[0]],r=fabric.util.transformPoint({x:t[4],y:t[5]},i,!0);return i[4]=-r.x,i[5]=-r.y,i},toFixed:function(t,e){return parseFloat(Number(t).toFixed(e))},parseUnit:function(t,e){var i=/\D{0,2}$/.exec(t),r=parseFloat(t);switch(e||(e=fabric.Text.DEFAULT_SVG_FONT_SIZE),i[0]){case"mm":return r*fabric.DPI/25.4;case"cm":return r*fabric.DPI/2.54;case"in":return r*fabric.DPI;case"pt":return r*fabric.DPI/72;case"pc":return r*fabric.DPI/72*12;case"em":return r*e;default:return r}},falseFunction:function(){return!1},getKlass:function(t,e){return t=fabric.util.string.camelize(t.charAt(0).toUpperCase()+t.slice(1)),fabric.util.resolveNamespace(e)[t]},resolveNamespace:function(e){if(!e)return fabric;var i,r=e.split("."),n=r.length,s=t||fabric.window;for(i=0;ir;)r+=a[d++%f],r>l&&(r=l),t[g?"lineTo":"moveTo"](r,0),g=!g;t.restore()},createCanvasElement:function(t){return t||(t=fabric.document.createElement("canvas")),t},createImage:function(){return fabric.document.createElement("img")},createAccessors:function(t){var e,i,r,n,s,o=t.prototype;for(e=o.stateProperties.length;e--;)i=o.stateProperties[e],r=i.charAt(0).toUpperCase()+i.slice(1),n="set"+r,s="get"+r,o[s]||(o[s]=function(t){return new Function('return this.get("'+t+'")')}(i)),o[n]||(o[n]=function(t){return new Function("value",'return this.set("'+t+'", value)')}(i))},clipContext:function(t,e){e.save(),e.beginPath(),t.clipTo(e),e.clip()},multiplyTransformMatrices:function(t,e,i){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],i?0:t[0]*e[4]+t[2]*e[5]+t[4],i?0:t[1]*e[4]+t[3]*e[5]+t[5]]},qrDecompose:function(t){var n=i(t[1],t[0]),o=r(t[0],2)+r(t[1],2),a=e(o),h=(t[0]*t[3]-t[2]*t[1])/a,c=i(t[0]*t[2]+t[1]*t[3],o);return{angle:n/s,scaleX:a,scaleY:h,skewX:c/s,skewY:0,translateX:t[4],translateY:t[5]}},customTransformMatrix:function(t,e,i){var r=[1,0,n(Math.tan(i*s)),1],o=[n(t),0,0,n(e)];return fabric.util.multiplyTransformMatrices(o,r,!0)},resetObjectTransform:function(t){t.scaleX=1,t.scaleY=1,t.skewX=0,t.skewY=0,t.flipX=!1,t.flipY=!1,t.setAngle(0)},getFunctionBody:function(t){return(String(t).match(/function[^{]*\{([\s\S]*)\}/)||{})[1]},isTransparent:function(t,e,i,r){r>0&&(e>r?e-=r:e=0,i>r?i-=r:i=0);var n,s,o=!0,a=t.getImageData(e,i,2*r||1,2*r||1),h=a.data.length;for(n=3;n0?A-=2*f:1===c&&A<0&&(A+=2*f);for(var M=Math.ceil(Math.abs(A/f*2)),L=[],I=A/M,F=8/3*Math.sin(I/4)*Math.sin(I/4)/Math.sin(I/2),R=P+I,B=0;B=n?s-n:2*Math.PI-(n-s)}function r(t,e,i,r,n,s,h,c){var l=a.call(arguments);if(o[l])return o[l];var u,f,d,g,p,v,m,b,_=Math.sqrt,y=Math.min,x=Math.max,C=Math.abs,S=[],T=[[],[]];f=6*t-12*i+6*n,u=-3*t+9*i-9*n+3*h,d=3*i-3*t;for(var w=0;w<2;++w)if(w>0&&(f=6*e-12*r+6*s,u=-3*e+9*r-9*s+3*c,d=3*r-3*e),C(u)<1e-12){if(C(f)<1e-12)continue;g=-d/f,0=e})}function i(t,e){return n(t,e,function(t,e){return t/g,">")}function r(t){for(var e,i=0,r=[],i=0;i57343)return t.charAt(e);if(55296<=i&&i<=56319){if(t.length<=e+1)throw"High surrogate without following low surrogate";var r=t.charCodeAt(e+1);if(56320>r||r>57343)throw"High surrogate without following low surrogate";return t.charAt(e)+t.charAt(e+1)}if(0===e)throw"Low surrogate without preceding high surrogate";var n=t.charCodeAt(e-1);if(55296>n||n>56319)throw"Low surrogate without preceding high surrogate";return!1}fabric.util.string={camelize:t,capitalize:e,escapeXml:i,graphemeSplit:r}}(),function(){function t(){}function e(t){for(var e=null,i=this;i.constructor.superclass;){var n=i.constructor.superclass.prototype[t];if(i[t]!==n){e=n;break}i=i.constructor.superclass.prototype}return e?arguments.length>1?e.apply(this,r.call(arguments,1)):e.call(this):console.log("tried to callSuper "+t+", method not found in prototype chain",this)}function i(){function i(){this.initialize.apply(this,arguments)}var s=null,a=r.call(arguments,0);"function"==typeof a[0]&&(s=a.shift()),i.superclass=s,i.subclasses=[],s&&(t.prototype=s.prototype,i.prototype=new t,s.subclasses.push(i));for(var h=0,c=a.length;h-1?t.prototype[r]=function(t){return function(){var r=this.constructor.superclass;this.constructor.superclass=i;var n=e[t].apply(this,arguments);if(this.constructor.superclass=r,"initialize"!==t)return n}}(r):t.prototype[r]=e[r],s&&(e.toString!==Object.prototype.toString&&(t.prototype.toString=e.toString),e.valueOf!==Object.prototype.valueOf&&(t.prototype.valueOf=e.valueOf))};fabric.util.createClass=i}(),function(){function t(t){var e,i,r=Array.prototype.slice.call(arguments,1),n=r.length;for(i=0;i-1?s(t,e.match(/opacity:\s*(\d?\.?\d*)/)[1]):t;for(var r in e)if("opacity"===r)s(t,e[r]);else{var n="float"===r||"cssFloat"===r?"undefined"==typeof i.styleFloat?"cssFloat":"styleFloat":r;i[n]=e[r]}return t}var e=fabric.document.createElement("div"),i="string"==typeof e.style.opacity,r="string"==typeof e.style.filter,n=/alpha\s*\(\s*opacity\s*=\s*([^\)]+)\)/,s=function(t){return t};i?s=function(t,e){return t.style.opacity=e,t}:r&&(s=function(t,e){var i=t.style;return t.currentStyle&&!t.currentStyle.hasLayout&&(i.zoom=1),n.test(i.filter)?(e=e>=.9999?"":"alpha(opacity="+100*e+")",i.filter=i.filter.replace(n,e)):i.filter+=" alpha(opacity="+100*e+")",t}),fabric.util.setStyle=t}(),function(){function t(t){return"string"==typeof t?fabric.document.getElementById(t):t}function e(t,e){var i=fabric.document.createElement(t);for(var r in e)"class"===r?i.className=e[r]:"for"===r?i.htmlFor=e[r]:i.setAttribute(r,e[r]);return i}function i(t,e){t&&(" "+t.className+" ").indexOf(" "+e+" ")===-1&&(t.className+=(t.className?" ":"")+e)}function r(t,i,r){return"string"==typeof i&&(i=e(i,r)),t.parentNode&&t.parentNode.replaceChild(i,t),i.appendChild(t),i}function n(t){for(var e=0,i=0,r=fabric.document.documentElement,n=fabric.document.body||{scrollLeft:0,scrollTop:0};t&&(t.parentNode||t.host)&&(t=t.parentNode||t.host,t===fabric.document?(e=n.scrollLeft||r.scrollLeft||0,i=n.scrollTop||r.scrollTop||0):(e+=t.scrollLeft||0,i+=t.scrollTop||0),1!==t.nodeType||"fixed"!==fabric.util.getElementStyle(t,"position")););return{left:e,top:i}}function s(t){var e,i,r=t&&t.ownerDocument,s={left:0,top:0},o={left:0,top:0},a={borderLeftWidth:"left",borderTopWidth:"top",paddingLeft:"left",paddingTop:"top"};if(!r)return o;for(var h in a)o[a[h]]+=parseInt(c(t,h),10)||0;return e=r.documentElement,"undefined"!=typeof t.getBoundingClientRect&&(s=t.getBoundingClientRect()),i=n(t),{left:s.left+i.left-(e.clientLeft||0)+o.left,top:s.top+i.top-(e.clientTop||0)+o.top}}var o,a=Array.prototype.slice,h=function(t){return a.call(t,0)};try{o=h(fabric.document.childNodes)instanceof Array}catch(t){}o||(h=function(t){for(var e=new Array(t.length),i=t.length;i--;)e[i]=t[i];return e});var c;c=fabric.document.defaultView&&fabric.document.defaultView.getComputedStyle?function(t,e){var i=fabric.document.defaultView.getComputedStyle(t,null);return i?i[e]:void 0}:function(t,e){var i=t.style[e];return!i&&t.currentStyle&&(i=t.currentStyle[e]),i},function(){function t(t){return"undefined"!=typeof t.onselectstart&&(t.onselectstart=fabric.util.falseFunction),r?t.style[r]="none":"string"==typeof t.unselectable&&(t.unselectable="on"),t}function e(t){return"undefined"!=typeof t.onselectstart&&(t.onselectstart=null),r?t.style[r]="":"string"==typeof t.unselectable&&(t.unselectable=""),t}var i=fabric.document.documentElement.style,r="userSelect"in i?"userSelect":"MozUserSelect"in i?"MozUserSelect":"WebkitUserSelect"in i?"WebkitUserSelect":"KhtmlUserSelect"in i?"KhtmlUserSelect":"";fabric.util.makeElementUnselectable=t,fabric.util.makeElementSelectable=e}(),function(){function t(t,e){var i=fabric.document.getElementsByTagName("head")[0],r=fabric.document.createElement("script"),n=!0;r.onload=r.onreadystatechange=function(t){if(n){if("string"==typeof this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState)return;n=!1,e(t||fabric.window.event),r=r.onload=r.onreadystatechange=null}},r.src=t,i.appendChild(r)}fabric.util.getScript=t}(),fabric.util.getById=t,fabric.util.toArray=h,fabric.util.makeElement=e,fabric.util.addClass=i,fabric.util.wrapElement=r,fabric.util.getScrollLeftTop=n,fabric.util.getElementOffset=s,fabric.util.getElementStyle=c}(),function(){function t(t,e){return t+(/\?/.test(t)?"&":"?")+e}function e(){}function i(i,n){n||(n={});var s=n.method?n.method.toUpperCase():"GET",o=n.onComplete||function(){},a=r(),h=n.body||n.parameters;return a.onreadystatechange=function(){4===a.readyState&&(o(a),a.onreadystatechange=e)},"GET"===s&&(h=null,"string"==typeof n.parameters&&(i=t(i,n.parameters))),a.open(s,i,!0),"POST"!==s&&"PUT"!==s||a.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),a.send(h),a}var r=function(){for(var t=[function(){return new ActiveXObject("Microsoft.XMLHTTP")},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml2.XMLHTTP.3.0")},function(){return new XMLHttpRequest}],e=t.length;e--;)try{var i=t[e]();if(i)return t[e]}catch(t){}}();fabric.util.request=i}(),fabric.log=function(){},fabric.warn=function(){},"undefined"!=typeof console&&["log","warn"].forEach(function(t){"undefined"!=typeof console[t]&&"function"==typeof console[t].apply&&(fabric[t]=function(){return console[t].apply(console,arguments)})}),function(){function t(t){e(function(i){t||(t={});var r,n=i||+new Date,s=t.duration||500,o=n+s,a=t.onChange||function(){},h=t.abort||function(){return!1},c=t.easing||function(t,e,i,r){return-i*Math.cos(t/r*(Math.PI/2))+i+e},l="startValue"in t?t.startValue:0,u="endValue"in t?t.endValue:100,f=t.byValue||u-l;t.onStart&&t.onStart(),function i(u){r=u||+new Date;var d=r>o?s:r-n;return h()?void(t.onComplete&&t.onComplete()):(a(c(d,l,f,s)),r>o?void(t.onComplete&&t.onComplete()):void e(i))}(n)})}function e(){return i.apply(fabric.window,arguments)}var i=fabric.window.requestAnimationFrame||fabric.window.webkitRequestAnimationFrame||fabric.window.mozRequestAnimationFrame||fabric.window.oRequestAnimationFrame||fabric.window.msRequestAnimationFrame||function(t){fabric.window.setTimeout(t,1e3/60)};fabric.util.animate=t,fabric.util.requestAnimFrame=e}(),function(){function t(t,e,i){var r="rgba("+parseInt(t[0]+i*(e[0]-t[0]),10)+","+parseInt(t[1]+i*(e[1]-t[1]),10)+","+parseInt(t[2]+i*(e[2]-t[2]),10);return r+=","+(t&&e?parseFloat(t[3]+i*(e[3]-t[3])):1),r+=")"}function e(e,i,r,n){var s=new fabric.Color(e).getSource(),o=new fabric.Color(i).getSource();n=n||{},fabric.util.animate(fabric.util.object.extend(n,{duration:r||500,startValue:s,endValue:o,byValue:o,easing:function(e,i,r,s){var o=n.colorEasing?n.colorEasing(e,s):1-Math.cos(e/s*(Math.PI/2));return t(i,r,o)}}))}fabric.util.animateColor=e}(),function(){function t(t,e,i,r){return ta?a:o),1===o&&1===a&&0===h&&0===c&&0===f&&0===d)return y;if((f||d)&&(x=" translate("+_(f)+" "+_(d)+") "),r=x+" matrix("+o+" 0 0 "+a+" "+h*o+" "+c*a+") ","svg"===t.nodeName){for(n=t.ownerDocument.createElement("g");t.firstChild;)n.appendChild(t.firstChild);t.appendChild(n)}else n=t,r=n.getAttribute("transform")+r;return n.setAttribute("transform",r),y}function g(t,e){for(;t&&(t=t.parentNode);)if(t.nodeName&&e.test(t.nodeName.replace("svg:",""))&&!t.getAttribute("instantiated_by_use"))return!0;return!1}var p=t.fabric||(t.fabric={}),v=p.util.object.extend,m=p.util.object.clone,b=p.util.toFixed,_=p.util.parseUnit,y=p.util.multiplyTransformMatrices,x=/^(path|circle|polygon|polyline|ellipse|rect|line|image|text)$/i,C=/^(symbol|image|marker|pattern|view|svg)$/i,S=/^(?:pattern|defs|symbol|metadata|clipPath|mask)$/i,T=/^(symbol|g|a|svg)$/i,w={cx:"left",x:"left",r:"radius",cy:"top",y:"top",display:"visible",visibility:"visible",transform:"transformMatrix","fill-opacity":"fillOpacity","fill-rule":"fillRule","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","stroke-dasharray":"strokeDashArray","stroke-linecap":"strokeLineCap","stroke-linejoin":"strokeLineJoin","stroke-miterlimit":"strokeMiterLimit", +"stroke-opacity":"strokeOpacity","stroke-width":"strokeWidth","text-decoration":"textDecoration","text-anchor":"originX",opacity:"opacity"},O={stroke:"strokeOpacity",fill:"fillOpacity"};p.cssRules={},p.gradientDefs={},p.parseTransformAttribute=function(){function t(t,e){var i=Math.cos(e[0]),r=Math.sin(e[0]),n=0,s=0;3===e.length&&(n=e[1],s=e[2]),t[0]=i,t[1]=r,t[2]=-r,t[3]=i,t[4]=n-(i*n-r*s),t[5]=s-(r*n+i*s)}function e(t,e){var i=e[0],r=2===e.length?e[1]:e[0];t[0]=i,t[3]=r}function i(t,e,i){t[i]=Math.tan(p.util.degreesToRadians(e[0]))}function r(t,e){t[4]=e[0],2===e.length&&(t[5]=e[1])}var n=[1,0,0,1,0,0],s=p.reNum,o="(?:\\s+,?\\s*|,\\s*)",a="(?:(skewX)\\s*\\(\\s*("+s+")\\s*\\))",h="(?:(skewY)\\s*\\(\\s*("+s+")\\s*\\))",c="(?:(rotate)\\s*\\(\\s*("+s+")(?:"+o+"("+s+")"+o+"("+s+"))?\\s*\\))",l="(?:(scale)\\s*\\(\\s*("+s+")(?:"+o+"("+s+"))?\\s*\\))",u="(?:(translate)\\s*\\(\\s*("+s+")(?:"+o+"("+s+"))?\\s*\\))",f="(?:(matrix)\\s*\\(\\s*("+s+")"+o+"("+s+")"+o+"("+s+")"+o+"("+s+")"+o+"("+s+")"+o+"("+s+")\\s*\\))",d="(?:"+f+"|"+u+"|"+l+"|"+c+"|"+a+"|"+h+")",g="(?:"+d+"(?:"+o+"*"+d+")*)",v="^\\s*(?:"+g+"?)\\s*$",m=new RegExp(v),b=new RegExp(d,"g");return function(s){var o=n.concat(),a=[];if(!s||s&&!m.test(s))return o;s.replace(b,function(s){var h=new RegExp(d).exec(s).filter(function(t){return!!t}),c=h[1],l=h.slice(2).map(parseFloat);switch(c){case"translate":r(o,l);break;case"rotate":l[0]=p.util.degreesToRadians(l[0]),t(o,l);break;case"scale":e(o,l);break;case"skewX":i(o,l,2);break;case"skewY":i(o,l,1);break;case"matrix":o=l}a.push(o.concat()),o=n.concat()});for(var h=a[0];a.length>1;)a.shift(),h=p.util.multiplyTransformMatrices(h,a[0]);return h}}();var k=new RegExp("^\\s*("+p.reNum+"+)\\s*,?\\s*("+p.reNum+"+)\\s*,?\\s*("+p.reNum+"+)\\s*,?\\s*("+p.reNum+"+)\\s*$");p.parseSVGDocument=function(t,e,i,r){if(t){f(t);var n=p.Object.__uid++,s=d(t),o=p.util.toArray(t.getElementsByTagName("*"));if(s.crossOrigin=r&&r.crossOrigin,s.svgUid=n,0===o.length&&p.isLikelyNode){o=t.selectNodes('//*[name(.)!="svg"]');for(var a=[],h=0,c=o.length;h/i,""))),n&&n.documentElement||e&&e(null),p.parseSVGDocument(n.documentElement,function(t,i){e&&e(t,i)},i,r)}t=t.replace(/^\n\s*/,"").trim(),new p.util.request(t,{method:"get",onComplete:n})},loadSVGFromString:function(t,e,i,r){t=t.trim();var n;if("undefined"!=typeof DOMParser){var s=new DOMParser;s&&s.parseFromString&&(n=s.parseFromString(t,"text/xml"))}else p.window.ActiveXObject&&(n=new ActiveXObject("Microsoft.XMLDOM"),n.async="false",n.loadXML(t.replace(//i,"")));p.parseSVGDocument(n.documentElement,function(t,i){e(t,i)},i,r)}})}("undefined"!=typeof exports?exports:this),fabric.ElementsParser=function(t,e,i,r,n){this.elements=t,this.callback=e,this.options=i,this.reviver=r,this.svgUid=i&&i.svgUid||0,this.parsingOptions=n},fabric.ElementsParser.prototype.parse=function(){this.instances=new Array(this.elements.length),this.numElements=this.elements.length,this.createObjects()},fabric.ElementsParser.prototype.createObjects=function(){for(var t=0,e=this.elements.length;tt.x&&this.y>t.y},gte:function(t){return this.x>=t.x&&this.y>=t.y},lerp:function(t,i){return"undefined"==typeof i&&(i=.5),i=Math.max(Math.min(1,i),0),new e(this.x+(t.x-this.x)*i,this.y+(t.y-this.y)*i)},distanceFrom:function(t){var e=this.x-t.x,i=this.y-t.y;return Math.sqrt(e*e+i*i)},midPointFrom:function(t){return this.lerp(t)},min:function(t){return new e(Math.min(this.x,t.x),Math.min(this.y,t.y))},max:function(t){return new e(Math.max(this.x,t.x),Math.max(this.y,t.y))},toString:function(){return this.x+","+this.y},setXY:function(t,e){return this.x=t,this.y=e,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setFromPoint:function(t){return this.x=t.x,this.y=t.y,this},swap:function(t){var e=this.x,i=this.y;this.x=t.x,this.y=t.y,t.x=e,t.y=i},clone:function(){return new e(this.x,this.y)}}))}("undefined"!=typeof exports?exports:this),function(t){"use strict";function e(t){this.status=t,this.points=[]}var i=t.fabric||(t.fabric={});return i.Intersection?void i.warn("fabric.Intersection is already defined"):(i.Intersection=e,i.Intersection.prototype={constructor:e,appendPoint:function(t){return this.points.push(t),this},appendPoints:function(t){return this.points=this.points.concat(t),this}},i.Intersection.intersectLineLine=function(t,r,n,s){var o,a=(s.x-n.x)*(t.y-n.y)-(s.y-n.y)*(t.x-n.x),h=(r.x-t.x)*(t.y-n.y)-(r.y-t.y)*(t.x-n.x),c=(s.y-n.y)*(r.x-t.x)-(s.x-n.x)*(r.y-t.y);if(0!==c){var l=a/c,u=h/c;0<=l&&l<=1&&0<=u&&u<=1?(o=new e("Intersection"),o.appendPoint(new i.Point(t.x+l*(r.x-t.x),t.y+l*(r.y-t.y)))):o=new e}else o=new e(0===a||0===h?"Coincident":"Parallel");return o},i.Intersection.intersectLinePolygon=function(t,i,r){for(var n,s,o,a=new e,h=r.length,c=0;c0&&(a.status="Intersection"),a},i.Intersection.intersectPolygonPolygon=function(t,i){for(var r=new e,n=t.length,s=0;s0&&(r.status="Intersection"),r},void(i.Intersection.intersectPolygonRectangle=function(t,r,n){var s=r.min(n),o=r.max(n),a=new i.Point(o.x,s.y),h=new i.Point(s.x,o.y),c=e.intersectLinePolygon(s,a,t),l=e.intersectLinePolygon(a,o,t),u=e.intersectLinePolygon(o,h,t),f=e.intersectLinePolygon(h,s,t),d=new e;return d.appendPoints(c.points),d.appendPoints(l.points),d.appendPoints(u.points),d.appendPoints(f.points),d.points.length>0&&(d.status="Intersection"),d}))}("undefined"!=typeof exports?exports:this),function(t){"use strict";function e(t){t?this._tryParsingColor(t):this.setSource([0,0,0,1])}function i(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}var r=t.fabric||(t.fabric={});return r.Color?void r.warn("fabric.Color is already defined."):(r.Color=e,r.Color.prototype={_tryParsingColor:function(t){var i;t in e.colorNameMap&&(t=e.colorNameMap[t]),"transparent"===t&&(i=[255,255,255,0]),i||(i=e.sourceFromHex(t)),i||(i=e.sourceFromRgb(t)),i||(i=e.sourceFromHsl(t)),i||(i=[0,0,0,1]),i&&this.setSource(i)},_rgbToHsl:function(t,e,i){t/=255,e/=255,i/=255;var n,s,o,a=r.util.array.max([t,e,i]),h=r.util.array.min([t,e,i]);if(o=(a+h)/2,a===h)n=s=0;else{var c=a-h;switch(s=o>.5?c/(2-a-h):c/(a+h),a){case t:n=(e-i)/c+(e1?1:s,n){var o=n.split(/\s*;\s*/);""===o[o.length-1]&&o.pop();for(var a=o.length;a--;){var h=o[a].split(/\s*:\s*/),c=h[0].trim(),l=h[1].trim();"stop-color"===c?e=l:"stop-opacity"===c&&(r=l)}}return e||(e=t.getAttribute("stop-color")||"rgb(0,0,0)"),r||(r=t.getAttribute("stop-opacity")),e=new fabric.Color(e),i=e.getAlpha(),r=isNaN(parseFloat(r))?1:parseFloat(r),r*=i,{offset:s,color:e.toRgb(),opacity:r}}function e(t){return{x1:t.getAttribute("x1")||0,y1:t.getAttribute("y1")||0,x2:t.getAttribute("x2")||"100%",y2:t.getAttribute("y2")||0}}function i(t){return{x1:t.getAttribute("fx")||t.getAttribute("cx")||"50%",y1:t.getAttribute("fy")||t.getAttribute("cy")||"50%",r1:0,x2:t.getAttribute("cx")||"50%",y2:t.getAttribute("cy")||"50%",r2:t.getAttribute("r")||"50%"}}function r(t,e,i){var r,n=0,s=1,o="";for(var a in e)"Infinity"===e[a]?e[a]=1:"-Infinity"===e[a]&&(e[a]=0),r=parseFloat(e[a],10),s="string"==typeof e[a]&&/^\d+%$/.test(e[a])?.01:1,"x1"===a||"x2"===a||"r2"===a?(s*="objectBoundingBox"===i?t.width:1,n="objectBoundingBox"===i?t.left||0:0):"y1"!==a&&"y2"!==a||(s*="objectBoundingBox"===i?t.height:1,n="objectBoundingBox"===i?t.top||0:0),e[a]=r*s+n;if("ellipse"===t.type&&null!==e.r2&&"objectBoundingBox"===i&&t.rx!==t.ry){var h=t.ry/t.rx;o=" scale(1, "+h+")",e.y1&&(e.y1/=h),e.y2&&(e.y2/=h)}return o}var n=fabric.util.object.clone;fabric.Gradient=fabric.util.createClass({offsetX:0,offsetY:0,initialize:function(t){t||(t={});var e={};this.id=fabric.Object.__uid++,this.type=t.type||"linear",e={x1:t.coords.x1||0,y1:t.coords.y1||0,x2:t.coords.x2||0,y2:t.coords.y2||0},"radial"===this.type&&(e.r1=t.coords.r1||0,e.r2=t.coords.r2||0),this.coords=e,this.colorStops=t.colorStops.slice(),t.gradientTransform&&(this.gradientTransform=t.gradientTransform),this.offsetX=t.offsetX||this.offsetX,this.offsetY=t.offsetY||this.offsetY},addColorStop:function(t){for(var e in t){var i=new fabric.Color(t[e]);this.colorStops.push({offset:parseFloat(e),color:i.toRgb(),opacity:i.getAlpha()})}return this},toObject:function(t){var e={type:this.type,coords:this.coords,colorStops:this.colorStops,offsetX:this.offsetX,offsetY:this.offsetY,gradientTransform:this.gradientTransform?this.gradientTransform.concat():this.gradientTransform};return fabric.util.populateWithProperties(this,e,t),e},toSVG:function(t){var e,i,r=n(this.coords,!0),s=n(this.colorStops,!0),o=r.r1>r.r2;s.sort(function(t,e){return t.offset-e.offset});for(var a in r)"x1"===a||"x2"===a?r[a]+=this.offsetX-t.width/2:"y1"!==a&&"y2"!==a||(r[a]+=this.offsetY-t.height/2);if(i='id="SVGID_'+this.id+'" gradientUnits="userSpaceOnUse"',this.gradientTransform&&(i+=' gradientTransform="matrix('+this.gradientTransform.join(" ")+')" '),"linear"===this.type?e=["\n']:"radial"===this.type&&(e=["\n']),"radial"===this.type){if(o){s=s.concat(),s.reverse();for(var h=0;h0)for(var l=Math.max(r.r1,r.r2),u=c/l,h=0;h\n')}return e.push("linear"===this.type?"\n":"\n"),e.join("")},toLive:function(t){var e,i=fabric.util.object.clone(this.coords);if(this.type){"linear"===this.type?e=t.createLinearGradient(i.x1,i.y1,i.x2,i.y2):"radial"===this.type&&(e=t.createRadialGradient(i.x1,i.y1,i.r1,i.x2,i.y2,i.r2));for(var r=0,n=this.colorStops.length;r\n\n\n'},setOptions:function(t){for(var e in t)this[e]=t[e]},toLive:function(t){var e="function"==typeof this.source?this.source():this.source;if(!e)return"";if("undefined"!=typeof e.src){if(!e.complete)return"";if(0===e.naturalWidth||0===e.naturalHeight)return""}return t.createPattern(e,this.repeat)}})}(),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.toFixed;return e.Shadow?void e.warn("fabric.Shadow is already defined."):(e.Shadow=e.util.createClass({color:"rgb(0,0,0)",blur:0,offsetX:0,offsetY:0,affectStroke:!1,includeDefaultValues:!0,initialize:function(t){"string"==typeof t&&(t=this._parseShadow(t));for(var i in t)this[i]=t[i];this.id=e.Object.__uid++},_parseShadow:function(t){var i=t.trim(),r=e.Shadow.reOffsetsAndBlur.exec(i)||[],n=i.replace(e.Shadow.reOffsetsAndBlur,"")||"rgb(0,0,0)";return{color:n.trim(),offsetX:parseInt(r[1],10)||0,offsetY:parseInt(r[2],10)||0,blur:parseInt(r[3],10)||0}},toString:function(){return[this.offsetX,this.offsetY,this.blur,this.color].join("px ")},toSVG:function(t){var r=40,n=40,s=e.Object.NUM_FRACTION_DIGITS,o=e.util.rotateVector({x:this.offsetX,y:this.offsetY},e.util.degreesToRadians(-t.angle)),a=20;return t.width&&t.height&&(r=100*i((Math.abs(o.x)+this.blur)/t.width,s)+a,n=100*i((Math.abs(o.y)+this.blur)/t.height,s)+a),t.flipX&&(o.x*=-1),t.flipY&&(o.y*=-1),'\n\t\n\t\n\t\n\t\n\t\n\t\t\n\t\t\n\t\n\n'},toObject:function(){if(this.includeDefaultValues)return{color:this.color,blur:this.blur,offsetX:this.offsetX,offsetY:this.offsetY,affectStroke:this.affectStroke};var t={},i=e.Shadow.prototype;return["color","blur","offsetX","offsetY","affectStroke"].forEach(function(e){this[e]!==i[e]&&(t[e]=this[e])},this),t}}),void(e.Shadow.reOffsetsAndBlur=/(?:\s|^)(-?\d+(?:px)?(?:\s?|$))?(-?\d+(?:px)?(?:\s?|$))?(\d+(?:px)?)?(?:\s?|$)(?:$|\s)/))}("undefined"!=typeof exports?exports:this),function(){"use strict";if(fabric.StaticCanvas)return void fabric.warn("fabric.StaticCanvas is already defined.");var t=fabric.util.object.extend,e=fabric.util.getElementOffset,i=fabric.util.removeFromArray,r=fabric.util.toFixed,n=fabric.util.transformPoint,s=fabric.util.invertTransform,o=new Error("Could not initialize `canvas` element");fabric.StaticCanvas=fabric.util.createClass(fabric.CommonMethods,{initialize:function(t,e){e||(e={}),this._initStatic(t,e)},backgroundColor:"",backgroundImage:null,overlayColor:"",overlayImage:null,includeDefaultValues:!0,stateful:!1,renderOnAddRemove:!0,clipTo:null,controlsAboveOverlay:!1,allowTouchScrolling:!1,imageSmoothingEnabled:!0,viewportTransform:fabric.iMatrix.concat(),backgroundVpt:!0,overlayVpt:!0,onBeforeScaleRotate:function(){},enableRetinaScaling:!0,vptCoords:{},skipOffscreen:!0,_initStatic:function(t,e){var i=fabric.StaticCanvas.prototype.renderAll.bind(this);this._objects=[],this._createLowerCanvas(t),this._initOptions(e),this._setImageSmoothing(),this.interactive||this._initRetinaScaling(),e.overlayImage&&this.setOverlayImage(e.overlayImage,i),e.backgroundImage&&this.setBackgroundImage(e.backgroundImage,i),e.backgroundColor&&this.setBackgroundColor(e.backgroundColor,i),e.overlayColor&&this.setOverlayColor(e.overlayColor,i),this.calcOffset()},_isRetinaScaling:function(){return 1!==fabric.devicePixelRatio&&this.enableRetinaScaling},getRetinaScaling:function(){return this._isRetinaScaling()?fabric.devicePixelRatio:1},_initRetinaScaling:function(){this._isRetinaScaling()&&(this.lowerCanvasEl.setAttribute("width",this.width*fabric.devicePixelRatio),this.lowerCanvasEl.setAttribute("height",this.height*fabric.devicePixelRatio),this.contextContainer.scale(fabric.devicePixelRatio,fabric.devicePixelRatio))},calcOffset:function(){return this._offset=e(this.lowerCanvasEl),this},setOverlayImage:function(t,e,i){return this.__setBgOverlayImage("overlayImage",t,e,i)},setBackgroundImage:function(t,e,i){return this.__setBgOverlayImage("backgroundImage",t,e,i)},setOverlayColor:function(t,e){return this.__setBgOverlayColor("overlayColor",t,e)},setBackgroundColor:function(t,e){return this.__setBgOverlayColor("backgroundColor",t,e)},_setImageSmoothing:function(){var t=this.getContext();t.imageSmoothingEnabled=t.imageSmoothingEnabled||t.webkitImageSmoothingEnabled||t.mozImageSmoothingEnabled||t.msImageSmoothingEnabled||t.oImageSmoothingEnabled,t.imageSmoothingEnabled=this.imageSmoothingEnabled},__setBgOverlayImage:function(t,e,i,r){return"string"==typeof e?fabric.util.loadImage(e,function(e){e&&(this[t]=new fabric.Image(e,r)),i&&i(e)},this,r&&r.crossOrigin):(r&&e.setOptions(r),this[t]=e,i&&i(e)),this},__setBgOverlayColor:function(t,e,i){return this[t]=e,this._initGradient(e,t),this._initPattern(e,t,i),this},_createCanvasElement:function(t){var e=fabric.util.createCanvasElement(t);if(e.style||(e.style={}),!e)throw o;if("undefined"==typeof e.getContext)throw o;return e},_initOptions:function(t){this._setOptions(t),this.width=this.width||parseInt(this.lowerCanvasEl.width,10)||0,this.height=this.height||parseInt(this.lowerCanvasEl.height,10)||0,this.lowerCanvasEl.style&&(this.lowerCanvasEl.width=this.width,this.lowerCanvasEl.height=this.height,this.lowerCanvasEl.style.width=this.width+"px",this.lowerCanvasEl.style.height=this.height+"px",this.viewportTransform=this.viewportTransform.slice())},_createLowerCanvas:function(t){this.lowerCanvasEl=fabric.util.getById(t)||this._createCanvasElement(t),fabric.util.addClass(this.lowerCanvasEl,"lower-canvas"),this.interactive&&this._applyCanvasStyle(this.lowerCanvasEl),this.contextContainer=this.lowerCanvasEl.getContext("2d")},getWidth:function(){return this.width},getHeight:function(){return this.height},setWidth:function(t,e){return this.setDimensions({width:t},e)},setHeight:function(t,e){return this.setDimensions({height:t},e)},setDimensions:function(t,e){var i;e=e||{};for(var r in t)i=t[r],e.cssOnly||(this._setBackstoreDimension(r,t[r]),i+="px"),e.backstoreOnly||this._setCssDimension(r,i);return this._initRetinaScaling(),this._setImageSmoothing(),this.calcOffset(),e.cssOnly||this.renderAll(),this},_setBackstoreDimension:function(t,e){return this.lowerCanvasEl[t]=e,this.upperCanvasEl&&(this.upperCanvasEl[t]=e),this.cacheCanvasEl&&(this.cacheCanvasEl[t]=e),this[t]=e,this},_setCssDimension:function(t,e){return this.lowerCanvasEl.style[t]=e,this.upperCanvasEl&&(this.upperCanvasEl.style[t]=e),this.wrapperEl&&(this.wrapperEl.style[t]=e),this},getZoom:function(){return this.viewportTransform[0]},setViewportTransform:function(t){var e,i=this._activeGroup,r=!1,n=!0;this.viewportTransform=t;for(var s=0,o=this._objects.length;s"),i.join("")},_setSVGPreamble:function(t,e){e.suppressPreamble||t.push('\n','\n')},_setSVGHeader:function(t,e){var i,n=e.width||this.width,s=e.height||this.height,o='viewBox="0 0 '+this.width+" "+this.height+'" ',a=fabric.Object.NUM_FRACTION_DIGITS;e.viewBox?o='viewBox="'+e.viewBox.x+" "+e.viewBox.y+" "+e.viewBox.width+" "+e.viewBox.height+'" ':this.svgViewportTransformation&&(i=this.viewportTransform,o='viewBox="'+r(-i[4]/i[0],a)+" "+r(-i[5]/i[3],a)+" "+r(this.width/i[0],a)+" "+r(this.height/i[3],a)+'" '),t.push("\n',"Created with Fabric.js ",fabric.version,"\n","\n",this.createSVGFontFacesMarkup(),this.createSVGRefElementsMarkup(),"\n")},createSVGRefElementsMarkup:function(){var t=this,e=["backgroundColor","overlayColor"].map(function(e){var i=t[e];if(i&&i.toLive)return i.toSVG(t,!1)});return e.join("")},createSVGFontFacesMarkup:function(){for(var t,e,i,r,n,s,o,a="",h={},c=fabric.fontPaths,l=this.getObjects(),u=0,f=l.length;u',"\n",a,"","\n"].join("")),a},_setSVGObjects:function(t,e){for(var i,r=0,n=this.getObjects(),s=n.length;r\n")}else t.push('\n")},sendToBack:function(t){if(!t)return this;var e,r,n,s=this._activeGroup;if(t===s)for(n=s._objects,e=n.length;e--;)r=n[e],i(this._objects,r),this._objects.unshift(r);else i(this._objects,t),this._objects.unshift(t);return this.renderAll&&this.renderAll()},bringToFront:function(t){if(!t)return this;var e,r,n,s=this._activeGroup;if(t===s)for(n=s._objects,e=0;e=0;--n){var s=t.intersectsWithObject(this._objects[n])||t.isContainedWithinObject(this._objects[n])||this._objects[n].isContainedWithinObject(t);if(s){r=n;break}}}else r=e-1;return r},bringForward:function(t,e){if(!t)return this;var r,n,s,o,a,h=this._activeGroup;if(t===h)for(a=h._objects,r=a.length;r--;)n=a[r],s=this._objects.indexOf(n),s!==this._objects.length-1&&(o=s+1,i(this._objects,n),this._objects.splice(o,0,n));else s=this._objects.indexOf(t),s!==this._objects.length-1&&(o=this._findNewUpperIndex(t,s,e),i(this._objects,t),this._objects.splice(o,0,t));return this.renderAll&&this.renderAll(),this},_findNewUpperIndex:function(t,e,i){var r;if(i){r=e;for(var n=e+1;n"}}),t(fabric.StaticCanvas.prototype,fabric.Observable),t(fabric.StaticCanvas.prototype,fabric.Collection),t(fabric.StaticCanvas.prototype,fabric.DataURLExporter),t(fabric.StaticCanvas,{EMPTY_JSON:'{"objects": [], "background": "white"}',supports:function(t){var e=fabric.util.createCanvasElement();if(!e||!e.getContext)return null;var i=e.getContext("2d");if(!i)return null;switch(t){case"getImageData":return"undefined"!=typeof i.getImageData;case"setLineDash":return"undefined"!=typeof i.setLineDash;case"toDataURL":return"undefined"!=typeof e.toDataURL;case"toDataURLWithQuality":try{return e.toDataURL("image/jpeg",0),!0}catch(t){}return!1;default:return null}}}),fabric.StaticCanvas.prototype.toJSON=fabric.StaticCanvas.prototype.toObject}(),fabric.BaseBrush=fabric.util.createClass({color:"rgb(0, 0, 0)",width:1,shadow:null,strokeLineCap:"round",strokeLineJoin:"round",strokeDashArray:null,setShadow:function(t){return this.shadow=new fabric.Shadow(t),this},_setBrushStyles:function(){var t=this.canvas.contextTop;t.strokeStyle=this.color,t.lineWidth=this.width,t.lineCap=this.strokeLineCap,t.lineJoin=this.strokeLineJoin,this.strokeDashArray&&fabric.StaticCanvas.supports("setLineDash")&&t.setLineDash(this.strokeDashArray)},_setShadow:function(){if(this.shadow){var t=this.canvas.contextTop,e=this.canvas.getZoom();t.shadowColor=this.shadow.color,t.shadowBlur=this.shadow.blur*e,t.shadowOffsetX=this.shadow.offsetX*e,t.shadowOffsetY=this.shadow.offsetY*e}},_resetShadow:function(){var t=this.canvas.contextTop;t.shadowColor="",t.shadowBlur=t.shadowOffsetX=t.shadowOffsetY=0}}),function(){fabric.PencilBrush=fabric.util.createClass(fabric.BaseBrush,{initialize:function(t){this.canvas=t,this._points=[]},onMouseDown:function(t){this._prepareForDrawing(t),this._captureDrawingPath(t),this._render()},onMouseMove:function(t){this._captureDrawingPath(t),this.canvas.clearContext(this.canvas.contextTop),this._render()},onMouseUp:function(){this._finalizeAndAddPath()},_prepareForDrawing:function(t){var e=new fabric.Point(t.x,t.y);this._reset(),this._addPoint(e),this.canvas.contextTop.moveTo(e.x,e.y)},_addPoint:function(t){this._points.push(t)},_reset:function(){this._points.length=0,this._setBrushStyles(),this._setShadow()},_captureDrawingPath:function(t){var e=new fabric.Point(t.x,t.y);this._addPoint(e)},_render:function(){var t=this.canvas.contextTop,e=this.canvas.viewportTransform,i=this._points[0],r=this._points[1];t.save(),t.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t.beginPath(),2===this._points.length&&i.x===r.x&&i.y===r.y&&(i.x-=.5,r.x+=.5),t.moveTo(i.x,i.y);for(var n=1,s=this._points.length;n0?1:-1,"y"===i&&(s=e.target.skewY,o="top",a="bottom",r="originY"),n[-1]=o,n[1]=a,e.target.flipX&&(c*=-1),e.target.flipY&&(c*=-1),0===s?(e.skewSign=-h*t*c,e[r]=n[-t]):(s=s>0?1:-1,e.skewSign=s,e[r]=n[s*h*c])},_skewObject:function(t,e,i){var r=this._currentTransform,n=r.target,s=!1,o=n.get("lockSkewingX"),a=n.get("lockSkewingY");if(o&&"x"===i||a&&"y"===i)return!1;var h,c,l=n.getCenterPoint(),u=n.toLocalPoint(new fabric.Point(t,e),"center","center")[i],f=n.toLocalPoint(new fabric.Point(r.lastX,r.lastY),"center","center")[i],d=n._getTransformedDimensions();return this._changeSkewTransformOrigin(u-f,r,i),h=n.toLocalPoint(new fabric.Point(t,e),r.originX,r.originY)[i],c=n.translateToOriginPoint(l,r.originX,r.originY),s=this._setObjectSkew(h,r,i,d),r.lastX=t,r.lastY=e,n.setPositionByOrigin(c,r.originX,r.originY),s},_setObjectSkew:function(t,e,i,r){var n,s,o,a,h,c,l,u,f,d=e.target,g=!1,p=e.skewSign;return"x"===i?(a="y",h="Y",c="X",u=0,f=d.skewY):(a="x",h="X",c="Y",u=d.skewX,f=0),o=d._getTransformedDimensions(u,f),l=2*Math.abs(t)-o[i],l<=2?n=0:(n=p*Math.atan(l/d["scale"+c]/(o[a]/d["scale"+h])),n=fabric.util.radiansToDegrees(n)),g=d["skew"+c]!==n,d.set("skew"+c,n),0!==d["skew"+h]&&(s=d._getTransformedDimensions(),n=r[a]/s[a]*d["scale"+h],d.set("scale"+h,n)),g},_scaleObject:function(t,e,i){var r=this._currentTransform,n=r.target,s=n.get("lockScalingX"),o=n.get("lockScalingY"),a=n.get("lockScalingFlip");if(s&&o)return!1;var h=n.translateToOriginPoint(n.getCenterPoint(),r.originX,r.originY),c=n.toLocalPoint(new fabric.Point(t,e),r.originX,r.originY),l=n._getTransformedDimensions(),u=!1;return this._setLocalMouse(c,r),u=this._setObjectScale(c,r,s,o,i,a,l),n.setPositionByOrigin(h,r.originX,r.originY),u},_setObjectScale:function(t,e,i,r,n,s,o){var a,h,c,l,u=e.target,f=!1,d=!1,g=!1;return c=t.x*u.scaleX/o.x,l=t.y*u.scaleY/o.y,a=u.scaleX!==c,h=u.scaleY!==l,s&&c<=0&&cs?t.x<0?t.x+=s:t.x-=s:t.x=0,n(t.y)>s?t.y<0?t.y+=s:t.y-=s:t.y=0},_rotateObject:function(t,e){var n=this._currentTransform;if(n.target.get("lockRotation"))return!1;var s=r(n.ey-n.top,n.ex-n.left),o=r(e-n.top,t-n.left),a=i(o-s+n.theta),h=!0;if(n.target.snapAngle>0){var c=n.target.snapAngle,l=n.target.snapThreshold||c,u=Math.ceil(a/c)*c,f=Math.floor(a/c)*c;Math.abs(a-f)0?0:-i),e.ey-(r>0?0:-r),a,h)),this.selectionLineWidth&&this.selectionBorderColor)if(t.lineWidth=this.selectionLineWidth,t.strokeStyle=this.selectionBorderColor,this.selectionDashArray.length>1&&!s){var c=e.ex+o-(i>0?0:a),l=e.ey+o-(r>0?0:h);t.beginPath(),fabric.util.drawDashedLine(t,c,l,c+a,l,this.selectionDashArray),fabric.util.drawDashedLine(t,c,l+h-1,c+a,l+h-1,this.selectionDashArray),fabric.util.drawDashedLine(t,c,l,c,l+h,this.selectionDashArray),fabric.util.drawDashedLine(t,c+a-1,l,c+a-1,l+h,this.selectionDashArray),t.closePath(),t.stroke()}else fabric.Object.prototype._setLineDash.call(this,t,this.selectionDashArray),t.strokeRect(e.ex+o-(i>0?0:a),e.ey+o-(r>0?0:h),a,h)},findTarget:function(t,e){if(!this.skipTargetFind){var i,r=!0,n=this.getPointer(t,r),s=this.getActiveGroup(),o=this.getActiveObject();if(this.targets=[],s&&!e&&s===this._searchPossibleTargets([s],n))return this._fireOverOutEvents(s,t),s;if(o&&o._findTargetCorner(n))return this._fireOverOutEvents(o,t),o;if(o&&o===this._searchPossibleTargets([o],n)){if(!this.preserveObjectStacking)return this._fireOverOutEvents(o,t),o;i=o}var a=this._searchPossibleTargets(this._objects,n);return t[this.altSelectionKey]&&a&&i&&a!==i&&(a=i),this._fireOverOutEvents(a,t),a}},_fireOverOutEvents:function(t,e){var i,r,n=this._hoveredTarget;n!==t&&(i={e:e,target:t,previousTarget:this._hoveredTarget},r={e:e,target:this._hoveredTarget,nextTarget:t},this._hoveredTarget=t),t?n!==t&&(n&&(this.fire("mouse:out",r),n.fire("mouseout",r)),this.fire("mouse:over",i),t.fire("mouseover",i)):n&&(this.fire("mouse:out",r),n.fire("mouseout",r))},_checkTarget:function(t,e){if(e&&e.visible&&e.evented&&this.containsPoint(null,e,t)){if(!this.perPixelTargetFind&&!e.perPixelTargetFind||e.isEditing)return!0;var i=this.isTargetTransparent(e,t.x,t.y);if(!i)return!0}},_searchPossibleTargets:function(t,e){for(var i,r,n,s=t.length;s--;)if(this._checkTarget(e,t[s])){i=t[s],"group"===i.type&&i.subTargetCheck&&(r=this._normalizePointer(i,e),n=this._searchPossibleTargets(i._objects,r),n&&this.targets.push(n));break}return i},restorePointerVpt:function(t){return fabric.util.transformPoint(t,fabric.util.invertTransform(this.viewportTransform))},getPointer:function(e,i,r){r||(r=this.upperCanvasEl);var n,s=t(e),o=r.getBoundingClientRect(),a=o.width||0,h=o.height||0;return a&&h||("top"in o&&"bottom"in o&&(h=Math.abs(o.top-o.bottom)),"right"in o&&"left"in o&&(a=Math.abs(o.right-o.left))),this.calcOffset(),s.x=s.x-this._offset.left,s.y=s.y-this._offset.top,i||(s=this.restorePointerVpt(s)),n=0===a||0===h?{width:1,height:1}:{width:r.width/a,height:r.height/h},{x:s.x*n.width,y:s.y*n.height}},_createUpperCanvas:function(){var t=this.lowerCanvasEl.className.replace(/\s*lower-canvas\s*/,"");this.upperCanvasEl=this._createCanvasElement(),fabric.util.addClass(this.upperCanvasEl,"upper-canvas "+t),this.wrapperEl.appendChild(this.upperCanvasEl),this._copyCanvasStyle(this.lowerCanvasEl,this.upperCanvasEl),this._applyCanvasStyle(this.upperCanvasEl),this.contextTop=this.upperCanvasEl.getContext("2d")},_createCacheCanvas:function(){this.cacheCanvasEl=this._createCanvasElement(),this.cacheCanvasEl.setAttribute("width",this.width),this.cacheCanvasEl.setAttribute("height",this.height),this.contextCache=this.cacheCanvasEl.getContext("2d")},_initWrapperElement:function(){this.wrapperEl=fabric.util.wrapElement(this.lowerCanvasEl,"div",{class:this.containerClass}),fabric.util.setStyle(this.wrapperEl,{width:this.getWidth()+"px",height:this.getHeight()+"px",position:"relative"}),fabric.util.makeElementUnselectable(this.wrapperEl)},_applyCanvasStyle:function(t){var e=this.getWidth()||t.width,i=this.getHeight()||t.height;fabric.util.setStyle(t,{position:"absolute",width:e+"px",height:i+"px",left:0,top:0,"touch-action":"none"}),t.width=e,t.height=i,fabric.util.makeElementUnselectable(t)},_copyCanvasStyle:function(t,e){e.style.cssText=t.style.cssText},getSelectionContext:function(){return this.contextTop},getSelectionElement:function(){return this.upperCanvasEl},_setActiveObject:function(t){var e=this._activeObject;e&&(e.set("active",!1),t!==e&&e.onDeselect&&"function"==typeof e.onDeselect&&e.onDeselect()),this._activeObject=t,t.set("active",!0)},setActiveObject:function(t,e){var i=this.getActiveObject();return i&&i!==t&&i.fire("deselected",{e:e}),this._setActiveObject(t),this.fire("object:selected",{target:t,e:e}),t.fire("selected",{e:e}),this.renderAll(),this},getActiveObject:function(){return this._activeObject},_onObjectRemoved:function(t){this.getActiveObject()===t&&(this.fire("before:selection:cleared",{target:t}),this._discardActiveObject(),this.fire("selection:cleared",{target:t}),t.fire("deselected")),this._hoveredTarget===t&&(this._hoveredTarget=null),this.callSuper("_onObjectRemoved",t)},_discardActiveObject:function(){var t=this._activeObject;t&&(t.set("active",!1),t.onDeselect&&"function"==typeof t.onDeselect&&t.onDeselect()),this._activeObject=null},discardActiveObject:function(t){var e=this._activeObject;return e&&(this.fire("before:selection:cleared",{target:e,e:t}),this._discardActiveObject(),this.fire("selection:cleared",{e:t}),e.fire("deselected",{e:t})),this},_setActiveGroup:function(t){this._activeGroup=t,t&&t.set("active",!0)},setActiveGroup:function(t,e){return this._setActiveGroup(t),t&&(this.fire("object:selected",{target:t,e:e}),t.fire("selected",{e:e})),this},getActiveGroup:function(){return this._activeGroup},_discardActiveGroup:function(){var t=this.getActiveGroup();t&&t.destroy(),this.setActiveGroup(null)},discardActiveGroup:function(t){var e=this.getActiveGroup();return e&&(this.fire("before:selection:cleared",{e:t,target:e}),this._discardActiveGroup(),this.fire("selection:cleared",{e:t})),this},deactivateAll:function(){for(var t,e=this.getObjects(),i=0,r=e.length;i1)){var r=this._groupSelector;r?(i=this.getPointer(t,!0),r.left=i.x-r.ex,r.top=i.y-r.ey,this.renderTop()):this._currentTransform?this._transformObject(t):(e=this.findTarget(t),this._setCursorFromEvent(t,e)),this._handleEvent(t,"move",e?e:null)}},__onMouseWheel:function(t){this._handleEvent(t,"wheel")},_transformObject:function(t){var e=this.getPointer(t),i=this._currentTransform;i.reset=!1,i.target.isMoving=!0,i.shiftKey=t.shiftKey,i.altKey=t[this.centeredKey],this._beforeScaleTransform(t,i),this._performTransformAction(t,i,e),i.actionPerformed&&this.renderAll()},_performTransformAction:function(t,e,i){var r=i.x,n=i.y,s=e.target,o=e.action,a=!1;"rotate"===o?(a=this._rotateObject(r,n))&&this._fire("rotating",s,t):"scale"===o?(a=this._onScale(t,e,r,n))&&this._fire("scaling",s,t):"scaleX"===o?(a=this._scaleObject(r,n,"x"))&&this._fire("scaling",s,t):"scaleY"===o?(a=this._scaleObject(r,n,"y"))&&this._fire("scaling",s,t):"skewX"===o?(a=this._skewObject(r,n,"x"))&&this._fire("skewing",s,t):"skewY"===o?(a=this._skewObject(r,n,"y"))&&this._fire("skewing",s,t):(a=this._translateObject(r,n),a&&(this._fire("moving",s,t),this.setCursor(s.moveCursor||this.moveCursor))),e.actionPerformed=e.actionPerformed||a},_fire:function(t,e,i){this.fire("object:"+t,{target:e,e:i}),e.fire(t,{e:i})},_beforeScaleTransform:function(t,e){if("scale"===e.action||"scaleX"===e.action||"scaleY"===e.action){var i=this._shouldCenterTransform(e.target);(i&&("center"!==e.originX||"center"!==e.originY)||!i&&"center"===e.originX&&"center"===e.originY)&&(this._resetCurrentTransform(),e.reset=!0)}},_onScale:function(t,e,i,r){return!t[this.uniScaleKey]&&!this.uniScaleTransform||e.target.get("lockUniScaling")?(e.reset||"scale"!==e.currentAction||this._resetCurrentTransform(),e.currentAction="scaleEqually",this._scaleObject(i,r,"equally")):(e.currentAction="scale",this._scaleObject(i,r))},_setCursorFromEvent:function(t,e){if(!e||!e.selectable)return this.setCursor(this.defaultCursor),!1;var i=e.hoverCursor||this.hoverCursor,r=this.getActiveGroup(),n=e._findTargetCorner&&(!r||!r.contains(e))&&e._findTargetCorner(this.getPointer(t,!0));return n?this._setCornerCursor(n,e,t):this.setCursor(i),!0},_setCornerCursor:function(t,i,r){if(t in e)this.setCursor(this._getRotatedCornerCursor(t,i,r));else{if("mtr"!==t||!i.hasRotatingPoint)return this.setCursor(this.defaultCursor),!1;this.setCursor(this.rotationCursor)}},_getRotatedCornerCursor:function(t,i,r){var n=Math.round(i.getAngle()%360/45);return n<0&&(n+=8),n+=e[t],r[this.altActionKey]&&e[t]%2===0&&(n+=2),n%=8,this.cursorMap[n]}})}(),function(){var t=Math.min,e=Math.max;fabric.util.object.extend(fabric.Canvas.prototype,{_shouldGroup:function(t,e){var i=this.getActiveObject();return t[this.selectionKey]&&e&&e.selectable&&(this.getActiveGroup()||i&&i!==e)&&this.selection},_handleGrouping:function(t,e){var i=this.getActiveGroup();(e!==i||(e=this.findTarget(t,!0)))&&(i?this._updateActiveGroup(e,t):this._createActiveGroup(e,t))},_updateActiveGroup:function(t,e){var i=this.getActiveGroup();if(i.contains(t)){if(i.removeWithUpdate(t),t.set("active",!1),1===i.size())return this.discardActiveGroup(e),void this.setActiveObject(i.item(0),e)}else i.addWithUpdate(t);this.fire("selection:created",{target:i,e:e}),i.set("active",!0)},_createActiveGroup:function(t,e){if(this._activeObject&&t!==this._activeObject){var i=this._createGroup(t);i.addWithUpdate(),this.setActiveGroup(i,e),this._activeObject=null,this.fire("selection:created",{target:i,e:e})}t.set("active",!0)},_createGroup:function(t){var e=this.getObjects(),i=e.indexOf(this._activeObject)1&&(e=new fabric.Group(e.reverse(),{canvas:this}),e.addWithUpdate(),this.setActiveGroup(e,t),this.fire("selection:created",{target:e,e:t}),this.renderAll())},_collectObjects:function(){for(var i,r=[],n=this._groupSelector.ex,s=this._groupSelector.ey,o=n+this._groupSelector.left,a=s+this._groupSelector.top,h=new fabric.Point(t(n,o),t(s,a)),c=new fabric.Point(e(n,o),e(s,a)),l=n===o&&s===a,u=this._objects.length;u--&&(i=this._objects[u],!(i&&i.selectable&&i.visible&&(i.intersectsWithRect(h,c)||i.isContainedWithinRect(h,c)||i.containsPoint(h)||i.containsPoint(c))&&(i.set("active",!0),r.push(i),l))););return r},_maybeGroupObjects:function(t){this.selection&&this._groupSelector&&this._groupSelectedObjects(t);var e=this.getActiveGroup();e&&(e.setObjectsCoords().setCoords(),e.isMoving=!1,this.setCursor(this.defaultCursor)),this._groupSelector=null,this._currentTransform=null}})}(),function(){var t=fabric.StaticCanvas.supports("toDataURLWithQuality");fabric.util.object.extend(fabric.StaticCanvas.prototype,{toDataURL:function(t){t||(t={});var e=t.format||"png",i=t.quality||1,r=t.multiplier||1,n={left:t.left||0,top:t.top||0,width:t.width||0,height:t.height||0};return this.__toDataURLWithMultiplier(e,i,n,r)},__toDataURLWithMultiplier:function(t,e,i,r){var n=this.getWidth(),s=this.getHeight(),o=(i.width||this.getWidth())*r,a=(i.height||this.getHeight())*r,h=this.getZoom(),c=h*r,l=this.viewportTransform,u=(l[4]-i.left)*r,f=(l[5]-i.top)*r,d=[c,0,0,c,u,f],g=this.interactive;this.viewportTransform=d,this.interactive&&(this.interactive=!1),n!==o||s!==a?this.setDimensions({width:o,height:a}):this.renderAll();var p=this.__toDataURL(t,e,i);return g&&(this.interactive=g),this.viewportTransform=l,this.setDimensions({width:n,height:s}),p},__toDataURL:function(e,i){var r=this.contextContainer.canvas;"jpg"===e&&(e="jpeg");var n=t?r.toDataURL("image/"+e,i):r.toDataURL("image/"+e);return n},toDataURLWithMultiplier:function(t,e,i){return this.toDataURL({format:t,multiplier:e,quality:i})}})}(),fabric.util.object.extend(fabric.StaticCanvas.prototype,{loadFromDatalessJSON:function(t,e,i){return this.loadFromJSON(t,e,i)},loadFromJSON:function(t,e,i){if(t){var r="string"==typeof t?JSON.parse(t):fabric.util.object.clone(t);this.clear();var n=this;return this._enlivenObjects(r.objects,function(){n._setBgOverlay(r,function(){delete r.objects,delete r.backgroundImage,delete r.overlayImage,delete r.background,delete r.overlay,n._setOptions(r),e&&e()})},i),this}},_setBgOverlay:function(t,e){var i=this,r={backgroundColor:!1,overlayColor:!1,backgroundImage:!1,overlayImage:!1};if(!(t.backgroundImage||t.overlayImage||t.background||t.overlay))return void(e&&e());var n=function(){r.backgroundImage&&r.overlayImage&&r.backgroundColor&&r.overlayColor&&(i.renderAll(),e&&e())};this.__setBgOverlay("backgroundImage",t.backgroundImage,r,n),this.__setBgOverlay("overlayImage",t.overlayImage,r,n),this.__setBgOverlay("backgroundColor",t.background,r,n),this.__setBgOverlay("overlayColor",t.overlay,r,n)},__setBgOverlay:function(t,e,i,r){var n=this;return e?void("backgroundImage"===t||"overlayImage"===t?fabric.util.enlivenObjects([e],function(e){n[t]=e[0],i[t]=!0,r&&r()}):this["set"+fabric.util.string.capitalize(t,!0)](e,function(){i[t]=!0,r&&r()})):(i[t]=!0,void(r&&r()))},_enlivenObjects:function(t,e,i){var r=this;if(!t||0===t.length)return void(e&&e());var n=this.renderOnAddRemove;this.renderOnAddRemove=!1,fabric.util.enlivenObjects(t,function(t){t.forEach(function(t,e){r.insertAt(t,e)}),r.renderOnAddRemove=n,e&&e()},null,i)},_toDataURL:function(t,e){this.clone(function(i){e(i.toDataURL(t))})},_toDataURLWithMultiplier:function(t,e,i){this.clone(function(r){i(r.toDataURLWithMultiplier(t,e))})},clone:function(t,e){var i=JSON.stringify(this.toJSON(e));this.cloneWithoutData(function(e){e.loadFromJSON(i,function(){t&&t(e)})})},cloneWithoutData:function(t){var e=fabric.document.createElement("canvas");e.width=this.getWidth(),e.height=this.getHeight();var i=new fabric.Canvas(e);i.clipTo=this.clipTo,this.backgroundImage?(i.setBackgroundImage(this.backgroundImage.src,function(){i.renderAll(),t&&t(i)}),i.backgroundImageOpacity=this.backgroundImageOpacity,i.backgroundImageStretch=this.backgroundImageStretch):t&&t(i)}}),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.object.extend,r=e.util.object.clone,n=e.util.toFixed,s=e.util.string.capitalize,o=e.util.degreesToRadians,a=e.StaticCanvas.supports("setLineDash"),h=!e.isLikelyNode;e.Object||(e.Object=e.util.createClass(e.CommonMethods,{type:"object",originX:"left",originY:"top",top:0,left:0,width:0,height:0,scaleX:1,scaleY:1,flipX:!1,flipY:!1,opacity:1,angle:0,skewX:0,skewY:0,cornerSize:13,transparentCorners:!0,hoverCursor:null,moveCursor:null,padding:0,borderColor:"rgba(102,153,255,0.75)",borderDashArray:null,cornerColor:"rgba(102,153,255,0.5)",cornerStrokeColor:null,cornerStyle:"rect",cornerDashArray:null,centeredScaling:!1,centeredRotation:!0,fill:"rgb(0,0,0)",fillRule:"nonzero",globalCompositeOperation:"source-over",backgroundColor:"",selectionBackgroundColor:"",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeLineJoin:"miter",strokeMiterLimit:10,shadow:null,borderOpacityWhenMoving:.4,borderScaleFactor:1,transformMatrix:null,minScaleLimit:.01,selectable:!0,evented:!0,visible:!0,hasControls:!0,hasBorders:!0,hasRotatingPoint:!0,rotatingPointOffset:40,perPixelTargetFind:!1,includeDefaultValues:!0,clipTo:null,lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingX:!1,lockScalingY:!1,lockUniScaling:!1,lockSkewingX:!1,lockSkewingY:!1,lockScalingFlip:!1,excludeFromExport:!1,objectCaching:h,statefullCache:!1,noScaleCache:!0,dirty:!0,needsItsOwnCache:!1,stateProperties:"top left width height scaleX scaleY flipX flipY originX originY transformMatrix stroke strokeWidth strokeDashArray strokeLineCap strokeLineJoin strokeMiterLimit angle opacity fill fillRule globalCompositeOperation shadow clipTo visible backgroundColor skewX skewY".split(" "),cacheProperties:"fill stroke strokeWidth strokeDashArray width height stroke strokeWidth strokeDashArray strokeLineCap strokeLineJoin strokeMiterLimit fillRule backgroundColor".split(" "),initialize:function(t){t=t||{},t&&this.setOptions(t),this.objectCaching&&this._createCacheCanvas()},_createCacheCanvas:function(){this._cacheProperties={},this._cacheCanvas=e.document.createElement("canvas"),this._cacheContext=this._cacheCanvas.getContext("2d"),this._updateCacheCanvas()},_getCacheCanvasDimensions:function(){var t=this.canvas&&this.canvas.getZoom()||1,i=this.getObjectScaling(),r=this._getNonTransformedDimensions(),n=this.canvas&&this.canvas._isRetinaScaling()?e.devicePixelRatio:1,s=i.scaleX*t*n,o=i.scaleY*t*n,a=r.x*s,h=r.y*o;return{width:a+2,height:h+2,zoomX:s,zoomY:o}},_updateCacheCanvas:function(){if(this.noScaleCache&&this.canvas&&this.canvas._currentTransform){var t=this.canvas._currentTransform.action;if("scale"===t.slice(0,5))return!1}var e=this._getCacheCanvasDimensions(),i=e.width,r=e.height,n=e.zoomX,s=e.zoomY;return(i!==this.cacheWidth||r!==this.cacheHeight)&&(this._cacheCanvas.width=Math.ceil(i),this._cacheCanvas.height=Math.ceil(r),this._cacheContext.translate(i/2,r/2),this._cacheContext.scale(n,s),this.cacheWidth=i,this.cacheHeight=r,this.zoomX=n,this.zoomY=s,!0)},setOptions:function(t){this._setOptions(t),this._initGradient(t.fill,"fill"),this._initGradient(t.stroke,"stroke"),this._initClipping(t),this._initPattern(t.fill,"fill"),this._initPattern(t.stroke,"stroke")},transform:function(t,e){this.group&&!this.group._transformDone&&this.group.transform(t);var i=e?this._getLeftTopCoords():this.getCenterPoint();t.translate(i.x,i.y),this.angle&&t.rotate(o(this.angle)),t.scale(this.scaleX*(this.flipX?-1:1),this.scaleY*(this.flipY?-1:1)),this.skewX&&t.transform(1,0,Math.tan(o(this.skewX)),1,0,0),this.skewY&&t.transform(1,Math.tan(o(this.skewY)),0,1,0,0)},toObject:function(t){var i=e.Object.NUM_FRACTION_DIGITS,r={type:this.type,originX:this.originX,originY:this.originY,left:n(this.left,i),top:n(this.top,i),width:n(this.width,i),height:n(this.height,i),fill:this.fill&&this.fill.toObject?this.fill.toObject():this.fill,stroke:this.stroke&&this.stroke.toObject?this.stroke.toObject():this.stroke,strokeWidth:n(this.strokeWidth,i),strokeDashArray:this.strokeDashArray?this.strokeDashArray.concat():this.strokeDashArray,strokeLineCap:this.strokeLineCap,strokeLineJoin:this.strokeLineJoin,strokeMiterLimit:n(this.strokeMiterLimit,i),scaleX:n(this.scaleX,i),scaleY:n(this.scaleY,i),angle:n(this.getAngle(),i),flipX:this.flipX,flipY:this.flipY,opacity:n(this.opacity,i),shadow:this.shadow&&this.shadow.toObject?this.shadow.toObject():this.shadow,visible:this.visible,clipTo:this.clipTo&&String(this.clipTo),backgroundColor:this.backgroundColor,fillRule:this.fillRule,globalCompositeOperation:this.globalCompositeOperation,transformMatrix:this.transformMatrix?this.transformMatrix.concat():null,skewX:n(this.skewX,i),skewY:n(this.skewY,i)};return e.util.populateWithProperties(this,r,t),this.includeDefaultValues||(r=this._removeDefaultValues(r)),r},toDatalessObject:function(t){return this.toObject(t)},_removeDefaultValues:function(t){var i=e.util.getKlass(t.type).prototype,r=i.stateProperties;return r.forEach(function(e){t[e]===i[e]&&delete t[e];var r="[object Array]"===Object.prototype.toString.call(t[e])&&"[object Array]"===Object.prototype.toString.call(i[e]);r&&0===t[e].length&&0===i[e].length&&delete t[e]}),t},toString:function(){return"#"},getObjectScaling:function(){var t=this.scaleX,e=this.scaleY;if(this.group){var i=this.group.getObjectScaling();t*=i.scaleX,e*=i.scaleY}return{scaleX:t,scaleY:e}},getObjectOpacity:function(){var t=this.opacity;return this.group&&(t*=this.group.getObjectOpacity()),t},_set:function(t,i){var r="scaleX"===t||"scaleY"===t;return r&&(i=this._constrainScale(i)),"scaleX"===t&&i<0?(this.flipX=!this.flipX,i*=-1):"scaleY"===t&&i<0?(this.flipY=!this.flipY,i*=-1):"shadow"!==t||!i||i instanceof e.Shadow?"dirty"===t&&this.group&&this.group.set("dirty",i):i=new e.Shadow(i),this[t]=i,this.cacheProperties.indexOf(t)>-1&&(this.group&&this.group.set("dirty",!0),this.dirty=!0),this.group&&this.stateProperties.indexOf(t)>-1&&this.group.set("dirty",!0),"width"!==t&&"height"!==t||(this.minScaleLimit=Math.min(.1,1/Math.max(this.width,this.height))),this},setOnGroup:function(){},getViewportTransform:function(){return this.canvas&&this.canvas.viewportTransform?this.canvas.viewportTransform:e.iMatrix.concat()},render:function(t){0===this.width&&0===this.height||!this.visible||this.canvas&&this.canvas.skipOffscreen&&!this.group&&!this.isOnScreen()||(t.save(),this._setupCompositeOperation(t),this.drawSelectionBackground(t),this.transform(t),this._setOpacity(t),this._setShadow(t,this),this.transformMatrix&&t.transform.apply(t,this.transformMatrix),this.clipTo&&e.util.clipContext(this,t),this.shouldCache()?(this._cacheCanvas||this._createCacheCanvas(),this.isCacheDirty()&&(this.statefullCache&&this.saveState({propertySet:"cacheProperties"}),this.drawObject(this._cacheContext),this.dirty=!1),this.drawCacheOnCanvas(t)):(this.drawObject(t),this.objectCaching&&this.statefullCache&&this.saveState({propertySet:"cacheProperties"})),this.clipTo&&t.restore(),t.restore())},shouldCache:function(){return this.objectCaching&&(!this.group||this.needsItsOwnCache||!this.group.isCaching())},willDrawShadow:function(){return!!this.shadow},drawObject:function(t){this._renderBackground(t),this._setStrokeStyles(t,this),this._setFillStyles(t,this),this._render(t)},drawCacheOnCanvas:function(t){t.scale(1/this.zoomX,1/this.zoomY),t.drawImage(this._cacheCanvas,-this.cacheWidth/2,-this.cacheHeight/2)},isCacheDirty:function(t){if(!t&&this._updateCacheCanvas())return!0;if(this.dirty||this.statefullCache&&this.hasStateChanged("cacheProperties")){if(!t){var e=this.cacheWidth/this.zoomX,i=this.cacheHeight/this.zoomY;this._cacheContext.clearRect(-e/2,-i/2,e,i)}return!0}return!1},_renderBackground:function(t){if(this.backgroundColor){var e=this._getNonTransformedDimensions();t.fillStyle=this.backgroundColor,t.fillRect(-e.x/2,-e.y/2,e.x,e.y),this._removeShadow(t)}},_setOpacity:function(t){this.group&&!this.group.transformDone?t.globalAlpha=this.getObjectOpacity():t.globalAlpha*=this.opacity},_setStrokeStyles:function(t,e){e.stroke&&(t.lineWidth=e.strokeWidth,t.lineCap=e.strokeLineCap,t.lineJoin=e.strokeLineJoin,t.miterLimit=e.strokeMiterLimit,t.strokeStyle=e.stroke.toLive?e.stroke.toLive(t,this):e.stroke)},_setFillStyles:function(t,e){e.fill&&(t.fillStyle=e.fill.toLive?e.fill.toLive(t,this):e.fill)},_setLineDash:function(t,e,i){e&&(1&e.length&&e.push.apply(e,e),a?t.setLineDash(e):i&&i(t))},_renderControls:function(t,i){var r,n=this.getViewportTransform(),s=this.calcTransformMatrix();i=i||{},s=e.util.multiplyTransformMatrices(n,s),r=e.util.qrDecompose(s),t.save(),t.translate(r.translateX,r.translateY),t.lineWidth=1*this.borderScaleFactor,this.group||(t.globalAlpha=this.isMoving?this.borderOpacityWhenMoving:1),this.group&&this.group===this.canvas.getActiveGroup()?(t.rotate(o(r.angle)),(this.hasBorders||i.hasBorders)&&this.drawBordersInGroup(t,r,i)):(t.rotate(o(this.angle)),(this.hasBorders||i.hasBorders)&&this.drawBorders(t,i)),(this.hasControls||i.hasControls)&&this.drawControls(t,i),t.restore()},_setShadow:function(t){if(this.shadow){var i=this.canvas&&this.canvas.viewportTransform[0]||1,r=this.canvas&&this.canvas.viewportTransform[3]||1,n=this.getObjectScaling();this.canvas&&this.canvas._isRetinaScaling()&&(i*=e.devicePixelRatio,r*=e.devicePixelRatio),t.shadowColor=this.shadow.color,t.shadowBlur=this.shadow.blur*(i+r)*(n.scaleX+n.scaleY)/4,t.shadowOffsetX=this.shadow.offsetX*i*n.scaleX,t.shadowOffsetY=this.shadow.offsetY*r*n.scaleY}},_removeShadow:function(t){this.shadow&&(t.shadowColor="",t.shadowBlur=t.shadowOffsetX=t.shadowOffsetY=0)},_applyPatternGradientTransform:function(t,e){if(e.toLive){var i=e.gradientTransform||e.patternTransform,r=-this.width/2+e.offsetX||0,n=-this.height/2+e.offsetY||0;t.translate(r,n),i&&t.transform.apply(t,i)}},_renderFill:function(t){this.fill&&(t.save(),this._applyPatternGradientTransform(t,this.fill),"evenodd"===this.fillRule?t.fill("evenodd"):t.fill(),t.restore())},_renderStroke:function(t){this.stroke&&0!==this.strokeWidth&&(this.shadow&&!this.shadow.affectStroke&&this._removeShadow(t),t.save(),this._setLineDash(t,this.strokeDashArray,this._renderDashedStroke),this._applyPatternGradientTransform(t,this.stroke),t.stroke(),t.restore())},_findCenterFromElement:function(){return{x:this.left+this.width/2,y:this.top+this.height/2}},_removeTransformMatrix:function(){var t=this._findCenterFromElement();if(this.transformMatrix){var i=e.util.qrDecompose(this.transformMatrix);this.flipX=!1,this.flipY=!1,this.set("scaleX",i.scaleX),this.set("scaleY",i.scaleY),this.angle=i.angle,this.skewX=i.skewX,this.skewY=0,t=e.util.transformPoint(t,this.transformMatrix)}this.transformMatrix=null,this.setPositionByOrigin(t,"center","center")},clone:function(t,i){return this.constructor.fromObject?this.constructor.fromObject(this.toObject(i),t):new e.Object(this.toObject(i))},cloneAsImage:function(t,i){var r=this.toDataURL(i);return e.util.loadImage(r,function(i){t&&t(new e.Image(i))}),this},toDataURL:function(t){t||(t={});var i=e.util.createCanvasElement(),r=this.getBoundingRect();i.width=r.width,i.height=r.height,e.util.wrapElement(i,"div");var n=new e.StaticCanvas(i,{enableRetinaScaling:t.enableRetinaScaling});"jpg"===t.format&&(t.format="jpeg"),"jpeg"===t.format&&(n.backgroundColor="#fff");var s={active:this.get("active"),left:this.getLeft(),top:this.getTop()};this.set("active",!1),this.setPositionByOrigin(new e.Point(n.getWidth()/2,n.getHeight()/2),"center","center");var o=this.canvas;n.add(this);var a=n.toDataURL(t);return this.set(s).setCoords(),this.canvas=o,n.dispose(),n=null,a},isType:function(t){return this.type===t},complexity:function(){return 1},toJSON:function(t){return this.toObject(t)},setGradient:function(t,i){i||(i={});var r={colorStops:[]};return r.type=i.type||(i.r1||i.r2?"radial":"linear"),r.coords={x1:i.x1,y1:i.y1,x2:i.x2,y2:i.y2},(i.r1||i.r2)&&(r.coords.r1=i.r1,r.coords.r2=i.r2),r.gradientTransform=i.gradientTransform,e.Gradient.prototype.addColorStop.call(r,i.colorStops),this.set(t,e.Gradient.forObject(this,r))},setPatternFill:function(t){return this.set("fill",new e.Pattern(t))},setShadow:function(t){return this.set("shadow",t?new e.Shadow(t):null)},setColor:function(t){return this.set("fill",t),this},setAngle:function(t){var e=("center"!==this.originX||"center"!==this.originY)&&this.centeredRotation;return e&&this._setOriginToCenter(),this.set("angle",t),e&&this._resetOrigin(),this},centerH:function(){return this.canvas&&this.canvas.centerObjectH(this),this},viewportCenterH:function(){return this.canvas&&this.canvas.viewportCenterObjectH(this),this},centerV:function(){return this.canvas&&this.canvas.centerObjectV(this),this},viewportCenterV:function(){return this.canvas&&this.canvas.viewportCenterObjectV(this),this},center:function(){return this.canvas&&this.canvas.centerObject(this),this},viewportCenter:function(){return this.canvas&&this.canvas.viewportCenterObject(this),this},remove:function(){return this.canvas&&this.canvas.remove(this),this},getLocalPointer:function(t,i){i=i||this.canvas.getPointer(t);var r=new e.Point(i.x,i.y),n=this._getLeftTopCoords();return this.angle&&(r=e.util.rotatePoint(r,n,o(-this.angle))),{x:r.x-n.x,y:r.y-n.y}},_setupCompositeOperation:function(t){this.globalCompositeOperation&&(t.globalCompositeOperation=this.globalCompositeOperation)}}),e.util.createAccessors(e.Object),e.Object.prototype.rotate=e.Object.prototype.setAngle,i(e.Object.prototype,e.Observable),e.Object.NUM_FRACTION_DIGITS=2,e.Object._fromObject=function(t,i,n,s,o){var a=e[t];if(i=r(i,!0),!s){var h=o?new a(i[o],i):new a(i);return n&&n(h),h}e.util.enlivenPatterns([i.fill,i.stroke],function(t){"undefined"!=typeof t[0]&&(i.fill=t[0]),"undefined"!=typeof t[1]&&(i.stroke=t[1]);var e=o?new a(i[o],i):new a(i);n&&n(e)})},e.Object.__uid=0)}("undefined"!=typeof exports?exports:this),function(){var t=fabric.util.degreesToRadians,e={left:-.5,center:0,right:.5},i={top:-.5,center:0,bottom:.5};fabric.util.object.extend(fabric.Object.prototype,{translateToGivenOrigin:function(t,r,n,s,o){var a,h,c,l=t.x,u=t.y;return"string"==typeof r?r=e[r]:r-=.5,"string"==typeof s?s=e[s]:s-=.5,a=s-r,"string"==typeof n?n=i[n]:n-=.5,"string"==typeof o?o=i[o]:o-=.5,h=o-n,(a||h)&&(c=this._getTransformedDimensions(),l=t.x+a*c.x,u=t.y+h*c.y),new fabric.Point(l,u)},translateToCenterPoint:function(e,i,r){var n=this.translateToGivenOrigin(e,i,r,"center","center");return this.angle?fabric.util.rotatePoint(n,e,t(this.angle)):n},translateToOriginPoint:function(e,i,r){var n=this.translateToGivenOrigin(e,"center","center",i,r);return this.angle?fabric.util.rotatePoint(n,e,t(this.angle)):n},getCenterPoint:function(){var t=new fabric.Point(this.left,this.top);return this.translateToCenterPoint(t,this.originX,this.originY)},getPointByOrigin:function(t,e){var i=this.getCenterPoint();return this.translateToOriginPoint(i,t,e)},toLocalPoint:function(e,i,r){var n,s,o=this.getCenterPoint();return n="undefined"!=typeof i&&"undefined"!=typeof r?this.translateToGivenOrigin(o,"center","center",i,r):new fabric.Point(this.left,this.top),s=new fabric.Point(e.x,e.y),this.angle&&(s=fabric.util.rotatePoint(s,o,-t(this.angle))),s.subtractEquals(n)},setPositionByOrigin:function(t,e,i){var r=this.translateToCenterPoint(t,e,i),n=this.translateToOriginPoint(r,this.originX,this.originY);this.set("left",n.x), +this.set("top",n.y)},adjustPosition:function(i){var r,n,s=t(this.angle),o=this.getWidth(),a=Math.cos(s)*o,h=Math.sin(s)*o;r="string"==typeof this.originX?e[this.originX]:this.originX-.5,n="string"==typeof i?e[i]:i-.5,this.left+=a*(n-r),this.top+=h*(n-r),this.setCoords(),this.originX=i},_setOriginToCenter:function(){this._originalOriginX=this.originX,this._originalOriginY=this.originY;var t=this.getCenterPoint();this.originX="center",this.originY="center",this.left=t.x,this.top=t.y},_resetOrigin:function(){var t=this.translateToOriginPoint(this.getCenterPoint(),this._originalOriginX,this._originalOriginY);this.originX=this._originalOriginX,this.originY=this._originalOriginY,this.left=t.x,this.top=t.y,this._originalOriginX=null,this._originalOriginY=null},_getLeftTopCoords:function(){return this.translateToOriginPoint(this.getCenterPoint(),"left","top")},onDeselect:function(){}})}(),function(){function t(t){return[new fabric.Point(t.tl.x,t.tl.y),new fabric.Point(t.tr.x,t.tr.y),new fabric.Point(t.br.x,t.br.y),new fabric.Point(t.bl.x,t.bl.y)]}var e=fabric.util.degreesToRadians,i=fabric.util.multiplyTransformMatrices;fabric.util.object.extend(fabric.Object.prototype,{oCoords:null,aCoords:null,getCoords:function(e,i){this.oCoords||this.setCoords();var r=e?this.aCoords:this.oCoords;return t(i?this.calcCoords(e):r)},intersectsWithRect:function(t,e,i,r){var n=this.getCoords(i,r),s=fabric.Intersection.intersectPolygonRectangle(n,t,e);return"Intersection"===s.status},intersectsWithObject:function(t,e,i){var r=fabric.Intersection.intersectPolygonPolygon(this.getCoords(e,i),t.getCoords(e,i));return"Intersection"===r.status||t.isContainedWithinObject(this,e,i)||this.isContainedWithinObject(t,e,i)},isContainedWithinObject:function(t,e,i){for(var r=this.getCoords(e,i),n=0,s=t._getImageLines(i?t.calcCoords(e):e?t.aCoords:t.oCoords);n<4;n++)if(!t.containsPoint(r[n],s))return!1;return!0},isContainedWithinRect:function(t,e,i,r){var n=this.getBoundingRect(i,r);return n.left>=t.x&&n.left+n.width<=e.x&&n.top>=t.y&&n.top+n.height<=e.y},containsPoint:function(t,e,i,r){var e=e||this._getImageLines(r?this.calcCoords(i):i?this.aCoords:this.oCoords),n=this._findCrossPoints(t,e);return 0!==n&&n%2===1},isOnScreen:function(t){if(!this.canvas)return!1;for(var e,i=this.canvas.vptCoords.tl,r=this.canvas.vptCoords.br,n=this.getCoords(!0,t),s=0;s<4;s++)if(e=n[s],e.x<=r.x&&e.x>=i.x&&e.y<=r.y&&e.y>=i.y)return!0;if(this.intersectsWithRect(i,r,!0))return!0;var o={x:(i.x+r.x)/2,y:(i.y+r.y)/2};return!!this.containsPoint(o,null,!0)},_getImageLines:function(t){return{topline:{o:t.tl,d:t.tr},rightline:{o:t.tr,d:t.br},bottomline:{o:t.br,d:t.bl},leftline:{o:t.bl,d:t.tl}}},_findCrossPoints:function(t,e){var i,r,n,s,o,a,h=0;for(var c in e)if(a=e[c],!(a.o.y=t.y&&a.d.y>=t.y||(a.o.x===a.d.x&&a.o.x>=t.x?o=a.o.x:(i=0,r=(a.d.y-a.o.y)/(a.d.x-a.o.x),n=t.y-i*t.x,s=a.o.y-r*a.o.x,o=-(n-s)/(i-r)),o>=t.x&&(h+=1),2!==h)))break;return h},getBoundingRectWidth:function(){return this.getBoundingRect().width},getBoundingRectHeight:function(){return this.getBoundingRect().height},getBoundingRect:function(t,e){var i=this.getCoords(t,e);return fabric.util.makeBoundingBoxFromPoints(i)},getWidth:function(){return this._getTransformedDimensions().x},getHeight:function(){return this._getTransformedDimensions().y},_constrainScale:function(t){return Math.abs(t)0?Math.atan(o/s):0,l=s/Math.cos(c)/2,u=Math.cos(c+i)*l,f=Math.sin(c+i)*l,d=this.getCenterPoint(),g=t?d:fabric.util.transformPoint(d,r),p=new fabric.Point(g.x-u,g.y-f),v=new fabric.Point(p.x+s*h,p.y+s*a),m=new fabric.Point(p.x-o*a,p.y+o*h),b=new fabric.Point(g.x+u,g.y+f);if(!t)var _=new fabric.Point((p.x+m.x)/2,(p.y+m.y)/2),y=new fabric.Point((v.x+p.x)/2,(v.y+p.y)/2),x=new fabric.Point((b.x+v.x)/2,(b.y+v.y)/2),C=new fabric.Point((b.x+m.x)/2,(b.y+m.y)/2),S=new fabric.Point(y.x+a*this.rotatingPointOffset,y.y-h*this.rotatingPointOffset);var g={tl:p,tr:v,br:b,bl:m};return t||(g.ml=_,g.mt=y,g.mr=x,g.mb=C,g.mtr=S),g},setCoords:function(t,e){return this.oCoords=this.calcCoords(t),e||(this.aCoords=this.calcCoords(!0)),t||this._setCornerCoords&&this._setCornerCoords(),this},_calcRotateMatrix:function(){if(this.angle){var t=e(this.angle),i=Math.cos(t),r=Math.sin(t);return 6.123233995736766e-17!==i&&i!==-1.8369701987210297e-16||(i=0),[i,r,-r,i,0,0]}return fabric.iMatrix.concat()},calcTransformMatrix:function(t){var e=this.getCenterPoint(),r=[1,0,0,1,e.x,e.y],n=this._calcRotateMatrix(),s=this._calcDimensionsTransformMatrix(this.skewX,this.skewY,!0),o=this.group&&!t?this.group.calcTransformMatrix():fabric.iMatrix.concat();return o=i(o,r),o=i(o,n),o=i(o,s)},_calcDimensionsTransformMatrix:function(t,r,n){var s=[1,0,Math.tan(e(t)),1],o=[1,Math.tan(e(r)),0,1],a=this.scaleX*(n&&this.flipX?-1:1),h=this.scaleY*(n&&this.flipY?-1:1),c=[a,0,0,h],l=i(c,s,!0);return i(l,o,!0)},_getNonTransformedDimensions:function(){var t=this.strokeWidth,e=this.width+t,i=this.height+t;return{x:e,y:i}},_getTransformedDimensions:function(t,e){"undefined"==typeof t&&(t=this.skewX),"undefined"==typeof e&&(e=this.skewY);var i,r,n=this._getNonTransformedDimensions(),s=n.x/2,o=n.y/2,a=[{x:-s,y:-o},{x:s,y:-o},{x:-s,y:o},{x:s,y:o}],h=this._calcDimensionsTransformMatrix(t,e,!1);for(i=0;i\n')},_createBaseSVGMarkup:function(){var t=[];return this.fill&&this.fill.toLive&&t.push(this.fill.toSVG(this,!1)),this.stroke&&this.stroke.toLive&&t.push(this.stroke.toSVG(this,!1)),this.shadow&&t.push(this.shadow.toSVG(this)),t}})}(),function(){function t(t,e,r){var n={},s=!0;r.forEach(function(e){n[e]=t[e]}),i(t[e],n,s)}function e(t,i,r){if(!fabric.isLikelyNode&&t instanceof Element)return t===i;if(t instanceof Array){if(t.length!==i.length)return!1;for(var n=0,s=t.length;n\n'),t?t(e.join("")):e.join("")}}),i.Line.ATTRIBUTE_NAMES=i.SHARED_ATTRIBUTES.concat("x1 y1 x2 y2".split(" ")),i.Line.fromElement=function(t,e){e=e||{};var n=i.parseAttributes(t,i.Line.ATTRIBUTE_NAMES),s=[n.x1||0,n.y1||0,n.x2||0,n.y2||0];return e.originX="left",e.originY="top",new i.Line(s,r(n,e))},i.Line.fromObject=function(t,e,r){function s(t){delete t.points,e&&e(t)}var o=n(t,!0);o.points=[t.x1,t.y1,t.x2,t.y2];var a=i.Object._fromObject("Line",o,s,r,"points");return a&&delete a.points,a}}("undefined"!=typeof exports?exports:this),function(t){"use strict";function e(t){return"radius"in t&&t.radius>=0}var i=t.fabric||(t.fabric={}),r=Math.PI,n=i.util.object.extend;if(i.Circle)return void i.warn("fabric.Circle is already defined.");var s=i.Object.prototype.cacheProperties.concat();s.push("radius"),i.Circle=i.util.createClass(i.Object,{type:"circle",radius:0,startAngle:0,endAngle:2*r,cacheProperties:s,initialize:function(t){this.callSuper("initialize",t),this.set("radius",t&&t.radius||0)},_set:function(t,e){return this.callSuper("_set",t,e),"radius"===t&&this.setRadius(e),this},toObject:function(t){return this.callSuper("toObject",["radius","startAngle","endAngle"].concat(t))},toSVG:function(t){var e=this._createBaseSVGMarkup(),i=0,n=0,s=(this.endAngle-this.startAngle)%(2*r);if(0===s)e.push("\n');else{var o=Math.cos(this.startAngle)*this.radius,a=Math.sin(this.startAngle)*this.radius,h=Math.cos(this.endAngle)*this.radius,c=Math.sin(this.endAngle)*this.radius,l=s>r?"1":"0";e.push('\n')}return t?t(e.join("")):e.join("")},_render:function(t){t.beginPath(),t.arc(0,0,this.radius,this.startAngle,this.endAngle,!1),this._renderFill(t),this._renderStroke(t)},getRadiusX:function(){return this.get("radius")*this.get("scaleX")},getRadiusY:function(){return this.get("radius")*this.get("scaleY")},setRadius:function(t){return this.radius=t,this.set("width",2*t).set("height",2*t)}}),i.Circle.ATTRIBUTE_NAMES=i.SHARED_ATTRIBUTES.concat("cx cy r".split(" ")),i.Circle.fromElement=function(t,r){r||(r={});var s=i.parseAttributes(t,i.Circle.ATTRIBUTE_NAMES);if(!e(s))throw new Error("value of `r` attribute is required and can not be negative");return s.left=(s.left||0)-s.radius,s.top=(s.top||0)-s.radius,s.originX="left",s.originY="top",new i.Circle(n(s,r))},i.Circle.fromObject=function(t,e,r){return i.Object._fromObject("Circle",t,e,r)}}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={});return e.Triangle?void e.warn("fabric.Triangle is already defined"):(e.Triangle=e.util.createClass(e.Object,{type:"triangle",initialize:function(t){this.callSuper("initialize",t),this.set("width",t&&t.width||100).set("height",t&&t.height||100)},_render:function(t){var e=this.width/2,i=this.height/2;t.beginPath(),t.moveTo(-e,i),t.lineTo(0,-i),t.lineTo(e,i),t.closePath(),this._renderFill(t),this._renderStroke(t)},_renderDashedStroke:function(t){var i=this.width/2,r=this.height/2;t.beginPath(),e.util.drawDashedLine(t,-i,r,0,-r,this.strokeDashArray),e.util.drawDashedLine(t,0,-r,i,r,this.strokeDashArray),e.util.drawDashedLine(t,i,r,-i,r,this.strokeDashArray),t.closePath()},toSVG:function(t){var e=this._createBaseSVGMarkup(),i=this.width/2,r=this.height/2,n=[-i+" "+r,"0 "+-r,i+" "+r].join(",");return e.push("'),t?t(e.join("")):e.join("")}}),void(e.Triangle.fromObject=function(t,i,r){return e.Object._fromObject("Triangle",t,i,r)}))}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=2*Math.PI,r=e.util.object.extend;if(e.Ellipse)return void e.warn("fabric.Ellipse is already defined.");var n=e.Object.prototype.cacheProperties.concat();n.push("rx","ry"),e.Ellipse=e.util.createClass(e.Object,{type:"ellipse",rx:0,ry:0,cacheProperties:n,initialize:function(t){this.callSuper("initialize",t),this.set("rx",t&&t.rx||0),this.set("ry",t&&t.ry||0)},_set:function(t,e){switch(this.callSuper("_set",t,e),t){case"rx":this.rx=e,this.set("width",2*e);break;case"ry":this.ry=e,this.set("height",2*e)}return this},getRx:function(){return this.get("rx")*this.get("scaleX")},getRy:function(){return this.get("ry")*this.get("scaleY")},toObject:function(t){return this.callSuper("toObject",["rx","ry"].concat(t))},toSVG:function(t){var e=this._createBaseSVGMarkup(),i=0,r=0;return e.push("\n'),t?t(e.join("")):e.join("")},_render:function(t){t.beginPath(),t.save(),t.transform(1,0,0,this.ry/this.rx,0,0),t.arc(0,0,this.rx,0,i,!1),t.restore(),this._renderFill(t),this._renderStroke(t)}}),e.Ellipse.ATTRIBUTE_NAMES=e.SHARED_ATTRIBUTES.concat("cx cy rx ry".split(" ")),e.Ellipse.fromElement=function(t,i){i||(i={});var n=e.parseAttributes(t,e.Ellipse.ATTRIBUTE_NAMES);return n.left=(n.left||0)-n.rx,n.top=(n.top||0)-n.ry,n.originX="left",n.originY="top",new e.Ellipse(r(n,i))},e.Ellipse.fromObject=function(t,i,r){return e.Object._fromObject("Ellipse",t,i,r)}}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.object.extend;if(e.Rect)return void e.warn("fabric.Rect is already defined");var r=e.Object.prototype.stateProperties.concat();r.push("rx","ry");var n=e.Object.prototype.cacheProperties.concat();n.push("rx","ry"),e.Rect=e.util.createClass(e.Object,{stateProperties:r,type:"rect",rx:0,ry:0,cacheProperties:n,initialize:function(t){this.callSuper("initialize",t),this._initRxRy()},_initRxRy:function(){this.rx&&!this.ry?this.ry=this.rx:this.ry&&!this.rx&&(this.rx=this.ry)},_render:function(t){if(1===this.width&&1===this.height)return void t.fillRect(-.5,-.5,1,1);var e=this.rx?Math.min(this.rx,this.width/2):0,i=this.ry?Math.min(this.ry,this.height/2):0,r=this.width,n=this.height,s=-this.width/2,o=-this.height/2,a=0!==e||0!==i,h=.4477152502;t.beginPath(),t.moveTo(s+e,o),t.lineTo(s+r-e,o),a&&t.bezierCurveTo(s+r-h*e,o,s+r,o+h*i,s+r,o+i),t.lineTo(s+r,o+n-i),a&&t.bezierCurveTo(s+r,o+n-h*i,s+r-h*e,o+n,s+r-e,o+n),t.lineTo(s+e,o+n),a&&t.bezierCurveTo(s+h*e,o+n,s,o+n-h*i,s,o+n-i),t.lineTo(s,o+i),a&&t.bezierCurveTo(s,o+h*i,s+h*e,o,s+e,o),t.closePath(),this._renderFill(t),this._renderStroke(t)},_renderDashedStroke:function(t){var i=-this.width/2,r=-this.height/2,n=this.width,s=this.height;t.beginPath(),e.util.drawDashedLine(t,i,r,i+n,r,this.strokeDashArray),e.util.drawDashedLine(t,i+n,r,i+n,r+s,this.strokeDashArray),e.util.drawDashedLine(t,i+n,r+s,i,r+s,this.strokeDashArray),e.util.drawDashedLine(t,i,r+s,i,r,this.strokeDashArray),t.closePath()},toObject:function(t){return this.callSuper("toObject",["rx","ry"].concat(t))},toSVG:function(t){var e=this._createBaseSVGMarkup(),i=-this.width/2,r=-this.height/2;return e.push("\n'),t?t(e.join("")):e.join("")}}),e.Rect.ATTRIBUTE_NAMES=e.SHARED_ATTRIBUTES.concat("x y rx ry width height".split(" ")),e.Rect.fromElement=function(t,r){if(!t)return null;r=r||{};var n=e.parseAttributes(t,e.Rect.ATTRIBUTE_NAMES);n.left=n.left||0,n.top=n.top||0,n.originX="left",n.originY="top";var s=new e.Rect(i(r?e.util.object.clone(r):{},n));return s.visible=s.visible&&s.width>0&&s.height>0,s},e.Rect.fromObject=function(t,i,r){return e.Object._fromObject("Rect",t,i,r)}}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.object.extend,r=e.util.array.min,n=e.util.array.max,s=e.util.toFixed,o=e.Object.NUM_FRACTION_DIGITS;if(e.Polyline)return void e.warn("fabric.Polyline is already defined");var a=e.Object.prototype.cacheProperties.concat();a.push("points"),e.Polyline=e.util.createClass(e.Object,{type:"polyline",points:null,minX:0,minY:0,cacheProperties:a,initialize:function(t,e){e=e||{},this.points=t||[],this.callSuper("initialize",e),this._calcDimensions(),"top"in e||(this.top=this.minY),"left"in e||(this.left=this.minX),this.pathOffset={x:this.minX+this.width/2,y:this.minY+this.height/2}},_calcDimensions:function(){var t=this.points,e=r(t,"x"),i=r(t,"y"),s=n(t,"x"),o=n(t,"y");this.width=s-e||0,this.height=o-i||0,this.minX=e||0,this.minY=i||0},toObject:function(t){return i(this.callSuper("toObject",t),{points:this.points.concat()})},toSVG:function(t){for(var e=[],i=this.pathOffset.x,r=this.pathOffset.y,n=this._createBaseSVGMarkup(),a=0,h=this.points.length;a\n'),t?t(n.join("")):n.join("")},commonRender:function(t){var e,i=this.points.length,r=this.pathOffset.x,n=this.pathOffset.y;if(!i||isNaN(this.points[i-1].y))return!1;t.beginPath(),t.moveTo(this.points[0].x-r,this.points[0].y-n);for(var s=0;s"},toObject:function(t){var e=n(this.callSuper("toObject",["sourcePath","pathOffset"].concat(t)),{path:this.path.map(function(t){return t.slice()}),top:this.top,left:this.left});return e},toDatalessObject:function(t){var e=this.toObject(t);return this.sourcePath&&(e.path=this.sourcePath),delete e.sourcePath,e},toSVG:function(t){for(var e=[],i=this._createBaseSVGMarkup(),r="",n=0,s=this.path.length;n\n"),t?t(i.join("")):i.join("")},complexity:function(){return this.path.length},_parsePath:function(){for(var t,e,i,r,n,s=[],o=[],c=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi,l=0,u=this.path.length;lp)for(var m=1,b=n.length;m"},addWithUpdate:function(t){return this._restoreObjectsState(),e.util.resetObjectTransform(this),t&&(this._objects.push(t),t.group=this,t._set("canvas",this.canvas)),this.forEachObject(this._setObjectActive,this),this._calcBounds(),this._updateObjectsCoords(),this.setCoords(),this.dirty=!0,this},_setObjectActive:function(t){t.set("active",!0),t.group=this},removeWithUpdate:function(t){return this._restoreObjectsState(),e.util.resetObjectTransform(this),this.forEachObject(this._setObjectActive,this),this.remove(t),this._calcBounds(),this._updateObjectsCoords(),this.setCoords(),this.dirty=!0,this},_onObjectAdded:function(t){this.dirty=!0,t.group=this,t._set("canvas",this.canvas)},_onObjectRemoved:function(t){this.dirty=!0,delete t.group,t.set("active",!1)},delegatedProperties:{fill:!0,stroke:!0,strokeWidth:!0,fontFamily:!0,fontWeight:!0,fontSize:!0,fontStyle:!0,lineHeight:!0,textDecoration:!0,textAlign:!0,backgroundColor:!0},_set:function(t,e){var i=this._objects.length;if(this.delegatedProperties[t]||"canvas"===t)for(;i--;)this._objects[i].set(t,e);else for(;i--;)this._objects[i].setOnGroup(t,e);this.callSuper("_set",t,e)},toObject:function(t){var e=this.getObjects().map(function(e){var i=e.includeDefaultValues;e.includeDefaultValues=e.group.includeDefaultValues;var r=e.toObject(t);return e.includeDefaultValues=i,r});return i(this.callSuper("toObject",t),{objects:e})},toDatalessObject:function(t){var e,r=this.sourcePath;return e=r?r:this.getObjects().map(function(e){var i=e.includeDefaultValues;e.includeDefaultValues=e.group.includeDefaultValues;var r=e.toDatalessObject(t);return e.includeDefaultValues=i,r}),i(this.callSuper("toDatalessObject",t),{objects:e})},render:function(t){this._transformDone=!0,this.callSuper("render",t),this._transformDone=!1},shouldCache:function(){var t=this.objectCaching&&(!this.group||this.needsItsOwnCache||!this.group.isCaching());if(this.caching=t,t)for(var e=0,i=this._objects.length;e\n');for(var i=0,r=this._objects.length;i\n"),t?t(e.join("")):e.join("")},get:function(t){if(t in s){if(this[t])return this[t];for(var e=0,i=this._objects.length;e\n',"\n"),this.stroke||this.strokeDashArray){var o=this.fill;this.fill=null,e.push("\n'),this.fill=o}return e.push("\n"),t?t(e.join("")):e.join("")},getSrc:function(t){var e=t?this._element:this._originalElement;return e?fabric.isLikelyNode?e._src:e.src:this.src||""},setSrc:function(t,e,i){return fabric.util.loadImage(t,function(t){this.setElement(t,i),e(this)},this,i&&i.crossOrigin),this},toString:function(){return'#'},applyResizeFilters:function(){var t=this.resizeFilter,e=this.canvas?this.canvas.getRetinaScaling():1,i=this.minimumScaleTrigger,r=this.scaleX=1&&n>=1)return void(this._element=this._filteredEl);fabric.filterBackend||(fabric.filterBackend=fabric.initFilterBackend());var s,o=this._filteredEl||this._originalElement;if(this._element===this._originalElement){var a=fabric.util.createCanvasElement();a.width=o.width,a.height=o.height,this._element=a}var h=this._element.getContext("2d");o.getContext?s=o.getContext("2d").getImageData(0,0,o.width,o.height):(h.drawImage(o,0,0),s=h.getImageData(0,0,o.width,o.height));var c={imageData:s,scaleX:r,scaleY:n};t.applyTo2d(c),this.width=this._element.width=c.imageData.width,this.height=this._element.height=c.imageData.height,h.putImageData(c.imageData,0,0)},applyFilters:function(t){if(t=t||this.filters||[],t=t.filter(function(t){return t}),0===t.length)return this._element=this._originalElement,this._filterScalingX=1,this._filterScalingY=1,this;var e=this._originalElement,i=e.naturalWidth||e.width,r=e.naturalHeight||e.height;if(this._element===this._originalElement){var n=fabric.util.createCanvasElement();n.width=e.width,n.height=e.height,this._element=n}else this._element.getContext("2d").clearRect(0,0,i,r);return fabric.filterBackend||(fabric.filterBackend=fabric.initFilterBackend()),fabric.filterBackend.applyFilters(t,this._originalElement,i,r,this._element,this.cacheKey),this.width===this._element.width&&this.height===this._element.height||(this._filterScalingX=this._element.width/this.width,this._filterScalingY=this._element.height/this.height,this.width=this._element.width,this.height=this._element.height),this},_render:function(t){var e,i=-this.width/2,r=-this.height/2,n=this._findMargins();"slice"===this.meetOrSlice&&(t.beginPath(),t.rect(i,r,this.width,this.height),t.clip()),this.isMoving===!1&&this.resizeFilter&&this._needsResize()&&(this._lastScaleX=this.scaleX,this._lastScaleY=this.scaleY,this.applyResizeFilters()),e=this._element,e&&t.drawImage(e,i+n.marginX,r+n.marginY,n.width,n.height),this._stroke(t),this._renderStroke(t)},_needsResize:function(){return this.scaleX!==this._lastScaleX||this.scaleY!==this._lastScaleY},_findMargins:function(){var t,e,i=this.width,r=this.height,n=0,s=0;return"none"===this.alignX&&"none"===this.alignY||(t=[this.width/this._element.width,this.height/this._element.height],e="meet"===this.meetOrSlice?Math.min.apply(null,t):Math.max.apply(null,t),i=this._element.width*e,r=this._element.height*e,"Mid"===this.alignX&&(n=(this.width-i)/2),"Max"===this.alignX&&(n=this.width-i),"Mid"===this.alignY&&(s=(this.height-r)/2),"Max"===this.alignY&&(s=this.height-r)),{width:i,height:r,marginX:n,marginY:s}},_resetWidthHeight:function(){var t=this.getElement();this.set("width",t.width),this.set("height",t.height)},_initElement:function(t,e){this.setElement(fabric.util.getById(t),e),fabric.util.addClass(this.getElement(),fabric.Image.CSS_CANVAS)},_initConfig:function(t){t||(t={}),this.setOptions(t),this._setWidthHeight(t),this._element&&this.crossOrigin&&(this._element.crossOrigin=this.crossOrigin)},_initFilters:function(t,e){t&&t.length?fabric.util.enlivenObjects(t,function(t){e&&e(t)},"fabric.Image.filters"):e&&e()},_setWidthHeight:function(t){this.width="width"in t?t.width:this.getElement()?this.getElement().width||0:0,this.height="height"in t?t.height:this.getElement()?this.getElement().height||0:0}}),fabric.Image.CSS_CANVAS="canvas-img",fabric.Image.prototype.getSvgSrc=fabric.Image.prototype.getSrc,fabric.Image.fromObject=function(t,e){fabric.util.loadImage(t.src,function(i,r){return r?void(e&&e(null,r)):void fabric.Image.prototype._initFilters.call(t,t.filters,function(r){t.filters=r||[],fabric.Image.prototype._initFilters.call(t,[t.resizeFilter],function(r){t.resizeFilter=r[0];var n=new fabric.Image(i,t);e(n)})})},null,t.crossOrigin)},fabric.Image.fromURL=function(t,e,i){fabric.util.loadImage(t,function(t){e&&e(new fabric.Image(t,i))},null,i&&i.crossOrigin)},fabric.Image.ATTRIBUTE_NAMES=fabric.SHARED_ATTRIBUTES.concat("x y width height preserveAspectRatio xlink:href crossOrigin".split(" ")),fabric.Image.fromElement=function(t,i,r){var n,s=fabric.parseAttributes(t,fabric.Image.ATTRIBUTE_NAMES);s.preserveAspectRatio&&(n=fabric.util.parsePreserveAspectRatioAttribute(s.preserveAspectRatio),e(s,n)),fabric.Image.fromURL(s["xlink:href"],i,e(r?fabric.util.object.clone(r):{},s))},fabric.Image.async=!0,fabric.Image.pngCompression=1}("undefined"!=typeof exports?exports:this),fabric.util.object.extend(fabric.Object.prototype,{_getAngleValueForStraighten:function(){var t=this.getAngle()%360;return t>0?90*Math.round((t-1)/90):90*Math.round(t/90)},straighten:function(){return this.setAngle(this._getAngleValueForStraighten()),this},fxStraighten:function(t){t=t||{};var e=function(){},i=t.onComplete||e,r=t.onChange||e,n=this;return fabric.util.animate({startValue:this.get("angle"),endValue:this._getAngleValueForStraighten(),duration:this.FX_DURATION,onChange:function(t){n.setAngle(t),r()},onComplete:function(){n.setCoords(),i()},onStart:function(){n.set("active",!1)}}),this}}),fabric.util.object.extend(fabric.StaticCanvas.prototype,{straightenObject:function(t){return t.straighten(),this.renderAll(),this},fxStraightenObject:function(t){return t.fxStraighten({onChange:this.renderAll.bind(this)}),this}}),function(){"use strict";function t(t){t&&t.tileSize&&(this.tileSize=t.tileSize),this.setupGLContext(this.tileSize,this.tileSize),this.captureGPUInfo()}fabric.isWebglSupported=function(t){if(fabric.isLikelyNode)return!1;t=t||fabric.WebglFilterBackend.prototype.tileSize;var e=document.createElement("canvas"),i=e.getContext("webgl")||e.getContext("experimental-webgl"),r=!1;return i&&(fabric.maxTextureSize=i.getParameter(i.MAX_TEXTURE_SIZE),r=fabric.maxTextureSize>=t),this.isSupported=r,r},fabric.WebglFilterBackend=t,t.prototype={tileSize:2048,resources:{},setupGLContext:function(t,e){this.dispose(),this.createWebGLCanvas(t,e),this.squareVertices=new Float32Array([0,0,0,1,1,0,1,1])},createWebGLCanvas:function(t,e){var i=fabric.util.createCanvasElement();i.width=t,i.height=e;var r={premultipliedAlpha:!1},n=i.getContext("webgl",r);n||(n=i.getContext("experimental-webgl",r)),n&&(n.clearColor(0,0,0,0),this.canvas=i,this.gl=n)},applyFilters:function(t,e,i,r,n,s){var o,a=this.gl;s&&(o=this.getCachedTexture(s,e));var h={originalWidth:e.width||e.originalWidth,originalHeight:e.height||e.originalHeight,sourceWidth:i,sourceHeight:r,context:a,sourceTexture:this.createTexture(a,i,r,!o&&e),targetTexture:this.createTexture(a,i,r),originalTexture:o||this.createTexture(a,i,r,!o&&e),passes:t.length,webgl:!0,squareVertices:this.squareVertices,programCache:this.programCache,pass:0},c=a.createFramebuffer();return a.bindFramebuffer(a.FRAMEBUFFER,c),t.forEach(function(t){t&&t.applyTo(h)}),this.copyGLTo2D(a.canvas,n),a.bindTexture(a.TEXTURE_2D,null),a.deleteTexture(h.sourceTexture),a.deleteTexture(h.targetTexture),a.deleteFramebuffer(c),n.getContext("2d").setTransform(1,0,0,1,0,0),h},applyFiltersDebug:function(t,e,i,r,n,s){var o=this.gl,a=this.applyFilters(t,e,i,r,n,s),h=o.getError();if(h!==o.NO_ERROR){var c=this.glErrorToString(o,h),l=new Error("WebGL Error "+c);throw l.glErrorCode=h,l}return a},glErrorToString:function(t,e){if(!t)return"Context undefined for error code: "+e;if("number"!=typeof e)return"Error code is not a number";switch(e){case t.NO_ERROR:return"NO_ERROR";case t.INVALID_ENUM:return"INVALID_ENUM";case t.INVALID_VALUE:return"INVALID_VALUE";case t.INVALID_OPERATION:return"INVALID_OPERATION";case t.INVALID_FRAMEBUFFER_OPERATION:return"INVALID_FRAMEBUFFER_OPERATION";case t.OUT_OF_MEMORY:return"OUT_OF_MEMORY";case t.CONTEXT_LOST_WEBGL:return"CONTEXT_LOST_WEBGL";default:return"UNKNOWN_ERROR"}},dispose:function(){this.canvas&&(this.canvas=null,this.gl=null),this.clearWebGLCaches()},clearWebGLCaches:function(){this.programCache={},this.textureCache={}},createTexture:function(t,e,i,r){var n=t.createTexture();return t.bindTexture(t.TEXTURE_2D,n),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),r?t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,r):t.texImage2D(t.TEXTURE_2D,0,t.RGBA,e,i,0,t.RGBA,t.UNSIGNED_BYTE,null),n},getCachedTexture:function(t,e){if(this.textureCache[t])return this.textureCache[t];var i=this.createTexture(this.gl,e.width,e.height,e);return this.textureCache[t]=i,i},copyGLTo2D:function(t,e){var i=e.getContext("2d");i.translate(0,e.height),i.scale(1,-1);var r=t.height-e.height;i.drawImage(t,0,r,e.width,e.height,0,0,e.width,e.height)},evictCachesForKey:function(t){this.textureCache[t]&&(this.gl.deleteTexture(this.textureCache[t]),delete this.textureCache[t])},captureGPUInfo:function(){if(this.gpuInfo)return this.gpuInfo;var t=this.gl,e=t.getExtension("WEBGL_debug_renderer_info"),i={renderer:"",vendor:""};if(e){var r=t.getParameter(e.UNMASKED_RENDERER_WEBGL),n=t.getParameter(e.UNMASKED_VENDOR_WEBGL);r&&(i.renderer=r.toLowerCase()),n&&(i.vendor=n.toLowerCase())}return this.gpuInfo=i,i}}}(),function(){"use strict";function t(){}var e=function(){};fabric.Canvas2dFilterBackend=t,t.prototype={evictCachesForKey:e,dispose:e,clearWebGLCaches:e,resources:{},applyFilters:function(t,e,i,r,n){var s=n.getContext("2d");s.drawImage(e,0,0,i,r);var o=s.getImageData(0,0,i,r),a=s.getImageData(0,0,i,r),h={sourceWidth:i,sourceHeight:r,imageData:o,originalEl:e,originalImageData:a,canvasEl:n,ctx:s};return t.forEach(function(t){t.applyTo(h)}),h.imageData.width===i&&h.imageData.height===r||(n.width=h.imageData.width,n.height=h.imageData.height),s.putImageData(h.imageData,0,0),h}}}(),fabric.Image.filters=fabric.Image.filters||{},fabric.Image.filters.BaseFilter=fabric.util.createClass({type:"BaseFilter",vertexSource:"attribute vec2 aPosition;\nattribute vec2 aTexCoord;\nvarying vec2 vTexCoord;\nvoid main() {\nvTexCoord = aTexCoord;\ngl_Position = vec4(aPosition * 2.0 - 1.0, 0.0, 1.0);\n}",fragmentSource:"precision highp float;\nvarying vec2 vTexCoord;\nuniform sampler2d uTexture;\nvoid main() {\ngl_FragColor = texture2D(uTexture, vTexCoord);\n}",initialize:function(t){t&&this.setOptions(t)},setOptions:function(t){for(var e in t)this[e]=t[e]},createProgram:function(t,e,i){if(this.vertexSource&&this.fragmentSource){var r=t.createShader(t.VERTEX_SHADER);if(t.shaderSource(r,i||this.vertexSource),t.compileShader(r),!t.getShaderParameter(r,t.COMPILE_STATUS))throw new Error('Vertex shader compile error for "${this.type}": '+t.getShaderInfoLog(r));var n=t.createShader(t.FRAGMENT_SHADER);if(t.shaderSource(n,e||this.fragmentSource),t.compileShader(n),!t.getShaderParameter(n,t.COMPILE_STATUS))throw new Error('Fragment shader compile error for "${this.type}": '+t.getShaderInfoLog(n));var s=t.createProgram();if(t.attachShader(s,r),t.attachShader(s,n),t.linkProgram(s),!t.getProgramParameter(s,t.LINK_STATUS))throw new Error('Shader link error for "${this.type}" '+t.getProgramInfoLog(s));var o=this.getAttributeLocations(t,s),a=this.getUniformLocations(t,s)||{};return a.uWidth=t.getUniformLocation(s,"uWidth"),a.uHeight=t.getUniformLocation(s,"uHeight"),{program:s,attributeLocations:o,uniformLocations:a}}},getAttributeLocations:function(t,e){return{aPosition:t.getAttribLocation(e,"aPosition"),aTexCoord:t.getAttribLocation(e,"aTexCoord")}},getUniformLocations:function(){},sendAttributeData:function(t,e,i){["aPosition","aTexCoord"].forEach(function(r){var n=e[r],s=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,s),t.enableVertexAttribArray(n),t.vertexAttribPointer(n,2,t.FLOAT,!1,0,0),t.bufferData(t.ARRAY_BUFFER,i,t.STATIC_DRAW)})},_setupFrameBuffer:function(t){var e=t.context;t.passes>1?e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t.targetTexture,0):(e.bindFramebuffer(e.FRAMEBUFFER,null),e.finish())},_swapTextures:function(t){t.passes--,t.pass++;var e=t.targetTexture;t.targetTexture=t.sourceTexture,t.sourceTexture=e},isNeutralState:function(){return!1},applyTo:function(t){if(t.webgl){if(t.passes>1&&this.isNeutralState(t))return;this._setupFrameBuffer(t),this.applyToWebGL(t),this._swapTextures(t)}else this.applyTo2d(t)},retrieveShader:function(t){return t.programCache.hasOwnProperty(this.type)||(t.programCache[this.type]=this.createProgram(t.context)),t.programCache[this.type]},applyToWebGL:function(t){var e=t.context,i=this.retrieveShader(t);0===t.pass&&t.originalTexture?e.bindTexture(e.TEXTURE_2D,t.originalTexture):e.bindTexture(e.TEXTURE_2D,t.sourceTexture),e.useProgram(i.program),this.sendAttributeData(e,i.attributeLocations,t.squareVertices),e.uniform1f(i.uniformLocations.uStepW,1/t.sourceWidth),e.uniform1f(i.uniformLocations.uStepH,1/t.sourceHeight),this.sendUniformData(e,i.uniformLocations),e.viewport(0,0,t.sourceWidth,t.sourceHeight),e.drawArrays(e.TRIANGLE_STRIP,0,4)},bindAdditionalTexture:function(t,e,i){t.activeTexture(i),t.bindTexture(t.TEXTURE_2D,e),t.activeTexture(t.TEXTURE0)},unbindAdditionalTexture:function(t,e){t.activeTexture(e),t.bindTexture(t.TEXTURE_2D,null),t.activeTexture(t.TEXTURE0)},getMainParameter:function(){return this[this.mainParameter]},setMainParameter:function(t){this[this.mainParameter]=t},sendUniformData:function(){},createHelpLayer:function(t){if(!t.helpLayer){var e=document.createElement("canvas");e.width=t.sourceWidth,e.height=t.sourceHeight,t.helpLayer=e}},toObject:function(){var t={type:this.type},e=this.mainParameter;return e&&(t[e]=this[e]),t},toJSON:function(){return this.toObject()}}),fabric.Image.filters.BaseFilter.fromObject=function(t,e){var i=new fabric.Image.filters[t.type](t);return e&&e(i),i},function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.Image.filters,r=e.util.createClass;i.ColorMatrix=r(i.BaseFilter,{type:"ColorMatrix",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nvarying vec2 vTexCoord;\nuniform mat4 uColorMatrix;\nuniform vec4 uConstants;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\ncolor *= uColorMatrix;\ncolor += uConstants;\ngl_FragColor = color;\n}",matrix:[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],mainParameter:"matrix",colorsOnly:!0,initialize:function(t){this.callSuper("initialize",t),this.matrix=this.matrix.slice(0)},applyTo2d:function(t){var e,i,r,n,s,o=t.imageData,a=o.data,h=a.length,c=this.matrix,l=this.colorsOnly;for(s=0;sy||o<0||o>_||(h=4*(a*_+o),c=v[d*m+f],e+=p[h]*c,i+=p[h+1]*c,r+=p[h+2]*c,S||(n+=p[h+3]*c));C[s]=e,C[s+1]=i,C[s+2]=r,S?C[s+3]=p[s+3]:C[s+3]=n}t.imageData=x},getUniformLocations:function(t,e){return{uMatrix:t.getUniformLocation(e,"uMatrix"),uOpaque:t.getUniformLocation(e,"uOpaque"),uHalfSize:t.getUniformLocation(e,"uHalfSize"),uSize:t.getUniformLocation(e,"uSize")}},sendUniformData:function(t,e){t.uniform1fv(e.uMatrix,this.matrix)},toObject:function(){return i(this.callSuper("toObject"),{opaque:this.opaque,matrix:this.matrix})}}),e.Image.filters.Convolute.fromObject=e.Image.filters.BaseFilter.fromObject}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.Image.filters,r=e.util.createClass;i.Grayscale=r(i.BaseFilter,{type:"Grayscale",fragmentSource:{average:"precision highp float;\nuniform sampler2D uTexture;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nfloat average = (color.r + color.b + color.g) / 3.0;\ngl_FragColor = vec4(average, average, average, color.a);\n}",lightness:"precision highp float;\nuniform sampler2D uTexture;\nuniform int uMode;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 col = texture2D(uTexture, vTexCoord);\nfloat average = (max(max(col.r, col.g),col.b) + min(min(col.r, col.g),col.b)) / 2.0;\ngl_FragColor = vec4(average, average, average, col.a);\n}",luminosity:"precision highp float;\nuniform sampler2D uTexture;\nuniform int uMode;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 col = texture2D(uTexture, vTexCoord);\nfloat average = 0.21 * col.r + 0.72 * col.g + 0.07 * col.b;\ngl_FragColor = vec4(average, average, average, col.a);\n}"},mode:"average",mainParameter:"mode",applyTo2d:function(t){var e,i,r=t.imageData,n=r.data,s=n.length,o=this.mode;for(e=0;el[0]&&n>l[1]&&s>l[2]&&rt)return 0;if(e*=Math.PI,s(e)<1e-16)return 1;var i=e/t;return a(e)*a(i)/e/i}}function f(t){var a,h,u,O,k,j,D,E,P,A,M;for(T.x=(t+.5)*m,w.x=r(T.x),a=0;a=e)){A=r(1e3*s(h-T.x)),S[A]||(S[A]={});for(var L=w.y-C;L<=w.y+C;L++)L<0||L>=o||(M=r(1e3*s(L-T.y)),S[A][M]||(S[A][M]=v(n(i(A*_,2)+i(M*y,2))/1e3)),u=S[A][M],u>0&&(O=4*(L*e+h),k+=u,j+=u*d[O],D+=u*d[O+1],E+=u*d[O+2],P+=u*d[O+3]))}O=4*(a*c+t),p[O]=j/k,p[O+1]=D/k,p[O+2]=E/k,p[O+3]=P/k}return++t1&&L<-1||(y=2*L*L*L-3*L*L+1,y>0&&(M=4*(A+j*e),O+=y*g[M+3],C+=y,g[M+3]<255&&(y=y*g[M+3]/250),S+=y*g[M],T+=y*g[M+1],w+=y*g[M+2],x+=y))}v[_]=S/x,v[_+1]=T/x,v[_+2]=w/x,v[_+3]=O/C}return p},toObject:function(){return{type:this.type,scaleX:this.scaleX,scaleY:this.scaleY,resizeType:this.resizeType,lanczosLobes:this.lanczosLobes}}}),e.Image.filters.Resize.fromObject=e.Image.filters.BaseFilter.fromObject}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.Image.filters,r=e.util.createClass;i.Contrast=r(i.BaseFilter,{type:"Contrast",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uContrast;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nfloat contrastF = 1.015 * (uContrast + 1.0) / (1.0 * (1.015 - uContrast));\ncolor.rgb = contrastF * (color.rgb - 0.5) + 0.5;\ngl_FragColor = color;\n}",contrast:0,mainParameter:"contrast",applyTo2d:function(t){if(0!==this.contrast){var e,i,r=t.imageData,n=r.data,i=n.length,s=Math.floor(255*this.contrast),o=259*(s+255)/(255*(259-s));for(e=0;e1&&(e=1/this.aspectRatio):this.aspectRatio<1&&(e=this.aspectRatio),t=e*this.blur*.12,this.horizontal?i[0]=t:i[1]=t,i}}),i.Blur.fromObject=e.Image.filters.BaseFilter.fromObject}("undefined"!=typeof exports?exports:this),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.Image.filters,r=e.util.createClass;i.Gamma=r(i.BaseFilter,{type:"Gamma",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform vec3 uGamma;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nvec3 correction = (1.0 / uGamma);\ncolor.r = pow(color.r, correction.r);\ncolor.g = pow(color.g, correction.g);\ncolor.b = pow(color.b, correction.b);\ngl_FragColor = color;\ngl_FragColor.rgb *= color.a;\n}",gamma:[1,1,1],mainParameter:"gamma",applyTo2d:function(t){var e,i=t.imageData,r=i.data,n=this.gamma,s=r.length,o=1/n[0],a=1/n[1],h=1/n[2];for(this.rVals||(this.rVals=new Uint8Array(256),this.gVals=new Uint8Array(256),this.bVals=new Uint8Array(256)),e=0,s=256;e'},_getCacheCanvasDimensions:function(){var t=this.callSuper("_getCacheCanvasDimensions"),e=this.fontSize;return t.width+=e*t.zoomX,t.height+=e*t.zoomY,t},_render:function(t){this._setTextStyles(t),this._renderTextLinesBackground(t),this._renderTextDecoration(t,"underline"),this._renderText(t),this._renderTextDecoration(t,"overline"),this._renderTextDecoration(t,"linethrough")},_renderText:function(t){this._renderTextFill(t),this._renderTextStroke(t)},_setTextStyles:function(t,e,i){t.textBaseline="alphabetic",t.font=this._getFontDeclaration(e,i)},calcTextWidth:function(){for(var t=this.getLineWidth(0),e=1,i=this._textLines.length;et&&(t=r)}return t},_renderTextLine:function(t,e,i,r,n,s){this._renderChars(t,e,i,r,n,s)},_renderTextLinesBackground:function(t){if(this.textBackgroundColor||this.styleHas("textBackgroundColor")){for(var e,i,r,n,s,o,a=0,h=t.fillStyle,c=this._getLeftOffset(),l=this._getTopOffset(),u=0,f=0,d=0,g=this._textLines.length;ds)){var v=h-s;c[t]=h,c[f]+=v,s=h}return{width:s*g,kernedWidth:h*g}},getHeightOfChar:function(t,e){return this.getValueOfPropertyAt(t,e,"fontSize")},measureLine:function(t){var e=this._measureLine(t);return 0!==this.charSpacing&&(e.width-=this._getWidthOfCharSpacing()),e.width<0&&(e.width=0),e},_measureLine:function(t){var e,i,r,n,s=0,o=this._textLines[t],a=0,h=new Array(o.length);for(this.__charBounds[t]=h,e=0;e0&&!n){var u=this.__charBounds[e][i-1];l.left=u.left+u.width+a.kernedWidth-a.width}return l},getHeightOfLine:function(t){if(this.__lineHeights[t])return this.__lineHeights[t];for(var e=this._textLines[t],i=this.getHeightOfChar(t,0),r=1,n=e.length;ri&&(i=s)}return this.__lineHeights[t]=i*this.lineHeight*this._fontSizeMult,this.__lineHeights[t]},calcTextHeight:function(){for(var t,e=0,i=0,r=this._textLines.length;i0?(t.fillStyle=f,s&&f&&t.fillRect(d+r+o,g+l*(1-this._fontSizeFraction)+this.offsets[e]*this.fontSize,a,this.fontSize/15),o=h.left,a=h.width,s=c,f=u):a+=h.kernedWidth;t.fillStyle=u,c&&u&&t.fillRect(d+r+o,g+l*(1-this._fontSizeFraction)+this.offsets[e]*this.fontSize,a,this.fontSize/15),g+=i}else g+=i;this._removeShadow(t)}},_getFontDeclaration:function(t,i){var r=t||this;return[e.isLikelyNode?r.fontWeight:r.fontStyle,e.isLikelyNode?r.fontStyle:r.fontWeight,i?n+"px":r.fontSize+"px",e.isLikelyNode?'"'+r.fontFamily+'"':r.fontFamily].join(" ")},render:function(t){this.visible&&(this.canvas&&this.canvas.skipOffscreen&&!this.group&&!this.isOnScreen()||(this._shouldClearDimensionCache()&&this.initDimensions(),this.callSuper("render",t)))},_splitTextIntoLines:function(t){for(var i=t.split(this._reNewline),r=new Array(i.length),n=["\n"],s=[],o=0;o-1&&(this.initDimensions(),this.setCoords())},complexity:function(){return 1}}),e.Text.ATTRIBUTE_NAMES=e.SHARED_ATTRIBUTES.concat("x y dx dy font-family font-style font-weight font-size text-decoration text-anchor".split(" ")),e.Text.DEFAULT_SVG_FONT_SIZE=16,e.Text.fromElement=function(t,r){if(!t)return null;var n=e.parseAttributes(t,e.Text.ATTRIBUTE_NAMES);if(r=e.util.object.extend(r?i(r):{},n),r.top=r.top||0,r.left=r.left||0,n.textDecoration){var s=n.textDecoration;s.indexOf("underline")!==-1&&(r.underline=!0),s.indexOf("overline")!==-1&&(r.overline=!0),s.indexOf("line-through")!==-1&&(r.linethrough=!0),delete r.textDecoration}"dx"in n&&(r.left+=n.dx),"dy"in n&&(r.top+=n.dy),"fontSize"in r||(r.fontSize=e.Text.DEFAULT_SVG_FONT_SIZE),r.originX||(r.originX="left");var o="";"textContent"in t?o=t.textContent:"firstChild"in t&&null!==t.firstChild&&"data"in t.firstChild&&null!==t.firstChild.data&&(o=t.firstChild.data),o=o.replace(/^\s+|\s+$|\n+/g,"").replace(/\s+/g," ");var a=new e.Text(o,r),h=a.getHeight()/a.height,c=(a.height+a.strokeWidth)*a.lineHeight-a.height,l=c*h,u=a.getHeight()+l,f=0;return"center"===a.originX&&(f=a.getWidth()/2),"right"===a.originX&&(f=a.getWidth()),a.set({left:a.getLeft()-f,top:a.getTop()-(u-a.fontSize*(.18+a._fontSizeFraction))/a.lineHeight}),a.originX="left",a.originY="top",a},e.Text.fromObject=function(t,i,r){return e.Object._fromObject("Text",t,i,r,"text")},e.util.createAccessors(e.Text)}("undefined"!=typeof exports?exports:this),function(){function t(t){t.textDecoration&&(t.textDecoration.indexOf("underline")>-1&&(t.underline=!0),t.textDecoration.indexOf("line-through")>-1&&(t.linethrough=!0),t.textDecoration.indexOf("overline")>-1&&(t.overline=!0),delete t.textDecoration)}fabric.IText=fabric.util.createClass(fabric.Text,fabric.Observable,{type:"i-text",selectionStart:0,selectionEnd:0,selectionColor:"rgba(17,119,255,0.3)",isEditing:!1,editable:!0,editingBorderColor:"rgba(102,153,255,0.25)",cursorWidth:2,cursorColor:"#333",cursorDelay:1e3,cursorDuration:600,caching:!0,_reSpace:/\s|\n/,_currentCursorOpacity:0,_selectionDirection:null,_abortCursorAnimation:!1,__widthOfSpace:[],inCompositionMode:!1,initialize:function(t,e){this.styles=e?e.styles||{}:{},this.callSuper("initialize",t,e),this.initBehavior()},setSelectionStart:function(t){t=Math.max(t,0),this._updateAndFire("selectionStart",t)},setSelectionEnd:function(t){t=Math.min(t,this.text.length),this._updateAndFire("selectionEnd",t)},_updateAndFire:function(t,e){this[t]!==e&&(this._fireSelectionChanged(),this[t]=e),this._updateTextarea()},_fireSelectionChanged:function(){this.fire("selection:changed"),this.canvas&&this.canvas.fire("text:selection:changed",{target:this})},getSelectionStyles:function(t,e){if(2===arguments.length){for(var i=[],r=t;r0?o:0)},this.cursorOffsetCache=i,this.cursorOffsetCache},renderCursor:function(t,e){var i=this.get2DCursorLocation(),r=i.lineIndex,n=i.charIndex>0?i.charIndex-1:0,s=this.getValueOfPropertyAt(r,n,"fontSize"),o=this.scaleX*this.canvas.getZoom(),a=this.cursorWidth/o,h=t.topOffset;h+=(1-this._fontSizeFraction)*this.getHeightOfLine(r)/this.lineHeight-s*(1-this._fontSizeFraction),this.inCompositionMode&&this.renderSelection(t,e),e.fillStyle=this.getValueOfPropertyAt(r,n,"fill"),e.globalAlpha=this.__isMousedown?1:this._currentCursorOpacity,e.fillRect(t.left+t.leftOffset-a/2,h+t.top,a,s)},renderSelection:function(t,e){for(var i=this.inCompositionMode?this.hiddenTextarea.selectionStart:this.selectionStart,r=this.inCompositionMode?this.hiddenTextarea.selectionEnd:this.selectionEnd,n=this.get2DCursorLocation(i),s=this.get2DCursorLocation(r),o=n.lineIndex,a=s.lineIndex,h=n.charIndex<0?0:n.charIndex,c=s.charIndex<0?0:s.charIndex,l=o;l<=a;l++){var u=this._getLineLeftOffset(l)||0,f=this.getHeightOfLine(l),d=0,g=0,p=0;l===o&&(g=this.__charBounds[o][h].left),l>=o&&l1)&&(f/=this.lineHeight),this.inCompositionMode?(e.fillStyle=this.compositionColor||"black",e.fillRect(t.left+u+g,t.top+t.topOffset+f,p-g,1)):(e.fillStyle=this.selectionColor,e.fillRect(t.left+u+g,t.top+t.topOffset,p-g,f)),t.topOffset+=d}},getCurrentCharFontSize:function(){var t=this._getCurrentCharIndex();return this.getValueOfPropertyAt(t.l,t.c,"fontSize")},getCurrentCharColor:function(){var t=this._getCurrentCharIndex();return this.getValueOfPropertyAt(t.l,t.c,"fill")},_getCurrentCharIndex:function(){var t=this.get2DCursorLocation(this.selectionStart,!0),e=t.charIndex>0?t.charIndex-1:0;return{l:t.lineIndex,c:e}}}),fabric.IText.fromObject=function(e,i,r){if(t(e),e.styles)for(var n in e.styles)for(var s in e.styles[n])t(e.styles[n][s]);return fabric.Object._fromObject("IText",e,i,r,"text")}}(),function(){var t=fabric.util.object.clone;fabric.util.object.extend(fabric.IText.prototype,{initBehavior:function(){this.initAddedHandler(),this.initRemovedHandler(),this.initCursorSelectionHandlers(),this.initDoubleClickSimulation(),this.mouseMoveHandler=this.mouseMoveHandler.bind(this)},onDeselect:function(){this.isEditing&&this.exitEditing(),this.selected=!1,this.callSuper("onDeselect")},initAddedHandler:function(){var t=this;this.on("added",function(){var e=t.canvas;e&&(e._hasITextHandlers||(e._hasITextHandlers=!0,t._initCanvasHandlers(e)),e._iTextInstances=e._iTextInstances||[],e._iTextInstances.push(t))})},initRemovedHandler:function(){var t=this;this.on("removed",function(){var e=t.canvas;e&&(e._iTextInstances=e._iTextInstances||[],fabric.util.removeFromArray(e._iTextInstances,t),0===e._iTextInstances.length&&(e._hasITextHandlers=!1,t._removeCanvasHandlers(e)))})},_initCanvasHandlers:function(t){t._mouseUpITextHandler=function(){t._iTextInstances&&t._iTextInstances.forEach(function(t){t.__isMousedown=!1})}.bind(this),t.on("mouse:up",t._mouseUpITextHandler)},_removeCanvasHandlers:function(t){t.off("mouse:up",t._mouseUpITextHandler)},_tick:function(){this._currentTickState=this._animateCursor(this,1,this.cursorDuration,"_onTickComplete")},_animateCursor:function(t,e,i,r){var n;return n={isAborted:!1,abort:function(){this.isAborted=!0}},t.animate("_currentCursorOpacity",e,{duration:i,onComplete:function(){n.isAborted||t[r]()},onChange:function(){t.canvas&&t.selectionStart===t.selectionEnd&&t.renderCursorOrSelection()},abort:function(){return n.isAborted}}),n},_onTickComplete:function(){var t=this;this._cursorTimeout1&&clearTimeout(this._cursorTimeout1),this._cursorTimeout1=setTimeout(function(){t._currentTickCompleteState=t._animateCursor(t,0,this.cursorDuration/2,"_tick")},100)},initDelayedCursor:function(t){var e=this,i=t?0:this.cursorDelay;this.abortCursorAnimation(),this._currentCursorOpacity=1,this._cursorTimeout2=setTimeout(function(){e._tick()},i)},abortCursorAnimation:function(){var t=this._currentTickState||this._currentTickCompleteState;this._currentTickState&&this._currentTickState.abort(),this._currentTickCompleteState&&this._currentTickCompleteState.abort(),clearTimeout(this._cursorTimeout1),clearTimeout(this._cursorTimeout2),this._currentCursorOpacity=0,t&&this.canvas&&this.canvas.clearContext(this.canvas.contextTop||this.ctx)},selectAll:function(){this.selectionStart=0,this.selectionEnd=this._text.length,this._fireSelectionChanged(),this._updateTextarea()},getSelectedText:function(){return this._text.slice(this.selectionStart,this.selectionEnd).join("")},findWordBoundaryLeft:function(t){var e=0,i=t-1;if(this._reSpace.test(this._text[i]))for(;this._reSpace.test(this._text[i]);)e++,i--;for(;/\S/.test(this._text[i])&&i>-1;)e++,i--;return t-e},findWordBoundaryRight:function(t){var e=0,i=t;if(this._reSpace.test(this._text[i]))for(;this._reSpace.test(this._text[i]);)e++,i++;for(;/\S/.test(this._text[i])&&i-1;)e++,i--;return t-e},findLineBoundaryRight:function(t){for(var e=0,i=t;!/\n/.test(this._text[i])&&i0&&ithis.__selectionStartOnMouseDown?(this.selectionStart=this.__selectionStartOnMouseDown,this.selectionEnd=e):(this.selectionStart=e,this.selectionEnd=this.__selectionStartOnMouseDown),this.selectionStart===i&&this.selectionEnd===r||(this.restartCursorIfNeeded(),this._fireSelectionChanged(),this._updateTextarea(),this.renderCursorOrSelection()))}},_setEditingProps:function(){this.hoverCursor="text",this.canvas&&(this.canvas.defaultCursor=this.canvas.moveCursor="text"),this.borderColor=this.editingBorderColor,this.hasControls=this.selectable=!1,this.lockMovementX=this.lockMovementY=!0},fromStringToGraphemeSelection:function(t,e,i){var r=i.slice(0,t),n=fabric.util.string.graphemeSplit(r).length;if(t===e)return{selectionStart:n,selectionEnd:n};var s=i.slice(t,e),o=fabric.util.string.graphemeSplit(s).length;return{selectionStart:n,selectionEnd:n+o}},fromGraphemeToStringSelection:function(t,e,i){var r=i.slice(0,t),n=r.join("").length;if(t===e)return{selectionStart:n,selectionEnd:n};var s=i.slice(t,e),o=s.join("").length;return{selectionStart:n,selectionEnd:n+o}},_updateTextarea:function(){if(this.cursorOffsetCache={},this.hiddenTextarea){if(!this.inCompositionMode){var t=this.fromGraphemeToStringSelection(this.selectionStart,this.selectionEnd,this._text);this.hiddenTextarea.selectionStart=t.selectionStart,this.hiddenTextarea.selectionEnd=t.selectionEnd}this.updateTextareaPosition()}},updateFromTextArea:function(){if(this.hiddenTextarea){this.cursorOffsetCache={},this.text=this.hiddenTextarea.value;var t=this.fromStringToGraphemeSelection(this.hiddenTextarea.selectionStart,this.hiddenTextarea.selectionEnd,this.hiddenTextarea.value);this.selectionEnd=this.selectionStart=t.selectionEnd,this.inCompositionMode||(this.selectionStart=t.selectionStart),this.updateTextareaPosition()}},updateTextareaPosition:function(){if(this.selectionStart===this.selectionEnd){var t=this._calcTextareaPosition();this.hiddenTextarea.style.left=t.left,this.hiddenTextarea.style.top=t.top}},_calcTextareaPosition:function(){if(!this.canvas)return{x:1,y:1};var t=this.inCompositionMode?this.compositionStart:this.selectionStart,e=this._getCursorBoundaries(t),i=this.get2DCursorLocation(t),r=i.lineIndex,n=i.charIndex,s=this.getValueOfPropertyAt(r,n,"fontSize")*this.lineHeight,o=e.leftOffset,a=this.calcTransformMatrix(),h={x:e.left+o,y:e.top+e.topOffset+s},c=this.canvas.upperCanvasEl,l=c.width-s,u=c.height-s;return h=fabric.util.transformPoint(h,a),h=fabric.util.transformPoint(h,this.canvas.viewportTransform),h.x<0&&(h.x=0),h.x>l&&(h.x=l),h.y<0&&(h.y=0),h.y>u&&(h.y=u),h.x+=this.canvas._offset.left,h.y+=this.canvas._offset.top,{left:h.x+"px",top:h.y+"px",fontSize:s+"px",charHeight:s}},_saveEditingProps:function(){this._savedProps={hasControls:this.hasControls,borderColor:this.borderColor,lockMovementX:this.lockMovementX,lockMovementY:this.lockMovementY,hoverCursor:this.hoverCursor,defaultCursor:this.canvas&&this.canvas.defaultCursor,moveCursor:this.canvas&&this.canvas.moveCursor}},_restoreEditingProps:function(){this._savedProps&&(this.hoverCursor=this._savedProps.overCursor,this.hasControls=this._savedProps.hasControls,this.borderColor=this._savedProps.borderColor,this.lockMovementX=this._savedProps.lockMovementX,this.lockMovementY=this._savedProps.lockMovementY,this.canvas&&(this.canvas.defaultCursor=this._savedProps.defaultCursor,this.canvas.moveCursor=this._savedProps.moveCursor))},exitEditing:function(){var t=this._textBeforeEdit!==this.text;return this.selected=!1,this.isEditing=!1,this.selectable=!0,this.selectionEnd=this.selectionStart,this.hiddenTextarea&&(this.hiddenTextarea.blur&&this.hiddenTextarea.blur(),this.canvas&&this.hiddenTextarea.parentNode.removeChild(this.hiddenTextarea),this.hiddenTextarea=null),this.abortCursorAnimation(),this._restoreEditingProps(),this._currentCursorOpacity=0,this.fire("editing:exited"),t&&this.fire("modified"),this.canvas&&(this.canvas.off("mouse:move",this.mouseMoveHandler),this.canvas.fire("text:editing:exited",{target:this}),t&&this.canvas.fire("object:modified",{target:this})),this},_removeExtraneousStyles:function(){for(var t in this.styles)this._textLines[t]||delete this.styles[t]},removeStyleFromTo:function(t,e){var i,r,n=this.get2DCursorLocation(t,!0),s=this.get2DCursorLocation(e,!0),o=n.lineIndex,a=n.charIndex,h=s.lineIndex,c=s.charIndex;if(o!==h){if(this.styles[o])for(i=a;ie&&(this.styles[s+i]=r[s],r[s-i]||delete this.styles[s])}},restartCursorIfNeeded:function(){this._currentTickState&&!this._currentTickState.isAborted&&this._currentTickCompleteState&&!this._currentTickCompleteState.isAborted||this.initDelayedCursor()},insertNewlineStyleObject:function(e,i,r,n){var s,o={},a=!1;r||(r=1),this.shiftLineStyles(e,r),this.styles[e]&&this.styles[e][i-1]&&(s=this.styles[e][i-1]);for(var h in this.styles[e]){var c=parseInt(h,10);c>=i&&(a=!0,o[c-i]=this.styles[e][h],delete this.styles[e][h])}for(a?this.styles[e+r]=o:delete this.styles[e+r];r>1;)r--,n[r]?this.styles[e+r]={0:t(n[r])}:s?this.styles[e+r]={0:t(s)}:delete this.styles[e+r];this._forceClearCache=!0},insertCharStyleObject:function(e,i,r,n){var s=this.styles[e],o=t(s);r||(r=1);for(var a in o){var h=parseInt(a,10);h>=i&&(s[h+r]=o[h],o[h-r]||delete s[h])}if(this._forceClearCache=!0,s)if(n)for(;r--;)this.styles[e][i+r]=t(n[r]);else for(var c=s[i?i-1:1];c&&r--;)this.styles[e][i+r]=t(c)},insertNewStyleBlock:function(t,e,i){for(var r=this.get2DCursorLocation(e,!0),n=0,s=0,o=0;ot&&it?this.selectionStart=t:this.selectionStart<0&&(this.selectionStart=0),this.selectionEnd>t?this.selectionEnd=t:this.selectionEnd<0&&(this.selectionEnd=0)}})}(),fabric.util.object.extend(fabric.IText.prototype,{initDoubleClickSimulation:function(){this.__lastClickTime=+new Date,this.__lastLastClickTime=+new Date,this.__lastPointer={},this.on("mousedown",this.onMouseDown.bind(this))},onMouseDown:function(t){this.__newClickTime=+new Date;var e=this.canvas.getPointer(t.e);this.isTripleClick(e,t.e)?(this.fire("tripleclick",t),this._stopEvent(t.e)):this.isDoubleClick(e)&&(this.fire("dblclick",t),this._stopEvent(t.e)),this.__lastLastClickTime=this.__lastClickTime,this.__lastClickTime=this.__newClickTime,this.__lastPointer=e,this.__lastIsEditing=this.isEditing,this.__lastSelected=this.selected},isDoubleClick:function(t){return this.__newClickTime-this.__lastClickTime<500&&this.__lastPointer.x===t.x&&this.__lastPointer.y===t.y&&this.__lastIsEditing},isTripleClick:function(t){return this.__newClickTime-this.__lastClickTime<500&&this.__lastClickTime-this.__lastLastClickTime<500&&this.__lastPointer.x===t.x&&this.__lastPointer.y===t.y},_stopEvent:function(t){t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation()},initCursorSelectionHandlers:function(){this.initMousedownHandler(),this.initMouseupHandler(),this.initClicks()},initClicks:function(){this.on("dblclick",function(t){this.selectWord(this.getSelectionStartFromPointer(t.e))}),this.on("tripleclick",function(t){this.selectLine(this.getSelectionStartFromPointer(t.e))})},initMousedownHandler:function(){this.on("mousedown",function(t){if(this.editable&&(!t.e.button||1===t.e.button)){var e=this.canvas.getPointer(t.e);this.__mousedownX=e.x,this.__mousedownY=e.y,this.__isMousedown=!0,this.selected&&this.setCursorByClick(t.e),this.isEditing&&(this.__selectionStartOnMouseDown=this.selectionStart,this.selectionStart===this.selectionEnd&&this.abortCursorAnimation(),this.renderCursorOrSelection())}})},_isObjectMoved:function(t){var e=this.canvas.getPointer(t);return this.__mousedownX!==e.x||this.__mousedownY!==e.y},initMouseupHandler:function(){this.on("mouseup",function(t){this.__isMousedown=!1,!this.editable||this._isObjectMoved(t.e)||t.e.button&&1!==t.e.button||(this.__lastSelected&&!this.__corner&&(this.enterEditing(t.e),this.selectionStart===this.selectionEnd?this.initDelayedCursor(!0):this.renderCursorOrSelection()),this.selected=!0)})},setCursorByClick:function(t){var e=this.getSelectionStartFromPointer(t),i=this.selectionStart,r=this.selectionEnd;t.shiftKey?this.setSelectionStartEndWithShift(i,r,e):(this.selectionStart=e,this.selectionEnd=e),this.isEditing&&(this._fireSelectionChanged(),this._updateTextarea())},getSelectionStartFromPointer:function(t){for(var e,i,r=this.getLocalPointer(t),n=0,s=0,o=0,a=0,h=0,c=0,l=this._textLines.length;c0&&(a+=this._textLines[c-1].length+1);e=this._getLineLeftOffset(h),s=e*this.scaleX,i=this._textLines[h];for(var u=0,f=i.length;us?0:1,h=r+a;return this.flipX&&(h=n-h),h>this._text.length&&(h=this._text.length),h}}),fabric.util.object.extend(fabric.IText.prototype,{initHiddenTextarea:function(){this.hiddenTextarea=fabric.document.createElement("textarea"),this.hiddenTextarea.setAttribute("autocapitalize","off"),this.hiddenTextarea.setAttribute("autocorrect","off"),this.hiddenTextarea.setAttribute("autocomplete","off"),this.hiddenTextarea.setAttribute("spellcheck","false");var t=this._calcTextareaPosition();this.hiddenTextarea.style.cssText="white-space: nowrap; position: absolute; top: "+t.top+"; left: "+t.left+"; z-index: -999; opacity: 0; width: 1px; height: 1px; font-size: 1px; line-height: 1px; paddingーtop: "+t.fontSize+";",fabric.document.body.appendChild(this.hiddenTextarea),fabric.util.addListener(this.hiddenTextarea,"keydown",this.onKeyDown.bind(this)),fabric.util.addListener(this.hiddenTextarea,"keyup",this.onKeyUp.bind(this)),fabric.util.addListener(this.hiddenTextarea,"input",this.onInput.bind(this)),fabric.util.addListener(this.hiddenTextarea,"copy",this.copy.bind(this)),fabric.util.addListener(this.hiddenTextarea,"cut",this.copy.bind(this)),fabric.util.addListener(this.hiddenTextarea,"paste",this.paste.bind(this)),fabric.util.addListener(this.hiddenTextarea,"compositionstart",this.onCompositionStart.bind(this)),fabric.util.addListener(this.hiddenTextarea,"compositionupdate",this.onCompositionUpdate.bind(this)),fabric.util.addListener(this.hiddenTextarea,"compositionend",this.onCompositionEnd.bind(this)),!this._clickHandlerInitialized&&this.canvas&&(fabric.util.addListener(this.canvas.upperCanvasEl,"click",this.onClick.bind(this)),this._clickHandlerInitialized=!0)},_keysMap:{9:"exitEditing",27:"exitEditing",33:"moveCursorUp",34:"moveCursorDown",35:"moveCursorRight",36:"moveCursorLeft",37:"moveCursorLeft",38:"moveCursorUp",39:"moveCursorRight",40:"moveCursorDown"},_ctrlKeysMapUp:{67:"copy",88:"cut"},_ctrlKeysMapDown:{65:"selectAll"},onClick:function(){this.hiddenTextarea&&this.hiddenTextarea.focus()},onKeyDown:function(t){if(this.isEditing&&!this.inCompositionMode){if(t.keyCode in this._keysMap)this[this._keysMap[t.keyCode]](t);else{if(!(t.keyCode in this._ctrlKeysMapDown&&(t.ctrlKey||t.metaKey)))return;this[this._ctrlKeysMapDown[t.keyCode]](t)}t.stopImmediatePropagation(),t.preventDefault(),t.keyCode>=33&&t.keyCode<=40?(this.clearContextTop(),this.renderCursorOrSelection()):this.canvas&&this.canvas.renderAll()}},onKeyUp:function(t){return!this.isEditing||this._copyDone||this.inCompositionMode?void(this._copyDone=!1):void(t.keyCode in this._ctrlKeysMapUp&&(t.ctrlKey||t.metaKey)&&(this[this._ctrlKeysMapUp[t.keyCode]](t),t.stopImmediatePropagation(),t.preventDefault(),this.canvas&&this.canvas.renderAll()))},onInput:function(t){var e=this.fromPaste;if(this.fromPaste=!1,t&&t.stopPropagation(),this.isEditing){var i,r,n=this._splitTextIntoLines(this.hiddenTextarea.value).graphemeText,s=this._text.length,o=n.length,a=o-s;""===this.hiddenTextarea.value&&(this.styles={},this.updateFromTextArea(),this.fire("changed"),this.canvas&&(this.canvas.fire("text:changed",{target:this}),this.canvas.renderAll())),this.selectionStart!==this.selectionEnd?(i=this._text.slice(this.selectionStart,this.selectionEnd), +a+=this.selectionEnd-this.selectionStart):oh.selectionStart?this.removeStyleFromTo(this.selectionEnd-i.length,this.selectionEnd):this.removeStyleFromTo(this.selectionEnd,this.selectionEnd+i.length)),r.length&&(e&&r.join("")===fabric.copiedText?this.insertNewStyleBlock(r,this.selectionStart,fabric.copiedTextStyle):this.insertNewStyleBlock(r,this.selectionStart)),this.updateFromTextArea(),this.fire("changed"),this.canvas&&(this.canvas.fire("text:changed",{target:this}),this.canvas.renderAll())}},onCompositionStart:function(){this.inCompositionMode=!0},onCompositionEnd:function(){this.inCompositionMode=!1},onCompositionUpdate:function(t){this.compositionStart=t.target.selectionStart,this.compositionEnd=t.target.selectionEnd,this.updateTextareaPosition()},copy:function(){if(this.selectionStart!==this.selectionEnd){var t=this.getSelectedText();fabric.copiedText=t,fabric.copiedTextStyle=this.getSelectionStyles(this.selectionStart,this.selectionEnd),this._copyDone=!0}},paste:function(){this.fromPaste=!0},_getClipboardData:function(t){return t&&t.clipboardData||fabric.window.clipboardData},_getWidthBeforeCursor:function(t,e){var i,r=this._getLineLeftOffset(t);return e>0&&(i=this.__charBounds[t][e-1],r+=i.left+i.width),r},getDownCursorOffset:function(t,e){var i=this._getSelectionForOffset(t,e),r=this.get2DCursorLocation(i),n=r.lineIndex;if(n===this._textLines.length-1||t.metaKey||34===t.keyCode)return this._text.length-i;var s=r.charIndex,o=this._getWidthBeforeCursor(n,s),a=this._getIndexOnLine(n+1,o),h=this._textLines[n].slice(s);return h.length+a+2},_getSelectionForOffset:function(t,e){return t.shiftKey&&this.selectionStart!==this.selectionEnd&&e?this.selectionEnd:this.selectionStart},getUpCursorOffset:function(t,e){var i=this._getSelectionForOffset(t,e),r=this.get2DCursorLocation(i),n=r.lineIndex;if(0===n||t.metaKey||33===t.keyCode)return-i;var s=r.charIndex,o=this._getWidthBeforeCursor(n,s),a=this._getIndexOnLine(n-1,o),h=this._textLines[n].slice(0,s);return-this._textLines[n-1].length+a-h.length},_getIndexOnLine:function(t,e){for(var i,r,n=this._textLines[t],s=this._getLineLeftOffset(t),o=s,a=0,h=0,c=n.length;he){r=!0;var l=o-i,u=o,f=Math.abs(l-e),d=Math.abs(u-e);a=d=this._text.length&&this.selectionEnd>=this._text.length||this._moveCursorUpOrDown("Down",t)},moveCursorUp:function(t){0===this.selectionStart&&0===this.selectionEnd||this._moveCursorUpOrDown("Up",t)},_moveCursorUpOrDown:function(t,e){var i="get"+t+"CursorOffset",r=this[i](e,"right"===this._selectionDirection);e.shiftKey?this.moveCursorWithShift(r):this.moveCursorWithoutShift(r),0!==r&&(this.setSelectionInBoundaries(),this.abortCursorAnimation(),this._currentCursorOpacity=1,this.initDelayedCursor(),this._fireSelectionChanged(),this._updateTextarea())},moveCursorWithShift:function(t){var e="left"===this._selectionDirection?this.selectionStart+t:this.selectionEnd+t;return this.setSelectionStartEndWithShift(this.selectionStart,this.selectionEnd,e),0!==t},moveCursorWithoutShift:function(t){return t<0?(this.selectionStart+=t,this.selectionEnd=this.selectionStart):(this.selectionEnd+=t,this.selectionStart=this.selectionEnd),0!==t},moveCursorLeft:function(t){0===this.selectionStart&&0===this.selectionEnd||this._moveCursorLeftOrRight("Left",t)},_move:function(t,e,i){var r;if(t.altKey)r=this["findWordBoundary"+i](this[e]);else{if(!t.metaKey&&35!==t.keyCode&&36!==t.keyCode)return this[e]+="Left"===i?-1:1,!0;r=this["findLineBoundary"+i](this[e])}if(void 0!==typeof r&&this[e]!==r)return this[e]=r,!0},_moveLeft:function(t,e){return this._move(t,e,"Left")},_moveRight:function(t,e){return this._move(t,e,"Right")},moveCursorLeftWithoutShift:function(t){var e=!0;return this._selectionDirection="left",this.selectionEnd===this.selectionStart&&0!==this.selectionStart&&(e=this._moveLeft(t,"selectionStart")),this.selectionEnd=this.selectionStart,e},moveCursorLeftWithShift:function(t){return"right"===this._selectionDirection&&this.selectionStart!==this.selectionEnd?this._moveLeft(t,"selectionEnd"):0!==this.selectionStart?(this._selectionDirection="left",this._moveLeft(t,"selectionStart")):void 0},moveCursorRight:function(t){this.selectionStart>=this._text.length&&this.selectionEnd>=this._text.length||this._moveCursorLeftOrRight("Right",t)},_moveCursorLeftOrRight:function(t,e){var i="moveCursor"+t+"With";this._currentCursorOpacity=1,i+=e.shiftKey?"Shift":"outShift",this[i](e)&&(this.abortCursorAnimation(),this.initDelayedCursor(),this._fireSelectionChanged(),this._updateTextarea())},moveCursorRightWithShift:function(t){return"left"===this._selectionDirection&&this.selectionStart!==this.selectionEnd?this._moveRight(t,"selectionStart"):this.selectionEnd!==this._text.length?(this._selectionDirection="right",this._moveRight(t,"selectionEnd")):void 0},moveCursorRightWithoutShift:function(t){var e=!0;return this._selectionDirection="right",this.selectionStart===this.selectionEnd?(e=this._moveRight(t,"selectionStart"),this.selectionEnd=this.selectionStart):this.selectionStart=this.selectionEnd,e},removeChars:function(t){this.selectionStart===this.selectionEnd?this._removeCharsNearCursor(t):this._removeCharsFromTo(this.selectionStart,this.selectionEnd),this.set("dirty",!0),this.setSelectionEnd(this.selectionStart),this._removeExtraneousStyles(),this.canvas&&this.canvas.renderAll(),this.setCoords(),this.fire("changed"),this.canvas&&this.canvas.fire("text:changed",{target:this})},_removeCharsNearCursor:function(t){if(0!==this.selectionStart)if(t.metaKey){var e=this.findLineBoundaryLeft(this.selectionStart);this._removeCharsFromTo(e,this.selectionStart),this.setSelectionStart(e)}else if(t.altKey){var i=this.findWordBoundaryLeft(this.selectionStart);this._removeCharsFromTo(i,this.selectionStart),this.setSelectionStart(i)}else this._removeSingleCharAndStyle(this.selectionStart),this.setSelectionStart(this.selectionStart-1)}}),function(){var t=fabric.util.toFixed,e=fabric.Object.NUM_FRACTION_DIGITS;fabric.util.object.extend(fabric.Text.prototype,{toSVG:function(t){var e=this._createBaseSVGMarkup(),i=this._getSVGLeftTopOffsets(),r=this._getSVGTextAndBg(i.textTop,i.textLeft);return this._wrapSVGTextAndBg(e,r),t?t(e.join("")):e.join("")},_getSVGLeftTopOffsets:function(){return{textLeft:-this.width/2,textTop:-this.height/2,lineTop:this.getHeightOfLine(0)}},_wrapSVGTextAndBg:function(t,e){var i=!0,r=this.getSvgFilter(),n=""===r?"":' style="'+r+'"';t.push("\t\n",e.textBgRects.join(""),"\t\t\n',e.textSpans.join(""),"\t\t\n","\t\n")},_getSVGTextAndBg:function(t,e){var i,r=[],n=[],s=t;this._setSVGBg(n);for(var o=0,a=this._textLines.length;o",fabric.util.string.escapeXml(i),"\n"].join("")},_setSVGTextLineText:function(t,e,i,r){var n,s,o,a,h,c=this.getHeightOfLine(e),l="",u=0,f=this._textLines[e];r+=c*(1-this._fontSizeFraction)/this.lineHeight;for(var d=0,g=f.length-1;d<=g;d++)h=d===g||this.charSpacing,l+=f[d],o=this.__charBounds[e][d],0===u&&(i+=o.kernedWidth-o.width),u+=o.kernedWidth,"justify"!==this.textAlign||h||this._reSpaceAndTab.test(f[d])&&(h=!0),h||(n=n||this.getCompleteStyleDeclaration(e,d),s=this.getCompleteStyleDeclaration(e,d+1),h=this._hasStyleChanged(n,s)),h&&(a=this._getStyleDeclaration(e,d)||{},t.push(this._createTextCharSpan(l,a,i,r)),l="",n=s,i+=u,u=0)},_pushTextBgRect:function(i,r,n,s,o,a){i.push("\t\t\n')},_setSVGTextLineBg:function(t,e,i,r){for(var n,s,o=this._textLines[e],a=this.getHeightOfLine(e)/this.lineHeight,h=0,c=0,l=this.getValueOfPropertyAt(e,0,"textBackgroundColor"),u=0,f=o.length;uthis.width&&this._set("width",this.dynamicMinWidth),"justify"===this.textAlign&&this.enlargeSpaces(),this.height=this.calcTextHeight()}},_generateStyleMap:function(t){for(var e=0,i=0,r=0,n={},s=0;s0?(i=0,r++,e++):this._reSpaceAndTab.test(t.graphemeText[r])&&s>0&&(i++,r++),n[s]={line:e,offset:i},r+=t.graphemeLines[s].length,i+=t.graphemeLines[s].length;return n},styleHas:function(t,i){if(this._styleMap&&!this.isWrapping){var r=this._styleMap[i];r&&(i=r.line)}return e.Text.prototype.styleHas.call(this,t,i)},_getStyleDeclaration:function(t,e){if(this._styleMap&&!this.isWrapping){var i=this._styleMap[t];if(!i)return null;t=i.line,e=i.offset+e}return this.callSuper("_getStyleDeclaration",t,e)},_setStyleDeclaration:function(t,e,i){var r=this._styleMap[t];t=r.line,e=r.offset+e,this.styles[t][e]=i},_deleteStyleDeclaration:function(t,e){var i=this._styleMap[t];t=i.line,e=i.offset+e,delete this.styles[t][e]},_getLineStyle:function(t){var e=this._styleMap[t];return this.styles[e.line]},_setLineStyle:function(t,e){var i=this._styleMap[t];this.styles[i.line]=e},_deleteLineStyle:function(t){var e=this._styleMap[t];delete this.styles[e.line]},_wrapText:function(t,e){var i,r=[];for(this.isWrapping=!0,i=0;i=r&&!g&&(s.push(o),o=[],n=u,g=!0),g||o.push(l),o=o.concat(h),f=this._measureWord([l],i,c),c++,g=!1,u>d&&(d=u);return v&&s.push(o),d>this.dynamicMinWidth&&(this.dynamicMinWidth=d-p),s},_splitTextIntoLines:function(t){for(var i=e.Text.prototype._splitTextIntoLines.call(this,t),r=this._wrapText(i.lines,this.width),n=new Array(r.length),s=0;s=h.getMinWidth()?(h.set("width",c),!0):void 0},fabric.Group.prototype._refreshControlsVisibility=function(){if("undefined"!=typeof fabric.Textbox)for(var t=this._objects.length;t--;)if(this._objects[t]instanceof fabric.Textbox)return void this.setControlsVisibility(fabric.Textbox.getTextboxControlVisibility())},fabric.util.object.extend(fabric.Textbox.prototype,{_removeExtraneousStyles:function(){for(var t in this._styleMap)this._textLines[t]||delete this.styles[this._styleMap[t].line]}})}(),function(){function request(t,e,i){var r=URL.parse(t);r.port||(r.port=0===r.protocol.indexOf("https:")?443:80);var n=0===r.protocol.indexOf("https:")?HTTPS:HTTP,s=n.request({hostname:r.hostname,port:r.port,path:r.path,method:"GET"},function(t){var r="";e&&t.setEncoding(e),t.on("end",function(){i(r)}),t.on("data",function(e){200===t.statusCode&&(r+=e)})});s.on("error",function(t){t.errno===process.ECONNREFUSED?fabric.log("ECONNREFUSED: connection refused to "+r.hostname+":"+r.port):fabric.log(t.message),i(null)}),s.end()}function requestFs(t,e){var i=require("fs");i.readFile(t,function(t,i){if(t)throw fabric.log(t),t;e(i)})}if("undefined"==typeof document||"undefined"==typeof window){var DOMParser=require("xmldom").DOMParser,URL=require("url"),HTTP=require("http"),HTTPS=require("https"),Canvas=require(fabric.canvasModule),Image=require(fabric.canvasModule).Image;fabric.util.loadImage=function(t,e,i){function r(r){r?(n.src=new Buffer(r,"binary"),n._src=t,e&&e.call(i,n)):(n=null,e&&e.call(i,null,!0))}var n=new Image;t&&(t instanceof Buffer||0===t.indexOf("data"))?(n.src=n._src=t,e&&e.call(i,n)):t&&0!==t.indexOf("http")?requestFs(t,r):t?request(t,"binary",r):e&&e.call(i,t)},fabric.loadSVGFromURL=function(t,e,i){t=t.replace(/^\n\s*/,"").replace(/\?.*$/,"").trim(),0!==t.indexOf("http")?requestFs(t,function(t){fabric.loadSVGFromString(t.toString(),e,i)}):request(t,"",function(t){fabric.loadSVGFromString(t,e,i)})},fabric.loadSVGFromString=function(t,e,i){var r=(new DOMParser).parseFromString(t);fabric.parseSVGDocument(r.documentElement,function(t,i){e&&e(t,i)},i)},fabric.util.getScript=function(url,callback){request(url,"",function(body){eval(body),callback&&callback()})},fabric.createCanvasForNode=function(t,e,i,r){r=r||i;var n=fabric.document.createElement("canvas"),s=new Canvas(t||600,e||600,r),o=new Canvas(t||600,e||600,r);n.width=s.width,n.height=s.height,i=i||{},i.nodeCanvas=s,i.nodeCacheCanvas=o;var a=fabric.Canvas||fabric.StaticCanvas,h=new a(n,i);return h.nodeCanvas=s,h.nodeCacheCanvas=o,h.contextContainer=s.getContext("2d"),h.contextCache=o.getContext("2d"),h.Font=Canvas.Font,h};var originaInitStatic=fabric.StaticCanvas.prototype._initStatic;fabric.StaticCanvas.prototype._initStatic=function(t,e){t=t||fabric.document.createElement("canvas"),this.nodeCanvas=new Canvas(t.width,t.height),this.nodeCacheCanvas=new Canvas(t.width,t.height),originaInitStatic.call(this,t,e),this.contextContainer=this.nodeCanvas.getContext("2d"),this.contextCache=this.nodeCacheCanvas.getContext("2d"),this.Font=Canvas.Font},fabric.StaticCanvas.prototype.createPNGStream=function(){return this.nodeCanvas.createPNGStream()},fabric.StaticCanvas.prototype.createJPEGStream=function(t){return this.nodeCanvas.createJPEGStream(t)},fabric.StaticCanvas.prototype._initRetinaScaling=function(){if(this._isRetinaScaling())return this.lowerCanvasEl.setAttribute("width",this.width*fabric.devicePixelRatio),this.lowerCanvasEl.setAttribute("height",this.height*fabric.devicePixelRatio),this.nodeCanvas.width=this.width*fabric.devicePixelRatio,this.nodeCanvas.height=this.height*fabric.devicePixelRatio,this.contextContainer.scale(fabric.devicePixelRatio,fabric.devicePixelRatio),this},fabric.Canvas&&(fabric.Canvas.prototype._initRetinaScaling=fabric.StaticCanvas.prototype._initRetinaScaling);var origSetBackstoreDimension=fabric.StaticCanvas.prototype._setBackstoreDimension;fabric.StaticCanvas.prototype._setBackstoreDimension=function(t,e){return origSetBackstoreDimension.call(this,t,e),this.nodeCanvas[t]=e,this},fabric.Canvas&&(fabric.Canvas.prototype._setBackstoreDimension=fabric.StaticCanvas.prototype._setBackstoreDimension)}}(); diff --git a/product_rental_bookings/static/src/js/lib/fullcalendar.js b/product_rental_bookings/static/src/js/lib/fullcalendar.js new file mode 100755 index 0000000..7976515 --- /dev/null +++ b/product_rental_bookings/static/src/js/lib/fullcalendar.js @@ -0,0 +1,23 @@ +///*! +// * FullCalendar v3.4.0 +// * Docs & License: https://fullcalendar.io/ +// * (c) 2017 Adam Shaw +// */ +//!function(t){"function"==typeof define&&define.amd?define(["jquery","moment"],t):"object"==typeof exports?module.exports=t(require("jquery"),require("moment")):t(jQuery,moment)}(function(t,e){function n(t){return it(t,Qt)}function i(t,e){e.left&&t.css({"border-left-width":1,"margin-left":e.left-1}),e.right&&t.css({"border-right-width":1,"margin-right":e.right-1})}function r(t){t.css({"margin-left":"","margin-right":"","border-left-width":"","border-right-width":""})}function s(){t("body").addClass("fc-not-allowed")}function o(){t("body").removeClass("fc-not-allowed")}function a(e,n,i){var r=Math.floor(n/e.length),s=Math.floor(n-r*(e.length-1)),o=[],a=[],u=[],h=0;l(e),e.each(function(n,i){var l=n===e.length-1?s:r,c=t(i).outerHeight(!0);c *").each(function(e,i){var r=t(i).outerWidth();r>n&&(n=r)}),n++,e.width(n),n}function h(t,e){var n,i=t.add(e);return i.css({position:"relative",left:-1}),n=t.outerHeight()-e.outerHeight(),i.css({position:"",left:""}),n}function c(e){var n=e.css("position"),i=e.parents().filter(function(){var e=t(this);return/(auto|scroll)/.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==n&&i.length?i:t(e[0].ownerDocument||document)}function d(t,e){var n=t.offset(),i=n.left-(e?e.left:0),r=n.top-(e?e.top:0);return{left:i,right:i+t.outerWidth(),top:r,bottom:r+t.outerHeight()}}function f(t,e){var n=t.offset(),i=p(t),r=n.left+w(t,"border-left-width")+i.left-(e?e.left:0),s=n.top+w(t,"border-top-width")+i.top-(e?e.top:0);return{left:r,right:r+t[0].clientWidth,top:s,bottom:s+t[0].clientHeight}}function g(t,e){var n=t.offset(),i=n.left+w(t,"border-left-width")+w(t,"padding-left")-(e?e.left:0),r=n.top+w(t,"border-top-width")+w(t,"padding-top")-(e?e.top:0);return{left:i,right:i+t.width(),top:r,bottom:r+t.height()}}function p(t){var e,n=t[0].offsetWidth-t[0].clientWidth,i=t[0].offsetHeight-t[0].clientHeight;return n=v(n),i=v(i),e={left:0,right:0,top:0,bottom:i},m()&&"rtl"==t.css("direction")?e.left=n:e.right=n,e}function v(t){return t=Math.max(0,t),t=Math.round(t)}function m(){return null===Xt&&(Xt=y()),Xt}function y(){var e=t("
").css({position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}).appendTo("body"),n=e.children(),i=n.offset().left>e.offset().left;return e.remove(),i}function w(t,e){return parseFloat(t.css(e))||0}function S(t){return 1==t.which&&!t.ctrlKey}function b(t){var e=t.originalEvent.touches;return e&&e.length?e[0].pageX:t.pageX}function E(t){var e=t.originalEvent.touches;return e&&e.length?e[0].pageY:t.pageY}function D(t){return/^touch/.test(t.type)}function T(t){t.addClass("fc-unselectable").on("selectstart",H)}function C(t){t.removeClass("fc-unselectable").off("selectstart",H)}function H(t){t.preventDefault()}function R(t,e){var n={left:Math.max(t.left,e.left),right:Math.min(t.right,e.right),top:Math.max(t.top,e.top),bottom:Math.min(t.bottom,e.bottom)};return n.leftl&&o=l?(n=o.clone(),r=!0):(n=l.clone(),r=!1),a<=u?(i=a.clone(),s=!0):(i=u.clone(),s=!1),{start:n,end:i,isStart:r,isEnd:s}}function F(t,n){return e.duration({days:t.clone().stripTime().diff(n.clone().stripTime(),"days"),ms:t.time()-n.time()})}function A(t,n){return e.duration({days:t.clone().stripTime().diff(n.clone().stripTime(),"days")})}function G(t,n,i){return e.duration(Math.round(t.diff(n,i,!0)),i)}function V(t,e){var n,i,r;for(n=0;n=1&&vt(r)));n++);return i}function O(t,e){var n=V(t);return"week"===n&&"object"==typeof e&&e.days&&(n="day"),n}function P(t,n,i){return null!=i?i.diff(n,t,!0):e.isDuration(n)?n.as(t):n.end.diff(n.start,t,!0)}function _(t,e,n){var i;return tt(n)?(e-t)/n:(i=n.asMonths(),Math.abs(i)>=1&&vt(i)?e.diff(t,"months",!0)/i:e.diff(t,"days",!0)/n.asDays())}function W(t,e){var n,i;return tt(t)||tt(e)?t/e:(n=t.asMonths(),i=e.asMonths(),Math.abs(n)>=1&&vt(n)&&Math.abs(i)>=1&&vt(i)?n/i:t.asDays()/e.asDays())}function Y(t,n){var i;return tt(t)?e.duration(t*n):(i=t.asMonths(),Math.abs(i)>=1&&vt(i)?e.duration({months:i*n}):e.duration({days:t.asDays()*n}))}function q(t){return{start:t.start.clone(),end:t.end.clone()}}function U(t,e){return t=q(t),e.start&&(t.start=j(t.start,e)),e.end&&(t.end=K(t.end,e.end)),t}function j(t,e){return t=t.clone(),e.start&&(t=J(t,e.start)),e.end&&t>=e.end&&(t=e.end.clone().subtract(1)),t}function Z(t,e){return(!e.start||t>=e.start)&&(!e.end||t=e.start)&&(!e.end||t.start=e.start)&&(!e.end||t.end<=e.end)}function X(t,e){return(t.start&&e.start&&t.start.isSame(e.start)||!t.start&&!e.start)&&(t.end&&e.end&&t.end.isSame(e.end)||!t.end&&!e.end)}function K(t,e){return(t.isBefore(e)?t:e).clone()}function J(t,e){return(t.isAfter(e)?t:e).clone()}function tt(t){return Boolean(t.hours()||t.minutes()||t.seconds()||t.milliseconds())}function et(t){return"[object Date]"===Object.prototype.toString.call(t)||t instanceof Date}function nt(t){return/^\d+\:\d+(?:\:\d+\.?(?:\d{3})?)?$/.test(t)}function it(t,e){var n,i,r,s,o,a,l={};if(e)for(n=0;n=0;s--)if("object"==typeof(o=t[s][i]))r.unshift(o);else if(void 0!==o){l[i]=o;break}r.length&&(l[i]=it(r))}for(n=t.length-1;n>=0;n--){a=t[n];for(i in a)i in l||(l[i]=a[i])}return l}function rt(t){var e=function(){};return e.prototype=t,new e}function st(t,e){for(var n in t)ot(t,n)&&(e[n]=t[n])}function ot(t,e){return te.call(t,e)}function at(e){return/undefined|null|boolean|number|string/.test(t.type(e))}function lt(e,n,i){if(t.isFunction(e)&&(e=[e]),e){var r,s;for(r=0;r/g,">").replace(/'/g,"'").replace(/"/g,""").replace(/\n/g,"
")}function ct(t){return t.replace(/&.*?;/g,"")}function dt(e){var n=[];return t.each(e,function(t,e){null!=e&&n.push(t+":"+e)}),n.join(";")}function ft(e){var n=[];return t.each(e,function(t,e){null!=e&&n.push(t+'="'+ht(e)+'"')}),n.join(" ")}function gt(t){return t.charAt(0).toUpperCase()+t.slice(1)}function pt(t,e){return t-e}function vt(t){return t%1==0}function mt(t,e){var n=t[e];return function(){return n.apply(t,arguments)}}function yt(t,e,n){var i,r,s,o,a,l=function(){var u=+new Date-o;u=t.leftCol)return!0;return!1}function Ft(t,e){return t.leftCol-e.leftCol}function At(t){var e,n,i,r=[];for(e=0;ee.top&&t.top"),g.append(o("left")).append(o("right")).append(o("center")).append('
')):s()}function s(){g&&(g.remove(),g=f.el=null)}function o(i){var r=t('
'),s=n.layout[i],o=e.opt("customButtons")||{},a=e.opt("buttonText")||{};return s&&t.each(s.split(" "),function(n){var i,s=t(),l=!0;t.each(this.split(","),function(n,i){var r,u,h,c,d,f,g,m,y,w;"title"==i?(s=s.add(t("

 

")),l=!1):((r=o[i])?(h=function(t){r.click&&r.click.call(w[0],t)},c="",d=r.text):(u=e.getViewSpec(i))?(h=function(){e.changeView(i)},v.push(i),c=u.buttonTextOverride,d=u.buttonTextDefault):e[i]&&(h=function(){e[i]()},c=(e.overrides.buttonText||{})[i],d=a[i]),h&&(f=r?r.themeIcon:e.opt("themeButtonIcons")[i],g=r?r.icon:e.opt("buttonIcons")[i],m=c?ht(c):f&&e.opt("theme")?"":g&&!e.opt("theme")?"":ht(d),y=["fc-"+i+"-button",p+"-button",p+"-state-default"],w=t('").click(function(t){w.hasClass(p+"-state-disabled")||(h(t),(w.hasClass(p+"-state-active")||w.hasClass(p+"-state-disabled"))&&w.removeClass(p+"-state-hover"))}).mousedown(function(){w.not("."+p+"-state-active").not("."+p+"-state-disabled").addClass(p+"-state-down")}).mouseup(function(){w.removeClass(p+"-state-down")}).hover(function(){w.not("."+p+"-state-active").not("."+p+"-state-disabled").addClass(p+"-state-hover")},function(){w.removeClass(p+"-state-hover").removeClass(p+"-state-down")}),s=s.add(w)))}),l&&s.first().addClass(p+"-corner-left").end().last().addClass(p+"-corner-right").end(),s.length>1?(i=t("
"),l&&i.addClass("fc-button-group"),i.append(s),r.append(i)):r.append(s)}),r}function a(t){g&&g.find("h2").text(t)}function l(t){g&&g.find(".fc-"+t+"-button").addClass(p+"-state-active")}function u(t){g&&g.find(".fc-"+t+"-button").removeClass(p+"-state-active")}function h(t){g&&g.find(".fc-"+t+"-button").prop("disabled",!0).addClass(p+"-state-disabled")}function c(t){g&&g.find(".fc-"+t+"-button").prop("disabled",!1).removeClass(p+"-state-disabled")}function d(){return v}var f=this;f.setToolbarOptions=i,f.render=r,f.removeElement=s,f.updateTitle=a,f.activateButton=l,f.deactivateButton=u,f.disableButton=h,f.enableButton=c,f.getViewsWithButtons=d,f.el=null;var g,p,v=[]}function Yt(e){t.each(Me,function(t,n){null==e[t]&&(e[t]=n(e))})}function qt(t){return e.localeData(t)||e.localeData("en")}function Ut(){function n(t,e){return!q.opt("lazyFetching")||s(t,e)?o(t,e):he.resolve(Z)}function i(){Z=r(K),q.trigger("eventsReset",Z)}function r(t){var e,n,i=[];for(e=0;eU&&i.push(n);return i}function s(t,e){return!U||tj}function o(t,e){return U=t,j=e,a()}function a(){return u(Q,"reset")}function l(t){return u(b(t))}function u(t,e){var n,i;for("reset"===e?K=[]:"add"!==e&&(K=C(K,t)),n=0;ns&&(!l[o]||u.isSame(h,l[o]))&&(o-1!==s||"."!==f[o]);o--)v=f[o]+v;for(a=s;a<=o;a++)m+=f[a],y+=g[a];return(m||y)&&(w=r?y+i+m:m+i+y),d(p+w+v)}function r(t){return S[t]||(S[t]=s(t))}function s(t){var e=o(t);return{fakeFormatString:l(e),sameUnits:u(e)}}function o(t){for(var e,n=[],i=/\[([^\]]*)\]|\(([^\)]*)\)|(LTS|LT|(\w)\4*o?)|([^\w\[\(]+)/g;e=i.exec(t);)e[1]?n.push.apply(n,a(e[1])):e[2]?n.push({maybe:o(e[2])}):e[3]?n.push({token:e[3]}):e[5]&&n.push.apply(n,a(e[5]));return n}function a(t){return". "===t?["."," "]:[t]}function l(t){var e,n,i=[];for(e=0;er.value)&&(r=i);return r?r.unit:null}Zt.formatDate=t,Zt.formatRange=n,Zt.oldMomentFormat=e,Zt.queryMostGranularFormatUnit=f;var g="\v",p="",v="",m=new RegExp(v+"([^"+v+"]*)"+v,"g"),y={t:function(t){return e(t,"a").charAt(0)},T:function(t){return e(t,"A").charAt(0)}},w={Y:{value:1,unit:"year"},M:{value:2,unit:"month"},W:{value:3,unit:"week"},w:{value:3,unit:"week"},D:{value:4,unit:"day"},d:{value:4,unit:"day"}},S={}}();var oe=Zt.formatDate,ae=Zt.formatRange,le=Zt.oldMomentFormat;Zt.Class=bt,bt.extend=function(){var t,e,n=arguments.length;for(t=0;t=0;e--)n=i[e],n.namespace!==t.namespace||"add"!==n.type&&"remove"!==n.type||i.splice(e,1);"destroy"===t.type?i.length&&(n=i[i.length-1],n.namespace===t.namespace&&("init"===n.type?(r=!1,i.pop()):"destroy"===n.type&&(r=!1))):"init"===t.type&&i.length&&(n=i[i.length-1],n.namespace===t.namespace&&"init"===n.type&&i.pop())}return r&&i.push(t),r}});Zt.RenderQueue=de;var fe=Zt.EmitterMixin={on:function(e,n){return t(this).on(e,this._prepareIntercept(n)),this},one:function(e,n){return t(this).one(e,this._prepareIntercept(n)),this},_prepareIntercept:function(e){var n=function(t,n){return e.apply(n.context||this,n.args||[])};return e.guid||(e.guid=t.guid++),n.guid=e.guid,n}, +//off:function(e,n){return t(this).off(e,n),this},trigger:function(e){var n=Array.prototype.slice.call(arguments,1);return t(this).triggerHandler(e,{args:n}),this},triggerWith:function(e,n,i){return t(this).triggerHandler(e,{context:n,args:i}),this}},ge=Zt.ListenerMixin=function(){var e=0;return{listenerId:null,listenTo:function(e,n,i){if("object"==typeof n)for(var r in n)n.hasOwnProperty(r)&&this.listenTo(e,r,n[r]);else"string"==typeof n&&e.on(n+"."+this.getListenerNamespace(),t.proxy(i,this))},stopListeningTo:function(t,e){t.off((e||"")+"."+this.getListenerNamespace())},getListenerNamespace:function(){return null==this.listenerId&&(this.listenerId=e++),"_listener"+this.listenerId}}}(),pe=bt.extend(ge,{isHidden:!0,options:null,el:null,margin:10,constructor:function(t){this.options=t||{}},show:function(){this.isHidden&&(this.el||this.render(),this.el.show(),this.position(),this.isHidden=!1,this.trigger("show"))},hide:function(){this.isHidden||(this.el.hide(),this.isHidden=!0,this.trigger("hide"))},render:function(){var e=this,n=this.options;this.el=t('
').addClass(n.className||"").css({top:0,left:0}).append(n.content).appendTo(n.parentEl),this.el.on("click",".fc-close",function(){e.hide()}),n.autoHide&&this.listenTo(t(document),"mousedown",this.documentMousedown)},documentMousedown:function(e){this.el&&!t(e.target).closest(this.el).length&&this.hide()},removeElement:function(){this.hide(),this.el&&(this.el.remove(),this.el=null),this.stopListeningTo(t(document),"mousedown")},position:function(){var e,n,i,r,s,o=this.options,a=this.el.offsetParent().offset(),l=this.el.outerWidth(),u=this.el.outerHeight(),h=t(window),d=c(this.el);r=o.top||0,s=void 0!==o.left?o.left:void 0!==o.right?o.right-l:0,d.is(window)||d.is(document)?(d=h,e=0,n=0):(i=d.offset(),e=i.top,n=i.left),e+=h.scrollTop(),n+=h.scrollLeft(),!1!==o.viewportConstrain&&(r=Math.min(r,e+d.outerHeight()-u-this.margin),r=Math.max(r,e+this.margin),s=Math.min(s,n+d.outerWidth()-l-this.margin),s=Math.max(s,n+this.margin)),this.el.css({top:r-a.top,left:s-a.left})},trigger:function(t){this.options[t]&&this.options[t].apply(this,Array.prototype.slice.call(arguments,1))}}),ve=Zt.CoordCache=bt.extend({els:null,forcedOffsetParentEl:null,origin:null,boundingRect:null,isHorizontal:!1,isVertical:!1,lefts:null,rights:null,tops:null,bottoms:null,constructor:function(e){this.els=t(e.els),this.isHorizontal=e.isHorizontal,this.isVertical=e.isVertical,this.forcedOffsetParentEl=e.offsetParent?t(e.offsetParent):null},build:function(){var t=this.forcedOffsetParentEl;!t&&this.els.length>0&&(t=this.els.eq(0).offsetParent()),this.origin=t?t.offset():null,this.boundingRect=this.queryBoundingRect(),this.isHorizontal&&this.buildElHorizontals(),this.isVertical&&this.buildElVerticals()},clear:function(){this.origin=null,this.boundingRect=null,this.lefts=null,this.rights=null,this.tops=null,this.bottoms=null},ensureBuilt:function(){this.origin||this.build()},buildElHorizontals:function(){var e=[],n=[];this.els.each(function(i,r){var s=t(r),o=s.offset().left,a=s.outerWidth();e.push(o),n.push(o+a)}),this.lefts=e,this.rights=n},buildElVerticals:function(){var e=[],n=[];this.els.each(function(i,r){var s=t(r),o=s.offset().top,a=s.outerHeight();e.push(o),n.push(o+a)}),this.tops=e,this.bottoms=n},getHorizontalIndex:function(t){this.ensureBuilt();var e,n=this.lefts,i=this.rights,r=n.length;for(e=0;e=n[e]&&t=n[e]&&t0&&(t=c(this.els.eq(0)),!t.is(document))?f(t):null},isPointInBounds:function(t,e){return this.isLeftInBounds(t)&&this.isTopInBounds(e)},isLeftInBounds:function(t){return!this.boundingRect||t>=this.boundingRect.left&&t=this.boundingRect.top&&t=i*i&&this.handleDistanceSurpassed(t),this.isDragging&&this.handleDrag(e,n,t)},handleDrag:function(t,e,n){this.trigger("drag",t,e,n),this.updateAutoScroll(n)},endDrag:function(t){this.isDragging&&(this.isDragging=!1,this.handleDragEnd(t))},handleDragEnd:function(t){this.trigger("dragEnd",t)},startDelay:function(t){var e=this;this.delay?this.delayTimeoutId=setTimeout(function(){e.handleDelayEnd(t)},this.delay):this.handleDelayEnd(t)},handleDelayEnd:function(t){this.isDelayEnded=!0,this.isDistanceSurpassed&&this.startDrag(t)},handleDistanceSurpassed:function(t){this.isDistanceSurpassed=!0,this.isDelayEnded&&this.startDrag(t)},handleTouchMove:function(t){this.isDragging&&this.shouldCancelTouchScroll&&t.preventDefault(),this.handleMove(t)},handleMouseMove:function(t){this.handleMove(t)},handleTouchScroll:function(t){this.isDragging&&!this.scrollAlwaysKills||this.endInteraction(t,!0)},trigger:function(t){this.options[t]&&this.options[t].apply(this,Array.prototype.slice.call(arguments,1)),this["_"+t]&&this["_"+t].apply(this,Array.prototype.slice.call(arguments,1))}});me.mixin({isAutoScroll:!1,scrollBounds:null,scrollTopVel:null,scrollLeftVel:null,scrollIntervalId:null,scrollSensitivity:30,scrollSpeed:200,scrollIntervalMs:50,initAutoScroll:function(){var t=this.scrollEl;this.isAutoScroll=this.options.scroll&&t&&!t.is(window)&&!t.is(document),this.isAutoScroll&&this.listenTo(t,"scroll",yt(this.handleDebouncedScroll,100))},destroyAutoScroll:function(){this.endAutoScroll(),this.isAutoScroll&&this.stopListeningTo(this.scrollEl,"scroll")},computeScrollBounds:function(){this.isAutoScroll&&(this.scrollBounds=d(this.scrollEl))},updateAutoScroll:function(t){var e,n,i,r,s=this.scrollSensitivity,o=this.scrollBounds,a=0,l=0;o&&(e=(s-(E(t)-o.top))/s,n=(s-(o.bottom-E(t)))/s,i=(s-(b(t)-o.left))/s,r=(s-(o.right-b(t)))/s,e>=0&&e<=1?a=e*this.scrollSpeed*-1:n>=0&&n<=1&&(a=n*this.scrollSpeed),i>=0&&i<=1?l=i*this.scrollSpeed*-1:r>=0&&r<=1&&(l=r*this.scrollSpeed)),this.setScrollVel(a,l)},setScrollVel:function(t,e){this.scrollTopVel=t,this.scrollLeftVel=e,this.constrainScrollVel(),!this.scrollTopVel&&!this.scrollLeftVel||this.scrollIntervalId||(this.scrollIntervalId=setInterval(mt(this,"scrollIntervalFunc"),this.scrollIntervalMs))},constrainScrollVel:function(){var t=this.scrollEl;this.scrollTopVel<0?t.scrollTop()<=0&&(this.scrollTopVel=0):this.scrollTopVel>0&&t.scrollTop()+t[0].clientHeight>=t[0].scrollHeight&&(this.scrollTopVel=0),this.scrollLeftVel<0?t.scrollLeft()<=0&&(this.scrollLeftVel=0):this.scrollLeftVel>0&&t.scrollLeft()+t[0].clientWidth>=t[0].scrollWidth&&(this.scrollLeftVel=0)},scrollIntervalFunc:function(){var t=this.scrollEl,e=this.scrollIntervalMs/1e3;this.scrollTopVel&&t.scrollTop(t.scrollTop()+this.scrollTopVel*e),this.scrollLeftVel&&t.scrollLeft(t.scrollLeft()+this.scrollLeftVel*e),this.constrainScrollVel(),this.scrollTopVel||this.scrollLeftVel||this.endAutoScroll()},endAutoScroll:function(){this.scrollIntervalId&&(clearInterval(this.scrollIntervalId),this.scrollIntervalId=null,this.handleScrollEnd())},handleDebouncedScroll:function(){this.scrollIntervalId||this.handleScrollEnd()},handleScrollEnd:function(){}});var ye=me.extend({component:null,origHit:null,hit:null,coordAdjust:null,constructor:function(t,e){me.call(this,e),this.component=t},handleInteractionStart:function(t){var e,n,i,r=this.subjectEl;this.component.hitsNeeded(),this.computeScrollBounds(),t?(n={left:b(t),top:E(t)},i=n,r&&(e=d(r),i=x(i,e)),this.origHit=this.queryHit(i.left,i.top),r&&this.options.subjectCenter&&(this.origHit&&(e=R(this.origHit,e)||e),i=I(e)),this.coordAdjust=k(i,n)):(this.origHit=null,this.coordAdjust=null),me.prototype.handleInteractionStart.apply(this,arguments)},handleDragStart:function(t){var e;me.prototype.handleDragStart.apply(this,arguments),(e=this.queryHit(b(t),E(t)))&&this.handleHitOver(e)},handleDrag:function(t,e,n){var i;me.prototype.handleDrag.apply(this,arguments),i=this.queryHit(b(n),E(n)),Ht(i,this.hit)||(this.hit&&this.handleHitOut(),i&&this.handleHitOver(i))},handleDragEnd:function(){this.handleHitDone(),me.prototype.handleDragEnd.apply(this,arguments)},handleHitOver:function(t){var e=Ht(t,this.origHit);this.hit=t,this.trigger("hitOver",this.hit,e,this.origHit)},handleHitOut:function(){this.hit&&(this.trigger("hitOut",this.hit),this.handleHitDone(),this.hit=null)},handleHitDone:function(){this.hit&&this.trigger("hitDone",this.hit)},handleInteractionEnd:function(){me.prototype.handleInteractionEnd.apply(this,arguments),this.origHit=null,this.hit=null,this.component.hitsNotNeeded()},handleScrollEnd:function(){me.prototype.handleScrollEnd.apply(this,arguments),this.isDragging&&(this.component.releaseHits(),this.component.prepareHits())},queryHit:function(t,e){return this.coordAdjust&&(t+=this.coordAdjust.left,e+=this.coordAdjust.top),this.component.queryHit(t,e)}});Zt.touchMouseIgnoreWait=500;var we=bt.extend(ge,fe,{isTouching:!1,mouseIgnoreDepth:0,handleScrollProxy:null,bind:function(){var e=this;this.listenTo(t(document),{touchstart:this.handleTouchStart,touchcancel:this.handleTouchCancel,touchend:this.handleTouchEnd,mousedown:this.handleMouseDown,mousemove:this.handleMouseMove,mouseup:this.handleMouseUp,click:this.handleClick,selectstart:this.handleSelectStart,contextmenu:this.handleContextMenu}),window.addEventListener("touchmove",this.handleTouchMoveProxy=function(n){e.handleTouchMove(t.Event(n))},{passive:!1}),window.addEventListener("scroll",this.handleScrollProxy=function(n){e.handleScroll(t.Event(n))},!0)},unbind:function(){this.stopListeningTo(t(document)),window.removeEventListener("touchmove",this.handleTouchMoveProxy),window.removeEventListener("scroll",this.handleScrollProxy,!0)},handleTouchStart:function(t){this.stopTouch(t,!0),this.isTouching=!0,this.trigger("touchstart",t)},handleTouchMove:function(t){this.isTouching&&this.trigger("touchmove",t)},handleTouchCancel:function(t){this.isTouching&&(this.trigger("touchcancel",t),this.stopTouch(t))},handleTouchEnd:function(t){this.stopTouch(t)},handleMouseDown:function(t){this.shouldIgnoreMouse()||this.trigger("mousedown",t)},handleMouseMove:function(t){this.shouldIgnoreMouse()||this.trigger("mousemove",t)},handleMouseUp:function(t){this.shouldIgnoreMouse()||this.trigger("mouseup",t)},handleClick:function(t){this.shouldIgnoreMouse()||this.trigger("click",t)},handleSelectStart:function(t){this.trigger("selectstart",t)},handleContextMenu:function(t){this.trigger("contextmenu",t)},handleScroll:function(t){this.trigger("scroll",t)},stopTouch:function(t,e){this.isTouching&&(this.isTouching=!1,this.trigger("touchend",t),e||this.startTouchMouseIgnore())},startTouchMouseIgnore:function(){var t=this,e=Zt.touchMouseIgnoreWait;e&&(this.mouseIgnoreDepth++,setTimeout(function(){t.mouseIgnoreDepth--},e))},shouldIgnoreMouse:function(){return this.isTouching||Boolean(this.mouseIgnoreDepth)}});!function(){var t=null,e=0;we.get=function(){return t||(t=new we,t.bind()),t},we.needed=function(){we.get(),e++},we.unneeded=function(){--e||(t.unbind(),t=null)}}();var Se=bt.extend(ge,{options:null,sourceEl:null,el:null,parentEl:null,top0:null,left0:null,y0:null,x0:null,topDelta:null,leftDelta:null,isFollowing:!1,isHidden:!1,isAnimating:!1,constructor:function(e,n){this.options=n=n||{},this.sourceEl=e,this.parentEl=n.parentEl?t(n.parentEl):e.parent()},start:function(e){this.isFollowing||(this.isFollowing=!0,this.y0=E(e),this.x0=b(e),this.topDelta=0,this.leftDelta=0,this.isHidden||this.updatePosition(),D(e)?this.listenTo(t(document),"touchmove",this.handleMove):this.listenTo(t(document),"mousemove",this.handleMove))},stop:function(e,n){function i(){r.isAnimating=!1,r.removeElement(),r.top0=r.left0=null,n&&n()}var r=this,s=this.options.revertDuration;this.isFollowing&&!this.isAnimating&&(this.isFollowing=!1,this.stopListeningTo(t(document)),e&&s&&!this.isHidden?(this.isAnimating=!0,this.el.animate({top:this.top0,left:this.left0},{duration:s,complete:i})):i())},getEl:function(){var t=this.el;return t||(t=this.el=this.sourceEl.clone().addClass(this.options.additionalClass||"").css({position:"absolute",visibility:"",display:this.isHidden?"none":"",margin:0,right:"auto",bottom:"auto",width:this.sourceEl.width(),height:this.sourceEl.height(),opacity:this.options.opacity||"",zIndex:this.options.zIndex}),t.addClass("fc-unselectable"),t.appendTo(this.parentEl)),t},removeElement:function(){this.el&&(this.el.remove(),this.el=null)},updatePosition:function(){var t,e;this.getEl(),null===this.top0&&(t=this.sourceEl.offset(),e=this.el.offsetParent().offset(),this.top0=t.top-e.top,this.left0=t.left-e.left),this.el.css({top:this.top0+this.topDelta,left:this.left0+this.leftDelta})},handleMove:function(t){this.topDelta=E(t)-this.y0,this.leftDelta=b(t)-this.x0,this.isHidden||this.updatePosition()},hide:function(){this.isHidden||(this.isHidden=!0,this.el&&this.el.hide())},show:function(){this.isHidden&&(this.isHidden=!1,this.updatePosition(),this.getEl().show())}}),be=Zt.Grid=bt.extend(ge,{hasDayInteractions:!0,view:null,isRTL:null,start:null,end:null,el:null,elsByFill:null,eventTimeFormat:null,displayEventTime:null,displayEventEnd:null,minResizeDuration:null,largeUnit:null,dayClickListener:null,daySelectListener:null,segDragListener:null,segResizeListener:null,externalDragListener:null,constructor:function(t){this.view=t,this.isRTL=t.opt("isRTL"),this.elsByFill={},this.dayClickListener=this.buildDayClickListener(),this.daySelectListener=this.buildDaySelectListener()},computeEventTimeFormat:function(){return this.view.opt("smallTimeFormat")},computeDisplayEventTime:function(){return!0},computeDisplayEventEnd:function(){return!0},setRange:function(t){this.start=t.start.clone(),this.end=t.end.clone(),this.rangeUpdated(),this.processRangeOptions()},rangeUpdated:function(){},processRangeOptions:function(){var t,e,n=this.view;this.eventTimeFormat=n.opt("eventTimeFormat")||n.opt("timeFormat")||this.computeEventTimeFormat(),t=n.opt("displayEventTime"),null==t&&(t=this.computeDisplayEventTime()),e=n.opt("displayEventEnd"),null==e&&(e=this.computeDisplayEventEnd()),this.displayEventTime=t,this.displayEventEnd=e},spanToSegs:function(t){},diffDates:function(t,e){return this.largeUnit?G(t,e,this.largeUnit):F(t,e)},hitsNeededDepth:0,hitsNeeded:function(){this.hitsNeededDepth++||this.prepareHits()},hitsNotNeeded:function(){this.hitsNeededDepth&&!--this.hitsNeededDepth&&this.releaseHits()},prepareHits:function(){},releaseHits:function(){},queryHit:function(t,e){},getSafeHitSpan:function(t){var e=this.getHitSpan(t);return Q(e,this.view.activeRange)?e:null},getHitSpan:function(t){},getHitEl:function(t){},setElement:function(t){this.el=t,this.hasDayInteractions&&(T(t),this.bindDayHandler("touchstart",this.dayTouchStart),this.bindDayHandler("mousedown",this.dayMousedown)),this.bindSegHandlers(),this.bindGlobalHandlers()},bindDayHandler:function(e,n){var i=this;this.el.on(e,function(e){if(!t(e.target).is(i.segSelector+","+i.segSelector+" *,.fc-more,a[data-goto]"))return n.call(i,e)})},removeElement:function(){this.unbindGlobalHandlers(),this.clearDragListeners(),this.el.remove()},renderSkeleton:function(){},renderDates:function(){},unrenderDates:function(){},bindGlobalHandlers:function(){this.listenTo(t(document),{dragstart:this.externalDragStart,sortstart:this.externalDragStart})},unbindGlobalHandlers:function(){this.stopListeningTo(t(document))},dayMousedown:function(t){var e=this.view;we.get().shouldIgnoreMouse()||(this.dayClickListener.startInteraction(t),e.opt("selectable")&&this.daySelectListener.startInteraction(t,{distance:e.opt("selectMinDistance")}))},dayTouchStart:function(t){var e,n=this.view;n.isSelected||n.selectedEvent||(e=n.opt("selectLongPressDelay"),null==e&&(e=n.opt("longPressDelay")),this.dayClickListener.startInteraction(t),n.opt("selectable")&&this.daySelectListener.startInteraction(t,{delay:e}))},buildDayClickListener:function(){var t,e=this,n=this.view,i=new ye(this,{scroll:n.opt("dragScroll"),interactionStart:function(){t=i.origHit},hitOver:function(e,n,i){n||(t=null)},hitOut:function(){t=null},interactionEnd:function(i,r){var s;!r&&t&&(s=e.getSafeHitSpan(t))&&n.triggerDayClick(s,e.getHitEl(t),i)}});return i.shouldCancelTouchScroll=!1,i.scrollAlwaysKills=!0,i},buildDaySelectListener:function(){var t,e=this,n=this.view;return new ye(this,{scroll:n.opt("dragScroll"),interactionStart:function(){t=null},dragStart:function(){n.unselect()},hitOver:function(n,i,r){var o,a;r&&(o=e.getSafeHitSpan(r),a=e.getSafeHitSpan(n),t=o&&a?e.computeSelection(o,a):null,t?e.renderSelection(t):!1===t&&s())},hitOut:function(){t=null,e.unrenderSelection()},hitDone:function(){o()},interactionEnd:function(e,i){!i&&t&&n.reportSelection(t,e)}})},clearDragListeners:function(){this.dayClickListener.endInteraction(),this.daySelectListener.endInteraction(),this.segDragListener&&this.segDragListener.endInteraction(),this.segResizeListener&&this.segResizeListener.endInteraction(),this.externalDragListener&&this.externalDragListener.endInteraction()},renderEventLocationHelper:function(t,e){var n=this.fabricateHelperEvent(t,e);return this.renderHelper(n,e)},fabricateHelperEvent:function(t,e){var n=e?rt(e.event):{};return n.start=t.start.clone(),n.end=t.end?t.end.clone():null,n.allDay=null,this.view.calendar.normalizeEventDates(n),n.className=(n.className||[]).concat("fc-helper"),e||(n.editable=!1),n},renderHelper:function(t,e){},unrenderHelper:function(){},renderSelection:function(t){this.renderHighlight(t)},unrenderSelection:function(){this.unrenderHighlight()},computeSelection:function(t,e){var n=this.computeSelectionSpan(t,e);return!(n&&!this.view.calendar.isSelectionSpanAllowed(n))&&n},computeSelectionSpan:function(t,e){var n=[t.start,t.end,e.start,e.end];return n.sort(pt),{start:n[0].clone(),end:n[3].clone()}},renderHighlight:function(t){this.renderFill("highlight",this.spanToSegs(t))},unrenderHighlight:function(){this.unrenderFill("highlight")},highlightSegClasses:function(){return["fc-highlight"]},renderBusinessHours:function(){},unrenderBusinessHours:function(){},getNowIndicatorUnit:function(){},renderNowIndicator:function(t){},unrenderNowIndicator:function(){},renderFill:function(t,e){},unrenderFill:function(t){var e=this.elsByFill[t];e&&(e.remove(),delete this.elsByFill[t])},renderFillSegEls:function(e,n){var i,r=this,s=this[e+"SegEl"],o="",a=[];if(n.length){for(i=0;i"},getDayClasses:function(t,e){var n,i=this.view,r=[];return Z(t,i.activeRange)?(r.push("fc-"+Kt[t.day()]),1==i.currentRangeAs("months")&&t.month()!=i.currentRange.start.month()&&r.push("fc-other-month"),n=i.calendar.getNow(),t.isSame(n,"day")?(r.push("fc-today"),!0!==e&&r.push(i.highlightStateClass)):t *",mousedOverSeg:null,isDraggingSeg:!1,isResizingSeg:!1,isDraggingExternal:!1,segs:null,renderEvents:function(t){var e,n=[],i=[];for(e=0;ea&&o.push({start:a,end:n.start}),n.end>a&&(a=n.end);return a=e.length?e[e.length-1]+1:e[n]},computeColHeadFormat:function(){return this.rowCnt>1||this.colCnt>10?"ddd":this.colCnt>1?this.view.opt("dayOfMonthFormat"):"dddd"},sliceRangeByRow:function(t){var e,n,i,r,s,o=this.daysPerRow,a=this.view.computeDayRange(t),l=this.getDateDayIndex(a.start),u=this.getDateDayIndex(a.end.clone().subtract(1,"days")),h=[];for(e=0;e'+this.renderHeadTrHtml()+"
"},renderHeadIntroHtml:function(){return this.renderIntroHtml()},renderHeadTrHtml:function(){return"
'+this.renderBgTrHtml(t)+'
'+(this.numbersVisible?""+this.renderNumberTrHtml(t)+"":"")+"
"},renderNumberTrHtml:function(t){return""+(this.isRTL?"":this.renderNumberIntroHtml(t))+this.renderNumberCellsHtml(t)+(this.isRTL?this.renderNumberIntroHtml(t):"")+""},renderNumberIntroHtml:function(t){return this.renderIntroHtml()},renderNumberCellsHtml:function(t){var e,n,i=[];for(e=0;e",i.cellWeekNumbersVisible&&t.day()==n&&(r+=i.buildGotoAnchorHtml({date:t,type:"week"},{class:"fc-week-number"},t.format("w"))),o&&(r+=i.buildGotoAnchorHtml(t,{class:"fc-day-number"},t.date())),r+=""):""},computeEventTimeFormat:function(){return this.view.opt("extraSmallTimeFormat")},computeDisplayEventEnd:function(){return 1==this.colCnt},rangeUpdated:function(){this.updateDayTable()},spanToSegs:function(t){var e,n,i=this.sliceRangeByRow(t);for(e=0;e');o=n&&n.row===e?n.el.position().top:a.find(".fc-content-skeleton tbody").position().top,l.css("top",o).find("table").append(i[e].tbodyEl),a.append(l),r.push(l[0])}),this.helperEls=t(r)},unrenderHelper:function(){this.helperEls&&(this.helperEls.remove(),this.helperEls=null)},fillSegTag:"td",renderFill:function(e,n,i){var r,s,o,a=[];for(n=this.renderFillSegEls(e,n),r=0;r
'),s=r.find("tr"),a>0&&s.append(''),s.append(n.el.attr("colspan",l-a)),l'),this.bookendCells(s),r}});De.mixin({rowStructs:null,unrenderEvents:function(){this.removeSegPopover(),be.prototype.unrenderEvents.apply(this,arguments)},getEventSegs:function(){return be.prototype.getEventSegs.call(this).concat(this.popoverSegs||[])},renderBgSegs:function(e){var n=t.grep(e,function(t){return t.event.allDay});return be.prototype.renderBgSegs.call(this,n)},renderFgSegs:function(e){var n;return e=this.renderFgSegEls(e),n=this.rowStructs=this.renderSegRows(e),this.rowEls.each(function(e,i){t(i).find(".fc-content-skeleton > table").append(n[e].tbodyEl)}),e},unrenderFgSegs:function(){for(var t,e=this.rowStructs||[];t=e.pop();)t.tbodyEl.remove();this.rowStructs=null},renderSegRows:function(t){var e,n,i=[];for(e=this.groupSegRows(t),n=0;n'+ht(n)+""),i=''+(ht(s.title||"")||" ")+"",'
'+(this.isRTL?i+" "+c:c+" "+i)+"
"+(a?'
':"")+(l?'
':"")+""},renderSegRow:function(e,n){function i(e){for(;o"),a.append(h)),v[r][o]=h,m[r][o]=h,o++}var r,s,o,a,l,u,h,c=this.colCnt,d=this.buildSegLevels(n),f=Math.max(1,d.length),g=t(""),p=[],v=[],m=[];for(r=0;r"),p.push([]),v.push([]),m.push([]),s)for(l=0;l').append(u.el),u.leftCol!=u.rightCol?h.attr("colspan",u.rightCol-u.leftCol+1):m[r][o]=h;o<=u.rightCol;)v[r][o]=h,p[r][o]=u,o++;a.append(h)}i(c),this.bookendCells(a),g.append(a)}return{row:e,tbodyEl:g,cellMatrix:v,segMatrix:p,segLevels:d,segs:n}},buildSegLevels:function(t){var e,n,i,r=[];for(this.sortEventSegs(t),e=0;e td > :first-child").each(n),r.position().top+s>a)return i;return!1},limitRow:function(e,n){function i(i){for(;E").append(y),d.append(m),b.push(m[0])),E++}var r,s,o,a,l,u,h,c,d,f,g,p,v,m,y,w=this,S=this.rowStructs[e],b=[],E=0;if(n&&n').attr("rowspan",f),u=c[p],y=this.renderMoreLink(e,l.leftCol+p,[l].concat(u)),m=t("
").append(y),v.append(m),g.push(v[0]),b.push(v[0]);d.addClass("fc-limited").after(t(g)),o.push(d[0])}}i(this.colCnt),S.moreEls=t(b),S.limitedEls=t(o)}},unlimitRow:function(t){var e=this.rowStructs[t];e.moreEls&&(e.moreEls.remove(),e.moreEls=null),e.limitedEls&&(e.limitedEls.removeClass("fc-limited"),e.limitedEls=null)},renderMoreLink:function(e,n,i){var r=this,s=this.view;return t('').text(this.getMoreLinkText(i.length)).on("click",function(o){var a=s.opt("eventLimitClick"),l=r.getCellDate(e,n),u=t(this),h=r.getCellEl(e,n),c=r.getCellSegs(e,n),d=r.resliceDaySegs(c,l),f=r.resliceDaySegs(i,l);"function"==typeof a&&(a=s.publiclyTrigger("eventLimitClick",null,{date:l,dayEl:h,moreEl:u,segs:d,hiddenSegs:f},o)),"popover"===a?r.showSegPopover(e,n,u,d):"string"==typeof a&&s.calendar.zoomTo(l,a)})},showSegPopover:function(t,e,n,i){var r,s,o=this,a=this.view,l=n.parent();r=1==this.rowCnt?a.el:this.rowEls.eq(t),s={className:"fc-more-popover",content:this.renderSegPopoverContent(t,e,i),parentEl:this.view.el,top:r.offset().top,autoHide:!0,viewportConstrain:a.opt("popoverViewportConstrain"),hide:function(){if(o.popoverSegs)for(var t,e=0;e'+ht(a)+'
'),u=l.find(".fc-event-container");for(i=this.renderFgSegEls(i,!0),this.popoverSegs=i,r=0;r'+this.renderBgTrHtml(0)+'
"},renderSlatRowHtml:function(){for(var t,n,i,r=this.view,s=this.isRTL,o="",a=e.duration(+this.view.minTime);a"+(n?""+ht(t.format(this.labelFormat))+"":"")+"",o+='"+(s?"":i)+''+(s?i:"")+"",a.add(this.slotDuration);return o},processOptions:function(){var n,i=this.view,r=i.opt("slotDuration"),s=i.opt("snapDuration");r=e.duration(r),s=s?e.duration(s):r,this.slotDuration=r,this.snapDuration=s,this.snapsPerSlot=r/s,this.minResizeDuration=s,n=i.opt("slotLabelFormat"),t.isArray(n)&&(n=n[n.length-1]),this.labelFormat=n||i.opt("smallTimeFormat"),n=i.opt("slotLabelInterval"),this.labelInterval=n?e.duration(n):this.computeLabelInterval(r)},computeLabelInterval:function(t){var n,i,r;for(n=_e.length-1;n>=0;n--)if(i=e.duration(_e[n]),r=W(i,t),vt(r)&&r>1)return i;return e.duration(t)},computeEventTimeFormat:function(){return this.view.opt("noMeridiemTimeFormat")},computeDisplayEventEnd:function(){return!0},prepareHits:function(){this.colCoordCache.build(),this.slatCoordCache.build()},releaseHits:function(){this.colCoordCache.clear()},queryHit:function(t,e){var n=this.snapsPerSlot,i=this.colCoordCache,r=this.slatCoordCache;if(i.isLeftInBounds(t)&&r.isTopInBounds(e)){var s=i.getHorizontalIndex(t),o=r.getVerticalIndex(e);if(null!=s&&null!=o){var a=r.getTopOffset(o),l=r.getHeight(o),u=(e-a)/l,h=Math.floor(u*n),c=o*n+h,d=a+h/n*l,f=a+(h+1)/n*l;return{col:s,snap:c,component:this,left:i.getLeftOffset(s),right:i.getRightOffset(s),top:d,bottom:f}}}},getHitSpan:function(t){var e,n=this.getCellDate(0,t.col),i=this.computeSnapTime(t.snap);return n.time(i),e=n.clone().add(this.snapDuration),{start:n,end:e}},getHitEl:function(t){return this.colEls.eq(t.col)},rangeUpdated:function(){this.updateDayTable()},computeSnapTime:function(t){return e.duration(this.view.minTime+this.snapDuration*t)},spanToSegs:function(t){var e,n=this.sliceRangeByTimes(t);for(e=0;e
').css("top",r).appendTo(this.colContainerEls.eq(i[n].col))[0]);i.length>0&&s.push(t('
').css("top",r).appendTo(this.el.find(".fc-content-skeleton"))[0]),this.nowIndicatorEls=t(s)},unrenderNowIndicator:function(){this.nowIndicatorEls&&(this.nowIndicatorEls.remove(),this.nowIndicatorEls=null)},renderSelection:function(t){this.view.opt("selectHelper")?this.renderEventLocationHelper(t):this.renderHighlight(t)},unrenderSelection:function(){this.unrenderHelper(),this.unrenderHighlight()},renderHighlight:function(t){this.renderHighlightSegs(this.spanToSegs(t))},unrenderHighlight:function(){this.unrenderHighlightSegs()}});Te.mixin({colContainerEls:null,fgContainerEls:null,bgContainerEls:null,helperContainerEls:null,highlightContainerEls:null,businessContainerEls:null,fgSegs:null,bgSegs:null,helperSegs:null,highlightSegs:null,businessSegs:null,renderContentSkeleton:function(){var e,n,i="";for(e=0;e
';n=t('
'+i+"
"),this.colContainerEls=n.find(".fc-content-col"),this.helperContainerEls=n.find(".fc-helper-container"),this.fgContainerEls=n.find(".fc-event-container:not(.fc-helper-container)"),this.bgContainerEls=n.find(".fc-bgevent-container"),this.highlightContainerEls=n.find(".fc-highlight-container"),this.businessContainerEls=n.find(".fc-business-container"),this.bookendCells(n.find("tr")),this.el.append(n)},renderFgSegs:function(t){return t=this.renderFgSegsIntoContainers(t,this.fgContainerEls),this.fgSegs=t,t},unrenderFgSegs:function(){this.unrenderNamedSegs("fgSegs")},renderHelperSegs:function(e,n){var i,r,s,o=[];for(e=this.renderFgSegsIntoContainers(e,this.helperContainerEls),i=0;i
'+(n?'
'+ht(n)+"
":"")+(o.title?'
'+ht(o.title)+"
":"")+'
'+(u?'
':"")+""},updateSegVerticals:function(t){this.computeSegVerticals(t),this.assignSegVerticals(t)},computeSegVerticals:function(t){var e,n,i;for(e=0;e1?"ll":"LL"},formatRange:function(t,e,n){var i=t.end;return i.hasTime()||(i=i.clone().subtract(1)),ae(t.start,i,e,n,this.opt("isRTL"))},getAllDayHtml:function(){return this.opt("allDayHtml")||ht(this.opt("allDayText"))},buildGotoAnchorHtml:function(e,n,i){var r,s,o,a;return t.isPlainObject(e)?(r=e.date,s=e.type,o=e.forceOff):r=e,r=Zt.moment(r),a={date:r.format("YYYY-MM-DD"),type:s||"day"},"string"==typeof n&&(i=n,n=null),n=n?" "+ft(n):"",i=i||"",!o&&this.opt("navLinks")?"'+i+"":""+i+""},setElement:function(t){this.el=t,this.bindGlobalHandlers(),this.bindBaseRenderHandlers(),this.renderSkeleton()}, +//removeElement:function(){this.unsetDate(),this.unrenderSkeleton(),this.unbindGlobalHandlers(),this.unbindBaseRenderHandlers(),this.el.remove()},renderSkeleton:function(){},unrenderSkeleton:function(){},setDate:function(t){var e=this.get("dateProfile"),n=this.buildDateProfile(t,null,!0);return e&&X(e.activeRange,n.activeRange)||this.set("dateProfile",n),n.date},unsetDate:function(){this.unset("dateProfile")},requestDateRender:function(t){var e=this;this.renderQueue.queue(function(){e.executeDateRender(t)},"date","init")},requestDateUnrender:function(){var t=this;this.renderQueue.queue(function(){t.executeDateUnrender()},"date","destroy")},fetchInitialEvents:function(t){return this.calendar.requestEvents(t.activeRange.start,t.activeRange.end)},bindEventChanges:function(){this.listenTo(this.calendar,"eventsReset",this.resetEvents)},unbindEventChanges:function(){this.stopListeningTo(this.calendar,"eventsReset")},setEvents:function(t){this.set("currentEvents",t),this.set("hasEvents",!0)},unsetEvents:function(){this.unset("currentEvents"),this.unset("hasEvents")},resetEvents:function(t){this.startBatchRender(),this.unsetEvents(),this.setEvents(t),this.stopBatchRender()},requestEventsRender:function(t){var e=this;this.renderQueue.queue(function(){e.executeEventsRender(t)},"event","init")},requestEventsUnrender:function(){var t=this;this.renderQueue.queue(function(){t.executeEventsUnrender()},"event","destroy")},executeDateRender:function(t,e){this.setDateProfileForRendering(t),this.updateTitle(),this.calendar.updateToolbarButtons(),this.render&&this.render(),this.renderDates(),this.updateSize(),this.renderBusinessHours(),this.startNowIndicator(),e||this.addScroll(this.computeInitialDateScroll()),this.isDatesRendered=!0,this.trigger("datesRendered")},executeDateUnrender:function(){this.unselect(),this.stopNowIndicator(),this.trigger("before:datesUnrendered"),this.unrenderBusinessHours(),this.unrenderDates(),this.destroy&&this.destroy(),this.isDatesRendered=!1},renderDates:function(){},unrenderDates:function(){},bindBaseRenderHandlers:function(){var t=this;this.on("datesRendered.baseHandler",function(){t.onBaseRender()}),this.on("before:datesUnrendered.baseHandler",function(){t.onBeforeBaseUnrender()})},unbindBaseRenderHandlers:function(){this.off(".baseHandler")},onBaseRender:function(){this.applyScreenState(),this.publiclyTrigger("viewRender",this,this,this.el)},onBeforeBaseUnrender:function(){this.applyScreenState(),this.publiclyTrigger("viewDestroy",this,this,this.el)},bindGlobalHandlers:function(){this.listenTo(we.get(),{touchstart:this.processUnselect,mousedown:this.handleDocumentMousedown})},unbindGlobalHandlers:function(){this.stopListeningTo(we.get())},initThemingProps:function(){var t=this.opt("theme")?"ui":"fc";this.widgetHeaderClass=t+"-widget-header",this.widgetContentClass=t+"-widget-content",this.highlightStateClass=t+"-state-highlight"},renderBusinessHours:function(){},unrenderBusinessHours:function(){},startNowIndicator:function(){var t,n,i,r=this;this.opt("nowIndicator")&&(t=this.getNowIndicatorUnit())&&(n=mt(this,"updateNowIndicator"),this.initialNowDate=this.calendar.getNow(),this.initialNowQueriedMs=+new Date,this.renderNowIndicator(this.initialNowDate),this.isNowIndicatorRendered=!0,i=this.initialNowDate.clone().startOf(t).add(1,t)-this.initialNowDate,this.nowIndicatorTimeoutID=setTimeout(function(){r.nowIndicatorTimeoutID=null,n(),i=+e.duration(1,t),i=Math.max(100,i),r.nowIndicatorIntervalID=setInterval(n,i)},i))},updateNowIndicator:function(){this.isNowIndicatorRendered&&(this.unrenderNowIndicator(),this.renderNowIndicator(this.initialNowDate.clone().add(new Date-this.initialNowQueriedMs)))},stopNowIndicator:function(){this.isNowIndicatorRendered&&(this.nowIndicatorTimeoutID&&(clearTimeout(this.nowIndicatorTimeoutID),this.nowIndicatorTimeoutID=null),this.nowIndicatorIntervalID&&(clearTimeout(this.nowIndicatorIntervalID),this.nowIndicatorIntervalID=null),this.unrenderNowIndicator(),this.isNowIndicatorRendered=!1)},getNowIndicatorUnit:function(){},renderNowIndicator:function(t){},unrenderNowIndicator:function(){},updateSize:function(t){var e;t&&(e=this.queryScroll()),this.updateHeight(t),this.updateWidth(t),this.updateNowIndicator(),t&&this.applyScroll(e)},updateWidth:function(t){},updateHeight:function(t){var e=this.calendar;this.setHeight(e.getSuggestedViewHeight(),e.isHeightAuto())},setHeight:function(t,e){},addForcedScroll:function(e){this.addScroll(t.extend(e,{isForced:!0}))},addScroll:function(e){var n=this.queuedScroll||(this.queuedScroll={});n.isForced||t.extend(n,e)},popScroll:function(){this.applyQueuedScroll(),this.queuedScroll=null},applyQueuedScroll:function(){this.queuedScroll&&this.applyScroll(this.queuedScroll)},queryScroll:function(){var e={};return this.isDatesRendered&&t.extend(e,this.queryDateScroll()),e},applyScroll:function(t){this.isDatesRendered&&this.applyDateScroll(t)},computeInitialDateScroll:function(){return{}},queryDateScroll:function(){return{}},applyDateScroll:function(t){},freezeHeight:function(){this.calendar.freezeContentHeight()},thawHeight:function(){this.calendar.thawContentHeight()},executeEventsRender:function(t){this.renderEvents(t),this.isEventsRendered=!0,this.onEventsRender()},executeEventsUnrender:function(){this.onBeforeEventsUnrender(),this.destroyEvents&&this.destroyEvents(),this.unrenderEvents(),this.isEventsRendered=!1},onEventsRender:function(){this.applyScreenState(),this.renderedEventSegEach(function(t){this.publiclyTrigger("eventAfterRender",t.event,t.event,t.el)}),this.publiclyTrigger("eventAfterAllRender")},onBeforeEventsUnrender:function(){this.applyScreenState(),this.renderedEventSegEach(function(t){this.publiclyTrigger("eventDestroy",t.event,t.event,t.el)})},applyScreenState:function(){this.thawHeight(),this.freezeHeight(),this.applyQueuedScroll()},renderEvents:function(t){},unrenderEvents:function(){},resolveEventEl:function(e,n){var i=this.publiclyTrigger("eventRender",e,e,n);return!1===i?n=null:i&&!0!==i&&(n=t(i)),n},showEvent:function(t){this.renderedEventSegEach(function(t){t.el.css("visibility","")},t)},hideEvent:function(t){this.renderedEventSegEach(function(t){t.el.css("visibility","hidden")},t)},renderedEventSegEach:function(t,e){var n,i=this.getEventSegs();for(n=0;n=this.nextDayThreshold&&r.add(1,"days")),(!i||r<=n)&&(r=n.clone().add(1,"days")),{start:n,end:r}},isMultiDayEvent:function(t){var e=this.computeDayRange(t);return e.end.diff(e.start,"days")>1}});Ce.watch("displayingDates",["dateProfile"],function(t){this.requestDateRender(t.dateProfile)},function(){this.requestDateUnrender()}),Ce.watch("initialEvents",["dateProfile"],function(t){return this.fetchInitialEvents(t.dateProfile)}),Ce.watch("bindingEvents",["initialEvents"],function(t){this.setEvents(t.initialEvents),this.bindEventChanges()},function(){this.unbindEventChanges(),this.unsetEvents()}),Ce.watch("displayingEvents",["displayingDates","hasEvents"],function(){this.requestEventsRender(this.get("currentEvents"))},function(){this.requestEventsUnrender()}),Ce.mixin({currentRange:null,currentRangeUnit:null,renderRange:null,activeRange:null,validRange:null,dateIncrement:null,minTime:null,maxTime:null,usesMinMaxTime:!1,start:null,end:null,intervalStart:null,intervalEnd:null,setDateProfileForRendering:function(t){this.currentRange=t.currentRange,this.currentRangeUnit=t.currentRangeUnit,this.renderRange=t.renderRange,this.activeRange=t.activeRange,this.validRange=t.validRange,this.dateIncrement=t.dateIncrement,this.minTime=t.minTime,this.maxTime=t.maxTime,this.start=t.activeRange.start,this.end=t.activeRange.end,this.intervalStart=t.currentRange.start,this.intervalEnd=t.currentRange.end},buildPrevDateProfile:function(t){var e=t.clone().startOf(this.currentRangeUnit).subtract(this.dateIncrement);return this.buildDateProfile(e,-1)},buildNextDateProfile:function(t){var e=t.clone().startOf(this.currentRangeUnit).add(this.dateIncrement);return this.buildDateProfile(e,1)},buildDateProfile:function(t,n,i){var r,s,o,a,l=this.buildValidRange(),u=null,h=null;return i&&(t=j(t,l)),r=this.buildCurrentRangeInfo(t,n),s=this.buildRenderRange(r.range,r.unit),o=q(s),this.opt("showNonCurrentDates")||(o=U(o,r.range)),u=e.duration(this.opt("minTime")),h=e.duration(this.opt("maxTime")),this.adjustActiveRange(o,u,h),o=U(o,l),t=j(t,o),a=$(r.range,l),{validRange:l,currentRange:r.range,currentRangeUnit:r.unit,activeRange:o,renderRange:s,minTime:u,maxTime:h,isValid:a,date:t,dateIncrement:this.buildDateIncrement(r.duration)}},buildValidRange:function(){return this.getRangeOption("validRange",this.calendar.getNow())||{}},buildCurrentRangeInfo:function(t,e){var n,i=null,r=null,s=null;return this.viewSpec.duration?(i=this.viewSpec.duration,r=this.viewSpec.durationUnit,s=this.buildRangeFromDuration(t,e,i,r)):(n=this.opt("dayCount"))?(r="day",s=this.buildRangeFromDayCount(t,e,n)):(s=this.buildCustomVisibleRange(t))?r=V(s.start,s.end):(i=this.getFallbackDuration(),r=V(i),s=this.buildRangeFromDuration(t,e,i,r)),this.normalizeCurrentRange(s,r),{duration:i,unit:r,range:s}},getFallbackDuration:function(){return e.duration({days:1})},normalizeCurrentRange:function(t,e){/^(year|month|week|day)$/.test(e)?(t.start.stripTime(),t.end.stripTime()):(t.start.hasTime()||t.start.time(0),t.end.hasTime()||t.end.time(0))},adjustActiveRange:function(t,e,n){var i=!1;this.usesMinMaxTime&&(e<0&&(t.start.time(0).add(e),i=!0),n>864e5&&(t.end.time(n-864e5),i=!0),i&&(t.start.hasTime()||t.start.time(0),t.end.hasTime()||t.end.time(0)))},buildRangeFromDuration:function(t,n,i,r){var s,o,a,l=this.opt("dateAlignment"),u=t.clone();return i.as("days")<=1&&this.isHiddenDay(u)&&(u=this.skipHiddenDays(u,n),u.startOf("day")),l||(o=this.opt("dateIncrement"),o?(a=e.duration(o),l=a
')},clear:function(){this.setHeight("auto"),this.applyOverflow()},destroy:function(){this.el.remove()},applyOverflow:function(){this.scrollEl.css({"overflow-x":this.overflowX,"overflow-y":this.overflowY})},lockOverflow:function(t){var e=this.overflowX,n=this.overflowY;t=t||this.getScrollbarWidths(),"auto"===e&&(e=t.top||t.bottom||this.scrollEl[0].scrollWidth-1>this.scrollEl[0].clientWidth?"scroll":"hidden"),"auto"===n&&(n=t.left||t.right||this.scrollEl[0].scrollHeight-1>this.scrollEl[0].clientHeight?"scroll":"hidden"),this.scrollEl.css({"overflow-x":e,"overflow-y":n})},setHeight:function(t){this.scrollEl.height(t)},getScrollTop:function(){return this.scrollEl.scrollTop()},setScrollTop:function(t){this.scrollEl.scrollTop(t)},getClientWidth:function(){return this.scrollEl[0].clientWidth},getClientHeight:function(){return this.scrollEl[0].clientHeight},getScrollbarWidths:function(){return p(this.scrollEl)}});_t.prototype.proxyCall=function(t){var e=Array.prototype.slice.call(arguments,1),n=[];return this.items.forEach(function(i){n.push(i[t].apply(i,e))}),n};var Re=Zt.Calendar=bt.extend(fe,{view:null,viewsByType:null,currentDate:null,loadingLevel:0,constructor:function(t,e){we.needed(),this.el=t,this.viewsByType={},this.viewSpecCache={},this.initOptionsInternals(e),this.initMomentInternals(),this.initCurrentDate(),Ut.call(this),this.initialize()},initialize:function(){},getCalendar:function(){return this},getView:function(){return this.view},publiclyTrigger:function(t,e){var n=Array.prototype.slice.call(arguments,2),i=this.opt(t);if(e=e||this.el[0],this.triggerWith(t,e,n),i)return i.apply(e,n)},instantiateView:function(t){var e=this.getViewSpec(t);return new e.class(this,e)},isValidViewType:function(t){return Boolean(this.getViewSpec(t))},changeView:function(t,e){e&&(e.start&&e.end?this.recordOptionOverrides({visibleRange:e}):this.currentDate=this.moment(e).stripZone()),this.renderView(t)},zoomTo:function(t,e){var n;e=e||"day",n=this.getViewSpec(e)||this.getUnitViewSpec(e),this.currentDate=t.clone(),this.renderView(n?n.type:null)},initCurrentDate:function(){var t=this.opt("defaultDate");this.currentDate=null!=t?this.moment(t).stripZone():this.getNow()},prev:function(){var t=this.view.buildPrevDateProfile(this.currentDate);t.isValid&&(this.currentDate=t.date,this.renderView())},next:function(){var t=this.view.buildNextDateProfile(this.currentDate);t.isValid&&(this.currentDate=t.date,this.renderView())},prevYear:function(){this.currentDate.add(-1,"years"),this.renderView()},nextYear:function(){this.currentDate.add(1,"years"),this.renderView()},today:function(){this.currentDate=this.getNow(),this.renderView()},gotoDate:function(t){this.currentDate=this.moment(t).stripZone(),this.renderView()},incrementDate:function(t){this.currentDate.add(e.duration(t)),this.renderView()},getDate:function(){return this.applyTimezone(this.currentDate)},pushLoading:function(){this.loadingLevel++||this.publiclyTrigger("loading",null,!0,this.view)},popLoading:function(){--this.loadingLevel||this.publiclyTrigger("loading",null,!1,this.view)},select:function(t,e){this.view.select(this.buildSelectSpan.apply(this,arguments))},unselect:function(){this.view&&this.view.unselect()},buildSelectSpan:function(t,e){var n,i=this.moment(t).stripZone();return n=e?this.moment(e).stripZone():i.hasTime()?i.clone().add(this.defaultTimedEventDuration):i.clone().add(this.defaultAllDayEventDuration),{start:i,end:n}},parseRange:function(t){var e=null,n=null;return t.start&&(e=this.moment(t.start).stripZone()),t.end&&(n=this.moment(t.end).stripZone()),e||n?e&&n&&n.isBefore(e)?null:{start:e,end:n}:null},rerenderEvents:function(){this.elementVisible()&&this.reportEventChange()}});Re.mixin({dirDefaults:null,localeDefaults:null,overrides:null,dynamicOverrides:null,optionsModel:null,initOptionsInternals:function(e){this.overrides=t.extend({},e),this.dynamicOverrides={},this.optionsModel=new ue,this.populateOptionsHash()},option:function(t,e){var n;if("string"==typeof t){if(void 0===e)return this.optionsModel.get(t);n={},n[t]=e,this.setOptions(n)}else"object"==typeof t&&this.setOptions(t)},opt:function(t){return this.optionsModel.get(t)},setOptions:function(t){var e,n=0;this.recordOptionOverrides(t);for(e in t)n++;if(1===n){if("height"===e||"contentHeight"===e||"aspectRatio"===e)return void this.updateSize(!0);if("defaultDate"===e)return;if("businessHours"===e)return void(this.view&&(this.view.unrenderBusinessHours(),this.view.renderBusinessHours()));if("timezone"===e)return this.rezoneArrayEventSources(),void this.refetchEvents()}this.renderHeader(),this.renderFooter(),this.viewsByType={},this.reinitView()},populateOptionsHash:function(){var t,e,i,r,s;t=ut(this.dynamicOverrides.locale,this.overrides.locale),e=xe[t],e||(t=Re.defaults.locale,e=xe[t]||{}),i=ut(this.dynamicOverrides.isRTL,this.overrides.isRTL,e.isRTL,Re.defaults.isRTL),r=i?Re.rtlDefaults:{},this.dirDefaults=r,this.localeDefaults=e,s=n([Re.defaults,r,e,this.overrides,this.dynamicOverrides]),Yt(s),this.optionsModel.reset(s)},recordOptionOverrides:function(t){var e;for(e in t)this.dynamicOverrides[e]=t[e];this.viewSpecCache={},this.populateOptionsHash()}}),Re.mixin({defaultAllDayEventDuration:null,defaultTimedEventDuration:null,localeData:null,initMomentInternals:function(){var t=this;this.defaultAllDayEventDuration=e.duration(this.opt("defaultAllDayEventDuration")),this.defaultTimedEventDuration=e.duration(this.opt("defaultTimedEventDuration")),this.optionsModel.watch("buildingMomentLocale",["?locale","?monthNames","?monthNamesShort","?dayNames","?dayNamesShort","?firstDay","?weekNumberCalculation"],function(e){var n,i=e.weekNumberCalculation,r=e.firstDay;"iso"===i&&(i="ISO");var s=rt(qt(e.locale));e.monthNames&&(s._months=e.monthNames),e.monthNamesShort&&(s._monthsShort=e.monthNamesShort),e.dayNames&&(s._weekdays=e.dayNames),e.dayNamesShort&&(s._weekdaysShort=e.dayNamesShort),null==r&&"ISO"===i&&(r=1),null!=r&&(n=rt(s._week),n.dow=r,s._week=n),"ISO"!==i&&"local"!==i&&"function"!=typeof i||(s._fullCalendar_weekCalc=i),t.localeData=s,t.currentDate&&t.localizeMoment(t.currentDate)})},moment:function(){var t;return"local"===this.opt("timezone")?(t=Zt.moment.apply(null,arguments),t.hasTime()&&t.local()):t="UTC"===this.opt("timezone")?Zt.moment.utc.apply(null,arguments):Zt.moment.parseZone.apply(null,arguments),this.localizeMoment(t),t},localizeMoment:function(t){t._locale=this.localeData},getIsAmbigTimezone:function(){return"local"!==this.opt("timezone")&&"UTC"!==this.opt("timezone")},applyTimezone:function(t){if(!t.hasTime())return t.clone();var e,n=this.moment(t.toArray()),i=t.time()-n.time();return i&&(e=n.clone().add(i),t.time()-e.time()==0&&(n=e)),n},getNow:function(){var t=this.opt("now");return"function"==typeof t&&(t=t()),this.moment(t).stripZone()},humanizeDuration:function(t){return t.locale(this.opt("locale")).humanize()},getEventEnd:function(t){return t.end?t.end.clone():this.getDefaultEventEnd(t.allDay,t.start)},getDefaultEventEnd:function(t,e){var n=e.clone();return t?n.stripTime().add(this.defaultAllDayEventDuration):n.add(this.defaultTimedEventDuration),this.getIsAmbigTimezone()&&n.stripZone(),n}}),Re.mixin({viewSpecCache:null,getViewSpec:function(t){var e=this.viewSpecCache;return e[t]||(e[t]=this.buildViewSpec(t))},getUnitViewSpec:function(e){var n,i,r;if(-1!=t.inArray(e,Jt))for(n=this.header.getViewsWithButtons(),t.each(Zt.views,function(t){n.push(t)}),i=0;i").prependTo(n),this.initToolbars(),this.renderHeader(),this.renderFooter(),this.renderView(this.opt("defaultView")),this.opt("handleWindowResize")&&t(window).resize(this.windowResizeProxy=yt(this.windowResize.bind(this),this.opt("windowResizeDelay")))},destroy:function(){this.view&&this.view.removeElement(),this.toolbarsManager.proxyCall("removeElement"),this.contentEl.remove(),this.el.removeClass("fc fc-ltr fc-rtl fc-unthemed ui-widget"),this.el.off(".fc"),this.windowResizeProxy&&(t(window).unbind("resize",this.windowResizeProxy),this.windowResizeProxy=null),we.unneeded()},elementVisible:function(){return this.el.is(":visible")},renderView:function(e,n){this.ignoreWindowResize++;var i=this.view&&e&&this.view.type!==e;i&&(this.freezeContentHeight(),this.clearView()),!this.view&&e&&(this.view=this.viewsByType[e]||(this.viewsByType[e]=this.instantiateView(e)),this.view.setElement(t("
").appendTo(this.contentEl)),this.toolbarsManager.proxyCall("activateButton",e)),this.view&&(n&&this.view.addForcedScroll(n),this.elementVisible()&&(this.currentDate=this.view.setDate(this.currentDate))),i&&this.thawContentHeight(),this.ignoreWindowResize--},clearView:function(){this.toolbarsManager.proxyCall("deactivateButton",this.view.type),this.view.removeElement(),this.view=null},reinitView:function(){this.ignoreWindowResize++,this.freezeContentHeight();var t=this.view.type,e=this.view.queryScroll();this.clearView(),this.calcSize(),this.renderView(t,e),this.thawContentHeight(),this.ignoreWindowResize--},getSuggestedViewHeight:function(){return null===this.suggestedViewHeight&&this.calcSize(),this.suggestedViewHeight},isHeightAuto:function(){return"auto"===this.opt("contentHeight")||"auto"===this.opt("height")},updateSize:function(t){if(this.elementVisible())return t&&this._calcSize(),this.ignoreWindowResize++,this.view.updateSize(!0),this.ignoreWindowResize--,!0},calcSize:function(){this.elementVisible()&&this._calcSize()},_calcSize:function(){var t=this.opt("contentHeight"),e=this.opt("height");this.suggestedViewHeight="number"==typeof t?t:"function"==typeof t?t():"number"==typeof e?e-this.queryToolbarsHeight():"function"==typeof e?e()-this.queryToolbarsHeight():"parent"===e?this.el.parent().height()-this.queryToolbarsHeight():Math.round(this.contentEl.width()/Math.max(this.opt("aspectRatio"),.5))},windowResize:function(t){!this.ignoreWindowResize&&t.target===window&&this.view.renderRange&&this.updateSize(!0)&&this.view.publiclyTrigger("windowResize",this.el[0])},freezeContentHeight:function(){this.contentEl.css({width:"100%",height:this.contentEl.height(),overflow:"hidden"})},thawContentHeight:function(){this.contentEl.css({width:"",height:"",overflow:""})}}),Re.mixin({header:null,footer:null,toolbarsManager:null,initToolbars:function(){this.header=new Wt(this,this.computeHeaderOptions()),this.footer=new Wt(this,this.computeFooterOptions()),this.toolbarsManager=new _t([this.header,this.footer])},computeHeaderOptions:function(){return{extraClasses:"fc-header-toolbar",layout:this.opt("header")}},computeFooterOptions:function(){return{extraClasses:"fc-footer-toolbar",layout:this.opt("footer")}},renderHeader:function(){var t=this.header;t.setToolbarOptions(this.computeHeaderOptions()),t.render(),t.el&&this.el.prepend(t.el)},renderFooter:function(){var t=this.footer;t.setToolbarOptions(this.computeFooterOptions()),t.render(),t.el&&this.el.append(t.el)},setToolbarsTitle:function(t){this.toolbarsManager.proxyCall("updateTitle",t)},updateToolbarButtons:function(){var t=this.getNow(),e=this.view,n=e.buildDateProfile(t),i=e.buildPrevDateProfile(this.currentDate),r=e.buildNextDateProfile(this.currentDate);this.toolbarsManager.proxyCall(n.isValid&&!Z(t,e.currentRange)?"enableButton":"disableButton","today"),this.toolbarsManager.proxyCall(i.isValid?"enableButton":"disableButton","prev"),this.toolbarsManager.proxyCall(r.isValid?"enableButton":"disableButton","next")},queryToolbarsHeight:function(){return this.toolbarsManager.items.reduce(function(t,e){return t+(e.el?e.el.outerHeight(!0):0)},0)}}),Re.defaults={titleRangeSeparator:" – ",monthYearFormat:"MMMM YYYY",defaultTimedEventDuration:"02:00:00",defaultAllDayEventDuration:{days:1},forceEventDuration:!1,nextDayThreshold:"09:00:00",defaultView:"month",aspectRatio:1.35,header:{left:"title",center:"",right:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberTitle:"W",weekNumberCalculation:"local",scrollTime:"06:00:00",minTime:"00:00:00",maxTime:"24:00:00",showNonCurrentDates:!0,lazyFetching:!0,startParam:"start",endParam:"end",timezoneParam:"timezone",timezone:!1,isRTL:!1,buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day"},buttonIcons:{prev:"left-single-arrow",next:"right-single-arrow",prevYear:"left-double-arrow",nextYear:"right-double-arrow"},allDayText:"all-day",theme:!1,themeButtonIcons:{prev:"circle-triangle-w",next:"circle-triangle-e",prevYear:"seek-prev",nextYear:"seek-next"},dragOpacity:.75,dragRevertDuration:500,dragScroll:!0,unselectAuto:!0,dropAccept:"*",eventOrder:"title",eventLimit:!1,eventLimitText:"more",eventLimitClick:"popover",dayPopoverFormat:"LL",handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3},Re.englishDefaults={dayPopoverFormat:"dddd, MMMM D"},Re.rtlDefaults={header:{left:"next,prev today",center:"",right:"title"},buttonIcons:{prev:"right-single-arrow",next:"left-single-arrow",prevYear:"right-double-arrow",nextYear:"left-double-arrow"},themeButtonIcons:{prev:"circle-triangle-e",next:"circle-triangle-w",nextYear:"seek-prev",prevYear:"seek-next"}};var xe=Zt.locales={};Zt.datepickerLocale=function(e,n,i){var r=xe[e]||(xe[e]={});r.isRTL=i.isRTL,r.weekNumberTitle=i.weekHeader,t.each(Ie,function(t,e){r[t]=e(i)}),t.datepicker&&(t.datepicker.regional[n]=t.datepicker.regional[e]=i,t.datepicker.regional.en=t.datepicker.regional[""],t.datepicker.setDefaults(i))},Zt.locale=function(e,i){var r,s;r=xe[e]||(xe[e]={}),i&&(r=xe[e]=n([r,i])),s=qt(e),t.each(ke,function(t,e){null==r[t]&&(r[t]=e(s,r))}),Re.defaults.locale=e};var Ie={buttonText:function(t){return{prev:ct(t.prevText),next:ct(t.nextText),today:ct(t.currentText)}},monthYearFormat:function(t){return t.showMonthAfterYear?"YYYY["+t.yearSuffix+"] MMMM":"MMMM YYYY["+t.yearSuffix+"]"}},ke={dayOfMonthFormat:function(t,e){var n=t.longDateFormat("l");return n=n.replace(/^Y+[^\w\s]*|[^\w\s]*Y+$/g,""),e.isRTL?n+=" ddd":n="ddd "+n,n},mediumTimeFormat:function(t){return t.longDateFormat("LT").replace(/\s*a$/i,"a")},smallTimeFormat:function(t){return t.longDateFormat("LT").replace(":mm","(:mm)").replace(/(\Wmm)$/,"($1)").replace(/\s*a$/i,"a")},extraSmallTimeFormat:function(t){return t.longDateFormat("LT").replace(":mm","(:mm)").replace(/(\Wmm)$/,"($1)").replace(/\s*a$/i,"t")},hourFormat:function(t){return t.longDateFormat("LT").replace(":mm","").replace(/(\Wmm)$/,"").replace(/\s*a$/i,"a")},noMeridiemTimeFormat:function(t){return t.longDateFormat("LT").replace(/\s*a$/i,"")}},Me={smallDayDateFormat:function(t){return t.isRTL?"D dd":"dd D"},weekFormat:function(t){return t.isRTL?"w[ "+t.weekNumberTitle+"]":"["+t.weekNumberTitle+" ]w"},smallWeekFormat:function(t){return t.isRTL?"w["+t.weekNumberTitle+"]":"["+t.weekNumberTitle+"]w"}};Zt.locale("en",Re.englishDefaults),Zt.sourceNormalizers=[],Zt.sourceFetchers=[];var Be={dataType:"json",cache:!1},Le=1;Re.prototype.mutateSeg=function(t,e){return this.mutateEvent(t.event,e)},Re.prototype.normalizeEvent=function(t){},Re.prototype.spanContainsSpan=function(t,e){var n=t.start.clone().stripZone(),i=this.getEventEnd(t).stripZone() +//;return e.start>=n&&e.end<=i},Re.prototype.getPeerEvents=function(t,e){var n,i,r=this.getEventCache(),s=[];for(n=0;nn};var Ne={id:"_fcBusinessHours",start:"09:00",end:"17:00",dow:[1,2,3,4,5],rendering:"inverse-background"};Re.prototype.getCurrentBusinessHourEvents=function(t){return this.computeBusinessHourEvents(t,this.opt("businessHours"))},Re.prototype.computeBusinessHourEvents=function(e,n){return!0===n?this.expandBusinessHourEvents(e,[{}]):t.isPlainObject(n)?this.expandBusinessHourEvents(e,[n]):t.isArray(n)?this.expandBusinessHourEvents(e,n,!0):[]},Re.prototype.expandBusinessHourEvents=function(e,n,i){var r,s,o=this.getView(),a=[];for(r=0;r1,this.opt("weekNumbers")&&(this.opt("weekNumbersWithinDays")?(this.cellWeekNumbersVisible=!0,this.colWeekNumbersVisible=!1):(this.cellWeekNumbersVisible=!1,this.colWeekNumbersVisible=!0)),this.dayGrid.numbersVisible=this.dayNumbersVisible||this.cellWeekNumbersVisible||this.colWeekNumbersVisible,this.el.addClass("fc-basic-view").html(this.renderSkeletonHtml()),this.renderHead(),this.scroller.render();var e=this.scroller.el.addClass("fc-day-grid-container"),n=t('
').appendTo(e);this.el.find(".fc-body > tr > td").append(e),this.dayGrid.setElement(n),this.dayGrid.renderDates(this.hasRigidRows())},renderHead:function(){this.headContainerEl=this.el.find(".fc-head-container").html(this.dayGrid.renderHeadHtml()),this.headRowEl=this.headContainerEl.find(".fc-row")},unrenderDates:function(){this.dayGrid.unrenderDates(),this.dayGrid.removeElement(),this.scroller.destroy()},renderBusinessHours:function(){this.dayGrid.renderBusinessHours()},unrenderBusinessHours:function(){this.dayGrid.unrenderBusinessHours()},renderSkeletonHtml:function(){return'
'},weekNumberStyleAttr:function(){return null!==this.weekNumberWidth?'style="width:'+this.weekNumberWidth+'px"':""},hasRigidRows:function(){var t=this.opt("eventLimit");return t&&"number"!=typeof t},updateWidth:function(){this.colWeekNumbersVisible&&(this.weekNumberWidth=u(this.el.find(".fc-week-number")))},setHeight:function(t,e){var n,s,o=this.opt("eventLimit");this.scroller.clear(),r(this.headRowEl),this.dayGrid.removeSegPopover(),o&&"number"==typeof o&&this.dayGrid.limitRows(o),n=this.computeScrollerHeight(t),this.setGridHeight(n,e),o&&"number"!=typeof o&&this.dayGrid.limitRows(o),e||(this.scroller.setHeight(n),s=this.scroller.getScrollbarWidths(),(s.left||s.right)&&(i(this.headRowEl,s),n=this.computeScrollerHeight(t),this.scroller.setHeight(n)),this.scroller.lockOverflow(s))},computeScrollerHeight:function(t){return t-h(this.el,this.scroller.el)},setGridHeight:function(t,e){e?l(this.dayGrid.rowEls):a(this.dayGrid.rowEls,t,!0)},computeInitialDateScroll:function(){return{top:0}},queryDateScroll:function(){return{top:this.scroller.getScrollTop()}},applyDateScroll:function(t){void 0!==t.top&&this.scroller.setScrollTop(t.top)},hitsNeeded:function(){this.dayGrid.hitsNeeded()},hitsNotNeeded:function(){this.dayGrid.hitsNotNeeded()},prepareHits:function(){this.dayGrid.prepareHits()},releaseHits:function(){this.dayGrid.releaseHits()},queryHit:function(t,e){return this.dayGrid.queryHit(t,e)},getHitSpan:function(t){return this.dayGrid.getHitSpan(t)},getHitEl:function(t){return this.dayGrid.getHitEl(t)},renderEvents:function(t){this.dayGrid.renderEvents(t),this.updateHeight()},getEventSegs:function(){return this.dayGrid.getEventSegs()},unrenderEvents:function(){this.dayGrid.unrenderEvents()},renderDrag:function(t,e){return this.dayGrid.renderDrag(t,e)},unrenderDrag:function(){this.dayGrid.unrenderDrag()},renderSelection:function(t){this.dayGrid.renderSelection(t)},unrenderSelection:function(){this.dayGrid.unrenderSelection()}}),Fe={renderHeadIntroHtml:function(){var t=this.view;return t.colWeekNumbersVisible?'"+ht(t.opt("weekNumberTitle"))+"":""},renderNumberIntroHtml:function(t){var e=this.view,n=this.getCellDate(t,0);return e.colWeekNumbersVisible?'"+e.buildGotoAnchorHtml({date:n,type:"week",forceOff:1===this.colCnt},n.format("w"))+"":""},renderBgIntroHtml:function(){var t=this.view;return t.colWeekNumbersVisible?'":""},renderIntroHtml:function(){var t=this.view;return t.colWeekNumbersVisible?'":""}},Ae=Zt.MonthView=ze.extend({buildRenderRange:function(){var t,e=ze.prototype.buildRenderRange.apply(this,arguments);return this.isFixedWeeks()&&(t=Math.ceil(e.end.diff(e.start,"weeks",!0)),e.end.add(6-t,"weeks")),e},setGridHeight:function(t,e){e&&(t*=this.rowCnt/6),a(this.dayGrid.rowEls,t,!e)},isFixedWeeks:function(){return this.opt("fixedWeekCount")}});$t.basic={class:ze},$t.basicDay={type:"basic",duration:{days:1}},$t.basicWeek={type:"basic",duration:{weeks:1}},$t.month={class:Ae,duration:{months:1},defaults:{fixedWeekCount:!0}};var Ge=Zt.AgendaView=Ce.extend({scroller:null,timeGridClass:Te,timeGrid:null,dayGridClass:De,dayGrid:null,axisWidth:null,headContainerEl:null,noScrollRowEls:null,bottomRuleEl:null,usesMinMaxTime:!0,initialize:function(){this.timeGrid=this.instantiateTimeGrid(),this.opt("allDaySlot")&&(this.dayGrid=this.instantiateDayGrid()),this.scroller=new He({overflowX:"hidden",overflowY:"auto"})},instantiateTimeGrid:function(){return new(this.timeGridClass.extend(Ve))(this)},instantiateDayGrid:function(){return new(this.dayGridClass.extend(Oe))(this)},renderDates:function(){this.timeGrid.setRange(this.renderRange),this.dayGrid&&this.dayGrid.setRange(this.renderRange),this.el.addClass("fc-agenda-view").html(this.renderSkeletonHtml()),this.renderHead(),this.scroller.render();var e=this.scroller.el.addClass("fc-time-grid-container"),n=t('
').appendTo(e);this.el.find(".fc-body > tr > td").append(e),this.timeGrid.setElement(n),this.timeGrid.renderDates(),this.bottomRuleEl=t('
').appendTo(this.timeGrid.el),this.dayGrid&&(this.dayGrid.setElement(this.el.find(".fc-day-grid")),this.dayGrid.renderDates(),this.dayGrid.bottomCoordPadding=this.dayGrid.el.next("hr").outerHeight()),this.noScrollRowEls=this.el.find(".fc-row:not(.fc-scroller *)")},renderHead:function(){this.headContainerEl=this.el.find(".fc-head-container").html(this.timeGrid.renderHeadHtml())},unrenderDates:function(){this.timeGrid.unrenderDates(),this.timeGrid.removeElement(),this.dayGrid&&(this.dayGrid.unrenderDates(),this.dayGrid.removeElement()),this.scroller.destroy()},renderSkeletonHtml:function(){return'
'+(this.dayGrid?'

':"")+"
"},axisStyleAttr:function(){return null!==this.axisWidth?'style="width:'+this.axisWidth+'px"':""},renderBusinessHours:function(){this.timeGrid.renderBusinessHours(),this.dayGrid&&this.dayGrid.renderBusinessHours()},unrenderBusinessHours:function(){this.timeGrid.unrenderBusinessHours(),this.dayGrid&&this.dayGrid.unrenderBusinessHours()},getNowIndicatorUnit:function(){return this.timeGrid.getNowIndicatorUnit()},renderNowIndicator:function(t){this.timeGrid.renderNowIndicator(t)},unrenderNowIndicator:function(){this.timeGrid.unrenderNowIndicator()},updateSize:function(t){this.timeGrid.updateSize(t),Ce.prototype.updateSize.call(this,t)},updateWidth:function(){this.axisWidth=u(this.el.find(".fc-axis"))},setHeight:function(t,e){var n,s,o;this.bottomRuleEl.hide(),this.scroller.clear(),r(this.noScrollRowEls),this.dayGrid&&(this.dayGrid.removeSegPopover(),n=this.opt("eventLimit"),n&&"number"!=typeof n&&(n=Pe),n&&this.dayGrid.limitRows(n)),e||(s=this.computeScrollerHeight(t),this.scroller.setHeight(s),o=this.scroller.getScrollbarWidths(),(o.left||o.right)&&(i(this.noScrollRowEls,o),s=this.computeScrollerHeight(t),this.scroller.setHeight(s)),this.scroller.lockOverflow(o),this.timeGrid.getTotalSlatHeight()"+e.buildGotoAnchorHtml({date:this.start,type:"week",forceOff:this.colCnt>1},ht(t))+""):'"},renderBgIntroHtml:function(){var t=this.view;return'"},renderIntroHtml:function(){return'"}},Oe={renderBgIntroHtml:function(){var t=this.view;return'"+t.getAllDayHtml()+""},renderIntroHtml:function(){return'"}},Pe=5,_e=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}];$t.agenda={class:Ge,defaults:{allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0}},$t.agendaDay={type:"agenda",duration:{days:1}},$t.agendaWeek={type:"agenda",duration:{weeks:1}};var We=Ce.extend({grid:null,scroller:null,initialize:function(){this.grid=new Ye(this),this.scroller=new He({overflowX:"hidden",overflowY:"auto"})},renderSkeleton:function(){this.el.addClass("fc-list-view "+this.widgetContentClass),this.scroller.render(),this.scroller.el.appendTo(this.el),this.grid.setElement(this.scroller.scrollEl)},unrenderSkeleton:function(){this.scroller.destroy()},setHeight:function(t,e){this.scroller.setHeight(this.computeScrollerHeight(t))},computeScrollerHeight:function(t){return t-h(this.el,this.scroller.el)},renderDates:function(){this.grid.setRange(this.renderRange)},renderEvents:function(t){this.grid.renderEvents(t)},unrenderEvents:function(){this.grid.unrenderEvents()},isEventResizable:function(t){return!1},isEventDraggable:function(t){return!1}}),Ye=be.extend({segSelector:".fc-list-item",hasDayInteractions:!1,spanToSegs:function(t){for(var e,n=this.view,i=n.renderRange.start.clone().time(0),r=0,s=[];i
'+ht(this.view.opt("noEventsMessage"))+"
")},renderSegList:function(e){var n,i,r,s=this.groupSegsByDay(e),o=t('
'),a=o.find("tbody");for(n=0;n'+(n?e.buildGotoAnchorHtml(t,{class:"fc-list-heading-main"},ht(t.format(n))):"")+(i?e.buildGotoAnchorHtml(t,{class:"fc-list-heading-alt"},ht(t.format(i))):"")+""},fgSegHtml:function(t){var e,n=this.view,i=["fc-list-item"].concat(this.getSegCustomClasses(t)),r=this.getSegBackgroundColor(t),s=t.event,o=s.url;return e=s.allDay?n.getAllDayHtml():n.isMultiDayEvent(s)?t.isStart||t.isEnd?ht(this.getEventTimeText(t)):n.getAllDayHtml():ht(this.getEventTimeText(s)),o&&i.push("fc-has-url"),''+(this.displayEventTime?''+(e||"")+"":"")+'"+ht(t.event.title||"")+""}});return $t.list={class:We,buttonTextKey:"list",defaults:{buttonText:"list",listDayFormat:"LL",noEventsMessage:"No events to display"}},$t.listDay={type:"list",duration:{days:1},defaults:{listDayFormat:"dddd"}},$t.listWeek={type:"list",duration:{weeks:1},defaults:{listDayFormat:"dddd",listDayAltFormat:"LL"}},$t.listMonth={type:"list",duration:{month:1},defaults:{listDayAltFormat:"dddd"}},$t.listYear={type:"list",duration:{year:1},defaults:{listDayAltFormat:"dddd"}},Zt}); + +/*! + * FullCalendar v3.9.0 + * Docs & License: https://fullcalendar.io/ + * (c) 2018 Adam Shaw + */ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("moment"),require("jquery")):"function"==typeof define&&define.amd?define(["moment","jquery"],e):"object"==typeof exports?exports.FullCalendar=e(require("moment"),require("jquery")):t.FullCalendar=e(t.moment,t.jQuery)}("undefined"!=typeof self?self:this,function(t,e){return function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=236)}([function(e,n){e.exports=t},,function(t,e){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};e.__extends=function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}},function(t,n){t.exports=e},function(t,e,n){function i(t,e){e.left&&t.css({"border-left-width":1,"margin-left":e.left-1}),e.right&&t.css({"border-right-width":1,"margin-right":e.right-1})}function r(t){t.css({"margin-left":"","margin-right":"","border-left-width":"","border-right-width":""})}function o(){ht("body").addClass("fc-not-allowed")}function s(){ht("body").removeClass("fc-not-allowed")}function a(t,e,n){var i=Math.floor(e/t.length),r=Math.floor(e-i*(t.length-1)),o=[],s=[],a=[],u=0;l(t),t.each(function(e,n){var l=e===t.length-1?r:i,d=ht(n).outerHeight(!0);d *").each(function(t,n){var i=ht(n).outerWidth();i>e&&(e=i)}),e++,t.width(e),e}function d(t,e){var n,i=t.add(e);return i.css({position:"relative",left:-1}),n=t.outerHeight()-e.outerHeight(),i.css({position:"",left:""}),n}function c(t){var e=t.css("position"),n=t.parents().filter(function(){var t=ht(this);return/(auto|scroll)/.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==e&&n.length?n:ht(t[0].ownerDocument||document)}function p(t,e){var n=t.offset(),i=n.left-(e?e.left:0),r=n.top-(e?e.top:0);return{left:i,right:i+t.outerWidth(),top:r,bottom:r+t.outerHeight()}}function h(t,e){var n=t.offset(),i=g(t),r=n.left+b(t,"border-left-width")+i.left-(e?e.left:0),o=n.top+b(t,"border-top-width")+i.top-(e?e.top:0);return{left:r,right:r+t[0].clientWidth,top:o,bottom:o+t[0].clientHeight}}function f(t,e){var n=t.offset(),i=n.left+b(t,"border-left-width")+b(t,"padding-left")-(e?e.left:0),r=n.top+b(t,"border-top-width")+b(t,"padding-top")-(e?e.top:0);return{left:i,right:i+t.width(),top:r,bottom:r+t.height()}}function g(t){var e,n=t[0].offsetWidth-t[0].clientWidth,i=t[0].offsetHeight-t[0].clientHeight;return n=v(n),i=v(i),e={left:0,right:0,top:0,bottom:i},y()&&"rtl"===t.css("direction")?e.left=n:e.right=n,e}function v(t){return t=Math.max(0,t),t=Math.round(t)}function y(){return null===ft&&(ft=m()),ft}function m(){var t=ht("
").css({position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}).appendTo("body"),e=t.children(),n=e.offset().left>t.offset().left;return t.remove(),n}function b(t,e){return parseFloat(t.css(e))||0}function w(t){return 1===t.which&&!t.ctrlKey}function D(t){var e=t.originalEvent.touches;return e&&e.length?e[0].pageX:t.pageX}function E(t){var e=t.originalEvent.touches;return e&&e.length?e[0].pageY:t.pageY}function S(t){return/^touch/.test(t.type)}function C(t){t.addClass("fc-unselectable").on("selectstart",T)}function R(t){t.removeClass("fc-unselectable").off("selectstart",T)}function T(t){t.preventDefault()}function M(t,e){var n={left:Math.max(t.left,e.left),right:Math.min(t.right,e.right),top:Math.max(t.top,e.top),bottom:Math.min(t.bottom,e.bottom)};return n.left=1&&ut(o)));i++);return r}function L(t,e){var n=k(t);return"week"===n&&"object"==typeof e&&e.days&&(n="day"),n}function V(t,e,n){return null!=n?n.diff(e,t,!0):pt.isDuration(e)?e.as(t):e.end.diff(e.start,t,!0)}function G(t,e,n){var i;return U(n)?(e-t)/n:(i=n.asMonths(),Math.abs(i)>=1&&ut(i)?e.diff(t,"months",!0)/i:e.diff(t,"days",!0)/n.asDays())}function N(t,e){var n,i;return U(t)||U(e)?t/e:(n=t.asMonths(),i=e.asMonths(),Math.abs(n)>=1&&ut(n)&&Math.abs(i)>=1&&ut(i)?n/i:t.asDays()/e.asDays())}function j(t,e){var n;return U(t)?pt.duration(t*e):(n=t.asMonths(),Math.abs(n)>=1&&ut(n)?pt.duration({months:n*e}):pt.duration({days:t.asDays()*e}))}function U(t){return Boolean(t.hours()||t.minutes()||t.seconds()||t.milliseconds())}function W(t){return"[object Date]"===Object.prototype.toString.call(t)||t instanceof Date}function q(t){return"string"==typeof t&&/^\d+\:\d+(?:\:\d+\.?(?:\d{3})?)?$/.test(t)}function Y(){for(var t=[],e=0;e=0;o--)if("object"==typeof(s=t[o][i]))r.unshift(s);else if(void 0!==s){l[i]=s;break}r.length&&(l[i]=Q(r))}for(n=t.length-1;n>=0;n--){a=t[n];for(i in a)i in l||(l[i]=a[i])}return l}function X(t,e){for(var n in t)$(t,n)&&(e[n]=t[n])}function $(t,e){return gt.call(t,e)}function K(t,e,n){if(ht.isFunction(t)&&(t=[t]),t){var i=void 0,r=void 0;for(i=0;i/g,">").replace(/'/g,"'").replace(/"/g,""").replace(/\n/g,"
")}function rt(t){return t.replace(/&.*?;/g,"")}function ot(t){var e=[];return ht.each(t,function(t,n){null!=n&&e.push(t+":"+n)}),e.join(";")}function st(t){var e=[];return ht.each(t,function(t,n){null!=n&&e.push(t+'="'+it(n)+'"')}),e.join(" ")}function at(t){return t.charAt(0).toUpperCase()+t.slice(1)}function lt(t,e){return t-e}function ut(t){return t%1==0}function dt(t,e){var n=t[e];return function(){return n.apply(t,arguments)}}function ct(t,e,n){void 0===n&&(n=!1);var i,r,o,s,a,l=function(){var u=+new Date-s;ua&&s.push(new t(a,o.startMs)),o.endMs>a&&(a=o.endMs);return at.startMs)&&(null==this.startMs||null==t.endMs||this.startMs=this.startMs)&&(null==this.endMs||null!=t.endMs&&t.endMs<=this.endMs)},t.prototype.containsDate=function(t){var e=t.valueOf();return(null==this.startMs||e>=this.startMs)&&(null==this.endMs||e=this.endMs&&(e=this.endMs-1),e},t.prototype.equals=function(t){return this.startMs===t.startMs&&this.endMs===t.endMs},t.prototype.clone=function(){var e=new t(this.startMs,this.endMs);return e.isStart=this.isStart,e.isEnd=this.isEnd,e},t.prototype.getStart=function(){return null!=this.startMs?o.default.utc(this.startMs).stripZone():null},t.prototype.getEnd=function(){return null!=this.endMs?o.default.utc(this.endMs).stripZone():null},t.prototype.as=function(t){return r.utc(this.endMs).diff(r.utc(this.startMs),t,!0)},t}();e.default=s},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(208),s=n(33),a=n(49),l=function(t){function e(n){var i=t.call(this)||this;return i.calendar=n,i.className=[],i.uid=String(e.uuid++),i}return i.__extends(e,t),e.parse=function(t,e){var n=new this(e);return!("object"!=typeof t||!n.applyProps(t))&&n},e.normalizeId=function(t){return t?String(t):null},e.prototype.fetch=function(t,e,n){},e.prototype.removeEventDefsById=function(t){},e.prototype.removeAllEventDefs=function(){},e.prototype.getPrimitive=function(t){},e.prototype.parseEventDefs=function(t){var e,n,i=[];for(e=0;e0},e}(o.default);e.default=s},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){this.isAllDay=!1,this.unzonedRange=t,this.isAllDay=e}return t.prototype.toLegacy=function(t){return{start:t.msToMoment(this.unzonedRange.startMs,this.isAllDay),end:t.msToMoment(this.unzonedRange.endMs,this.isAllDay)}},t}();e.default=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),r=n(34),o=n(209),s=n(17),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.buildInstances=function(){return[this.buildInstance()]},e.prototype.buildInstance=function(){return new o.default(this,this.dateProfile)},e.prototype.isAllDay=function(){return this.dateProfile.isAllDay()},e.prototype.clone=function(){var e=t.prototype.clone.call(this);return e.dateProfile=this.dateProfile,e},e.prototype.rezone=function(){var t=this.source.calendar,e=this.dateProfile;this.dateProfile=new s.default(t.moment(e.start),e.end?t.moment(e.end):null,t)},e.prototype.applyManualStandardProps=function(e){var n=t.prototype.applyManualStandardProps.call(this,e),i=s.default.parse(e,this.source);return!!i&&(this.dateProfile=i,null!=e.date&&(this.miscProps.date=e.date),n)},e}(r.default);e.default=a,a.defineStandardProps({start:!1,date:!1,end:!1,allDay:!1})},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.mixInto=function(t){var e=this;Object.getOwnPropertyNames(this.prototype).forEach(function(n){t.prototype[n]||(t.prototype[n]=e.prototype[n])})},t.mixOver=function(t){var e=this;Object.getOwnPropertyNames(this.prototype).forEach(function(n){t.prototype[n]=e.prototype[n]})},t}();e.default=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.view=t._getView(),this.component=t}return t.prototype.opt=function(t){return this.view.opt(t)},t.prototype.end=function(){},t}();e.default=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.version="3.9.0",e.internalApiVersion=12;var i=n(4);e.applyAll=i.applyAll,e.debounce=i.debounce,e.isInt=i.isInt,e.htmlEscape=i.htmlEscape,e.cssToStr=i.cssToStr,e.proxy=i.proxy,e.capitaliseFirstLetter=i.capitaliseFirstLetter,e.getOuterRect=i.getOuterRect,e.getClientRect=i.getClientRect,e.getContentRect=i.getContentRect,e.getScrollbarWidths=i.getScrollbarWidths,e.preventDefault=i.preventDefault,e.parseFieldSpecs=i.parseFieldSpecs,e.compareByFieldSpecs=i.compareByFieldSpecs,e.compareByFieldSpec=i.compareByFieldSpec,e.flexibleCompare=i.flexibleCompare,e.computeGreatestUnit=i.computeGreatestUnit,e.divideRangeByDuration=i.divideRangeByDuration,e.divideDurationByDuration=i.divideDurationByDuration,e.multiplyDuration=i.multiplyDuration,e.durationHasTime=i.durationHasTime,e.log=i.log,e.warn=i.warn,e.removeExact=i.removeExact,e.intersectRects=i.intersectRects;var r=n(47);e.formatDate=r.formatDate,e.formatRange=r.formatRange,e.queryMostGranularFormatUnit=r.queryMostGranularFormatUnit;var o=n(31);e.datepickerLocale=o.datepickerLocale,e.locale=o.locale;var s=n(10);e.moment=s.default;var a=n(11);e.EmitterMixin=a.default;var l=n(7);e.ListenerMixin=l.default;var u=n(48);e.Model=u.default;var d=n(207);e.Constraints=d.default;var c=n(5);e.UnzonedRange=c.default;var p=n(12);e.ComponentFootprint=p.default;var h=n(212);e.BusinessHourGenerator=h.default;var f=n(34);e.EventDef=f.default;var g=n(37);e.EventDefMutation=g.default;var v=n(38);e.EventSourceParser=v.default;var y=n(6);e.EventSource=y.default;var m=n(51);e.defineThemeSystem=m.defineThemeSystem;var b=n(18);e.EventInstanceGroup=b.default;var w=n(52);e.ArrayEventSource=w.default;var D=n(215);e.FuncEventSource=D.default;var E=n(216);e.JsonFeedEventSource=E.default;var S=n(36);e.EventFootprint=S.default;var C=n(33);e.Class=C.default;var R=n(14);e.Mixin=R.default;var T=n(53);e.CoordCache=T.default;var M=n(54);e.DragListener=M.default;var I=n(20);e.Promise=I.default;var H=n(217);e.TaskQueue=H.default;var P=n(218);e.RenderQueue=P.default;var _=n(39);e.Scroller=_.default;var x=n(19);e.Theme=x.default;var O=n(219);e.DateComponent=O.default;var F=n(40);e.InteractiveDateComponent=F.default;var z=n(220);e.Calendar=z.default;var B=n(41);e.View=B.default;var A=n(22);e.defineView=A.defineView,e.getViewConfig=A.getViewConfig;var k=n(55);e.DayTableMixin=k.default;var L=n(56);e.BusinessHourRenderer=L.default;var V=n(42);e.EventRenderer=V.default;var G=n(57);e.FillRenderer=G.default;var N=n(58);e.HelperRenderer=N.default;var j=n(222);e.ExternalDropping=j.default;var U=n(223);e.EventResizing=U.default;var W=n(59);e.EventPointing=W.default;var q=n(224);e.EventDragging=q.default;var Y=n(225);e.DateSelecting=Y.default;var Z=n(60);e.StandardInteractionsMixin=Z.default;var Q=n(226);e.AgendaView=Q.default;var X=n(227);e.TimeGrid=X.default;var $=n(61);e.DayGrid=$.default;var K=n(62);e.BasicView=K.default;var J=n(229);e.MonthView=J.default;var tt=n(230);e.ListView=tt.default},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),r=function(){function t(t,e,n){this.start=t,this.end=e||null,this.unzonedRange=this.buildUnzonedRange(n)}return t.parse=function(e,n){var i=e.start||e.date,r=e.end;if(!i)return!1;var o=n.calendar,s=o.moment(i),a=r?o.moment(r):null,l=e.allDay,u=o.opt("forceEventDuration");return!!s.isValid()&&(!a||a.isValid()&&a.isAfter(s)||(a=null),null==l&&null==(l=n.allDayDefault)&&(l=o.opt("allDayDefault")),!0===l?(s.stripTime(),a&&a.stripTime()):!1===l&&(s.hasTime()||s.time(0),a&&!a.hasTime()&&a.time(0)),!a&&u&&(a=o.getDefaultEventEnd(!s.hasTime(),s)),new t(s,a,o))},t.isStandardProp=function(t){return"start"===t||"date"===t||"end"===t||"allDay"===t},t.prototype.isAllDay=function(){return!(this.start.hasTime()||this.end&&this.end.hasTime())},t.prototype.buildUnzonedRange=function(t){var e=this.start.clone().stripZone().valueOf(),n=this.getEnd(t).stripZone().valueOf();return new i.default(e,n)},t.prototype.getEnd=function(t){return this.end?this.end.clone():t.getDefaultEventEnd(this.isAllDay(),this.start)},t}();e.default=r},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),r=n(35),o=n(211),s=function(){function t(t){this.eventInstances=t||[]}return t.prototype.getAllEventRanges=function(t){return t?this.sliceNormalRenderRanges(t):this.eventInstances.map(r.eventInstanceToEventRange)},t.prototype.sliceRenderRanges=function(t){return this.isInverse()?this.sliceInverseRenderRanges(t):this.sliceNormalRenderRanges(t)},t.prototype.sliceNormalRenderRanges=function(t){var e,n,i,r=this.eventInstances,s=[];for(e=0;e
')},e.prototype.clear=function(){this.setHeight("auto"),this.applyOverflow()},e.prototype.destroy=function(){this.el.remove()},e.prototype.applyOverflow=function(){this.scrollEl.css({"overflow-x":this.overflowX,"overflow-y":this.overflowY})},e.prototype.lockOverflow=function(t){var e=this.overflowX,n=this.overflowY;t=t||this.getScrollbarWidths(),"auto"===e&&(e=t.top||t.bottom||this.scrollEl[0].scrollWidth-1>this.scrollEl[0].clientWidth?"scroll":"hidden"),"auto"===n&&(n=t.left||t.right||this.scrollEl[0].scrollHeight-1>this.scrollEl[0].clientHeight?"scroll":"hidden"),this.scrollEl.css({"overflow-x":e,"overflow-y":n})},e.prototype.setHeight=function(t){this.scrollEl.height(t)},e.prototype.getScrollTop=function(){return this.scrollEl.scrollTop()},e.prototype.setScrollTop=function(t){this.scrollEl.scrollTop(t)},e.prototype.getClientWidth=function(){return this.scrollEl[0].clientWidth},e.prototype.getClientHeight=function(){return this.scrollEl[0].clientHeight},e.prototype.getScrollbarWidths=function(){return o.getScrollbarWidths(this.scrollEl)},e}(s.default);e.default=a},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(4),s=n(219),a=n(21),l=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.segSelector=".fc-event-container > *",i.dateSelectingClass&&(i.dateClicking=new i.dateClickingClass(i)),i.dateSelectingClass&&(i.dateSelecting=new i.dateSelectingClass(i)),i.eventPointingClass&&(i.eventPointing=new i.eventPointingClass(i)),i.eventDraggingClass&&i.eventPointing&&(i.eventDragging=new i.eventDraggingClass(i,i.eventPointing)),i.eventResizingClass&&i.eventPointing&&(i.eventResizing=new i.eventResizingClass(i,i.eventPointing)),i.externalDroppingClass&&(i.externalDropping=new i.externalDroppingClass(i)),i}return i.__extends(e,t),e.prototype.setElement=function(e){t.prototype.setElement.call(this,e),this.dateClicking&&this.dateClicking.bindToEl(e),this.dateSelecting&&this.dateSelecting.bindToEl(e),this.bindAllSegHandlersToEl(e)},e.prototype.removeElement=function(){this.endInteractions(),t.prototype.removeElement.call(this)},e.prototype.executeEventUnrender=function(){this.endInteractions(),t.prototype.executeEventUnrender.call(this)},e.prototype.bindGlobalHandlers=function(){t.prototype.bindGlobalHandlers.call(this),this.externalDropping&&this.externalDropping.bindToDocument()},e.prototype.unbindGlobalHandlers=function(){t.prototype.unbindGlobalHandlers.call(this),this.externalDropping&&this.externalDropping.unbindFromDocument()},e.prototype.bindDateHandlerToEl=function(t,e,n){var i=this;this.el.on(e,function(t){if(!r(t.target).is(i.segSelector+":not(.fc-helper),"+i.segSelector+":not(.fc-helper) *,.fc-more,a[data-goto]"))return n.call(i,t)})},e.prototype.bindAllSegHandlersToEl=function(t){[this.eventPointing,this.eventDragging,this.eventResizing].forEach(function(e){e&&e.bindToEl(t)})},e.prototype.bindSegHandlerToEl=function(t,e,n){var i=this;t.on(e,this.segSelector,function(t){var e=r(t.currentTarget);if(!e.is(".fc-helper")){var o=e.data("fc-seg");if(o&&!i.shouldIgnoreEventPointing())return n.call(i,o,t)}})},e.prototype.shouldIgnoreMouse=function(){return a.default.get().shouldIgnoreMouse()},e.prototype.shouldIgnoreTouch=function(){var t=this._getView();return t.isSelected||t.selectedEvent},e.prototype.shouldIgnoreEventPointing=function(){return this.eventDragging&&this.eventDragging.isDragging||this.eventResizing&&this.eventResizing.isResizing},e.prototype.canStartSelection=function(t,e){return o.getEvIsTouch(e)&&!this.canStartResize(t,e)&&(this.isEventDefDraggable(t.footprint.eventDef)||this.isEventDefResizable(t.footprint.eventDef))},e.prototype.canStartDrag=function(t,e){return!this.canStartResize(t,e)&&this.isEventDefDraggable(t.footprint.eventDef)},e.prototype.canStartResize=function(t,e){var n=this._getView(),i=t.footprint.eventDef;return(!o.getEvIsTouch(e)||n.isEventDefSelected(i))&&this.isEventDefResizable(i)&&r(e.target).is(".fc-resizer")},e.prototype.endInteractions=function(){[this.dateClicking,this.dateSelecting,this.eventPointing,this.eventDragging,this.eventResizing].forEach(function(t){t&&t.end()})},e.prototype.isEventDefDraggable=function(t){return this.isEventDefStartEditable(t)},e.prototype.isEventDefStartEditable=function(t){var e=t.isStartExplicitlyEditable();return null==e&&null==(e=this.opt("eventStartEditable"))&&(e=this.isEventDefGenerallyEditable(t)),e},e.prototype.isEventDefGenerallyEditable=function(t){var e=t.isExplicitlyEditable();return null==e&&(e=this.opt("editable")),e},e.prototype.isEventDefResizableFromStart=function(t){return this.opt("eventResizableFromStart")&&this.isEventDefResizable(t)},e.prototype.isEventDefResizableFromEnd=function(t){return this.isEventDefResizable(t)},e.prototype.isEventDefResizable=function(t){var e=t.isDurationExplicitlyEditable();return null==e&&null==(e=this.opt("eventDurationEditable"))&&(e=this.isEventDefGenerallyEditable(t)),e},e.prototype.diffDates=function(t,e){return this.largeUnit?o.diffByUnit(t,e,this.largeUnit):o.diffDayTime(t,e)},e.prototype.isEventInstanceGroupAllowed=function(t){var e,n=this._getView(),i=this.dateProfile,r=this.eventRangesToEventFootprints(t.getAllEventRanges());for(e=0;e1?"ll":"LL"},e.prototype.setDate=function(t){var e=this.get("dateProfile"),n=this.dateProfileGenerator.build(t,void 0,!0);e&&e.activeUnzonedRange.equals(n.activeUnzonedRange)||this.set("dateProfile",n)},e.prototype.unsetDate=function(){this.unset("dateProfile")},e.prototype.fetchInitialEvents=function(t){var e=this.calendar,n=t.isRangeAllDay&&!this.usesMinMaxTime;return e.requestEvents(e.msToMoment(t.activeUnzonedRange.startMs,n),e.msToMoment(t.activeUnzonedRange.endMs,n))},e.prototype.bindEventChanges=function(){this.listenTo(this.calendar,"eventsReset",this.resetEvents)},e.prototype.unbindEventChanges=function(){this.stopListeningTo(this.calendar,"eventsReset")},e.prototype.setEvents=function(t){this.set("currentEvents",t),this.set("hasEvents",!0)},e.prototype.unsetEvents=function(){this.unset("currentEvents"),this.unset("hasEvents")},e.prototype.resetEvents=function(t){this.startBatchRender(),this.unsetEvents(),this.setEvents(t),this.stopBatchRender()},e.prototype.requestDateRender=function(t){var e=this;this.requestRender(function(){e.executeDateRender(t)},"date","init")},e.prototype.requestDateUnrender=function(){var t=this;this.requestRender(function(){t.executeDateUnrender()},"date","destroy")},e.prototype.executeDateRender=function(e){t.prototype.executeDateRender.call(this,e),this.render&&this.render(),this.trigger("datesRendered"),this.addScroll({isDateInit:!0}),this.startNowIndicator()},e.prototype.executeDateUnrender=function(){this.unselect(),this.stopNowIndicator(),this.trigger("before:datesUnrendered"),this.destroy&&this.destroy(),t.prototype.executeDateUnrender.call(this)},e.prototype.bindBaseRenderHandlers=function(){var t=this;this.on("datesRendered",function(){t.whenSizeUpdated(t.triggerViewRender)}),this.on("before:datesUnrendered",function(){t.triggerViewDestroy()})},e.prototype.triggerViewRender=function(){this.publiclyTrigger("viewRender",{context:this,args:[this,this.el]})},e.prototype.triggerViewDestroy=function(){this.publiclyTrigger("viewDestroy",{context:this,args:[this,this.el]})},e.prototype.requestEventsRender=function(t){var e=this;this.requestRender(function(){e.executeEventRender(t),e.whenSizeUpdated(e.triggerAfterEventsRendered)},"event","init")},e.prototype.requestEventsUnrender=function(){var t=this;this.requestRender(function(){t.triggerBeforeEventsDestroyed(),t.executeEventUnrender()},"event","destroy")},e.prototype.requestBusinessHoursRender=function(t){var e=this;this.requestRender(function(){e.renderBusinessHours(t)},"businessHours","init")},e.prototype.requestBusinessHoursUnrender=function(){var t=this;this.requestRender(function(){t.unrenderBusinessHours()},"businessHours","destroy")},e.prototype.bindGlobalHandlers=function(){t.prototype.bindGlobalHandlers.call(this),this.listenTo(d.default.get(),{touchstart:this.processUnselect,mousedown:this.handleDocumentMousedown})},e.prototype.unbindGlobalHandlers=function(){t.prototype.unbindGlobalHandlers.call(this),this.stopListeningTo(d.default.get())},e.prototype.startNowIndicator=function(){var t,e,n,i=this;this.opt("nowIndicator")&&(t=this.getNowIndicatorUnit())&&(e=s.proxy(this,"updateNowIndicator"),this.initialNowDate=this.calendar.getNow(),this.initialNowQueriedMs=(new Date).valueOf(),n=this.initialNowDate.clone().startOf(t).add(1,t).valueOf()-this.initialNowDate.valueOf(),this.nowIndicatorTimeoutID=setTimeout(function(){i.nowIndicatorTimeoutID=null,e(),n=+o.duration(1,t),n=Math.max(100,n),i.nowIndicatorIntervalID=setInterval(e,n)},n))},e.prototype.updateNowIndicator=function(){this.isDatesRendered&&this.initialNowDate&&(this.unrenderNowIndicator(),this.renderNowIndicator(this.initialNowDate.clone().add((new Date).valueOf()-this.initialNowQueriedMs)),this.isNowIndicatorRendered=!0)},e.prototype.stopNowIndicator=function(){this.isNowIndicatorRendered&&(this.nowIndicatorTimeoutID&&(clearTimeout(this.nowIndicatorTimeoutID),this.nowIndicatorTimeoutID=null),this.nowIndicatorIntervalID&&(clearInterval(this.nowIndicatorIntervalID),this.nowIndicatorIntervalID=null),this.unrenderNowIndicator(),this.isNowIndicatorRendered=!1)},e.prototype.updateSize=function(e,n,i){this.setHeight?this.setHeight(e,n):t.prototype.updateSize.call(this,e,n,i),this.updateNowIndicator()},e.prototype.addScroll=function(t){var e=this.queuedScroll||(this.queuedScroll={});r.extend(e,t)},e.prototype.popScroll=function(){this.applyQueuedScroll(),this.queuedScroll=null},e.prototype.applyQueuedScroll=function(){this.queuedScroll&&this.applyScroll(this.queuedScroll)},e.prototype.queryScroll=function(){var t={};return this.isDatesRendered&&r.extend(t,this.queryDateScroll()),t},e.prototype.applyScroll=function(t){t.isDateInit&&this.isDatesRendered&&r.extend(t,this.computeInitialDateScroll()),this.isDatesRendered&&this.applyDateScroll(t)},e.prototype.computeInitialDateScroll=function(){return{}},e.prototype.queryDateScroll=function(){return{}},e.prototype.applyDateScroll=function(t){},e.prototype.reportEventDrop=function(t,e,n,i){var r=this.calendar.eventManager,s=r.mutateEventsWithId(t.def.id,e),a=e.dateMutation;a&&(t.dateProfile=a.buildNewDateProfile(t.dateProfile,this.calendar)),this.triggerEventDrop(t,a&&a.dateDelta||o.duration(),s,n,i)},e.prototype.triggerEventDrop=function(t,e,n,i,r){this.publiclyTrigger("eventDrop",{context:i[0],args:[t.toLegacy(),e,n,r,{},this]})},e.prototype.reportExternalDrop=function(t,e,n,i,r,o){e&&this.calendar.eventManager.addEventDef(t,n),this.triggerExternalDrop(t,e,i,r,o)},e.prototype.triggerExternalDrop=function(t,e,n,i,r){this.publiclyTrigger("drop",{context:n[0],args:[t.dateProfile.start.clone(),i,r,this]}),e&&this.publiclyTrigger("eventReceive",{context:this,args:[t.buildInstance().toLegacy(),this]})},e.prototype.reportEventResize=function(t,e,n,i){var r=this.calendar.eventManager,o=r.mutateEventsWithId(t.def.id,e);t.dateProfile=e.dateMutation.buildNewDateProfile(t.dateProfile,this.calendar),this.triggerEventResize(t,e.dateMutation.endDelta,o,n,i)},e.prototype.triggerEventResize=function(t,e,n,i,r){this.publiclyTrigger("eventResize",{context:i[0],args:[t.toLegacy(),e,n,r,{},this]})},e.prototype.select=function(t,e){this.unselect(e),this.renderSelectionFootprint(t),this.reportSelection(t,e)},e.prototype.renderSelectionFootprint=function(e){this.renderSelection?this.renderSelection(e.toLegacy(this.calendar)):t.prototype.renderSelectionFootprint.call(this,e)},e.prototype.reportSelection=function(t,e){this.isSelected=!0,this.triggerSelect(t,e)},e.prototype.triggerSelect=function(t,e){var n=this.calendar.footprintToDateProfile(t);this.publiclyTrigger("select",{context:this,args:[n.start,n.end,e,this]})},e.prototype.unselect=function(t){this.isSelected&&(this.isSelected=!1,this.destroySelection&&this.destroySelection(),this.unrenderSelection(),this.publiclyTrigger("unselect",{context:this,args:[t,this]}))},e.prototype.selectEventInstance=function(t){this.selectedEventInstance&&this.selectedEventInstance===t||(this.unselectEventInstance(),this.getEventSegs().forEach(function(e){e.footprint.eventInstance===t&&e.el&&e.el.addClass("fc-selected")}),this.selectedEventInstance=t)},e.prototype.unselectEventInstance=function(){this.selectedEventInstance&&(this.getEventSegs().forEach(function(t){t.el&&t.el.removeClass("fc-selected")}),this.selectedEventInstance=null)},e.prototype.isEventDefSelected=function(t){return this.selectedEventInstance&&this.selectedEventInstance.def.id===t.id},e.prototype.handleDocumentMousedown=function(t){s.isPrimaryMouseButton(t)&&this.processUnselect(t)},e.prototype.processUnselect=function(t){this.processRangeUnselect(t),this.processEventUnselect(t)},e.prototype.processRangeUnselect=function(t){var e;this.isSelected&&this.opt("unselectAuto")&&((e=this.opt("unselectCancel"))&&r(t.target).closest(e).length||this.unselect(t))},e.prototype.processEventUnselect=function(t){this.selectedEventInstance&&(r(t.target).closest(".fc-selected").length||this.unselectEventInstance())},e.prototype.triggerBaseRendered=function(){this.publiclyTrigger("viewRender",{context:this,args:[this,this.el]})},e.prototype.triggerBaseUnrendered=function(){this.publiclyTrigger("viewDestroy",{context:this,args:[this,this.el]})},e.prototype.triggerDayClick=function(t,e,n){var i=this.calendar.footprintToDateProfile(t);this.publiclyTrigger("dayClick",{context:e,args:[i.start,n,this]})},e.prototype.isDateInOtherMonth=function(t,e){return!1},e.prototype.getUnzonedRangeOption=function(t){var e=this.opt(t);if("function"==typeof e&&(e=e.apply(null,Array.prototype.slice.call(arguments,1))),e)return this.calendar.parseUnzonedRange(e)},e.prototype.initHiddenDays=function(){var t,e=this.opt("hiddenDays")||[],n=[],i=0;for(!1===this.opt("weekends")&&e.push(0,6),t=0;t<7;t++)(n[t]=-1!==r.inArray(t,e))||i++;if(!i)throw new Error("invalid hiddenDays");this.isHiddenDayHash=n},e.prototype.trimHiddenDays=function(t){var e=t.getStart(),n=t.getEnd();return e&&(e=this.skipHiddenDays(e)),n&&(n=this.skipHiddenDays(n,-1,!0)),null===e||null===n||eo&&(!l[s]||u.isSame(d,l[s]))&&(s-1!==o||"."!==c[s]);s--)v=c[s]+v;for(a=o;a<=s;a++)y+=c[a],m+=p[a];return(y||m)&&(b=r?m+i+y:y+i+m),g(h+b+v)}function a(t){return C[t]||(C[t]=l(t))}function l(t){var e=u(t);return{fakeFormatString:c(e),sameUnits:p(e)}}function u(t){for(var e,n=[],i=/\[([^\]]*)\]|\(([^\)]*)\)|(LTS|LT|(\w)\4*o?)|([^\w\[\(]+)/g;e=i.exec(t);)e[1]?n.push.apply(n,d(e[1])):e[2]?n.push({maybe:u(e[2])}):e[3]?n.push({token:e[3]}):e[5]&&n.push.apply(n,d(e[5]));return n}function d(t){return". "===t?["."," "]:[t]}function c(t){var e,n,i=[];for(e=0;er.value)&&(r=i);return r?r.unit:null}Object.defineProperty(e,"__esModule",{value:!0});var y=n(10);y.newMomentProto.format=function(){return this._fullCalendar&&arguments[0]?r(this,arguments[0]):this._ambigTime?y.oldMomentFormat(i(this),"YYYY-MM-DD"):this._ambigZone?y.oldMomentFormat(i(this),"YYYY-MM-DD[T]HH:mm:ss"):this._fullCalendar?y.oldMomentFormat(i(this)):y.oldMomentProto.format.apply(this,arguments)},y.newMomentProto.toISOString=function(){return this._ambigTime?y.oldMomentFormat(i(this),"YYYY-MM-DD"):this._ambigZone?y.oldMomentFormat(i(this),"YYYY-MM-DD[T]HH:mm:ss"):this._fullCalendar?y.oldMomentProto.toISOString.apply(i(this),arguments):y.oldMomentProto.toISOString.apply(this,arguments)};var m="\v",b="",w="",D=new RegExp(w+"([^"+w+"]*)"+w,"g"),E={t:function(t){return y.oldMomentFormat(t,"a").charAt(0)},T:function(t){return y.oldMomentFormat(t,"A").charAt(0)}},S={Y:{value:1,unit:"year"},M:{value:2,unit:"month"},W:{value:3,unit:"week"},w:{value:3,unit:"week"},D:{value:4,unit:"day"},d:{value:4,unit:"day"}};e.formatDate=r,e.formatRange=o;var C={};e.queryMostGranularFormatUnit=v},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),r=n(33),o=n(11),s=n(7),a=function(t){function e(){var e=t.call(this)||this;return e._watchers={},e._props={},e.applyGlobalWatchers(),e.constructed(),e}return i.__extends(e,t),e.watch=function(t){for(var e=[],n=1;n0&&(t=this.els.eq(0).offsetParent()),this.origin=t?t.offset():null,this.boundingRect=this.queryBoundingRect(),this.isHorizontal&&this.buildElHorizontals(),this.isVertical&&this.buildElVerticals()},t.prototype.clear=function(){this.origin=null,this.boundingRect=null,this.lefts=null,this.rights=null,this.tops=null,this.bottoms=null},t.prototype.ensureBuilt=function(){this.origin||this.build()},t.prototype.buildElHorizontals=function(){var t=[],e=[];this.els.each(function(n,r){var o=i(r),s=o.offset().left,a=o.outerWidth();t.push(s),e.push(s+a)}),this.lefts=t,this.rights=e},t.prototype.buildElVerticals=function(){var t=[],e=[];this.els.each(function(n,r){var o=i(r),s=o.offset().top,a=o.outerHeight();t.push(s),e.push(s+a)}),this.tops=t,this.bottoms=e},t.prototype.getHorizontalIndex=function(t){this.ensureBuilt();var e,n=this.lefts,i=this.rights,r=n.length;for(e=0;e=n[e]&&t=n[e]&&t0&&(t=r.getScrollParent(this.els.eq(0)),!t.is(document))?r.getClientRect(t):null},t.prototype.isPointInBounds=function(t,e){return this.isLeftInBounds(t)&&this.isTopInBounds(e)},t.prototype.isLeftInBounds=function(t){return!this.boundingRect||t>=this.boundingRect.left&&t=this.boundingRect.top&&t=i*i&&this.handleDistanceSurpassed(t),this.isDragging&&this.handleDrag(e,n,t)},t.prototype.handleDrag=function(t,e,n){this.trigger("drag",t,e,n),this.updateAutoScroll(n)},t.prototype.endDrag=function(t){this.isDragging&&(this.isDragging=!1,this.handleDragEnd(t))},t.prototype.handleDragEnd=function(t){this.trigger("dragEnd",t)},t.prototype.startDelay=function(t){var e=this;this.delay?this.delayTimeoutId=setTimeout(function(){e.handleDelayEnd(t)},this.delay):this.handleDelayEnd(t)},t.prototype.handleDelayEnd=function(t){this.isDelayEnded=!0,this.isDistanceSurpassed&&this.startDrag(t)},t.prototype.handleDistanceSurpassed=function(t){this.isDistanceSurpassed=!0,this.isDelayEnded&&this.startDrag(t)},t.prototype.handleTouchMove=function(t){this.isDragging&&this.shouldCancelTouchScroll&&t.preventDefault(),this.handleMove(t)},t.prototype.handleMouseMove=function(t){this.handleMove(t)},t.prototype.handleTouchScroll=function(t){this.isDragging&&!this.scrollAlwaysKills||this.endInteraction(t,!0)},t.prototype.trigger=function(t){for(var e=[],n=1;n=0&&e<=1?l=e*this.scrollSpeed*-1:n>=0&&n<=1&&(l=n*this.scrollSpeed),i>=0&&i<=1?u=i*this.scrollSpeed*-1:o>=0&&o<=1&&(u=o*this.scrollSpeed)),this.setScrollVel(l,u)},t.prototype.setScrollVel=function(t,e){this.scrollTopVel=t,this.scrollLeftVel=e,this.constrainScrollVel(),!this.scrollTopVel&&!this.scrollLeftVel||this.scrollIntervalId||(this.scrollIntervalId=setInterval(r.proxy(this,"scrollIntervalFunc"),this.scrollIntervalMs))},t.prototype.constrainScrollVel=function(){var t=this.scrollEl;this.scrollTopVel<0?t.scrollTop()<=0&&(this.scrollTopVel=0):this.scrollTopVel>0&&t.scrollTop()+t[0].clientHeight>=t[0].scrollHeight&&(this.scrollTopVel=0),this.scrollLeftVel<0?t.scrollLeft()<=0&&(this.scrollLeftVel=0):this.scrollLeftVel>0&&t.scrollLeft()+t[0].clientWidth>=t[0].scrollWidth&&(this.scrollLeftVel=0)},t.prototype.scrollIntervalFunc=function(){var t=this.scrollEl,e=this.scrollIntervalMs/1e3;this.scrollTopVel&&t.scrollTop(t.scrollTop()+this.scrollTopVel*e),this.scrollLeftVel&&t.scrollLeft(t.scrollLeft()+this.scrollLeftVel*e),this.constrainScrollVel(),this.scrollTopVel||this.scrollLeftVel||this.endAutoScroll()},t.prototype.endAutoScroll=function(){this.scrollIntervalId&&(clearInterval(this.scrollIntervalId),this.scrollIntervalId=null,this.handleScrollEnd())},t.prototype.handleDebouncedScroll=function(){this.scrollIntervalId||this.handleScrollEnd()},t.prototype.handleScrollEnd=function(){},t}();e.default=a,o.default.mixInto(a)},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),r=n(4),o=n(14),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.updateDayTable=function(){for(var t,e,n,i=this,r=i.view,o=r.calendar,s=o.msToUtcMoment(i.dateProfile.renderUnzonedRange.startMs,!0),a=o.msToUtcMoment(i.dateProfile.renderUnzonedRange.endMs,!0),l=-1,u=[],d=[];s.isBefore(a);)r.isHiddenDay(s)?u.push(l+.5):(l++,u.push(l),d.push(s.clone())),s.add(1,"days");if(this.breakOnWeeks){for(e=d[0].day(),t=1;t=e.length?e[e.length-1]+1:e[n]},e.prototype.computeColHeadFormat=function(){return this.rowCnt>1||this.colCnt>10?"ddd":this.colCnt>1?this.opt("dayOfMonthFormat"):"dddd"},e.prototype.sliceRangeByRow=function(t){var e,n,i,r,o,s=this.daysPerRow,a=this.view.computeDayRange(t),l=this.getDateDayIndex(a.start),u=this.getDateDayIndex(a.end.clone().subtract(1,"days")),d=[];for(e=0;e'+this.renderHeadTrHtml()+"
"},e.prototype.renderHeadIntroHtml=function(){return this.renderIntroHtml()},e.prototype.renderHeadTrHtml=function(){return""+(this.isRTL?"":this.renderHeadIntroHtml())+this.renderHeadDateCellsHtml()+(this.isRTL?this.renderHeadIntroHtml():"")+""},e.prototype.renderHeadDateCellsHtml=function(){var t,e,n=[];for(t=0;t1?' colspan="'+e+'"':"")+(n?" "+n:"")+">"+(a?s.buildGotoAnchorHtml({date:t,forceOff:o.rowCnt>1||1===o.colCnt},i):i)+""},e.prototype.renderBgTrHtml=function(t){return""+(this.isRTL?"":this.renderBgIntroHtml(t))+this.renderBgCellsHtml(t)+(this.isRTL?this.renderBgIntroHtml(t):"")+""},e.prototype.renderBgIntroHtml=function(t){return this.renderIntroHtml()},e.prototype.renderBgCellsHtml=function(t){var e,n,i=[];for(e=0;e"},e.prototype.renderIntroHtml=function(){},e.prototype.bookendCells=function(t){var e=this.renderIntroHtml();e&&(this.isRTL?t.append(e):t.prepend(e))},e}(o.default);e.default=s},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){this.component=t,this.fillRenderer=e}return t.prototype.render=function(t){var e=this.component,n=e._getDateProfile().activeUnzonedRange,i=t.buildEventInstanceGroup(e.hasAllDayBusinessHours,n),r=i?e.eventRangesToEventFootprints(i.sliceRenderRanges(n)):[];this.renderEventFootprints(r)},t.prototype.renderEventFootprints=function(t){var e=this.component.eventFootprintsToSegs(t);this.renderSegs(e),this.segs=e},t.prototype.renderSegs=function(t){this.fillRenderer&&this.fillRenderer.renderSegs("businessHours",t,{getClasses:function(t){return["fc-nonbusiness","fc-bgevent"]}})},t.prototype.unrender=function(){this.fillRenderer&&this.fillRenderer.unrender("businessHours"),this.segs=null},t.prototype.getSegs=function(){return this.segs||[]},t}();e.default=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=n(3),r=n(4),o=function(){function t(t){this.fillSegTag="div",this.component=t,this.elsByFill={}}return t.prototype.renderFootprint=function(t,e,n){this.renderSegs(t,this.component.componentFootprintToSegs(e),n)},t.prototype.renderSegs=function(t,e,n){var i;return e=this.buildSegEls(t,e,n),i=this.attachSegEls(t,e),i&&this.reportEls(t,i),e},t.prototype.unrender=function(t){var e=this.elsByFill[t];e&&(e.remove(),delete this.elsByFill[t])},t.prototype.buildSegEls=function(t,e,n){var r,o=this,s="",a=[];if(e.length){for(r=0;r"},t.prototype.attachSegEls=function(t,e){},t.prototype.reportEls=function(t,e){this.elsByFill[t]?this.elsByFill[t]=this.elsByFill[t].add(e):this.elsByFill[t]=i(e)},t}();e.default=o},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=n(13),r=n(36),o=n(6),s=function(){function t(t,e){this.view=t._getView(),this.component=t,this.eventRenderer=e}return t.prototype.renderComponentFootprint=function(t){this.renderEventFootprints([this.fabricateEventFootprint(t)])},t.prototype.renderEventDraggingFootprints=function(t,e,n){this.renderEventFootprints(t,e,"fc-dragging",n?null:this.view.opt("dragOpacity"))},t.prototype.renderEventResizingFootprints=function(t,e,n){this.renderEventFootprints(t,e,"fc-resizing")},t.prototype.renderEventFootprints=function(t,e,n,i){var r,o=this.component.eventFootprintsToSegs(t),s="fc-helper "+(n||"");for(o=this.eventRenderer.renderFgSegEls(o),r=0;r
'+this.renderBgTrHtml(t)+'
'+(this.getIsNumbersVisible()?""+this.renderNumberTrHtml(t)+"":"")+"
"},e.prototype.getIsNumbersVisible=function(){return this.getIsDayNumbersVisible()||this.cellWeekNumbersVisible},e.prototype.getIsDayNumbersVisible=function(){return this.rowCnt>1},e.prototype.renderNumberTrHtml=function(t){return""+(this.isRTL?"":this.renderNumberIntroHtml(t))+this.renderNumberCellsHtml(t)+(this.isRTL?this.renderNumberIntroHtml(t):"")+""},e.prototype.renderNumberIntroHtml=function(t){return this.renderIntroHtml()},e.prototype.renderNumberCellsHtml=function(t){var e,n,i=[];for(e=0;e",this.cellWeekNumbersVisible&&t.day()===n&&(r+=i.buildGotoAnchorHtml({date:t,type:"week"},{class:"fc-week-number"},t.format("w"))),s&&(r+=i.buildGotoAnchorHtml(t,{class:"fc-day-number"},t.format("D"))),r+=""):""},e.prototype.prepareHits=function(){this.colCoordCache.build(),this.rowCoordCache.build(),this.rowCoordCache.bottoms[this.rowCnt-1]+=this.bottomCoordPadding},e.prototype.releaseHits=function(){this.colCoordCache.clear(),this.rowCoordCache.clear()},e.prototype.queryHit=function(t,e){if(this.colCoordCache.isLeftInBounds(t)&&this.rowCoordCache.isTopInBounds(e)){var n=this.colCoordCache.getHorizontalIndex(t),i=this.rowCoordCache.getVerticalIndex(e);if(null!=i&&null!=n)return this.getCellHit(i,n)}},e.prototype.getHitFootprint=function(t){var e=this.getCellRange(t.row,t.col);return new u.default(new l.default(e.start,e.end),!0)},e.prototype.getHitEl=function(t){return this.getCellEl(t.row,t.col)},e.prototype.getCellHit=function(t,e){return{row:t,col:e,component:this,left:this.colCoordCache.getLeftOffset(e),right:this.colCoordCache.getRightOffset(e),top:this.rowCoordCache.getTopOffset(t),bottom:this.rowCoordCache.getBottomOffset(t)}},e.prototype.getCellEl=function(t,e){return this.cellEls.eq(t*this.colCnt+e)},e.prototype.executeEventUnrender=function(){this.removeSegPopover(),t.prototype.executeEventUnrender.call(this)},e.prototype.getOwnEventSegs=function(){ +return t.prototype.getOwnEventSegs.call(this).concat(this.popoverSegs||[])},e.prototype.renderDrag=function(t,e,n){var i;for(i=0;i td > :first-child").each(e),i.position().top+o>a)return n;return!1},e.prototype.limitRow=function(t,e){var n,i,o,s,a,l,u,d,c,p,h,f,g,v,y,m=this,b=this.eventRenderer.rowStructs[t],w=[],D=0,E=function(n){for(;D").append(y),c.append(v),w.push(v[0])),D++};if(e&&e').attr("rowspan",p),l=d[f],y=this.renderMoreLink(t,a.leftCol+f,[a].concat(l)),v=r("
").append(y),g.append(v),h.push(g[0]),w.push(g[0]);c.addClass("fc-limited").after(r(h)),o.push(c[0])}}E(this.colCnt),b.moreEls=r(w),b.limitedEls=r(o)}},e.prototype.unlimitRow=function(t){var e=this.eventRenderer.rowStructs[t];e.moreEls&&(e.moreEls.remove(),e.moreEls=null),e.limitedEls&&(e.limitedEls.removeClass("fc-limited"),e.limitedEls=null)},e.prototype.renderMoreLink=function(t,e,n){var i=this,o=this.view;return r('').text(this.getMoreLinkText(n.length)).on("click",function(s){var a=i.opt("eventLimitClick"),l=i.getCellDate(t,e),u=r(s.currentTarget),d=i.getCellEl(t,e),c=i.getCellSegs(t,e),p=i.resliceDaySegs(c,l),h=i.resliceDaySegs(n,l);"function"==typeof a&&(a=i.publiclyTrigger("eventLimitClick",{context:o,args:[{date:l.clone(),dayEl:d,moreEl:u,segs:p,hiddenSegs:h},s,o]})),"popover"===a?i.showSegPopover(t,e,u,p):"string"==typeof a&&o.calendar.zoomTo(l,a)})},e.prototype.showSegPopover=function(t,e,n,i){var r,o,s=this,l=this.view,u=n.parent();r=1===this.rowCnt?l.el:this.rowEls.eq(t),o={className:"fc-more-popover "+l.calendar.theme.getClass("popover"),content:this.renderSegPopoverContent(t,e,i),parentEl:l.el,top:r.offset().top,autoHide:!0,viewportConstrain:this.opt("popoverViewportConstrain"),hide:function(){s.popoverSegs&&s.triggerBeforeEventSegsDestroyed(s.popoverSegs),s.segPopover.removeElement(),s.segPopover=null,s.popoverSegs=null}},this.isRTL?o.right=u.offset().left+u.outerWidth()+1:o.left=u.offset().left-1,this.segPopover=new a.default(o),this.segPopover.show(),this.bindAllSegHandlersToEl(this.segPopover.el),this.triggerAfterEventSegsRendered(i)},e.prototype.renderSegPopoverContent=function(t,e,n){var i,s=this.view,a=s.calendar.theme,l=this.getCellDate(t,e).format(this.opt("dayPopoverFormat")),u=r('
'+o.htmlEscape(l)+'
'),d=u.find(".fc-event-container");for(n=this.eventRenderer.renderFgSegEls(n,!0),this.popoverSegs=n,i=0;i"+s.htmlEscape(this.opt("weekNumberTitle"))+"":""},e.prototype.renderNumberIntroHtml=function(t){var e=this.view,n=this.getCellDate(t,0);return this.colWeekNumbersVisible?'"+e.buildGotoAnchorHtml({date:n,type:"week",forceOff:1===this.colCnt},n.format("w"))+"":""},e.prototype.renderBgIntroHtml=function(){var t=this.view;return this.colWeekNumbersVisible?'":""},e.prototype.renderIntroHtml=function(){var t=this.view;return this.colWeekNumbersVisible?'":""},e.prototype.getIsNumbersVisible=function(){return d.default.prototype.getIsNumbersVisible.apply(this,arguments)||this.colWeekNumbersVisible},e}(t)}Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),o=n(3),s=n(4),a=n(39),l=n(41),u=n(228),d=n(61),c=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.dayGrid=i.instantiateDayGrid(),i.dayGrid.isRigid=i.hasRigidRows(),i.opt("weekNumbers")&&(i.opt("weekNumbersWithinDays")?(i.dayGrid.cellWeekNumbersVisible=!0,i.dayGrid.colWeekNumbersVisible=!1):(i.dayGrid.cellWeekNumbersVisible=!1,i.dayGrid.colWeekNumbersVisible=!0)),i.addChild(i.dayGrid),i.scroller=new a.default({overflowX:"hidden",overflowY:"auto"}),i}return r.__extends(e,t),e.prototype.instantiateDayGrid=function(){return new(i(this.dayGridClass))(this)},e.prototype.executeDateRender=function(e){this.dayGrid.breakOnWeeks=/year|month|week/.test(e.currentRangeUnit),t.prototype.executeDateRender.call(this,e)},e.prototype.renderSkeleton=function(){var t,e;this.el.addClass("fc-basic-view").html(this.renderSkeletonHtml()),this.scroller.render(),t=this.scroller.el.addClass("fc-day-grid-container"),e=o('
').appendTo(t),this.el.find(".fc-body > tr > td").append(t),this.dayGrid.headContainerEl=this.el.find(".fc-head-container"),this.dayGrid.setElement(e)},e.prototype.unrenderSkeleton=function(){this.dayGrid.removeElement(),this.scroller.destroy()},e.prototype.renderSkeletonHtml=function(){var t=this.calendar.theme;return''+(this.opt("columnHeader")?'':"")+'
 
'},e.prototype.weekNumberStyleAttr=function(){return null!=this.weekNumberWidth?'style="width:'+this.weekNumberWidth+'px"':""},e.prototype.hasRigidRows=function(){var t=this.opt("eventLimit");return t&&"number"!=typeof t},e.prototype.updateSize=function(e,n,i){var r,o,a=this.opt("eventLimit"),l=this.dayGrid.headContainerEl.find(".fc-row");if(!this.dayGrid.rowEls)return void(n||(r=this.computeScrollerHeight(e),this.scroller.setHeight(r)));t.prototype.updateSize.call(this,e,n,i),this.dayGrid.colWeekNumbersVisible&&(this.weekNumberWidth=s.matchCellWidths(this.el.find(".fc-week-number"))),this.scroller.clear(),s.uncompensateScroll(l),this.dayGrid.removeSegPopover(),a&&"number"==typeof a&&this.dayGrid.limitRows(a),r=this.computeScrollerHeight(e),this.setGridHeight(r,n),a&&"number"!=typeof a&&this.dayGrid.limitRows(a),n||(this.scroller.setHeight(r),o=this.scroller.getScrollbarWidths(),(o.left||o.right)&&(s.compensateScroll(l,o),r=this.computeScrollerHeight(e),this.scroller.setHeight(r)),this.scroller.lockOverflow(o))},e.prototype.computeScrollerHeight=function(t){return t-s.subtractInnerElHeight(this.el,this.scroller.el)},e.prototype.setGridHeight=function(t,e){e?s.undistributeHeight(this.dayGrid.rowEls):s.distributeHeight(this.dayGrid.rowEls,t,!0)},e.prototype.computeInitialDateScroll=function(){return{top:0}},e.prototype.queryDateScroll=function(){return{top:this.scroller.getScrollTop()}},e.prototype.applyDateScroll=function(t){void 0!==t.top&&this.scroller.setScrollTop(t.top)},e}(l.default);e.default=c,c.prototype.dateProfileGeneratorClass=u.default,c.prototype.dayGridClass=d.default},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){function i(t,e,n){var i;for(i=0;i=0;e--)switch(n=i[e],n.type){case"init":r=!1;case"add":case"remove":i.splice(e,1)}return r&&i.push(t),r},e}(r.default);e.default=o},function(t,e,n){function i(t){var e,n,i,r=[];for(e in t)for(n=t[e].eventInstances,i=0;i'+n+"
":""+n+""},e.prototype.getAllDayHtml=function(){return this.opt("allDayHtml")||a.htmlEscape(this.opt("allDayText"))},e.prototype.getDayClasses=function(t,e){var n,i=this._getView(),r=[] +;return this.dateProfile.activeUnzonedRange.containsDate(t)?(r.push("fc-"+a.dayIDs[t.day()]),i.isDateInOtherMonth(t,this.dateProfile)&&r.push("fc-other-month"),n=i.calendar.getNow(),t.isSame(n,"day")?(r.push("fc-today"),!0!==e&&r.push(i.calendar.theme.getClass("today"))):t=this.nextDayThreshold&&o.add(1,"days"),o<=n&&(o=n.clone().add(1,"days")),{start:n,end:o}},e.prototype.isMultiDayRange=function(t){var e=this.computeDayRange(t);return e.end.diff(e.start,"days")>1},e.guid=0,e}(d.default);e.default=p},function(t,e,n){function i(t,e){return null==e?t:r.isFunction(e)?t.filter(e):(e+="",t.filter(function(t){return t.id==e||t._id===e}))}Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),o=n(0),s=n(4),a=n(32),l=n(238),u=n(21),d=n(11),c=n(7),p=n(239),h=n(240),f=n(241),g=n(207),v=n(31),y=n(10),m=n(5),b=n(12),w=n(17),D=n(242),E=n(212),S=n(38),C=n(49),R=n(13),T=n(37),M=n(6),I=n(51),H=function(){function t(t,e){this.loadingLevel=0,this.ignoreUpdateViewSize=0,this.freezeContentHeightDepth=0,u.default.needed(),this.el=t,this.viewsByType={},this.optionsManager=new h.default(this,e),this.viewSpecManager=new f.default(this.optionsManager,this),this.initMomentInternals(),this.initCurrentDate(),this.initEventManager(),this.constraints=new g.default(this.eventManager,this),this.constructed()}return t.prototype.constructed=function(){},t.prototype.getView=function(){return this.view},t.prototype.publiclyTrigger=function(t,e){var n,i,o=this.opt(t);if(r.isPlainObject(e)?(n=e.context,i=e.args):r.isArray(e)&&(i=e),null==n&&(n=this.el[0]),i||(i=[]),this.triggerWith(t,n,i),o)return o.apply(n,i)},t.prototype.hasPublicHandlers=function(t){return this.hasHandlers(t)||this.opt(t)},t.prototype.option=function(t,e){var n;if("string"==typeof t){if(void 0===e)return this.optionsManager.get(t);n={},n[t]=e,this.optionsManager.add(n)}else"object"==typeof t&&this.optionsManager.add(t)},t.prototype.opt=function(t){return this.optionsManager.get(t)},t.prototype.instantiateView=function(t){var e=this.viewSpecManager.getViewSpec(t);if(!e)throw new Error('View type "'+t+'" is not valid');return new e.class(this,e)},t.prototype.isValidViewType=function(t){return Boolean(this.viewSpecManager.getViewSpec(t))},t.prototype.changeView=function(t,e){e&&(e.start&&e.end?this.optionsManager.recordOverrides({visibleRange:e}):this.currentDate=this.moment(e).stripZone()),this.renderView(t)},t.prototype.zoomTo=function(t,e){var n;e=e||"day",n=this.viewSpecManager.getViewSpec(e)||this.viewSpecManager.getUnitViewSpec(e),this.currentDate=t.clone(),this.renderView(n?n.type:null)},t.prototype.initCurrentDate=function(){var t=this.opt("defaultDate");this.currentDate=null!=t?this.moment(t).stripZone():this.getNow()},t.prototype.prev=function(){var t=this.view,e=t.dateProfileGenerator.buildPrev(t.get("dateProfile"));e.isValid&&(this.currentDate=e.date,this.renderView())},t.prototype.next=function(){var t=this.view,e=t.dateProfileGenerator.buildNext(t.get("dateProfile"));e.isValid&&(this.currentDate=e.date,this.renderView())},t.prototype.prevYear=function(){this.currentDate.add(-1,"years"),this.renderView()},t.prototype.nextYear=function(){this.currentDate.add(1,"years"),this.renderView()},t.prototype.today=function(){this.currentDate=this.getNow(),this.renderView()},t.prototype.gotoDate=function(t){this.currentDate=this.moment(t).stripZone(),this.renderView()},t.prototype.incrementDate=function(t){this.currentDate.add(o.duration(t)),this.renderView()},t.prototype.getDate=function(){return this.applyTimezone(this.currentDate)},t.prototype.pushLoading=function(){this.loadingLevel++||this.publiclyTrigger("loading",[!0,this.view])},t.prototype.popLoading=function(){--this.loadingLevel||this.publiclyTrigger("loading",[!1,this.view])},t.prototype.render=function(){this.contentEl?this.elementVisible()&&(this.calcSize(),this.updateViewSize()):this.initialRender()},t.prototype.initialRender=function(){var t=this,e=this.el;e.addClass("fc"),e.on("click.fc","a[data-goto]",function(e){var n=r(e.currentTarget),i=n.data("goto"),o=t.moment(i.date),a=i.type,l=t.view.opt("navLink"+s.capitaliseFirstLetter(a)+"Click");"function"==typeof l?l(o,e):("string"==typeof l&&(a=l),t.zoomTo(o,a))}),this.optionsManager.watch("settingTheme",["?theme","?themeSystem"],function(n){var i=I.getThemeSystemClass(n.themeSystem||n.theme),r=new i(t.optionsManager),o=r.getClass("widget");t.theme=r,o&&e.addClass(o)},function(){var n=t.theme.getClass("widget");t.theme=null,n&&e.removeClass(n)}),this.optionsManager.watch("settingBusinessHourGenerator",["?businessHours"],function(e){t.businessHourGenerator=new E.default(e.businessHours,t),t.view&&t.view.set("businessHourGenerator",t.businessHourGenerator)},function(){t.businessHourGenerator=null}),this.optionsManager.watch("applyingDirClasses",["?isRTL","?locale"],function(t){e.toggleClass("fc-ltr",!t.isRTL),e.toggleClass("fc-rtl",t.isRTL)}),this.contentEl=r("
").prependTo(e),this.initToolbars(),this.renderHeader(),this.renderFooter(),this.renderView(this.opt("defaultView")),this.opt("handleWindowResize")&&r(window).resize(this.windowResizeProxy=s.debounce(this.windowResize.bind(this),this.opt("windowResizeDelay")))},t.prototype.destroy=function(){this.view&&this.clearView(),this.toolbarsManager.proxyCall("removeElement"),this.contentEl.remove(),this.el.removeClass("fc fc-ltr fc-rtl"),this.optionsManager.unwatch("settingTheme"),this.optionsManager.unwatch("settingBusinessHourGenerator"),this.el.off(".fc"),this.windowResizeProxy&&(r(window).unbind("resize",this.windowResizeProxy),this.windowResizeProxy=null),u.default.unneeded()},t.prototype.elementVisible=function(){return this.el.is(":visible")},t.prototype.bindViewHandlers=function(t){var e=this;t.watch("titleForCalendar",["title"],function(n){t===e.view&&e.setToolbarsTitle(n.title)}),t.watch("dateProfileForCalendar",["dateProfile"],function(n){t===e.view&&(e.currentDate=n.dateProfile.date,e.updateToolbarButtons(n.dateProfile))})},t.prototype.unbindViewHandlers=function(t){t.unwatch("titleForCalendar"),t.unwatch("dateProfileForCalendar")},t.prototype.renderView=function(t){var e,n=this.view;this.freezeContentHeight(),n&&t&&n.type!==t&&this.clearView(),!this.view&&t&&(e=this.view=this.viewsByType[t]||(this.viewsByType[t]=this.instantiateView(t)),this.bindViewHandlers(e),e.startBatchRender(),e.setElement(r("
").appendTo(this.contentEl)),this.toolbarsManager.proxyCall("activateButton",t)),this.view&&(this.view.get("businessHourGenerator")!==this.businessHourGenerator&&this.view.set("businessHourGenerator",this.businessHourGenerator),this.view.setDate(this.currentDate),e&&e.stopBatchRender()),this.thawContentHeight()},t.prototype.clearView=function(){var t=this.view;this.toolbarsManager.proxyCall("deactivateButton",t.type),this.unbindViewHandlers(t),t.removeElement(),t.unsetDate(),this.view=null},t.prototype.reinitView=function(){var t=this.view,e=t.queryScroll();this.freezeContentHeight(),this.clearView(),this.calcSize(),this.renderView(t.type),this.view.applyScroll(e),this.thawContentHeight()},t.prototype.getSuggestedViewHeight=function(){return null==this.suggestedViewHeight&&this.calcSize(),this.suggestedViewHeight},t.prototype.isHeightAuto=function(){return"auto"===this.opt("contentHeight")||"auto"===this.opt("height")},t.prototype.updateViewSize=function(t){void 0===t&&(t=!1);var e,n=this.view;if(!this.ignoreUpdateViewSize&&n)return t&&(this.calcSize(),e=n.queryScroll()),this.ignoreUpdateViewSize++,n.updateSize(this.getSuggestedViewHeight(),this.isHeightAuto(),t),this.ignoreUpdateViewSize--,t&&n.applyScroll(e),!0},t.prototype.calcSize=function(){this.elementVisible()&&this._calcSize()},t.prototype._calcSize=function(){var t=this.opt("contentHeight"),e=this.opt("height");this.suggestedViewHeight="number"==typeof t?t:"function"==typeof t?t():"number"==typeof e?e-this.queryToolbarsHeight():"function"==typeof e?e()-this.queryToolbarsHeight():"parent"===e?this.el.parent().height()-this.queryToolbarsHeight():Math.round(this.contentEl.width()/Math.max(this.opt("aspectRatio"),.5))},t.prototype.windowResize=function(t){t.target===window&&this.view&&this.view.isDatesRendered&&this.updateViewSize(!0)&&this.publiclyTrigger("windowResize",[this.view])},t.prototype.freezeContentHeight=function(){this.freezeContentHeightDepth++||this.forceFreezeContentHeight()},t.prototype.forceFreezeContentHeight=function(){this.contentEl.css({width:"100%",height:this.contentEl.height(),overflow:"hidden"})},t.prototype.thawContentHeight=function(){this.freezeContentHeightDepth--,this.contentEl.css({width:"",height:"",overflow:""}),this.freezeContentHeightDepth&&this.forceFreezeContentHeight()},t.prototype.initToolbars=function(){this.header=new p.default(this,this.computeHeaderOptions()),this.footer=new p.default(this,this.computeFooterOptions()),this.toolbarsManager=new l.default([this.header,this.footer])},t.prototype.computeHeaderOptions=function(){return{extraClasses:"fc-header-toolbar",layout:this.opt("header")}},t.prototype.computeFooterOptions=function(){return{extraClasses:"fc-footer-toolbar",layout:this.opt("footer")}},t.prototype.renderHeader=function(){var t=this.header;t.setToolbarOptions(this.computeHeaderOptions()),t.render(),t.el&&this.el.prepend(t.el)},t.prototype.renderFooter=function(){var t=this.footer;t.setToolbarOptions(this.computeFooterOptions()),t.render(),t.el&&this.el.append(t.el)},t.prototype.setToolbarsTitle=function(t){this.toolbarsManager.proxyCall("updateTitle",t)},t.prototype.updateToolbarButtons=function(t){var e=this.getNow(),n=this.view,i=n.dateProfileGenerator.build(e),r=n.dateProfileGenerator.buildPrev(n.get("dateProfile")),o=n.dateProfileGenerator.buildNext(n.get("dateProfile"));this.toolbarsManager.proxyCall(i.isValid&&!t.currentUnzonedRange.containsDate(e)?"enableButton":"disableButton","today"),this.toolbarsManager.proxyCall(r.isValid?"enableButton":"disableButton","prev"),this.toolbarsManager.proxyCall(o.isValid?"enableButton":"disableButton","next")},t.prototype.queryToolbarsHeight=function(){return this.toolbarsManager.items.reduce(function(t,e){return t+(e.el?e.el.outerHeight(!0):0)},0)},t.prototype.select=function(t,e){this.view.select(this.buildSelectFootprint.apply(this,arguments))},t.prototype.unselect=function(){this.view&&this.view.unselect()},t.prototype.buildSelectFootprint=function(t,e){var n,i=this.moment(t).stripZone();return n=e?this.moment(e).stripZone():i.hasTime()?i.clone().add(this.defaultTimedEventDuration):i.clone().add(this.defaultAllDayEventDuration),new b.default(new m.default(i,n),!i.hasTime())},t.prototype.initMomentInternals=function(){var t=this;this.defaultAllDayEventDuration=o.duration(this.opt("defaultAllDayEventDuration")),this.defaultTimedEventDuration=o.duration(this.opt("defaultTimedEventDuration")),this.optionsManager.watch("buildingMomentLocale",["?locale","?monthNames","?monthNamesShort","?dayNames","?dayNamesShort","?firstDay","?weekNumberCalculation"],function(e){var n,i=e.weekNumberCalculation,r=e.firstDay;"iso"===i&&(i="ISO");var o=Object.create(v.getMomentLocaleData(e.locale));e.monthNames&&(o._months=e.monthNames),e.monthNamesShort&&(o._monthsShort=e.monthNamesShort),e.dayNames&&(o._weekdays=e.dayNames),e.dayNamesShort&&(o._weekdaysShort=e.dayNamesShort),null==r&&"ISO"===i&&(r=1),null!=r&&(n=Object.create(o._week),n.dow=r,o._week=n),"ISO"!==i&&"local"!==i&&"function"!=typeof i||(o._fullCalendar_weekCalc=i),t.localeData=o,t.currentDate&&t.localizeMoment(t.currentDate)})},t.prototype.moment=function(){for(var t=[],e=0;e864e5&&r.time(n-864e5)),new o.default(i,r)},t.prototype.buildRangeFromDuration=function(t,e,n,s){function a(){d=t.clone().startOf(h),c=d.clone().add(n),p=new o.default(d,c)}var l,u,d,c,p,h=this.opt("dateAlignment");return h||(l=this.opt("dateIncrement"),l?(u=i.duration(l),h=uo.getStart()&&(i=new a.default,i.setEndDelta(l),r=new s.default,r.setDateMutation(i),r)},e}(u.default);e.default=d},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),r=n(4),o=n(37),s=n(50),a=n(54),l=n(23),u=n(244),d=n(15),c=function(t){function e(e,n){var i=t.call(this,e)||this;return i.isDragging=!1,i.eventPointing=n,i}return i.__extends(e,t),e.prototype.end=function(){this.dragListener&&this.dragListener.endInteraction()},e.prototype.getSelectionDelay=function(){var t=this.opt("eventLongPressDelay");return null==t&&(t=this.opt("longPressDelay")),t},e.prototype.bindToEl=function(t){var e=this.component;e.bindSegHandlerToEl(t,"mousedown",this.handleMousedown.bind(this)),e.bindSegHandlerToEl(t,"touchstart",this.handleTouchStart.bind(this))},e.prototype.handleMousedown=function(t,e){!this.component.shouldIgnoreMouse()&&this.component.canStartDrag(t,e)&&this.buildDragListener(t).startInteraction(e,{distance:5})},e.prototype.handleTouchStart=function(t,e){var n=this.component,i={delay:this.view.isEventDefSelected(t.footprint.eventDef)?0:this.getSelectionDelay()};n.canStartDrag(t,e)?this.buildDragListener(t).startInteraction(e,i):n.canStartSelection(t,e)&&this.buildSelectListener(t).startInteraction(e,i)},e.prototype.buildSelectListener=function(t){var e=this,n=this.view,i=t.footprint.eventDef,r=t.footprint.eventInstance;if(this.dragListener)return this.dragListener;var o=this.dragListener=new a.default({dragStart:function(t){o.isTouch&&!n.isEventDefSelected(i)&&r&&n.selectEventInstance(r)},interactionEnd:function(t){e.dragListener=null}});return o},e.prototype.buildDragListener=function(t){var e,n,i,o=this,s=this.component,a=this.view,d=a.calendar,c=d.eventManager,p=t.el,h=t.footprint.eventDef,f=t.footprint.eventInstance;if(this.dragListener)return this.dragListener;var g=this.dragListener=new l.default(a,{scroll:this.opt("dragScroll"),subjectEl:p,subjectCenter:!0,interactionStart:function(i){t.component=s,e=!1,n=new u.default(t.el,{additionalClass:"fc-dragging",parentEl:a.el,opacity:g.isTouch?null:o.opt("dragOpacity"),revertDuration:o.opt("dragRevertDuration"),zIndex:2}),n.hide(),n.start(i)},dragStart:function(n){g.isTouch&&!a.isEventDefSelected(h)&&f&&a.selectEventInstance(f),e=!0,o.eventPointing.handleMouseout(t,n),o.segDragStart(t,n),a.hideEventsWithId(t.footprint.eventDef.id)},hitOver:function(e,l,u){var p,f,v,y=!0;t.hit&&(u=t.hit),p=u.component.getSafeHitFootprint(u),f=e.component.getSafeHitFootprint(e),p&&f?(i=o.computeEventDropMutation(p,f,h),i?(v=c.buildMutatedEventInstanceGroup(h.id,i),y=s.isEventInstanceGroupAllowed(v)):y=!1):y=!1,y||(i=null,r.disableCursor()),i&&a.renderDrag(s.eventRangesToEventFootprints(v.sliceRenderRanges(s.dateProfile.renderUnzonedRange,d)),t,g.isTouch)?n.hide():n.show(),l&&(i=null)},hitOut:function(){a.unrenderDrag(t),n.show(),i=null},hitDone:function(){r.enableCursor()},interactionEnd:function(r){delete t.component,n.stop(!i,function(){e&&(a.unrenderDrag(t),o.segDragStop(t,r)),a.showEventsWithId(t.footprint.eventDef.id),i&&a.reportEventDrop(f,i,p,r)}),o.dragListener=null}});return g},e.prototype.segDragStart=function(t,e){this.isDragging=!0,this.component.publiclyTrigger("eventDragStart",{context:t.el[0],args:[t.footprint.getEventLegacy(),e,{},this.view]})},e.prototype.segDragStop=function(t,e){this.isDragging=!1,this.component.publiclyTrigger("eventDragStop",{context:t.el[0],args:[t.footprint.getEventLegacy(),e,{},this.view]})},e.prototype.computeEventDropMutation=function(t,e,n){var i=new o.default;return i.setDateMutation(this.computeEventDateMutation(t,e)),i},e.prototype.computeEventDateMutation=function(t,e){var n,i,r=t.unzonedRange.getStart(),o=e.unzonedRange.getStart(),a=!1,l=!1,u=!1;return t.isAllDay!==e.isAllDay&&(a=!0,e.isAllDay?(u=!0,r.stripTime()):l=!0),n=this.component.diffDates(o,r),i=new s.default,i.clearEnd=a,i.forceTimed=l,i.forceAllDay=u,i.setDateDelta(n),i},e}(d.default);e.default=c},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),r=n(4),o=n(23),s=n(12),a=n(5),l=n(15),u=function(t){function e(e){var n=t.call(this,e)||this;return n.dragListener=n.buildDragListener(),n}return i.__extends(e,t),e.prototype.end=function(){this.dragListener.endInteraction()},e.prototype.getDelay=function(){var t=this.opt("selectLongPressDelay");return null==t&&(t=this.opt("longPressDelay")),t},e.prototype.bindToEl=function(t){var e=this,n=this.component,i=this.dragListener;n.bindDateHandlerToEl(t,"mousedown",function(t){e.opt("selectable")&&!n.shouldIgnoreMouse()&&i.startInteraction(t,{distance:e.opt("selectMinDistance")})}),n.bindDateHandlerToEl(t,"touchstart",function(t){e.opt("selectable")&&!n.shouldIgnoreTouch()&&i.startInteraction(t,{delay:e.getDelay()})}),r.preventSelection(t)},e.prototype.buildDragListener=function(){var t,e=this,n=this.component;return new o.default(n,{scroll:this.opt("dragScroll"),interactionStart:function(){t=null},dragStart:function(t){e.view.unselect(t)},hitOver:function(i,o,s){var a,l;s&&(a=n.getSafeHitFootprint(s),l=n.getSafeHitFootprint(i),t=a&&l?e.computeSelection(a,l):null,t?n.renderSelectionFootprint(t):!1===t&&r.disableCursor())},hitOut:function(){t=null,n.unrenderSelection()},hitDone:function(){r.enableCursor()},interactionEnd:function(n,i){!i&&t&&e.view.reportSelection(t,n)}})},e.prototype.computeSelection=function(t,e){var n=this.computeSelectionFootprint(t,e);return!(n&&!this.isSelectionFootprintAllowed(n))&&n},e.prototype.computeSelectionFootprint=function(t,e){var n=[t.unzonedRange.startMs,t.unzonedRange.endMs,e.unzonedRange.startMs,e.unzonedRange.endMs];return n.sort(r.compareNumbers),new s.default(new a.default(n[0],n[3]),t.isAllDay)},e.prototype.isSelectionFootprintAllowed=function(t){return this.component.dateProfile.validUnzonedRange.containsRange(t.unzonedRange)&&this.view.calendar.constraints.isSelectionFootprintAllowed(t)},e}(l.default);e.default=u},function(t,e,n){function i(t){var e,n=[],i=[];for(e=0;e').appendTo(t),this.el.find(".fc-body > tr > td").append(t),this.timeGrid.headContainerEl=this.el.find(".fc-head-container"),this.timeGrid.setElement(e),this.dayGrid&&(this.dayGrid.setElement(this.el.find(".fc-day-grid")),this.dayGrid.bottomCoordPadding=this.dayGrid.el.next("hr").outerHeight())},e.prototype.unrenderSkeleton=function(){this.timeGrid.removeElement(),this.dayGrid&&this.dayGrid.removeElement(),this.scroller.destroy()},e.prototype.renderSkeletonHtml=function(){var t=this.calendar.theme;return''+(this.opt("columnHeader")?'':"")+'
 
'+(this.dayGrid?'

':"")+"
"},e.prototype.axisStyleAttr=function(){return null!=this.axisWidth?'style="width:'+this.axisWidth+'px"':""},e.prototype.getNowIndicatorUnit=function(){return this.timeGrid.getNowIndicatorUnit()},e.prototype.updateSize=function(e,n,i){var r,o,s;if(t.prototype.updateSize.call(this,e,n,i),this.axisWidth=u.matchCellWidths(this.el.find(".fc-axis")),!this.timeGrid.colEls)return void(n||(o=this.computeScrollerHeight(e),this.scroller.setHeight(o)));var a=this.el.find(".fc-row:not(.fc-scroller *)");this.timeGrid.bottomRuleEl.hide(),this.scroller.clear(),u.uncompensateScroll(a),this.dayGrid&&(this.dayGrid.removeSegPopover(),r=this.opt("eventLimit"),r&&"number"!=typeof r&&(r=5),r&&this.dayGrid.limitRows(r)),n||(o=this.computeScrollerHeight(e),this.scroller.setHeight(o),s=this.scroller.getScrollbarWidths(),(s.left||s.right)&&(u.compensateScroll(a,s),o=this.computeScrollerHeight(e),this.scroller.setHeight(o)),this.scroller.lockOverflow(s),this.timeGrid.getTotalSlatHeight()"+e.buildGotoAnchorHtml({date:i,type:"week",forceOff:this.colCnt>1},u.htmlEscape(t))+""):'"},renderBgIntroHtml:function(){var t=this.view;return'"},renderIntroHtml:function(){return'"}},o={renderBgIntroHtml:function(){var t=this.view;return'"+t.getAllDayHtml()+""},renderIntroHtml:function(){return'"}}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(0),s=n(4),a=n(40),l=n(56),u=n(60),d=n(55),c=n(53),p=n(5),h=n(12),f=n(246),g=n(247),v=n(248),y=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}],m=function(t){function e(e){var n=t.call(this,e)||this;return n.processOptions(),n}return i.__extends(e,t),e.prototype.componentFootprintToSegs=function(t){var e,n=this.sliceRangeByTimes(t.unzonedRange);for(e=0;e=0;e--)if(n=o.duration(y[e]),i=s.divideDurationByDuration(n,t),s.isInt(i)&&i>1)return n;return o.duration(t)},e.prototype.renderDates=function(t){this.dateProfile=t,this.updateDayTable(),this.renderSlats(),this.renderColumns()},e.prototype.unrenderDates=function(){this.unrenderColumns()},e.prototype.renderSkeleton=function(){var t=this.view.calendar.theme;this.el.html('

'),this.bottomRuleEl=this.el.find("hr")},e.prototype.renderSlats=function(){var t=this.view.calendar.theme;this.slatContainerEl=this.el.find("> .fc-slats").html(''+this.renderSlatRowHtml()+"
"),this.slatEls=this.slatContainerEl.find("tr"),this.slatCoordCache=new c.default({els:this.slatEls,isVertical:!0})},e.prototype.renderSlatRowHtml=function(){for(var t,e,n,i=this.view,r=i.calendar,a=r.theme,l=this.isRTL,u=this.dateProfile,d="",c=o.duration(+u.minTime),p=o.duration(0);c"+(e?""+s.htmlEscape(t.format(this.labelFormat))+"":"")+"",d+='"+(l?"":n)+''+(l?n:"")+"",c.add(this.slotDuration),p.add(this.slotDuration);return d},e.prototype.renderColumns=function(){var t=this.dateProfile,e=this.view.calendar.theme;this.dayRanges=this.dayDates.map(function(e){return new p.default(e.clone().add(t.minTime),e.clone().add(t.maxTime))}),this.headContainerEl&&this.headContainerEl.html(this.renderHeadHtml()),this.el.find("> .fc-bg").html(''+this.renderBgTrHtml(0)+"
"),this.colEls=this.el.find(".fc-day, .fc-disabled-day"),this.colCoordCache=new c.default({els:this.colEls,isHorizontal:!0}),this.renderContentSkeleton()},e.prototype.unrenderColumns=function(){this.unrenderContentSkeleton()},e.prototype.renderContentSkeleton=function(){var t,e,n="";for(t=0;t
';e=this.contentSkeletonEl=r('
'+n+"
"),this.colContainerEls=e.find(".fc-content-col"),this.helperContainerEls=e.find(".fc-helper-container"),this.fgContainerEls=e.find(".fc-event-container:not(.fc-helper-container)"),this.bgContainerEls=e.find(".fc-bgevent-container"),this.highlightContainerEls=e.find(".fc-highlight-container"),this.businessContainerEls=e.find(".fc-business-container"),this.bookendCells(e.find("tr")),this.el.append(e)},e.prototype.unrenderContentSkeleton=function(){this.contentSkeletonEl&&(this.contentSkeletonEl.remove(),this.contentSkeletonEl=null,this.colContainerEls=null,this.helperContainerEls=null,this.fgContainerEls=null,this.bgContainerEls=null,this.highlightContainerEls=null,this.businessContainerEls=null)},e.prototype.groupSegsByCol=function(t){var e,n=[];for(e=0;e
').css("top",i).appendTo(this.colContainerEls.eq(n[e].col))[0]);n.length>0&&o.push(r('
').css("top",i).appendTo(this.el.find(".fc-content-skeleton"))[0]),this.nowIndicatorEls=r(o)}},e.prototype.unrenderNowIndicator=function(){this.nowIndicatorEls&&(this.nowIndicatorEls.remove(),this.nowIndicatorEls=null)},e.prototype.updateSize=function(e,n,i){t.prototype.updateSize.call(this,e,n,i),this.slatCoordCache.build(),i&&this.updateSegVerticals([].concat(this.eventRenderer.getSegs(),this.businessSegs||[]))},e.prototype.getTotalSlatHeight=function(){return this.slatContainerEl.outerHeight()},e.prototype.computeDateTop=function(t,e){return this.computeTimeTop(o.duration(t-e.clone().stripTime()))},e.prototype.computeTimeTop=function(t){var e,n,i=this.slatEls.length,r=this.dateProfile,o=(t-r.minTime)/this.slotDuration;return o=Math.max(0,o),o=Math.min(i,o),e=Math.floor(o),e=Math.min(e,i-1),n=o-e,this.slatCoordCache.getTopPosition(e)+this.slatCoordCache.getHeight(e)*n},e.prototype.updateSegVerticals=function(t){this.computeSegVerticals(t),this.assignSegVerticals(t)},e.prototype.computeSegVerticals=function(t){var e,n,i,r=this.opt("agendaEventMinHeight");for(e=0;e
'+o.htmlEscape(this.opt("noEventsMessage"))+"
")},e.prototype.renderSegList=function(t){var e,n,i,o=this.groupSegsByDay(t),s=r('
'),a=s.find("tbody");for(e=0;e'+(e?this.buildGotoAnchorHtml(t,{class:"fc-list-heading-main"},o.htmlEscape(t.format(e))):"")+(n?this.buildGotoAnchorHtml(t,{class:"fc-list-heading-alt"},o.htmlEscape(t.format(n))):"")+""},e}(a.default);e.default=c,c.prototype.eventRendererClass=u.default,c.prototype.eventPointingClass=d.default},,,,,,function(t,e,n){var i=n(3),r=n(16),o=n(4),s=n(220);n(10),n(47),n(256),n(257),n(260),n(261),n(262),n(263),i.fullCalendar=r,i.fn.fullCalendar=function(t){var e=Array.prototype.slice.call(arguments,1),n=this;return this.each(function(r,a){var l,u=i(a),d=u.data("fullCalendar");"string"==typeof t?"getCalendar"===t?r||(n=d):"destroy"===t?d&&(d.destroy(),u.removeData("fullCalendar")):d?i.isFunction(d[t])?(l=d[t].apply(d,e),r||(n=l),"destroy"===t&&u.removeData("fullCalendar")):o.warn("'"+t+"' is an unknown FullCalendar method."):o.warn("Attempting to call a FullCalendar method on an element with no calendar."):d||(d=new s.default(u,t),u.data("fullCalendar",d),d.render())}),n},t.exports=r},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),r=n(48),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.setElement=function(t){this.el=t,this.bindGlobalHandlers(),this.renderSkeleton(),this.set("isInDom",!0)},e.prototype.removeElement=function(){this.unset("isInDom"),this.unrenderSkeleton(),this.unbindGlobalHandlers(),this.el.remove()},e.prototype.bindGlobalHandlers=function(){},e.prototype.unbindGlobalHandlers=function(){},e.prototype.renderSkeleton=function(){},e.prototype.unrenderSkeleton=function(){},e}(r.default);e.default=o},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.items=t||[]}return t.prototype.proxyCall=function(t){for(var e=[],n=1;n"),e.append(this.renderSection("left")).append(this.renderSection("right")).append(this.renderSection("center")).append('
')):this.removeElement()},t.prototype.removeElement=function(){this.el&&(this.el.remove(),this.el=null)},t.prototype.renderSection=function(t){var e=this,n=this.calendar,o=n.theme,s=n.optionsManager,a=n.viewSpecManager,l=i('
'),u=this.toolbarOptions.layout[t],d=s.get("customButtons")||{},c=s.overrides.buttonText||{},p=s.get("buttonText")||{};return u&&i.each(u.split(" "),function(t,s){var u,h=i(),f=!0;i.each(s.split(","),function(t,s){var l,u,g,v,y,m,b,w,D;"title"===s?(h=h.add(i("

 

")),f=!1):((l=d[s])?(g=function(t){l.click&&l.click.call(w[0],t)},(v=o.getCustomButtonIconClass(l))||(v=o.getIconClass(s))||(y=l.text)):(u=a.getViewSpec(s))?(e.viewsWithButtons.push(s),g=function(){n.changeView(s)},(y=u.buttonTextOverride)||(v=o.getIconClass(s))||(y=u.buttonTextDefault)):n[s]&&(g=function(){n[s]()},(y=c[s])||(v=o.getIconClass(s))||(y=p[s])),g&&(b=["fc-"+s+"-button",o.getClass("button"),o.getClass("stateDefault")],y?(m=r.htmlEscape(y),D=""):v&&(m="",D=' aria-label="'+s+'"'),w=i('").click(function(t){w.hasClass(o.getClass("stateDisabled"))||(g(t),(w.hasClass(o.getClass("stateActive"))||w.hasClass(o.getClass("stateDisabled")))&&w.removeClass(o.getClass("stateHover")))}).mousedown(function(){w.not("."+o.getClass("stateActive")).not("."+o.getClass("stateDisabled")).addClass(o.getClass("stateDown"))}).mouseup(function(){w.removeClass(o.getClass("stateDown"))}).hover(function(){w.not("."+o.getClass("stateActive")).not("."+o.getClass("stateDisabled")).addClass(o.getClass("stateHover"))},function(){w.removeClass(o.getClass("stateHover")).removeClass(o.getClass("stateDown"))}),h=h.add(w)))}),f&&h.first().addClass(o.getClass("cornerLeft")).end().last().addClass(o.getClass("cornerRight")).end(),h.length>1?(u=i("
"),f&&u.addClass(o.getClass("buttonGroup")),u.append(h),l.append(u)):l.append(h)}),l},t.prototype.updateTitle=function(t){this.el&&this.el.find("h2").text(t)},t.prototype.activateButton=function(t){this.el&&this.el.find(".fc-"+t+"-button").addClass(this.calendar.theme.getClass("stateActive"))},t.prototype.deactivateButton=function(t){this.el&&this.el.find(".fc-"+t+"-button").removeClass(this.calendar.theme.getClass("stateActive"))},t.prototype.disableButton=function(t){this.el&&this.el.find(".fc-"+t+"-button").prop("disabled",!0).addClass(this.calendar.theme.getClass("stateDisabled"))},t.prototype.enableButton=function(t){this.el&&this.el.find(".fc-"+t+"-button").prop("disabled",!1).removeClass(this.calendar.theme.getClass("stateDisabled"))},t.prototype.getViewsWithButtons=function(){return this.viewsWithButtons},t}();e.default=o},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(4),s=n(32),a=n(31),l=n(48),u=function(t){function e(e,n){var i=t.call(this)||this;return i._calendar=e,i.overrides=r.extend({},n),i.dynamicOverrides={},i.compute(),i}return i.__extends(e,t),e.prototype.add=function(t){var e,n=0;this.recordOverrides(t);for(e in t)n++;if(1===n){if("height"===e||"contentHeight"===e||"aspectRatio"===e)return void this._calendar.updateViewSize(!0);if("defaultDate"===e)return;if("businessHours"===e)return;if(/^(event|select)(Overlap|Constraint|Allow)$/.test(e))return;if("timezone"===e)return void this._calendar.view.flash("initialEvents")}this._calendar.renderHeader(),this._calendar.renderFooter(),this._calendar.viewsByType={},this._calendar.reinitView()},e.prototype.compute=function(){var t,e,n,i,r;t=o.firstDefined(this.dynamicOverrides.locale,this.overrides.locale),e=a.localeOptionHash[t],e||(t=s.globalDefaults.locale,e=a.localeOptionHash[t]||{}),n=o.firstDefined(this.dynamicOverrides.isRTL,this.overrides.isRTL,e.isRTL,s.globalDefaults.isRTL),i=n?s.rtlDefaults:{},this.dirDefaults=i,this.localeDefaults=e,r=s.mergeOptions([s.globalDefaults,i,e,this.overrides,this.dynamicOverrides]),a.populateInstanceComputableOptions(r),this.reset(r)},e.prototype.recordOverrides=function(t){var e;for(e in t)this.dynamicOverrides[e]=t[e];this._calendar.viewSpecManager.clearCache(),this.compute()},e}(l.default);e.default=u},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(3),o=n(22),s=n(4),a=n(32),l=n(31),u=function(){function t(t,e){this.optionsManager=t,this._calendar=e,this.clearCache()}return t.prototype.clearCache=function(){this.viewSpecCache={}},t.prototype.getViewSpec=function(t){var e=this.viewSpecCache;return e[t]||(e[t]=this.buildViewSpec(t))},t.prototype.getUnitViewSpec=function(t){var e,n,i;if(-1!==r.inArray(t,s.unitsDesc))for(e=this._calendar.header.getViewsWithButtons(),r.each(o.viewHash,function(t){e.push(t)}),n=0;ne.top&&t.top
'+(n?'
'+u.htmlEscape(n)+"
":"")+(d.title?'
'+u.htmlEscape(d.title)+"
":"")+'
'+(h?'
':"")+""},e.prototype.updateFgSegCoords=function(t){this.timeGrid.computeSegVerticals(t),this.computeFgSegHorizontals(t),this.timeGrid.assignSegVerticals(t),this.assignFgSegHorizontals(t)},e.prototype.computeFgSegHorizontals=function(t){var e,n,s;if(this.sortEventSegs(t),e=i(t),r(e),n=e[0]){for(s=0;s').addClass(e.className||"").css({top:0,left:0}).append(e.content).appendTo(e.parentEl),this.el.on("click",".fc-close",function(){t.hide()}),e.autoHide&&this.listenTo(i(document),"mousedown",this.documentMousedown)},t.prototype.documentMousedown=function(t){this.el&&!i(t.target).closest(this.el).length&&this.hide()},t.prototype.removeElement=function(){this.hide(),this.el&&(this.el.remove(),this.el=null),this.stopListeningTo(i(document),"mousedown")},t.prototype.position=function(){var t,e,n,o,s,a=this.options,l=this.el.offsetParent().offset(),u=this.el.outerWidth(),d=this.el.outerHeight(),c=i(window),p=r.getScrollParent(this.el);o=a.top||0,s=void 0!==a.left?a.left:void 0!==a.right?a.right-u:0,p.is(window)||p.is(document)?(p=c,t=0,e=0):(n=p.offset(),t=n.top,e=n.left),t+=c.scrollTop(),e+=c.scrollLeft(),!1!==a.viewportConstrain&&(o=Math.min(o,t+p.outerHeight()-d-this.margin),o=Math.max(o,t+this.margin),s=Math.min(s,e+p.outerWidth()-u-this.margin),s=Math.max(s,e+this.margin)),this.el.css({top:o-l.top,left:s-l.left})},t.prototype.trigger=function(t){this.options[t]&&this.options[t].apply(this,Array.prototype.slice.call(arguments,1))},t}();e.default=s,o.default.mixInto(s)},function(t,e,n){function i(t,e){var n,i;for(n=0;n=t.leftCol)return!0;return!1}function r(t,e){return t.leftCol-e.leftCol}Object.defineProperty(e,"__esModule",{value:!0});var o=n(2),s=n(3),a=n(4),l=n(42),u=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.dayGrid=e,i}return o.__extends(e,t),e.prototype.renderBgRanges=function(e){e=s.grep(e,function(t){return t.eventDef.isAllDay()}),t.prototype.renderBgRanges.call(this,e)},e.prototype.renderFgSegs=function(t){var e=this.rowStructs=this.renderSegRows(t);this.dayGrid.rowEls.each(function(t,n){s(n).find(".fc-content-skeleton > table").append(e[t].tbodyEl)})},e.prototype.unrenderFgSegs=function(){for(var t,e=this.rowStructs||[];t=e.pop();)t.tbodyEl.remove();this.rowStructs=null},e.prototype.renderSegRows=function(t){var e,n,i=[];for(e=this.groupSegRows(t),n=0;n"),a.append(d)),v[i][o]=d,y[i][o]=d,o++}var i,r,o,a,l,u,d,c=this.dayGrid.colCnt,p=this.buildSegLevels(e),h=Math.max(1,p.length),f=s(""),g=[],v=[],y=[];for(i=0;i"),g.push([]),v.push([]),y.push([]),r)for(l=0;l').append(u.el),u.leftCol!==u.rightCol?d.attr("colspan",u.rightCol-u.leftCol+1):y[i][o]=d;o<=u.rightCol;)v[i][o]=d,g[i][o]=u,o++;a.append(d)}n(c),this.dayGrid.bookendCells(a),f.append(a)}return{row:t,tbodyEl:f,cellMatrix:v,segMatrix:g,segLevels:p,segs:e}},e.prototype.buildSegLevels=function(t){var e,n,o,s=[];for(this.sortEventSegs(t),e=0;e'+a.htmlEscape(n)+""),i=''+(a.htmlEscape(o.title||"")||" ")+"",'
'+(this.dayGrid.isRTL?i+" "+h:h+" "+i)+"
"+(u?'
':"")+(d?'
':"")+""},e}(l.default);e.default=u},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(58),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.renderSegs=function(t,e){var n,i=[];return n=this.eventRenderer.renderSegRows(t),this.component.rowEls.each(function(t,o){var s,a,l=r(o),u=r('
');e&&e.row===t?a=e.el.position().top:(s=l.find(".fc-content-skeleton tbody"),s.length||(s=l.find(".fc-content-skeleton table")),a=s.position().top),u.css("top",a).find("table").append(n[t].tbodyEl),l.append(u),i.push(u[0])}),r(i)},e}(o.default);e.default=s},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(57),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.fillSegTag="td",e}return i.__extends(e,t),e.prototype.attachSegEls=function(t,e){var n,i,r,o=[];for(n=0;n
'),o=i.find("tr"),a>0&&o.append(''),o.append(e.el.attr("colspan",l-a)),l'),this.component.bookendCells(o),i},e}(o.default);e.default=s},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),r=n(228),o=n(5),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.buildRenderRange=function(e,n,i){var r,s=t.prototype.buildRenderRange.call(this,e,n,i),a=this.msToUtcMoment(s.startMs,i),l=this.msToUtcMoment(s.endMs,i);return this.opt("fixedWeekCount")&&(r=Math.ceil(l.diff(a,"weeks",!0)),l.add(6-r,"weeks")),new o.default(a,l)},e}(r.default);e.default=s},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),r=n(4),o=n(42),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.renderFgSegs=function(t){t.length?this.component.renderSegList(t):this.component.renderEmptyMessage()},e.prototype.fgSegHtml=function(t){var e,n=this.view,i=n.calendar,o=i.theme,s=t.footprint,a=s.eventDef,l=s.componentFootprint,u=a.url,d=["fc-list-item"].concat(this.getClasses(a)),c=this.getBgColor(a);return e=l.isAllDay?n.getAllDayHtml():n.isMultiDayRange(l.unzonedRange)?t.isStart||t.isEnd?r.htmlEscape(this._getTimeText(i.msToMoment(t.startMs),i.msToMoment(t.endMs),l.isAllDay)):n.getAllDayHtml():r.htmlEscape(this.getTimeText(s)),u&&d.push("fc-has-url"),''+(this.displayEventTime?''+(e||"")+"":"")+'"+r.htmlEscape(a.title||"")+""},e.prototype.computeEventTimeFormat=function(){return this.opt("mediumTimeFormat")},e}(o.default);e.default=s},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),r=n(3),o=n(59),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.handleClick=function(e,n){var i;t.prototype.handleClick.call(this,e,n),r(n.target).closest("a[href]").length||(i=e.footprint.eventDef.url)&&!n.isDefaultPrevented()&&(window.location.href=i)},e}(o.default);e.default=s},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=n(38),r=n(52),o=n(215),s=n(216);i.default.registerClass(r.default),i.default.registerClass(o.default),i.default.registerClass(s.default)},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=n(51),r=n(213),o=n(214),s=n(258),a=n(259);i.defineThemeSystem("standard",r.default),i.defineThemeSystem("jquery-ui",o.default),i.defineThemeSystem("bootstrap3",s.default),i.defineThemeSystem("bootstrap4",a.default)},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),r=n(19),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e}(r.default);e.default=o,o.prototype.classes={widget:"fc-bootstrap3",tableGrid:"table-bordered",tableList:"table",tableListHeading:"active",buttonGroup:"btn-group",button:"btn btn-default",stateActive:"active",stateDisabled:"disabled",today:"alert alert-info",popover:"panel panel-default",popoverHeader:"panel-heading",popoverContent:"panel-body",headerRow:"panel-default",dayRow:"panel-default",listView:"panel panel-default"},o.prototype.baseIconClass="glyphicon",o.prototype.iconClasses={close:"glyphicon-remove",prev:"glyphicon-chevron-left",next:"glyphicon-chevron-right",prevYear:"glyphicon-backward",nextYear:"glyphicon-forward"},o.prototype.iconOverrideOption="bootstrapGlyphicons",o.prototype.iconOverrideCustomButtonOption="bootstrapGlyphicon",o.prototype.iconOverridePrefix="glyphicon-"},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),r=n(19),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e}(r.default);e.default=o,o.prototype.classes={widget:"fc-bootstrap4",tableGrid:"table-bordered",tableList:"table",tableListHeading:"table-active",buttonGroup:"btn-group",button:"btn btn-primary",stateActive:"active",stateDisabled:"disabled",today:"alert alert-info",popover:"card card-primary",popoverHeader:"card-header",popoverContent:"card-body",headerRow:"table-bordered",dayRow:"table-bordered",listView:"card card-primary"},o.prototype.baseIconClass="fa",o.prototype.iconClasses={close:"fa-times",prev:"fa-chevron-left",next:"fa-chevron-right",prevYear:"fa-angle-double-left",nextYear:"fa-angle-double-right"},o.prototype.iconOverrideOption="bootstrapFontAwesome",o.prototype.iconOverrideCustomButtonOption="bootstrapFontAwesome",o.prototype.iconOverridePrefix="fa-"},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=n(22),r=n(62),o=n(229);i.defineView("basic",{class:r.default}),i.defineView("basicDay",{type:"basic",duration:{days:1}}),i.defineView("basicWeek",{type:"basic",duration:{weeks:1}}),i.defineView("month",{class:o.default,duration:{months:1},defaults:{fixedWeekCount:!0}})},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=n(22),r=n(226);i.defineView("agenda",{class:r.default,defaults:{allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0}}),i.defineView("agendaDay",{type:"agenda",duration:{days:1}}),i.defineView("agendaWeek",{type:"agenda",duration:{weeks:1}})},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=n(22),r=n(230);i.defineView("list",{class:r.default,buttonTextKey:"list",defaults:{buttonText:"list",listDayFormat:"LL",noEventsMessage:"No events to display"}}),i.defineView("listDay",{type:"list",duration:{days:1},defaults:{listDayFormat:"dddd"}}),i.defineView("listWeek",{type:"list",duration:{weeks:1},defaults:{listDayFormat:"dddd",listDayAltFormat:"LL"}}),i.defineView("listMonth",{type:"list",duration:{month:1},defaults:{listDayAltFormat:"dddd"}}),i.defineView("listYear",{type:"list",duration:{year:1},defaults:{listDayAltFormat:"dddd"}})},function(t,e){Object.defineProperty(e,"__esModule",{value:!0})}])}); \ No newline at end of file diff --git a/product_rental_bookings/static/src/js/lib/popper.min.js b/product_rental_bookings/static/src/js/lib/popper.min.js new file mode 100755 index 0000000..6fc7885 --- /dev/null +++ b/product_rental_bookings/static/src/js/lib/popper.min.js @@ -0,0 +1,184 @@ +function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global.Popper = factory()); +}(this, (function () { 'use strict'; + + Object.assign||Object.defineProperty(Object,'assign',{enumerable:!1,configurable:!0,writable:!0,value:function value(a){if(a===void 0||null===a)throw new TypeError('Cannot convert first argument to object');var b=Object(a);for(var c=1;cd.order?1:0} + + function applyStyle(a){var b={position:a.offsets.popper.position},c=Math.round(a.offsets.popper.left),d=Math.round(a.offsets.popper.top),e=getSupportedPropertyName('transform');return a.instance.options.gpuAcceleration&&e?(b[e]='translate3d('+c+'px, '+d+'px, 0)',b.top=0,b.left=0):(b.left=c,b.top=d),Object.assign(b,a.styles),setStyle(a.instance.popper,b),a.instance.popper.setAttribute('x-placement',a.placement),a.offsets.arrow&&setStyle(a.arrowElement,a.offsets.arrow),a}function applyStyleOnLoad(a,b,c){return b.setAttribute('x-placement',c.placement),c} + + function arrow(a,b){var c=b.element;if('string'==typeof c&&(c=a.instance.popper.querySelector(c)),!c)return a;if(!a.instance.popper.contains(c))return console.warn('WARNING: `arrowElement` must be child of its popper element!'),a;if(!isModifierRequired(a.instance.modifiers,'arrow','keepTogether'))return console.warn('WARNING: keepTogether modifier is required by arrow modifier in order to work, be sure to include it before arrow!'),a;var d={},e=a.placement.split('-')[0],f=getPopperClientRect(a.offsets.popper),g=a.offsets.reference,h=-1!==['left','right'].indexOf(e),i=h?'height':'width',j=h?'top':'left',k=h?'left':'top',l=h?'bottom':'right',m=getOuterSizes(c)[i];g[l]-mf[l]&&(a.offsets.popper[j]+=g[j]+m-f[l]);var n=g[j]+g[i]/2-m/2,o=n-getPopperClientRect(a.offsets.popper)[j];return o=Math.max(Math.min(f[i]-m,o),0),d[j]=o,d[k]='',a.offsets.arrow=d,a.arrowElement=c,a} + + function getOppositePlacement(a){var b={left:'right',right:'left',bottom:'top',top:'bottom'};return a.replace(/left|right|bottom|top/g,function(c){return b[c]})} + + function getOppositeVariation(a){if('end'===a)return'start';return'start'===a?'end':a} + + function flip(a,b){if(a.flipped&&a.placement===a.originalPlacement)return a;var c=getBoundaries(a.instance.popper,b.padding,b.boundariesElement),d=a.placement.split('-')[0],e=getOppositePlacement(d),f=a.placement.split('-')[1]||'',g=[];return g='flip'===b.behavior?[d,e]:b.behavior,g.forEach(function(h,i){if(d!==h||g.length===i+1)return a;d=a.placement.split('-')[0],e=getOppositePlacement(d);var j=getPopperClientRect(a.offsets.popper),k='left'===d&&Math.floor(j.left)Math.floor(c.right)||'top'===d&&Math.floor(j.top)Math.floor(c.bottom),l=-1!==['top','bottom'].indexOf(d),m=!!b.flipVariations&&(l&&'start'===f&&Math.floor(j.left)Math.floor(c.right)||!l&&'start'===f&&Math.floor(j.top)Math.floor(c.bottom));(k||m)&&(a.flipped=!0,k&&(d=g[i+1]),m&&(f=getOppositeVariation(f)),a.placement=d+(f?'-'+f:''),a.offsets.popper=getOffsets(a.instance.state,a.instance.popper,a.instance.reference,a.placement).popper,a=runModifiers(a.instance.modifiers,a,'flip'));}),a} + + function keepTogether(a){var b=getPopperClientRect(a.offsets.popper),c=a.offsets.reference,d=Math.floor,e=a.placement.split('-')[0];return-1===['top','bottom'].indexOf(e)?(b.bottomd(c.bottom)&&(a.offsets.popper.top=d(c.bottom))):(b.rightd(c.right)&&(a.offsets.popper.left=d(c.right))),a} + + function offset(a,b){var c=a.placement,d=a.offsets.popper,e=void 0;return isNumeric(b.offset)?e=[b.offset,0]:(e=b.offset.split(' '),e=e.map(function(f,g){var h=f.match(/(\d*\.?\d*)(.*)/),i=+h[1],j=h[2],k=-1!==c.indexOf('right')||-1!==c.indexOf('left');if(1===g&&(k=!k),'%'===j||'%r'===j){var l=getPopperClientRect(a.offsets.reference),m=void 0;return m=k?l.height:l.width,m/100*i}if('%p'===j){var _l=getPopperClientRect(a.offsets.popper),_m=void 0;return _m=k?_l.height:_l.width,_m/100*i}if('vh'===j||'vw'===j){var _l2=void 0;return _l2='vh'===j?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0),_l2/100*i}return'px'===j?+i:+f})),-1===a.placement.indexOf('left')?-1===a.placement.indexOf('right')?-1===a.placement.indexOf('top')?-1!==a.placement.indexOf('bottom')&&(d.left+=e[0],d.top+=e[1]||0):(d.left+=e[0],d.top-=e[1]||0):(d.top+=e[0],d.left+=e[1]||0):(d.top+=e[0],d.left-=e[1]||0),a} + + function preventOverflow(c,d){var e=d.boundariesElement||getOffsetParent(c.instance.popper),f=getBoundaries(c.instance.popper,d.padding,e);d.boundaries=f;var g=d.priority,h=getPopperClientRect(c.offsets.popper),i={left:function left(){var j=h.left;return h.leftf.right&&!shouldOverflowBoundary(c,d,'right')&&(j=Math.min(h.left,f.right-h.width)),{left:j}},top:function top(){var j=h.top;return h.topf.bottom&&!shouldOverflowBoundary(c,d,'bottom')&&(j=Math.min(h.top,f.bottom-h.height)),{top:j}}};return g.forEach(function(j){c.offsets.popper=Object.assign(h,i[j]());}),c}function shouldOverflowBoundary(c,d,e){return!!d.escapeWithReference&&(c.flipped&&isSameAxis(c.originalPlacement,e)||!!isSameAxis(c.originalPlacement,e)||!0)}function isSameAxis(c,d){var e=c.split('-')[0],f=d.split('-')[0];return e===f||e===getOppositePlacement(d)} + + function shift(a){var b=a.placement,c=b.split('-')[0],d=b.split('-')[1];if(d){var e=a.offsets.reference,f=getPopperClientRect(a.offsets.popper),g={y:{start:{top:e.top},end:{top:e.top+e.height-f.height}},x:{start:{left:e.left},end:{left:e.left+e.width-f.width}}},h=-1===['bottom','top'].indexOf(c)?'y':'x';a.offsets.popper=Object.assign(f,g[h][d]);}return a} + + function hide(a){if(!isModifierRequired(a.instance.modifiers,'hide','preventOverflow'))return console.warn('WARNING: preventOverflow modifier is required by hide modifier in order to work, be sure to include it before hide!'),a;var b=a.offsets.reference,c=a.instance.modifiers.filter(function(d){return'preventOverflow'===d.name})[0].boundaries;if(b.bottomc.right||b.top>c.bottom||b.right').appendTo(this.timeBodyScroller.canvas.bgEl),this.segContainerEl=n('
').appendTo(this.timeBodyScroller.canvas.contentEl),this.bgSegContainerEl=this.timeBodyScroller.canvas.bgEl,this.timeBodyBoundCache=new s.CoordCache({els:this.timeBodyScroller.canvas.el,isHorizontal:!0,isVertical:!0}),this.timeScrollJoiner=new c["default"]("horizontal",[this.timeHeadScroller,this.timeBodyScroller]),this.headDateFollower=new u["default"](this.timeHeadScroller,(!0)),this.eventTitleFollower=new u["default"](this.timeBodyScroller),this.eventTitleFollower.minTravel=50,this.isRTL?this.eventTitleFollower.containOnNaturalRight=!0:this.eventTitleFollower.containOnNaturalLeft=!0,e.prototype.renderSkeleton.call(this)},t.prototype.renderSkeletonHtml=function(){var e=this.calendar.theme;return'
'},t.prototype.unrenderSkeleton=function(){this.handleTimeBodyScrolled(0),e.prototype.unrenderSkeleton.call(this)},t.prototype.renderDates=function(e){g.initScaleProps(this),this.timeWindowMs=e.maxTime-e.minTime,this.normalizedUnzonedStart=this.normalizeGridDate(e.renderUnzonedRange.getStart()),this.normalizedUnzonedEnd=this.normalizeGridDate(e.renderUnzonedRange.getEnd()),this.isTimeScale&&(this.normalizedUnzonedStart.add(e.minTime),this.normalizedUnzonedEnd.subtract(1,"day").add(e.maxTime)),this.normalizedUnzonedRange=new s.UnzonedRange(this.normalizedUnzonedStart,this.normalizedUnzonedEnd);var t=[],r=this.normalizedUnzonedStart.clone();for(this.calendar.localizeMoment(r);r div"),isHorizontal:!0,offsetParent:this.timeBodyScroller.canvas.el});for(var n=0;n1&&mthis.slotDuration,E=1===this.slotDuration.as("days"),C='';C+="";for(var H=0,I=d;H";C+="",C+="";for(var T=0;T";for(var x=0,M=r;x1?' colspan="'+e.colspan+'"':"")+'>
'+e.spanHtml+"
"}C+=""}C+="
";var F='';F+="";for(var _=0,B=h;_";F+="",F+="";for(var T=0;T
'},t.prototype.renderBusinessHours=function(t){if(!this.largeUnit)return e.prototype.renderBusinessHours.call(this,t)},t.prototype.getNowIndicatorUnit=function(){if(this.isTimeScale)return s.computeGreatestUnit(this.slotDuration)},t.prototype.renderNowIndicator=function(e){var t=[];if(e=this.normalizeGridDate(e),this.normalizedUnzonedRange.containsDate(e)){var r=this.dateToCoord(e),o=this.isRTL?{right:-r}:{left:r};t.push(n("
").css(o).appendTo(this.timeHeadScroller.canvas.el)[0]),t.push(n("
").css(o).appendTo(this.timeBodyScroller.canvas.el)[0])}this.nowIndicatorEls=n(t)},t.prototype.unrenderNowIndicator=function(){this.nowIndicatorEls&&(this.nowIndicatorEls.remove(),this.nowIndicatorEls=null)},t.prototype.updateSize=function(e,t,r){var o,n,i,s;o=t?"auto":e-this.headHeight()-this.queryMiscHeight(),this.timeBodyScroller.setHeight(o);var a=this.timeHeadColEls;if(a){var l=Math.round(this.slotWidth||(this.slotWidth=this.computeSlotWidth()));i=l*this.slotDates.length,n="",s=l;var c=this.timeBodyScroller.getClientWidth();c>i&&(n=c,i="",s=Math.floor(c/this.slotDates.length))}else i="",n="";this.timeHeadScroller.canvas.setWidth(i),this.timeHeadScroller.canvas.setMinWidth(n),this.timeBodyScroller.canvas.setWidth(i),this.timeBodyScroller.canvas.setMinWidth(n),a&&this.timeHeadColEls.slice(0,-1).add(this.slatColEls.slice(0,-1)).css("width",s),this.timeHeadScroller.updateSize(),this.timeBodyScroller.updateSize(),this.timeScrollJoiner.update(),a&&(this.buildCoords(),this.updateSegPositions(),this.updateNowIndicator()),this.headDateFollower&&this.headDateFollower.update(),this.eventTitleFollower&&this.eventTitleFollower.update()},t.prototype.queryMiscHeight=function(){return this.el.outerHeight()-this.timeHeadScroller.el.outerHeight()-this.timeBodyScroller.el.outerHeight()},t.prototype.computeSlotWidth=function(){var e=0,t=this.timeHeadEl.find("tr:last-child th .fc-cell-text");t.each(function(t,r){var o=n(r).outerWidth();return e=Math.max(e,o)});var r=e+1,o=s.divideDurationByDuration(this.labelInterval,this.slotDuration),i=Math.ceil(r/o),a=this.timeHeadColEls.eq(0).css("min-width");return a&&(a=parseInt(a,10),a&&(i=Math.max(i,a))),i},t.prototype.buildCoords=function(){this.timeBodyBoundCache.build(),this.slatCoordCache.build(),this.slatInnerCoordCache.build()},t.prototype.computeDateSnapCoverage=function(e){var t=s.divideRangeByDuration(this.normalizedUnzonedStart,e,this.snapDuration);if(t<0)return 0;if(t>=this.snapDiffToIndex.length)return this.snapCnt;var r=Math.floor(t),o=this.snapDiffToIndex[r];return s.isInt(o)?o+=t-r:o=Math.ceil(o),o},t.prototype.dateToCoord=function(e){var t=this.computeDateSnapCoverage(e),r=t/this.snapsPerSlot,o=Math.floor(r);o=Math.min(o,this.slotCnt-1);var n=r-o,i=this.slatInnerCoordCache;return this.isRTL?i.getRightPosition(o)-i.getWidth(o)*n-this.timeBodyBoundCache.getWidth(0):i.getLeftPosition(o)+i.getWidth(o)*n},t.prototype.rangeToCoords=function(e){return this.isRTL?{right:this.dateToCoord(e.start),left:this.dateToCoord(e.end)}:{left:this.dateToCoord(e.start),right:this.dateToCoord(e.end)}},t.prototype.headHeight=function(){for(var e=[],t=0;tt.left}Object.defineProperty(t,"__esModule",{value:!0});var s=r(1),a=r(0),l=r(27),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s.__extends(t,e),t.prototype.computeDisplayEventTime=function(){return!this.view.isTimeScale},t.prototype.computeDisplayEventEnd=function(){return!1},t.prototype.computeEventTimeFormat=function(){return this.view.opt("extraSmallTimeFormat")},t.prototype.renderFgSegs=function(e){for(var t=this.view.eventTitleFollower,r=0,n=e;r
'+(l?''+a.htmlEscape(l)+"":"")+''+(r.title?a.htmlEscape(r.title):" ")+'
'+(n?'
':"")+(i?'
':"")+""},t}(a.EventRenderer);t["default"]=c},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var o=r(1),n=r(2),i=r(0),s=r(44),a=function(e){function t(t){var r=e.call(this,t)||this;return r.children=[],r.depth=0,r.trHash={},r.trs=n(),r.isExpanded=r.view.opt("resourcesInitiallyExpanded"),r}return o.__extends(t,e),t.prototype.addChildRowNode=function(e,t){e.removeFromParentAndDom();var r=this.children;null!=t?r.splice(t,0,e):(t=r.length,r.push(e)),e.prevSibling=t>0?r[t-1]:null,t");this.trHash[r]=s,e.push(s[0]);var a="render"+i.capitaliseFirstLetter(r)+"Skeleton";this[a]&&this[a](s),t?t.trHash[r].after(s):o.prepend(s)}this.trs=n(e).on("click",".fc-expander",i.proxy(this,"toggleExpanded")),this.thisRowShown()}if(this.set("isInDom",!0),this.isExpanded)for(var l=0,c=this.children;l div:not(.fc-cell-content):first");e=Math.max(o.height(),e)}),e},t.prototype.setTrInnerHeight=function(e){n.each(this.trHash,function(t,r){s.getOwnCells(r).find("> div:not(.fc-cell-content):first").height(e)})},t.prototype.descendantAdded=function(e){this.get("isInDom")&&this.hasOwnRow&&1===this.children.length&&this.indicateExpandingEnabled(),(this.parent||this.view).descendantAdded(e)},t.prototype.descendantRemoved=function(e){this.get("isInDom")&&this.hasOwnRow&&0===this.children.length&&this.indicateExpandingDisabled(),(this.parent||this.view).descendantRemoved(e)},t.prototype.thisRowShown=function(){(this.parent||this.view).descendantShown(this)},t.prototype.thisRowHidden=function(){(this.parent||this.view).descendantHidden(this)},t.prototype.descendantShown=function(e){(this.parent||this.view).descendantShown(e)},t.prototype.descendantHidden=function(e){(this.parent||this.view).descendantHidden(e)},t}(i.DateComponent);t["default"]=a,a.prototype.hasOwnRow=!1},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return e.extractIds=function(t,r){var o=r.opt("eventResourceField")||"resourceId",n=[];if(t.resourceIds)for(var i=0,s=t.resourceIds;i1?this.datesAboveResources?this.renderHeadDateAndResourceHtml():this.renderHeadResourceAndDateHtml():this.renderHeadResourceHtml()},t.prototype.renderHeadResourceHtml=function(){var e=this,t=this.flattenedResources.map(function(t){return e.renderHeadResourceCellHtml(t)});return t.length||t.push("
"),this.wrapTr(t,"renderHeadIntroHtml")},t.prototype.renderHeadResourceAndDateHtml=function(){for(var e=[],t=[],r=this.daysPerRow,o=0,n=this.flattenedResources;o "),t.length||t.push(""),this.wrapTr(e,"renderHeadIntroHtml")+this.wrapTr(t,"renderHeadIntroHtml")},t.prototype.renderHeadDateAndResourceHtml=function(){for(var e=[],t=[],r=this.daysPerRow,o=0;o "),t.length||t.push(""),this.wrapTr(e,"renderHeadIntroHtml")+this.wrapTr(t,"renderHeadIntroHtml")},t.prototype.renderHeadResourceCellHtml=function(e,t,r){return void 0===r&&(r=1),'"},t.prototype.renderHeadResourceDateCellHtml=function(e,t,r){return void 0===r&&(r=1),this.renderHeadDateCellHtml(e,r,'data-resource-id="'+t.id+'"')},t.prototype.processHeadResourceEls=function(e){var t=this;e.find(".fc-resource-cell").each(function(e,r){var o;o=t.datesAboveResources?t.getColResource(e):t.flattenedResources[t.isRTL?t.flattenedResources.length-1-e:e],t.publiclyTrigger("resourceRender",{context:o,args:[o,n(r),n(),t.view]})})},t.prototype.renderBgCellsHtml=function(e){for(var t=[],r=this.colCnt,o=0;o "),t.join("")},t.prototype.renderResourceBgCellHtml=function(e,t){return this.renderBgCellHtml(e,'data-resource-id="'+t.id+'"')},t.prototype.wrapTr=function(e,t){return this.isRTL?(e.reverse(),""+e.join("")+this[t]()+""):""+this[t]()+e.join("")+""},t.prototype.renderBusinessHours=function(e){for(var t=this.hasAllDayBusinessHours,r=this.dateProfile.activeUnzonedRange,o=[],n=0,a=this.flattenedResources;n').append(t)},t.prototype.updateSize=function(){var e=this.scrollEl,t=i.getScrollbarWidths(e),r={marginLeft:0,marginRight:0,marginTop:0,marginBottom:0};return this.isHScrollbarsClipped&&(r.marginTop=-t.top,r.marginBottom=-t.bottom),this.isVScrollbarsClipped&&(r.marginLeft=-t.left,r.marginRight=-t.right),e.css(r),e.toggleClass("fc-no-scrollbars",(this.isHScrollbarsClipped||"hidden"===this.overflowX)&&(this.isVScrollbarsClipped||"hidden"===this.overflowY)&&!(t.top||t.bottom||t.left||t.right))},t.prototype.getScrollbarWidths=function(){var e=i.getScrollbarWidths(this.scrollEl);return this.isHScrollbarsClipped&&(e.top=0,e.bottom=0),this.isVScrollbarsClipped&&(e.left=0,e.right=0),e},t}(s["default"]);t["default"]=a},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var o=r(2),n=function(){function e(){this.gutters={}}return e.prototype.render=function(){this.el=o('
'),this.contentEl=this.el.find(".fc-content"),this.bgEl=this.el.find(".fc-bg")},e.prototype.setGutters=function(e){e?o.extend(this.gutters,e):this.gutters={},this.updateSize()},e.prototype.setWidth=function(e){this.width=e,this.updateSize()},e.prototype.setMinWidth=function(e){this.minWidth=e,this.updateSize()},e.prototype.clearWidth=function(){this.width=null,this.minWidth=null,this.updateSize()},e.prototype.updateSize=function(){var e=this.gutters;this.el.toggleClass("fc-gutter-left",Boolean(e.left)).toggleClass("fc-gutter-right",Boolean(e.right)).toggleClass("fc-gutter-top",Boolean(e.top)).toggleClass("fc-gutter-bottom",Boolean(e.bottom)).css({paddingLeft:e.left||"",paddingRight:e.right||"",paddingTop:e.top||"",paddingBottom:e.bottom||"",width:null!=this.width?this.width+(e.left||0)+(e.right||0):"",minWidth:null!=this.minWidth?this.minWidth+(e.left||0)+(e.right||0):""}),this.bgEl.css({left:e.left||"",right:e.right||"",top:e.top||"",bottom:e.bottom||""})},e}();t["default"]=n},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var o=r(2),n=r(0),i=r(27),s=function(){function e(e,t){void 0===t&&(t=!1);var r=this;this.isHFollowing=!0,this.isVFollowing=!1,this.allowPointerEvents=!1,this.containOnNaturalLeft=!1,this.containOnNaturalRight=!1,this.minTravel=0,this.allowPointerEvents=t,this.scroller=e,this.spritesById={},e.on("scroll",function(){e.isTouchedEver?(r.isTouch=!0,r.isForcedRelative=!0):(r.isTouch=!1,r.handleScroll())}),e.on("scrollEnd",function(){r.handleScroll()})}return e.prototype.setSpriteEls=function(e){var t=this;this.clearSprites(),e.each(function(e,r){t.addSprite(new i["default"](o(r)))})},e.prototype.clearSprites=function(){this.iterSprites(function(e){return e.clear()}),this.spritesById={}},e.prototype.addSprite=function(e){e.follower=this,this.spritesById[e.id]=e},e.prototype.removeSprite=function(e){e.clear(),delete this.spritesById[e.id]},e.prototype.handleScroll=function(){this.updateViewport(),this.updatePositions()},e.prototype.cacheDimensions=function(){this.updateViewport(),this.scrollbarWidths=this.scroller.getScrollbarWidths(),this.contentOffset=this.scroller.canvas.el.offset(),this.iterSprites(function(e){return e.cacheDimensions()})},e.prototype.updateViewport=function(){var e=this.scroller,t=e.getScrollFromLeft(),r=e.getScrollTop();return this.viewportRect={left:t,right:t+e.getClientWidth(),top:r,bottom:r+e.getClientHeight()}},e.prototype.forceRelative=function(){this.isForcedRelative||(this.isForcedRelative=!0,this.iterSprites(function(e){if(e.doAbsolute)return e.assignPosition()}))},e.prototype.clearForce=function(){this.isForcedRelative&&!this.isTouch&&(this.isForcedRelative=!1,this.iterSprites(function(e){return e.assignPosition()}))},e.prototype.update=function(){this.cacheDimensions(),this.updatePositions()},e.prototype.updatePositions=function(){this.iterSprites(function(e){return e.updatePosition()})},e.prototype.getContentRect=function(e){return n.getContentRect(e,this.contentOffset)},e.prototype.getBoundingRect=function(e){return n.getOuterRect(e,this.contentOffset)},e.prototype.iterSprites=function(e){for(var t in this.spritesById){var r=this.spritesById[t];e(r,t)}},e}();t["default"]=s},function(e,t,r){function o(e){return{left:e.left,right:e.right,top:e.top,bottom:e.bottom}}function n(e){return e.right-e.left}function i(e){return e.bottom-e.top}function s(e,t){return a(e,t)&&l(e,t)}function a(e,t){return t.left>=e.left&&t.right<=e.right}function l(e,t){return t.top>=e.top&&t.bottom<=e.bottom}function c(e,t){return e.leftt.right&&(e.left=t.right-n(e),e.right=t.right,!0)}function u(e,t){return e.topt.bottom&&(e.top=t.bottom-i(e),e.bottom=t.bottom,!0)}function d(e,t){return{left:Math.min(e.left,t.left),right:Math.max(e.right,t.right),top:Math.min(e.top,t.top),bottom:Math.max(e.bottom,t.bottom)}}Object.defineProperty(t,"__esModule",{value:!0});var h=r(0),p=function(){function e(t){this.isEnabled=!0,this.isHFollowing=!1,this.isVFollowing=!1,this.doAbsolute=!1,this.isAbsolute=!1,this.isCentered=!1,this.isBlock=!1,this.el=t,this.id=String(e.uid++),this.isBlock="block"===this.el.css("display"),"relative"!==this.el.css("position")&&this.el.css("position","relative")}return e.prototype.disable=function(){this.isEnabled&&(this.isEnabled=!1,this.resetPosition(),this.unabsolutize())},e.prototype.enable=function(){this.isEnabled||(this.isEnabled=!0,this.assignPosition())},e.prototype.clear=function(){this.disable(),this.follower=null,this.absoluteEl=null},e.prototype.cacheDimensions=function(){var e=!1,t=!1,r=!1;this.naturalWidth=this.el.width(),this.resetPosition();var o=this.follower,s=this.naturalRect=o.getBoundingRect(this.el),a=this.el.parent();this.parentRect=o.getBoundingRect(a);var l=this.containerRect=d(o.getContentRect(a),s),c=o.minTravel;o.containOnNaturalLeft&&(l.left=s.left),o.containOnNaturalRight&&(l.right=s.right),o.isHFollowing&&n(l)-n(s)>=c&&(r="center"===this.el.css("text-align"),e=!0),o.isVFollowing&&i(l)-i(s)>=c&&(t=!0),this.isHFollowing=e,this.isVFollowing=t,this.isCentered=r},e.prototype.updatePosition=function(){this.computePosition(),this.assignPosition()},e.prototype.resetPosition=function(){this.el.css({top:"",left:""})},e.prototype.computePosition=function(){var e=this.follower.viewportRect,t=this.parentRect,r=this.containerRect,i=h.intersectRects(e,t),a=null,l=!1;if(i){a=o(this.naturalRect);var d=h.intersectRects(a,t);if(this.isCentered&&!s(e,t)||d&&!s(e,d)){if(l=!0,this.isHFollowing){if(this.isCentered){var p=n(a);a.left=(i.left+i.right)/2-p/2,a.right=a.left+p}else c(a,e)||(l=!1);c(a,r)&&(l=!1)}this.isVFollowing&&(u(a,e)||(l=!1),u(a,r)&&(l=!1)),s(e,a)||(l=!1)}}this.rect=a,this.doAbsolute=l},e.prototype.assignPosition=function(){if(this.isEnabled)if(this.rect)if(this.doAbsolute&&!this.follower.isForcedRelative)this.absolutize(),this.absoluteEl.css({top:this.rect.top-this.follower.viewportRect.top+this.follower.scrollbarWidths.top,left:this.rect.left-this.follower.viewportRect.left+this.follower.scrollbarWidths.left,width:this.isBlock?this.naturalWidth:""});else{var e=this.rect.top-this.naturalRect.top,t=this.rect.left-this.naturalRect.left;this.unabsolutize(),this.el.toggleClass("fc-following",Boolean(e||t)).css({top:e,left:t})}else this.unabsolutize()},e.prototype.absolutize=function(){this.isAbsolute||(this.absoluteEl||(this.absoluteEl=this.buildAbsoluteEl()),this.absoluteEl.appendTo(this.follower.scroller.el),this.el.css("visibility","hidden"),this.isAbsolute=!0)},e.prototype.unabsolutize=function(){this.isAbsolute&&(this.absoluteEl.detach(),this.el.css("visibility",""),this.isAbsolute=!1)},e.prototype.buildAbsoluteEl=function(){var e=this.el.clone().addClass("fc-following");return e.css({position:"absolute","z-index":1e3,"font-weight":this.el.css("font-weight"),"font-size":this.el.css("font-size"),"font-family":this.el.css("font-family"),"text-decoration":this.el.css("text-decoration"),color:this.el.css("color"),"padding-top":this.el.css("padding-top"),"padding-bottom":this.el.css("padding-bottom"),"padding-left":this.el.css("padding-left"),"padding-right":this.el.css("padding-right")}),this.follower.allowPointerEvents||e.css("pointer-events","none"),e},e.uid=0,e}();t["default"]=p},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var o=r(1),n=r(2),i=r(0),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(t,e),t.prototype.attachSegEls=function(e,t){if(t.length){var r=void 0;r="businessHours"===e?"bgevent":e.toLowerCase();for(var o=n('
').appendTo(this.component.bgSegContainerEl),i=0,s=t;i').appendTo(this.component.innerEl);r.push(l[0]);for(var c=0,u=e;c
   1?' colspan="'+r+'"':"")+">"+i.htmlEscape(this.view.getResourceText(e))+"
').appendTo(this.timeBodyScroller.canvas.contentEl);this.timeBodyTbodyEl=r.find("tbody"),this.tbodyHash={spreadsheet:this.spreadsheet.tbodyEl,event:this.timeBodyTbodyEl},this.resourceScrollJoiner=new l["default"]("vertical",[this.spreadsheet.bodyScroller,this.timeBodyScroller]),this.initDividerMoving()},t.prototype.renderSkeletonHtml=function(){var e=this.calendar.theme;return'
'},t.prototype.initDividerMoving=function(){var e=this,t=this.opt("resourceAreaWidth");this.dividerEls=this.el.find(".fc-divider"),this.dividerWidth=null!=t?t:this.spreadsheet.tableWidth,null!=this.dividerWidth&&this.positionDivider(this.dividerWidth),this.dividerEls.on("mousedown",function(t){e.dividerMousedown(t)})},t.prototype.dividerMousedown=function(e){var t=this,r=this.opt("isRTL"),o=30,n=this.el.width()-30,i=this.getNaturalDividerWidth(),s=new a.DragListener({dragStart:function(){t.dividerEls.addClass("fc-active")},drag:function(e,s){var a;a=r?i-e:i+e,a=Math.max(a,o),a=Math.min(a,n),t.dividerWidth=a,t.positionDivider(a),t.calendar.updateViewSize()},dragEnd:function(){t.dividerEls.removeClass("fc-active")}});s.startInteraction(e)},t.prototype.getNaturalDividerWidth=function(){return this.el.find(".fc-resource-area").width()},t.prototype.positionDivider=function(e){this.el.find(".fc-resource-area").css("width",e)},t.prototype.updateSize=function(t,r,o){var n;this.rowsNeedingHeightSync?(this.syncRowHeights(this.rowsNeedingHeightSync),this.rowsNeedingHeightSync=null):this.syncRowHeights();var i=this.syncHeadHeights();n=r?"auto":t-i-this.queryMiscHeight(),this.timeBodyScroller.setHeight(n),this.spreadsheet.bodyScroller.setHeight(n),this.spreadsheet.updateSize(),e.prototype.updateSize.call(this,t,r,o),this.resourceScrollJoiner.update()},t.prototype.queryMiscHeight=function(){return this.el.outerHeight()-Math.max(this.spreadsheet.headScroller.el.outerHeight(),this.timeHeadScroller.el.outerHeight())-Math.max(this.spreadsheet.bodyScroller.el.outerHeight(),this.timeBodyScroller.el.outerHeight())},t.prototype.syncHeadHeights=function(){this.spreadsheet.headHeight("auto"),this.headHeight("auto");var e=Math.max(this.spreadsheet.headHeight(),this.headHeight());return this.spreadsheet.headHeight(e),this.headHeight(e),e},t.prototype.queryResourceScroll=function(){for(var e={},t=this.timeBodyScroller.scrollEl.offset().top,r=0,o=this.getVisibleRows();rt){e.resourceId=n.resource.id,e.bottom=s-t;break}}}return e},t.prototype.applyResourceScroll=function(e){if(e.resourceId){var t=this.getResourceRow(e.resourceId);if(t){var r=t.getTr("event");if(r){var o=this.timeBodyScroller.canvas.el.offset().top,n=r.offset().top+r.outerHeight(),i=n-e.bottom-o;this.timeBodyScroller.setScrollTop(i),this.spreadsheet.bodyScroller.setScrollTop(i)}}}},t.prototype.scrollToResource=function(e){var t=this.getResourceRow(e.id);if(t){var r=t.getTr("event");if(r){var o=this.timeBodyScroller.canvas.el.offset().top,n=r.offset().top-o;this.timeBodyScroller.setScrollTop(n),this.spreadsheet.bodyScroller.setScrollTop(n)}}},t.prototype.prepareHits=function(){var t=[];e.prototype.prepareHits.call(this),this.eventRows=this.getEventRows(),this.eventRows.forEach(function(e){e.get("isInDom")&&t.push(e)});var r=t.map(function(e){return e.getTr("event")[0]});this.shownEventRows=t,this.rowCoordCache=new a.CoordCache({els:r,isVertical:!0}),this.rowCoordCache.build()},t.prototype.releaseHits=function(){e.prototype.releaseHits.call(this),this.eventRows=null,this.shownEventRows=null,this.rowCoordCache.clear()},t.prototype.queryHit=function(t,r){var o=e.prototype.queryHit.call(this,t,r);if(o){var n=this.rowCoordCache.getVerticalIndex(r);if(null!=n)return{resourceId:this.shownEventRows[n].resource.id,snap:o.snap,component:this,left:o.left,right:o.right,top:this.rowCoordCache.getTopOffset(n),bottom:this.rowCoordCache.getBottomOffset(n)}}},t.prototype.getHitFootprint=function(t){var r=e.prototype.getHitFootprint.call(this,t);return new c["default"](r.unzonedRange,r.isAllDay,t.resourceId)},t.prototype.getHitEl=function(e){return this.getSnapEl(e.snap)},t.prototype.renderResources=function(e){for(var t=0,r=e;t0)return r}return null},t.prototype.compareResources=function(e,t){return a.compareByFieldSpecs(e,t,this.orderSpecs)},t.prototype.ensureResourceGroup=function(e,t,r){var o,n,i=(e.resource||{})[r.field],s=null;if(r.order)for(o=0;o0)break}else for(o=0;o1&&this.syncRowHeights(e,!0)}},t.prototype.getVisibleRows=function(){for(var e=[],t=0,r=this.rowHierarchy.getRows();t').append(this.renderGroupContentEl())),this.groupTd.attr("rowspan",this.rowspan),e=this.getLeadingRow().getTr("spreadsheet"),e!==this.leadingTr&&(e&&e.prepend(this.groupTd),this.leadingTr=e)):(this.groupTd&&(this.groupTd.remove(),this.groupTd=null),this.leadingTr=null)},t.prototype.descendantShown=function(t){this.rowspan+=1,this.renderRowspan(),e.prototype.descendantShown.call(this,t)},t.prototype.descendantHidden=function(t){this.rowspan-=1,this.renderRowspan(),e.prototype.descendantHidden.call(this,t)},t}(i["default"]);t["default"]=s},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var o=r(1),n=r(2),i=r(18),s=function(e){function t(t,r,o){var n=e.call(this,t)||this;return n.groupSpec=r,n.groupValue=o,n}return o.__extends(t,e),t.prototype.descendantRemoved=function(t){e.prototype.descendantRemoved.call(this,t),this.children.length||this.removeFromParentAndDom()},t.prototype.renderGroupContentEl=function(){var e=n('
').append(this.renderGroupTextEl()),t=this.groupSpec.render;return"function"==typeof t&&(e=t(e,this.groupValue)||e),e},t.prototype.renderGroupTextEl=function(){var e=this.groupValue||"",t=this.groupSpec.text;return"function"==typeof t&&(e=t(e)||e),n('').text(e)},t}(i["default"]);t["default"]=s},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var o=r(1),n=r(0),i=r(18),s=r(28),a=r(17),l=r(29),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(t,e),t.prototype.renderEventSkeleton=function(e){var t=this.view.calendar.theme;e.html('
'),this.segContainerEl=e.find(".fc-event-container"),this.innerEl=this.bgSegContainerEl=e.find("td > div")},t.prototype.rangeToCoords=function(e){return this.view.rangeToCoords(e)},t.prototype.componentFootprintToSegs=function(e){return this.view.componentFootprintToSegs(e)},t}(i["default"]);t["default"]=c,c.prototype.fillRendererClass=s["default"],c.prototype.eventRendererClass=a["default"],c.prototype.helperRendererClass=l["default"],c.prototype.businessHourRendererClass=n.BusinessHourRenderer,c.prototype.hasOwnRow=!0},,,function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var o=r(0);r(37),r(48),r(50),r(51),r(53),r(54),r(55),r(56),r(57),r(58),r(59),r(60),r(61),r(62),r(63),r(64),r(65),r(66),r(67),r(68);var n="1.9.4";if(o.schedulerVersion=n,12!==o.internalApiVersion)throw new Error("v"+n+" of FullCalendar Scheduler is incompatible with v"+o.version+"")},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var o=r(0),n=r(20),i=r(22),s=r(23),a=r(14),l=r(30);o.ResourceAgendaView=n["default"],o.ResourceBasicView=i["default"],o.ResourceMonthView=s["default"],o.TimelineView=a["default"],o.ResourceTimelineView=l["default"]},function(e,t,r){Object.defineProperty(t,"__esModule",{ +value:!0});var o=r(1),n=r(2),i=r(0),s=r(21),a=r(6),l=function(e){function t(t){var r=e.call(this,t)||this;return r.isResourceFootprintsEnabled=!0,r}return o.__extends(t,e),t.prototype.renderDates=function(e){this.dateProfile=e,this.renderSlats()},t.prototype.renderResources=function(e){this.registerResources(e),this.renderColumns(),this.headContainerEl&&this.processHeadResourceEls(this.headContainerEl)},t.prototype.getHitFootprint=function(t){var r=e.prototype.getHitFootprint.call(this,t);return new a["default"](r.unzonedRange,r.isAllDay,this.getColResource(t.col).id)},t.prototype.componentFootprintToSegs=function(e){for(var t=this.resourceCnt,r=this.sliceRangeByTimes(e.unzonedRange),o=[],i=0,s=r;iA
').appendTo("body"),t=e[0],r=function(){return t.scrollLeft>0?"positive":(t.scrollLeft=1,t.scrollLeft>0?"reverse":"negative")}();return e.remove(),r}Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=r(2),s=r(0),a=null,l=function(e){function t(t){var r=e.call(this,t)||this;return r.isScrolling=!1,r.isTouching=!1,r.isTouchedEver=!1,r.isMoving=!1,r.isTouchScrollEnabled=!0,r.requestMovingEnd=s.debounce(r.reportMovingEnd,500),r}return n.__extends(t,e),t.prototype.render=function(){e.prototype.render.call(this),this.canvas&&(this.canvas.render(),this.canvas.el.appendTo(this.scrollEl)),this.bindHandlers()},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.unbindHandlers()},t.prototype.disableTouchScroll=function(){this.isTouchScrollEnabled=!1,this.bindPreventTouchScroll()},t.prototype.enableTouchScroll=function(){this.isTouchScrollEnabled=!0,this.isTouching||this.unbindPreventTouchScroll()},t.prototype.bindPreventTouchScroll=function(){this.preventTouchScrollHandler||this.scrollEl.on("touchmove",this.preventTouchScrollHandler=s.preventDefault)},t.prototype.unbindPreventTouchScroll=function(){this.preventTouchScrollHandler&&(this.scrollEl.off("touchmove",this.preventTouchScrollHandler),this.preventTouchScrollHandler=null)},t.prototype.bindHandlers=function(){return this.listenTo(this.scrollEl,{scroll:this.reportScroll,touchstart:this.reportTouchStart,touchend:this.reportTouchEnd})},t.prototype.unbindHandlers=function(){return this.stopListeningTo(this.scrollEl)},t.prototype.reportScroll=function(){this.isScrolling||this.reportScrollStart(),this.trigger("scroll"),this.isMoving=!0,this.requestMovingEnd()},t.prototype.reportScrollStart=function(){this.isScrolling||(this.isScrolling=!0,this.trigger("scrollStart",this.isTouching))},t.prototype.reportMovingEnd=function(){this.isMoving=!1,this.isTouching||this.reportScrollEnd()},t.prototype.reportScrollEnd=function(){this.isScrolling&&(this.trigger("scrollEnd"),this.isScrolling=!1)},t.prototype.reportTouchStart=function(){this.isTouching=!0,this.isTouchedEver=!0},t.prototype.reportTouchEnd=function(){this.isTouching&&(this.isTouching=!1,this.isTouchScrollEnabled&&this.unbindPreventTouchScroll(),this.isMoving||this.reportScrollEnd())},t.prototype.getScrollLeft=function(){var e=this.scrollEl.css("direction"),t=this.scrollEl[0],r=t.scrollLeft;if("rtl"===e)switch(a){case"positive":r=r+t.clientWidth-t.scrollWidth;break;case"reverse":r=-r}return r},t.prototype.setScrollLeft=function(e){var t=this.scrollEl.css("direction"),r=this.scrollEl[0];if("rtl"===t)switch(a){case"positive":e=e-r.clientWidth+r.scrollWidth;break;case"reverse":e=-e}r.scrollLeft=e},t.prototype.getScrollFromLeft=function(){var e=this.scrollEl.css("direction"),t=this.scrollEl[0],r=t.scrollLeft;if("rtl"===e)switch(a){case"negative":r=r-t.clientWidth+t.scrollWidth;break;case"reverse":r=-r-t.clientWidth+t.scrollWidth}return r},t.prototype.getNativeScrollLeft=function(){return this.scrollEl[0].scrollLeft},t.prototype.setNativeScrollLeft=function(e){this.scrollEl[0].scrollLeft=e},t}(s.Scroller);t["default"]=l,s.EmitterMixin.mixInto(l),s.ListenerMixin.mixInto(l),i(function(){a=o()})},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var o=r(1),n=r(0),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(t,e),t.prototype.segDragStart=function(t,r){e.prototype.segDragStart.call(this,t,r),this.component.eventTitleFollower&&this.component.eventTitleFollower.forceRelative()},t.prototype.segDragStop=function(t,r){e.prototype.segDragStop.call(this,t,r),this.component.eventTitleFollower&&this.component.eventTitleFollower.clearForce()},t}(n.EventDragging);t["default"]=i},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var o=r(1),n=r(0),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(t,e),t.prototype.segResizeStart=function(t,r){if(e.prototype.segResizeStart.call(this,t,r),this.component.eventTitleFollower)return this.component.eventTitleFollower.forceRelative()},t.prototype.segResizeStop=function(t,r){if(e.prototype.segResizeStop.call(this,t,r),this.component.eventTitleFollower)return this.component.eventTitleFollower.clearForce()},t}(n.EventResizing);t["default"]=i},function(e,t,r){function o(e){e.labelInterval=n(e,"slotLabelInterval"),e.slotDuration=n(e,"slotDuration"),i(e),s(e),a(e);var t=e.opt("slotLabelFormat"),r=c.type(t);e.headerFormats="array"===r?t:"string"===r?[t]:l(e),e.isTimeScale=d.durationHasTime(e.slotDuration);var o=null;if(!e.isTimeScale){var h=d.computeGreatestUnit(e.slotDuration);/year|month|week/.test(h)&&(o=h)}e.largeUnit=o,e.emphasizeWeeks=1===e.slotDuration.as("days")&&e.currentRangeAs("weeks")>=2&&!e.opt("businessHours");var p=e.opt("snapDuration");e.snapDuration=p?u.duration(p):e.slotDuration,e.snapsPerSlot=d.divideDurationByDuration(e.slotDuration,e.snapDuration)}function n(e,t){var r=e.opt(t);if(null!=r){var o=u.duration(r);if(+o)return o}}function i(e){var t=e.dateProfile.currentUnzonedRange;if(e.labelInterval){var r=d.divideRangeByDuration(t.getStart(),t.getEnd(),e.labelInterval);r>d.MAX_TIMELINE_SLOTS&&(d.warn("slotLabelInterval results in too many cells"),e.labelInterval=null)}if(e.slotDuration){var o=d.divideRangeByDuration(t.getStart(),t.getEnd(),e.slotDuration);o>d.MAX_TIMELINE_SLOTS&&(d.warn("slotDuration results in too many cells"),e.slotDuration=null)}if(e.labelInterval&&e.slotDuration){var n=d.divideDurationByDuration(e.labelInterval,e.slotDuration);if(!d.isInt(n)||n<1)return d.warn("slotLabelInterval must be a multiple of slotDuration"),e.slotDuration=null}}function s(e){var t=e.dateProfile.currentUnzonedRange,r=e.labelInterval;if(!r){var o=void 0;if(e.slotDuration){for(var n=0,i=v;n=h)break}e.labelInterval=r}return r}function a(e){var t=e.dateProfile.currentUnzonedRange,r=e.slotDuration;if(!r){for(var o=s(e),n=0,i=v;n1&&c<=p){r=l;break}}if(r){var h=d.divideRangeByDuration(t.getStart(),t.getEnd(),r);h>f&&(r=null)}r||(r=o),e.slotDuration=r}return r}function l(e){var t,r,o=e.labelInterval,n=d.computeGreatestUnit(o),i=e.opt("weekNumbers"),s=t=r=null;switch("week"!==n||i||(n="day"),n){case"year":s="YYYY";break;case"month":e.currentRangeAs("years")>1&&(s="YYYY"),t="MMM";break;case"week":e.currentRangeAs("years")>1&&(s="YYYY"),t=e.opt("shortWeekFormat");break;case"day":e.currentRangeAs("years")>1?s=e.opt("monthYearFormat"):e.currentRangeAs("months")>1&&(s="MMMM"),i&&(t=e.opt("weekFormat")),r="dd D";break;case"hour":i&&(s=e.opt("weekFormat")),e.currentRangeAs("days")>1&&(t=e.opt("dayOfMonthFormat")),r=e.opt("smallTimeFormat");break;case"minute":o.asMinutes()/60>=p?(s=e.opt("hourFormat"),t="[:]mm"):s=e.opt("mediumTimeFormat");break;case"second":o.asSeconds()/60>=p?(s="LT",t="[:]ss"):s="LTS";break;case"millisecond":s="LTS",t="[.]SSS"}return[].concat(s||[],t||[],r||[])}Object.defineProperty(t,"__esModule",{value:!0});var c=r(2),u=r(15),d=r(0),h=18,p=6,f=200;d.MAX_TIMELINE_SLOTS=1e3;var v=[{years:1},{months:1},{days:1},{hours:1},{minutes:30},{minutes:15},{minutes:10},{minutes:5},{minutes:1},{seconds:30},{seconds:15},{seconds:10},{seconds:5},{seconds:1},{milliseconds:500},{milliseconds:100},{milliseconds:10},{milliseconds:1}];t.initScaleProps=o},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var o=r(2),n=r(0),i=r(24),s=r(25),a=r(16),l=r(26),c=r(31),u=30,d=function(){function e(e){this.colGroupHtml="",this.view=e,this.isRTL=this.view.opt("isRTL"),this.givenColWidths=this.colWidths=this.view.colSpecs.map(function(e){return e.width})}return e.prototype.renderSkeleton=function(){var e=this.view.calendar.theme;this.headScroller=new i["default"]({overflowX:"clipped-scroll",overflowY:"hidden"}),this.headScroller.canvas=new s["default"],this.headScroller.render(),this.headScroller.canvas.contentEl.html(this.renderHeadHtml()),this.headEl.append(this.headScroller.el),this.bodyScroller=new i["default"]({overflowY:"clipped-scroll"}),this.bodyScroller.canvas=new s["default"],this.bodyScroller.render(),this.bodyScroller.canvas.contentEl.html('
'+this.colGroupHtml+"
"),this.tbodyEl=this.bodyScroller.canvas.contentEl.find("tbody"),this.el.append(this.bodyScroller.el),this.scrollJoiner=new a["default"]("horizontal",[this.headScroller,this.bodyScroller]),this.headTable=this.headEl.find("table"),this.headColEls=this.headEl.find("col"),this.headCellEls=this.headScroller.canvas.contentEl.find("tr:last-child th"),this.bodyColEls=this.el.find("col"),this.bodyTable=this.el.find("table"),this.colMinWidths=this.computeColMinWidths(),this.applyColWidths(),this.initColResizing()},e.prototype.renderHeadHtml=function(){for(var e=this.view.calendar.theme,t=this.view.colSpecs,r='',o="",i=0,s=t;i':""}o+="",this.colGroupHtml=o,r+=o,r+="",this.view.superHeaderText&&(r+='"),r+="";for(var l=0;l
'+(a.isMain?'':"")+''+n.htmlEscape(a.labelText||"")+"
"+(c?"":'
')+"
"}return r+="
",r+="
'+n.htmlEscape(this.view.superHeaderText)+"
"},e.prototype.initColResizing=function(){var e=this;this.headEl.find("th .fc-col-resizer").each(function(t,r){r=o(r),r.on("mousedown",function(o){e.colResizeMousedown(t,o,r)})})},e.prototype.colResizeMousedown=function(e,t,r){var o=this,i=this.colWidths=this.queryColWidths();i.pop(),i.push(null);var s=i[e],a=Math.min(this.colMinWidths[e],u),l=new n.DragListener({dragStart:function(){r.addClass("fc-active")},drag:function(t,r){var n=s+(o.isRTL?-t:t);n=Math.max(n,a),i[e]=n,o.applyColWidths()},dragEnd:function(){r.removeClass("fc-active")}});l.startInteraction(t)},e.prototype.applyColWidths=function(){for(var e,t,r,o=this.colMinWidths,n=this.colWidths,i=!0,s=!1,a=0,l=0,c=n;l td").filter(function(e,t){return t.rowSpan<=1})}Object.defineProperty(t,"__esModule",{value:!0}),t.getOwnCells=r},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var o=r(1),n=r(17),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(t,e),t.prototype.renderFgRanges=function(e){},t.prototype.unrenderFgRanges=function(){},t}(n["default"]);t["default"]=i},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var o=r(1),n=r(2),i=r(0),s=r(33),a=function(e){function t(t,r){var o=e.call(this,t)||this;return o.resource=r,o.eventRenderer.designatedResource=o.resource,o}return o.__extends(t,e),t.prototype.renderSkeleton=function(){e.prototype.renderSkeleton.call(this),this.updateExpandingEnabled(),this.eventsPayload&&s["default"].prototype.executeEventRender.call(this,this.eventsPayload),this.businessHourGenerator&&this.view.dateProfile&&s["default"].prototype.renderBusinessHours.call(this,this.businessHourGenerator),this.view.publiclyTrigger("resourceRender",{context:this.resource,args:[this.resource,this.getTr("spreadsheet").find("> td"),this.getTr("event").find("> td"),this.view]})},t.prototype.removeElement=function(){e.prototype.removeElement.call(this),this.eventsPayload&&s["default"].prototype.executeEventUnrender.call(this,this.eventsPayload),this.businessHourGenerator&&s["default"].prototype.unrenderBusinessHours.call(this,this.businessHourGenerator)},t.prototype.renderEventSkeleton=function(t){e.prototype.renderEventSkeleton.call(this,t),t.attr("data-resource-id",this.resource.id)},t.prototype.executeEventRender=function(t){this.eventsPayload=t,this.get("isInDom")&&e.prototype.executeEventRender.call(this,this.eventsPayload)},t.prototype.executeEventUnrender=function(){e.prototype.executeEventUnrender.call(this),this.eventsPayload=null},t.prototype.renderBusinessHours=function(t){this.businessHourGenerator=t,this.get("isInDom")&&e.prototype.renderBusinessHours.call(this,this.businessHourGenerator)},t.prototype.unrenderBusinessHours=function(){e.prototype.unrenderBusinessHours.call(this),this.businessHourGenerator=null},t.prototype.renderSpreadsheetSkeleton=function(e){for(var t=this.view.calendar.theme,r=this.resource,o=0,s=this.view.colSpecs;o'+(a.isMain?this.renderGutterHtml():"")+''+(c?i.htmlEscape(c):" ")+"
");"function"==typeof a.render&&(u=a.render(r,u,l)||u);var d=n('').append(u);a.isMain&&d.wrapInner("
"),e.append(d)}}e.attr("data-resource-id",r.id)},t.prototype.renderGutterHtml=function(){for(var e="",t=this.depth,r=0;r';return e+=''},t}(s["default"]);t["default"]=a},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var o=r(1),n=r(2),i=r(32),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(t,e),t.prototype.renderSkeleton=function(){e.prototype.renderSkeleton.call(this),this.updateExpandingEnabled()},t.prototype.renderSpreadsheetSkeleton=function(e){var t=this.renderGroupContentEl();return t.prepend(''),n('').attr("colspan",this.view.colSpecs.length).append(n("
").append(t)).appendTo(e)},t.prototype.renderEventSkeleton=function(e){return e.append('
')},t}(i["default"]);t["default"]=s,s.prototype.hasOwnRow=!0},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var o=r(2),n=r(0),i=r(19),s=r(49),a=r(6),l={constructed:n.Calendar.prototype.constructed,buildSelectFootprint:n.Calendar.prototype.buildSelectFootprint};n.Calendar.defaults.refetchResourcesOnNavigate=!1,n.Calendar.defaults.filterResourcesWithEvents=!1,n.Calendar.prototype.resourceManager=null,n.Calendar.prototype.constructed=function(){l.constructed.apply(this,arguments),this.resourceManager=new s["default"](this)},n.Calendar.prototype.instantiateView=function(e){var t=this.viewSpecManager.getViewSpec(e),r=t["class"];return this.opt("resources")&&t.options.resources!==!1&&(t.queryResourceClass?r=t.queryResourceClass(t)||r:t.resourceClass&&(r=t.resourceClass)),new r(this,t)},n.Calendar.prototype.getResources=function(){return Array.prototype.slice.call(this.resourceManager.topLevelResources)},n.Calendar.prototype.addResource=function(e,t){var r=this;void 0===t&&(t=!1),this.resourceManager.addResource(e).then(function(e){if(t&&r.view.scrollToResource)return r.view.scrollToResource(e)})},n.Calendar.prototype.removeResource=function(e){return this.resourceManager.removeResource(e)},n.Calendar.prototype.refetchResources=function(){this.resourceManager.clear(),this.view.flash("initialResources")},n.Calendar.prototype.rerenderResources=function(){this.resourceManager.resetCurrentResources()},n.Calendar.prototype.buildSelectFootprint=function(e,t,r){var o=l.buildSelectFootprint.apply(this,arguments);return r?new a["default"](o.unzonedRange,o.isAllDay,r):o},n.Calendar.prototype.getResourceById=function(e){return this.resourceManager.getResourceById(e)},n.Calendar.prototype.getEventResourceId=function(e){return this.getEventResourceIds(e)[0]},n.Calendar.prototype.getEventResourceIds=function(e){var t=this.eventManager.getEventDefByUid(e._id);return t?t.getResourceIds():[]},n.Calendar.prototype.setEventResourceId=function(e,t){this.setEventResourceIds(e,t?[t]:[])},n.Calendar.prototype.setEventResourceIds=function(e,t){var r=this.eventManager.getEventDefByUid(e._id);r&&(r.resourceIds=t.map(function(e){return i["default"].normalizeId(e)}))},n.Calendar.prototype.getResourceEvents=function(e){var t=this,r="object"==typeof e?e:this.getResourceById(e);return r?this.clientEvents(function(e){return o.inArray(r.id,t.getEventResourceIds(e))!==-1}):[]},n.Calendar.prototype.getEventResource=function(e){return this.getEventResources(e)[0]},n.Calendar.prototype.getEventResources=function(e){var t="object"==typeof e?e:this.clientEvents(e)[0],r=[];if(t)for(var o=0,n=this.getEventResourceIds(t);o').html(e))}function a(e){return e.find(".fc-license-message").length>=1}Object.defineProperty(t,"__esModule",{value:!0});var l=r(2),c=r(15),u=r(0),d="2018-03-27",h={years:1,weeks:1},p="",f=["GPL-My-Project-Is-Open-Source","CC-Attribution-NonCommercial-NoDerivatives"];t.processLicenseKey=o,t.isValidKey=n,t.isImmuneUrl=i,t.renderingWarningInContainer=s,t.detectWarningInContainer=a},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var o=r(0),n=r(6),i={eventRangeToEventFootprints:o.DateComponent.prototype.eventRangeToEventFootprints};o.DateComponent.prototype.isResourceFootprintsEnabled=!1,o.DateComponent.prototype.eventRangeToEventFootprints=function(e){if(this.isResourceFootprintsEnabled){var t=e.eventDef,r=t.getResourceIds();return r.length?r.map(function(r){return new o.EventFootprint(new n["default"](e.unzonedRange,t.isAllDay(),r),t,e.eventInstance)}):t.hasBgRendering()?i.eventRangeToEventFootprints.apply(this,arguments):[]}return i.eventRangeToEventFootprints.apply(this,arguments)},o.DateComponent.prototype.renderResources=function(e){this.callChildren("renderResources",arguments)},o.DateComponent.prototype.unrenderResources=function(){ +this.callChildren("unrenderResources",arguments)},o.DateComponent.prototype.renderResource=function(e){this.callChildren("renderResource",arguments)},o.DateComponent.prototype.unrenderResource=function(e){this.callChildren("unrenderResource",arguments)}},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var o=r(0),n={isEventDefDraggable:o.InteractiveDateComponent.prototype.isEventDefDraggable};o.InteractiveDateComponent.prototype.allowCrossResource=!0,o.InteractiveDateComponent.prototype.isEventDefDraggable=function(e){return this.isEventDefResourceEditable(e)||n.isEventDefDraggable.call(this,e)},o.InteractiveDateComponent.prototype.isEventDefResourceEditable=function(e){var t=e.resourceEditable;return null==t&&(t=(e.source||{}).resourceEditable,null==t&&(t=this.opt("eventResourceEditable"),null==t&&(t=this.isEventDefGenerallyEditable(e)))),t}},function(e,t,r){function o(e,t){return e.view.calendar.resourceManager.getResourceById(t)}Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i={getFallbackStylingObjs:n.EventRenderer.prototype.getFallbackStylingObjs};n.EventRenderer.prototype.designatedResource=null,n.EventRenderer.prototype.currentResource=null,n.EventRenderer.prototype.beforeFgSegHtml=function(e){var t=e.footprint.componentFootprint.resourceId;this.designatedResource?this.currentResource=this.designatedResource:t?this.currentResource=o(this,t):this.currentResource=null},n.EventRenderer.prototype.getFallbackStylingObjs=function(e){var t=i.getFallbackStylingObjs.apply(this,arguments);if(this.currentResource)t.unshift(this.currentResource);else{for(var r=[],n=0,s=e.getResourceIds();n1?t:null,null!=this.resourceEditable&&(e.resourceEditable=this.resourceEditable),e}},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var o=r(0),n=o.EventDefMutation.prototype.mutateSingle;o.EventDefMutation.prototype.oldResourceId=null,o.EventDefMutation.prototype.newResourceId=null,o.EventDefMutation.prototype.mutateSingle=function(e){var t=n.apply(this,arguments),r=null;return this.oldResourceId&&e.hasResourceId(this.oldResourceId)&&(r=e.getResourceIds(),e.removeResourceId(this.oldResourceId),e.addResourceId(this.newResourceId)),function(){t(),r&&(e.resourceIds=r)}}},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var o=r(0),n=r(14);o.defineView("timeline",{"class":n["default"],defaults:{eventResizableFromStart:!0}}),o.defineView("timelineDay",{type:"timeline",duration:{days:1}}),o.defineView("timelineWeek",{type:"timeline",duration:{weeks:1}}),o.defineView("timelineMonth",{type:"timeline",duration:{months:1}}),o.defineView("timelineYear",{type:"timeline",duration:{years:1}})},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var o=r(0),n=r(30);o.getViewConfig("timeline").resourceClass=n["default"],o.Calendar.defaults.resourcesInitiallyExpanded=!0},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var o=r(0),n=r(22),i=r(23);o.getViewConfig("basic").queryResourceClass=function(e){var t=e.options.groupByResource||e.options.groupByDateAndResource,r=!1;if(null!=t?r=t:e.duration&&(r=1===e.duration.as("days")),r)return n["default"]},o.getViewConfig("month").queryResourceClass=function(e){if(e.options.groupByResource||e.options.groupByDateAndResource)return i["default"]}},function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var o=r(0),n=r(20);o.getViewConfig("agenda").queryResourceClass=function(e){var t=e.options.groupByResource||e.options.groupByDateAndResource,r=!1;if(null!=t?r=t:e.duration&&(r=1===e.duration.as("days")),r)return n["default"]}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},function(e,t){Object.defineProperty(t,"__esModule",{value:!0})}])}); \ No newline at end of file diff --git a/product_rental_bookings/static/src/js/lib/tooltip.min.js b/product_rental_bookings/static/src/js/lib/tooltip.min.js new file mode 100755 index 0000000..cd9cd09 --- /dev/null +++ b/product_rental_bookings/static/src/js/lib/tooltip.min.js @@ -0,0 +1,287 @@ +/* =========================================================== + * bootstrap-tooltip.js v2.2.2 + * http://twitter.github.com/bootstrap/javascript.html#tooltips + * Inspired by the original jQuery.tipsy by Jason Frame + * =========================================================== + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================== */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* TOOLTIP PUBLIC CLASS DEFINITION + * =============================== */ + + var Tooltip = function (element, options) { + this.init('tooltip', element, options) + } + + Tooltip.prototype = { + + constructor: Tooltip + + , init: function (type, element, options) { + var eventIn + , eventOut + + this.type = type + this.$element = $(element) + this.options = this.getOptions(options) + this.enabled = true + + if (this.options.trigger == 'click') { + this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this)) + } else if (this.options.trigger != 'manual') { + eventIn = this.options.trigger == 'hover' ? 'mouseenter' : 'focus' + eventOut = this.options.trigger == 'hover' ? 'mouseleave' : 'blur' + this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this)) + this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this)) + } + + this.options.selector ? + (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) : + this.fixTitle() + } + + , getOptions: function (options) { + options = $.extend({}, $.fn[this.type].defaults, options, this.$element.data()) + + if (options.delay && typeof options.delay == 'number') { + options.delay = { + show: options.delay + , hide: options.delay + } + } + + return options + } + + , enter: function (e) { + var self = $(e.currentTarget)[this.type](this._options).data(this.type) + + if (!self.options.delay || !self.options.delay.show) return self.show() + + clearTimeout(this.timeout) + self.hoverState = 'in' + this.timeout = setTimeout(function() { + if (self.hoverState == 'in') self.show() + }, self.options.delay.show) + } + + , leave: function (e) { + var self = $(e.currentTarget)[this.type](this._options).data(this.type) + + if (this.timeout) clearTimeout(this.timeout) + if (!self.options.delay || !self.options.delay.hide) return self.hide() + + self.hoverState = 'out' + this.timeout = setTimeout(function() { + if (self.hoverState == 'out') self.hide() + }, self.options.delay.hide) + } + + , show: function () { + var $tip + , inside + , pos + , actualWidth + , actualHeight + , placement + , tp + + if (this.hasContent() && this.enabled) { + $tip = this.tip() + this.setContent() + + if (this.options.animation) { + $tip.addClass('fade') + } + + placement = typeof this.options.placement == 'function' ? + this.options.placement.call(this, $tip[0], this.$element[0]) : + this.options.placement + + inside = /in/.test(placement) + + $tip + .detach() + .css({ top: 0, left: 0, display: 'block' }) + .insertAfter(this.$element) + + pos = this.getPosition(inside) + + actualWidth = $tip[0].offsetWidth + actualHeight = $tip[0].offsetHeight + + switch (inside ? placement.split(' ')[1] : placement) { + case 'bottom': + tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2} + break + case 'top': + tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2} + break + case 'left': + tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth} + break + case 'right': + tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width} + break + } + + $tip + .offset(tp) + .addClass(placement) + .addClass('in') + } + } + + , setContent: function () { + var $tip = this.tip() + , title = this.getTitle() + + $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title) + $tip.removeClass('fade in top bottom left right') + } + + , hide: function () { + var that = this + , $tip = this.tip() + + $tip.removeClass('in') + + function removeWithAnimation() { + var timeout = setTimeout(function () { + $tip.off($.support.transition.end).detach() + }, 500) + + $tip.one($.support.transition.end, function () { + clearTimeout(timeout) + $tip.detach() + }) + } + + $.support.transition && this.$tip.hasClass('fade') ? + removeWithAnimation() : + $tip.detach() + + return this + } + + , fixTitle: function () { + var $e = this.$element + if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') { + $e.attr('data-original-title', $e.attr('title') || '').attr('title', '') + } + } + + , hasContent: function () { + return this.getTitle() + } + + , getPosition: function (inside) { + return $.extend({}, (inside ? {top: 0, left: 0} : this.$element.offset()), { + width: this.$element[0].offsetWidth + , height: this.$element[0].offsetHeight + }) + } + + , getTitle: function () { + var title + , $e = this.$element + , o = this.options + + title = $e.attr('data-original-title') + || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title) + + return title + } + + , tip: function () { + return this.$tip = this.$tip || $(this.options.template) + } + + , validate: function () { + if (!this.$element[0].parentNode) { + this.hide() + this.$element = null + this.options = null + } + } + + , enable: function () { + this.enabled = true + } + + , disable: function () { + this.enabled = false + } + + , toggleEnabled: function () { + this.enabled = !this.enabled + } + + , toggle: function (e) { + var self = $(e.currentTarget)[this.type](this._options).data(this.type) + self[self.tip().hasClass('in') ? 'hide' : 'show']() + } + + , destroy: function () { + this.hide().$element.off('.' + this.type).removeData(this.type) + } + + } + + + /* TOOLTIP PLUGIN DEFINITION + * ========================= */ + + var old = $.fn.tooltip + + $.fn.tooltip = function ( option ) { + return this.each(function () { + var $this = $(this) + , data = $this.data('tooltip') + , options = typeof option == 'object' && option + if (!data) $this.data('tooltip', (data = new Tooltip(this, options))) + if (typeof option == 'string') data[option]() + }) + } + + $.fn.tooltip.Constructor = Tooltip + + $.fn.tooltip.defaults = { + animation: true + , placement: 'top' + , selector: false + , template: '
' + , trigger: 'hover' + , title: '' + , delay: 0 + , html: false + } + + + /* TOOLTIP NO CONFLICT + * =================== */ + + $.fn.tooltip.noConflict = function () { + $.fn.tooltip = old + return this + } + +}(window.jQuery); \ No newline at end of file diff --git a/product_rental_bookings/static/src/js/product_booking_calender.js b/product_rental_bookings/static/src/js/product_booking_calender.js new file mode 100755 index 0000000..f5d1ac8 --- /dev/null +++ b/product_rental_bookings/static/src/js/product_booking_calender.js @@ -0,0 +1,451 @@ +odoo.define('product_rental_bookings.product_booking_calender', function (require) { + "use strict"; + + var AbstractAction = require('web.AbstractAction'); + var Widget = require('web.Widget'); + var rpc = require('web.rpc'); + var core = require('web.core'); + var QWeb = core.qweb; + var _t = core._t; + var ajax = require('web.ajax'); + var session = require('web.session'); + var dialogs = require('web.view_dialogs'); + var field_utils = require('web.field_utils'); + var _lt = core._lt; + var datepicker = require('web.datepicker'); + var config = require('web.config'); + var Domain = require('web.Domain'); + var DropdownMenu = require('web.DropdownMenu'); + + var ResourceView = AbstractAction.extend({ + title: core._t('Product Rental Booking'), + template: 'ResourceViewTemplate', + + init: function (parent, params) { + this._super.apply(this, arguments); + var self = this; + this.action_manager = parent; + this.params = params; + this.filtersMapping = []; + this.items = []; + this.propositions = []; + this.fields = _(fields).chain() + .map(function (val, key) { return _.extend({}, val, { 'name': key }); }) + .filter(function (field) { return !field.deprecated && field.searchable; }) + .sortBy(function (field) { return field.string; }) + .value(); + this.attrs = { _: _, fields: this.fields, selected: null }; + this.value = null; + this.items = [] + self.get_title = false; + self.resource_obj = false; + self.event_obj = false; + self.first_start = false; + self.first_end = false; + self.second_start = false; + self.second_end = false; + self.final_date = false, + self.cust_list = []; + self.color_dict = false; + self.calendar_cust_search_string = ''; + self.highlight_dates = []; + self.beautician_lst = []; + self.event_date_list = [] + var fields = {} + }, + + start: function () { + this._super.apply(this, arguments); + this.set("title", this.title); + var self = this; + this.items = []; + return this._super(); //.done(this.proxy('changed')) + }, + custom_events: { + }, + events: { + 'change #model_type_ids': 'my_method', + }, + + my_method: function (e) { + var self = this; + setTimeout(function () { + var model_id = $('#model_type_ids').val() + var moment_date = false; + rpc.query({ + model: 'rental.product.order', + method: 'get_booking_data', + args: [model_id] + }).then(function (data) { + $('#backend_resource_view').fullCalendar('destroy'); + self.prepareResourceView(false, data) + }) + }, 200) + }, + + prepareResourceView: function (moment_date, data) { + var self = this; + var resourceList = false; + var eventList = false; + var color_dict = false; + var counter = -1; + if (data) { + resourceList = data[0]; + if (data[1]) { + eventList = data[1] + } + } + self.event_obj = eventList; + self.event_date_list = eventList; + self.$el.find('#backend_resource_view').fullCalendar({ + defaultView: 'timelineWeek', + defaultDate: moment_date ? moment(moment_date).format('YYYY-MM-DD') : moment(), + aspectRatio: 5, + editable: true, + allDaySlot: false, + eventOverlap: false, + selectable: true, + height: 550, + resourceAreaWidth: "17%", + slotDuration: '00:00', + eventLimit: true, // allow "more" link when too many eventsfullcalendar + slotEventOverlap: true, + // + customButtons: { + }, + header: { + left: 'prev, today, next', + center: 'title', + right: 'month, timelineWeek', + }, + buttonText: { + month: 'Month', + today: 'Today', + }, + buttonIcons: { + prev: 'left-double-arrow', + next: 'right-double-arrow', + }, + resourceColumns: [{ + labelText: 'Products', + field: 'title' + }], + resourceGroupField: 'building', + resources: resourceList, + + + eventRender: function (event, element) { + $(element).css({ + "font-weight": "bold", + 'font-size': '12px', + 'color': 'white', + }); + if (event['rendering'] === 'background') { } else { + var id = event.resourceId; + var line_id = event.line_id; + var product_type = event.type + var product_id = event.product_id + element.prepend("
"); + } + element.find(".remove_booking").click(function (e) { + if (confirm('Are you sure you want to delete ?')) { + $('#backend_resource_view').fullCalendar('removeEvents', $(e.currentTarget).attr('data-id')); + rpc.query({ + model: 'rental.product.order', + method: 'cancel', + args: [$(e.currentTarget).attr('data-line-id')] + }, { + async: false + }).then(function (res) { + $('#backend_resource_view').fullCalendar('removeEvents', event._id); + return true; + }); + } else { } + }); + }, + + events: eventList, + + /*EVENT RESIZE*/ + + /*SELECT EVENT ON VIEW CLICK*/ + select: function (start, end, jsEvent, view, resource) { + var current_time = moment().format('YYYY-MM-DD HH:mm:ss') + var start_date = moment(start).format('YYYY-MM-DD HH:mm:ss') + var end_date = moment(end).format('YYYY-MM-DD HH:mm:ss') + var context = false + context = rpc.query({ + model: 'rental.product.order', + method: 'start_and_end_date_global', + args: [start_date, end_date], + }).then(function (sdate) { + if (sdate) { + context = { + 'default_from_date': sdate[0], + 'default_to_date': sdate[1], + 'default_is_true': true, + } + } + if (resource) { + var id = resource.id + var product_type = resource.type + var product_id = resource.product_id + var list = [[0, 0, { 'product_id': product_id }]] + context['default_product_type_id'] = 1 + context['default_product_order_lines_ids'] = list + context['default_is_true'] = true + } + var dialog = new dialogs.FormViewDialog(self, { + res_model: 'rental.product.order', + res_id: false, + title: _t("Rental Order"), + readonly: false, + context: context, + on_saved: function (record, changed) { + $('#backend_resource_view').fullCalendar('destroy'); + self.renderElement() + $('.fc-divider').find('.fc-cell-content').addClass('fc-expander'); + }, + }).open(); + }); + }, + + selectAllow: function (selectInfo) { + if (selectInfo.start.isBefore(moment().subtract(1, 'days').toDate())) + return false; + return true; + }, + viewRender: function (view, element) { + if (view.type && view.type == "customWeek") { + $('.fc-divider').find('.fc-cell-content').addClass('fc-expander'); + } + }, + }); + }, + + next_prev_today_BtnClick: function () { + var self = this; + var date = moment($('#backend_resource_view').fullCalendar('getDate')).format('YYYY-MM-DD'); + $('#backend_resource_view').fullCalendar('destroy'); + self.prepareResourceView(date); + $('.fc-divider').find('.fc-cell-content').addClass('fc-expander'); + }, + + changed: function (e) { + var nval = this.$(".o_searchview_extended_prop_field").val(); + if (this.attrs.selected === null || this.attrs.selected === undefined || nval != this.attrs.selected.name) { + this.select_field(_.detect(this.fields, function (x) { return x.name == nval; })); + } + }, + + operator_changed: function (e) { + this.value.show_inputs($(e.target)); + }, + /** + * Selects the provided field object + * + * @param field a field descriptor object (as returned by fields_get, augmented by the field name) + */ + select_field: function (field) { + var self = this; + if (this.attrs.selected !== null && this.attrs.selected !== undefined) { + this.value.destroy(); + this.value = null; + this.$('.o_searchview_extended_prop_op').html(''); + } + this.attrs.selected = field; + if (field === null || field === undefined) { + return; + } + + var type = field.type; + var Field = core.search_filters_registry.getAny([type, "char"]); + + this.value = new Field(this, field); + _.each(this.value.operators, function (operator) { + $('