diff --git a/app/DataMapper/CompanySettings.php b/app/DataMapper/CompanySettings.php index 8985205bef..bbe92d1e7b 100644 --- a/app/DataMapper/CompanySettings.php +++ b/app/DataMapper/CompanySettings.php @@ -515,8 +515,11 @@ class CompanySettings extends BaseSettings public $quote_schedule_reminder1 = ''; //before_valid_until_date,after_valid_until_date,after_quote_date public $quote_late_fee_amount1 = 0; public $quote_late_fee_percent1 = 0; + + public string $payment_flow = 'default'; //smooth public static $casts = [ + 'payment_flow' => 'string', 'enable_quote_reminder1' => 'bool', 'quote_num_days_reminder1' => 'int', 'quote_schedule_reminder1' => 'string', diff --git a/app/Http/Controllers/ClientPortal/InvoiceController.php b/app/Http/Controllers/ClientPortal/InvoiceController.php index 0d8449daae..2a22627d84 100644 --- a/app/Http/Controllers/ClientPortal/InvoiceController.php +++ b/app/Http/Controllers/ClientPortal/InvoiceController.php @@ -62,6 +62,7 @@ class InvoiceController extends Controller $invitation = $invoice->invitations()->where('client_contact_id', auth()->guard('contact')->user()->id)->first(); + // @phpstan-ignore-next-line if ($invitation && auth()->guard('contact') && ! session()->get('is_silent') && ! $invitation->viewed_date) { $invitation->markViewed(); @@ -77,13 +78,17 @@ class InvoiceController extends Controller 'key' => $invitation ? $invitation->key : false, 'hash' => $hash, 'variables' => $variables, + 'invoices' => [$invoice->hashed_id], + 'db' => $invoice->company->db, ]; if ($request->query('mode') === 'fullscreen') { return render('invoices.show-fullscreen', $data); } - return $this->render('invoices.show', $data); + return auth()->guard('contact')->user()->client->getSetting('payment_flow') == 'default' ? $this->render('invoices.show', $data) : $this->render('invoices.show_smooth', $data); + + // return $this->render('invoices.show_smooth', $data); } public function showBlob($hash) @@ -235,9 +240,12 @@ class InvoiceController extends Controller 'hashed_ids' => $invoices->pluck('hashed_id'), 'total' => $total, 'variables' => $variables, + 'invitation' => $invitation, + 'db' => $invitation->company->db, ]; - return $this->render('invoices.payment', $data); + // return $this->render('invoices.payment', $data); + return auth()->guard('contact')->user()->client->getSetting('payment_flow') === 'default' ? $this->render('invoices.payment', $data) : $this->render('invoices.show_smooth_multi', $data); } /** diff --git a/app/Livewire/BillingPortal/Authentication/Register.php b/app/Livewire/BillingPortal/Authentication/Register.php index 33c8e3d186..e6ead95bc7 100644 --- a/app/Livewire/BillingPortal/Authentication/Register.php +++ b/app/Livewire/BillingPortal/Authentication/Register.php @@ -59,7 +59,6 @@ class Register extends Component public function register(array $data) { - $service = new ClientRegisterService( company: $this->subscription->company, additional: $this->additional_fields, diff --git a/app/Livewire/Flow2/InvoicePay.php b/app/Livewire/Flow2/InvoicePay.php new file mode 100644 index 0000000000..951c010ce0 --- /dev/null +++ b/app/Livewire/Flow2/InvoicePay.php @@ -0,0 +1,286 @@ + 'name', + 'client_website' => 'website', + 'client_phone' => 'phone', + + 'client_address_line_1' => 'address1', + 'client_address_line_2' => 'address2', + 'client_city' => 'city', + 'client_state' => 'state', + 'client_postal_code' => 'postal_code', + 'client_country_id' => 'country_id', + + 'client_shipping_address_line_1' => 'shipping_address1', + 'client_shipping_address_line_2' => 'shipping_address2', + 'client_shipping_city' => 'shipping_city', + 'client_shipping_state' => 'shipping_state', + 'client_shipping_postal_code' => 'shipping_postal_code', + 'client_shipping_country_id' => 'shipping_country_id', + + 'client_custom_value1' => 'custom_value1', + 'client_custom_value2' => 'custom_value2', + 'client_custom_value3' => 'custom_value3', + 'client_custom_value4' => 'custom_value4', + + 'contact_first_name' => 'first_name', + 'contact_last_name' => 'last_name', + 'contact_email' => 'email', + // 'contact_phone' => 'phone', + ]; + + public $client_address_array = [ + 'address1', + 'address2', + 'city', + 'state', + 'postal_code', + 'country_id', + 'shipping_address1', + 'shipping_address2', + 'shipping_city', + 'shipping_state', + 'shipping_postal_code', + 'shipping_country_id', + ]; + + public $invitation_id; + + public $invoices; + + public $variables; + + public $db; + + public $settings; + + public $terms_accepted = false; + + public $signature_accepted = false; + + public $payment_method_accepted = false; + + public $under_over_payment = false; + + public $required_fields = false; + + #[On('update.context')] + public function handleContext(string $property, $value): self + { + $this->setContext(property: $property, value: $value); + + return $this; + } + + #[On('terms-accepted')] + public function termsAccepted() + { + nlog("Terms accepted"); + // $this->invite = \App\Models\InvoiceInvitation::withTrashed()->find($this->invitation_id)->withoutRelations(); + $this->terms_accepted = true; + } + + #[On('signature-captured')] + public function signatureCaptured($base64) + { + nlog("signature captured"); + + $this->signature_accepted = true; + $invite = \App\Models\InvoiceInvitation::withTrashed()->find($this->invitation_id); + $invite->signature_base64 = $base64; + $invite->signature_date = now()->addSeconds($invite->contact->client->timezone_offset()); + $this->setContext('signature', $base64); // $this->context['signature'] = $base64; + $invite->save(); + + } + + #[On('payable-amount')] + public function payableAmount($payable_amount) + { + // $this->setContext('payable_invoices.0.amount', Number::parseFloat($payable_amount)); // $this->context['payable_invoices'][0]['amount'] = Number::parseFloat($payable_amount); //TODO DB: check parseFloat() + $this->under_over_payment = false; + } + + #[On('payment-method-selected')] + public function paymentMethodSelected($company_gateway_id, $gateway_type_id, $amount) + { + $this->setContext('company_gateway_id', $company_gateway_id); + $this->setContext('gateway_type_id', $gateway_type_id); + $this->setContext('amount', $amount); + $this->setContext('pre_payment', false); + $this->setContext('is_recurring', false); + $this->setContext('invitation_id', $this->invitation_id); + + $this->payment_method_accepted = true; + + $company_gateway = CompanyGateway::find($company_gateway_id); + + $this->checkRequiredFields($company_gateway); + } + + #[On('required-fields')] + public function requiredFieldsFilled() + { + $this->required_fields = false; + } + + private function checkRequiredFields(CompanyGateway $company_gateway) + { + + $fields = $company_gateway->driver()->getClientRequiredFields(); + + $this->setContext('fields', $fields); // $this->context['fields'] = $fields; + + if ($company_gateway->always_show_required_fields) { + return $this->required_fields = true; + } + + $contact = $this->getContext()['contact']; + + foreach ($fields as $index => $field) { + $_field = $this->mappings[$field['name']]; + + if (\Illuminate\Support\Str::startsWith($field['name'], 'client_')) { + if ( + empty($contact->client->{$_field}) + || is_null($contact->client->{$_field}) + ) { + + return $this->required_fields = true; + + } + } + + if (\Illuminate\Support\Str::startsWith($field['name'], 'contact_')) { + if (empty($contact->{$_field}) || is_null($contact->{$_field}) || str_contains($contact->{$_field}, '@example.com')) { + return $this->required_fields = true; + } + } + } + + return $this->required_fields = false; + + } + + #[Computed()] + public function component(): string + { + if (!$this->terms_accepted) { + return Terms::class; + } + + if (!$this->signature_accepted) { + return Signature::class; + } + + if ($this->under_over_payment) { + return UnderOverPayment::class; + } + + if (!$this->payment_method_accepted) { + return PaymentMethod::class; + } + + if ($this->required_fields) { + return RequiredFields::class; + } + + return ProcessPayment::class; + } + + #[Computed()] + public function componentUniqueId(): string + { + return "purchase-" . md5(microtime()); + } + + public function mount() + { + $this->resetContext(); + + MultiDB::setDb($this->db); + + // @phpstan-ignore-next-line + $invite = \App\Models\InvoiceInvitation::with('contact.client', 'company')->withTrashed()->find($this->invitation_id); + $client = $invite->contact->client; + $settings = $client->getMergedSettings(); + $this->setContext('contact', $invite->contact); // $this->context['contact'] = $invite->contact; + $this->setContext('settings', $settings); // $this->context['settings'] = $settings; + $this->setContext('db', $this->db); // $this->context['db'] = $this->db; + + nlog($this->invoices); + + if(is_array($this->invoices)) + $this->invoices = Invoice::find($this->transformKeys($this->invoices)); + + $invoices = $this->invoices->filter(function ($i) { + $i = $i->service() + ->markSent() + ->removeUnpaidGatewayFees() + ->save(); + + return $i->isPayable(); + }); + + //under-over / payment + + //required fields + $this->terms_accepted = !$settings->show_accept_invoice_terms; + $this->signature_accepted = !$settings->require_invoice_signature; + $this->under_over_payment = $settings->client_portal_allow_over_payment || $settings->client_portal_allow_under_payment; + $this->required_fields = false; + + $this->setContext('variables', $this->variables); // $this->context['variables'] = $this->variables; + $this->setContext('invoices', $invoices); // $this->context['invoices'] = $invoices; + $this->setContext('settings', $settings); // $this->context['settings'] = $settings; + $this->setContext('invitation', $invite); // $this->context['invitation'] = $invite; + + $payable_invoices = $invoices->map(function ($i) { + /** @var \App\Models\Invoice $i */ + return [ + 'invoice_id' => $i->hashed_id, + 'amount' => $i->partial > 0 ? $i->partial : $i->balance, + 'formatted_amount' => Number::formatValue($i->partial > 0 ? $i->partial : $i->balance, $i->client->currency()), + 'number' => $i->number, + 'date' => $i->translateDate($i->date, $i->client->date_format(), $i->client->locale()) + ]; + })->toArray(); + + $this->setContext('payable_invoices', $payable_invoices); + } + + public function render(): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + { + return render('flow2.invoice-pay'); + } +} diff --git a/app/Livewire/Flow2/InvoiceSummary.php b/app/Livewire/Flow2/InvoiceSummary.php new file mode 100644 index 0000000000..51681737b2 --- /dev/null +++ b/app/Livewire/Flow2/InvoiceSummary.php @@ -0,0 +1,47 @@ +invoices = $this->getContext()['invoices']; // $this->context['invitation']->invoice; + } + + #[On(self::CONTEXT_UPDATE)] + public function onContextUpdate(): void + { + // refactor logic for updating the price for eg if it changes with under/over pay + + $this->invoices = $this->getContext()['invoices']; + } + + public function render(): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + { + return render('flow2.invoices-summary', [ + 'invoice' => $this->invoices, + 'client' => $this->invoices->first()->client, + ]); + + } +} diff --git a/app/Livewire/Flow2/PaymentMethod.php b/app/Livewire/Flow2/PaymentMethod.php new file mode 100644 index 0000000000..2014159e98 --- /dev/null +++ b/app/Livewire/Flow2/PaymentMethod.php @@ -0,0 +1,78 @@ + + + + + + + HTML; + } + + public function handleSelect(string $company_gateway_id, string $gateway_type_id, string $amount) + { + $this->isLoading = true; + + $this->dispatch( + event: 'payment-method-selected', + company_gateway_id: $company_gateway_id, + gateway_type_id: $gateway_type_id, + amount: $amount, + ); + } + + public function mount() + { + $this->variables = $this->getContext()['variables']; + $this->amount = array_sum(array_column($this->getContext()['payable_invoices'], 'amount')); + + MultiDB::setDb($this->getContext()['db']); + + $this->methods = $this->getContext()['invitation']->contact->client->service()->getPaymentMethods($this->amount); + + if (count($this->methods) == 1) { + $this->dispatch('singlePaymentMethodFound', company_gateway_id: $this->methods[0]['company_gateway_id'], gateway_type_id: $this->methods[0]['gateway_type_id'], amount: $this->amount); + } else { + $this->isLoading = false; + $this->dispatch('loadingCompleted'); + } + } + + public function render(): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + { + return render('flow2.payment-method', ['methods' => $this->methods]); + } +} diff --git a/app/Livewire/Flow2/ProcessPayment.php b/app/Livewire/Flow2/ProcessPayment.php new file mode 100644 index 0000000000..8598357520 --- /dev/null +++ b/app/Livewire/Flow2/ProcessPayment.php @@ -0,0 +1,86 @@ +getContext()['db']); + + $invitation = InvoiceInvitation::find($this->getContext()['invitation_id']); + + $data = [ + 'company_gateway_id' => $this->getContext()['company_gateway_id'], + 'payment_method_id' => $this->getContext()['gateway_type_id'], + 'payable_invoices' => $this->getContext()['payable_invoices'], + 'signature' => isset($this->getContext()['signature']) ? $this->getContext()['signature'] : false, + 'signature_ip' => isset($this->getContext()['signature_ip']) ? $this->getContext()['signature_ip'] : false, + 'pre_payment' => false, + 'frequency_id' => false, + 'remaining_cycles' => false, + 'is_recurring' => false, + // 'hash' => false, + ]; + + $responder_data = (new LivewireInstantPayment($data))->run(); + + $company_gateway = CompanyGateway::find($this->getContext()['company_gateway_id']); + + if (!$responder_data['success']) { + throw new PaymentFailed($responder_data['error'], 400); + } + + $driver = $company_gateway + ->driver($invitation->contact->client) + ->setPaymentMethod($data['payment_method_id']) + ->setPaymentHash($responder_data['payload']['ph']); + + $this->payment_data_payload = $driver->processPaymentViewData($responder_data['payload']); + + $this->payment_view = $driver->livewirePaymentView( + $this->payment_data_payload, + ); + + $this->isLoading = false; + + } + + public function render(): \Illuminate\Contracts\View\Factory|string|\Illuminate\View\View + { + if ($this->isLoading) { + return <<<'HTML' + + HTML; + } + + return render($this->payment_view, $this->payment_data_payload); + } +} diff --git a/app/Livewire/Flow2/RequiredFields.php b/app/Livewire/Flow2/RequiredFields.php new file mode 100644 index 0000000000..5cce417df6 --- /dev/null +++ b/app/Livewire/Flow2/RequiredFields.php @@ -0,0 +1,136 @@ + */ + public array $fields = []; + + public bool $is_loading = true; + + public array $errors = []; + + public function mount(): void + { + MultiDB::setDB( + $this->getContext()['db'], + ); + + $this->fields = $this->getContext()['fields']; + + $this->company_gateway = CompanyGateway::withTrashed() + ->with('company') + ->find($this->getContext()['company_gateway_id']); + + $contact = auth()->user(); + + $this->client_name = $contact->client->name; + $this->contact_first_name = $contact->first_name; + $this->contact_last_name = $contact->last_name; + $this->contact_email = $contact->email; + $this->client_phone = $contact->client->phone; + $this->client_address_line_1 = $contact->client->address1; + $this->client_city = $contact->client->city; + $this->client_state = $contact->client->state; + $this->client_country_id = $contact->client->country_id; + $this->client_postal_code = $contact->client->postal_code; + $this->client_shipping_address_line_1 = $contact->client->shipping_address1; + $this->client_shipping_city = $contact->client->shipping_city; + $this->client_shipping_state = $contact->client->shipping_state; + $this->client_shipping_postal_code = $contact->client->shipping_postal_code; + $this->client_shipping_country_id = $contact->client->shipping_country_id; + $this->client_custom_value1 = $contact->client->custom_value1; + $this->client_custom_value2 = $contact->client->custom_value2; + $this->client_custom_value3 = $contact->client->custom_value3; + $this->client_custom_value4 = $contact->client->custom_value4; + + $rff = new RFFService( + fields: $this->getContext()['fields'], + database: $this->getContext()['db'], + company_gateway_id: $this->company_gateway->id, + ); + + /** @var \App\Models\ClientContact $contact */ + $rff->check($contact); + + if ($rff->unfilled_fields === 0) { + $this->dispatch('required-fields'); + } + + if ($rff->unfilled_fields > 0) { + $this->is_loading = false; + } + } + + public function handleSubmit(array $data) + { + $this->errors = []; + $this->is_loading = true; + + $rff = new RFFService( + fields: $this->fields, + database: $this->getContext()['db'], + company_gateway_id: $this->company_gateway->id, + ); + + $contact = auth()->user(); + + /** @var \App\Models\ClientContact $contact */ + $errors = $rff->handleSubmit($data, $contact, return_errors: true, callback: function () { + $this->dispatch('required-fields'); + }); + + if (is_array($errors) && count($errors)) { + $this->errors = $errors; + $this->is_loading = false; + } + } + + public function render(): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + { + return render('flow2.required-fields', [ + 'contact' => $this->getContext()['contact'], + ]); + } +} diff --git a/app/Livewire/Flow2/Signature.php b/app/Livewire/Flow2/Signature.php new file mode 100644 index 0000000000..33f1ed5040 --- /dev/null +++ b/app/Livewire/Flow2/Signature.php @@ -0,0 +1,25 @@ +invoice = $this->getContext()['invoices']->first(); + $this->variables = $this->getContext()['variables']; + } + + public function render() + { + return render('components.livewire.terms'); + } +} diff --git a/app/Livewire/Flow2/UnderOverPayment.php b/app/Livewire/Flow2/UnderOverPayment.php new file mode 100644 index 0000000000..31ec54cb69 --- /dev/null +++ b/app/Livewire/Flow2/UnderOverPayment.php @@ -0,0 +1,78 @@ +invoice_amount = array_sum(array_column($this->getContext()['payable_invoices'], 'amount')); + $this->currency = $this->getContext()['invitation']->contact->client->currency(); + $this->payableInvoices = $this->getContext()['payable_invoices']; + } + + public function checkValue(array $payableInvoices) + { + $this->errors = ''; + + $settings = $this->getContext()['settings']; + + foreach($payableInvoices as $key => $invoice){ + $payableInvoices[$key]['amount'] = Number::parseFloat($invoice['formatted_amount']); + } + + $input_amount = collect($payableInvoices)->sum('amount'); + + if($settings->client_portal_allow_under_payment && $settings->client_portal_under_payment_minimum != 0) + { + if($input_amount <= $settings->client_portal_under_payment_minimum){ + // return error message under payment too low. + $this->errors = ctrans('texts.minimum_required_payment', ['amount' => $settings->client_portal_under_payment_minimum]); + $this->dispatch('errorMessageUpdate', errors: $this->errors); + } + } + + if(!$settings->client_portal_allow_over_payment && ($input_amount > $this->invoice_amount)){ + $this->errors = ctrans('texts.over_payments_disabled'); + $this->dispatch('errorMessageUpdate', errors: $this->errors); + } + + if(!$this->errors){ + $this->setContext('payable_invoices', $payableInvoices); + $this->dispatch('payable-amount', payable_amount: $input_amount ); + } + } + + public function render(): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + { + return render('flow2.under-over-payments'); + } +} diff --git a/app/PaymentDrivers/Authorize/AuthorizeCreditCard.php b/app/PaymentDrivers/Authorize/AuthorizeCreditCard.php index 8260e71efa..0c259bf4d5 100644 --- a/app/PaymentDrivers/Authorize/AuthorizeCreditCard.php +++ b/app/PaymentDrivers/Authorize/AuthorizeCreditCard.php @@ -21,6 +21,7 @@ use App\Models\PaymentHash; use App\Models\PaymentType; use App\Models\SystemLog; use App\PaymentDrivers\AuthorizePaymentDriver; +use App\PaymentDrivers\Common\LivewireMethodInterface; use App\Utils\Traits\MakesHash; use net\authorize\api\contract\v1\DeleteCustomerPaymentProfileRequest; use net\authorize\api\contract\v1\DeleteCustomerProfileRequest; @@ -30,7 +31,7 @@ use net\authorize\api\controller\DeleteCustomerProfileController; /** * Class AuthorizeCreditCard. */ -class AuthorizeCreditCard +class AuthorizeCreditCard implements LivewireMethodInterface { use MakesHash; @@ -41,7 +42,7 @@ class AuthorizeCreditCard $this->authorize = $authorize; } - public function processPaymentView($data) + public function paymentData(array $data): array { $tokens = ClientGatewayToken::where('client_id', $this->authorize->client->id) ->where('company_gateway_id', $this->authorize->company_gateway->id) @@ -54,6 +55,13 @@ class AuthorizeCreditCard $data['public_client_id'] = $this->authorize->init()->getPublicClientKey(); $data['api_login_id'] = $this->authorize->company_gateway->getConfigField('apiLoginId'); + return $data; + } + + public function processPaymentView($data) + { + $data = $this->paymentData($data); + return render('gateways.authorize.credit_card.pay', $data); } @@ -313,4 +321,9 @@ class AuthorizeCreditCard 'invoices' => $vars['invoices'], ]; } + + public function livewirePaymentView(array $data): string + { + return 'gateways.authorize.credit_card.pay_livewire'; + } } diff --git a/app/PaymentDrivers/BTCPay/BTCPay.php b/app/PaymentDrivers/BTCPay/BTCPay.php index 8b5b3a07af..99d35c729f 100644 --- a/app/PaymentDrivers/BTCPay/BTCPay.php +++ b/app/PaymentDrivers/BTCPay/BTCPay.php @@ -14,6 +14,7 @@ namespace App\PaymentDrivers\BTCPay; use App\Models\Payment; use App\PaymentDrivers\BTCPayPaymentDriver; +use App\PaymentDrivers\Common\LivewireMethodInterface; use App\Utils\Traits\MakesHash; use App\PaymentDrivers\Common\MethodInterface; use App\Http\Requests\ClientPortal\Payments\PaymentResponseRequest; @@ -24,7 +25,7 @@ use App\Services\Email\EmailObject; use App\Services\Email\Email; use Illuminate\Support\Facades\App; -class BTCPay implements MethodInterface +class BTCPay implements MethodInterface, LivewireMethodInterface { use MakesHash; @@ -49,9 +50,7 @@ class BTCPay implements MethodInterface public function paymentView($data) { - $data['gateway'] = $this->driver_class; - $data['amount'] = $data['total']['amount_with_fee']; - $data['currency'] = $this->driver_class->client->getCurrencyCode(); + $data = $this->paymentData($data); return render('gateways.btcpay.pay', $data); } @@ -176,4 +175,24 @@ class BTCPay implements MethodInterface throw new PaymentFailed('Error during BTCPay refund : ' . $e->getMessage()); } } + + /** + * @inheritDoc + */ + public function livewirePaymentView(array $data): string + { + return 'gateways.btcpay.pay_livewire'; + } + + /** + * @inheritDoc + */ + public function paymentData(array $data): array + { + $data['gateway'] = $this->driver_class; + $data['amount'] = $data['total']['amount_with_fee']; + $data['currency'] = $this->driver_class->client->getCurrencyCode(); + + return $data; + } } diff --git a/app/PaymentDrivers/BaseDriver.php b/app/PaymentDrivers/BaseDriver.php index e7ea1efd83..7ba0012082 100644 --- a/app/PaymentDrivers/BaseDriver.php +++ b/app/PaymentDrivers/BaseDriver.php @@ -867,4 +867,14 @@ class BaseDriver extends AbstractPaymentDriver { } + + public function livewirePaymentView(array $data): string + { + return $this->payment_method->livewirePaymentView($data); + } + + public function processPaymentViewData(array $data): array + { + return $this->payment_method->paymentData($data); + } } diff --git a/app/PaymentDrivers/Braintree/ACH.php b/app/PaymentDrivers/Braintree/ACH.php index bbd854291d..e5527049a5 100644 --- a/app/PaymentDrivers/Braintree/ACH.php +++ b/app/PaymentDrivers/Braintree/ACH.php @@ -20,11 +20,12 @@ use App\Models\Payment; use App\Models\PaymentType; use App\Models\SystemLog; use App\PaymentDrivers\BraintreePaymentDriver; +use App\PaymentDrivers\Common\LivewireMethodInterface; use App\PaymentDrivers\Common\MethodInterface; use App\Utils\Traits\MakesHash; use Illuminate\Http\Request; -class ACH implements MethodInterface +class ACH implements MethodInterface, LivewireMethodInterface { use MakesHash; @@ -97,10 +98,7 @@ class ACH implements MethodInterface public function paymentView(array $data) { - $data['gateway'] = $this->braintree; - $data['currency'] = $this->braintree->client->getCurrencyCode(); - $data['payment_method_id'] = GatewayType::BANK_TRANSFER; - $data['amount'] = $this->braintree->payment_hash->data->amount_with_fee; + $data = $this->paymentData($data); return render('gateways.braintree.ach.pay', $data); } @@ -181,4 +179,24 @@ class ACH implements MethodInterface throw new PaymentFailed($response->transaction->additionalProcessorResponse, $response->transaction->processorResponseCode); } + /** + * @inheritDoc + */ + public function livewirePaymentView(array $data): string + { + return 'gateways.braintree.ach.pay_livewire'; + } + + /** + * @inheritDoc + */ + public function paymentData(array $data): array + { + $data['gateway'] = $this->braintree; + $data['currency'] = $this->braintree->client->getCurrencyCode(); + $data['payment_method_id'] = GatewayType::BANK_TRANSFER; + $data['amount'] = $this->braintree->payment_hash->data->amount_with_fee; + + return $data; + } } diff --git a/app/PaymentDrivers/Braintree/CreditCard.php b/app/PaymentDrivers/Braintree/CreditCard.php index 3ab0fdbe3d..b80b026a9e 100644 --- a/app/PaymentDrivers/Braintree/CreditCard.php +++ b/app/PaymentDrivers/Braintree/CreditCard.php @@ -21,8 +21,9 @@ use App\Models\Payment; use App\Models\PaymentType; use App\Models\SystemLog; use App\PaymentDrivers\BraintreePaymentDriver; +use App\PaymentDrivers\Common\LivewireMethodInterface; -class CreditCard +class CreditCard implements LivewireMethodInterface { /** * @var BraintreePaymentDriver @@ -76,6 +77,7 @@ class CreditCard public function paymentView(array $data) { +<<<<<<< HEAD $data['gateway'] = $this->braintree; $data['client_token'] = $this->braintree->gateway->clientToken()->generate(); $data['threeds'] = $this->threeDParameters($data); @@ -87,6 +89,9 @@ class CreditCard 'merchantAccountId' => $this->braintree->company_gateway->getConfigField('merchantAccountId'), ]); } +======= + $data = $this->paymentData($data); +>>>>>>> new_payment_flow return render('gateways.braintree.credit_card.pay', $data); } @@ -278,4 +283,32 @@ class CreditCard return $this->braintree->processInternallyFailedPayment($this->braintree, $e); } } + + /** + * @inheritDoc + */ + public function livewirePaymentView(array $data): string + { + return 'gateways.braintree.credit_card.pay_livewire'; + } + + /** + * @inheritDoc + */ + public function paymentData(array $data): array + { + $data['gateway'] = $this->braintree; + $data['client_token'] = $this->braintree->gateway->clientToken()->generate(); + $data['threeds'] = $this->threeDParameters($data); + $data['threeds_enable'] = $this->braintree->company_gateway->getConfigField('threeds') ? "true" : "false"; + + if ($this->braintree->company_gateway->getConfigField('merchantAccountId')) { + /** https://developer.paypal.com/braintree/docs/reference/request/client-token/generate#merchant_account_id */ + $data['client_token'] = $this->braintree->gateway->clientToken()->generate([ + 'merchantAccountId' => $this->braintree->company_gateway->getConfigField('merchantAccountId'), + ]); + } + + return $data; + } } diff --git a/app/PaymentDrivers/Braintree/PayPal.php b/app/PaymentDrivers/Braintree/PayPal.php index 6de57c1f15..2ad3851548 100644 --- a/app/PaymentDrivers/Braintree/PayPal.php +++ b/app/PaymentDrivers/Braintree/PayPal.php @@ -10,8 +10,9 @@ use App\Models\Payment; use App\Models\PaymentType; use App\Models\SystemLog; use App\PaymentDrivers\BraintreePaymentDriver; +use App\PaymentDrivers\Common\LivewireMethodInterface; -class PayPal +class PayPal implements LivewireMethodInterface { /** * @var BraintreePaymentDriver @@ -45,8 +46,7 @@ class PayPal */ public function paymentView(array $data) { - $data['gateway'] = $this->braintree; - $data['client_token'] = $this->braintree->gateway->clientToken()->generate(); + $data = $this->paymentData($data); return render('gateways.braintree.paypal.pay', $data); } @@ -188,4 +188,23 @@ class PayPal return $this->braintree->processInternallyFailedPayment($this->braintree, $e); } } + + /** + * @inheritDoc + */ + public function livewirePaymentView(array $data): string + { + return 'gateways.braintree.paypal.pay_livewire'; + } + + /** + * @inheritDoc + */ + public function paymentData(array $data): array + { + $data['gateway'] = $this->braintree; + $data['client_token'] = $this->braintree->gateway->clientToken()->generate(); + + return $data; + } } diff --git a/app/PaymentDrivers/CheckoutCom/CreditCard.php b/app/PaymentDrivers/CheckoutCom/CreditCard.php index c19acab18e..bd3b7dbb68 100644 --- a/app/PaymentDrivers/CheckoutCom/CreditCard.php +++ b/app/PaymentDrivers/CheckoutCom/CreditCard.php @@ -19,6 +19,7 @@ use App\Models\ClientGatewayToken; use App\Models\GatewayType; use App\Models\SystemLog; use App\PaymentDrivers\CheckoutComPaymentDriver; +use App\PaymentDrivers\Common\LivewireMethodInterface; use App\PaymentDrivers\Common\MethodInterface; use App\Utils\Traits\MakesHash; use Checkout\CheckoutApiException; @@ -32,7 +33,7 @@ use Illuminate\Contracts\View\Factory; use Illuminate\Http\Request; use Illuminate\View\View; -class CreditCard implements MethodInterface +class CreditCard implements MethodInterface, LivewireMethodInterface { use Utilities; use MakesHash; @@ -140,7 +141,7 @@ class CreditCard implements MethodInterface } } - public function paymentView($data) + public function paymentData(array $data): array { $data['gateway'] = $this->checkout; $data['company_gateway'] = $this->checkout->company_gateway; @@ -150,9 +151,25 @@ class CreditCard implements MethodInterface $data['raw_value'] = $data['total']['amount_with_fee']; $data['customer_email'] = $this->checkout->client->present()->email(); + return $data; + } + + public function paymentView($data, $livewire = false) + { + $data = $this->paymentData($data); + + if ($livewire) { + return render('gateways.checkout.credit_card.pay_livewire', $data); + } + return render('gateways.checkout.credit_card.pay', $data); } + public function livewirePaymentView(array $data): string + { + return 'gateways.checkout.credit_card.livewire_pay'; + } + public function paymentResponse(PaymentResponseRequest $request) { $state = [ diff --git a/app/PaymentDrivers/CheckoutComPaymentDriver.php b/app/PaymentDrivers/CheckoutComPaymentDriver.php index 12dd66244f..72d31a7c41 100644 --- a/app/PaymentDrivers/CheckoutComPaymentDriver.php +++ b/app/PaymentDrivers/CheckoutComPaymentDriver.php @@ -12,6 +12,7 @@ namespace App\PaymentDrivers; +use App\PaymentDrivers\Common\LivewireMethodInterface; use Exception; use App\Models\Company; use App\Models\Invoice; diff --git a/app/PaymentDrivers/Common/LivewireMethodInterface.php b/app/PaymentDrivers/Common/LivewireMethodInterface.php new file mode 100644 index 0000000000..ca23ca75dd --- /dev/null +++ b/app/PaymentDrivers/Common/LivewireMethodInterface.php @@ -0,0 +1,30 @@ +eway_driver; $data['public_api_key'] = $this->eway_driver->company_gateway->getConfigField('publicApiKey'); + return $data; + } + + public function paymentView($data) + { + $data = $this->paymentData($data); + return render('gateways.eway.pay', $data); } @@ -276,4 +284,8 @@ class CreditCard return $payment; } + public function livewirePaymentView(array $data): string + { + return 'gateways.eway.pay_livewire'; + } } diff --git a/app/PaymentDrivers/Forte/ACH.php b/app/PaymentDrivers/Forte/ACH.php index 8ea313e772..750ffdd0f3 100644 --- a/app/PaymentDrivers/Forte/ACH.php +++ b/app/PaymentDrivers/Forte/ACH.php @@ -19,11 +19,12 @@ use App\Models\Payment; use App\Models\PaymentHash; use App\Models\PaymentType; use App\Models\SystemLog; +use App\PaymentDrivers\Common\LivewireMethodInterface; use App\PaymentDrivers\FortePaymentDriver; use App\Utils\Traits\MakesHash; use Illuminate\Support\Facades\Validator; -class ACH +class ACH implements LivewireMethodInterface { use MakesHash; @@ -79,10 +80,8 @@ class ACH public function paymentView(array $data) { - $this->forte->payment_hash->data = array_merge((array) $this->forte->payment_hash->data, $data); - $this->forte->payment_hash->save(); + $data = $this->paymentData($data); - $data['gateway'] = $this->forte; return render('gateways.forte.ach.pay', $data); } @@ -175,4 +174,25 @@ class ACH return redirect()->route('client.payments.show', ['payment' => $payment->hashed_id]); } + + /** + * @inheritDoc + */ + public function livewirePaymentView(array $data): string + { + return 'gateways.forte.ach.pay_livewire'; + } + + /** + * @inheritDoc + */ + public function paymentData(array $data): array + { + $this->forte->payment_hash->data = array_merge((array) $this->forte->payment_hash->data, $data); + $this->forte->payment_hash->save(); + + $data['gateway'] = $this->forte; + + return $data; + } } diff --git a/app/PaymentDrivers/Forte/CreditCard.php b/app/PaymentDrivers/Forte/CreditCard.php index 16ceb030fd..7e0e04af8a 100644 --- a/app/PaymentDrivers/Forte/CreditCard.php +++ b/app/PaymentDrivers/Forte/CreditCard.php @@ -20,11 +20,12 @@ use App\Models\Payment; use App\Models\PaymentHash; use App\Models\PaymentType; use App\Models\SystemLog; +use App\PaymentDrivers\Common\LivewireMethodInterface; use App\PaymentDrivers\FortePaymentDriver; use App\Utils\Traits\MakesHash; use Illuminate\Support\Facades\Validator; -class CreditCard +class CreditCard implements LivewireMethodInterface { use MakesHash; @@ -157,10 +158,8 @@ class CreditCard public function paymentView(array $data) { - $this->forte->payment_hash->data = array_merge((array) $this->forte->payment_hash->data, $data); - $this->forte->payment_hash->save(); - - $data['gateway'] = $this->forte; + $data = $this->paymentData($data); + return render('gateways.forte.credit_card.pay', $data); } @@ -287,4 +286,25 @@ class CreditCard return redirect()->route('client.payments.show', ['payment' => $payment->hashed_id]); } + + /** + * @inheritDoc + */ + public function livewirePaymentView(array $data): string + { + return 'gateways.forte.credit_card.pay_livewire'; + } + + /** + * @inheritDoc + */ + public function paymentData(array $data): array + { + $this->forte->payment_hash->data = array_merge((array) $this->forte->payment_hash->data, $data); + $this->forte->payment_hash->save(); + + $data['gateway'] = $this->forte; + + return $data; + } } diff --git a/app/PaymentDrivers/GoCardless/ACH.php b/app/PaymentDrivers/GoCardless/ACH.php index e52e8ce541..9a8d051373 100644 --- a/app/PaymentDrivers/GoCardless/ACH.php +++ b/app/PaymentDrivers/GoCardless/ACH.php @@ -20,6 +20,7 @@ use App\Models\Invoice; use App\Models\Payment; use App\Models\PaymentType; use App\Models\SystemLog; +use App\PaymentDrivers\Common\LivewireMethodInterface; use App\PaymentDrivers\Common\MethodInterface; use App\PaymentDrivers\GoCardlessPaymentDriver; use App\Utils\Traits\MakesHash; @@ -31,7 +32,7 @@ use Illuminate\Routing\Redirector; use Illuminate\View\View; //@deprecated -class ACH implements MethodInterface +class ACH implements MethodInterface, LivewireMethodInterface { use MakesHash; @@ -146,9 +147,7 @@ class ACH implements MethodInterface */ public function paymentView(array $data): View { - $data['gateway'] = $this->go_cardless; - $data['amount'] = $this->go_cardless->convertToGoCardlessAmount($data['total']['amount_with_fee'], $this->go_cardless->client->currency()->precision); - $data['currency'] = $this->go_cardless->client->getCurrencyCode(); + $data = $this->paymentData($data); return render('gateways.gocardless.ach.pay', $data); } @@ -257,4 +256,23 @@ class ACH implements MethodInterface throw new PaymentFailed('Failed to process the payment.', 500); } + /** + * @inheritDoc + */ + public function livewirePaymentView(array $data): string + { + return 'gateways.gocardless.ach.pay_livewire'; + } + + /** + * @inheritDoc + */ + public function paymentData(array $data): array + { + $data['gateway'] = $this->go_cardless; + $data['amount'] = $this->go_cardless->convertToGoCardlessAmount($data['total']['amount_with_fee'], $this->go_cardless->client->currency()->precision); + $data['currency'] = $this->go_cardless->client->getCurrencyCode(); + + return $data; + } } diff --git a/app/PaymentDrivers/GoCardless/DirectDebit.php b/app/PaymentDrivers/GoCardless/DirectDebit.php index ab67f28622..a7c17e608f 100644 --- a/app/PaymentDrivers/GoCardless/DirectDebit.php +++ b/app/PaymentDrivers/GoCardless/DirectDebit.php @@ -21,6 +21,7 @@ use App\Models\Invoice; use App\Models\Payment; use App\Models\PaymentType; use App\Models\SystemLog; +use App\PaymentDrivers\Common\LivewireMethodInterface; use App\PaymentDrivers\Common\MethodInterface; use App\PaymentDrivers\GoCardlessPaymentDriver; use App\Utils\Traits\MakesHash; @@ -29,7 +30,7 @@ use Illuminate\Http\Request; use Illuminate\Routing\Redirector; use Illuminate\View\View; -class DirectDebit implements MethodInterface +class DirectDebit implements MethodInterface, LivewireMethodInterface { use MakesHash; @@ -218,9 +219,7 @@ class DirectDebit implements MethodInterface */ public function paymentView(array $data): View { - $data['gateway'] = $this->go_cardless; - $data['amount'] = $this->go_cardless->convertToGoCardlessAmount($data['total']['amount_with_fee'], $this->go_cardless->client->currency()->precision); - $data['currency'] = $this->go_cardless->client->getCurrencyCode(); + $data = $this->paymentData($data); return render('gateways.gocardless.direct_debit.pay', $data); } @@ -330,4 +329,24 @@ class DirectDebit implements MethodInterface throw new PaymentFailed('Failed to process the payment.', 500); } + + /** + * @inheritDoc + */ + public function livewirePaymentView(array $data): string + { + return 'gateways.gocardless.direct_debit.pay_livewire'; + } + + /** + * @inheritDoc + */ + public function paymentData(array $data): array + { + $data['gateway'] = $this->go_cardless; + $data['amount'] = $this->go_cardless->convertToGoCardlessAmount($data['total']['amount_with_fee'], $this->go_cardless->client->currency()->precision); + $data['currency'] = $this->go_cardless->client->getCurrencyCode(); + + return $data; + } } diff --git a/app/PaymentDrivers/GoCardless/InstantBankPay.php b/app/PaymentDrivers/GoCardless/InstantBankPay.php index 9133a47a68..b5688e3d9f 100644 --- a/app/PaymentDrivers/GoCardless/InstantBankPay.php +++ b/app/PaymentDrivers/GoCardless/InstantBankPay.php @@ -9,13 +9,14 @@ use App\Models\GatewayType; use App\Models\Payment; use App\Models\PaymentType; use App\Models\SystemLog; +use App\PaymentDrivers\Common\LivewireMethodInterface; use App\PaymentDrivers\Common\MethodInterface; use App\PaymentDrivers\GoCardlessPaymentDriver; use Illuminate\Contracts\Container\BindingResolutionException; use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; -class InstantBankPay implements MethodInterface +class InstantBankPay implements MethodInterface, LivewireMethodInterface { protected GoCardlessPaymentDriver $go_cardless; @@ -194,9 +195,8 @@ class InstantBankPay implements MethodInterface * Process unsuccessful payments for Direct Debit. * * @param ResourcesPayment $payment - * @return never */ - public function processUnsuccessfulPayment(\GoCardlessPro\Resources\Payment $payment) + public function processUnsuccessfulPayment(\GoCardlessPro\Resources\Payment $payment): void { PaymentFailureMailer::dispatch($this->go_cardless->client, $payment->status, $this->go_cardless->client->company, $this->go_cardless->payment_hash->data->amount_with_fee); @@ -221,4 +221,24 @@ class InstantBankPay implements MethodInterface $this->go_cardless->client->company, ); } + + /** + * @inheritDoc + */ + public function livewirePaymentView(array $data): string + { + // not supported, this is offsite payment method. + + return ''; + } + + /** + * @inheritDoc + */ + public function paymentData(array $data): array + { + $this->paymentView($data); + + return $data; + } } diff --git a/app/PaymentDrivers/GoCardless/SEPA.php b/app/PaymentDrivers/GoCardless/SEPA.php index d0f81228ce..d2a797e807 100644 --- a/app/PaymentDrivers/GoCardless/SEPA.php +++ b/app/PaymentDrivers/GoCardless/SEPA.php @@ -20,6 +20,7 @@ use App\Models\Invoice; use App\Models\Payment; use App\Models\PaymentType; use App\Models\SystemLog; +use App\PaymentDrivers\Common\LivewireMethodInterface; use App\PaymentDrivers\Common\MethodInterface; use App\PaymentDrivers\GoCardlessPaymentDriver; use App\Utils\Traits\MakesHash; @@ -29,7 +30,7 @@ use Illuminate\Http\Request; use Illuminate\Routing\Redirector; use Illuminate\View\View; -class SEPA implements MethodInterface +class SEPA implements MethodInterface, LivewireMethodInterface { use MakesHash; @@ -145,9 +146,7 @@ class SEPA implements MethodInterface */ public function paymentView(array $data): View { - $data['gateway'] = $this->go_cardless; - $data['amount'] = $this->go_cardless->convertToGoCardlessAmount($data['total']['amount_with_fee'], $this->go_cardless->client->currency()->precision); - $data['currency'] = $this->go_cardless->client->getCurrencyCode(); + $data = $this->paymentData($data); return render('gateways.gocardless.sepa.pay', $data); } @@ -257,4 +256,24 @@ class SEPA implements MethodInterface throw new PaymentFailed('Failed to process the payment.', 500); } + + /** + * @inheritDoc + */ + public function livewirePaymentView(array $data): string + { + return 'gateways.gocardless.sepa.pay_livewire'; + } + + /** + * @inheritDoc + */ + public function paymentData(array $data): array + { + $data['gateway'] = $this->go_cardless; + $data['amount'] = $this->go_cardless->convertToGoCardlessAmount($data['total']['amount_with_fee'], $this->go_cardless->client->currency()->precision); + $data['currency'] = $this->go_cardless->client->getCurrencyCode(); + + return $data; + } } diff --git a/app/PaymentDrivers/Mollie/Bancontact.php b/app/PaymentDrivers/Mollie/Bancontact.php index 3df988bbb2..3a19ac358f 100644 --- a/app/PaymentDrivers/Mollie/Bancontact.php +++ b/app/PaymentDrivers/Mollie/Bancontact.php @@ -19,13 +19,14 @@ use App\Models\GatewayType; use App\Models\Payment; use App\Models\PaymentType; use App\Models\SystemLog; +use App\PaymentDrivers\Common\LivewireMethodInterface; use App\PaymentDrivers\Common\MethodInterface; use App\PaymentDrivers\MolliePaymentDriver; use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; use Illuminate\View\View; -class Bancontact implements MethodInterface +class Bancontact implements MethodInterface, LivewireMethodInterface { protected MolliePaymentDriver $mollie; @@ -209,4 +210,24 @@ class Bancontact implements MethodInterface { return $this->processSuccessfulPayment($payment, 'open'); } + + /** + * @inheritDoc + */ + public function livewirePaymentView(array $data): string + { + // Doesn't support, it's offsite payment method. + + return ''; + } + + /** + * @inheritDoc + */ + public function paymentData(array $data): array + { + $this->paymentView($data); + + return $data; + } } diff --git a/app/PaymentDrivers/Mollie/BankTransfer.php b/app/PaymentDrivers/Mollie/BankTransfer.php index 7c5872714c..642d4bfc84 100644 --- a/app/PaymentDrivers/Mollie/BankTransfer.php +++ b/app/PaymentDrivers/Mollie/BankTransfer.php @@ -19,6 +19,7 @@ use App\Models\GatewayType; use App\Models\Payment; use App\Models\PaymentType; use App\Models\SystemLog; +use App\PaymentDrivers\Common\LivewireMethodInterface; use App\PaymentDrivers\Common\MethodInterface; use App\PaymentDrivers\MolliePaymentDriver; use Exception; @@ -28,7 +29,7 @@ use Illuminate\Routing\Redirector; use Illuminate\View\View; use Mollie\Api\Resources\Payment as ResourcesPayment; -class BankTransfer implements MethodInterface +class BankTransfer implements MethodInterface, LivewireMethodInterface { protected MolliePaymentDriver $mollie; @@ -206,4 +207,24 @@ class BankTransfer implements MethodInterface { return $this->processSuccessfulPayment($payment, 'open'); } + + /** + * @inheritDoc + */ + public function livewirePaymentView(array $data): string + { + // Doesn't support, it's offsite payment method. + + return ''; + } + + /** + * @inheritDoc + */ + public function paymentData(array $data): array + { + $this->paymentView($data); + + return $data; + } } diff --git a/app/PaymentDrivers/Mollie/CreditCard.php b/app/PaymentDrivers/Mollie/CreditCard.php index 6276059745..6e712c8f84 100644 --- a/app/PaymentDrivers/Mollie/CreditCard.php +++ b/app/PaymentDrivers/Mollie/CreditCard.php @@ -10,12 +10,13 @@ use App\Models\GatewayType; use App\Models\Payment; use App\Models\PaymentType; use App\Models\SystemLog; +use App\PaymentDrivers\Common\LivewireMethodInterface; use App\PaymentDrivers\MolliePaymentDriver; use Illuminate\Contracts\View\Factory; use Illuminate\Http\RedirectResponse; use Illuminate\View\View; -class CreditCard +class CreditCard implements LivewireMethodInterface { /** * @var MolliePaymentDriver @@ -37,7 +38,7 @@ class CreditCard */ public function paymentView(array $data) { - $data['gateway'] = $this->mollie; + $data = $this->paymentData($data); return render('gateways.mollie.credit_card.pay', $data); } @@ -257,4 +258,22 @@ class CreditCard { return redirect()->route('client.payment_methods.index'); } + + /** + * @inheritDoc + */ + public function livewirePaymentView(array $data): string + { + return 'gateways.mollie.credit_card.pay_livewire'; + } + + /** + * @inheritDoc + */ + public function paymentData(array $data): array + { + $data['gateway'] = $this->mollie; + + return $data; + } } diff --git a/app/PaymentDrivers/Mollie/IDEAL.php b/app/PaymentDrivers/Mollie/IDEAL.php index 3b19cad34f..134853a6fe 100644 --- a/app/PaymentDrivers/Mollie/IDEAL.php +++ b/app/PaymentDrivers/Mollie/IDEAL.php @@ -19,13 +19,14 @@ use App\Models\GatewayType; use App\Models\Payment; use App\Models\PaymentType; use App\Models\SystemLog; +use App\PaymentDrivers\Common\LivewireMethodInterface; use App\PaymentDrivers\Common\MethodInterface; use App\PaymentDrivers\MolliePaymentDriver; use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; use Illuminate\View\View; -class IDEAL implements MethodInterface +class IDEAL implements MethodInterface, LivewireMethodInterface { protected MolliePaymentDriver $mollie; @@ -209,4 +210,24 @@ class IDEAL implements MethodInterface { return $this->processSuccessfulPayment($payment, 'open'); } + + /** + * @inheritDoc + */ + public function livewirePaymentView(array $data): string + { + // Doesn't support, it's offsite payment method. + + return ''; + } + + /** + * @inheritDoc + */ + public function paymentData(array $data): array + { + $this->paymentView($data); + + return $data; + } } diff --git a/app/PaymentDrivers/Mollie/KBC.php b/app/PaymentDrivers/Mollie/KBC.php index 00b87934a9..0811d75674 100644 --- a/app/PaymentDrivers/Mollie/KBC.php +++ b/app/PaymentDrivers/Mollie/KBC.php @@ -19,13 +19,14 @@ use App\Models\GatewayType; use App\Models\Payment; use App\Models\PaymentType; use App\Models\SystemLog; +use App\PaymentDrivers\Common\LivewireMethodInterface; use App\PaymentDrivers\Common\MethodInterface; use App\PaymentDrivers\MolliePaymentDriver; use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; use Illuminate\View\View; -class KBC implements MethodInterface +class KBC implements MethodInterface, LivewireMethodInterface { protected MolliePaymentDriver $mollie; @@ -193,4 +194,24 @@ class KBC implements MethodInterface return redirect()->route('client.payments.show', ['payment' => $this->mollie->encodePrimaryKey($payment_record->id)]); } + + /** + * @inheritDoc + */ + public function livewirePaymentView(array $data): string + { + // Doesn't support, it's offsite payment method. + + return ''; + } + + /** + * @inheritDoc + */ + public function paymentData(array $data): array + { + $this->paymentView($data); + + return $data; + } } diff --git a/app/PaymentDrivers/PayFast/CreditCard.php b/app/PaymentDrivers/PayFast/CreditCard.php index d3ca7b87cd..4cfb13f4a0 100644 --- a/app/PaymentDrivers/PayFast/CreditCard.php +++ b/app/PaymentDrivers/PayFast/CreditCard.php @@ -18,12 +18,13 @@ use App\Models\GatewayType; use App\Models\Payment; use App\Models\PaymentType; use App\Models\SystemLog; +use App\PaymentDrivers\Common\LivewireMethodInterface; use App\PaymentDrivers\PayFastPaymentDriver; use Illuminate\Http\Request; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Str; -class CreditCard +class CreditCard implements LivewireMethodInterface { public $payfast; @@ -158,24 +159,9 @@ class CreditCard public function paymentView($data) { - $payfast_data = [ - 'merchant_id' => $this->payfast->company_gateway->getConfigField('merchantId'), - 'merchant_key' => $this->payfast->company_gateway->getConfigField('merchantKey'), - 'return_url' => route('client.payments.index'), - 'cancel_url' => route('client.payment_methods.index'), - 'notify_url' => $this->payfast->genericWebhookUrl(), - 'm_payment_id' => $data['payment_hash'], - 'amount' => $data['amount_with_fee'], - 'item_name' => 'purchase', - 'item_description' => ctrans('texts.invoices').': '.collect($data['invoices'])->pluck('invoice_number'), - 'passphrase' => $this->payfast->company_gateway->getConfigField('passphrase'), - ]; + $data = $this->paymentData($data); - $payfast_data['signature'] = $this->payfast->generateSignature($payfast_data); - $payfast_data['gateway'] = $this->payfast; - $payfast_data['payment_endpoint_url'] = $this->payfast->endpointUrl(); - - return render('gateways.payfast.pay', array_merge($data, $payfast_data)); + return render('gateways.payfast.pay', array_merge($data)); } /* @@ -263,4 +249,36 @@ class CreditCard throw new PaymentFailed('Failed to process the payment.', 500); } + /** + * @inheritDoc + */ + public function livewirePaymentView(array $data): string + { + return 'gateways.payfast.pay_livewire'; + } + + /** + * @inheritDoc + */ + public function paymentData(array $data): array + { + $payfast_data = [ + 'merchant_id' => $this->payfast->company_gateway->getConfigField('merchantId'), + 'merchant_key' => $this->payfast->company_gateway->getConfigField('merchantKey'), + 'return_url' => route('client.payments.index'), + 'cancel_url' => route('client.payment_methods.index'), + 'notify_url' => $this->payfast->genericWebhookUrl(), + 'm_payment_id' => $data['payment_hash'], + 'amount' => $data['amount_with_fee'], + 'item_name' => 'purchase', + 'item_description' => ctrans('texts.invoices').': '.collect($data['invoices'])->pluck('invoice_number'), + 'passphrase' => $this->payfast->company_gateway->getConfigField('passphrase'), + ]; + + $payfast_data['signature'] = $this->payfast->generateSignature($payfast_data); + $payfast_data['gateway'] = $this->payfast; + $payfast_data['payment_endpoint_url'] = $this->payfast->endpointUrl(); + + return array_merge($data, $payfast_data); + } } diff --git a/app/PaymentDrivers/PayPalExpressPaymentDriver.php b/app/PaymentDrivers/PayPalExpressPaymentDriver.php new file mode 100644 index 0000000000..f4c8799928 --- /dev/null +++ b/app/PaymentDrivers/PayPalExpressPaymentDriver.php @@ -0,0 +1,261 @@ +omnipay_gateway = Omnipay::create( + $this->company_gateway->gateway->provider + ); + + $this->omnipay_gateway->initialize((array) $this->company_gateway->getConfig()); + } + + public function setPaymentMethod($payment_method_id) + { + // PayPal doesn't have multiple ways of paying. + // There's just one, off-site redirect. + + return $this; + } + + public function authorizeView($payment_method) + { + // PayPal doesn't support direct authorization. + + return $this; + } + + public function authorizeResponse($request) + { + // PayPal doesn't support direct authorization. + + return $this; + } + + public function processPaymentView($data) + { + $this->initializeOmnipayGateway(); + + $this->payment_hash->data = array_merge((array) $this->payment_hash->data, ['amount' => $data['total']['amount_with_fee']]); + $this->payment_hash->save(); + + $response = $this->omnipay_gateway + ->purchase($this->generatePaymentDetails($data)) + ->setItems($this->generatePaymentItems($data)) + ->send(); + + if ($response->isRedirect()) { + return redirect($response->getRedirectUrl()); + } + + // $this->sendFailureMail($response->getMessage() ?: ''); + + $message = [ + 'server_response' => $response->getMessage(), + 'data' => $this->payment_hash->data, + ]; + + SystemLogger::dispatch( + $message, + SystemLog::CATEGORY_GATEWAY_RESPONSE, + SystemLog::EVENT_GATEWAY_FAILURE, + SystemLog::TYPE_PAYPAL, + $this->client, + $this->client->company, + ); + + throw new PaymentFailed($response->getMessage(), $response->getCode()); + } + + public function processPaymentResponse($request) + { + $this->initializeOmnipayGateway(); + + $response = $this->omnipay_gateway + ->completePurchase(['amount' => $this->payment_hash->data->amount, 'currency' => $this->client->getCurrencyCode()]) + ->send(); + + if ($response->isCancelled() && $this->client->getSetting('enable_client_portal')) { + return redirect()->route('client.invoices.index')->with('warning', ctrans('texts.status_cancelled')); + } elseif($response->isCancelled() && !$this->client->getSetting('enable_client_portal')) { + redirect()->route('client.invoices.show', ['invoice' => $this->payment_hash->fee_invoice])->with('warning', ctrans('texts.status_cancelled')); + } + + if ($response->isSuccessful()) { + $data = [ + 'payment_method' => $response->getData()['TOKEN'], + 'payment_type' => PaymentType::PAYPAL, + 'amount' => $this->payment_hash->data->amount, + 'transaction_reference' => $response->getTransactionReference(), + 'gateway_type_id' => GatewayType::PAYPAL, + ]; + + $payment = $this->createPayment($data, \App\Models\Payment::STATUS_COMPLETED); + + SystemLogger::dispatch( + ['response' => (array) $response->getData(), 'data' => $data], + SystemLog::CATEGORY_GATEWAY_RESPONSE, + SystemLog::EVENT_GATEWAY_SUCCESS, + SystemLog::TYPE_PAYPAL, + $this->client, + $this->client->company, + ); + + return redirect()->route('client.payments.show', ['payment' => $this->encodePrimaryKey($payment->id)]); + } + + if (! $response->isSuccessful()) { + $data = $response->getData(); + + $this->sendFailureMail($response->getMessage() ?: ''); + + $message = [ + 'server_response' => $data['L_LONGMESSAGE0'], + 'data' => $this->payment_hash->data, + ]; + + SystemLogger::dispatch( + $message, + SystemLog::CATEGORY_GATEWAY_RESPONSE, + SystemLog::EVENT_GATEWAY_FAILURE, + SystemLog::TYPE_PAYPAL, + $this->client, + $this->client->company, + ); + + throw new PaymentFailed($response->getMessage(), $response->getCode()); + } + } + + public function generatePaymentDetails(array $data) + { + $_invoice = collect($this->payment_hash->data->invoices)->first(); + $invoice = Invoice::withTrashed()->find($this->decodePrimaryKey($_invoice->invoice_id)); + + // $this->fee = $this->feeCalc($invoice, $data['total']['amount_with_fee']); + + return [ + 'currency' => $this->client->getCurrencyCode(), + 'transactionType' => 'Purchase', + 'clientIp' => request()->getClientIp(), + // 'amount' => round(($data['total']['amount_with_fee'] + $this->fee),2), + 'amount' => round($data['total']['amount_with_fee'], 2), + 'returnUrl' => route('client.payments.response', [ + 'company_gateway_id' => $this->company_gateway->id, + 'payment_hash' => $this->payment_hash->hash, + 'payment_method_id' => GatewayType::PAYPAL, + ]), + 'cancelUrl' => $this->client->company->domain()."/client/invoices/{$invoice->hashed_id}", + 'description' => implode(',', collect($this->payment_hash->data->invoices) + ->map(function ($invoice) { + return sprintf('%s: %s', ctrans('texts.invoice_number'), $invoice->invoice_number); + })->toArray()), + 'transactionId' => $this->payment_hash->hash.'-'.time(), + 'ButtonSource' => 'InvoiceNinja_SP', + 'solutionType' => 'Sole', + 'no_shipping' => $this->company_gateway->require_shipping_address ? 0 : 1, + ]; + } + + public function generatePaymentItems(array $data) + { + $_invoice = collect($this->payment_hash->data->invoices)->first(); + $invoice = Invoice::withTrashed()->find($this->decodePrimaryKey($_invoice->invoice_id)); + + $items = []; + + $items[] = new Item([ + 'name' => ' ', + 'description' => ctrans('texts.invoice_number').'# '.$invoice->number, + 'price' => $data['total']['amount_with_fee'], + 'quantity' => 1, + ]); + + return $items; + } + + private function feeCalc($invoice, $invoice_total) + { + $invoice->service()->removeUnpaidGatewayFees(); + $invoice = $invoice->fresh(); + + $balance = floatval($invoice->balance); + + $_updated_invoice = $invoice->service()->addGatewayFee($this->company_gateway, GatewayType::PAYPAL, $invoice_total)->save(); + + if (floatval($_updated_invoice->balance) > $balance) { + $fee = floatval($_updated_invoice->balance) - $balance; + + $this->payment_hash->fee_total = $fee; + $this->payment_hash->save(); + + return $fee; + } + + return 0; + } + + public function livewirePaymentView(array $data): string + { + $this->processPaymentView($data); + + return ''; // Gateway is offsite. + } + + public function processPaymentViewData(array $data): array + { + return $data; + } +} diff --git a/app/PaymentDrivers/PayPalPPCPPaymentDriver.php b/app/PaymentDrivers/PayPalPPCPPaymentDriver.php index a62b24b6be..a095add9cc 100644 --- a/app/PaymentDrivers/PayPalPPCPPaymentDriver.php +++ b/app/PaymentDrivers/PayPalPPCPPaymentDriver.php @@ -85,30 +85,13 @@ class PayPalPPCPPaymentDriver extends PayPalBasePaymentDriver */ public function processPaymentView($data) { - - $this->init()->checkPaymentsReceivable(); - - $data['gateway'] = $this; - $this->payment_hash->data = array_merge((array) $this->payment_hash->data, ['amount' => $data['total']['amount_with_fee']]); - $this->payment_hash->save(); - - $data['client_id'] = config('ninja.paypal.client_id'); - $data['token'] = $this->getClientToken(); - $data['order_id'] = $this->createOrder($data); - $data['funding_source'] = $this->paypal_payment_method; - $data['gateway_type_id'] = $this->gateway_type_id; - $data['merchantId'] = $this->company_gateway->getConfigField('merchantId'); - $data['currency'] = $this->client->currency()->code; - $data['guid'] = $this->risk_guid; - $data['identifier'] = "s:INN_".$this->company_gateway->getConfigField('merchantId')."_CHCK"; - $data['pp_client_reference'] = $this->getClientHash(); + $data = $this->processPaymentViewData($data); if($this->gateway_type_id == 29) { return render('gateways.paypal.ppcp.card', $data); } else { return render('gateways.paypal.ppcp.pay', $data); } - } /** @@ -480,7 +463,40 @@ class PayPalPPCPPaymentDriver extends PayPalBasePaymentDriver } +<<<<<<< HEAD +======= + public function processPaymentViewData(array $data): array + { + $this->init()->checkPaymentsReceivable(); + + $data['gateway'] = $this; + $this->payment_hash->data = array_merge((array) $this->payment_hash->data, ['amount' => $data['total']['amount_with_fee']]); + $this->payment_hash->save(); + + $data['client_id'] = config('ninja.paypal.client_id'); + $data['token'] = $this->getClientToken(); + $data['order_id'] = $this->createOrder($data); + $data['funding_source'] = $this->paypal_payment_method; + $data['gateway_type_id'] = $this->gateway_type_id; + $data['merchantId'] = $this->company_gateway->getConfigField('merchantId'); + $data['currency'] = $this->client->currency()->code; + $data['guid'] = $this->risk_guid; + $data['identifier'] = "s:INN_".$this->company_gateway->getConfigField('merchantId')."_CHCK"; + $data['pp_client_reference'] = $this->getClientHash(); + + return $data; + } + + public function livewirePaymentView(array $data): string + { + if ($this->gateway_type_id == 29) { + return 'gateways.paypal.ppcp.card_livewire'; + } + + return 'gateways.paypal.ppcp.pay_livewire'; + } +>>>>>>> new_payment_flow } diff --git a/app/PaymentDrivers/PayPalRestPaymentDriver.php b/app/PaymentDrivers/PayPalRestPaymentDriver.php index dfbf86b759..46bca65a93 100644 --- a/app/PaymentDrivers/PayPalRestPaymentDriver.php +++ b/app/PaymentDrivers/PayPalRestPaymentDriver.php @@ -31,30 +31,13 @@ class PayPalRestPaymentDriver extends PayPalBasePaymentDriver public function processPaymentView($data) { - - $this->init(); - - $data['gateway'] = $this; - - $this->payment_hash->data = array_merge((array) $this->payment_hash->data, ['amount' => $data['total']['amount_with_fee']]); - $this->payment_hash->save(); - - $data['client_id'] = $this->company_gateway->getConfigField('clientId'); - $data['token'] = $this->getClientToken(); - $data['order_id'] = $this->createOrder($data); - $data['funding_source'] = $this->paypal_payment_method; - $data['gateway_type_id'] = $this->gateway_type_id; - $data['currency'] = $this->client->currency()->code; - $data['guid'] = $this->risk_guid; - $data['identifier'] = "s:INN_ACDC_CHCK"; - $data['pp_client_reference'] = $this->getClientHash(); + $data = $this->processPaymentViewData($data); if($this->gateway_type_id == 29) { return render('gateways.paypal.ppcp.card', $data); } else { return render('gateways.paypal.pay', $data); } - } /** @@ -434,4 +417,35 @@ class PayPalRestPaymentDriver extends PayPalBasePaymentDriver SystemLogger::dispatch($response, SystemLog::CATEGORY_GATEWAY_RESPONSE, SystemLog::EVENT_GATEWAY_FAILURE, SystemLog::TYPE_PAYPAL, $this->client, $this->client->company); } + + public function processPaymentViewData(array $data): array + { + $this->init(); + + $data['gateway'] = $this; + + $this->payment_hash->data = array_merge((array) $this->payment_hash->data, ['amount' => $data['total']['amount_with_fee']]); + $this->payment_hash->save(); + + $data['client_id'] = $this->company_gateway->getConfigField('clientId'); + $data['token'] = $this->getClientToken(); + $data['order_id'] = $this->createOrder($data); + $data['funding_source'] = $this->paypal_payment_method; + $data['gateway_type_id'] = $this->gateway_type_id; + $data['currency'] = $this->client->currency()->code; + $data['guid'] = $this->risk_guid; + $data['identifier'] = "s:INN_ACDC_CHCK"; + $data['pp_client_reference'] = $this->getClientHash(); + + return $data; + } + + public function livewirePaymentView(array $data): string + { + if ($this->gateway_type_id == 29) { + return 'gateways.paypal.ppcp.card_livewire'; + } + + return 'gateways.paypal.pay_livewire'; + } } diff --git a/app/PaymentDrivers/PayTrace/CreditCard.php b/app/PaymentDrivers/PayTrace/CreditCard.php index 2c2672aa62..970994d3c3 100644 --- a/app/PaymentDrivers/PayTrace/CreditCard.php +++ b/app/PaymentDrivers/PayTrace/CreditCard.php @@ -18,12 +18,13 @@ use App\Models\Invoice; use App\Models\Payment; use App\Models\PaymentType; use App\Models\SystemLog; +use App\PaymentDrivers\Common\LivewireMethodInterface; use App\PaymentDrivers\PaytracePaymentDriver; use App\Utils\Traits\MakesHash; use Illuminate\Http\Request; use Illuminate\Support\Str; -class CreditCard +class CreditCard implements LivewireMethodInterface { use MakesHash; @@ -36,9 +37,8 @@ class CreditCard public function authorizeView($data) { - $data['client_key'] = $this->paytrace->getAuthToken(); - $data['gateway'] = $this->paytrace; - + $data = $this->paymentData($data); + return render('gateways.paytrace.authorize', $data); } @@ -239,5 +239,24 @@ class CreditCard ]; return $this->paytrace->processUnsuccessfulTransaction($data); + } + + /** + * @inheritDoc + */ + public function livewirePaymentView(array $data): string + { + return 'gateways.paytrace.pay_livewire'; + } + + /** + * @inheritDoc + */ + public function paymentData(array $data): array + { + $data['client_key'] = $this->paytrace->getAuthToken(); + $data['gateway'] = $this->paytrace; + + return $data; } } diff --git a/app/PaymentDrivers/Razorpay/Hosted.php b/app/PaymentDrivers/Razorpay/Hosted.php index 2a8c35bafc..9003349cb7 100644 --- a/app/PaymentDrivers/Razorpay/Hosted.php +++ b/app/PaymentDrivers/Razorpay/Hosted.php @@ -19,6 +19,7 @@ use App\Models\GatewayType; use App\Models\Payment; use App\Models\PaymentType; use App\Models\SystemLog; +use App\PaymentDrivers\Common\LivewireMethodInterface; use App\PaymentDrivers\Common\MethodInterface; use App\PaymentDrivers\RazorpayPaymentDriver; use Illuminate\Http\RedirectResponse; @@ -26,7 +27,7 @@ use Illuminate\Http\Request; use Illuminate\View\View; use Razorpay\Api\Errors\SignatureVerificationError; -class Hosted implements MethodInterface +class Hosted implements MethodInterface, LivewireMethodInterface { protected RazorpayPaymentDriver $razorpay; @@ -67,23 +68,7 @@ class Hosted implements MethodInterface */ public function paymentView(array $data): View { - $order = $this->razorpay->gateway->order->create([ - 'currency' => $this->razorpay->client->currency()->code, - 'amount' => $this->razorpay->convertToRazorpayAmount((float) $this->razorpay->payment_hash->data->amount_with_fee), - ]); - - $this->razorpay->payment_hash->withData('order_id', $order->id); - $this->razorpay->payment_hash->withData('order_amount', $order->amount); - - $data['gateway'] = $this->razorpay; - - $data['options'] = [ - 'key' => $this->razorpay->company_gateway->getConfigField('apiKey'), - 'amount' => $this->razorpay->convertToRazorpayAmount((float) $this->razorpay->payment_hash->data->amount_with_fee), - 'currency' => $this->razorpay->client->currency()->code, - 'name' => $this->razorpay->company_gateway->company->present()->name(), - 'order_id' => $order->id, - ]; + $data = $this->paymentData($data); return render('gateways.razorpay.hosted.pay', $data); } @@ -174,4 +159,38 @@ class Hosted implements MethodInterface throw new PaymentFailed($exception->getMessage(), $exception->getCode()); } + + /** + * @inheritDoc + */ + public function livewirePaymentView(array $data): string + { + return 'gateways.razorpay.hosted.pay_livewire'; + } + + /** + * @inheritDoc + */ + public function paymentData(array $data): array + { + $order = $this->razorpay->gateway->order->create([ + 'currency' => $this->razorpay->client->currency()->code, + 'amount' => $this->razorpay->convertToRazorpayAmount((float) $this->razorpay->payment_hash->data->amount_with_fee), + ]); + + $this->razorpay->payment_hash->withData('order_id', $order->id); + $this->razorpay->payment_hash->withData('order_amount', $order->amount); + + $data['gateway'] = $this->razorpay; + + $data['options'] = [ + 'key' => $this->razorpay->company_gateway->getConfigField('apiKey'), + 'amount' => $this->razorpay->convertToRazorpayAmount((float) $this->razorpay->payment_hash->data->amount_with_fee), + 'currency' => $this->razorpay->client->currency()->code, + 'name' => $this->razorpay->company_gateway->company->present()->name(), + 'order_id' => $order->id, + ]; + + return $data; + } } diff --git a/app/PaymentDrivers/Square/CreditCard.php b/app/PaymentDrivers/Square/CreditCard.php index 1075b0a292..f95428c04e 100644 --- a/app/PaymentDrivers/Square/CreditCard.php +++ b/app/PaymentDrivers/Square/CreditCard.php @@ -21,6 +21,7 @@ use App\Models\Invoice; use App\Models\Payment; use App\Models\PaymentType; use App\Models\SystemLog; +use App\PaymentDrivers\Common\LivewireMethodInterface; use App\PaymentDrivers\Common\MethodInterface; use App\PaymentDrivers\SquarePaymentDriver; use App\Utils\Traits\MakesHash; @@ -29,7 +30,7 @@ use Illuminate\Http\Request; use Illuminate\View\View; use Square\Http\ApiResponse; -class CreditCard implements MethodInterface +class CreditCard implements MethodInterface, LivewireMethodInterface { use MakesHash; @@ -64,10 +65,7 @@ class CreditCard implements MethodInterface public function paymentView($data) { - $data['gateway'] = $this->square_driver; - $data['amount'] = $this->square_driver->payment_hash->data->amount_with_fee; - $data['currencyCode'] = $this->square_driver->client->getCurrencyCode(); - $data['square_contact'] = $this->buildClientObject(); + $data = $this->paymentData($data); return render('gateways.square.credit_card.pay', $data); } @@ -238,5 +236,24 @@ class CreditCard implements MethodInterface return false; } + /** + * @inheritDoc + */ + public function livewirePaymentView(array $data): string + { + return 'gateways.square.credit_card.pay_livewire'; + } + + /** + * @inheritDoc + */ + public function paymentData(array $data): array + { + $data['gateway'] = $this->square_driver; + $data['amount'] = $this->square_driver->payment_hash->data->amount_with_fee; + $data['currencyCode'] = $this->square_driver->client->getCurrencyCode(); + $data['square_contact'] = $this->buildClientObject(); + return $data; + } } diff --git a/app/PaymentDrivers/Stripe/ACH.php b/app/PaymentDrivers/Stripe/ACH.php index 2802835bc6..c759766a56 100644 --- a/app/PaymentDrivers/Stripe/ACH.php +++ b/app/PaymentDrivers/Stripe/ACH.php @@ -24,6 +24,7 @@ use App\Models\Payment; use App\Models\PaymentHash; use App\Models\PaymentType; use App\Models\SystemLog; +use App\PaymentDrivers\Common\LivewireMethodInterface; use App\PaymentDrivers\StripePaymentDriver; use App\Utils\Traits\MakesHash; use Exception; @@ -35,7 +36,7 @@ use Stripe\Exception\InvalidRequestException; use Stripe\Exception\RateLimitException; use Stripe\PaymentIntent; -class ACH +class ACH implements LivewireMethodInterface { use MakesHash; @@ -199,47 +200,7 @@ class ACH */ public function paymentView(array $data) { - $data['gateway'] = $this->stripe; - $data['currency'] = $this->stripe->client->getCurrencyCode(); - $data['payment_method_id'] = GatewayType::BANK_TRANSFER; - $data['customer'] = $this->stripe->findOrCreateCustomer(); - $data['amount'] = $this->stripe->convertToStripeAmount($data['total']['amount_with_fee'], $this->stripe->client->currency()->precision, $this->stripe->client->currency()); - - $description = $this->stripe->getDescription(false); - - $intent = false; - - if (count($data['tokens']) == 1) { - - $token = $data['tokens'][0]; - - $meta = $token->meta; - - if(isset($meta->state) && $meta->state == 'unauthorized') { - return redirect()->route('client.payment_methods.show', $token->hashed_id); - } - } - - if (count($data['tokens']) == 0) { - $intent = - $this->stripe->createPaymentIntent( - [ - 'amount' => $data['amount'], - 'currency' => $data['currency'], - 'setup_future_usage' => 'off_session', - 'customer' => $data['customer']->id, - 'payment_method_types' => ['us_bank_account'], - 'description' => $description, - 'metadata' => [ - 'payment_hash' => $this->stripe->payment_hash->hash, - 'gateway_type_id' => GatewayType::BANK_TRANSFER, - ], - 'statement_descriptor' => $this->stripe->getStatementDescriptor(), - ] - ); - } - - $data['client_secret'] = $intent ? $intent->client_secret : false; + $this->paymentData($data); return render('gateways.stripe.ach.pay', $data); } @@ -628,4 +589,56 @@ class ACH return $this->stripe->processInternallyFailedPayment($this->stripe, $e); } } + + public function livewirePaymentView(array $data): string + { + return 'gateways.stripe.ach.pay_livewire'; + } + + public function paymentData(array $data): array + { + $data['gateway'] = $this->stripe; + $data['currency'] = $this->stripe->client->getCurrencyCode(); + $data['payment_method_id'] = GatewayType::BANK_TRANSFER; + $data['customer'] = $this->stripe->findOrCreateCustomer(); + $data['amount'] = $this->stripe->convertToStripeAmount($data['total']['amount_with_fee'], $this->stripe->client->currency()->precision, $this->stripe->client->currency()); + + $description = $this->stripe->getDescription(false); + + $intent = false; + + if (count($data['tokens']) == 1) { + + $token = $data['tokens'][0]; + + $meta = $token->meta; + + if(isset($meta->state) && $meta->state == 'unauthorized') { + return redirect()->route('client.payment_methods.show', $token->hashed_id); + } + } + + if (count($data['tokens']) == 0) { + $intent = + $this->stripe->createPaymentIntent( + [ + 'amount' => $data['amount'], + 'currency' => $data['currency'], + 'setup_future_usage' => 'off_session', + 'customer' => $data['customer']->id, + 'payment_method_types' => ['us_bank_account'], + 'description' => $description, + 'metadata' => [ + 'payment_hash' => $this->stripe->payment_hash->hash, + 'gateway_type_id' => GatewayType::BANK_TRANSFER, + ], + 'statement_descriptor' => $this->stripe->getStatementDescriptor(), + ] + ); + } + + $data['client_secret'] = $intent ? $intent->client_secret : false; + + return $data; + } } diff --git a/app/PaymentDrivers/Stripe/ACSS.php b/app/PaymentDrivers/Stripe/ACSS.php index 7ef4fa2dde..1d49ff19a3 100644 --- a/app/PaymentDrivers/Stripe/ACSS.php +++ b/app/PaymentDrivers/Stripe/ACSS.php @@ -17,6 +17,7 @@ use App\Models\SystemLog; use App\Models\GatewayType; use App\Models\PaymentHash; use App\Models\PaymentType; +use App\PaymentDrivers\Common\LivewireMethodInterface; use Illuminate\Support\Str; use App\Http\Requests\Request; use App\Jobs\Util\SystemLogger; @@ -29,7 +30,7 @@ use App\PaymentDrivers\StripePaymentDriver; use App\Http\Requests\ClientPortal\Payments\PaymentResponseRequest; use Stripe\PaymentIntent; -class ACSS +class ACSS implements LivewireMethodInterface { use MakesHash; @@ -127,7 +128,7 @@ class ACSS $this->stripe->setClient($hash->fee_invoice->client); $this->stripe->setPaymentMethod(GatewayType::ACSS); - return $this->continuePayment($data); + return $this->paymentView($data); } return redirect()->route('client.payment_methods.show', $client_gateway_token->hashed_id); @@ -161,73 +162,43 @@ class ACSS return $intent; } - /** - * Payment view for ACSS - * - * Determines if any payment tokens are available and if not, generates a mandate - * - * @param array $data - - */ - public function paymentView(array $data) + public function paymentData(array $data) { - if(count($data['tokens']) == 0) { $hash = Str::random(32); + Cache::put($hash, $data, 3600); + $data['post_auth_response'] = $hash; + $data['needs_mandate_generate'] = true; - return $this->generateMandate($data); + $data['gateway'] = $this->stripe; + $data['company_gateway'] = $this->stripe->company_gateway; + $data['customer'] = $this->stripe->findOrCreateCustomer()->id; + $data['country'] = $this->stripe->client->country->iso_3166_2; + + $intent = \Stripe\SetupIntent::create([ + 'usage' => 'off_session', + 'payment_method_types' => ['acss_debit'], + 'customer' => $data['customer'], + 'payment_method_options' => [ + 'acss_debit' => [ + 'currency' => 'cad', + 'mandate_options' => [ + 'payment_schedule' => 'combined', + 'interval_description' => 'On any invoice due date', + 'transaction_type' => 'personal', + ], + 'verification_method' => 'instant', + ], + ], + ], $this->stripe->stripe_connect_auth); + + $data['pi_client_secret'] = $intent->client_secret; + + return $data; } - return $this->continuePayment($data); - } - - /** - * Generate a payment Mandate for ACSS - * - * @param array $data - - */ - private function generateMandate(array $data) - { - - $data['gateway'] = $this->stripe; - $data['company_gateway'] = $this->stripe->company_gateway; - $data['customer'] = $this->stripe->findOrCreateCustomer()->id; - $data['country'] = $this->stripe->client->country->iso_3166_2; - - $intent = \Stripe\SetupIntent::create([ - 'usage' => 'off_session', - 'payment_method_types' => ['acss_debit'], - 'customer' => $data['customer'], - 'payment_method_options' => [ - 'acss_debit' => [ - 'currency' => 'cad', - 'mandate_options' => [ - 'payment_schedule' => 'combined', - 'interval_description' => 'On any invoice due date', - 'transaction_type' => 'personal', - ], - 'verification_method' => 'instant', - ], - ], - ], $this->stripe->stripe_connect_auth); - - $data['pi_client_secret'] = $intent->client_secret; - - return render('gateways.stripe.acss.authorize', array_merge($data)); - - } - - /** - * Continues the payment flow after a Mandate has been successfully generated - * - * @param array $data - */ - private function continuePayment(array $data) - { - $this->stripe->init(); $data['gateway'] = $this->stripe; @@ -240,6 +211,25 @@ class ACSS $this->stripe->payment_hash->data = array_merge((array) $this->stripe->payment_hash->data, ['stripe_amount' => $data['stripe_amount']]); $this->stripe->payment_hash->save(); + return $data; + } + + /** + * Payment view for ACSS + * + * Determines if any payment tokens are available and if not, generates a mandate + * + * @param array $data + + */ + public function paymentView(array $data) + { + $data = $this->paymentData($data); + + if (array_key_exists('needs_mandate_generate', $data)) { + return render('gateways.stripe.acss.authorize', array_merge($data)); + } + return render('gateways.stripe.acss.pay', $data); } @@ -400,4 +390,13 @@ class ACSS return $this->stripe->processInternallyFailedPayment($this->stripe, $e); } } + + public function livewirePaymentView(array $data): string + { + if (array_key_exists('needs_mandate_generate', $data)) { + return 'gateways.stripe.acss.authorize_livewire'; + } + + return 'gateways.stripe.acss.pay_livewire'; + } } diff --git a/app/PaymentDrivers/Stripe/BACS.php b/app/PaymentDrivers/Stripe/BACS.php index 84ce704a89..a028a311a4 100644 --- a/app/PaymentDrivers/Stripe/BACS.php +++ b/app/PaymentDrivers/Stripe/BACS.php @@ -20,12 +20,13 @@ use App\Models\GatewayType; use App\Models\Payment; use App\Models\PaymentType; use App\Models\SystemLog; +use App\PaymentDrivers\Common\LivewireMethodInterface; use App\PaymentDrivers\Stripe\Jobs\UpdateCustomer; use App\PaymentDrivers\StripePaymentDriver; use App\Utils\Number; use Stripe\Checkout\Session; -class BACS +class BACS implements LivewireMethodInterface { public $stripe; @@ -69,9 +70,7 @@ class BACS } public function paymentView(array $data) { - $data['gateway'] = $this->stripe; - $data['amount'] = $data['total']['amount_with_fee']; - $data['payment_hash'] = $this->stripe->payment_hash->hash; + $data = $this->paymentData($data); return render('gateways.stripe.bacs.pay', $data); } @@ -187,4 +186,18 @@ class BACS return $this->stripe->processInternallyFailedPayment($this->stripe, $e); } } + + public function paymentData(array $data): array + { + $data['gateway'] = $this->stripe; + $data['amount'] = $data['total']['amount_with_fee']; + $data['payment_hash'] = $this->stripe->payment_hash->hash; + + return $data; + } + + public function livewirePaymentView(array $data): string + { + return 'gateways.stripe.bacs.pay_livewire'; + } } diff --git a/app/PaymentDrivers/Stripe/BECS.php b/app/PaymentDrivers/Stripe/BECS.php index 271e6170f4..020d9493d5 100644 --- a/app/PaymentDrivers/Stripe/BECS.php +++ b/app/PaymentDrivers/Stripe/BECS.php @@ -19,9 +19,10 @@ use App\Models\GatewayType; use App\Models\Payment; use App\Models\PaymentType; use App\Models\SystemLog; +use App\PaymentDrivers\Common\LivewireMethodInterface; use App\PaymentDrivers\StripePaymentDriver; -class BECS +class BECS implements LivewireMethodInterface { /** @var StripePaymentDriver */ public StripePaymentDriver $stripe; @@ -39,33 +40,7 @@ class BECS public function paymentView(array $data) { - $this->stripe->init(); - - $data['gateway'] = $this->stripe; - $data['payment_method_id'] = GatewayType::BECS; - $data['stripe_amount'] = $this->stripe->convertToStripeAmount($data['total']['amount_with_fee'], $this->stripe->client->currency()->precision, $this->stripe->client->currency()); - $data['client'] = $this->stripe->client; - $data['customer'] = $this->stripe->findOrCreateCustomer()->id; - $data['country'] = $this->stripe->client->country->iso_3166_2; - $data['payment_hash'] = $this->stripe->payment_hash->hash; - - $intent = \Stripe\PaymentIntent::create([ - 'amount' => $data['stripe_amount'], - 'currency' => $this->stripe->client->currency()->code, - 'payment_method_types' => ['au_becs_debit'], - 'setup_future_usage' => 'off_session', - 'customer' => $this->stripe->findOrCreateCustomer(), - 'description' => $this->stripe->getDescription(false), - 'metadata' => [ - 'payment_hash' => $this->stripe->payment_hash->hash, - 'gateway_type_id' => GatewayType::BECS, - ], - ], array_merge($this->stripe->stripe_connect_auth, ['idempotency_key' => uniqid("st", true)])); - - $data['pi_client_secret'] = $intent->client_secret; - - $this->stripe->payment_hash->data = array_merge((array) $this->stripe->payment_hash->data, ['stripe_amount' => $data['stripe_amount']]); - $this->stripe->payment_hash->save(); + $data = $this->paymentData($data); return render('gateways.stripe.becs.pay', $data); } @@ -161,4 +136,42 @@ class BECS return $this->stripe->processInternallyFailedPayment($this->stripe, $e); } } + + public function paymentData(array $data): array + { + $this->stripe->init(); + + $data['gateway'] = $this->stripe; + $data['payment_method_id'] = GatewayType::BECS; + $data['stripe_amount'] = $this->stripe->convertToStripeAmount($data['total']['amount_with_fee'], $this->stripe->client->currency()->precision, $this->stripe->client->currency()); + $data['client'] = $this->stripe->client; + $data['customer'] = $this->stripe->findOrCreateCustomer()->id; + $data['country'] = $this->stripe->client->country->iso_3166_2; + $data['payment_hash'] = $this->stripe->payment_hash->hash; + + $intent = \Stripe\PaymentIntent::create([ + 'amount' => $data['stripe_amount'], + 'currency' => $this->stripe->client->currency()->code, + 'payment_method_types' => ['au_becs_debit'], + 'setup_future_usage' => 'off_session', + 'customer' => $this->stripe->findOrCreateCustomer(), + 'description' => $this->stripe->getDescription(false), + 'metadata' => [ + 'payment_hash' => $this->stripe->payment_hash->hash, + 'gateway_type_id' => GatewayType::BECS, + ], + ], array_merge($this->stripe->stripe_connect_auth, ['idempotency_key' => uniqid("st", true)])); + + $data['pi_client_secret'] = $intent->client_secret; + + $this->stripe->payment_hash->data = array_merge((array) $this->stripe->payment_hash->data, ['stripe_amount' => $data['stripe_amount']]); + $this->stripe->payment_hash->save(); + + return $data; + } + + public function livewirePaymentView(array $data): string + { + return 'gateways.stripe.becs.pay_livewire'; + } } diff --git a/app/PaymentDrivers/Stripe/Bancontact.php b/app/PaymentDrivers/Stripe/Bancontact.php index a4b0d61fd0..352db6bc1c 100644 --- a/app/PaymentDrivers/Stripe/Bancontact.php +++ b/app/PaymentDrivers/Stripe/Bancontact.php @@ -18,9 +18,10 @@ use App\Models\GatewayType; use App\Models\Payment; use App\Models\PaymentType; use App\Models\SystemLog; +use App\PaymentDrivers\Common\LivewireMethodInterface; use App\PaymentDrivers\StripePaymentDriver; -class Bancontact +class Bancontact implements LivewireMethodInterface { /** @var StripePaymentDriver */ public StripePaymentDriver $stripe; @@ -37,32 +38,7 @@ class Bancontact public function paymentView(array $data) { - $this->stripe->init(); - - $data['gateway'] = $this->stripe; - $data['return_url'] = $this->buildReturnUrl(); - $data['stripe_amount'] = $this->stripe->convertToStripeAmount($data['total']['amount_with_fee'], $this->stripe->client->currency()->precision, $this->stripe->client->currency()); - $data['client'] = $this->stripe->client; - $data['customer'] = $this->stripe->findOrCreateCustomer()->id; - $data['country'] = $this->stripe->client->country->iso_3166_2; - - $intent = \Stripe\PaymentIntent::create([ - 'amount' => $data['stripe_amount'], - 'currency' => 'eur', - 'payment_method_types' => ['bancontact'], - 'customer' => $this->stripe->findOrCreateCustomer(), - 'description' => $this->stripe->getDescription(false), - 'metadata' => [ - 'payment_hash' => $this->stripe->payment_hash->hash, - 'gateway_type_id' => GatewayType::BANCONTACT, - ], - - ], array_merge($this->stripe->stripe_connect_auth, ['idempotency_key' => uniqid("st", true)])); - - $data['pi_client_secret'] = $intent->client_secret; - - $this->stripe->payment_hash->data = array_merge((array) $this->stripe->payment_hash->data, ['stripe_amount' => $data['stripe_amount']]); - $this->stripe->payment_hash->save(); + $data = $this->paymentData($data); return render('gateways.stripe.bancontact.pay', $data); } @@ -143,4 +119,41 @@ class Bancontact throw new PaymentFailed('Failed to process the payment.', 500); } + + public function paymentData(array $data): array + { + $this->stripe->init(); + + $data['gateway'] = $this->stripe; + $data['return_url'] = $this->buildReturnUrl(); + $data['stripe_amount'] = $this->stripe->convertToStripeAmount($data['total']['amount_with_fee'], $this->stripe->client->currency()->precision, $this->stripe->client->currency()); + $data['client'] = $this->stripe->client; + $data['customer'] = $this->stripe->findOrCreateCustomer()->id; + $data['country'] = $this->stripe->client->country->iso_3166_2; + + $intent = \Stripe\PaymentIntent::create([ + 'amount' => $data['stripe_amount'], + 'currency' => 'eur', + 'payment_method_types' => ['bancontact'], + 'customer' => $this->stripe->findOrCreateCustomer(), + 'description' => $this->stripe->getDescription(false), + 'metadata' => [ + 'payment_hash' => $this->stripe->payment_hash->hash, + 'gateway_type_id' => GatewayType::BANCONTACT, + ], + + ], array_merge($this->stripe->stripe_connect_auth, ['idempotency_key' => uniqid("st", true)])); + + $data['pi_client_secret'] = $intent->client_secret; + + $this->stripe->payment_hash->data = array_merge((array) $this->stripe->payment_hash->data, ['stripe_amount' => $data['stripe_amount']]); + $this->stripe->payment_hash->save(); + + return $data; + } + + public function livewirePaymentView(array $data): string + { + return 'gateways.stripe.bancontact.pay_livewire'; + } } diff --git a/app/PaymentDrivers/Stripe/BankTransfer.php b/app/PaymentDrivers/Stripe/BankTransfer.php index 4f7a1bac43..51a6e8e59c 100644 --- a/app/PaymentDrivers/Stripe/BankTransfer.php +++ b/app/PaymentDrivers/Stripe/BankTransfer.php @@ -19,12 +19,13 @@ use App\Models\GatewayType; use App\Models\Payment; use App\Models\PaymentType; use App\Models\SystemLog; +use App\PaymentDrivers\Common\LivewireMethodInterface; use App\PaymentDrivers\StripePaymentDriver; use App\Utils\Number; use App\Utils\Traits\MakesHash; use Stripe\PaymentIntent; -class BankTransfer +class BankTransfer implements LivewireMethodInterface { use MakesHash; @@ -38,37 +39,7 @@ class BankTransfer public function paymentView(array $data) { - $this->stripe->init(); - - $intent = \Stripe\PaymentIntent::create([ - 'amount' => $this->stripe->convertToStripeAmount($data['total']['amount_with_fee'], $this->stripe->client->currency()->precision, $this->stripe->client->currency()), - 'currency' => $this->stripe->client->currency()->code, - 'customer' => $this->stripe->findOrCreateCustomer()->id, - 'description' => $this->stripe->getDescription(false), - 'payment_method_types' => ['customer_balance'], - 'payment_method_data' => [ - 'type' => 'customer_balance', - ], - 'payment_method_options' => [ - 'customer_balance' => [ - 'funding_type' => 'bank_transfer', - 'bank_transfer' => $this->resolveBankType() - ], - ], - 'metadata' => [ - 'payment_hash' => $this->stripe->payment_hash->hash, - 'gateway_type_id' => GatewayType::DIRECT_DEBIT, - ], - ], $this->stripe->stripe_connect_auth); - - - $this->stripe->payment_hash->data = array_merge((array) $this->stripe->payment_hash->data, ['stripe_amount' => $this->stripe->convertToStripeAmount($data['total']['amount_with_fee'], $this->stripe->client->currency()->precision, $this->stripe->client->currency())]); - $this->stripe->payment_hash->save(); - - $data = []; - $data['return_url'] = $this->buildReturnUrl(); - $data['gateway'] = $this->stripe; - $data['client_secret'] = $intent ? $intent->client_secret : false; + $data = $this->paymentData($data); return render('gateways.stripe.bank_transfer.pay', $data); } @@ -317,4 +288,46 @@ class BankTransfer throw new PaymentFailed('Failed to process the payment.', 500); } + + public function paymentData(array $data): array + { + $this->stripe->init(); + + $intent = \Stripe\PaymentIntent::create([ + 'amount' => $this->stripe->convertToStripeAmount($data['total']['amount_with_fee'], $this->stripe->client->currency()->precision, $this->stripe->client->currency()), + 'currency' => $this->stripe->client->currency()->code, + 'customer' => $this->stripe->findOrCreateCustomer()->id, + 'description' => $this->stripe->getDescription(false), + 'payment_method_types' => ['customer_balance'], + 'payment_method_data' => [ + 'type' => 'customer_balance', + ], + 'payment_method_options' => [ + 'customer_balance' => [ + 'funding_type' => 'bank_transfer', + 'bank_transfer' => $this->resolveBankType() + ], + ], + 'metadata' => [ + 'payment_hash' => $this->stripe->payment_hash->hash, + 'gateway_type_id' => GatewayType::DIRECT_DEBIT, + ], + ], $this->stripe->stripe_connect_auth); + + + $this->stripe->payment_hash->data = array_merge((array) $this->stripe->payment_hash->data, ['stripe_amount' => $this->stripe->convertToStripeAmount($data['total']['amount_with_fee'], $this->stripe->client->currency()->precision, $this->stripe->client->currency())]); + $this->stripe->payment_hash->save(); + + $data = []; + $data['return_url'] = $this->buildReturnUrl(); + $data['gateway'] = $this->stripe; + $data['client_secret'] = $intent ? $intent->client_secret : false; + + return $data; + } + + public function livewirePaymentView(array $data): string + { + return 'gateways.stripe.bank_transfer.pay_livewire'; + } } diff --git a/app/PaymentDrivers/Stripe/BrowserPay.php b/app/PaymentDrivers/Stripe/BrowserPay.php index 09d71fcdb1..d71541e970 100644 --- a/app/PaymentDrivers/Stripe/BrowserPay.php +++ b/app/PaymentDrivers/Stripe/BrowserPay.php @@ -19,6 +19,7 @@ use App\Models\GatewayType; use App\Models\Payment; use App\Models\PaymentType; use App\Models\SystemLog; +use App\PaymentDrivers\Common\LivewireMethodInterface; use App\PaymentDrivers\Common\MethodInterface; use App\PaymentDrivers\StripePaymentDriver; use App\Utils\Ninja; @@ -29,7 +30,7 @@ use Stripe\ApplePayDomain; use Stripe\Exception\ApiErrorException; use Stripe\PaymentIntent; -class BrowserPay implements MethodInterface +class BrowserPay implements MethodInterface, LivewireMethodInterface { protected StripePaymentDriver $stripe; @@ -63,8 +64,9 @@ class BrowserPay implements MethodInterface { return redirect()->route('client.payment_methods.index'); } + - public function paymentView(array $data): View + public function paymentData(array $data): array { $payment_intent_data = [ 'amount' => $this->stripe->convertToStripeAmount($data['total']['amount_with_fee'], $this->stripe->client->currency()->precision, $this->stripe->client->currency()), @@ -93,6 +95,13 @@ class BrowserPay implements MethodInterface 'requestPayerEmail' => true, ]; + return $data; + } + + public function paymentView(array $data): View + { + $data = $this->paymentData($data); + return render('gateways.stripe.browser_pay.pay', $data); } @@ -231,4 +240,9 @@ class BrowserPay implements MethodInterface return str_replace(['https://', '/public'], '', $domain); } + + public function livewirePaymentView(array $data): string + { + return 'gateways.stripe.browser_pay.pay_livewire'; + } } diff --git a/app/PaymentDrivers/Stripe/CreditCard.php b/app/PaymentDrivers/Stripe/CreditCard.php index eab1a98c32..bfaa366f6c 100644 --- a/app/PaymentDrivers/Stripe/CreditCard.php +++ b/app/PaymentDrivers/Stripe/CreditCard.php @@ -19,12 +19,13 @@ use App\Models\GatewayType; use App\Models\Payment; use App\Models\PaymentType; use App\Models\SystemLog; +use App\PaymentDrivers\Common\LivewireMethodInterface; use App\PaymentDrivers\Stripe\Jobs\UpdateCustomer; use App\PaymentDrivers\StripePaymentDriver; use Stripe\PaymentIntent; use Stripe\PaymentMethod; -class CreditCard +class CreditCard implements LivewireMethodInterface { public $stripe; @@ -57,7 +58,7 @@ class CreditCard return redirect()->route('client.payment_methods.index'); } - public function paymentView(array $data) + public function paymentData(array $data): array { $description = $this->stripe->getDescription(false); @@ -77,9 +78,21 @@ class CreditCard $data['intent'] = $this->stripe->createPaymentIntent($payment_intent_data); $data['gateway'] = $this->stripe; + return $data; + } + + public function paymentView(array $data) + { + $data = $this->paymentData($data); + return render('gateways.stripe.credit_card.pay', $data); } + public function livewirePaymentView(array $data): string + { + return 'gateways.stripe.credit_card.pay_livewire'; + } + public function paymentResponse(PaymentResponseRequest $request) { $this->stripe->init(); diff --git a/app/PaymentDrivers/Stripe/EPS.php b/app/PaymentDrivers/Stripe/EPS.php index 8f1456fceb..98b23fdc2b 100644 --- a/app/PaymentDrivers/Stripe/EPS.php +++ b/app/PaymentDrivers/Stripe/EPS.php @@ -18,9 +18,10 @@ use App\Models\GatewayType; use App\Models\Payment; use App\Models\PaymentType; use App\Models\SystemLog; +use App\PaymentDrivers\Common\LivewireMethodInterface; use App\PaymentDrivers\StripePaymentDriver; -class EPS +class EPS implements LivewireMethodInterface { /** @var StripePaymentDriver */ public StripePaymentDriver $stripe; @@ -37,31 +38,7 @@ class EPS public function paymentView(array $data) { - $this->stripe->init(); - - $data['gateway'] = $this->stripe; - $data['return_url'] = $this->buildReturnUrl(); - $data['stripe_amount'] = $this->stripe->convertToStripeAmount($data['total']['amount_with_fee'], $this->stripe->client->currency()->precision, $this->stripe->client->currency()); - $data['client'] = $this->stripe->client; - $data['customer'] = $this->stripe->findOrCreateCustomer()->id; - $data['country'] = $this->stripe->client->country->iso_3166_2; - - $intent = \Stripe\PaymentIntent::create([ - 'amount' => $data['stripe_amount'], - 'currency' => 'eur', - 'payment_method_types' => ['eps'], - 'customer' => $this->stripe->findOrCreateCustomer(), - 'description' => $this->stripe->getDescription(false), - 'metadata' => [ - 'payment_hash' => $this->stripe->payment_hash->hash, - 'gateway_type_id' => GatewayType::EPS, - ], - ], array_merge($this->stripe->stripe_connect_auth, ['idempotency_key' => uniqid("st", true)])); - - $data['pi_client_secret'] = $intent->client_secret; - - $this->stripe->payment_hash->data = array_merge((array) $this->stripe->payment_hash->data, ['stripe_amount' => $data['stripe_amount']]); - $this->stripe->payment_hash->save(); + $data = $this->paymentData($data); return render('gateways.stripe.eps.pay', $data); } @@ -142,4 +119,40 @@ class EPS throw new PaymentFailed('Failed to process the payment.', 500); } + + public function paymentData(array $data): array + { + $this->stripe->init(); + + $data['gateway'] = $this->stripe; + $data['return_url'] = $this->buildReturnUrl(); + $data['stripe_amount'] = $this->stripe->convertToStripeAmount($data['total']['amount_with_fee'], $this->stripe->client->currency()->precision, $this->stripe->client->currency()); + $data['client'] = $this->stripe->client; + $data['customer'] = $this->stripe->findOrCreateCustomer()->id; + $data['country'] = $this->stripe->client->country->iso_3166_2; + + $intent = \Stripe\PaymentIntent::create([ + 'amount' => $data['stripe_amount'], + 'currency' => 'eur', + 'payment_method_types' => ['eps'], + 'customer' => $this->stripe->findOrCreateCustomer(), + 'description' => $this->stripe->getDescription(false), + 'metadata' => [ + 'payment_hash' => $this->stripe->payment_hash->hash, + 'gateway_type_id' => GatewayType::EPS, + ], + ], array_merge($this->stripe->stripe_connect_auth, ['idempotency_key' => uniqid("st", true)])); + + $data['pi_client_secret'] = $intent->client_secret; + + $this->stripe->payment_hash->data = array_merge((array) $this->stripe->payment_hash->data, ['stripe_amount' => $data['stripe_amount']]); + $this->stripe->payment_hash->save(); + + return $data; + } + + public function livewirePaymentView(array $data): string + { + return 'gateways.stripe.eps.pay_livewire'; + } } diff --git a/app/PaymentDrivers/Stripe/FPX.php b/app/PaymentDrivers/Stripe/FPX.php index e97b25562c..a7cfe5d521 100644 --- a/app/PaymentDrivers/Stripe/FPX.php +++ b/app/PaymentDrivers/Stripe/FPX.php @@ -19,9 +19,10 @@ use App\Models\GatewayType; use App\Models\Payment; use App\Models\PaymentType; use App\Models\SystemLog; +use App\PaymentDrivers\Common\LivewireMethodInterface; use App\PaymentDrivers\StripePaymentDriver; -class FPX +class FPX implements LivewireMethodInterface { /** @var StripePaymentDriver */ public StripePaymentDriver $stripe; @@ -38,31 +39,7 @@ class FPX public function paymentView(array $data) { - $this->stripe->init(); - - $data['gateway'] = $this->stripe; - $data['return_url'] = $this->buildReturnUrl(); - $data['stripe_amount'] = $this->stripe->convertToStripeAmount($data['total']['amount_with_fee'], $this->stripe->client->currency()->precision, $this->stripe->client->currency()); - $data['client'] = $this->stripe->client; - $data['customer'] = $this->stripe->findOrCreateCustomer()->id; - $data['country'] = $this->stripe->client->country->iso_3166_2; - - $intent = \Stripe\PaymentIntent::create([ - 'amount' => $data['stripe_amount'], - 'currency' => $this->stripe->client->getCurrencyCode(), - 'payment_method_types' => ['fpx'], - 'customer' => $this->stripe->findOrCreateCustomer(), - 'description' => $this->stripe->getDescription(false), - 'metadata' => [ - 'payment_hash' => $this->stripe->payment_hash->hash, - 'gateway_type_id' => GatewayType::FPX, - ], - ], array_merge($this->stripe->stripe_connect_auth, ['idempotency_key' => uniqid("st", true)])); - - $data['pi_client_secret'] = $intent->client_secret; - - $this->stripe->payment_hash->data = array_merge((array) $this->stripe->payment_hash->data, ['stripe_amount' => $data['stripe_amount']]); - $this->stripe->payment_hash->save(); + $data = $this->paymentData($data); return render('gateways.stripe.fpx.pay', $data); } @@ -143,4 +120,40 @@ class FPX throw new PaymentFailed('Failed to process the payment.', 400); } + + public function paymentData(array $data): array + { + $this->stripe->init(); + + $data['gateway'] = $this->stripe; + $data['return_url'] = $this->buildReturnUrl(); + $data['stripe_amount'] = $this->stripe->convertToStripeAmount($data['total']['amount_with_fee'], $this->stripe->client->currency()->precision, $this->stripe->client->currency()); + $data['client'] = $this->stripe->client; + $data['customer'] = $this->stripe->findOrCreateCustomer()->id; + $data['country'] = $this->stripe->client->country->iso_3166_2; + + $intent = \Stripe\PaymentIntent::create([ + 'amount' => $data['stripe_amount'], + 'currency' => $this->stripe->client->getCurrencyCode(), + 'payment_method_types' => ['fpx'], + 'customer' => $this->stripe->findOrCreateCustomer(), + 'description' => $this->stripe->getDescription(false), + 'metadata' => [ + 'payment_hash' => $this->stripe->payment_hash->hash, + 'gateway_type_id' => GatewayType::FPX, + ], + ], array_merge($this->stripe->stripe_connect_auth, ['idempotency_key' => uniqid("st", true)])); + + $data['pi_client_secret'] = $intent->client_secret; + + $this->stripe->payment_hash->data = array_merge((array) $this->stripe->payment_hash->data, ['stripe_amount' => $data['stripe_amount']]); + $this->stripe->payment_hash->save(); + + return $data; + } + + public function livewirePaymentView(array $data): string + { + return 'gateways.stripe.fpx.pay_livewire'; + } } diff --git a/app/PaymentDrivers/Stripe/GIROPAY.php b/app/PaymentDrivers/Stripe/GIROPAY.php index cd8828bfb4..2a90cd0e7e 100644 --- a/app/PaymentDrivers/Stripe/GIROPAY.php +++ b/app/PaymentDrivers/Stripe/GIROPAY.php @@ -18,9 +18,10 @@ use App\Models\GatewayType; use App\Models\Payment; use App\Models\PaymentType; use App\Models\SystemLog; +use App\PaymentDrivers\Common\LivewireMethodInterface; use App\PaymentDrivers\StripePaymentDriver; -class GIROPAY +class GIROPAY implements LivewireMethodInterface { /** @var StripePaymentDriver */ public StripePaymentDriver $stripe; @@ -37,31 +38,7 @@ class GIROPAY public function paymentView(array $data) { - $this->stripe->init(); - - $data['gateway'] = $this->stripe; - $data['return_url'] = $this->buildReturnUrl(); - $data['stripe_amount'] = $this->stripe->convertToStripeAmount($data['total']['amount_with_fee'], $this->stripe->client->currency()->precision, $this->stripe->client->currency()); - $data['client'] = $this->stripe->client; - $data['customer'] = $this->stripe->findOrCreateCustomer()->id; - $data['country'] = $this->stripe->client->country->iso_3166_2; - - $intent = \Stripe\PaymentIntent::create([ - 'amount' => $data['stripe_amount'], - 'currency' => 'eur', - 'payment_method_types' => ['giropay'], - 'customer' => $this->stripe->findOrCreateCustomer(), - 'description' => $this->stripe->getDescription(false), - 'metadata' => [ - 'payment_hash' => $this->stripe->payment_hash->hash, - 'gateway_type_id' => GatewayType::GIROPAY, - ], - ], array_merge($this->stripe->stripe_connect_auth, ['idempotency_key' => uniqid("st", true)])); - - $data['pi_client_secret'] = $intent->client_secret; - - $this->stripe->payment_hash->data = array_merge((array) $this->stripe->payment_hash->data, ['stripe_amount' => $data['stripe_amount']]); - $this->stripe->payment_hash->save(); + $data = $this->paymentData($data); return render('gateways.stripe.giropay.pay', $data); } @@ -142,4 +119,40 @@ class GIROPAY throw new PaymentFailed('Failed to process the payment.', 500); } + + public function paymentData(array $data): array + { + $this->stripe->init(); + + $data['gateway'] = $this->stripe; + $data['return_url'] = $this->buildReturnUrl(); + $data['stripe_amount'] = $this->stripe->convertToStripeAmount($data['total']['amount_with_fee'], $this->stripe->client->currency()->precision, $this->stripe->client->currency()); + $data['client'] = $this->stripe->client; + $data['customer'] = $this->stripe->findOrCreateCustomer()->id; + $data['country'] = $this->stripe->client->country->iso_3166_2; + + $intent = \Stripe\PaymentIntent::create([ + 'amount' => $data['stripe_amount'], + 'currency' => 'eur', + 'payment_method_types' => ['giropay'], + 'customer' => $this->stripe->findOrCreateCustomer(), + 'description' => $this->stripe->getDescription(false), + 'metadata' => [ + 'payment_hash' => $this->stripe->payment_hash->hash, + 'gateway_type_id' => GatewayType::GIROPAY, + ], + ], array_merge($this->stripe->stripe_connect_auth, ['idempotency_key' => uniqid("st", true)])); + + $data['pi_client_secret'] = $intent->client_secret; + + $this->stripe->payment_hash->data = array_merge((array) $this->stripe->payment_hash->data, ['stripe_amount' => $data['stripe_amount']]); + $this->stripe->payment_hash->save(); + + return $data; + } + + public function livewirePaymentView(array $data): string + { + return 'gateways.giropay.pay_livewire'; + } } diff --git a/app/PaymentDrivers/Stripe/Klarna.php b/app/PaymentDrivers/Stripe/Klarna.php index 09169e4f16..47544d21e2 100644 --- a/app/PaymentDrivers/Stripe/Klarna.php +++ b/app/PaymentDrivers/Stripe/Klarna.php @@ -18,9 +18,10 @@ use App\Models\GatewayType; use App\Models\Payment; use App\Models\PaymentType; use App\Models\SystemLog; +use App\PaymentDrivers\Common\LivewireMethodInterface; use App\PaymentDrivers\StripePaymentDriver; -class Klarna +class Klarna implements LivewireMethodInterface { /** @var StripePaymentDriver */ public StripePaymentDriver $stripe; @@ -37,33 +38,7 @@ class Klarna public function paymentView(array $data) { - $this->stripe->init(); - - $data['gateway'] = $this->stripe; - $data['return_url'] = $this->buildReturnUrl(); - $data['stripe_amount'] = $this->stripe->convertToStripeAmount($data['total']['amount_with_fee'], $this->stripe->client->currency()->precision, $this->stripe->client->currency()); - $data['client'] = $this->stripe->client; - $data['customer'] = $this->stripe->findOrCreateCustomer()->id; - $data['country'] = $this->stripe->client->country->iso_3166_2; - - $description = $this->stripe->getDescription(false); - - $intent = \Stripe\PaymentIntent::create([ - 'amount' => $data['stripe_amount'], - 'currency' => $this->stripe->client->getCurrencyCode(), - 'payment_method_types' => ['klarna'], - 'customer' => $this->stripe->findOrCreateCustomer(), - 'description' => $description, - 'metadata' => [ - 'payment_hash' => $this->stripe->payment_hash->hash, - 'gateway_type_id' => GatewayType::KLARNA, - ], - ], array_merge($this->stripe->stripe_connect_auth, ['idempotency_key' => uniqid("st", true)])); - - $data['pi_client_secret'] = $intent->client_secret; - - $this->stripe->payment_hash->data = array_merge((array) $this->stripe->payment_hash->data, ['stripe_amount' => $data['stripe_amount']]); - $this->stripe->payment_hash->save(); + $data = $this->paymentData($data); return render('gateways.stripe.klarna.pay', $data); } @@ -142,4 +117,42 @@ class Klarna throw new PaymentFailed(ctrans('texts.gateway_error'), 500); } + + public function paymentData(array $data): array + { + $this->stripe->init(); + + $data['gateway'] = $this->stripe; + $data['return_url'] = $this->buildReturnUrl(); + $data['stripe_amount'] = $this->stripe->convertToStripeAmount($data['total']['amount_with_fee'], $this->stripe->client->currency()->precision, $this->stripe->client->currency()); + $data['client'] = $this->stripe->client; + $data['customer'] = $this->stripe->findOrCreateCustomer()->id; + $data['country'] = $this->stripe->client->country->iso_3166_2; + + $description = $this->stripe->getDescription(false); + + $intent = \Stripe\PaymentIntent::create([ + 'amount' => $data['stripe_amount'], + 'currency' => $this->stripe->client->getCurrencyCode(), + 'payment_method_types' => ['klarna'], + 'customer' => $this->stripe->findOrCreateCustomer(), + 'description' => $description, + 'metadata' => [ + 'payment_hash' => $this->stripe->payment_hash->hash, + 'gateway_type_id' => GatewayType::KLARNA, + ], + ], array_merge($this->stripe->stripe_connect_auth, ['idempotency_key' => uniqid("st", true)])); + + $data['pi_client_secret'] = $intent->client_secret; + + $this->stripe->payment_hash->data = array_merge((array) $this->stripe->payment_hash->data, ['stripe_amount' => $data['stripe_amount']]); + $this->stripe->payment_hash->save(); + + return $data; + } + + public function livewirePaymentView(array $data): string + { + return 'gateways.stripe.klarna.pay_livewire'; + } } diff --git a/app/PaymentDrivers/Stripe/PRZELEWY24.php b/app/PaymentDrivers/Stripe/PRZELEWY24.php index ce9bb79405..d0422bc167 100644 --- a/app/PaymentDrivers/Stripe/PRZELEWY24.php +++ b/app/PaymentDrivers/Stripe/PRZELEWY24.php @@ -18,9 +18,10 @@ use App\Models\GatewayType; use App\Models\Payment; use App\Models\PaymentType; use App\Models\SystemLog; +use App\PaymentDrivers\Common\LivewireMethodInterface; use App\PaymentDrivers\StripePaymentDriver; -class PRZELEWY24 +class PRZELEWY24 implements LivewireMethodInterface { /** @var StripePaymentDriver */ public StripePaymentDriver $stripe; @@ -37,31 +38,7 @@ class PRZELEWY24 public function paymentView(array $data) { - $this->stripe->init(); - - $data['gateway'] = $this->stripe; - $data['return_url'] = $this->buildReturnUrl(); - $data['stripe_amount'] = $this->stripe->convertToStripeAmount($data['total']['amount_with_fee'], $this->stripe->client->currency()->precision, $this->stripe->client->currency()); - $data['client'] = $this->stripe->client; - $data['customer'] = $this->stripe->findOrCreateCustomer()->id; - $data['country'] = $this->stripe->client->country->iso_3166_2; - - $intent = \Stripe\PaymentIntent::create([ - 'amount' => $data['stripe_amount'], - 'currency' => 'eur', - 'payment_method_types' => ['p24'], - 'customer' => $this->stripe->findOrCreateCustomer(), - 'description' => $this->stripe->getDescription(false), - 'metadata' => [ - 'payment_hash' => $this->stripe->payment_hash->hash, - 'gateway_type_id' => GatewayType::PRZELEWY24, - ], - ], array_merge($this->stripe->stripe_connect_auth, ['idempotency_key' => uniqid("st", true)])); - - $data['pi_client_secret'] = $intent->client_secret; - - $this->stripe->payment_hash->data = array_merge((array) $this->stripe->payment_hash->data, ['stripe_amount' => $data['stripe_amount']]); - $this->stripe->payment_hash->save(); + $data = $this->paymentData($data); return render('gateways.stripe.przelewy24.pay', $data); } @@ -142,4 +119,40 @@ class PRZELEWY24 throw new PaymentFailed('Failed to process the payment.', 500); } + + public function paymentData(array $data): array + { + $this->stripe->init(); + + $data['gateway'] = $this->stripe; + $data['return_url'] = $this->buildReturnUrl(); + $data['stripe_amount'] = $this->stripe->convertToStripeAmount($data['total']['amount_with_fee'], $this->stripe->client->currency()->precision, $this->stripe->client->currency()); + $data['client'] = $this->stripe->client; + $data['customer'] = $this->stripe->findOrCreateCustomer()->id; + $data['country'] = $this->stripe->client->country->iso_3166_2; + + $intent = \Stripe\PaymentIntent::create([ + 'amount' => $data['stripe_amount'], + 'currency' => 'eur', + 'payment_method_types' => ['p24'], + 'customer' => $this->stripe->findOrCreateCustomer(), + 'description' => $this->stripe->getDescription(false), + 'metadata' => [ + 'payment_hash' => $this->stripe->payment_hash->hash, + 'gateway_type_id' => GatewayType::PRZELEWY24, + ], + ], array_merge($this->stripe->stripe_connect_auth, ['idempotency_key' => uniqid("st", true)])); + + $data['pi_client_secret'] = $intent->client_secret; + + $this->stripe->payment_hash->data = array_merge((array) $this->stripe->payment_hash->data, ['stripe_amount' => $data['stripe_amount']]); + $this->stripe->payment_hash->save(); + + return $data; + } + + public function livewirePaymentView(array $data): string + { + return 'gateways.stripe.przelewy24.pay_livewire'; + } } diff --git a/app/PaymentDrivers/Stripe/SEPA.php b/app/PaymentDrivers/Stripe/SEPA.php index 79f98e9f62..e633a06403 100644 --- a/app/PaymentDrivers/Stripe/SEPA.php +++ b/app/PaymentDrivers/Stripe/SEPA.php @@ -19,9 +19,10 @@ use App\Models\GatewayType; use App\Models\Payment; use App\Models\PaymentType; use App\Models\SystemLog; +use App\PaymentDrivers\Common\LivewireMethodInterface; use App\PaymentDrivers\StripePaymentDriver; -class SEPA +class SEPA implements LivewireMethodInterface { /** @var StripePaymentDriver */ public StripePaymentDriver $stripe; @@ -47,33 +48,7 @@ class SEPA public function paymentView(array $data) { - $data['gateway'] = $this->stripe; - $data['payment_method_id'] = GatewayType::SEPA; - $data['stripe_amount'] = $this->stripe->convertToStripeAmount($data['total']['amount_with_fee'], $this->stripe->client->currency()->precision, $this->stripe->client->currency()); - $data['client'] = $this->stripe->client; - $data['customer'] = $this->stripe->findOrCreateCustomer()->id; - $data['country'] = $this->stripe->client->country->iso_3166_2; - $data['payment_hash'] = $this->stripe->payment_hash->hash; - - $intent_data = [ - 'amount' => $data['stripe_amount'], - 'currency' => 'eur', - 'payment_method_types' => ['sepa_debit'], - 'setup_future_usage' => 'off_session', - 'customer' => $this->stripe->findOrCreateCustomer(), - 'description' => $this->stripe->getDescription(false), - 'metadata' => [ - 'payment_hash' => $this->stripe->payment_hash->hash, - 'gateway_type_id' => GatewayType::SEPA, - ], - ]; - - $intent = \Stripe\PaymentIntent::create($intent_data, array_merge($this->stripe->stripe_connect_auth, ['idempotency_key' => uniqid("st", true)])); - - $data['pi_client_secret'] = $intent->client_secret; - - $this->stripe->payment_hash->data = array_merge((array) $this->stripe->payment_hash->data, ['stripe_amount' => $data['stripe_amount']]); - $this->stripe->payment_hash->save(); + $data = $this->paymentData($data); return render('gateways.stripe.sepa.pay', $data); } @@ -176,4 +151,42 @@ class SEPA return $this->stripe->processInternallyFailedPayment($this->stripe, $e); } } + + public function paymentData(array $data): array + { + $data['gateway'] = $this->stripe; + $data['payment_method_id'] = GatewayType::SEPA; + $data['stripe_amount'] = $this->stripe->convertToStripeAmount($data['total']['amount_with_fee'], $this->stripe->client->currency()->precision, $this->stripe->client->currency()); + $data['client'] = $this->stripe->client; + $data['customer'] = $this->stripe->findOrCreateCustomer()->id; + $data['country'] = $this->stripe->client->country->iso_3166_2; + $data['payment_hash'] = $this->stripe->payment_hash->hash; + + $intent_data = [ + 'amount' => $data['stripe_amount'], + 'currency' => 'eur', + 'payment_method_types' => ['sepa_debit'], + 'setup_future_usage' => 'off_session', + 'customer' => $this->stripe->findOrCreateCustomer(), + 'description' => $this->stripe->getDescription(false), + 'metadata' => [ + 'payment_hash' => $this->stripe->payment_hash->hash, + 'gateway_type_id' => GatewayType::SEPA, + ], + ]; + + $intent = \Stripe\PaymentIntent::create($intent_data, array_merge($this->stripe->stripe_connect_auth, ['idempotency_key' => uniqid("st", true)])); + + $data['pi_client_secret'] = $intent->client_secret; + + $this->stripe->payment_hash->data = array_merge((array) $this->stripe->payment_hash->data, ['stripe_amount' => $data['stripe_amount']]); + $this->stripe->payment_hash->save(); + + return $data; + } + + public function livewirePaymentView(array $data): string + { + return 'gateways.stripe.sepa.pay_livewire'; + } } diff --git a/app/PaymentDrivers/Stripe/SOFORT.php b/app/PaymentDrivers/Stripe/SOFORT.php index 4a7faef870..1aa7d95ed8 100644 --- a/app/PaymentDrivers/Stripe/SOFORT.php +++ b/app/PaymentDrivers/Stripe/SOFORT.php @@ -18,9 +18,10 @@ use App\Models\GatewayType; use App\Models\Payment; use App\Models\PaymentType; use App\Models\SystemLog; +use App\PaymentDrivers\Common\LivewireMethodInterface; use App\PaymentDrivers\StripePaymentDriver; -class SOFORT +class SOFORT implements LivewireMethodInterface { /** @var StripePaymentDriver */ public StripePaymentDriver $stripe; @@ -37,31 +38,7 @@ class SOFORT public function paymentView(array $data) { - $this->stripe->init(); - - $data['gateway'] = $this->stripe; - $data['return_url'] = $this->buildReturnUrl(); - $data['stripe_amount'] = $this->stripe->convertToStripeAmount($data['total']['amount_with_fee'], $this->stripe->client->currency()->precision, $this->stripe->client->currency()); - $data['client'] = $this->stripe->client; - $data['customer'] = $this->stripe->findOrCreateCustomer()->id; - $data['country'] = $this->stripe->client->country->iso_3166_2; - - $intent = \Stripe\PaymentIntent::create([ - 'amount' => $data['stripe_amount'], - 'currency' => 'eur', - 'payment_method_types' => ['sofort'], - 'customer' => $this->stripe->findOrCreateCustomer(), - 'description' => $this->stripe->getDescription(false), - 'metadata' => [ - 'payment_hash' => $this->stripe->payment_hash->hash, - 'gateway_type_id' => GatewayType::SOFORT, - ], - ], array_merge($this->stripe->stripe_connect_auth, ['idempotency_key' => uniqid("st", true)])); - - $data['pi_client_secret'] = $intent->client_secret; - - $this->stripe->payment_hash->data = array_merge((array) $this->stripe->payment_hash->data, ['stripe_amount' => $data['stripe_amount']]); - $this->stripe->payment_hash->save(); + $data = $this->paymentData($data); return render('gateways.stripe.sofort.pay', $data); } @@ -137,4 +114,40 @@ class SOFORT throw new PaymentFailed('Failed to process the payment.', 500); } + + public function paymentData(array $data): array + { + $this->stripe->init(); + + $data['gateway'] = $this->stripe; + $data['return_url'] = $this->buildReturnUrl(); + $data['stripe_amount'] = $this->stripe->convertToStripeAmount($data['total']['amount_with_fee'], $this->stripe->client->currency()->precision, $this->stripe->client->currency()); + $data['client'] = $this->stripe->client; + $data['customer'] = $this->stripe->findOrCreateCustomer()->id; + $data['country'] = $this->stripe->client->country->iso_3166_2; + + $intent = \Stripe\PaymentIntent::create([ + 'amount' => $data['stripe_amount'], + 'currency' => 'eur', + 'payment_method_types' => ['sofort'], + 'customer' => $this->stripe->findOrCreateCustomer(), + 'description' => $this->stripe->getDescription(false), + 'metadata' => [ + 'payment_hash' => $this->stripe->payment_hash->hash, + 'gateway_type_id' => GatewayType::SOFORT, + ], + ], array_merge($this->stripe->stripe_connect_auth, ['idempotency_key' => uniqid("st", true)])); + + $data['pi_client_secret'] = $intent->client_secret; + + $this->stripe->payment_hash->data = array_merge((array) $this->stripe->payment_hash->data, ['stripe_amount' => $data['stripe_amount']]); + $this->stripe->payment_hash->save(); + + return $data; + } + + public function livewirePaymentView(array $data): string + { + return 'gateways.stripe.sofort.pay_livewire'; + } } diff --git a/app/PaymentDrivers/Stripe/iDeal.php b/app/PaymentDrivers/Stripe/iDeal.php index 01b346b780..00d738c020 100644 --- a/app/PaymentDrivers/Stripe/iDeal.php +++ b/app/PaymentDrivers/Stripe/iDeal.php @@ -18,9 +18,10 @@ use App\Models\GatewayType; use App\Models\Payment; use App\Models\PaymentType; use App\Models\SystemLog; +use App\PaymentDrivers\Common\LivewireMethodInterface; use App\PaymentDrivers\StripePaymentDriver; -class iDeal +class iDeal implements LivewireMethodInterface { /** @var StripePaymentDriver */ public StripePaymentDriver $stripe; @@ -37,31 +38,7 @@ class iDeal public function paymentView(array $data) { - $this->stripe->init(); - - $data['gateway'] = $this->stripe; - $data['return_url'] = $this->buildReturnUrl(); - $data['stripe_amount'] = $this->stripe->convertToStripeAmount($data['total']['amount_with_fee'], $this->stripe->client->currency()->precision, $this->stripe->client->currency()); - $data['client'] = $this->stripe->client; - $data['customer'] = $this->stripe->findOrCreateCustomer()->id; - $data['country'] = $this->stripe->client->country->iso_3166_2; - - $intent = \Stripe\PaymentIntent::create([ - 'amount' => $data['stripe_amount'], - 'currency' => 'eur', - 'payment_method_types' => ['ideal'], - 'customer' => $this->stripe->findOrCreateCustomer(), - 'description' => $this->stripe->getDescription(false), - 'metadata' => [ - 'payment_hash' => $this->stripe->payment_hash->hash, - 'gateway_type_id' => GatewayType::IDEAL, - ], - ], array_merge($this->stripe->stripe_connect_auth, ['idempotency_key' => uniqid("st", true)])); - - $data['pi_client_secret'] = $intent->client_secret; - - $this->stripe->payment_hash->data = array_merge((array) $this->stripe->payment_hash->data, ['stripe_amount' => $data['stripe_amount']]); - $this->stripe->payment_hash->save(); + $data = $this->paymentData($data); return render('gateways.stripe.ideal.pay', $data); } @@ -142,4 +119,40 @@ class iDeal throw new PaymentFailed('Failed to process the payment.', 500); } + + public function paymentData(array $data): array + { + $this->stripe->init(); + + $data['gateway'] = $this->stripe; + $data['return_url'] = $this->buildReturnUrl(); + $data['stripe_amount'] = $this->stripe->convertToStripeAmount($data['total']['amount_with_fee'], $this->stripe->client->currency()->precision, $this->stripe->client->currency()); + $data['client'] = $this->stripe->client; + $data['customer'] = $this->stripe->findOrCreateCustomer()->id; + $data['country'] = $this->stripe->client->country->iso_3166_2; + + $intent = \Stripe\PaymentIntent::create([ + 'amount' => $data['stripe_amount'], + 'currency' => 'eur', + 'payment_method_types' => ['ideal'], + 'customer' => $this->stripe->findOrCreateCustomer(), + 'description' => $this->stripe->getDescription(false), + 'metadata' => [ + 'payment_hash' => $this->stripe->payment_hash->hash, + 'gateway_type_id' => GatewayType::IDEAL, + ], + ], array_merge($this->stripe->stripe_connect_auth, ['idempotency_key' => uniqid("st", true)])); + + $data['pi_client_secret'] = $intent->client_secret; + + $this->stripe->payment_hash->data = array_merge((array) $this->stripe->payment_hash->data, ['stripe_amount' => $data['stripe_amount']]); + $this->stripe->payment_hash->save(); + + return $data; + } + + public function livewirePaymentView(array $data): string + { + return 'gateways.stripe.ideal.pay_livewire'; + } } diff --git a/app/PaymentDrivers/StripePaymentDriver.php b/app/PaymentDrivers/StripePaymentDriver.php index d91e39fc37..970feb9f31 100644 --- a/app/PaymentDrivers/StripePaymentDriver.php +++ b/app/PaymentDrivers/StripePaymentDriver.php @@ -12,6 +12,47 @@ namespace App\PaymentDrivers; +<<<<<<< HEAD +======= +use App\Exceptions\PaymentFailed; +use App\Exceptions\StripeConnectFailure; +use App\Http\Requests\Payments\PaymentWebhookRequest; +use App\Http\Requests\Request; +use App\Jobs\Util\SystemLogger; +use App\Models\Client; +use App\Models\ClientGatewayToken; +use App\Models\GatewayType; +use App\Models\Payment; +use App\Models\PaymentHash; +use App\Models\SystemLog; +use App\PaymentDrivers\Common\LivewireMethodInterface; +use App\PaymentDrivers\Stripe\ACH; +use App\PaymentDrivers\Stripe\ACSS; +use App\PaymentDrivers\Stripe\Alipay; +use App\PaymentDrivers\Stripe\BACS; +use App\PaymentDrivers\Stripe\Bancontact; +use App\PaymentDrivers\Stripe\BankTransfer; +use App\PaymentDrivers\Stripe\BECS; +use App\PaymentDrivers\Stripe\BrowserPay; +use App\PaymentDrivers\Stripe\Charge; +use App\PaymentDrivers\Stripe\Connect\Verify; +use App\PaymentDrivers\Stripe\CreditCard; +use App\PaymentDrivers\Stripe\EPS; +use App\PaymentDrivers\Stripe\FPX; +use App\PaymentDrivers\Stripe\GIROPAY; +use App\PaymentDrivers\Stripe\iDeal; +use App\PaymentDrivers\Stripe\ImportCustomers; +use App\PaymentDrivers\Stripe\Jobs\PaymentIntentFailureWebhook; +use App\PaymentDrivers\Stripe\Jobs\PaymentIntentPartiallyFundedWebhook; +use App\PaymentDrivers\Stripe\Jobs\PaymentIntentProcessingWebhook; +use App\PaymentDrivers\Stripe\Jobs\PaymentIntentWebhook; +use App\PaymentDrivers\Stripe\Klarna; +use App\PaymentDrivers\Stripe\PRZELEWY24; +use App\PaymentDrivers\Stripe\SEPA; +use App\PaymentDrivers\Stripe\SOFORT; +use App\PaymentDrivers\Stripe\Utilities; +use App\Utils\Traits\MakesHash; +>>>>>>> new_payment_flow use Exception; use Stripe\Stripe; use Stripe\Account; @@ -419,6 +460,33 @@ class StripePaymentDriver extends BaseDriver return $this->payment_method->paymentView($data); } + public function processPaymentViewData(array $data): array + { + $data = $this->payment_method->paymentData($data); + + $data['stripe_account_id'] = $this->company_gateway->getConfigField('account_id'); + + if (array_key_exists('intent', $data)) { + $data['client_secret'] = $data['intent']->client_secret; + } + + unset($data['intent']); + + $token_billing_string = 'true'; + + if($this->company_gateway->token_billing == 'off' || $this->company_gateway->token_billing == 'optin') { + $token_billing_string = 'false'; + } + + if (isset($data['pre_payment']) && $data['pre_payment'] == '1' && isset($data['is_recurring']) && $data['is_recurring'] == '1') { + $token_billing_string = 'true'; + } + + $data['token_billing_string'] = $token_billing_string; + + return $data; + } + public function processPaymentResponse($request) { return $this->payment_method->paymentResponse($request); diff --git a/app/Services/Client/PaymentMethod.php b/app/Services/Client/PaymentMethod.php index 7ca8965d3f..680b57e775 100644 --- a/app/Services/Client/PaymentMethod.php +++ b/app/Services/Client/PaymentMethod.php @@ -36,14 +36,24 @@ class PaymentMethod { $this->getGateways() ->getMethods(); - // ->buildUrls(); return $this->getPaymentUrls(); } public function getPaymentUrls() { + $pu = collect($this->payment_urls); + $keys = $pu->pluck('gateway_type_id'); + $contains_both = $keys->contains('1') && $keys->contains('29'); //handle the case where PayPal Advanced cards + regular CC is present + + $this->payment_urls = $pu->when($contains_both, function ($methods){ + return $methods->reject(function ($item){ + return $item['gateway_type_id'] == '29'; + }); + })->toArray(); + return $this->payment_urls; + } public function getPaymentMethods() @@ -168,17 +178,26 @@ class PaymentMethod foreach ($gateway->driver($this->client)->gatewayTypes() as $type) { if (isset($gateway->fees_and_limits) && is_object($gateway->fees_and_limits) && property_exists($gateway->fees_and_limits, GatewayType::CREDIT_CARD)) { //@phpstan-ignore-line if ($this->validGatewayForAmount($gateway->fees_and_limits->{GatewayType::CREDIT_CARD}, $this->amount)) { +<<<<<<< HEAD // $this->payment_methods[] = [$gateway->id => $type]; // @15-06-2024 +======= +>>>>>>> new_payment_flow $this->buildUrl($gateway, $type); } } else { - // $this->payment_methods[] = [$gateway->id => null]; - //@15-06-2024 $this->buildUrl($gateway, null); } } } + + if (($this->client->getSetting('use_credits_payment') == 'option' || $this->client->getSetting('use_credits_payment') == 'always') && $this->client->service()->getCreditBalance() > 0) { + $this->payment_urls[] = [ + 'label' => ctrans('texts.apply_credit'), + 'company_gateway_id' => CompanyGateway::GATEWAY_CREDIT, + 'gateway_type_id' => GatewayType::CREDIT, + ]; + } if (($this->client->getSetting('use_credits_payment') == 'option' || $this->client->getSetting('use_credits_payment') == 'always') && $this->client->service()->getCreditBalance() > 0) { // Show credits as only payment option if both statements are true. @@ -225,6 +244,7 @@ class PaymentMethod return $this; } +<<<<<<< HEAD //@deprecated as buildUrl() supercedes private function buildUrls() { @@ -271,6 +291,8 @@ class PaymentMethod return $this; } +======= +>>>>>>> new_payment_flow private function validGatewayForAmount($fees_and_limits_for_payment_type): bool { if (isset($fees_and_limits_for_payment_type)) { diff --git a/app/Services/Client/RFFService.php b/app/Services/Client/RFFService.php new file mode 100644 index 0000000000..d2e3231175 --- /dev/null +++ b/app/Services/Client/RFFService.php @@ -0,0 +1,189 @@ + 'name', + 'client_website' => 'website', + 'client_phone' => 'phone', + + 'client_address_line_1' => 'address1', + 'client_address_line_2' => 'address2', + 'client_city' => 'city', + 'client_state' => 'state', + 'client_postal_code' => 'postal_code', + 'client_country_id' => 'country_id', + + 'client_shipping_address_line_1' => 'shipping_address1', + 'client_shipping_address_line_2' => 'shipping_address2', + 'client_shipping_city' => 'shipping_city', + 'client_shipping_state' => 'shipping_state', + 'client_shipping_postal_code' => 'shipping_postal_code', + 'client_shipping_country_id' => 'shipping_country_id', + + 'client_custom_value1' => 'custom_value1', + 'client_custom_value2' => 'custom_value2', + 'client_custom_value3' => 'custom_value3', + 'client_custom_value4' => 'custom_value4', + + 'contact_first_name' => 'first_name', + 'contact_last_name' => 'last_name', + 'contact_email' => 'email', + // 'contact_phone' => 'phone', + ]; + + public int $unfilled_fields = 0; + + public function __construct( + public array $fields, + public string $database, + public string $company_gateway_id, + ) { + } + + public function check(ClientContact $contact): void + { + $_contact = $contact; + + foreach ($this->fields as $index => $field) { + $_field = $this->mappings[$field['name']]; + + if (Str::startsWith($field['name'], 'client_')) { + if ( + empty($_contact->client->{$_field}) + || is_null($_contact->client->{$_field}) + ) { + // $this->show_form = true; + $this->unfilled_fields++; + } else { + $this->fields[$index]['filled'] = true; + } + } + + if (Str::startsWith($field['name'], 'contact_')) { + if (empty($_contact->{$_field}) || is_null($_contact->{$_field}) || str_contains($_contact->{$_field}, '@example.com')) { + $this->unfilled_fields++; + } else { + $this->fields[$index]['filled'] = true; + } + } + } + } + + public function handleSubmit(array $data, ClientContact $contact, callable $callback, bool $return_errors = false): bool|array + { + MultiDB::setDb($this->database); + + $rules = []; + + collect($this->fields)->map(function ($field) use (&$rules) { + if (!array_key_exists('filled', $field)) { + $rules[$field['name']] = array_key_exists('validation_rules', $field) + ? $field['validation_rules'] + : 'required'; + } + }); + + $validator = Validator::make($data, $rules); + + if ($validator->fails()) { + if ($return_errors) { + return $validator->getMessageBag()->getMessages(); + } + + session()->flash('validation_errors', $validator->getMessageBag()->getMessages()); + + return false; + } + + if ($this->update($data, $contact)) { + $callback(); + + return true; + } + + return false; + } + + public function update(array $data, ClientContact $_contact): bool + { + $client = []; + $contact = []; + + MultiDB::setDb($this->database); + + foreach ($data as $field => $value) { + if (Str::startsWith($field, 'client_')) { + $client[$this->mappings[$field]] = $value; + } + + if (Str::startsWith($field, 'contact_')) { + $contact[$this->mappings[$field]] = $value; + } + } + + // $_contact->first_name = $data['contact_first_name'] ?? ''; + // $_contact->last_name = $data['contact_last_name'] ?? ''; + // $_contact->client->name = $data['client_name'] ?? ''; + // $_contact->email = $data['contact_email'] ?? ''; + // $_contact->client->phone = $data['client_phone'] ?? ''; + // $_contact->client->address1 = $data['client_address_line_1'] ?? ''; + // $_contact->client->city = $data['client_city'] ?? ''; + // $_contact->client->state = $data['client_state'] ?? ''; + // $_contact->client->country_id = $data['client_country_id'] ?? ''; + // $_contact->client->postal_code = $data['client_postal_code'] ?? ''; + // $_contact->client->shipping_address1 = $data['client_shipping_address_line_1'] ?? ''; + // $_contact->client->shipping_city = $data['client_shipping_city'] ?? ''; + // $_contact->client->shipping_state = $data['client_shipping_state'] ?? ''; + // $_contact->client->shipping_postal_code = $data['client_shipping_postal_code'] ?? ''; + // $_contact->client->shipping_country_id = $data['client_shipping_country_id'] ?? ''; + // $_contact->client->custom_value1 = $data['client_custom_value1'] ?? ''; + // $_contact->client->custom_value2 = $data['client_custom_value2'] ?? ''; + // $_contact->client->custom_value3 = $data['client_custom_value3'] ?? ''; + // $_contact->client->custom_value4 = $data['client_custom_value4'] ?? ''; + // $_contact->push(); + + + $_contact + ->fill($contact) + ->push(); + + $_contact->client + ->fill($client) + ->push(); + + /** @var \App\Models\CompanyGateway $cg */ + $cg = CompanyGateway::find( + $this->company_gateway_id, + ); + + //@phpstan-ignore-next-line + if ($cg && $cg->update_details) { + $payment_gateway = $cg->driver($_contact->client)->init(); + + if (method_exists($payment_gateway, "updateCustomer")) { + $payment_gateway->updateCustomer(); + } + } + + return true; + } +} \ No newline at end of file diff --git a/app/Services/ClientPortal/LivewireInstantPayment.php b/app/Services/ClientPortal/LivewireInstantPayment.php new file mode 100644 index 0000000000..91cf490d26 --- /dev/null +++ b/app/Services/ClientPortal/LivewireInstantPayment.php @@ -0,0 +1,263 @@ + true, + 'error' => '', + 'redirect' => '', + 'payload' => [], + 'component' => '', + ]; + + /** + * is_credit_payment + * + * Indicates whether this is a credit payment + * @var bool + */ + private $is_credit_payment = false; + + /** + * __construct + * + * contact() guard + * company_gateway_id + * payable_invoices[] ['invoice_id' => '', 'amount' => 0] + * ?signature + * ?signature_ip + * payment_method_id + * ?pre_payment + * ?frequency_id + * ?remaining_cycles + * ?is_recurring + * ?hash + * + * @param array $data + * @return void + */ + public function __construct(public array $data) + { + } + + public function run() + { + nlog($this->data); + + $company_gateway = CompanyGateway::query()->find($this->data['company_gateway_id']); + + if ($this->data['company_gateway_id'] == CompanyGateway::GATEWAY_CREDIT) { + $this->is_credit_payment = true; + } + + $payable_invoices = collect($this->data['payable_invoices']); + + $tokens = []; + + $invoices = Invoice::query() + ->whereIn('id', $this->transformKeys($payable_invoices->pluck('invoice_id')->toArray())) + ->withTrashed() + ->get(); + + $client = $invoices->first()->client; + + /* pop non payable invoice from the $payable_invoices array */ + $payable_invoices = $payable_invoices->filter(function ($payable_invoice) use ($invoices) { + return $invoices->where('hashed_id', $payable_invoice['invoice_id'])->first(); + }); + + //$payable_invoices = $payable_invoices->map(function ($payable_invoice) use ($invoices, $settings) { + $payable_invoice_collection = collect(); + + foreach ($payable_invoices as $payable_invoice) { + $payable_invoice['amount'] = Number::parseFloat($payable_invoice['amount']); + + $invoice = $invoices->first(function ($inv) use ($payable_invoice) { + return $payable_invoice['invoice_id'] == $inv->hashed_id; + }); + + $payable_amount = Number::roundValue(Number::parseFloat($payable_invoice['amount']), $client->currency()->precision); + $invoice_balance = Number::roundValue($invoice->balance, $client->currency()->precision); + + $payable_invoice['due_date'] = $this->formatDate($invoice->due_date, $invoice->client->date_format()); + $payable_invoice['invoice_number'] = $invoice->number; + + if (isset($invoice->po_number)) { + $additional_info = $invoice->po_number; + } elseif (isset($invoice->public_notes)) { + $additional_info = $invoice->public_notes; + } else { + $additional_info = $invoice->date; + } + + $payable_invoice['additional_info'] = $additional_info; + + $payable_invoice_collection->push($payable_invoice); + } + + if (isset($this->data['signature']) && $this->data['signature']) { + + $contact_id = auth()->guard('contact')->user() ? auth()->guard('contact')->user()->id : null; + + $invoices->each(function ($invoice) use ($contact_id) { + InjectSignature::dispatch($invoice, $contact_id, $this->data['signature'], $this->data['signature_ip']); + }); + } + + $payable_invoices = $payable_invoice_collection; + + $payment_method_id = $this->data['payment_method_id']; + $invoice_totals = $payable_invoices->sum('amount'); + $first_invoice = $invoices->first(); + $credit_totals = in_array($first_invoice->client->getSetting('use_credits_payment'), ['always', 'option']) ? $first_invoice->client->service()->getCreditBalance() : 0; + $starting_invoice_amount = $first_invoice->balance; + + if ($company_gateway) { + $first_invoice->service()->addGatewayFee($company_gateway, $payment_method_id, $invoice_totals)->save(); + } + + /** + * Gateway fee is calculated + * by adding it as a line item, and then subtract + * the starting and finishing amounts of the invoice. + */ + $fee_totals = $first_invoice->balance - $starting_invoice_amount; + + if ($company_gateway) { + $tokens = $client->gateway_tokens() + ->whereCompanyGatewayId($company_gateway->id) + ->whereGatewayTypeId($payment_method_id) + ->get(); + } + + if (! $this->is_credit_payment) { + $credit_totals = 0; + } + + /** $hash_data = mixed[] */ + $hash_data = [ + 'invoices' => $payable_invoices->toArray(), + 'credits' => $credit_totals, + 'amount_with_fee' => max(0, (($invoice_totals + $fee_totals) - $credit_totals)), + 'pre_payment' => $this->data['pre_payment'], + 'frequency_id' => $this->data['frequency_id'], + 'remaining_cycles' => $this->data['remaining_cycles'], + 'is_recurring' => $this->data['is_recurring'], + ]; + + if (isset($this->data['hash'])) { + $hash_data['billing_context'] = Cache::get($this->data['hash']); + } elseif ($old_hash = PaymentHash::query()->where('fee_invoice_id', $first_invoice->id)->whereNull('payment_id')->orderBy('id', 'desc')->first()) { + if (isset($old_hash->data->billing_context)) { + $hash_data['billing_context'] = $old_hash->data->billing_context; + } + } + + $payment_hash = new PaymentHash(); + $payment_hash->hash = Str::random(32); + $payment_hash->data = $hash_data; + $payment_hash->fee_total = $fee_totals; + $payment_hash->fee_invoice_id = $first_invoice->id; + + $payment_hash->save(); + + if ($this->is_credit_payment) { + $amount_with_fee = max(0, (($invoice_totals + $fee_totals) - $credit_totals)); + } else { + $credit_totals = 0; + $amount_with_fee = max(0, $invoice_totals + $fee_totals); + } + + $totals = [ + 'credit_totals' => $credit_totals, + 'invoice_totals' => $invoice_totals, + 'fee_total' => $fee_totals, + 'amount_with_fee' => $amount_with_fee, + ]; + + $data = [ + 'ph' => $payment_hash, + 'payment_hash' => $payment_hash->hash, + 'total' => $totals, + 'invoices' => $payable_invoices, + 'tokens' => $tokens, + 'payment_method_id' => $payment_method_id, + 'amount_with_fee' => $invoice_totals + $fee_totals, + 'client' => $client, + 'pre_payment' => $this->data['pre_payment'], + 'is_recurring' => $this->data['is_recurring'], + 'company_gateway' => $company_gateway, + ]; + + if ($this->is_credit_payment) { + + $this->mergeResponder(['success' => true, 'component' => 'CreditPaymentComponent', 'payload' => $data]); + return $this->getResponder(); + + } + + $this->mergeResponder(['success' => true, 'payload' => $data]); + + return $this->getResponder(); + + } + + private function getResponder(): array + { + return $this->responder; + } + + private function mergeResponder(array $data): self + { + $this->responder = array_merge($this->responder, $data); + + return $this; + } +} \ No newline at end of file diff --git a/app/Services/Report/ProfitLoss.php b/app/Services/Report/ProfitLoss.php index 09d392435a..b5d2158231 100644 --- a/app/Services/Report/ProfitLoss.php +++ b/app/Services/Report/ProfitLoss.php @@ -99,6 +99,13 @@ class ProfitLoss public function run() { + + MultiDB::setDb($this->company->db); + App::forgetInstance('translator'); + App::setLocale($this->company->locale()); + $t = app('translator'); + $t->replace(Ninja::transformTranslations($this->company->settings)); + return $this->build()->getCsv(); } @@ -356,12 +363,6 @@ class ProfitLoss nlog($this->income_taxes); nlog(array_sum(array_column($this->expense_break_down, 'total'))); - MultiDB::setDb($this->company->db); - App::forgetInstance('translator'); - App::setLocale($this->company->locale()); - $t = app('translator'); - $t->replace(Ninja::transformTranslations($this->company->settings)); - $csv = Writer::createFromString(); $csv->insertOne([ctrans('texts.profit_and_loss')]); diff --git a/app/Utils/TempFile.php b/app/Utils/TempFile.php index 58cd8a942c..1d9d6da939 100644 --- a/app/Utils/TempFile.php +++ b/app/Utils/TempFile.php @@ -13,6 +13,10 @@ namespace App\Utils; use Illuminate\Http\File; use Illuminate\Http\UploadedFile; +<<<<<<< HEAD +======= + +>>>>>>> new_payment_flow class TempFile { public static function path($url): string @@ -64,6 +68,7 @@ class TempFile // return UploadedFile object return $file; } +<<<<<<< HEAD /* create a tmp file from a raw string: https://gist.github.com/waska14/8b3bcebfad1f86f7fcd3b82927576e38*/ public static function UploadedFileFromUrl(string $url, string|null $fileName = null, string|null $mimeType = null): UploadedFile @@ -93,4 +98,6 @@ class TempFile // return UploadedFile object return $file; } +======= +>>>>>>> new_payment_flow } diff --git a/app/Utils/Traits/WithSecureContext.php b/app/Utils/Traits/WithSecureContext.php new file mode 100644 index 0000000000..09d0cb00d2 --- /dev/null +++ b/app/Utils/Traits/WithSecureContext.php @@ -0,0 +1,47 @@ +get('secureContext.invoice-pay'); + } + + public function setContext(string $property, $value): array + { + $clone = session()->pull('secureContext.invoice-pay', default: []); + + data_set($clone, $property, $value); + + session()->put('secureContext.invoice-pay', $clone); + + $this->dispatch(self::CONTEXT_UPDATE); + + return $clone; + } + + public function resetContext(): void + { + session()->forget('secureContext.invoice-pay'); + } +} diff --git a/composer.lock b/composer.lock index 8da44f54d9..824caee0ac 100644 --- a/composer.lock +++ b/composer.lock @@ -535,6 +535,7 @@ }, { "name": "aws/aws-sdk-php", +<<<<<<< HEAD "version": "3.320.4", "source": { "type": "git", @@ -545,6 +546,18 @@ "type": "zip", "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/e6af3e760864d43a30d8b7deb4f9dc6a49a5f66a", "reference": "e6af3e760864d43a30d8b7deb4f9dc6a49a5f66a", +======= + "version": "3.315.1", + "source": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-php.git", + "reference": "13871330833e167d098240dab74b8b069b9b07e3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/13871330833e167d098240dab74b8b069b9b07e3", + "reference": "13871330833e167d098240dab74b8b069b9b07e3", +>>>>>>> new_payment_flow "shasum": "" }, "require": { @@ -627,9 +640,15 @@ "support": { "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "issues": "https://github.com/aws/aws-sdk-php/issues", +<<<<<<< HEAD "source": "https://github.com/aws/aws-sdk-php/tree/3.320.4" }, "time": "2024-08-20T18:20:32+00:00" +======= + "source": "https://github.com/aws/aws-sdk-php/tree/3.315.1" + }, + "time": "2024-06-27T18:03:53+00:00" +>>>>>>> new_payment_flow }, { "name": "bacon/bacon-qr-code", @@ -2522,6 +2541,7 @@ }, { "name": "google/apiclient-services", +<<<<<<< HEAD "version": "v0.369.0", "source": { "type": "git", @@ -2532,6 +2552,18 @@ "type": "zip", "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/002f610e4c3acf0636b4fb1f46314a2097e1c8b4", "reference": "002f610e4c3acf0636b4fb1f46314a2097e1c8b4", +======= + "version": "v0.361.0", + "source": { + "type": "git", + "url": "https://github.com/googleapis/google-api-php-client-services.git", + "reference": "f90e9a059ce5a6076b4fc8571a4fac6564012782" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/f90e9a059ce5a6076b4fc8571a4fac6564012782", + "reference": "f90e9a059ce5a6076b4fc8571a4fac6564012782", +>>>>>>> new_payment_flow "shasum": "" }, "require": { @@ -2560,9 +2592,15 @@ ], "support": { "issues": "https://github.com/googleapis/google-api-php-client-services/issues", +<<<<<<< HEAD "source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.369.0" }, "time": "2024-08-14T20:31:16+00:00" +======= + "source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.361.0" + }, + "time": "2024-06-23T01:02:19+00:00" +>>>>>>> new_payment_flow }, { "name": "google/auth", @@ -4551,6 +4589,7 @@ }, { "name": "laravel/framework", +<<<<<<< HEAD "version": "v11.21.0", "source": { "type": "git", @@ -4561,6 +4600,18 @@ "type": "zip", "url": "https://api.github.com/repos/laravel/framework/zipball/9d9d36708d56665b12185493f684abce38ad2d30", "reference": "9d9d36708d56665b12185493f684abce38ad2d30", +======= + "version": "v11.13.0", + "source": { + "type": "git", + "url": "https://github.com/laravel/framework.git", + "reference": "92deaa4f037ff100e36809443811301819a8cf84" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/framework/zipball/92deaa4f037ff100e36809443811301819a8cf84", + "reference": "92deaa4f037ff100e36809443811301819a8cf84", +>>>>>>> new_payment_flow "shasum": "" }, "require": { @@ -4753,7 +4804,11 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, +<<<<<<< HEAD "time": "2024-08-20T15:00:52+00:00" +======= + "time": "2024-06-27T09:04:50+00:00" +>>>>>>> new_payment_flow }, { "name": "laravel/pint", @@ -6393,6 +6448,7 @@ }, { "name": "mollie/mollie-api-php", +<<<<<<< HEAD "version": "v2.71.0", "source": { "type": "git", @@ -6403,6 +6459,18 @@ "type": "zip", "url": "https://api.github.com/repos/mollie/mollie-api-php/zipball/dff324f0621ff134fbefffa42ee511833a58578f", "reference": "dff324f0621ff134fbefffa42ee511833a58578f", +======= + "version": "v2.69.0", + "source": { + "type": "git", + "url": "https://github.com/mollie/mollie-api-php.git", + "reference": "9a53f8bd6c89ae3e62982921a2f9d8ed68f9900d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mollie/mollie-api-php/zipball/9a53f8bd6c89ae3e62982921a2f9d8ed68f9900d", + "reference": "9a53f8bd6c89ae3e62982921a2f9d8ed68f9900d", +>>>>>>> new_payment_flow "shasum": "" }, "require": { @@ -6479,9 +6547,103 @@ ], "support": { "issues": "https://github.com/mollie/mollie-api-php/issues", +<<<<<<< HEAD "source": "https://github.com/mollie/mollie-api-php/tree/v2.71.0" }, "time": "2024-07-17T08:02:14+00:00" +======= + "source": "https://github.com/mollie/mollie-api-php/tree/v2.69.0" + }, + "time": "2024-06-24T11:52:46+00:00" + }, + { + "name": "moneyphp/money", + "version": "v4.5.0", + "source": { + "type": "git", + "url": "https://github.com/moneyphp/money.git", + "reference": "a1daa7daf159b4044e3d0c34c41fe2be5860e850" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/moneyphp/money/zipball/a1daa7daf159b4044e3d0c34c41fe2be5860e850", + "reference": "a1daa7daf159b4044e3d0c34c41fe2be5860e850", + "shasum": "" + }, + "require": { + "ext-bcmath": "*", + "ext-filter": "*", + "ext-json": "*", + "php": "~8.1.0 || ~8.2.0 || ~8.3.0" + }, + "require-dev": { + "cache/taggable-cache": "^1.1.0", + "doctrine/coding-standard": "^12.0", + "doctrine/instantiator": "^1.5.0 || ^2.0", + "ext-gmp": "*", + "ext-intl": "*", + "florianv/exchanger": "^2.8.1", + "florianv/swap": "^4.3.0", + "moneyphp/crypto-currencies": "^1.1.0", + "moneyphp/iso-currencies": "^3.4", + "php-http/message": "^1.16.0", + "php-http/mock-client": "^1.6.0", + "phpbench/phpbench": "^1.2.5", + "phpunit/phpunit": "^10.5.9", + "psalm/plugin-phpunit": "^0.18.4", + "psr/cache": "^1.0.1 || ^2.0 || ^3.0", + "vimeo/psalm": "~5.20.0" + }, + "suggest": { + "ext-gmp": "Calculate without integer limits", + "ext-intl": "Format Money objects with intl", + "florianv/exchanger": "Exchange rates library for PHP", + "florianv/swap": "Exchange rates library for PHP", + "psr/cache-implementation": "Used for Currency caching" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Money\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mathias Verraes", + "email": "mathias@verraes.net", + "homepage": "http://verraes.net" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + }, + { + "name": "Frederik Bosch", + "email": "f.bosch@genkgo.nl" + } + ], + "description": "PHP implementation of Fowler's Money pattern", + "homepage": "http://moneyphp.org", + "keywords": [ + "Value Object", + "money", + "vo" + ], + "support": { + "issues": "https://github.com/moneyphp/money/issues", + "source": "https://github.com/moneyphp/money/tree/v4.5.0" + }, + "time": "2024-02-15T19:47:21+00:00" +>>>>>>> new_payment_flow }, { "name": "monolog/monolog", @@ -8282,6 +8444,7 @@ }, { "name": "phpseclib/phpseclib", +<<<<<<< HEAD "version": "3.0.41", "source": { "type": "git", @@ -8292,6 +8455,18 @@ "type": "zip", "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/621c73f7dcb310b61de34d1da4c4204e8ace6ceb", "reference": "621c73f7dcb310b61de34d1da4c4204e8ace6ceb", +======= + "version": "3.0.39", + "source": { + "type": "git", + "url": "https://github.com/phpseclib/phpseclib.git", + "reference": "211ebc399c6e73c225a018435fe5ae209d1d1485" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/211ebc399c6e73c225a018435fe5ae209d1d1485", + "reference": "211ebc399c6e73c225a018435fe5ae209d1d1485", +>>>>>>> new_payment_flow "shasum": "" }, "require": { @@ -8372,7 +8547,11 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", +<<<<<<< HEAD "source": "https://github.com/phpseclib/phpseclib/tree/3.0.41" +======= + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.39" +>>>>>>> new_payment_flow }, "funding": [ { @@ -8388,7 +8567,11 @@ "type": "tidelift" } ], +<<<<<<< HEAD "time": "2024-08-12T00:13:54+00:00" +======= + "time": "2024-06-24T06:27:33+00:00" +>>>>>>> new_payment_flow }, { "name": "phpstan/phpdoc-parser", @@ -18416,6 +18599,7 @@ }, { "name": "spatie/error-solutions", +<<<<<<< HEAD "version": "1.1.1", "source": { "type": "git", @@ -18426,6 +18610,18 @@ "type": "zip", "url": "https://api.github.com/repos/spatie/error-solutions/zipball/ae7393122eda72eed7cc4f176d1e96ea444f2d67", "reference": "ae7393122eda72eed7cc4f176d1e96ea444f2d67", +======= + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/spatie/error-solutions.git", + "reference": "55ea4117e0fde89d520883734ab9b71064c48876" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/error-solutions/zipball/55ea4117e0fde89d520883734ab9b71064c48876", + "reference": "55ea4117e0fde89d520883734ab9b71064c48876", +>>>>>>> new_payment_flow "shasum": "" }, "require": { @@ -18478,7 +18674,11 @@ ], "support": { "issues": "https://github.com/spatie/error-solutions/issues", +<<<<<<< HEAD "source": "https://github.com/spatie/error-solutions/tree/1.1.1" +======= + "source": "https://github.com/spatie/error-solutions/tree/1.0.3" +>>>>>>> new_payment_flow }, "funding": [ { @@ -18486,7 +18686,11 @@ "type": "github" } ], +<<<<<<< HEAD "time": "2024-07-25T11:06:04+00:00" +======= + "time": "2024-06-27T12:22:48+00:00" +>>>>>>> new_payment_flow }, { "name": "spatie/flare-client-php", diff --git a/package-lock.json b/package-lock.json index 8c337b628e..4cab29e54b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,6 +5,7 @@ "packages": { "": { "dependencies": { + "@invoiceninja/simple-card": "^0.0.2", "axios": "^0.25", "card-js": "^1.0.13", "card-validator": "^8.1.1", @@ -17,7 +18,8 @@ "lodash": "^4.17.21", "resolve-url-loader": "^4.0.0", "sass": "^1.43.4", - "sass-loader": "^12.3.0" + "sass-loader": "^12.3.0", + "signature_pad": "^5.0.2" }, "devDependencies": { "@babel/compat-data": "7.15.0", @@ -2022,6 +2024,15 @@ "purgecss": "^3.1.3" } }, + "node_modules/@invoiceninja/simple-card": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/@invoiceninja/simple-card/-/simple-card-0.0.2.tgz", + "integrity": "sha512-xDZvfrumnE7Qkp5e4N8EFfEIOcQfMJXSI+o/xeVlTb1WvibulSBgWkIg7J0zZW0eIDvGKCpEv3k+NBpASlaJUw==", + "dependencies": { + "@maskito/core": "^3.0.0", + "@maskito/kit": "^3.0.0" + } + }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -2187,6 +2198,19 @@ "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz", "integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==" }, + "node_modules/@maskito/core": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@maskito/core/-/core-3.0.0.tgz", + "integrity": "sha512-g7zeYPMlpMczrq4Huf+Bpdm3Emy/GO0NUXXnQnUiCjlAoKQl+86cLyP5Hbf4HGcNl/J9SoEGEA4uoW6uUc/yLw==" + }, + "node_modules/@maskito/kit": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@maskito/kit/-/kit-3.0.0.tgz", + "integrity": "sha512-aXRlDBjeNox/+D7hbXtnM9INGml1QUIXhrnScrCsbqgg7550mt/ivh4PrxL7oazq/BH7HhvS4olJCF5TPEti1g==", + "peerDependencies": { + "@maskito/core": "^3.0.0" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -9599,6 +9623,11 @@ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" }, + "node_modules/signature_pad": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/signature_pad/-/signature_pad-5.0.2.tgz", + "integrity": "sha512-FSseAwRWznAQg90CnrTbC570u1QYi8gijZiyboc18SK2IUx7sYVZhNPLnJRCnwhpyOpgdqXf91XAHL4Yg41yCg==" + }, "node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -12757,6 +12786,15 @@ "purgecss": "^3.1.3" } }, + "@invoiceninja/simple-card": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/@invoiceninja/simple-card/-/simple-card-0.0.2.tgz", + "integrity": "sha512-xDZvfrumnE7Qkp5e4N8EFfEIOcQfMJXSI+o/xeVlTb1WvibulSBgWkIg7J0zZW0eIDvGKCpEv3k+NBpASlaJUw==", + "requires": { + "@maskito/core": "^3.0.0", + "@maskito/kit": "^3.0.0" + } + }, "@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -12881,6 +12919,17 @@ "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz", "integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==" }, + "@maskito/core": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@maskito/core/-/core-3.0.0.tgz", + "integrity": "sha512-g7zeYPMlpMczrq4Huf+Bpdm3Emy/GO0NUXXnQnUiCjlAoKQl+86cLyP5Hbf4HGcNl/J9SoEGEA4uoW6uUc/yLw==" + }, + "@maskito/kit": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@maskito/kit/-/kit-3.0.0.tgz", + "integrity": "sha512-aXRlDBjeNox/+D7hbXtnM9INGml1QUIXhrnScrCsbqgg7550mt/ivh4PrxL7oazq/BH7HhvS4olJCF5TPEti1g==", + "requires": {} + }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -18394,6 +18443,11 @@ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" }, + "signature_pad": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/signature_pad/-/signature_pad-5.0.2.tgz", + "integrity": "sha512-FSseAwRWznAQg90CnrTbC570u1QYi8gijZiyboc18SK2IUx7sYVZhNPLnJRCnwhpyOpgdqXf91XAHL4Yg41yCg==" + }, "slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", diff --git a/package.json b/package.json index bff788fc32..43bb262ed9 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "vue-template-compiler": "^2.6.14" }, "dependencies": { + "@invoiceninja/simple-card": "^0.0.2", "axios": "^0.25", "card-js": "^1.0.13", "card-validator": "^8.1.1", @@ -35,7 +36,8 @@ "lodash": "^4.17.21", "resolve-url-loader": "^4.0.0", "sass": "^1.43.4", - "sass-loader": "^12.3.0" + "sass-loader": "^12.3.0", + "signature_pad": "^5.0.2" }, "type": "module" } diff --git a/public/build/assets/app-06521fee.css b/public/build/assets/app-06521fee.css index ed4a7a525a..c48d601e31 100644 --- a/public/build/assets/app-06521fee.css +++ b/public/build/assets/app-06521fee.css @@ -1 +1,5 @@ +<<<<<<<< HEAD:public/build/assets/app-06521fee.css *,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Open Sans,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}[type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}[type=text]:focus,input:where(:not([type])):focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=number]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=month]:focus,[type=search]:focus,[type=tel]:focus,[type=time]:focus,[type=week]:focus,[multiple]:focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:hover,[type=checkbox]:checked:focus,[type=radio]:checked:hover,[type=radio]:checked:focus{border-color:transparent;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}@media (forced-colors: active){[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.form-input,.form-textarea,.form-select,.form-multiselect{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}.form-input:focus,.form-textarea:focus,.form-select:focus,.form-multiselect:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb}.form-select{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}.form-select:where([size]:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}.form-checkbox,.form-radio{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}.form-checkbox{border-radius:0}.form-radio{border-radius:100%}.form-checkbox:focus,.form-radio:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.form-checkbox:checked,.form-radio:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}.form-checkbox:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media (forced-colors: active){.form-checkbox:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}.form-radio:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media (forced-colors: active){.form-radio:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}.form-checkbox:checked:hover,.form-checkbox:checked:focus,.form-radio:checked:hover,.form-radio:checked:focus{border-color:transparent;background-color:currentColor}.form-checkbox:indeterminate{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}@media (forced-colors: active){.form-checkbox:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}.form-checkbox:indeterminate:hover,.form-checkbox:indeterminate:focus{border-color:transparent;background-color:currentColor}.prose{color:var(--tw-prose-body);max-width:65ch}.prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-links);text-decoration:underline;font-weight:500}.prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:disc;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{font-weight:400;color:var(--tw-prose-counters)}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.25em}.prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-style:italic;color:var(--tw-prose-quotes);border-left-width:.25rem;border-left-color:var(--tw-prose-quote-borders);quotes:"“""”""‘""’";margin-top:1.6em;margin-bottom:1.6em;padding-left:1em}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:800;font-size:2.25em;margin-top:0;margin-bottom:.8888889em;line-height:1.1111111}.prose :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:900;color:inherit}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:700;font-size:1.5em;margin-top:2em;margin-bottom:1em;line-height:1.3333333}.prose :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:800;color:inherit}.prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;font-size:1.25em;margin-top:1.6em;margin-bottom:.6em;line-height:1.6}.prose :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.5em;margin-bottom:.5em;line-height:1.5}.prose :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){display:block;margin-top:2em;margin-bottom:2em}.prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-family:inherit;color:var(--tw-prose-kbd);box-shadow:0 0 0 1px rgb(var(--tw-prose-kbd-shadows) / 10%),0 3px 0 rgb(var(--tw-prose-kbd-shadows) / 10%);font-size:.875em;border-radius:.3125rem;padding:.1875em .375em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-weight:600;font-size:.875em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:"`"}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"`"}.prose :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}.prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}.prose :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);overflow-x:auto;font-weight:400;font-size:.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:.375rem;padding:.8571429em 1.1428571em}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){background-color:transparent;border-width:0;border-radius:0;padding:0;font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:none}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}.prose :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){width:100%;table-layout:auto;text-align:left;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}.prose :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;vertical-align:bottom;padding-right:.5714286em;padding-bottom:.5714286em;padding-left:.5714286em}.prose :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.prose :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}.prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.prose :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}.prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.prose{--tw-prose-body: #374151;--tw-prose-headings: #111827;--tw-prose-lead: #4b5563;--tw-prose-links: #111827;--tw-prose-bold: #111827;--tw-prose-counters: #6b7280;--tw-prose-bullets: #d1d5db;--tw-prose-hr: #e5e7eb;--tw-prose-quotes: #111827;--tw-prose-quote-borders: #e5e7eb;--tw-prose-captions: #6b7280;--tw-prose-kbd: #111827;--tw-prose-kbd-shadows: 17 24 39;--tw-prose-code: #111827;--tw-prose-pre-code: #e5e7eb;--tw-prose-pre-bg: #1f2937;--tw-prose-th-borders: #d1d5db;--tw-prose-td-borders: #e5e7eb;--tw-prose-invert-body: #d1d5db;--tw-prose-invert-headings: #fff;--tw-prose-invert-lead: #9ca3af;--tw-prose-invert-links: #fff;--tw-prose-invert-bold: #fff;--tw-prose-invert-counters: #9ca3af;--tw-prose-invert-bullets: #4b5563;--tw-prose-invert-hr: #374151;--tw-prose-invert-quotes: #f3f4f6;--tw-prose-invert-quote-borders: #374151;--tw-prose-invert-captions: #9ca3af;--tw-prose-invert-kbd: #fff;--tw-prose-invert-kbd-shadows: 255 255 255;--tw-prose-invert-code: #fff;--tw-prose-invert-pre-code: #d1d5db;--tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);--tw-prose-invert-th-borders: #4b5563;--tw-prose-invert-td-borders: #374151;font-size:1rem;line-height:1.75}.prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;margin-bottom:.5em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.375em}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.375em}.prose :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(.prose>ul>li>*:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ul>li>*:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(.prose>ol>li>*:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ol>li>*:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-left:1.625em}.prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding:.5714286em}.prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.button{border-radius:.25rem;padding:.75rem 1rem;font-size:.875rem;line-height:1rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}button:disabled{cursor:not-allowed;opacity:.5}.button-primary{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.button-primary:hover{font-weight:600}.button-block{display:block;width:100%}.button-danger{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.button-danger:hover{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.button-secondary{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.button-secondary:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.button-link{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.button-link:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity));text-decoration-line:underline}.button-link:focus{text-decoration-line:underline;outline:2px solid transparent;outline-offset:2px}.validation{margin-top:.5rem;margin-bottom:.25rem;border-left-width:2px;--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity));padding:.25rem .75rem}.validation-fail{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity));font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.validation-pass{--tw-border-opacity: 1;border-color:rgb(16 185 129 / var(--tw-border-opacity));font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.input{margin-top:.5rem;align-items:center;border-radius:.25rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity));padding:.5rem 1rem;font-size:.875rem;line-height:1.25rem}.input:focus{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity));outline:2px solid transparent;outline-offset:2px}.input-label{font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.input-slim{padding-top:.5rem;padding-bottom:.5rem}.form-checkbox{cursor:pointer;border-radius:.25rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.form-select{border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.alert{margin-top:.5rem;margin-bottom:.25rem;border-left-width:2px;--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity));padding:.75rem 1rem;font-size:.875rem;line-height:1.25rem}.alert-success{--tw-border-opacity: 1;border-color:rgb(16 185 129 / var(--tw-border-opacity))}.alert-failure{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.badge{display:inline-flex;align-items:center;border-radius:9999px;padding:.125rem .625rem;font-size:.75rem;font-weight:500;line-height:1rem}.badge-light{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.badge-primary{--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.badge-danger{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.badge-success{--tw-bg-opacity: 1;background-color:rgb(209 250 229 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(16 185 129 / var(--tw-text-opacity))}.badge-secondary{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.badge-warning{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(217 119 6 / var(--tw-text-opacity))}.badge-info{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}@media (min-width: 640px){.dataTables_length{margin-top:1.25rem!important;margin-bottom:1.25rem!important}}@media (min-width: 1024px){.dataTables_length{margin-top:1rem!important;margin-bottom:1rem!important}}.dataTables_length select{margin-left:.5rem!important;margin-right:.5rem!important;--tw-bg-opacity: 1 !important;background-color:rgb(255 255 255 / var(--tw-bg-opacity))!important;margin-top:.5rem;align-items:center;border-radius:.25rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity));padding:.5rem 1rem;font-size:.875rem;line-height:1.25rem}.dataTables_length select:focus{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity));outline:2px solid transparent;outline-offset:2px}.dataTables_filter{margin-bottom:1rem}.dataTables_filter input{margin-top:.5rem;align-items:center;border-radius:.25rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity));padding:.5rem 1rem;font-size:.875rem;line-height:1.25rem}.dataTables_filter input:focus{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity));outline:2px solid transparent;outline-offset:2px}@media (min-width: 1024px){.dataTables_filter{margin-top:-3rem!important}}.dataTables_paginate{padding-bottom:1.5rem!important;padding-top:.5rem!important}.dataTables_paginate .paginate_button{margin-right:.25rem!important;cursor:pointer!important;border-width:1px!important;--tw-border-opacity: 1 !important;border-color:rgb(209 213 219 / var(--tw-border-opacity))!important;--tw-bg-opacity: 1 !important;background-color:rgb(255 255 255 / var(--tw-bg-opacity))!important;font-weight:500!important;--tw-text-opacity: 1 !important;color:rgb(55 65 81 / var(--tw-text-opacity))!important;border-radius:.25rem;padding:.75rem 1rem;font-size:.875rem;line-height:1rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.dataTables_paginate .current{--tw-bg-opacity: 1 !important;background-color:rgb(37 99 235 / var(--tw-bg-opacity))!important;--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity))!important}.dataTables_info{font-size:.875rem!important;line-height:1.25rem!important}.dataTables_empty{padding-top:1rem!important;padding-bottom:1rem!important}.pagination{display:flex!important;align-items:center!important}.pagination .page-link{margin-top:-1px!important;display:inline-flex!important;cursor:pointer!important;align-items:center!important;border-top-width:2px!important;border-color:transparent!important;padding-left:1rem!important;padding-right:1rem!important;padding-top:1rem!important;font-size:.875rem!important;font-weight:500!important;line-height:1.25rem!important;--tw-text-opacity: 1 !important;color:rgb(107 114 128 / var(--tw-text-opacity))!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter!important;transition-duration:.15s!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.pagination .page-link:hover{--tw-border-opacity: 1 !important;border-color:rgb(209 213 219 / var(--tw-border-opacity))!important;--tw-text-opacity: 1 !important;color:rgb(55 65 81 / var(--tw-text-opacity))!important}.pagination .page-link:focus{--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity));--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity));outline:2px solid transparent;outline-offset:2px}.pagination .active>span{--tw-border-opacity: 1 !important;border-color:rgb(37 99 235 / var(--tw-border-opacity))!important;--tw-text-opacity: 1 !important;color:rgb(37 99 235 / var(--tw-text-opacity))!important}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.bottom-0{bottom:0}.left-0{left:0}.left-1{left:.25rem}.right-0{right:0}.top-0{top:0}.top-1{top:.25rem}.z-0{z-index:0}.z-10{z-index:10}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.col-auto{grid-column:auto}.col-span-1{grid-column:span 1 / span 1}.col-span-12{grid-column:span 12 / span 12}.col-span-2{grid-column:span 2 / span 2}.col-span-3{grid-column:span 3 / span 3}.col-span-4{grid-column:span 4 / span 4}.col-span-6{grid-column:span 6 / span 6}.col-span-8{grid-column:span 8 / span 8}.float-right{float:right}.m-0{margin:0}.m-auto{margin:auto}.-my-2{margin-top:-.5rem;margin-bottom:-.5rem}.-my-6{margin-top:-1.5rem;margin-bottom:-1.5rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.mx-\[22px\]{margin-left:22px;margin-right:22px}.mx-\[40px\]{margin-left:40px;margin-right:40px}.mx-\[auto\],.mx-auto{margin-left:auto;margin-right:auto}.my-10{margin-top:2.5rem;margin-bottom:2.5rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-3{margin-top:.75rem;margin-bottom:.75rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-6{margin-top:1.5rem;margin-bottom:1.5rem}.-ml-1{margin-left:-.25rem}.-ml-4{margin-left:-1rem}.-ml-px{margin-left:-1px}.-mr-1{margin-right:-.25rem}.-mr-14{margin-right:-3.5rem}.-mt-4{margin-top:-1rem}.-mt-6{margin-top:-1.5rem}.mb-0{margin-bottom:0}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-10{margin-bottom:2.5rem}.mb-12{margin-bottom:3rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.mb-\[10px\]{margin-bottom:10px}.mb-\[11px\]{margin-bottom:11px}.mb-\[20px\]{margin-bottom:20px}.mb-\[25px\]{margin-bottom:25px}.mb-\[26px\]{margin-bottom:26px}.mb-\[36px\]{margin-bottom:36px}.mb-\[40px\]{margin-bottom:40px}.mb-\[5px\]{margin-bottom:5px}.ml-0{margin-left:0}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-5{margin-left:1.25rem}.ml-\[10px\]{margin-left:10px}.mr-0{margin-right:0}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mr-5{margin-right:1.25rem}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-10{margin-top:2.5rem}.mt-2{margin-top:.5rem}.mt-20{margin-top:5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.mt-\[30px\]{margin-top:30px}.mt-\[50px\]{margin-top:50px}.mt-\[auto\]{margin-top:auto}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-0{height:0px}.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-24{height:6rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-8{height:2rem}.h-\[40px\]{height:40px}.h-auto{height:auto}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-screen{height:100vh}.min-h-\[450px\]{min-height:450px}.min-h-screen{min-height:100vh}.w-0{width:0px}.w-1{width:.25rem}.w-1\/2{width:50%}.w-1\/4{width:25%}.w-1\/6{width:16.666667%}.w-10{width:2.5rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-24{width:6rem}.w-3\/4{width:75%}.w-4{width:1rem}.w-4\/5{width:80%}.w-4\/6{width:66.666667%}.w-48{width:12rem}.w-5{width:1.25rem}.w-5\/6{width:83.333333%}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-8{width:2rem}.w-80{width:20rem}.w-\[100\%\]{width:100%}.w-\[87px\]{width:87px}.w-auto{width:auto}.w-full{width:100%}.w-screen{width:100vw}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-4xl{max-width:56rem}.max-w-\[212px\]{max-width:212px}.max-w-\[450px\]{max-width:450px}.max-w-\[625px\]{max-width:625px}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.flex-grow,.grow{flex-grow:1}.grow-0{flex-grow:0}.basis-1\/2{flex-basis:50%}.basis-full{flex-basis:100%}.table-auto{table-layout:auto}.border-collapse{border-collapse:collapse}.origin-top-right{transform-origin:top right}.-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-4{--tw-translate-y: 1rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-95{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.resize{resize:both}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.place-content-end{place-content:end}.place-items-center{place-items:center}.content-center{align-content:center}.content-start{align-content:flex-start}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-stretch{justify-content:stretch}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.gap-\[13px\]{gap:13px}.gap-\[44px\]{gap:44px}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-y-\[20px\]{row-gap:20px}.space-x-0>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(0px * var(--tw-space-x-reverse));margin-left:calc(0px * calc(1 - var(--tw-space-x-reverse)))}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-10>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2.5rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.overflow-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-\[10px\]{border-radius:10px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-none{border-radius:0}.rounded-sm{border-radius:.125rem}.rounded-b-lg{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-l-md{border-top-left-radius:.375rem;border-bottom-left-radius:.375rem}.rounded-r-md{border-top-right-radius:.375rem;border-bottom-right-radius:.375rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-4{border-width:4px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l-2{border-left-width:2px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-t-2{border-top-width:2px}.border-t-4{border-top-width:4px}.border-t-\[0px\]{border-top-width:0px}.border-t-\[10px\]{border-top-width:10px}.border-t-\[1px\]{border-top-width:1px}.border-solid{border-style:solid}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-\[\#E5E7EB\]{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.border-emerald-500{--tw-border-opacity: 1;border-color:rgb(16 185 129 / var(--tw-border-opacity))}.border-fuchsia-600{--tw-border-opacity: 1;border-color:rgb(192 38 211 / var(--tw-border-opacity))}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-gray-500{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity))}.border-gray-600{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.border-red-300{--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity))}.border-red-400{--tw-border-opacity: 1;border-color:rgb(248 113 113 / var(--tw-border-opacity))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.border-red-900{--tw-border-opacity: 1;border-color:rgb(127 29 29 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-opacity-50{--tw-border-opacity: .5}.bg-\[\#F2F9FE\]{--tw-bg-opacity: 1;background-color:rgb(242 249 254 / var(--tw-bg-opacity))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.bg-blue-700{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}.bg-emerald-600{--tw-bg-opacity: 1;background-color:rgb(5 150 105 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-opacity-100{--tw-bg-opacity: 1}.bg-clip-padding{background-clip:padding-box}.fill-current{fill:currentColor}.object-cover{-o-object-fit:cover;object-fit:cover}.object-scale-down{-o-object-fit:scale-down;object-fit:scale-down}.object-center{-o-object-position:center;object-position:center}.p-1{padding:.25rem}.p-10{padding:2.5rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-8{padding:2rem}.p-\[12px\]{padding:12px}.p-\[20px\]{padding:20px}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-12{padding-left:3rem;padding-right:3rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-\[12px\]{padding-left:12px;padding-right:12px}.px-\[20px\]{padding-left:20px;padding-right:20px}.px-\[22px\]{padding-left:22px;padding-right:22px}.py-0{padding-top:0;padding-bottom:0}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.py-\[33px\]{padding-top:33px;padding-bottom:33px}.py-\[36px\]{padding-top:36px;padding-bottom:36px}.py-\[9\.5px\]{padding-top:9.5px;padding-bottom:9.5px}.pb-10{padding-bottom:2.5rem}.pb-2{padding-bottom:.5rem}.pb-20{padding-bottom:5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pb-\[20px\]{padding-bottom:20px}.pb-\[56px\]{padding-bottom:56px}.pb-\[58px\]{padding-bottom:58px}.pl-0{padding-left:0}.pl-1{padding-left:.25rem}.pl-1\.5{padding-left:.375rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-\[18px\]{padding-left:18px}.pr-10{padding-right:2.5rem}.pr-2{padding-right:.5rem}.pr-4{padding-right:1rem}.pr-\[18px\]{padding-right:18px}.pt-0{padding-top:0}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.pt-6{padding-top:1.5rem}.pt-\[20px\]{padding-top:20px}.pt-\[29px\]{padding-top:29px}.pt-\[35px\]{padding-top:35px}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.font-\[\'Open_Sans\'\]{font-family:Open Sans}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-5xl{font-size:3rem;line-height:1}.text-\[12px\]{font-size:12px}.text-\[14px\]{font-size:14px}.text-\[15px\]{font-size:15px}.text-\[16px\]{font-size:16px}.text-\[22px\]{font-size:22px}.text-\[24px\]{font-size:24px}.text-\[35px\]{font-size:35px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-\[16px\]{font-weight:16px}.font-bold{font-weight:700}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-4{line-height:1rem}.leading-5{line-height:1.25rem}.leading-6{line-height:1.5rem}.leading-9{line-height:2.25rem}.leading-\[1\.2rem\]{line-height:1.2rem}.leading-\[1\.35em\]{line-height:1.35em}.leading-\[1\.36em\]{line-height:1.36em}.leading-\[1\.375em\]{line-height:1.375em}.leading-\[1\.3em\]{line-height:1.3em}.leading-\[1\.5em\]{line-height:1.5em}.leading-\[1\.75em\]{line-height:1.75em}.leading-normal{line-height:1.5}.leading-tight{line-height:1.25}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.text-\[\#212529\]{--tw-text-opacity: 1;color:rgb(33 37 41 / var(--tw-text-opacity))}.text-\[\#6C727F\]{--tw-text-opacity: 1;color:rgb(108 114 127 / var(--tw-text-opacity))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity))}.text-emerald-600{--tw-text-opacity: 1;color:rgb(5 150 105 / var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity))}.text-red-900{--tw-text-opacity: 1;color:rgb(127 29 29 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-25{opacity:.25}.opacity-75{opacity:.75}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-black{--tw-ring-opacity: 1;--tw-ring-color: rgb(0 0 0 / var(--tw-ring-opacity))}.ring-opacity-5{--tw-ring-opacity: .05}.grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.duration-1000{transition-duration:1s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-75{transition-duration:75ms}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-linear{transition-timing-function:linear}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.placeholder\:text-gray-500::-moz-placeholder{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.placeholder\:text-gray-500::placeholder{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:left-\[8px\]:after{content:var(--tw-content);left:8px}.after\:top-\[5px\]:after{content:var(--tw-content);top:5px}.after\:h-\[30px\]:after{content:var(--tw-content);height:30px}.after\:w-\[30px\]:after{content:var(--tw-content);width:30px}.after\:rounded-full:after{content:var(--tw-content);border-radius:9999px}.after\:bg-white:after{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.after\:transition-all:after{content:var(--tw-content);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.after\:content-\[\'\'\]:after{--tw-content: "";content:var(--tw-content)}.focus-within\:z-10:focus-within{z-index:10}.hover\:list-disc:hover{list-style-type:disc}.hover\:border-blue-600:hover{--tw-border-opacity: 1;border-color:rgb(37 99 235 / var(--tw-border-opacity))}.hover\:border-gray-600:hover{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.hover\:border-gray-800:hover{--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}.hover\:border-transparent:hover{border-color:transparent}.hover\:bg-blue-500:hover{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.hover\:bg-blue-600:hover{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.hover\:bg-red-900:hover{--tw-bg-opacity: 1;background-color:rgb(127 29 29 / var(--tw-bg-opacity))}.hover\:font-semibold:hover{font-weight:600}.hover\:text-blue-600:hover{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.hover\:text-gray-300:hover{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.hover\:text-gray-500:hover{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.hover\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.hover\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.hover\:text-gray-800:hover{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.hover\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.hover\:text-indigo-900:hover{--tw-text-opacity: 1;color:rgb(49 46 129 / var(--tw-text-opacity))}.hover\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-80:hover{opacity:.8}.hover\:shadow-2xl:hover{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\:border-blue-300:focus{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity))}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.focus\:border-fuchsia-300:focus{--tw-border-opacity: 1;border-color:rgb(240 171 252 / var(--tw-border-opacity))}.focus\:border-indigo-500:focus{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity))}.focus\:border-red-500:focus{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.focus\:bg-gray-100:focus{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.focus\:bg-gray-600:focus{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.focus\:bg-white:focus{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.focus\:font-semibold:focus{font-weight:600}.focus\:text-gray-500:focus{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.focus\:text-gray-600:focus{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.focus\:text-gray-900:focus{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.focus\:underline:focus{text-decoration-line:underline}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.focus\:ring-gray-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity))}.focus\:ring-indigo-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.focus\:ring-indigo-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(79 70 229 / var(--tw-ring-opacity))}.focus\:ring-red-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity))}.focus\:ring-opacity-50:focus{--tw-ring-opacity: .5}.active\:bg-gray-50:active{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.active\:text-gray-800:active{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.active\:outline-none:active{outline:2px solid transparent;outline-offset:2px}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-gray-50:disabled{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.disabled\:opacity-75:disabled{opacity:.75}.group:hover .group-hover\:border-transparent{border-color:transparent}.group:hover .group-hover\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.peer:checked~.peer-checked\:text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.peer:checked~.peer-checked\:after\:translate-x-\[140\%\]:after{content:var(--tw-content);--tw-translate-x: 140%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:focus~.peer-focus\:outline-none{outline:2px solid transparent;outline-offset:2px}@media (min-width: 640px){.sm\:inset-0{top:0;right:0;bottom:0;left:0}.sm\:col-span-2{grid-column:span 2 / span 2}.sm\:col-span-3{grid-column:span 3 / span 3}.sm\:col-span-4{grid-column:span 4 / span 4}.sm\:col-span-6{grid-column:span 6 / span 6}.sm\:-mx-6{margin-left:-1.5rem;margin-right:-1.5rem}.sm\:mx-0{margin-left:0;margin-right:0}.sm\:my-8{margin-top:2rem;margin-bottom:2rem}.sm\:ml-3{margin-left:.75rem}.sm\:ml-4{margin-left:1rem}.sm\:ml-6{margin-left:1.5rem}.sm\:mt-0{margin-top:0}.sm\:mt-4{margin-top:1rem}.sm\:mt-6{margin-top:1.5rem}.sm\:block{display:block}.sm\:inline-block{display:inline-block}.sm\:inline{display:inline}.sm\:flex{display:flex}.sm\:grid{display:grid}.sm\:hidden{display:none}.sm\:h-10{height:2.5rem}.sm\:h-screen{height:100vh}.sm\:w-10{width:2.5rem}.sm\:w-auto{width:auto}.sm\:w-full{width:100%}.sm\:max-w-lg{max-width:32rem}.sm\:max-w-sm{max-width:24rem}.sm\:flex-shrink-0{flex-shrink:0}.sm\:translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:scale-95{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:flex-row-reverse{flex-direction:row-reverse}.sm\:flex-nowrap{flex-wrap:nowrap}.sm\:items-start{align-items:flex-start}.sm\:items-center{align-items:center}.sm\:justify-center{justify-content:center}.sm\:justify-between{justify-content:space-between}.sm\:gap-4{gap:1rem}.sm\:rounded-lg{border-radius:.5rem}.sm\:p-0{padding:0}.sm\:p-6{padding:1.5rem}.sm\:px-0{padding-left:0;padding-right:0}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:text-left{text-align:left}.sm\:align-middle{vertical-align:middle}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 768px){.md\:col-span-1{grid-column:span 1 / span 1}.md\:col-span-2{grid-column:span 2 / span 2}.md\:col-span-4{grid-column:span 4 / span 4}.md\:col-span-5{grid-column:span 5 / span 5}.md\:col-span-6{grid-column:span 6 / span 6}.md\:col-start-2{grid-column-start:2}.md\:col-start-4{grid-column-start:4}.md\:mx-0,.md\:mx-\[0\]{margin-left:0;margin-right:0}.md\:-mr-1{margin-right:-.25rem}.md\:mb-6{margin-bottom:1.5rem}.md\:mb-\[46px\]{margin-bottom:46px}.md\:ml-2{margin-left:.5rem}.md\:ml-6{margin-left:1.5rem}.md\:mr-0{margin-right:0}.md\:mr-2{margin-right:.5rem}.md\:mt-0{margin-top:0}.md\:mt-10{margin-top:2.5rem}.md\:mt-5{margin-top:1.25rem}.md\:block{display:block}.md\:flex{display:flex}.md\:grid{display:grid}.md\:hidden{display:none}.md\:min-h-\[411px\]{min-height:411px}.md\:w-1\/2{width:50%}.md\:w-1\/3{width:33.333333%}.md\:max-w-3xl{max-width:48rem}.md\:max-w-xl{max-width:36rem}.md\:flex-shrink-0{flex-shrink:0}.md\:shrink{flex-shrink:1}.md\:grow-0{flex-grow:0}.md\:basis-1\/2{flex-basis:50%}.md\:basis-\[449px\]{flex-basis:449px}.md\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:flex-col{flex-direction:column}.md\:items-center{align-items:center}.md\:justify-center{justify-content:center}.md\:justify-between{justify-content:space-between}.md\:gap-6{gap:1.5rem}.md\:gap-x-\[21px\]{-moz-column-gap:21px;column-gap:21px}.md\:gap-y-6{row-gap:1.5rem}.md\:border-r{border-right-width:1px}.md\:border-\[\#E5E7EB\]{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.md\:p-24{padding:6rem}.md\:px-8{padding-left:2rem;padding-right:2rem}.md\:px-\[40px\]{padding-left:40px;padding-right:40px}.md\:pb-\[40px\]{padding-bottom:40px}.md\:pl-4{padding-left:1rem}.md\:pl-\[52px\]{padding-left:52px}.md\:pl-\[61px\]{padding-left:61px}.md\:pr-\[20px\]{padding-right:20px}.md\:pr-\[48px\]{padding-right:48px}.md\:pt-0{padding-top:0}.md\:pt-\[58px\]{padding-top:58px}.md\:text-left{text-align:left}.md\:text-center{text-align:center}.md\:text-2xl{font-size:1.5rem;line-height:2rem}.md\:text-\[30px\]{font-size:30px}.md\:text-\[32px\]{font-size:32px}.md\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 1024px){.lg\:col-span-3{grid-column:span 3 / span 3}.lg\:col-span-6{grid-column:span 6 / span 6}.lg\:col-span-7{grid-column:span 7 / span 7}.lg\:col-span-8{grid-column:span 8 / span 8}.lg\:col-start-3{grid-column-start:3}.lg\:col-start-4{grid-column-start:4}.lg\:-mx-8{margin-left:-2rem;margin-right:-2rem}.lg\:mt-24{margin-top:6rem}.lg\:block{display:block}.lg\:flex{display:flex}.lg\:grid{display:grid}.lg\:hidden{display:none}.lg\:h-screen{height:100vh}.lg\:w-1\/2{width:50%}.lg\:w-1\/3{width:33.333333%}.lg\:w-1\/4{width:25%}.lg\:w-1\/5{width:20%}.lg\:max-w-\[80\%\]{max-width:80%}.lg\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:items-center{align-items:center}.lg\:gap-4{gap:1rem}.lg\:rounded-lg{border-radius:.5rem}.lg\:px-16{padding-left:4rem;padding-right:4rem}.lg\:px-2{padding-left:.5rem;padding-right:.5rem}.lg\:px-4{padding-left:1rem;padding-right:1rem}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:py-2{padding-top:.5rem;padding-bottom:.5rem}}@media (min-width: 1280px){.xl\:col-span-4{grid-column:span 4 / span 4}.xl\:col-span-6{grid-column:span 6 / span 6}.xl\:col-span-8{grid-column:span 8 / span 8}.xl\:col-span-9{grid-column:span 9 / span 9}.xl\:col-start-4{grid-column-start:4}.xl\:ml-5{margin-left:1.25rem}.xl\:mt-0{margin-top:0}.xl\:mt-32{margin-top:8rem}.xl\:flex{display:flex}.xl\:w-auto{width:auto}.xl\:basis-auto{flex-basis:auto}.xl\:flex-row{flex-direction:row}.xl\:flex-nowrap{flex-wrap:nowrap}.xl\:justify-center{justify-content:center}.xl\:border-r{border-right-width:1px}.xl\:border-\[\#E5E7EB\]{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.xl\:px-16{padding-left:4rem;padding-right:4rem}.xl\:px-20{padding-left:5rem;padding-right:5rem}.xl\:px-5{padding-left:1.25rem;padding-right:1.25rem}.xl\:pr-20{padding-right:5rem}}@media (prefers-color-scheme: dark){.dark\:border-gray-600{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.dark\:bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.dark\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:placeholder-gray-400::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}.dark\:placeholder-gray-400::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}.dark\:focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.dark\:focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}} +======== +*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Open Sans,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}[type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}[type=text]:focus,input:where(:not([type])):focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=number]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=month]:focus,[type=search]:focus,[type=tel]:focus,[type=time]:focus,[type=week]:focus,[multiple]:focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:hover,[type=checkbox]:checked:focus,[type=radio]:checked:hover,[type=radio]:checked:focus{border-color:transparent;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}@media (forced-colors: active){[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.form-input,.form-textarea,.form-select,.form-multiselect{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}.form-input:focus,.form-textarea:focus,.form-select:focus,.form-multiselect:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb}.form-select{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}.form-select:where([size]:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}.form-checkbox,.form-radio{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}.form-checkbox{border-radius:0}.form-radio{border-radius:100%}.form-checkbox:focus,.form-radio:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.form-checkbox:checked,.form-radio:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}.form-checkbox:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media (forced-colors: active){.form-checkbox:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}.form-radio:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media (forced-colors: active){.form-radio:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}.form-checkbox:checked:hover,.form-checkbox:checked:focus,.form-radio:checked:hover,.form-radio:checked:focus{border-color:transparent;background-color:currentColor}.form-checkbox:indeterminate{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}@media (forced-colors: active){.form-checkbox:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}.form-checkbox:indeterminate:hover,.form-checkbox:indeterminate:focus{border-color:transparent;background-color:currentColor}.prose{color:var(--tw-prose-body);max-width:65ch}.prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-links);text-decoration:underline;font-weight:500}.prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:disc;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{font-weight:400;color:var(--tw-prose-counters)}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.25em}.prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-style:italic;color:var(--tw-prose-quotes);border-left-width:.25rem;border-left-color:var(--tw-prose-quote-borders);quotes:"“""”""‘""’";margin-top:1.6em;margin-bottom:1.6em;padding-left:1em}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:800;font-size:2.25em;margin-top:0;margin-bottom:.8888889em;line-height:1.1111111}.prose :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:900;color:inherit}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:700;font-size:1.5em;margin-top:2em;margin-bottom:1em;line-height:1.3333333}.prose :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:800;color:inherit}.prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;font-size:1.25em;margin-top:1.6em;margin-bottom:.6em;line-height:1.6}.prose :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.5em;margin-bottom:.5em;line-height:1.5}.prose :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){display:block;margin-top:2em;margin-bottom:2em}.prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-family:inherit;color:var(--tw-prose-kbd);box-shadow:0 0 0 1px rgb(var(--tw-prose-kbd-shadows) / 10%),0 3px 0 rgb(var(--tw-prose-kbd-shadows) / 10%);font-size:.875em;border-radius:.3125rem;padding:.1875em .375em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-weight:600;font-size:.875em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:"`"}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"`"}.prose :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}.prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}.prose :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);overflow-x:auto;font-weight:400;font-size:.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:.375rem;padding:.8571429em 1.1428571em}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){background-color:transparent;border-width:0;border-radius:0;padding:0;font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:none}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}.prose :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){width:100%;table-layout:auto;text-align:left;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}.prose :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;vertical-align:bottom;padding-right:.5714286em;padding-bottom:.5714286em;padding-left:.5714286em}.prose :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.prose :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}.prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.prose :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}.prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.prose{--tw-prose-body: #374151;--tw-prose-headings: #111827;--tw-prose-lead: #4b5563;--tw-prose-links: #111827;--tw-prose-bold: #111827;--tw-prose-counters: #6b7280;--tw-prose-bullets: #d1d5db;--tw-prose-hr: #e5e7eb;--tw-prose-quotes: #111827;--tw-prose-quote-borders: #e5e7eb;--tw-prose-captions: #6b7280;--tw-prose-kbd: #111827;--tw-prose-kbd-shadows: 17 24 39;--tw-prose-code: #111827;--tw-prose-pre-code: #e5e7eb;--tw-prose-pre-bg: #1f2937;--tw-prose-th-borders: #d1d5db;--tw-prose-td-borders: #e5e7eb;--tw-prose-invert-body: #d1d5db;--tw-prose-invert-headings: #fff;--tw-prose-invert-lead: #9ca3af;--tw-prose-invert-links: #fff;--tw-prose-invert-bold: #fff;--tw-prose-invert-counters: #9ca3af;--tw-prose-invert-bullets: #4b5563;--tw-prose-invert-hr: #374151;--tw-prose-invert-quotes: #f3f4f6;--tw-prose-invert-quote-borders: #374151;--tw-prose-invert-captions: #9ca3af;--tw-prose-invert-kbd: #fff;--tw-prose-invert-kbd-shadows: 255 255 255;--tw-prose-invert-code: #fff;--tw-prose-invert-pre-code: #d1d5db;--tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);--tw-prose-invert-th-borders: #4b5563;--tw-prose-invert-td-borders: #374151;font-size:1rem;line-height:1.75}.prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;margin-bottom:.5em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.375em}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.375em}.prose :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(.prose>ul>li>*:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ul>li>*:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(.prose>ol>li>*:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ol>li>*:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-left:1.625em}.prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding:.5714286em}.prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.button{border-radius:.25rem;padding:.75rem 1rem;font-size:.875rem;line-height:1rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}button:disabled{cursor:not-allowed;opacity:.5}.button-primary{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.button-primary:hover{font-weight:600}.button-block{display:block;width:100%}.button-danger{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.button-danger:hover{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.button-secondary{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.button-secondary:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.button-link{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.button-link:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity));text-decoration-line:underline}.button-link:focus{text-decoration-line:underline;outline:2px solid transparent;outline-offset:2px}.validation{margin-top:.5rem;margin-bottom:.25rem;border-left-width:2px;--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity));padding:.25rem .75rem}.validation-fail{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity));font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.validation-pass{--tw-border-opacity: 1;border-color:rgb(16 185 129 / var(--tw-border-opacity));font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.input{margin-top:.5rem;align-items:center;border-radius:.25rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity));padding:.5rem 1rem;font-size:.875rem;line-height:1.25rem}.input:focus{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity));outline:2px solid transparent;outline-offset:2px}.input-label{font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.input-slim{padding-top:.5rem;padding-bottom:.5rem}.form-checkbox{cursor:pointer;border-radius:.25rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.form-select{border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.alert{margin-top:.5rem;margin-bottom:.25rem;border-left-width:2px;--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity));padding:.75rem 1rem;font-size:.875rem;line-height:1.25rem}.alert-success{--tw-border-opacity: 1;border-color:rgb(16 185 129 / var(--tw-border-opacity))}.alert-failure{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.badge{display:inline-flex;align-items:center;border-radius:9999px;padding:.125rem .625rem;font-size:.75rem;font-weight:500;line-height:1rem}.badge-light{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.badge-primary{--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.badge-danger{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.badge-success{--tw-bg-opacity: 1;background-color:rgb(209 250 229 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(16 185 129 / var(--tw-text-opacity))}.badge-secondary{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.badge-warning{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(217 119 6 / var(--tw-text-opacity))}.badge-info{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}@media (min-width: 640px){.dataTables_length{margin-top:1.25rem!important;margin-bottom:1.25rem!important}}@media (min-width: 1024px){.dataTables_length{margin-top:1rem!important;margin-bottom:1rem!important}}.dataTables_length select{margin-left:.5rem!important;margin-right:.5rem!important;--tw-bg-opacity: 1 !important;background-color:rgb(255 255 255 / var(--tw-bg-opacity))!important;margin-top:.5rem;align-items:center;border-radius:.25rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity));padding:.5rem 1rem;font-size:.875rem;line-height:1.25rem}.dataTables_length select:focus{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity));outline:2px solid transparent;outline-offset:2px}.dataTables_filter{margin-bottom:1rem}.dataTables_filter input{margin-top:.5rem;align-items:center;border-radius:.25rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity));padding:.5rem 1rem;font-size:.875rem;line-height:1.25rem}.dataTables_filter input:focus{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity));outline:2px solid transparent;outline-offset:2px}@media (min-width: 1024px){.dataTables_filter{margin-top:-3rem!important}}.dataTables_paginate{padding-bottom:1.5rem!important;padding-top:.5rem!important}.dataTables_paginate .paginate_button{margin-right:.25rem!important;cursor:pointer!important;border-width:1px!important;--tw-border-opacity: 1 !important;border-color:rgb(209 213 219 / var(--tw-border-opacity))!important;--tw-bg-opacity: 1 !important;background-color:rgb(255 255 255 / var(--tw-bg-opacity))!important;font-weight:500!important;--tw-text-opacity: 1 !important;color:rgb(55 65 81 / var(--tw-text-opacity))!important;border-radius:.25rem;padding:.75rem 1rem;font-size:.875rem;line-height:1rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.dataTables_paginate .current{--tw-bg-opacity: 1 !important;background-color:rgb(37 99 235 / var(--tw-bg-opacity))!important;--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity))!important}.dataTables_info{font-size:.875rem!important;line-height:1.25rem!important}.dataTables_empty{padding-top:1rem!important;padding-bottom:1rem!important}.pagination{display:flex!important;align-items:center!important}.pagination .page-link{margin-top:-1px!important;display:inline-flex!important;cursor:pointer!important;align-items:center!important;border-top-width:2px!important;border-color:transparent!important;padding-left:1rem!important;padding-right:1rem!important;padding-top:1rem!important;font-size:.875rem!important;font-weight:500!important;line-height:1.25rem!important;--tw-text-opacity: 1 !important;color:rgb(107 114 128 / var(--tw-text-opacity))!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter!important;transition-duration:.15s!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.pagination .page-link:hover{--tw-border-opacity: 1 !important;border-color:rgb(209 213 219 / var(--tw-border-opacity))!important;--tw-text-opacity: 1 !important;color:rgb(55 65 81 / var(--tw-text-opacity))!important}.pagination .page-link:focus{--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity));--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity));outline:2px solid transparent;outline-offset:2px}.pagination .active>span{--tw-border-opacity: 1 !important;border-color:rgb(37 99 235 / var(--tw-border-opacity))!important;--tw-text-opacity: 1 !important;color:rgb(37 99 235 / var(--tw-text-opacity))!important}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.bottom-0{bottom:0}.left-0{left:0}.left-1{left:.25rem}.right-0{right:0}.top-0{top:0}.top-1{top:.25rem}.z-0{z-index:0}.z-10{z-index:10}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.col-auto{grid-column:auto}.col-span-1{grid-column:span 1 / span 1}.col-span-12{grid-column:span 12 / span 12}.col-span-2{grid-column:span 2 / span 2}.col-span-3{grid-column:span 3 / span 3}.col-span-4{grid-column:span 4 / span 4}.col-span-6{grid-column:span 6 / span 6}.col-span-8{grid-column:span 8 / span 8}.float-end{float:inline-end}.float-right{float:right}.m-0{margin:0}.m-auto{margin:auto}.-my-2{margin-top:-.5rem;margin-bottom:-.5rem}.-my-6{margin-top:-1.5rem;margin-bottom:-1.5rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.mx-\[22px\]{margin-left:22px;margin-right:22px}.mx-\[40px\]{margin-left:40px;margin-right:40px}.mx-\[auto\],.mx-auto{margin-left:auto;margin-right:auto}.my-10{margin-top:2.5rem;margin-bottom:2.5rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-3{margin-top:.75rem;margin-bottom:.75rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-6{margin-top:1.5rem;margin-bottom:1.5rem}.-ml-1{margin-left:-.25rem}.-ml-4{margin-left:-1rem}.-ml-px{margin-left:-1px}.-mr-1{margin-right:-.25rem}.-mr-14{margin-right:-3.5rem}.-mt-4{margin-top:-1rem}.-mt-6{margin-top:-1.5rem}.mb-0{margin-bottom:0}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-10{margin-bottom:2.5rem}.mb-12{margin-bottom:3rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.mb-\[10px\]{margin-bottom:10px}.mb-\[11px\]{margin-bottom:11px}.mb-\[20px\]{margin-bottom:20px}.mb-\[25px\]{margin-bottom:25px}.mb-\[26px\]{margin-bottom:26px}.mb-\[36px\]{margin-bottom:36px}.mb-\[40px\]{margin-bottom:40px}.mb-\[5px\]{margin-bottom:5px}.ml-0{margin-left:0}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-5{margin-left:1.25rem}.ml-\[10px\]{margin-left:10px}.mr-0{margin-right:0}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mr-5{margin-right:1.25rem}.mr-6{margin-right:1.5rem}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-10{margin-top:2.5rem}.mt-2{margin-top:.5rem}.mt-20{margin-top:5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.mt-\[30px\]{margin-top:30px}.mt-\[50px\]{margin-top:50px}.mt-\[auto\]{margin-top:auto}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-0{height:0px}.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-24{height:6rem}.h-3{height:.75rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-8{height:2rem}.h-\[1px\]{height:1px}.h-\[40px\]{height:40px}.h-auto{height:auto}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-screen{height:100vh}.min-h-\[450px\]{min-height:450px}.min-h-screen{min-height:100vh}.w-0{width:0px}.w-1{width:.25rem}.w-1\/2{width:50%}.w-1\/6{width:16.666667%}.w-10{width:2.5rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\/4{width:75%}.w-4{width:1rem}.w-4\/5{width:80%}.w-4\/6{width:66.666667%}.w-48{width:12rem}.w-5{width:1.25rem}.w-5\/6{width:83.333333%}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-8{width:2rem}.w-80{width:20rem}.w-\[100\%\]{width:100%}.w-\[87px\]{width:87px}.w-auto{width:auto}.w-full{width:100%}.w-screen{width:100vw}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-4xl{max-width:56rem}.max-w-\[212px\]{max-width:212px}.max-w-\[450px\]{max-width:450px}.max-w-\[625px\]{max-width:625px}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.grow-0{flex-grow:0}.basis-1\/2{flex-basis:50%}.basis-full{flex-basis:100%}.table-auto{table-layout:auto}.border-collapse{border-collapse:collapse}.origin-top-right{transform-origin:top right}.-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-4{--tw-translate-y: 1rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-95{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.resize{resize:both}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.place-content-end{place-content:end}.place-items-center{place-items:center}.content-center{align-content:center}.content-start{align-content:flex-start}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-stretch{justify-content:stretch}.gap-0{gap:0px}.gap-0\.5{gap:.125rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.gap-\[13px\]{gap:13px}.gap-\[44px\]{gap:44px}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-y-\[20px\]{row-gap:20px}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-10>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2.5rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.overflow-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-\[10px\]{border-radius:10px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-none{border-radius:0}.rounded-sm{border-radius:.125rem}.rounded-b-lg{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-l-md{border-top-left-radius:.375rem;border-bottom-left-radius:.375rem}.rounded-r-md{border-top-right-radius:.375rem;border-bottom-right-radius:.375rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-4{border-width:4px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l-2{border-left-width:2px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-t-2{border-top-width:2px}.border-t-4{border-top-width:4px}.border-t-\[0px\]{border-top-width:0px}.border-t-\[10px\]{border-top-width:10px}.border-t-\[1px\]{border-top-width:1px}.border-solid{border-style:solid}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-\[\#E5E7EB\]{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.border-emerald-500{--tw-border-opacity: 1;border-color:rgb(16 185 129 / var(--tw-border-opacity))}.border-fuchsia-600{--tw-border-opacity: 1;border-color:rgb(192 38 211 / var(--tw-border-opacity))}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-gray-500{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity))}.border-gray-600{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.border-red-300{--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity))}.border-red-400{--tw-border-opacity: 1;border-color:rgb(248 113 113 / var(--tw-border-opacity))}.border-red-900{--tw-border-opacity: 1;border-color:rgb(127 29 29 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-opacity-50{--tw-border-opacity: .5}.bg-\[\#F2F9FE\]{--tw-bg-opacity: 1;background-color:rgb(242 249 254 / var(--tw-bg-opacity))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.bg-blue-700{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}.bg-emerald-600{--tw-bg-opacity: 1;background-color:rgb(5 150 105 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-opacity-100{--tw-bg-opacity: 1}.bg-clip-padding{background-clip:padding-box}.fill-current{fill:currentColor}.object-cover{-o-object-fit:cover;object-fit:cover}.object-scale-down{-o-object-fit:scale-down;object-fit:scale-down}.object-center{-o-object-position:center;object-position:center}.p-1{padding:.25rem}.p-10{padding:2.5rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.p-\[12px\]{padding:12px}.p-\[20px\]{padding:20px}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-12{padding-left:3rem;padding-right:3rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-\[12px\]{padding-left:12px;padding-right:12px}.px-\[20px\]{padding-left:20px;padding-right:20px}.px-\[22px\]{padding-left:22px;padding-right:22px}.py-0{padding-top:0;padding-bottom:0}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.py-\[33px\]{padding-top:33px;padding-bottom:33px}.py-\[36px\]{padding-top:36px;padding-bottom:36px}.py-\[9\.5px\]{padding-top:9.5px;padding-bottom:9.5px}.pb-10{padding-bottom:2.5rem}.pb-2{padding-bottom:.5rem}.pb-20{padding-bottom:5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pb-8{padding-bottom:2rem}.pb-\[20px\]{padding-bottom:20px}.pb-\[56px\]{padding-bottom:56px}.pb-\[58px\]{padding-bottom:58px}.pl-0{padding-left:0}.pl-1{padding-left:.25rem}.pl-1\.5{padding-left:.375rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-\[18px\]{padding-left:18px}.pr-10{padding-right:2.5rem}.pr-2{padding-right:.5rem}.pr-4{padding-right:1rem}.pr-\[18px\]{padding-right:18px}.pt-0{padding-top:0}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.pt-6{padding-top:1.5rem}.pt-\[20px\]{padding-top:20px}.pt-\[29px\]{padding-top:29px}.pt-\[35px\]{padding-top:35px}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.font-\[\'Open_Sans\'\]{font-family:Open Sans}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-5xl{font-size:3rem;line-height:1}.text-\[12px\]{font-size:12px}.text-\[14px\]{font-size:14px}.text-\[15px\]{font-size:15px}.text-\[16px\]{font-size:16px}.text-\[22px\]{font-size:22px}.text-\[24px\]{font-size:24px}.text-\[35px\]{font-size:35px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-\[16px\]{font-weight:16px}.font-bold{font-weight:700}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-4{line-height:1rem}.leading-5{line-height:1.25rem}.leading-6{line-height:1.5rem}.leading-9{line-height:2.25rem}.leading-\[1\.2rem\]{line-height:1.2rem}.leading-\[1\.35em\]{line-height:1.35em}.leading-\[1\.36em\]{line-height:1.36em}.leading-\[1\.375em\]{line-height:1.375em}.leading-\[1\.3em\]{line-height:1.3em}.leading-\[1\.5em\]{line-height:1.5em}.leading-\[1\.75em\]{line-height:1.75em}.leading-normal{line-height:1.5}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.text-\[\#212529\]{--tw-text-opacity: 1;color:rgb(33 37 41 / var(--tw-text-opacity))}.text-\[\#6C727F\]{--tw-text-opacity: 1;color:rgb(108 114 127 / var(--tw-text-opacity))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity))}.text-emerald-600{--tw-text-opacity: 1;color:rgb(5 150 105 / var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity))}.text-red-900{--tw-text-opacity: 1;color:rgb(127 29 29 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-25{opacity:.25}.opacity-75{opacity:.75}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-black{--tw-ring-opacity: 1;--tw-ring-color: rgb(0 0 0 / var(--tw-ring-opacity))}.ring-opacity-5{--tw-ring-opacity: .05}.grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.duration-1000{transition-duration:1s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-75{transition-duration:75ms}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-linear{transition-timing-function:linear}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.placeholder\:text-gray-500::-moz-placeholder{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.placeholder\:text-gray-500::placeholder{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:left-\[8px\]:after{content:var(--tw-content);left:8px}.after\:top-\[5px\]:after{content:var(--tw-content);top:5px}.after\:h-\[30px\]:after{content:var(--tw-content);height:30px}.after\:w-\[30px\]:after{content:var(--tw-content);width:30px}.after\:rounded-full:after{content:var(--tw-content);border-radius:9999px}.after\:bg-white:after{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.after\:transition-all:after{content:var(--tw-content);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.after\:content-\[\'\'\]:after{--tw-content: "";content:var(--tw-content)}.focus-within\:z-10:focus-within{z-index:10}.hover\:list-disc:hover{list-style-type:disc}.hover\:border-blue-600:hover{--tw-border-opacity: 1;border-color:rgb(37 99 235 / var(--tw-border-opacity))}.hover\:border-gray-600:hover{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.hover\:border-gray-800:hover{--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}.hover\:border-transparent:hover{border-color:transparent}.hover\:bg-blue-500:hover{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.hover\:bg-blue-600:hover{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.hover\:bg-red-900:hover{--tw-bg-opacity: 1;background-color:rgb(127 29 29 / var(--tw-bg-opacity))}.hover\:font-semibold:hover{font-weight:600}.hover\:text-blue-600:hover{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.hover\:text-gray-300:hover{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.hover\:text-gray-500:hover{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.hover\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.hover\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.hover\:text-gray-800:hover{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.hover\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.hover\:text-indigo-900:hover{--tw-text-opacity: 1;color:rgb(49 46 129 / var(--tw-text-opacity))}.hover\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-80:hover{opacity:.8}.hover\:shadow-2xl:hover{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-sm:hover{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\:border-blue-300:focus{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity))}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.focus\:border-fuchsia-300:focus{--tw-border-opacity: 1;border-color:rgb(240 171 252 / var(--tw-border-opacity))}.focus\:border-indigo-500:focus{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity))}.focus\:border-red-500:focus{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.focus\:bg-gray-100:focus{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.focus\:bg-gray-600:focus{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.focus\:bg-white:focus{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.focus\:font-semibold:focus{font-weight:600}.focus\:text-gray-500:focus{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.focus\:text-gray-600:focus{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.focus\:text-gray-900:focus{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.focus\:underline:focus{text-decoration-line:underline}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.focus\:ring-indigo-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.focus\:ring-indigo-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(79 70 229 / var(--tw-ring-opacity))}.focus\:ring-red-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity))}.focus\:ring-opacity-50:focus{--tw-ring-opacity: .5}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.active\:bg-gray-50:active{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.active\:text-gray-800:active{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.active\:outline-none:active{outline:2px solid transparent;outline-offset:2px}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-gray-50:disabled{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:border-transparent{border-color:transparent}.group:hover .group-hover\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.group:hover .group-hover\:opacity-100{opacity:1}.peer:checked~.peer-checked\:text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.peer:checked~.peer-checked\:after\:translate-x-\[140\%\]:after{content:var(--tw-content);--tw-translate-x: 140%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:focus~.peer-focus\:outline-none{outline:2px solid transparent;outline-offset:2px}@media (min-width: 640px){.sm\:inset-0{top:0;right:0;bottom:0;left:0}.sm\:col-span-2{grid-column:span 2 / span 2}.sm\:col-span-3{grid-column:span 3 / span 3}.sm\:col-span-4{grid-column:span 4 / span 4}.sm\:col-span-6{grid-column:span 6 / span 6}.sm\:-mx-6{margin-left:-1.5rem;margin-right:-1.5rem}.sm\:mx-0{margin-left:0;margin-right:0}.sm\:my-8{margin-top:2rem;margin-bottom:2rem}.sm\:ml-3{margin-left:.75rem}.sm\:ml-4{margin-left:1rem}.sm\:ml-6{margin-left:1.5rem}.sm\:mt-0{margin-top:0}.sm\:mt-4{margin-top:1rem}.sm\:mt-6{margin-top:1.5rem}.sm\:block{display:block}.sm\:inline-block{display:inline-block}.sm\:inline{display:inline}.sm\:flex{display:flex}.sm\:grid{display:grid}.sm\:hidden{display:none}.sm\:h-10{height:2.5rem}.sm\:h-screen{height:100vh}.sm\:w-10{width:2.5rem}.sm\:w-auto{width:auto}.sm\:w-full{width:100%}.sm\:max-w-lg{max-width:32rem}.sm\:max-w-sm{max-width:24rem}.sm\:flex-shrink-0{flex-shrink:0}.sm\:translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:scale-95{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:flex-row-reverse{flex-direction:row-reverse}.sm\:flex-nowrap{flex-wrap:nowrap}.sm\:items-start{align-items:flex-start}.sm\:items-center{align-items:center}.sm\:justify-center{justify-content:center}.sm\:justify-between{justify-content:space-between}.sm\:gap-4{gap:1rem}.sm\:rounded-lg{border-radius:.5rem}.sm\:p-0{padding:0}.sm\:p-6{padding:1.5rem}.sm\:px-0{padding-left:0;padding-right:0}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:text-left{text-align:left}.sm\:align-middle{vertical-align:middle}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 768px){.md\:col-span-1{grid-column:span 1 / span 1}.md\:col-span-2{grid-column:span 2 / span 2}.md\:col-span-4{grid-column:span 4 / span 4}.md\:col-span-5{grid-column:span 5 / span 5}.md\:col-span-6{grid-column:span 6 / span 6}.md\:col-start-2{grid-column-start:2}.md\:col-start-4{grid-column-start:4}.md\:mx-0,.md\:mx-\[0\]{margin-left:0;margin-right:0}.md\:-mr-1{margin-right:-.25rem}.md\:mb-6{margin-bottom:1.5rem}.md\:mb-\[46px\]{margin-bottom:46px}.md\:ml-2{margin-left:.5rem}.md\:ml-6{margin-left:1.5rem}.md\:mr-0{margin-right:0}.md\:mr-2{margin-right:.5rem}.md\:mt-0{margin-top:0}.md\:mt-10{margin-top:2.5rem}.md\:mt-5{margin-top:1.25rem}.md\:block{display:block}.md\:flex{display:flex}.md\:grid{display:grid}.md\:hidden{display:none}.md\:min-h-\[411px\]{min-height:411px}.md\:w-1\/2{width:50%}.md\:w-1\/3{width:33.333333%}.md\:max-w-3xl{max-width:48rem}.md\:max-w-xl{max-width:36rem}.md\:flex-shrink-0{flex-shrink:0}.md\:shrink{flex-shrink:1}.md\:grow-0{flex-grow:0}.md\:basis-1\/2{flex-basis:50%}.md\:basis-\[449px\]{flex-basis:449px}.md\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:flex-col{flex-direction:column}.md\:items-center{align-items:center}.md\:justify-center{justify-content:center}.md\:justify-between{justify-content:space-between}.md\:gap-6{gap:1.5rem}.md\:gap-x-\[21px\]{-moz-column-gap:21px;column-gap:21px}.md\:gap-y-6{row-gap:1.5rem}.md\:border-r{border-right-width:1px}.md\:border-\[\#E5E7EB\]{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.md\:p-24{padding:6rem}.md\:px-8{padding-left:2rem;padding-right:2rem}.md\:px-\[40px\]{padding-left:40px;padding-right:40px}.md\:pb-\[40px\]{padding-bottom:40px}.md\:pl-4{padding-left:1rem}.md\:pl-\[52px\]{padding-left:52px}.md\:pl-\[61px\]{padding-left:61px}.md\:pr-\[20px\]{padding-right:20px}.md\:pr-\[48px\]{padding-right:48px}.md\:pt-0{padding-top:0}.md\:pt-\[58px\]{padding-top:58px}.md\:text-left{text-align:left}.md\:text-center{text-align:center}.md\:text-2xl{font-size:1.5rem;line-height:2rem}.md\:text-\[30px\]{font-size:30px}.md\:text-\[32px\]{font-size:32px}.md\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 1024px){.lg\:col-span-3{grid-column:span 3 / span 3}.lg\:col-span-6{grid-column:span 6 / span 6}.lg\:col-span-7{grid-column:span 7 / span 7}.lg\:col-span-8{grid-column:span 8 / span 8}.lg\:col-start-3{grid-column-start:3}.lg\:col-start-4{grid-column-start:4}.lg\:-mx-8{margin-left:-2rem;margin-right:-2rem}.lg\:-mb-1{margin-bottom:-.25rem}.lg\:-ml-5{margin-left:-1.25rem}.lg\:mt-24{margin-top:6rem}.lg\:block{display:block}.lg\:flex{display:flex}.lg\:grid{display:grid}.lg\:hidden{display:none}.lg\:h-screen{height:100vh}.lg\:w-1\/2{width:50%}.lg\:w-1\/4{width:25%}.lg\:w-1\/5{width:20%}.lg\:max-w-\[80\%\]{max-width:80%}.lg\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:items-center{align-items:center}.lg\:gap-4{gap:1rem}.lg\:rounded-lg{border-radius:.5rem}.lg\:px-16{padding-left:4rem;padding-right:4rem}.lg\:px-2{padding-left:.5rem;padding-right:.5rem}.lg\:px-4{padding-left:1rem;padding-right:1rem}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:py-2{padding-top:.5rem;padding-bottom:.5rem}}@media (min-width: 1280px){.xl\:col-span-4{grid-column:span 4 / span 4}.xl\:col-span-6{grid-column:span 6 / span 6}.xl\:col-span-8{grid-column:span 8 / span 8}.xl\:col-span-9{grid-column:span 9 / span 9}.xl\:col-start-4{grid-column-start:4}.xl\:ml-5{margin-left:1.25rem}.xl\:mt-0{margin-top:0}.xl\:mt-32{margin-top:8rem}.xl\:flex{display:flex}.xl\:w-auto{width:auto}.xl\:basis-auto{flex-basis:auto}.xl\:flex-row{flex-direction:row}.xl\:flex-nowrap{flex-wrap:nowrap}.xl\:justify-center{justify-content:center}.xl\:border-r{border-right-width:1px}.xl\:border-\[\#E5E7EB\]{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.xl\:px-16{padding-left:4rem;padding-right:4rem}.xl\:px-20{padding-left:5rem;padding-right:5rem}.xl\:px-5{padding-left:1.25rem;padding-right:1.25rem}.xl\:pr-20{padding-right:5rem}}@media (prefers-color-scheme: dark){.dark\:border-gray-600{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.dark\:bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.dark\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:placeholder-gray-400::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}.dark\:placeholder-gray-400::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}.dark\:focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.dark\:focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}} +>>>>>>>> new_payment_flow:public/build/assets/app-4e969b65.css diff --git a/public/build/assets/app-4e969b65.css b/public/build/assets/app-4e969b65.css new file mode 100644 index 0000000000..c48d601e31 --- /dev/null +++ b/public/build/assets/app-4e969b65.css @@ -0,0 +1,5 @@ +<<<<<<<< HEAD:public/build/assets/app-06521fee.css +*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Open Sans,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}[type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}[type=text]:focus,input:where(:not([type])):focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=number]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=month]:focus,[type=search]:focus,[type=tel]:focus,[type=time]:focus,[type=week]:focus,[multiple]:focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:hover,[type=checkbox]:checked:focus,[type=radio]:checked:hover,[type=radio]:checked:focus{border-color:transparent;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}@media (forced-colors: active){[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.form-input,.form-textarea,.form-select,.form-multiselect{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}.form-input:focus,.form-textarea:focus,.form-select:focus,.form-multiselect:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb}.form-select{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}.form-select:where([size]:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}.form-checkbox,.form-radio{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}.form-checkbox{border-radius:0}.form-radio{border-radius:100%}.form-checkbox:focus,.form-radio:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.form-checkbox:checked,.form-radio:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}.form-checkbox:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media (forced-colors: active){.form-checkbox:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}.form-radio:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media (forced-colors: active){.form-radio:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}.form-checkbox:checked:hover,.form-checkbox:checked:focus,.form-radio:checked:hover,.form-radio:checked:focus{border-color:transparent;background-color:currentColor}.form-checkbox:indeterminate{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}@media (forced-colors: active){.form-checkbox:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}.form-checkbox:indeterminate:hover,.form-checkbox:indeterminate:focus{border-color:transparent;background-color:currentColor}.prose{color:var(--tw-prose-body);max-width:65ch}.prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-links);text-decoration:underline;font-weight:500}.prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:disc;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{font-weight:400;color:var(--tw-prose-counters)}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.25em}.prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-style:italic;color:var(--tw-prose-quotes);border-left-width:.25rem;border-left-color:var(--tw-prose-quote-borders);quotes:"“""”""‘""’";margin-top:1.6em;margin-bottom:1.6em;padding-left:1em}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:800;font-size:2.25em;margin-top:0;margin-bottom:.8888889em;line-height:1.1111111}.prose :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:900;color:inherit}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:700;font-size:1.5em;margin-top:2em;margin-bottom:1em;line-height:1.3333333}.prose :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:800;color:inherit}.prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;font-size:1.25em;margin-top:1.6em;margin-bottom:.6em;line-height:1.6}.prose :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.5em;margin-bottom:.5em;line-height:1.5}.prose :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){display:block;margin-top:2em;margin-bottom:2em}.prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-family:inherit;color:var(--tw-prose-kbd);box-shadow:0 0 0 1px rgb(var(--tw-prose-kbd-shadows) / 10%),0 3px 0 rgb(var(--tw-prose-kbd-shadows) / 10%);font-size:.875em;border-radius:.3125rem;padding:.1875em .375em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-weight:600;font-size:.875em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:"`"}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"`"}.prose :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}.prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}.prose :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);overflow-x:auto;font-weight:400;font-size:.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:.375rem;padding:.8571429em 1.1428571em}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){background-color:transparent;border-width:0;border-radius:0;padding:0;font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:none}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}.prose :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){width:100%;table-layout:auto;text-align:left;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}.prose :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;vertical-align:bottom;padding-right:.5714286em;padding-bottom:.5714286em;padding-left:.5714286em}.prose :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.prose :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}.prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.prose :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}.prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.prose{--tw-prose-body: #374151;--tw-prose-headings: #111827;--tw-prose-lead: #4b5563;--tw-prose-links: #111827;--tw-prose-bold: #111827;--tw-prose-counters: #6b7280;--tw-prose-bullets: #d1d5db;--tw-prose-hr: #e5e7eb;--tw-prose-quotes: #111827;--tw-prose-quote-borders: #e5e7eb;--tw-prose-captions: #6b7280;--tw-prose-kbd: #111827;--tw-prose-kbd-shadows: 17 24 39;--tw-prose-code: #111827;--tw-prose-pre-code: #e5e7eb;--tw-prose-pre-bg: #1f2937;--tw-prose-th-borders: #d1d5db;--tw-prose-td-borders: #e5e7eb;--tw-prose-invert-body: #d1d5db;--tw-prose-invert-headings: #fff;--tw-prose-invert-lead: #9ca3af;--tw-prose-invert-links: #fff;--tw-prose-invert-bold: #fff;--tw-prose-invert-counters: #9ca3af;--tw-prose-invert-bullets: #4b5563;--tw-prose-invert-hr: #374151;--tw-prose-invert-quotes: #f3f4f6;--tw-prose-invert-quote-borders: #374151;--tw-prose-invert-captions: #9ca3af;--tw-prose-invert-kbd: #fff;--tw-prose-invert-kbd-shadows: 255 255 255;--tw-prose-invert-code: #fff;--tw-prose-invert-pre-code: #d1d5db;--tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);--tw-prose-invert-th-borders: #4b5563;--tw-prose-invert-td-borders: #374151;font-size:1rem;line-height:1.75}.prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;margin-bottom:.5em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.375em}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.375em}.prose :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(.prose>ul>li>*:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ul>li>*:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(.prose>ol>li>*:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ol>li>*:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-left:1.625em}.prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding:.5714286em}.prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.button{border-radius:.25rem;padding:.75rem 1rem;font-size:.875rem;line-height:1rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}button:disabled{cursor:not-allowed;opacity:.5}.button-primary{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.button-primary:hover{font-weight:600}.button-block{display:block;width:100%}.button-danger{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.button-danger:hover{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.button-secondary{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.button-secondary:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.button-link{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.button-link:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity));text-decoration-line:underline}.button-link:focus{text-decoration-line:underline;outline:2px solid transparent;outline-offset:2px}.validation{margin-top:.5rem;margin-bottom:.25rem;border-left-width:2px;--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity));padding:.25rem .75rem}.validation-fail{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity));font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.validation-pass{--tw-border-opacity: 1;border-color:rgb(16 185 129 / var(--tw-border-opacity));font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.input{margin-top:.5rem;align-items:center;border-radius:.25rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity));padding:.5rem 1rem;font-size:.875rem;line-height:1.25rem}.input:focus{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity));outline:2px solid transparent;outline-offset:2px}.input-label{font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.input-slim{padding-top:.5rem;padding-bottom:.5rem}.form-checkbox{cursor:pointer;border-radius:.25rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.form-select{border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.alert{margin-top:.5rem;margin-bottom:.25rem;border-left-width:2px;--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity));padding:.75rem 1rem;font-size:.875rem;line-height:1.25rem}.alert-success{--tw-border-opacity: 1;border-color:rgb(16 185 129 / var(--tw-border-opacity))}.alert-failure{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.badge{display:inline-flex;align-items:center;border-radius:9999px;padding:.125rem .625rem;font-size:.75rem;font-weight:500;line-height:1rem}.badge-light{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.badge-primary{--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.badge-danger{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.badge-success{--tw-bg-opacity: 1;background-color:rgb(209 250 229 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(16 185 129 / var(--tw-text-opacity))}.badge-secondary{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.badge-warning{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(217 119 6 / var(--tw-text-opacity))}.badge-info{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}@media (min-width: 640px){.dataTables_length{margin-top:1.25rem!important;margin-bottom:1.25rem!important}}@media (min-width: 1024px){.dataTables_length{margin-top:1rem!important;margin-bottom:1rem!important}}.dataTables_length select{margin-left:.5rem!important;margin-right:.5rem!important;--tw-bg-opacity: 1 !important;background-color:rgb(255 255 255 / var(--tw-bg-opacity))!important;margin-top:.5rem;align-items:center;border-radius:.25rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity));padding:.5rem 1rem;font-size:.875rem;line-height:1.25rem}.dataTables_length select:focus{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity));outline:2px solid transparent;outline-offset:2px}.dataTables_filter{margin-bottom:1rem}.dataTables_filter input{margin-top:.5rem;align-items:center;border-radius:.25rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity));padding:.5rem 1rem;font-size:.875rem;line-height:1.25rem}.dataTables_filter input:focus{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity));outline:2px solid transparent;outline-offset:2px}@media (min-width: 1024px){.dataTables_filter{margin-top:-3rem!important}}.dataTables_paginate{padding-bottom:1.5rem!important;padding-top:.5rem!important}.dataTables_paginate .paginate_button{margin-right:.25rem!important;cursor:pointer!important;border-width:1px!important;--tw-border-opacity: 1 !important;border-color:rgb(209 213 219 / var(--tw-border-opacity))!important;--tw-bg-opacity: 1 !important;background-color:rgb(255 255 255 / var(--tw-bg-opacity))!important;font-weight:500!important;--tw-text-opacity: 1 !important;color:rgb(55 65 81 / var(--tw-text-opacity))!important;border-radius:.25rem;padding:.75rem 1rem;font-size:.875rem;line-height:1rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.dataTables_paginate .current{--tw-bg-opacity: 1 !important;background-color:rgb(37 99 235 / var(--tw-bg-opacity))!important;--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity))!important}.dataTables_info{font-size:.875rem!important;line-height:1.25rem!important}.dataTables_empty{padding-top:1rem!important;padding-bottom:1rem!important}.pagination{display:flex!important;align-items:center!important}.pagination .page-link{margin-top:-1px!important;display:inline-flex!important;cursor:pointer!important;align-items:center!important;border-top-width:2px!important;border-color:transparent!important;padding-left:1rem!important;padding-right:1rem!important;padding-top:1rem!important;font-size:.875rem!important;font-weight:500!important;line-height:1.25rem!important;--tw-text-opacity: 1 !important;color:rgb(107 114 128 / var(--tw-text-opacity))!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter!important;transition-duration:.15s!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.pagination .page-link:hover{--tw-border-opacity: 1 !important;border-color:rgb(209 213 219 / var(--tw-border-opacity))!important;--tw-text-opacity: 1 !important;color:rgb(55 65 81 / var(--tw-text-opacity))!important}.pagination .page-link:focus{--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity));--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity));outline:2px solid transparent;outline-offset:2px}.pagination .active>span{--tw-border-opacity: 1 !important;border-color:rgb(37 99 235 / var(--tw-border-opacity))!important;--tw-text-opacity: 1 !important;color:rgb(37 99 235 / var(--tw-text-opacity))!important}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.bottom-0{bottom:0}.left-0{left:0}.left-1{left:.25rem}.right-0{right:0}.top-0{top:0}.top-1{top:.25rem}.z-0{z-index:0}.z-10{z-index:10}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.col-auto{grid-column:auto}.col-span-1{grid-column:span 1 / span 1}.col-span-12{grid-column:span 12 / span 12}.col-span-2{grid-column:span 2 / span 2}.col-span-3{grid-column:span 3 / span 3}.col-span-4{grid-column:span 4 / span 4}.col-span-6{grid-column:span 6 / span 6}.col-span-8{grid-column:span 8 / span 8}.float-right{float:right}.m-0{margin:0}.m-auto{margin:auto}.-my-2{margin-top:-.5rem;margin-bottom:-.5rem}.-my-6{margin-top:-1.5rem;margin-bottom:-1.5rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.mx-\[22px\]{margin-left:22px;margin-right:22px}.mx-\[40px\]{margin-left:40px;margin-right:40px}.mx-\[auto\],.mx-auto{margin-left:auto;margin-right:auto}.my-10{margin-top:2.5rem;margin-bottom:2.5rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-3{margin-top:.75rem;margin-bottom:.75rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-6{margin-top:1.5rem;margin-bottom:1.5rem}.-ml-1{margin-left:-.25rem}.-ml-4{margin-left:-1rem}.-ml-px{margin-left:-1px}.-mr-1{margin-right:-.25rem}.-mr-14{margin-right:-3.5rem}.-mt-4{margin-top:-1rem}.-mt-6{margin-top:-1.5rem}.mb-0{margin-bottom:0}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-10{margin-bottom:2.5rem}.mb-12{margin-bottom:3rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.mb-\[10px\]{margin-bottom:10px}.mb-\[11px\]{margin-bottom:11px}.mb-\[20px\]{margin-bottom:20px}.mb-\[25px\]{margin-bottom:25px}.mb-\[26px\]{margin-bottom:26px}.mb-\[36px\]{margin-bottom:36px}.mb-\[40px\]{margin-bottom:40px}.mb-\[5px\]{margin-bottom:5px}.ml-0{margin-left:0}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-5{margin-left:1.25rem}.ml-\[10px\]{margin-left:10px}.mr-0{margin-right:0}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mr-5{margin-right:1.25rem}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-10{margin-top:2.5rem}.mt-2{margin-top:.5rem}.mt-20{margin-top:5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.mt-\[30px\]{margin-top:30px}.mt-\[50px\]{margin-top:50px}.mt-\[auto\]{margin-top:auto}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-0{height:0px}.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-24{height:6rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-8{height:2rem}.h-\[40px\]{height:40px}.h-auto{height:auto}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-screen{height:100vh}.min-h-\[450px\]{min-height:450px}.min-h-screen{min-height:100vh}.w-0{width:0px}.w-1{width:.25rem}.w-1\/2{width:50%}.w-1\/4{width:25%}.w-1\/6{width:16.666667%}.w-10{width:2.5rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-24{width:6rem}.w-3\/4{width:75%}.w-4{width:1rem}.w-4\/5{width:80%}.w-4\/6{width:66.666667%}.w-48{width:12rem}.w-5{width:1.25rem}.w-5\/6{width:83.333333%}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-8{width:2rem}.w-80{width:20rem}.w-\[100\%\]{width:100%}.w-\[87px\]{width:87px}.w-auto{width:auto}.w-full{width:100%}.w-screen{width:100vw}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-4xl{max-width:56rem}.max-w-\[212px\]{max-width:212px}.max-w-\[450px\]{max-width:450px}.max-w-\[625px\]{max-width:625px}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.flex-grow,.grow{flex-grow:1}.grow-0{flex-grow:0}.basis-1\/2{flex-basis:50%}.basis-full{flex-basis:100%}.table-auto{table-layout:auto}.border-collapse{border-collapse:collapse}.origin-top-right{transform-origin:top right}.-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-4{--tw-translate-y: 1rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-95{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.resize{resize:both}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.place-content-end{place-content:end}.place-items-center{place-items:center}.content-center{align-content:center}.content-start{align-content:flex-start}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-stretch{justify-content:stretch}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.gap-\[13px\]{gap:13px}.gap-\[44px\]{gap:44px}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-y-\[20px\]{row-gap:20px}.space-x-0>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(0px * var(--tw-space-x-reverse));margin-left:calc(0px * calc(1 - var(--tw-space-x-reverse)))}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-10>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2.5rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.overflow-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-\[10px\]{border-radius:10px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-none{border-radius:0}.rounded-sm{border-radius:.125rem}.rounded-b-lg{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-l-md{border-top-left-radius:.375rem;border-bottom-left-radius:.375rem}.rounded-r-md{border-top-right-radius:.375rem;border-bottom-right-radius:.375rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-4{border-width:4px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l-2{border-left-width:2px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-t-2{border-top-width:2px}.border-t-4{border-top-width:4px}.border-t-\[0px\]{border-top-width:0px}.border-t-\[10px\]{border-top-width:10px}.border-t-\[1px\]{border-top-width:1px}.border-solid{border-style:solid}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-\[\#E5E7EB\]{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.border-emerald-500{--tw-border-opacity: 1;border-color:rgb(16 185 129 / var(--tw-border-opacity))}.border-fuchsia-600{--tw-border-opacity: 1;border-color:rgb(192 38 211 / var(--tw-border-opacity))}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-gray-500{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity))}.border-gray-600{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.border-red-300{--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity))}.border-red-400{--tw-border-opacity: 1;border-color:rgb(248 113 113 / var(--tw-border-opacity))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.border-red-900{--tw-border-opacity: 1;border-color:rgb(127 29 29 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-opacity-50{--tw-border-opacity: .5}.bg-\[\#F2F9FE\]{--tw-bg-opacity: 1;background-color:rgb(242 249 254 / var(--tw-bg-opacity))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.bg-blue-700{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}.bg-emerald-600{--tw-bg-opacity: 1;background-color:rgb(5 150 105 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-opacity-100{--tw-bg-opacity: 1}.bg-clip-padding{background-clip:padding-box}.fill-current{fill:currentColor}.object-cover{-o-object-fit:cover;object-fit:cover}.object-scale-down{-o-object-fit:scale-down;object-fit:scale-down}.object-center{-o-object-position:center;object-position:center}.p-1{padding:.25rem}.p-10{padding:2.5rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-8{padding:2rem}.p-\[12px\]{padding:12px}.p-\[20px\]{padding:20px}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-12{padding-left:3rem;padding-right:3rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-\[12px\]{padding-left:12px;padding-right:12px}.px-\[20px\]{padding-left:20px;padding-right:20px}.px-\[22px\]{padding-left:22px;padding-right:22px}.py-0{padding-top:0;padding-bottom:0}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.py-\[33px\]{padding-top:33px;padding-bottom:33px}.py-\[36px\]{padding-top:36px;padding-bottom:36px}.py-\[9\.5px\]{padding-top:9.5px;padding-bottom:9.5px}.pb-10{padding-bottom:2.5rem}.pb-2{padding-bottom:.5rem}.pb-20{padding-bottom:5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pb-\[20px\]{padding-bottom:20px}.pb-\[56px\]{padding-bottom:56px}.pb-\[58px\]{padding-bottom:58px}.pl-0{padding-left:0}.pl-1{padding-left:.25rem}.pl-1\.5{padding-left:.375rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-\[18px\]{padding-left:18px}.pr-10{padding-right:2.5rem}.pr-2{padding-right:.5rem}.pr-4{padding-right:1rem}.pr-\[18px\]{padding-right:18px}.pt-0{padding-top:0}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.pt-6{padding-top:1.5rem}.pt-\[20px\]{padding-top:20px}.pt-\[29px\]{padding-top:29px}.pt-\[35px\]{padding-top:35px}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.font-\[\'Open_Sans\'\]{font-family:Open Sans}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-5xl{font-size:3rem;line-height:1}.text-\[12px\]{font-size:12px}.text-\[14px\]{font-size:14px}.text-\[15px\]{font-size:15px}.text-\[16px\]{font-size:16px}.text-\[22px\]{font-size:22px}.text-\[24px\]{font-size:24px}.text-\[35px\]{font-size:35px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-\[16px\]{font-weight:16px}.font-bold{font-weight:700}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-4{line-height:1rem}.leading-5{line-height:1.25rem}.leading-6{line-height:1.5rem}.leading-9{line-height:2.25rem}.leading-\[1\.2rem\]{line-height:1.2rem}.leading-\[1\.35em\]{line-height:1.35em}.leading-\[1\.36em\]{line-height:1.36em}.leading-\[1\.375em\]{line-height:1.375em}.leading-\[1\.3em\]{line-height:1.3em}.leading-\[1\.5em\]{line-height:1.5em}.leading-\[1\.75em\]{line-height:1.75em}.leading-normal{line-height:1.5}.leading-tight{line-height:1.25}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.text-\[\#212529\]{--tw-text-opacity: 1;color:rgb(33 37 41 / var(--tw-text-opacity))}.text-\[\#6C727F\]{--tw-text-opacity: 1;color:rgb(108 114 127 / var(--tw-text-opacity))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity))}.text-emerald-600{--tw-text-opacity: 1;color:rgb(5 150 105 / var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity))}.text-red-900{--tw-text-opacity: 1;color:rgb(127 29 29 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-25{opacity:.25}.opacity-75{opacity:.75}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-black{--tw-ring-opacity: 1;--tw-ring-color: rgb(0 0 0 / var(--tw-ring-opacity))}.ring-opacity-5{--tw-ring-opacity: .05}.grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.duration-1000{transition-duration:1s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-75{transition-duration:75ms}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-linear{transition-timing-function:linear}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.placeholder\:text-gray-500::-moz-placeholder{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.placeholder\:text-gray-500::placeholder{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:left-\[8px\]:after{content:var(--tw-content);left:8px}.after\:top-\[5px\]:after{content:var(--tw-content);top:5px}.after\:h-\[30px\]:after{content:var(--tw-content);height:30px}.after\:w-\[30px\]:after{content:var(--tw-content);width:30px}.after\:rounded-full:after{content:var(--tw-content);border-radius:9999px}.after\:bg-white:after{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.after\:transition-all:after{content:var(--tw-content);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.after\:content-\[\'\'\]:after{--tw-content: "";content:var(--tw-content)}.focus-within\:z-10:focus-within{z-index:10}.hover\:list-disc:hover{list-style-type:disc}.hover\:border-blue-600:hover{--tw-border-opacity: 1;border-color:rgb(37 99 235 / var(--tw-border-opacity))}.hover\:border-gray-600:hover{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.hover\:border-gray-800:hover{--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}.hover\:border-transparent:hover{border-color:transparent}.hover\:bg-blue-500:hover{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.hover\:bg-blue-600:hover{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.hover\:bg-red-900:hover{--tw-bg-opacity: 1;background-color:rgb(127 29 29 / var(--tw-bg-opacity))}.hover\:font-semibold:hover{font-weight:600}.hover\:text-blue-600:hover{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.hover\:text-gray-300:hover{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.hover\:text-gray-500:hover{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.hover\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.hover\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.hover\:text-gray-800:hover{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.hover\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.hover\:text-indigo-900:hover{--tw-text-opacity: 1;color:rgb(49 46 129 / var(--tw-text-opacity))}.hover\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-80:hover{opacity:.8}.hover\:shadow-2xl:hover{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\:border-blue-300:focus{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity))}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.focus\:border-fuchsia-300:focus{--tw-border-opacity: 1;border-color:rgb(240 171 252 / var(--tw-border-opacity))}.focus\:border-indigo-500:focus{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity))}.focus\:border-red-500:focus{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.focus\:bg-gray-100:focus{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.focus\:bg-gray-600:focus{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.focus\:bg-white:focus{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.focus\:font-semibold:focus{font-weight:600}.focus\:text-gray-500:focus{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.focus\:text-gray-600:focus{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.focus\:text-gray-900:focus{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.focus\:underline:focus{text-decoration-line:underline}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.focus\:ring-gray-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity))}.focus\:ring-indigo-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.focus\:ring-indigo-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(79 70 229 / var(--tw-ring-opacity))}.focus\:ring-red-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity))}.focus\:ring-opacity-50:focus{--tw-ring-opacity: .5}.active\:bg-gray-50:active{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.active\:text-gray-800:active{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.active\:outline-none:active{outline:2px solid transparent;outline-offset:2px}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-gray-50:disabled{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.disabled\:opacity-75:disabled{opacity:.75}.group:hover .group-hover\:border-transparent{border-color:transparent}.group:hover .group-hover\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.peer:checked~.peer-checked\:text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.peer:checked~.peer-checked\:after\:translate-x-\[140\%\]:after{content:var(--tw-content);--tw-translate-x: 140%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:focus~.peer-focus\:outline-none{outline:2px solid transparent;outline-offset:2px}@media (min-width: 640px){.sm\:inset-0{top:0;right:0;bottom:0;left:0}.sm\:col-span-2{grid-column:span 2 / span 2}.sm\:col-span-3{grid-column:span 3 / span 3}.sm\:col-span-4{grid-column:span 4 / span 4}.sm\:col-span-6{grid-column:span 6 / span 6}.sm\:-mx-6{margin-left:-1.5rem;margin-right:-1.5rem}.sm\:mx-0{margin-left:0;margin-right:0}.sm\:my-8{margin-top:2rem;margin-bottom:2rem}.sm\:ml-3{margin-left:.75rem}.sm\:ml-4{margin-left:1rem}.sm\:ml-6{margin-left:1.5rem}.sm\:mt-0{margin-top:0}.sm\:mt-4{margin-top:1rem}.sm\:mt-6{margin-top:1.5rem}.sm\:block{display:block}.sm\:inline-block{display:inline-block}.sm\:inline{display:inline}.sm\:flex{display:flex}.sm\:grid{display:grid}.sm\:hidden{display:none}.sm\:h-10{height:2.5rem}.sm\:h-screen{height:100vh}.sm\:w-10{width:2.5rem}.sm\:w-auto{width:auto}.sm\:w-full{width:100%}.sm\:max-w-lg{max-width:32rem}.sm\:max-w-sm{max-width:24rem}.sm\:flex-shrink-0{flex-shrink:0}.sm\:translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:scale-95{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:flex-row-reverse{flex-direction:row-reverse}.sm\:flex-nowrap{flex-wrap:nowrap}.sm\:items-start{align-items:flex-start}.sm\:items-center{align-items:center}.sm\:justify-center{justify-content:center}.sm\:justify-between{justify-content:space-between}.sm\:gap-4{gap:1rem}.sm\:rounded-lg{border-radius:.5rem}.sm\:p-0{padding:0}.sm\:p-6{padding:1.5rem}.sm\:px-0{padding-left:0;padding-right:0}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:text-left{text-align:left}.sm\:align-middle{vertical-align:middle}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 768px){.md\:col-span-1{grid-column:span 1 / span 1}.md\:col-span-2{grid-column:span 2 / span 2}.md\:col-span-4{grid-column:span 4 / span 4}.md\:col-span-5{grid-column:span 5 / span 5}.md\:col-span-6{grid-column:span 6 / span 6}.md\:col-start-2{grid-column-start:2}.md\:col-start-4{grid-column-start:4}.md\:mx-0,.md\:mx-\[0\]{margin-left:0;margin-right:0}.md\:-mr-1{margin-right:-.25rem}.md\:mb-6{margin-bottom:1.5rem}.md\:mb-\[46px\]{margin-bottom:46px}.md\:ml-2{margin-left:.5rem}.md\:ml-6{margin-left:1.5rem}.md\:mr-0{margin-right:0}.md\:mr-2{margin-right:.5rem}.md\:mt-0{margin-top:0}.md\:mt-10{margin-top:2.5rem}.md\:mt-5{margin-top:1.25rem}.md\:block{display:block}.md\:flex{display:flex}.md\:grid{display:grid}.md\:hidden{display:none}.md\:min-h-\[411px\]{min-height:411px}.md\:w-1\/2{width:50%}.md\:w-1\/3{width:33.333333%}.md\:max-w-3xl{max-width:48rem}.md\:max-w-xl{max-width:36rem}.md\:flex-shrink-0{flex-shrink:0}.md\:shrink{flex-shrink:1}.md\:grow-0{flex-grow:0}.md\:basis-1\/2{flex-basis:50%}.md\:basis-\[449px\]{flex-basis:449px}.md\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:flex-col{flex-direction:column}.md\:items-center{align-items:center}.md\:justify-center{justify-content:center}.md\:justify-between{justify-content:space-between}.md\:gap-6{gap:1.5rem}.md\:gap-x-\[21px\]{-moz-column-gap:21px;column-gap:21px}.md\:gap-y-6{row-gap:1.5rem}.md\:border-r{border-right-width:1px}.md\:border-\[\#E5E7EB\]{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.md\:p-24{padding:6rem}.md\:px-8{padding-left:2rem;padding-right:2rem}.md\:px-\[40px\]{padding-left:40px;padding-right:40px}.md\:pb-\[40px\]{padding-bottom:40px}.md\:pl-4{padding-left:1rem}.md\:pl-\[52px\]{padding-left:52px}.md\:pl-\[61px\]{padding-left:61px}.md\:pr-\[20px\]{padding-right:20px}.md\:pr-\[48px\]{padding-right:48px}.md\:pt-0{padding-top:0}.md\:pt-\[58px\]{padding-top:58px}.md\:text-left{text-align:left}.md\:text-center{text-align:center}.md\:text-2xl{font-size:1.5rem;line-height:2rem}.md\:text-\[30px\]{font-size:30px}.md\:text-\[32px\]{font-size:32px}.md\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 1024px){.lg\:col-span-3{grid-column:span 3 / span 3}.lg\:col-span-6{grid-column:span 6 / span 6}.lg\:col-span-7{grid-column:span 7 / span 7}.lg\:col-span-8{grid-column:span 8 / span 8}.lg\:col-start-3{grid-column-start:3}.lg\:col-start-4{grid-column-start:4}.lg\:-mx-8{margin-left:-2rem;margin-right:-2rem}.lg\:mt-24{margin-top:6rem}.lg\:block{display:block}.lg\:flex{display:flex}.lg\:grid{display:grid}.lg\:hidden{display:none}.lg\:h-screen{height:100vh}.lg\:w-1\/2{width:50%}.lg\:w-1\/3{width:33.333333%}.lg\:w-1\/4{width:25%}.lg\:w-1\/5{width:20%}.lg\:max-w-\[80\%\]{max-width:80%}.lg\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:items-center{align-items:center}.lg\:gap-4{gap:1rem}.lg\:rounded-lg{border-radius:.5rem}.lg\:px-16{padding-left:4rem;padding-right:4rem}.lg\:px-2{padding-left:.5rem;padding-right:.5rem}.lg\:px-4{padding-left:1rem;padding-right:1rem}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:py-2{padding-top:.5rem;padding-bottom:.5rem}}@media (min-width: 1280px){.xl\:col-span-4{grid-column:span 4 / span 4}.xl\:col-span-6{grid-column:span 6 / span 6}.xl\:col-span-8{grid-column:span 8 / span 8}.xl\:col-span-9{grid-column:span 9 / span 9}.xl\:col-start-4{grid-column-start:4}.xl\:ml-5{margin-left:1.25rem}.xl\:mt-0{margin-top:0}.xl\:mt-32{margin-top:8rem}.xl\:flex{display:flex}.xl\:w-auto{width:auto}.xl\:basis-auto{flex-basis:auto}.xl\:flex-row{flex-direction:row}.xl\:flex-nowrap{flex-wrap:nowrap}.xl\:justify-center{justify-content:center}.xl\:border-r{border-right-width:1px}.xl\:border-\[\#E5E7EB\]{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.xl\:px-16{padding-left:4rem;padding-right:4rem}.xl\:px-20{padding-left:5rem;padding-right:5rem}.xl\:px-5{padding-left:1.25rem;padding-right:1.25rem}.xl\:pr-20{padding-right:5rem}}@media (prefers-color-scheme: dark){.dark\:border-gray-600{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.dark\:bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.dark\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:placeholder-gray-400::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}.dark\:placeholder-gray-400::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}.dark\:focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.dark\:focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}} +======== +*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Open Sans,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}[type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}[type=text]:focus,input:where(:not([type])):focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=number]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=month]:focus,[type=search]:focus,[type=tel]:focus,[type=time]:focus,[type=week]:focus,[multiple]:focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:hover,[type=checkbox]:checked:focus,[type=radio]:checked:hover,[type=radio]:checked:focus{border-color:transparent;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}@media (forced-colors: active){[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.form-input,.form-textarea,.form-select,.form-multiselect{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}.form-input:focus,.form-textarea:focus,.form-select:focus,.form-multiselect:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb}.form-select{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}.form-select:where([size]:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}.form-checkbox,.form-radio{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}.form-checkbox{border-radius:0}.form-radio{border-radius:100%}.form-checkbox:focus,.form-radio:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.form-checkbox:checked,.form-radio:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}.form-checkbox:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media (forced-colors: active){.form-checkbox:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}.form-radio:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media (forced-colors: active){.form-radio:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}.form-checkbox:checked:hover,.form-checkbox:checked:focus,.form-radio:checked:hover,.form-radio:checked:focus{border-color:transparent;background-color:currentColor}.form-checkbox:indeterminate{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}@media (forced-colors: active){.form-checkbox:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}.form-checkbox:indeterminate:hover,.form-checkbox:indeterminate:focus{border-color:transparent;background-color:currentColor}.prose{color:var(--tw-prose-body);max-width:65ch}.prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-links);text-decoration:underline;font-weight:500}.prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:disc;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{font-weight:400;color:var(--tw-prose-counters)}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.25em}.prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-style:italic;color:var(--tw-prose-quotes);border-left-width:.25rem;border-left-color:var(--tw-prose-quote-borders);quotes:"“""”""‘""’";margin-top:1.6em;margin-bottom:1.6em;padding-left:1em}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:800;font-size:2.25em;margin-top:0;margin-bottom:.8888889em;line-height:1.1111111}.prose :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:900;color:inherit}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:700;font-size:1.5em;margin-top:2em;margin-bottom:1em;line-height:1.3333333}.prose :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:800;color:inherit}.prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;font-size:1.25em;margin-top:1.6em;margin-bottom:.6em;line-height:1.6}.prose :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.5em;margin-bottom:.5em;line-height:1.5}.prose :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){display:block;margin-top:2em;margin-bottom:2em}.prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-family:inherit;color:var(--tw-prose-kbd);box-shadow:0 0 0 1px rgb(var(--tw-prose-kbd-shadows) / 10%),0 3px 0 rgb(var(--tw-prose-kbd-shadows) / 10%);font-size:.875em;border-radius:.3125rem;padding:.1875em .375em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-weight:600;font-size:.875em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:"`"}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"`"}.prose :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}.prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}.prose :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);overflow-x:auto;font-weight:400;font-size:.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:.375rem;padding:.8571429em 1.1428571em}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){background-color:transparent;border-width:0;border-radius:0;padding:0;font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:none}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}.prose :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){width:100%;table-layout:auto;text-align:left;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}.prose :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;vertical-align:bottom;padding-right:.5714286em;padding-bottom:.5714286em;padding-left:.5714286em}.prose :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.prose :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}.prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.prose :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}.prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.prose{--tw-prose-body: #374151;--tw-prose-headings: #111827;--tw-prose-lead: #4b5563;--tw-prose-links: #111827;--tw-prose-bold: #111827;--tw-prose-counters: #6b7280;--tw-prose-bullets: #d1d5db;--tw-prose-hr: #e5e7eb;--tw-prose-quotes: #111827;--tw-prose-quote-borders: #e5e7eb;--tw-prose-captions: #6b7280;--tw-prose-kbd: #111827;--tw-prose-kbd-shadows: 17 24 39;--tw-prose-code: #111827;--tw-prose-pre-code: #e5e7eb;--tw-prose-pre-bg: #1f2937;--tw-prose-th-borders: #d1d5db;--tw-prose-td-borders: #e5e7eb;--tw-prose-invert-body: #d1d5db;--tw-prose-invert-headings: #fff;--tw-prose-invert-lead: #9ca3af;--tw-prose-invert-links: #fff;--tw-prose-invert-bold: #fff;--tw-prose-invert-counters: #9ca3af;--tw-prose-invert-bullets: #4b5563;--tw-prose-invert-hr: #374151;--tw-prose-invert-quotes: #f3f4f6;--tw-prose-invert-quote-borders: #374151;--tw-prose-invert-captions: #9ca3af;--tw-prose-invert-kbd: #fff;--tw-prose-invert-kbd-shadows: 255 255 255;--tw-prose-invert-code: #fff;--tw-prose-invert-pre-code: #d1d5db;--tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);--tw-prose-invert-th-borders: #4b5563;--tw-prose-invert-td-borders: #374151;font-size:1rem;line-height:1.75}.prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;margin-bottom:.5em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.375em}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.375em}.prose :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(.prose>ul>li>*:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ul>li>*:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(.prose>ol>li>*:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ol>li>*:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-left:1.625em}.prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding:.5714286em}.prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.button{border-radius:.25rem;padding:.75rem 1rem;font-size:.875rem;line-height:1rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}button:disabled{cursor:not-allowed;opacity:.5}.button-primary{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.button-primary:hover{font-weight:600}.button-block{display:block;width:100%}.button-danger{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.button-danger:hover{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.button-secondary{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.button-secondary:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.button-link{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.button-link:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity));text-decoration-line:underline}.button-link:focus{text-decoration-line:underline;outline:2px solid transparent;outline-offset:2px}.validation{margin-top:.5rem;margin-bottom:.25rem;border-left-width:2px;--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity));padding:.25rem .75rem}.validation-fail{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity));font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.validation-pass{--tw-border-opacity: 1;border-color:rgb(16 185 129 / var(--tw-border-opacity));font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.input{margin-top:.5rem;align-items:center;border-radius:.25rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity));padding:.5rem 1rem;font-size:.875rem;line-height:1.25rem}.input:focus{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity));outline:2px solid transparent;outline-offset:2px}.input-label{font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.input-slim{padding-top:.5rem;padding-bottom:.5rem}.form-checkbox{cursor:pointer;border-radius:.25rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.form-select{border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.alert{margin-top:.5rem;margin-bottom:.25rem;border-left-width:2px;--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity));padding:.75rem 1rem;font-size:.875rem;line-height:1.25rem}.alert-success{--tw-border-opacity: 1;border-color:rgb(16 185 129 / var(--tw-border-opacity))}.alert-failure{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.badge{display:inline-flex;align-items:center;border-radius:9999px;padding:.125rem .625rem;font-size:.75rem;font-weight:500;line-height:1rem}.badge-light{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.badge-primary{--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.badge-danger{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.badge-success{--tw-bg-opacity: 1;background-color:rgb(209 250 229 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(16 185 129 / var(--tw-text-opacity))}.badge-secondary{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.badge-warning{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(217 119 6 / var(--tw-text-opacity))}.badge-info{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}@media (min-width: 640px){.dataTables_length{margin-top:1.25rem!important;margin-bottom:1.25rem!important}}@media (min-width: 1024px){.dataTables_length{margin-top:1rem!important;margin-bottom:1rem!important}}.dataTables_length select{margin-left:.5rem!important;margin-right:.5rem!important;--tw-bg-opacity: 1 !important;background-color:rgb(255 255 255 / var(--tw-bg-opacity))!important;margin-top:.5rem;align-items:center;border-radius:.25rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity));padding:.5rem 1rem;font-size:.875rem;line-height:1.25rem}.dataTables_length select:focus{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity));outline:2px solid transparent;outline-offset:2px}.dataTables_filter{margin-bottom:1rem}.dataTables_filter input{margin-top:.5rem;align-items:center;border-radius:.25rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity));padding:.5rem 1rem;font-size:.875rem;line-height:1.25rem}.dataTables_filter input:focus{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity));outline:2px solid transparent;outline-offset:2px}@media (min-width: 1024px){.dataTables_filter{margin-top:-3rem!important}}.dataTables_paginate{padding-bottom:1.5rem!important;padding-top:.5rem!important}.dataTables_paginate .paginate_button{margin-right:.25rem!important;cursor:pointer!important;border-width:1px!important;--tw-border-opacity: 1 !important;border-color:rgb(209 213 219 / var(--tw-border-opacity))!important;--tw-bg-opacity: 1 !important;background-color:rgb(255 255 255 / var(--tw-bg-opacity))!important;font-weight:500!important;--tw-text-opacity: 1 !important;color:rgb(55 65 81 / var(--tw-text-opacity))!important;border-radius:.25rem;padding:.75rem 1rem;font-size:.875rem;line-height:1rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.dataTables_paginate .current{--tw-bg-opacity: 1 !important;background-color:rgb(37 99 235 / var(--tw-bg-opacity))!important;--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity))!important}.dataTables_info{font-size:.875rem!important;line-height:1.25rem!important}.dataTables_empty{padding-top:1rem!important;padding-bottom:1rem!important}.pagination{display:flex!important;align-items:center!important}.pagination .page-link{margin-top:-1px!important;display:inline-flex!important;cursor:pointer!important;align-items:center!important;border-top-width:2px!important;border-color:transparent!important;padding-left:1rem!important;padding-right:1rem!important;padding-top:1rem!important;font-size:.875rem!important;font-weight:500!important;line-height:1.25rem!important;--tw-text-opacity: 1 !important;color:rgb(107 114 128 / var(--tw-text-opacity))!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter!important;transition-duration:.15s!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.pagination .page-link:hover{--tw-border-opacity: 1 !important;border-color:rgb(209 213 219 / var(--tw-border-opacity))!important;--tw-text-opacity: 1 !important;color:rgb(55 65 81 / var(--tw-text-opacity))!important}.pagination .page-link:focus{--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity));--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity));outline:2px solid transparent;outline-offset:2px}.pagination .active>span{--tw-border-opacity: 1 !important;border-color:rgb(37 99 235 / var(--tw-border-opacity))!important;--tw-text-opacity: 1 !important;color:rgb(37 99 235 / var(--tw-text-opacity))!important}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.bottom-0{bottom:0}.left-0{left:0}.left-1{left:.25rem}.right-0{right:0}.top-0{top:0}.top-1{top:.25rem}.z-0{z-index:0}.z-10{z-index:10}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.col-auto{grid-column:auto}.col-span-1{grid-column:span 1 / span 1}.col-span-12{grid-column:span 12 / span 12}.col-span-2{grid-column:span 2 / span 2}.col-span-3{grid-column:span 3 / span 3}.col-span-4{grid-column:span 4 / span 4}.col-span-6{grid-column:span 6 / span 6}.col-span-8{grid-column:span 8 / span 8}.float-end{float:inline-end}.float-right{float:right}.m-0{margin:0}.m-auto{margin:auto}.-my-2{margin-top:-.5rem;margin-bottom:-.5rem}.-my-6{margin-top:-1.5rem;margin-bottom:-1.5rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.mx-\[22px\]{margin-left:22px;margin-right:22px}.mx-\[40px\]{margin-left:40px;margin-right:40px}.mx-\[auto\],.mx-auto{margin-left:auto;margin-right:auto}.my-10{margin-top:2.5rem;margin-bottom:2.5rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-3{margin-top:.75rem;margin-bottom:.75rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-6{margin-top:1.5rem;margin-bottom:1.5rem}.-ml-1{margin-left:-.25rem}.-ml-4{margin-left:-1rem}.-ml-px{margin-left:-1px}.-mr-1{margin-right:-.25rem}.-mr-14{margin-right:-3.5rem}.-mt-4{margin-top:-1rem}.-mt-6{margin-top:-1.5rem}.mb-0{margin-bottom:0}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-10{margin-bottom:2.5rem}.mb-12{margin-bottom:3rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.mb-\[10px\]{margin-bottom:10px}.mb-\[11px\]{margin-bottom:11px}.mb-\[20px\]{margin-bottom:20px}.mb-\[25px\]{margin-bottom:25px}.mb-\[26px\]{margin-bottom:26px}.mb-\[36px\]{margin-bottom:36px}.mb-\[40px\]{margin-bottom:40px}.mb-\[5px\]{margin-bottom:5px}.ml-0{margin-left:0}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-5{margin-left:1.25rem}.ml-\[10px\]{margin-left:10px}.mr-0{margin-right:0}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mr-5{margin-right:1.25rem}.mr-6{margin-right:1.5rem}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-10{margin-top:2.5rem}.mt-2{margin-top:.5rem}.mt-20{margin-top:5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.mt-\[30px\]{margin-top:30px}.mt-\[50px\]{margin-top:50px}.mt-\[auto\]{margin-top:auto}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-0{height:0px}.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-24{height:6rem}.h-3{height:.75rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-8{height:2rem}.h-\[1px\]{height:1px}.h-\[40px\]{height:40px}.h-auto{height:auto}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-screen{height:100vh}.min-h-\[450px\]{min-height:450px}.min-h-screen{min-height:100vh}.w-0{width:0px}.w-1{width:.25rem}.w-1\/2{width:50%}.w-1\/6{width:16.666667%}.w-10{width:2.5rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\/4{width:75%}.w-4{width:1rem}.w-4\/5{width:80%}.w-4\/6{width:66.666667%}.w-48{width:12rem}.w-5{width:1.25rem}.w-5\/6{width:83.333333%}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-8{width:2rem}.w-80{width:20rem}.w-\[100\%\]{width:100%}.w-\[87px\]{width:87px}.w-auto{width:auto}.w-full{width:100%}.w-screen{width:100vw}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-4xl{max-width:56rem}.max-w-\[212px\]{max-width:212px}.max-w-\[450px\]{max-width:450px}.max-w-\[625px\]{max-width:625px}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.grow-0{flex-grow:0}.basis-1\/2{flex-basis:50%}.basis-full{flex-basis:100%}.table-auto{table-layout:auto}.border-collapse{border-collapse:collapse}.origin-top-right{transform-origin:top right}.-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-4{--tw-translate-y: 1rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-95{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.resize{resize:both}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.place-content-end{place-content:end}.place-items-center{place-items:center}.content-center{align-content:center}.content-start{align-content:flex-start}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-stretch{justify-content:stretch}.gap-0{gap:0px}.gap-0\.5{gap:.125rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.gap-\[13px\]{gap:13px}.gap-\[44px\]{gap:44px}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-y-\[20px\]{row-gap:20px}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-10>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2.5rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.overflow-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-\[10px\]{border-radius:10px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-none{border-radius:0}.rounded-sm{border-radius:.125rem}.rounded-b-lg{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-l-md{border-top-left-radius:.375rem;border-bottom-left-radius:.375rem}.rounded-r-md{border-top-right-radius:.375rem;border-bottom-right-radius:.375rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-4{border-width:4px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l-2{border-left-width:2px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-t-2{border-top-width:2px}.border-t-4{border-top-width:4px}.border-t-\[0px\]{border-top-width:0px}.border-t-\[10px\]{border-top-width:10px}.border-t-\[1px\]{border-top-width:1px}.border-solid{border-style:solid}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-\[\#E5E7EB\]{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.border-emerald-500{--tw-border-opacity: 1;border-color:rgb(16 185 129 / var(--tw-border-opacity))}.border-fuchsia-600{--tw-border-opacity: 1;border-color:rgb(192 38 211 / var(--tw-border-opacity))}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-gray-500{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity))}.border-gray-600{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.border-red-300{--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity))}.border-red-400{--tw-border-opacity: 1;border-color:rgb(248 113 113 / var(--tw-border-opacity))}.border-red-900{--tw-border-opacity: 1;border-color:rgb(127 29 29 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-opacity-50{--tw-border-opacity: .5}.bg-\[\#F2F9FE\]{--tw-bg-opacity: 1;background-color:rgb(242 249 254 / var(--tw-bg-opacity))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.bg-blue-700{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}.bg-emerald-600{--tw-bg-opacity: 1;background-color:rgb(5 150 105 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-opacity-100{--tw-bg-opacity: 1}.bg-clip-padding{background-clip:padding-box}.fill-current{fill:currentColor}.object-cover{-o-object-fit:cover;object-fit:cover}.object-scale-down{-o-object-fit:scale-down;object-fit:scale-down}.object-center{-o-object-position:center;object-position:center}.p-1{padding:.25rem}.p-10{padding:2.5rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.p-\[12px\]{padding:12px}.p-\[20px\]{padding:20px}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-12{padding-left:3rem;padding-right:3rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-\[12px\]{padding-left:12px;padding-right:12px}.px-\[20px\]{padding-left:20px;padding-right:20px}.px-\[22px\]{padding-left:22px;padding-right:22px}.py-0{padding-top:0;padding-bottom:0}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.py-\[33px\]{padding-top:33px;padding-bottom:33px}.py-\[36px\]{padding-top:36px;padding-bottom:36px}.py-\[9\.5px\]{padding-top:9.5px;padding-bottom:9.5px}.pb-10{padding-bottom:2.5rem}.pb-2{padding-bottom:.5rem}.pb-20{padding-bottom:5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pb-8{padding-bottom:2rem}.pb-\[20px\]{padding-bottom:20px}.pb-\[56px\]{padding-bottom:56px}.pb-\[58px\]{padding-bottom:58px}.pl-0{padding-left:0}.pl-1{padding-left:.25rem}.pl-1\.5{padding-left:.375rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-\[18px\]{padding-left:18px}.pr-10{padding-right:2.5rem}.pr-2{padding-right:.5rem}.pr-4{padding-right:1rem}.pr-\[18px\]{padding-right:18px}.pt-0{padding-top:0}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.pt-6{padding-top:1.5rem}.pt-\[20px\]{padding-top:20px}.pt-\[29px\]{padding-top:29px}.pt-\[35px\]{padding-top:35px}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.font-\[\'Open_Sans\'\]{font-family:Open Sans}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-5xl{font-size:3rem;line-height:1}.text-\[12px\]{font-size:12px}.text-\[14px\]{font-size:14px}.text-\[15px\]{font-size:15px}.text-\[16px\]{font-size:16px}.text-\[22px\]{font-size:22px}.text-\[24px\]{font-size:24px}.text-\[35px\]{font-size:35px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-\[16px\]{font-weight:16px}.font-bold{font-weight:700}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-4{line-height:1rem}.leading-5{line-height:1.25rem}.leading-6{line-height:1.5rem}.leading-9{line-height:2.25rem}.leading-\[1\.2rem\]{line-height:1.2rem}.leading-\[1\.35em\]{line-height:1.35em}.leading-\[1\.36em\]{line-height:1.36em}.leading-\[1\.375em\]{line-height:1.375em}.leading-\[1\.3em\]{line-height:1.3em}.leading-\[1\.5em\]{line-height:1.5em}.leading-\[1\.75em\]{line-height:1.75em}.leading-normal{line-height:1.5}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.text-\[\#212529\]{--tw-text-opacity: 1;color:rgb(33 37 41 / var(--tw-text-opacity))}.text-\[\#6C727F\]{--tw-text-opacity: 1;color:rgb(108 114 127 / var(--tw-text-opacity))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity))}.text-emerald-600{--tw-text-opacity: 1;color:rgb(5 150 105 / var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity))}.text-red-900{--tw-text-opacity: 1;color:rgb(127 29 29 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-25{opacity:.25}.opacity-75{opacity:.75}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-black{--tw-ring-opacity: 1;--tw-ring-color: rgb(0 0 0 / var(--tw-ring-opacity))}.ring-opacity-5{--tw-ring-opacity: .05}.grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.duration-1000{transition-duration:1s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-75{transition-duration:75ms}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-linear{transition-timing-function:linear}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.placeholder\:text-gray-500::-moz-placeholder{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.placeholder\:text-gray-500::placeholder{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:left-\[8px\]:after{content:var(--tw-content);left:8px}.after\:top-\[5px\]:after{content:var(--tw-content);top:5px}.after\:h-\[30px\]:after{content:var(--tw-content);height:30px}.after\:w-\[30px\]:after{content:var(--tw-content);width:30px}.after\:rounded-full:after{content:var(--tw-content);border-radius:9999px}.after\:bg-white:after{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.after\:transition-all:after{content:var(--tw-content);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.after\:content-\[\'\'\]:after{--tw-content: "";content:var(--tw-content)}.focus-within\:z-10:focus-within{z-index:10}.hover\:list-disc:hover{list-style-type:disc}.hover\:border-blue-600:hover{--tw-border-opacity: 1;border-color:rgb(37 99 235 / var(--tw-border-opacity))}.hover\:border-gray-600:hover{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.hover\:border-gray-800:hover{--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}.hover\:border-transparent:hover{border-color:transparent}.hover\:bg-blue-500:hover{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.hover\:bg-blue-600:hover{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.hover\:bg-red-900:hover{--tw-bg-opacity: 1;background-color:rgb(127 29 29 / var(--tw-bg-opacity))}.hover\:font-semibold:hover{font-weight:600}.hover\:text-blue-600:hover{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.hover\:text-gray-300:hover{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.hover\:text-gray-500:hover{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.hover\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.hover\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.hover\:text-gray-800:hover{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.hover\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.hover\:text-indigo-900:hover{--tw-text-opacity: 1;color:rgb(49 46 129 / var(--tw-text-opacity))}.hover\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-80:hover{opacity:.8}.hover\:shadow-2xl:hover{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-sm:hover{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\:border-blue-300:focus{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity))}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.focus\:border-fuchsia-300:focus{--tw-border-opacity: 1;border-color:rgb(240 171 252 / var(--tw-border-opacity))}.focus\:border-indigo-500:focus{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity))}.focus\:border-red-500:focus{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.focus\:bg-gray-100:focus{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.focus\:bg-gray-600:focus{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.focus\:bg-white:focus{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.focus\:font-semibold:focus{font-weight:600}.focus\:text-gray-500:focus{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.focus\:text-gray-600:focus{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.focus\:text-gray-900:focus{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.focus\:underline:focus{text-decoration-line:underline}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.focus\:ring-indigo-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.focus\:ring-indigo-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(79 70 229 / var(--tw-ring-opacity))}.focus\:ring-red-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity))}.focus\:ring-opacity-50:focus{--tw-ring-opacity: .5}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.active\:bg-gray-50:active{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.active\:text-gray-800:active{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.active\:outline-none:active{outline:2px solid transparent;outline-offset:2px}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-gray-50:disabled{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:border-transparent{border-color:transparent}.group:hover .group-hover\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.group:hover .group-hover\:opacity-100{opacity:1}.peer:checked~.peer-checked\:text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.peer:checked~.peer-checked\:after\:translate-x-\[140\%\]:after{content:var(--tw-content);--tw-translate-x: 140%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:focus~.peer-focus\:outline-none{outline:2px solid transparent;outline-offset:2px}@media (min-width: 640px){.sm\:inset-0{top:0;right:0;bottom:0;left:0}.sm\:col-span-2{grid-column:span 2 / span 2}.sm\:col-span-3{grid-column:span 3 / span 3}.sm\:col-span-4{grid-column:span 4 / span 4}.sm\:col-span-6{grid-column:span 6 / span 6}.sm\:-mx-6{margin-left:-1.5rem;margin-right:-1.5rem}.sm\:mx-0{margin-left:0;margin-right:0}.sm\:my-8{margin-top:2rem;margin-bottom:2rem}.sm\:ml-3{margin-left:.75rem}.sm\:ml-4{margin-left:1rem}.sm\:ml-6{margin-left:1.5rem}.sm\:mt-0{margin-top:0}.sm\:mt-4{margin-top:1rem}.sm\:mt-6{margin-top:1.5rem}.sm\:block{display:block}.sm\:inline-block{display:inline-block}.sm\:inline{display:inline}.sm\:flex{display:flex}.sm\:grid{display:grid}.sm\:hidden{display:none}.sm\:h-10{height:2.5rem}.sm\:h-screen{height:100vh}.sm\:w-10{width:2.5rem}.sm\:w-auto{width:auto}.sm\:w-full{width:100%}.sm\:max-w-lg{max-width:32rem}.sm\:max-w-sm{max-width:24rem}.sm\:flex-shrink-0{flex-shrink:0}.sm\:translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:scale-95{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:flex-row-reverse{flex-direction:row-reverse}.sm\:flex-nowrap{flex-wrap:nowrap}.sm\:items-start{align-items:flex-start}.sm\:items-center{align-items:center}.sm\:justify-center{justify-content:center}.sm\:justify-between{justify-content:space-between}.sm\:gap-4{gap:1rem}.sm\:rounded-lg{border-radius:.5rem}.sm\:p-0{padding:0}.sm\:p-6{padding:1.5rem}.sm\:px-0{padding-left:0;padding-right:0}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:text-left{text-align:left}.sm\:align-middle{vertical-align:middle}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 768px){.md\:col-span-1{grid-column:span 1 / span 1}.md\:col-span-2{grid-column:span 2 / span 2}.md\:col-span-4{grid-column:span 4 / span 4}.md\:col-span-5{grid-column:span 5 / span 5}.md\:col-span-6{grid-column:span 6 / span 6}.md\:col-start-2{grid-column-start:2}.md\:col-start-4{grid-column-start:4}.md\:mx-0,.md\:mx-\[0\]{margin-left:0;margin-right:0}.md\:-mr-1{margin-right:-.25rem}.md\:mb-6{margin-bottom:1.5rem}.md\:mb-\[46px\]{margin-bottom:46px}.md\:ml-2{margin-left:.5rem}.md\:ml-6{margin-left:1.5rem}.md\:mr-0{margin-right:0}.md\:mr-2{margin-right:.5rem}.md\:mt-0{margin-top:0}.md\:mt-10{margin-top:2.5rem}.md\:mt-5{margin-top:1.25rem}.md\:block{display:block}.md\:flex{display:flex}.md\:grid{display:grid}.md\:hidden{display:none}.md\:min-h-\[411px\]{min-height:411px}.md\:w-1\/2{width:50%}.md\:w-1\/3{width:33.333333%}.md\:max-w-3xl{max-width:48rem}.md\:max-w-xl{max-width:36rem}.md\:flex-shrink-0{flex-shrink:0}.md\:shrink{flex-shrink:1}.md\:grow-0{flex-grow:0}.md\:basis-1\/2{flex-basis:50%}.md\:basis-\[449px\]{flex-basis:449px}.md\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:flex-col{flex-direction:column}.md\:items-center{align-items:center}.md\:justify-center{justify-content:center}.md\:justify-between{justify-content:space-between}.md\:gap-6{gap:1.5rem}.md\:gap-x-\[21px\]{-moz-column-gap:21px;column-gap:21px}.md\:gap-y-6{row-gap:1.5rem}.md\:border-r{border-right-width:1px}.md\:border-\[\#E5E7EB\]{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.md\:p-24{padding:6rem}.md\:px-8{padding-left:2rem;padding-right:2rem}.md\:px-\[40px\]{padding-left:40px;padding-right:40px}.md\:pb-\[40px\]{padding-bottom:40px}.md\:pl-4{padding-left:1rem}.md\:pl-\[52px\]{padding-left:52px}.md\:pl-\[61px\]{padding-left:61px}.md\:pr-\[20px\]{padding-right:20px}.md\:pr-\[48px\]{padding-right:48px}.md\:pt-0{padding-top:0}.md\:pt-\[58px\]{padding-top:58px}.md\:text-left{text-align:left}.md\:text-center{text-align:center}.md\:text-2xl{font-size:1.5rem;line-height:2rem}.md\:text-\[30px\]{font-size:30px}.md\:text-\[32px\]{font-size:32px}.md\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 1024px){.lg\:col-span-3{grid-column:span 3 / span 3}.lg\:col-span-6{grid-column:span 6 / span 6}.lg\:col-span-7{grid-column:span 7 / span 7}.lg\:col-span-8{grid-column:span 8 / span 8}.lg\:col-start-3{grid-column-start:3}.lg\:col-start-4{grid-column-start:4}.lg\:-mx-8{margin-left:-2rem;margin-right:-2rem}.lg\:-mb-1{margin-bottom:-.25rem}.lg\:-ml-5{margin-left:-1.25rem}.lg\:mt-24{margin-top:6rem}.lg\:block{display:block}.lg\:flex{display:flex}.lg\:grid{display:grid}.lg\:hidden{display:none}.lg\:h-screen{height:100vh}.lg\:w-1\/2{width:50%}.lg\:w-1\/4{width:25%}.lg\:w-1\/5{width:20%}.lg\:max-w-\[80\%\]{max-width:80%}.lg\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:items-center{align-items:center}.lg\:gap-4{gap:1rem}.lg\:rounded-lg{border-radius:.5rem}.lg\:px-16{padding-left:4rem;padding-right:4rem}.lg\:px-2{padding-left:.5rem;padding-right:.5rem}.lg\:px-4{padding-left:1rem;padding-right:1rem}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:py-2{padding-top:.5rem;padding-bottom:.5rem}}@media (min-width: 1280px){.xl\:col-span-4{grid-column:span 4 / span 4}.xl\:col-span-6{grid-column:span 6 / span 6}.xl\:col-span-8{grid-column:span 8 / span 8}.xl\:col-span-9{grid-column:span 9 / span 9}.xl\:col-start-4{grid-column-start:4}.xl\:ml-5{margin-left:1.25rem}.xl\:mt-0{margin-top:0}.xl\:mt-32{margin-top:8rem}.xl\:flex{display:flex}.xl\:w-auto{width:auto}.xl\:basis-auto{flex-basis:auto}.xl\:flex-row{flex-direction:row}.xl\:flex-nowrap{flex-wrap:nowrap}.xl\:justify-center{justify-content:center}.xl\:border-r{border-right-width:1px}.xl\:border-\[\#E5E7EB\]{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.xl\:px-16{padding-left:4rem;padding-right:4rem}.xl\:px-20{padding-left:5rem;padding-right:5rem}.xl\:px-5{padding-left:1.25rem;padding-right:1.25rem}.xl\:pr-20{padding-right:5rem}}@media (prefers-color-scheme: dark){.dark\:border-gray-600{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.dark\:bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.dark\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:placeholder-gray-400::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}.dark\:placeholder-gray-400::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}.dark\:focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.dark\:focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}} +>>>>>>>> new_payment_flow:public/build/assets/app-4e969b65.css diff --git a/public/build/assets/authorize-credit-card-payment-a217579b.js b/public/build/assets/authorize-credit-card-payment-a217579b.js deleted file mode 100644 index 1f462a77a1..0000000000 --- a/public/build/assets/authorize-credit-card-payment-a217579b.js +++ /dev/null @@ -1,9 +0,0 @@ -var l=Object.defineProperty;var c=(d,e,t)=>e in d?l(d,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):d[e]=t;var o=(d,e,t)=>(c(d,typeof e!="symbol"?e+"":e,t),t);/** - * Invoice Ninja (https://invoiceninja.com) - * - * @link https://github.com/invoiceninja/invoiceninja source repository - * - * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) - * - * @license https://www.elastic.co/licensing/elastic-license - */class s{constructor(e,t){o(this,"handleAuthorization",()=>{if(m=="1"&&document.getElementById("cvv").value.length<3){var e=$("#errors");e.show().html("

CVV is required

"),document.getElementById("pay-now").disabled=!1,document.querySelector("#pay-now > svg").classList.add("hidden"),document.querySelector("#pay-now > span").classList.remove("hidden");return}var t=$("#my-card"),n={};n.clientKey=this.publicKey,n.apiLoginID=this.loginId;var a={};a.cardNumber=t.CardJs("cardNumber").replace(/[^\d]/g,""),a.month=t.CardJs("expiryMonth").replace(/[^\d]/g,""),a.year=t.CardJs("expiryYear").replace(/[^\d]/g,""),a.cardCode=document.getElementById("cvv").value.replace(/[^\d]/g,"");var r={};return r.authData=n,r.cardData=a,document.getElementById("pay-now")&&(document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden")),Accept.dispatchData(r,this.responseHandler),!1});o(this,"responseHandler",e=>{if(e.messages.resultCode==="Error"){var t=0,n=$("#errors");n.show().html("

"+e.messages.message[t].code+": "+e.messages.message[t].text+"

"),document.getElementById("pay-now").disabled=!1,document.querySelector("#pay-now > svg").classList.add("hidden"),document.querySelector("#pay-now > span").classList.remove("hidden")}else if(e.messages.resultCode==="Ok"){document.getElementById("dataDescriptor").value=e.opaqueData.dataDescriptor,document.getElementById("dataValue").value=e.opaqueData.dataValue;let a=document.querySelector("input[name=token-billing-checkbox]:checked");a&&(document.getElementById("store_card").value=a.value),document.getElementById("server_response").submit()}return!1});o(this,"handle",()=>{Array.from(document.getElementsByClassName("toggle-payment-with-token")).forEach(n=>n.addEventListener("click",a=>{document.getElementById("save-card--container").style.display="none",document.getElementById("authorize--credit-card-container").style.display="none",document.getElementById("token").value=a.target.dataset.token}));let e=document.getElementById("toggle-payment-with-credit-card");e&&e.addEventListener("click",()=>{document.getElementById("save-card--container").style.display="grid",document.getElementById("authorize--credit-card-container").style.display="flex",document.getElementById("token").value=null});let t=document.getElementById("pay-now");return t&&t.addEventListener("click",n=>{let a=document.getElementById("token");a.value?this.handlePayNowAction(a.value):this.handleAuthorization()}),this});this.publicKey=e,this.loginId=t,this.cardHolderName=document.getElementById("cardholder_name")}handlePayNowAction(e){document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden"),document.getElementById("token").value=e,document.getElementById("server_response").submit()}}const u=document.querySelector('meta[name="authorize-public-key"]').content,i=document.querySelector('meta[name="authorize-login-id"]').content,m=document.querySelector('meta[name="authnet-require-cvv"]').content;new s(u,i).handle(); diff --git a/public/build/assets/authorize-credit-card-payment-bd9c9d4d.js b/public/build/assets/authorize-credit-card-payment-bd9c9d4d.js new file mode 100644 index 0000000000..44e69ff242 --- /dev/null +++ b/public/build/assets/authorize-credit-card-payment-bd9c9d4d.js @@ -0,0 +1,20 @@ +var G=Object.defineProperty;var J=(t,e,n)=>e in t?G(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var T=(t,e,n)=>(J(t,typeof e!="symbol"?e+"":e,n),n);var q=t=>{throw TypeError(t)},Q=(t,e,n)=>e.has(t)||q("Cannot "+n),ee=(t,e,n)=>e.has(t)?q("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),te=(t,e,n)=>(Q(t,e,"access private method"),n);const B={mask:/^.*$/,preprocessors:[],postprocessors:[],plugins:[],overwriteMode:"shift"};class ne{constructor(){this.now=null,this.past=[],this.future=[]}undo(){const e=this.past.pop();e&&this.now&&(this.future.push(this.now),this.updateElement(e,"historyUndo"))}redo(){const e=this.future.pop();e&&this.now&&(this.past.push(this.now),this.updateElement(e,"historyRedo"))}updateHistory(e){if(!this.now){this.now=e;return}const n=this.now.value!==e.value,a=this.now.selection.some((s,r)=>s!==e.selection[r]);!n&&!a||(n&&(this.past.push(this.now),this.future=[]),this.now=e)}updateElement(e,n){this.now=e,this.updateElementState(e,{inputType:n,data:null})}}function ae(t,...e){return e.every(({value:n})=>n===t.value)}function se(t,...e){return e.every(({value:n,selection:a})=>n===t.value&&a[0]===t.selection[0]&&a[1]===t.selection[1])}function re({value:t,selection:e},n,a){const[s,r]=e,i=typeof a=="function"?a({value:t,selection:e}):a;return{value:t,selection:i==="replace"?[s,s+n.length]:[s,r]}}function I(t){return typeof t=="string"}function O(t,e,n,a){let s="";for(let r=e.length;r{const s=e[a];return I(s)?n===s:n.match(s)}):e.test(t)}function ie(t,e,n){let a=null,s=null;const r=Array.from(t.value).reduce((l,o,c)=>{const u=O(e,l,o,n),d=l+u,h=e[d.length];return I(h)?d+h:o.match(h)?(a===null&&c>=t.selection[0]&&(a=d.length),s===null&&c>=t.selection[1]&&(s=d.length),d+o):d},""),i=O(e,r,"",n);return{value:H(r+i,e)?r+i:r,selection:[a??r.length,s??r.length]}}function le({value:t,selection:e},n){const[a,s]=e;let r=a,i=s;return{value:Array.from(t).reduce((l,o,c)=>{const u=l+o;return a===c&&(r=l.length),s===c&&(i=l.length),u.match(n)?u:l},""),selection:[r,i]}}function A(t,e,n=null){if(H(t.value,e))return t;const{value:a,selection:s}=Array.isArray(e)?ie(t,e,n):le(t,e);return{selection:s,value:Array.isArray(e)?a.slice(0,e.length):a}}function R(t,e){if(!Array.isArray(e))return t;const[n,a]=t.selection,s=[],r=Array.from(t.value).reduce((i,l,o)=>{const c=e[o];return o===n&&s.push(i.length),o===a&&s.push(i.length),I(c)&&c===l?i:i+l},"");return s.length<2&&s.push(...new Array(2-s.length).fill(r.length)),{value:r,selection:[s[0],s[1]]}}class D{constructor(e,n){this.initialElementState=e,this.maskOptions=n,this.value="",this.selection=[0,0];const{value:a,selection:s}=A(this.initialElementState,this.getMaskExpression(this.initialElementState));this.value=a,this.selection=s}addCharacters([e,n],a){const{value:s}=this,r=this.getMaskExpression({value:s.slice(0,e)+a+s.slice(n),selection:[e+a.length,e+a.length]}),i={value:s,selection:[e,n]},l=R(i,r),[o,c]=re(l,a,this.maskOptions.overwriteMode).selection,u=l.value.slice(0,o)+a,d=u.length,h=A({value:u+l.value.slice(c),selection:[d,d]},r,i);if(s.slice(0,o)===A({value:u,selection:[d,d]},r,i).value||se(this,h))throw new Error("Invalid mask value");this.value=h.value,this.selection=h.selection}deleteCharacters([e,n]){if(e===n||!n)return;const{value:a}=this,s=this.getMaskExpression({value:a.slice(0,e)+a.slice(n),selection:[e,e]}),r={value:a,selection:[e,n]},i=R(r,s),[l,o]=i.selection,c=i.value.slice(0,l)+i.value.slice(o),u=A({value:c,selection:[l,l]},s,r);this.value=u.value,this.selection=u.selection}getMaskExpression(e){const{mask:n}=this.maskOptions;return typeof n=="function"?n(e):n}}class oe{constructor(e){this.element=e,this.listeners=[]}listen(e,n,a){const s=n;this.element.addEventListener(e,s,a),this.listeners.push(()=>this.element.removeEventListener(e,s))}destroy(){this.listeners.forEach(e=>e())}}const g={CTRL:1,ALT:2,SHIFT:4,META:8},w={Y:89,Z:90};function b(t,e,n){return t.ctrlKey===!!(e&g.CTRL)&&t.altKey===!!(e&g.ALT)&&t.shiftKey===!!(e&g.SHIFT)&&t.metaKey===!!(e&g.META)&&t.keyCode===n}function ce(t){return b(t,g.CTRL,w.Y)||b(t,g.CTRL|g.SHIFT,w.Z)||b(t,g.META|g.SHIFT,w.Z)}function ue(t){return b(t,g.CTRL,w.Z)||b(t,g.META,w.Z)}function de({value:t,selection:e},n){const[a,s]=e;if(a!==s)return[a,s];const r=n?t.slice(a).indexOf(` +`)+1||t.length:t.slice(0,s).lastIndexOf(` +`)+1;return[n?a:r,n?r:s]}function he({value:t,selection:e},n){const[a,s]=e;return a!==s?[a,s]:(n?[a,s+1]:[a-1,s]).map(r=>Math.min(Math.max(r,0),t.length))}const me=/\s+$/g,pe=/^\s+/g,j=/\s/;function ve({value:t,selection:e},n){const[a,s]=e;if(a!==s)return[a,s];if(n){const o=t.slice(a),[c]=o.match(pe)||[""],u=o.trimStart().search(j);return[a,u!==-1?a+c.length+u:t.length]}const r=t.slice(0,s),[i]=r.match(me)||[""],l=r.trimEnd().split("").reverse().findIndex(o=>o.match(j));return[l!==-1?s-i.length-l:0,s]}function k(t=[]){return(e,...n)=>t.reduce((a,s)=>Object.assign(Object.assign({},a),s(a,...n)),e)}function ge(t,e){const n=Object.assign(Object.assign({},B),e),a=k(n.preprocessors),s=k(n.postprocessors),r=typeof t=="string"?{value:t,selection:[0,0]}:t,{elementState:i}=a({elementState:r,data:""},"validation"),l=new D(i,n),{value:o,selection:c}=s(l,r);return typeof t=="string"?o:{value:o,selection:c}}class M extends ne{constructor(e,n){super(),this.element=e,this.maskitoOptions=n,this.isTextArea=this.element.nodeName==="TEXTAREA",this.eventListener=new oe(this.element),this.options=Object.assign(Object.assign({},B),this.maskitoOptions),this.preprocessor=k(this.options.preprocessors),this.postprocessor=k(this.options.postprocessors),this.teardowns=this.options.plugins.map(a=>a(this.element,this.options)),this.updateHistory(this.elementState),this.eventListener.listen("keydown",a=>{if(ce(a))return a.preventDefault(),this.redo();if(ue(a))return a.preventDefault(),this.undo()}),this.eventListener.listen("beforeinput",a=>{var s;const r=a.inputType.includes("Forward");switch(this.updateHistory(this.elementState),a.inputType){case"historyUndo":return a.preventDefault(),this.undo();case"historyRedo":return a.preventDefault(),this.redo();case"deleteByCut":case"deleteContentBackward":case"deleteContentForward":return this.handleDelete({event:a,isForward:r,selection:he(this.elementState,r)});case"deleteWordForward":case"deleteWordBackward":return this.handleDelete({event:a,isForward:r,selection:ve(this.elementState,r),force:!0});case"deleteSoftLineBackward":case"deleteSoftLineForward":case"deleteHardLineBackward":case"deleteHardLineForward":return this.handleDelete({event:a,isForward:r,selection:de(this.elementState,r),force:!0});case"insertCompositionText":return;case"insertReplacementText":return;case"insertLineBreak":case"insertParagraph":return this.handleEnter(a);case"insertFromPaste":case"insertText":case"insertFromDrop":default:return this.handleInsert(a,a.data||((s=a.dataTransfer)===null||s===void 0?void 0:s.getData("text/plain"))||"")}}),this.eventListener.listen("input",({inputType:a})=>{a!=="insertCompositionText"&&(this.ensureValueFitsMask(),this.updateHistory(this.elementState))}),this.eventListener.listen("compositionend",()=>{this.ensureValueFitsMask(),this.updateHistory(this.elementState)})}get elementState(){const{value:e,selectionStart:n,selectionEnd:a}=this.element;return{value:e,selection:[n||0,a||0]}}get maxLength(){const{maxLength:e}=this.element;return e===-1?1/0:e}destroy(){this.eventListener.destroy(),this.teardowns.forEach(e=>e==null?void 0:e())}updateElementState({value:e,selection:n},a={inputType:"insertText",data:null}){const s=this.elementState.value;this.updateValue(e),this.updateSelectionRange(n),s!==e&&this.dispatchInputEvent(a)}updateSelectionRange([e,n]){var a;const{element:s}=this;s.matches(":focus")&&(s.selectionStart!==e||s.selectionEnd!==n)&&((a=s.setSelectionRange)===null||a===void 0||a.call(s,e,n))}updateValue(e){this.element.value=e}ensureValueFitsMask(){this.updateElementState(ge(this.elementState,this.options))}dispatchInputEvent(e={inputType:"insertText",data:null}){globalThis.InputEvent&&this.element.dispatchEvent(new InputEvent("input",Object.assign(Object.assign({},e),{bubbles:!0,cancelable:!1})))}handleDelete({event:e,selection:n,isForward:a,force:s=!1}){const r={value:this.elementState.value,selection:n},[i,l]=r.selection,{elementState:o}=this.preprocessor({elementState:r,data:""},a?"deleteForward":"deleteBackward"),c=new D(o,this.options),[u,d]=o.selection;c.deleteCharacters([u,d]);const h=this.postprocessor(c,r);if(!(r.value.slice(0,i)+r.value.slice(l)===h.value&&!s&&!this.element.isContentEditable)){if(e.preventDefault(),ae(r,o,c,h))return this.updateSelectionRange(a?[d,d]:[u,u]);this.updateElementState(h,{inputType:e.inputType,data:null}),this.updateHistory(h)}}handleInsert(e,n){const a=this.elementState,{elementState:s,data:r=n}=this.preprocessor({data:n,elementState:a},"insert"),i=new D(s,this.options);try{i.addCharacters(s.selection,r)}catch{return e.preventDefault()}const[l,o]=s.selection,c=a.value.slice(0,l)+n+a.value.slice(o),u=this.postprocessor(i,a);if(u.value.length>this.maxLength)return e.preventDefault();(c!==u.value||this.element.isContentEditable)&&(e.preventDefault(),this.updateElementState(u,{data:n,inputType:e.inputType}),this.updateHistory(u))}handleEnter(e){(this.isTextArea||this.element.isContentEditable)&&this.handleInsert(e,` +`)}}function fe(t,e,n){const a=Math.min(Number(n),Math.max(Number(e),Number(t)));return t instanceof Date?new Date(a):a}function ye(t){return t.replaceAll(/\W/g,"").length}const V=t=>{var e,n,a;return{day:((e=t.match(/d/g))===null||e===void 0?void 0:e.length)||0,month:((n=t.match(/m/g))===null||n===void 0?void 0:n.length)||0,year:((a=t.match(/y/g))===null||a===void 0?void 0:a.length)||0}};function Se(t){return{day:String(t.getDate()).padStart(2,"0"),month:String(t.getMonth()+1).padStart(2,"0"),year:String(t.getFullYear()).padStart(4,"0"),hours:String(t.getHours()).padStart(2,"0"),minutes:String(t.getMinutes()).padStart(2,"0"),seconds:String(t.getSeconds()).padStart(2,"0"),milliseconds:String(t.getMilliseconds()).padStart(3,"0")}}function we(t,e){return t.length!n.match(/^0+$/))}function W(t,e,n){const a=ye(e);return t.replace(n,"").match(new RegExp(`(\\D*\\d[^\\d\\s]*){1,${a}}`,"g"))||[]}function C(t,e){const n=e.replaceAll(/[^dmy]/g,""),a=t.replaceAll(/\D+/g,""),s={day:a.slice(n.indexOf("d"),n.lastIndexOf("d")+1),month:a.slice(n.indexOf("m"),n.lastIndexOf("m")+1),year:a.slice(n.indexOf("y"),n.lastIndexOf("y")+1)};return Object.fromEntries(Object.entries(s).filter(([r,i])=>!!i).sort(([r],[i])=>e.toLowerCase().indexOf(r[0])>e.toLowerCase().indexOf(i[0])?1:-1))}function be(t,e){var n,a,s,r,i,l,o;const c=((n=t.year)===null||n===void 0?void 0:n.length)===2?`20${t.year}`:t.year,u=new Date(Number(c??"0"),Number((a=t.month)!==null&&a!==void 0?a:"1")-1,Number((s=t.day)!==null&&s!==void 0?s:"1"),Number((r=void 0)!==null&&r!==void 0?r:"0"),Number((i=void 0)!==null&&i!==void 0?i:"0"),Number((l=void 0)!==null&&l!==void 0?l:"0"),Number((o=void 0)!==null&&o!==void 0?o:"0"));return u.setFullYear(Number(c??"0")),u}const z=", ";function E({day:t,month:e,year:n,hours:a,minutes:s,seconds:r,milliseconds:i},{dateMode:l,dateTimeSeparator:o=z,timeMode:c}){var u;const d=((u=l.match(/y/g))===null||u===void 0?void 0:u.length)===2?n==null?void 0:n.slice(-2):n;return(l+(c?o+c:"")).replaceAll(/d+/g,t??"").replaceAll(/m+/g,e??"").replaceAll(/y+/g,d??"").replaceAll(/H+/g,a??"").replaceAll("MSS",i??"").replaceAll(/M+/g,s??"").replaceAll(/S+/g,r??"").replaceAll(/^\D+/g,"").replaceAll(/\D+$/g,"")}const K={day:31,month:12,year:9999},Ee=new Date("0001-01-01"),xe=new Date("9999-12-31"),Te=[":","."];function Ae({dateString:t,dateModeTemplate:e,dateSegmentsSeparator:n,offset:a,selection:[s,r]}){const i=C(t,e),l=Object.entries(i),o={};for(const[d,h]of l){const p=E(o,{dateMode:e}),S=K[d],f=p.length&&n.length,v=a+p.length+f+V(e)[d],y=v>=s&&v===r;if(y&&Number(h)>Number(S))return{validatedDateString:"",updatedSelection:[s,r]};if(y&&Number(h)<1)return{validatedDateString:"",updatedSelection:[s,r]};o[d]=h}const c=E(o,{dateMode:e}),u=c.length-t.length;return{validatedDateString:c,updatedSelection:[s+u,r+u]}}const Z=/[\\^$.*+?()[\]{}|]/g,ke=new RegExp(Z.source);function P(t){return t&&ke.test(t)?t.replaceAll(Z,"\\$&"):t}function L(t,e,n=0){return Number(t.padEnd(e.length,"0"))<=Number(e)?{validatedSegmentValue:t,prefixedZeroesCount:n}:t.endsWith("0")?L(`0${t.slice(0,e.length-1)}`,e,n+1):L(`${t.slice(0,e.length-1)}0`,e,n)}function F(t){return t.replaceAll(/[0-9]/g,e=>String.fromCharCode(e.charCodeAt(0)-65248))}function Ie({dateModeTemplate:t,dateSegmentSeparator:e,splitFn:n,uniteFn:a}){return({value:s,selection:r})=>{var i;const[l,o]=r,{dateStrings:c,restPart:u=""}=n(s),d=[];let h=0;c.forEach(S=>{const f=C(S,t),v=Object.entries(f).reduce((y,[x,_])=>{const{validatedSegmentValue:U,prefixedZeroesCount:X}=L(_,`${K[x]}`);return h+=X,Object.assign(Object.assign({},y),{[x]:U})},{});d.push(E(v,{dateMode:t}))});const p=a(d,s)+(!((i=c[c.length-1])===null||i===void 0)&&i.endsWith(e)?e:"")+u;return h&&p.slice(o+h,o+h+e.length)===e&&(h+=e.length),{selection:[l+h,o+h],value:p}}}function Me(){return({elementState:t,data:e})=>{const{value:n,selection:a}=t;return{elementState:{selection:a,value:F(n)},data:F(e)}}}function De(t,e){const n=V(e);return Object.fromEntries(Object.entries(t).map(([a,s])=>{const r=n[a];return[a,s.length===r&&s.match(/^0+$/)?"1".padStart(r,"0"):s]}))}function Le({dateModeTemplate:t,min:e=Ee,max:n=xe,rangeSeparator:a="",dateSegmentSeparator:s="."}){return({value:r,selection:i})=>{const l=a&&r.endsWith(a),o=W(r,t,a);let c="";for(const u of o){c+=c?a:"";const d=C(u,t);if(!we(u,t)){const S=De(d,t),f=E(S,{dateMode:t}),v=u.endsWith(s)?s:"";c+=f+v;continue}const h=be(d),p=fe(h,e,n);c+=E(Se(p),{dateMode:t})}return{selection:i,value:c+(l?a:"")}}}function $e({dateModeTemplate:t,dateSegmentsSeparator:e,rangeSeparator:n="",dateTimeSeparator:a=z}){return({elementState:s,data:r})=>{const i=n?new RegExp(`${n}|-`):a,l=r.split(i),o=r.includes(a)?[l[0]]:l;if(o.every(c=>c.trim().split(/\D/).filter(Boolean).length===t.split(e).length)){const c=o.map(u=>Be(u,t,e)).join(n);return{elementState:s,data:`${c}${r.includes(a)&&a+l[1]||""}`}}return{elementState:s,data:r}}}function Be(t,e,n){const a=t.split(/\D/).filter(Boolean),s=e.split(n);return a.map((r,i)=>i===s.length-1?r:r.padStart(s[i].length,"0")).join(n)}function Ce({dateModeTemplate:t,dateSegmentsSeparator:e,rangeSeparator:n=""}){return({elementState:a,data:s})=>{const{value:r,selection:i}=a;if(s===e)return{elementState:a,data:i[0]===r.length?s:""};const l=s.replaceAll(new RegExp(`[^\\d${P(e)}${n}]`,"g"),"");if(!l)return{elementState:a,data:""};const[o,c]=i;let u=c+s.length;const d=r.slice(0,o)+l+r.slice(u),h=W(d,t,n);let p="";const S=!!n&&d.includes(n);for(const v of h){const{validatedDateString:y,updatedSelection:x}=Ae({dateString:v,dateModeTemplate:t,dateSegmentsSeparator:e,offset:p.length,selection:[o,u]});if(v&&!y)return{elementState:a,data:""};u=x[1],p+=S&&!p?y+n:y}const f=p.slice(o,u);return{elementState:{selection:i,value:p.slice(0,o)+f.split(e).map(v=>"0".repeat(v.length)).join(e)+p.slice(u)},data:f}}}function Oe(){return({elementState:t},e)=>{const{value:n,selection:a}=t;if(!n||Re(n,a))return{elementState:t};const[s,r]=a,i=n.slice(s,r).replaceAll(/\d/g,"0"),l=n.slice(0,s)+i+n.slice(r);return e==="validation"||e==="insert"&&s===r?{elementState:{selection:a,value:l}}:{elementState:{selection:e==="deleteBackward"||e==="insert"?[s,s]:[r,r],value:l}}}}function Re(t,[e,n]){return n===t.length}function je({mode:t,separator:e=".",max:n,min:a}){const s=t.split("/").join(e);return Object.assign(Object.assign({},B),{mask:Array.from(s).map(r=>e.includes(r)?r:/\d/),overwriteMode:"replace",preprocessors:[Me(),Oe(),$e({dateModeTemplate:s,dateSegmentsSeparator:e}),Ce({dateModeTemplate:s,dateSegmentsSeparator:e})],postprocessors:[Ie({dateModeTemplate:s,dateSegmentSeparator:e,splitFn:r=>({dateStrings:[r]}),uniteFn:([r])=>r}),Le({min:a,max:n,dateModeTemplate:s,dateSegmentSeparator:e})]})}new RegExp(`[${Te.map(P).join("")}]$`);const Fe=/^(?:\d{4}[ -]?){0,3}\d{0,4}$/,m={visa:{final:/^4(?:\d{3}[- ]?){3}\d{3,4}$/,start:/^4/,length:/^4\d{0,15}$/},mastercard:{final:/^5[1-5]\d{3}[- ]?\d{4}[- ]?\d{4}[- ]?\d{4}$/,start:/^5[1-5]/,length:/^5[1-5]\d{0,15}$/},amex:{final:/^3[47]\d{2}[- ]?\d{6}[- ]?\d{5}$/,start:/^3[47]/,length:/^3[47]\d{0,15}$/},discover:{final:/^(6011|65|64[4-9])\d{4}[- ]?\d{4}[- ]?\d{4}$/,start:/^(6011|65|64[4-9])/,length:/^(6011|65|64[4-9])\d{0,15}$/},diners:{final:/^(30[0-5]|36|38|39)\d{4}[- ]?\d{4}[- ]?\d{4}$/,start:/^(30[0-5]|36|38|39)/,length:/^(30[0-5]|36|38|39)\d{0,14}$/},jcb:{final:/^(2131|1800|35[0-9]{3})\d{4}[- ]?\d{4}[- ]?\d{4}$/,start:/^(2131|1800|35[0-9]{3})/,length:/^(2131|1800|35[0-9]{3})\d{0,15}$/}};var $,Y;class Ne{constructor(e){ee(this,$),this.options=e}mount(){return this.number=this.options.fields.card.number instanceof HTMLInputElement?this.options.fields.card.number:document.querySelector(this.options.fields.card.number),this.date=this.options.fields.card.date instanceof HTMLInputElement?this.options.fields.card.date:document.querySelector(this.options.fields.card.date),this.cvv=this.options.fields.card.cvv instanceof HTMLInputElement?this.options.fields.card.cvv:document.querySelector(this.options.fields.card.cvv),te(this,$,Y).call(this),this}check(){const e=m.visa.final.test(this.number.value)||m.mastercard.final.test(this.number.value)||m.amex.final.test(this.number.value)||m.discover.final.test(this.number.value)||m.diners.final.test(this.number.value)||m.jcb.final.test(this.number.value),n=new RegExp("^(0[1-9]|1[0-2])/(?:\\d{2})$").test(this.date.value),a=new RegExp("^\\d{3}$").test(this.cvv.value);return{valid:e&&n&&a,number:{valid:e,value:this.number.value},date:{valid:n,value:this.date.value},cvv:{valid:a,value:this.cvv.value}}}type(){return m.visa.start.test(this.number.value)?"visa":m.mastercard.start.test(this.number.value)?"mastercard":m.amex.start.test(this.number.value)?"amex":m.discover.start.test(this.number.value)?"discover":m.diners.start.test(this.number.value)?"diners":m.jcb.start.test(this.number.value)?"jcb":"unknown"}value(e){if(e==="number")return this.number.value;if(e==="date")return this.date.value;if(e==="year"){const[,n]=this.date.value.split("/");return n}if(e==="month"){const[n]=this.date.value.split("/");return n}return e==="cvv"?this.cvv.value:null}}$=new WeakSet,Y=function(){new M(this.number,{mask:t=>m.visa.start.test(t.value)?new RegExp(m.visa.length):m.mastercard.start.test(t.value)?new RegExp(m.mastercard.length):m.amex.start.test(t.value)?new RegExp(m.amex.length):m.discover.start.test(t.value)?new RegExp(m.discover.length):m.diners.start.test(t.value)?new RegExp(m.diners.length):m.jcb.start.test(t.value)?new RegExp(m.jcb.length):new RegExp(Fe)}),new M(this.date,je({mode:"mm/yy",separator:"/"})),new M(this.cvv,{mask:[/\d/,/\d/,/\d/]})};/** + * Invoice Ninja (https://invoiceninja.com). + * + * @link https://github.com/invoiceninja/invoiceninja source repository + * + * @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com) + * + * @license https://www.elastic.co/licensing/elastic-license + */function qe(...t){return new Promise(e=>{if(!t.length){e([]);return}const n=t.map(s=>document.querySelector(s)).filter(Boolean);if(n.length===t.length){e(n);return}const a=new MutationObserver(()=>{const s=t.map(r=>document.querySelector(r)).filter(Boolean);s.length===t.length&&(a.disconnect(),e(s))});a.observe(document.body,{childList:!0,subtree:!0})})}function He(){const t=document.querySelector('meta[name="instant-payment"]');return!!(t&&t instanceof HTMLMetaElement&&t.content==="yes")}/** + * Invoice Ninja (https://invoiceninja.com) + * + * @link https://github.com/invoiceninja/invoiceninja source repository + * + * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) + * + * @license https://www.elastic.co/licensing/elastic-license + */class Ve{constructor(e,n){T(this,"handleAuthorization",()=>{var r,i,l,o;if(this.cvvRequired=="1"&&document.getElementById("cvv").value.length<3){const c=document.getElementById("errors");c&&(c.innerText="CVV is required",c.style.display="block"),document.getElementById("pay-now").disabled=!1,document.querySelector("#pay-now > svg").classList.add("hidden"),document.querySelector("#pay-now > span").classList.remove("hidden");return}var e={};e.clientKey=this.publicKey,e.apiLoginID=this.loginId;var n={};n.cardNumber=(r=this.sc.value("number"))==null?void 0:r.replace(/[^\d]/g,""),n.month=(i=this.sc.value("month"))==null?void 0:i.replace(/[^\d]/g,""),n.year=`20${(l=this.sc.value("year"))==null?void 0:l.replace(/[^\d]/g,"")}`,n.cardCode=(o=this.sc.value("cvv"))==null?void 0:o.replace(/[^\d]/g,"");var a={};return a.authData=e,a.cardData=n,document.getElementById("pay-now")&&(document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden")),Accept.dispatchData(a,this.responseHandler),!1});T(this,"responseHandler",e=>{if(e.messages.resultCode==="Error"){var n=0;const a=document.getElementById("errors");a&&(a.innerText=`${e.messages.message[n].code}: ${e.messages.message[n].text}`,a.style.display="block"),document.getElementById("pay-now").disabled=!1,document.querySelector("#pay-now > svg").classList.add("hidden"),document.querySelector("#pay-now > span").classList.remove("hidden")}else if(e.messages.resultCode==="Ok"){document.getElementById("dataDescriptor").value=e.opaqueData.dataDescriptor,document.getElementById("dataValue").value=e.opaqueData.dataValue;let a=document.querySelector("input[name=token-billing-checkbox]:checked");a&&(document.getElementById("store_card").value=a.value),document.getElementById("server_response").submit()}return!1});T(this,"handle",()=>{Array.from(document.getElementsByClassName("toggle-payment-with-token")).forEach(a=>a.addEventListener("click",s=>{document.getElementById("save-card--container").style.display="none",document.getElementById("authorize--credit-card-container").style.display="none",document.getElementById("token").value=s.target.dataset.token}));let e=document.getElementById("toggle-payment-with-credit-card");e&&e.addEventListener("click",()=>{document.getElementById("save-card--container").style.display="grid",document.getElementById("authorize--credit-card-container").style.display="flex",document.getElementById("token").value=null});let n=document.getElementById("pay-now");return n&&n.addEventListener("click",a=>{let s=document.getElementById("token");s.value?this.handlePayNowAction(s.value):this.handleAuthorization()}),this});this.publicKey=e,this.loginId=n,this.cardHolderName=document.getElementById("cardholder_name"),this.sc=new Ne({fields:{card:{number:"#number",date:"#date",cvv:"#cvv"}}}),this.sc.mount(),this.cvvRequired=document.querySelector('meta[name="authnet-require-cvv"]').content}handlePayNowAction(e){document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden"),document.getElementById("token").value=e,document.getElementById("server_response").submit()}}function N(){const t=document.querySelector('meta[name="authorize-public-key"]').content,e=document.querySelector('meta[name="authorize-login-id"]').content;new Ve(t,e).handle()}He()?N():qe("#authorize-net-credit-card-payment").then(()=>N());export{Ne as $,He as i,qe as w}; diff --git a/public/build/assets/authorize-stripe-acss-6fe37711.js b/public/build/assets/authorize-stripe-acss-6fe37711.js new file mode 100644 index 0000000000..4660302efd --- /dev/null +++ b/public/build/assets/authorize-stripe-acss-6fe37711.js @@ -0,0 +1,9 @@ +import{w as y}from"./authorize-credit-card-payment-bd9c9d4d.js";/** + * Invoice Ninja (https://invoiceninja.com). + * + * @link https://github.com/invoiceninja/invoiceninja source repository + * + * @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com) + * + * @license https://www.elastic.co/licensing/elastic-license + */y("#stripe-acss-authorize").then(()=>f());function f(){var i,l,o;let n;const a=(i=document.querySelector('meta[name="stripe-account-id"]'))==null?void 0:i.content,r=(l=document.querySelector('meta[name="stripe-publishable-key"]'))==null?void 0:l.content;a&&a.length>0?n=Stripe(r,{stripeAccount:a}):n=Stripe(r);const c=document.getElementById("acss-name"),s=document.getElementById("acss-email-address"),t=document.getElementById("authorize-acss"),d=(o=document.querySelector('meta[name="stripe-pi-client-secret"]'))==null?void 0:o.content,e=document.getElementById("errors");t.addEventListener("click",async u=>{u.preventDefault(),e.hidden=!0,t.disabled=!0;const m=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;if(s.value.length<3||!s.value.match(m)){e.textContent="Please enter a valid email address.",e.hidden=!1,t.disabled=!1;return}if(c.value.length<3){e.textContent="Please enter a name for the account holder.",e.hidden=!1,t.disabled=!1;return}const{setupIntent:p,error:h}=await n.confirmAcssDebitSetup(d,{payment_method:{billing_details:{name:c.value,email:s.value}}});document.getElementById("gateway_response").value=JSON.stringify(p??h),document.getElementById("server_response").submit()})} diff --git a/public/build/assets/braintree-credit-card-1c3f3108.js b/public/build/assets/braintree-credit-card-1c3f3108.js deleted file mode 100644 index f9a4e88226..0000000000 --- a/public/build/assets/braintree-credit-card-1c3f3108.js +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Invoice Ninja (https://invoiceninja.com). - * - * @link https://github.com/invoiceninja/invoiceninja source repository - * - * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) - * - * @license https://www.elastic.co/licensing/elastic-license - */class i{initBraintreeDataCollector(){window.braintree.client.create({authorization:document.querySelector("meta[name=client-token]").content},function(e,n){window.braintree.dataCollector.create({client:n,paypal:!0},function(t,a){t||(document.querySelector("input[name=client-data]").value=a.deviceData)})})}mountBraintreePaymentWidget(){window.braintree.dropin.create({authorization:document.querySelector("meta[name=client-token]").content,container:"#dropin-container",threeDSecure:document.querySelector("input[name=threeds_enable]").value.toLowerCase()==="true"},this.handleCallback)}handleCallback(e,n){if(e){console.error(e);return}let t=document.getElementById("pay-now");params=JSON.parse(document.querySelector("input[name=threeds]").value),t.addEventListener("click",()=>{n.requestPaymentMethod({threeDSecure:{challengeRequested:!0,amount:params.amount,email:params.email,billingAddress:{givenName:params.billingAddress.givenName,surname:params.billingAddress.surname,phoneNumber:params.billingAddress.phoneNumber,streetAddress:params.billingAddress.streetAddress,extendedAddress:params.billingAddress.extendedAddress,locality:params.billingAddress.locality,region:params.billingAddress.region,postalCode:params.billingAddress.postalCode,countryCodeAlpha2:params.billingAddress.countryCodeAlpha2}}},function(a,r){if(a){console.log(a),dropin.clearSelectedPaymentMethod(),alert("There was a problem verifying this card, please contact your merchant");return}if(document.querySelector("input[name=threeds_enable]").value==="true"&&!r.liabilityShifted){console.log("Liability did not shift",r),alert("There was a problem verifying this card, please contact your merchant");return}t.disabled=!0,t.querySelector("svg").classList.remove("hidden"),t.querySelector("span").classList.add("hidden"),document.querySelector("input[name=gateway_response]").value=JSON.stringify(r);let d=document.querySelector('input[name="token-billing-checkbox"]:checked');d&&(document.querySelector('input[name="store_card"]').value=d.value),document.getElementById("server-response").submit()})})}handle(){this.initBraintreeDataCollector(),this.mountBraintreePaymentWidget(),Array.from(document.getElementsByClassName("toggle-payment-with-token")).forEach(n=>n.addEventListener("click",t=>{document.getElementById("dropin-container").classList.add("hidden"),document.getElementById("save-card--container").style.display="none",document.querySelector("input[name=token]").value=t.target.dataset.token,document.getElementById("pay-now-with-token").classList.remove("hidden"),document.getElementById("pay-now").classList.add("hidden")})),document.getElementById("toggle-payment-with-credit-card").addEventListener("click",n=>{document.getElementById("dropin-container").classList.remove("hidden"),document.getElementById("save-card--container").style.display="grid",document.querySelector("input[name=token]").value="",document.getElementById("pay-now-with-token").classList.add("hidden"),document.getElementById("pay-now").classList.remove("hidden")});let e=document.getElementById("pay-now-with-token");e.addEventListener("click",n=>{e.disabled=!0,e.querySelector("svg").classList.remove("hidden"),e.querySelector("span").classList.add("hidden"),document.getElementById("server-response").submit()})}}new i().handle(); diff --git a/public/build/assets/braintree-credit-card-c80deaab.js b/public/build/assets/braintree-credit-card-c80deaab.js new file mode 100644 index 0000000000..643db70693 --- /dev/null +++ b/public/build/assets/braintree-credit-card-c80deaab.js @@ -0,0 +1,9 @@ +import{i as l,w as s}from"./authorize-credit-card-payment-bd9c9d4d.js";/** + * Invoice Ninja (https://invoiceninja.com). + * + * @link https://github.com/invoiceninja/invoiceninja source repository + * + * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) + * + * @license https://www.elastic.co/licensing/elastic-license + */class c{initBraintreeDataCollector(){window.braintree.client.create({authorization:document.querySelector("meta[name=client-token]").content},function(t,r){window.braintree.dataCollector.create({client:r,paypal:!0},function(n,e){n||(document.querySelector("input[name=client-data]").value=e.deviceData)})})}mountBraintreePaymentWidget(){window.braintree.dropin.create({authorization:document.querySelector("meta[name=client-token]").content,container:"#dropin-container",threeDSecure:document.querySelector("input[name=threeds_enable]").value.toLowerCase()==="true"},this.handleCallback)}handleCallback(t,r){if(t){console.error(t);return}let n=document.getElementById("pay-now"),e=JSON.parse(document.querySelector("input[name=threeds]").value);n.addEventListener("click",()=>{r.requestPaymentMethod({threeDSecure:{challengeRequested:!0,amount:e.amount,email:e.email,billingAddress:{givenName:e.billingAddress.givenName,surname:e.billingAddress.surname,phoneNumber:e.billingAddress.phoneNumber,streetAddress:e.billingAddress.streetAddress,extendedAddress:e.billingAddress.extendedAddress,locality:e.billingAddress.locality,region:e.billingAddress.region,postalCode:e.billingAddress.postalCode,countryCodeAlpha2:e.billingAddress.countryCodeAlpha2}}},function(i,a){if(i){console.log(i),dropin.clearSelectedPaymentMethod(),alert("There was a problem verifying this card, please contact your merchant");return}if(document.querySelector("input[name=threeds_enable]").value==="true"&&!a.liabilityShifted){console.log("Liability did not shift",a),alert("There was a problem verifying this card, please contact your merchant");return}n.disabled=!0,n.querySelector("svg").classList.remove("hidden"),n.querySelector("span").classList.add("hidden"),document.querySelector("input[name=gateway_response]").value=JSON.stringify(a);let d=document.querySelector('input[name="token-billing-checkbox"]:checked');d&&(document.querySelector('input[name="store_card"]').value=d.value),document.getElementById("server-response").submit()})})}handle(){this.initBraintreeDataCollector(),this.mountBraintreePaymentWidget(),Array.from(document.getElementsByClassName("toggle-payment-with-token")).forEach(r=>r.addEventListener("click",n=>{document.getElementById("dropin-container").classList.add("hidden"),document.getElementById("save-card--container").style.display="none",document.querySelector("input[name=token]").value=n.target.dataset.token,document.getElementById("pay-now-with-token").classList.remove("hidden"),document.getElementById("pay-now").classList.add("hidden")})),document.getElementById("toggle-payment-with-credit-card").addEventListener("click",r=>{document.getElementById("dropin-container").classList.remove("hidden"),document.getElementById("save-card--container").style.display="grid",document.querySelector("input[name=token]").value="",document.getElementById("pay-now-with-token").classList.add("hidden"),document.getElementById("pay-now").classList.remove("hidden")});let t=document.getElementById("pay-now-with-token");t.addEventListener("click",r=>{t.disabled=!0,t.querySelector("svg").classList.remove("hidden"),t.querySelector("span").classList.add("hidden"),document.getElementById("server-response").submit()})}}function o(){new c().handle()}l()?o():s("#braintree-credit-card-payment","meta[name=client-token]").then(()=>o()); diff --git a/public/build/assets/braintree-paypal-45391805.js b/public/build/assets/braintree-paypal-cf71d092.js similarity index 88% rename from public/build/assets/braintree-paypal-45391805.js rename to public/build/assets/braintree-paypal-cf71d092.js index 662aab2a1b..454da181ea 100644 --- a/public/build/assets/braintree-paypal-45391805.js +++ b/public/build/assets/braintree-paypal-cf71d092.js @@ -1,4 +1,4 @@ -/** +import{i as l,w as s}from"./authorize-credit-card-payment-bd9c9d4d.js";/** * Invoice Ninja (https://invoiceninja.com). * * @link https://github.com/invoiceninja/invoiceninja source repository @@ -6,4 +6,4 @@ * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) * * @license https://www.elastic.co/licensing/elastic-license - */class a{initBraintreeDataCollector(){window.braintree.client.create({authorization:document.querySelector("meta[name=client-token]").content},function(e,t){window.braintree.dataCollector.create({client:t,paypal:!0},function(n,o){n||(document.querySelector("input[name=client-data]").value=o.deviceData)})})}static getPaymentDetails(){return{flow:"vault"}}static handleErrorMessage(e){let t=document.getElementById("errors");t.innerText=e,t.hidden=!1}handlePaymentWithToken(){Array.from(document.getElementsByClassName("toggle-payment-with-token")).forEach(t=>t.addEventListener("click",n=>{document.getElementById("paypal-button").classList.add("hidden"),document.getElementById("save-card--container").style.display="none",document.querySelector("input[name=token]").value=n.target.dataset.token,document.getElementById("pay-now-with-token").classList.remove("hidden"),document.getElementById("pay-now").classList.add("hidden")}));let e=document.getElementById("pay-now-with-token");e.addEventListener("click",t=>{e.disabled=!0,e.querySelector("svg").classList.remove("hidden"),e.querySelector("span").classList.add("hidden"),document.getElementById("server-response").submit()})}handle(){this.initBraintreeDataCollector(),this.handlePaymentWithToken(),braintree.client.create({authorization:document.querySelector("meta[name=client-token]").content}).then(function(e){return braintree.paypalCheckout.create({client:e})}).then(function(e){return e.loadPayPalSDK({vault:!0}).then(function(t){return paypal.Buttons({fundingSource:paypal.FUNDING.PAYPAL,createBillingAgreement:function(){return t.createPayment(a.getPaymentDetails())},onApprove:function(n,o){return t.tokenizePayment(n).then(function(i){let r=document.querySelector('input[name="token-billing-checkbox"]:checked');r&&(document.querySelector('input[name="store_card"]').value=r.value),document.querySelector("input[name=gateway_response]").value=JSON.stringify(i),document.getElementById("server-response").submit()})},onCancel:function(n){},onError:function(n){console.log(n.message),a.handleErrorMessage(n.message)}}).render("#paypal-button")})}).catch(function(e){console.log(e.message),a.handleErrorMessage(e.message)})}}new a().handle(); + */class a{initBraintreeDataCollector(){window.braintree.client.create({authorization:document.querySelector("meta[name=client-token]").content},function(e,t){window.braintree.dataCollector.create({client:t,paypal:!0},function(n,o){n||(document.querySelector("input[name=client-data]").value=o.deviceData)})})}static getPaymentDetails(){return{flow:"vault"}}static handleErrorMessage(e){let t=document.getElementById("errors");t.innerText=e,t.hidden=!1}handlePaymentWithToken(){Array.from(document.getElementsByClassName("toggle-payment-with-token")).forEach(t=>t.addEventListener("click",n=>{document.getElementById("paypal-button").classList.add("hidden"),document.getElementById("save-card--container").style.display="none",document.querySelector("input[name=token]").value=n.target.dataset.token,document.getElementById("pay-now-with-token").classList.remove("hidden"),document.getElementById("pay-now").classList.add("hidden")}));let e=document.getElementById("pay-now-with-token");e.addEventListener("click",t=>{e.disabled=!0,e.querySelector("svg").classList.remove("hidden"),e.querySelector("span").classList.add("hidden"),document.getElementById("server-response").submit()})}handle(){this.initBraintreeDataCollector(),this.handlePaymentWithToken(),braintree.client.create({authorization:document.querySelector("meta[name=client-token]").content}).then(function(e){return braintree.paypalCheckout.create({client:e})}).then(function(e){return e.loadPayPalSDK({vault:!0}).then(function(t){return paypal.Buttons({fundingSource:paypal.FUNDING.PAYPAL,createBillingAgreement:function(){return t.createPayment(a.getPaymentDetails())},onApprove:function(n,o){return t.tokenizePayment(n).then(function(c){let r=document.querySelector('input[name="token-billing-checkbox"]:checked');r&&(document.querySelector('input[name="store_card"]').value=r.value),document.querySelector("input[name=gateway_response]").value=JSON.stringify(c),document.getElementById("server-response").submit()})},onCancel:function(n){},onError:function(n){console.log(n.message),a.handleErrorMessage(n.message)}}).render("#paypal-button")})}).catch(function(e){console.log(e.message),a.handleErrorMessage(e.message)})}}function i(){new a().handle()}l()?i():s("#braintree-paypal-payment").then(()=>i()); diff --git a/public/build/assets/checkout-credit-card-5435b293.js b/public/build/assets/checkout-credit-card-5435b293.js new file mode 100644 index 0000000000..48f52f88f2 --- /dev/null +++ b/public/build/assets/checkout-credit-card-5435b293.js @@ -0,0 +1,9 @@ +import{w as o}from"./authorize-credit-card-payment-bd9c9d4d.js";/** + * Invoice Ninja (https://invoiceninja.com) + * + * @link https://github.com/invoiceninja/invoiceninja source repository + * + * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) + * + * @license https://www.elastic.co/licensing/elastic-license + */class s{constructor(){this.tokens=[]}handlePaymentUsingToken(t){document.getElementById("checkout--container").classList.add("hidden"),document.getElementById("pay-now-with-token--container").classList.remove("hidden"),document.getElementById("save-card--container").style.display="none",document.querySelector("input[name=token]").value=t.target.dataset.token}handlePaymentUsingCreditCard(t){document.getElementById("checkout--container").classList.remove("hidden"),document.getElementById("pay-now-with-token--container").classList.add("hidden"),document.getElementById("save-card--container").style.display="grid",document.querySelector("input[name=token]").value="";const e=document.getElementById("pay-button"),d=document.querySelector('meta[name="public-key"]').content??"",a=document.getElementById("payment-form");Frames.init(d),Frames.addEventHandler(Frames.Events.CARD_VALIDATION_CHANGED,function(n){e.disabled=!Frames.isCardValid()}),Frames.addEventHandler(Frames.Events.CARD_TOKENIZATION_FAILED,function(n){e.disabled=!1}),Frames.addEventHandler(Frames.Events.CARD_TOKENIZED,function(n){e.disabled=!0,document.querySelector('input[name="gateway_response"]').value=JSON.stringify(n),document.querySelector('input[name="store_card"]').value=document.querySelector("input[name=token-billing-checkbox]:checked").value,document.getElementById("server-response").submit()}),a.addEventListener("submit",function(n){n.preventDefault(),e.disabled=!0,Frames.submitCard()})}completePaymentUsingToken(t){let e=document.getElementById("pay-now-with-token");e.disabled=!0,e.querySelector("svg").classList.remove("hidden"),e.querySelector("span").classList.add("hidden"),document.getElementById("server-response").submit()}handle(){this.handlePaymentUsingCreditCard(),Array.from(document.getElementsByClassName("toggle-payment-with-token")).forEach(t=>t.addEventListener("click",this.handlePaymentUsingToken)),document.getElementById("toggle-payment-with-credit-card").addEventListener("click",this.handlePaymentUsingCreditCard),document.getElementById("pay-now-with-token").addEventListener("click",this.completePaymentUsingToken)}}o("#checkout-credit-card-payment").then(()=>new s().handle()); diff --git a/public/build/assets/checkout-credit-card-8a04938c.js b/public/build/assets/checkout-credit-card-8a04938c.js deleted file mode 100644 index 0125ca29be..0000000000 --- a/public/build/assets/checkout-credit-card-8a04938c.js +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Invoice Ninja (https://invoiceninja.com) - * - * @link https://github.com/invoiceninja/invoiceninja source repository - * - * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) - * - * @license https://www.elastic.co/licensing/elastic-license - */class o{constructor(){this.tokens=[]}mountFrames(){console.log("Mount checkout frames..")}handlePaymentUsingToken(t){document.getElementById("checkout--container").classList.add("hidden"),document.getElementById("pay-now-with-token--container").classList.remove("hidden"),document.getElementById("save-card--container").style.display="none",document.querySelector("input[name=token]").value=t.target.dataset.token}handlePaymentUsingCreditCard(t){document.getElementById("checkout--container").classList.remove("hidden"),document.getElementById("pay-now-with-token--container").classList.add("hidden"),document.getElementById("save-card--container").style.display="grid",document.querySelector("input[name=token]").value="";const e=document.getElementById("pay-button"),d=document.querySelector('meta[name="public-key"]').content??"",a=document.getElementById("payment-form");Frames.init(d),Frames.addEventHandler(Frames.Events.CARD_VALIDATION_CHANGED,function(n){e.disabled=!Frames.isCardValid()}),Frames.addEventHandler(Frames.Events.CARD_TOKENIZATION_FAILED,function(n){e.disabled=!1}),Frames.addEventHandler(Frames.Events.CARD_TOKENIZED,function(n){e.disabled=!0,document.querySelector('input[name="gateway_response"]').value=JSON.stringify(n),document.querySelector('input[name="store_card"]').value=document.querySelector("input[name=token-billing-checkbox]:checked").value,document.getElementById("server-response").submit()}),a.addEventListener("submit",function(n){n.preventDefault(),e.disabled=!0,Frames.submitCard()})}completePaymentUsingToken(t){let e=document.getElementById("pay-now-with-token");e.disabled=!0,e.querySelector("svg").classList.remove("hidden"),e.querySelector("span").classList.add("hidden"),document.getElementById("server-response").submit()}handle(){this.handlePaymentUsingCreditCard(),Array.from(document.getElementsByClassName("toggle-payment-with-token")).forEach(t=>t.addEventListener("click",this.handlePaymentUsingToken)),document.getElementById("toggle-payment-with-credit-card").addEventListener("click",this.handlePaymentUsingCreditCard),document.getElementById("pay-now-with-token").addEventListener("click",this.completePaymentUsingToken)}}new o().handle(); diff --git a/public/build/assets/eway-credit-card-62ce5f3b.js b/public/build/assets/eway-credit-card-319ea034.js similarity index 98% rename from public/build/assets/eway-credit-card-62ce5f3b.js rename to public/build/assets/eway-credit-card-319ea034.js index 3c3ceed101..89145a43e5 100644 --- a/public/build/assets/eway-credit-card-62ce5f3b.js +++ b/public/build/assets/eway-credit-card-319ea034.js @@ -1,4 +1,4 @@ -/** +import{i as d,w as n}from"./authorize-credit-card-payment-bd9c9d4d.js";/** * Invoice Ninja (https://invoiceninja.com). * * @link https://github.com/invoiceninja/invoiceninja source repository @@ -6,4 +6,4 @@ * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) * * @license https://www.elastic.co/licensing/elastic-license - */class i{constructor(){this.cardStyles="padding: 2px; border: 1px solid #AAA; border-radius: 3px; height: 34px; width: 100%;",this.errorCodes=new Map,this.errorCodes.set("V6000","Validation error"),this.errorCodes.set("V6001","Invalid CustomerIP"),this.errorCodes.set("V6002","Invalid DeviceID"),this.errorCodes.set("V6003","Invalid Request PartnerID"),this.errorCodes.set("V6004","Invalid Request Method"),this.errorCodes.set("V6010","Invalid TransactionType, account not certified for eCome only MOTO or Recurring available"),this.errorCodes.set("V6011","Invalid Payment TotalAmount"),this.errorCodes.set("V6012","Invalid Payment InvoiceDescription"),this.errorCodes.set("V6013","Invalid Payment InvoiceNumber"),this.errorCodes.set("V6014","Invalid Payment InvoiceReference"),this.errorCodes.set("V6015","Invalid Payment CurrencyCode"),this.errorCodes.set("V6016","Payment Required"),this.errorCodes.set("V6017","Payment CurrencyCode Required"),this.errorCodes.set("V6018","Unknown Payment CurrencyCode"),this.errorCodes.set("V6019","Cardholder identity authentication required"),this.errorCodes.set("V6020","Cardholder Input Required"),this.errorCodes.set("V6021","EWAY_CARDHOLDERNAME Required"),this.errorCodes.set("V6022","EWAY_CARDNUMBER Required"),this.errorCodes.set("V6023","EWAY_CARDCVN Required"),this.errorCodes.set("V6024","Cardholder Identity Authentication One Time Password Not Active Yet"),this.errorCodes.set("V6025","PIN Required"),this.errorCodes.set("V6033","Invalid Expiry Date"),this.errorCodes.set("V6034","Invalid Issue Number"),this.errorCodes.set("V6035","Invalid Valid From Date"),this.errorCodes.set("V6039","Invalid Network Token Status"),this.errorCodes.set("V6040","Invalid TokenCustomerID"),this.errorCodes.set("V6041","Customer Required"),this.errorCodes.set("V6042","Customer FirstName Required"),this.errorCodes.set("V6043","Customer LastName Required"),this.errorCodes.set("V6044","Customer CountryCode Required"),this.errorCodes.set("V6045","Customer Title Required"),this.errorCodes.set("V6046","TokenCustomerID Required"),this.errorCodes.set("V6047","RedirectURL Required"),this.errorCodes.set("V6048","CheckoutURL Required when CheckoutPayment specified"),this.errorCodes.set("V6049","nvalid Checkout URL"),this.errorCodes.set("V6051","Invalid Customer FirstName"),this.errorCodes.set("V6052","Invalid Customer LastName"),this.errorCodes.set("V6053","Invalid Customer CountryCode"),this.errorCodes.set("V6058","Invalid Customer Title"),this.errorCodes.set("V6059","Invalid RedirectURL"),this.errorCodes.set("V6060","Invalid TokenCustomerID"),this.errorCodes.set("V6061","Invalid Customer Reference"),this.errorCodes.set("V6062","Invalid Customer CompanyName"),this.errorCodes.set("V6063","Invalid Customer JobDescription"),this.errorCodes.set("V6064","Invalid Customer Street1"),this.errorCodes.set("V6065","Invalid Customer Street2"),this.errorCodes.set("V6066","Invalid Customer City"),this.errorCodes.set("V6067","Invalid Customer State"),this.errorCodes.set("V6068","Invalid Customer PostalCode"),this.errorCodes.set("V6069","Invalid Customer Email"),this.errorCodes.set("V6070","Invalid Customer Phone"),this.errorCodes.set("V6071","Invalid Customer Mobile"),this.errorCodes.set("V6072","Invalid Customer Comments"),this.errorCodes.set("V6073","Invalid Customer Fax"),this.errorCodes.set("V6074","Invalid Customer URL"),this.errorCodes.set("V6075","Invalid ShippingAddress FirstName"),this.errorCodes.set("V6076","Invalid ShippingAddress LastName"),this.errorCodes.set("V6077","Invalid ShippingAddress Street1"),this.errorCodes.set("V6078","Invalid ShippingAddress Street2"),this.errorCodes.set("V6079","Invalid ShippingAddress City"),this.errorCodes.set("V6080","Invalid ShippingAddress State"),this.errorCodes.set("V6081","Invalid ShippingAddress PostalCode"),this.errorCodes.set("V6082","Invalid ShippingAddress Email"),this.errorCodes.set("V6083","Invalid ShippingAddress Phone"),this.errorCodes.set("V6084","Invalid ShippingAddress Country"),this.errorCodes.set("V6085","Invalid ShippingAddress ShippingMethod"),this.errorCodes.set("V6086","Invalid ShippingAddress Fax"),this.errorCodes.set("V6091","Unknown Customer CountryCode"),this.errorCodes.set("V6092","Unknown ShippingAddress CountryCode"),this.errorCodes.set("V6093","Insufficient Address Information"),this.errorCodes.set("V6100","Invalid EWAY_CARDNAME"),this.errorCodes.set("V6101","Invalid EWAY_CARDEXPIRYMONTH"),this.errorCodes.set("V6102","Invalid EWAY_CARDEXPIRYYEAR"),this.errorCodes.set("V6103","Invalid EWAY_CARDSTARTMONTH"),this.errorCodes.set("V6104","Invalid EWAY_CARDSTARTYEAR"),this.errorCodes.set("V6105","Invalid EWAY_CARDISSUENUMBER"),this.errorCodes.set("V6106","Invalid EWAY_CARDCVN"),this.errorCodes.set("V6107","Invalid EWAY_ACCESSCODE"),this.errorCodes.set("V6108","Invalid CustomerHostAddress"),this.errorCodes.set("V6109","Invalid UserAgent"),this.errorCodes.set("V6110","Invalid EWAY_CARDNUMBER"),this.errorCodes.set("V6111","Unauthorised API Access, Account Not PCI Certified"),this.errorCodes.set("V6112","Redundant card details other than expiry year and month"),this.errorCodes.set("V6113","Invalid transaction for refund"),this.errorCodes.set("V6114","Gateway validation error"),this.errorCodes.set("V6115","Invalid DirectRefundRequest, Transaction ID"),this.errorCodes.set("V6116","Invalid card data on original TransactionID"),this.errorCodes.set("V6117","Invalid CreateAccessCodeSharedRequest, FooterText"),this.errorCodes.set("V6118","Invalid CreateAccessCodeSharedRequest, HeaderText"),this.errorCodes.set("V6119","Invalid CreateAccessCodeSharedRequest, Language"),this.errorCodes.set("V6120","Invalid CreateAccessCodeSharedRequest, LogoUrl"),this.errorCodes.set("V6121","Invalid TransactionSearch, Filter Match Type"),this.errorCodes.set("V6122","Invalid TransactionSearch, Non numeric Transaction ID"),this.errorCodes.set("V6123","Invalid TransactionSearch,no TransactionID or AccessCode specified"),this.errorCodes.set("V6124","Invalid Line Items. The line items have been provided however the totals do not match the TotalAmount field"),this.errorCodes.set("V6125","Selected Payment Type not enabled"),this.errorCodes.set("V6126","Invalid encrypted card number, decryption failed"),this.errorCodes.set("V6127","Invalid encrypted cvn, decryption failed"),this.errorCodes.set("V6128","Invalid Method for Payment Type"),this.errorCodes.set("V6129","Transaction has not been authorised for Capture/Cancellation"),this.errorCodes.set("V6130","Generic customer information error"),this.errorCodes.set("V6131","Generic shipping information error"),this.errorCodes.set("V6132","Transaction has already been completed or voided, operation not permitted"),this.errorCodes.set("V6133","Checkout not available for Payment Type"),this.errorCodes.set("V6134","Invalid Auth Transaction ID for Capture/Void"),this.errorCodes.set("V6135","PayPal Error Processing Refund"),this.errorCodes.set("V6136","Original transaction does not exist or state is incorrect"),this.errorCodes.set("V6140","Merchant account is suspended"),this.errorCodes.set("V6141","Invalid PayPal account details or API signature"),this.errorCodes.set("V6142","Authorise not available for Bank/Branch"),this.errorCodes.set("V6143","Invalid Public Key"),this.errorCodes.set("V6144","Method not available with Public API Key Authentication"),this.errorCodes.set("V6145","Credit Card not allow if Token Customer ID is provided with Public API Key Authentication"),this.errorCodes.set("V6146","Client Side Encryption Key Missing or Invalid"),this.errorCodes.set("V6147","Unable to Create One Time Code for Secure Field"),this.errorCodes.set("V6148","Secure Field has Expired"),this.errorCodes.set("V6149","Invalid Secure Field One Time Code"),this.errorCodes.set("V6150","Invalid Refund Amount"),this.errorCodes.set("V6151","Refund amount greater than original transaction"),this.errorCodes.set("V6152","Original transaction already refunded for total amount"),this.errorCodes.set("V6153","Card type not support by merchant"),this.errorCodes.set("V6154","Insufficent Funds Available For Refund"),this.errorCodes.set("V6155","Missing one or more fields in request"),this.errorCodes.set("V6160","Encryption Method Not Supported"),this.errorCodes.set("V6161","Encryption failed, missing or invalid key"),this.errorCodes.set("V6165","Invalid Click-to-Pay (Visa Checkout) data or decryption failed"),this.errorCodes.set("V6170","Invalid TransactionSearch, Invoice Number is not unique"),this.errorCodes.set("V6171","Invalid TransactionSearch, Invoice Number not found"),this.errorCodes.set("V6220","Three domain secure XID invalid"),this.errorCodes.set("V6221","Three domain secure ECI invalid"),this.errorCodes.set("V6222","Three domain secure AVV invalid"),this.errorCodes.set("V6223","Three domain secure XID is required"),this.errorCodes.set("V6224","Three Domain Secure ECI is required"),this.errorCodes.set("V6225","Three Domain Secure AVV is required"),this.errorCodes.set("V6226","Three Domain Secure AuthStatus is required"),this.errorCodes.set("V6227","Three Domain Secure AuthStatus invalid"),this.errorCodes.set("V6228","Three domain secure Version is required"),this.errorCodes.set("V6230","Three domain secure Directory Server Txn ID invalid"),this.errorCodes.set("V6231","Three domain secure Directory Server Txn ID is required"),this.errorCodes.set("V6232","Three domain secure Version is invalid"),this.errorCodes.set("V6501","Invalid Amex InstallementPlan"),this.errorCodes.set("V6502","Invalid Number Of Installements for Amex. Valid values are from 0 to 99 inclusive"),this.errorCodes.set("V6503","Merchant Amex ID required"),this.errorCodes.set("V6504","Invalid Merchant Amex ID"),this.errorCodes.set("V6505","Merchant Terminal ID required"),this.errorCodes.set("V6506","Merchant category code required"),this.errorCodes.set("V6507","Invalid merchant category code"),this.errorCodes.set("V6508","Amex 3D ECI required"),this.errorCodes.set("V6509","Invalid Amex 3D ECI"),this.errorCodes.set("V6510","Invalid Amex 3D verification value"),this.errorCodes.set("V6511","Invalid merchant location data"),this.errorCodes.set("V6512","Invalid merchant street address"),this.errorCodes.set("V6513","Invalid merchant city"),this.errorCodes.set("V6514","Invalid merchant country"),this.errorCodes.set("V6515","Invalid merchant phone"),this.errorCodes.set("V6516","Invalid merchant postcode"),this.errorCodes.set("V6517","Amex connection error"),this.errorCodes.set("V6518","Amex EC Card Details API returned invalid data"),this.errorCodes.set("V6520","Invalid or missing Amex Point Of Sale Data"),this.errorCodes.set("V6521","Invalid or missing Amex transaction date time"),this.errorCodes.set("V6522","Invalid or missing Amex Original transaction date time"),this.errorCodes.set("V6530","Credit Card Number in non Credit Card Field")}get groupFieldConfig(){var e,t,r,s,o;return{publicApiKey:(e=document.querySelector("meta[name=public-api-key]"))==null?void 0:e.content,fieldDivId:"eway-secure-panel",fieldType:"group",styles:"",layout:{fonts:["Lobster"],rows:[{styles:"",cells:[{colSpan:12,styles:"margin-top: 15px;",label:{fieldColSpan:4,text:(t=document.querySelector("meta[name=translation-card-name]"))==null?void 0:t.content,styles:""},field:{fieldColSpan:8,fieldType:"name",styles:this.cardStyles,divStyles:"padding-left: 10px;"}},{colSpan:12,styles:"margin-top: 15px;",label:{fieldColSpan:4,text:(r=document.querySelector("meta[name=translation-expiry_date]"))==null?void 0:r.content,styles:""},field:{fieldColSpan:8,fieldType:"expirytext",styles:this.cardStyles,divStyles:"padding-left: 10px;"}}]},{styles:"",cells:[{colSpan:12,styles:"margin-top: 15px;",label:{fieldColSpan:4,text:(s=document.querySelector("meta[name=translation-card_number]"))==null?void 0:s.content,styles:""},field:{fieldColSpan:8,fieldType:"card",styles:this.cardStyles}},{colSpan:12,styles:"margin-top: 15px;",label:{fieldColSpan:4,text:(o=document.querySelector("meta[name=translation-cvv]"))==null?void 0:o.content,styles:""},field:{fieldColSpan:8,fieldType:"cvn",styles:this.cardStyles}}]}]}}}securePanelCallback(e){if(document.getElementById("errors").hidden=!0,e.errors)return this.handleErrors(e.errors);document.getElementById("authorize-card")&&(document.getElementById("authorize-card").disabled=!1),document.getElementById("pay-now")&&(document.getElementById("pay-now").disabled=!1),document.querySelector("input[name=securefieldcode]").value=e.secureFieldCode}handleErrors(e){let t=e.split(" "),r="";t.forEach(s=>{r=r.concat(this.errorCodes.get(s)+"
")}),document.getElementById("errors").innerHTML=r,document.getElementById("errors").hidden=!1}completeAuthorization(e){e.target.parentElement.disabled=!0,document.getElementById("server-response").submit()}completePaymentUsingToken(e){e.target.parentElement.disabled=!0,document.getElementById("server-response").submit()}completePaymentWithoutToken(e){e.target.parentElement.disabled=!0;let t=document.querySelector('input[name="token-billing-checkbox"]:checked');t&&(document.querySelector('input[name="store_card"]').value=t.value),document.getElementById("server-response").submit()}initialize(){this.eWAY=eWAY.setupSecureField(this.groupFieldConfig,e=>this.securePanelCallback(e))}handle(){var e,t;this.initialize(),(e=document.getElementById("authorize-card"))==null||e.addEventListener("click",r=>this.completeAuthorization(r)),Array.from(document.getElementsByClassName("toggle-payment-with-token")??[]).forEach(r=>r.addEventListener("click",s=>{document.getElementById("eway-secure-panel").classList.add("hidden"),document.getElementById("save-card--container").style.display="none",document.querySelector("input[name=token]").value=s.target.dataset.token,document.getElementById("pay-now").disabled=!1})),document.getElementById("toggle-payment-with-credit-card")&&document.getElementById("toggle-payment-with-credit-card").addEventListener("click",r=>{document.getElementById("eway-secure-panel").classList.remove("hidden"),document.getElementById("save-card--container").style.display="grid",document.querySelector("input[name=token]").value="",document.getElementById("pay-now").disabled=!0}),(t=document.getElementById("pay-now"))==null||t.addEventListener("click",r=>document.querySelector("input[name=token]").value?this.completePaymentUsingToken(r):this.completePaymentWithoutToken(r))}}new i().handle(); + */class a{constructor(){this.cardStyles="padding: 2px; border: 1px solid #AAA; border-radius: 3px; height: 34px; width: 100%;",this.errorCodes=new Map,this.errorCodes.set("V6000","Validation error"),this.errorCodes.set("V6001","Invalid CustomerIP"),this.errorCodes.set("V6002","Invalid DeviceID"),this.errorCodes.set("V6003","Invalid Request PartnerID"),this.errorCodes.set("V6004","Invalid Request Method"),this.errorCodes.set("V6010","Invalid TransactionType, account not certified for eCome only MOTO or Recurring available"),this.errorCodes.set("V6011","Invalid Payment TotalAmount"),this.errorCodes.set("V6012","Invalid Payment InvoiceDescription"),this.errorCodes.set("V6013","Invalid Payment InvoiceNumber"),this.errorCodes.set("V6014","Invalid Payment InvoiceReference"),this.errorCodes.set("V6015","Invalid Payment CurrencyCode"),this.errorCodes.set("V6016","Payment Required"),this.errorCodes.set("V6017","Payment CurrencyCode Required"),this.errorCodes.set("V6018","Unknown Payment CurrencyCode"),this.errorCodes.set("V6019","Cardholder identity authentication required"),this.errorCodes.set("V6020","Cardholder Input Required"),this.errorCodes.set("V6021","EWAY_CARDHOLDERNAME Required"),this.errorCodes.set("V6022","EWAY_CARDNUMBER Required"),this.errorCodes.set("V6023","EWAY_CARDCVN Required"),this.errorCodes.set("V6024","Cardholder Identity Authentication One Time Password Not Active Yet"),this.errorCodes.set("V6025","PIN Required"),this.errorCodes.set("V6033","Invalid Expiry Date"),this.errorCodes.set("V6034","Invalid Issue Number"),this.errorCodes.set("V6035","Invalid Valid From Date"),this.errorCodes.set("V6039","Invalid Network Token Status"),this.errorCodes.set("V6040","Invalid TokenCustomerID"),this.errorCodes.set("V6041","Customer Required"),this.errorCodes.set("V6042","Customer FirstName Required"),this.errorCodes.set("V6043","Customer LastName Required"),this.errorCodes.set("V6044","Customer CountryCode Required"),this.errorCodes.set("V6045","Customer Title Required"),this.errorCodes.set("V6046","TokenCustomerID Required"),this.errorCodes.set("V6047","RedirectURL Required"),this.errorCodes.set("V6048","CheckoutURL Required when CheckoutPayment specified"),this.errorCodes.set("V6049","nvalid Checkout URL"),this.errorCodes.set("V6051","Invalid Customer FirstName"),this.errorCodes.set("V6052","Invalid Customer LastName"),this.errorCodes.set("V6053","Invalid Customer CountryCode"),this.errorCodes.set("V6058","Invalid Customer Title"),this.errorCodes.set("V6059","Invalid RedirectURL"),this.errorCodes.set("V6060","Invalid TokenCustomerID"),this.errorCodes.set("V6061","Invalid Customer Reference"),this.errorCodes.set("V6062","Invalid Customer CompanyName"),this.errorCodes.set("V6063","Invalid Customer JobDescription"),this.errorCodes.set("V6064","Invalid Customer Street1"),this.errorCodes.set("V6065","Invalid Customer Street2"),this.errorCodes.set("V6066","Invalid Customer City"),this.errorCodes.set("V6067","Invalid Customer State"),this.errorCodes.set("V6068","Invalid Customer PostalCode"),this.errorCodes.set("V6069","Invalid Customer Email"),this.errorCodes.set("V6070","Invalid Customer Phone"),this.errorCodes.set("V6071","Invalid Customer Mobile"),this.errorCodes.set("V6072","Invalid Customer Comments"),this.errorCodes.set("V6073","Invalid Customer Fax"),this.errorCodes.set("V6074","Invalid Customer URL"),this.errorCodes.set("V6075","Invalid ShippingAddress FirstName"),this.errorCodes.set("V6076","Invalid ShippingAddress LastName"),this.errorCodes.set("V6077","Invalid ShippingAddress Street1"),this.errorCodes.set("V6078","Invalid ShippingAddress Street2"),this.errorCodes.set("V6079","Invalid ShippingAddress City"),this.errorCodes.set("V6080","Invalid ShippingAddress State"),this.errorCodes.set("V6081","Invalid ShippingAddress PostalCode"),this.errorCodes.set("V6082","Invalid ShippingAddress Email"),this.errorCodes.set("V6083","Invalid ShippingAddress Phone"),this.errorCodes.set("V6084","Invalid ShippingAddress Country"),this.errorCodes.set("V6085","Invalid ShippingAddress ShippingMethod"),this.errorCodes.set("V6086","Invalid ShippingAddress Fax"),this.errorCodes.set("V6091","Unknown Customer CountryCode"),this.errorCodes.set("V6092","Unknown ShippingAddress CountryCode"),this.errorCodes.set("V6093","Insufficient Address Information"),this.errorCodes.set("V6100","Invalid EWAY_CARDNAME"),this.errorCodes.set("V6101","Invalid EWAY_CARDEXPIRYMONTH"),this.errorCodes.set("V6102","Invalid EWAY_CARDEXPIRYYEAR"),this.errorCodes.set("V6103","Invalid EWAY_CARDSTARTMONTH"),this.errorCodes.set("V6104","Invalid EWAY_CARDSTARTYEAR"),this.errorCodes.set("V6105","Invalid EWAY_CARDISSUENUMBER"),this.errorCodes.set("V6106","Invalid EWAY_CARDCVN"),this.errorCodes.set("V6107","Invalid EWAY_ACCESSCODE"),this.errorCodes.set("V6108","Invalid CustomerHostAddress"),this.errorCodes.set("V6109","Invalid UserAgent"),this.errorCodes.set("V6110","Invalid EWAY_CARDNUMBER"),this.errorCodes.set("V6111","Unauthorised API Access, Account Not PCI Certified"),this.errorCodes.set("V6112","Redundant card details other than expiry year and month"),this.errorCodes.set("V6113","Invalid transaction for refund"),this.errorCodes.set("V6114","Gateway validation error"),this.errorCodes.set("V6115","Invalid DirectRefundRequest, Transaction ID"),this.errorCodes.set("V6116","Invalid card data on original TransactionID"),this.errorCodes.set("V6117","Invalid CreateAccessCodeSharedRequest, FooterText"),this.errorCodes.set("V6118","Invalid CreateAccessCodeSharedRequest, HeaderText"),this.errorCodes.set("V6119","Invalid CreateAccessCodeSharedRequest, Language"),this.errorCodes.set("V6120","Invalid CreateAccessCodeSharedRequest, LogoUrl"),this.errorCodes.set("V6121","Invalid TransactionSearch, Filter Match Type"),this.errorCodes.set("V6122","Invalid TransactionSearch, Non numeric Transaction ID"),this.errorCodes.set("V6123","Invalid TransactionSearch,no TransactionID or AccessCode specified"),this.errorCodes.set("V6124","Invalid Line Items. The line items have been provided however the totals do not match the TotalAmount field"),this.errorCodes.set("V6125","Selected Payment Type not enabled"),this.errorCodes.set("V6126","Invalid encrypted card number, decryption failed"),this.errorCodes.set("V6127","Invalid encrypted cvn, decryption failed"),this.errorCodes.set("V6128","Invalid Method for Payment Type"),this.errorCodes.set("V6129","Transaction has not been authorised for Capture/Cancellation"),this.errorCodes.set("V6130","Generic customer information error"),this.errorCodes.set("V6131","Generic shipping information error"),this.errorCodes.set("V6132","Transaction has already been completed or voided, operation not permitted"),this.errorCodes.set("V6133","Checkout not available for Payment Type"),this.errorCodes.set("V6134","Invalid Auth Transaction ID for Capture/Void"),this.errorCodes.set("V6135","PayPal Error Processing Refund"),this.errorCodes.set("V6136","Original transaction does not exist or state is incorrect"),this.errorCodes.set("V6140","Merchant account is suspended"),this.errorCodes.set("V6141","Invalid PayPal account details or API signature"),this.errorCodes.set("V6142","Authorise not available for Bank/Branch"),this.errorCodes.set("V6143","Invalid Public Key"),this.errorCodes.set("V6144","Method not available with Public API Key Authentication"),this.errorCodes.set("V6145","Credit Card not allow if Token Customer ID is provided with Public API Key Authentication"),this.errorCodes.set("V6146","Client Side Encryption Key Missing or Invalid"),this.errorCodes.set("V6147","Unable to Create One Time Code for Secure Field"),this.errorCodes.set("V6148","Secure Field has Expired"),this.errorCodes.set("V6149","Invalid Secure Field One Time Code"),this.errorCodes.set("V6150","Invalid Refund Amount"),this.errorCodes.set("V6151","Refund amount greater than original transaction"),this.errorCodes.set("V6152","Original transaction already refunded for total amount"),this.errorCodes.set("V6153","Card type not support by merchant"),this.errorCodes.set("V6154","Insufficent Funds Available For Refund"),this.errorCodes.set("V6155","Missing one or more fields in request"),this.errorCodes.set("V6160","Encryption Method Not Supported"),this.errorCodes.set("V6161","Encryption failed, missing or invalid key"),this.errorCodes.set("V6165","Invalid Click-to-Pay (Visa Checkout) data or decryption failed"),this.errorCodes.set("V6170","Invalid TransactionSearch, Invoice Number is not unique"),this.errorCodes.set("V6171","Invalid TransactionSearch, Invoice Number not found"),this.errorCodes.set("V6220","Three domain secure XID invalid"),this.errorCodes.set("V6221","Three domain secure ECI invalid"),this.errorCodes.set("V6222","Three domain secure AVV invalid"),this.errorCodes.set("V6223","Three domain secure XID is required"),this.errorCodes.set("V6224","Three Domain Secure ECI is required"),this.errorCodes.set("V6225","Three Domain Secure AVV is required"),this.errorCodes.set("V6226","Three Domain Secure AuthStatus is required"),this.errorCodes.set("V6227","Three Domain Secure AuthStatus invalid"),this.errorCodes.set("V6228","Three domain secure Version is required"),this.errorCodes.set("V6230","Three domain secure Directory Server Txn ID invalid"),this.errorCodes.set("V6231","Three domain secure Directory Server Txn ID is required"),this.errorCodes.set("V6232","Three domain secure Version is invalid"),this.errorCodes.set("V6501","Invalid Amex InstallementPlan"),this.errorCodes.set("V6502","Invalid Number Of Installements for Amex. Valid values are from 0 to 99 inclusive"),this.errorCodes.set("V6503","Merchant Amex ID required"),this.errorCodes.set("V6504","Invalid Merchant Amex ID"),this.errorCodes.set("V6505","Merchant Terminal ID required"),this.errorCodes.set("V6506","Merchant category code required"),this.errorCodes.set("V6507","Invalid merchant category code"),this.errorCodes.set("V6508","Amex 3D ECI required"),this.errorCodes.set("V6509","Invalid Amex 3D ECI"),this.errorCodes.set("V6510","Invalid Amex 3D verification value"),this.errorCodes.set("V6511","Invalid merchant location data"),this.errorCodes.set("V6512","Invalid merchant street address"),this.errorCodes.set("V6513","Invalid merchant city"),this.errorCodes.set("V6514","Invalid merchant country"),this.errorCodes.set("V6515","Invalid merchant phone"),this.errorCodes.set("V6516","Invalid merchant postcode"),this.errorCodes.set("V6517","Amex connection error"),this.errorCodes.set("V6518","Amex EC Card Details API returned invalid data"),this.errorCodes.set("V6520","Invalid or missing Amex Point Of Sale Data"),this.errorCodes.set("V6521","Invalid or missing Amex transaction date time"),this.errorCodes.set("V6522","Invalid or missing Amex Original transaction date time"),this.errorCodes.set("V6530","Credit Card Number in non Credit Card Field")}get groupFieldConfig(){var e,t,r,s,o;return{publicApiKey:(e=document.querySelector("meta[name=public-api-key]"))==null?void 0:e.content,fieldDivId:"eway-secure-panel",fieldType:"group",styles:"",layout:{fonts:["Lobster"],rows:[{styles:"",cells:[{colSpan:12,styles:"margin-top: 15px;",label:{fieldColSpan:4,text:(t=document.querySelector("meta[name=translation-card-name]"))==null?void 0:t.content,styles:""},field:{fieldColSpan:8,fieldType:"name",styles:this.cardStyles,divStyles:"padding-left: 10px;"}},{colSpan:12,styles:"margin-top: 15px;",label:{fieldColSpan:4,text:(r=document.querySelector("meta[name=translation-expiry_date]"))==null?void 0:r.content,styles:""},field:{fieldColSpan:8,fieldType:"expirytext",styles:this.cardStyles,divStyles:"padding-left: 10px;"}}]},{styles:"",cells:[{colSpan:12,styles:"margin-top: 15px;",label:{fieldColSpan:4,text:(s=document.querySelector("meta[name=translation-card_number]"))==null?void 0:s.content,styles:""},field:{fieldColSpan:8,fieldType:"card",styles:this.cardStyles}},{colSpan:12,styles:"margin-top: 15px;",label:{fieldColSpan:4,text:(o=document.querySelector("meta[name=translation-cvv]"))==null?void 0:o.content,styles:""},field:{fieldColSpan:8,fieldType:"cvn",styles:this.cardStyles}}]}]}}}securePanelCallback(e){if(document.getElementById("errors").hidden=!0,e.errors)return this.handleErrors(e.errors);document.getElementById("authorize-card")&&(document.getElementById("authorize-card").disabled=!1),document.getElementById("pay-now")&&(document.getElementById("pay-now").disabled=!1),document.querySelector("input[name=securefieldcode]").value=e.secureFieldCode}handleErrors(e){let t=e.split(" "),r="";t.forEach(s=>{r=r.concat(this.errorCodes.get(s)+"
")}),document.getElementById("errors").innerHTML=r,document.getElementById("errors").hidden=!1}completeAuthorization(e){e.target.parentElement.disabled=!0,document.getElementById("server-response").submit()}completePaymentUsingToken(e){e.target.parentElement.disabled=!0,document.getElementById("server-response").submit()}completePaymentWithoutToken(e){e.target.parentElement.disabled=!0;let t=document.querySelector('input[name="token-billing-checkbox"]:checked');t&&(document.querySelector('input[name="store_card"]').value=t.value),document.getElementById("server-response").submit()}initialize(){this.eWAY=eWAY.setupSecureField(this.groupFieldConfig,e=>this.securePanelCallback(e))}handle(){var e,t;this.initialize(),(e=document.getElementById("authorize-card"))==null||e.addEventListener("click",r=>this.completeAuthorization(r)),Array.from(document.getElementsByClassName("toggle-payment-with-token")??[]).forEach(r=>r.addEventListener("click",s=>{document.getElementById("eway-secure-panel").classList.add("hidden"),document.getElementById("save-card--container").style.display="none",document.querySelector("input[name=token]").value=s.target.dataset.token,document.getElementById("pay-now").disabled=!1})),document.getElementById("toggle-payment-with-credit-card")&&document.getElementById("toggle-payment-with-credit-card").addEventListener("click",r=>{document.getElementById("eway-secure-panel").classList.remove("hidden"),document.getElementById("save-card--container").style.display="grid",document.querySelector("input[name=token]").value="",document.getElementById("pay-now").disabled=!0}),(t=document.getElementById("pay-now"))==null||t.addEventListener("click",r=>document.querySelector("input[name=token]").value?this.completePaymentUsingToken(r):this.completePaymentWithoutToken(r))}}function i(){new a().handle()}d()?i():n("#eway-credit-card-payment").then(()=>i()); diff --git a/public/build/assets/forte-ach-payment-2f7fa236.js b/public/build/assets/forte-ach-payment-f051a883.js similarity index 56% rename from public/build/assets/forte-ach-payment-2f7fa236.js rename to public/build/assets/forte-ach-payment-f051a883.js index faf0f66ed4..d2e7710761 100644 --- a/public/build/assets/forte-ach-payment-2f7fa236.js +++ b/public/build/assets/forte-ach-payment-f051a883.js @@ -1,4 +1,4 @@ -var a=Object.defineProperty;var s=(t,e,n)=>e in t?a(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var o=(t,e,n)=>(s(t,typeof e!="symbol"?e+"":e,n),n);/** +var s=Object.defineProperty;var d=(n,e,t)=>e in n?s(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var o=(n,e,t)=>(d(n,typeof e!="symbol"?e+"":e,t),t);import{i,w as u}from"./authorize-credit-card-payment-bd9c9d4d.js";/** * Invoice Ninja (https://invoiceninja.com) * * @link https://github.com/invoiceninja/invoiceninja source repository @@ -6,4 +6,4 @@ var a=Object.defineProperty;var s=(t,e,n)=>e in t?a(t,e,{enumerable:!0,configura * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) * * @license https://opensource.org/licenses/AAL - */class d{constructor(e){o(this,"handleAuthorization",()=>{var e=document.getElementById("account-number").value,n=document.getElementById("routing-number").value,r={api_login_id:this.apiLoginId,account_number:e,routing_number:n,account_type:"checking"};return document.getElementById("pay-now")&&(document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden")),forte.createToken(r).success(this.successResponseHandler).error(this.failedResponseHandler),!1});o(this,"successResponseHandler",e=>(document.getElementById("payment_token").value=e.onetime_token,document.getElementById("server_response").submit(),!1));o(this,"failedResponseHandler",e=>{var n='
  • '+e.response_description+"
";return document.getElementById("forte_errors").innerHTML=n,document.getElementById("pay-now").disabled=!1,document.querySelector("#pay-now > svg").classList.add("hidden"),document.querySelector("#pay-now > span").classList.remove("hidden"),!1});o(this,"handle",()=>{let e=document.getElementById("pay-now");return e&&e.addEventListener("click",n=>{this.handleAuthorization()}),this});this.apiLoginId=e}}const u=document.querySelector('meta[name="forte-api-login-id"]').content;new d(u).handle(); + */class c{constructor(e){o(this,"handleAuthorization",()=>{var e=document.getElementById("account-number").value,t=document.getElementById("routing-number").value,r={api_login_id:this.apiLoginId,account_number:e,routing_number:t,account_type:"checking"};return document.getElementById("pay-now")&&(document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden")),forte.createToken(r).success(this.successResponseHandler).error(this.failedResponseHandler),!1});o(this,"successResponseHandler",e=>(document.getElementById("payment_token").value=e.onetime_token,document.getElementById("server_response").submit(),!1));o(this,"failedResponseHandler",e=>{var t='
  • '+e.response_description+"
";return document.getElementById("forte_errors").innerHTML=t,document.getElementById("pay-now").disabled=!1,document.querySelector("#pay-now > svg").classList.add("hidden"),document.querySelector("#pay-now > span").classList.remove("hidden"),!1});o(this,"handle",()=>{let e=document.getElementById("pay-now");return e&&e.addEventListener("click",t=>{this.handleAuthorization()}),this});this.apiLoginId=e}}function a(){const n=document.querySelector('meta[name="forte-api-login-id"]').content;new c(n).handle()}i()?a():u("#force-ach-payment").then(()=>a()); diff --git a/public/build/assets/forte-credit-card-payment-5485d5f0.js b/public/build/assets/forte-credit-card-payment-5485d5f0.js new file mode 100644 index 0000000000..5a1e2dffbd --- /dev/null +++ b/public/build/assets/forte-credit-card-payment-5485d5f0.js @@ -0,0 +1,9 @@ +var c=Object.defineProperty;var l=(n,e,t)=>e in n?c(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var a=(n,e,t)=>(l(n,typeof e!="symbol"?e+"":e,t),t);import{i as u,w as m,$ as p}from"./authorize-credit-card-payment-bd9c9d4d.js";/** + * Invoice Ninja (https://invoiceninja.com) + * + * @link https://github.com/invoiceninja/invoiceninja source repository + * + * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) + * + * @license https://opensource.org/licenses/AAL + */class y{constructor(e){a(this,"handleAuthorization",()=>{var r,d,o,s;const e={api_login_id:this.apiLoginId,card_number:(r=this.sc.value("number"))==null?void 0:r.replace(/[^\d]/g,""),expire_year:`20${(d=this.sc.value("year"))==null?void 0:d.replace(/[^\d]/g,"")}`,expire_month:(o=this.sc.value("month"))==null?void 0:o.replace(/[^\d]/g,""),cvv:(s=this.sc.value("cvv"))==null?void 0:s.replace(/[^\d]/g,"")};return document.getElementById("pay-now")&&(document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden")),forte.createToken(e).success(this.successResponseHandler).error(this.failedResponseHandler),!1});a(this,"successResponseHandler",e=>(document.getElementById("payment_token").value=e.onetime_token,document.getElementById("card_brand").value=e.card_type,document.getElementById("server_response").submit(),!1));a(this,"failedResponseHandler",e=>{var t='
  • '+e.response_description+"
";return document.getElementById("forte_errors").innerHTML=t,document.getElementById("pay-now").disabled=!1,document.querySelector("#pay-now > svg").classList.add("hidden"),document.querySelector("#pay-now > span").classList.remove("hidden"),!1});a(this,"handle",()=>{let e=document.getElementById("pay-now");return e&&e.addEventListener("click",t=>{this.handleAuthorization()}),this});this.apiLoginId=e,this.cardHolderName=document.getElementById("cardholder_name"),this.sc=new p({fields:{card:{number:"#number",date:"#date",cvv:"#cvv"}}}),this.sc.mount()}}function i(){const n=document.querySelector('meta[name="forte-api-login-id"]').content;new y(n).handle()}u()?i():m("#forte-credit-card-payment").then(()=>i()); diff --git a/public/build/assets/mollie-credit-card-db5c26c6.js b/public/build/assets/mollie-credit-card-e1abdd68.js similarity index 92% rename from public/build/assets/mollie-credit-card-db5c26c6.js rename to public/build/assets/mollie-credit-card-e1abdd68.js index c822f500ba..5fc7bd1698 100644 --- a/public/build/assets/mollie-credit-card-db5c26c6.js +++ b/public/build/assets/mollie-credit-card-e1abdd68.js @@ -1,4 +1,4 @@ -/** +import{i as d,w as l}from"./authorize-credit-card-payment-bd9c9d4d.js";/** * Invoice Ninja (https://invoiceninja.com). * * @link https://github.com/invoiceninja/invoiceninja source repository @@ -6,4 +6,4 @@ * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) * * @license https://www.elastic.co/licensing/elastic-license - */class a{constructor(){var e,t;this.mollie=Mollie((e=document.querySelector("meta[name=mollie-profileId]"))==null?void 0:e.content,{testmode:(t=document.querySelector("meta[name=mollie-testmode]"))==null?void 0:t.content,locale:"en_US"})}createCardHolderInput(){let e=this.mollie.createComponent("cardHolder");e.mount("#card-holder");let t=document.getElementById("card-holder-error");return e.addEventListener("change",function(n){n.error&&n.touched?t.textContent=n.error:t.textContent=""}),this}createCardNumberInput(){let e=this.mollie.createComponent("cardNumber");e.mount("#card-number");let t=document.getElementById("card-number-error");return e.addEventListener("change",function(n){n.error&&n.touched?t.textContent=n.error:t.textContent=""}),this}createExpiryDateInput(){let e=this.mollie.createComponent("expiryDate");e.mount("#expiry-date");let t=document.getElementById("expiry-date-error");return e.addEventListener("change",function(n){n.error&&n.touched?t.textContent=n.error:t.textContent=""}),this}createCvvInput(){let e=this.mollie.createComponent("verificationCode");e.mount("#cvv");let t=document.getElementById("cvv-error");return e.addEventListener("change",function(n){n.error&&n.touched?t.textContent=n.error:t.textContent=""}),this}handlePayNowButton(){if(document.getElementById("pay-now").disabled=!0,document.querySelector("input[name=token]").value!=="")return document.querySelector("input[name=gateway_response]").value="",document.getElementById("server-response").submit();this.mollie.createToken().then(function(e){let t=e.token,n=e.error;if(n){document.getElementById("pay-now").disabled=!1;let o=document.getElementById("errors");o.innerText=n.message,o.hidden=!1;return}let r=document.querySelector('input[name="token-billing-checkbox"]:checked');r&&(document.querySelector('input[name="store_card"]').value=r.value),document.querySelector("input[name=gateway_response]").value=t,document.querySelector("input[name=token]").value="",document.getElementById("server-response").submit()})}handle(){this.createCardHolderInput().createCardNumberInput().createExpiryDateInput().createCvvInput(),Array.from(document.getElementsByClassName("toggle-payment-with-token")).forEach(e=>e.addEventListener("click",t=>{document.getElementById("mollie--payment-container").classList.add("hidden"),document.getElementById("save-card--container").style.display="none",document.querySelector("input[name=token]").value=t.target.dataset.token})),document.getElementById("toggle-payment-with-credit-card").addEventListener("click",e=>{document.getElementById("mollie--payment-container").classList.remove("hidden"),document.getElementById("save-card--container").style.display="grid",document.querySelector("input[name=token]").value=""}),document.getElementById("pay-now").addEventListener("click",()=>this.handlePayNowButton())}}new a().handle(); + */class c{constructor(){var e,t;this.mollie=Mollie((e=document.querySelector("meta[name=mollie-profileId]"))==null?void 0:e.content,{testmode:(t=document.querySelector("meta[name=mollie-testmode]"))==null?void 0:t.content,locale:"en_US"})}createCardHolderInput(){let e=this.mollie.createComponent("cardHolder");e.mount("#card-holder");let t=document.getElementById("card-holder-error");return e.addEventListener("change",function(n){n.error&&n.touched?t.textContent=n.error:t.textContent=""}),this}createCardNumberInput(){let e=this.mollie.createComponent("cardNumber");e.mount("#card-number");let t=document.getElementById("card-number-error");return e.addEventListener("change",function(n){n.error&&n.touched?t.textContent=n.error:t.textContent=""}),this}createExpiryDateInput(){let e=this.mollie.createComponent("expiryDate");e.mount("#expiry-date");let t=document.getElementById("expiry-date-error");return e.addEventListener("change",function(n){n.error&&n.touched?t.textContent=n.error:t.textContent=""}),this}createCvvInput(){let e=this.mollie.createComponent("verificationCode");e.mount("#cvv");let t=document.getElementById("cvv-error");return e.addEventListener("change",function(n){n.error&&n.touched?t.textContent=n.error:t.textContent=""}),this}handlePayNowButton(){if(document.getElementById("pay-now").disabled=!0,document.querySelector("input[name=token]").value!=="")return document.querySelector("input[name=gateway_response]").value="",document.getElementById("server-response").submit();this.mollie.createToken().then(function(e){let t=e.token,n=e.error;if(n){document.getElementById("pay-now").disabled=!1;let o=document.getElementById("errors");o.innerText=n.message,o.hidden=!1;return}let r=document.querySelector('input[name="token-billing-checkbox"]:checked');r&&(document.querySelector('input[name="store_card"]').value=r.value),document.querySelector("input[name=gateway_response]").value=t,document.querySelector("input[name=token]").value="",document.getElementById("server-response").submit()})}handle(){this.createCardHolderInput().createCardNumberInput().createExpiryDateInput().createCvvInput(),Array.from(document.getElementsByClassName("toggle-payment-with-token")).forEach(e=>e.addEventListener("click",t=>{document.getElementById("mollie--payment-container").classList.add("hidden"),document.getElementById("save-card--container").style.display="none",document.querySelector("input[name=token]").value=t.target.dataset.token})),document.getElementById("toggle-payment-with-credit-card").addEventListener("click",e=>{document.getElementById("mollie--payment-container").classList.remove("hidden"),document.getElementById("save-card--container").style.display="grid",document.querySelector("input[name=token]").value=""}),document.getElementById("pay-now").addEventListener("click",()=>this.handlePayNowButton())}}function a(){new c().handle()}d()?a():l("#mollie-credit-card-payment").then(()=>a()); diff --git a/public/build/assets/paytrace-credit-card-9cea3700.js b/public/build/assets/paytrace-credit-card-f4dfde84.js similarity index 90% rename from public/build/assets/paytrace-credit-card-9cea3700.js rename to public/build/assets/paytrace-credit-card-f4dfde84.js index 00c406bb51..a208bb8fa8 100644 --- a/public/build/assets/paytrace-credit-card-9cea3700.js +++ b/public/build/assets/paytrace-credit-card-f4dfde84.js @@ -1,4 +1,4 @@ -/** +import{i as o,w as i}from"./authorize-credit-card-payment-bd9c9d4d.js";/** * Invoice Ninja (https://invoiceninja.com). * * @link https://github.com/invoiceninja/invoiceninja source repository @@ -6,4 +6,4 @@ * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) * * @license https://www.elastic.co/licensing/elastic-license - */class r{constructor(){var t;this.clientKey=(t=document.querySelector("meta[name=paytrace-client-key]"))==null?void 0:t.content}get creditCardStyles(){return{font_color:"#000",border_color:"#a1b1c9",border_style:"dotted",font_size:"13pt",input_border_radius:"3px",input_border_width:"1px",input_font:"Times New Roman, arial, fantasy",input_font_weight:"400",input_margin:"5px 0px 5px 0px",input_padding:"0px 5px 0px 5px",label_color:"#a0aec0",label_size:"16px",label_width:"150px",label_font:"Times New Roman, sans-serif, serif",label_font_weight:"light",label_margin:"5px 0px 0px 0px",label_padding:"0px 5px 0px 5px",background_color:"white",height:"30px",width:"370px",padding_bottom:"0px"}}get codeStyles(){return{font_color:"#000",border_color:"#a1b1c9",border_style:"dotted",font_size:"13pt",input_border_radius:"2px",input_border_width:"1px",input_font:"serif, cursive, fantasy",input_font_weight:"700",input_margin:"5px 0px 5px 20px",input_padding:"0px 5px 0px 5px",label_color:"#a0aec0",label_size:"16px",label_width:"150px",label_font:"sans-serif, arial, serif",label_font_weight:"bold",label_margin:"5px 0px 0px 20px",label_padding:"2px 5px 2px 5px",background_color:"white",height:"30px",width:"150px",padding_bottom:"2px"}}get expStyles(){return{font_color:"#000",border_color:"#a1b1c9",border_style:"dashed",font_size:"12pt",input_border_radius:"0px",input_border_width:"2px",input_font:"arial, cursive, fantasy",input_font_weight:"400",input_margin:"5px 0px 5px 0px",input_padding:"0px 5px 0px 5px",label_color:"#a0aec0",label_size:"16px",label_width:"150px",label_font:"arial, fantasy, serif",label_font_weight:"normal",label_margin:"5px 0px 0px 0px",label_padding:"2px 5px 2px 5px",background_color:"white",height:"30px",width:"85px",padding_bottom:"2px",type:"dropdown"}}updatePayTraceLabels(){window.PTPayment.getControl("securityCode").label.text(document.querySelector("meta[name=ctrans-cvv]").content),window.PTPayment.getControl("creditCard").label.text(document.querySelector("meta[name=ctrans-card_number]").content),window.PTPayment.getControl("expiration").label.text(document.querySelector("meta[name=ctrans-expires]").content)}setupPayTrace(){return window.PTPayment.setup({styles:{code:this.codeStyles,cc:this.creditCardStyles,exp:this.expStyles},authorization:{clientKey:this.clientKey}})}handlePaymentWithCreditCard(t){t.target.parentElement.disabled=!0,document.getElementById("errors").hidden=!0,window.PTPayment.validate(n=>{if(n.length>=1){let e=document.getElementById("errors");return e.textContent=n[0].description,e.hidden=!1,t.target.parentElement.disabled=!1}this.ptInstance.process().then(e=>{document.getElementById("HPF_Token").value=e.message.hpf_token,document.getElementById("enc_key").value=e.message.enc_key;let a=document.querySelector('input[name="token-billing-checkbox"]:checked');a&&(document.querySelector('input[name="store_card"]').value=a.value),document.getElementById("server_response").submit()}).catch(e=>{document.getElementById("errors").textContent=JSON.stringify(e),document.getElementById("errors").hidden=!1,console.log(e)})})}handlePaymentWithToken(t){t.target.parentElement.disabled=!0,document.getElementById("server_response").submit()}handle(){var t;Array.from(document.getElementsByClassName("toggle-payment-with-token")).forEach(n=>n.addEventListener("click",e=>{document.getElementById("paytrace--credit-card-container").classList.add("hidden"),document.getElementById("save-card--container").style.display="none",document.querySelector("input[name=token]").value=e.target.dataset.token})),(t=document.getElementById("toggle-payment-with-credit-card"))==null||t.addEventListener("click",n=>{document.getElementById("paytrace--credit-card-container").classList.remove("hidden"),document.getElementById("save-card--container").style.display="grid",document.querySelector("input[name=token]").value="",this.setupPayTrace().then(e=>{this.ptInstance=e,this.updatePayTraceLabels()})}),document.getElementById("pay-now").addEventListener("click",n=>document.querySelector("input[name=token]").value===""?this.handlePaymentWithCreditCard(n):this.handlePaymentWithToken(n))}}new r().handle(); + */class d{constructor(){var t;this.clientKey=(t=document.querySelector("meta[name=paytrace-client-key]"))==null?void 0:t.content}get creditCardStyles(){return{font_color:"#000",border_color:"#a1b1c9",border_style:"dotted",font_size:"13pt",input_border_radius:"3px",input_border_width:"1px",input_font:"Times New Roman, arial, fantasy",input_font_weight:"400",input_margin:"5px 0px 5px 0px",input_padding:"0px 5px 0px 5px",label_color:"#a0aec0",label_size:"16px",label_width:"150px",label_font:"Times New Roman, sans-serif, serif",label_font_weight:"light",label_margin:"5px 0px 0px 0px",label_padding:"0px 5px 0px 5px",background_color:"white",height:"30px",width:"370px",padding_bottom:"0px"}}get codeStyles(){return{font_color:"#000",border_color:"#a1b1c9",border_style:"dotted",font_size:"13pt",input_border_radius:"2px",input_border_width:"1px",input_font:"serif, cursive, fantasy",input_font_weight:"700",input_margin:"5px 0px 5px 20px",input_padding:"0px 5px 0px 5px",label_color:"#a0aec0",label_size:"16px",label_width:"150px",label_font:"sans-serif, arial, serif",label_font_weight:"bold",label_margin:"5px 0px 0px 20px",label_padding:"2px 5px 2px 5px",background_color:"white",height:"30px",width:"150px",padding_bottom:"2px"}}get expStyles(){return{font_color:"#000",border_color:"#a1b1c9",border_style:"dashed",font_size:"12pt",input_border_radius:"0px",input_border_width:"2px",input_font:"arial, cursive, fantasy",input_font_weight:"400",input_margin:"5px 0px 5px 0px",input_padding:"0px 5px 0px 5px",label_color:"#a0aec0",label_size:"16px",label_width:"150px",label_font:"arial, fantasy, serif",label_font_weight:"normal",label_margin:"5px 0px 0px 0px",label_padding:"2px 5px 2px 5px",background_color:"white",height:"30px",width:"85px",padding_bottom:"2px",type:"dropdown"}}updatePayTraceLabels(){window.PTPayment.getControl("securityCode").label.text(document.querySelector("meta[name=ctrans-cvv]").content),window.PTPayment.getControl("creditCard").label.text(document.querySelector("meta[name=ctrans-card_number]").content),window.PTPayment.getControl("expiration").label.text(document.querySelector("meta[name=ctrans-expires]").content)}setupPayTrace(){return window.PTPayment.setup({styles:{code:this.codeStyles,cc:this.creditCardStyles,exp:this.expStyles},authorization:{clientKey:this.clientKey}})}handlePaymentWithCreditCard(t){t.target.parentElement.disabled=!0,document.getElementById("errors").hidden=!0,window.PTPayment.validate(n=>{if(n.length>=1){let e=document.getElementById("errors");return e.textContent=n[0].description,e.hidden=!1,t.target.parentElement.disabled=!1}this.ptInstance.process().then(e=>{document.getElementById("HPF_Token").value=e.message.hpf_token,document.getElementById("enc_key").value=e.message.enc_key;let a=document.querySelector('input[name="token-billing-checkbox"]:checked');a&&(document.querySelector('input[name="store_card"]').value=a.value),document.getElementById("server_response").submit()}).catch(e=>{document.getElementById("errors").textContent=JSON.stringify(e),document.getElementById("errors").hidden=!1,console.log(e)})})}handlePaymentWithToken(t){t.target.parentElement.disabled=!0,document.getElementById("server_response").submit()}handle(){var t;Array.from(document.getElementsByClassName("toggle-payment-with-token")).forEach(n=>n.addEventListener("click",e=>{document.getElementById("paytrace--credit-card-container").classList.add("hidden"),document.getElementById("save-card--container").style.display="none",document.querySelector("input[name=token]").value=e.target.dataset.token})),(t=document.getElementById("toggle-payment-with-credit-card"))==null||t.addEventListener("click",n=>{document.getElementById("paytrace--credit-card-container").classList.remove("hidden"),document.getElementById("save-card--container").style.display="grid",document.querySelector("input[name=token]").value="",this.setupPayTrace().then(e=>{this.ptInstance=e,this.updatePayTraceLabels()})}),document.getElementById("pay-now").addEventListener("click",n=>document.querySelector("input[name=token]").value===""?this.handlePaymentWithCreditCard(n):this.handlePaymentWithToken(n)),Array.from(document.getElementsByClassName("toggle-payment-with-token")).length===0&&!o()&&document.getElementById("toggle-payment-with-credit-card").click()}}function r(){new d().handle()}o()?r():i("#paytrace-credit-card-payment").then(()=>r()); diff --git a/public/build/assets/razorpay-aio-3d02ff1d.js b/public/build/assets/razorpay-aio-3d02ff1d.js deleted file mode 100644 index 37774d9fd6..0000000000 --- a/public/build/assets/razorpay-aio-3d02ff1d.js +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Invoice Ninja (https://invoiceninja.com). - * - * @link https://github.com/invoiceninja/invoiceninja source repository - * - * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) - * - * @license https://www.elastic.co/licensing/elastic-license - */var a;let n=JSON.parse((a=document.querySelector("meta[name=razorpay-options]"))==null?void 0:a.content);n.handler=function(e){document.getElementById("razorpay_payment_id").value=e.razorpay_payment_id,document.getElementById("razorpay_signature").value=e.razorpay_signature,document.getElementById("server-response").submit()};n.modal={ondismiss:function(){t.disabled=!1}};let o=new Razorpay(n),t=document.getElementById("pay-now");t.onclick=function(e){t.disabled=!0,o.open()}; diff --git a/public/build/assets/razorpay-aio-d613afa9.js b/public/build/assets/razorpay-aio-d613afa9.js new file mode 100644 index 0000000000..393526403f --- /dev/null +++ b/public/build/assets/razorpay-aio-d613afa9.js @@ -0,0 +1,9 @@ +import{i,w as d}from"./authorize-credit-card-payment-bd9c9d4d.js";/** + * Invoice Ninja (https://invoiceninja.com). + * + * @link https://github.com/invoiceninja/invoiceninja source repository + * + * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) + * + * @license https://www.elastic.co/licensing/elastic-license + */function o(){var a;let e=JSON.parse((a=document.querySelector("meta[name=razorpay-options]"))==null?void 0:a.content);e.handler=function(n){document.getElementById("razorpay_payment_id").value=n.razorpay_payment_id,document.getElementById("razorpay_signature").value=n.razorpay_signature,document.getElementById("server-response").submit()},e.modal={ondismiss:function(){t.disabled=!1}};let r=new Razorpay(e),t=document.getElementById("pay-now");t.onclick=function(n){t.disabled=!0,r.open()}}i()?o():d("#razorpay-hosted-payment").then(()=>o()); diff --git a/public/build/assets/square-credit-card-a20464a3.js b/public/build/assets/square-credit-card-83a3d702.js similarity index 93% rename from public/build/assets/square-credit-card-a20464a3.js rename to public/build/assets/square-credit-card-83a3d702.js index 11597eeaf5..6461fea4de 100644 --- a/public/build/assets/square-credit-card-a20464a3.js +++ b/public/build/assets/square-credit-card-83a3d702.js @@ -1,4 +1,4 @@ -/** +import{i,w as d}from"./authorize-credit-card-payment-bd9c9d4d.js";/** * Invoice Ninja (https://invoiceninja.com). * * @link https://github.com/invoiceninja/invoiceninja source repository @@ -6,4 +6,4 @@ * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) * * @license https://www.elastic.co/licensing/elastic-license - */class c{constructor(){this.appId=document.querySelector("meta[name=square-appId]").content,this.locationId=document.querySelector("meta[name=square-locationId]").content,this.isLoaded=!1}async init(){this.payments=Square.payments(this.appId,this.locationId),this.card=await this.payments.card(),await this.card.attach("#card-container"),this.isLoaded=!0;let e=document.querySelector(".sq-card-iframe-container");e&&e.setAttribute("style","150px !important"),document.querySelector(".toggle-payment-with-token")&&document.getElementById("card-container").classList.add("hidden")}async completePaymentWithoutToken(e){document.getElementById("errors").hidden=!0,e.target.parentElement.disabled=!0;let t=await this.card.tokenize(),o;try{const n={amount:document.querySelector("meta[name=amount]").content,billingContact:JSON.parse(document.querySelector("meta[name=square_contact]").content),currencyCode:document.querySelector("meta[name=currencyCode]").content,intent:"CHARGE"};o=(await this.payments.verifyBuyer(t.token,n)).token}catch{e.target.parentElement.disabled=!0}if(document.querySelector('input[name="verificationToken"]').value=o,t.status==="OK"){document.getElementById("sourceId").value=t.token;let n=document.querySelector('input[name="token-billing-checkbox"]:checked');return n&&(document.querySelector('input[name="store_card"]').value=n.value),document.getElementById("server_response").submit()}document.getElementById("errors").textContent=t.errors[0].message,document.getElementById("errors").hidden=!1,e.target.parentElement.disabled=!1}async completePaymentUsingToken(e){return e.target.parentElement.disabled=!0,document.getElementById("server_response").submit()}async verifyBuyer(e){const t={amount:document.querySelector("meta[name=amount]").content,billingContact:document.querySelector("meta[name=square_contact]").content,currencyCode:document.querySelector("meta[name=currencyCode]").content,intent:"CHARGE"};return(await this.payments.verifyBuyer(e,t)).token}async handle(){document.getElementById("payment-list").classList.add("hidden"),await this.init().then(()=>{var e,t,o,n;(e=document.getElementById("authorize-card"))==null||e.addEventListener("click",a=>this.completePaymentWithoutToken(a)),(t=document.getElementById("pay-now"))==null||t.addEventListener("click",a=>document.querySelector("input[name=token]").value?this.completePaymentUsingToken(a):this.completePaymentWithoutToken(a)),Array.from(document.getElementsByClassName("toggle-payment-with-token")).forEach(a=>a.addEventListener("click",async r=>{document.getElementById("card-container").classList.add("hidden"),document.getElementById("save-card--container").style.display="none",document.querySelector("input[name=token]").value=r.target.dataset.token})),(o=document.getElementById("toggle-payment-with-credit-card"))==null||o.addEventListener("click",async a=>{document.getElementById("card-container").classList.remove("hidden"),document.getElementById("save-card--container").style.display="grid",document.querySelector("input[name=token]").value=""}),document.getElementById("loader").classList.add("hidden"),document.getElementById("payment-list").classList.remove("hidden"),(n=document.getElementById("toggle-payment-with-credit-card"))==null||n.click()})}}new c().handle(); + */class s{constructor(){this.appId=document.querySelector("meta[name=square-appId]").content,this.locationId=document.querySelector("meta[name=square-locationId]").content,this.isLoaded=!1}async init(){this.payments=Square.payments(this.appId,this.locationId),this.card=await this.payments.card(),await this.card.attach("#card-container"),this.isLoaded=!0;let e=document.querySelector(".sq-card-iframe-container");e&&e.setAttribute("style","150px !important"),document.querySelector(".toggle-payment-with-token")&&document.getElementById("card-container").classList.add("hidden")}async completePaymentWithoutToken(e){document.getElementById("errors").hidden=!0,e.target.parentElement.disabled=!0;let t=await this.card.tokenize(),o;try{const n={amount:document.querySelector("meta[name=amount]").content,billingContact:JSON.parse(document.querySelector("meta[name=square_contact]").content),currencyCode:document.querySelector("meta[name=currencyCode]").content,intent:"CHARGE"};o=(await this.payments.verifyBuyer(t.token,n)).token}catch{e.target.parentElement.disabled=!0}if(document.querySelector('input[name="verificationToken"]').value=o,t.status==="OK"){document.getElementById("sourceId").value=t.token;let n=document.querySelector('input[name="token-billing-checkbox"]:checked');return n&&(document.querySelector('input[name="store_card"]').value=n.value),document.getElementById("server_response").submit()}document.getElementById("errors").textContent=t.errors[0].message,document.getElementById("errors").hidden=!1,e.target.parentElement.disabled=!1}async completePaymentUsingToken(e){return e.target.parentElement.disabled=!0,document.getElementById("server_response").submit()}async verifyBuyer(e){const t={amount:document.querySelector("meta[name=amount]").content,billingContact:document.querySelector("meta[name=square_contact]").content,currencyCode:document.querySelector("meta[name=currencyCode]").content,intent:"CHARGE"};return(await this.payments.verifyBuyer(e,t)).token}async handle(){document.getElementById("payment-list").classList.add("hidden"),await this.init().then(()=>{var e,t,o,n;(e=document.getElementById("authorize-card"))==null||e.addEventListener("click",a=>this.completePaymentWithoutToken(a)),(t=document.getElementById("pay-now"))==null||t.addEventListener("click",a=>document.querySelector("input[name=token]").value?this.completePaymentUsingToken(a):this.completePaymentWithoutToken(a)),Array.from(document.getElementsByClassName("toggle-payment-with-token")).forEach(a=>a.addEventListener("click",async r=>{document.getElementById("card-container").classList.add("hidden"),document.getElementById("save-card--container").style.display="none",document.querySelector("input[name=token]").value=r.target.dataset.token})),(o=document.getElementById("toggle-payment-with-credit-card"))==null||o.addEventListener("click",async a=>{document.getElementById("card-container").classList.remove("hidden"),document.getElementById("save-card--container").style.display="grid",document.querySelector("input[name=token]").value=""}),document.getElementById("loader").classList.add("hidden"),document.getElementById("payment-list").classList.remove("hidden"),(n=document.getElementById("toggle-payment-with-credit-card"))==null||n.click()})}}function c(){new s().handle()}i()?c():d("#square-credit-card-payment").then(()=>c()); diff --git a/public/build/assets/stripe-ach-pay-0bf320bd.js b/public/build/assets/stripe-ach-pay-0bf320bd.js new file mode 100644 index 0000000000..5175db9585 --- /dev/null +++ b/public/build/assets/stripe-ach-pay-0bf320bd.js @@ -0,0 +1,9 @@ +import{w as g}from"./authorize-credit-card-payment-bd9c9d4d.js";/** + * Invoice Ninja (https://invoiceninja.com). + * + * @link https://github.com/invoiceninja/invoiceninja source repository + * + * @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com) + * + * @license https://www.elastic.co/licensing/elastic-license + */g("#stripe-ach-payment").then(()=>f());function f(){let d=document.getElementById("pay-now");d&&(Array.from(document.getElementsByClassName("toggle-payment-with-token")).forEach(e=>e.addEventListener("click",n=>{document.querySelector("input[name=source]").value=n.target.dataset.token})),d.addEventListener("click",function(){let e=document.getElementById("pay-now");e.disabled=!0,e.querySelector("svg").classList.remove("hidden"),e.querySelector("span").classList.add("hidden"),document.getElementById("server-response").submit()})),document.getElementById("new-bank").addEventListener("click",e=>{var m,y;if(!document.getElementById("accept-terms").checked){errors.textContent="You must accept the mandate terms prior to making payment.",errors.hidden=!1;return}errors.hidden=!0;let n,t=document.querySelector('meta[name="stripe-publishable-key"]').content,o=(m=document.querySelector('meta[name="stripe-account-id"]'))==null?void 0:m.content;o?n=Stripe(t,{stripeAccount:o}):n=Stripe(t);let s=document.getElementById("new-bank");s.disabled=!0,s.querySelector("svg").classList.remove("hidden"),s.querySelector("span").classList.add("hidden"),e.preventDefault();const c=document.getElementById("account-holder-name-field"),r=document.getElementById("email-field"),u=(y=document.querySelector('meta[name="client_secret"]'))==null?void 0:y.content;n.collectBankAccountForPayment({clientSecret:u,params:{payment_method_type:"us_bank_account",payment_method_data:{billing_details:{name:c.value,email:r.value}}},expand:["payment_method"]}).then(({paymentIntent:i,error:l})=>{if(l)console.error(l.message),errors.textContent=l.message,errors.hidden=!1,a();else if(i.status==="requires_payment_method"){errors.textContent="We were unable to process the payment with this account, please try another one.",errors.hidden=!1,a();return}else if(i.status==="requires_confirmation"){let h=document.getElementById("bank_account_response");h.value=JSON.stringify(i),p(n,u)}a()})});function p(e,n){e.confirmUsBankAccountPayment(n).then(({paymentIntent:t,error:o})=>{var s,c;if(console.log(t),o)console.error(o.message);else if(t.status==="requires_payment_method")errors.textContent="We were unable to process the payment with this account, please try another one.",errors.hidden=!1,a();else if(t.status==="processing"){let r=document.getElementById("gateway_response");r.value=JSON.stringify(t),document.getElementById("server-response").submit()}else if(((s=t.next_action)==null?void 0:s.type)==="verify_with_microdeposits"||((c=t.next_action)==null?void 0:c.type)==="requires_source_action"){errors.textContent="You will receive an email with details on how to verify your bank account and process payment.",errors.hidden=!1,document.getElementById("new-bank").style.visibility="hidden";let r=document.getElementById("gateway_response");r.value=JSON.stringify(t),document.getElementById("server-response").submit()}})}function a(){let e=document.getElementById("new-bank");e.disabled=!1,e.querySelector("svg").classList.add("hidden"),e.querySelector("span").classList.remove("hidden")}} diff --git a/public/build/assets/stripe-acss-946fe54a.js b/public/build/assets/stripe-acss-dd3e9f85.js similarity index 71% rename from public/build/assets/stripe-acss-946fe54a.js rename to public/build/assets/stripe-acss-dd3e9f85.js index 8b12e28c4d..592f90e653 100644 --- a/public/build/assets/stripe-acss-946fe54a.js +++ b/public/build/assets/stripe-acss-dd3e9f85.js @@ -1,4 +1,4 @@ -var c=Object.defineProperty;var i=(n,e,t)=>e in n?c(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var r=(n,e,t)=>(i(n,typeof e!="symbol"?e+"":e,t),t);/** +var d=Object.defineProperty;var c=(o,e,t)=>e in o?d(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var a=(o,e,t)=>(c(o,typeof e!="symbol"?e+"":e,t),t);import{i,w as l}from"./authorize-credit-card-payment-bd9c9d4d.js";/** * Invoice Ninja (https://invoiceninja.com) * * @link https://github.com/invoiceninja/invoiceninja source repository @@ -6,4 +6,4 @@ var c=Object.defineProperty;var i=(n,e,t)=>e in n?c(n,e,{enumerable:!0,configura * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) * * @license https://www.elastic.co/licensing/elastic-license - */class l{constructor(e,t){r(this,"setupStripe",()=>(this.stripeConnect?this.stripe=Stripe(this.key,{stripeAccount:this.stripeConnect}):this.stripe=Stripe(this.key),this));r(this,"handle",()=>{Array.from(document.getElementsByClassName("toggle-payment-with-token")).forEach(e=>e.addEventListener("click",t=>{document.querySelector("input[name=token]").value=t.target.dataset.token,console.log(t.target.dataset.token)})),document.getElementById("toggle-payment-with-new-account")&&document.getElementById("toggle-payment-with-new-account").addEventListener("click",e=>{document.getElementById("save-card--container").style.display="grid",document.querySelector("input[name=token]").value=""}),document.getElementById("pay-now-with-token")?document.getElementById("pay-now-with-token").addEventListener("click",e=>{document.querySelector("input[name=token]").value,document.getElementById("pay-now-with-token").disabled=!0,document.querySelector("#pay-now-with-token > svg").classList.remove("hidden"),document.querySelector("#pay-now-with-token > span").classList.add("hidden"),document.getElementById("server-response").submit()}):document.getElementById("pay-now").addEventListener("click",e=>{let t=document.querySelector('input[name="token-billing-checkbox"]:checked');t&&(document.querySelector('input[name="store_card"]').value=t.value);let o=document.getElementById("errors");if(o.textContent="",o.hidden=!0,document.getElementById("acss-name").value===""){document.getElementById("acss-name").focus(),o.textContent=document.querySelector("meta[name=translation-name-required]").content,o.hidden=!1;return}if(document.getElementById("acss-email-address").value===""){document.getElementById("acss-email-address").focus(),o.textContent=document.querySelector("meta[name=translation-email-required]").content,o.hidden=!1;return}document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden"),this.stripe.confirmAcssDebitPayment(document.querySelector("meta[name=pi-client-secret").content,{payment_method:{billing_details:{name:document.getElementById("acss-name").value,email:document.getElementById("acss-email-address").value}}}).then(s=>s.error?this.handleFailure(s.error.message):this.handleSuccess(s))})});this.key=e,this.errors=document.getElementById("errors"),this.stripeConnect=t}handleSuccess(e){document.querySelector('input[name="gateway_response"]').value=JSON.stringify(e.paymentIntent),document.getElementById("server-response").submit()}handleFailure(e){let t=document.getElementById("errors");t.textContent="",t.textContent=e,t.hidden=!1,document.getElementById("pay-now").disabled=!1,document.querySelector("#pay-now > svg").classList.add("hidden"),document.querySelector("#pay-now > span").classList.remove("hidden")}}var a;const m=((a=document.querySelector('meta[name="stripe-publishable-key"]'))==null?void 0:a.content)??"";var d;const u=((d=document.querySelector('meta[name="stripe-account-id"]'))==null?void 0:d.content)??"";new l(m,u).setupStripe().handle(); + */class m{constructor(e,t){a(this,"setupStripe",()=>(this.stripeConnect?this.stripe=Stripe(this.key,{stripeAccount:this.stripeConnect}):this.stripe=Stripe(this.key),this));a(this,"handle",()=>{Array.from(document.getElementsByClassName("toggle-payment-with-token")).forEach(e=>e.addEventListener("click",t=>{document.querySelector("input[name=token]").value=t.target.dataset.token,console.log(t.target.dataset.token)})),document.getElementById("toggle-payment-with-new-account")&&document.getElementById("toggle-payment-with-new-account").addEventListener("click",e=>{document.getElementById("save-card--container").style.display="grid",document.querySelector("input[name=token]").value=""}),document.getElementById("pay-now-with-token")?document.getElementById("pay-now-with-token").addEventListener("click",e=>{document.querySelector("input[name=token]").value,document.getElementById("pay-now-with-token").disabled=!0,document.querySelector("#pay-now-with-token > svg").classList.remove("hidden"),document.querySelector("#pay-now-with-token > span").classList.add("hidden"),document.getElementById("server-response").submit()}):document.getElementById("pay-now").addEventListener("click",e=>{let t=document.querySelector('input[name="token-billing-checkbox"]:checked');t&&(document.querySelector('input[name="store_card"]').value=t.value);let n=document.getElementById("errors");if(n.textContent="",n.hidden=!0,document.getElementById("acss-name").value===""){document.getElementById("acss-name").focus(),n.textContent=document.querySelector("meta[name=translation-name-required]").content,n.hidden=!1;return}if(document.getElementById("acss-email-address").value===""){document.getElementById("acss-email-address").focus(),n.textContent=document.querySelector("meta[name=translation-email-required]").content,n.hidden=!1;return}document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden"),this.stripe.confirmAcssDebitPayment(document.querySelector("meta[name=pi-client-secret").content,{payment_method:{billing_details:{name:document.getElementById("acss-name").value,email:document.getElementById("acss-email-address").value}}}).then(s=>s.error?this.handleFailure(s.error.message):this.handleSuccess(s))})});this.key=e,this.errors=document.getElementById("errors"),this.stripeConnect=t}handleSuccess(e){document.querySelector('input[name="gateway_response"]').value=JSON.stringify(e.paymentIntent),document.getElementById("server-response").submit()}handleFailure(e){let t=document.getElementById("errors");t.textContent="",t.textContent=e,t.hidden=!1,document.getElementById("pay-now").disabled=!1,document.querySelector("#pay-now > svg").classList.add("hidden"),document.querySelector("#pay-now > span").classList.remove("hidden")}}function r(){var t,n;const o=((t=document.querySelector('meta[name="stripe-publishable-key"]'))==null?void 0:t.content)??"",e=((n=document.querySelector('meta[name="stripe-account-id"]'))==null?void 0:n.content)??"";new m(o,e).setupStripe().handle()}i()?r():l("#stripe-acss-payment").then(()=>r()); diff --git a/public/build/assets/stripe-alipay-00a4a19f.js b/public/build/assets/stripe-alipay-4a3641d0.js similarity index 68% rename from public/build/assets/stripe-alipay-00a4a19f.js rename to public/build/assets/stripe-alipay-4a3641d0.js index 1aa7a164b7..b2c9cc62ab 100644 --- a/public/build/assets/stripe-alipay-00a4a19f.js +++ b/public/build/assets/stripe-alipay-4a3641d0.js @@ -1,9 +1,9 @@ -var i=Object.defineProperty;var c=(n,e,t)=>e in n?i(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var r=(n,e,t)=>(c(n,typeof e!="symbol"?e+"":e,t),t);/** +var i=Object.defineProperty;var c=(n,e,t)=>e in n?i(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var r=(n,e,t)=>(c(n,typeof e!="symbol"?e+"":e,t),t);import{i as a,w as d}from"./authorize-credit-card-payment-bd9c9d4d.js";/** * Invoice Ninja (https://invoiceninja.com) * * @link https://github.com/invoiceninja/invoiceninja source repository * * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) * - * @license https://www.elastic.co/licensing/elastic-license - */class a{constructor(e,t){r(this,"setupStripe",()=>(this.stripeConnect?this.stripe=Stripe(this.key,{stripeAccount:this.stripeConnect}):this.stripe=Stripe(this.key),this));this.key=e,this.stripeConnect=t,this.errors=document.getElementById("errors")}async handle(){document.getElementById("pay-now").addEventListener("click",async e=>{document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.add("hidden"),document.querySelector("#pay-now > span").classList.remove("hidden");const{error:t}=await this.stripe.confirmAlipayPayment(document.querySelector("meta[name=ci_intent]").content,{return_url:`${document.querySelector("meta[name=return_url]").content}`});document.getElementById("pay-now").disabled=!1,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden"),t&&(this.errors.textContent="",this.errors.textContent=result.error.message,this.errors.hidden=!1)})}}var s;const d=((s=document.querySelector('meta[name="stripe-publishable-key"]'))==null?void 0:s.content)??"";var o;const l=((o=document.querySelector('meta[name="stripe-account-id"]'))==null?void 0:o.content)??"";new a(d,l).setupStripe().handle(); + * @license https://www.elastic.co/licensing/elastic-license + */class l{constructor(e,t){r(this,"setupStripe",()=>(this.stripeConnect?this.stripe=Stripe(this.key,{stripeAccount:this.stripeConnect}):this.stripe=Stripe(this.key),this));this.key=e,this.stripeConnect=t,this.errors=document.getElementById("errors")}async handle(){document.getElementById("pay-now").addEventListener("click",async e=>{document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.add("hidden"),document.querySelector("#pay-now > span").classList.remove("hidden");const{error:t}=await this.stripe.confirmAlipayPayment(document.querySelector("meta[name=ci_intent]").content,{return_url:`${document.querySelector("meta[name=return_url]").content}`});document.getElementById("pay-now").disabled=!1,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden"),t&&(this.errors.textContent="",this.errors.textContent=result.error.message,this.errors.hidden=!1)})}}function o(){var t,s;const n=((t=document.querySelector('meta[name="stripe-publishable-key"]'))==null?void 0:t.content)??"",e=((s=document.querySelector('meta[name="stripe-account-id"]'))==null?void 0:s.content)??"";new l(n,e).setupStripe().handle()}a()?o():d("#stripe-alipay-payment").then(()=>o()); diff --git a/public/build/assets/stripe-bacs-38c8b975.js b/public/build/assets/stripe-bacs-7ec06b1d.js similarity index 75% rename from public/build/assets/stripe-bacs-38c8b975.js rename to public/build/assets/stripe-bacs-7ec06b1d.js index d71314edc9..d24ce16805 100644 --- a/public/build/assets/stripe-bacs-38c8b975.js +++ b/public/build/assets/stripe-bacs-7ec06b1d.js @@ -1,4 +1,4 @@ -var a=Object.defineProperty;var c=(n,e,t)=>e in n?a(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var s=(n,e,t)=>(c(n,typeof e!="symbol"?e+"":e,t),t);/** +var a=Object.defineProperty;var c=(n,e,t)=>e in n?a(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var s=(n,e,t)=>(c(n,typeof e!="symbol"?e+"":e,t),t);import{i as d,w as u}from"./authorize-credit-card-payment-bd9c9d4d.js";/** * Invoice Ninja (https://invoiceninja.com) * * @link https://github.com/invoiceninja/invoiceninja source repository @@ -6,4 +6,4 @@ var a=Object.defineProperty;var c=(n,e,t)=>e in n?a(n,e,{enumerable:!0,configura * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) * * @license https://www.elastic.co/licensing/elastic-license - */class d{constructor(e,t){s(this,"setupStripe",()=>(this.stripeConnect?this.stripe=Stripe(this.key,{stripeAccount:this.stripeConnect}):this.stripe=Stripe(this.key),this));s(this,"payment_data");s(this,"handle",()=>{this.onlyAuthorization?document.getElementById("authorize-bacs").addEventListener("click",e=>{document.getElementById("authorize-bacs").disabled=!0,document.querySelector("#authorize-bacs > svg").classList.remove("hidden"),document.querySelector("#authorize-bacs > span").classList.add("hidden"),location.href=document.querySelector("meta[name=stripe-redirect-url]").content}):(this.payNowButton=document.getElementById("pay-now"),document.getElementById("pay-now").addEventListener("click",e=>{this.payNowButton.disabled=!0,this.payNowButton.querySelector("svg").classList.remove("hidden"),this.payNowButton.querySelector("span").classList.add("hidden"),document.getElementById("server-response").submit()}),this.payment_data=Array.from(document.getElementsByClassName("toggle-payment-with-token")),this.payment_data.length>0?this.payment_data.forEach(e=>e.addEventListener("click",t=>{document.querySelector("input[name=token]").value=t.target.dataset.token})):(this.errors.textContent=document.querySelector("meta[name=translation-payment-method-required]").content,this.errors.hidden=!1,this.payNowButton.disabled=!0,this.payNowButton.querySelector("span").classList.remove("hidden"),this.payNowButton.querySelector("svg").classList.add("hidden")))});this.key=e,this.errors=document.getElementById("errors"),this.stripeConnect=t,this.onlyAuthorization=h}}var o;const u=((o=document.querySelector('meta[name="stripe-publishable-key"]'))==null?void 0:o.content)??"";var r;const l=((r=document.querySelector('meta[name="stripe-account-id"]'))==null?void 0:r.content)??"";var i;const h=((i=document.querySelector('meta[name="only-authorization"]'))==null?void 0:i.content)??"";new d(u,l).setupStripe().handle(); + */class l{constructor(e,t){s(this,"setupStripe",()=>(this.stripeConnect?this.stripe=Stripe(this.key,{stripeAccount:this.stripeConnect}):this.stripe=Stripe(this.key),this));s(this,"payment_data");s(this,"handle",()=>{this.onlyAuthorization?document.getElementById("authorize-bacs").addEventListener("click",e=>{document.getElementById("authorize-bacs").disabled=!0,document.querySelector("#authorize-bacs > svg").classList.remove("hidden"),document.querySelector("#authorize-bacs > span").classList.add("hidden"),location.href=document.querySelector("meta[name=stripe-redirect-url]").content}):(this.payNowButton=document.getElementById("pay-now"),document.getElementById("pay-now").addEventListener("click",e=>{this.payNowButton.disabled=!0,this.payNowButton.querySelector("svg").classList.remove("hidden"),this.payNowButton.querySelector("span").classList.add("hidden"),document.getElementById("server-response").submit()}),this.payment_data=Array.from(document.getElementsByClassName("toggle-payment-with-token")),this.payment_data.length>0?this.payment_data.forEach(e=>e.addEventListener("click",t=>{document.querySelector("input[name=token]").value=t.target.dataset.token})):(this.errors.textContent=document.querySelector("meta[name=translation-payment-method-required]").content,this.errors.hidden=!1,this.payNowButton.disabled=!0,this.payNowButton.querySelector("span").classList.remove("hidden"),this.payNowButton.querySelector("svg").classList.add("hidden")))});this.key=e,this.errors=document.getElementById("errors"),this.stripeConnect=t,this.onlyAuthorization=onlyAuthorization}}function r(){var t,o,i;const n=((t=document.querySelector('meta[name="stripe-publishable-key"]'))==null?void 0:t.content)??"",e=((o=document.querySelector('meta[name="stripe-account-id"]'))==null?void 0:o.content)??"";(i=document.querySelector('meta[name="only-authorization"]'))==null||i.content,new l(n,e).setupStripe().handle()}d()?r():u("#stripe-bacs-payment").then(()=>r()); diff --git a/public/build/assets/stripe-bancontact-93a0a43b.js b/public/build/assets/stripe-bancontact-93a0a43b.js new file mode 100644 index 0000000000..4bf04c1d37 --- /dev/null +++ b/public/build/assets/stripe-bancontact-93a0a43b.js @@ -0,0 +1,9 @@ +var s=Object.defineProperty;var a=(n,t,e)=>t in n?s(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var r=(n,t,e)=>(a(n,typeof t!="symbol"?t+"":t,e),e);import{i,w as m}from"./authorize-credit-card-payment-bd9c9d4d.js";/** + * Invoice Ninja (https://invoiceninja.com) + * + * @link https://github.com/invoiceninja/invoiceninja source repository + * + * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) + * + * @license https://www.elastic.co/licensing/elastic-license + */class l{constructor(t,e){r(this,"setupStripe",()=>(this.stripeConnect?this.stripe=Stripe(this.key,{stripeAccount:this.stripeConnect}):this.stripe=Stripe(this.key),this));r(this,"handle",()=>{document.getElementById("pay-now").addEventListener("click",t=>{let e=document.getElementById("errors");if(!document.getElementById("bancontact-name").value){e.textContent=document.querySelector("meta[name=translation-name-required]").content,e.hidden=!1,console.log("name");return}document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden"),this.stripe.confirmBancontactPayment(document.querySelector("meta[name=pi-client-secret").content,{payment_method:{billing_details:{name:document.getElementById("bancontact-name").value}},return_url:document.querySelector('meta[name="return-url"]').content})})});this.key=t,this.errors=document.getElementById("errors"),this.stripeConnect=e}}function c(){var e,o;const n=((e=document.querySelector('meta[name="stripe-publishable-key"]'))==null?void 0:e.content)??"",t=((o=document.querySelector('meta[name="stripe-account-id"]'))==null?void 0:o.content)??"";new l(n,t).setupStripe().handle()}i()?c():m("#stripe-bancontact-payment").then(()=>c()); diff --git a/public/build/assets/stripe-bancontact-cb004d43.js b/public/build/assets/stripe-bancontact-cb004d43.js deleted file mode 100644 index 5545f86111..0000000000 --- a/public/build/assets/stripe-bancontact-cb004d43.js +++ /dev/null @@ -1,9 +0,0 @@ -var s=Object.defineProperty;var a=(n,e,t)=>e in n?s(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var r=(n,e,t)=>(a(n,typeof e!="symbol"?e+"":e,t),t);/** - * Invoice Ninja (https://invoiceninja.com) - * - * @link https://github.com/invoiceninja/invoiceninja source repository - * - * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) - * - * @license https://www.elastic.co/licensing/elastic-license - */class i{constructor(e,t){r(this,"setupStripe",()=>(this.stripeConnect?this.stripe=Stripe(this.key,{stripeAccount:this.stripeConnect}):this.stripe=Stripe(this.key),this));r(this,"handle",()=>{document.getElementById("pay-now").addEventListener("click",e=>{let t=document.getElementById("errors");if(!document.getElementById("bancontact-name").value){t.textContent=document.querySelector("meta[name=translation-name-required]").content,t.hidden=!1,console.log("name");return}document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden"),this.stripe.confirmBancontactPayment(document.querySelector("meta[name=pi-client-secret").content,{payment_method:{billing_details:{name:document.getElementById("bancontact-name").value}},return_url:document.querySelector('meta[name="return-url"]').content})})});this.key=e,this.errors=document.getElementById("errors"),this.stripeConnect=t}}var o;const m=((o=document.querySelector('meta[name="stripe-publishable-key"]'))==null?void 0:o.content)??"";var c;const l=((c=document.querySelector('meta[name="stripe-account-id"]'))==null?void 0:c.content)??"";new i(m,l).setupStripe().handle(); diff --git a/public/build/assets/stripe-bank-transfer-c3e1a9c7.js b/public/build/assets/stripe-bank-transfer-c3e1a9c7.js new file mode 100644 index 0000000000..77fe60396c --- /dev/null +++ b/public/build/assets/stripe-bank-transfer-c3e1a9c7.js @@ -0,0 +1,9 @@ +import{i as p,w as y}from"./authorize-credit-card-payment-bd9c9d4d.js";/** + * Invoice Ninja (https://invoiceninja.com). + * + * @link https://github.com/invoiceninja/invoiceninja source repository + * + * @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com) + * + * @license https://www.elastic.co/licensing/elastic-license + */p()?c():y("#stripe-bank-transfer-payment").then(()=>c());function c(){var r,o,s;const m=(r=document.querySelector('meta[name="stripe-client-secret"]'))==null?void 0:r.content,i=(o=document.querySelector('meta[name="stripe-return-url"]'))==null?void 0:o.content,d={clientSecret:m,appearance:{theme:"stripe",variables:{colorPrimary:"#0570de",colorBackground:"#ffffff",colorText:"#30313d",colorDanger:"#df1b41",fontFamily:"Ideal Sans, system-ui, sans-serif",spacingUnit:"2px",borderRadius:"4px"}}},e=Stripe(document.querySelector('meta[name="stripe-publishable-key"]').getAttribute("content")),t=((s=document.querySelector('meta[name="stripe-account-id"]'))==null?void 0:s.content)??"";t&&(e.stripeAccount=t);const n=e.elements(d);n.create("payment").mount("#payment-element"),document.getElementById("payment-form").addEventListener("submit",async l=>{l.preventDefault(),document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.add("hidden"),document.querySelector("#pay-now > span").classList.remove("hidden");const{error:a}=await e.confirmPayment({elements:n,confirmParams:{return_url:i}});if(a){document.getElementById("pay-now").disabled=!1,document.querySelector("svg").classList.remove("hidden"),document.querySelector("span").classList.add("hidden");const u=document.querySelector("#errors");u.textContent=a.message}})} diff --git a/public/build/assets/stripe-becs-4d1494ed.js b/public/build/assets/stripe-becs-d51dcef6.js similarity index 82% rename from public/build/assets/stripe-becs-4d1494ed.js rename to public/build/assets/stripe-becs-d51dcef6.js index 9dede5b972..a0590a8c60 100644 --- a/public/build/assets/stripe-becs-4d1494ed.js +++ b/public/build/assets/stripe-becs-d51dcef6.js @@ -1,4 +1,4 @@ -var r=Object.defineProperty;var d=(n,t,e)=>t in n?r(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var o=(n,t,e)=>(d(n,typeof t!="symbol"?t+"":t,e),e);/** +var c=Object.defineProperty;var r=(n,t,e)=>t in n?c(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var o=(n,t,e)=>(r(n,typeof t!="symbol"?t+"":t,e),e);import{i,w as d}from"./authorize-credit-card-payment-bd9c9d4d.js";/** * Invoice Ninja (https://invoiceninja.com) * * @link https://github.com/invoiceninja/invoiceninja source repository @@ -6,4 +6,4 @@ var r=Object.defineProperty;var d=(n,t,e)=>t in n?r(n,t,{enumerable:!0,configura * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) * * @license https://www.elastic.co/licensing/elastic-license - */class i{constructor(t,e){o(this,"setupStripe",()=>{this.stripeConnect?this.stripe=Stripe(this.key,{stripeAccount:this.stripeConnect}):this.stripe=Stripe(this.key);const t=this.stripe.elements(),s={style:{base:{color:"#32325d",fontSize:"16px","::placeholder":{color:"#aab7c4"},":-webkit-autofill":{color:"#32325d"}},invalid:{color:"#fa755a",iconColor:"#fa755a",":-webkit-autofill":{color:"#fa755a"}}},disabled:!1,hideIcon:!1,iconStyle:"default"};return this.auBankAccount=t.create("auBankAccount",s),this.auBankAccount.mount("#becs-iban"),this});o(this,"handle",()=>{document.getElementById("pay-now").addEventListener("click",t=>{let e=document.getElementById("errors");if(document.getElementById("becs-name").value===""){document.getElementById("becs-name").focus(),e.textContent=document.querySelector("meta[name=translation-name-required]").content,e.hidden=!1;return}if(document.getElementById("becs-email-address").value===""){document.getElementById("becs-email-address").focus(),e.textContent=document.querySelector("meta[name=translation-email-required]").content,e.hidden=!1;return}if(!document.getElementById("becs-mandate-acceptance").checked){document.getElementById("becs-mandate-acceptance").focus(),e.textContent=document.querySelector("meta[name=translation-terms-required]").content,e.hidden=!1,console.log("Terms");return}document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden"),this.stripe.confirmAuBecsDebitPayment(document.querySelector("meta[name=pi-client-secret").content,{payment_method:{au_becs_debit:this.auBankAccount,billing_details:{name:document.getElementById("becs-name").value,email:document.getElementById("becs-email-address").value}}}).then(s=>s.error?this.handleFailure(s.error.message):this.handleSuccess(s))})});this.key=t,this.errors=document.getElementById("errors"),this.stripeConnect=e}handleSuccess(t){document.querySelector('input[name="gateway_response"]').value=JSON.stringify(t.paymentIntent),document.getElementById("server-response").submit()}handleFailure(t){let e=document.getElementById("errors");e.textContent="",e.textContent=t,e.hidden=!1,document.getElementById("pay-now").disabled=!1,document.querySelector("#pay-now > svg").classList.add("hidden"),document.querySelector("#pay-now > span").classList.remove("hidden")}}var a;const l=((a=document.querySelector('meta[name="stripe-publishable-key"]'))==null?void 0:a.content)??"";var c;const m=((c=document.querySelector('meta[name="stripe-account-id"]'))==null?void 0:c.content)??"";new i(l,m).setupStripe().handle(); + */class l{constructor(t,e){o(this,"setupStripe",()=>{this.stripeConnect?this.stripe=Stripe(this.key,{stripeAccount:this.stripeConnect}):this.stripe=Stripe(this.key);const t=this.stripe.elements(),s={style:{base:{color:"#32325d",fontSize:"16px","::placeholder":{color:"#aab7c4"},":-webkit-autofill":{color:"#32325d"}},invalid:{color:"#fa755a",iconColor:"#fa755a",":-webkit-autofill":{color:"#fa755a"}}},disabled:!1,hideIcon:!1,iconStyle:"default"};return this.auBankAccount=t.create("auBankAccount",s),this.auBankAccount.mount("#becs-iban"),this});o(this,"handle",()=>{document.getElementById("pay-now").addEventListener("click",t=>{let e=document.getElementById("errors");if(document.getElementById("becs-name").value===""){document.getElementById("becs-name").focus(),e.textContent=document.querySelector("meta[name=translation-name-required]").content,e.hidden=!1;return}if(document.getElementById("becs-email-address").value===""){document.getElementById("becs-email-address").focus(),e.textContent=document.querySelector("meta[name=translation-email-required]").content,e.hidden=!1;return}if(!document.getElementById("becs-mandate-acceptance").checked){document.getElementById("becs-mandate-acceptance").focus(),e.textContent=document.querySelector("meta[name=translation-terms-required]").content,e.hidden=!1,console.log("Terms");return}document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden"),this.stripe.confirmAuBecsDebitPayment(document.querySelector("meta[name=pi-client-secret").content,{payment_method:{au_becs_debit:this.auBankAccount,billing_details:{name:document.getElementById("becs-name").value,email:document.getElementById("becs-email-address").value}}}).then(s=>s.error?this.handleFailure(s.error.message):this.handleSuccess(s))})});this.key=t,this.errors=document.getElementById("errors"),this.stripeConnect=e}handleSuccess(t){document.querySelector('input[name="gateway_response"]').value=JSON.stringify(t.paymentIntent),document.getElementById("server-response").submit()}handleFailure(t){let e=document.getElementById("errors");e.textContent="",e.textContent=t,e.hidden=!1,document.getElementById("pay-now").disabled=!1,document.querySelector("#pay-now > svg").classList.add("hidden"),document.querySelector("#pay-now > span").classList.remove("hidden")}}function a(){var e,s;const n=((e=document.querySelector('meta[name="stripe-publishable-key"]'))==null?void 0:e.content)??"",t=((s=document.querySelector('meta[name="stripe-account-id"]'))==null?void 0:s.content)??"";new l(n,t).setupStripe().handle()}i()?a():d("#stripe-becs-payment").then(()=>a()); diff --git a/public/build/assets/stripe-browserpay-ac78fb26.js b/public/build/assets/stripe-browserpay-81063a43.js similarity index 89% rename from public/build/assets/stripe-browserpay-ac78fb26.js rename to public/build/assets/stripe-browserpay-81063a43.js index 5433bd7931..1280539915 100644 --- a/public/build/assets/stripe-browserpay-ac78fb26.js +++ b/public/build/assets/stripe-browserpay-81063a43.js @@ -1,4 +1,4 @@ -/** +import{i as o,w as i}from"./authorize-credit-card-payment-bd9c9d4d.js";/** * Invoice Ninja (https://invoiceninja.com). * * @link https://github.com/invoiceninja/invoiceninja source repository @@ -6,4 +6,4 @@ * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) * * @license https://www.elastic.co/licensing/elastic-license - */class a{constructor(){var e;this.clientSecret=(e=document.querySelector("meta[name=stripe-pi-client-secret]"))==null?void 0:e.content}init(){var t,n;let e={};return document.querySelector("meta[name=stripe-account-id]")&&(e.apiVersion="2020-08-27",e.stripeAccount=(t=document.querySelector("meta[name=stripe-account-id]"))==null?void 0:t.content),this.stripe=Stripe((n=document.querySelector("meta[name=stripe-publishable-key]"))==null?void 0:n.content,e),this.elements=this.stripe.elements(),this}createPaymentRequest(){return this.paymentRequest=this.stripe.paymentRequest(JSON.parse(document.querySelector("meta[name=payment-request-data").content)),this}createPaymentRequestButton(){this.paymentRequestButton=this.elements.create("paymentRequestButton",{paymentRequest:this.paymentRequest})}handlePaymentRequestEvents(e,t){document.querySelector("#errors").hidden=!0,this.paymentRequest.on("paymentmethod",function(n){e.confirmCardPayment(t,{payment_method:n.paymentMethod.id},{handleActions:!1}).then(function(r){r.error?(document.querySelector("#errors").innerText=r.error.message,document.querySelector("#errors").hidden=!1,n.complete("fail")):(n.complete("success"),r.paymentIntent.status==="requires_action"?e.confirmCardPayment(t).then(function(s){s.error?(n.complete("fail"),document.querySelector("#errors").innerText=s.error.message,document.querySelector("#errors").hidden=!1):(document.querySelector('input[name="gateway_response"]').value=JSON.stringify(s.paymentIntent),document.getElementById("server-response").submit())}):(document.querySelector('input[name="gateway_response"]').value=JSON.stringify(r.paymentIntent),document.getElementById("server-response").submit()))})})}handle(){this.init().createPaymentRequest().createPaymentRequestButton(),this.paymentRequest.canMakePayment().then(e=>{var t;if(e)return this.paymentRequestButton.mount("#payment-request-button");document.querySelector("#errors").innerHTML=JSON.parse((t=document.querySelector("meta[name=no-available-methods]"))==null?void 0:t.content),document.querySelector("#errors").hidden=!1}),this.handlePaymentRequestEvents(this.stripe,this.clientSecret)}}new a().handle(); + */class m{constructor(){var e;this.clientSecret=(e=document.querySelector("meta[name=stripe-pi-client-secret]"))==null?void 0:e.content}init(){var t,n;let e={};return document.querySelector("meta[name=stripe-account-id]")&&(e.apiVersion="2020-08-27",e.stripeAccount=(t=document.querySelector("meta[name=stripe-account-id]"))==null?void 0:t.content),this.stripe=Stripe((n=document.querySelector("meta[name=stripe-publishable-key]"))==null?void 0:n.content,e),this.elements=this.stripe.elements(),this}createPaymentRequest(){return this.paymentRequest=this.stripe.paymentRequest(JSON.parse(document.querySelector("meta[name=payment-request-data").content)),this}createPaymentRequestButton(){this.paymentRequestButton=this.elements.create("paymentRequestButton",{paymentRequest:this.paymentRequest})}handlePaymentRequestEvents(e,t){document.querySelector("#errors").hidden=!0,this.paymentRequest.on("paymentmethod",function(n){e.confirmCardPayment(t,{payment_method:n.paymentMethod.id},{handleActions:!1}).then(function(r){r.error?(document.querySelector("#errors").innerText=r.error.message,document.querySelector("#errors").hidden=!1,n.complete("fail")):(n.complete("success"),r.paymentIntent.status==="requires_action"?e.confirmCardPayment(t).then(function(s){s.error?(n.complete("fail"),document.querySelector("#errors").innerText=s.error.message,document.querySelector("#errors").hidden=!1):(document.querySelector('input[name="gateway_response"]').value=JSON.stringify(s.paymentIntent),document.getElementById("server-response").submit())}):(document.querySelector('input[name="gateway_response"]').value=JSON.stringify(r.paymentIntent),document.getElementById("server-response").submit()))})})}handle(){this.init().createPaymentRequest().createPaymentRequestButton(),this.paymentRequest.canMakePayment().then(e=>{var t;if(e)return this.paymentRequestButton.mount("#payment-request-button");document.querySelector("#errors").innerHTML=JSON.parse((t=document.querySelector("meta[name=no-available-methods]"))==null?void 0:t.content),document.querySelector("#errors").hidden=!1}),this.handlePaymentRequestEvents(this.stripe,this.clientSecret)}}function a(){new m().handle()}o()?a():i("#stripe-browserpay-payment").then(()=>a()); diff --git a/public/build/assets/stripe-credit-card-75322a3b.js b/public/build/assets/stripe-credit-card-843d7cd3.js similarity index 82% rename from public/build/assets/stripe-credit-card-75322a3b.js rename to public/build/assets/stripe-credit-card-843d7cd3.js index c0ed120950..b01af7f0b1 100644 --- a/public/build/assets/stripe-credit-card-75322a3b.js +++ b/public/build/assets/stripe-credit-card-843d7cd3.js @@ -1,9 +1,9 @@ -/** +import{i as c,w as u}from"./authorize-credit-card-payment-bd9c9d4d.js";/** * Invoice Ninja (https://invoiceninja.com) * * @link https://github.com/invoiceninja/invoiceninja source repository * * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) * - * @license https://www.elastic.co/licensing/elastic-license - */class l{constructor(e,t,n,d){this.key=e,this.secret=t,this.onlyAuthorization=n,this.stripeConnect=d}setupStripe(){return this.stripeConnect?this.stripe=Stripe(this.key,{stripeAccount:this.stripeConnect}):this.stripe=Stripe(this.key),this.elements=this.stripe.elements(),this}createElement(){var e;return this.cardElement=this.elements.create("card",{hidePostalCode:((e=document.querySelector("meta[name=stripe-require-postal-code]"))==null?void 0:e.content)==="0",value:{postalCode:document.querySelector("meta[name=client-postal-code]").content},hideIcon:!1}),this}mountCardElement(){return this.cardElement.mount("#card-element"),this}completePaymentUsingToken(){let e=document.querySelector("input[name=token]").value,t=document.getElementById("pay-now");this.payNowButton=t,this.payNowButton.disabled=!0,this.payNowButton.querySelector("svg").classList.remove("hidden"),this.payNowButton.querySelector("span").classList.add("hidden"),this.stripe.handleCardPayment(this.secret,{payment_method:e}).then(n=>n.error?this.handleFailure(n.error.message):this.handleSuccess(n))}completePaymentWithoutToken(){let e=document.getElementById("pay-now");this.payNowButton=e,this.payNowButton.disabled=!0,this.payNowButton.querySelector("svg").classList.remove("hidden"),this.payNowButton.querySelector("span").classList.add("hidden");let t=document.getElementById("cardholder-name");this.stripe.handleCardPayment(this.secret,this.cardElement,{payment_method_data:{billing_details:{name:t.value}}}).then(n=>n.error?this.handleFailure(n.error.message):this.handleSuccess(n))}handleSuccess(e){document.querySelector('input[name="gateway_response"]').value=JSON.stringify(e.paymentIntent);let t=document.querySelector('input[name="token-billing-checkbox"]:checked');t&&(document.querySelector('input[name="store_card"]').value=t.value),document.getElementById("server-response").submit()}handleFailure(e){let t=document.getElementById("errors");t.textContent="",t.textContent=e,t.hidden=!1,this.payNowButton.disabled=!1,this.payNowButton.querySelector("svg").classList.add("hidden"),this.payNowButton.querySelector("span").classList.remove("hidden")}handleAuthorization(){let e=document.getElementById("cardholder-name"),t=document.getElementById("authorize-card");this.payNowButton=t,this.payNowButton.disabled=!0,this.payNowButton.querySelector("svg").classList.remove("hidden"),this.payNowButton.querySelector("span").classList.add("hidden"),this.stripe.handleCardSetup(this.secret,this.cardElement,{payment_method_data:{billing_details:{name:e.value}}}).then(n=>n.error?this.handleFailure(n.error.message):this.handleSuccessfulAuthorization(n))}handleSuccessfulAuthorization(e){document.getElementById("gateway_response").value=JSON.stringify(e.setupIntent),document.getElementById("server_response").submit()}handle(){this.setupStripe(),this.onlyAuthorization?(this.createElement().mountCardElement(),document.getElementById("authorize-card").addEventListener("click",()=>this.handleAuthorization())):(Array.from(document.getElementsByClassName("toggle-payment-with-token")).forEach(e=>e.addEventListener("click",t=>{document.getElementById("stripe--payment-container").classList.add("hidden"),document.getElementById("save-card--container").style.display="none",document.querySelector("input[name=token]").value=t.target.dataset.token})),document.getElementById("toggle-payment-with-credit-card").addEventListener("click",e=>{document.getElementById("stripe--payment-container").classList.remove("hidden"),document.getElementById("save-card--container").style.display="grid",document.querySelector("input[name=token]").value=""}),this.createElement().mountCardElement(),document.getElementById("pay-now").addEventListener("click",()=>{try{return document.querySelector("input[name=token]").value?this.completePaymentUsingToken():this.completePaymentWithoutToken()}catch(e){console.log(e.message)}}))}}var o;const c=((o=document.querySelector('meta[name="stripe-publishable-key"]'))==null?void 0:o.content)??"";var r;const u=((r=document.querySelector('meta[name="stripe-secret"]'))==null?void 0:r.content)??"";var a;const m=((a=document.querySelector('meta[name="only-authorization"]'))==null?void 0:a.content)??"";var s;const h=((s=document.querySelector('meta[name="stripe-account-id"]'))==null?void 0:s.content)??"";let i=new l(c,u,m,h);i.handle();document.addEventListener("livewire:init",()=>{Livewire.on("passed-required-fields-check",()=>i.handle())}); + * @license https://www.elastic.co/licensing/elastic-license + */class m{constructor(e,t,n,r){this.key=e,this.secret=t,this.onlyAuthorization=n,this.stripeConnect=r}setupStripe(){return this.stripeConnect?this.stripe=Stripe(this.key,{stripeAccount:this.stripeConnect}):this.stripe=Stripe(this.key),this.elements=this.stripe.elements(),this}createElement(){var e;return this.cardElement=this.elements.create("card",{hidePostalCode:((e=document.querySelector("meta[name=stripe-require-postal-code]"))==null?void 0:e.content)==="0",value:{postalCode:document.querySelector("meta[name=client-postal-code]").content},hideIcon:!1}),this}mountCardElement(){return this.cardElement.mount("#card-element"),this}completePaymentUsingToken(){let e=document.querySelector("input[name=token]").value,t=document.getElementById("pay-now");this.payNowButton=t,this.payNowButton.disabled=!0,this.payNowButton.querySelector("svg").classList.remove("hidden"),this.payNowButton.querySelector("span").classList.add("hidden"),this.stripe.handleCardPayment(this.secret,{payment_method:e}).then(n=>n.error?this.handleFailure(n.error.message):this.handleSuccess(n))}completePaymentWithoutToken(){let e=document.getElementById("pay-now");this.payNowButton=e,this.payNowButton.disabled=!0,this.payNowButton.querySelector("svg").classList.remove("hidden"),this.payNowButton.querySelector("span").classList.add("hidden");let t=document.getElementById("cardholder-name");this.stripe.handleCardPayment(this.secret,this.cardElement,{payment_method_data:{billing_details:{name:t.value}}}).then(n=>n.error?this.handleFailure(n.error.message):this.handleSuccess(n))}handleSuccess(e){document.querySelector('input[name="gateway_response"]').value=JSON.stringify(e.paymentIntent);let t=document.querySelector('input[name="token-billing-checkbox"]:checked');t&&(document.querySelector('input[name="store_card"]').value=t.value),document.getElementById("server-response").submit()}handleFailure(e){let t=document.getElementById("errors");t.textContent="",t.textContent=e,t.hidden=!1,this.payNowButton.disabled=!1,this.payNowButton.querySelector("svg").classList.add("hidden"),this.payNowButton.querySelector("span").classList.remove("hidden")}handleAuthorization(){let e=document.getElementById("cardholder-name"),t=document.getElementById("authorize-card");this.payNowButton=t,this.payNowButton.disabled=!0,this.payNowButton.querySelector("svg").classList.remove("hidden"),this.payNowButton.querySelector("span").classList.add("hidden"),this.stripe.handleCardSetup(this.secret,this.cardElement,{payment_method_data:{billing_details:{name:e.value}}}).then(n=>n.error?this.handleFailure(n.error.message):this.handleSuccessfulAuthorization(n))}handleSuccessfulAuthorization(e){document.getElementById("gateway_response").value=JSON.stringify(e.setupIntent),document.getElementById("server_response").submit()}handle(){this.setupStripe(),this.onlyAuthorization?(this.createElement().mountCardElement(),document.getElementById("authorize-card").addEventListener("click",()=>this.handleAuthorization())):(Array.from(document.getElementsByClassName("toggle-payment-with-token")).forEach(e=>e.addEventListener("click",t=>{document.getElementById("stripe--payment-container").classList.add("hidden"),document.getElementById("save-card--container").style.display="none",document.querySelector("input[name=token]").value=t.target.dataset.token})),document.getElementById("toggle-payment-with-credit-card").addEventListener("click",e=>{document.getElementById("stripe--payment-container").classList.remove("hidden"),document.getElementById("save-card--container").style.display="grid",document.querySelector("input[name=token]").value=""}),this.createElement().mountCardElement(),document.getElementById("pay-now").addEventListener("click",()=>{try{return document.querySelector("input[name=token]").value?this.completePaymentUsingToken():this.completePaymentWithoutToken()}catch(e){console.log(e.message)}}))}}function l(){var a,s,i,d;const o=((a=document.querySelector('meta[name="stripe-publishable-key"]'))==null?void 0:a.content)??"",e=((s=document.querySelector('meta[name="stripe-secret"]'))==null?void 0:s.content)??"",t=((i=document.querySelector('meta[name="only-authorization"]'))==null?void 0:i.content)??"",n=((d=document.querySelector('meta[name="stripe-account-id"]'))==null?void 0:d.content)??"";new m(o,e,t,n).handle()}c()?l():u("#stripe-credit-card-payment").then(()=>l()); diff --git a/public/build/assets/stripe-eps-6ebc87cd.js b/public/build/assets/stripe-eps-6ebc87cd.js deleted file mode 100644 index 5ca0fc192c..0000000000 --- a/public/build/assets/stripe-eps-6ebc87cd.js +++ /dev/null @@ -1,9 +0,0 @@ -var i=Object.defineProperty;var c=(n,e,t)=>e in n?i(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var s=(n,e,t)=>(c(n,typeof e!="symbol"?e+"":e,t),t);/** - * Invoice Ninja (https://invoiceninja.com) - * - * @link https://github.com/invoiceninja/invoiceninja source repository - * - * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) - * - * @license https://www.elastic.co/licensing/elastic-license - */class a{constructor(e,t){s(this,"setupStripe",()=>{this.stripeConnect?this.stripe=Stripe(this.key,{stripeAccount:this.stripeConnect}):this.stripe=Stripe(this.key);let e=this.stripe.elements();var t={style:{base:{padding:"10px 12px",color:"#32325d",fontSize:"16px","::placeholder":{color:"#aab7c4"}}}};return this.eps=e.create("epsBank",t),this.eps.mount("#eps-bank-element"),this});s(this,"handle",()=>{document.getElementById("pay-now").addEventListener("click",e=>{let t=document.getElementById("errors");if(!document.getElementById("eps-name").value){t.textContent=document.querySelector("meta[name=translation-name-required]").content,t.hidden=!1;return}document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden"),this.stripe.confirmEpsPayment(document.querySelector("meta[name=pi-client-secret").content,{payment_method:{eps:this.eps,billing_details:{name:document.getElementById("eps-name").value}},return_url:document.querySelector('meta[name="return-url"]').content})})});this.key=e,this.errors=document.getElementById("errors"),this.stripeConnect=t}}var r;const l=((r=document.querySelector('meta[name="stripe-publishable-key"]'))==null?void 0:r.content)??"";var o;const m=((o=document.querySelector('meta[name="stripe-account-id"]'))==null?void 0:o.content)??"";new a(l,m).setupStripe().handle(); diff --git a/public/build/assets/stripe-eps-d5e8f1b5.js b/public/build/assets/stripe-eps-d5e8f1b5.js new file mode 100644 index 0000000000..70cb7aef5c --- /dev/null +++ b/public/build/assets/stripe-eps-d5e8f1b5.js @@ -0,0 +1,9 @@ +var i=Object.defineProperty;var a=(n,t,e)=>t in n?i(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var s=(n,t,e)=>(a(n,typeof t!="symbol"?t+"":t,e),e);import{i as c,w as l}from"./authorize-credit-card-payment-bd9c9d4d.js";/** + * Invoice Ninja (https://invoiceninja.com) + * + * @link https://github.com/invoiceninja/invoiceninja source repository + * + * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) + * + * @license https://www.elastic.co/licensing/elastic-license + */class m{constructor(t,e){s(this,"setupStripe",()=>{this.stripeConnect?this.stripe=Stripe(this.key,{stripeAccount:this.stripeConnect}):this.stripe=Stripe(this.key);let t=this.stripe.elements();var e={style:{base:{padding:"10px 12px",color:"#32325d",fontSize:"16px","::placeholder":{color:"#aab7c4"}}}};return this.eps=t.create("epsBank",e),this.eps.mount("#eps-bank-element"),this});s(this,"handle",()=>{document.getElementById("pay-now").addEventListener("click",t=>{let e=document.getElementById("errors");if(!document.getElementById("eps-name").value){e.textContent=document.querySelector("meta[name=translation-name-required]").content,e.hidden=!1;return}document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden"),this.stripe.confirmEpsPayment(document.querySelector("meta[name=pi-client-secret").content,{payment_method:{eps:this.eps,billing_details:{name:document.getElementById("eps-name").value}},return_url:document.querySelector('meta[name="return-url"]').content})})});this.key=t,this.errors=document.getElementById("errors"),this.stripeConnect=e}}function o(){var e,r;const n=((e=document.querySelector('meta[name="stripe-publishable-key"]'))==null?void 0:e.content)??"",t=((r=document.querySelector('meta[name="stripe-account-id"]'))==null?void 0:r.content)??"";new m(n,t).setupStripe().handle()}c()?o():l("#stripe-eps-payment").then(()=>o()); diff --git a/public/build/assets/stripe-fpx-240a05e2.js b/public/build/assets/stripe-fpx-e978b36a.js similarity index 71% rename from public/build/assets/stripe-fpx-240a05e2.js rename to public/build/assets/stripe-fpx-e978b36a.js index 5cf0503f39..0392fdec00 100644 --- a/public/build/assets/stripe-fpx-240a05e2.js +++ b/public/build/assets/stripe-fpx-e978b36a.js @@ -1,4 +1,4 @@ -var i=Object.defineProperty;var c=(n,t,e)=>t in n?i(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var s=(n,t,e)=>(c(n,typeof t!="symbol"?t+"":t,e),e);/** +var i=Object.defineProperty;var a=(n,t,e)=>t in n?i(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var s=(n,t,e)=>(a(n,typeof t!="symbol"?t+"":t,e),e);import{i as c,w as d}from"./authorize-credit-card-payment-bd9c9d4d.js";/** * Invoice Ninja (https://invoiceninja.com) * * @link https://github.com/invoiceninja/invoiceninja source repository @@ -6,4 +6,4 @@ var i=Object.defineProperty;var c=(n,t,e)=>t in n?i(n,t,{enumerable:!0,configura * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) * * @license https://www.elastic.co/licensing/elastic-license - */class d{constructor(t,e){s(this,"setupStripe",()=>{this.stripeConnect?this.stripe=Stripe(this.key,{stripeAccount:this.stripeConnect}):this.stripe=Stripe(this.key);let t=this.stripe.elements(),e={base:{padding:"10px 12px",color:"#32325d",fontSize:"16px"}};return this.fpx=t.create("fpxBank",{style:e,accountHolderType:"individual"}),this.fpx.mount("#fpx-bank-element"),this});s(this,"handle",()=>{document.getElementById("pay-now").addEventListener("click",t=>{document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden"),this.stripe.confirmFpxPayment(document.querySelector("meta[name=pi-client-secret").content,{payment_method:{fpx:this.fpx},return_url:document.querySelector('meta[name="return-url"]').content}).then(e=>{e.error&&this.handleFailure(e.error.message)})})});this.key=t,this.errors=document.getElementById("errors"),this.stripeConnect=e}handleFailure(t){let e=document.getElementById("errors");e.textContent="",e.textContent=t,e.hidden=!1,document.getElementById("pay-now").disabled=!1,document.querySelector("#pay-now > svg").classList.add("hidden"),document.querySelector("#pay-now > span").classList.remove("hidden")}}var r;const a=((r=document.querySelector('meta[name="stripe-publishable-key"]'))==null?void 0:r.content)??"";var o;const l=((o=document.querySelector('meta[name="stripe-account-id"]'))==null?void 0:o.content)??"";new d(a,l).setupStripe().handle(); + */class l{constructor(t,e){s(this,"setupStripe",()=>{this.stripeConnect?this.stripe=Stripe(this.key,{stripeAccount:this.stripeConnect}):this.stripe=Stripe(this.key);let t=this.stripe.elements(),e={base:{padding:"10px 12px",color:"#32325d",fontSize:"16px"}};return this.fpx=t.create("fpxBank",{style:e,accountHolderType:"individual"}),this.fpx.mount("#fpx-bank-element"),this});s(this,"handle",()=>{document.getElementById("pay-now").addEventListener("click",t=>{document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden"),this.stripe.confirmFpxPayment(document.querySelector("meta[name=pi-client-secret").content,{payment_method:{fpx:this.fpx},return_url:document.querySelector('meta[name="return-url"]').content}).then(e=>{e.error&&this.handleFailure(e.error.message)})})});this.key=t,this.errors=document.getElementById("errors"),this.stripeConnect=e}handleFailure(t){let e=document.getElementById("errors");e.textContent="",e.textContent=t,e.hidden=!1,document.getElementById("pay-now").disabled=!1,document.querySelector("#pay-now > svg").classList.add("hidden"),document.querySelector("#pay-now > span").classList.remove("hidden")}}function o(){var e,r;const n=((e=document.querySelector('meta[name="stripe-publishable-key"]'))==null?void 0:e.content)??"",t=((r=document.querySelector('meta[name="stripe-account-id"]'))==null?void 0:r.content)??"";new l(n,t).setupStripe().handle()}c()?o():d("#stripe-fpx-payment").then(()=>o()); diff --git a/public/build/assets/stripe-giropay-9d3bfbab.js b/public/build/assets/stripe-giropay-9d3bfbab.js deleted file mode 100644 index 5440e28415..0000000000 --- a/public/build/assets/stripe-giropay-9d3bfbab.js +++ /dev/null @@ -1,9 +0,0 @@ -var c=Object.defineProperty;var i=(n,e,t)=>e in n?c(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var r=(n,e,t)=>(i(n,typeof e!="symbol"?e+"":e,t),t);/** - * Invoice Ninja (https://invoiceninja.com) - * - * @link https://github.com/invoiceninja/invoiceninja source repository - * - * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) - * - * @license https://www.elastic.co/licensing/elastic-license - */class a{constructor(e,t){r(this,"setupStripe",()=>(this.stripeConnect?this.stripe=Stripe(this.key,{stripeAccount:this.stripeConnect}):this.stripe=Stripe(this.key),this));r(this,"handle",()=>{document.getElementById("pay-now").addEventListener("click",e=>{let t=document.getElementById("errors");if(!document.getElementById("giropay-mandate-acceptance").checked){t.textContent=document.querySelector("meta[name=translation-terms-required]").content,t.hidden=!1,console.log("Terms");return}document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden"),this.stripe.confirmGiropayPayment(document.querySelector("meta[name=pi-client-secret").content,{payment_method:{billing_details:{name:document.getElementById("giropay-name").value}},return_url:document.querySelector('meta[name="return-url"]').content})})});this.key=e,this.errors=document.getElementById("errors"),this.stripeConnect=t}}var o;const d=((o=document.querySelector('meta[name="stripe-publishable-key"]'))==null?void 0:o.content)??"";var s;const m=((s=document.querySelector('meta[name="stripe-account-id"]'))==null?void 0:s.content)??"";new a(d,m).setupStripe().handle(); diff --git a/public/build/assets/stripe-giropay-f7afcb25.js b/public/build/assets/stripe-giropay-f7afcb25.js new file mode 100644 index 0000000000..5d8cf1b1c7 --- /dev/null +++ b/public/build/assets/stripe-giropay-f7afcb25.js @@ -0,0 +1,9 @@ +var i=Object.defineProperty;var c=(n,t,e)=>t in n?i(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var r=(n,t,e)=>(c(n,typeof t!="symbol"?t+"":t,e),e);import{i as a,w as m}from"./authorize-credit-card-payment-bd9c9d4d.js";/** + * Invoice Ninja (https://invoiceninja.com) + * + * @link https://github.com/invoiceninja/invoiceninja source repository + * + * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) + * + * @license https://www.elastic.co/licensing/elastic-license + */class d{constructor(t,e){r(this,"setupStripe",()=>(this.stripeConnect?this.stripe=Stripe(this.key,{stripeAccount:this.stripeConnect}):this.stripe=Stripe(this.key),this));r(this,"handle",()=>{document.getElementById("pay-now").addEventListener("click",t=>{let e=document.getElementById("errors");if(!document.getElementById("giropay-mandate-acceptance").checked){e.textContent=document.querySelector("meta[name=translation-terms-required]").content,e.hidden=!1,console.log("Terms");return}document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden"),this.stripe.confirmGiropayPayment(document.querySelector("meta[name=pi-client-secret").content,{payment_method:{billing_details:{name:document.getElementById("giropay-name").value}},return_url:document.querySelector('meta[name="return-url"]').content})})});this.key=t,this.errors=document.getElementById("errors"),this.stripeConnect=e}}function s(){var e,o;const n=((e=document.querySelector('meta[name="stripe-publishable-key"]'))==null?void 0:e.content)??"",t=((o=document.querySelector('meta[name="stripe-account-id"]'))==null?void 0:o.content)??"";new d(n,t).setupStripe().handle()}a()?s():m("#stripe-giropay-payment").then(()=>s()); diff --git a/public/build/assets/stripe-ideal-3e3b3e7b.js b/public/build/assets/stripe-ideal-3e3b3e7b.js new file mode 100644 index 0000000000..f60290b3cb --- /dev/null +++ b/public/build/assets/stripe-ideal-3e3b3e7b.js @@ -0,0 +1,9 @@ +var s=Object.defineProperty;var a=(n,t,e)=>t in n?s(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var r=(n,t,e)=>(a(n,typeof t!="symbol"?t+"":t,e),e);import{i as l,w as c}from"./authorize-credit-card-payment-bd9c9d4d.js";/** + * Invoice Ninja (https://invoiceninja.com) + * + * @link https://github.com/invoiceninja/invoiceninja source repository + * + * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) + * + * @license https://www.elastic.co/licensing/elastic-license + */class d{constructor(t,e){r(this,"setupStripe",()=>{this.stripeConnect?this.stripe=Stripe(this.key,{stripeAccount:this.stripeConnect}):this.stripe=Stripe(this.key);let t=this.stripe.elements();var e={style:{base:{padding:"10px 12px",color:"#32325d",fontSize:"16px","::placeholder":{color:"#aab7c4"}}}};return this.ideal=t.create("idealBank",e),this.ideal.mount("#ideal-bank-element"),this});r(this,"handle",()=>{document.getElementById("pay-now").addEventListener("click",t=>{let e=document.getElementById("errors");if(!document.getElementById("ideal-name").value){e.textContent=document.querySelector("meta[name=translation-name-required]").content,e.hidden=!1,console.log("name");return}document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden"),this.stripe.confirmIdealPayment(document.querySelector("meta[name=pi-client-secret").content,{payment_method:{ideal:this.ideal,billing_details:{name:document.getElementById("ideal-name").value}},return_url:document.querySelector('meta[name="return-url"]').content})})});this.key=t,this.errors=document.getElementById("errors"),this.stripeConnect=e}}function o(){var e,i;const n=((e=document.querySelector('meta[name="stripe-publishable-key"]'))==null?void 0:e.content)??"",t=((i=document.querySelector('meta[name="stripe-account-id"]'))==null?void 0:i.content)??"";new d(n,t).setupStripe().handle()}l()?o():c("#stripe-ideal-payment").then(()=>o()); diff --git a/public/build/assets/stripe-ideal-efa175e9.js b/public/build/assets/stripe-ideal-efa175e9.js deleted file mode 100644 index fed5af0ad5..0000000000 --- a/public/build/assets/stripe-ideal-efa175e9.js +++ /dev/null @@ -1,9 +0,0 @@ -var o=Object.defineProperty;var a=(n,e,t)=>e in n?o(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var r=(n,e,t)=>(a(n,typeof e!="symbol"?e+"":e,t),t);/** - * Invoice Ninja (https://invoiceninja.com) - * - * @link https://github.com/invoiceninja/invoiceninja source repository - * - * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) - * - * @license https://www.elastic.co/licensing/elastic-license - */class l{constructor(e,t){r(this,"setupStripe",()=>{this.stripeConnect?this.stripe=Stripe(this.key,{stripeAccount:this.stripeConnect}):this.stripe=Stripe(this.key);let e=this.stripe.elements();var t={style:{base:{padding:"10px 12px",color:"#32325d",fontSize:"16px","::placeholder":{color:"#aab7c4"}}}};return this.ideal=e.create("idealBank",t),this.ideal.mount("#ideal-bank-element"),this});r(this,"handle",()=>{document.getElementById("pay-now").addEventListener("click",e=>{let t=document.getElementById("errors");if(!document.getElementById("ideal-name").value){t.textContent=document.querySelector("meta[name=translation-name-required]").content,t.hidden=!1,console.log("name");return}document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden"),this.stripe.confirmIdealPayment(document.querySelector("meta[name=pi-client-secret").content,{payment_method:{ideal:this.ideal,billing_details:{name:document.getElementById("ideal-name").value}},return_url:document.querySelector('meta[name="return-url"]').content})})});this.key=e,this.errors=document.getElementById("errors"),this.stripeConnect=t}}var i;const c=((i=document.querySelector('meta[name="stripe-publishable-key"]'))==null?void 0:i.content)??"";var s;const d=((s=document.querySelector('meta[name="stripe-account-id"]'))==null?void 0:s.content)??"";new l(c,d).setupStripe().handle(); diff --git a/public/build/assets/stripe-klarna-e45c946d.js b/public/build/assets/stripe-klarna-87356b3c.js similarity index 63% rename from public/build/assets/stripe-klarna-e45c946d.js rename to public/build/assets/stripe-klarna-87356b3c.js index 9fda752c30..496b0484f2 100644 --- a/public/build/assets/stripe-klarna-e45c946d.js +++ b/public/build/assets/stripe-klarna-87356b3c.js @@ -1,4 +1,4 @@ -var m=Object.defineProperty;var d=(n,e,t)=>e in n?m(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var r=(n,e,t)=>(d(n,typeof e!="symbol"?e+"":e,t),t);/** +var c=Object.defineProperty;var m=(n,e,t)=>e in n?c(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var o=(n,e,t)=>(m(n,typeof e!="symbol"?e+"":e,t),t);import{i as d,w as i}from"./authorize-credit-card-payment-bd9c9d4d.js";/** * Invoice Ninja (https://invoiceninja.com) * * @link https://github.com/invoiceninja/invoiceninja source repository @@ -6,4 +6,4 @@ var m=Object.defineProperty;var d=(n,e,t)=>e in n?m(n,e,{enumerable:!0,configura * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) * * @license https://www.elastic.co/licensing/elastic-license - */class l{constructor(e,t){r(this,"setupStripe",()=>(this.stripeConnect?this.stripe=Stripe(this.key,{stripeAccount:this.stripeConnect}):this.stripe=Stripe(this.key),this));r(this,"handleError",e=>{document.getElementById("pay-now").disabled=!1,document.querySelector("#pay-now > svg").classList.add("hidden"),document.querySelector("#pay-now > span").classList.remove("hidden"),this.errors.textContent="",this.errors.textContent=e,this.errors.hidden=!1});r(this,"handle",()=>{document.getElementById("pay-now").addEventListener("click",e=>{let t=document.getElementById("errors"),o=document.getElementById("klarna-name").value;/^[A-Za-z\s]*$/.test(o)?(document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden"),this.stripe.confirmKlarnaPayment(document.querySelector("meta[name=pi-client-secret").content,{payment_method:{billing_details:{name:o,email:document.querySelector("meta[name=email]").content,address:{line1:document.querySelector("meta[name=address-1]").content,line2:document.querySelector("meta[name=address-2]").content,city:document.querySelector("meta[name=city]").content,postal_code:document.querySelector("meta[name=postal_code]").content,state:document.querySelector("meta[name=state]").content,country:document.querySelector("meta[name=country]").content}}},return_url:document.querySelector('meta[name="return-url"]').content}).then(a=>{if(a.hasOwnProperty("error"))return this.handleError(a.error.message)})):(document.getElementById("klarna-name-correction").hidden=!1,document.getElementById("klarna-name").textContent=o.replace(/^[A-Za-z\s]*$/,""),document.getElementById("klarna-name").focus(),t.textContent=document.querySelector("meta[name=translation-name-without-special-characters]").content,t.hidden=!1)})});this.key=e,this.errors=document.getElementById("errors"),this.stripeConnect=t}}var c;const i=((c=document.querySelector('meta[name="stripe-publishable-key"]'))==null?void 0:c.content)??"";var s;const u=((s=document.querySelector('meta[name="stripe-account-id"]'))==null?void 0:s.content)??"";new l(i,u).setupStripe().handle(); + */class l{constructor(e,t){o(this,"setupStripe",()=>(this.stripeConnect?this.stripe=Stripe(this.key,{stripeAccount:this.stripeConnect}):this.stripe=Stripe(this.key),this));o(this,"handleError",e=>{document.getElementById("pay-now").disabled=!1,document.querySelector("#pay-now > svg").classList.add("hidden"),document.querySelector("#pay-now > span").classList.remove("hidden"),this.errors.textContent="",this.errors.textContent=e,this.errors.hidden=!1});o(this,"handle",()=>{document.getElementById("pay-now").addEventListener("click",e=>{let t=document.getElementById("errors"),r=document.getElementById("klarna-name").value;/^[A-Za-z\s]*$/.test(r)?(document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden"),this.stripe.confirmKlarnaPayment(document.querySelector("meta[name=pi-client-secret").content,{payment_method:{billing_details:{name:r,email:document.querySelector("meta[name=email]").content,address:{line1:document.querySelector("meta[name=address-1]").content,line2:document.querySelector("meta[name=address-2]").content,city:document.querySelector("meta[name=city]").content,postal_code:document.querySelector("meta[name=postal_code]").content,state:document.querySelector("meta[name=state]").content,country:document.querySelector("meta[name=country]").content}}},return_url:document.querySelector('meta[name="return-url"]').content}).then(a=>{if(a.hasOwnProperty("error"))return this.handleError(a.error.message)})):(document.getElementById("klarna-name-correction").hidden=!1,document.getElementById("klarna-name").textContent=r.replace(/^[A-Za-z\s]*$/,""),document.getElementById("klarna-name").focus(),t.textContent=document.querySelector("meta[name=translation-name-without-special-characters]").content,t.hidden=!1)})});this.key=e,this.errors=document.getElementById("errors"),this.stripeConnect=t}}function s(){var t,r;const n=((t=document.querySelector('meta[name="stripe-publishable-key"]'))==null?void 0:t.content)??"",e=((r=document.querySelector('meta[name="stripe-account-id"]'))==null?void 0:r.content)??"";new l(n,e).setupStripe().handle()}d()?s():i("#stripe-klarna-payment").then(()=>s()); diff --git a/public/build/assets/stripe-przelewy24-f9154acf.js b/public/build/assets/stripe-przelewy24-a6eaf471.js similarity index 80% rename from public/build/assets/stripe-przelewy24-f9154acf.js rename to public/build/assets/stripe-przelewy24-a6eaf471.js index 88a19bfa44..d06e610850 100644 --- a/public/build/assets/stripe-przelewy24-f9154acf.js +++ b/public/build/assets/stripe-przelewy24-a6eaf471.js @@ -1,4 +1,4 @@ -var d=Object.defineProperty;var s=(n,t,e)=>t in n?d(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var o=(n,t,e)=>(s(n,typeof t!="symbol"?t+"":t,e),e);/** +var c=Object.defineProperty;var s=(n,t,e)=>t in n?c(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var o=(n,t,e)=>(s(n,typeof t!="symbol"?t+"":t,e),e);import{i as d,w as m}from"./authorize-credit-card-payment-bd9c9d4d.js";/** * Invoice Ninja (https://invoiceninja.com) * * @link https://github.com/invoiceninja/invoiceninja source repository @@ -6,4 +6,4 @@ var d=Object.defineProperty;var s=(n,t,e)=>t in n?d(n,t,{enumerable:!0,configura * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) * * @license https://www.elastic.co/licensing/elastic-license - */class m{constructor(t,e){o(this,"setupStripe",()=>{this.stripeConnect?this.stripe=Stripe(this.key,{stripeAccount:this.stripeConnect}):this.stripe=Stripe(this.key);let t=this.stripe.elements();var e={style:{base:{padding:"10px 12px",color:"#32325d",fontSize:"16px","::placeholder":{color:"#aab7c4"}}}};return this.p24bank=t.create("p24Bank",e),this.p24bank.mount("#p24-bank-element"),this});o(this,"handle",()=>{document.getElementById("pay-now").addEventListener("click",t=>{let e=document.getElementById("errors");if(document.getElementById("p24-name").value===""){document.getElementById("p24-name").focus(),e.textContent=document.querySelector("meta[name=translation-name-required]").content,e.hidden=!1;return}if(document.getElementById("p24-email-address").value===""){document.getElementById("p24-email-address").focus(),e.textContent=document.querySelector("meta[name=translation-email-required]").content,e.hidden=!1;return}if(!document.getElementById("p24-mandate-acceptance").checked){document.getElementById("p24-mandate-acceptance").focus(),e.textContent=document.querySelector("meta[name=translation-terms-required]").content,e.hidden=!1;return}document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden"),this.stripe.confirmP24Payment(document.querySelector("meta[name=pi-client-secret").content,{payment_method:{p24:this.p24bank,billing_details:{name:document.getElementById("p24-name").value,email:document.getElementById("p24-email-address").value}},payment_method_options:{p24:{tos_shown_and_accepted:document.getElementById("p24-mandate-acceptance").checked}},return_url:document.querySelector('meta[name="return-url"]').content}).then(function(a){a.error?(e.textContent=a.error.message,e.hidden=!1,document.getElementById("pay-now").disabled=!1,document.querySelector("#pay-now > svg").classList.add("hidden"),document.querySelector("#pay-now > span").classList.remove("hidden")):a.paymentIntent.status==="succeeded"&&(window.location=document.querySelector('meta[name="return-url"]').content)})})});this.key=t,this.errors=document.getElementById("errors"),this.stripeConnect=e}}var r;const i=((r=document.querySelector('meta[name="stripe-publishable-key"]'))==null?void 0:r.content)??"";var c;const l=((c=document.querySelector('meta[name="stripe-account-id"]'))==null?void 0:c.content)??"";new m(i,l).setupStripe().handle(); + */class i{constructor(t,e){o(this,"setupStripe",()=>{this.stripeConnect?this.stripe=Stripe(this.key,{stripeAccount:this.stripeConnect}):this.stripe=Stripe(this.key);let t=this.stripe.elements();var e={style:{base:{padding:"10px 12px",color:"#32325d",fontSize:"16px","::placeholder":{color:"#aab7c4"}}}};return this.p24bank=t.create("p24Bank",e),this.p24bank.mount("#p24-bank-element"),this});o(this,"handle",()=>{document.getElementById("pay-now").addEventListener("click",t=>{let e=document.getElementById("errors");if(document.getElementById("p24-name").value===""){document.getElementById("p24-name").focus(),e.textContent=document.querySelector("meta[name=translation-name-required]").content,e.hidden=!1;return}if(document.getElementById("p24-email-address").value===""){document.getElementById("p24-email-address").focus(),e.textContent=document.querySelector("meta[name=translation-email-required]").content,e.hidden=!1;return}if(!document.getElementById("p24-mandate-acceptance").checked){document.getElementById("p24-mandate-acceptance").focus(),e.textContent=document.querySelector("meta[name=translation-terms-required]").content,e.hidden=!1;return}document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden"),this.stripe.confirmP24Payment(document.querySelector("meta[name=pi-client-secret").content,{payment_method:{p24:this.p24bank,billing_details:{name:document.getElementById("p24-name").value,email:document.getElementById("p24-email-address").value}},payment_method_options:{p24:{tos_shown_and_accepted:document.getElementById("p24-mandate-acceptance").checked}},return_url:document.querySelector('meta[name="return-url"]').content}).then(function(a){a.error?(e.textContent=a.error.message,e.hidden=!1,document.getElementById("pay-now").disabled=!1,document.querySelector("#pay-now > svg").classList.add("hidden"),document.querySelector("#pay-now > span").classList.remove("hidden")):a.paymentIntent.status==="succeeded"&&(window.location=document.querySelector('meta[name="return-url"]').content)})})});this.key=t,this.errors=document.getElementById("errors"),this.stripeConnect=e}}function r(){var e,a;const n=((e=document.querySelector('meta[name="stripe-publishable-key"]'))==null?void 0:e.content)??"",t=((a=document.querySelector('meta[name="stripe-account-id"]'))==null?void 0:a.content)??"";new i(n,t).setupStripe().handle()}d()?r():m("#stripe-przelewy24-payment").then(()=>r()); diff --git a/public/build/assets/stripe-sepa-6dd487fc.js b/public/build/assets/stripe-sepa-ac6623b2.js similarity index 88% rename from public/build/assets/stripe-sepa-6dd487fc.js rename to public/build/assets/stripe-sepa-ac6623b2.js index 525db0c1e7..12f6c59569 100644 --- a/public/build/assets/stripe-sepa-6dd487fc.js +++ b/public/build/assets/stripe-sepa-ac6623b2.js @@ -1,4 +1,4 @@ -var s=Object.defineProperty;var l=(a,e,t)=>e in a?s(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var o=(a,e,t)=>(l(a,typeof e!="symbol"?e+"":e,t),t);/** +var s=Object.defineProperty;var c=(a,e,t)=>e in a?s(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var o=(a,e,t)=>(c(a,typeof e!="symbol"?e+"":e,t),t);import{i,w as l}from"./authorize-credit-card-payment-bd9c9d4d.js";/** * Invoice Ninja (https://invoiceninja.com) * * @link https://github.com/invoiceninja/invoiceninja source repository @@ -6,4 +6,4 @@ var s=Object.defineProperty;var l=(a,e,t)=>e in a?s(a,e,{enumerable:!0,configura * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) * * @license https://www.elastic.co/licensing/elastic-license - */class i{constructor(e,t){o(this,"setupStripe",()=>{this.stripeConnect?this.stripe=Stripe(this.key,{stripeAccount:this.stripeConnect}):this.stripe=Stripe(this.key);const e=this.stripe.elements();var t={base:{color:"#32325d",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif',fontSmoothing:"antialiased",fontSize:"16px","::placeholder":{color:"#aab7c4"},":-webkit-autofill":{color:"#32325d"}},invalid:{color:"#fa755a",iconColor:"#fa755a",":-webkit-autofill":{color:"#fa755a"}}},n={style:t,supportedCountries:["SEPA"],placeholderCountry:document.querySelector('meta[name="country"]').content};return this.iban=e.create("iban",n),this.iban.mount("#sepa-iban"),document.getElementById("sepa-name").value=document.querySelector("meta[name=client_name]").content,document.getElementById("sepa-email-address").value=document.querySelector("meta[name=client_email]").content,this});o(this,"handle",()=>{let e=document.getElementById("errors");Array.from(document.getElementsByClassName("toggle-payment-with-token")).forEach(t=>t.addEventListener("click",n=>{document.getElementById("stripe--payment-container").classList.add("hidden"),document.getElementById("save-card--container").style.display="none",document.querySelector("input[name=token]").value=n.target.dataset.token})),document.getElementById("toggle-payment-with-new-bank-account").addEventListener("click",t=>{document.getElementById("stripe--payment-container").classList.remove("hidden"),document.getElementById("save-card--container").style.display="grid",document.querySelector("input[name=token]").value=""}),document.getElementById("pay-now").addEventListener("click",t=>{if(document.querySelector("input[name=token]").value.length!==0)document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden"),this.stripe.confirmSepaDebitPayment(document.querySelector("meta[name=pi-client-secret").content,{payment_method:document.querySelector("input[name=token]").value}).then(n=>n.error?this.handleFailure(n.error.message):this.handleSuccess(n));else{if(document.getElementById("sepa-name").value===""){document.getElementById("sepa-name").focus(),e.textContent=document.querySelector("meta[name=translation-name-required]").content,e.hidden=!1;return}if(document.getElementById("sepa-email-address").value===""){document.getElementById("sepa-email-address").focus(),e.textContent=document.querySelector("meta[name=translation-email-required]").content,e.hidden=!1;return}if(!document.getElementById("sepa-mandate-acceptance").checked){e.textContent=document.querySelector("meta[name=translation-terms-required]").content,e.hidden=!1;return}document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden"),this.stripe.confirmSepaDebitPayment(document.querySelector("meta[name=pi-client-secret").content,{payment_method:{sepa_debit:this.iban,billing_details:{name:document.getElementById("sepa-name").value,email:document.getElementById("sepa-email-address").value}}}).then(n=>n.error?this.handleFailure(n.error.message):this.handleSuccess(n))}})});this.key=e,this.errors=document.getElementById("errors"),this.stripeConnect=t}handleSuccess(e){document.querySelector('input[name="gateway_response"]').value=JSON.stringify(e.paymentIntent);let t=document.querySelector('input[name="token-billing-checkbox"]:checked');t&&(document.querySelector('input[name="store_card"]').value=t.value),document.querySelector("input[name=token]").value.length>2&&(document.querySelector('input[name="store_card"]').value=!1),document.getElementById("server-response").submit()}handleFailure(e){let t=document.getElementById("errors");t.textContent="",t.textContent=e,t.hidden=!1,document.getElementById("pay-now").disabled=!1,document.querySelector("#pay-now > svg").classList.add("hidden"),document.querySelector("#pay-now > span").classList.remove("hidden")}handleSuccess(e){document.querySelector('input[name="gateway_response"]').value=JSON.stringify(e.paymentIntent);let t=document.querySelector('input[name="token-billing-checkbox"]:checked');t&&(document.querySelector('input[name="store_card"]').value=t.value),document.getElementById("server-response").submit()}}var r;const d=((r=document.querySelector('meta[name="stripe-publishable-key"]'))==null?void 0:r.content)??"";var c;const m=((c=document.querySelector('meta[name="stripe-account-id"]'))==null?void 0:c.content)??"";new i(d,m).setupStripe().handle(); + */class d{constructor(e,t){o(this,"setupStripe",()=>{this.stripeConnect?this.stripe=Stripe(this.key,{stripeAccount:this.stripeConnect}):this.stripe=Stripe(this.key);const e=this.stripe.elements();var t={base:{color:"#32325d",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif',fontSmoothing:"antialiased",fontSize:"16px","::placeholder":{color:"#aab7c4"},":-webkit-autofill":{color:"#32325d"}},invalid:{color:"#fa755a",iconColor:"#fa755a",":-webkit-autofill":{color:"#fa755a"}}},n={style:t,supportedCountries:["SEPA"],placeholderCountry:document.querySelector('meta[name="country"]').content};return this.iban=e.create("iban",n),this.iban.mount("#sepa-iban"),document.getElementById("sepa-name").value=document.querySelector("meta[name=client_name]").content,document.getElementById("sepa-email-address").value=document.querySelector("meta[name=client_email]").content,this});o(this,"handle",()=>{let e=document.getElementById("errors");Array.from(document.getElementsByClassName("toggle-payment-with-token")).forEach(t=>t.addEventListener("click",n=>{document.getElementById("stripe--payment-container").classList.add("hidden"),document.getElementById("save-card--container").style.display="none",document.querySelector("input[name=token]").value=n.target.dataset.token})),document.getElementById("toggle-payment-with-new-bank-account").addEventListener("click",t=>{document.getElementById("stripe--payment-container").classList.remove("hidden"),document.getElementById("save-card--container").style.display="grid",document.querySelector("input[name=token]").value=""}),document.getElementById("pay-now").addEventListener("click",t=>{if(document.querySelector("input[name=token]").value.length!==0)document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden"),this.stripe.confirmSepaDebitPayment(document.querySelector("meta[name=pi-client-secret").content,{payment_method:document.querySelector("input[name=token]").value}).then(n=>n.error?this.handleFailure(n.error.message):this.handleSuccess(n));else{if(document.getElementById("sepa-name").value===""){document.getElementById("sepa-name").focus(),e.textContent=document.querySelector("meta[name=translation-name-required]").content,e.hidden=!1;return}if(document.getElementById("sepa-email-address").value===""){document.getElementById("sepa-email-address").focus(),e.textContent=document.querySelector("meta[name=translation-email-required]").content,e.hidden=!1;return}if(!document.getElementById("sepa-mandate-acceptance").checked){e.textContent=document.querySelector("meta[name=translation-terms-required]").content,e.hidden=!1;return}document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden"),this.stripe.confirmSepaDebitPayment(document.querySelector("meta[name=pi-client-secret").content,{payment_method:{sepa_debit:this.iban,billing_details:{name:document.getElementById("sepa-name").value,email:document.getElementById("sepa-email-address").value}}}).then(n=>n.error?this.handleFailure(n.error.message):this.handleSuccess(n))}})});this.key=e,this.errors=document.getElementById("errors"),this.stripeConnect=t}handleSuccess(e){document.querySelector('input[name="gateway_response"]').value=JSON.stringify(e.paymentIntent);let t=document.querySelector('input[name="token-billing-checkbox"]:checked');t&&(document.querySelector('input[name="store_card"]').value=t.value),document.querySelector("input[name=token]").value.length>2&&(document.querySelector('input[name="store_card"]').value=!1),document.getElementById("server-response").submit()}handleFailure(e){let t=document.getElementById("errors");t.textContent="",t.textContent=e,t.hidden=!1,document.getElementById("pay-now").disabled=!1,document.querySelector("#pay-now > svg").classList.add("hidden"),document.querySelector("#pay-now > span").classList.remove("hidden")}handleSuccess(e){document.querySelector('input[name="gateway_response"]').value=JSON.stringify(e.paymentIntent);let t=document.querySelector('input[name="token-billing-checkbox"]:checked');t&&(document.querySelector('input[name="store_card"]').value=t.value),document.getElementById("server-response").submit()}}function r(){var t,n;const a=((t=document.querySelector('meta[name="stripe-publishable-key"]'))==null?void 0:t.content)??"",e=((n=document.querySelector('meta[name="stripe-account-id"]'))==null?void 0:n.content)??"";new d(a,e).setupStripe().handle()}i()?r():l("#stripe-sepa-payment").then(()=>r()); diff --git a/public/build/assets/stripe-sofort-18aeca06.js b/public/build/assets/stripe-sofort-ac0f4ccf.js similarity index 69% rename from public/build/assets/stripe-sofort-18aeca06.js rename to public/build/assets/stripe-sofort-ac0f4ccf.js index bb1601d347..a82c71ecac 100644 --- a/public/build/assets/stripe-sofort-18aeca06.js +++ b/public/build/assets/stripe-sofort-ac0f4ccf.js @@ -1,4 +1,4 @@ -var c=Object.defineProperty;var i=(n,e,t)=>e in n?c(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var r=(n,e,t)=>(i(n,typeof e!="symbol"?e+"":e,t),t);/** +var c=Object.defineProperty;var i=(n,e,t)=>e in n?c(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var r=(n,e,t)=>(i(n,typeof e!="symbol"?e+"":e,t),t);import{i as a,w as u}from"./authorize-credit-card-payment-bd9c9d4d.js";/** * Invoice Ninja (https://invoiceninja.com) * * @link https://github.com/invoiceninja/invoiceninja source repository @@ -6,4 +6,4 @@ var c=Object.defineProperty;var i=(n,e,t)=>e in n?c(n,e,{enumerable:!0,configura * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) * * @license https://www.elastic.co/licensing/elastic-license - */class u{constructor(e,t){r(this,"setupStripe",()=>(this.stripeConnect?this.stripe=Stripe(this.key,{stripeAccount:this.stripeConnect}):this.stripe=Stripe(this.key),this));r(this,"handle",()=>{document.getElementById("pay-now").addEventListener("click",e=>{document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden"),this.stripe.confirmSofortPayment(document.querySelector("meta[name=pi-client-secret").content,{payment_method:{sofort:{country:document.querySelector('meta[name="country"]').content}},return_url:document.querySelector('meta[name="return-url"]').content})})});this.key=e,this.errors=document.getElementById("errors"),this.stripeConnect=t}}var o;const a=((o=document.querySelector('meta[name="stripe-publishable-key"]'))==null?void 0:o.content)??"";var s;const m=((s=document.querySelector('meta[name="stripe-account-id"]'))==null?void 0:s.content)??"";new u(a,m).setupStripe().handle(); + */class m{constructor(e,t){r(this,"setupStripe",()=>(this.stripeConnect?this.stripe=Stripe(this.key,{stripeAccount:this.stripeConnect}):this.stripe=Stripe(this.key),this));r(this,"handle",()=>{document.getElementById("pay-now").addEventListener("click",e=>{document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden"),this.stripe.confirmSofortPayment(document.querySelector("meta[name=pi-client-secret").content,{payment_method:{sofort:{country:document.querySelector('meta[name="country"]').content}},return_url:document.querySelector('meta[name="return-url"]').content})})});this.key=e,this.errors=document.getElementById("errors"),this.stripeConnect=t}}function s(){var t,o;const n=((t=document.querySelector('meta[name="stripe-publishable-key"]'))==null?void 0:t.content)??"",e=((o=document.querySelector('meta[name="stripe-account-id"]'))==null?void 0:o.content)??"";new m(n,e).setupStripe().handle()}a()?s():u("#stripe-sofort-payment").then(()=>s()); diff --git a/public/build/manifest.json b/public/build/manifest.json index ff5ac20124..e58a0e680d 100644 --- a/public/build/manifest.json +++ b/public/build/manifest.json @@ -45,6 +45,14 @@ "isEntry": true, "src": "resources/js/clients/payment_methods/authorize-checkout-card.js" }, + "resources/js/clients/payment_methods/authorize-stripe-acss.js": { + "file": "assets/authorize-stripe-acss-6fe37711.js", + "imports": [ + "resources/js/clients/payments/authorize-credit-card-payment.js" + ], + "isEntry": true, + "src": "resources/js/clients/payment_methods/authorize-stripe-acss.js" + }, "resources/js/clients/payment_methods/braintree-ach.js": { "file": "assets/braintree-ach-b29d040e.js", "isEntry": true, @@ -56,137 +64,228 @@ "src": "resources/js/clients/payment_methods/wepay-bank-account.js" }, "resources/js/clients/payments/authorize-credit-card-payment.js": { - "file": "assets/authorize-credit-card-payment-a217579b.js", + "file": "assets/authorize-credit-card-payment-bd9c9d4d.js", "isEntry": true, "src": "resources/js/clients/payments/authorize-credit-card-payment.js" }, "resources/js/clients/payments/braintree-credit-card.js": { - "file": "assets/braintree-credit-card-1c3f3108.js", + "file": "assets/braintree-credit-card-c80deaab.js", + "imports": [ + "resources/js/clients/payments/authorize-credit-card-payment.js" + ], "isEntry": true, "src": "resources/js/clients/payments/braintree-credit-card.js" }, "resources/js/clients/payments/braintree-paypal.js": { - "file": "assets/braintree-paypal-45391805.js", + "file": "assets/braintree-paypal-cf71d092.js", + "imports": [ + "resources/js/clients/payments/authorize-credit-card-payment.js" + ], "isEntry": true, "src": "resources/js/clients/payments/braintree-paypal.js" }, "resources/js/clients/payments/checkout-credit-card.js": { - "file": "assets/checkout-credit-card-8a04938c.js", + "file": "assets/checkout-credit-card-5435b293.js", + "imports": [ + "resources/js/clients/payments/authorize-credit-card-payment.js" + ], "isEntry": true, "src": "resources/js/clients/payments/checkout-credit-card.js" }, "resources/js/clients/payments/eway-credit-card.js": { - "file": "assets/eway-credit-card-62ce5f3b.js", + "file": "assets/eway-credit-card-319ea034.js", + "imports": [ + "resources/js/clients/payments/authorize-credit-card-payment.js" + ], "isEntry": true, "src": "resources/js/clients/payments/eway-credit-card.js" }, "resources/js/clients/payments/forte-ach-payment.js": { - "file": "assets/forte-ach-payment-2f7fa236.js", + "file": "assets/forte-ach-payment-f051a883.js", + "imports": [ + "resources/js/clients/payments/authorize-credit-card-payment.js" + ], "isEntry": true, "src": "resources/js/clients/payments/forte-ach-payment.js" }, "resources/js/clients/payments/forte-credit-card-payment.js": { - "file": "assets/forte-credit-card-payment-7bb15431.js", + "file": "assets/forte-credit-card-payment-5485d5f0.js", + "imports": [ + "resources/js/clients/payments/authorize-credit-card-payment.js" + ], "isEntry": true, "src": "resources/js/clients/payments/forte-credit-card-payment.js" }, "resources/js/clients/payments/mollie-credit-card.js": { - "file": "assets/mollie-credit-card-db5c26c6.js", + "file": "assets/mollie-credit-card-e1abdd68.js", + "imports": [ + "resources/js/clients/payments/authorize-credit-card-payment.js" + ], "isEntry": true, "src": "resources/js/clients/payments/mollie-credit-card.js" }, "resources/js/clients/payments/paytrace-credit-card.js": { - "file": "assets/paytrace-credit-card-9cea3700.js", + "file": "assets/paytrace-credit-card-f4dfde84.js", + "imports": [ + "resources/js/clients/payments/authorize-credit-card-payment.js" + ], "isEntry": true, "src": "resources/js/clients/payments/paytrace-credit-card.js" }, "resources/js/clients/payments/razorpay-aio.js": { - "file": "assets/razorpay-aio-3d02ff1d.js", + "file": "assets/razorpay-aio-d613afa9.js", + "imports": [ + "resources/js/clients/payments/authorize-credit-card-payment.js" + ], "isEntry": true, "src": "resources/js/clients/payments/razorpay-aio.js" }, "resources/js/clients/payments/square-credit-card.js": { - "file": "assets/square-credit-card-a20464a3.js", + "file": "assets/square-credit-card-83a3d702.js", + "imports": [ + "resources/js/clients/payments/authorize-credit-card-payment.js" + ], "isEntry": true, "src": "resources/js/clients/payments/square-credit-card.js" }, + "resources/js/clients/payments/stripe-ach-pay.js": { + "file": "assets/stripe-ach-pay-0bf320bd.js", + "imports": [ + "resources/js/clients/payments/authorize-credit-card-payment.js" + ], + "isEntry": true, + "src": "resources/js/clients/payments/stripe-ach-pay.js" + }, "resources/js/clients/payments/stripe-ach.js": { "file": "assets/stripe-ach-fe366ca7.js", "isEntry": true, "src": "resources/js/clients/payments/stripe-ach.js" }, "resources/js/clients/payments/stripe-acss.js": { - "file": "assets/stripe-acss-946fe54a.js", + "file": "assets/stripe-acss-dd3e9f85.js", + "imports": [ + "resources/js/clients/payments/authorize-credit-card-payment.js" + ], "isEntry": true, "src": "resources/js/clients/payments/stripe-acss.js" }, "resources/js/clients/payments/stripe-alipay.js": { - "file": "assets/stripe-alipay-00a4a19f.js", + "file": "assets/stripe-alipay-4a3641d0.js", + "imports": [ + "resources/js/clients/payments/authorize-credit-card-payment.js" + ], "isEntry": true, "src": "resources/js/clients/payments/stripe-alipay.js" }, "resources/js/clients/payments/stripe-bacs.js": { - "file": "assets/stripe-bacs-38c8b975.js", + "file": "assets/stripe-bacs-7ec06b1d.js", + "imports": [ + "resources/js/clients/payments/authorize-credit-card-payment.js" + ], "isEntry": true, "src": "resources/js/clients/payments/stripe-bacs.js" }, "resources/js/clients/payments/stripe-bancontact.js": { - "file": "assets/stripe-bancontact-cb004d43.js", + "file": "assets/stripe-bancontact-93a0a43b.js", + "imports": [ + "resources/js/clients/payments/authorize-credit-card-payment.js" + ], "isEntry": true, "src": "resources/js/clients/payments/stripe-bancontact.js" }, + "resources/js/clients/payments/stripe-bank-transfer.js": { + "file": "assets/stripe-bank-transfer-c3e1a9c7.js", + "imports": [ + "resources/js/clients/payments/authorize-credit-card-payment.js" + ], + "isEntry": true, + "src": "resources/js/clients/payments/stripe-bank-transfer.js" + }, "resources/js/clients/payments/stripe-becs.js": { - "file": "assets/stripe-becs-4d1494ed.js", + "file": "assets/stripe-becs-d51dcef6.js", + "imports": [ + "resources/js/clients/payments/authorize-credit-card-payment.js" + ], "isEntry": true, "src": "resources/js/clients/payments/stripe-becs.js" }, "resources/js/clients/payments/stripe-browserpay.js": { - "file": "assets/stripe-browserpay-ac78fb26.js", + "file": "assets/stripe-browserpay-81063a43.js", + "imports": [ + "resources/js/clients/payments/authorize-credit-card-payment.js" + ], "isEntry": true, "src": "resources/js/clients/payments/stripe-browserpay.js" }, "resources/js/clients/payments/stripe-credit-card.js": { - "file": "assets/stripe-credit-card-75322a3b.js", + "file": "assets/stripe-credit-card-843d7cd3.js", + "imports": [ + "resources/js/clients/payments/authorize-credit-card-payment.js" + ], "isEntry": true, "src": "resources/js/clients/payments/stripe-credit-card.js" }, "resources/js/clients/payments/stripe-eps.js": { - "file": "assets/stripe-eps-6ebc87cd.js", + "file": "assets/stripe-eps-d5e8f1b5.js", + "imports": [ + "resources/js/clients/payments/authorize-credit-card-payment.js" + ], "isEntry": true, "src": "resources/js/clients/payments/stripe-eps.js" }, "resources/js/clients/payments/stripe-fpx.js": { - "file": "assets/stripe-fpx-240a05e2.js", + "file": "assets/stripe-fpx-e978b36a.js", + "imports": [ + "resources/js/clients/payments/authorize-credit-card-payment.js" + ], "isEntry": true, "src": "resources/js/clients/payments/stripe-fpx.js" }, "resources/js/clients/payments/stripe-giropay.js": { - "file": "assets/stripe-giropay-9d3bfbab.js", + "file": "assets/stripe-giropay-f7afcb25.js", + "imports": [ + "resources/js/clients/payments/authorize-credit-card-payment.js" + ], "isEntry": true, "src": "resources/js/clients/payments/stripe-giropay.js" }, "resources/js/clients/payments/stripe-ideal.js": { - "file": "assets/stripe-ideal-efa175e9.js", + "file": "assets/stripe-ideal-3e3b3e7b.js", + "imports": [ + "resources/js/clients/payments/authorize-credit-card-payment.js" + ], "isEntry": true, "src": "resources/js/clients/payments/stripe-ideal.js" }, "resources/js/clients/payments/stripe-klarna.js": { - "file": "assets/stripe-klarna-e45c946d.js", + "file": "assets/stripe-klarna-87356b3c.js", + "imports": [ + "resources/js/clients/payments/authorize-credit-card-payment.js" + ], "isEntry": true, "src": "resources/js/clients/payments/stripe-klarna.js" }, "resources/js/clients/payments/stripe-przelewy24.js": { - "file": "assets/stripe-przelewy24-f9154acf.js", + "file": "assets/stripe-przelewy24-a6eaf471.js", + "imports": [ + "resources/js/clients/payments/authorize-credit-card-payment.js" + ], "isEntry": true, "src": "resources/js/clients/payments/stripe-przelewy24.js" }, "resources/js/clients/payments/stripe-sepa.js": { - "file": "assets/stripe-sepa-6dd487fc.js", + "file": "assets/stripe-sepa-ac6623b2.js", + "imports": [ + "resources/js/clients/payments/authorize-credit-card-payment.js" + ], "isEntry": true, "src": "resources/js/clients/payments/stripe-sepa.js" }, "resources/js/clients/payments/stripe-sofort.js": { - "file": "assets/stripe-sofort-18aeca06.js", + "file": "assets/stripe-sofort-ac0f4ccf.js", + "imports": [ + "resources/js/clients/payments/authorize-credit-card-payment.js" + ], "isEntry": true, "src": "resources/js/clients/payments/stripe-sofort.js" }, @@ -240,7 +339,7 @@ "src": "resources/js/setup/setup.js" }, "resources/sass/app.scss": { - "file": "assets/app-06521fee.css", + "file": "assets/app-4e969b65.css", "isEntry": true, "src": "resources/sass/app.scss" } diff --git a/public/vendor/signature_pad@5/signature_pad.js b/public/vendor/signature_pad@5/signature_pad.js new file mode 100644 index 0000000000..5755aea42f --- /dev/null +++ b/public/vendor/signature_pad@5/signature_pad.js @@ -0,0 +1,633 @@ +/*! + * Signature Pad v5.0.2 | https://github.com/szimek/signature_pad + * (c) 2024 Szymon Nowak | Released under the MIT license + */ + +class Point { + constructor(x, y, pressure, time) { + if (isNaN(x) || isNaN(y)) { + throw new Error(`Point is invalid: (${x}, ${y})`); + } + this.x = +x; + this.y = +y; + this.pressure = pressure || 0; + this.time = time || Date.now(); + } + distanceTo(start) { + return Math.sqrt(Math.pow(this.x - start.x, 2) + Math.pow(this.y - start.y, 2)); + } + equals(other) { + return (this.x === other.x && + this.y === other.y && + this.pressure === other.pressure && + this.time === other.time); + } + velocityFrom(start) { + return this.time !== start.time + ? this.distanceTo(start) / (this.time - start.time) + : 0; + } +} + +class Bezier { + static fromPoints(points, widths) { + const c2 = this.calculateControlPoints(points[0], points[1], points[2]).c2; + const c3 = this.calculateControlPoints(points[1], points[2], points[3]).c1; + return new Bezier(points[1], c2, c3, points[2], widths.start, widths.end); + } + static calculateControlPoints(s1, s2, s3) { + const dx1 = s1.x - s2.x; + const dy1 = s1.y - s2.y; + const dx2 = s2.x - s3.x; + const dy2 = s2.y - s3.y; + const m1 = { x: (s1.x + s2.x) / 2.0, y: (s1.y + s2.y) / 2.0 }; + const m2 = { x: (s2.x + s3.x) / 2.0, y: (s2.y + s3.y) / 2.0 }; + const l1 = Math.sqrt(dx1 * dx1 + dy1 * dy1); + const l2 = Math.sqrt(dx2 * dx2 + dy2 * dy2); + const dxm = m1.x - m2.x; + const dym = m1.y - m2.y; + const k = l2 / (l1 + l2); + const cm = { x: m2.x + dxm * k, y: m2.y + dym * k }; + const tx = s2.x - cm.x; + const ty = s2.y - cm.y; + return { + c1: new Point(m1.x + tx, m1.y + ty), + c2: new Point(m2.x + tx, m2.y + ty), + }; + } + constructor(startPoint, control2, control1, endPoint, startWidth, endWidth) { + this.startPoint = startPoint; + this.control2 = control2; + this.control1 = control1; + this.endPoint = endPoint; + this.startWidth = startWidth; + this.endWidth = endWidth; + } + length() { + const steps = 10; + let length = 0; + let px; + let py; + for (let i = 0; i <= steps; i += 1) { + const t = i / steps; + const cx = this.point(t, this.startPoint.x, this.control1.x, this.control2.x, this.endPoint.x); + const cy = this.point(t, this.startPoint.y, this.control1.y, this.control2.y, this.endPoint.y); + if (i > 0) { + const xdiff = cx - px; + const ydiff = cy - py; + length += Math.sqrt(xdiff * xdiff + ydiff * ydiff); + } + px = cx; + py = cy; + } + return length; + } + point(t, start, c1, c2, end) { + return (start * (1.0 - t) * (1.0 - t) * (1.0 - t)) + + (3.0 * c1 * (1.0 - t) * (1.0 - t) * t) + + (3.0 * c2 * (1.0 - t) * t * t) + + (end * t * t * t); + } +} + +class SignatureEventTarget { + constructor() { + try { + this._et = new EventTarget(); + } + catch (error) { + this._et = document; + } + } + addEventListener(type, listener, options) { + this._et.addEventListener(type, listener, options); + } + dispatchEvent(event) { + return this._et.dispatchEvent(event); + } + removeEventListener(type, callback, options) { + this._et.removeEventListener(type, callback, options); + } +} + +function throttle(fn, wait = 250) { + let previous = 0; + let timeout = null; + let result; + let storedContext; + let storedArgs; + const later = () => { + previous = Date.now(); + timeout = null; + result = fn.apply(storedContext, storedArgs); + if (!timeout) { + storedContext = null; + storedArgs = []; + } + }; + return function wrapper(...args) { + const now = Date.now(); + const remaining = wait - (now - previous); + storedContext = this; + storedArgs = args; + if (remaining <= 0 || remaining > wait) { + if (timeout) { + clearTimeout(timeout); + timeout = null; + } + previous = now; + result = fn.apply(storedContext, storedArgs); + if (!timeout) { + storedContext = null; + storedArgs = []; + } + } + else if (!timeout) { + timeout = window.setTimeout(later, remaining); + } + return result; + }; +} + +class SignaturePad extends SignatureEventTarget { + constructor(canvas, options = {}) { + var _a, _b, _c; + super(); + this.canvas = canvas; + this._drawingStroke = false; + this._isEmpty = true; + this._lastPoints = []; + this._data = []; + this._lastVelocity = 0; + this._lastWidth = 0; + this._handleMouseDown = (event) => { + if (!this._isLeftButtonPressed(event, true) || this._drawingStroke) { + return; + } + this._strokeBegin(this._pointerEventToSignatureEvent(event)); + }; + this._handleMouseMove = (event) => { + if (!this._isLeftButtonPressed(event, true) || !this._drawingStroke) { + this._strokeEnd(this._pointerEventToSignatureEvent(event), false); + return; + } + this._strokeMoveUpdate(this._pointerEventToSignatureEvent(event)); + }; + this._handleMouseUp = (event) => { + if (this._isLeftButtonPressed(event)) { + return; + } + this._strokeEnd(this._pointerEventToSignatureEvent(event)); + }; + this._handleTouchStart = (event) => { + if (event.targetTouches.length !== 1 || this._drawingStroke) { + return; + } + if (event.cancelable) { + event.preventDefault(); + } + this._strokeBegin(this._touchEventToSignatureEvent(event)); + }; + this._handleTouchMove = (event) => { + if (event.targetTouches.length !== 1) { + return; + } + if (event.cancelable) { + event.preventDefault(); + } + if (!this._drawingStroke) { + this._strokeEnd(this._touchEventToSignatureEvent(event), false); + return; + } + this._strokeMoveUpdate(this._touchEventToSignatureEvent(event)); + }; + this._handleTouchEnd = (event) => { + if (event.targetTouches.length !== 0) { + return; + } + if (event.cancelable) { + event.preventDefault(); + } + this.canvas.removeEventListener('touchmove', this._handleTouchMove); + this._strokeEnd(this._touchEventToSignatureEvent(event)); + }; + this._handlePointerDown = (event) => { + if (!this._isLeftButtonPressed(event) || this._drawingStroke) { + return; + } + event.preventDefault(); + this._strokeBegin(this._pointerEventToSignatureEvent(event)); + }; + this._handlePointerMove = (event) => { + if (!this._isLeftButtonPressed(event, true) || !this._drawingStroke) { + this._strokeEnd(this._pointerEventToSignatureEvent(event), false); + return; + } + event.preventDefault(); + this._strokeMoveUpdate(this._pointerEventToSignatureEvent(event)); + }; + this._handlePointerUp = (event) => { + if (this._isLeftButtonPressed(event)) { + return; + } + event.preventDefault(); + this._strokeEnd(this._pointerEventToSignatureEvent(event)); + }; + this.velocityFilterWeight = options.velocityFilterWeight || 0.7; + this.minWidth = options.minWidth || 0.5; + this.maxWidth = options.maxWidth || 2.5; + this.throttle = (_a = options.throttle) !== null && _a !== void 0 ? _a : 16; + this.minDistance = (_b = options.minDistance) !== null && _b !== void 0 ? _b : 5; + this.dotSize = options.dotSize || 0; + this.penColor = options.penColor || 'black'; + this.backgroundColor = options.backgroundColor || 'rgba(0,0,0,0)'; + this.compositeOperation = options.compositeOperation || 'source-over'; + this.canvasContextOptions = (_c = options.canvasContextOptions) !== null && _c !== void 0 ? _c : {}; + this._strokeMoveUpdate = this.throttle + ? throttle(SignaturePad.prototype._strokeUpdate, this.throttle) + : SignaturePad.prototype._strokeUpdate; + this._ctx = canvas.getContext('2d', this.canvasContextOptions); + this.clear(); + this.on(); + } + clear() { + const { _ctx: ctx, canvas } = this; + ctx.fillStyle = this.backgroundColor; + ctx.clearRect(0, 0, canvas.width, canvas.height); + ctx.fillRect(0, 0, canvas.width, canvas.height); + this._data = []; + this._reset(this._getPointGroupOptions()); + this._isEmpty = true; + } + fromDataURL(dataUrl, options = {}) { + return new Promise((resolve, reject) => { + const image = new Image(); + const ratio = options.ratio || window.devicePixelRatio || 1; + const width = options.width || this.canvas.width / ratio; + const height = options.height || this.canvas.height / ratio; + const xOffset = options.xOffset || 0; + const yOffset = options.yOffset || 0; + this._reset(this._getPointGroupOptions()); + image.onload = () => { + this._ctx.drawImage(image, xOffset, yOffset, width, height); + resolve(); + }; + image.onerror = (error) => { + reject(error); + }; + image.crossOrigin = 'anonymous'; + image.src = dataUrl; + this._isEmpty = false; + }); + } + toDataURL(type = 'image/png', encoderOptions) { + switch (type) { + case 'image/svg+xml': + if (typeof encoderOptions !== 'object') { + encoderOptions = undefined; + } + return `data:image/svg+xml;base64,${btoa(this.toSVG(encoderOptions))}`; + default: + if (typeof encoderOptions !== 'number') { + encoderOptions = undefined; + } + return this.canvas.toDataURL(type, encoderOptions); + } + } + on() { + this.canvas.style.touchAction = 'none'; + this.canvas.style.msTouchAction = 'none'; + this.canvas.style.userSelect = 'none'; + const isIOS = /Macintosh/.test(navigator.userAgent) && 'ontouchstart' in document; + if (window.PointerEvent && !isIOS) { + this._handlePointerEvents(); + } + else { + this._handleMouseEvents(); + if ('ontouchstart' in window) { + this._handleTouchEvents(); + } + } + } + off() { + this.canvas.style.touchAction = 'auto'; + this.canvas.style.msTouchAction = 'auto'; + this.canvas.style.userSelect = 'auto'; + this.canvas.removeEventListener('pointerdown', this._handlePointerDown); + this.canvas.removeEventListener('mousedown', this._handleMouseDown); + this.canvas.removeEventListener('touchstart', this._handleTouchStart); + this._removeMoveUpEventListeners(); + } + _getListenerFunctions() { + var _a; + const canvasWindow = window.document === this.canvas.ownerDocument + ? window + : (_a = this.canvas.ownerDocument.defaultView) !== null && _a !== void 0 ? _a : this.canvas.ownerDocument; + return { + addEventListener: canvasWindow.addEventListener.bind(canvasWindow), + removeEventListener: canvasWindow.removeEventListener.bind(canvasWindow), + }; + } + _removeMoveUpEventListeners() { + const { removeEventListener } = this._getListenerFunctions(); + removeEventListener('pointermove', this._handlePointerMove); + removeEventListener('pointerup', this._handlePointerUp); + removeEventListener('mousemove', this._handleMouseMove); + removeEventListener('mouseup', this._handleMouseUp); + removeEventListener('touchmove', this._handleTouchMove); + removeEventListener('touchend', this._handleTouchEnd); + } + isEmpty() { + return this._isEmpty; + } + fromData(pointGroups, { clear = true } = {}) { + if (clear) { + this.clear(); + } + this._fromData(pointGroups, this._drawCurve.bind(this), this._drawDot.bind(this)); + this._data = this._data.concat(pointGroups); + } + toData() { + return this._data; + } + _isLeftButtonPressed(event, only) { + if (only) { + return event.buttons === 1; + } + return (event.buttons & 1) === 1; + } + _pointerEventToSignatureEvent(event) { + return { + event: event, + type: event.type, + x: event.clientX, + y: event.clientY, + pressure: 'pressure' in event ? event.pressure : 0, + }; + } + _touchEventToSignatureEvent(event) { + const touch = event.changedTouches[0]; + return { + event: event, + type: event.type, + x: touch.clientX, + y: touch.clientY, + pressure: touch.force, + }; + } + _getPointGroupOptions(group) { + return { + penColor: group && 'penColor' in group ? group.penColor : this.penColor, + dotSize: group && 'dotSize' in group ? group.dotSize : this.dotSize, + minWidth: group && 'minWidth' in group ? group.minWidth : this.minWidth, + maxWidth: group && 'maxWidth' in group ? group.maxWidth : this.maxWidth, + velocityFilterWeight: group && 'velocityFilterWeight' in group + ? group.velocityFilterWeight + : this.velocityFilterWeight, + compositeOperation: group && 'compositeOperation' in group + ? group.compositeOperation + : this.compositeOperation, + }; + } + _strokeBegin(event) { + const cancelled = !this.dispatchEvent(new CustomEvent('beginStroke', { detail: event, cancelable: true })); + if (cancelled) { + return; + } + const { addEventListener } = this._getListenerFunctions(); + switch (event.event.type) { + case 'mousedown': + addEventListener('mousemove', this._handleMouseMove); + addEventListener('mouseup', this._handleMouseUp); + break; + case 'touchstart': + addEventListener('touchmove', this._handleTouchMove); + addEventListener('touchend', this._handleTouchEnd); + break; + case 'pointerdown': + addEventListener('pointermove', this._handlePointerMove); + addEventListener('pointerup', this._handlePointerUp); + break; + } + this._drawingStroke = true; + const pointGroupOptions = this._getPointGroupOptions(); + const newPointGroup = Object.assign(Object.assign({}, pointGroupOptions), { points: [] }); + this._data.push(newPointGroup); + this._reset(pointGroupOptions); + this._strokeUpdate(event); + } + _strokeUpdate(event) { + if (!this._drawingStroke) { + return; + } + if (this._data.length === 0) { + this._strokeBegin(event); + return; + } + this.dispatchEvent(new CustomEvent('beforeUpdateStroke', { detail: event })); + const point = this._createPoint(event.x, event.y, event.pressure); + const lastPointGroup = this._data[this._data.length - 1]; + const lastPoints = lastPointGroup.points; + const lastPoint = lastPoints.length > 0 && lastPoints[lastPoints.length - 1]; + const isLastPointTooClose = lastPoint + ? point.distanceTo(lastPoint) <= this.minDistance + : false; + const pointGroupOptions = this._getPointGroupOptions(lastPointGroup); + if (!lastPoint || !(lastPoint && isLastPointTooClose)) { + const curve = this._addPoint(point, pointGroupOptions); + if (!lastPoint) { + this._drawDot(point, pointGroupOptions); + } + else if (curve) { + this._drawCurve(curve, pointGroupOptions); + } + lastPoints.push({ + time: point.time, + x: point.x, + y: point.y, + pressure: point.pressure, + }); + } + this.dispatchEvent(new CustomEvent('afterUpdateStroke', { detail: event })); + } + _strokeEnd(event, shouldUpdate = true) { + this._removeMoveUpEventListeners(); + if (!this._drawingStroke) { + return; + } + if (shouldUpdate) { + this._strokeUpdate(event); + } + this._drawingStroke = false; + this.dispatchEvent(new CustomEvent('endStroke', { detail: event })); + } + _handlePointerEvents() { + this._drawingStroke = false; + this.canvas.addEventListener('pointerdown', this._handlePointerDown); + } + _handleMouseEvents() { + this._drawingStroke = false; + this.canvas.addEventListener('mousedown', this._handleMouseDown); + } + _handleTouchEvents() { + this.canvas.addEventListener('touchstart', this._handleTouchStart); + } + _reset(options) { + this._lastPoints = []; + this._lastVelocity = 0; + this._lastWidth = (options.minWidth + options.maxWidth) / 2; + this._ctx.fillStyle = options.penColor; + this._ctx.globalCompositeOperation = options.compositeOperation; + } + _createPoint(x, y, pressure) { + const rect = this.canvas.getBoundingClientRect(); + return new Point(x - rect.left, y - rect.top, pressure, new Date().getTime()); + } + _addPoint(point, options) { + const { _lastPoints } = this; + _lastPoints.push(point); + if (_lastPoints.length > 2) { + if (_lastPoints.length === 3) { + _lastPoints.unshift(_lastPoints[0]); + } + const widths = this._calculateCurveWidths(_lastPoints[1], _lastPoints[2], options); + const curve = Bezier.fromPoints(_lastPoints, widths); + _lastPoints.shift(); + return curve; + } + return null; + } + _calculateCurveWidths(startPoint, endPoint, options) { + const velocity = options.velocityFilterWeight * endPoint.velocityFrom(startPoint) + + (1 - options.velocityFilterWeight) * this._lastVelocity; + const newWidth = this._strokeWidth(velocity, options); + const widths = { + end: newWidth, + start: this._lastWidth, + }; + this._lastVelocity = velocity; + this._lastWidth = newWidth; + return widths; + } + _strokeWidth(velocity, options) { + return Math.max(options.maxWidth / (velocity + 1), options.minWidth); + } + _drawCurveSegment(x, y, width) { + const ctx = this._ctx; + ctx.moveTo(x, y); + ctx.arc(x, y, width, 0, 2 * Math.PI, false); + this._isEmpty = false; + } + _drawCurve(curve, options) { + const ctx = this._ctx; + const widthDelta = curve.endWidth - curve.startWidth; + const drawSteps = Math.ceil(curve.length()) * 2; + ctx.beginPath(); + ctx.fillStyle = options.penColor; + for (let i = 0; i < drawSteps; i += 1) { + const t = i / drawSteps; + const tt = t * t; + const ttt = tt * t; + const u = 1 - t; + const uu = u * u; + const uuu = uu * u; + let x = uuu * curve.startPoint.x; + x += 3 * uu * t * curve.control1.x; + x += 3 * u * tt * curve.control2.x; + x += ttt * curve.endPoint.x; + let y = uuu * curve.startPoint.y; + y += 3 * uu * t * curve.control1.y; + y += 3 * u * tt * curve.control2.y; + y += ttt * curve.endPoint.y; + const width = Math.min(curve.startWidth + ttt * widthDelta, options.maxWidth); + this._drawCurveSegment(x, y, width); + } + ctx.closePath(); + ctx.fill(); + } + _drawDot(point, options) { + const ctx = this._ctx; + const width = options.dotSize > 0 + ? options.dotSize + : (options.minWidth + options.maxWidth) / 2; + ctx.beginPath(); + this._drawCurveSegment(point.x, point.y, width); + ctx.closePath(); + ctx.fillStyle = options.penColor; + ctx.fill(); + } + _fromData(pointGroups, drawCurve, drawDot) { + for (const group of pointGroups) { + const { points } = group; + const pointGroupOptions = this._getPointGroupOptions(group); + if (points.length > 1) { + for (let j = 0; j < points.length; j += 1) { + const basicPoint = points[j]; + const point = new Point(basicPoint.x, basicPoint.y, basicPoint.pressure, basicPoint.time); + if (j === 0) { + this._reset(pointGroupOptions); + } + const curve = this._addPoint(point, pointGroupOptions); + if (curve) { + drawCurve(curve, pointGroupOptions); + } + } + } + else { + this._reset(pointGroupOptions); + drawDot(points[0], pointGroupOptions); + } + } + } + toSVG({ includeBackgroundColor = false } = {}) { + const pointGroups = this._data; + const ratio = Math.max(window.devicePixelRatio || 1, 1); + const minX = 0; + const minY = 0; + const maxX = this.canvas.width / ratio; + const maxY = this.canvas.height / ratio; + const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); + svg.setAttribute('xmlns', 'http://www.w3.org/2000/svg'); + svg.setAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink'); + svg.setAttribute('viewBox', `${minX} ${minY} ${maxX} ${maxY}`); + svg.setAttribute('width', maxX.toString()); + svg.setAttribute('height', maxY.toString()); + if (includeBackgroundColor && this.backgroundColor) { + const rect = document.createElement('rect'); + rect.setAttribute('width', '100%'); + rect.setAttribute('height', '100%'); + rect.setAttribute('fill', this.backgroundColor); + svg.appendChild(rect); + } + this._fromData(pointGroups, (curve, { penColor }) => { + const path = document.createElement('path'); + if (!isNaN(curve.control1.x) && + !isNaN(curve.control1.y) && + !isNaN(curve.control2.x) && + !isNaN(curve.control2.y)) { + const attr = `M ${curve.startPoint.x.toFixed(3)},${curve.startPoint.y.toFixed(3)} ` + + `C ${curve.control1.x.toFixed(3)},${curve.control1.y.toFixed(3)} ` + + `${curve.control2.x.toFixed(3)},${curve.control2.y.toFixed(3)} ` + + `${curve.endPoint.x.toFixed(3)},${curve.endPoint.y.toFixed(3)}`; + path.setAttribute('d', attr); + path.setAttribute('stroke-width', (curve.endWidth * 2.25).toFixed(3)); + path.setAttribute('stroke', penColor); + path.setAttribute('fill', 'none'); + path.setAttribute('stroke-linecap', 'round'); + svg.appendChild(path); + } + }, (point, { penColor, dotSize, minWidth, maxWidth }) => { + const circle = document.createElement('circle'); + const size = dotSize > 0 ? dotSize : (minWidth + maxWidth) / 2; + circle.setAttribute('r', size.toString()); + circle.setAttribute('cx', point.x.toString()); + circle.setAttribute('cy', point.y.toString()); + circle.setAttribute('fill', penColor); + svg.appendChild(circle); + }); + return svg.outerHTML; + } +} + +export { SignaturePad as default }; +//# sourceMappingURL=signature_pad.js.map diff --git a/public/vendor/signature_pad@5/signature_pad.js.map b/public/vendor/signature_pad@5/signature_pad.js.map new file mode 100644 index 0000000000..30373d84e3 --- /dev/null +++ b/public/vendor/signature_pad@5/signature_pad.js.map @@ -0,0 +1 @@ +{"version":3,"file":"signature_pad.js","sources":["../src/point.ts","../src/bezier.ts","../src/signature_event_target.ts","../src/throttle.ts","../src/signature_pad.ts"],"sourcesContent":["// Interface for point data structure used e.g. in SignaturePad#fromData method\nexport interface BasicPoint {\n x: number;\n y: number;\n pressure: number;\n time: number;\n}\n\nexport class Point implements BasicPoint {\n public x: number;\n public y: number;\n public pressure: number;\n public time: number;\n\n constructor(x: number, y: number, pressure?: number, time?: number) {\n if (isNaN(x) || isNaN(y)) {\n throw new Error(`Point is invalid: (${x}, ${y})`);\n }\n this.x = +x;\n this.y = +y;\n this.pressure = pressure || 0;\n this.time = time || Date.now();\n }\n\n public distanceTo(start: BasicPoint): number {\n return Math.sqrt(\n Math.pow(this.x - start.x, 2) + Math.pow(this.y - start.y, 2),\n );\n }\n\n public equals(other: BasicPoint): boolean {\n return (\n this.x === other.x &&\n this.y === other.y &&\n this.pressure === other.pressure &&\n this.time === other.time\n );\n }\n\n public velocityFrom(start: BasicPoint): number {\n return this.time !== start.time\n ? this.distanceTo(start) / (this.time - start.time)\n : 0;\n }\n}\n","import { BasicPoint, Point } from './point';\n\nexport class Bezier {\n public static fromPoints(\n points: Point[],\n widths: { start: number; end: number },\n ): Bezier {\n const c2 = this.calculateControlPoints(points[0], points[1], points[2]).c2;\n const c3 = this.calculateControlPoints(points[1], points[2], points[3]).c1;\n\n return new Bezier(points[1], c2, c3, points[2], widths.start, widths.end);\n }\n\n private static calculateControlPoints(\n s1: BasicPoint,\n s2: BasicPoint,\n s3: BasicPoint,\n ): {\n c1: BasicPoint;\n c2: BasicPoint;\n } {\n const dx1 = s1.x - s2.x;\n const dy1 = s1.y - s2.y;\n const dx2 = s2.x - s3.x;\n const dy2 = s2.y - s3.y;\n\n const m1 = { x: (s1.x + s2.x) / 2.0, y: (s1.y + s2.y) / 2.0 };\n const m2 = { x: (s2.x + s3.x) / 2.0, y: (s2.y + s3.y) / 2.0 };\n\n const l1 = Math.sqrt(dx1 * dx1 + dy1 * dy1);\n const l2 = Math.sqrt(dx2 * dx2 + dy2 * dy2);\n\n const dxm = m1.x - m2.x;\n const dym = m1.y - m2.y;\n\n const k = l2 / (l1 + l2);\n const cm = { x: m2.x + dxm * k, y: m2.y + dym * k };\n\n const tx = s2.x - cm.x;\n const ty = s2.y - cm.y;\n\n return {\n c1: new Point(m1.x + tx, m1.y + ty),\n c2: new Point(m2.x + tx, m2.y + ty),\n };\n }\n\n constructor(\n public startPoint: Point,\n public control2: BasicPoint,\n public control1: BasicPoint,\n public endPoint: Point,\n public startWidth: number,\n public endWidth: number,\n ) {}\n\n // Returns approximated length. Code taken from https://www.lemoda.net/maths/bezier-length/index.html.\n public length(): number {\n const steps = 10;\n let length = 0;\n let px;\n let py;\n\n for (let i = 0; i <= steps; i += 1) {\n const t = i / steps;\n const cx = this.point(\n t,\n this.startPoint.x,\n this.control1.x,\n this.control2.x,\n this.endPoint.x,\n );\n const cy = this.point(\n t,\n this.startPoint.y,\n this.control1.y,\n this.control2.y,\n this.endPoint.y,\n );\n\n if (i > 0) {\n const xdiff = cx - (px as number);\n const ydiff = cy - (py as number);\n\n length += Math.sqrt(xdiff * xdiff + ydiff * ydiff);\n }\n\n px = cx;\n py = cy;\n }\n\n return length;\n }\n\n // Calculate parametric value of x or y given t and the four point coordinates of a cubic bezier curve.\n private point(\n t: number,\n start: number,\n c1: number,\n c2: number,\n end: number,\n ): number {\n // prettier-ignore\n return ( start * (1.0 - t) * (1.0 - t) * (1.0 - t))\n + (3.0 * c1 * (1.0 - t) * (1.0 - t) * t)\n + (3.0 * c2 * (1.0 - t) * t * t)\n + ( end * t * t * t);\n }\n}\n","export class SignatureEventTarget {\n /* tslint:disable: variable-name */\n private _et: EventTarget;\n /* tslint:enable: variable-name */\n\n constructor() {\n try {\n this._et = new EventTarget();\n } catch (error) {\n // Using document as EventTarget to support iOS 13 and older.\n // Because EventTarget constructor just exists at iOS 14 and later.\n this._et = document;\n }\n }\n\n addEventListener(\n type: string,\n listener: EventListenerOrEventListenerObject | null,\n options?: boolean | AddEventListenerOptions,\n ): void {\n this._et.addEventListener(type, listener, options);\n }\n\n dispatchEvent(event: Event): boolean {\n return this._et.dispatchEvent(event);\n }\n\n removeEventListener(\n type: string,\n callback: EventListenerOrEventListenerObject | null,\n options?: boolean | EventListenerOptions,\n ): void {\n this._et.removeEventListener(type, callback, options);\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-this-alias */\n// Slightly simplified version of http://stackoverflow.com/a/27078401/815507\n\nexport function throttle(\n fn: (...args: any[]) => any,\n wait = 250,\n): (this: any, ...args: any[]) => any {\n let previous = 0;\n let timeout: number | null = null;\n let result: any;\n let storedContext: any;\n let storedArgs: any[];\n\n const later = (): void => {\n previous = Date.now();\n timeout = null;\n result = fn.apply(storedContext, storedArgs);\n\n if (!timeout) {\n storedContext = null;\n storedArgs = [];\n }\n };\n\n return function wrapper(this: any, ...args: any[]): any {\n const now = Date.now();\n const remaining = wait - (now - previous);\n\n storedContext = this;\n storedArgs = args;\n\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n\n previous = now;\n result = fn.apply(storedContext, storedArgs);\n\n if (!timeout) {\n storedContext = null;\n storedArgs = [];\n }\n } else if (!timeout) {\n timeout = window.setTimeout(later, remaining);\n }\n\n return result;\n };\n}\n","/**\n * The main idea and some parts of the code (e.g. drawing variable width Bézier curve) are taken from:\n * http://corner.squareup.com/2012/07/smoother-signatures.html\n *\n * Implementation of interpolation using cubic Bézier curves is taken from:\n * https://web.archive.org/web/20160323213433/http://www.benknowscode.com/2012/09/path-interpolation-using-cubic-bezier_9742.html\n *\n * Algorithm for approximated length of a Bézier curve is taken from:\n * http://www.lemoda.net/maths/bezier-length/index.html\n */\n\nimport { Bezier } from './bezier';\nimport { BasicPoint, Point } from './point';\nimport { SignatureEventTarget } from './signature_event_target';\nimport { throttle } from './throttle';\n\nexport interface SignatureEvent {\n event: MouseEvent | TouchEvent | PointerEvent;\n type: string;\n x: number;\n y: number;\n pressure: number;\n}\n\nexport interface FromDataOptions {\n clear?: boolean;\n}\n\nexport interface ToSVGOptions {\n includeBackgroundColor?: boolean;\n}\n\nexport interface PointGroupOptions {\n dotSize: number;\n minWidth: number;\n maxWidth: number;\n penColor: string;\n velocityFilterWeight: number;\n /**\n * This is the globalCompositeOperation for the line.\n * *default: 'source-over'*\n * @see https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation\n */\n compositeOperation: GlobalCompositeOperation;\n}\n\nexport interface Options extends Partial {\n minDistance?: number;\n backgroundColor?: string;\n throttle?: number;\n canvasContextOptions?: CanvasRenderingContext2DSettings;\n}\n\nexport interface PointGroup extends PointGroupOptions {\n points: BasicPoint[];\n}\n\nexport default class SignaturePad extends SignatureEventTarget {\n // Public stuff\n public dotSize: number;\n public minWidth: number;\n public maxWidth: number;\n public penColor: string;\n public minDistance: number;\n public velocityFilterWeight: number;\n public compositeOperation: GlobalCompositeOperation;\n public backgroundColor: string;\n public throttle: number;\n public canvasContextOptions: CanvasRenderingContext2DSettings;\n\n // Private stuff\n /* tslint:disable: variable-name */\n private _ctx: CanvasRenderingContext2D;\n private _drawingStroke = false;\n private _isEmpty = true;\n private _lastPoints: Point[] = []; // Stores up to 4 most recent points; used to generate a new curve\n private _data: PointGroup[] = []; // Stores all points in groups (one group per line or dot)\n private _lastVelocity = 0;\n private _lastWidth = 0;\n private _strokeMoveUpdate: (event: SignatureEvent) => void;\n /* tslint:enable: variable-name */\n\n constructor(\n private canvas: HTMLCanvasElement,\n options: Options = {},\n ) {\n super();\n this.velocityFilterWeight = options.velocityFilterWeight || 0.7;\n this.minWidth = options.minWidth || 0.5;\n this.maxWidth = options.maxWidth || 2.5;\n\n // We need to handle 0 value, so use `??` instead of `||`\n this.throttle = options.throttle ?? 16; // in milliseconds\n this.minDistance = options.minDistance ?? 5; // in pixels\n this.dotSize = options.dotSize || 0;\n this.penColor = options.penColor || 'black';\n this.backgroundColor = options.backgroundColor || 'rgba(0,0,0,0)';\n this.compositeOperation = options.compositeOperation || 'source-over';\n this.canvasContextOptions = options.canvasContextOptions ?? {};\n\n this._strokeMoveUpdate = this.throttle\n ? throttle(SignaturePad.prototype._strokeUpdate, this.throttle)\n : SignaturePad.prototype._strokeUpdate;\n this._ctx = canvas.getContext(\n '2d',\n this.canvasContextOptions,\n ) as CanvasRenderingContext2D;\n\n this.clear();\n\n // Enable mouse and touch event handlers\n this.on();\n }\n\n public clear(): void {\n const { _ctx: ctx, canvas } = this;\n\n // Clear canvas using background color\n ctx.fillStyle = this.backgroundColor;\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n\n this._data = [];\n this._reset(this._getPointGroupOptions());\n this._isEmpty = true;\n }\n\n public fromDataURL(\n dataUrl: string,\n options: {\n ratio?: number;\n width?: number;\n height?: number;\n xOffset?: number;\n yOffset?: number;\n } = {},\n ): Promise {\n return new Promise((resolve, reject) => {\n const image = new Image();\n const ratio = options.ratio || window.devicePixelRatio || 1;\n const width = options.width || this.canvas.width / ratio;\n const height = options.height || this.canvas.height / ratio;\n const xOffset = options.xOffset || 0;\n const yOffset = options.yOffset || 0;\n\n this._reset(this._getPointGroupOptions());\n\n image.onload = (): void => {\n this._ctx.drawImage(image, xOffset, yOffset, width, height);\n resolve();\n };\n image.onerror = (error): void => {\n reject(error);\n };\n image.crossOrigin = 'anonymous';\n image.src = dataUrl;\n\n this._isEmpty = false;\n });\n }\n\n public toDataURL(\n type: 'image/svg+xml',\n encoderOptions?: ToSVGOptions,\n ): string;\n public toDataURL(type?: string, encoderOptions?: number): string;\n public toDataURL(\n type = 'image/png',\n encoderOptions?: number | ToSVGOptions | undefined,\n ): string {\n switch (type) {\n case 'image/svg+xml':\n if (typeof encoderOptions !== 'object') {\n encoderOptions = undefined;\n }\n return `data:image/svg+xml;base64,${btoa(\n this.toSVG(encoderOptions as ToSVGOptions),\n )}`;\n default:\n if (typeof encoderOptions !== 'number') {\n encoderOptions = undefined;\n }\n return this.canvas.toDataURL(type, encoderOptions);\n }\n }\n\n public on(): void {\n // Disable panning/zooming when touching canvas element\n this.canvas.style.touchAction = 'none';\n (this.canvas.style as CSSStyleDeclaration & { msTouchAction: string | null }).msTouchAction = 'none';\n this.canvas.style.userSelect = 'none';\n\n const isIOS =\n /Macintosh/.test(navigator.userAgent) && 'ontouchstart' in document;\n\n // The \"Scribble\" feature of iOS intercepts point events. So that we can\n // lose some of them when tapping rapidly. Use touch events for iOS\n // platforms to prevent it. See\n // https://developer.apple.com/forums/thread/664108 for more information.\n if (window.PointerEvent && !isIOS) {\n this._handlePointerEvents();\n } else {\n this._handleMouseEvents();\n\n if ('ontouchstart' in window) {\n this._handleTouchEvents();\n }\n }\n }\n\n public off(): void {\n // Enable panning/zooming when touching canvas element\n this.canvas.style.touchAction = 'auto';\n (this.canvas.style as CSSStyleDeclaration & { msTouchAction: string | null }).msTouchAction = 'auto';\n this.canvas.style.userSelect = 'auto';\n\n this.canvas.removeEventListener('pointerdown', this._handlePointerDown);\n this.canvas.removeEventListener('mousedown', this._handleMouseDown);\n this.canvas.removeEventListener('touchstart', this._handleTouchStart);\n\n this._removeMoveUpEventListeners();\n }\n\n private _getListenerFunctions() {\n const canvasWindow =\n window.document === this.canvas.ownerDocument\n ? window\n : this.canvas.ownerDocument.defaultView ?? this.canvas.ownerDocument;\n\n return {\n addEventListener: canvasWindow.addEventListener.bind(\n canvasWindow,\n ) as typeof window.addEventListener,\n removeEventListener: canvasWindow.removeEventListener.bind(\n canvasWindow,\n ) as typeof window.removeEventListener,\n };\n }\n\n private _removeMoveUpEventListeners(): void {\n const { removeEventListener } = this._getListenerFunctions();\n removeEventListener('pointermove', this._handlePointerMove);\n removeEventListener('pointerup', this._handlePointerUp);\n\n removeEventListener('mousemove', this._handleMouseMove);\n removeEventListener('mouseup', this._handleMouseUp);\n\n removeEventListener('touchmove', this._handleTouchMove);\n removeEventListener('touchend', this._handleTouchEnd);\n }\n\n public isEmpty(): boolean {\n return this._isEmpty;\n }\n\n public fromData(\n pointGroups: PointGroup[],\n { clear = true }: FromDataOptions = {},\n ): void {\n if (clear) {\n this.clear();\n }\n\n this._fromData(\n pointGroups,\n this._drawCurve.bind(this),\n this._drawDot.bind(this),\n );\n\n this._data = this._data.concat(pointGroups);\n }\n\n public toData(): PointGroup[] {\n return this._data;\n }\n\n public _isLeftButtonPressed(event: MouseEvent, only?: boolean): boolean {\n if (only) {\n return event.buttons === 1;\n }\n\n return (event.buttons & 1) === 1;\n }\n private _pointerEventToSignatureEvent(\n event: MouseEvent | PointerEvent,\n ): SignatureEvent {\n return {\n event: event,\n type: event.type,\n x: event.clientX,\n y: event.clientY,\n pressure: 'pressure' in event ? event.pressure : 0,\n };\n }\n\n private _touchEventToSignatureEvent(event: TouchEvent): SignatureEvent {\n const touch = event.changedTouches[0];\n return {\n event: event,\n type: event.type,\n x: touch.clientX,\n y: touch.clientY,\n pressure: touch.force,\n };\n }\n\n // Event handlers\n private _handleMouseDown = (event: MouseEvent): void => {\n if (!this._isLeftButtonPressed(event, true) || this._drawingStroke) {\n return;\n }\n this._strokeBegin(this._pointerEventToSignatureEvent(event));\n };\n\n private _handleMouseMove = (event: MouseEvent): void => {\n if (!this._isLeftButtonPressed(event, true) || !this._drawingStroke) {\n // Stop when not pressing primary button or pressing multiple buttons\n this._strokeEnd(this._pointerEventToSignatureEvent(event), false);\n return;\n }\n\n this._strokeMoveUpdate(this._pointerEventToSignatureEvent(event));\n };\n\n private _handleMouseUp = (event: MouseEvent): void => {\n if (this._isLeftButtonPressed(event)) {\n return;\n }\n\n this._strokeEnd(this._pointerEventToSignatureEvent(event));\n };\n\n private _handleTouchStart = (event: TouchEvent): void => {\n if (event.targetTouches.length !== 1 || this._drawingStroke) {\n return;\n }\n\n // Prevent scrolling.\n if (event.cancelable) {\n event.preventDefault();\n }\n\n this._strokeBegin(this._touchEventToSignatureEvent(event));\n };\n\n private _handleTouchMove = (event: TouchEvent): void => {\n if (event.targetTouches.length !== 1) {\n return;\n }\n\n // Prevent scrolling.\n if (event.cancelable) {\n event.preventDefault();\n }\n\n if (!this._drawingStroke) {\n this._strokeEnd(this._touchEventToSignatureEvent(event), false);\n return;\n }\n\n this._strokeMoveUpdate(this._touchEventToSignatureEvent(event));\n };\n\n private _handleTouchEnd = (event: TouchEvent): void => {\n if (event.targetTouches.length !== 0) {\n return;\n }\n\n if (event.cancelable) {\n event.preventDefault();\n }\n\n this.canvas.removeEventListener('touchmove', this._handleTouchMove);\n\n this._strokeEnd(this._touchEventToSignatureEvent(event));\n };\n\n private _handlePointerDown = (event: PointerEvent): void => {\n if (!this._isLeftButtonPressed(event) || this._drawingStroke) {\n return;\n }\n\n event.preventDefault();\n\n this._strokeBegin(this._pointerEventToSignatureEvent(event));\n };\n\n private _handlePointerMove = (event: PointerEvent): void => {\n if (!this._isLeftButtonPressed(event, true) || !this._drawingStroke) {\n // Stop when primary button not pressed or multiple buttons pressed\n this._strokeEnd(this._pointerEventToSignatureEvent(event), false);\n return;\n }\n\n event.preventDefault();\n this._strokeMoveUpdate(this._pointerEventToSignatureEvent(event));\n };\n\n private _handlePointerUp = (event: PointerEvent): void => {\n if (this._isLeftButtonPressed(event)) {\n return;\n }\n\n event.preventDefault();\n this._strokeEnd(this._pointerEventToSignatureEvent(event));\n };\n\n private _getPointGroupOptions(group?: PointGroup): PointGroupOptions {\n return {\n penColor: group && 'penColor' in group ? group.penColor : this.penColor,\n dotSize: group && 'dotSize' in group ? group.dotSize : this.dotSize,\n minWidth: group && 'minWidth' in group ? group.minWidth : this.minWidth,\n maxWidth: group && 'maxWidth' in group ? group.maxWidth : this.maxWidth,\n velocityFilterWeight:\n group && 'velocityFilterWeight' in group\n ? group.velocityFilterWeight\n : this.velocityFilterWeight,\n compositeOperation:\n group && 'compositeOperation' in group\n ? group.compositeOperation\n : this.compositeOperation,\n };\n }\n\n // Private methods\n private _strokeBegin(event: SignatureEvent): void {\n const cancelled = !this.dispatchEvent(\n new CustomEvent('beginStroke', { detail: event, cancelable: true }),\n );\n if (cancelled) {\n return;\n }\n\n const { addEventListener } = this._getListenerFunctions();\n switch (event.event.type) {\n case 'mousedown':\n addEventListener('mousemove', this._handleMouseMove);\n addEventListener('mouseup', this._handleMouseUp);\n break;\n case 'touchstart':\n addEventListener('touchmove', this._handleTouchMove);\n addEventListener('touchend', this._handleTouchEnd);\n break;\n case 'pointerdown':\n addEventListener('pointermove', this._handlePointerMove);\n addEventListener('pointerup', this._handlePointerUp);\n break;\n default:\n // do nothing\n }\n\n this._drawingStroke = true;\n\n const pointGroupOptions = this._getPointGroupOptions();\n\n const newPointGroup: PointGroup = {\n ...pointGroupOptions,\n points: [],\n };\n\n this._data.push(newPointGroup);\n this._reset(pointGroupOptions);\n this._strokeUpdate(event);\n }\n\n private _strokeUpdate(event: SignatureEvent): void {\n if (!this._drawingStroke) {\n return;\n }\n\n if (this._data.length === 0) {\n // This can happen if clear() was called while a signature is still in progress,\n // or if there is a race condition between start/update events.\n this._strokeBegin(event);\n return;\n }\n\n this.dispatchEvent(\n new CustomEvent('beforeUpdateStroke', { detail: event }),\n );\n\n const point = this._createPoint(event.x, event.y, event.pressure);\n const lastPointGroup = this._data[this._data.length - 1];\n const lastPoints = lastPointGroup.points;\n const lastPoint =\n lastPoints.length > 0 && lastPoints[lastPoints.length - 1];\n const isLastPointTooClose = lastPoint\n ? point.distanceTo(lastPoint) <= this.minDistance\n : false;\n const pointGroupOptions = this._getPointGroupOptions(lastPointGroup);\n\n // Skip this point if it's too close to the previous one\n if (!lastPoint || !(lastPoint && isLastPointTooClose)) {\n const curve = this._addPoint(point, pointGroupOptions);\n\n if (!lastPoint) {\n this._drawDot(point, pointGroupOptions);\n } else if (curve) {\n this._drawCurve(curve, pointGroupOptions);\n }\n\n lastPoints.push({\n time: point.time,\n x: point.x,\n y: point.y,\n pressure: point.pressure,\n });\n }\n\n this.dispatchEvent(new CustomEvent('afterUpdateStroke', { detail: event }));\n }\n\n private _strokeEnd(event: SignatureEvent, shouldUpdate = true): void {\n this._removeMoveUpEventListeners();\n\n if (!this._drawingStroke) {\n return;\n }\n\n if (shouldUpdate) {\n this._strokeUpdate(event);\n }\n\n this._drawingStroke = false;\n this.dispatchEvent(new CustomEvent('endStroke', { detail: event }));\n }\n\n private _handlePointerEvents(): void {\n this._drawingStroke = false;\n\n this.canvas.addEventListener('pointerdown', this._handlePointerDown);\n }\n\n private _handleMouseEvents(): void {\n this._drawingStroke = false;\n\n this.canvas.addEventListener('mousedown', this._handleMouseDown);\n }\n\n private _handleTouchEvents(): void {\n this.canvas.addEventListener('touchstart', this._handleTouchStart);\n }\n\n // Called when a new line is started\n private _reset(options: PointGroupOptions): void {\n this._lastPoints = [];\n this._lastVelocity = 0;\n this._lastWidth = (options.minWidth + options.maxWidth) / 2;\n this._ctx.fillStyle = options.penColor;\n this._ctx.globalCompositeOperation = options.compositeOperation;\n }\n\n private _createPoint(x: number, y: number, pressure: number): Point {\n const rect = this.canvas.getBoundingClientRect();\n\n return new Point(\n x - rect.left,\n y - rect.top,\n pressure,\n new Date().getTime(),\n );\n }\n\n // Add point to _lastPoints array and generate a new curve if there are enough points (i.e. 3)\n private _addPoint(point: Point, options: PointGroupOptions): Bezier | null {\n const { _lastPoints } = this;\n\n _lastPoints.push(point);\n\n if (_lastPoints.length > 2) {\n // To reduce the initial lag make it work with 3 points\n // by copying the first point to the beginning.\n if (_lastPoints.length === 3) {\n _lastPoints.unshift(_lastPoints[0]);\n }\n\n // _points array will always have 4 points here.\n const widths = this._calculateCurveWidths(\n _lastPoints[1],\n _lastPoints[2],\n options,\n );\n const curve = Bezier.fromPoints(_lastPoints, widths);\n\n // Remove the first element from the list, so that there are no more than 4 points at any time.\n _lastPoints.shift();\n\n return curve;\n }\n\n return null;\n }\n\n private _calculateCurveWidths(\n startPoint: Point,\n endPoint: Point,\n options: PointGroupOptions,\n ): { start: number; end: number } {\n const velocity =\n options.velocityFilterWeight * endPoint.velocityFrom(startPoint) +\n (1 - options.velocityFilterWeight) * this._lastVelocity;\n\n const newWidth = this._strokeWidth(velocity, options);\n\n const widths = {\n end: newWidth,\n start: this._lastWidth,\n };\n\n this._lastVelocity = velocity;\n this._lastWidth = newWidth;\n\n return widths;\n }\n\n private _strokeWidth(velocity: number, options: PointGroupOptions): number {\n return Math.max(options.maxWidth / (velocity + 1), options.minWidth);\n }\n\n private _drawCurveSegment(x: number, y: number, width: number): void {\n const ctx = this._ctx;\n\n ctx.moveTo(x, y);\n ctx.arc(x, y, width, 0, 2 * Math.PI, false);\n this._isEmpty = false;\n }\n\n private _drawCurve(curve: Bezier, options: PointGroupOptions): void {\n const ctx = this._ctx;\n const widthDelta = curve.endWidth - curve.startWidth;\n // '2' is just an arbitrary number here. If only length is used, then\n // there are gaps between curve segments :/\n const drawSteps = Math.ceil(curve.length()) * 2;\n\n ctx.beginPath();\n ctx.fillStyle = options.penColor;\n\n for (let i = 0; i < drawSteps; i += 1) {\n // Calculate the Bezier (x, y) coordinate for this step.\n const t = i / drawSteps;\n const tt = t * t;\n const ttt = tt * t;\n const u = 1 - t;\n const uu = u * u;\n const uuu = uu * u;\n\n let x = uuu * curve.startPoint.x;\n x += 3 * uu * t * curve.control1.x;\n x += 3 * u * tt * curve.control2.x;\n x += ttt * curve.endPoint.x;\n\n let y = uuu * curve.startPoint.y;\n y += 3 * uu * t * curve.control1.y;\n y += 3 * u * tt * curve.control2.y;\n y += ttt * curve.endPoint.y;\n\n const width = Math.min(\n curve.startWidth + ttt * widthDelta,\n options.maxWidth,\n );\n this._drawCurveSegment(x, y, width);\n }\n\n ctx.closePath();\n ctx.fill();\n }\n\n private _drawDot(point: BasicPoint, options: PointGroupOptions): void {\n const ctx = this._ctx;\n const width =\n options.dotSize > 0\n ? options.dotSize\n : (options.minWidth + options.maxWidth) / 2;\n\n ctx.beginPath();\n this._drawCurveSegment(point.x, point.y, width);\n ctx.closePath();\n ctx.fillStyle = options.penColor;\n ctx.fill();\n }\n\n private _fromData(\n pointGroups: PointGroup[],\n drawCurve: SignaturePad['_drawCurve'],\n drawDot: SignaturePad['_drawDot'],\n ): void {\n for (const group of pointGroups) {\n const { points } = group;\n const pointGroupOptions = this._getPointGroupOptions(group);\n\n if (points.length > 1) {\n for (let j = 0; j < points.length; j += 1) {\n const basicPoint = points[j];\n const point = new Point(\n basicPoint.x,\n basicPoint.y,\n basicPoint.pressure,\n basicPoint.time,\n );\n\n if (j === 0) {\n this._reset(pointGroupOptions);\n }\n\n const curve = this._addPoint(point, pointGroupOptions);\n\n if (curve) {\n drawCurve(curve, pointGroupOptions);\n }\n }\n } else {\n this._reset(pointGroupOptions);\n\n drawDot(points[0], pointGroupOptions);\n }\n }\n }\n\n public toSVG({ includeBackgroundColor = false }: ToSVGOptions = {}): string {\n const pointGroups = this._data;\n const ratio = Math.max(window.devicePixelRatio || 1, 1);\n const minX = 0;\n const minY = 0;\n const maxX = this.canvas.width / ratio;\n const maxY = this.canvas.height / ratio;\n const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\n\n svg.setAttribute('xmlns', 'http://www.w3.org/2000/svg');\n svg.setAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink');\n svg.setAttribute('viewBox', `${minX} ${minY} ${maxX} ${maxY}`);\n svg.setAttribute('width', maxX.toString());\n svg.setAttribute('height', maxY.toString());\n\n if (includeBackgroundColor && this.backgroundColor) {\n const rect = document.createElement('rect');\n rect.setAttribute('width', '100%');\n rect.setAttribute('height', '100%');\n rect.setAttribute('fill', this.backgroundColor);\n\n svg.appendChild(rect);\n }\n\n this._fromData(\n pointGroups,\n\n (curve, { penColor }) => {\n const path = document.createElement('path');\n\n // Need to check curve for NaN values, these pop up when drawing\n // lines on the canvas that are not continuous. E.g. Sharp corners\n // or stopping mid-stroke and than continuing without lifting mouse.\n /* eslint-disable no-restricted-globals */\n if (\n !isNaN(curve.control1.x) &&\n !isNaN(curve.control1.y) &&\n !isNaN(curve.control2.x) &&\n !isNaN(curve.control2.y)\n ) {\n const attr =\n `M ${curve.startPoint.x.toFixed(3)},${curve.startPoint.y.toFixed(\n 3,\n )} ` +\n `C ${curve.control1.x.toFixed(3)},${curve.control1.y.toFixed(3)} ` +\n `${curve.control2.x.toFixed(3)},${curve.control2.y.toFixed(3)} ` +\n `${curve.endPoint.x.toFixed(3)},${curve.endPoint.y.toFixed(3)}`;\n path.setAttribute('d', attr);\n path.setAttribute('stroke-width', (curve.endWidth * 2.25).toFixed(3));\n path.setAttribute('stroke', penColor);\n path.setAttribute('fill', 'none');\n path.setAttribute('stroke-linecap', 'round');\n\n svg.appendChild(path);\n }\n /* eslint-enable no-restricted-globals */\n },\n\n (point, { penColor, dotSize, minWidth, maxWidth }) => {\n const circle = document.createElement('circle');\n const size = dotSize > 0 ? dotSize : (minWidth + maxWidth) / 2;\n circle.setAttribute('r', size.toString());\n circle.setAttribute('cx', point.x.toString());\n circle.setAttribute('cy', point.y.toString());\n circle.setAttribute('fill', penColor);\n\n svg.appendChild(circle);\n },\n );\n\n return svg.outerHTML;\n }\n}\n"],"names":[],"mappings":";;;;;MAQa,KAAK,CAAA;AAMhB,IAAA,WAAA,CAAY,CAAS,EAAE,CAAS,EAAE,QAAiB,EAAE,IAAa,EAAA;QAChE,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE;YACxB,MAAM,IAAI,KAAK,CAAC,CAAA,mBAAA,EAAsB,CAAC,CAAK,EAAA,EAAA,CAAC,CAAG,CAAA,CAAA,CAAC,CAAC;SACnD;AACD,QAAA,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AACZ,QAAA,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AACZ,QAAA,IAAI,CAAC,QAAQ,GAAG,QAAQ,IAAI,CAAC,CAAC;QAC9B,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;KAChC;AAEM,IAAA,UAAU,CAAC,KAAiB,EAAA;AACjC,QAAA,O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GAAG,CAAC,GAAG,OAAO,GAAG,CAAC,QAAQ,GAAG,QAAQ,IAAI,CAAC,CAAC;YAC/D,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;AAC1C,YAAA,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;AAC9C,YAAA,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;AAC9C,YAAA,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAEtC,YAAA,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;AAC1B,SAAC,CACF,CAAC;QAEF,OAAO,GAAG,CAAC,SAAS,CAAC;KACtB;AACF;;;;"} \ No newline at end of file diff --git a/public/vendor/signature_pad@5/signature_pad.min.js b/public/vendor/signature_pad@5/signature_pad.min.js new file mode 100644 index 0000000000..b4fd439dc0 --- /dev/null +++ b/public/vendor/signature_pad@5/signature_pad.min.js @@ -0,0 +1,6 @@ +/*! + * Signature Pad v5.0.2 | https://github.com/szimek/signature_pad + * (c) 2024 Szymon Nowak | Released under the MIT license + */ +class t{constructor(t,e,i,n){if(isNaN(t)||isNaN(e))throw new Error(`Point is invalid: (${t}, ${e})`);this.x=+t,this.y=+e,this.pressure=i||0,this.time=n||Date.now()}distanceTo(t){return Math.sqrt(Math.pow(this.x-t.x,2)+Math.pow(this.y-t.y,2))}equals(t){return this.x===t.x&&this.y===t.y&&this.pressure===t.pressure&&this.time===t.time}velocityFrom(t){return this.time!==t.time?this.distanceTo(t)/(this.time-t.time):0}}class e{static fromPoints(t,i){const n=this.calculateControlPoints(t[0],t[1],t[2]).c2,s=this.calculateControlPoints(t[1],t[2],t[3]).c1;return new e(t[1],n,s,t[2],i.start,i.end)}static calculateControlPoints(e,i,n){const s=e.x-i.x,o=e.y-i.y,r=i.x-n.x,h=i.y-n.y,a=(e.x+i.x)/2,c=(e.y+i.y)/2,d=(i.x+n.x)/2,l=(i.y+n.y)/2,u=Math.sqrt(s*s+o*o),v=Math.sqrt(r*r+h*h),_=v/(u+v),p=d+(a-d)*_,m=l+(c-l)*_,g=i.x-p,w=i.y-m;return{c1:new t(a+g,c+w),c2:new t(d+g,l+w)}}constructor(t,e,i,n,s,o){this.startPoint=t,this.control2=e,this.control1=i,this.endPoint=n,this.startWidth=s,this.endWidth=o}length(){let t,e,i=0;for(let n=0;n<=10;n+=1){const s=n/10,o=this.point(s,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),r=this.point(s,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y);if(n>0){const n=o-t,s=r-e;i+=Math.sqrt(n*n+s*s)}t=o,e=r}return i}point(t,e,i,n,s){return e*(1-t)*(1-t)*(1-t)+3*i*(1-t)*(1-t)*t+3*n*(1-t)*t*t+s*t*t*t}}class i{constructor(){try{this._et=new EventTarget}catch(t){this._et=document}}addEventListener(t,e,i){this._et.addEventListener(t,e,i)}dispatchEvent(t){return this._et.dispatchEvent(t)}removeEventListener(t,e,i){this._et.removeEventListener(t,e,i)}}class n extends i{constructor(t,e={}){var i,s,o;super(),this.canvas=t,this._drawingStroke=!1,this._isEmpty=!0,this._lastPoints=[],this._data=[],this._lastVelocity=0,this._lastWidth=0,this._handleMouseDown=t=>{this._isLeftButtonPressed(t,!0)&&!this._drawingStroke&&this._strokeBegin(this._pointerEventToSignatureEvent(t))},this._handleMouseMove=t=>{this._isLeftButtonPressed(t,!0)&&this._drawingStroke?this._strokeMoveUpdate(this._pointerEventToSignatureEvent(t)):this._strokeEnd(this._pointerEventToSignatureEvent(t),!1)},this._handleMouseUp=t=>{this._isLeftButtonPressed(t)||this._strokeEnd(this._pointerEventToSignatureEvent(t))},this._handleTouchStart=t=>{1!==t.targetTouches.length||this._drawingStroke||(t.cancelable&&t.preventDefault(),this._strokeBegin(this._touchEventToSignatureEvent(t)))},this._handleTouchMove=t=>{1===t.targetTouches.length&&(t.cancelable&&t.preventDefault(),this._drawingStroke?this._strokeMoveUpdate(this._touchEventToSignatureEvent(t)):this._strokeEnd(this._touchEventToSignatureEvent(t),!1))},this._handleTouchEnd=t=>{0===t.targetTouches.length&&(t.cancelable&&t.preventDefault(),this.canvas.removeEventListener("touchmove",this._handleTouchMove),this._strokeEnd(this._touchEventToSignatureEvent(t)))},this._handlePointerDown=t=>{this._isLeftButtonPressed(t)&&!this._drawingStroke&&(t.preventDefault(),this._strokeBegin(this._pointerEventToSignatureEvent(t)))},this._handlePointerMove=t=>{this._isLeftButtonPressed(t,!0)&&this._drawingStroke?(t.preventDefault(),this._strokeMoveUpdate(this._pointerEventToSignatureEvent(t))):this._strokeEnd(this._pointerEventToSignatureEvent(t),!1)},this._handlePointerUp=t=>{this._isLeftButtonPressed(t)||(t.preventDefault(),this._strokeEnd(this._pointerEventToSignatureEvent(t)))},this.velocityFilterWeight=e.velocityFilterWeight||.7,this.minWidth=e.minWidth||.5,this.maxWidth=e.maxWidth||2.5,this.throttle=null!==(i=e.throttle)&&void 0!==i?i:16,this.minDistance=null!==(s=e.minDistance)&&void 0!==s?s:5,this.dotSize=e.dotSize||0,this.penColor=e.penColor||"black",this.backgroundColor=e.backgroundColor||"rgba(0,0,0,0)",this.compositeOperation=e.compositeOperation||"source-over",this.canvasContextOptions=null!==(o=e.canvasContextOptions)&&void 0!==o?o:{},this._strokeMoveUpdate=this.throttle?function(t,e=250){let i,n,s,o=0,r=null;const h=()=>{o=Date.now(),r=null,i=t.apply(n,s),r||(n=null,s=[])};return function(...a){const c=Date.now(),d=e-(c-o);return n=this,s=a,d<=0||d>e?(r&&(clearTimeout(r),r=null),o=c,i=t.apply(n,s),r||(n=null,s=[])):r||(r=window.setTimeout(h,d)),i}}(n.prototype._strokeUpdate,this.throttle):n.prototype._strokeUpdate,this._ctx=t.getContext("2d",this.canvasContextOptions),this.clear(),this.on()}clear(){const{_ctx:t,canvas:e}=this;t.fillStyle=this.backgroundColor,t.clearRect(0,0,e.width,e.height),t.fillRect(0,0,e.width,e.height),this._data=[],this._reset(this._getPointGroupOptions()),this._isEmpty=!0}fromDataURL(t,e={}){return new Promise(((i,n)=>{const s=new Image,o=e.ratio||window.devicePixelRatio||1,r=e.width||this.canvas.width/o,h=e.height||this.canvas.height/o,a=e.xOffset||0,c=e.yOffset||0;this._reset(this._getPointGroupOptions()),s.onload=()=>{this._ctx.drawImage(s,a,c,r,h),i()},s.onerror=t=>{n(t)},s.crossOrigin="anonymous",s.src=t,this._isEmpty=!1}))}toDataURL(t="image/png",e){return"image/svg+xml"===t?("object"!=typeof e&&(e=void 0),`data:image/svg+xml;base64,${btoa(this.toSVG(e))}`):("number"!=typeof e&&(e=void 0),this.canvas.toDataURL(t,e))}on(){this.canvas.style.touchAction="none",this.canvas.style.msTouchAction="none",this.canvas.style.userSelect="none";const t=/Macintosh/.test(navigator.userAgent)&&"ontouchstart"in document;window.PointerEvent&&!t?this._handlePointerEvents():(this._handleMouseEvents(),"ontouchstart"in window&&this._handleTouchEvents())}off(){this.canvas.style.touchAction="auto",this.canvas.style.msTouchAction="auto",this.canvas.style.userSelect="auto",this.canvas.removeEventListener("pointerdown",this._handlePointerDown),this.canvas.removeEventListener("mousedown",this._handleMouseDown),this.canvas.removeEventListener("touchstart",this._handleTouchStart),this._removeMoveUpEventListeners()}_getListenerFunctions(){var t;const e=window.document===this.canvas.ownerDocument?window:null!==(t=this.canvas.ownerDocument.defaultView)&&void 0!==t?t:this.canvas.ownerDocument;return{addEventListener:e.addEventListener.bind(e),removeEventListener:e.removeEventListener.bind(e)}}_removeMoveUpEventListeners(){const{removeEventListener:t}=this._getListenerFunctions();t("pointermove",this._handlePointerMove),t("pointerup",this._handlePointerUp),t("mousemove",this._handleMouseMove),t("mouseup",this._handleMouseUp),t("touchmove",this._handleTouchMove),t("touchend",this._handleTouchEnd)}isEmpty(){return this._isEmpty}fromData(t,{clear:e=!0}={}){e&&this.clear(),this._fromData(t,this._drawCurve.bind(this),this._drawDot.bind(this)),this._data=this._data.concat(t)}toData(){return this._data}_isLeftButtonPressed(t,e){return e?1===t.buttons:!(1&~t.buttons)}_pointerEventToSignatureEvent(t){return{event:t,type:t.type,x:t.clientX,y:t.clientY,pressure:"pressure"in t?t.pressure:0}}_touchEventToSignatureEvent(t){const e=t.changedTouches[0];return{event:t,type:t.type,x:e.clientX,y:e.clientY,pressure:e.force}}_getPointGroupOptions(t){return{penColor:t&&"penColor"in t?t.penColor:this.penColor,dotSize:t&&"dotSize"in t?t.dotSize:this.dotSize,minWidth:t&&"minWidth"in t?t.minWidth:this.minWidth,maxWidth:t&&"maxWidth"in t?t.maxWidth:this.maxWidth,velocityFilterWeight:t&&"velocityFilterWeight"in t?t.velocityFilterWeight:this.velocityFilterWeight,compositeOperation:t&&"compositeOperation"in t?t.compositeOperation:this.compositeOperation}}_strokeBegin(t){if(!this.dispatchEvent(new CustomEvent("beginStroke",{detail:t,cancelable:!0})))return;const{addEventListener:e}=this._getListenerFunctions();switch(t.event.type){case"mousedown":e("mousemove",this._handleMouseMove),e("mouseup",this._handleMouseUp);break;case"touchstart":e("touchmove",this._handleTouchMove),e("touchend",this._handleTouchEnd);break;case"pointerdown":e("pointermove",this._handlePointerMove),e("pointerup",this._handlePointerUp)}this._drawingStroke=!0;const i=this._getPointGroupOptions(),n=Object.assign(Object.assign({},i),{points:[]});this._data.push(n),this._reset(i),this._strokeUpdate(t)}_strokeUpdate(t){if(!this._drawingStroke)return;if(0===this._data.length)return void this._strokeBegin(t);this.dispatchEvent(new CustomEvent("beforeUpdateStroke",{detail:t}));const e=this._createPoint(t.x,t.y,t.pressure),i=this._data[this._data.length-1],n=i.points,s=n.length>0&&n[n.length-1],o=!!s&&e.distanceTo(s)<=this.minDistance,r=this._getPointGroupOptions(i);if(!s||!s||!o){const t=this._addPoint(e,r);s?t&&this._drawCurve(t,r):this._drawDot(e,r),n.push({time:e.time,x:e.x,y:e.y,pressure:e.pressure})}this.dispatchEvent(new CustomEvent("afterUpdateStroke",{detail:t}))}_strokeEnd(t,e=!0){this._removeMoveUpEventListeners(),this._drawingStroke&&(e&&this._strokeUpdate(t),this._drawingStroke=!1,this.dispatchEvent(new CustomEvent("endStroke",{detail:t})))}_handlePointerEvents(){this._drawingStroke=!1,this.canvas.addEventListener("pointerdown",this._handlePointerDown)}_handleMouseEvents(){this._drawingStroke=!1,this.canvas.addEventListener("mousedown",this._handleMouseDown)}_handleTouchEvents(){this.canvas.addEventListener("touchstart",this._handleTouchStart)}_reset(t){this._lastPoints=[],this._lastVelocity=0,this._lastWidth=(t.minWidth+t.maxWidth)/2,this._ctx.fillStyle=t.penColor,this._ctx.globalCompositeOperation=t.compositeOperation}_createPoint(e,i,n){const s=this.canvas.getBoundingClientRect();return new t(e-s.left,i-s.top,n,(new Date).getTime())}_addPoint(t,i){const{_lastPoints:n}=this;if(n.push(t),n.length>2){3===n.length&&n.unshift(n[0]);const t=this._calculateCurveWidths(n[1],n[2],i),s=e.fromPoints(n,t);return n.shift(),s}return null}_calculateCurveWidths(t,e,i){const n=i.velocityFilterWeight*e.velocityFrom(t)+(1-i.velocityFilterWeight)*this._lastVelocity,s=this._strokeWidth(n,i),o={end:s,start:this._lastWidth};return this._lastVelocity=n,this._lastWidth=s,o}_strokeWidth(t,e){return Math.max(e.maxWidth/(t+1),e.minWidth)}_drawCurveSegment(t,e,i){const n=this._ctx;n.moveTo(t,e),n.arc(t,e,i,0,2*Math.PI,!1),this._isEmpty=!1}_drawCurve(t,e){const i=this._ctx,n=t.endWidth-t.startWidth,s=2*Math.ceil(t.length());i.beginPath(),i.fillStyle=e.penColor;for(let i=0;i0?e.dotSize:(e.minWidth+e.maxWidth)/2;i.beginPath(),this._drawCurveSegment(t.x,t.y,n),i.closePath(),i.fillStyle=e.penColor,i.fill()}_fromData(e,i,n){for(const s of e){const{points:e}=s,o=this._getPointGroupOptions(s);if(e.length>1)for(let n=0;n{const i=document.createElement("path");if(!(isNaN(t.control1.x)||isNaN(t.control1.y)||isNaN(t.control2.x)||isNaN(t.control2.y))){const n=`M ${t.startPoint.x.toFixed(3)},${t.startPoint.y.toFixed(3)} C ${t.control1.x.toFixed(3)},${t.control1.y.toFixed(3)} ${t.control2.x.toFixed(3)},${t.control2.y.toFixed(3)} ${t.endPoint.x.toFixed(3)},${t.endPoint.y.toFixed(3)}`;i.setAttribute("d",n),i.setAttribute("stroke-width",(2.25*t.endWidth).toFixed(3)),i.setAttribute("stroke",e),i.setAttribute("fill","none"),i.setAttribute("stroke-linecap","round"),o.appendChild(i)}}),((t,{penColor:e,dotSize:i,minWidth:n,maxWidth:s})=>{const r=document.createElement("circle"),h=i>0?i:(n+s)/2;r.setAttribute("r",h.toString()),r.setAttribute("cx",t.x.toString()),r.setAttribute("cy",t.y.toString()),r.setAttribute("fill",e),o.appendChild(r)})),o.outerHTML}}export{n as default}; +//# sourceMappingURL=signature_pad.min.js.map diff --git a/public/vendor/signature_pad@5/signature_pad.min.js.map b/public/vendor/signature_pad@5/signature_pad.min.js.map new file mode 100644 index 0000000000..5180002228 --- /dev/null +++ b/public/vendor/signature_pad@5/signature_pad.min.js.map @@ -0,0 +1 @@ +{"version":3,"file":"signature_pad.min.js","sources":["../src/point.ts","../src/bezier.ts","../src/signature_event_target.ts","../src/signature_pad.ts","../src/throttle.ts"],"sourcesContent":["// Interface for point data structure used e.g. in SignaturePad#fromData method\nexport interface BasicPoint {\n x: number;\n y: number;\n pressure: number;\n time: number;\n}\n\nexport class Point implements BasicPoint {\n public x: number;\n public y: number;\n public pressure: number;\n public time: number;\n\n constructor(x: number, y: number, pressure?: number, time?: number) {\n if (isNaN(x) || isNaN(y)) {\n throw new Error(`Point is invalid: (${x}, ${y})`);\n }\n this.x = +x;\n this.y = +y;\n this.pressure = pressure || 0;\n this.time = time || Date.now();\n }\n\n public distanceTo(start: BasicPoint): number {\n return Math.sqrt(\n Math.pow(this.x - start.x, 2) + Math.pow(this.y - start.y, 2),\n );\n }\n\n public equals(other: BasicPoint): boolean {\n return (\n this.x === other.x &&\n this.y === other.y &&\n this.pressure === other.pressure &&\n this.time === other.time\n );\n }\n\n public velocityFrom(start: BasicPoint): number {\n return this.time !== start.time\n ? this.distanceTo(start) / (this.time - start.time)\n : 0;\n }\n}\n","import { BasicPoint, Point } from './point';\n\nexport class Bezier {\n public static fromPoints(\n points: Point[],\n widths: { start: number; end: number },\n ): Bezier {\n const c2 = this.calculateControlPoints(points[0], points[1], points[2]).c2;\n const c3 = this.calculateControlPoints(points[1], points[2], points[3]).c1;\n\n return new Bezier(points[1], c2, c3, points[2], widths.start, widths.end);\n }\n\n private static calculateControlPoints(\n s1: BasicPoint,\n s2: BasicPoint,\n s3: BasicPoint,\n ): {\n c1: BasicPoint;\n c2: BasicPoint;\n } {\n const dx1 = s1.x - s2.x;\n const dy1 = s1.y - s2.y;\n const dx2 = s2.x - s3.x;\n const dy2 = s2.y - s3.y;\n\n const m1 = { x: (s1.x + s2.x) / 2.0, y: (s1.y + s2.y) / 2.0 };\n const m2 = { x: (s2.x + s3.x) / 2.0, y: (s2.y + s3.y) / 2.0 };\n\n const l1 = Math.sqrt(dx1 * dx1 + dy1 * dy1);\n const l2 = Math.sqrt(dx2 * dx2 + dy2 * dy2);\n\n const dxm = m1.x - m2.x;\n const dym = m1.y - m2.y;\n\n const k = l2 / (l1 + l2);\n const cm = { x: m2.x + dxm * k, y: m2.y + dym * k };\n\n const tx = s2.x - cm.x;\n const ty = s2.y - cm.y;\n\n return {\n c1: new Point(m1.x + tx, m1.y + ty),\n c2: new Point(m2.x + tx, m2.y + ty),\n };\n }\n\n constructor(\n public startPoint: Point,\n public control2: BasicPoint,\n public control1: BasicPoint,\n public endPoint: Point,\n public startWidth: number,\n public endWidth: number,\n ) {}\n\n // Returns approximated length. Code taken from https://www.lemoda.net/maths/bezier-length/index.html.\n public length(): number {\n const steps = 10;\n let length = 0;\n let px;\n let py;\n\n for (let i = 0; i <= steps; i += 1) {\n const t = i / steps;\n const cx = this.point(\n t,\n this.startPoint.x,\n this.control1.x,\n this.control2.x,\n this.endPoint.x,\n );\n const cy = this.point(\n t,\n this.startPoint.y,\n this.control1.y,\n this.control2.y,\n this.endPoint.y,\n );\n\n if (i > 0) {\n const xdiff = cx - (px as number);\n const ydiff = cy - (py as number);\n\n length += Math.sqrt(xdiff * xdiff + ydiff * ydiff);\n }\n\n px = cx;\n py = cy;\n }\n\n return length;\n }\n\n // Calculate parametric value of x or y given t and the four point coordinates of a cubic bezier curve.\n private point(\n t: number,\n start: number,\n c1: number,\n c2: number,\n end: number,\n ): number {\n // prettier-ignore\n return ( start * (1.0 - t) * (1.0 - t) * (1.0 - t))\n + (3.0 * c1 * (1.0 - t) * (1.0 - t) * t)\n + (3.0 * c2 * (1.0 - t) * t * t)\n + ( end * t * t * t);\n }\n}\n","export class SignatureEventTarget {\n /* tslint:disable: variable-name */\n private _et: EventTarget;\n /* tslint:enable: variable-name */\n\n constructor() {\n try {\n this._et = new EventTarget();\n } catch (error) {\n // Using document as EventTarget to support iOS 13 and older.\n // Because EventTarget constructor just exists at iOS 14 and later.\n this._et = document;\n }\n }\n\n addEventListener(\n type: string,\n listener: EventListenerOrEventListenerObject | null,\n options?: boolean | AddEventListenerOptions,\n ): void {\n this._et.addEventListener(type, listener, options);\n }\n\n dispatchEvent(event: Event): boolean {\n return this._et.dispatchEvent(event);\n }\n\n removeEventListener(\n type: string,\n callback: EventListenerOrEventListenerObject | null,\n options?: boolean | EventListenerOptions,\n ): void {\n this._et.removeEventListener(type, callback, options);\n }\n}\n","/**\n * The main idea and some parts of the code (e.g. drawing variable width Bézier curve) are taken from:\n * http://corner.squareup.com/2012/07/smoother-signatures.html\n *\n * Implementation of interpolation using cubic Bézier curves is taken from:\n * https://web.archive.org/web/20160323213433/http://www.benknowscode.com/2012/09/path-interpolation-using-cubic-bezier_9742.html\n *\n * Algorithm for approximated length of a Bézier curve is taken from:\n * http://www.lemoda.net/maths/bezier-length/index.html\n */\n\nimport { Bezier } from './bezier';\nimport { BasicPoint, Point } from './point';\nimport { SignatureEventTarget } from './signature_event_target';\nimport { throttle } from './throttle';\n\nexport interface SignatureEvent {\n event: MouseEvent | TouchEvent | PointerEvent;\n type: string;\n x: number;\n y: number;\n pressure: number;\n}\n\nexport interface FromDataOptions {\n clear?: boolean;\n}\n\nexport interface ToSVGOptions {\n includeBackgroundColor?: boolean;\n}\n\nexport interface PointGroupOptions {\n dotSize: number;\n minWidth: number;\n maxWidth: number;\n penColor: string;\n velocityFilterWeight: number;\n /**\n * This is the globalCompositeOperation for the line.\n * *default: 'source-over'*\n * @see https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation\n */\n compositeOperation: GlobalCompositeOperation;\n}\n\nexport interface Options extends Partial {\n minDistance?: number;\n backgroundColor?: string;\n throttle?: number;\n canvasContextOptions?: CanvasRenderingContext2DSettings;\n}\n\nexport interface PointGroup extends PointGroupOptions {\n points: BasicPoint[];\n}\n\nexport default class SignaturePad extends SignatureEventTarget {\n // Public stuff\n public dotSize: number;\n public minWidth: number;\n public maxWidth: number;\n public penColor: string;\n public minDistance: number;\n public velocityFilterWeight: number;\n public compositeOperation: GlobalCompositeOperation;\n public backgroundColor: string;\n public throttle: number;\n public canvasContextOptions: CanvasRenderingContext2DSettings;\n\n // Private stuff\n /* tslint:disable: variable-name */\n private _ctx: CanvasRenderingContext2D;\n private _drawingStroke = false;\n private _isEmpty = true;\n private _lastPoints: Point[] = []; // Stores up to 4 most recent points; used to generate a new curve\n private _data: PointGroup[] = []; // Stores all points in groups (one group per line or dot)\n private _lastVelocity = 0;\n private _lastWidth = 0;\n private _strokeMoveUpdate: (event: SignatureEvent) => void;\n /* tslint:enable: variable-name */\n\n constructor(\n private canvas: HTMLCanvasElement,\n options: Options = {},\n ) {\n super();\n this.velocityFilterWeight = options.velocityFilterWeight || 0.7;\n this.minWidth = options.minWidth || 0.5;\n this.maxWidth = options.maxWidth || 2.5;\n\n // We need to handle 0 value, so use `??` instead of `||`\n this.throttle = options.throttle ?? 16; // in milliseconds\n this.minDistance = options.minDistance ?? 5; // in pixels\n this.dotSize = options.dotSize || 0;\n this.penColor = options.penColor || 'black';\n this.backgroundColor = options.backgroundColor || 'rgba(0,0,0,0)';\n this.compositeOperation = options.compositeOperation || 'source-over';\n this.canvasContextOptions = options.canvasContextOptions ?? {};\n\n this._strokeMoveUpdate = this.throttle\n ? throttle(SignaturePad.prototype._strokeUpdate, this.throttle)\n : SignaturePad.prototype._strokeUpdate;\n this._ctx = canvas.getContext(\n '2d',\n this.canvasContextOptions,\n ) as CanvasRenderingContext2D;\n\n this.clear();\n\n // Enable mouse and touch event handlers\n this.on();\n }\n\n public clear(): void {\n const { _ctx: ctx, canvas } = this;\n\n // Clear canvas using background color\n ctx.fillStyle = this.backgroundColor;\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n\n this._data = [];\n this._reset(this._getPointGroupOptions());\n this._isEmpty = true;\n }\n\n public fromDataURL(\n dataUrl: string,\n options: {\n ratio?: number;\n width?: number;\n height?: number;\n xOffset?: number;\n yOffset?: number;\n } = {},\n ): Promise {\n return new Promise((resolve, reject) => {\n const image = new Image();\n const ratio = options.ratio || window.devicePixelRatio || 1;\n const width = options.width || this.canvas.width / ratio;\n const height = options.height || this.canvas.height / ratio;\n const xOffset = options.xOffset || 0;\n const yOffset = options.yOffset || 0;\n\n this._reset(this._getPointGroupOptions());\n\n image.onload = (): void => {\n this._ctx.drawImage(image, xOffset, yOffset, width, height);\n resolve();\n };\n image.onerror = (error): void => {\n reject(error);\n };\n image.crossOrigin = 'anonymous';\n image.src = dataUrl;\n\n this._isEmpty = false;\n });\n }\n\n public toDataURL(\n type: 'image/svg+xml',\n encoderOptions?: ToSVGOptions,\n ): string;\n public toDataURL(type?: string, encoderOptions?: number): string;\n public toDataURL(\n type = 'image/png',\n encoderOptions?: number | ToSVGOptions | undefined,\n ): string {\n switch (type) {\n case 'image/svg+xml':\n if (typeof encoderOptions !== 'object') {\n encoderOptions = undefined;\n }\n return `data:image/svg+xml;base64,${btoa(\n this.toSVG(encoderOptions as ToSVGOptions),\n )}`;\n default:\n if (typeof encoderOptions !== 'number') {\n encoderOptions = undefined;\n }\n return this.canvas.toDataURL(type, encoderOptions);\n }\n }\n\n public on(): void {\n // Disable panning/zooming when touching canvas element\n this.canvas.style.touchAction = 'none';\n (this.canvas.style as CSSStyleDeclaration & { msTouchAction: string | null }).msTouchAction = 'none';\n this.canvas.style.userSelect = 'none';\n\n const isIOS =\n /Macintosh/.test(navigator.userAgent) && 'ontouchstart' in document;\n\n // The \"Scribble\" feature of iOS intercepts point events. So that we can\n // lose some of them when tapping rapidly. Use touch events for iOS\n // platforms to prevent it. See\n // https://developer.apple.com/forums/thread/664108 for more information.\n if (window.PointerEvent && !isIOS) {\n this._handlePointerEvents();\n } else {\n this._handleMouseEvents();\n\n if ('ontouchstart' in window) {\n this._handleTouchEvents();\n }\n }\n }\n\n public off(): void {\n // Enable panning/zooming when touching canvas element\n this.canvas.style.touchAction = 'auto';\n (this.canvas.style as CSSStyleDeclaration & { msTouchAction: string | null }).msTouchAction = 'auto';\n this.canvas.style.userSelect = 'auto';\n\n this.canvas.removeEventListener('pointerdown', this._handlePointerDown);\n this.canvas.removeEventListener('mousedown', this._handleMouseDown);\n this.canvas.removeEventListener('touchstart', this._handleTouchStart);\n\n this._removeMoveUpEventListeners();\n }\n\n private _getListenerFunctions() {\n const canvasWindow =\n window.document === this.canvas.ownerDocument\n ? window\n : this.canvas.ownerDocument.defaultView ?? this.canvas.ownerDocument;\n\n return {\n addEventListener: canvasWindow.addEventListener.bind(\n canvasWindow,\n ) as typeof window.addEventListener,\n removeEventListener: canvasWindow.removeEventListener.bind(\n canvasWindow,\n ) as typeof window.removeEventListener,\n };\n }\n\n private _removeMoveUpEventListeners(): void {\n const { removeEventListener } = this._getListenerFunctions();\n removeEventListener('pointermove', this._handlePointerMove);\n removeEventListener('pointerup', this._handlePointerUp);\n\n removeEventListener('mousemove', this._handleMouseMove);\n removeEventListener('mouseup', this._handleMouseUp);\n\n removeEventListener('touchmove', this._handleTouchMove);\n removeEventListener('touchend', this._handleTouchEnd);\n }\n\n public isEmpty(): boolean {\n return this._isEmpty;\n }\n\n public fromData(\n pointGroups: PointGroup[],\n { clear = true }: FromDataOptions = {},\n ): void {\n if (clear) {\n this.clear();\n }\n\n this._fromData(\n pointGroups,\n this._drawCurve.bind(this),\n this._drawDot.bind(this),\n );\n\n this._data = this._data.concat(pointGroups);\n }\n\n public toData(): PointGroup[] {\n return this._data;\n }\n\n public _isLeftButtonPressed(event: MouseEvent, only?: boolean): boolean {\n if (only) {\n return event.buttons === 1;\n }\n\n return (event.buttons & 1) === 1;\n }\n private _pointerEventToSignatureEvent(\n event: MouseEvent | PointerEvent,\n ): SignatureEvent {\n return {\n event: event,\n type: event.type,\n x: event.clientX,\n y: event.clientY,\n pressure: 'pressure' in event ? event.pressure : 0,\n };\n }\n\n private _touchEventToSignatureEvent(event: TouchEvent): SignatureEvent {\n const touch = event.changedTouches[0];\n return {\n event: event,\n type: event.type,\n x: touch.clientX,\n y: touch.clientY,\n pressure: touch.force,\n };\n }\n\n // Event handlers\n private _handleMouseDown = (event: MouseEvent): void => {\n if (!this._isLeftButtonPressed(event, true) || this._drawingStroke) {\n return;\n }\n this._strokeBegin(this._pointerEventToSignatureEvent(event));\n };\n\n private _handleMouseMove = (event: MouseEvent): void => {\n if (!this._isLeftButtonPressed(event, true) || !this._drawingStroke) {\n // Stop when not pressing primary button or pressing multiple buttons\n this._strokeEnd(this._pointerEventToSignatureEvent(event), false);\n return;\n }\n\n this._strokeMoveUpdate(this._pointerEventToSignatureEvent(event));\n };\n\n private _handleMouseUp = (event: MouseEvent): void => {\n if (this._isLeftButtonPressed(event)) {\n return;\n }\n\n this._strokeEnd(this._pointerEventToSignatureEvent(event));\n };\n\n private _handleTouchStart = (event: TouchEvent): void => {\n if (event.targetTouches.length !== 1 || this._drawingStroke) {\n return;\n }\n\n // Prevent scrolling.\n if (event.cancelable) {\n event.preventDefault();\n }\n\n this._strokeBegin(this._touchEventToSignatureEvent(event));\n };\n\n private _handleTouchMove = (event: TouchEvent): void => {\n if (event.targetTouches.length !== 1) {\n return;\n }\n\n // Prevent scrolling.\n if (event.cancelable) {\n event.preventDefault();\n }\n\n if (!this._drawingStroke) {\n this._strokeEnd(this._touchEventToSignatureEvent(event), false);\n return;\n }\n\n this._strokeMoveUpdate(this._touchEventToSignatureEvent(event));\n };\n\n private _handleTouchEnd = (event: TouchEvent): void => {\n if (event.targetTouches.length !== 0) {\n return;\n }\n\n if (event.cancelable) {\n event.preventDefault();\n }\n\n this.canvas.removeEventListener('touchmove', this._handleTouchMove);\n\n this._strokeEnd(this._touchEventToSignatureEvent(event));\n };\n\n private _handlePointerDown = (event: PointerEvent): void => {\n if (!this._isLeftButtonPressed(event) || this._drawingStroke) {\n return;\n }\n\n event.preventDefault();\n\n this._strokeBegin(this._pointerEventToSignatureEvent(event));\n };\n\n private _handlePointerMove = (event: PointerEvent): void => {\n if (!this._isLeftButtonPressed(event, true) || !this._drawingStroke) {\n // Stop when primary button not pressed or multiple buttons pressed\n this._strokeEnd(this._pointerEventToSignatureEvent(event), false);\n return;\n }\n\n event.preventDefault();\n this._strokeMoveUpdate(this._pointerEventToSignatureEvent(event));\n };\n\n private _handlePointerUp = (event: PointerEvent): void => {\n if (this._isLeftButtonPressed(event)) {\n return;\n }\n\n event.preventDefault();\n this._strokeEnd(this._pointerEventToSignatureEvent(event));\n };\n\n private _getPointGroupOptions(group?: PointGroup): PointGroupOptions {\n return {\n penColor: group && 'penColor' in group ? group.penColor : this.penColor,\n dotSize: group && 'dotSize' in group ? group.dotSize : this.dotSize,\n minWidth: group && 'minWidth' in group ? group.minWidth : this.minWidth,\n maxWidth: group && 'maxWidth' in group ? group.maxWidth : this.maxWidth,\n velocityFilterWeight:\n group && 'velocityFilterWeight' in group\n ? group.velocityFilterWeight\n : this.velocityFilterWeight,\n compositeOperation:\n group && 'compositeOperation' in group\n ? group.compositeOperation\n : this.compositeOperation,\n };\n }\n\n // Private methods\n private _strokeBegin(event: SignatureEvent): void {\n const cancelled = !this.dispatchEvent(\n new CustomEvent('beginStroke', { detail: event, cancelable: true }),\n );\n if (cancelled) {\n return;\n }\n\n const { addEventListener } = this._getListenerFunctions();\n switch (event.event.type) {\n case 'mousedown':\n addEventListener('mousemove', this._handleMouseMove);\n addEventListener('mouseup', this._handleMouseUp);\n break;\n case 'touchstart':\n addEventListener('touchmove', this._handleTouchMove);\n addEventListener('touchend', this._handleTouchEnd);\n break;\n case 'pointerdown':\n addEventListener('pointermove', this._handlePointerMove);\n addEventListener('pointerup', this._handlePointerUp);\n break;\n default:\n // do nothing\n }\n\n this._drawingStroke = true;\n\n const pointGroupOptions = this._getPointGroupOptions();\n\n const newPointGroup: PointGroup = {\n ...pointGroupOptions,\n points: [],\n };\n\n this._data.push(newPointGroup);\n this._reset(pointGroupOptions);\n this._strokeUpdate(event);\n }\n\n private _strokeUpdate(event: SignatureEvent): void {\n if (!this._drawingStroke) {\n return;\n }\n\n if (this._data.length === 0) {\n // This can happen if clear() was called while a signature is still in progress,\n // or if there is a race condition between start/update events.\n this._strokeBegin(event);\n return;\n }\n\n this.dispatchEvent(\n new CustomEvent('beforeUpdateStroke', { detail: event }),\n );\n\n const point = this._createPoint(event.x, event.y, event.pressure);\n const lastPointGroup = this._data[this._data.length - 1];\n const lastPoints = lastPointGroup.points;\n const lastPoint =\n lastPoints.length > 0 && lastPoints[lastPoints.length - 1];\n const isLastPointTooClose = lastPoint\n ? point.distanceTo(lastPoint) <= this.minDistance\n : false;\n const pointGroupOptions = this._getPointGroupOptions(lastPointGroup);\n\n // Skip this point if it's too close to the previous one\n if (!lastPoint || !(lastPoint && isLastPointTooClose)) {\n const curve = this._addPoint(point, pointGroupOptions);\n\n if (!lastPoint) {\n this._drawDot(point, pointGroupOptions);\n } else if (curve) {\n this._drawCurve(curve, pointGroupOptions);\n }\n\n lastPoints.push({\n time: point.time,\n x: point.x,\n y: point.y,\n pressure: point.pressure,\n });\n }\n\n this.dispatchEvent(new CustomEvent('afterUpdateStroke', { detail: event }));\n }\n\n private _strokeEnd(event: SignatureEvent, shouldUpdate = true): void {\n this._removeMoveUpEventListeners();\n\n if (!this._drawingStroke) {\n return;\n }\n\n if (shouldUpdate) {\n this._strokeUpdate(event);\n }\n\n this._drawingStroke = false;\n this.dispatchEvent(new CustomEvent('endStroke', { detail: event }));\n }\n\n private _handlePointerEvents(): void {\n this._drawingStroke = false;\n\n this.canvas.addEventListener('pointerdown', this._handlePointerDown);\n }\n\n private _handleMouseEvents(): void {\n this._drawingStroke = false;\n\n this.canvas.addEventListener('mousedown', this._handleMouseDown);\n }\n\n private _handleTouchEvents(): void {\n this.canvas.addEventListener('touchstart', this._handleTouchStart);\n }\n\n // Called when a new line is started\n private _reset(options: PointGroupOptions): void {\n this._lastPoints = [];\n this._lastVelocity = 0;\n this._lastWidth = (options.minWidth + options.maxWidth) / 2;\n this._ctx.fillStyle = options.penColor;\n this._ctx.globalCompositeOperation = options.compositeOperation;\n }\n\n private _createPoint(x: number, y: number, pressure: number): Point {\n const rect = this.canvas.getBoundingClientRect();\n\n return new Point(\n x - rect.left,\n y - rect.top,\n pressure,\n new Date().getTime(),\n );\n }\n\n // Add point to _lastPoints array and generate a new curve if there are enough points (i.e. 3)\n private _addPoint(point: Point, options: PointGroupOptions): Bezier | null {\n const { _lastPoints } = this;\n\n _lastPoints.push(point);\n\n if (_lastPoints.length > 2) {\n // To reduce the initial lag make it work with 3 points\n // by copying the first point to the beginning.\n if (_lastPoints.length === 3) {\n _lastPoints.unshift(_lastPoints[0]);\n }\n\n // _points array will always have 4 points here.\n const widths = this._calculateCurveWidths(\n _lastPoints[1],\n _lastPoints[2],\n options,\n );\n const curve = Bezier.fromPoints(_lastPoints, widths);\n\n // Remove the first element from the list, so that there are no more than 4 points at any time.\n _lastPoints.shift();\n\n return curve;\n }\n\n return null;\n }\n\n private _calculateCurveWidths(\n startPoint: Point,\n endPoint: Point,\n options: PointGroupOptions,\n ): { start: number; end: number } {\n const velocity =\n options.velocityFilterWeight * endPoint.velocityFrom(startPoint) +\n (1 - options.velocityFilterWeight) * this._lastVelocity;\n\n const newWidth = this._strokeWidth(velocity, options);\n\n const widths = {\n end: newWidth,\n start: this._lastWidth,\n };\n\n this._lastVelocity = velocity;\n this._lastWidth = newWidth;\n\n return widths;\n }\n\n private _strokeWidth(velocity: number, options: PointGroupOptions): number {\n return Math.max(options.maxWidth / (velocity + 1), options.minWidth);\n }\n\n private _drawCurveSegment(x: number, y: number, width: number): void {\n const ctx = this._ctx;\n\n ctx.moveTo(x, y);\n ctx.arc(x, y, width, 0, 2 * Math.PI, false);\n this._isEmpty = false;\n }\n\n private _drawCurve(curve: Bezier, options: PointGroupOptions): void {\n const ctx = this._ctx;\n const widthDelta = curve.endWidth - curve.startWidth;\n // '2' is just an arbitrary number here. If only length is used, then\n // there are gaps between curve segments :/\n const drawSteps = Math.ceil(curve.length()) * 2;\n\n ctx.beginPath();\n ctx.fillStyle = options.penColor;\n\n for (let i = 0; i < drawSteps; i += 1) {\n // Calculate the Bezier (x, y) coordinate for this step.\n const t = i / drawSteps;\n const tt = t * t;\n const ttt = tt * t;\n const u = 1 - t;\n const uu = u * u;\n const uuu = uu * u;\n\n let x = uuu * curve.startPoint.x;\n x += 3 * uu * t * curve.control1.x;\n x += 3 * u * tt * curve.control2.x;\n x += ttt * curve.endPoint.x;\n\n let y = uuu * curve.startPoint.y;\n y += 3 * uu * t * curve.control1.y;\n y += 3 * u * tt * curve.control2.y;\n y += ttt * curve.endPoint.y;\n\n const width = Math.min(\n curve.startWidth + ttt * widthDelta,\n options.maxWidth,\n );\n this._drawCurveSegment(x, y, width);\n }\n\n ctx.closePath();\n ctx.fill();\n }\n\n private _drawDot(point: BasicPoint, options: PointGroupOptions): void {\n const ctx = this._ctx;\n const width =\n options.dotSize > 0\n ? options.dotSize\n : (options.minWidth + options.maxWidth) / 2;\n\n ctx.beginPath();\n this._drawCurveSegment(point.x, point.y, width);\n ctx.closePath();\n ctx.fillStyle = options.penColor;\n ctx.fill();\n }\n\n private _fromData(\n pointGroups: PointGroup[],\n drawCurve: SignaturePad['_drawCurve'],\n drawDot: SignaturePad['_drawDot'],\n ): void {\n for (const group of pointGroups) {\n const { points } = group;\n const pointGroupOptions = this._getPointGroupOptions(group);\n\n if (points.length > 1) {\n for (let j = 0; j < points.length; j += 1) {\n const basicPoint = points[j];\n const point = new Point(\n basicPoint.x,\n basicPoint.y,\n basicPoint.pressure,\n basicPoint.time,\n );\n\n if (j === 0) {\n this._reset(pointGroupOptions);\n }\n\n const curve = this._addPoint(point, pointGroupOptions);\n\n if (curve) {\n drawCurve(curve, pointGroupOptions);\n }\n }\n } else {\n this._reset(pointGroupOptions);\n\n drawDot(points[0], pointGroupOptions);\n }\n }\n }\n\n public toSVG({ includeBackgroundColor = false }: ToSVGOptions = {}): string {\n const pointGroups = this._data;\n const ratio = Math.max(window.devicePixelRatio || 1, 1);\n const minX = 0;\n const minY = 0;\n const maxX = this.canvas.width / ratio;\n const maxY = this.canvas.height / ratio;\n const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\n\n svg.setAttribute('xmlns', 'http://www.w3.org/2000/svg');\n svg.setAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink');\n svg.setAttribute('viewBox', `${minX} ${minY} ${maxX} ${maxY}`);\n svg.setAttribute('width', maxX.toString());\n svg.setAttribute('height', maxY.toString());\n\n if (includeBackgroundColor && this.backgroundColor) {\n const rect = document.createElement('rect');\n rect.setAttribute('width', '100%');\n rect.setAttribute('height', '100%');\n rect.setAttribute('fill', this.backgroundColor);\n\n svg.appendChild(rect);\n }\n\n this._fromData(\n pointGroups,\n\n (curve, { penColor }) => {\n const path = document.createElement('path');\n\n // Need to check curve for NaN values, these pop up when drawing\n // lines on the canvas that are not continuous. E.g. Sharp corners\n // or stopping mid-stroke and than continuing without lifting mouse.\n /* eslint-disable no-restricted-globals */\n if (\n !isNaN(curve.control1.x) &&\n !isNaN(curve.control1.y) &&\n !isNaN(curve.control2.x) &&\n !isNaN(curve.control2.y)\n ) {\n const attr =\n `M ${curve.startPoint.x.toFixed(3)},${curve.startPoint.y.toFixed(\n 3,\n )} ` +\n `C ${curve.control1.x.toFixed(3)},${curve.control1.y.toFixed(3)} ` +\n `${curve.control2.x.toFixed(3)},${curve.control2.y.toFixed(3)} ` +\n `${curve.endPoint.x.toFixed(3)},${curve.endPoint.y.toFixed(3)}`;\n path.setAttribute('d', attr);\n path.setAttribute('stroke-width', (curve.endWidth * 2.25).toFixed(3));\n path.setAttribute('stroke', penColor);\n path.setAttribute('fill', 'none');\n path.setAttribute('stroke-linecap', 'round');\n\n svg.appendChild(path);\n }\n /* eslint-enable no-restricted-globals */\n },\n\n (point, { penColor, dotSize, minWidth, maxWidth }) => {\n const circle = document.createElement('circle');\n const size = dotSize > 0 ? dotSize : (minWidth + maxWidth) / 2;\n circle.setAttribute('r', size.toString());\n circle.setAttribute('cx', point.x.toString());\n circle.setAttribute('cy', point.y.toString());\n circle.setAttribute('fill', penColor);\n\n svg.appendChild(circle);\n },\n );\n\n return svg.outerHTML;\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-this-alias */\n// Slightly simplified version of http://stackoverflow.com/a/27078401/815507\n\nexport function throttle(\n fn: (...args: any[]) => any,\n wait = 250,\n): (this: any, ...args: any[]) => any {\n let previous = 0;\n let timeout: number | null = null;\n let result: any;\n let storedContext: any;\n let storedArgs: any[];\n\n const later = (): void => {\n previous = Date.now();\n timeout = null;\n result = fn.apply(storedContext, storedArgs);\n\n if (!timeout) {\n storedContext = null;\n storedArgs = [];\n }\n };\n\n return function wrapper(this: any, ...args: any[]): any {\n const now = Date.now();\n const remaining = wait - (now - previous);\n\n storedContext = this;\n storedArgs = args;\n\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n\n previous = now;\n result = fn.apply(storedContext, storedArgs);\n\n if (!timeout) {\n storedContext = null;\n storedArgs = [];\n }\n } else if (!timeout) {\n timeout = window.setTimeout(later, remaining);\n }\n\n return result;\n };\n}\n"],"names":["Point","constructor","x","y","pressure","time","isNaN","Error","this","Date","now","distanceTo","start","Math","sqrt","pow","equals","other","velocityFrom","Bezier","fromPoints","points","widths","c2","calculateControlPoints","c3","c1","end","s1","s2","s3","dx1","dy1","dx2","dy2","m1","m2","l1","l2","k","cm","tx","ty","startPoint","control2","control1","endPoint","startWidth","endWidth","length","px","py","i","t","cx","point","cy","xdiff","ydiff","SignatureEventTarget","_et","EventTarget","error","document","addEventListener","type","listener","options","dispatchEvent","event","removeEventListener","callback","SignaturePad","canvas","super","_drawingStroke","_isEmpty","_lastPoints","_data","_lastVelocity","_lastWidth","_handleMouseDown","_isLeftButtonPressed","_strokeBegin","_pointerEventToSignatureEvent","_handleMouseMove","_strokeMoveUpdate","_strokeEnd","_handleMouseUp","_handleTouchStart","targetTouches","cancelable","preventDefault","_touchEventToSignatureEvent","_handleTouchMove","_handleTouchEnd","_handlePointerDown","_handlePointerMove","_handlePointerUp","velocityFilterWeight","minWidth","maxWidth","throttle","_a","minDistance","_b","dotSize","penColor","backgroundColor","compositeOperation","canvasContextOptions","_c","fn","wait","result","storedContext","storedArgs","previous","timeout","later","apply","args","remaining","clearTimeout","window","setTimeout","prototype","_strokeUpdate","_ctx","getContext","clear","on","ctx","fillStyle","clearRect","width","height","fillRect","_reset","_getPointGroupOptions","fromDataURL","dataUrl","Promise","resolve","reject","image","Image","ratio","devicePixelRatio","xOffset","yOffset","onload","drawImage","onerror","crossOrigin","src","toDataURL","encoderOptions","undefined","btoa","toSVG","style","touchAction","msTouchAction","userSelect","isIOS","test","navigator","userAgent","PointerEvent","_handlePointerEvents","_handleMouseEvents","_handleTouchEvents","off","_removeMoveUpEventListeners","_getListenerFunctions","canvasWindow","ownerDocument","defaultView","bind","isEmpty","fromData","pointGroups","_fromData","_drawCurve","_drawDot","concat","toData","only","buttons","clientX","clientY","touch","changedTouches","force","group","CustomEvent","detail","pointGroupOptions","newPointGroup","push","_createPoint","lastPointGroup","lastPoints","lastPoint","isLastPointTooClose","curve","_addPoint","shouldUpdate","globalCompositeOperation","rect","getBoundingClientRect","left","top","getTime","unshift","_calculateCurveWidths","shift","velocity","newWidth","_strokeWidth","max","_drawCurveSegment","moveTo","arc","PI","widthDelta","drawSteps","ceil","beginPath","tt","ttt","u","uu","uuu","min","closePath","fill","drawCurve","drawDot","j","basicPoint","includeBackgroundColor","maxX","maxY","svg","createElementNS","setAttribute","toString","createElement","appendChild","path","attr","toFixed","circle","size","outerHTML"],"mappings":";;;;MAQaA,EAMX,WAAAC,CAAYC,EAAWC,EAAWC,EAAmBC,GACnD,GAAIC,MAAMJ,IAAMI,MAAMH,GACpB,MAAM,IAAII,MAAM,sBAAsBL,MAAMC,MAE9CK,KAAKN,GAAKA,EACVM,KAAKL,GAAKA,EACVK,KAAKJ,SAAWA,GAAY,EAC5BI,KAAKH,KAAOA,GAAQI,KAAKC,KAC1B,CAEM,UAAAC,CAAWC,GAChB,OAAOC,KAAKC,KACVD,KAAKE,IAAIP,KAAKN,EAAIU,EAAMV,EAAG,GAAKW,KAAKE,IAAIP,KAAKL,EAAIS,EAAMT,EAAG,GAE9D,CAEM,MAAAa,CAAOC,GACZ,OACET,KAAKN,IAAMe,EAAMf,GACjBM,KAAKL,IAAMc,EAAMd,GACjBK,KAAKJ,WAAaa,EAAMb,UACxBI,KAAKH,OAASY,EAAMZ,IAEvB,CAEM,YAAAa,CAAaN,GAClB,OAAOJ,KAAKH,OAASO,EAAMP,KACvBG,KAAKG,WAAWC,IAAUJ,KAAKH,KAAOO,EAAMP,MAC5C,CACL,QCzCUc,EACJ,iBAAOC,CACZC,EACAC,GAEA,MAAMC,EAAKf,KAAKgB,uBAAuBH,EAAO,GAAIA,EAAO,GAAIA,EAAO,IAAIE,GAClEE,EAAKjB,KAAKgB,uBAA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E2P,QAAQ,MAAM/C,EAAMlK,SAASzC,EAAE0P,QAAQ,MACxD/C,EAAMhK,SAAS5C,EAAE2P,QAAQ,MAAM/C,EAAMhK,SAAS3C,EAAE0P,QAAQ,KAC7DF,EAAKJ,aAAa,IAAKK,GACvBD,EAAKJ,aAAa,gBAAkC,KAAjBzC,EAAM9J,UAAiB6M,QAAQ,IAClEF,EAAKJ,aAAa,SAAU5I,GAC5BgJ,EAAKJ,aAAa,OAAQ,QAC1BI,EAAKJ,aAAa,iBAAkB,SAEpCF,EAAIK,YAAYC,EACjB,KAIH,CAACpM,GAASoD,WAAUD,UAASN,WAAUC,eACrC,MAAMyJ,EAAS/L,SAAS0L,cAAc,UAChCM,EAAOrJ,EAAU,EAAIA,GAAWN,EAAWC,GAAY,EAC7DyJ,EAAOP,aAAa,IAAKQ,EAAKP,YAC9BM,EAAOP,aAAa,KAAMhM,EAAMrD,EAAEsP,YAClCM,EAAOP,aAAa,KAAMhM,EAAMpD,EAAEqP,YAClCM,EAAOP,aAAa,OAAQ5I,GAE5B0I,EAAIK,YAAYI,EAAO,IAIpBT,EAAIW,SACZ"} \ No newline at end of file diff --git a/public/vendor/signature_pad@5/signature_pad.umd.js b/public/vendor/signature_pad@5/signature_pad.umd.js new file mode 100644 index 0000000000..10d34b64d8 --- /dev/null +++ b/public/vendor/signature_pad@5/signature_pad.umd.js @@ -0,0 +1,641 @@ +/*! + * Signature Pad v5.0.2 | https://github.com/szimek/signature_pad + * (c) 2024 Szymon Nowak | Released under the MIT license + */ + +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.SignaturePad = factory()); +})(this, (function () { 'use strict'; + + class Point { + constructor(x, y, pressure, time) { + if (isNaN(x) || isNaN(y)) { + throw new Error(`Point is invalid: (${x}, ${y})`); + } + this.x = +x; + this.y = +y; + this.pressure = pressure || 0; + this.time = time || Date.now(); + } + distanceTo(start) { + return Math.sqrt(Math.pow(this.x - start.x, 2) + Math.pow(this.y - start.y, 2)); + } + equals(other) { + return (this.x === other.x && + this.y === other.y && + this.pressure === other.pressure && + this.time === other.time); + } + velocityFrom(start) { + return this.time !== start.time + ? this.distanceTo(start) / (this.time - start.time) + : 0; + } + } + + class Bezier { + static fromPoints(points, widths) { + const c2 = this.calculateControlPoints(points[0], points[1], points[2]).c2; + const c3 = this.calculateControlPoints(points[1], points[2], points[3]).c1; + return new Bezier(points[1], c2, c3, points[2], widths.start, widths.end); + } + static calculateControlPoints(s1, s2, s3) { + const dx1 = s1.x - s2.x; + const dy1 = s1.y - s2.y; + const dx2 = s2.x - s3.x; + const dy2 = s2.y - s3.y; + const m1 = { x: (s1.x + s2.x) / 2.0, y: (s1.y + s2.y) / 2.0 }; + const m2 = { x: (s2.x + s3.x) / 2.0, y: (s2.y + s3.y) / 2.0 }; + const l1 = Math.sqrt(dx1 * dx1 + dy1 * dy1); + const l2 = Math.sqrt(dx2 * dx2 + dy2 * dy2); + const dxm = m1.x - m2.x; + const dym = m1.y - m2.y; + const k = l2 / (l1 + l2); + const cm = { x: m2.x + dxm * k, y: m2.y + dym * k }; + const tx = s2.x - cm.x; + const ty = s2.y - cm.y; + return { + c1: new Point(m1.x + tx, m1.y + ty), + c2: new Point(m2.x + tx, m2.y + ty), + }; + } + constructor(startPoint, control2, control1, endPoint, startWidth, endWidth) { + this.startPoint = startPoint; + this.control2 = control2; + this.control1 = control1; + this.endPoint = endPoint; + this.startWidth = startWidth; + this.endWidth = endWidth; + } + length() { + const steps = 10; + let length = 0; + let px; + let py; + for (let i = 0; i <= steps; i += 1) { + const t = i / steps; + const cx = this.point(t, this.startPoint.x, this.control1.x, this.control2.x, this.endPoint.x); + const cy = this.point(t, this.startPoint.y, this.control1.y, this.control2.y, this.endPoint.y); + if (i > 0) { + const xdiff = cx - px; + const ydiff = cy - py; + length += Math.sqrt(xdiff * xdiff + ydiff * ydiff); + } + px = cx; + py = cy; + } + return length; + } + point(t, start, c1, c2, end) { + return (start * (1.0 - t) * (1.0 - t) * (1.0 - t)) + + (3.0 * c1 * (1.0 - t) * (1.0 - t) * t) + + (3.0 * c2 * (1.0 - t) * t * t) + + (end * t * t * t); + } + } + + class SignatureEventTarget { + constructor() { + try { + this._et = new EventTarget(); + } + catch (error) { + this._et = document; + } + } + addEventListener(type, listener, options) { + this._et.addEventListener(type, listener, options); + } + dispatchEvent(event) { + return this._et.dispatchEvent(event); + } + removeEventListener(type, callback, options) { + this._et.removeEventListener(type, callback, options); + } + } + + function throttle(fn, wait = 250) { + let previous = 0; + let timeout = null; + let result; + let storedContext; + let storedArgs; + const later = () => { + previous = Date.now(); + timeout = null; + result = fn.apply(storedContext, storedArgs); + if (!timeout) { + storedContext = null; + storedArgs = []; + } + }; + return function wrapper(...args) { + const now = Date.now(); + const remaining = wait - (now - previous); + storedContext = this; + storedArgs = args; + if (remaining <= 0 || remaining > wait) { + if (timeout) { + clearTimeout(timeout); + timeout = null; + } + previous = now; + result = fn.apply(storedContext, storedArgs); + if (!timeout) { + storedContext = null; + storedArgs = []; + } + } + else if (!timeout) { + timeout = window.setTimeout(later, remaining); + } + return result; + }; + } + + class SignaturePad extends SignatureEventTarget { + constructor(canvas, options = {}) { + var _a, _b, _c; + super(); + this.canvas = canvas; + this._drawingStroke = false; + this._isEmpty = true; + this._lastPoints = []; + this._data = []; + this._lastVelocity = 0; + this._lastWidth = 0; + this._handleMouseDown = (event) => { + if (!this._isLeftButtonPressed(event, true) || this._drawingStroke) { + return; + } + this._strokeBegin(this._pointerEventToSignatureEvent(event)); + }; + this._handleMouseMove = (event) => { + if (!this._isLeftButtonPressed(event, true) || !this._drawingStroke) { + this._strokeEnd(this._pointerEventToSignatureEvent(event), false); + return; + } + this._strokeMoveUpdate(this._pointerEventToSignatureEvent(event)); + }; + this._handleMouseUp = (event) => { + if (this._isLeftButtonPressed(event)) { + return; + } + this._strokeEnd(this._pointerEventToSignatureEvent(event)); + }; + this._handleTouchStart = (event) => { + if (event.targetTouches.length !== 1 || this._drawingStroke) { + return; + } + if (event.cancelable) { + event.preventDefault(); + } + this._strokeBegin(this._touchEventToSignatureEvent(event)); + }; + this._handleTouchMove = (event) => { + if (event.targetTouches.length !== 1) { + return; + } + if (event.cancelable) { + event.preventDefault(); + } + if (!this._drawingStroke) { + this._strokeEnd(this._touchEventToSignatureEvent(event), false); + return; + } + this._strokeMoveUpdate(this._touchEventToSignatureEvent(event)); + }; + this._handleTouchEnd = (event) => { + if (event.targetTouches.length !== 0) { + return; + } + if (event.cancelable) { + event.preventDefault(); + } + this.canvas.removeEventListener('touchmove', this._handleTouchMove); + this._strokeEnd(this._touchEventToSignatureEvent(event)); + }; + this._handlePointerDown = (event) => { + if (!this._isLeftButtonPressed(event) || this._drawingStroke) { + return; + } + event.preventDefault(); + this._strokeBegin(this._pointerEventToSignatureEvent(event)); + }; + this._handlePointerMove = (event) => { + if (!this._isLeftButtonPressed(event, true) || !this._drawingStroke) { + this._strokeEnd(this._pointerEventToSignatureEvent(event), false); + return; + } + event.preventDefault(); + this._strokeMoveUpdate(this._pointerEventToSignatureEvent(event)); + }; + this._handlePointerUp = (event) => { + if (this._isLeftButtonPressed(event)) { + return; + } + event.preventDefault(); + this._strokeEnd(this._pointerEventToSignatureEvent(event)); + }; + this.velocityFilterWeight = options.velocityFilterWeight || 0.7; + this.minWidth = options.minWidth || 0.5; + this.maxWidth = options.maxWidth || 2.5; + this.throttle = (_a = options.throttle) !== null && _a !== void 0 ? _a : 16; + this.minDistance = (_b = options.minDistance) !== null && _b !== void 0 ? _b : 5; + this.dotSize = options.dotSize || 0; + this.penColor = options.penColor || 'black'; + this.backgroundColor = options.backgroundColor || 'rgba(0,0,0,0)'; + this.compositeOperation = options.compositeOperation || 'source-over'; + this.canvasContextOptions = (_c = options.canvasContextOptions) !== null && _c !== void 0 ? _c : {}; + this._strokeMoveUpdate = this.throttle + ? throttle(SignaturePad.prototype._strokeUpdate, this.throttle) + : SignaturePad.prototype._strokeUpdate; + this._ctx = canvas.getContext('2d', this.canvasContextOptions); + this.clear(); + this.on(); + } + clear() { + const { _ctx: ctx, canvas } = this; + ctx.fillStyle = this.backgroundColor; + ctx.clearRect(0, 0, canvas.width, canvas.height); + ctx.fillRect(0, 0, canvas.width, canvas.height); + this._data = []; + this._reset(this._getPointGroupOptions()); + this._isEmpty = true; + } + fromDataURL(dataUrl, options = {}) { + return new Promise((resolve, reject) => { + const image = new Image(); + const ratio = options.ratio || window.devicePixelRatio || 1; + const width = options.width || this.canvas.width / ratio; + const height = options.height || this.canvas.height / ratio; + const xOffset = options.xOffset || 0; + const yOffset = options.yOffset || 0; + this._reset(this._getPointGroupOptions()); + image.onload = () => { + this._ctx.drawImage(image, xOffset, yOffset, width, height); + resolve(); + }; + image.onerror = (error) => { + reject(error); + }; + image.crossOrigin = 'anonymous'; + image.src = dataUrl; + this._isEmpty = false; + }); + } + toDataURL(type = 'image/png', encoderOptions) { + switch (type) { + case 'image/svg+xml': + if (typeof encoderOptions !== 'object') { + encoderOptions = undefined; + } + return `data:image/svg+xml;base64,${btoa(this.toSVG(encoderOptions))}`; + default: + if (typeof encoderOptions !== 'number') { + encoderOptions = undefined; + } + return this.canvas.toDataURL(type, encoderOptions); + } + } + on() { + this.canvas.style.touchAction = 'none'; + this.canvas.style.msTouchAction = 'none'; + this.canvas.style.userSelect = 'none'; + const isIOS = /Macintosh/.test(navigator.userAgent) && 'ontouchstart' in document; + if (window.PointerEvent && !isIOS) { + this._handlePointerEvents(); + } + else { + this._handleMouseEvents(); + if ('ontouchstart' in window) { + this._handleTouchEvents(); + } + } + } + off() { + this.canvas.style.touchAction = 'auto'; + this.canvas.style.msTouchAction = 'auto'; + this.canvas.style.userSelect = 'auto'; + this.canvas.removeEventListener('pointerdown', this._handlePointerDown); + this.canvas.removeEventListener('mousedown', this._handleMouseDown); + this.canvas.removeEventListener('touchstart', this._handleTouchStart); + this._removeMoveUpEventListeners(); + } + _getListenerFunctions() { + var _a; + const canvasWindow = window.document === this.canvas.ownerDocument + ? window + : (_a = this.canvas.ownerDocument.defaultView) !== null && _a !== void 0 ? _a : this.canvas.ownerDocument; + return { + addEventListener: canvasWindow.addEventListener.bind(canvasWindow), + removeEventListener: canvasWindow.removeEventListener.bind(canvasWindow), + }; + } + _removeMoveUpEventListeners() { + const { removeEventListener } = this._getListenerFunctions(); + removeEventListener('pointermove', this._handlePointerMove); + removeEventListener('pointerup', this._handlePointerUp); + removeEventListener('mousemove', this._handleMouseMove); + removeEventListener('mouseup', this._handleMouseUp); + removeEventListener('touchmove', this._handleTouchMove); + removeEventListener('touchend', this._handleTouchEnd); + } + isEmpty() { + return this._isEmpty; + } + fromData(pointGroups, { clear = true } = {}) { + if (clear) { + this.clear(); + } + this._fromData(pointGroups, this._drawCurve.bind(this), this._drawDot.bind(this)); + this._data = this._data.concat(pointGroups); + } + toData() { + return this._data; + } + _isLeftButtonPressed(event, only) { + if (only) { + return event.buttons === 1; + } + return (event.buttons & 1) === 1; + } + _pointerEventToSignatureEvent(event) { + return { + event: event, + type: event.type, + x: event.clientX, + y: event.clientY, + pressure: 'pressure' in event ? event.pressure : 0, + }; + } + _touchEventToSignatureEvent(event) { + const touch = event.changedTouches[0]; + return { + event: event, + type: event.type, + x: touch.clientX, + y: touch.clientY, + pressure: touch.force, + }; + } + _getPointGroupOptions(group) { + return { + penColor: group && 'penColor' in group ? group.penColor : this.penColor, + dotSize: group && 'dotSize' in group ? group.dotSize : this.dotSize, + minWidth: group && 'minWidth' in group ? group.minWidth : this.minWidth, + maxWidth: group && 'maxWidth' in group ? group.maxWidth : this.maxWidth, + velocityFilterWeight: group && 'velocityFilterWeight' in group + ? group.velocityFilterWeight + : this.velocityFilterWeight, + compositeOperation: group && 'compositeOperation' in group + ? group.compositeOperation + : this.compositeOperation, + }; + } + _strokeBegin(event) { + const cancelled = !this.dispatchEvent(new CustomEvent('beginStroke', { detail: event, cancelable: true })); + if (cancelled) { + return; + } + const { addEventListener } = this._getListenerFunctions(); + switch (event.event.type) { + case 'mousedown': + addEventListener('mousemove', this._handleMouseMove); + addEventListener('mouseup', this._handleMouseUp); + break; + case 'touchstart': + addEventListener('touchmove', this._handleTouchMove); + addEventListener('touchend', this._handleTouchEnd); + break; + case 'pointerdown': + addEventListener('pointermove', this._handlePointerMove); + addEventListener('pointerup', this._handlePointerUp); + break; + } + this._drawingStroke = true; + const pointGroupOptions = this._getPointGroupOptions(); + const newPointGroup = Object.assign(Object.assign({}, pointGroupOptions), { points: [] }); + this._data.push(newPointGroup); + this._reset(pointGroupOptions); + this._strokeUpdate(event); + } + _strokeUpdate(event) { + if (!this._drawingStroke) { + return; + } + if (this._data.length === 0) { + this._strokeBegin(event); + return; + } + this.dispatchEvent(new CustomEvent('beforeUpdateStroke', { detail: event })); + const point = this._createPoint(event.x, event.y, event.pressure); + const lastPointGroup = this._data[this._data.length - 1]; + const lastPoints = lastPointGroup.points; + const lastPoint = lastPoints.length > 0 && lastPoints[lastPoints.length - 1]; + const isLastPointTooClose = lastPoint + ? point.distanceTo(lastPoint) <= this.minDistance + : false; + const pointGroupOptions = this._getPointGroupOptions(lastPointGroup); + if (!lastPoint || !(lastPoint && isLastPointTooClose)) { + const curve = this._addPoint(point, pointGroupOptions); + if (!lastPoint) { + this._drawDot(point, pointGroupOptions); + } + else if (curve) { + this._drawCurve(curve, pointGroupOptions); + } + lastPoints.push({ + time: point.time, + x: point.x, + y: point.y, + pressure: point.pressure, + }); + } + this.dispatchEvent(new CustomEvent('afterUpdateStroke', { detail: event })); + } + _strokeEnd(event, shouldUpdate = true) { + this._removeMoveUpEventListeners(); + if (!this._drawingStroke) { + return; + } + if (shouldUpdate) { + this._strokeUpdate(event); + } + this._drawingStroke = false; + this.dispatchEvent(new CustomEvent('endStroke', { detail: event })); + } + _handlePointerEvents() { + this._drawingStroke = false; + this.canvas.addEventListener('pointerdown', this._handlePointerDown); + } + _handleMouseEvents() { + this._drawingStroke = false; + this.canvas.addEventListener('mousedown', this._handleMouseDown); + } + _handleTouchEvents() { + this.canvas.addEventListener('touchstart', this._handleTouchStart); + } + _reset(options) { + this._lastPoints = []; + this._lastVelocity = 0; + this._lastWidth = (options.minWidth + options.maxWidth) / 2; + this._ctx.fillStyle = options.penColor; + this._ctx.globalCompositeOperation = options.compositeOperation; + } + _createPoint(x, y, pressure) { + const rect = this.canvas.getBoundingClientRect(); + return new Point(x - rect.left, y - rect.top, pressure, new Date().getTime()); + } + _addPoint(point, options) { + const { _lastPoints } = this; + _lastPoints.push(point); + if (_lastPoints.length > 2) { + if (_lastPoints.length === 3) { + _lastPoints.unshift(_lastPoints[0]); + } + const widths = this._calculateCurveWidths(_lastPoints[1], _lastPoints[2], options); + const curve = Bezier.fromPoints(_lastPoints, widths); + _lastPoints.shift(); + return curve; + } + return null; + } + _calculateCurveWidths(startPoint, endPoint, options) { + const velocity = options.velocityFilterWeight * endPoint.velocityFrom(startPoint) + + (1 - options.velocityFilterWeight) * this._lastVelocity; + const newWidth = this._strokeWidth(velocity, options); + const widths = { + end: newWidth, + start: this._lastWidth, + }; + this._lastVelocity = velocity; + this._lastWidth = newWidth; + return widths; + } + _strokeWidth(velocity, options) { + return Math.max(options.maxWidth / (velocity + 1), options.minWidth); + } + _drawCurveSegment(x, y, width) { + const ctx = this._ctx; + ctx.moveTo(x, y); + ctx.arc(x, y, width, 0, 2 * Math.PI, false); + this._isEmpty = false; + } + _drawCurve(curve, options) { + const ctx = this._ctx; + const widthDelta = curve.endWidth - curve.startWidth; + const drawSteps = Math.ceil(curve.length()) * 2; + ctx.beginPath(); + ctx.fillStyle = options.penColor; + for (let i = 0; i < drawSteps; i += 1) { + const t = i / drawSteps; + const tt = t * t; + const ttt = tt * t; + const u = 1 - t; + const uu = u * u; + const uuu = uu * u; + let x = uuu * curve.startPoint.x; + x += 3 * uu * t * curve.control1.x; + x += 3 * u * tt * curve.control2.x; + x += ttt * curve.endPoint.x; + let y = uuu * curve.startPoint.y; + y += 3 * uu * t * curve.control1.y; + y += 3 * u * tt * curve.control2.y; + y += ttt * curve.endPoint.y; + const width = Math.min(curve.startWidth + ttt * widthDelta, options.maxWidth); + this._drawCurveSegment(x, y, width); + } + ctx.closePath(); + ctx.fill(); + } + _drawDot(point, options) { + const ctx = this._ctx; + const width = options.dotSize > 0 + ? options.dotSize + : (options.minWidth + options.maxWidth) / 2; + ctx.beginPath(); + this._drawCurveSegment(point.x, point.y, width); + ctx.closePath(); + ctx.fillStyle = options.penColor; + ctx.fill(); + } + _fromData(pointGroups, drawCurve, drawDot) { + for (const group of pointGroups) { + const { points } = group; + const pointGroupOptions = this._getPointGroupOptions(group); + if (points.length > 1) { + for (let j = 0; j < points.length; j += 1) { + const basicPoint = points[j]; + const point = new Point(basicPoint.x, basicPoint.y, basicPoint.pressure, basicPoint.time); + if (j === 0) { + this._reset(pointGroupOptions); + } + const curve = this._addPoint(point, pointGroupOptions); + if (curve) { + drawCurve(curve, pointGroupOptions); + } + } + } + else { + this._reset(pointGroupOptions); + drawDot(points[0], pointGroupOptions); + } + } + } + toSVG({ includeBackgroundColor = false } = {}) { + const pointGroups = this._data; + const ratio = Math.max(window.devicePixelRatio || 1, 1); + const minX = 0; + const minY = 0; + const maxX = this.canvas.width / ratio; + const maxY = this.canvas.height / ratio; + const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); + svg.setAttribute('xmlns', 'http://www.w3.org/2000/svg'); + svg.setAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink'); + svg.setAttribute('viewBox', `${minX} ${minY} ${maxX} ${maxY}`); + svg.setAttribute('width', maxX.toString()); + svg.setAttribute('height', maxY.toString()); + if (includeBackgroundColor && this.backgroundColor) { + const rect = document.createElement('rect'); + rect.setAttribute('width', '100%'); + rect.setAttribute('height', '100%'); + rect.setAttribute('fill', this.backgroundColor); + svg.appendChild(rect); + } + this._fromData(pointGroups, (curve, { penColor }) => { + const path = document.createElement('path'); + if (!isNaN(curve.control1.x) && + !isNaN(curve.control1.y) && + !isNaN(curve.control2.x) && + !isNaN(curve.control2.y)) { + const attr = `M ${curve.startPoint.x.toFixed(3)},${curve.startPoint.y.toFixed(3)} ` + + `C ${curve.control1.x.toFixed(3)},${curve.control1.y.toFixed(3)} ` + + `${curve.control2.x.toFixed(3)},${curve.control2.y.toFixed(3)} ` + + `${curve.endPoint.x.toFixed(3)},${curve.endPoint.y.toFixed(3)}`; + path.setAttribute('d', attr); + path.setAttribute('stroke-width', (curve.endWidth * 2.25).toFixed(3)); + path.setAttribute('stroke', penColor); + path.setAttribute('fill', 'none'); + path.setAttribute('stroke-linecap', 'round'); + svg.appendChild(path); + } + }, (point, { penColor, dotSize, minWidth, maxWidth }) => { + const circle = document.createElement('circle'); + const size = dotSize > 0 ? dotSize : (minWidth + maxWidth) / 2; + circle.setAttribute('r', size.toString()); + circle.setAttribute('cx', point.x.toString()); + circle.setAttribute('cy', point.y.toString()); + circle.setAttribute('fill', penColor); + svg.appendChild(circle); + }); + return svg.outerHTML; + } + } + + return SignaturePad; + +})); +//# sourceMappingURL=signature_pad.umd.js.map diff --git a/public/vendor/signature_pad@5/signature_pad.umd.js.map b/public/vendor/signature_pad@5/signature_pad.umd.js.map new file mode 100644 index 0000000000..e6038ff6bc --- /dev/null +++ b/public/vendor/signature_pad@5/signature_pad.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"signature_pad.umd.js","sources":["../src/point.ts","../src/bezier.ts","../src/signature_event_target.ts","../src/throttle.ts","../src/signature_pad.ts"],"sourcesContent":["// Interface for point data structure used e.g. in SignaturePad#fromData method\nexport interface BasicPoint {\n x: number;\n y: number;\n pressure: number;\n time: number;\n}\n\nexport class Point implements BasicPoint {\n public x: number;\n public y: number;\n public pressure: number;\n public time: number;\n\n constructor(x: number, y: number, pressure?: number, time?: number) {\n if (isNaN(x) || isNaN(y)) {\n throw new Error(`Point is invalid: (${x}, ${y})`);\n }\n this.x = +x;\n this.y = +y;\n this.pressure = pressure || 0;\n this.time = time || Date.now();\n }\n\n public distanceTo(start: BasicPoint): number {\n return Math.sqrt(\n Math.pow(this.x - start.x, 2) + Math.pow(this.y - start.y, 2),\n );\n }\n\n public equals(other: BasicPoint): boolean {\n return (\n this.x === other.x &&\n this.y === other.y &&\n this.pressure === other.pressure &&\n this.time === other.time\n );\n }\n\n public velocityFrom(start: BasicPoint): number {\n return this.time !== start.time\n ? this.distanceTo(start) / (this.time - start.time)\n : 0;\n }\n}\n","import { BasicPoint, Point } from './point';\n\nexport class Bezier {\n public static fromPoints(\n points: Point[],\n widths: { start: number; end: number },\n ): Bezier {\n const c2 = this.calculateControlPoints(points[0], points[1], points[2]).c2;\n const c3 = this.calculateControlPoints(points[1], points[2], points[3]).c1;\n\n return new Bezier(points[1], c2, c3, points[2], widths.start, widths.end);\n }\n\n private static calculateControlPoints(\n s1: BasicPoint,\n s2: BasicPoint,\n s3: BasicPoint,\n ): {\n c1: BasicPoint;\n c2: BasicPoint;\n } {\n const dx1 = s1.x - s2.x;\n const dy1 = s1.y - s2.y;\n const dx2 = s2.x - s3.x;\n const dy2 = s2.y - s3.y;\n\n const m1 = { x: (s1.x + s2.x) / 2.0, y: (s1.y + s2.y) / 2.0 };\n const m2 = { x: (s2.x + s3.x) / 2.0, y: (s2.y + s3.y) / 2.0 };\n\n const l1 = Math.sqrt(dx1 * dx1 + dy1 * dy1);\n const l2 = Math.sqrt(dx2 * dx2 + dy2 * dy2);\n\n const dxm = m1.x - m2.x;\n const dym = m1.y - m2.y;\n\n const k = l2 / (l1 + l2);\n const cm = { x: m2.x + dxm * k, y: m2.y + dym * k };\n\n const tx = s2.x - cm.x;\n const ty = s2.y - cm.y;\n\n return {\n c1: new Point(m1.x + tx, m1.y + ty),\n c2: new Point(m2.x + tx, m2.y + ty),\n };\n }\n\n constructor(\n public startPoint: Point,\n public control2: BasicPoint,\n public control1: BasicPoint,\n public endPoint: Point,\n public startWidth: number,\n public endWidth: number,\n ) {}\n\n // Returns approximated length. Code taken from https://www.lemoda.net/maths/bezier-length/index.html.\n public length(): number {\n const steps = 10;\n let length = 0;\n let px;\n let py;\n\n for (let i = 0; i <= steps; i += 1) {\n const t = i / steps;\n const cx = this.point(\n t,\n this.startPoint.x,\n this.control1.x,\n this.control2.x,\n this.endPoint.x,\n );\n const cy = this.point(\n t,\n this.startPoint.y,\n this.control1.y,\n this.control2.y,\n this.endPoint.y,\n );\n\n if (i > 0) {\n const xdiff = cx - (px as number);\n const ydiff = cy - (py as number);\n\n length += Math.sqrt(xdiff * xdiff + ydiff * ydiff);\n }\n\n px = cx;\n py = cy;\n }\n\n return length;\n }\n\n // Calculate parametric value of x or y given t and the four point coordinates of a cubic bezier curve.\n private point(\n t: number,\n start: number,\n c1: number,\n c2: number,\n end: number,\n ): number {\n // prettier-ignore\n return ( start * (1.0 - t) * (1.0 - t) * (1.0 - t))\n + (3.0 * c1 * (1.0 - t) * (1.0 - t) * t)\n + (3.0 * c2 * (1.0 - t) * t * t)\n + ( end * t * t * t);\n }\n}\n","export class SignatureEventTarget {\n /* tslint:disable: variable-name */\n private _et: EventTarget;\n /* tslint:enable: variable-name */\n\n constructor() {\n try {\n this._et = new EventTarget();\n } catch (error) {\n // Using document as EventTarget to support iOS 13 and older.\n // Because EventTarget constructor just exists at iOS 14 and later.\n this._et = document;\n }\n }\n\n addEventListener(\n type: string,\n listener: EventListenerOrEventListenerObject | null,\n options?: boolean | AddEventListenerOptions,\n ): void {\n this._et.addEventListener(type, listener, options);\n }\n\n dispatchEvent(event: Event): boolean {\n return this._et.dispatchEvent(event);\n }\n\n removeEventListener(\n type: string,\n callback: EventListenerOrEventListenerObject | null,\n options?: boolean | EventListenerOptions,\n ): void {\n this._et.removeEventListener(type, callback, options);\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-this-alias */\n// Slightly simplified version of http://stackoverflow.com/a/27078401/815507\n\nexport function throttle(\n fn: (...args: any[]) => any,\n wait = 250,\n): (this: any, ...args: any[]) => any {\n let previous = 0;\n let timeout: number | null = null;\n let result: any;\n let storedContext: any;\n let storedArgs: any[];\n\n const later = (): void => {\n previous = Date.now();\n timeout = null;\n result = fn.apply(storedContext, storedArgs);\n\n if (!timeout) {\n storedContext = null;\n storedArgs = [];\n }\n };\n\n return function wrapper(this: any, ...args: any[]): any {\n const now = Date.now();\n const remaining = wait - (now - previous);\n\n storedContext = this;\n storedArgs = args;\n\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n\n previous = now;\n result = fn.apply(storedContext, storedArgs);\n\n if (!timeout) {\n storedContext = null;\n storedArgs = [];\n }\n } else if (!timeout) {\n timeout = window.setTimeout(later, remaining);\n }\n\n return result;\n };\n}\n","/**\n * The main idea and some parts of the code (e.g. drawing variable width Bézier curve) are taken from:\n * http://corner.squareup.com/2012/07/smoother-signatures.html\n *\n * Implementation of interpolation using cubic Bézier curves is taken from:\n * https://web.archive.org/web/20160323213433/http://www.benknowscode.com/2012/09/path-interpolation-using-cubic-bezier_9742.html\n *\n * Algorithm for approximated length of a Bézier curve is taken from:\n * http://www.lemoda.net/maths/bezier-length/index.html\n */\n\nimport { Bezier } from './bezier';\nimport { BasicPoint, Point } from './point';\nimport { SignatureEventTarget } from './signature_event_target';\nimport { throttle } from './throttle';\n\nexport interface SignatureEvent {\n event: MouseEvent | TouchEvent | PointerEvent;\n type: string;\n x: number;\n y: number;\n pressure: number;\n}\n\nexport interface FromDataOptions {\n clear?: boolean;\n}\n\nexport interface ToSVGOptions {\n includeBackgroundColor?: boolean;\n}\n\nexport interface PointGroupOptions {\n dotSize: number;\n minWidth: number;\n maxWidth: number;\n penColor: string;\n velocityFilterWeight: number;\n /**\n * This is the globalCompositeOperation for the line.\n * *default: 'source-over'*\n * @see https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation\n */\n compositeOperation: GlobalCompositeOperation;\n}\n\nexport interface Options extends Partial {\n minDistance?: number;\n backgroundColor?: string;\n throttle?: number;\n canvasContextOptions?: CanvasRenderingContext2DSettings;\n}\n\nexport interface PointGroup extends PointGroupOptions {\n points: BasicPoint[];\n}\n\nexport default class SignaturePad extends SignatureEventTarget {\n // Public stuff\n public dotSize: number;\n public minWidth: number;\n public maxWidth: number;\n public penColor: string;\n public minDistance: number;\n public velocityFilterWeight: number;\n public compositeOperation: GlobalCompositeOperation;\n public backgroundColor: string;\n public throttle: number;\n public canvasContextOptions: CanvasRenderingContext2DSettings;\n\n // Private stuff\n /* tslint:disable: variable-name */\n private _ctx: CanvasRenderingContext2D;\n private _drawingStroke = false;\n private _isEmpty = true;\n private _lastPoints: Point[] = []; // Stores up to 4 most recent points; used to generate a new curve\n private _data: PointGroup[] = []; // Stores all points in groups (one group per line or dot)\n private _lastVelocity = 0;\n private _lastWidth = 0;\n private _strokeMoveUpdate: (event: SignatureEvent) => void;\n /* tslint:enable: variable-name */\n\n constructor(\n private canvas: HTMLCanvasElement,\n options: Options = {},\n ) {\n super();\n this.velocityFilterWeight = options.velocityFilterWeight || 0.7;\n this.minWidth = options.minWidth || 0.5;\n this.maxWidth = options.maxWidth || 2.5;\n\n // We need to handle 0 value, so use `??` instead of `||`\n this.throttle = options.throttle ?? 16; // in milliseconds\n this.minDistance = options.minDistance ?? 5; // in pixels\n this.dotSize = options.dotSize || 0;\n this.penColor = options.penColor || 'black';\n this.backgroundColor = options.backgroundColor || 'rgba(0,0,0,0)';\n this.compositeOperation = options.compositeOperation || 'source-over';\n this.canvasContextOptions = options.canvasContextOptions ?? {};\n\n this._strokeMoveUpdate = this.throttle\n ? throttle(SignaturePad.prototype._strokeUpdate, this.throttle)\n : SignaturePad.prototype._strokeUpdate;\n this._ctx = canvas.getContext(\n '2d',\n this.canvasContextOptions,\n ) as CanvasRenderingContext2D;\n\n this.clear();\n\n // Enable mouse and touch event handlers\n this.on();\n }\n\n public clear(): void {\n const { _ctx: ctx, canvas } = this;\n\n // Clear canvas using background color\n ctx.fillStyle = this.backgroundColor;\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n\n this._data = [];\n this._reset(this._getPointGroupOptions());\n this._isEmpty = true;\n }\n\n public fromDataURL(\n dataUrl: string,\n options: {\n ratio?: number;\n width?: number;\n height?: number;\n xOffset?: number;\n yOffset?: number;\n } = {},\n ): Promise {\n return new Promise((resolve, reject) => {\n const image = new Image();\n const ratio = options.ratio || window.devicePixelRatio || 1;\n const width = options.width || this.canvas.width / ratio;\n const height = options.height || this.canvas.height / ratio;\n const xOffset = options.xOffset || 0;\n const yOffset = options.yOffset || 0;\n\n this._reset(this._getPointGroupOptions());\n\n image.onload = (): void => {\n this._ctx.drawImage(image, xOffset, yOffset, width, height);\n resolve();\n };\n image.onerror = (error): void => {\n reject(error);\n };\n image.crossOrigin = 'anonymous';\n image.src = dataUrl;\n\n this._isEmpty = false;\n });\n }\n\n public toDataURL(\n type: 'image/svg+xml',\n encoderOptions?: ToSVGOptions,\n ): string;\n public toDataURL(type?: string, encoderOptions?: number): string;\n public toDataURL(\n type = 'image/png',\n encoderOptions?: number | ToSVGOptions | undefined,\n ): string {\n switch (type) {\n case 'image/svg+xml':\n if (typeof encoderOptions !== 'object') {\n encoderOptions = undefined;\n }\n return `data:image/svg+xml;base64,${btoa(\n this.toSVG(encoderOptions as ToSVGOptions),\n )}`;\n default:\n if (typeof encoderOptions !== 'number') {\n encoderOptions = undefined;\n }\n return this.canvas.toDataURL(type, encoderOptions);\n }\n }\n\n public on(): void {\n // Disable panning/zooming when touching canvas element\n this.canvas.style.touchAction = 'none';\n (this.canvas.style as CSSStyleDeclaration & { msTouchAction: string | null }).msTouchAction = 'none';\n this.canvas.style.userSelect = 'none';\n\n const isIOS =\n /Macintosh/.test(navigator.userAgent) && 'ontouchstart' in document;\n\n // The \"Scribble\" feature of iOS intercepts point events. So that we can\n // lose some of them when tapping rapidly. Use touch events for iOS\n // platforms to prevent it. See\n // https://developer.apple.com/forums/thread/664108 for more information.\n if (window.PointerEvent && !isIOS) {\n this._handlePointerEvents();\n } else {\n this._handleMouseEvents();\n\n if ('ontouchstart' in window) {\n this._handleTouchEvents();\n }\n }\n }\n\n public off(): void {\n // Enable panning/zooming when touching canvas element\n this.canvas.style.touchAction = 'auto';\n (this.canvas.style as CSSStyleDeclaration & { msTouchAction: string | null }).msTouchAction = 'auto';\n this.canvas.style.userSelect = 'auto';\n\n this.canvas.removeEventListener('pointerdown', this._handlePointerDown);\n this.canvas.removeEventListener('mousedown', this._handleMouseDown);\n this.canvas.removeEventListener('touchstart', this._handleTouchStart);\n\n this._removeMoveUpEventListeners();\n }\n\n private _getListenerFunctions() {\n const canvasWindow =\n window.document === this.canvas.ownerDocument\n ? window\n : this.canvas.ownerDocument.defaultView ?? this.canvas.ownerDocument;\n\n return {\n addEventListener: canvasWindow.addEventListener.bind(\n canvasWindow,\n ) as typeof window.addEventListener,\n removeEventListener: canvasWindow.removeEventListener.bind(\n canvasWindow,\n ) as typeof window.removeEventListener,\n };\n }\n\n private _removeMoveUpEventListeners(): void {\n const { removeEventListener } = this._getListenerFunctions();\n removeEventListener('pointermove', this._handlePointerMove);\n removeEventListener('pointerup', this._handlePointerUp);\n\n removeEventListener('mousemove', this._handleMouseMove);\n removeEventListener('mouseup', this._handleMouseUp);\n\n removeEventListener('touchmove', this._handleTouchMove);\n removeEventListener('touchend', this._handleTouchEnd);\n }\n\n public isEmpty(): boolean {\n return this._isEmpty;\n }\n\n public fromData(\n pointGroups: PointGroup[],\n { clear = true }: FromDataOptions = {},\n ): void {\n if (clear) {\n this.clear();\n }\n\n this._fromData(\n pointGroups,\n this._drawCurve.bind(this),\n this._drawDot.bind(this),\n );\n\n this._data = this._data.concat(pointGroups);\n }\n\n public toData(): PointGroup[] {\n return this._data;\n }\n\n public _isLeftButtonPressed(event: MouseEvent, only?: boolean): boolean {\n if (only) {\n return event.buttons === 1;\n }\n\n return (event.buttons & 1) === 1;\n }\n private _pointerEventToSignatureEvent(\n event: MouseEvent | PointerEvent,\n ): SignatureEvent {\n return {\n event: event,\n type: event.type,\n x: event.clientX,\n y: event.clientY,\n pressure: 'pressure' in event ? event.pressure : 0,\n };\n }\n\n private _touchEventToSignatureEvent(event: TouchEvent): SignatureEvent {\n const touch = event.changedTouches[0];\n return {\n event: event,\n type: event.type,\n x: touch.clientX,\n y: touch.clientY,\n pressure: touch.force,\n };\n }\n\n // Event handlers\n private _handleMouseDown = (event: MouseEvent): void => {\n if (!this._isLeftButtonPressed(event, true) || this._drawingStroke) {\n return;\n }\n this._strokeBegin(this._pointerEventToSignatureEvent(event));\n };\n\n private _handleMouseMove = (event: MouseEvent): void => {\n if (!this._isLeftButtonPressed(event, true) || !this._drawingStroke) {\n // Stop when not pressing primary button or pressing multiple buttons\n this._strokeEnd(this._pointerEventToSignatureEvent(event), false);\n return;\n }\n\n this._strokeMoveUpdate(this._pointerEventToSignatureEvent(event));\n };\n\n private _handleMouseUp = (event: MouseEvent): void => {\n if (this._isLeftButtonPressed(event)) {\n return;\n }\n\n this._strokeEnd(this._pointerEventToSignatureEvent(event));\n };\n\n private _handleTouchStart = (event: TouchEvent): void => {\n if (event.targetTouches.length !== 1 || this._drawingStroke) {\n return;\n }\n\n // Prevent scrolling.\n if (event.cancelable) {\n event.preventDefault();\n }\n\n this._strokeBegin(this._touchEventToSignatureEvent(event));\n };\n\n private _handleTouchMove = (event: TouchEvent): void => {\n if (event.targetTouches.length !== 1) {\n return;\n }\n\n // Prevent scrolling.\n if (event.cancelable) {\n event.preventDefault();\n }\n\n if (!this._drawingStroke) {\n this._strokeEnd(this._touchEventToSignatureEvent(event), false);\n return;\n }\n\n this._strokeMoveUpdate(this._touchEventToSignatureEvent(event));\n };\n\n private _handleTouchEnd = (event: TouchEvent): void => {\n if (event.targetTouches.length !== 0) {\n return;\n }\n\n if (event.cancelable) {\n event.preventDefault();\n }\n\n this.canvas.removeEventListener('touchmove', this._handleTouchMove);\n\n this._strokeEnd(this._touchEventToSignatureEvent(event));\n };\n\n private _handlePointerDown = (event: PointerEvent): void => {\n if (!this._isLeftButtonPressed(event) || this._drawingStroke) {\n return;\n }\n\n event.preventDefault();\n\n this._strokeBegin(this._pointerEventToSignatureEvent(event));\n };\n\n private _handlePointerMove = (event: PointerEvent): void => {\n if (!this._isLeftButtonPressed(event, true) || !this._drawingStroke) {\n // Stop when primary button not pressed or multiple buttons pressed\n this._strokeEnd(this._pointerEventToSignatureEvent(event), false);\n return;\n }\n\n event.preventDefault();\n this._strokeMoveUpdate(this._pointerEventToSignatureEvent(event));\n };\n\n private _handlePointerUp = (event: PointerEvent): void => {\n if (this._isLeftButtonPressed(event)) {\n return;\n }\n\n event.preventDefault();\n this._strokeEnd(this._pointerEventToSignatureEvent(event));\n };\n\n private _getPointGroupOptions(group?: PointGroup): PointGroupOptions {\n return {\n penColor: group && 'penColor' in group ? group.penColor : this.penColor,\n dotSize: group && 'dotSize' in group ? group.dotSize : this.dotSize,\n minWidth: group && 'minWidth' in group ? group.minWidth : this.minWidth,\n maxWidth: group && 'maxWidth' in group ? group.maxWidth : this.maxWidth,\n velocityFilterWeight:\n group && 'velocityFilterWeight' in group\n ? group.velocityFilterWeight\n : this.velocityFilterWeight,\n compositeOperation:\n group && 'compositeOperation' in group\n ? group.compositeOperation\n : this.compositeOperation,\n };\n }\n\n // Private methods\n private _strokeBegin(event: SignatureEvent): void {\n const cancelled = !this.dispatchEvent(\n new CustomEvent('beginStroke', { detail: event, cancelable: true }),\n );\n if (cancelled) {\n return;\n }\n\n const { addEventListener } = this._getListenerFunctions();\n switch (event.event.type) {\n case 'mousedown':\n addEventListener('mousemove', this._handleMouseMove);\n addEventListener('mouseup', this._handleMouseUp);\n break;\n case 'touchstart':\n addEventListener('touchmove', this._handleTouchMove);\n addEventListener('touchend', this._handleTouchEnd);\n break;\n case 'pointerdown':\n addEventListener('pointermove', this._handlePointerMove);\n addEventListener('pointerup', this._handlePointerUp);\n break;\n default:\n // do nothing\n }\n\n this._drawingStroke = true;\n\n const pointGroupOptions = this._getPointGroupOptions();\n\n const newPointGroup: PointGroup = {\n ...pointGroupOptions,\n points: [],\n };\n\n this._data.push(newPointGroup);\n this._reset(pointGroupOptions);\n this._strokeUpdate(event);\n }\n\n private _strokeUpdate(event: SignatureEvent): void {\n if (!this._drawingStroke) {\n return;\n }\n\n if (this._data.length === 0) {\n // This can happen if clear() was called while a signature is still in progress,\n // or if there is a race condition between start/update events.\n this._strokeBegin(event);\n return;\n }\n\n this.dispatchEvent(\n new CustomEvent('beforeUpdateStroke', { detail: event }),\n );\n\n const point = this._createPoint(event.x, event.y, event.pressure);\n const lastPointGroup = this._data[this._data.length - 1];\n const lastPoints = lastPointGroup.points;\n const lastPoint =\n lastPoints.length > 0 && lastPoints[lastPoints.length - 1];\n const isLastPointTooClose = lastPoint\n ? point.distanceTo(lastPoint) <= this.minDistance\n : false;\n const pointGroupOptions = this._getPointGroupOptions(lastPointGroup);\n\n // Skip this point if it's too close to the previous one\n if (!lastPoint || !(lastPoint && isLastPointTooClose)) {\n const curve = this._addPoint(point, pointGroupOptions);\n\n if (!lastPoint) {\n this._drawDot(point, pointGroupOptions);\n } else if (curve) {\n this._drawCurve(curve, pointGroupOptions);\n }\n\n lastPoints.push({\n time: point.time,\n x: point.x,\n y: point.y,\n pressure: point.pressure,\n });\n }\n\n this.dispatchEvent(new CustomEvent('afterUpdateStroke', { detail: event }));\n }\n\n private _strokeEnd(event: SignatureEvent, shouldUpdate = true): void {\n this._removeMoveUpEventListeners();\n\n if (!this._drawingStroke) {\n return;\n }\n\n if (shouldUpdate) {\n this._strokeUpdate(event);\n }\n\n this._drawingStroke = false;\n this.dispatchEvent(new CustomEvent('endStroke', { detail: event }));\n }\n\n private _handlePointerEvents(): void {\n this._drawingStroke = false;\n\n this.canvas.addEventListener('pointerdown', this._handlePointerDown);\n }\n\n private _handleMouseEvents(): void {\n this._drawingStroke = false;\n\n this.canvas.addEventListener('mousedown', this._handleMouseDown);\n }\n\n private _handleTouchEvents(): void {\n this.canvas.addEventListener('touchstart', this._handleTouchStart);\n }\n\n // Called when a new line is started\n private _reset(options: PointGroupOptions): void {\n this._lastPoints = [];\n this._lastVelocity = 0;\n this._lastWidth = (options.minWidth + options.maxWidth) / 2;\n this._ctx.fillStyle = options.penColor;\n this._ctx.globalCompositeOperation = options.compositeOperation;\n }\n\n private _createPoint(x: number, y: number, pressure: number): Point {\n const rect = this.canvas.getBoundingClientRect();\n\n return new Point(\n x - rect.left,\n y - rect.top,\n pressure,\n new Date().getTime(),\n );\n }\n\n // Add point to _lastPoints array and generate a new curve if there are enough points (i.e. 3)\n private _addPoint(point: Point, options: PointGroupOptions): Bezier | null {\n const { _lastPoints } = this;\n\n _lastPoints.push(point);\n\n if (_lastPoints.length > 2) {\n // To reduce the initial lag make it work with 3 points\n // by copying the first point to the beginning.\n if (_lastPoints.length === 3) {\n _lastPoints.unshift(_lastPoints[0]);\n }\n\n // _points array will always have 4 points here.\n const widths = this._calculateCurveWidths(\n _lastPoints[1],\n _lastPoints[2],\n options,\n );\n const curve = Bezier.fromPoints(_lastPoints, widths);\n\n // Remove the first element from the list, so that there are no more than 4 points at any time.\n _lastPoints.shift();\n\n return curve;\n }\n\n return null;\n }\n\n private _calculateCurveWidths(\n startPoint: Point,\n endPoint: Point,\n options: PointGroupOptions,\n ): { start: number; end: number } {\n const velocity =\n options.velocityFilterWeight * endPoint.velocityFrom(startPoint) +\n (1 - options.velocityFilterWeight) * this._lastVelocity;\n\n const newWidth = this._strokeWidth(velocity, options);\n\n const widths = {\n end: newWidth,\n start: this._lastWidth,\n };\n\n this._lastVelocity = velocity;\n this._lastWidth = newWidth;\n\n return widths;\n }\n\n private _strokeWidth(velocity: number, options: PointGroupOptions): number {\n return Math.max(options.maxWidth / (velocity + 1), options.minWidth);\n }\n\n private _drawCurveSegment(x: number, y: number, width: number): void {\n const ctx = this._ctx;\n\n ctx.moveTo(x, y);\n ctx.arc(x, y, width, 0, 2 * Math.PI, false);\n this._isEmpty = false;\n }\n\n private _drawCurve(curve: Bezier, options: PointGroupOptions): void {\n const ctx = this._ctx;\n const widthDelta = curve.endWidth - curve.startWidth;\n // '2' is just an arbitrary number here. If only length is used, then\n // there are gaps between curve segments :/\n const drawSteps = Math.ceil(curve.length()) * 2;\n\n ctx.beginPath();\n ctx.fillStyle = options.penColor;\n\n for (let i = 0; i < drawSteps; i += 1) {\n // Calculate the Bezier (x, y) coordinate for this step.\n const t = i / drawSteps;\n const tt = t * t;\n const ttt = tt * t;\n const u = 1 - t;\n const uu = u * u;\n const uuu = uu * u;\n\n let x = uuu * curve.startPoint.x;\n x += 3 * uu * t * curve.control1.x;\n x += 3 * u * tt * curve.control2.x;\n x += ttt * curve.endPoint.x;\n\n let y = uuu * curve.startPoint.y;\n y += 3 * uu * t * curve.control1.y;\n y += 3 * u * tt * curve.control2.y;\n y += ttt * curve.endPoint.y;\n\n const width = Math.min(\n curve.startWidth + ttt * widthDelta,\n options.maxWidth,\n );\n this._drawCurveSegment(x, y, width);\n }\n\n ctx.closePath();\n ctx.fill();\n }\n\n private _drawDot(point: BasicPoint, options: PointGroupOptions): void {\n const ctx = this._ctx;\n const width =\n options.dotSize > 0\n ? options.dotSize\n : (options.minWidth + options.maxWidth) / 2;\n\n ctx.beginPath();\n this._drawCurveSegment(point.x, point.y, width);\n ctx.closePath();\n ctx.fillStyle = options.penColor;\n ctx.fill();\n }\n\n private _fromData(\n pointGroups: PointGroup[],\n drawCurve: SignaturePad['_drawCurve'],\n drawDot: SignaturePad['_drawDot'],\n ): void {\n for (const group of pointGroups) {\n const { points } = group;\n const pointGroupOptions = this._getPointGroupOptions(group);\n\n if (points.length > 1) {\n for (let j = 0; j < points.length; j += 1) {\n const basicPoint = points[j];\n const point = new Point(\n basicPoint.x,\n basicPoint.y,\n basicPoint.pressure,\n basicPoint.time,\n );\n\n if (j === 0) {\n this._reset(pointGroupOptions);\n }\n\n const curve = this._addPoint(point, pointGroupOptions);\n\n if (curve) {\n drawCurve(curve, pointGroupOptions);\n }\n }\n } else {\n this._reset(pointGroupOptions);\n\n drawDot(points[0], pointGroupOptions);\n }\n }\n }\n\n public toSVG({ includeBackgroundColor = false }: ToSVGOptions = {}): string {\n const pointGroups = this._data;\n const ratio = Math.max(window.devicePixelRatio || 1, 1);\n const minX = 0;\n const minY = 0;\n const maxX = this.canvas.width / ratio;\n const maxY = this.canvas.height / ratio;\n const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\n\n svg.setAttribute('xmlns', 'http://www.w3.org/2000/svg');\n svg.setAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink');\n svg.setAttribute('viewBox', `${minX} ${minY} ${maxX} ${maxY}`);\n svg.setAttribute('width', maxX.toString());\n svg.setAttribute('height', maxY.toString());\n\n if (includeBackgroundColor && this.backgroundColor) {\n const rect = document.createElement('rect');\n rect.setAttribute('width', '100%');\n rect.setAttribute('height', '100%');\n rect.setAttribute('fill', this.backgroundColor);\n\n svg.appendChild(rect);\n }\n\n this._fromData(\n pointGroups,\n\n (curve, { penColor }) => {\n const path = document.createElement('path');\n\n // Need to check curve for NaN values, these pop up when drawing\n // lines on the canvas that are not continuous. E.g. Sharp corners\n // or stopping mid-stroke and than continuing without lifting mouse.\n /* eslint-disable no-restricted-globals */\n if (\n !isNaN(curve.control1.x) &&\n !isNaN(curve.control1.y) &&\n !isNaN(curve.control2.x) &&\n !isNaN(curve.control2.y)\n ) {\n const attr =\n `M ${curve.startPoint.x.toFixed(3)},${curve.startPoint.y.toFixed(\n 3,\n )} ` +\n `C ${curve.control1.x.toFixed(3)},${curve.control1.y.toFixed(3)} ` +\n `${curve.control2.x.toFixed(3)},${curve.control2.y.toFixed(3)} ` +\n `${curve.endPoint.x.toFixed(3)},${curve.endPoint.y.toFixed(3)}`;\n path.setAttribute('d', attr);\n path.setAttribute('stroke-width', (curve.endWidth * 2.25).toFixed(3));\n path.setAttribute('stroke', penColor);\n path.setAttribute('fill', 'none');\n path.setAttribute('stroke-linecap', 'round');\n\n svg.appendChild(path);\n }\n /* eslint-enable no-restricted-globals */\n },\n\n (point, { penColor, dotSize, minWidth, maxWidth }) => {\n const circle = document.createElement('circle');\n const size = dotSize > 0 ? dotSize : (minWidth + maxWidth) / 2;\n circle.setAttribute('r', size.toString());\n circle.setAttribute('cx', point.x.toString());\n circle.setAttribute('cy', point.y.toString());\n circle.setAttribute('fill', penColor);\n\n svg.appendChild(circle);\n },\n );\n\n return svg.outerHTML;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;UAQa,KAAK,CAAA;IAMhB,IAAA,WAAA,CAAY,CAAS,EAAE,CAAS,EAAE,QAAiB,EAAE,IAAa,EAAA;YAChE,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE;gBACxB,MAAM,IAAI,KAAK,CAAC,CAAA,mBAAA,EAAsB,CAAC,CAAK,EAAA,EAAA,CAAC,CAAG,CAAA,CAAA,CAAC,CAAC;aACnD;IACD,QAAA,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACZ,QAAA,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACZ,QAAA,IAAI,CAAC,QAAQ,GAAG,QAAQ,IAAI,CAAC,CAAC;YAC9B,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;SAChC;IAEM,IAAA,UAAU,CAAC,KAAiB,EAAA;IACjC,QAAA,OAAO,IAAI,CAAC,IAAI,CACd,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAC9D,CAAC;SACH;IAEM,IAAA,MAAM,CAAC,KAAiB,EAAA;IAC7B,QAAA,QACE,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC;IAClB,YAAA,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC;IAClB,YAAA,IAAI,CAAC,QAAQ,KAAK,KAAK,CAAC,QA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,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC9C,YAAA,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAEtC,YAAA,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAC1B,SAAC,CACF,CAAC;YAEF,OAAO,GAAG,CAAC,SAAS,CAAC;SACtB;IACF;;;;;;;;"} \ No newline at end of file diff --git a/public/vendor/signature_pad@5/signature_pad.umd.min.js b/public/vendor/signature_pad@5/signature_pad.umd.min.js new file mode 100644 index 0000000000..d37c43bb65 --- /dev/null +++ b/public/vendor/signature_pad@5/signature_pad.umd.min.js @@ -0,0 +1,6 @@ +/*! + * Signature Pad v5.0.2 | https://github.com/szimek/signature_pad + * (c) 2024 Szymon Nowak | Released under the MIT license + */ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).SignaturePad=e()}(this,(function(){"use strict";class t{constructor(t,e,i,n){if(isNaN(t)||isNaN(e))throw new Error(`Point is invalid: (${t}, ${e})`);this.x=+t,this.y=+e,this.pressure=i||0,this.time=n||Date.now()}distanceTo(t){return Math.sqrt(Math.pow(this.x-t.x,2)+Math.pow(this.y-t.y,2))}equals(t){return this.x===t.x&&this.y===t.y&&this.pressure===t.pressure&&this.time===t.time}velocityFrom(t){return this.time!==t.time?this.distanceTo(t)/(this.time-t.time):0}}class e{static fromPoints(t,i){const n=this.calculateControlPoints(t[0],t[1],t[2]).c2,s=this.calculateControlPoints(t[1],t[2],t[3]).c1;return new e(t[1],n,s,t[2],i.start,i.end)}static calculateControlPoints(e,i,n){const s=e.x-i.x,o=e.y-i.y,r=i.x-n.x,h=i.y-n.y,a=(e.x+i.x)/2,c=(e.y+i.y)/2,d=(i.x+n.x)/2,l=(i.y+n.y)/2,u=Math.sqrt(s*s+o*o),v=Math.sqrt(r*r+h*h),_=v/(u+v),p=d+(a-d)*_,m=l+(c-l)*_,g=i.x-p,w=i.y-m;return{c1:new t(a+g,c+w),c2:new t(d+g,l+w)}}constructor(t,e,i,n,s,o){this.startPoint=t,this.control2=e,this.control1=i,this.endPoint=n,this.startWidth=s,this.endWidth=o}length(){let t,e,i=0;for(let n=0;n<=10;n+=1){const s=n/10,o=this.point(s,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),r=this.point(s,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y);if(n>0){const n=o-t,s=r-e;i+=Math.sqrt(n*n+s*s)}t=o,e=r}return i}point(t,e,i,n,s){return e*(1-t)*(1-t)*(1-t)+3*i*(1-t)*(1-t)*t+3*n*(1-t)*t*t+s*t*t*t}}class i{constructor(){try{this._et=new EventTarget}catch(t){this._et=document}}addEventListener(t,e,i){this._et.addEventListener(t,e,i)}dispatchEvent(t){return this._et.dispatchEvent(t)}removeEventListener(t,e,i){this._et.removeEventListener(t,e,i)}}class n extends i{constructor(t,e={}){var i,s,o;super(),this.canvas=t,this._drawingStroke=!1,this._isEmpty=!0,this._lastPoints=[],this._data=[],this._lastVelocity=0,this._lastWidth=0,this._handleMouseDown=t=>{this._isLeftButtonPressed(t,!0)&&!this._drawingStroke&&this._strokeBegin(this._pointerEventToSignatureEvent(t))},this._handleMouseMove=t=>{this._isLeftButtonPressed(t,!0)&&this._drawingStroke?this._strokeMoveUpdate(this._pointerEventToSignatureEvent(t)):this._strokeEnd(this._pointerEventToSignatureEvent(t),!1)},this._handleMouseUp=t=>{this._isLeftButtonPressed(t)||this._strokeEnd(this._pointerEventToSignatureEvent(t))},this._handleTouchStart=t=>{1!==t.targetTouches.length||this._drawingStroke||(t.cancelable&&t.preventDefault(),this._strokeBegin(this._touchEventToSignatureEvent(t)))},this._handleTouchMove=t=>{1===t.targetTouches.length&&(t.cancelable&&t.preventDefault(),this._drawingStroke?this._strokeMoveUpdate(this._touchEventToSignatureEvent(t)):this._strokeEnd(this._touchEventToSignatureEvent(t),!1))},this._handleTouchEnd=t=>{0===t.targetTouches.length&&(t.cancelable&&t.preventDefault(),this.canvas.removeEventListener("touchmove",this._handleTouchMove),this._strokeEnd(this._touchEventToSignatureEvent(t)))},this._handlePointerDown=t=>{this._isLeftButtonPressed(t)&&!this._drawingStroke&&(t.preventDefault(),this._strokeBegin(this._pointerEventToSignatureEvent(t)))},this._handlePointerMove=t=>{this._isLeftButtonPressed(t,!0)&&this._drawingStroke?(t.preventDefault(),this._strokeMoveUpdate(this._pointerEventToSignatureEvent(t))):this._strokeEnd(this._pointerEventToSignatureEvent(t),!1)},this._handlePointerUp=t=>{this._isLeftButtonPressed(t)||(t.preventDefault(),this._strokeEnd(this._pointerEventToSignatureEvent(t)))},this.velocityFilterWeight=e.velocityFilterWeight||.7,this.minWidth=e.minWidth||.5,this.maxWidth=e.maxWidth||2.5,this.throttle=null!==(i=e.throttle)&&void 0!==i?i:16,this.minDistance=null!==(s=e.minDistance)&&void 0!==s?s:5,this.dotSize=e.dotSize||0,this.penColor=e.penColor||"black",this.backgroundColor=e.backgroundColor||"rgba(0,0,0,0)",this.compositeOperation=e.compositeOperation||"source-over",this.canvasContextOptions=null!==(o=e.canvasContextOptions)&&void 0!==o?o:{},this._strokeMoveUpdate=this.throttle?function(t,e=250){let i,n,s,o=0,r=null;const h=()=>{o=Date.now(),r=null,i=t.apply(n,s),r||(n=null,s=[])};return function(...a){const c=Date.now(),d=e-(c-o);return n=this,s=a,d<=0||d>e?(r&&(clearTimeout(r),r=null),o=c,i=t.apply(n,s),r||(n=null,s=[])):r||(r=window.setTimeout(h,d)),i}}(n.prototype._strokeUpdate,this.throttle):n.prototype._strokeUpdate,this._ctx=t.getContext("2d",this.canvasContextOptions),this.clear(),this.on()}clear(){const{_ctx:t,canvas:e}=this;t.fillStyle=this.backgroundColor,t.clearRect(0,0,e.width,e.height),t.fillRect(0,0,e.width,e.height),this._data=[],this._reset(this._getPointGroupOptions()),this._isEmpty=!0}fromDataURL(t,e={}){return new Promise(((i,n)=>{const s=new Image,o=e.ratio||window.devicePixelRatio||1,r=e.width||this.canvas.width/o,h=e.height||this.canvas.height/o,a=e.xOffset||0,c=e.yOffset||0;this._reset(this._getPointGroupOptions()),s.onload=()=>{this._ctx.drawImage(s,a,c,r,h),i()},s.onerror=t=>{n(t)},s.crossOrigin="anonymous",s.src=t,this._isEmpty=!1}))}toDataURL(t="image/png",e){return"image/svg+xml"===t?("object"!=typeof e&&(e=void 0),`data:image/svg+xml;base64,${btoa(this.toSVG(e))}`):("number"!=typeof e&&(e=void 0),this.canvas.toDataURL(t,e))}on(){this.canvas.style.touchAction="none",this.canvas.style.msTouchAction="none",this.canvas.style.userSelect="none";const t=/Macintosh/.test(navigator.userAgent)&&"ontouchstart"in document;window.PointerEvent&&!t?this._handlePointerEvents():(this._handleMouseEvents(),"ontouchstart"in window&&this._handleTouchEvents())}off(){this.canvas.style.touchAction="auto",this.canvas.style.msTouchAction="auto",this.canvas.style.userSelect="auto",this.canvas.removeEventListener("pointerdown",this._handlePointerDown),this.canvas.removeEventListener("mousedown",this._handleMouseDown),this.canvas.removeEventListener("touchstart",this._handleTouchStart),this._removeMoveUpEventListeners()}_getListenerFunctions(){var t;const e=window.document===this.canvas.ownerDocument?window:null!==(t=this.canvas.ownerDocument.defaultView)&&void 0!==t?t:this.canvas.ownerDocument;return{addEventListener:e.addEventListener.bind(e),removeEventListener:e.removeEventListener.bind(e)}}_removeMoveUpEventListeners(){const{removeEventListener:t}=this._getListenerFunctions();t("pointermove",this._handlePointerMove),t("pointerup",this._handlePointerUp),t("mousemove",this._handleMouseMove),t("mouseup",this._handleMouseUp),t("touchmove",this._handleTouchMove),t("touchend",this._handleTouchEnd)}isEmpty(){return this._isEmpty}fromData(t,{clear:e=!0}={}){e&&this.clear(),this._fromData(t,this._drawCurve.bind(this),this._drawDot.bind(this)),this._data=this._data.concat(t)}toData(){return this._data}_isLeftButtonPressed(t,e){return e?1===t.buttons:!(1&~t.buttons)}_pointerEventToSignatureEvent(t){return{event:t,type:t.type,x:t.clientX,y:t.clientY,pressure:"pressure"in t?t.pressure:0}}_touchEventToSignatureEvent(t){const e=t.changedTouches[0];return{event:t,type:t.type,x:e.clientX,y:e.clientY,pressure:e.force}}_getPointGroupOptions(t){return{penColor:t&&"penColor"in t?t.penColor:this.penColor,dotSize:t&&"dotSize"in t?t.dotSize:this.dotSize,minWidth:t&&"minWidth"in t?t.minWidth:this.minWidth,maxWidth:t&&"maxWidth"in t?t.maxWidth:this.maxWidth,velocityFilterWeight:t&&"velocityFilterWeight"in t?t.velocityFilterWeight:this.velocityFilterWeight,compositeOperation:t&&"compositeOperation"in t?t.compositeOperation:this.compositeOperation}}_strokeBegin(t){if(!this.dispatchEvent(new CustomEvent("beginStroke",{detail:t,cancelable:!0})))return;const{addEventListener:e}=this._getListenerFunctions();switch(t.event.type){case"mousedown":e("mousemove",this._handleMouseMove),e("mouseup",this._handleMouseUp);break;case"touchstart":e("touchmove",this._handleTouchMove),e("touchend",this._handleTouchEnd);break;case"pointerdown":e("pointermove",this._handlePointerMove),e("pointerup",this._handlePointerUp)}this._drawingStroke=!0;const i=this._getPointGroupOptions(),n=Object.assign(Object.assign({},i),{points:[]});this._data.push(n),this._reset(i),this._strokeUpdate(t)}_strokeUpdate(t){if(!this._drawingStroke)return;if(0===this._data.length)return void this._strokeBegin(t);this.dispatchEvent(new CustomEvent("beforeUpdateStroke",{detail:t}));const e=this._createPoint(t.x,t.y,t.pressure),i=this._data[this._data.length-1],n=i.points,s=n.length>0&&n[n.length-1],o=!!s&&e.distanceTo(s)<=this.minDistance,r=this._getPointGroupOptions(i);if(!s||!s||!o){const t=this._addPoint(e,r);s?t&&this._drawCurve(t,r):this._drawDot(e,r),n.push({time:e.time,x:e.x,y:e.y,pressure:e.pressure})}this.dispatchEvent(new CustomEvent("afterUpdateStroke",{detail:t}))}_strokeEnd(t,e=!0){this._removeMoveUpEventListeners(),this._drawingStroke&&(e&&this._strokeUpdate(t),this._drawingStroke=!1,this.dispatchEvent(new CustomEvent("endStroke",{detail:t})))}_handlePointerEvents(){this._drawingStroke=!1,this.canvas.addEventListener("pointerdown",this._handlePointerDown)}_handleMouseEvents(){this._drawingStroke=!1,this.canvas.addEventListener("mousedown",this._handleMouseDown)}_handleTouchEvents(){this.canvas.addEventListener("touchstart",this._handleTouchStart)}_reset(t){this._lastPoints=[],this._lastVelocity=0,this._lastWidth=(t.minWidth+t.maxWidth)/2,this._ctx.fillStyle=t.penColor,this._ctx.globalCompositeOperation=t.compositeOperation}_createPoint(e,i,n){const s=this.canvas.getBoundingClientRect();return new t(e-s.left,i-s.top,n,(new Date).getTime())}_addPoint(t,i){const{_lastPoints:n}=this;if(n.push(t),n.length>2){3===n.length&&n.unshift(n[0]);const t=this._calculateCurveWidths(n[1],n[2],i),s=e.fromPoints(n,t);return n.shift(),s}return null}_calculateCurveWidths(t,e,i){const n=i.velocityFilterWeight*e.velocityFrom(t)+(1-i.velocityFilterWeight)*this._lastVelocity,s=this._strokeWidth(n,i),o={end:s,start:this._lastWidth};return this._lastVelocity=n,this._lastWidth=s,o}_strokeWidth(t,e){return Math.max(e.maxWidth/(t+1),e.minWidth)}_drawCurveSegment(t,e,i){const n=this._ctx;n.moveTo(t,e),n.arc(t,e,i,0,2*Math.PI,!1),this._isEmpty=!1}_drawCurve(t,e){const i=this._ctx,n=t.endWidth-t.startWidth,s=2*Math.ceil(t.length());i.beginPath(),i.fillStyle=e.penColor;for(let i=0;i0?e.dotSize:(e.minWidth+e.maxWidth)/2;i.beginPath(),this._drawCurveSegment(t.x,t.y,n),i.closePath(),i.fillStyle=e.penColor,i.fill()}_fromData(e,i,n){for(const s of e){const{points:e}=s,o=this._getPointGroupOptions(s);if(e.length>1)for(let n=0;n{const i=document.createElement("path");if(!(isNaN(t.control1.x)||isNaN(t.control1.y)||isNaN(t.control2.x)||isNaN(t.control2.y))){const n=`M ${t.startPoint.x.toFixed(3)},${t.startPoint.y.toFixed(3)} C ${t.control1.x.toFixed(3)},${t.control1.y.toFixed(3)} ${t.control2.x.toFixed(3)},${t.control2.y.toFixed(3)} ${t.endPoint.x.toFixed(3)},${t.endPoint.y.toFixed(3)}`;i.setAttribute("d",n),i.setAttribute("stroke-width",(2.25*t.endWidth).toFixed(3)),i.setAttribute("stroke",e),i.setAttribute("fill","none"),i.setAttribute("stroke-linecap","round"),o.appendChild(i)}}),((t,{penColor:e,dotSize:i,minWidth:n,maxWidth:s})=>{const r=document.createElement("circle"),h=i>0?i:(n+s)/2;r.setAttribute("r",h.toString()),r.setAttribute("cx",t.x.toString()),r.setAttribute("cy",t.y.toString()),r.setAttribute("fill",e),o.appendChild(r)})),o.outerHTML}}return n})); +//# sourceMappingURL=signature_pad.umd.min.js.map diff --git a/public/vendor/signature_pad@5/signature_pad.umd.min.js.map b/public/vendor/signature_pad@5/signature_pad.umd.min.js.map new file mode 100644 index 0000000000..a150de1fc6 --- /dev/null +++ b/public/vendor/signature_pad@5/signature_pad.umd.min.js.map @@ -0,0 +1 @@ +{"version":3,"file":"signature_pad.umd.min.js","sources":["../src/point.ts","../src/bezier.ts","../src/signature_event_target.ts","../src/signature_pad.ts","../src/throttle.ts"],"sourcesContent":["// Interface for point data structure used e.g. in SignaturePad#fromData method\nexport interface BasicPoint {\n x: number;\n y: number;\n pressure: number;\n time: number;\n}\n\nexport class Point implements BasicPoint {\n public x: number;\n public y: number;\n public pressure: number;\n public time: number;\n\n constructor(x: number, y: number, pressure?: number, time?: number) {\n if (isNaN(x) || isNaN(y)) {\n throw new Error(`Point is invalid: (${x}, ${y})`);\n }\n this.x = +x;\n this.y = +y;\n this.pressure = pressure || 0;\n this.time = time || Date.now();\n }\n\n public distanceTo(start: BasicPoint): number {\n return Math.sqrt(\n Math.pow(this.x - start.x, 2) + Math.pow(this.y - start.y, 2),\n );\n }\n\n public equals(other: BasicPoint): boolean {\n return (\n this.x === other.x &&\n this.y === other.y &&\n this.pressure === other.pressure &&\n this.time === other.time\n );\n }\n\n public velocityFrom(start: BasicPoint): number {\n return this.time !== start.time\n ? this.distanceTo(start) / (this.time - start.time)\n : 0;\n }\n}\n","import { BasicPoint, Point } from './point';\n\nexport class Bezier {\n public static fromPoints(\n points: Point[],\n widths: { start: number; end: number },\n ): Bezier {\n const c2 = this.calculateControlPoints(points[0], points[1], points[2]).c2;\n const c3 = this.calculateControlPoints(points[1], points[2], points[3]).c1;\n\n return new Bezier(points[1], c2, c3, points[2], widths.start, widths.end);\n }\n\n private static calculateControlPoints(\n s1: BasicPoint,\n s2: BasicPoint,\n s3: BasicPoint,\n ): {\n c1: BasicPoint;\n c2: BasicPoint;\n } {\n const dx1 = s1.x - s2.x;\n const dy1 = s1.y - s2.y;\n const dx2 = s2.x - s3.x;\n const dy2 = s2.y - s3.y;\n\n const m1 = { x: (s1.x + s2.x) / 2.0, y: (s1.y + s2.y) / 2.0 };\n const m2 = { x: (s2.x + s3.x) / 2.0, y: (s2.y + s3.y) / 2.0 };\n\n const l1 = Math.sqrt(dx1 * dx1 + dy1 * dy1);\n const l2 = Math.sqrt(dx2 * dx2 + dy2 * dy2);\n\n const dxm = m1.x - m2.x;\n const dym = m1.y - m2.y;\n\n const k = l2 / (l1 + l2);\n const cm = { x: m2.x + dxm * k, y: m2.y + dym * k };\n\n const tx = s2.x - cm.x;\n const ty = s2.y - cm.y;\n\n return {\n c1: new Point(m1.x + tx, m1.y + ty),\n c2: new Point(m2.x + tx, m2.y + ty),\n };\n }\n\n constructor(\n public startPoint: Point,\n public control2: BasicPoint,\n public control1: BasicPoint,\n public endPoint: Point,\n public startWidth: number,\n public endWidth: number,\n ) {}\n\n // Returns approximated length. Code taken from https://www.lemoda.net/maths/bezier-length/index.html.\n public length(): number {\n const steps = 10;\n let length = 0;\n let px;\n let py;\n\n for (let i = 0; i <= steps; i += 1) {\n const t = i / steps;\n const cx = this.point(\n t,\n this.startPoint.x,\n this.control1.x,\n this.control2.x,\n this.endPoint.x,\n );\n const cy = this.point(\n t,\n this.startPoint.y,\n this.control1.y,\n this.control2.y,\n this.endPoint.y,\n );\n\n if (i > 0) {\n const xdiff = cx - (px as number);\n const ydiff = cy - (py as number);\n\n length += Math.sqrt(xdiff * xdiff + ydiff * ydiff);\n }\n\n px = cx;\n py = cy;\n }\n\n return length;\n }\n\n // Calculate parametric value of x or y given t and the four point coordinates of a cubic bezier curve.\n private point(\n t: number,\n start: number,\n c1: number,\n c2: number,\n end: number,\n ): number {\n // prettier-ignore\n return ( start * (1.0 - t) * (1.0 - t) * (1.0 - t))\n + (3.0 * c1 * (1.0 - t) * (1.0 - t) * t)\n + (3.0 * c2 * (1.0 - t) * t * t)\n + ( end * t * t * t);\n }\n}\n","export class SignatureEventTarget {\n /* tslint:disable: variable-name */\n private _et: EventTarget;\n /* tslint:enable: variable-name */\n\n constructor() {\n try {\n this._et = new EventTarget();\n } catch (error) {\n // Using document as EventTarget to support iOS 13 and older.\n // Because EventTarget constructor just exists at iOS 14 and later.\n this._et = document;\n }\n }\n\n addEventListener(\n type: string,\n listener: EventListenerOrEventListenerObject | null,\n options?: boolean | AddEventListenerOptions,\n ): void {\n this._et.addEventListener(type, listener, options);\n }\n\n dispatchEvent(event: Event): boolean {\n return this._et.dispatchEvent(event);\n }\n\n removeEventListener(\n type: string,\n callback: EventListenerOrEventListenerObject | null,\n options?: boolean | EventListenerOptions,\n ): void {\n this._et.removeEventListener(type, callback, options);\n }\n}\n","/**\n * The main idea and some parts of the code (e.g. drawing variable width Bézier curve) are taken from:\n * http://corner.squareup.com/2012/07/smoother-signatures.html\n *\n * Implementation of interpolation using cubic Bézier curves is taken from:\n * https://web.archive.org/web/20160323213433/http://www.benknowscode.com/2012/09/path-interpolation-using-cubic-bezier_9742.html\n *\n * Algorithm for approximated length of a Bézier curve is taken from:\n * http://www.lemoda.net/maths/bezier-length/index.html\n */\n\nimport { Bezier } from './bezier';\nimport { BasicPoint, Point } from './point';\nimport { SignatureEventTarget } from './signature_event_target';\nimport { throttle } from './throttle';\n\nexport interface SignatureEvent {\n event: MouseEvent | TouchEvent | PointerEvent;\n type: string;\n x: number;\n y: number;\n pressure: number;\n}\n\nexport interface FromDataOptions {\n clear?: boolean;\n}\n\nexport interface ToSVGOptions {\n includeBackgroundColor?: boolean;\n}\n\nexport interface PointGroupOptions {\n dotSize: number;\n minWidth: number;\n maxWidth: number;\n penColor: string;\n velocityFilterWeight: number;\n /**\n * This is the globalCompositeOperation for the line.\n * *default: 'source-over'*\n * @see https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation\n */\n compositeOperation: GlobalCompositeOperation;\n}\n\nexport interface Options extends Partial {\n minDistance?: number;\n backgroundColor?: string;\n throttle?: number;\n canvasContextOptions?: CanvasRenderingContext2DSettings;\n}\n\nexport interface PointGroup extends PointGroupOptions {\n points: BasicPoint[];\n}\n\nexport default class SignaturePad extends SignatureEventTarget {\n // Public stuff\n public dotSize: number;\n public minWidth: number;\n public maxWidth: number;\n public penColor: string;\n public minDistance: number;\n public velocityFilterWeight: number;\n public compositeOperation: GlobalCompositeOperation;\n public backgroundColor: string;\n public throttle: number;\n public canvasContextOptions: CanvasRenderingContext2DSettings;\n\n // Private stuff\n /* tslint:disable: variable-name */\n private _ctx: CanvasRenderingContext2D;\n private _drawingStroke = false;\n private _isEmpty = true;\n private _lastPoints: Point[] = []; // Stores up to 4 most recent points; used to generate a new curve\n private _data: PointGroup[] = []; // Stores all points in groups (one group per line or dot)\n private _lastVelocity = 0;\n private _lastWidth = 0;\n private _strokeMoveUpdate: (event: SignatureEvent) => void;\n /* tslint:enable: variable-name */\n\n constructor(\n private canvas: HTMLCanvasElement,\n options: Options = {},\n ) {\n super();\n this.velocityFilterWeight = options.velocityFilterWeight || 0.7;\n this.minWidth = options.minWidth || 0.5;\n this.maxWidth = options.maxWidth || 2.5;\n\n // We need to handle 0 value, so use `??` instead of `||`\n this.throttle = options.throttle ?? 16; // in milliseconds\n this.minDistance = options.minDistance ?? 5; // in pixels\n this.dotSize = options.dotSize || 0;\n this.penColor = options.penColor || 'black';\n this.backgroundColor = options.backgroundColor || 'rgba(0,0,0,0)';\n this.compositeOperation = options.compositeOperation || 'source-over';\n this.canvasContextOptions = options.canvasContextOptions ?? {};\n\n this._strokeMoveUpdate = this.throttle\n ? throttle(SignaturePad.prototype._strokeUpdate, this.throttle)\n : SignaturePad.prototype._strokeUpdate;\n this._ctx = canvas.getContext(\n '2d',\n this.canvasContextOptions,\n ) as CanvasRenderingContext2D;\n\n this.clear();\n\n // Enable mouse and touch event handlers\n this.on();\n }\n\n public clear(): void {\n const { _ctx: ctx, canvas } = this;\n\n // Clear canvas using background color\n ctx.fillStyle = this.backgroundColor;\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n\n this._data = [];\n this._reset(this._getPointGroupOptions());\n this._isEmpty = true;\n }\n\n public fromDataURL(\n dataUrl: string,\n options: {\n ratio?: number;\n width?: number;\n height?: number;\n xOffset?: number;\n yOffset?: number;\n } = {},\n ): Promise {\n return new Promise((resolve, reject) => {\n const image = new Image();\n const ratio = options.ratio || window.devicePixelRatio || 1;\n const width = options.width || this.canvas.width / ratio;\n const height = options.height || this.canvas.height / ratio;\n const xOffset = options.xOffset || 0;\n const yOffset = options.yOffset || 0;\n\n this._reset(this._getPointGroupOptions());\n\n image.onload = (): void => {\n this._ctx.drawImage(image, xOffset, yOffset, width, height);\n resolve();\n };\n image.onerror = (error): void => {\n reject(error);\n };\n image.crossOrigin = 'anonymous';\n image.src = dataUrl;\n\n this._isEmpty = false;\n });\n }\n\n public toDataURL(\n type: 'image/svg+xml',\n encoderOptions?: ToSVGOptions,\n ): string;\n public toDataURL(type?: string, encoderOptions?: number): string;\n public toDataURL(\n type = 'image/png',\n encoderOptions?: number | ToSVGOptions | undefined,\n ): string {\n switch (type) {\n case 'image/svg+xml':\n if (typeof encoderOptions !== 'object') {\n encoderOptions = undefined;\n }\n return `data:image/svg+xml;base64,${btoa(\n this.toSVG(encoderOptions as ToSVGOptions),\n )}`;\n default:\n if (typeof encoderOptions !== 'number') {\n encoderOptions = undefined;\n }\n return this.canvas.toDataURL(type, encoderOptions);\n }\n }\n\n public on(): void {\n // Disable panning/zooming when touching canvas element\n this.canvas.style.touchAction = 'none';\n (this.canvas.style as CSSStyleDeclaration & { msTouchAction: string | null }).msTouchAction = 'none';\n this.canvas.style.userSelect = 'none';\n\n const isIOS =\n /Macintosh/.test(navigator.userAgent) && 'ontouchstart' in document;\n\n // The \"Scribble\" feature of iOS intercepts point events. So that we can\n // lose some of them when tapping rapidly. Use touch events for iOS\n // platforms to prevent it. See\n // https://developer.apple.com/forums/thread/664108 for more information.\n if (window.PointerEvent && !isIOS) {\n this._handlePointerEvents();\n } else {\n this._handleMouseEvents();\n\n if ('ontouchstart' in window) {\n this._handleTouchEvents();\n }\n }\n }\n\n public off(): void {\n // Enable panning/zooming when touching canvas element\n this.canvas.style.touchAction = 'auto';\n (this.canvas.style as CSSStyleDeclaration & { msTouchAction: string | null }).msTouchAction = 'auto';\n this.canvas.style.userSelect = 'auto';\n\n this.canvas.removeEventListener('pointerdown', this._handlePointerDown);\n this.canvas.removeEventListener('mousedown', this._handleMouseDown);\n this.canvas.removeEventListener('touchstart', this._handleTouchStart);\n\n this._removeMoveUpEventListeners();\n }\n\n private _getListenerFunctions() {\n const canvasWindow =\n window.document === this.canvas.ownerDocument\n ? window\n : this.canvas.ownerDocument.defaultView ?? this.canvas.ownerDocument;\n\n return {\n addEventListener: canvasWindow.addEventListener.bind(\n canvasWindow,\n ) as typeof window.addEventListener,\n removeEventListener: canvasWindow.removeEventListener.bind(\n canvasWindow,\n ) as typeof window.removeEventListener,\n };\n }\n\n private _removeMoveUpEventListeners(): void {\n const { removeEventListener } = this._getListenerFunctions();\n removeEventListener('pointermove', this._handlePointerMove);\n removeEventListener('pointerup', this._handlePointerUp);\n\n removeEventListener('mousemove', this._handleMouseMove);\n removeEventListener('mouseup', this._handleMouseUp);\n\n removeEventListener('touchmove', this._handleTouchMove);\n removeEventListener('touchend', this._handleTouchEnd);\n }\n\n public isEmpty(): boolean {\n return this._isEmpty;\n }\n\n public fromData(\n pointGroups: PointGroup[],\n { clear = true }: FromDataOptions = {},\n ): void {\n if (clear) {\n this.clear();\n }\n\n this._fromData(\n pointGroups,\n this._drawCurve.bind(this),\n this._drawDot.bind(this),\n );\n\n this._data = this._data.concat(pointGroups);\n }\n\n public toData(): PointGroup[] {\n return this._data;\n }\n\n public _isLeftButtonPressed(event: MouseEvent, only?: boolean): boolean {\n if (only) {\n return event.buttons === 1;\n }\n\n return (event.buttons & 1) === 1;\n }\n private _pointerEventToSignatureEvent(\n event: MouseEvent | PointerEvent,\n ): SignatureEvent {\n return {\n event: event,\n type: event.type,\n x: event.clientX,\n y: event.clientY,\n pressure: 'pressure' in event ? event.pressure : 0,\n };\n }\n\n private _touchEventToSignatureEvent(event: TouchEvent): SignatureEvent {\n const touch = event.changedTouches[0];\n return {\n event: event,\n type: event.type,\n x: touch.clientX,\n y: touch.clientY,\n pressure: touch.force,\n };\n }\n\n // Event handlers\n private _handleMouseDown = (event: MouseEvent): void => {\n if (!this._isLeftButtonPressed(event, true) || this._drawingStroke) {\n return;\n }\n this._strokeBegin(this._pointerEventToSignatureEvent(event));\n };\n\n private _handleMouseMove = (event: MouseEvent): void => {\n if (!this._isLeftButtonPressed(event, true) || !this._drawingStroke) {\n // Stop when not pressing primary button or pressing multiple buttons\n this._strokeEnd(this._pointerEventToSignatureEvent(event), false);\n return;\n }\n\n this._strokeMoveUpdate(this._pointerEventToSignatureEvent(event));\n };\n\n private _handleMouseUp = (event: MouseEvent): void => {\n if (this._isLeftButtonPressed(event)) {\n return;\n }\n\n this._strokeEnd(this._pointerEventToSignatureEvent(event));\n };\n\n private _handleTouchStart = (event: TouchEvent): void => {\n if (event.targetTouches.length !== 1 || this._drawingStroke) {\n return;\n }\n\n // Prevent scrolling.\n if (event.cancelable) {\n event.preventDefault();\n }\n\n this._strokeBegin(this._touchEventToSignatureEvent(event));\n };\n\n private _handleTouchMove = (event: TouchEvent): void => {\n if (event.targetTouches.length !== 1) {\n return;\n }\n\n // Prevent scrolling.\n if (event.cancelable) {\n event.preventDefault();\n }\n\n if (!this._drawingStroke) {\n this._strokeEnd(this._touchEventToSignatureEvent(event), false);\n return;\n }\n\n this._strokeMoveUpdate(this._touchEventToSignatureEvent(event));\n };\n\n private _handleTouchEnd = (event: TouchEvent): void => {\n if (event.targetTouches.length !== 0) {\n return;\n }\n\n if (event.cancelable) {\n event.preventDefault();\n }\n\n this.canvas.removeEventListener('touchmove', this._handleTouchMove);\n\n this._strokeEnd(this._touchEventToSignatureEvent(event));\n };\n\n private _handlePointerDown = (event: PointerEvent): void => {\n if (!this._isLeftButtonPressed(event) || this._drawingStroke) {\n return;\n }\n\n event.preventDefault();\n\n this._strokeBegin(this._pointerEventToSignatureEvent(event));\n };\n\n private _handlePointerMove = (event: PointerEvent): void => {\n if (!this._isLeftButtonPressed(event, true) || !this._drawingStroke) {\n // Stop when primary button not pressed or multiple buttons pressed\n this._strokeEnd(this._pointerEventToSignatureEvent(event), false);\n return;\n }\n\n event.preventDefault();\n this._strokeMoveUpdate(this._pointerEventToSignatureEvent(event));\n };\n\n private _handlePointerUp = (event: PointerEvent): void => {\n if (this._isLeftButtonPressed(event)) {\n return;\n }\n\n event.preventDefault();\n this._strokeEnd(this._pointerEventToSignatureEvent(event));\n };\n\n private _getPointGroupOptions(group?: PointGroup): PointGroupOptions {\n return {\n penColor: group && 'penColor' in group ? group.penColor : this.penColor,\n dotSize: group && 'dotSize' in group ? group.dotSize : this.dotSize,\n minWidth: group && 'minWidth' in group ? group.minWidth : this.minWidth,\n maxWidth: group && 'maxWidth' in group ? group.maxWidth : this.maxWidth,\n velocityFilterWeight:\n group && 'velocityFilterWeight' in group\n ? group.velocityFilterWeight\n : this.velocityFilterWeight,\n compositeOperation:\n group && 'compositeOperation' in group\n ? group.compositeOperation\n : this.compositeOperation,\n };\n }\n\n // Private methods\n private _strokeBegin(event: SignatureEvent): void {\n const cancelled = !this.dispatchEvent(\n new CustomEvent('beginStroke', { detail: event, cancelable: true }),\n );\n if (cancelled) {\n return;\n }\n\n const { addEventListener } = this._getListenerFunctions();\n switch (event.event.type) {\n case 'mousedown':\n addEventListener('mousemove', this._handleMouseMove);\n addEventListener('mouseup', this._handleMouseUp);\n break;\n case 'touchstart':\n addEventListener('touchmove', this._handleTouchMove);\n addEventListener('touchend', this._handleTouchEnd);\n break;\n case 'pointerdown':\n addEventListener('pointermove', this._handlePointerMove);\n addEventListener('pointerup', this._handlePointerUp);\n break;\n default:\n // do nothing\n }\n\n this._drawingStroke = true;\n\n const pointGroupOptions = this._getPointGroupOptions();\n\n const newPointGroup: PointGroup = {\n ...pointGroupOptions,\n points: [],\n };\n\n this._data.push(newPointGroup);\n this._reset(pointGroupOptions);\n this._strokeUpdate(event);\n }\n\n private _strokeUpdate(event: SignatureEvent): void {\n if (!this._drawingStroke) {\n return;\n }\n\n if (this._data.length === 0) {\n // This can happen if clear() was called while a signature is still in progress,\n // or if there is a race condition between start/update events.\n this._strokeBegin(event);\n return;\n }\n\n this.dispatchEvent(\n new CustomEvent('beforeUpdateStroke', { detail: event }),\n );\n\n const point = this._createPoint(event.x, event.y, event.pressure);\n const lastPointGroup = this._data[this._data.length - 1];\n const lastPoints = lastPointGroup.points;\n const lastPoint =\n lastPoints.length > 0 && lastPoints[lastPoints.length - 1];\n const isLastPointTooClose = lastPoint\n ? point.distanceTo(lastPoint) <= this.minDistance\n : false;\n const pointGroupOptions = this._getPointGroupOptions(lastPointGroup);\n\n // Skip this point if it's too close to the previous one\n if (!lastPoint || !(lastPoint && isLastPointTooClose)) {\n const curve = this._addPoint(point, pointGroupOptions);\n\n if (!lastPoint) {\n this._drawDot(point, pointGroupOptions);\n } else if (curve) {\n this._drawCurve(curve, pointGroupOptions);\n }\n\n lastPoints.push({\n time: point.time,\n x: point.x,\n y: point.y,\n pressure: point.pressure,\n });\n }\n\n this.dispatchEvent(new CustomEvent('afterUpdateStroke', { detail: event }));\n }\n\n private _strokeEnd(event: SignatureEvent, shouldUpdate = true): void {\n this._removeMoveUpEventListeners();\n\n if (!this._drawingStroke) {\n return;\n }\n\n if (shouldUpdate) {\n this._strokeUpdate(event);\n }\n\n this._drawingStroke = false;\n this.dispatchEvent(new CustomEvent('endStroke', { detail: event }));\n }\n\n private _handlePointerEvents(): void {\n this._drawingStroke = false;\n\n this.canvas.addEventListener('pointerdown', this._handlePointerDown);\n }\n\n private _handleMouseEvents(): void {\n this._drawingStroke = false;\n\n this.canvas.addEventListener('mousedown', this._handleMouseDown);\n }\n\n private _handleTouchEvents(): void {\n this.canvas.addEventListener('touchstart', this._handleTouchStart);\n }\n\n // Called when a new line is started\n private _reset(options: PointGroupOptions): void {\n this._lastPoints = [];\n this._lastVelocity = 0;\n this._lastWidth = (options.minWidth + options.maxWidth) / 2;\n this._ctx.fillStyle = options.penColor;\n this._ctx.globalCompositeOperation = options.compositeOperation;\n }\n\n private _createPoint(x: number, y: number, pressure: number): Point {\n const rect = this.canvas.getBoundingClientRect();\n\n return new Point(\n x - rect.left,\n y - rect.top,\n pressure,\n new Date().getTime(),\n );\n }\n\n // Add point to _lastPoints array and generate a new curve if there are enough points (i.e. 3)\n private _addPoint(point: Point, options: PointGroupOptions): Bezier | null {\n const { _lastPoints } = this;\n\n _lastPoints.push(point);\n\n if (_lastPoints.length > 2) {\n // To reduce the initial lag make it work with 3 points\n // by copying the first point to the beginning.\n if (_lastPoints.length === 3) {\n _lastPoints.unshift(_lastPoints[0]);\n }\n\n // _points array will always have 4 points here.\n const widths = this._calculateCurveWidths(\n _lastPoints[1],\n _lastPoints[2],\n options,\n );\n const curve = Bezier.fromPoints(_lastPoints, widths);\n\n // Remove the first element from the list, so that there are no more than 4 points at any time.\n _lastPoints.shift();\n\n return curve;\n }\n\n return null;\n }\n\n private _calculateCurveWidths(\n startPoint: Point,\n endPoint: Point,\n options: PointGroupOptions,\n ): { start: number; end: number } {\n const velocity =\n options.velocityFilterWeight * endPoint.velocityFrom(startPoint) +\n (1 - options.velocityFilterWeight) * this._lastVelocity;\n\n const newWidth = this._strokeWidth(velocity, options);\n\n const widths = {\n end: newWidth,\n start: this._lastWidth,\n };\n\n this._lastVelocity = velocity;\n this._lastWidth = newWidth;\n\n return widths;\n }\n\n private _strokeWidth(velocity: number, options: PointGroupOptions): number {\n return Math.max(options.maxWidth / (velocity + 1), options.minWidth);\n }\n\n private _drawCurveSegment(x: number, y: number, width: number): void {\n const ctx = this._ctx;\n\n ctx.moveTo(x, y);\n ctx.arc(x, y, width, 0, 2 * Math.PI, false);\n this._isEmpty = false;\n }\n\n private _drawCurve(curve: Bezier, options: PointGroupOptions): void {\n const ctx = this._ctx;\n const widthDelta = curve.endWidth - curve.startWidth;\n // '2' is just an arbitrary number here. If only length is used, then\n // there are gaps between curve segments :/\n const drawSteps = Math.ceil(curve.length()) * 2;\n\n ctx.beginPath();\n ctx.fillStyle = options.penColor;\n\n for (let i = 0; i < drawSteps; i += 1) {\n // Calculate the Bezier (x, y) coordinate for this step.\n const t = i / drawSteps;\n const tt = t * t;\n const ttt = tt * t;\n const u = 1 - t;\n const uu = u * u;\n const uuu = uu * u;\n\n let x = uuu * curve.startPoint.x;\n x += 3 * uu * t * curve.control1.x;\n x += 3 * u * tt * curve.control2.x;\n x += ttt * curve.endPoint.x;\n\n let y = uuu * curve.startPoint.y;\n y += 3 * uu * t * curve.control1.y;\n y += 3 * u * tt * curve.control2.y;\n y += ttt * curve.endPoint.y;\n\n const width = Math.min(\n curve.startWidth + ttt * widthDelta,\n options.maxWidth,\n );\n this._drawCurveSegment(x, y, width);\n }\n\n ctx.closePath();\n ctx.fill();\n }\n\n private _drawDot(point: BasicPoint, options: PointGroupOptions): void {\n const ctx = this._ctx;\n const width =\n options.dotSize > 0\n ? options.dotSize\n : (options.minWidth + options.maxWidth) / 2;\n\n ctx.beginPath();\n this._drawCurveSegment(point.x, point.y, width);\n ctx.closePath();\n ctx.fillStyle = options.penColor;\n ctx.fill();\n }\n\n private _fromData(\n pointGroups: PointGroup[],\n drawCurve: SignaturePad['_drawCurve'],\n drawDot: SignaturePad['_drawDot'],\n ): void {\n for (const group of pointGroups) {\n const { points } = group;\n const pointGroupOptions = this._getPointGroupOptions(group);\n\n if (points.length > 1) {\n for (let j = 0; j < points.length; j += 1) {\n const basicPoint = points[j];\n const point = new Point(\n basicPoint.x,\n basicPoint.y,\n basicPoint.pressure,\n basicPoint.time,\n );\n\n if (j === 0) {\n this._reset(pointGroupOptions);\n }\n\n const curve = this._addPoint(point, pointGroupOptions);\n\n if (curve) {\n drawCurve(curve, pointGroupOptions);\n }\n }\n } else {\n this._reset(pointGroupOptions);\n\n drawDot(points[0], pointGroupOptions);\n }\n }\n }\n\n public toSVG({ includeBackgroundColor = false }: ToSVGOptions = {}): string {\n const pointGroups = this._data;\n const ratio = Math.max(window.devicePixelRatio || 1, 1);\n const minX = 0;\n const minY = 0;\n const maxX = this.canvas.width / ratio;\n const maxY = this.canvas.height / ratio;\n const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\n\n svg.setAttribute('xmlns', 'http://www.w3.org/2000/svg');\n svg.setAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink');\n svg.setAttribute('viewBox', `${minX} ${minY} ${maxX} ${maxY}`);\n svg.setAttribute('width', maxX.toString());\n svg.setAttribute('height', maxY.toString());\n\n if (includeBackgroundColor && this.backgroundColor) {\n const rect = document.createElement('rect');\n rect.setAttribute('width', '100%');\n rect.setAttribute('height', '100%');\n rect.setAttribute('fill', this.backgroundColor);\n\n svg.appendChild(rect);\n }\n\n this._fromData(\n pointGroups,\n\n (curve, { penColor }) => {\n const path = document.createElement('path');\n\n // Need to check curve for NaN values, these pop up when drawing\n // lines on the canvas that are not continuous. E.g. Sharp corners\n // or stopping mid-stroke and than continuing without lifting mouse.\n /* eslint-disable no-restricted-globals */\n if (\n !isNaN(curve.control1.x) &&\n !isNaN(curve.control1.y) &&\n !isNaN(curve.control2.x) &&\n !isNaN(curve.control2.y)\n ) {\n const attr =\n `M ${curve.startPoint.x.toFixed(3)},${curve.startPoint.y.toFixed(\n 3,\n )} ` +\n `C ${curve.control1.x.toFixed(3)},${curve.control1.y.toFixed(3)} ` +\n `${curve.control2.x.toFixed(3)},${curve.control2.y.toFixed(3)} ` +\n `${curve.endPoint.x.toFixed(3)},${curve.endPoint.y.toFixed(3)}`;\n path.setAttribute('d', attr);\n path.setAttribute('stroke-width', (curve.endWidth * 2.25).toFixed(3));\n path.setAttribute('stroke', penColor);\n path.setAttribute('fill', 'none');\n path.setAttribute('stroke-linecap', 'round');\n\n svg.appendChild(path);\n }\n /* eslint-enable no-restricted-globals */\n },\n\n (point, { penColor, dotSize, minWidth, maxWidth }) => {\n const circle = document.createElement('circle');\n const size = dotSize > 0 ? dotSize : (minWidth + maxWidth) / 2;\n circle.setAttribute('r', size.toString());\n circle.setAttribute('cx', point.x.toString());\n circle.setAttribute('cy', point.y.toString());\n circle.setAttribute('fill', penColor);\n\n svg.appendChild(circle);\n },\n );\n\n return svg.outerHTML;\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-this-alias */\n// Slightly simplified version of http://stackoverflow.com/a/27078401/815507\n\nexport function throttle(\n fn: (...args: any[]) => any,\n wait = 250,\n): (this: any, ...args: any[]) => any {\n let previous = 0;\n let timeout: number | null = null;\n let result: any;\n let storedContext: any;\n let storedArgs: any[];\n\n const later = (): void => {\n previous = Date.now();\n timeout = null;\n result = fn.apply(storedContext, storedArgs);\n\n if (!timeout) {\n storedContext = null;\n storedArgs = [];\n }\n };\n\n return function wrapper(this: any, ...args: any[]): any {\n const now = Date.now();\n const remaining = wait - (now - previous);\n\n storedContext = this;\n storedArgs = args;\n\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n\n previous = now;\n result = fn.apply(storedContext, storedArgs);\n\n if (!timeout) {\n storedContext = null;\n storedArgs = [];\n }\n } else if (!timeout) {\n timeout = window.setTimeout(later, remaining);\n }\n\n return result;\n };\n}\n"],"names":["Point","constructor","x","y","pressure","time","isNaN","Error","this","Date","now","distanceTo","start","Math","sqrt","pow","equals","other","velocityFrom","Bezier","fromPoints","points","widths","c2","calculateControlPoints","c3","c1","end","s1","s2","s3","dx1","dy1","dx2","dy2","m1","m2","l1","l2","k","cm","tx","ty","startPoint","control2","control1","endPoint","startWidth","endWidth","length","px","py","i","t","cx","point","cy","xdiff","ydiff","SignatureEventTarget","_et","EventTarget","error","document","addEventListener","type","listener","options","dispatchEvent","event","removeEventListener","callback","SignaturePad","canvas","super","_drawingStroke","_isEmpty","_lastPoints","_data","_lastVelocity","_lastWidth","_handleMouseDown","_isLeftButtonPressed","_strokeBegin","_pointerEventToSignatureEvent","_handleMouseMove","_strokeMoveUpdate","_strokeEnd","_handleMouseUp","_handleTouchStart","targetTouches","cancelable","preventDefault","_touchEventToSignatureEvent","_handleTouchMove","_handleTouchEnd","_handlePointerDown","_handlePointerMove","_handlePointerUp","velocityFilterWeight","minWidth","maxWidth","throttle","_a","minDistance","_b","dotSize","penColor","backgroundColor","compositeOperation","canvasContextOptions","_c","fn","wait","result","storedContext","storedArgs","previous","timeout","later","apply","args","remaining","clearTimeout","window","setTimeout","prototype","_strokeUpdate","_ctx","getContext","clear","on","ctx","fillStyle","clearRect","width","height","fillRect","_reset","_getPointGroupOptions","fromDataURL","dataUrl","Promise","resolve","reject","image","Image","ratio","devicePixelRatio","xOffset","yOffset","onload","drawImage","onerror","crossOrigin","src","toDataURL","encoderOptions","undefined","btoa","toSVG","style","touchAction","msTouchAction","userSelect","isIOS","test","navigator","userAgent","PointerEvent","_handlePointerEvents","_handleMouseEvents","_handleTouchEvents","off","_removeMoveUpEventListeners","_getListenerFunctions","canvasWindow","ownerDocument","defaultView","bind","isEmpty","fromData","pointGroups","_fromData","_drawCurve","_drawDot","concat","toData","only","buttons","clientX","clientY","touch","changedTouches","force","group","CustomEvent","detail","pointGroupOptions","newPointGroup","push","_createPoint","lastPointGroup","lastPoints","lastPoint","isLastPointTooClose","curve","_addPoint","shouldUpdate","globalCompositeOperation","rect","getBoundingClientRect","left","top","getTime","unshift","_calculateCurveWidths","shift","velocity","newWidth","_strokeWidth","max","_drawCurveSegment","moveTo","arc","PI","widthDelta","drawSteps","ceil","beginPath","tt","ttt","u","uu","uuu","min","closePath","fill","drawCurve","drawDot","j","basicPoint","includeBackgroundColor","maxX","maxY","svg","createElementNS","setAttribute","toString","createElement","appendChild","path","attr","toFixed","circle","size","outerHTML"],"mappings":";;;;mPAQaA,EAMX,WAAAC,CAAYC,EAAWC,EAAWC,EAAmBC,GACnD,GAAIC,MAAMJ,IAAMI,MAAMH,GACpB,MAAM,IAAII,MAAM,sBAAsBL,MAAMC,MAE9CK,KAAKN,GAAKA,EACVM,KAAKL,GAAKA,EACVK,KAAKJ,SAAWA,GAAY,EAC5BI,KAAKH,KAAOA,GAAQI,KAAKC,KAC1B,CAEM,UAAAC,CAAWC,GAChB,OAAOC,KAAKC,KACVD,KAAKE,IAAIP,KAAKN,EAAIU,EAAMV,EAAG,GAAKW,KAAKE,IAAIP,KAAKL,EAAIS,EAAMT,EAAG,GAE9D,CAEM,MAAAa,CAAOC,GACZ,OACET,KAAKN,IAAMe,EAAMf,GACjBM,KAAKL,IAAMc,EAAMd,GACjBK,KAAKJ,WAAaa,EAAMb,UACxBI,KAAKH,OAASY,EAAMZ,IAEvB,CAEM,YAAAa,CAAaN,GAClB,OAAOJ,KAAKH,OAASO,EAAMP,KACvBG,KAAKG,WAAWC,IAAUJ,KAAKH,KAAOO,EAAMP,MAC5C,CACL,QCzCUc,EACJ,iBAAOC,CACZC,EACAC,GAEA,MAAMC,EAAKf,KAAKgB,uBAAuBH,EAAO,GAAIA,EAAO,GAAIA,EAAO,IAAIE,GAClEE,EAAKjB,KAAKgB,uBAAuBH,EAAO,GAAIA,EAAO,GAAIA,EAAO,IAAIK,GAExE,OAAO,IAAIP,EAAOE,EAAO,GAAIE,EAAIE,EAAIJ,EAAO,GAAIC,EAAOV,MAAOU,EAAOK,IACtE,CAEO,6BAAOH,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,IAAKK,GACvBD,EAAKJ,aAAa,gBAAkC,KAAjBzC,EAAM9J,UAAiB6M,QAAQ,IAClEF,EAAKJ,aAAa,SAAU5I,GAC5BgJ,EAAKJ,aAAa,OAAQ,QAC1BI,EAAKJ,aAAa,iBAAkB,SAEpCF,EAAIK,YAAYC,EACjB,KAIH,CAACpM,GAASoD,WAAUD,UAASN,WAAUC,eACrC,MAAMyJ,EAAS/L,SAAS0L,cAAc,UAChCM,EAAOrJ,EAAU,EAAIA,GAAWN,EAAWC,GAAY,EAC7DyJ,EAAOP,aAAa,IAAKQ,EAAKP,YAC9BM,EAAOP,aAAa,KAAMhM,EAAMrD,EAAEsP,YAClCM,EAAOP,aAAa,KAAMhM,EAAMpD,EAAEqP,YAClCM,EAAOP,aAAa,OAAQ5I,GAE5B0I,EAAIK,YAAYI,EAAO,IAIpBT,EAAIW,SACZ"} \ No newline at end of file diff --git a/public/vendor/signature_pad@5/types/bezier.d.ts b/public/vendor/signature_pad@5/types/bezier.d.ts new file mode 100644 index 0000000000..066a8af8e1 --- /dev/null +++ b/public/vendor/signature_pad@5/types/bezier.d.ts @@ -0,0 +1,17 @@ +import { BasicPoint, Point } from './point'; +export declare class Bezier { + startPoint: Point; + control2: BasicPoint; + control1: BasicPoint; + endPoint: Point; + startWidth: number; + endWidth: number; + static fromPoints(points: Point[], widths: { + start: number; + end: number; + }): Bezier; + private static calculateControlPoints; + constructor(startPoint: Point, control2: BasicPoint, control1: BasicPoint, endPoint: Point, startWidth: number, endWidth: number); + length(): number; + private point; +} diff --git a/public/vendor/signature_pad@5/types/point.d.ts b/public/vendor/signature_pad@5/types/point.d.ts new file mode 100644 index 0000000000..5091110697 --- /dev/null +++ b/public/vendor/signature_pad@5/types/point.d.ts @@ -0,0 +1,16 @@ +export interface BasicPoint { + x: number; + y: number; + pressure: number; + time: number; +} +export declare class Point implements BasicPoint { + x: number; + y: number; + pressure: number; + time: number; + constructor(x: number, y: number, pressure?: number, time?: number); + distanceTo(start: BasicPoint): number; + equals(other: BasicPoint): boolean; + velocityFrom(start: BasicPoint): number; +} diff --git a/public/vendor/signature_pad@5/types/signature_event_target.d.ts b/public/vendor/signature_pad@5/types/signature_event_target.d.ts new file mode 100644 index 0000000000..332ea3dd9e --- /dev/null +++ b/public/vendor/signature_pad@5/types/signature_event_target.d.ts @@ -0,0 +1,7 @@ +export declare class SignatureEventTarget { + private _et; + constructor(); + addEventListener(type: string, listener: EventListenerOrEventListenerObject | null, options?: boolean | AddEventListenerOptions): void; + dispatchEvent(event: Event): boolean; + removeEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: boolean | EventListenerOptions): void; +} diff --git a/public/vendor/signature_pad@5/types/signature_pad.d.ts b/public/vendor/signature_pad@5/types/signature_pad.d.ts new file mode 100644 index 0000000000..cf19c3a193 --- /dev/null +++ b/public/vendor/signature_pad@5/types/signature_pad.d.ts @@ -0,0 +1,115 @@ +/** + * The main idea and some parts of the code (e.g. drawing variable width Bézier curve) are taken from: + * http://corner.squareup.com/2012/07/smoother-signatures.html + * + * Implementation of interpolation using cubic Bézier curves is taken from: + * https://web.archive.org/web/20160323213433/http://www.benknowscode.com/2012/09/path-interpolation-using-cubic-bezier_9742.html + * + * Algorithm for approximated length of a Bézier curve is taken from: + * http://www.lemoda.net/maths/bezier-length/index.html + */ +import { BasicPoint } from './point'; +import { SignatureEventTarget } from './signature_event_target'; +export interface SignatureEvent { + event: MouseEvent | TouchEvent | PointerEvent; + type: string; + x: number; + y: number; + pressure: number; +} +export interface FromDataOptions { + clear?: boolean; +} +export interface ToSVGOptions { + includeBackgroundColor?: boolean; +} +export interface PointGroupOptions { + dotSize: number; + minWidth: number; + maxWidth: number; + penColor: string; + velocityFilterWeight: number; + /** + * This is the globalCompositeOperation for the line. + * *default: 'source-over'* + * @see https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation + */ + compositeOperation: GlobalCompositeOperation; +} +export interface Options extends Partial { + minDistance?: number; + backgroundColor?: string; + throttle?: number; + canvasContextOptions?: CanvasRenderingContext2DSettings; +} +export interface PointGroup extends PointGroupOptions { + points: BasicPoint[]; +} +export default class SignaturePad extends SignatureEventTarget { + private canvas; + dotSize: number; + minWidth: number; + maxWidth: number; + penColor: string; + minDistance: number; + velocityFilterWeight: number; + compositeOperation: GlobalCompositeOperation; + backgroundColor: string; + throttle: number; + canvasContextOptions: CanvasRenderingContext2DSettings; + private _ctx; + private _drawingStroke; + private _isEmpty; + private _lastPoints; + private _data; + private _lastVelocity; + private _lastWidth; + private _strokeMoveUpdate; + constructor(canvas: HTMLCanvasElement, options?: Options); + clear(): void; + fromDataURL(dataUrl: string, options?: { + ratio?: number; + width?: number; + height?: number; + xOffset?: number; + yOffset?: number; + }): Promise; + toDataURL(type: 'image/svg+xml', encoderOptions?: ToSVGOptions): string; + toDataURL(type?: string, encoderOptions?: number): string; + on(): void; + off(): void; + private _getListenerFunctions; + private _removeMoveUpEventListeners; + isEmpty(): boolean; + fromData(pointGroups: PointGroup[], { clear }?: FromDataOptions): void; + toData(): PointGroup[]; + _isLeftButtonPressed(event: MouseEvent, only?: boolean): boolean; + private _pointerEventToSignatureEvent; + private _touchEventToSignatureEvent; + private _handleMouseDown; + private _handleMouseMove; + private _handleMouseUp; + private _handleTouchStart; + private _handleTouchMove; + private _handleTouchEnd; + private _handlePointerDown; + private _handlePointerMove; + private _handlePointerUp; + private _getPointGroupOptions; + private _strokeBegin; + private _strokeUpdate; + private _strokeEnd; + private _handlePointerEvents; + private _handleMouseEvents; + private _handleTouchEvents; + private _reset; + private _createPoint; + private _addPoint; + private _calculateCurveWidths; + private _strokeWidth; + private _drawCurveSegment; + private _drawCurve; + private _drawDot; + private _fromData; + toSVG({ includeBackgroundColor }?: ToSVGOptions): string; +} diff --git a/public/vendor/signature_pad@5/types/throttle.d.ts b/public/vendor/signature_pad@5/types/throttle.d.ts new file mode 100644 index 0000000000..dc89f6389a --- /dev/null +++ b/public/vendor/signature_pad@5/types/throttle.d.ts @@ -0,0 +1 @@ +export declare function throttle(fn: (...args: any[]) => any, wait?: number): (this: any, ...args: any[]) => any; diff --git a/public/vendor/simple-card@alpha/simple-card.d.ts b/public/vendor/simple-card@alpha/simple-card.d.ts new file mode 100644 index 0000000000..bb6dc52e81 --- /dev/null +++ b/public/vendor/simple-card@alpha/simple-card.d.ts @@ -0,0 +1,79 @@ +export declare const masks: { + visa: { + final: RegExp; + start: RegExp; + length: RegExp; + }; + mastercard: { + final: RegExp; + start: RegExp; + length: RegExp; + }; + amex: { + final: RegExp; + start: RegExp; + length: RegExp; + }; + discover: { + final: RegExp; + start: RegExp; + length: RegExp; + }; + diners: { + final: RegExp; + start: RegExp; + length: RegExp; + }; + jcb: { + final: RegExp; + start: RegExp; + length: RegExp; + }; +}; + +export declare const numbers: RegExp; + +export declare type Options = { + fields: { + card: { + number: string | HTMLInputElement; + date: string | HTMLInputElement; + cvv: string | HTMLInputElement; + name?: string | HTMLInputElement; + }; + }; +}; + +export declare class SimpleCard { + #private; + options: Options; + number: HTMLInputElement; + date: HTMLInputElement; + cvv: HTMLInputElement; + constructor(options: Options); + mount(): this; + check(): { + valid: boolean; + number: { + valid: boolean; + value: string; + }; + date: { + valid: boolean; + value: string; + }; + cvv: { + valid: boolean; + value: string; + }; + }; + type(): "visa" | "mastercard" | "amex" | "discover" | "diners" | "jcb" | "unknown"; +} + +export declare type TypeChangeOptions = { + type: string; + value: string; + valid: boolean; +}; + +export { } diff --git a/public/vendor/simple-card@alpha/simple-card.js b/public/vendor/simple-card@alpha/simple-card.js new file mode 100644 index 0000000000..de4c512074 --- /dev/null +++ b/public/vendor/simple-card@alpha/simple-card.js @@ -0,0 +1,734 @@ +var F = (n) => { + throw TypeError(n); +}; +var J = (n, e, s) => e.has(n) || F("Cannot " + s); +var _ = (n, e, s) => e.has(n) ? F("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, s); +var $ = (n, e, s) => (J(n, e, "access private method"), s); +const I = { + mask: /^.*$/, + preprocessors: [], + postprocessors: [], + plugins: [], + overwriteMode: "shift" +}; +class Q { + constructor() { + this.now = null, this.past = [], this.future = []; + } + undo() { + const e = this.past.pop(); + e && this.now && (this.future.push(this.now), this.updateElement(e, "historyUndo")); + } + redo() { + const e = this.future.pop(); + e && this.now && (this.past.push(this.now), this.updateElement(e, "historyRedo")); + } + updateHistory(e) { + if (!this.now) { + this.now = e; + return; + } + const s = this.now.value !== e.value, t = this.now.selection.some((i, r) => i !== e.selection[r]); + !s && !t || (s && (this.past.push(this.now), this.future = []), this.now = e); + } + updateElement(e, s) { + this.now = e, this.updateElementState(e, { inputType: s, data: null }); + } +} +function ee(n, ...e) { + return e.every(({ value: s }) => s === n.value); +} +function te(n, ...e) { + return e.every(({ value: s, selection: t }) => s === n.value && t[0] === n.selection[0] && t[1] === n.selection[1]); +} +function ne({ value: n, selection: e }, s, t) { + const [i, r] = e, l = typeof t == "function" ? t({ value: n, selection: e }) : t; + return { + value: n, + selection: l === "replace" ? [i, i + s.length] : [i, r] + }; +} +function T(n) { + return typeof n == "string"; +} +function j(n, e, s, t) { + let i = ""; + for (let r = e.length; r < n.length; r++) { + const l = n[r], a = (t == null ? void 0 : t.value[r]) === l; + if (!T(l) || l === s && !a) + return i; + i += l; + } + return i; +} +function P(n, e) { + return Array.isArray(e) ? n.length === e.length && Array.from(n).every((s, t) => { + const i = e[t]; + return T(i) ? s === i : s.match(i); + }) : e.test(n); +} +function se(n, e, s) { + let t = null, i = null; + const r = Array.from(n.value).reduce((a, o, c) => { + const u = j(e, a, o, s), d = a + u, h = e[d.length]; + return T(h) ? d + h : o.match(h) ? (t === null && c >= n.selection[0] && (t = d.length), i === null && c >= n.selection[1] && (i = d.length), d + o) : d; + }, ""), l = j(e, r, "", s); + return { + value: P(r + l, e) ? r + l : r, + selection: [t ?? r.length, i ?? r.length] + }; +} +function ie({ value: n, selection: e }, s) { + const [t, i] = e; + let r = t, l = i; + return { value: Array.from(n).reduce((o, c, u) => { + const d = o + c; + return t === u && (r = o.length), i === u && (l = o.length), d.match(s) ? d : o; + }, ""), selection: [r, l] }; +} +function D(n, e, s = null) { + if (P(n.value, e)) + return n; + const { value: t, selection: i } = Array.isArray(e) ? se(n, e, s) : ie(n, e); + return { + selection: i, + value: Array.isArray(e) ? t.slice(0, e.length) : t + }; +} +function H(n, e) { + if (!Array.isArray(e)) + return n; + const [s, t] = n.selection, i = [], r = Array.from(n.value).reduce((l, a, o) => { + const c = e[o]; + return o === s && i.push(l.length), o === t && i.push(l.length), T(c) && c === a ? l : l + a; + }, ""); + return i.length < 2 && i.push(...new Array(2 - i.length).fill(r.length)), { + value: r, + selection: [i[0], i[1]] + }; +} +class L { + constructor(e, s) { + this.initialElementState = e, this.maskOptions = s, this.value = "", this.selection = [0, 0]; + const { value: t, selection: i } = D(this.initialElementState, this.getMaskExpression(this.initialElementState)); + this.value = t, this.selection = i; + } + addCharacters([e, s], t) { + const { value: i } = this, r = this.getMaskExpression({ + value: i.slice(0, e) + t + i.slice(s), + selection: [e + t.length, e + t.length] + }), l = { value: i, selection: [e, s] }, a = H(l, r), [o, c] = ne(a, t, this.maskOptions.overwriteMode).selection, u = a.value.slice(0, o) + t, d = u.length, h = D({ + value: u + a.value.slice(c), + selection: [d, d] + }, r, l); + if (// eslint-disable-next-line @typescript-eslint/prefer-string-starts-ends-with + i.slice(0, o) === D({ + value: u, + selection: [d, d] + }, r, l).value || te(this, h)) + throw new Error("Invalid mask value"); + this.value = h.value, this.selection = h.selection; + } + deleteCharacters([e, s]) { + if (e === s || !s) + return; + const { value: t } = this, i = this.getMaskExpression({ + value: t.slice(0, e) + t.slice(s), + selection: [e, e] + }), r = { value: t, selection: [e, s] }, l = H(r, i), [a, o] = l.selection, c = l.value.slice(0, a) + l.value.slice(o), u = D({ value: c, selection: [a, a] }, i, r); + this.value = u.value, this.selection = u.selection; + } + getMaskExpression(e) { + const { mask: s } = this.maskOptions; + return typeof s == "function" ? s(e) : s; + } +} +class re { + constructor(e) { + this.element = e, this.listeners = []; + } + listen(e, s, t) { + const i = s; + this.element.addEventListener(e, i, t), this.listeners.push(() => this.element.removeEventListener(e, i)); + } + destroy() { + this.listeners.forEach((e) => e()); + } +} +const g = { + CTRL: 1, + ALT: 2, + SHIFT: 4, + META: 8 +}, y = { + Y: 89, + Z: 90 +}; +function b(n, e, s) { + return n.ctrlKey === !!(e & g.CTRL) && n.altKey === !!(e & g.ALT) && n.shiftKey === !!(e & g.SHIFT) && n.metaKey === !!(e & g.META) && /** + * We intentionally use legacy {@link KeyboardEvent#keyCode `keyCode`} property. It is more + * "keyboard-layout"-independent than {@link KeyboardEvent#key `key`} or {@link KeyboardEvent#code `code`} properties. + * @see {@link https://github.com/taiga-family/maskito/issues/315 `KeyboardEvent#code` issue} + */ + n.keyCode === s; +} +function le(n) { + return b(n, g.CTRL, y.Y) || // Windows + b(n, g.CTRL | g.SHIFT, y.Z) || // Windows & Android + b(n, g.META | g.SHIFT, y.Z); +} +function oe(n) { + return b(n, g.CTRL, y.Z) || // Windows & Android + b(n, g.META, y.Z); +} +function ae({ value: n, selection: e }, s) { + const [t, i] = e; + if (t !== i) + return [t, i]; + const r = s ? n.slice(t).indexOf(` +`) + 1 || n.length : n.slice(0, i).lastIndexOf(` +`) + 1; + return [s ? t : r, s ? r : i]; +} +function ce({ value: n, selection: e }, s) { + const [t, i] = e; + return t !== i ? [t, i] : (s ? [t, i + 1] : [t - 1, i]).map((l) => Math.min(Math.max(l, 0), n.length)); +} +const ue = /\s+$/g, de = /^\s+/g, V = /\s/; +function he({ value: n, selection: e }, s) { + const [t, i] = e; + if (t !== i) + return [t, i]; + if (s) { + const o = n.slice(t), [c] = o.match(de) || [ + "" + ], u = o.trimStart().search(V); + return [ + t, + u !== -1 ? t + c.length + u : n.length + ]; + } + const r = n.slice(0, i), [l] = r.match(ue) || [""], a = r.trimEnd().split("").reverse().findIndex((o) => o.match(V)); + return [ + a !== -1 ? i - l.length - a : 0, + i + ]; +} +function A(n = []) { + return (e, ...s) => n.reduce((t, i) => Object.assign(Object.assign({}, t), i(t, ...s)), e); +} +function pe(n, e) { + const s = Object.assign(Object.assign({}, I), e), t = A(s.preprocessors), i = A(s.postprocessors), r = typeof n == "string" ? { value: n, selection: [0, 0] } : n, { elementState: l } = t({ elementState: r, data: "" }, "validation"), a = new L(l, s), { value: o, selection: c } = i(a, r); + return typeof n == "string" ? o : { value: o, selection: c }; +} +class C extends Q { + constructor(e, s) { + super(), this.element = e, this.maskitoOptions = s, this.isTextArea = this.element.nodeName === "TEXTAREA", this.eventListener = new re(this.element), this.options = Object.assign(Object.assign({}, I), this.maskitoOptions), this.preprocessor = A(this.options.preprocessors), this.postprocessor = A(this.options.postprocessors), this.teardowns = this.options.plugins.map((t) => t(this.element, this.options)), this.updateHistory(this.elementState), this.eventListener.listen("keydown", (t) => { + if (le(t)) + return t.preventDefault(), this.redo(); + if (oe(t)) + return t.preventDefault(), this.undo(); + }), this.eventListener.listen("beforeinput", (t) => { + var i; + const r = t.inputType.includes("Forward"); + switch (this.updateHistory(this.elementState), t.inputType) { + case "historyUndo": + return t.preventDefault(), this.undo(); + case "historyRedo": + return t.preventDefault(), this.redo(); + case "deleteByCut": + case "deleteContentBackward": + case "deleteContentForward": + return this.handleDelete({ + event: t, + isForward: r, + selection: ce(this.elementState, r) + }); + case "deleteWordForward": + case "deleteWordBackward": + return this.handleDelete({ + event: t, + isForward: r, + selection: he(this.elementState, r), + force: !0 + }); + case "deleteSoftLineBackward": + case "deleteSoftLineForward": + case "deleteHardLineBackward": + case "deleteHardLineForward": + return this.handleDelete({ + event: t, + isForward: r, + selection: ae(this.elementState, r), + force: !0 + }); + case "insertCompositionText": + return; + case "insertReplacementText": + return; + case "insertLineBreak": + case "insertParagraph": + return this.handleEnter(t); + case "insertFromPaste": + case "insertText": + case "insertFromDrop": + default: + return this.handleInsert(t, t.data || // `event.data` for `contentEditable` is always `null` for paste/drop events + ((i = t.dataTransfer) === null || i === void 0 ? void 0 : i.getData("text/plain")) || ""); + } + }), this.eventListener.listen("input", ({ inputType: t }) => { + t !== "insertCompositionText" && (this.ensureValueFitsMask(), this.updateHistory(this.elementState)); + }), this.eventListener.listen("compositionend", () => { + this.ensureValueFitsMask(), this.updateHistory(this.elementState); + }); + } + get elementState() { + const { value: e, selectionStart: s, selectionEnd: t } = this.element; + return { + value: e, + selection: [s || 0, t || 0] + }; + } + get maxLength() { + const { maxLength: e } = this.element; + return e === -1 ? 1 / 0 : e; + } + destroy() { + this.eventListener.destroy(), this.teardowns.forEach((e) => e == null ? void 0 : e()); + } + updateElementState({ value: e, selection: s }, t = { + inputType: "insertText", + data: null + }) { + const i = this.elementState.value; + this.updateValue(e), this.updateSelectionRange(s), i !== e && this.dispatchInputEvent(t); + } + updateSelectionRange([e, s]) { + var t; + const { element: i } = this; + i.matches(":focus") && (i.selectionStart !== e || i.selectionEnd !== s) && ((t = i.setSelectionRange) === null || t === void 0 || t.call(i, e, s)); + } + updateValue(e) { + this.element.value = e; + } + ensureValueFitsMask() { + this.updateElementState(pe(this.elementState, this.options)); + } + dispatchInputEvent(e = { + inputType: "insertText", + data: null + }) { + globalThis.InputEvent && this.element.dispatchEvent(new InputEvent("input", Object.assign(Object.assign({}, e), { bubbles: !0, cancelable: !1 }))); + } + handleDelete({ event: e, selection: s, isForward: t, force: i = !1 }) { + const r = { + value: this.elementState.value, + selection: s + }, [l, a] = r.selection, { elementState: o } = this.preprocessor({ + elementState: r, + data: "" + }, t ? "deleteForward" : "deleteBackward"), c = new L(o, this.options), [u, d] = o.selection; + c.deleteCharacters([u, d]); + const h = this.postprocessor(c, r); + if (!(r.value.slice(0, l) + r.value.slice(a) === h.value && !i && !this.element.isContentEditable)) { + if (e.preventDefault(), ee(r, o, c, h)) + return this.updateSelectionRange(t ? [d, d] : [u, u]); + this.updateElementState(h, { + inputType: e.inputType, + data: null + }), this.updateHistory(h); + } + } + handleInsert(e, s) { + const t = this.elementState, { elementState: i, data: r = s } = this.preprocessor({ + data: s, + elementState: t + }, "insert"), l = new L(i, this.options); + try { + l.addCharacters(i.selection, r); + } catch { + return e.preventDefault(); + } + const [a, o] = i.selection, c = t.value.slice(0, a) + s + t.value.slice(o), u = this.postprocessor(l, t); + if (u.value.length > this.maxLength) + return e.preventDefault(); + (c !== u.value || this.element.isContentEditable) && (e.preventDefault(), this.updateElementState(u, { + data: s, + inputType: e.inputType + }), this.updateHistory(u)); + } + handleEnter(e) { + (this.isTextArea || this.element.isContentEditable) && this.handleInsert(e, ` +`); + } +} +function fe(n, e, s) { + const t = Math.min(Number(s), Math.max(Number(e), Number(n))); + return n instanceof Date ? new Date(t) : t; +} +function ge(n) { + return n.replaceAll(/\W/g, "").length; +} +const B = (n) => { + var e, s, t; + return { + day: ((e = n.match(/d/g)) === null || e === void 0 ? void 0 : e.length) || 0, + month: ((s = n.match(/m/g)) === null || s === void 0 ? void 0 : s.length) || 0, + year: ((t = n.match(/y/g)) === null || t === void 0 ? void 0 : t.length) || 0 + }; +}; +function me(n) { + return { + day: String(n.getDate()).padStart(2, "0"), + month: String(n.getMonth() + 1).padStart(2, "0"), + year: String(n.getFullYear()).padStart(4, "0"), + hours: String(n.getHours()).padStart(2, "0"), + minutes: String(n.getMinutes()).padStart(2, "0"), + seconds: String(n.getSeconds()).padStart(2, "0"), + milliseconds: String(n.getMilliseconds()).padStart(3, "0") + }; +} +function ve(n, e) { + return n.length < e.length ? !1 : n.split(/\D/).every((s) => !s.match(/^0+$/)); +} +function W(n, e, s) { + const t = ge(e); + return n.replace(s, "").match(new RegExp(`(\\D*\\d[^\\d\\s]*){1,${t}}`, "g")) || []; +} +function M(n, e) { + const s = e.replaceAll(/[^dmy]/g, ""), t = n.replaceAll(/\D+/g, ""), i = { + day: t.slice(s.indexOf("d"), s.lastIndexOf("d") + 1), + month: t.slice(s.indexOf("m"), s.lastIndexOf("m") + 1), + year: t.slice(s.indexOf("y"), s.lastIndexOf("y") + 1) + }; + return Object.fromEntries(Object.entries(i).filter(([r, l]) => !!l).sort(([r], [l]) => e.toLowerCase().indexOf(r[0]) > e.toLowerCase().indexOf(l[0]) ? 1 : -1)); +} +function Ee(n, e) { + var s, t, i, r, l, a, o; + const c = ((s = n.year) === null || s === void 0 ? void 0 : s.length) === 2 ? `20${n.year}` : n.year, u = new Date(Number(c ?? "0"), Number((t = n.month) !== null && t !== void 0 ? t : "1") - 1, Number((i = n.day) !== null && i !== void 0 ? i : "1"), Number((r = void 0) !== null && r !== void 0 ? r : "0"), Number((l = void 0) !== null && l !== void 0 ? l : "0"), Number((a = void 0) !== null && a !== void 0 ? a : "0"), Number((o = void 0) !== null && o !== void 0 ? o : "0")); + return u.setFullYear(Number(c ?? "0")), u; +} +const U = ", "; +function w({ day: n, month: e, year: s, hours: t, minutes: i, seconds: r, milliseconds: l }, { dateMode: a, dateTimeSeparator: o = U, timeMode: c }) { + var u; + const d = ((u = a.match(/y/g)) === null || u === void 0 ? void 0 : u.length) === 2 ? s == null ? void 0 : s.slice(-2) : s; + return (a + (c ? o + c : "")).replaceAll(/d+/g, n ?? "").replaceAll(/m+/g, e ?? "").replaceAll(/y+/g, d ?? "").replaceAll(/H+/g, t ?? "").replaceAll("MSS", l ?? "").replaceAll(/M+/g, i ?? "").replaceAll(/S+/g, r ?? "").replaceAll(/^\D+/g, "").replaceAll(/\D+$/g, ""); +} +const G = { + day: 31, + month: 12, + year: 9999 +}, Se = /* @__PURE__ */ new Date("0001-01-01"), ye = /* @__PURE__ */ new Date("9999-12-31"), be = [":", "."]; +function we({ dateString: n, dateModeTemplate: e, dateSegmentsSeparator: s, offset: t, selection: [i, r] }) { + const l = M(n, e), a = Object.entries(l), o = {}; + for (const [d, h] of a) { + const f = w(o, { + dateMode: e + }), S = G[d], v = f.length && s.length, m = t + f.length + v + B(e)[d], E = m >= i && m === r; + if (E && Number(h) > Number(S)) + return { validatedDateString: "", updatedSelection: [i, r] }; + if (E && Number(h) < 1) + return { validatedDateString: "", updatedSelection: [i, r] }; + o[d] = h; + } + const c = w(o, { + dateMode: e + }), u = c.length - n.length; + return { + validatedDateString: c, + updatedSelection: [ + i + u, + r + u + ] + }; +} +const Z = /[\\^$.*+?()[\]{}|]/g, De = new RegExp(Z.source); +function q(n) { + return n && De.test(n) ? n.replaceAll(Z, "\\$&") : n; +} +function R(n, e, s = 0) { + return Number(n.padEnd(e.length, "0")) <= Number(e) ? { validatedSegmentValue: n, prefixedZeroesCount: s } : n.endsWith("0") ? R(`0${n.slice(0, e.length - 1)}`, e, s + 1) : R(`${n.slice(0, e.length - 1)}0`, e, s); +} +function N(n) { + return n.replaceAll(/[0-9]/g, (e) => String.fromCharCode(e.charCodeAt(0) - 65248)); +} +function Ae({ dateModeTemplate: n, dateSegmentSeparator: e, splitFn: s, uniteFn: t }) { + return ({ value: i, selection: r }) => { + var l; + const [a, o] = r, { dateStrings: c, restPart: u = "" } = s(i), d = []; + let h = 0; + c.forEach((S) => { + const v = M(S, n), E = Object.entries(v).reduce((k, [O, K]) => { + const { validatedSegmentValue: Y, prefixedZeroesCount: X } = R(K, `${G[O]}`); + return h += X, Object.assign(Object.assign({}, k), { [O]: Y }); + }, {}); + d.push(w(E, { dateMode: n })); + }); + const f = t(d, i) + (!((l = c[c.length - 1]) === null || l === void 0) && l.endsWith(e) ? e : "") + u; + return h && f.slice(o + h, o + h + e.length) === e && (h += e.length), { + selection: [a + h, o + h], + value: f + }; + }; +} +function xe() { + return ({ elementState: n, data: e }) => { + const { value: s, selection: t } = n; + return { + elementState: { + selection: t, + value: N(s) + }, + data: N(e) + }; + }; +} +function Te(n, e) { + const s = B(e); + return Object.fromEntries(Object.entries(n).map(([t, i]) => { + const r = s[t]; + return [ + t, + i.length === r && i.match(/^0+$/) ? "1".padStart(r, "0") : i + ]; + })); +} +function ke({ dateModeTemplate: n, min: e = Se, max: s = ye, rangeSeparator: t = "", dateSegmentSeparator: i = "." }) { + return ({ value: r, selection: l }) => { + const a = t && r.endsWith(t), o = W(r, n, t); + let c = ""; + for (const u of o) { + c += c ? t : ""; + const d = M(u, n); + if (!ve(u, n)) { + const S = Te(d, n), v = w(S, { dateMode: n }), m = u.endsWith(i) ? i : ""; + c += v + m; + continue; + } + const h = Ee(d), f = fe(h, e, s); + c += w(me(f), { + dateMode: n + }); + } + return { + selection: l, + value: c + (a ? t : "") + }; + }; +} +function Ce({ dateModeTemplate: n, dateSegmentsSeparator: e, rangeSeparator: s = "", dateTimeSeparator: t = U }) { + return ({ elementState: i, data: r }) => { + const l = s ? new RegExp(`${s}|-`) : t, a = r.split(l), o = r.includes(t) ? [a[0]] : a; + if (o.every((c) => c.trim().split(/\D/).filter(Boolean).length === n.split(e).length)) { + const c = o.map((u) => Le(u, n, e)).join(s); + return { + elementState: i, + data: `${c}${r.includes(t) && t + a[1] || ""}` + }; + } + return { elementState: i, data: r }; + }; +} +function Le(n, e, s) { + const t = n.split(/\D/).filter(Boolean), i = e.split(s); + return t.map((l, a) => a === i.length - 1 ? l : l.padStart(i[a].length, "0")).join(s); +} +function Re({ dateModeTemplate: n, dateSegmentsSeparator: e, rangeSeparator: s = "" }) { + return ({ elementState: t, data: i }) => { + const { value: r, selection: l } = t; + if (i === e) + return { + elementState: t, + data: l[0] === r.length ? i : "" + }; + const a = i.replaceAll(new RegExp(`[^\\d${q(e)}${s}]`, "g"), ""); + if (!a) + return { elementState: t, data: "" }; + const [o, c] = l; + let u = c + i.length; + const d = r.slice(0, o) + a + r.slice(u), h = W(d, n, s); + let f = ""; + const S = !!s && d.includes(s); + for (const m of h) { + const { validatedDateString: E, updatedSelection: k } = we({ + dateString: m, + dateModeTemplate: n, + dateSegmentsSeparator: e, + offset: f.length, + selection: [o, u] + }); + if (m && !E) + return { elementState: t, data: "" }; + u = k[1], f += S && !f ? E + s : E; + } + const v = f.slice(o, u); + return { + elementState: { + selection: l, + value: f.slice(0, o) + v.split(e).map((m) => "0".repeat(m.length)).join(e) + f.slice(u) + }, + data: v + }; + }; +} +function Ie() { + return ({ elementState: n }, e) => { + const { value: s, selection: t } = n; + if (!s || Me(s, t)) + return { elementState: n }; + const [i, r] = t, l = s.slice(i, r).replaceAll(/\d/g, "0"), a = s.slice(0, i) + l + s.slice(r); + return e === "validation" || e === "insert" && i === r ? { + elementState: { selection: t, value: a } + } : { + elementState: { + selection: e === "deleteBackward" || e === "insert" ? [i, i] : [r, r], + value: a + } + }; + }; +} +function Me(n, [e, s]) { + return s === n.length; +} +function Oe({ mode: n, separator: e = ".", max: s, min: t }) { + const i = n.split("/").join(e); + return Object.assign(Object.assign({}, I), { mask: Array.from(i).map((r) => e.includes(r) ? r : /\d/), overwriteMode: "replace", preprocessors: [ + xe(), + Ie(), + Ce({ + dateModeTemplate: i, + dateSegmentsSeparator: e + }), + Re({ + dateModeTemplate: i, + dateSegmentsSeparator: e + }) + ], postprocessors: [ + Ae({ + dateModeTemplate: i, + dateSegmentSeparator: e, + splitFn: (r) => ({ dateStrings: [r] }), + uniteFn: ([r]) => r + }), + ke({ + min: t, + max: s, + dateModeTemplate: i, + dateSegmentSeparator: e + }) + ] }); +} +new RegExp(`[${be.map(q).join("")}]$`); +const Fe = /^(?:\d{4}[ -]?){0,3}\d{0,4}$/, p = { + // Visa: Starts with 4, 13 or 16 digits + visa: { + final: /^4(?:\d{3}[- ]?){3}\d{3,4}$/, + // Exactly 13 or 16 digits + start: /^4/, + // Checks if the input starts with 4 + length: /^4\d{0,15}$/ + // Strictly matches 1 to 16 digits after the initial 4, no spaces or dashes + }, + // MasterCard: Starts with 51-55, 16 digits + mastercard: { + final: /^5[1-5]\d{3}[- ]?\d{4}[- ]?\d{4}[- ]?\d{4}$/, + // Exactly 16 digits + start: /^5[1-5]/, + // Checks if the input starts with 51-55 + length: /^5[1-5]\d{0,15}$/ + // Strictly matches 2 to 16 digits after the initial 51-55, no spaces or dashes + }, + // American Express: Starts with 34 or 37, 15 digits + amex: { + final: /^3[47]\d{2}[- ]?\d{6}[- ]?\d{5}$/, + // Exactly 15 digits + start: /^3[47]/, + // Checks if the input starts with 34 or 37 + length: /^3[47]\d{0,15}$/ + // Strictly matches 2 to 15 digits after the initial 34 or 37, no spaces or dashes + }, + // Discover: Starts with 6011 or 65 or 64[4-9], 16 digits + discover: { + final: /^(6011|65|64[4-9])\d{4}[- ]?\d{4}[- ]?\d{4}$/, + // Exactly 16 digits + start: /^(6011|65|64[4-9])/, + // Checks if the input starts with 6011, 65, or 64 followed by 4-9 + length: /^(6011|65|64[4-9])\d{0,15}$/ + // Strictly matches 4 to 16 digits after the initial prefix, no spaces or dashes + }, + // Diners Club: Starts with 30[0-5], 36, 38, or 39, 14 digits + diners: { + final: /^(30[0-5]|36|38|39)\d{4}[- ]?\d{4}[- ]?\d{4}$/, + // Exactly 14 digits + start: /^(30[0-5]|36|38|39)/, + // Checks if the input starts with 30-35, 36, 38, or 39 + length: /^(30[0-5]|36|38|39)\d{0,14}$/ + // Strictly matches 2 to 14 digits after the initial prefix, no spaces or dashes + }, + // JCB: Starts with 2131, 1800, or 35[0-9]{3}, 15 or 16 digits + jcb: { + final: /^(2131|1800|35[0-9]{3})\d{4}[- ]?\d{4}[- ]?\d{4}$/, + // Exactly 15 or 16 digits + start: /^(2131|1800|35[0-9]{3})/, + // Checks if the input starts with 2131, 1800, or 35 followed by 3 digits + length: /^(2131|1800|35[0-9]{3})\d{0,15}$/ + // Strictly matches 4 to 16 digits after the initial prefix, no spaces or dashes + } +}; +var x, z; +class $e { + constructor(e) { + _(this, x); + this.options = e; + } + mount() { + return this.number = this.options.fields.card.number instanceof HTMLInputElement ? this.options.fields.card.number : document.querySelector( + this.options.fields.card.number + ), this.date = this.options.fields.card.date instanceof HTMLInputElement ? this.options.fields.card.date : document.querySelector( + this.options.fields.card.date + ), this.cvv = this.options.fields.card.cvv instanceof HTMLInputElement ? this.options.fields.card.cvv : document.querySelector( + this.options.fields.card.cvv + ), $(this, x, z).call(this), this; + } + check() { + const e = p.visa.final.test(this.number.value) || p.mastercard.final.test(this.number.value) || p.amex.final.test(this.number.value) || p.discover.final.test(this.number.value) || p.diners.final.test(this.number.value) || p.jcb.final.test(this.number.value), s = new RegExp("^(0[1-9]|1[0-2])/(?:\\d{2})$").test( + this.date.value + ), t = new RegExp("^\\d{3}$").test(this.cvv.value); + return { + valid: e && s && t, + number: { + valid: e, + value: this.number.value + }, + date: { + valid: s, + value: this.date.value + }, + cvv: { + valid: t, + value: this.cvv.value + } + }; + } + type() { + return p.visa.start.test(this.number.value) ? "visa" : p.mastercard.start.test(this.number.value) ? "mastercard" : p.amex.start.test(this.number.value) ? "amex" : p.discover.start.test(this.number.value) ? "discover" : p.diners.start.test(this.number.value) ? "diners" : p.jcb.start.test(this.number.value) ? "jcb" : "unknown"; + } +} +x = new WeakSet(), z = function() { + new C(this.number, { + mask: (e) => p.visa.start.test(e.value) ? new RegExp(p.visa.length) : p.mastercard.start.test(e.value) ? new RegExp(p.mastercard.length) : p.amex.start.test(e.value) ? new RegExp(p.amex.length) : p.discover.start.test(e.value) ? new RegExp(p.discover.length) : p.diners.start.test(e.value) ? new RegExp(p.diners.length) : p.jcb.start.test(e.value) ? new RegExp(p.jcb.length) : new RegExp(Fe) + }), new C( + this.date, + Oe({ + mode: "mm/yy", + separator: "/" + }) + ), new C(this.cvv, { + mask: [/\d/, /\d/, /\d/] + }); +}; +export { + $e as SimpleCard, + p as masks, + Fe as numbers +}; diff --git a/resources/js/clients/payment_methods/authorize-stripe-acss.js b/resources/js/clients/payment_methods/authorize-stripe-acss.js new file mode 100644 index 0000000000..dd8a0ca20f --- /dev/null +++ b/resources/js/clients/payment_methods/authorize-stripe-acss.js @@ -0,0 +1,80 @@ +/** + * Invoice Ninja (https://invoiceninja.com). + * + * @link https://github.com/invoiceninja/invoiceninja source repository + * + * @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com) + * + * @license https://www.elastic.co/licensing/elastic-license + */ + +import { wait } from '../wait'; + +wait('#stripe-acss-authorize').then(() => authorize()); + +function authorize() { + let stripe; + + const account_id = document.querySelector( + 'meta[name="stripe-account-id"]' + )?.content; + + const publishable_key = document.querySelector( + 'meta[name="stripe-publishable-key"]' + )?.content; + + if (account_id && account_id.length > 0) { + stripe = Stripe(publishable_key, { + stripeAccount: account_id, + }); + } else { + stripe = Stripe(publishable_key); + } + + const accountholderName = document.getElementById('acss-name'); + const email = document.getElementById('acss-email-address'); + const submitButton = document.getElementById('authorize-acss'); + const clientSecret = document.querySelector('meta[name="stripe-pi-client-secret"]')?.content; + const errors = document.getElementById('errors'); + + submitButton.addEventListener('click', async (event) => { + event.preventDefault(); + errors.hidden = true; + submitButton.disabled = true; + + const validEmailRegex = + /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; + + if (email.value.length < 3 || !email.value.match(validEmailRegex)) { + errors.textContent = 'Please enter a valid email address.'; + errors.hidden = false; + submitButton.disabled = false; + return; + } + + if (accountholderName.value.length < 3) { + errors.textContent = 'Please enter a name for the account holder.'; + errors.hidden = false; + submitButton.disabled = false; + return; + } + + const { setupIntent, error } = await stripe.confirmAcssDebitSetup( + clientSecret, + { + payment_method: { + billing_details: { + name: accountholderName.value, + email: email.value, + }, + }, + } + ); + + // Handle next step based on SetupIntent's status. + document.getElementById('gateway_response').value = JSON.stringify( + setupIntent ?? error + ); + document.getElementById('server_response').submit(); + }); +} diff --git a/resources/js/clients/payments/authorize-credit-card-payment.js b/resources/js/clients/payments/authorize-credit-card-payment.js index 2d4ec69b35..35913c2be8 100644 --- a/resources/js/clients/payments/authorize-credit-card-payment.js +++ b/resources/js/clients/payments/authorize-credit-card-payment.js @@ -5,40 +5,65 @@ * * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) * - * @license https://www.elastic.co/licensing/elastic-license + * @license https://www.elastic.co/licensing/elastic-license */ -class AuthorizeAuthorizeCard { +import { SimpleCard } from '@invoiceninja/simple-card'; +import { wait, instant } from '../wait'; +class AuthorizeAuthorizeCard { constructor(publicKey, loginId) { this.publicKey = publicKey; this.loginId = loginId; - this.cardHolderName = document.getElementById("cardholder_name"); + this.cardHolderName = document.getElementById('cardholder_name'); + + this.sc = new SimpleCard({ + fields: { + card: { + number: '#number', + date: '#date', + cvv: '#cvv', + }, + }, + }); + + this.sc.mount(); + + this.cvvRequired = document.querySelector( + 'meta[name="authnet-require-cvv"]' + ).content; + } handleAuthorization = () => { - - if (cvvRequired == "1" && document.getElementById("cvv").value.length < 3) { - var $errors = $('#errors'); - $errors.show().html("

CVV is required

"); + if ( + this.cvvRequired == '1' && + document.getElementById('cvv').value.length < 3 + ) { + const $errors = document.getElementById('errors'); + + if ($errors) { + $errors.innerText = 'CVV is required'; + $errors.style.display = 'block'; + } document.getElementById('pay-now').disabled = false; document.querySelector('#pay-now > svg').classList.add('hidden'); - document.querySelector('#pay-now > span').classList.remove('hidden'); + document + .querySelector('#pay-now > span') + .classList.remove('hidden'); return; } - var myCard = $('#my-card'); - var authData = {}; authData.clientKey = this.publicKey; authData.apiLoginID = this.loginId; var cardData = {}; - cardData.cardNumber = myCard.CardJs('cardNumber').replace(/[^\d]/g, ''); - cardData.month = myCard.CardJs('expiryMonth').replace(/[^\d]/g, ''); - cardData.year = myCard.CardJs('expiryYear').replace(/[^\d]/g, ''); - cardData.cardCode = document.getElementById("cvv").value.replace(/[^\d]/g, ''); + cardData.cardNumber = this.sc.value('number')?.replace(/[^\d]/g, ''); + cardData.month = this.sc.value('month')?.replace(/[^\d]/g, ''); + cardData.year = `20${this.sc.value('year')?.replace(/[^\d]/g, '')}`; + cardData.cardCode = this.sc.value('cvv')?.replace(/[^\d]/g, ''); var secureData = {}; secureData.authData = authData; @@ -58,102 +83,112 @@ class AuthorizeAuthorizeCard { Accept.dispatchData(secureData, this.responseHandler); return false; - - } + }; handlePayNowAction(token_hashed_id) { document.getElementById('pay-now').disabled = true; document.querySelector('#pay-now > svg').classList.remove('hidden'); document.querySelector('#pay-now > span').classList.add('hidden'); - document.getElementById("token").value = token_hashed_id; - document.getElementById("server_response").submit(); + document.getElementById('token').value = token_hashed_id; + document.getElementById('server_response').submit(); } responseHandler = (response) => { - if (response.messages.resultCode === "Error") { + if (response.messages.resultCode === 'Error') { var i = 0; - var $errors = $('#errors'); // get the reference of the div - $errors.show().html("

" + response.messages.message[i].code + ": " + response.messages.message[i].text + "

"); + const $errors = document.getElementById('errors'); // get the reference of the div + + if ($errors) { + $errors.innerText = `${response.messages.message[i].code}: ${response.messages.message[i].text}`; + $errors.style.display = 'block'; + } document.getElementById('pay-now').disabled = false; document.querySelector('#pay-now > svg').classList.add('hidden'); - document.querySelector('#pay-now > span').classList.remove('hidden'); - } else if (response.messages.resultCode === "Ok") { + document + .querySelector('#pay-now > span') + .classList.remove('hidden'); + } else if (response.messages.resultCode === 'Ok') { + document.getElementById('dataDescriptor').value = + response.opaqueData.dataDescriptor; + document.getElementById('dataValue').value = + response.opaqueData.dataValue; - document.getElementById("dataDescriptor").value = response.opaqueData.dataDescriptor; - document.getElementById("dataValue").value = response.opaqueData.dataValue; - - let storeCard = document.querySelector('input[name=token-billing-checkbox]:checked'); + let storeCard = document.querySelector( + 'input[name=token-billing-checkbox]:checked' + ); if (storeCard) { - document.getElementById("store_card").value = storeCard.value; + document.getElementById('store_card').value = storeCard.value; } - document.getElementById("server_response").submit(); + document.getElementById('server_response').submit(); } return false; - } - + }; handle = () => { - Array - .from(document.getElementsByClassName('toggle-payment-with-token')) - .forEach((element) => element.addEventListener('click', (e) => { - document - .getElementById('save-card--container').style.display = 'none'; - document - .getElementById('authorize--credit-card-container').style.display = 'none'; + Array.from( + document.getElementsByClassName('toggle-payment-with-token') + ).forEach((element) => + element.addEventListener('click', (e) => { + document.getElementById('save-card--container').style.display = + 'none'; + document.getElementById( + 'authorize--credit-card-container' + ).style.display = 'none'; - document - .getElementById('token').value = e.target.dataset.token; - })); + document.getElementById('token').value = e.target.dataset.token; + }) + ); - let payWithCreditCardToggle = document.getElementById('toggle-payment-with-credit-card'); + let payWithCreditCardToggle = document.getElementById( + 'toggle-payment-with-credit-card' + ); if (payWithCreditCardToggle) { - payWithCreditCardToggle - .addEventListener('click', () => { - document - .getElementById('save-card--container').style.display = 'grid'; - document - .getElementById('authorize--credit-card-container').style.display = 'flex'; + payWithCreditCardToggle.addEventListener('click', () => { + document.getElementById('save-card--container').style.display = + 'grid'; + document.getElementById( + 'authorize--credit-card-container' + ).style.display = 'flex'; - document - .getElementById('token').value = null; - }); + document.getElementById('token').value = null; + }); } let payNowButton = document.getElementById('pay-now'); if (payNowButton) { - payNowButton - .addEventListener('click', (e) => { - let token = document.getElementById('token'); + payNowButton.addEventListener('click', (e) => { + let token = document.getElementById('token'); - token.value - ? this.handlePayNowAction(token.value) - : this.handleAuthorization(); - }); + token.value + ? this.handlePayNowAction(token.value) + : this.handleAuthorization(); + }); } return this; - } + }; } -const publicKey = document.querySelector( - 'meta[name="authorize-public-key"]' -).content; +function boot() { + const publicKey = document.querySelector( + 'meta[name="authorize-public-key"]' + ).content; -const loginId = document.querySelector( - 'meta[name="authorize-login-id"]' -).content; + const loginId = document.querySelector( + 'meta[name="authorize-login-id"]' + ).content; -const cvvRequired = document.querySelector( - 'meta[name="authnet-require-cvv"]' -).content; + /** @handle */ + new AuthorizeAuthorizeCard(publicKey, loginId).handle(); +} + +instant() ? boot() : wait('#authorize-net-credit-card-payment').then(() => boot()); -/** @handle */ -new AuthorizeAuthorizeCard(publicKey, loginId).handle(); diff --git a/resources/js/clients/payments/braintree-credit-card.js b/resources/js/clients/payments/braintree-credit-card.js index 1c7dacac04..2fb5e672ef 100644 --- a/resources/js/clients/payments/braintree-credit-card.js +++ b/resources/js/clients/payments/braintree-credit-card.js @@ -8,6 +8,7 @@ * @license https://www.elastic.co/licensing/elastic-license */ +import { wait, instant } from '../wait'; class BraintreeCreditCard { initBraintreeDataCollector() { @@ -43,8 +44,7 @@ class BraintreeCreditCard { } let payNow = document.getElementById('pay-now'); - - params = JSON.parse(document.querySelector('input[name=threeds]').value); + let params = JSON.parse(document.querySelector('input[name=threeds]').value); payNow.addEventListener('click', () => { dropinInstance.requestPaymentMethod({ @@ -138,4 +138,8 @@ class BraintreeCreditCard { } } -new BraintreeCreditCard().handle(); +function boot() { + new BraintreeCreditCard().handle(); +} + +instant() ? boot() : wait('#braintree-credit-card-payment', 'meta[name=client-token]').then(() => boot()); diff --git a/resources/js/clients/payments/braintree-paypal.js b/resources/js/clients/payments/braintree-paypal.js index affaf1cb26..40cabce5ae 100644 --- a/resources/js/clients/payments/braintree-paypal.js +++ b/resources/js/clients/payments/braintree-paypal.js @@ -8,6 +8,8 @@ * @license https://www.elastic.co/licensing/elastic-license */ +import { wait, instant } from '../wait'; + class BraintreePayPal { initBraintreeDataCollector() { window.braintree.client.create({ @@ -119,4 +121,8 @@ class BraintreePayPal { } } -new BraintreePayPal().handle(); +function boot() { + new BraintreePayPal().handle(); +} + +instant() ? boot() : wait('#braintree-paypal-payment').then(() => boot()); diff --git a/resources/js/clients/payments/checkout-credit-card.js b/resources/js/clients/payments/checkout-credit-card.js index bb32fa7337..ea0a6df7d7 100644 --- a/resources/js/clients/payments/checkout-credit-card.js +++ b/resources/js/clients/payments/checkout-credit-card.js @@ -5,64 +5,70 @@ * * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) * - * @license https://www.elastic.co/licensing/elastic-license + * @license https://www.elastic.co/licensing/elastic-license */ +import { wait } from '../wait'; + class CheckoutCreditCard { constructor() { this.tokens = []; } - mountFrames() { - console.log('Mount checkout frames..'); - } - handlePaymentUsingToken(e) { document.getElementById('checkout--container').classList.add('hidden'); - document.getElementById('pay-now-with-token--container').classList.remove('hidden'); + document + .getElementById('pay-now-with-token--container') + .classList.remove('hidden'); document.getElementById('save-card--container').style.display = 'none'; - document - .querySelector('input[name=token]') - .value = e.target.dataset.token; + document.querySelector('input[name=token]').value = + e.target.dataset.token; } handlePaymentUsingCreditCard(e) { - document.getElementById('checkout--container').classList.remove('hidden'); - document.getElementById('pay-now-with-token--container').classList.add('hidden'); + document + .getElementById('checkout--container') + .classList.remove('hidden'); + document + .getElementById('pay-now-with-token--container') + .classList.add('hidden'); document.getElementById('save-card--container').style.display = 'grid'; - document - .querySelector('input[name=token]') - .value = ''; + document.querySelector('input[name=token]').value = ''; const payButton = document.getElementById('pay-button'); - - const publicKey = document.querySelector('meta[name="public-key"]').content ?? ''; + + const publicKey = + document.querySelector('meta[name="public-key"]').content ?? ''; const form = document.getElementById('payment-form'); Frames.init(publicKey); - Frames.addEventHandler(Frames.Events.CARD_VALIDATION_CHANGED, function (event) { - payButton.disabled = !Frames.isCardValid(); - }); + Frames.addEventHandler( + Frames.Events.CARD_VALIDATION_CHANGED, + function (event) { + payButton.disabled = !Frames.isCardValid(); + } + ); - Frames.addEventHandler(Frames.Events.CARD_TOKENIZATION_FAILED, function (event) { - payButton.disabled = false; - }); + Frames.addEventHandler( + Frames.Events.CARD_TOKENIZATION_FAILED, + function (event) { + payButton.disabled = false; + } + ); Frames.addEventHandler(Frames.Events.CARD_TOKENIZED, function (event) { payButton.disabled = true; - document.querySelector( - 'input[name="gateway_response"]' - ).value = JSON.stringify(event); + document.querySelector('input[name="gateway_response"]').value = + JSON.stringify(event); - document.querySelector( - 'input[name="store_card"]' - ).value = document.querySelector( - 'input[name=token-billing-checkbox]:checked' - ).value; + document.querySelector('input[name="store_card"]').value = + document.querySelector( + 'input[name=token-billing-checkbox]:checked' + ).value; document.getElementById('server-response').submit(); }); @@ -87,9 +93,11 @@ class CheckoutCreditCard { handle() { this.handlePaymentUsingCreditCard(); - Array - .from(document.getElementsByClassName('toggle-payment-with-token')) - .forEach((element) => element.addEventListener('click', this.handlePaymentUsingToken)); + Array.from( + document.getElementsByClassName('toggle-payment-with-token') + ).forEach((element) => + element.addEventListener('click', this.handlePaymentUsingToken) + ); document .getElementById('toggle-payment-with-credit-card') @@ -101,4 +109,6 @@ class CheckoutCreditCard { } } -new CheckoutCreditCard().handle(); +wait('#checkout-credit-card-payment').then(() => + new CheckoutCreditCard().handle() +); diff --git a/resources/js/clients/payments/eway-credit-card.js b/resources/js/clients/payments/eway-credit-card.js index 3d4f99297e..d27632b30e 100644 --- a/resources/js/clients/payments/eway-credit-card.js +++ b/resources/js/clients/payments/eway-credit-card.js @@ -8,6 +8,8 @@ * @license https://www.elastic.co/licensing/elastic-license */ +import { wait, instant } from '../wait'; + class EwayRapid { constructor() { this.cardStyles = @@ -510,4 +512,8 @@ class EwayRapid { } } -new EwayRapid().handle(); +function boot() { + new EwayRapid().handle(); +} + +instant() ? boot() : wait('#eway-credit-card-payment').then(() => boot()); diff --git a/resources/js/clients/payments/forte-ach-payment.js b/resources/js/clients/payments/forte-ach-payment.js index 90bf9f6753..8e50c5e2a2 100644 --- a/resources/js/clients/payments/forte-ach-payment.js +++ b/resources/js/clients/payments/forte-ach-payment.js @@ -8,6 +8,8 @@ * @license https://opensource.org/licenses/AAL */ +import { wait, instant } from '../wait'; + class ForteAuthorizeACH { constructor(apiLoginId) { this.apiLoginId = apiLoginId; @@ -73,9 +75,13 @@ class ForteAuthorizeACH { }; } -const apiLoginId = document.querySelector( - 'meta[name="forte-api-login-id"]' -).content; +function boot() { + const apiLoginId = document.querySelector( + 'meta[name="forte-api-login-id"]' + ).content; + + /** @handle */ + new ForteAuthorizeACH(apiLoginId).handle(); +} -/** @handle */ -new ForteAuthorizeACH(apiLoginId).handle(); +instant() ? boot() : wait('#force-ach-payment').then(() => boot()); diff --git a/resources/js/clients/payments/forte-credit-card-payment.js b/resources/js/clients/payments/forte-credit-card-payment.js index e406d21539..243d13935a 100644 --- a/resources/js/clients/payments/forte-credit-card-payment.js +++ b/resources/js/clients/payments/forte-credit-card-payment.js @@ -8,21 +8,34 @@ * @license https://opensource.org/licenses/AAL */ +import { wait, instant } from '../wait'; +import { SimpleCard } from '@invoiceninja/simple-card'; + class ForteAuthorizeCard { constructor(apiLoginId) { this.apiLoginId = apiLoginId; this.cardHolderName = document.getElementById('cardholder_name'); + + this.sc = new SimpleCard({ + fields: { + card: { + number: '#number', + date: '#date', + cvv: '#cvv', + }, + }, + }); + + this.sc.mount(); } handleAuthorization = () => { - var myCard = $('#my-card'); - - var data = { + const data = { api_login_id: this.apiLoginId, - card_number: myCard.CardJs('cardNumber').replace(/[^\d]/g, ''), - expire_year: myCard.CardJs('expiryYear').replace(/[^\d]/g, ''), - expire_month: myCard.CardJs('expiryMonth').replace(/[^\d]/g, ''), - cvv: document.getElementById('cvv').value.replace(/[^\d]/g, ''), + card_number: this.sc.value('number')?.replace(/[^\d]/g, ''), + expire_year: `20${this.sc.value('year')?.replace(/[^\d]/g, '')}`, + expire_month: this.sc.value('month')?.replace(/[^\d]/g, ''), + cvv: this.sc.value('cvv')?.replace(/[^\d]/g, ''), }; let payNowButton = document.getElementById('pay-now'); @@ -162,9 +175,13 @@ class ForteAuthorizeCard { } -const apiLoginId = document.querySelector( - 'meta[name="forte-api-login-id"]' -).content; +function boot() { + const apiLoginId = document.querySelector( + 'meta[name="forte-api-login-id"]' + ).content; -/** @handle */ -new ForteAuthorizeCard(apiLoginId).handle(); + /** @handle */ + new ForteAuthorizeCard(apiLoginId).handle(); +} + +instant() ? boot() : wait('#forte-credit-card-payment').then(() => boot()); diff --git a/resources/js/clients/payments/mollie-credit-card.js b/resources/js/clients/payments/mollie-credit-card.js index c973f1147c..c88f350494 100644 --- a/resources/js/clients/payments/mollie-credit-card.js +++ b/resources/js/clients/payments/mollie-credit-card.js @@ -8,6 +8,8 @@ * @license https://www.elastic.co/licensing/elastic-license */ +import { wait, instant } from '../wait'; + class _Mollie { constructor() { this.mollie = Mollie( @@ -166,4 +168,9 @@ class _Mollie { } } -new _Mollie().handle(); + +function boot() { + new _Mollie().handle(); +} + +instant() ? boot(): wait('#mollie-credit-card-payment').then(() => boot()); diff --git a/resources/js/clients/payments/paytrace-credit-card.js b/resources/js/clients/payments/paytrace-credit-card.js index 9b67b1ed8d..bf361f0593 100644 --- a/resources/js/clients/payments/paytrace-credit-card.js +++ b/resources/js/clients/payments/paytrace-credit-card.js @@ -8,6 +8,8 @@ * @license https://www.elastic.co/licensing/elastic-license */ +import { instant, wait } from '../wait'; + class PayTraceCreditCard { constructor() { this.clientKey = document.querySelector( @@ -217,7 +219,15 @@ class PayTraceCreditCard { return this.handlePaymentWithToken(e); }); + + if (Array.from(document.getElementsByClassName('toggle-payment-with-token')).length === 0 && !instant()) { + document.getElementById('toggle-payment-with-credit-card').click(); + } } } -new PayTraceCreditCard().handle(); +function boot() { + new PayTraceCreditCard().handle(); +} + +instant() ? boot() : wait('#paytrace-credit-card-payment').then(() => boot()) diff --git a/resources/js/clients/payments/razorpay-aio.js b/resources/js/clients/payments/razorpay-aio.js index 4097b07fcb..42e8ae1313 100644 --- a/resources/js/clients/payments/razorpay-aio.js +++ b/resources/js/clients/payments/razorpay-aio.js @@ -8,29 +8,35 @@ * @license https://www.elastic.co/licensing/elastic-license */ -let options = JSON.parse( - document.querySelector('meta[name=razorpay-options]')?.content -); +import { wait, instant } from '../wait'; -options.handler = function (response) { - document.getElementById('razorpay_payment_id').value = - response.razorpay_payment_id; - document.getElementById('razorpay_signature').value = - response.razorpay_signature; - document.getElementById('server-response').submit(); -}; +function boot() { + let options = JSON.parse( + document.querySelector('meta[name=razorpay-options]')?.content + ); + + options.handler = function (response) { + document.getElementById('razorpay_payment_id').value = + response.razorpay_payment_id; + document.getElementById('razorpay_signature').value = + response.razorpay_signature; + document.getElementById('server-response').submit(); + }; + + options.modal = { + ondismiss: function () { + payNowButton.disabled = false; + }, + }; + + let razorpay = new Razorpay(options); + let payNowButton = document.getElementById('pay-now'); + + payNowButton.onclick = function (event) { + payNowButton.disabled = true; + + razorpay.open(); + }; +} -options.modal = { - ondismiss: function () { - payNowButton.disabled = false; - }, -}; - -let razorpay = new Razorpay(options); -let payNowButton = document.getElementById('pay-now'); - -payNowButton.onclick = function (event) { - payNowButton.disabled = true; - - razorpay.open(); -}; +instant() ? boot() : wait('#razorpay-hosted-payment').then(() => boot()); diff --git a/resources/js/clients/payments/square-credit-card.js b/resources/js/clients/payments/square-credit-card.js index 4242eae5d6..358a672fdd 100644 --- a/resources/js/clients/payments/square-credit-card.js +++ b/resources/js/clients/payments/square-credit-card.js @@ -8,6 +8,8 @@ * @license https://www.elastic.co/licensing/elastic-license */ +import { wait, instant } from '../wait'; + class SquareCreditCard { constructor() { this.appId = document.querySelector('meta[name=square-appId]').content; @@ -180,4 +182,9 @@ class SquareCreditCard { } } -new SquareCreditCard().handle(); +function boot() { + new SquareCreditCard().handle(); +} + +instant() ? boot() : wait('#square-credit-card-payment').then(() => boot()); + diff --git a/resources/js/clients/payments/stripe-ach-pay.js b/resources/js/clients/payments/stripe-ach-pay.js new file mode 100644 index 0000000000..4eb00730b5 --- /dev/null +++ b/resources/js/clients/payments/stripe-ach-pay.js @@ -0,0 +1,168 @@ +/** + * Invoice Ninja (https://invoiceninja.com). + * + * @link https://github.com/invoiceninja/invoiceninja source repository + * + * @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com) + * + * @license https://www.elastic.co/licensing/elastic-license + */ + +import { wait } from '../wait'; + +wait('#stripe-ach-payment').then(() => ach()); + +function ach() { + let payNow = document.getElementById('pay-now'); + + if (payNow) { + Array.from( + document.getElementsByClassName('toggle-payment-with-token') + ).forEach((element) => + element.addEventListener('click', (element) => { + document.querySelector('input[name=source]').value = + element.target.dataset.token; + }) + ); + payNow.addEventListener('click', function () { + let payNowButton = document.getElementById('pay-now'); + payNowButton.disabled = true; + payNowButton.querySelector('svg').classList.remove('hidden'); + payNowButton.querySelector('span').classList.add('hidden'); + document.getElementById('server-response').submit(); + }); + } + + document.getElementById('new-bank').addEventListener('click', (ev) => { + if (!document.getElementById('accept-terms').checked) { + errors.textContent = + 'You must accept the mandate terms prior to making payment.'; + errors.hidden = false; + return; + } + + errors.hidden = true; + + let stripe; + + let publishableKey = document.querySelector( + 'meta[name="stripe-publishable-key"]' + ).content; + + let stripeConnect = document.querySelector( + 'meta[name="stripe-account-id"]' + )?.content; + + if (stripeConnect) { + stripe = Stripe(publishableKey, { stripeAccount: stripeConnect }); + } else { + stripe = Stripe(publishableKey); + } + + let newBankButton = document.getElementById('new-bank'); + newBankButton.disabled = true; + newBankButton.querySelector('svg').classList.remove('hidden'); + newBankButton.querySelector('span').classList.add('hidden'); + + ev.preventDefault(); + const accountHolderNameField = document.getElementById( + 'account-holder-name-field' + ); + const emailField = document.getElementById('email-field'); + const clientSecret = document.querySelector( + 'meta[name="client_secret"]' + )?.content; + // Calling this method will open the instant verification dialog. + stripe + .collectBankAccountForPayment({ + clientSecret: clientSecret, + params: { + payment_method_type: 'us_bank_account', + payment_method_data: { + billing_details: { + name: accountHolderNameField.value, + email: emailField.value, + }, + }, + }, + expand: ['payment_method'], + }) + .then(({ paymentIntent, error }) => { + if (error) { + console.error(error.message); + errors.textContent = error.message; + errors.hidden = false; + resetButtons(); + + // PaymentMethod collection failed for some reason. + } else if (paymentIntent.status === 'requires_payment_method') { + // Customer canceled the hosted verification modal. Present them with other + // payment method type options. + + errors.textContent = + 'We were unable to process the payment with this account, please try another one.'; + errors.hidden = false; + resetButtons(); + return; + } else if (paymentIntent.status === 'requires_confirmation') { + let bank_account_response = document.getElementById( + 'bank_account_response' + ); + bank_account_response.value = JSON.stringify(paymentIntent); + + confirmPayment(stripe, clientSecret); + } + + resetButtons(); + return; + }); + }); + + function confirmPayment(stripe, clientSecret) { + stripe + .confirmUsBankAccountPayment(clientSecret) + .then(({ paymentIntent, error }) => { + console.log(paymentIntent); + if (error) { + console.error(error.message); + // The payment failed for some reason. + } else if (paymentIntent.status === 'requires_payment_method') { + // Confirmation failed. Attempt again with a different payment method. + + errors.textContent = + 'We were unable to process the payment with this account, please try another one.'; + errors.hidden = false; + resetButtons(); + } else if (paymentIntent.status === 'processing') { + // Confirmation succeeded! The account will be debited. + + let gateway_response = + document.getElementById('gateway_response'); + gateway_response.value = JSON.stringify(paymentIntent); + document.getElementById('server-response').submit(); + } else if ( + paymentIntent.next_action?.type === + 'verify_with_microdeposits' || + paymentIntent.next_action?.type === 'requires_source_action' + ) { + errors.textContent = + 'You will receive an email with details on how to verify your bank account and process payment.'; + errors.hidden = false; + document.getElementById('new-bank').style.visibility = + 'hidden'; + + let gateway_response = + document.getElementById('gateway_response'); + gateway_response.value = JSON.stringify(paymentIntent); + document.getElementById('server-response').submit(); + } + }); + } + + function resetButtons() { + let newBankButton = document.getElementById('new-bank'); + newBankButton.disabled = false; + newBankButton.querySelector('svg').classList.add('hidden'); + newBankButton.querySelector('span').classList.remove('hidden'); + } +} diff --git a/resources/js/clients/payments/stripe-acss.js b/resources/js/clients/payments/stripe-acss.js index 613e8e3734..aa3f64a1c5 100644 --- a/resources/js/clients/payments/stripe-acss.js +++ b/resources/js/clients/payments/stripe-acss.js @@ -8,6 +8,8 @@ * @license https://www.elastic.co/licensing/elastic-license */ +import { instant, wait } from '../wait'; + class ProcessACSS { constructor(key, stripeConnect) { this.key = key; @@ -145,11 +147,16 @@ class ProcessACSS { } } -const publishableKey = document.querySelector( - 'meta[name="stripe-publishable-key"]' -)?.content ?? ''; +function boot() { + const publishableKey = document.querySelector( + 'meta[name="stripe-publishable-key"]' + )?.content ?? ''; + + const stripeConnect = + document.querySelector('meta[name="stripe-account-id"]')?.content ?? ''; + + new ProcessACSS(publishableKey, stripeConnect).setupStripe().handle(); +} -const stripeConnect = - document.querySelector('meta[name="stripe-account-id"]')?.content ?? ''; +instant() ? boot() : wait('#stripe-acss-payment').then(() => boot()); -new ProcessACSS(publishableKey, stripeConnect).setupStripe().handle(); diff --git a/resources/js/clients/payments/stripe-alipay.js b/resources/js/clients/payments/stripe-alipay.js index 9b902a7dee..6a00310fca 100644 --- a/resources/js/clients/payments/stripe-alipay.js +++ b/resources/js/clients/payments/stripe-alipay.js @@ -5,9 +5,11 @@ * * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) * - * @license https://www.elastic.co/licensing/elastic-license + * @license https://www.elastic.co/licensing/elastic-license */ +import { wait, instant } from '../wait'; + class ProcessAlipay { constructor(key, stripeConnect) { this.key = key; @@ -17,57 +19,68 @@ class ProcessAlipay { } setupStripe = () => { + if (this.stripeConnect) { + // this.stripe.stripeAccount = this.stripeConnect; - if (this.stripeConnect){ - // this.stripe.stripeAccount = this.stripeConnect; - - this.stripe = Stripe(this.key, { - stripeAccount: this.stripeConnect, - }); - - } - else { + this.stripe = Stripe(this.key, { + stripeAccount: this.stripeConnect, + }); + } else { this.stripe = Stripe(this.key); } - return this; }; async handle() { + document + .getElementById('pay-now') + .addEventListener('click', async (e) => { + document.getElementById('pay-now').disabled = true; + document + .querySelector('#pay-now > svg') + .classList.add('hidden'); + document + .querySelector('#pay-now > span') + .classList.remove('hidden'); - document.getElementById('pay-now').addEventListener('click', async (e) => { - document.getElementById('pay-now').disabled = true; - document.querySelector('#pay-now > svg').classList.add('hidden'); - document.querySelector('#pay-now > span').classList.remove('hidden'); - - const { error } = await this.stripe.confirmAlipayPayment(document.querySelector('meta[name=ci_intent]').content, { - // Return URL where the customer should be redirected after the authorization - return_url: `${document.querySelector('meta[name=return_url]').content}`, - }); + const { error } = await this.stripe.confirmAlipayPayment( + document.querySelector('meta[name=ci_intent]').content, + { + // Return URL where the customer should be redirected after the authorization + return_url: `${ + document.querySelector('meta[name=return_url]') + .content + }`, + } + ); document.getElementById('pay-now').disabled = false; - document.querySelector('#pay-now > svg').classList.remove('hidden'); - document.querySelector('#pay-now > span').classList.add('hidden'); + document + .querySelector('#pay-now > svg') + .classList.remove('hidden'); + document + .querySelector('#pay-now > span') + .classList.add('hidden'); if (error) { - this.errors.textContent = ''; this.errors.textContent = result.error.message; this.errors.hidden = false; - } }); - } } -const publishableKey = document.querySelector( - 'meta[name="stripe-publishable-key"]' -)?.content ?? ''; +function boot() { + const publishableKey = + document.querySelector('meta[name="stripe-publishable-key"]') + ?.content ?? ''; -const stripeConnect = document.querySelector( - 'meta[name="stripe-account-id"]' -)?.content ?? ''; + const stripeConnect = + document.querySelector('meta[name="stripe-account-id"]')?.content ?? ''; -new ProcessAlipay(publishableKey, stripeConnect).setupStripe().handle(); + new ProcessAlipay(publishableKey, stripeConnect).setupStripe().handle(); +} + +instant() ? boot() : wait('#stripe-alipay-payment').then(() => boot()); diff --git a/resources/js/clients/payments/stripe-applepay.js b/resources/js/clients/payments/stripe-applepay.js new file mode 100644 index 0000000000..9be472625d --- /dev/null +++ b/resources/js/clients/payments/stripe-applepay.js @@ -0,0 +1,144 @@ +/** + * Invoice Ninja (https://invoiceninja.com). + * + * @link https://github.com/invoiceninja/invoiceninja source repository + * + * @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com) + * + * @license https://www.elastic.co/licensing/elastic-license + */ + +import { instant, wait } from '../wait'; + +/** + * @typedef {Object} ApplePayOptions + * @property {string} publishable_key + * @property {string|null} account_id + * @property {string} country + * @property {string} currency + * @property {string} total_label + * @property {string} total_amount + * @property {string} client_secret + */ + +function boot() { + applePay({ + publishable_key: document.querySelector( + 'meta[name="stripe-publishable-key"]' + )?.content, + account_id: + document.querySelector('meta[name="stripe-account-id"]')?.content ?? + null, + country: document.querySelector('meta[name="stripe-country"]')?.content, + currency: document.querySelector('meta[name="stripe-currency"]') + ?.content, + total_label: document.querySelector('meta[name="stripe-total-label"]') + ?.content, + total_amount: document.querySelector('meta[name="stripe-total-amount"]') + ?.content, + client_secret: document.querySelector( + 'meta[name="stripe-client-secret"]' + )?.content, + }); +} + +instant() ? boot() : wait('#stripe-applepay-payment').then(() => boot()); + +/** + * @param {ApplePayOptions} options + */ +function applePay(options) { + let $options = { + apiVersion: '2018-05-21', + }; + + if (options.account_id) { + $options.stripeAccount = options.account_id; + } + + const stripe = Stripe(options.publishable_key, $options); + + const paymentRequest = stripe.paymentRequest({ + country: options.country, + currency: options.currency, + total: { + label: options.total_label, + amount: options.total_amount, + }, + requestPayerName: true, + requestPayerEmail: true, + }); + + const elements = stripe.elements(); + const prButton = elements.create('paymentRequestButton', { + paymentRequest: paymentRequest, + }); + + // Check the availability of the Payment Request API first. + paymentRequest.canMakePayment().then(function (result) { + if (result) { + prButton.mount('#payment-request-button'); + } else { + document.getElementById('payment-request-button').style.display = + 'none'; + } + }); + + paymentRequest.on('paymentmethod', function (ev) { + // Confirm the PaymentIntent without handling potential next actions (yet). + stripe + .confirmCardPayment( + options.client_secret, + { payment_method: ev.paymentMethod.id }, + { handleActions: false } + ) + .then(function (confirmResult) { + if (confirmResult.error) { + // Report to the browser that the payment failed, prompting it to + // re-show the payment interface, or show an error message and close + // the payment interface. + ev.complete('fail'); + } else { + // Report to the browser that the confirmation was successful, prompting + // it to close the browser payment method collection interface. + ev.complete('success'); + // Check if the PaymentIntent requires any actions and if so let Stripe.js + // handle the flow. If using an API version older than "2019-02-11" + // instead check for: `paymentIntent.status === "requires_source_action"`. + if ( + confirmResult.paymentIntent.status === 'requires_action' + ) { + // Let Stripe.js handle the rest of the payment flow. + stripe + .confirmCardPayment(clientSecret) + .then(function (result) { + if (result.error) { + // The payment failed -- ask your customer for a new payment method. + handleFailure(result.error); + } else { + // The payment has succeeded. + handleSuccess(result); + } + }); + } else { + // The payment has succeeded. + } + } + }); + }); + + function handleSuccess(result) { + document.querySelector('input[name="gateway_response"]').value = + JSON.stringify(result.paymentIntent); + + document.getElementById('server-response').submit(); + } + + function handleFailure(message) { + let errors = document.getElementById('errors'); + + errors.textContent = ''; + errors.textContent = message; + errors.hidden = false; + } +} diff --git a/resources/js/clients/payments/stripe-bacs.js b/resources/js/clients/payments/stripe-bacs.js index a67c9057c5..22add89810 100644 --- a/resources/js/clients/payments/stripe-bacs.js +++ b/resources/js/clients/payments/stripe-bacs.js @@ -8,6 +8,8 @@ * @license https://www.elastic.co/licensing/elastic-license */ +import { instant, wait } from '../wait'; + class ProcessBACS { constructor(key, stripeConnect) { this.key = key; @@ -75,13 +77,17 @@ class ProcessBACS { } } -const publishableKey = document.querySelector( - 'meta[name="stripe-publishable-key"]' -)?.content ?? ''; +function boot() { + const publishableKey = document.querySelector( + 'meta[name="stripe-publishable-key"]' + )?.content ?? ''; + + const stripeConnect = + document.querySelector('meta[name="stripe-account-id"]')?.content ?? ''; + const onlyAuthorization = + document.querySelector('meta[name="only-authorization"]')?.content ?? ''; + + new ProcessBACS(publishableKey, stripeConnect).setupStripe().handle(); +} -const stripeConnect = - document.querySelector('meta[name="stripe-account-id"]')?.content ?? ''; -const onlyAuthorization = - document.querySelector('meta[name="only-authorization"]')?.content ?? ''; - -new ProcessBACS(publishableKey, stripeConnect).setupStripe().handle(); +instant() ? boot() : wait('#stripe-bacs-payment').then(() => boot()); diff --git a/resources/js/clients/payments/stripe-bancontact.js b/resources/js/clients/payments/stripe-bancontact.js index 35860607b7..46b4409b1b 100644 --- a/resources/js/clients/payments/stripe-bancontact.js +++ b/resources/js/clients/payments/stripe-bancontact.js @@ -8,6 +8,8 @@ * @license https://www.elastic.co/licensing/elastic-license */ +import { wait, instant } from '../wait'; + class ProcessBANCONTACTPay { constructor(key, stripeConnect) { this.key = key; @@ -63,11 +65,15 @@ class ProcessBANCONTACTPay { }; } -const publishableKey = document.querySelector( - 'meta[name="stripe-publishable-key"]' -)?.content ?? ''; +function boot() { + const publishableKey = document.querySelector( + 'meta[name="stripe-publishable-key"]' + )?.content ?? ''; + + const stripeConnect = + document.querySelector('meta[name="stripe-account-id"]')?.content ?? ''; + + new ProcessBANCONTACTPay(publishableKey, stripeConnect).setupStripe().handle(); +} -const stripeConnect = - document.querySelector('meta[name="stripe-account-id"]')?.content ?? ''; - -new ProcessBANCONTACTPay(publishableKey, stripeConnect).setupStripe().handle(); +instant() ? boot() : wait('#stripe-bancontact-payment').then(() => boot()); diff --git a/resources/js/clients/payments/stripe-bank-transfer.js b/resources/js/clients/payments/stripe-bank-transfer.js new file mode 100644 index 0000000000..99a1015f17 --- /dev/null +++ b/resources/js/clients/payments/stripe-bank-transfer.js @@ -0,0 +1,76 @@ +/** + * Invoice Ninja (https://invoiceninja.com). + * + * @link https://github.com/invoiceninja/invoiceninja source repository + * + * @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com) + * + * @license https://www.elastic.co/licensing/elastic-license + */ + +import { wait, instant } from '../wait'; + +instant() ? bankTransfer() : wait('#stripe-bank-transfer-payment').then(() => bankTransfer()); + +function bankTransfer() { + const secret = document.querySelector('meta[name="stripe-client-secret"]')?.content; + const return_url = document.querySelector('meta[name="stripe-return-url"]')?.content; + + const options = { + clientSecret: secret, + appearance: { + theme: 'stripe', + variables: { + colorPrimary: '#0570de', + colorBackground: '#ffffff', + colorText: '#30313d', + colorDanger: '#df1b41', + fontFamily: 'Ideal Sans, system-ui, sans-serif', + spacingUnit: '2px', + borderRadius: '4px', + // See all possible variables below + }, + }, + }; + + const stripe = Stripe( + document + .querySelector('meta[name="stripe-publishable-key"]') + .getAttribute('content') + ); + const stripeConnect = + document.querySelector('meta[name="stripe-account-id"]')?.content ?? ''; + + if (stripeConnect) stripe.stripeAccount = stripeConnect; + + // Set up Stripe.js and Elements to use in checkout form, passing the client secret obtained in step 3 + const elements = stripe.elements(options); + // Create and mount the Payment Element + const paymentElement = elements.create('payment'); + paymentElement.mount('#payment-element'); + + const form = document.getElementById('payment-form'); + + form.addEventListener('submit', async (event) => { + event.preventDefault(); + + document.getElementById('pay-now').disabled = true; + document.querySelector('#pay-now > svg').classList.add('hidden'); + document.querySelector('#pay-now > span').classList.remove('hidden'); + + const { error } = await stripe.confirmPayment({ + elements, + confirmParams: { + return_url, + }, + }); + + if (error) { + document.getElementById('pay-now').disabled = false; + document.querySelector('svg').classList.remove('hidden'); + document.querySelector('span').classList.add('hidden'); + const messageContainer = document.querySelector('#errors'); + messageContainer.textContent = error.message; + } + }); +} diff --git a/resources/js/clients/payments/stripe-becs.js b/resources/js/clients/payments/stripe-becs.js index 61544ccf53..6fe41a3d05 100644 --- a/resources/js/clients/payments/stripe-becs.js +++ b/resources/js/clients/payments/stripe-becs.js @@ -8,6 +8,8 @@ * @license https://www.elastic.co/licensing/elastic-license */ +import { wait, instant } from '../wait'; + class ProcessBECS { constructor(key, stripeConnect) { this.key = key; @@ -135,11 +137,15 @@ class ProcessBECS { } } -const publishableKey = document.querySelector( - 'meta[name="stripe-publishable-key"]' -)?.content ?? ''; +function boot() { + const publishableKey = document.querySelector( + 'meta[name="stripe-publishable-key"]' + )?.content ?? ''; + + const stripeConnect = + document.querySelector('meta[name="stripe-account-id"]')?.content ?? ''; + + new ProcessBECS(publishableKey, stripeConnect).setupStripe().handle(); +} -const stripeConnect = - document.querySelector('meta[name="stripe-account-id"]')?.content ?? ''; - -new ProcessBECS(publishableKey, stripeConnect).setupStripe().handle(); +instant() ? boot() : wait('#stripe-becs-payment').then(() => boot()); diff --git a/resources/js/clients/payments/stripe-browserpay.js b/resources/js/clients/payments/stripe-browserpay.js index dff741ddc6..2ed4675c8c 100644 --- a/resources/js/clients/payments/stripe-browserpay.js +++ b/resources/js/clients/payments/stripe-browserpay.js @@ -8,6 +8,8 @@ * @license https://www.elastic.co/licensing/elastic-license */ +import { wait, instant } from '../wait'; + class StripeBrowserPay { constructor() { this.clientSecret = document.querySelector( @@ -142,4 +144,8 @@ class StripeBrowserPay { } } -new StripeBrowserPay().handle(); +function boot() { + new StripeBrowserPay().handle() +} + +instant() ? boot() : wait('#stripe-browserpay-payment').then(() => boot()) diff --git a/resources/js/clients/payments/stripe-credit-card.js b/resources/js/clients/payments/stripe-credit-card.js index f35d20dcbd..eb60acde54 100644 --- a/resources/js/clients/payments/stripe-credit-card.js +++ b/resources/js/clients/payments/stripe-credit-card.js @@ -5,9 +5,11 @@ * * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) * - * @license https://www.elastic.co/licensing/elastic-license + * @license https://www.elastic.co/licensing/elastic-license */ +import { wait, instant } from '../wait'; + class StripeCreditCard { constructor(key, secret, onlyAuthorization, stripeConnect) { this.key = key; @@ -17,18 +19,14 @@ class StripeCreditCard { } setupStripe() { - - if (this.stripeConnect){ - - this.stripe = Stripe(this.key, { - stripeAccount: this.stripeConnect, - }); - - } - else { + if (this.stripeConnect) { + this.stripe = Stripe(this.key, { + stripeAccount: this.stripeConnect, + }); + } else { this.stripe = Stripe(this.key); } - + this.elements = this.stripe.elements(); return this; @@ -36,9 +34,13 @@ class StripeCreditCard { createElement() { this.cardElement = this.elements.create('card', { - hidePostalCode: document.querySelector('meta[name=stripe-require-postal-code]')?.content === "0", + hidePostalCode: + document.querySelector('meta[name=stripe-require-postal-code]') + ?.content === '0', value: { - postalCode: document.querySelector('meta[name=client-postal-code]').content, + postalCode: document.querySelector( + 'meta[name=client-postal-code]' + ).content, }, hideIcon: false, }); @@ -90,7 +92,7 @@ class StripeCreditCard { this.stripe .handleCardPayment(this.secret, this.cardElement, { payment_method_data: { - billing_details: {name: cardHolderName.value}, + billing_details: { name: cardHolderName.value }, }, }) .then((result) => { @@ -103,9 +105,8 @@ class StripeCreditCard { } handleSuccess(result) { - document.querySelector( - 'input[name="gateway_response"]' - ).value = JSON.stringify(result.paymentIntent); + document.querySelector('input[name="gateway_response"]').value = + JSON.stringify(result.paymentIntent); let tokenBillingCheckbox = document.querySelector( 'input[name="token-billing-checkbox"]:checked' @@ -145,7 +146,7 @@ class StripeCreditCard { this.stripe .handleCardSetup(this.secret, this.cardElement, { payment_method_data: { - billing_details: {name: cardHolderName.value}, + billing_details: { name: cardHolderName.value }, }, }) .then((result) => { @@ -177,63 +178,76 @@ class StripeCreditCard { return this.handleAuthorization(); }); } else { - Array - .from(document.getElementsByClassName('toggle-payment-with-token')) - .forEach((element) => element.addEventListener('click', (element) => { - document.getElementById('stripe--payment-container').classList.add('hidden'); - document.getElementById('save-card--container').style.display = 'none'; - document.querySelector('input[name=token]').value = element.target.dataset.token; - })); + Array.from( + document.getElementsByClassName('toggle-payment-with-token') + ).forEach((element) => + element.addEventListener('click', (element) => { + document + .getElementById('stripe--payment-container') + .classList.add('hidden'); + document.getElementById( + 'save-card--container' + ).style.display = 'none'; + document.querySelector('input[name=token]').value = + element.target.dataset.token; + }) + ); document .getElementById('toggle-payment-with-credit-card') .addEventListener('click', (element) => { - document.getElementById('stripe--payment-container').classList.remove('hidden'); - document.getElementById('save-card--container').style.display = 'grid'; - document.querySelector('input[name=token]').value = ""; + document + .getElementById('stripe--payment-container') + .classList.remove('hidden'); + document.getElementById( + 'save-card--container' + ).style.display = 'grid'; + document.querySelector('input[name=token]').value = ''; }); this.createElement().mountCardElement(); - document - .getElementById('pay-now') - .addEventListener('click', () => { - + document.getElementById('pay-now').addEventListener('click', () => { try { - let tokenInput = document.querySelector('input[name=token]'); + let tokenInput = + document.querySelector('input[name=token]'); if (tokenInput.value) { return this.completePaymentUsingToken(); } return this.completePaymentWithoutToken(); - }catch(error){ + } catch (error) { console.log(error.message); } - - }); + }); } } } -const publishableKey = - document.querySelector('meta[name="stripe-publishable-key"]')?.content ?? ''; +function boot() { + const publishableKey = + document.querySelector('meta[name="stripe-publishable-key"]') + ?.content ?? ''; -const secret = - document.querySelector('meta[name="stripe-secret"]')?.content ?? ''; + const secret = + document.querySelector('meta[name="stripe-secret"]')?.content ?? ''; -const onlyAuthorization = - document.querySelector('meta[name="only-authorization"]')?.content ?? ''; + const onlyAuthorization = + document.querySelector('meta[name="only-authorization"]')?.content ?? + ''; -const stripeConnect = - document.querySelector('meta[name="stripe-account-id"]')?.content ?? ''; + const stripeConnect = + document.querySelector('meta[name="stripe-account-id"]')?.content ?? ''; -let s = new StripeCreditCard(publishableKey, secret, onlyAuthorization, stripeConnect); + let s = new StripeCreditCard( + publishableKey, + secret, + onlyAuthorization, + stripeConnect + ); -s.handle(); + s.handle(); +} -document.addEventListener('livewire:init', () => { - -Livewire.on('passed-required-fields-check', () => s.handle()); - -}); \ No newline at end of file +instant() ? boot() : wait('#stripe-credit-card-payment').then(() => boot()); diff --git a/resources/js/clients/payments/stripe-eps.js b/resources/js/clients/payments/stripe-eps.js index 2ae980bc32..d1e9ecf6ea 100644 --- a/resources/js/clients/payments/stripe-eps.js +++ b/resources/js/clients/payments/stripe-eps.js @@ -8,6 +8,8 @@ * @license https://www.elastic.co/licensing/elastic-license */ +import { wait, instant } from '../wait'; + class ProcessEPSPay { constructor(key, stripeConnect) { this.key = key; @@ -80,11 +82,15 @@ class ProcessEPSPay { }; } -const publishableKey = document.querySelector( - 'meta[name="stripe-publishable-key"]' -)?.content ?? ''; +function boot() { + const publishableKey = document.querySelector( + 'meta[name="stripe-publishable-key"]' + )?.content ?? ''; + + const stripeConnect = + document.querySelector('meta[name="stripe-account-id"]')?.content ?? ''; + + new ProcessEPSPay(publishableKey, stripeConnect).setupStripe().handle(); +} -const stripeConnect = - document.querySelector('meta[name="stripe-account-id"]')?.content ?? ''; - -new ProcessEPSPay(publishableKey, stripeConnect).setupStripe().handle(); +instant() ? boot() : wait('#stripe-eps-payment').then(() => boot()); diff --git a/resources/js/clients/payments/stripe-fpx.js b/resources/js/clients/payments/stripe-fpx.js index 45db81feea..d493d999d0 100644 --- a/resources/js/clients/payments/stripe-fpx.js +++ b/resources/js/clients/payments/stripe-fpx.js @@ -8,6 +8,8 @@ * @license https://www.elastic.co/licensing/elastic-license */ +import { wait, instant } from '../wait'; + class ProcessFPXPay { constructor(key, stripeConnect) { this.key = key; @@ -81,13 +83,15 @@ class ProcessFPXPay { } } +function boot() { + const publishableKey = document.querySelector( + 'meta[name="stripe-publishable-key"]' + )?.content ?? ''; + + const stripeConnect = + document.querySelector('meta[name="stripe-account-id"]')?.content ?? ''; + + new ProcessFPXPay(publishableKey, stripeConnect).setupStripe().handle(); +} - -const publishableKey = document.querySelector( - 'meta[name="stripe-publishable-key"]' -)?.content ?? ''; - -const stripeConnect = - document.querySelector('meta[name="stripe-account-id"]')?.content ?? ''; - -new ProcessFPXPay(publishableKey, stripeConnect).setupStripe().handle(); +instant() ? boot() : wait('#stripe-fpx-payment').then(() => boot()); diff --git a/resources/js/clients/payments/stripe-giropay.js b/resources/js/clients/payments/stripe-giropay.js index 1a3903e957..ed36de0a22 100644 --- a/resources/js/clients/payments/stripe-giropay.js +++ b/resources/js/clients/payments/stripe-giropay.js @@ -8,6 +8,8 @@ * @license https://www.elastic.co/licensing/elastic-license */ +import { wait, instant } from '../wait'; + class ProcessGiroPay { constructor(key, stripeConnect) { this.key = key; @@ -64,11 +66,15 @@ class ProcessGiroPay { }; } -const publishableKey = document.querySelector( - 'meta[name="stripe-publishable-key"]' -)?.content ?? ''; +function boot() { + const publishableKey = document.querySelector( + 'meta[name="stripe-publishable-key"]' + )?.content ?? ''; + + const stripeConnect = + document.querySelector('meta[name="stripe-account-id"]')?.content ?? ''; + + new ProcessGiroPay(publishableKey, stripeConnect).setupStripe().handle(); +} -const stripeConnect = - document.querySelector('meta[name="stripe-account-id"]')?.content ?? ''; - -new ProcessGiroPay(publishableKey, stripeConnect).setupStripe().handle(); +instant() ? boot() : wait('#stripe-giropay-payment').then(() => boot()); diff --git a/resources/js/clients/payments/stripe-ideal.js b/resources/js/clients/payments/stripe-ideal.js index db397cb1e1..4073f31a09 100644 --- a/resources/js/clients/payments/stripe-ideal.js +++ b/resources/js/clients/payments/stripe-ideal.js @@ -8,6 +8,8 @@ * @license https://www.elastic.co/licensing/elastic-license */ +import { wait, instant } from '../wait'; + class ProcessIDEALPay { constructor(key, stripeConnect) { this.key = key; @@ -81,11 +83,15 @@ class ProcessIDEALPay { }; } -const publishableKey = document.querySelector( - 'meta[name="stripe-publishable-key"]' -)?.content ?? ''; +function boot() { + const publishableKey = document.querySelector( + 'meta[name="stripe-publishable-key"]' + )?.content ?? ''; + + const stripeConnect = + document.querySelector('meta[name="stripe-account-id"]')?.content ?? ''; + + new ProcessIDEALPay(publishableKey, stripeConnect).setupStripe().handle(); +} -const stripeConnect = - document.querySelector('meta[name="stripe-account-id"]')?.content ?? ''; - -new ProcessIDEALPay(publishableKey, stripeConnect).setupStripe().handle(); +instant() ? boot() : wait('#stripe-ideal-payment').then(() => boot()); diff --git a/resources/js/clients/payments/stripe-klarna.js b/resources/js/clients/payments/stripe-klarna.js index cebbb6e42f..412e166560 100644 --- a/resources/js/clients/payments/stripe-klarna.js +++ b/resources/js/clients/payments/stripe-klarna.js @@ -8,6 +8,8 @@ * @license https://www.elastic.co/licensing/elastic-license */ +import { wait, instant } from '../wait'; + class ProcessKlarna { constructor(key, stripeConnect) { this.key = key; @@ -91,11 +93,15 @@ class ProcessKlarna { }; } -const publishableKey = document.querySelector( - 'meta[name="stripe-publishable-key"]' -)?.content ?? ''; +function boot() { + const publishableKey = document.querySelector( + 'meta[name="stripe-publishable-key"]' + )?.content ?? ''; + + const stripeConnect = + document.querySelector('meta[name="stripe-account-id"]')?.content ?? ''; + + new ProcessKlarna(publishableKey, stripeConnect).setupStripe().handle(); +} -const stripeConnect = - document.querySelector('meta[name="stripe-account-id"]')?.content ?? ''; - -new ProcessKlarna(publishableKey, stripeConnect).setupStripe().handle(); +instant() ? boot() : wait('#stripe-klarna-payment').then(() => boot()); diff --git a/resources/js/clients/payments/stripe-przelewy24.js b/resources/js/clients/payments/stripe-przelewy24.js index 9f990240d0..7564b6fa0d 100644 --- a/resources/js/clients/payments/stripe-przelewy24.js +++ b/resources/js/clients/payments/stripe-przelewy24.js @@ -8,6 +8,8 @@ * @license https://www.elastic.co/licensing/elastic-license */ +import { wait, instant } from '../wait'; + class ProcessPRZELEWY24 { constructor(key, stripeConnect) { this.key = key; @@ -113,11 +115,15 @@ class ProcessPRZELEWY24 { }; } -const publishableKey = document.querySelector( - 'meta[name="stripe-publishable-key"]' -)?.content ?? ''; +function boot() { + const publishableKey = document.querySelector( + 'meta[name="stripe-publishable-key"]' + )?.content ?? ''; + + const stripeConnect = + document.querySelector('meta[name="stripe-account-id"]')?.content ?? ''; + + new ProcessPRZELEWY24(publishableKey, stripeConnect).setupStripe().handle(); +} -const stripeConnect = - document.querySelector('meta[name="stripe-account-id"]')?.content ?? ''; - -new ProcessPRZELEWY24(publishableKey, stripeConnect).setupStripe().handle(); +instant() ? boot() : wait('#stripe-przelewy24-payment').then(() => boot()); diff --git a/resources/js/clients/payments/stripe-sepa.js b/resources/js/clients/payments/stripe-sepa.js index cafcf8e7cc..c421a6937b 100644 --- a/resources/js/clients/payments/stripe-sepa.js +++ b/resources/js/clients/payments/stripe-sepa.js @@ -8,6 +8,8 @@ * @license https://www.elastic.co/licensing/elastic-license */ +import { wait, instant } from '../wait'; + class ProcessSEPA { constructor(key, stripeConnect) { this.key = key; @@ -233,11 +235,15 @@ class ProcessSEPA { } } -const publishableKey = - document.querySelector('meta[name="stripe-publishable-key"]')?.content ?? +function boot() { + const publishableKey = + document.querySelector('meta[name="stripe-publishable-key"]')?.content ?? ''; -const stripeConnect = - document.querySelector('meta[name="stripe-account-id"]')?.content ?? ''; + const stripeConnect = + document.querySelector('meta[name="stripe-account-id"]')?.content ?? ''; -new ProcessSEPA(publishableKey, stripeConnect).setupStripe().handle(); + new ProcessSEPA(publishableKey, stripeConnect).setupStripe().handle(); +} + +instant() ? boot() : wait('#stripe-sepa-payment').then(() => boot()); diff --git a/resources/js/clients/payments/stripe-sofort.js b/resources/js/clients/payments/stripe-sofort.js index 394849697d..2c39c0c4a6 100644 --- a/resources/js/clients/payments/stripe-sofort.js +++ b/resources/js/clients/payments/stripe-sofort.js @@ -8,6 +8,8 @@ * @license https://www.elastic.co/licensing/elastic-license */ +import { wait, instant } from '../wait'; + class ProcessSOFORT { constructor(key, stripeConnect) { this.key = key; @@ -58,11 +60,15 @@ class ProcessSOFORT { }; } -const publishableKey = document.querySelector( - 'meta[name="stripe-publishable-key"]' -)?.content ?? ''; +function boot() { + const publishableKey = document.querySelector( + 'meta[name="stripe-publishable-key"]' + )?.content ?? ''; + + const stripeConnect = + document.querySelector('meta[name="stripe-account-id"]')?.content ?? ''; + + new ProcessSOFORT(publishableKey, stripeConnect).setupStripe().handle(); +} -const stripeConnect = - document.querySelector('meta[name="stripe-account-id"]')?.content ?? ''; - -new ProcessSOFORT(publishableKey, stripeConnect).setupStripe().handle(); +instant() ? boot() : wait('#stripe-sofort-payment').then(() => boot()); diff --git a/resources/js/clients/wait.js b/resources/js/clients/wait.js new file mode 100644 index 0000000000..3be06507ca --- /dev/null +++ b/resources/js/clients/wait.js @@ -0,0 +1,57 @@ +/** + * Invoice Ninja (https://invoiceninja.com). + * + * @link https://github.com/invoiceninja/invoiceninja source repository + * + * @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com) + * + * @license https://www.elastic.co/licensing/elastic-license + */ + +/** + * @param {...string} selectors + */ +export function wait(...selectors) { + return new Promise((resolve) => { + if (!selectors.length) { + resolve([]); + return; + } + + const elements = selectors + .map((selector) => document.querySelector(selector)) + .filter(Boolean); + + if (elements.length === selectors.length) { + resolve(elements); + return; + } + + const observer = new MutationObserver(() => { + const foundElements = selectors + .map((selector) => document.querySelector(selector)) + .filter(Boolean); + + if (foundElements.length === selectors.length) { + observer.disconnect(); + resolve(foundElements); + } + }); + + observer.observe(document.body, { childList: true, subtree: true }); + }); +} + +export function instant() { + const instant = document.querySelector('meta[name="instant-payment"]'); + + if ( + instant && + instant instanceof HTMLMetaElement && + instant.content === 'yes' + ) { + return true; + } + + return false; +} diff --git a/resources/views/portal/ninja2020/components/livewire/signature.blade.php b/resources/views/portal/ninja2020/components/livewire/signature.blade.php new file mode 100644 index 0000000000..0a6db6d5b9 --- /dev/null +++ b/resources/views/portal/ninja2020/components/livewire/signature.blade.php @@ -0,0 +1,47 @@ +
+
+

{{ ctrans('texts.sign_here_ux_tip') }}

+ +
+ + +
+
+ + @assets + + @endassets + @script + + @endscript +
\ No newline at end of file diff --git a/resources/views/portal/ninja2020/components/livewire/terms.blade.php b/resources/views/portal/ninja2020/components/livewire/terms.blade.php new file mode 100644 index 0000000000..d79305195c --- /dev/null +++ b/resources/views/portal/ninja2020/components/livewire/terms.blade.php @@ -0,0 +1,35 @@ +
+
+

{{ ctrans('texts.terms') }}

+
+
+

{{ ctrans('texts.invoice') }} {{ $invoice->number }}:

+ @if($variables && $invoice->terms) +
{!! $invoice->parseHtmlVariables('terms', $variables) !!}
+ @elseif($invoice->terms) +
{!! $invoice->terms !!}
+ @else + {{ ctrans('texts.not_specified') }} + @endif +
+
+
+ +
+
+ + @script + + @endscript + +
\ No newline at end of file diff --git a/resources/views/portal/ninja2020/flow2/invoice-pay.blade.php b/resources/views/portal/ninja2020/flow2/invoice-pay.blade.php new file mode 100644 index 0000000000..728a295f2d --- /dev/null +++ b/resources/views/portal/ninja2020/flow2/invoice-pay.blade.php @@ -0,0 +1,9 @@ +
+
+ @livewire('flow2.invoice-summary') +
+ +
+ @livewire($this->component, [], key($this->componentUniqueId())) +
+
diff --git a/resources/views/portal/ninja2020/flow2/invoices-summary.blade.php b/resources/views/portal/ninja2020/flow2/invoices-summary.blade.php new file mode 100644 index 0000000000..d5c9cde79a --- /dev/null +++ b/resources/views/portal/ninja2020/flow2/invoices-summary.blade.php @@ -0,0 +1,71 @@ +
+
+
+
+

+ {{ ctrans('texts.invoices') }} + +

+
+
+ +
+ @foreach($invoices as $invoice) +
+
{{ ctrans('texts.invoice') }} {{ $invoice->number }}
+
+
+
{{ ctrans('texts.invoice_date') }}
+
{{ $invoice->translateDate($invoice->date, $invoice->client->date_format(), $invoice->client->locale()) }}
+
+ @if($invoice->due_date) +
+
{{ ctrans('texts.due_date') }}
+
{{ $invoice->translateDate($invoice->due_date, $invoice->client->date_format(), $invoice->client->locale()) }}
+
+ @endif +
+
{{ ctrans('texts.amount_due') }}
+
+ {{ $invoice->client->currency()->code }} ({{ $invoice->client->currency()->symbol }}) + {{ $invoice->partial > 0 ? $invoice->partial : $invoice->balance }} +
+
+
+
+ @endforeach + +
+
+
{{ ctrans('texts.client_information') }}
+
+
+
{{ ctrans('texts.client') }}
+
{{ $client->present()->name() }}
+
+
+
{{ ctrans('texts.email') }}
+
{{ $client->present()->email() }}
+
+ @if($client->present()->phone()) +
+
{{ ctrans('texts.phone') }}
+
{{ $client->present()->phone() }}
+
+ @endif +
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file diff --git a/resources/views/portal/ninja2020/flow2/payment-method.blade.php b/resources/views/portal/ninja2020/flow2/payment-method.blade.php new file mode 100644 index 0000000000..a1b8ecb2eb --- /dev/null +++ b/resources/views/portal/ninja2020/flow2/payment-method.blade.php @@ -0,0 +1,65 @@ +
+ +

{{ ctrans('texts.payment_methods') }} +

+ + + + + + + + @unless($isLoading) +
+ @foreach($methods as $index => $method) + + @endforeach +
+ @endunless + + @script + + @endscript +
\ No newline at end of file diff --git a/resources/views/portal/ninja2020/flow2/required-fields.blade.php b/resources/views/portal/ninja2020/flow2/required-fields.blade.php new file mode 100644 index 0000000000..30b06e8935 --- /dev/null +++ b/resources/views/portal/ninja2020/flow2/required-fields.blade.php @@ -0,0 +1,61 @@ +
+ +

+ {{ ctrans('texts.required_fields') }} +

+ + @if($is_loading) + + + + + + @else +
+ @foreach($fields as $field) + @component('portal.ninja2020.components.general.card-element', ['title' => $field['label']]) + @if($field['name'] == 'client_country_id' || $field['name'] == 'client_shipping_country_id') + + @else + + @endif + + @if(count($errors) && array_key_exists($field['name'], $errors)) +

+ {{ $errors[$field['name']][0] }} +

+ @endif + @endcomponent + + @endforeach + +
+ + + + + + + +
+
+ @endif +
\ No newline at end of file diff --git a/resources/views/portal/ninja2020/flow2/under-over-payments.blade.php b/resources/views/portal/ninja2020/flow2/under-over-payments.blade.php new file mode 100644 index 0000000000..45bd3cc76e --- /dev/null +++ b/resources/views/portal/ninja2020/flow2/under-over-payments.blade.php @@ -0,0 +1,45 @@ +
+ +

+ {{ ctrans('texts.payment_amount') }} +

+ +
+ + + + + @if($settings->client_portal_allow_under_payment) + {{ ctrans('texts.minimum_payment') }}: + {{ $settings->client_portal_under_payment_minimum }} + @endif +
+ +
+ + + + + + + +
+
\ No newline at end of file diff --git a/resources/views/portal/ninja2020/gateways/authorize/credit_card/pay.blade.php b/resources/views/portal/ninja2020/gateways/authorize/credit_card/pay.blade.php index cf5b098168..4adcdff529 100644 --- a/resources/views/portal/ninja2020/gateways/authorize/credit_card/pay.blade.php +++ b/resources/views/portal/ninja2020/gateways/authorize/credit_card/pay.blade.php @@ -3,6 +3,7 @@ @section('gateway_head') + diff --git a/resources/views/portal/ninja2020/gateways/authorize/credit_card/pay_livewire.blade.php b/resources/views/portal/ninja2020/gateways/authorize/credit_card/pay_livewire.blade.php new file mode 100644 index 0000000000..d591a0561e --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/authorize/credit_card/pay_livewire.blade.php @@ -0,0 +1,67 @@ +
+ + + + +
+ @csrf + + + + + + + + + +
+ + + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.payment_type')]) + {{ ctrans('texts.credit_card') }} + @endcomponent + + @include('portal.ninja2020.gateways.includes.payment_details') + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.pay_with')]) + @if(count($tokens) > 0) + @foreach($tokens as $token) + + @endforeach + @endisset + + + @endcomponent + + @include('portal.ninja2020.gateways.includes.save_card') + + @include('portal.ninja2020.gateways.authorize.includes.credit_card') + @include('portal.ninja2020.gateways.includes.pay_now') +
+ +@assets + @if($gateway->company_gateway->getConfigField('testMode')) + + @else + + @endif + + @vite('resources/js/clients/payments/authorize-credit-card-payment.js') +@endassets diff --git a/resources/views/portal/ninja2020/gateways/authorize/includes/credit_card.blade.php b/resources/views/portal/ninja2020/gateways/authorize/includes/credit_card.blade.php index db384defa3..db02d0d776 100644 --- a/resources/views/portal/ninja2020/gateways/authorize/includes/credit_card.blade.php +++ b/resources/views/portal/ninja2020/gateways/authorize/includes/credit_card.blade.php @@ -1,11 +1,13 @@
-
- - - - - +
+ + +
+ + +
diff --git a/resources/views/portal/ninja2020/gateways/braintree/ach/pay_livewire.blade.php b/resources/views/portal/ninja2020/gateways/braintree/ach/pay_livewire.blade.php new file mode 100644 index 0000000000..02ffa679e5 --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/braintree/ach/pay_livewire.blade.php @@ -0,0 +1,58 @@ +
+ @if(count($tokens) > 0) + + + @include('portal.ninja2020.gateways.includes.payment_details') + +
+ @csrf + + + + + + +
+ + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.pay_with')]) + @if(count($tokens) > 0) + @foreach($tokens as $token) + + @endforeach + @endisset + @endcomponent + + @include('portal.ninja2020.gateways.includes.pay_now') + + @else + @component('portal.ninja2020.components.general.card-element-single', ['title' => 'ACH', 'show_title' => false]) + {{ ctrans('texts.bank_account_not_linked') }} + {{ ctrans('texts.add_payment_method') }} + @endcomponent + @endif +
+ +@script + +@endscript diff --git a/resources/views/portal/ninja2020/gateways/braintree/credit_card/pay.blade.php b/resources/views/portal/ninja2020/gateways/braintree/credit_card/pay.blade.php index e9f1c44f9b..771a5f3e55 100644 --- a/resources/views/portal/ninja2020/gateways/braintree/credit_card/pay.blade.php +++ b/resources/views/portal/ninja2020/gateways/braintree/credit_card/pay.blade.php @@ -2,6 +2,7 @@ @section('gateway_head') + {{-- --}} diff --git a/resources/views/portal/ninja2020/gateways/braintree/credit_card/pay_livewire.blade.php b/resources/views/portal/ninja2020/gateways/braintree/credit_card/pay_livewire.blade.php new file mode 100644 index 0000000000..962a4f4a1e --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/braintree/credit_card/pay_livewire.blade.php @@ -0,0 +1,79 @@ +
+ + + + +
+ @csrf + + + + + + + + + + + +
+ + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.payment_type')]) + {{ ctrans('texts.credit_card') }} + @endcomponent + + @include('portal.ninja2020.gateways.includes.payment_details') + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.pay_with')]) + @if(count($tokens) > 0) + @foreach($tokens as $token) + + @endforeach + @endisset + + + @endcomponent + + @include('portal.ninja2020.gateways.includes.save_card') + + @component('portal.ninja2020.components.general.card-element-single') +
+ @endcomponent + + @include('portal.ninja2020.gateways.includes.pay_now') + @include('portal.ninja2020.gateways.includes.pay_now', ['id' => 'pay-now-with-token', 'class' => 'hidden']) + +
+
+ +@assets + + {{-- + --}} + + + + + + @vite('resources/js/clients/payments/braintree-credit-card.js') +@endassets diff --git a/resources/views/portal/ninja2020/gateways/braintree/paypal/pay.blade.php b/resources/views/portal/ninja2020/gateways/braintree/paypal/pay.blade.php index b405cebafe..bbc1b6b039 100644 --- a/resources/views/portal/ninja2020/gateways/braintree/paypal/pay.blade.php +++ b/resources/views/portal/ninja2020/gateways/braintree/paypal/pay.blade.php @@ -2,6 +2,7 @@ @section('gateway_head') + diff --git a/resources/views/portal/ninja2020/gateways/braintree/paypal/pay_livewire.blade.php b/resources/views/portal/ninja2020/gateways/braintree/paypal/pay_livewire.blade.php new file mode 100644 index 0000000000..ac4ac9690c --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/braintree/paypal/pay_livewire.blade.php @@ -0,0 +1,67 @@ +
+ + + +
+ @csrf + + + + + + + + + +
+ + + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.payment_type')]) + {{ ctrans('texts.paypal') }} + @endcomponent + + @include('portal.ninja2020.gateways.includes.payment_details') + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.pay_with')]) + @if(count($tokens) > 0) + @foreach($tokens as $token) + + @endforeach + @endisset + + + @endcomponent + + @include('portal.ninja2020.gateways.includes.save_card') + + @component('portal.ninja2020.components.general.card-element-single') +
+ @endcomponent + + @include('portal.ninja2020.gateways.includes.pay_now', ['id' => 'pay-now-with-token', 'class' => 'hidden']) +
+ +@assets + + + + +@vite('resources/js/clients/payments/braintree-paypal.js') +@endassets \ No newline at end of file diff --git a/resources/views/portal/ninja2020/gateways/btcpay/pay_livewire.blade.php b/resources/views/portal/ninja2020/gateways/btcpay/pay_livewire.blade.php new file mode 100644 index 0000000000..ec3194be42 --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/btcpay/pay_livewire.blade.php @@ -0,0 +1,27 @@ +
+ + + @include('portal.ninja2020.gateways.includes.payment_details') + +
+ @csrf + + + + + + + +
+ + @include('portal.ninja2020.gateways.includes.pay_now') +
+ +@script + +@endscript diff --git a/resources/views/portal/ninja2020/gateways/checkout/credit_card/pay_livewire.blade.php b/resources/views/portal/ninja2020/gateways/checkout/credit_card/pay_livewire.blade.php new file mode 100644 index 0000000000..1276e501ac --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/checkout/credit_card/pay_livewire.blade.php @@ -0,0 +1,78 @@ +
+ + + + + + + @include('portal.ninja2020.gateways.checkout.credit_card.includes.styles') + +
+ @csrf + + + + + + + + + + + +
+ + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.payment_type')]) + {{ ctrans('texts.credit_card') }} (Checkout.com) + @endcomponent + + @include('portal.ninja2020.gateways.includes.payment_details') + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.pay_with')]) + @if(count($tokens) > 0) + @foreach($tokens as $token) + + @endforeach + @endisset + + + @endcomponent + + @include('portal.ninja2020.gateways.includes.save_card') + + @component('portal.ninja2020.components.general.card-element-single') +
+
+
+
+ +
+ + +
+

+
+
+ @endcomponent + + @component('portal.ninja2020.components.general.card-element-single') + + @endcomponent + + @assets + + @vite('resources/js/clients/payments/checkout-credit-card.js') + @endassets +
\ No newline at end of file diff --git a/resources/views/portal/ninja2020/gateways/eway/pay.blade.php b/resources/views/portal/ninja2020/gateways/eway/pay.blade.php index 3f0cc9c788..98c7805b88 100644 --- a/resources/views/portal/ninja2020/gateways/eway/pay.blade.php +++ b/resources/views/portal/ninja2020/gateways/eway/pay.blade.php @@ -7,6 +7,7 @@ ctrans('texts.credit_card')]) + @endsection @section('gateway_content') diff --git a/resources/views/portal/ninja2020/gateways/eway/pay_livewire.blade.php b/resources/views/portal/ninja2020/gateways/eway/pay_livewire.blade.php new file mode 100644 index 0000000000..0c8b477a6d --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/eway/pay_livewire.blade.php @@ -0,0 +1,59 @@ +
+ + + + + + +
+ @csrf + + + + + + + +
+ + + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.payment_type')]) + {{ ctrans('texts.credit_card') }} + @endcomponent + + @include('portal.ninja2020.gateways.includes.payment_details') + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.pay_with')]) + @if (count($tokens) > 0) + @foreach ($tokens as $token) + + @endforeach + @endisset + + + @endcomponent + + @component('portal.ninja2020.components.general.card-element-single') +
+ @endcomponent + + @include('portal.ninja2020.gateways.includes.save_card') + + @include('portal.ninja2020.gateways.includes.pay_now', ['disabled' => true]) +
+ +@assets + + + @vite('resources/js/clients/payments/eway-credit-card.js') +@endassets diff --git a/resources/views/portal/ninja2020/gateways/forte/ach/pay.blade.php b/resources/views/portal/ninja2020/gateways/forte/ach/pay.blade.php index 8dfab33c42..89d1a308f2 100644 --- a/resources/views/portal/ninja2020/gateways/forte/ach/pay.blade.php +++ b/resources/views/portal/ninja2020/gateways/forte/ach/pay.blade.php @@ -2,6 +2,7 @@ @section('gateway_head') + @endsection @section('gateway_content') diff --git a/resources/views/portal/ninja2020/gateways/forte/ach/pay_livewire.blade.php b/resources/views/portal/ninja2020/gateways/forte/ach/pay_livewire.blade.php new file mode 100644 index 0000000000..5d970b2eb1 --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/forte/ach/pay_livewire.blade.php @@ -0,0 +1,49 @@ +
+ + +
+ @csrf + + + + + + + + + + +
+ +
+ + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.payment_type')]) + Bank Transfer + @endcomponent + + @include('portal.ninja2020.gateways.includes.payment_details') + + @component('portal.ninja2020.components.general.card-element', ['title' => 'Pay with Bank Transfer']) +
+ +
+
+ +
+ @endcomponent + + @include('portal.ninja2020.gateways.includes.pay_now') +
+ +@assets + @if($gateway->company_gateway->getConfigField('testMode')) + + @else + + @endif + + @vite('resources/js/clients/payments/forte-ach-payment.js') +@endassets \ No newline at end of file diff --git a/resources/views/portal/ninja2020/gateways/forte/credit_card/pay.blade.php b/resources/views/portal/ninja2020/gateways/forte/credit_card/pay.blade.php index bb5901a582..9c2c4c6a78 100644 --- a/resources/views/portal/ninja2020/gateways/forte/credit_card/pay.blade.php +++ b/resources/views/portal/ninja2020/gateways/forte/credit_card/pay.blade.php @@ -2,6 +2,8 @@ @section('gateway_head') + + diff --git a/resources/views/portal/ninja2020/gateways/forte/credit_card/pay_livewire.blade.php b/resources/views/portal/ninja2020/gateways/forte/credit_card/pay_livewire.blade.php new file mode 100644 index 0000000000..cff7d20ca4 --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/forte/credit_card/pay_livewire.blade.php @@ -0,0 +1,43 @@ +
+ + +
+ @csrf + + + + + + + + + + + +
+ +
+ + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.payment_type')]) + {{ ctrans('texts.credit_card') }} + @endcomponent + + @include('portal.ninja2020.gateways.includes.payment_details') + + @component('portal.ninja2020.components.general.card-element', ['title' => 'Pay with Credit Card']) + @include('portal.ninja2020.gateways.forte.includes.credit_card') + @endcomponent + + @include('portal.ninja2020.gateways.includes.pay_now') +
+ +@assets + @if($gateway->company_gateway->getConfigField('testMode')) + + @else + + @endif + + @vite('resources/js/clients/payments/forte-credit-card-payment.js') +@endassets diff --git a/resources/views/portal/ninja2020/gateways/forte/includes/credit_card.blade.php b/resources/views/portal/ninja2020/gateways/forte/includes/credit_card.blade.php index b15c333276..fa46d3ca7f 100644 --- a/resources/views/portal/ninja2020/gateways/forte/includes/credit_card.blade.php +++ b/resources/views/portal/ninja2020/gateways/forte/includes/credit_card.blade.php @@ -1,11 +1,13 @@
- - - - - + + +
+ + +
diff --git a/resources/views/portal/ninja2020/gateways/gocardless/ach/pay_livewire.blade.php b/resources/views/portal/ninja2020/gateways/gocardless/ach/pay_livewire.blade.php new file mode 100644 index 0000000000..44253a35ab --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/gocardless/ach/pay_livewire.blade.php @@ -0,0 +1,56 @@ +
+@if (count($tokens) > 0) + + + @include('portal.ninja2020.gateways.includes.payment_details') + +
+ @csrf + + + + + + +
+ + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.pay_with')]) + @if (count($tokens) > 0) + @foreach ($tokens as $token) + + @endforeach + @endisset + @endcomponent + + @else + @component('portal.ninja2020.components.general.card-element-single', ['title' => 'ACH', 'show_title' => false]) + {{ ctrans('texts.bank_account_not_linked') }} + {{ ctrans('texts.add_payment_method') }} + @endcomponent + @endif + + @if (count($tokens) > 0) + @include('portal.ninja2020.gateways.includes.pay_now') + @endif +
+ +@script + +@endscript + diff --git a/resources/views/portal/ninja2020/gateways/gocardless/direct_debit/pay_livewire.blade.php b/resources/views/portal/ninja2020/gateways/gocardless/direct_debit/pay_livewire.blade.php new file mode 100644 index 0000000000..22e6701137 --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/gocardless/direct_debit/pay_livewire.blade.php @@ -0,0 +1,56 @@ +
+@if (count($tokens) > 0) + + + @include('portal.ninja2020.gateways.includes.payment_details') + +
+ @csrf + + + + + + +
+ + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.pay_with')]) + @if (count($tokens) > 0) + @foreach ($tokens as $token) + + @endforeach + @endisset + @endcomponent + + @else + @component('portal.ninja2020.components.general.card-element-single', ['title' => 'Direct Debit', 'show_title' => false]) + {{ ctrans('texts.bank_account_not_linked') }} + + {{ ctrans('texts.add_payment_method') }} + @endcomponent + @endif + + @if (count($tokens) > 0) + @include('portal.ninja2020.gateways.includes.pay_now') + @endif +
+ +@script + +@endscript \ No newline at end of file diff --git a/resources/views/portal/ninja2020/gateways/gocardless/sepa/pay_livewire.blade.php b/resources/views/portal/ninja2020/gateways/gocardless/sepa/pay_livewire.blade.php new file mode 100644 index 0000000000..74e9ab9f1d --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/gocardless/sepa/pay_livewire.blade.php @@ -0,0 +1,56 @@ +
+@if (count($tokens) > 0) + + + @include('portal.ninja2020.gateways.includes.payment_details') + +
+ @csrf + + + + + + +
+ + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.pay_with')]) + @if (count($tokens) > 0) + @foreach ($tokens as $token) + + @endforeach + @endisset + @endcomponent + + @else + @component('portal.ninja2020.components.general.card-element-single', ['title' => ctrans('texts.payment_type_SEPA'), 'show_title' => false]) + {{ ctrans('texts.bank_account_not_linked') }} + + {{ ctrans('texts.add_payment_method') }} + @endcomponent + @endif + + @if (count($tokens) > 0) + @include('portal.ninja2020.gateways.includes.pay_now') + @endif +
+ +@script + +@endscript diff --git a/resources/views/portal/ninja2020/gateways/mollie/credit_card/pay.blade.php b/resources/views/portal/ninja2020/gateways/mollie/credit_card/pay.blade.php index 8939c3b2cd..a380936071 100644 --- a/resources/views/portal/ninja2020/gateways/mollie/credit_card/pay.blade.php +++ b/resources/views/portal/ninja2020/gateways/mollie/credit_card/pay.blade.php @@ -4,6 +4,7 @@ ctrans('texts.credit_card')]) @section('gateway_head') + diff --git a/resources/views/portal/ninja2020/gateways/mollie/credit_card/pay_livewire.blade.php b/resources/views/portal/ninja2020/gateways/mollie/credit_card/pay_livewire.blade.php new file mode 100644 index 0000000000..018fb9908b --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/mollie/credit_card/pay_livewire.blade.php @@ -0,0 +1,87 @@ +
+ + + + + + + + + +
+ @csrf + + + + + + + + +
+ + + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.payment_type')]) + {{ ctrans('texts.credit_card') }} + @endcomponent + + @include('portal.ninja2020.gateways.includes.payment_details') + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.pay_with')]) + @if (count($tokens) > 0) + @foreach ($tokens as $token) + + @endforeach + @endif + + + @endcomponent + + @component('portal.ninja2020.components.general.card-element-single') +
+ + + + +
+ + + +
+
+ @endcomponent + + @include('portal.ninja2020.gateways.includes.save_card') + @include('portal.ninja2020.gateways.includes.pay_now') +
+ +@assets + + @vite('resources/js/clients/payments/mollie-credit-card.js') +@endassets diff --git a/resources/views/portal/ninja2020/gateways/payfast/pay.blade.php b/resources/views/portal/ninja2020/gateways/payfast/pay.blade.php index 742622dff8..73c4089327 100644 --- a/resources/views/portal/ninja2020/gateways/payfast/pay.blade.php +++ b/resources/views/portal/ninja2020/gateways/payfast/pay.blade.php @@ -3,6 +3,7 @@ @section('gateway_head') + @endsection @section('gateway_content') diff --git a/resources/views/portal/ninja2020/gateways/payfast/pay_livewire.blade.php b/resources/views/portal/ninja2020/gateways/payfast/pay_livewire.blade.php new file mode 100644 index 0000000000..0fa33dd8a2 --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/payfast/pay_livewire.blade.php @@ -0,0 +1,65 @@ +
+ + + +
+ + + + + + + + + + + + + + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.method')]) + {{ ctrans('texts.credit_card') }} + @endcomponent + + @include('portal.ninja2020.gateways.includes.payment_details') + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.pay_with')]) + @if(count($tokens) > 0) + @foreach($tokens as $token) + + @endforeach + @endisset + + + @endcomponent + + @include('portal.ninja2020.gateways.includes.save_card') + + @include('portal.ninja2020.gateways.includes.pay_now') + +
+
+ +@script + +@endscript \ No newline at end of file diff --git a/resources/views/portal/ninja2020/gateways/paypal/pay_livewire.blade.php b/resources/views/portal/ninja2020/gateways/paypal/pay_livewire.blade.php new file mode 100644 index 0000000000..cd4fcaecb3 --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/paypal/pay_livewire.blade.php @@ -0,0 +1,196 @@ +
+ + +
+ @csrf + + + + + +
+ + + +
+
+ + + + +
+ +@assets + + +@endassets + +@script + +@endscript \ No newline at end of file diff --git a/resources/views/portal/ninja2020/gateways/paypal/ppcp/card_livewire.blade.php b/resources/views/portal/ninja2020/gateways/paypal/ppcp/card_livewire.blade.php new file mode 100644 index 0000000000..d776c896be --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/paypal/ppcp/card_livewire.blade.php @@ -0,0 +1,378 @@ +@php + $gateway_instance = $gateway instanceof \App\Models\CompanyGateway ? $gateway : $gateway->company_gateway; + $token_billing_string = 'true'; + + if($gateway_instance->token_billing == 'off' || $gateway_instance->token_billing == 'optin'){ + $token_billing_string = 'false'; + } + + if (isset($pre_payment) && $pre_payment == '1' && isset($is_recurring) && $is_recurring == '1') { + $token_billing_string = 'true'; + } +@endphp + +
+ + + +
+ @csrf + + + + + + + +
+ + @include('portal.ninja2020.gateways.includes.payment_details') + + + +
+ + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.pay_with')]) + @if (count($tokens) > 0) + @foreach ($tokens as $token) + + @endforeach + @endisset + + + + @endcomponent + +
+ +
+
+
+
+
+
+ + @include('portal.ninja2020.gateways.includes.save_card') + @include('portal.ninja2020.gateways.includes.pay_now', ['id' => 'pay-now']) +
+ + @include('portal.ninja2020.gateways.includes.pay_now', ['id' => 'pay-now-token']) + + +
+ +@assets + + +@if(isset($merchantId)) + +@else + +@endif + +@endassets + +@script + +@endscript + +@script + +@endscript \ No newline at end of file diff --git a/resources/views/portal/ninja2020/gateways/paypal/ppcp/pay_livewire.blade.php b/resources/views/portal/ninja2020/gateways/paypal/ppcp/pay_livewire.blade.php new file mode 100644 index 0000000000..57e2f2c213 --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/paypal/ppcp/pay_livewire.blade.php @@ -0,0 +1,117 @@ +
+ +
+ @csrf + + + + + +
+ + + +
+ + +
+ +@assets + + +@endassets + +@script + +@endscript \ No newline at end of file diff --git a/resources/views/portal/ninja2020/gateways/paytrace/pay.blade.php b/resources/views/portal/ninja2020/gateways/paytrace/pay.blade.php index 582954aa36..85e8caaf76 100644 --- a/resources/views/portal/ninja2020/gateways/paytrace/pay.blade.php +++ b/resources/views/portal/ninja2020/gateways/paytrace/pay.blade.php @@ -6,6 +6,7 @@ + @endsection @section('gateway_content') diff --git a/resources/views/portal/ninja2020/gateways/paytrace/pay_livewire.blade.php b/resources/views/portal/ninja2020/gateways/paytrace/pay_livewire.blade.php new file mode 100644 index 0000000000..88ad298706 --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/paytrace/pay_livewire.blade.php @@ -0,0 +1,65 @@ +
+ + + + + +
+ @csrf + + + + + + + + +
+ + + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.payment_type')]) + {{ ctrans('texts.credit_card') }} + @endcomponent + + @include('portal.ninja2020.gateways.includes.payment_details') + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.pay_with')]) + @if (count($tokens) > 0) + @foreach ($tokens as $token) + + @endforeach + @endisset + + + @endcomponent + + @include('portal.ninja2020.gateways.includes.save_card') + + @component('portal.ninja2020.components.general.card-element-single') +
+
+
+ @endcomponent + + @include('portal.ninja2020.gateways.includes.pay_now') +
+ +@assets + @if($gateway->company_gateway->getConfigField('testMode')) + + @else + + @endif + + @vite('resources/js/clients/payments/paytrace-credit-card.js') +@endassets diff --git a/resources/views/portal/ninja2020/gateways/razorpay/hosted/pay.blade.php b/resources/views/portal/ninja2020/gateways/razorpay/hosted/pay.blade.php index c5c130ef84..1da5150f4a 100644 --- a/resources/views/portal/ninja2020/gateways/razorpay/hosted/pay.blade.php +++ b/resources/views/portal/ninja2020/gateways/razorpay/hosted/pay.blade.php @@ -3,6 +3,7 @@ ctrans('texts.aio_checkout')]) @section('gateway_head') + @endsection @section('gateway_content') diff --git a/resources/views/portal/ninja2020/gateways/razorpay/hosted/pay_livewire.blade.php b/resources/views/portal/ninja2020/gateways/razorpay/hosted/pay_livewire.blade.php new file mode 100644 index 0000000000..45678634b8 --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/razorpay/hosted/pay_livewire.blade.php @@ -0,0 +1,33 @@ +
+ + +
+ @csrf + + + + + + + + + +
+ + + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.payment_type')]) + {{ ctrans('texts.aio_checkout') }} + @endcomponent + + @include('portal.ninja2020.gateways.includes.payment_details') + + @include('portal.ninja2020.gateways.includes.pay_now') +
+ +@assets + + + @vite('resources/js/clients/payments/razorpay-aio.js') +@endassets diff --git a/resources/views/portal/ninja2020/gateways/square/credit_card/pay.blade.php b/resources/views/portal/ninja2020/gateways/square/credit_card/pay.blade.php index f4841afd72..a5512001be 100644 --- a/resources/views/portal/ninja2020/gateways/square/credit_card/pay.blade.php +++ b/resources/views/portal/ninja2020/gateways/square/credit_card/pay.blade.php @@ -7,6 +7,8 @@ + + + +
+ @csrf + + + + + + + + + + +
+ + + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.payment_type')]) + {{ ctrans('texts.credit_card') }} + @endcomponent + + @include('portal.ninja2020.gateways.includes.payment_details') + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.pay_with')]) +
+
+
+ +
    + @if (count($tokens) > 0) + @foreach($tokens as $token) +
  • + +
  • + @endforeach + @endisset + +
  • + +
  • +
+ + @endcomponent + + @include('portal.ninja2020.gateways.includes.save_card') + + @component('portal.ninja2020.components.general.card-element-single') +
+
+ @endcomponent + + @include('portal.ninja2020.gateways.includes.pay_now') +
+ +@assets + @if ($gateway->company_gateway->getConfigField('testMode')) + + @else + + @endif + + @vite('resources/js/clients/payments/square-credit-card.js') +@endassets diff --git a/resources/views/portal/ninja2020/gateways/stripe/ach/pay_livewire.blade.php b/resources/views/portal/ninja2020/gateways/stripe/ach/pay_livewire.blade.php new file mode 100644 index 0000000000..73fe15639c --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/stripe/ach/pay_livewire.blade.php @@ -0,0 +1,92 @@ +
+ @if($gateway->company_gateway->getConfigField('account_id')) + + + @else + + @endif + + + + + + +
+ @csrf + + + + + + + + + + +
+ + @if(count($tokens) > 0) + @include('portal.ninja2020.gateways.includes.payment_details') + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.pay_with')]) + @if(count($tokens) > 0) +
    + @foreach($tokens as $token) +
  • + +
  • + @endforeach +
+ @endif + @endcomponent + + @include('portal.ninja2020.gateways.includes.pay_now') + + @else + + @component('portal.ninja2020.components.general.card-element-single') + + + @endcomponent + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.account_holder_name')]) + + @endcomponent + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.email')]) + + @endcomponent + +
+
+ Connect a bank account +
+
+ +
+
+ @endif +
+ +@assets + +@vite('resources/js/clients/payments/stripe-ach-pay.js') +@endassets \ No newline at end of file diff --git a/resources/views/portal/ninja2020/gateways/stripe/acss/authorize_livewire.blade.php b/resources/views/portal/ninja2020/gateways/stripe/acss/authorize_livewire.blade.php new file mode 100644 index 0000000000..3dd06e6d1a --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/stripe/acss/authorize_livewire.blade.php @@ -0,0 +1,70 @@ +
+ + @if($company_gateway->getConfigField('account_id')) + + + @else + + @endif + + + + +
+ @csrf + + + + + +
+ + + @component('portal.ninja2020.components.general.card-element-single', ['title' => 'SEPA', 'show_title' => false]) +

By clicking submit, you accept this Agreement and authorize {{ $company->present()->name() }} to debit the + specified bank account for any amount owed for charges arising from the use of services and/or purchase of + products.

+
+

Payments will be debited from the specified account when an invoice becomes due.

+
+

Where a scheduled debit date is not a business day, {{ $company->present()->name() }} will debit on the next + business day.

+
+

You agree that any payments due will be debited from your account immediately upon acceptance of this Agreement + and that confirmation of this Agreement may be sent within 5 (five) days of acceptance of this Agreement. You + further agree to be notified of upcoming debits up to 1 (one) day before payments are collected.

+
+

You have certain recourse rights if any debit does not comply with this agreement. For example, you have the + right to receive reimbursement for any debit that is not authorized or is not consistent with this PAD + Agreement. To obtain more information on your recourse rights, contact your financial institution.

+
+

You may amend or cancel this authorization at any time by providing the merchant with thirty (30) days notice at + {{ $company->owner()->email }}. To obtain a sample cancellation form, or further information on cancelling a PAD + agreement, please contact your financial institution.

+
+

{{ $company->present()->name() }} partners with Stripe to provide payment processing.

+ + +
+ + +
+ + @endcomponent + @component('portal.ninja2020.gateways.includes.pay_now', ['id' => 'authorize-acss']) + {{ ctrans('texts.add_payment_method') }} + @endcomponent +
+ +@assets + +@vite('resources/js/clients/payment_methods/authorize-stripe-acss.js') +@endassets \ No newline at end of file diff --git a/resources/views/portal/ninja2020/gateways/stripe/acss/pay.blade.php b/resources/views/portal/ninja2020/gateways/stripe/acss/pay.blade.php index 0a6cbc457b..aa4c7f6b78 100644 --- a/resources/views/portal/ninja2020/gateways/stripe/acss/pay.blade.php +++ b/resources/views/portal/ninja2020/gateways/stripe/acss/pay.blade.php @@ -8,7 +8,7 @@ @else @endif - + @@ -60,5 +60,4 @@ @push('footer') @vite('resources/js/clients/payments/stripe-acss.js') - @endpush diff --git a/resources/views/portal/ninja2020/gateways/stripe/acss/pay_livewire.blade.php b/resources/views/portal/ninja2020/gateways/stripe/acss/pay_livewire.blade.php new file mode 100644 index 0000000000..3ab6a860c3 --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/stripe/acss/pay_livewire.blade.php @@ -0,0 +1,56 @@ +
+ + @if($gateway->company_gateway->getConfigField('account_id')) + + + @else + + @endif + + + + + + + + + + + @include('portal.ninja2020.gateways.includes.payment_details') + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.pay_with')]) + {{ ctrans('texts.acss') }} ({{ ctrans('texts.bank_transfer') }}) +
+ @csrf + + + + + + +
+ +
    + + @foreach($tokens as $token) +
  • + + +
  • + @endforeach +
+ @include('portal.ninja2020.gateways.includes.pay_now', ['id' => 'pay-now-with-token']) + + @endcomponent + +
+ +@assets + +@vite('resources/js/clients/payments/stripe-acss.js') +@endassets \ No newline at end of file diff --git a/resources/views/portal/ninja2020/gateways/stripe/alipay/pay.blade.php b/resources/views/portal/ninja2020/gateways/stripe/alipay/pay.blade.php index 91df047a27..3a6eb09734 100644 --- a/resources/views/portal/ninja2020/gateways/stripe/alipay/pay.blade.php +++ b/resources/views/portal/ninja2020/gateways/stripe/alipay/pay.blade.php @@ -7,9 +7,10 @@ @else @endif + - + @endsection @section('gateway_content') diff --git a/resources/views/portal/ninja2020/gateways/stripe/alipay/pay_livewire.blade.php b/resources/views/portal/ninja2020/gateways/stripe/alipay/pay_livewire.blade.php new file mode 100644 index 0000000000..370dcd53f1 --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/stripe/alipay/pay_livewire.blade.php @@ -0,0 +1,26 @@ +
+ @if($gateway->company_gateway->getConfigField('account_id')) + + + @else + + @endif + + + + + @section('gateway_content') + + + @include('portal.ninja2020.gateways.includes.payment_details') + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.payment_type')]) + {{ ctrans('texts.alipay') }} + @endcomponent +
+ +@assets + + @vite('resources/js/clients/payments/stripe-alipay.js') +@endassets diff --git a/resources/views/portal/ninja2020/gateways/stripe/applepay/pay.blade.php b/resources/views/portal/ninja2020/gateways/stripe/applepay/pay.blade.php index 76e72631df..86d7ce2529 100644 --- a/resources/views/portal/ninja2020/gateways/stripe/applepay/pay.blade.php +++ b/resources/views/portal/ninja2020/gateways/stripe/applepay/pay.blade.php @@ -1,7 +1,7 @@ @extends('portal.ninja2020.layout.payments', ['gateway_title' => 'Apple Pay', 'card_title' => 'Apple Pay']) @section('gateway_head') - + @endsection @section('gateway_content') diff --git a/resources/views/portal/ninja2020/gateways/stripe/applepay/pay_livewire.blade.php b/resources/views/portal/ninja2020/gateways/stripe/applepay/pay_livewire.blade.php new file mode 100644 index 0000000000..172435fb8b --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/stripe/applepay/pay_livewire.blade.php @@ -0,0 +1,31 @@ +
+ + + + + + + + +
+ @csrf + + + + +
+ + + + @include('portal.ninja2020.gateways.includes.payment_details') + +
+ +
+
+ +@assets + +@vite('resources/js/clients/payments/stripe-applepay.js') +@endassets \ No newline at end of file diff --git a/resources/views/portal/ninja2020/gateways/stripe/bacs/pay.blade.php b/resources/views/portal/ninja2020/gateways/stripe/bacs/pay.blade.php index 40e57f291c..bcba5932da 100644 --- a/resources/views/portal/ninja2020/gateways/stripe/bacs/pay.blade.php +++ b/resources/views/portal/ninja2020/gateways/stripe/bacs/pay.blade.php @@ -9,6 +9,7 @@ @endif + @endsection @section('gateway_content') diff --git a/resources/views/portal/ninja2020/gateways/stripe/bacs/pay_livewire.blade.php b/resources/views/portal/ninja2020/gateways/stripe/bacs/pay_livewire.blade.php new file mode 100644 index 0000000000..3008773516 --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/stripe/bacs/pay_livewire.blade.php @@ -0,0 +1,47 @@ +
+ @if($gateway->company_gateway->getConfigField('account_id')) + + + @else + + @endif + + + +
+ @csrf + + + + + +
+ + + + @include('portal.ninja2020.gateways.includes.payment_details') + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.payment_type')]) + {{ ctrans('texts.bacs') }} ({{ ctrans('texts.bank_transfer') }}) + @endcomponent + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.pay_with')]) + @if (count($tokens) > 0) + @foreach ($tokens as $token) + + @endforeach + @endisset + + @endcomponent + @include('portal.ninja2020.gateways.includes.pay_now') +
+ +@assets + + @vite('resources/js/clients/payments/stripe-bacs.js') +@endassets \ No newline at end of file diff --git a/resources/views/portal/ninja2020/gateways/stripe/bancontact/pay.blade.php b/resources/views/portal/ninja2020/gateways/stripe/bancontact/pay.blade.php index 91ea5ee9cc..4d9e56fc84 100644 --- a/resources/views/portal/ninja2020/gateways/stripe/bancontact/pay.blade.php +++ b/resources/views/portal/ninja2020/gateways/stripe/bancontact/pay.blade.php @@ -17,6 +17,8 @@ + + @endsection @section('gateway_content') diff --git a/resources/views/portal/ninja2020/gateways/stripe/bancontact/pay_livewire.blade.php b/resources/views/portal/ninja2020/gateways/stripe/bancontact/pay_livewire.blade.php new file mode 100644 index 0000000000..28daec0a0b --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/stripe/bancontact/pay_livewire.blade.php @@ -0,0 +1,33 @@ +
+ @if($gateway->company_gateway->getConfigField('account_id')) + + + @else + + @endif + + + + + + + + + + + + + @include('portal.ninja2020.gateways.includes.payment_details') + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.payment_type')]) + {{ ctrans('texts.bancontact') }} ({{ ctrans('texts.bank_transfer') }}) + @endcomponent + @include('portal.ninja2020.gateways.stripe.bancontact.bancontact') + @include('portal.ninja2020.gateways.includes.pay_now') +
+ +@assets + + @vite('resources/js/clients/payments/stripe-bancontact.js') +@endassets diff --git a/resources/views/portal/ninja2020/gateways/stripe/bank_transfer/pay.blade.php b/resources/views/portal/ninja2020/gateways/stripe/bank_transfer/pay.blade.php index 22ee4a045e..96546a6454 100644 --- a/resources/views/portal/ninja2020/gateways/stripe/bank_transfer/pay.blade.php +++ b/resources/views/portal/ninja2020/gateways/stripe/bank_transfer/pay.blade.php @@ -8,7 +8,7 @@ @endif - + @endsection @section('gateway_content') diff --git a/resources/views/portal/ninja2020/gateways/stripe/bank_transfer/pay_livewire.blade.php b/resources/views/portal/ninja2020/gateways/stripe/bank_transfer/pay_livewire.blade.php new file mode 100644 index 0000000000..119af03ef5 --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/stripe/bank_transfer/pay_livewire.blade.php @@ -0,0 +1,43 @@ +
+ @if($gateway->company_gateway->getConfigField('account_id')) + + + @else + + @endif + + + + + + + +
+ @csrf + +
+ +
+ +
+ +
+
+
+ +@assets + +@vite('resources/js/clients/payments/stripe-bank-transfer.js') +@endassets \ No newline at end of file diff --git a/resources/views/portal/ninja2020/gateways/stripe/becs/pay.blade.php b/resources/views/portal/ninja2020/gateways/stripe/becs/pay.blade.php index 82f23cea9d..cf3bb0ecfa 100644 --- a/resources/views/portal/ninja2020/gateways/stripe/becs/pay.blade.php +++ b/resources/views/portal/ninja2020/gateways/stripe/becs/pay.blade.php @@ -17,6 +17,8 @@ + + @endsection @section('gateway_content') diff --git a/resources/views/portal/ninja2020/gateways/stripe/becs/pay_livewire.blade.php b/resources/views/portal/ninja2020/gateways/stripe/becs/pay_livewire.blade.php new file mode 100644 index 0000000000..7825735ec1 --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/stripe/becs/pay_livewire.blade.php @@ -0,0 +1,36 @@ +
+ @if($gateway->company_gateway->getConfigField('account_id')) + + + @else + + @endif + + + + + + + + + + + + + @include('portal.ninja2020.gateways.includes.payment_details') + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.payment_type')]) + {{ ctrans('texts.becs') }} ({{ ctrans('texts.bank_transfer') }}) + @endcomponent + + @include('portal.ninja2020.gateways.stripe.becs.becs_debit') + @include('portal.ninja2020.gateways.includes.save_card') + @include('portal.ninja2020.gateways.includes.pay_now') +
+ +@assets + + +@endassets diff --git a/resources/views/portal/ninja2020/gateways/stripe/browser_pay/pay.blade.php b/resources/views/portal/ninja2020/gateways/stripe/browser_pay/pay.blade.php index 7bbae14bb7..4d40069485 100644 --- a/resources/views/portal/ninja2020/gateways/stripe/browser_pay/pay.blade.php +++ b/resources/views/portal/ninja2020/gateways/stripe/browser_pay/pay.blade.php @@ -11,6 +11,8 @@ + + @endsection @section('gateway_content') diff --git a/resources/views/portal/ninja2020/gateways/stripe/browser_pay/pay_livewire.blade.php b/resources/views/portal/ninja2020/gateways/stripe/browser_pay/pay_livewire.blade.php new file mode 100644 index 0000000000..5028e49a57 --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/stripe/browser_pay/pay_livewire.blade.php @@ -0,0 +1,36 @@ +
+ @if($gateway->company_gateway->getConfigField('account_id')) + + + @else + + @endif + + + + + +
+ @csrf + + + + + + +
+ + + + @include('portal.ninja2020.gateways.includes.payment_details') + + @component('portal.ninja2020.components.general.card-element-single') +
+ @endcomponent +
+ +@assets + +@vite('resources/js/clients/payments/stripe-browserpay.js') +@endassets \ No newline at end of file diff --git a/resources/views/portal/ninja2020/gateways/stripe/credit_card/pay.blade.php b/resources/views/portal/ninja2020/gateways/stripe/credit_card/pay.blade.php index 9042dc94d9..0d0290ff39 100644 --- a/resources/views/portal/ninja2020/gateways/stripe/credit_card/pay.blade.php +++ b/resources/views/portal/ninja2020/gateways/stripe/credit_card/pay.blade.php @@ -27,6 +27,8 @@ + + @endsection @section('gateway_content') diff --git a/resources/views/portal/ninja2020/gateways/stripe/credit_card/pay_livewire.blade.php b/resources/views/portal/ninja2020/gateways/stripe/credit_card/pay_livewire.blade.php new file mode 100644 index 0000000000..5c7a021b70 --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/stripe/credit_card/pay_livewire.blade.php @@ -0,0 +1,74 @@ +
+ @if($stripe_account_id) + + + @else + + @endif + + + + + + +
+ @csrf + + + + + + + + +
+ + + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.payment_type')]) + {{ ctrans('texts.credit_card') }} + @endcomponent + + @include('portal.ninja2020.gateways.includes.payment_details') + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.pay_with')]) +
    + @if(count($tokens) > 0) + @foreach($tokens as $token) +
  • + +
  • + @endforeach + @endisset + +
  • + +
  • +
+ + @endcomponent + + @include('portal.ninja2020.gateways.stripe.includes.card_widget') + @include('portal.ninja2020.gateways.includes.pay_now') + + + @assets + + @vite('resources/js/clients/payments/stripe-credit-card.js') + @endassets +
\ No newline at end of file diff --git a/resources/views/portal/ninja2020/gateways/stripe/eps/pay.blade.php b/resources/views/portal/ninja2020/gateways/stripe/eps/pay.blade.php index 80995e0653..c8597ffa1d 100644 --- a/resources/views/portal/ninja2020/gateways/stripe/eps/pay.blade.php +++ b/resources/views/portal/ninja2020/gateways/stripe/eps/pay.blade.php @@ -16,6 +16,7 @@ + @endsection @section('gateway_content') diff --git a/resources/views/portal/ninja2020/gateways/stripe/eps/pay_livewire.blade.php b/resources/views/portal/ninja2020/gateways/stripe/eps/pay_livewire.blade.php new file mode 100644 index 0000000000..3ae31d316e --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/stripe/eps/pay_livewire.blade.php @@ -0,0 +1,33 @@ +
+ + @if($gateway->company_gateway->getConfigField('account_id')) + + + @else + + @endif + + + + + + + + + + + + @include('portal.ninja2020.gateways.includes.payment_details') + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.payment_type')]) + {{ ctrans('texts.eps') }} ({{ ctrans('texts.bank_transfer') }}) + @endcomponent + @include('portal.ninja2020.gateways.stripe.eps.eps') + @include('portal.ninja2020.gateways.includes.pay_now') +
+ +@assets + + @vite('resources/js/clients/payments/stripe-eps.js') +@endassets diff --git a/resources/views/portal/ninja2020/gateways/stripe/fpx/pay.blade.php b/resources/views/portal/ninja2020/gateways/stripe/fpx/pay.blade.php index a1ea200ab2..bc6c6e1d20 100644 --- a/resources/views/portal/ninja2020/gateways/stripe/fpx/pay.blade.php +++ b/resources/views/portal/ninja2020/gateways/stripe/fpx/pay.blade.php @@ -14,6 +14,8 @@ + + @endsection @section('gateway_content') diff --git a/resources/views/portal/ninja2020/gateways/stripe/fpx/pay_livewire.blade.php b/resources/views/portal/ninja2020/gateways/stripe/fpx/pay_livewire.blade.php new file mode 100644 index 0000000000..0eb90a4532 --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/stripe/fpx/pay_livewire.blade.php @@ -0,0 +1,31 @@ +
+ + @if($gateway->company_gateway->getConfigField('account_id')) + + + @else + + @endif + + + + + + + + + + @include('portal.ninja2020.gateways.includes.payment_details') + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.payment_type')]) + {{ ctrans('texts.fpx') }} ({{ ctrans('texts.bank_transfer') }}) + @endcomponent + @include('portal.ninja2020.gateways.stripe.fpx.fpx') + @include('portal.ninja2020.gateways.includes.pay_now') +
+ +@assets + +@vite('resources/js/clients/payments/stripe-fpx.js') +@endassets \ No newline at end of file diff --git a/resources/views/portal/ninja2020/gateways/stripe/giropay/pay.blade.php b/resources/views/portal/ninja2020/gateways/stripe/giropay/pay.blade.php index f4996bb3db..840da07f0e 100644 --- a/resources/views/portal/ninja2020/gateways/stripe/giropay/pay.blade.php +++ b/resources/views/portal/ninja2020/gateways/stripe/giropay/pay.blade.php @@ -14,6 +14,7 @@ + @endsection @section('gateway_content') diff --git a/resources/views/portal/ninja2020/gateways/stripe/giropay/pay_livewire.blade.php b/resources/views/portal/ninja2020/gateways/stripe/giropay/pay_livewire.blade.php new file mode 100644 index 0000000000..b175095502 --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/stripe/giropay/pay_livewire.blade.php @@ -0,0 +1,32 @@ +
+ @if($gateway->company_gateway->getConfigField('account_id')) + + + @else + + @endif + + + + + + + + + + + @include('portal.ninja2020.gateways.includes.payment_details') + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.payment_type')]) + {{ ctrans('texts.giropay') }} ({{ ctrans('texts.bank_transfer') }}) + @endcomponent + @include('portal.ninja2020.gateways.stripe.giropay.giropay') + @include('portal.ninja2020.gateways.includes.pay_now') +
+ +@assets + + @vite('resources/js/clients/payments/stripe-giropay.js') +@endassets \ No newline at end of file diff --git a/resources/views/portal/ninja2020/gateways/stripe/ideal/pay.blade.php b/resources/views/portal/ninja2020/gateways/stripe/ideal/pay.blade.php index b0ac53a3e1..df9dd614fe 100644 --- a/resources/views/portal/ninja2020/gateways/stripe/ideal/pay.blade.php +++ b/resources/views/portal/ninja2020/gateways/stripe/ideal/pay.blade.php @@ -14,6 +14,7 @@ + @endsection @section('gateway_content') diff --git a/resources/views/portal/ninja2020/gateways/stripe/ideal/pay_livewire.blade.php b/resources/views/portal/ninja2020/gateways/stripe/ideal/pay_livewire.blade.php new file mode 100644 index 0000000000..d4accb1efe --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/stripe/ideal/pay_livewire.blade.php @@ -0,0 +1,32 @@ +
+ + @if($gateway->company_gateway->getConfigField('account_id')) + + + @else + + @endif + + + + + + + + + + + @include('portal.ninja2020.gateways.includes.payment_details') + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.payment_type')]) + {{ ctrans('texts.ideal') }} ({{ ctrans('texts.bank_transfer') }}) + @endcomponent + @include('portal.ninja2020.gateways.stripe.ideal.ideal') + @include('portal.ninja2020.gateways.includes.pay_now') +
+ +@assets + + @vite('resources/js/clients/payments/stripe-ideal.js') +@endassets diff --git a/resources/views/portal/ninja2020/gateways/stripe/klarna/pay.blade.php b/resources/views/portal/ninja2020/gateways/stripe/klarna/pay.blade.php index 2d6d9de448..8f37c8de1f 100644 --- a/resources/views/portal/ninja2020/gateways/stripe/klarna/pay.blade.php +++ b/resources/views/portal/ninja2020/gateways/stripe/klarna/pay.blade.php @@ -19,6 +19,7 @@ + @endsection @section('gateway_content') diff --git a/resources/views/portal/ninja2020/gateways/stripe/klarna/pay_livewire.blade.php b/resources/views/portal/ninja2020/gateways/stripe/klarna/pay_livewire.blade.php new file mode 100644 index 0000000000..476edea469 --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/stripe/klarna/pay_livewire.blade.php @@ -0,0 +1,37 @@ +
+ @if($gateway->company_gateway->getConfigField('account_id')) + + + @else + + @endif + + + + + + + + + + + + + + + + @include('portal.ninja2020.gateways.includes.payment_details') + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.payment_type')]) + {{ ctrans('texts.klarna') }} ({{ ctrans('texts.bank_transfer') }}) + @endcomponent + @include('portal.ninja2020.gateways.stripe.klarna.klarna') + @include('portal.ninja2020.gateways.includes.pay_now') +
+ +@assets + + @vite('resources/js/clients/payments/stripe-klarna.js') +@endassets diff --git a/resources/views/portal/ninja2020/gateways/stripe/przelewy24/pay.blade.php b/resources/views/portal/ninja2020/gateways/stripe/przelewy24/pay.blade.php index dc5194b1a7..d0f86186c2 100644 --- a/resources/views/portal/ninja2020/gateways/stripe/przelewy24/pay.blade.php +++ b/resources/views/portal/ninja2020/gateways/stripe/przelewy24/pay.blade.php @@ -16,6 +16,7 @@ + @endsection @section('gateway_content') diff --git a/resources/views/portal/ninja2020/gateways/stripe/przelewy24/pay_livewire.blade.php b/resources/views/portal/ninja2020/gateways/stripe/przelewy24/pay_livewire.blade.php new file mode 100644 index 0000000000..9d7b89f15e --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/stripe/przelewy24/pay_livewire.blade.php @@ -0,0 +1,35 @@ +
+ @if($gateway->company_gateway->getConfigField('account_id')) + + + @else + + @endif + + + + + + + + + + + + + @include('portal.ninja2020.gateways.includes.payment_details') + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.payment_type')]) + {{ ctrans('texts.przelewy24') }} ({{ ctrans('texts.bank_transfer') }}) + @endcomponent + + @include('portal.ninja2020.gateways.stripe.przelewy24.przelewy24') + @include('portal.ninja2020.gateways.includes.save_card') + @include('portal.ninja2020.gateways.includes.pay_now') +
+ +@assets + + @vite('resources/js/clients/payments/stripe-przelewy24.js') +@endassets \ No newline at end of file diff --git a/resources/views/portal/ninja2020/gateways/stripe/sepa/pay.blade.php b/resources/views/portal/ninja2020/gateways/stripe/sepa/pay.blade.php index 9dbdca625c..ea06ccf0f4 100644 --- a/resources/views/portal/ninja2020/gateways/stripe/sepa/pay.blade.php +++ b/resources/views/portal/ninja2020/gateways/stripe/sepa/pay.blade.php @@ -18,6 +18,8 @@ + + @endsection @section('gateway_content') diff --git a/resources/views/portal/ninja2020/gateways/stripe/sepa/pay_livewire.blade.php b/resources/views/portal/ninja2020/gateways/stripe/sepa/pay_livewire.blade.php new file mode 100644 index 0000000000..95840d1342 --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/stripe/sepa/pay_livewire.blade.php @@ -0,0 +1,89 @@ +
+ + @if($gateway->company_gateway->getConfigField('account_id')) + + + @else + + @endif + + + + + + + + + + + + +
+ @csrf + + + + + + +
+ + + + @include('portal.ninja2020.gateways.includes.payment_details') + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.payment_type')]) + {{ ctrans('texts.sepa') }} ({{ ctrans('texts.bank_transfer') }}) + @endcomponent + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.pay_with')]) + @if (count($tokens) > 0) + @foreach ($tokens as $token) + + @endforeach + @endisset + + + @endcomponent + + @component('portal.ninja2020.components.general.card-element-single') +
+ + + +
+ + +
+
+ @endcomponent + + @include('portal.ninja2020.gateways.includes.save_card') + @include('portal.ninja2020.gateways.includes.pay_now') +
+ +@assets + + @vite('resources/js/clients/payments/stripe-sepa.js') +@endassets \ No newline at end of file diff --git a/resources/views/portal/ninja2020/gateways/stripe/sofort/pay.blade.php b/resources/views/portal/ninja2020/gateways/stripe/sofort/pay.blade.php index 312b9242dd..02dab2c565 100644 --- a/resources/views/portal/ninja2020/gateways/stripe/sofort/pay.blade.php +++ b/resources/views/portal/ninja2020/gateways/stripe/sofort/pay.blade.php @@ -15,6 +15,7 @@ + @endsection @section('gateway_content') diff --git a/resources/views/portal/ninja2020/gateways/stripe/sofort/pay_livewire.blade.php b/resources/views/portal/ninja2020/gateways/stripe/sofort/pay_livewire.blade.php new file mode 100644 index 0000000000..5f11720f3a --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/stripe/sofort/pay_livewire.blade.php @@ -0,0 +1,30 @@ +
+ @if($gateway->company_gateway->getConfigField('account_id')) + + + @else + + @endif + + + + + + + + + + + @include('portal.ninja2020.gateways.includes.payment_details') + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.payment_type')]) + {{ ctrans('texts.sofort') }} ({{ ctrans('texts.bank_transfer') }}) + @endcomponent + @include('portal.ninja2020.gateways.includes.pay_now') +
+ +@assets + + @vite('resources/js/clients/payments/stripe-sofort.js') +@endassets diff --git a/resources/views/portal/ninja2020/invoices/show_smooth.blade.php b/resources/views/portal/ninja2020/invoices/show_smooth.blade.php new file mode 100644 index 0000000000..f7add35dd0 --- /dev/null +++ b/resources/views/portal/ninja2020/invoices/show_smooth.blade.php @@ -0,0 +1,29 @@ +@extends('portal.ninja2020.layout.app') +@section('meta_title', ctrans('texts.view_invoice')) + +@push('head') +@endpush + +@section('body') + + @if($invoice->isPayable() && $client->getSetting('custom_message_unpaid_invoice')) + @component('portal.ninja2020.components.message') +
{{ $client->getSetting('custom_message_unpaid_invoice') }}
+ @endcomponent + @elseif($invoice->status_id === 4 && $client->getSetting('custom_message_paid_invoice')) + @component('portal.ninja2020.components.message') +
{{ $client->getSetting('custom_message_paid_invoice') }}
+ @endcomponent + @endif + + @if($invoice->isPayable()) + @livewire('flow2.invoice-pay', ['invoices' => $invoices, 'invitation_id' => $invitation->id, 'db' => $db, 'variables' => $variables]) + @endif + +@endsection + +@section('footer') +@endsection + +@push('head') +@endpush diff --git a/resources/views/portal/ninja2020/invoices/show_smooth_multi.blade.php b/resources/views/portal/ninja2020/invoices/show_smooth_multi.blade.php new file mode 100644 index 0000000000..9975396baa --- /dev/null +++ b/resources/views/portal/ninja2020/invoices/show_smooth_multi.blade.php @@ -0,0 +1,17 @@ +@extends('portal.ninja2020.layout.app') +@section('meta_title', ctrans('texts.view_invoice')) + +@push('head') +@endpush + +@section('body') + + @livewire('flow2.invoice-pay', ['invoices' => $invoices, 'invitation_id' => $invitation->id, 'db' => $db, 'variables' => $variables]) + +@endsection + +@section('footer') +@endsection + +@push('head') +@endpush diff --git a/vite.config.ts b/vite.config.ts index a03c2f8036..90c67ad007 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -50,6 +50,9 @@ export default defineConfig({ 'resources/js/clients/payments/stripe-przelewy24.js', 'resources/js/clients/payments/stripe-browserpay.js', 'resources/js/clients/payments/stripe-fpx.js', + 'resources/js/clients/payments/stripe-ach-pay.js', + 'resources/js/clients/payments/stripe-bank-transfer.js', + 'resources/js/clients/payment_methods/authorize-stripe-acss.js', ]), viteStaticCopy({ targets: [ @@ -68,4 +71,18 @@ export default defineConfig({ ], }), ], + build: { + rollupOptions: { + output: { + manualChunks: (id) => { + if ( + id.includes('forte-credit-card-payment.js') || + id.includes('authorize-credit-card-payment') + ) { + return id; + } + }, + }, + }, + }, });