diff --git a/ecpay-ecommerce-for-woocommerce.zip b/ecpay-ecommerce-for-woocommerce.zip
index 0c656ac..0376062 100644
Binary files a/ecpay-ecommerce-for-woocommerce.zip and b/ecpay-ecommerce-for-woocommerce.zip differ
diff --git a/ecpay-ecommerce-for-woocommerce/README.md b/ecpay-ecommerce-for-woocommerce/README.md
index 6c925c1..d7e297b 100644
--- a/ecpay-ecommerce-for-woocommerce/README.md
+++ b/ecpay-ecommerce-for-woocommerce/README.md
@@ -6,7 +6,7 @@
-* 綠界科技外掛套件,提供合作特店賣家以及個人賣家會員使用開放原始碼商店系統時,無須自行處理複雜的檢核,直接透過安裝設定外掛套件,便可快速介接綠界科技系統,進行金流、物流、電子發票操作。
+* 綠界科技外掛套件,提供合作特店以及個人會員使用開放原始碼商店系統時,無須自行處理複雜的檢核,直接透過安裝設定外掛套件,便可快速介接綠界科技系統,進行金流、物流、電子發票操作。
目錄
@@ -67,6 +67,7 @@
- 寄件人手機
- 寄件人郵遞區號
- 寄件人地址
+ - 啟用離島物流
- 啟用測試模式
- 商店代號(Merchant ID)
- 金鑰(Hash Key)
diff --git a/ecpay-ecommerce-for-woocommerce/README.txt b/ecpay-ecommerce-for-woocommerce/README.txt
index 8d7f541..5e52704 100644
--- a/ecpay-ecommerce-for-woocommerce/README.txt
+++ b/ecpay-ecommerce-for-woocommerce/README.txt
@@ -4,17 +4,17 @@ Tags: ecommerce, e-commerce, store, sales, sell, shop, cart, checkout, payment,
Requires at least: 6.0
Tested up to: 6.0
Requires PHP: 7.4
-Stable tag: 1.0.2305230
+Stable tag: 1.0.2306280
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
-== Frequently Asked Questions ==
+== Frequently Asked Questions ==
= 系統需求 =
- PHP version 7.4
- MySQL version 5.7 or greater
-= 其它問題 =
+= 其它問題 =
請來信詢問綠界技術服務信箱: techsupport@ecpay.com.tw
== Changelog ==
@@ -33,11 +33,15 @@ v1.0.2304120
v1.0.2305230
修正前綴詞長度設定過長會造成訂單重覆問題
+v1.0.2306280
+修正稅金啟用發票開立失敗問題
+新增黑貓、7-11離島物流設定
+
== Upgrade Notice ==
-Upgrade Notice 請使用https://github.com/ECPay/Woocommerce_ECPAY
+Upgrade Notice 請使用https://github.com/ECPay/Woocommerce_ECPAY
-== Screenshots ==
+== Screenshots ==
@@ -49,7 +53,7 @@ Upgrade Notice 請使用https://github.com/ECPay/Woocommerce_ECPAY
== Description ==
-* 綠界科技外掛套件,提供合作特店賣家以及個人賣家會員使用開放原始碼商店系統時,無須自行處理複雜的檢核,直接透過安裝設定外掛套件,便可快速介接綠界科技系統,進行金流、物流、電子發票操作。
+* 綠界科技外掛套件,提供合作特店以及個人會員使用開放原始碼商店系統時,無須自行處理複雜的檢核,直接透過安裝設定外掛套件,便可快速介接綠界科技系統,進行金流、物流、電子發票操作。
目錄
@@ -110,6 +114,7 @@ Upgrade Notice 請使用https://github.com/ECPay/Woocommerce_ECPAY
- 寄件人手機
- 寄件人郵遞區號
- 寄件人地址
+ - 啟用離島物流
- 啟用測試模式
- 商店代號(Merchant ID)
- 金鑰(Hash Key)
diff --git a/ecpay-ecommerce-for-woocommerce/admin/order/class-wooecpay-order.php b/ecpay-ecommerce-for-woocommerce/admin/order/class-wooecpay-order.php
index 800f94e..49f7329 100644
--- a/ecpay-ecommerce-for-woocommerce/admin/order/class-wooecpay-order.php
+++ b/ecpay-ecommerce-for-woocommerce/admin/order/class-wooecpay-order.php
@@ -8,10 +8,10 @@ class Wooecpay_Order
{
protected $logisticHelper;
- public function __construct() {
-
+ public function __construct()
+ {
if (is_admin()) {
- //載入物流共用
+ // 載入物流共用
$this->logisticHelper = new Wooecpay_Logistic_Helper;
// wp_enqueue_style('wooecpay_barcode_css', WOOECPAY_PLUGIN_URL . 'public/css/style.css');
@@ -19,7 +19,7 @@ public function __construct() {
if ('yes' === get_option('wooecpay_enabled_payment', 'yes')) {
- add_action( 'woocommerce_admin_billing_fields', array($this,'custom_order_meta'), 10, 1 );
+ add_action( 'woocommerce_admin_billing_fields', array($this,'custom_order_meta'), 10, 1 );
add_action( 'woocommerce_admin_order_data_after_billing_address', array($this,'add_address_meta'), 10, 1 );
add_action( 'woocommerce_admin_order_data_after_order_details', array($this,'add_payment_info'), 10, 1 );
@@ -28,11 +28,15 @@ public function __construct() {
if ('yes' === get_option('wooecpay_enabled_logistic', 'yes')) {
- add_action( 'woocommerce_admin_order_data_after_shipping_address', array($this,'logistic_button_display'));
+ add_action( 'woocommerce_admin_order_data_after_shipping_address', array($this,'logistic_button_display'));
add_action( 'wp_ajax_send_logistic_order_action', array( $this, 'ajax_send_logistic_order_action' ) );
add_action( 'woocommerce_process_shop_order_meta', array( $this, 'order_update_sync_shipping_phone' ), 60 );
-
+
+ if (in_array('Wooecpay_Logistic_Home_Tcat', get_option('wooecpay_enabled_logistic_outside', []))) {
+ add_action('pre_post_update', array($this, 'ecpay_validate_logistic_fields'), 10, 2);
+ }
+
}
if ('yes' === get_option('wooecpay_enabled_invoice', 'yes')) {
@@ -41,7 +45,7 @@ public function __construct() {
// 手動開立
add_action( 'wp_ajax_send_invoice_create', array( $this, 'ajax_send_invoice_create' ) );
-
+
// 手動作廢
add_action( 'wp_ajax_send_invoice_invalid', array( $this, 'ajax_send_invoice_invalid' ) );
@@ -55,7 +59,7 @@ public function __construct() {
}
if ('yes' === get_option('wooecpay_enabled_invoice', 'yes')) {
-
+
// 自動開立
if ('auto_paid' === get_option('wooecpay_enabled_invoice_auto', 'auto_paid')) {
add_action('woocommerce_order_status_processing', array( $this, 'invoice_create' ));
@@ -66,8 +70,8 @@ public function __construct() {
/**
* 訂單頁面新增完整地址
*/
- public function custom_order_meta($fields) {
-
+ public function custom_order_meta($fields)
+ {
$fields['full-address'] = array(
'label' => __( 'Full address', 'ecpay-ecommerce-for-woocommerce' ),
'show' => true,
@@ -80,34 +84,29 @@ public function custom_order_meta($fields) {
/**
* 訂單頁面姓名欄位格式調整
*/
- public function add_address_meta($order) {
+ public function add_address_meta($order)
+ {
echo '';
- $shipping_method_id = $order->get_items('shipping') ;
+ $shipping_method_id = $order->get_items('shipping');
if (!empty($shipping_method_id)) {
- $shipping_method_id = reset($shipping_method_id);
- $shipping_method_id = $shipping_method_id->get_method_id() ;
+ $shipping_method_id = reset($shipping_method_id);
+ $shipping_method_id = $shipping_method_id->get_method_id();
}
- if (
- $shipping_method_id == 'Wooecpay_Logistic_CVS_711' ||
- $shipping_method_id == 'Wooecpay_Logistic_CVS_Family' ||
- $shipping_method_id == 'Wooecpay_Logistic_CVS_Hilife' ||
- $shipping_method_id == 'Wooecpay_Logistic_CVS_Okmart'
- ) {
+ if ($this->logisticHelper->is_ecpay_cvs_logistics($shipping_method_id)) {
echo '';
- }
- else {
+ } else {
echo '';
}
-
+
echo wp_kses_post('
帳單姓名:
' . get_post_meta( $order->get_id(), '_billing_last_name', true ) . ' ' . get_post_meta( $order->get_id(), '_billing_first_name', true ) . '
');
}
/**
* 訂單金流資訊回傳
*/
- public function add_payment_info($order) {
-
+ public function add_payment_info($order)
+ {
$payment_method = get_post_meta( $order->get_id(), '_payment_method', true ) ;
echo '
';
@@ -115,23 +114,23 @@ public function add_payment_info($order) {
echo wp_kses_post(''.__('Payment Type', 'ecpay-ecommerce-for-woocommerce').': '. get_post_meta( $order->get_id(), '_payment_method_title', true ) . '
') ;
- switch ( $payment_method) {
+ switch ($payment_method) {
case 'Wooecpay_Gateway_Credit':
-
+
echo wp_kses_post('信用卡前六碼: '. get_post_meta( $order->get_id(), '_ecpay_card6no', true ) . '
') ;
echo wp_kses_post('信用卡後四碼: '. get_post_meta( $order->get_id(), '_ecpay_card4no', true ) . '
') ;
break;
case 'Wooecpay_Gateway_Credit_Installment':
-
+
echo wp_kses_post('期數: '. get_post_meta( $order->get_id(), '_ecpay_payment_number_of_periods', true ) . '數
') ;
break;
case 'Wooecpay_Gateway_Atm':
-
+
echo wp_kses_post(''.__('Bank code', 'ecpay-ecommerce-for-woocommerce').': '. get_post_meta( $order->get_id(), '_ecpay_atm_BankCode', true ) . '
') ;
echo wp_kses_post(''.__('ATM No', 'ecpay-ecommerce-for-woocommerce').': '. get_post_meta( $order->get_id(), '_ecpay_atm_vAccount', true ) . '
') ;
echo wp_kses_post(''.__('Payment deadline', 'ecpay-ecommerce-for-woocommerce').': '. get_post_meta( $order->get_id(), '_ecpay_atm_ExpireDate', true ) . '
') ;
@@ -139,39 +138,39 @@ public function add_payment_info($order) {
break;
case 'Wooecpay_Gateway_Cvs':
-
+
echo wp_kses_post(''.__('CVS No', 'ecpay-ecommerce-for-woocommerce').': '. get_post_meta( $order->get_id(), '_ecpay_cvs_PaymentNo', true ) . '
') ;
echo wp_kses_post(''.__('Payment deadline', 'ecpay-ecommerce-for-woocommerce').': '. get_post_meta( $order->get_id(), '_ecpay_cvs_ExpireDate', true ) . '
') ;
break;
case 'Wooecpay_Gateway_Barcode':
-
+
echo wp_kses_post(''.__('barcode one', 'ecpay-ecommerce-for-woocommerce').': '. get_post_meta( $order->get_id(), '_ecpay_barcode_Barcode1', true ) . '
') ;
echo wp_kses_post(''.__('barcode two', 'ecpay-ecommerce-for-woocommerce').': '. get_post_meta( $order->get_id(), '_ecpay_barcode_Barcode2', true ) . '
') ;
echo wp_kses_post(''.__('barcode three', 'ecpay-ecommerce-for-woocommerce').': '. get_post_meta( $order->get_id(), '_ecpay_barcode_Barcode3', true ) . '
') ;
echo wp_kses_post(''.__('Payment deadline', 'ecpay-ecommerce-for-woocommerce').': '. get_post_meta( $order->get_id(), '_ecpay_barcode_ExpireDate', true ) . '
') ;
break;
-
+
default:
break;
}
}
/**
- * 無效訂單狀態更新
- *
- * @return void
- */
- public function check_order_status_cancel($order) {
-
+ * 無效訂單狀態更新
+ *
+ * @return void
+ */
+ public function check_order_status_cancel($order)
+ {
$query_trade_tag = get_post_meta( $order->get_id(), '_wooecpay_query_trade_tag', true ) ;
- if($query_trade_tag == 0){
+ if ($query_trade_tag == 0) {
// 判斷訂單狀態
- $order_status = $order->get_status();
+ $order_status = $order->get_status();
if (
$order_status == 'on-hold' ||
$order_status == 'pending'
@@ -218,7 +217,7 @@ public function check_order_status_cancel($order) {
$merchant_trade_no = get_post_meta( $order->get_id(), '_wooecpay_payment_merchant_trade_no', true ) ;
try {
-
+
$factory = new Factory([
'hashKey' => $api_payment_query_trade_info['hashKey'],
'hashIv' => $api_payment_query_trade_info['hashIv'],
@@ -237,7 +236,7 @@ public function check_order_status_cancel($order) {
// 逾期交易失敗
if (isset($response['TradeStatus']) && $response['TradeStatus'] == 10200095) {
-
+
// 更新訂單狀態/備註
$order->add_order_note('逾期訂單自動取消');
@@ -259,8 +258,8 @@ public function check_order_status_cancel($order) {
/**
* 訂單發票資訊顯示
*/
- public function add_invoice_meta($order) {
-
+ public function add_invoice_meta($order)
+ {
if ($order) {
$wooecpay_invoice_carruer_type = get_post_meta( $order->get_id(), '_wooecpay_invoice_carruer_type', true ) ;
@@ -269,7 +268,7 @@ public function add_invoice_meta($order) {
$wooecpay_invoice_customer_identifier = get_post_meta( $order->get_id(), '_wooecpay_invoice_customer_identifier', true ) ;
$wooecpay_invoice_love_code = get_post_meta( $order->get_id(), '_wooecpay_invoice_love_code', true ) ;
$wooecpay_invoice_carruer_num = get_post_meta( $order->get_id(), '_wooecpay_invoice_carruer_num', true ) ;
-
+
$wooecpay_invoice_no = get_post_meta( $order->get_id(), '_wooecpay_invoice_no', true ) ;
$wooecpay_invoice_date = get_post_meta( $order->get_id(), '_wooecpay_invoice_date', true ) ;
$wooecpay_invoice_random_number = get_post_meta( $order->get_id(), '_wooecpay_invoice_random_number', true ) ;
@@ -283,7 +282,7 @@ public function add_invoice_meta($order) {
// 開立發票按鈕顯示判斷
$invoice_create_button = false ;
- if (empty($wooecpay_invoice_process) &&
+ if (empty($wooecpay_invoice_process) &&
( $order_status == 'processing' || $order_status == 'completed')
) {
$invoice_create_button = true ;
@@ -291,9 +290,9 @@ public function add_invoice_meta($order) {
// 作廢發票按鈕顯示判斷
$invoice_invalid_button = false ;
- if (!empty($wooecpay_invoice_process) &&
- ( $order_status == 'cancelled' || $order_status == 'refunded'))
- {
+ if (!empty($wooecpay_invoice_process) &&
+ ( $order_status == 'cancelled' || $order_status == 'refunded')
+ ) {
$invoice_invalid_button = true ;
}
@@ -313,12 +312,12 @@ public function add_invoice_meta($order) {
echo '';
echo '
發票資訊
';
- echo wp_kses_post('
發票號碼:'. $wooecpay_invoice_no . '
') ;
- echo wp_kses_post('
開立時間:'. $wooecpay_invoice_date . '
') ;
+ echo wp_kses_post('
發票號碼:'. $wooecpay_invoice_no . '
') ;
+ echo wp_kses_post('
開立時間:'. $wooecpay_invoice_date . '
') ;
echo wp_kses_post('
隨機碼:'. $wooecpay_invoice_random_number . '
') ;
switch ($wooecpay_invoice_issue_type) {
-
+
case '1':
$wooecpay_invoice_issue_type_dsp = '一般開立發票';
echo wp_kses_post('
開立方式:'. $wooecpay_invoice_issue_type_dsp . '
') ;
@@ -347,7 +346,7 @@ public function add_invoice_meta($order) {
echo wp_kses_post('
載具編號:'. $wooecpay_invoice_carruer_num . '
') ;
}
break;
-
+
case 'c':
echo wp_kses_post('
公司名稱:'. $billing_company . '
') ;
echo wp_kses_post('
統一編號:'. $wooecpay_invoice_customer_identifier . '
') ;
@@ -360,12 +359,12 @@ public function add_invoice_meta($order) {
// 開立發票按鈕顯示判斷
if ($invoice_create_button) {
- echo '
get_id().');\'>';
+ echo '
get_id().');\'>';
}
// 作廢發票按鈕顯示判斷
if ($invoice_invalid_button) {
- echo '
get_id().');\'>';
+ echo '
get_id().');\'>';
}
echo '
';
@@ -375,17 +374,40 @@ public function add_invoice_meta($order) {
/**
* 複寫聯絡電話至收件人電話
*/
- public function order_update_sync_shipping_phone($post_id){
-
+ public function order_update_sync_shipping_phone($post_id)
+ {
$shipping_phone = get_post_meta($post_id, '_shipping_phone', true);
- update_post_meta($post_id, 'wooecpay_shipping_phone', $shipping_phone);
+ update_post_meta($post_id, 'wooecpay_shipping_phone', $shipping_phone);
+ }
+
+ public function ecpay_validate_logistic_fields($post_id, $data)
+ {
+ if ($order = wc_get_order($post_id)) {
+ // 取得物流方式
+ $shipping_method_id = $order->get_items('shipping');
+ $shipping_method_id = reset($shipping_method_id);
+ $shipping_method_id = $shipping_method_id->get_method_id();
+
+ // 驗證運送方式的縣/市欄位
+ $shipping_state = $_POST['_shipping_state'];
+
+ // 宅配黑貓
+ if (in_array($shipping_method_id, ['Wooecpay_Logistic_Home_Tcat', 'Wooecpay_Logistic_Home_Tcat_Outside'])) {
+ // 比對運送方式與地址
+ $result = $this->logisticHelper->is_available_state_home_tcat($shipping_method_id, $shipping_state);
+ if (!$result) {
+ // 比對失敗,中斷執行程序不更新訂單
+ wp_die(__('The order update failed as the selected store does not match the chosen shipping method (Outlying Island/Main Island).', 'ecpay-ecommerce-for-woocommerce'), __('Order Save Error', 'ecpay-ecommerce-for-woocommerce'), array('response' => 400));
+ }
+ }
+ }
}
-
+
/**
* 註冊JS
*/
- public function wooecpay_register_scripts() {
-
+ public function wooecpay_register_scripts()
+ {
wp_register_script(
'wooecpay_main',
WOOECPAY_PLUGIN_URL . 'public/js/wooecpay-main.js',
@@ -401,8 +423,8 @@ public function wooecpay_register_scripts() {
/**
* 產生物流相關按鈕顯示
*/
- public function logistic_button_display($order) {
-
+ public function logistic_button_display($order)
+ {
if ($order) {
// 取得訂單資訊
@@ -410,10 +432,10 @@ public function logistic_button_display($order) {
// 取得物流方式
$shipping_method_id = $order->get_items('shipping') ;
-
+
if ($shipping_method_id) {
-
- $shipping_method_id = reset($shipping_method_id);
+
+ $shipping_method_id = reset($shipping_method_id);
$shipping_method_id = $shipping_method_id->get_method_id() ;
$order_status = $order->get_status();
@@ -426,13 +448,8 @@ public function logistic_button_display($order) {
// 判斷物流方式是否允許變更門市
if (
- ( $order_status == 'on-hold' || $order_status == 'processing') &&
- (
- $shipping_method_id == 'Wooecpay_Logistic_CVS_711' ||
- $shipping_method_id == 'Wooecpay_Logistic_CVS_Family' ||
- $shipping_method_id == 'Wooecpay_Logistic_CVS_Hilife' ||
- $shipping_method_id == 'Wooecpay_Logistic_CVS_Okmart'
- )
+ ( $order_status == 'on-hold' || $order_status == 'processing') &&
+ $this->logisticHelper->is_ecpay_cvs_logistics($shipping_method_id)
) {
// 狀態判斷是否已經建立綠界物流單 AllPayLogisticsID
@@ -450,23 +467,10 @@ public function logistic_button_display($order) {
$logistic_order_button = true ;
// 判斷是否為綠界物流
- if (
- $shipping_method_id == 'Wooecpay_Logistic_CVS_711' ||
- $shipping_method_id == 'Wooecpay_Logistic_CVS_Family' ||
- $shipping_method_id == 'Wooecpay_Logistic_CVS_Hilife' ||
- $shipping_method_id == 'Wooecpay_Logistic_CVS_Okmart' ||
- $shipping_method_id == 'Wooecpay_Logistic_Home_Tcat' ||
- $shipping_method_id == 'Wooecpay_Logistic_Home_Ecan' ||
- $shipping_method_id == 'Wooecpay_Logistic_Home_Post'
- ) {
-
- if (
- $shipping_method_id == 'Wooecpay_Logistic_CVS_711' ||
- $shipping_method_id == 'Wooecpay_Logistic_CVS_Family' ||
- $shipping_method_id == 'Wooecpay_Logistic_CVS_Hilife' ||
- $shipping_method_id == 'Wooecpay_Logistic_CVS_Okmart'
- ) {
-
+ if ($this->logisticHelper->is_ecpay_logistics($shipping_method_id)) {
+
+ if ($this->logisticHelper->is_ecpay_cvs_logistics($shipping_method_id)) {
+
// 狀態判斷 _ecpay_logistic_cvs_store_id門市代號不存在
$ecpay_logistic_cvs_store_id = get_post_meta( $order->get_id(), '_ecpay_logistic_cvs_store_id', true );
@@ -505,31 +509,18 @@ public function logistic_button_display($order) {
}
// 判斷是否為綠界物流
- if (
- $shipping_method_id == 'Wooecpay_Logistic_CVS_711' ||
- $shipping_method_id == 'Wooecpay_Logistic_CVS_Family' ||
- $shipping_method_id == 'Wooecpay_Logistic_CVS_Hilife' ||
- $shipping_method_id == 'Wooecpay_Logistic_CVS_Okmart' ||
- $shipping_method_id == 'Wooecpay_Logistic_Home_Tcat' ||
- $shipping_method_id == 'Wooecpay_Logistic_Home_Ecan' ||
- $shipping_method_id == 'Wooecpay_Logistic_Home_Post'
- ) {
-
+ if ($this->logisticHelper->is_ecpay_logistics($shipping_method_id)) {
+
// 判斷是否為超商取貨
- if (
- $shipping_method_id == 'Wooecpay_Logistic_CVS_711' ||
- $shipping_method_id == 'Wooecpay_Logistic_CVS_Family' ||
- $shipping_method_id == 'Wooecpay_Logistic_CVS_Hilife' ||
- $shipping_method_id == 'Wooecpay_Logistic_CVS_Okmart'
- ) {
+ if ($this->logisticHelper->is_ecpay_cvs_logistics($shipping_method_id)) {
echo '';
echo '
超商資訊
' ;
- echo wp_kses_post('
超商編號:'. get_post_meta( $order->get_id(), '_ecpay_logistic_cvs_store_id', true ) . '
') ;
+ echo wp_kses_post('
超商編號:'. get_post_meta( $order->get_id(), '_ecpay_logistic_cvs_store_id', true ) . '
') ;
echo wp_kses_post('
超商名稱:'. get_post_meta( $order->get_id(), '_ecpay_logistic_cvs_store_name', true ) . '
') ;
if ('yes' === get_option('wooecpay_keep_logistic_phone', 'yes')) {
echo wp_kses_post('
收件人電話:'. get_post_meta( $order->get_id(), 'wooecpay_shipping_phone', true ) . '
') ;
- }
+ }
echo '
' ;
}
@@ -537,96 +528,70 @@ public function logistic_button_display($order) {
echo '物流單資訊
' ;
if (true) {
- echo wp_kses_post('廠商交易編號:'. get_post_meta( $order->get_id(), '_wooecpay_logistic_merchant_trade_no', true ) . '
') ;
- echo wp_kses_post('綠界物流編號:'. get_post_meta( $order->get_id(), '_wooecpay_logistic_AllPayLogisticsID', true ) . '
') ;
- echo wp_kses_post('寄貨編號:'. get_post_meta( $order->get_id(), '_wooecpay_logistic_CVSPaymentNo', true ) . '
') ;
- echo wp_kses_post('托運單號:'. get_post_meta( $order->get_id(), '_wooecpay_logistic_BookingNote', true ) . '
') ;
+ echo wp_kses_post('廠商交易編號:'. get_post_meta( $order->get_id(), '_wooecpay_logistic_merchant_trade_no', true ) . '
') ;
+ echo wp_kses_post('綠界物流編號:'. get_post_meta( $order->get_id(), '_wooecpay_logistic_AllPayLogisticsID', true ) . '
') ;
+ echo wp_kses_post('寄貨編號:'. get_post_meta( $order->get_id(), '_wooecpay_logistic_CVSPaymentNo', true ) . '
') ;
+ echo wp_kses_post('托運單號:'. get_post_meta( $order->get_id(), '_wooecpay_logistic_BookingNote', true ) . '
') ;
}
// 產生地圖按鈕兒
if ($map_button) {
-
- // 組合地圖FORM
- $api_logistic_info = $this->logisticHelper->get_ecpay_logistic_api_info('map');
- $client_back_url = WC()->api_request_url('wooecpay_change_logistic_map_callback', true);
- $MerchantTradeNo = $this->logisticHelper->get_merchant_trade_no($order->get_id(), get_option('wooecpay_logistic_order_prefix'));
- $LogisticsType = $this->logisticHelper->get_logistics_sub_type($shipping_method_id) ;
-
- try {
- $factory = new Factory([
- 'hashKey' => $api_logistic_info['hashKey'],
- 'hashIv' => $api_logistic_info['hashIv'],
- 'hashMethod' => 'md5',
- ]);
- $autoSubmitFormService = $factory->create('AutoSubmitFormWithCmvService');
-
- $inputMap = [
- 'MerchantID' => $api_logistic_info['merchant_id'],
- 'MerchantTradeNo' => $MerchantTradeNo,
- 'LogisticsType' => $LogisticsType['type'],
- 'LogisticsSubType' => $LogisticsType['sub_type'],
- 'IsCollection' => 'Y',
- 'ServerReplyURL' => $client_back_url,
- ];
-
- $form_map = $autoSubmitFormService->generate($inputMap, $api_logistic_info['action'], 'ecpay_map');
- $form_map = str_replace('', '', $form_map) ;
- $form_map = str_replace('', '', $form_map) ;
- $form_map = str_replace('', '', $form_map) ;
-
- echo '';
- echo $form_map ;
+ // 組合地圖FORM
+ $form_map = $this->logisticHelper->generate_ecpay_map_form($shipping_method_id, $order->get_id());
+ $form_map = str_replace('', '', $form_map) ;
+ $form_map = str_replace('', '', $form_map) ;
+ $form_map = str_replace('', '', $form_map) ;
- } catch (RtnException $e) {
- echo wp_kses_post( '(' . $e->getCode() . ')' . $e->getMessage() ) . PHP_EOL;
- }
-
+ echo '';
+ echo $form_map ;
echo ' ';
}
// 產生按鈕
if ($logistic_order_button) {
- echo 'get_id().');\'>';
+ echo 'get_id().');\'>';
}
// 列印訂單按鈕判斷
if ($logistic_print_button) {
-
+
$api_logistic_info = $this->logisticHelper->get_ecpay_logistic_api_info('print', $shipping_method_id);
-
- $AllPayLogisticsID = get_post_meta( $order->get_id(), '_wooecpay_logistic_AllPayLogisticsID', true ) ;
- $CVSPaymentNo = get_post_meta( $order->get_id(), '_wooecpay_logistic_CVSPaymentNo', true ) ;
- $CVSValidationNo = get_post_meta( $order->get_id(), '_wooecpay_logistic_CVSValidationNo', true ) ;
+
+ $AllPayLogisticsID = get_post_meta($order->get_id(), '_wooecpay_logistic_AllPayLogisticsID', true);
+ $CVSPaymentNo = get_post_meta($order->get_id(), '_wooecpay_logistic_CVSPaymentNo', true);
+ $CVSValidationNo = get_post_meta($order->get_id(), '_wooecpay_logistic_CVSValidationNo', true);
// 組合送綠界物流列印參數
- $inputPrint['MerchantID'] = $api_logistic_info['merchant_id'] ;
- $inputPrint['AllPayLogisticsID'] = $AllPayLogisticsID ;
+ $inputPrint['MerchantID'] = $api_logistic_info['merchant_id'];
+ $inputPrint['AllPayLogisticsID'] = $AllPayLogisticsID;
switch ($shipping_method_id) {
case 'Wooecpay_Logistic_CVS_711':
+ case 'Wooecpay_Logistic_CVS_711_Outside':
$inputPrint['CVSPaymentNo'] = $CVSPaymentNo ;
$inputPrint['CVSValidationNo'] = $CVSValidationNo ;
- break;
+ break;
case 'Wooecpay_Logistic_CVS_Family':
case 'Wooecpay_Logistic_CVS_Hilife':
case 'Wooecpay_Logistic_CVS_Okmart':
$inputPrint['CVSPaymentNo'] = $CVSPaymentNo ;
- break;
+ break;
case 'Wooecpay_Logistic_Home_Tcat':
+ case 'Wooecpay_Logistic_Home_Tcat_Outside':
case 'Wooecpay_Logistic_Home_Ecan':
case 'Wooecpay_Logistic_Home_Post':
- break;
-
+ break;
+
default:
- break;
+ break;
}
try {
-
+
$factory = new Factory([
'hashKey' => $api_logistic_info['hashKey'],
'hashIv' => $api_logistic_info['hashIv'],
@@ -636,12 +601,12 @@ public function logistic_button_display($order) {
$autoSubmitFormService = $factory->create('AutoSubmitFormWithCmvService');
$form_print = $autoSubmitFormService->generate($inputPrint, $api_logistic_info['action'], '_Blank','ecpay_print');
- $form_print = str_replace('', '', $form_print) ;
- $form_print = str_replace('', '', $form_print) ;
- $form_print = str_replace('', '', $form_print) ;
-
- echo '';
- echo $form_print ;
+ $form_print = str_replace('', '', $form_print);
+ $form_print = str_replace('', '', $form_print);
+ $form_print = str_replace('', '', $form_print);
+
+ echo '';
+ echo $form_print;
} catch (RtnException $e) {
echo wp_kses_post( '(' . $e->getCode() . ')' . $e->getMessage() ) . PHP_EOL;
@@ -659,7 +624,7 @@ public function logistic_button_display($order) {
/**
* 產生物流訂單
*/
- public function ajax_send_logistic_order_action()
+ public function ajax_send_logistic_order_action()
{
$this->logisticHelper->send_logistic_order_action();
}
@@ -678,24 +643,23 @@ public function ajax_send_invoice_create()
*/
public function invoice_create($order_id)
{
-
- if ($order = wc_get_order($order_id)){
+ if ($order = wc_get_order($order_id)) {
// 判斷發票是否存在 不存在則開立
$wooecpay_invoice_process = get_post_meta( $order->get_id(), '_wooecpay_invoice_process', true ) ;
- if(empty($wooecpay_invoice_process)){
+ if (empty($wooecpay_invoice_process)) {
$wooecpay_invoice_dalay_date = get_option('wooecpay_invoice_dalay_date') ;
$wooecpay_invoice_dalay_date = (int) $wooecpay_invoice_dalay_date ;
- if(empty($wooecpay_invoice_dalay_date)){
-
+ if (empty($wooecpay_invoice_dalay_date)) {
+
// 立即開立
$api_payment_info = $this->get_ecpay_invoice_api_info('issue');
$RelateNumber = $this->get_relate_number($order->get_id(), get_option('wooecpay_invoice_prefix'));
-
+
try {
$factory = new Factory([
'hashKey' => $api_payment_info['hashKey'],
@@ -704,33 +668,35 @@ public function invoice_create($order_id)
$postService = $factory->create('PostWithAesJsonResponseService');
- $items = [] ;
+ $Items = [] ;
foreach ( $order->get_items() as $item_id => $item ) {
+ $item_price = round(($item->get_total() + $item->get_total_tax()) / $item->get_quantity(), 4);
+ $item_amount = round($item_price * $item->get_quantity(), 2);
$Items[] = [
'ItemName' => mb_substr($item->get_name(), 0, 100),
'ItemCount' => $item->get_quantity(),
'ItemWord' => '批',
- 'ItemPrice' => round($item->get_total() / $item->get_quantity(), 4),
+ 'ItemPrice' => $item_price,
'ItemTaxType' => '1',
- 'ItemAmount' => round($item->get_total(), 2),
+ 'ItemAmount' => $item_amount,
] ;
}
// 物流費用
- $shipping_fee = $order->get_shipping_total();
- if ($shipping_fee != 0) {
-
- $Items[] = [
- 'ItemName' => __('Shipping fee', 'ecpay-ecommerce-for-woocommerce'),
- 'ItemCount' => 1,
- 'ItemWord' => '批',
- 'ItemPrice' => $shipping_fee,
- 'ItemTaxType' => '1',
- 'ItemAmount' => $shipping_fee,
- ] ;
- }
+ $shipping_fee = $order->get_shipping_total() + $order->get_shipping_tax();
+ if ($shipping_fee != 0) {
+
+ $Items[] = [
+ 'ItemName' => __('Shipping fee', 'ecpay-ecommerce-for-woocommerce'),
+ 'ItemCount' => 1,
+ 'ItemWord' => '批',
+ 'ItemPrice' => $shipping_fee,
+ 'ItemTaxType' => '1',
+ 'ItemAmount' => $shipping_fee,
+ ] ;
+ }
$country = $order->get_billing_country();
$countries = WC()->countries->get_countries();
@@ -740,112 +706,111 @@ public function invoice_create($order_id)
$states = WC()->countries->get_states($country);
$full_state = ($state && isset($states[$state])) ? $states[$state] : $state;
- $data = [
- 'MerchantID' => $api_payment_info['merchant_id'],
- 'RelateNumber' => $RelateNumber,
- 'CustomerID' => '',
- 'CustomerName' => $order->get_billing_last_name() . $order->get_billing_first_name(),
- 'CustomerAddr' => $full_country . $full_state . $order->get_billing_city() . $order->get_billing_address_1() . $order->get_billing_address_2(),
+ $data = [
+ 'MerchantID' => $api_payment_info['merchant_id'],
+ 'RelateNumber' => $RelateNumber,
+ 'CustomerID' => '',
+ 'CustomerName' => $order->get_billing_last_name() . $order->get_billing_first_name(),
+ 'CustomerAddr' => $full_country . $full_state . $order->get_billing_city() . $order->get_billing_address_1() . $order->get_billing_address_2(),
'CustomerPhone' => $order->get_billing_phone(),
'CustomerEmail' => $order->get_billing_email(),
- 'Print' => '0',
- 'Donation' => '0',
- 'LoveCode' => '',
- 'CarrierType' => '',
- 'CarrierNum' => '',
- 'TaxType' => '1',
- 'SalesAmount' => intval(round($order->get_total(), 0)),
- 'Items' => $Items,
- 'InvType' => '07'
+ 'Print' => '0',
+ 'Donation' => '0',
+ 'LoveCode' => '',
+ 'CarrierType' => '',
+ 'CarrierNum' => '',
+ 'TaxType' => '1',
+ 'SalesAmount' => intval(round($order->get_total(), 0)),
+ 'Items' => $Items,
+ 'InvType' => '07'
];
- $wooecpay_invoice_type = get_post_meta( $order->get_id(), '_wooecpay_invoice_type', true ) ;
- $wooecpay_invoice_carruer_type = get_post_meta( $order->get_id(), '_wooecpay_invoice_carruer_type', true ) ;
-
- switch ($wooecpay_invoice_type) {
-
- case 'p':
- switch ($wooecpay_invoice_carruer_type ) {
-
- case '1':
- $data['CarrierType'] = '1';
- break;
-
- case '2':
- $data['CarrierType'] = '2';
- $data['CarrierNum'] = get_post_meta( $order->get_id(), '_wooecpay_invoice_carruer_num', true ) ;
- break;
-
- case '3':
- $data['CarrierType'] = '3';
- $data['CarrierNum'] = get_post_meta( $order->get_id(), '_wooecpay_invoice_carruer_num', true ) ;
- break;
-
- default:
- $data['Print'] = '1';
- break;
- }
-
- break;
-
- case 'c':
- $data['Print'] = '1';
- $data['CustomerIdentifier'] = get_post_meta( $order->get_id(), '_wooecpay_invoice_customer_identifier', true ) ;
- $company = $order->get_billing_company();
- if ($company) {
- $data['CustomerName'] = $company;
- }
- break;
-
- case 'd':
- $data['Donation'] = '1';
- $data['LoveCode'] = get_post_meta( $order->get_id(), '_wooecpay_invoice_love_code', true ) ;
- break;
-
- }
-
- $input = [
- 'MerchantID' => $api_payment_info['merchant_id'],
- 'RqHeader' => [
- 'Timestamp' => time(),
- 'Revision' => '3.0.0',
- ],
- 'Data' => $data,
- ];
-
- $response = $postService->post($input, $api_payment_info['action']);
-
- if($response['TransCode'] == 1){
-
- if($response['Data']['RtnCode'] == 1){
-
- // 更新訂單
- $order->update_meta_data( '_wooecpay_invoice_relate_number', $RelateNumber );
- $order->update_meta_data( '_wooecpay_invoice_RtnCode', $response['Data']['RtnCode'] );
- $order->update_meta_data( '_wooecpay_invoice_RtnMsg', $response['Data']['RtnMsg'] );
- $order->update_meta_data( '_wooecpay_invoice_no', $response['Data']['InvoiceNo'] );
- $order->update_meta_data( '_wooecpay_invoice_date', $response['Data']['InvoiceDate'] );
- $order->update_meta_data( '_wooecpay_invoice_random_number', $response['Data']['RandomNumber']);
-
- $order->update_meta_data( '_wooecpay_invoice_process', 1); // 執行開立完成
- $order->update_meta_data( '_wooecpay_invoice_issue_type', 1); // 開立類型 1.立即開立 2.延遲開立
+ $wooecpay_invoice_type = get_post_meta($order->get_id(), '_wooecpay_invoice_type', true);
+ $wooecpay_invoice_carruer_type = get_post_meta($order->get_id(), '_wooecpay_invoice_carruer_type', true);
- $order->add_order_note('發票開立成功:狀態:' . $response['Data']['RtnMsg'] . '('. $response['Data']['RtnCode'] . ')');
+ switch ($wooecpay_invoice_type) {
+
+ case 'p':
+ switch ($wooecpay_invoice_carruer_type ) {
+
+ case '1':
+ $data['CarrierType'] = '1';
+ break;
+
+ case '2':
+ $data['CarrierType'] = '2';
+ $data['CarrierNum'] = get_post_meta( $order->get_id(), '_wooecpay_invoice_carruer_num', true );
+ break;
+
+ case '3':
+ $data['CarrierType'] = '3';
+ $data['CarrierNum'] = get_post_meta( $order->get_id(), '_wooecpay_invoice_carruer_num', true );
+ break;
+
+ default:
+ $data['Print'] = '1';
+ break;
+ }
+ break;
+
+ case 'c':
+ $data['Print'] = '1';
+ $data['CustomerIdentifier'] = get_post_meta( $order->get_id(), '_wooecpay_invoice_customer_identifier', true);
+ $company = $order->get_billing_company();
+ if ($company) {
+ $data['CustomerName'] = $company;
+ }
+ break;
+
+ case 'd':
+ $data['Donation'] = '1';
+ $data['LoveCode'] = get_post_meta( $order->get_id(), '_wooecpay_invoice_love_code', true);
+ break;
+
+ }
+
+ $input = [
+ 'MerchantID' => $api_payment_info['merchant_id'],
+ 'RqHeader' => [
+ 'Timestamp' => time(),
+ 'Revision' => '3.0.0',
+ ],
+ 'Data' => $data,
+ ];
+
+ $response = $postService->post($input, $api_payment_info['action']);
+
+ if ($response['TransCode'] == 1) {
+
+ if ($response['Data']['RtnCode'] == 1) {
+
+ // 更新訂單
+ $order->update_meta_data('_wooecpay_invoice_relate_number', $RelateNumber);
+ $order->update_meta_data('_wooecpay_invoice_RtnCode', $response['Data']['RtnCode']);
+ $order->update_meta_data('_wooecpay_invoice_RtnMsg', $response['Data']['RtnMsg']);
+ $order->update_meta_data('_wooecpay_invoice_no', $response['Data']['InvoiceNo']);
+ $order->update_meta_data('_wooecpay_invoice_date', $response['Data']['InvoiceDate']);
+ $order->update_meta_data('_wooecpay_invoice_random_number', $response['Data']['RandomNumber']);
+
+ $order->update_meta_data('_wooecpay_invoice_process', 1); // 執行開立完成
+ $order->update_meta_data('_wooecpay_invoice_issue_type', 1); // 開立類型 1.立即開立 2.延遲開立
+
+ $order->add_order_note('發票開立成功:狀態:' . $response['Data']['RtnMsg'] . '(' . $response['Data']['RtnCode'] . ')');
$order->save();
- } else {
+ } else {
- $order->add_order_note('發票開立失敗:狀態:' . $response['Data']['RtnMsg'] . '('. $response['Data']['RtnCode'] . ')');
+ $order->add_order_note('發票開立失敗:狀態:' . $response['Data']['RtnMsg'] . '(' . $response['Data']['RtnCode'] . ')');
$order->save();
- }
+ }
- } else {
+ } else {
- $order->add_order_note('發票開立失敗:狀態:' . $response['TransMsg'] . '('. $response['TransCode'] . ')');
+ $order->add_order_note('發票開立失敗:狀態:' . $response['TransMsg'] . '(' . $response['TransCode'] . ')');
$order->save();
- }
+ }
- $ajaxReturn = [
+ $ajaxReturn = [
'code' => '9999',
'msg' => '成功',
];
@@ -855,47 +820,47 @@ public function invoice_create($order_id)
}
} else {
-
+
// 延遲開立
$api_payment_info = $this->get_ecpay_invoice_api_info('delay_issue');
$RelateNumber = $this->get_relate_number($order->get_id(), get_option('wooecpay_invoice_prefix'));
-
+
try {
- $factory = new Factory([
- 'hashKey' => $api_payment_info['hashKey'],
- 'hashIv' => $api_payment_info['hashIv'],
- ]);
+ $factory = new Factory([
+ 'hashKey' => $api_payment_info['hashKey'],
+ 'hashIv' => $api_payment_info['hashIv'],
+ ]);
- $postService = $factory->create('PostWithAesJsonResponseService');
+ $postService = $factory->create('PostWithAesJsonResponseService');
- $items = [] ;
+ $items = [];
- foreach ( $order->get_items() as $item_id => $item ) {
+ foreach ($order->get_items() as $item_id => $item ) {
- $Items[] = [
+ $Items[] = [
'ItemName' => mb_substr($item->get_name(), 0, 100),
'ItemCount' => $item->get_quantity(),
'ItemWord' => '批',
'ItemPrice' => round($item->get_total() / $item->get_quantity(), 4),
'ItemTaxType' => '1',
'ItemAmount' => round($item->get_total(), 2),
- ] ;
- }
+ ] ;
+ }
- // 物流費用
- $shipping_fee = $order->get_shipping_total();
- if ($shipping_fee != 0) {
+ // 物流費用
+ $shipping_fee = $order->get_shipping_total();
+ if ($shipping_fee != 0) {
- $Items[] = [
+ $Items[] = [
'ItemName' => __('Shipping fee', 'ecpay-ecommerce-for-woocommerce'),
'ItemCount' => 1,
'ItemWord' => '批',
'ItemPrice' => $shipping_fee,
- 'ItemTaxType' => '1',
+ 'ItemTaxType' => '1',
'ItemAmount' => $shipping_fee,
- ] ;
- }
+ ] ;
+ }
$country = $order->get_billing_country();
$countries = WC()->countries->get_countries();
@@ -905,105 +870,105 @@ public function invoice_create($order_id)
$states = WC()->countries->get_states($country);
$full_state = ($state && isset($states[$state])) ? $states[$state] : $state;
- $data = [
- 'MerchantID' => $api_payment_info['merchant_id'],
- 'RelateNumber' => $RelateNumber,
- 'CustomerID' => '',
- 'CustomerName' => $order->get_billing_last_name() . $order->get_billing_first_name(),
- 'CustomerAddr' => $full_country . $full_state . $order->get_billing_city() . $order->get_billing_address_1() . $order->get_billing_address_2(),
- 'CustomerPhone' => $order->get_billing_phone(),
- 'CustomerEmail' => $order->get_billing_email(),
- 'Print' => '0',
- 'Donation' => '0',
- 'LoveCode' => '',
- 'CarrierType' => '',
- 'CarrierNum' => '',
- 'TaxType' => '1',
- 'SalesAmount' => intval(round($order->get_total(), 0)),
- 'Items' => $Items,
- 'InvType' => '07',
-
- 'DelayFlag' => '1',
- 'DelayDay' => $wooecpay_invoice_dalay_date,
- 'Tsr' => $RelateNumber,
- 'PayType' => '2',
- 'PayAct' => 'ECPAY',
- 'NotifyURL' => WC()->api_request_url('wooecpay_invoice_delay_issue_callback', true),
- ];
-
- $wooecpay_invoice_type = get_post_meta( $order->get_id(), '_wooecpay_invoice_type', true ) ;
- $wooecpay_invoice_carruer_type = get_post_meta( $order->get_id(), '_wooecpay_invoice_carruer_type', true ) ;
-
- switch ($wooecpay_invoice_type) {
-
- case 'p':
-
- switch ($wooecpay_invoice_carruer_type ) {
- case '1':
- $data['CarrierType'] = '1';
- break;
- case '2':
- $data['CarrierType'] = '2';
- $data['CarrierNum'] = get_post_meta( $order->get_id(), '_wooecpay_invoice_carruer_num', true ) ;
- break;
- case '3':
- $data['CarrierType'] = '3';
- $data['CarrierNum'] = get_post_meta( $order->get_id(), '_wooecpay_invoice_carruer_num', true ) ;
- break;
- default:
- $data['Print'] = '1';
- break;
- }
-
- break;
-
- case 'c':
- $data['Print'] = '1';
- $data['CustomerIdentifier'] = get_post_meta( $order->get_id(), '_wooecpay_invoice_customer_identifier', true ) ;
- $company = $order->get_billing_company();
- if ($company) {
- $data['CustomerName'] = $company;
- }
- break;
-
- case 'd':
- $data['Donation'] = '1';
- $data['LoveCode'] = get_post_meta( $order->get_id(), '_wooecpay_invoice_love_code', true ) ;
- break;
- }
-
- $input = [
- 'MerchantID' => $api_payment_info['merchant_id'],
- 'RqHeader' => [
- 'Timestamp' => time(),
- 'Revision' => '3.0.0',
- ],
- 'Data' => $data,
- ];
-
- $response = $postService->post($input, $api_payment_info['action']);
-
- if($response['TransCode'] == 1){
-
- if($response['Data']['RtnCode'] == 1){
-
- // 更新訂單
- $order->update_meta_data( '_wooecpay_invoice_relate_number', $RelateNumber );
- $order->update_meta_data( '_wooecpay_invoice_RtnCode', $response['Data']['RtnCode'] );
- $order->update_meta_data( '_wooecpay_invoice_RtnMsg', $response['Data']['RtnMsg'] );
-
- $order->update_meta_data( '_wooecpay_invoice_process', 1); // 執行開立完成
- $order->update_meta_data( '_wooecpay_invoice_issue_type', 2); // 開立類型 1.立即開立 2.延遲開立
- $order->update_meta_data( '_wooecpay_invoice_tsr', $RelateNumber); // 交易單號
-
+ $data = [
+ 'MerchantID' => $api_payment_info['merchant_id'],
+ 'RelateNumber' => $RelateNumber,
+ 'CustomerID' => '',
+ 'CustomerName' => $order->get_billing_last_name() . $order->get_billing_first_name(),
+ 'CustomerAddr' => $full_country . $full_state . $order->get_billing_city() . $order->get_billing_address_1() . $order->get_billing_address_2(),
+ 'CustomerPhone' => $order->get_billing_phone(),
+ 'CustomerEmail' => $order->get_billing_email(),
+ 'Print' => '0',
+ 'Donation' => '0',
+ 'LoveCode' => '',
+ 'CarrierType' => '',
+ 'CarrierNum' => '',
+ 'TaxType' => '1',
+ 'SalesAmount' => intval(round($order->get_total(), 0)),
+ 'Items' => $Items,
+ 'InvType' => '07',
+
+ 'DelayFlag' => '1',
+ 'DelayDay' => $wooecpay_invoice_dalay_date,
+ 'Tsr' => $RelateNumber,
+ 'PayType' => '2',
+ 'PayAct' => 'ECPAY',
+ 'NotifyURL' => WC()->api_request_url('wooecpay_invoice_delay_issue_callback', true),
+ ];
+
+ $wooecpay_invoice_type = get_post_meta( $order->get_id(), '_wooecpay_invoice_type', true);
+ $wooecpay_invoice_carruer_type = get_post_meta( $order->get_id(), '_wooecpay_invoice_carruer_type', true);
+
+ switch ($wooecpay_invoice_type) {
+
+ case 'p':
+
+ switch ($wooecpay_invoice_carruer_type ) {
+ case '1':
+ $data['CarrierType'] = '1';
+ break;
+ case '2':
+ $data['CarrierType'] = '2';
+ $data['CarrierNum'] = get_post_meta( $order->get_id(), '_wooecpay_invoice_carruer_num', true);
+ break;
+ case '3':
+ $data['CarrierType'] = '3';
+ $data['CarrierNum'] = get_post_meta( $order->get_id(), '_wooecpay_invoice_carruer_num', true);
+ break;
+ default:
+ $data['Print'] = '1';
+ break;
+ }
+
+ break;
+
+ case 'c':
+ $data['Print'] = '1';
+ $data['CustomerIdentifier'] = get_post_meta( $order->get_id(), '_wooecpay_invoice_customer_identifier', true);
+ $company = $order->get_billing_company();
+ if ($company) {
+ $data['CustomerName'] = $company;
+ }
+ break;
+
+ case 'd':
+ $data['Donation'] = '1';
+ $data['LoveCode'] = get_post_meta( $order->get_id(), '_wooecpay_invoice_love_code', true);
+ break;
+ }
+
+ $input = [
+ 'MerchantID' => $api_payment_info['merchant_id'],
+ 'RqHeader' => [
+ 'Timestamp' => time(),
+ 'Revision' => '3.0.0',
+ ],
+ 'Data' => $data,
+ ];
+
+ $response = $postService->post($input, $api_payment_info['action']);
+
+ if ($response['TransCode'] == 1) {
+
+ if ($response['Data']['RtnCode'] == 1) {
+
+ // 更新訂單
+ $order->update_meta_data('_wooecpay_invoice_relate_number', $RelateNumber);
+ $order->update_meta_data('_wooecpay_invoice_RtnCode', $response['Data']['RtnCode']);
+ $order->update_meta_data('_wooecpay_invoice_RtnMsg', $response['Data']['RtnMsg']);
+
+ $order->update_meta_data('_wooecpay_invoice_process', 1); // 執行開立完成
+ $order->update_meta_data('_wooecpay_invoice_issue_type', 2); // 開立類型 1.立即開立 2.延遲開立
+ $order->update_meta_data('_wooecpay_invoice_tsr', $RelateNumber); // 交易單號
+
$order->add_order_note('發票開立成功:狀態:' . $response['Data']['RtnMsg'] . '('. $response['Data']['RtnCode'] . ')');
$order->save();
- } else {
+ } else {
- $order->add_order_note('發票開立失敗:狀態:' . $response['Data']['RtnMsg'] . '('. $response['Data']['RtnCode'] . ')');
+ $order->add_order_note('發票開立失敗:狀態:' . $response['Data']['RtnMsg'] . '('. $response['Data']['RtnCode'] . ')');
$order->save();
- }
+ }
} else {
@@ -1011,13 +976,13 @@ public function invoice_create($order_id)
$order->save();
}
- $ajaxReturn = [
+ $ajaxReturn = [
'code' => '9999',
'msg' => '成功',
];
} catch (RtnException $e) {
- echo wp_kses_post( '(' . $e->getCode() . ')' . $e->getMessage() ) . PHP_EOL;
+ echo wp_kses_post( '(' . $e->getCode() . ')' . $e->getMessage() ) . PHP_EOL;
}
}
}
@@ -1038,17 +1003,16 @@ public function ajax_send_invoice_invalid()
*/
public function invoice_invalid($order_id)
{
-
- if ($order = wc_get_order($order_id)){
+ if ($order = wc_get_order($order_id)) {
// 判斷發票是否存在 存在則才可以執行作廢
$wooecpay_invoice_process = get_post_meta( $order->get_id(), '_wooecpay_invoice_process', true ) ;
- if($wooecpay_invoice_process == 1){
+ if ($wooecpay_invoice_process == 1) {
$wooecpay_invoice_issue_type = get_post_meta( $order->get_id(), '_wooecpay_invoice_issue_type', true ) ;
- if($wooecpay_invoice_issue_type == 1){
+ if ($wooecpay_invoice_issue_type == 1) {
$api_payment_info = $this->get_ecpay_invoice_api_info('invalid');
@@ -1058,97 +1022,97 @@ public function invoice_invalid($order_id)
// 作廢發票
try {
- $factory = new Factory([
- 'hashKey' => $api_payment_info['hashKey'],
- 'hashIv' => $api_payment_info['hashIv'],
- ]);
-
- $postService = $factory->create('PostWithAesJsonResponseService');
-
- $data = [
- 'MerchantID' => $api_payment_info['merchant_id'],
- 'InvoiceNo' => $wooecpay_invoice_no,
- 'InvoiceDate' => $wooecpay_invoice_date,
- 'Reason' => __('Invalid invoice', 'ecpay-ecommerce-for-woocommerce'),
- ];
-
- $input = [
- 'MerchantID' => $api_payment_info['merchant_id'],
- 'RqHeader' => [
- 'Timestamp' => time(),
- 'Revision' => '3.0.0',
- ],
- 'Data' => $data,
- ];
-
- $response = $postService->post($input, $api_payment_info['action']);
-
- // var_dump($response);
- if($response['Data']['RtnCode'] == 1 || $response['Data']['RtnCode'] == 5070453){
-
- // 更新訂單
- $order->update_meta_data( '_wooecpay_invoice_relate_number', '');
- $order->update_meta_data( '_wooecpay_invoice_RtnCode', '');
- $order->update_meta_data( '_wooecpay_invoice_RtnMsg', '' );
- $order->update_meta_data( '_wooecpay_invoice_no', '' );
- $order->update_meta_data( '_wooecpay_invoice_date', '' );
- $order->update_meta_data( '_wooecpay_invoice_random_number', '');
+ $factory = new Factory([
+ 'hashKey' => $api_payment_info['hashKey'],
+ 'hashIv' => $api_payment_info['hashIv'],
+ ]);
+
+ $postService = $factory->create('PostWithAesJsonResponseService');
+
+ $data = [
+ 'MerchantID' => $api_payment_info['merchant_id'],
+ 'InvoiceNo' => $wooecpay_invoice_no,
+ 'InvoiceDate' => $wooecpay_invoice_date,
+ 'Reason' => __('Invalid invoice', 'ecpay-ecommerce-for-woocommerce'),
+ ];
+
+ $input = [
+ 'MerchantID' => $api_payment_info['merchant_id'],
+ 'RqHeader' => [
+ 'Timestamp' => time(),
+ 'Revision' => '3.0.0',
+ ],
+ 'Data' => $data,
+ ];
+
+ $response = $postService->post($input, $api_payment_info['action']);
+
+ // var_dump($response);
+ if ($response['Data']['RtnCode'] == 1 || $response['Data']['RtnCode'] == 5070453) {
+
+ // 更新訂單
+ $order->update_meta_data( '_wooecpay_invoice_relate_number', '');
+ $order->update_meta_data( '_wooecpay_invoice_RtnCode', '');
+ $order->update_meta_data( '_wooecpay_invoice_RtnMsg', '' );
+ $order->update_meta_data( '_wooecpay_invoice_no', '' );
+ $order->update_meta_data( '_wooecpay_invoice_date', '' );
+ $order->update_meta_data( '_wooecpay_invoice_random_number', '');
$order->update_meta_data( '_wooecpay_invoice_process', 0); // 執行開立完成
$order->update_meta_data( '_wooecpay_invoice_issue_type', ''); // 開立類型 1.立即開立 2.延遲開立
$order->add_order_note('發票作廢成功: 發票號碼:' .$wooecpay_invoice_no . ' 狀態:' . $response['Data']['RtnMsg'] . '('. $response['Data']['RtnCode'] . ')');
$order->save();
-
+
} else {
- $order->add_order_note('發票作廢失敗:狀態:' . $response['Data']['RtnMsg'] . '('. $response['Data']['RtnCode'] . ')');
+ $order->add_order_note('發票作廢失敗:狀態:' . $response['Data']['RtnMsg'] . '('. $response['Data']['RtnCode'] . ')');
$order->save();
- }
+ }
} catch (RtnException $e) {
echo wp_kses_post( '(' . $e->getCode() . ')' . $e->getMessage() ) . PHP_EOL;
}
- } else if($wooecpay_invoice_issue_type == 2){
+ } else if ($wooecpay_invoice_issue_type == 2) {
$api_payment_info = $this->get_ecpay_invoice_api_info('cancel_delay_issue');
$wooecpay_invoice_tsr = get_post_meta( $order->get_id(), '_wooecpay_invoice_tsr', true ) ;
try {
- $factory = new Factory([
- 'hashKey' => $api_payment_info['hashKey'],
- 'hashIv' => $api_payment_info['hashIv'],
- ]);
-
- $postService = $factory->create('PostWithAesJsonResponseService');
- $data = [
- 'MerchantID' => $api_payment_info['merchant_id'],
- 'Tsr' => $wooecpay_invoice_tsr,
- ];
-
- $input = [
- 'MerchantID' => $api_payment_info['merchant_id'],
- 'RqHeader' => [
- 'Timestamp' => time(),
- 'Revision' => '3.0.0',
- ],
- 'Data' => $data,
- ];
-
- $response = $postService->post($input, $api_payment_info['action']);
-
- if($response['Data']['RtnCode'] == 1){
-
- // 更新訂單
- $order->update_meta_data( '_wooecpay_invoice_relate_number', '');
- $order->update_meta_data( '_wooecpay_invoice_RtnCode', '');
- $order->update_meta_data( '_wooecpay_invoice_RtnMsg', '' );
- $order->update_meta_data( '_wooecpay_invoice_no', '' );
- $order->update_meta_data( '_wooecpay_invoice_date', '' );
- $order->update_meta_data( '_wooecpay_invoice_random_number', '');
- $order->update_meta_data( '_wooecpay_invoice_tsr', ''); // 交易單號
+ $factory = new Factory([
+ 'hashKey' => $api_payment_info['hashKey'],
+ 'hashIv' => $api_payment_info['hashIv'],
+ ]);
+
+ $postService = $factory->create('PostWithAesJsonResponseService');
+ $data = [
+ 'MerchantID' => $api_payment_info['merchant_id'],
+ 'Tsr' => $wooecpay_invoice_tsr,
+ ];
+
+ $input = [
+ 'MerchantID' => $api_payment_info['merchant_id'],
+ 'RqHeader' => [
+ 'Timestamp' => time(),
+ 'Revision' => '3.0.0',
+ ],
+ 'Data' => $data,
+ ];
+
+ $response = $postService->post($input, $api_payment_info['action']);
+
+ if ($response['Data']['RtnCode'] == 1) {
+
+ // 更新訂單
+ $order->update_meta_data( '_wooecpay_invoice_relate_number', '');
+ $order->update_meta_data( '_wooecpay_invoice_RtnCode', '');
+ $order->update_meta_data( '_wooecpay_invoice_RtnMsg', '');
+ $order->update_meta_data( '_wooecpay_invoice_no', '');
+ $order->update_meta_data( '_wooecpay_invoice_date', '');
+ $order->update_meta_data( '_wooecpay_invoice_random_number', '');
+ $order->update_meta_data( '_wooecpay_invoice_tsr', ''); // 交易單號
$order->update_meta_data( '_wooecpay_invoice_process', 0); // 執行開立完成
$order->update_meta_data( '_wooecpay_invoice_issue_type', ''); // 開立類型 1.立即開立 2.延遲開立
@@ -1157,163 +1121,163 @@ public function invoice_invalid($order_id)
$order->save();
- } else {
+ } else {
- $order->add_order_note('發票作廢失敗:狀態:' . $response['Data']['RtnMsg'] . '('. $response['Data']['RtnCode'] . ')');
+ $order->add_order_note('發票作廢失敗:狀態:' . $response['Data']['RtnMsg'] . '('. $response['Data']['RtnCode'] . ')');
$order->save();
- }
+ }
} catch (RtnException $e) {
- echo wp_kses_post( '(' . $e->getCode() . ')' . $e->getMessage() ) . PHP_EOL;
+ echo wp_kses_post( '(' . $e->getCode() . ')' . $e->getMessage() ) . PHP_EOL;
}
}
}
}
}
- // invoice
- // ---------------------------------------------------
+ // invoice
+ // ---------------------------------------------------
protected function get_ecpay_invoice_api_info($action = '')
- {
- $api_info = [
- 'merchant_id' => '',
- 'hashKey' => '',
- 'hashIv' => '',
- 'action' => '',
- ] ;
-
- if ('yes' === get_option('wooecpay_enabled_invoice_stage', 'yes')) {
-
- $api_info = [
- 'merchant_id' => '2000132',
- 'hashKey' => 'ejCk326UnaZWKisg ',
- 'hashIv' => 'q9jcZX8Ib9LM8wYk',
- ] ;
-
- } else {
-
- $merchant_id = get_option('wooecpay_invoice_mid');
- $hash_key = get_option('wooecpay_invoice_hashkey');
- $hash_iv = get_option('wooecpay_invoice_hashiv');
-
- $api_info = [
- 'merchant_id' => $merchant_id,
- 'hashKey' => $hash_key,
- 'hashIv' => $hash_iv,
- ] ;
- }
-
- if ('yes' === get_option('wooecpay_enabled_invoice_stage', 'yes')) {
-
- switch ($action) {
-
- case 'check_Love_code':
- $api_info['action'] = 'https://einvoice-stage.ecpay.com.tw/B2CInvoice/CheckLoveCode' ;
- break;
-
- case 'check_barcode':
- $api_info['action'] = 'https://einvoice-stage.ecpay.com.tw/B2CInvoice/CheckBarcode' ;
- break;
-
- case 'issue':
- $api_info['action'] = 'https://einvoice-stage.ecpay.com.tw/B2CInvoice/Issue' ;
- break;
-
- case 'delay_issue':
- $api_info['action'] = 'https://einvoice-stage.ecpay.com.tw/B2CInvoice/DelayIssue' ;
- break;
-
- case 'invalid':
- $api_info['action'] = 'https://einvoice-stage.ecpay.com.tw/B2CInvoice/Invalid' ;
- break;
-
- case 'cancel_delay_issue':
- $api_info['action'] = 'https://einvoice-stage.ecpay.com.tw/B2CInvoice/CancelDelayIssue' ;
- break;
-
- default:
- break;
- }
-
- } else {
-
- switch ($action) {
-
- case 'check_Love_code':
- $api_info['action'] = 'https://einvoice.ecpay.com.tw/B2CInvoice/CheckLoveCode' ;
- break;
-
- case 'check_barcode':
- $api_info['action'] = 'https://einvoice.ecpay.com.tw/B2CInvoice/CheckBarcode' ;
- break;
-
- case 'issue':
- $api_info['action'] = 'https://einvoice.ecpay.com.tw/B2CInvoice/Issue' ;
- break;
-
- case 'delay_issue':
- $api_info['action'] = 'https://einvoice.ecpay.com.tw/B2CInvoice/DelayIssue' ;
- break;
-
- case 'invalid':
- $api_info['action'] = 'https://einvoice.ecpay.com.tw/B2CInvoice/Invalid' ;
- break;
-
- case 'cancel_delay_issue':
- $api_info['action'] = 'https://einvoice.ecpay.com.tw/B2CInvoice/CancelDelayIssue' ;
- break;
-
- default:
- break;
- }
- }
-
- return $api_info;
- }
+ {
+ $api_info = [
+ 'merchant_id' => '',
+ 'hashKey' => '',
+ 'hashIv' => '',
+ 'action' => '',
+ ] ;
+
+ if ('yes' === get_option('wooecpay_enabled_invoice_stage', 'yes')) {
+
+ $api_info = [
+ 'merchant_id' => '2000132',
+ 'hashKey' => 'ejCk326UnaZWKisg ',
+ 'hashIv' => 'q9jcZX8Ib9LM8wYk',
+ ] ;
+
+ } else {
+
+ $merchant_id = get_option('wooecpay_invoice_mid');
+ $hash_key = get_option('wooecpay_invoice_hashkey');
+ $hash_iv = get_option('wooecpay_invoice_hashiv');
+
+ $api_info = [
+ 'merchant_id' => $merchant_id,
+ 'hashKey' => $hash_key,
+ 'hashIv' => $hash_iv,
+ ] ;
+ }
+
+ if ('yes' === get_option('wooecpay_enabled_invoice_stage', 'yes')) {
+
+ switch ($action) {
+
+ case 'check_Love_code':
+ $api_info['action'] = 'https://einvoice-stage.ecpay.com.tw/B2CInvoice/CheckLoveCode' ;
+ break;
+
+ case 'check_barcode':
+ $api_info['action'] = 'https://einvoice-stage.ecpay.com.tw/B2CInvoice/CheckBarcode' ;
+ break;
+
+ case 'issue':
+ $api_info['action'] = 'https://einvoice-stage.ecpay.com.tw/B2CInvoice/Issue' ;
+ break;
+
+ case 'delay_issue':
+ $api_info['action'] = 'https://einvoice-stage.ecpay.com.tw/B2CInvoice/DelayIssue' ;
+ break;
+
+ case 'invalid':
+ $api_info['action'] = 'https://einvoice-stage.ecpay.com.tw/B2CInvoice/Invalid' ;
+ break;
+
+ case 'cancel_delay_issue':
+ $api_info['action'] = 'https://einvoice-stage.ecpay.com.tw/B2CInvoice/CancelDelayIssue' ;
+ break;
+
+ default:
+ break;
+ }
+
+ } else {
+
+ switch ($action) {
+
+ case 'check_Love_code':
+ $api_info['action'] = 'https://einvoice.ecpay.com.tw/B2CInvoice/CheckLoveCode' ;
+ break;
+
+ case 'check_barcode':
+ $api_info['action'] = 'https://einvoice.ecpay.com.tw/B2CInvoice/CheckBarcode' ;
+ break;
+
+ case 'issue':
+ $api_info['action'] = 'https://einvoice.ecpay.com.tw/B2CInvoice/Issue' ;
+ break;
+
+ case 'delay_issue':
+ $api_info['action'] = 'https://einvoice.ecpay.com.tw/B2CInvoice/DelayIssue' ;
+ break;
+
+ case 'invalid':
+ $api_info['action'] = 'https://einvoice.ecpay.com.tw/B2CInvoice/Invalid' ;
+ break;
+
+ case 'cancel_delay_issue':
+ $api_info['action'] = 'https://einvoice.ecpay.com.tw/B2CInvoice/CancelDelayIssue' ;
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ return $api_info;
+ }
protected function get_relate_number($order_id, $order_prefix = '')
- {
- $relate_no = $order_prefix . substr(str_pad($order_id, 8, '0', STR_PAD_LEFT), 0, 8) . 'SN' . substr(hash('sha256', (string) time()), -5) ;
- return substr($relate_no, 0, 20);
- }
-
- // payment
- // ---------------------------------------------------
- protected function get_ecpay_payment_api_query_trade_info()
- {
- $api_payment_info = [
- 'merchant_id' => '',
- 'hashKey' => '',
- 'hashIv' => '',
- 'action' => '',
- ] ;
-
- if ('yes' === get_option('wooecpay_enabled_payment_stage', 'yes')) {
-
- $api_payment_info = [
- 'merchant_id' => '3002607',
- 'hashKey' => 'pwFHCqoQZGmho4w6',
- 'hashIv' => 'EkRm7iFT261dpevs',
- 'action' => 'https://payment-stage.ecpay.com.tw/Cashier/QueryTradeInfo/V5',
- ] ;
-
- } else {
-
- $merchant_id = get_option('wooecpay_payment_mid');
- $hash_key = get_option('wooecpay_payment_hashkey');
- $hash_iv = get_option('wooecpay_payment_hashiv');
-
- $api_payment_info = [
- 'merchant_id' => $merchant_id,
- 'hashKey' => $hash_key,
- 'hashIv' => $hash_iv,
- 'action' => 'https://payment.ecpay.com.tw/Cashier/QueryTradeInfo/V5',
- ] ;
- }
-
- return $api_payment_info;
- }
+ {
+ $relate_no = $order_prefix . substr(str_pad($order_id, 8, '0', STR_PAD_LEFT), 0, 8) . 'SN' . substr(hash('sha256', (string) time()), -5) ;
+ return substr($relate_no, 0, 20);
+ }
+
+ // payment
+ // ---------------------------------------------------
+ protected function get_ecpay_payment_api_query_trade_info()
+ {
+ $api_payment_info = [
+ 'merchant_id' => '',
+ 'hashKey' => '',
+ 'hashIv' => '',
+ 'action' => '',
+ ] ;
+
+ if ('yes' === get_option('wooecpay_enabled_payment_stage', 'yes')) {
+
+ $api_payment_info = [
+ 'merchant_id' => '3002607',
+ 'hashKey' => 'pwFHCqoQZGmho4w6',
+ 'hashIv' => 'EkRm7iFT261dpevs',
+ 'action' => 'https://payment-stage.ecpay.com.tw/Cashier/QueryTradeInfo/V5',
+ ] ;
+
+ } else {
+
+ $merchant_id = get_option('wooecpay_payment_mid');
+ $hash_key = get_option('wooecpay_payment_hashkey');
+ $hash_iv = get_option('wooecpay_payment_hashiv');
+
+ $api_payment_info = [
+ 'merchant_id' => $merchant_id,
+ 'hashKey' => $hash_key,
+ 'hashIv' => $hash_iv,
+ 'action' => 'https://payment.ecpay.com.tw/Cashier/QueryTradeInfo/V5',
+ ] ;
+ }
+
+ return $api_payment_info;
+ }
}
diff --git a/ecpay-ecommerce-for-woocommerce/ecpay-ecommerce-for-woocommerce.php b/ecpay-ecommerce-for-woocommerce/ecpay-ecommerce-for-woocommerce.php
index 932eaa9..78a3a54 100644
--- a/ecpay-ecommerce-for-woocommerce/ecpay-ecommerce-for-woocommerce.php
+++ b/ecpay-ecommerce-for-woocommerce/ecpay-ecommerce-for-woocommerce.php
@@ -1,12 +1,12 @@
'no',
'desc' => __('Keep shipping phone', 'ecpay-ecommerce-for-woocommerce')
],
+ [
+ 'title' => __('Enable ECPay outlying islands shipping', 'ecpay-ecommerce-for-woocommerce'),
+ 'id' => 'wooecpay_enabled_logistic_outside',
+ 'type' => 'multiselect',
+ 'class' => 'wc-enhanced-select',
+ 'default' => '',
+ 'desc' => __('Notice:
1. The option will only appear in the 「Shipping Method」 after activation.
2. If 「Ecpay CVS 7-11」 outlying islands shipping is not enabled, there will be no distinction between outlying island and main island shipments; shipping settings will be shared.
3. If 「Ecpay CVS 7-11」 outlying islands shipping is enabled, after selecting a store, it will verify if the chosen store aligns with the selected shipping method.
4. If 「Ecpay Home Tcat」 outlying islands shipping is not enabled, there will be no distinction between outlying island and main island shipments; shipping settings will be shared.
5. If 「Ecpay Home Tcat」 outlying islands shipping is enabled, it will verify before checkout whether the shipping destination matches the selected shipping method.', 'ecpay-ecommerce-for-woocommerce'),
+ 'options' => [
+ 'Wooecpay_Logistic_CVS_711' => __('Ecpay CVS 7-11', 'ecpay-ecommerce-for-woocommerce'),
+ 'Wooecpay_Logistic_Home_Tcat' => __('Ecpay Home Tcat', 'ecpay-ecommerce-for-woocommerce'),
+ ],
+ 'custom_attributes' => [
+ 'data-placeholder' => __('Ecpay shipping methods ', 'ecpay-ecommerce-for-woocommerce'),
+ ],
+ ],
[
'type' => 'sectionend',
@@ -101,7 +116,7 @@
'name' => __( 'ECPay sandbox', 'ecpay-ecommerce-for-woocommerce'),
'type' => 'checkbox',
'desc' => __( 'ECPay sandbox', 'ecpay-ecommerce-for-woocommerce'),
- 'id' => 'wooecpay_enabled_logistic_stage',
+ 'id' => 'wooecpay_enabled_logistic_stage',
'default' => 'no',
'desc' => __('ECPay sandbox', 'ecpay-ecommerce-for-woocommerce')
],
diff --git a/ecpay-ecommerce-for-woocommerce/includes/services/helpers/logistic/ecpay-logistic-helper.php b/ecpay-ecommerce-for-woocommerce/includes/services/helpers/logistic/ecpay-logistic-helper.php
index a7e9c91..9e599ca 100644
--- a/ecpay-ecommerce-for-woocommerce/includes/services/helpers/logistic/ecpay-logistic-helper.php
+++ b/ecpay-ecommerce-for-woocommerce/includes/services/helpers/logistic/ecpay-logistic-helper.php
@@ -3,6 +3,7 @@
use Ecpay\Sdk\Factories\Factory;
use Ecpay\Sdk\Exceptions\RtnException;
+use Ecpay\Sdk\Services\AesService;
class Wooecpay_Logistic_Helper
{
@@ -17,44 +18,33 @@ public function send_logistic_order_action($order_id = '', $is_ajax = true)
'msg' => '',
];
- if ($order_id == '') $order_id = isset($_POST['order_id']) ? sanitize_text_field($_POST['order_id']) : '' ;
+ if ($order_id == '') $order_id = isset($_POST['order_id']) ? sanitize_text_field($_POST['order_id']) : '';
if ($order = wc_get_order($order_id)) {
// 取得物流方式
- $shipping_method_id = $order->get_items('shipping') ;
+ $shipping_method_id = $order->get_items('shipping');
if (!empty($shipping_method_id)) {
- $shipping_method_id = reset($shipping_method_id);
- $shipping_method_id = $shipping_method_id->get_method_id() ;
+ $shipping_method_id = reset($shipping_method_id);
+ $shipping_method_id = $shipping_method_id->get_method_id();
// 判斷是否為綠界物流 產生物流訂單
- if (
- $shipping_method_id == 'Wooecpay_Logistic_CVS_711' ||
- $shipping_method_id == 'Wooecpay_Logistic_CVS_Family' ||
- $shipping_method_id == 'Wooecpay_Logistic_CVS_Hilife' ||
- $shipping_method_id == 'Wooecpay_Logistic_CVS_Okmart' ||
- $shipping_method_id == 'Wooecpay_Logistic_Home_Tcat' ||
- $shipping_method_id == 'Wooecpay_Logistic_Home_Ecan' ||
- $shipping_method_id == 'Wooecpay_Logistic_Home_Post'
- ) {
-
- $LogisticsType = $this->get_logistics_sub_type($shipping_method_id) ;
+ if ($this->is_ecpay_logistics($shipping_method_id)) {
+
+ $LogisticsType = $this->get_logistics_sub_type($shipping_method_id);
$api_logistic_info = $this->get_ecpay_logistic_api_info('create');
$MerchantTradeNo = $this->get_merchant_trade_no($order->get_id(), get_option('wooecpay_logistic_order_prefix'));
- $sender_name = get_option('wooecpay_logistic_sender_name') ;
- $sender_cellphone = get_option('wooecpay_logistic_sender_cellphone') ;
- $sender_zipcode = get_option('wooecpay_logistic_sender_zipcode') ;
- $sender_address = get_option('wooecpay_logistic_sender_address') ;
-
- $serverReplyURL = WC()->api_request_url('wooecpay_logistic_status_callback', true);
+ $sender_name = get_option('wooecpay_logistic_sender_name');
+ $sender_cellphone = get_option('wooecpay_logistic_sender_cellphone');
+ $sender_zipcode = get_option('wooecpay_logistic_sender_zipcode');
+ $sender_address = get_option('wooecpay_logistic_sender_address');
- // 取得訂單資訊
- // $order_data = $order->get_data();
+ $serverReplyURL = WC()->api_request_url('wooecpay_logistic_status_callback', true);
- $CVSStoreID = $order->get_meta('_ecpay_logistic_cvs_store_id') ;
+ $CVSStoreID = $order->get_meta('_ecpay_logistic_cvs_store_id');
if (!isset($CVSStoreID) || empty($CVSStoreID)) {
$ajaxReturn = [
@@ -63,7 +53,7 @@ public function send_logistic_order_action($order_id = '', $is_ajax = true)
];
}
- $payment_method = $order->get_payment_method() ;
+ $payment_method = $order->get_payment_method();
if ($payment_method == 'cod') {
$IsCollection = 'Y';
} else {
@@ -79,7 +69,7 @@ public function send_logistic_order_action($order_id = '', $is_ajax = true)
$item_name = $this->get_item_name($order);
// 判斷是否超過長度,如果超過長度改為預設文字
- if (strlen($item_name) > 50 ) {
+ if (strlen($item_name) > 50) {
$item_name = $item_name_default;
@@ -103,7 +93,7 @@ public function send_logistic_order_action($order_id = '', $is_ajax = true)
if ($LogisticsType['type'] == 'HOME') {
// 重量計算
- $goods_weight = get_post_meta( $order->get_id(), '_cart_weight', true ) ;
+ $goods_weight = get_post_meta($order->get_id(), '_cart_weight', true);
$inputLogisticOrder = [
'MerchantID' => $api_logistic_info['merchant_id'],
@@ -163,20 +153,20 @@ public function send_logistic_order_action($order_id = '', $is_ajax = true)
if (
isset($response['RtnCode']) &&
- ( $response['RtnCode'] == 300 || $response['RtnCode'] == 2001 )
+ ($response['RtnCode'] == 300 || $response['RtnCode'] == 2001)
) {
// 更新訂單
- $order->update_meta_data( '_wooecpay_logistic_merchant_trade_no', $response['MerchantTradeNo'] );
- $order->update_meta_data( '_wooecpay_logistic_RtnCode', $response['RtnCode'] );
- $order->update_meta_data( '_wooecpay_logistic_RtnMsg', $response['RtnMsg'] );
- $order->update_meta_data( '_wooecpay_logistic_AllPayLogisticsID', $response['1|AllPayLogisticsID'] );
- $order->update_meta_data( '_wooecpay_logistic_LogisticsType', $response['LogisticsType'] );
- $order->update_meta_data( '_wooecpay_logistic_CVSPaymentNo', $response['CVSPaymentNo'] );
- $order->update_meta_data( '_wooecpay_logistic_CVSValidationNo', $response['CVSValidationNo'] );
- $order->update_meta_data( '_wooecpay_logistic_BookingNote', $response['BookingNote'] );
-
- $order->add_order_note('建立物流訂單-物流廠商交易編號:'.$response['MerchantTradeNo']. ',狀態:' . $response['RtnMsg'] . '('. $response['RtnCode'] . ')');
+ $order->update_meta_data('_wooecpay_logistic_merchant_trade_no', $response['MerchantTradeNo']);
+ $order->update_meta_data('_wooecpay_logistic_RtnCode', $response['RtnCode']);
+ $order->update_meta_data('_wooecpay_logistic_RtnMsg', $response['RtnMsg']);
+ $order->update_meta_data('_wooecpay_logistic_AllPayLogisticsID', $response['1|AllPayLogisticsID']);
+ $order->update_meta_data('_wooecpay_logistic_LogisticsType', $response['LogisticsType']);
+ $order->update_meta_data('_wooecpay_logistic_CVSPaymentNo', $response['CVSPaymentNo']);
+ $order->update_meta_data('_wooecpay_logistic_CVSValidationNo', $response['CVSValidationNo']);
+ $order->update_meta_data('_wooecpay_logistic_BookingNote', $response['BookingNote']);
+
+ $order->add_order_note('建立物流訂單-物流廠商交易編號:'.$response['MerchantTradeNo'] . ',狀態:' . $response['RtnMsg'] . '(' . $response['RtnCode'] . ')');
$order->save();
$ajaxReturn = [
@@ -193,7 +183,7 @@ public function send_logistic_order_action($order_id = '', $is_ajax = true)
// var_dump($response);
} catch (RtnException $e) {
- echo wp_kses_post( '(' . $e->getCode() . ')' . $e->getMessage() ) . PHP_EOL;
+ echo wp_kses_post('(' . $e->getCode() . ')' . $e->getMessage()) . PHP_EOL;
}
} else {
@@ -209,8 +199,8 @@ public function send_logistic_order_action($order_id = '', $is_ajax = true)
'code' => '0001',
'msg' => '查無訂單',
];
- }
-
+ }
+
if ($is_ajax) {
echo json_encode($ajaxReturn, true);
wp_die();
@@ -220,190 +210,234 @@ public function send_logistic_order_action($order_id = '', $is_ajax = true)
public function get_ecpay_logistic_api_info($action = '', $shipping_method_id = '' )
{
$wooecpay_logistic_cvs_type = get_option('wooecpay_logistic_cvs_type');
-
+
$api_info = [
'merchant_id' => '',
'hashKey' => '',
'hashIv' => '',
'action' => '',
- ] ;
-
+ ];
+
if ('yes' === get_option('wooecpay_enabled_logistic_stage', 'yes')) {
-
+
if ($wooecpay_logistic_cvs_type == 'C2C') {
-
+
$api_info = [
'merchant_id' => '2000933',
'hashKey' => 'XBERn1YOvpM9nfZc',
'hashIv' => 'h1ONHk4P4yqbl5LK',
- ] ;
-
+ ];
+
} else if ($wooecpay_logistic_cvs_type == 'B2C') {
-
+
$api_info = [
'merchant_id' => '2000132',
'hashKey' => '5294y06JbISpM5x9',
'hashIv' => 'v77hoKGq4kWxNNIS',
- ] ;
+ ];
}
-
+
} else {
-
+
$merchant_id = get_option('wooecpay_logistic_mid');
$hash_key = get_option('wooecpay_logistic_hashkey');
$hash_iv = get_option('wooecpay_logistic_hashiv');
-
+
$api_info = [
'merchant_id' => $merchant_id,
'hashKey' => $hash_key,
'hashIv' => $hash_iv,
- ] ;
+ ];
}
-
-
+
+
// URL位置判斷
if ('yes' === get_option('wooecpay_enabled_logistic_stage', 'yes')) {
-
+
switch ($action) {
-
+
case 'map':
- $api_info['action'] = 'https://logistics-stage.ecpay.com.tw/Express/map' ;
- break;
-
+ $api_info['action'] = 'https://logistics-stage.ecpay.com.tw/Express/map';
+ break;
+
case 'create':
- $api_info['action'] = 'https://logistics-stage.ecpay.com.tw/Express/Create' ;
- break;
-
+ $api_info['action'] = 'https://logistics-stage.ecpay.com.tw/Express/Create';
+ break;
+
case 'print':
-
+
if ($wooecpay_logistic_cvs_type == 'C2C') {
-
+
switch ($shipping_method_id) {
-
+
case 'Wooecpay_Logistic_CVS_711':
- $api_info['action'] = 'https://logistics-stage.ecpay.com.tw/Express/PrintUniMartC2COrderInfo' ;
- break;
-
+ case 'Wooecpay_Logistic_CVS_711_Outside':
+ $api_info['action'] = 'https://logistics-stage.ecpay.com.tw/Express/PrintUniMartC2COrderInfo';
+ break;
+
case 'Wooecpay_Logistic_CVS_Family':
- $api_info['action'] = 'https://logistics-stage.ecpay.com.tw/Express/PrintFAMIC2COrderInfo' ;
- break;
-
+ $api_info['action'] = 'https://logistics-stage.ecpay.com.tw/Express/PrintFAMIC2COrderInfo';
+ break;
+
case 'Wooecpay_Logistic_CVS_Hilife':
- $api_info['action'] = 'https://logistics-stage.ecpay.com.tw/Express/PrintHILIFEC2COrderInfo' ;
- break;
-
+ $api_info['action'] = 'https://logistics-stage.ecpay.com.tw/Express/PrintHILIFEC2COrderInfo';
+ break;
+
case 'Wooecpay_Logistic_CVS_Okmart':
- $api_info['action'] = 'https://logistics-stage.ecpay.com.tw/Express/PrintOKMARTC2COrderInfo' ;
- break;
-
+ $api_info['action'] = 'https://logistics-stage.ecpay.com.tw/Express/PrintOKMARTC2COrderInfo';
+ break;
+
case 'Wooecpay_Logistic_Home_Tcat':
+ case 'Wooecpay_Logistic_Home_Tcat_Outside':
case 'Wooecpay_Logistic_Home_Ecan':
case 'Wooecpay_Logistic_Home_Post':
- $api_info['action'] = 'https://logistics-stage.ecpay.com.tw/helper/printTradeDocument' ;
- break;
-
+ $api_info['action'] = 'https://logistics-stage.ecpay.com.tw/helper/printTradeDocument';
+ break;
+
default:
- $api_info['action'] = '' ;
- break;
+ $api_info['action'] = '';
+ break;
}
-
+
} else if ($wooecpay_logistic_cvs_type == 'B2C') {
-
+
switch ($shipping_method_id) {
-
+
case 'Wooecpay_Logistic_CVS_711':
+ case 'Wooecpay_Logistic_CVS_711_Outside':
case 'Wooecpay_Logistic_CVS_Family':
case 'Wooecpay_Logistic_CVS_Hilife':
case 'Wooecpay_Logistic_Home_Tcat':
+ case 'Wooecpay_Logistic_Home_Tcat_Outside':
case 'Wooecpay_Logistic_Home_Ecan':
case 'Wooecpay_Logistic_Home_Post':
- $api_info['action'] = 'https://logistics-stage.ecpay.com.tw/helper/printTradeDocument' ;
- break;
+ $api_info['action'] = 'https://logistics-stage.ecpay.com.tw/helper/printTradeDocument';
+ break;
default:
- $api_info['action'] = '' ;
- break;
+ $api_info['action'] = '';
+ break;
}
}
-
- break;
-
+
+ break;
+
default:
- break;
+ break;
}
-
+
} else {
-
+
switch ($action) {
-
+
case 'map':
- $api_info['action'] = 'https://logistics.ecpay.com.tw/Express/map' ;
- break;
-
+ $api_info['action'] = 'https://logistics.ecpay.com.tw/Express/map';
+ break;
+
case 'create':
- $api_info['action'] = 'https://logistics.ecpay.com.tw/Express/Create' ;
- break;
-
+ $api_info['action'] = 'https://logistics.ecpay.com.tw/Express/Create';
+ break;
+
case 'print':
-
+
if ($wooecpay_logistic_cvs_type == 'C2C') {
-
+
switch ($shipping_method_id) {
-
+
case 'Wooecpay_Logistic_CVS_711':
- $api_info['action'] = 'https://logistics.ecpay.com.tw/Express/PrintUniMartC2COrderInfo' ;
- break;
-
+ case 'Wooecpay_Logistic_CVS_711_Outside':
+ $api_info['action'] = 'https://logistics.ecpay.com.tw/Express/PrintUniMartC2COrderInfo';
+ break;
+
case 'Wooecpay_Logistic_CVS_Family':
- $api_info['action'] = 'https://logistics.ecpay.com.tw/Express/PrintFAMIC2COrderInfo' ;
- break;
-
+ $api_info['action'] = 'https://logistics.ecpay.com.tw/Express/PrintFAMIC2COrderInfo';
+ break;
+
case 'Wooecpay_Logistic_CVS_Hilife':
- $api_info['action'] = 'https://logistics.ecpay.com.tw/Express/PrintHILIFEC2COrderInfo' ;
- break;
-
+ $api_info['action'] = 'https://logistics.ecpay.com.tw/Express/PrintHILIFEC2COrderInfo';
+ break;
+
case 'Wooecpay_Logistic_CVS_Okmart':
- $api_info['action'] = 'https://logistics.ecpay.com.tw/Express/PrintOKMARTC2COrderInfo' ;
- break;
-
+ $api_info['action'] = 'https://logistics.ecpay.com.tw/Express/PrintOKMARTC2COrderInfo';
+ break;
+
case 'Wooecpay_Logistic_Home_Tcat':
+ case 'Wooecpay_Logistic_Home_Tcat_Outside':
case 'Wooecpay_Logistic_Home_Ecan':
case 'Wooecpay_Logistic_Home_Post':
- $api_info['action'] = 'https://logistics.ecpay.com.tw/helper/printTradeDocument' ;
- break;
-
+ $api_info['action'] = 'https://logistics.ecpay.com.tw/helper/printTradeDocument';
+ break;
+
default:
- $api_info['action'] = '' ;
- break;
+ $api_info['action'] = '';
+ break;
}
-
+
} else if ($wooecpay_logistic_cvs_type == 'B2C') {
-
+
switch ($shipping_method_id) {
-
+
case 'Wooecpay_Logistic_CVS_711':
+ case 'Wooecpay_Logistic_CVS_711_Outside':
case 'Wooecpay_Logistic_CVS_Family':
case 'Wooecpay_Logistic_CVS_Hilife':
case 'Wooecpay_Logistic_Home_Tcat':
+ case 'Wooecpay_Logistic_Home_Tcat_Outside':
case 'Wooecpay_Logistic_Home_Ecan':
case 'Wooecpay_Logistic_Home_Post':
- $api_info['action'] = 'https://logistics.ecpay.com.tw/helper/printTradeDocument' ;
- break;
+ $api_info['action'] = 'https://logistics.ecpay.com.tw/helper/printTradeDocument';
+ break;
default:
- $api_info['action'] = '' ;
- break;
+ $api_info['action'] = '';
+ break;
}
}
-
- break;
-
+
+ break;
+
default:
- break;
+ break;
}
}
-
+
return $api_info;
}
+ public function get_ecpay_all_logistics()
+ {
+ return [
+ 'Wooecpay_Logistic_CVS_711',
+ 'Wooecpay_Logistic_CVS_711_Outside',
+ 'Wooecpay_Logistic_CVS_Family',
+ 'Wooecpay_Logistic_CVS_Hilife',
+ 'Wooecpay_Logistic_CVS_Okmart',
+ 'Wooecpay_Logistic_Home_Tcat',
+ 'Wooecpay_Logistic_Home_Tcat_Outside',
+ 'Wooecpay_Logistic_Home_Post',
+ 'Wooecpay_Logistic_Home_Ecan'
+ ];
+ }
+
+ public function get_ecpay_cvs_logistics()
+ {
+ return [
+ 'Wooecpay_Logistic_CVS_711',
+ 'Wooecpay_Logistic_CVS_711_Outside',
+ 'Wooecpay_Logistic_CVS_Family',
+ 'Wooecpay_Logistic_CVS_Hilife',
+ 'Wooecpay_Logistic_CVS_Okmart'
+ ];
+ }
+
+ public function get_ecpay_home_logistics()
+ {
+ return [
+ 'Wooecpay_Logistic_Home_Tcat',
+ 'Wooecpay_Logistic_Home_Tcat_Outside',
+ 'Wooecpay_Logistic_Home_Post',
+ 'Wooecpay_Logistic_Home_Ecan'
+ ];
+ }
+
public function get_logistics_sub_type($shipping_method_id)
{
$wooecpay_logistic_cvs_type = get_option('wooecpay_logistic_cvs_type');
@@ -411,67 +445,71 @@ public function get_logistics_sub_type($shipping_method_id)
$logisticsType = [
'type' => '',
'sub_type' => '',
- ] ;
+ ];
- switch ($shipping_method_id) {
+ switch ($shipping_method_id) {
case 'Wooecpay_Logistic_CVS_711':
+ case 'Wooecpay_Logistic_CVS_711_Outside':
- $logisticsType['type'] = 'CVS' ;
+ $logisticsType['type'] = 'CVS';
if ($wooecpay_logistic_cvs_type == 'C2C') {
- $logisticsType['sub_type'] = 'UNIMARTC2C' ;
+ $logisticsType['sub_type'] = 'UNIMARTC2C';
} else if ($wooecpay_logistic_cvs_type == 'B2C') {
- $logisticsType['sub_type'] = 'UNIMART' ;
+ $logisticsType['sub_type'] = 'UNIMART';
}
- break;
+ break;
+
case 'Wooecpay_Logistic_CVS_Family':
-
- $logisticsType['type'] = 'CVS' ;
+
+ $logisticsType['type'] = 'CVS';
if ($wooecpay_logistic_cvs_type == 'C2C') {
- $logisticsType['sub_type'] = 'FAMIC2C' ;
+ $logisticsType['sub_type'] = 'FAMIC2C';
} else if ($wooecpay_logistic_cvs_type == 'B2C') {
- $logisticsType['sub_type'] = 'FAMI' ;
+ $logisticsType['sub_type'] = 'FAMI';
}
+ break;
- break;
case 'Wooecpay_Logistic_CVS_Hilife':
- $logisticsType['type'] = 'CVS' ;
+ $logisticsType['type'] = 'CVS';
if ($wooecpay_logistic_cvs_type == 'C2C') {
- $logisticsType['sub_type'] = 'HILIFEC2C' ;
+ $logisticsType['sub_type'] = 'HILIFEC2C';
} else if ($wooecpay_logistic_cvs_type == 'B2C') {
- $logisticsType['sub_type'] = 'HILIFE' ;
+ $logisticsType['sub_type'] = 'HILIFE';
}
- break;
+ break;
+
case 'Wooecpay_Logistic_CVS_Okmart':
- $logisticsType['type'] = 'CVS' ;
+ $logisticsType['type'] = 'CVS';
if ($wooecpay_logistic_cvs_type == 'C2C') {
- $logisticsType['sub_type'] = 'OKMARTC2C' ;
+ $logisticsType['sub_type'] = 'OKMARTC2C';
}
- break;
+ break;
case 'Wooecpay_Logistic_Home_Tcat':
- $logisticsType['type'] = 'HOME' ;
- $logisticsType['sub_type'] = 'TCAT' ;
- break;
+ case 'Wooecpay_Logistic_Home_Tcat_Outside':
+ $logisticsType['type'] = 'HOME';
+ $logisticsType['sub_type'] = 'TCAT';
+ break;
case 'Wooecpay_Logistic_Home_Ecan':
- $logisticsType['type'] = 'HOME' ;
- $logisticsType['sub_type'] = 'ECAN' ;
- break;
+ $logisticsType['type'] = 'HOME';
+ $logisticsType['sub_type'] = 'ECAN';
+ break;
case 'Wooecpay_Logistic_Home_Post':
- $logisticsType['type'] = 'HOME' ;
- $logisticsType['sub_type'] = 'POST' ;
- break;
+ $logisticsType['type'] = 'HOME';
+ $logisticsType['sub_type'] = 'POST';
+ break;
}
return $logisticsType;
@@ -479,7 +517,7 @@ public function get_logistics_sub_type($shipping_method_id)
public function get_merchant_trade_no($order_id, $order_prefix = '')
{
- $trade_no = $order_prefix . substr(str_pad($order_id, 8, '0', STR_PAD_LEFT), 0, 8) . 'SN' . substr(hash('sha256', (string) time()), -5) ;
+ $trade_no = $order_prefix . substr(str_pad($order_id, 8, '0', STR_PAD_LEFT), 0, 8) . 'SN' . substr(hash('sha256', (string) time()), -5);
return substr($trade_no, 0, 20);
}
@@ -487,12 +525,128 @@ public function get_item_name($order)
{
$item_name = '';
- if ( count($order->get_items()) ) {
+ if (count($order->get_items())) {
foreach ($order->get_items() as $item) {
- $item_name .= trim($item->get_name()) . ' ' ;
+ $item_name .= trim($item->get_name()) . ' ';
}
}
return $item_name;
}
+
+ public function get_available_state_home_tcat_outside()
+ {
+ return [
+ '澎湖縣',
+ '金門縣',
+ '連江縣',
+ ];
+ }
+
+ public function generate_ecpay_map_form($shipping_method_id, $order_id)
+ {
+ $api_logistic_info = $this->get_ecpay_logistic_api_info('map');
+ $client_back_url = WC()->api_request_url('wooecpay_change_logistic_map_callback', true);
+ $MerchantTradeNo = $this->get_merchant_trade_no($order_id, get_option('wooecpay_logistic_order_prefix'));
+ $LogisticsType = $this->get_logistics_sub_type($shipping_method_id);
+
+ try {
+ $factory = new Factory([
+ 'hashKey' => $api_logistic_info['hashKey'],
+ 'hashIv' => $api_logistic_info['hashIv'],
+ 'hashMethod' => 'md5',
+ ]);
+ $autoSubmitFormService = $factory->create('AutoSubmitFormWithCmvService');
+
+ $inputMap = [
+ 'MerchantID' => $api_logistic_info['merchant_id'],
+ 'MerchantTradeNo' => $MerchantTradeNo,
+ 'LogisticsType' => $LogisticsType['type'],
+ 'LogisticsSubType' => $LogisticsType['sub_type'],
+ 'IsCollection' => 'Y',
+ 'ServerReplyURL' => $client_back_url,
+ ];
+
+ $form_map = $autoSubmitFormService->generate($inputMap, $api_logistic_info['action'], 'ecpay_map');
+
+ return $form_map;
+ } catch (RtnException $e) {
+ return wp_kses_post( '(' . $e->getCode() . ')' . $e->getMessage() ) . PHP_EOL;
+ }
+ }
+
+ public function is_available_state_home_tcat($shipping_method_id, $state)
+ {
+ // 是否為黑貓允許離島
+ $is_available_outside = in_array(str_replace(' ', '', $state), $this->get_available_state_home_tcat_outside());
+
+ switch ($shipping_method_id) {
+ case 'Wooecpay_Logistic_Home_Tcat':
+ return !$is_available_outside;
+ case 'Wooecpay_Logistic_Home_Tcat_Outside':
+ return $is_available_outside;
+ }
+ }
+
+ public function is_ecpay_logistics($shipping_method_id)
+ {
+ return in_array($shipping_method_id, $this->get_ecpay_all_logistics());
+ }
+
+ public function is_ecpay_cvs_logistics($shipping_method_id)
+ {
+ return in_array($shipping_method_id, $this->get_ecpay_cvs_logistics());
+ }
+
+ public function is_ecpay_home_logistics($shipping_method_id)
+ {
+ return in_array($shipping_method_id, $this->get_ecpay_home_logistics());
+ }
+
+ public function check_cvs_is_valid($shipping_method_id, $is_cvs_outside)
+ {
+ $is_valid = true;
+
+ switch ($shipping_method_id) {
+ case 'Wooecpay_Logistic_CVS_711':
+ $is_valid = ($is_cvs_outside === '0') ? true : false;
+ break;
+ case 'Wooecpay_Logistic_CVS_711_Outside':
+ $is_valid = ($is_cvs_outside === '0') ? false : true;
+ break;
+ }
+
+ return $is_valid;
+ }
+
+ public function decrypt_order_id($encryption_order_id)
+ {
+ $api_logistic_info = $this->get_ecpay_logistic_api_info();
+ $factory = new Factory([
+ 'hashKey' => $api_logistic_info['hashKey'],
+ 'hashIv' => $api_logistic_info['hashIv'],
+ ]);
+
+ $aes_service = $factory->create(AesService::class);
+ $data = $aes_service->decrypt($encryption_order_id);
+ $order_id = $data['orderId'];
+
+ return $order_id;
+ }
+
+ public function encrypt_order_id($order_id)
+ {
+ $api_logistic_info = $this->get_ecpay_logistic_api_info();
+ $factory = new Factory([
+ 'hashKey' => $api_logistic_info['hashKey'],
+ 'hashIv' => $api_logistic_info['hashIv'],
+ ]);
+
+ $aes_service = $factory->create(AesService::class);
+ $encryption_order_id = $aes_service->encrypt([
+ 'orderId' => $order_id
+ ]);
+
+ return $encryption_order_id;
+ }
}
diff --git a/ecpay-ecommerce-for-woocommerce/includes/services/logistic/class-wooecpay-logistic.php b/ecpay-ecommerce-for-woocommerce/includes/services/logistic/class-wooecpay-logistic.php
index de588b0..7b3e581 100644
--- a/ecpay-ecommerce-for-woocommerce/includes/services/logistic/class-wooecpay-logistic.php
+++ b/ecpay-ecommerce-for-woocommerce/includes/services/logistic/class-wooecpay-logistic.php
@@ -1,23 +1,34 @@
load_api();
- add_filter( 'woocommerce_shipping_methods', array( $this, 'add_method' ) );
- add_action( 'woocommerce_shipping_init', array( $this, 'load_logistic_logistic' ) );
+ // 載入物流共用
+ $this->logisticHelper = new Wooecpay_Logistic_Helper;
- add_filter( 'woocommerce_available_payment_gateways', array( $this, 'gateway_disable_for_shipping_rate'), 1 );
+ add_filter('woocommerce_shipping_methods', array($this, 'add_method'));
+ add_action('woocommerce_shipping_init', array($this, 'load_logistic_logistic'));
+
+ add_filter('woocommerce_available_payment_gateways', array($this, 'gateway_disable_for_shipping_rate'), 1);
if ('yes' === get_option('wooecpay_keep_logistic_phone', 'yes')) {
- add_filter('woocommerce_checkout_fields', array($this, 'wooecpay_show_logistic_fields' ), 11 ,1); // 收件人手機
- add_action('woocommerce_checkout_create_order', array($this, 'wooecpay_save_logistic_fields'), 11, 2);
+ add_filter('woocommerce_checkout_fields', array($this, 'wooecpay_show_logistic_fields'), 11 ,1); // 收件人手機
+ add_action('woocommerce_checkout_create_order', array($this, 'wooecpay_save_logistic_fields'), 11, 2);
}
- add_action( 'woocommerce_checkout_update_order_meta', array( $this, 'save_weight_order' ));
+ add_action('woocommerce_checkout_update_order_meta', array($this, 'save_weight_order'));
+
+ if (in_array('Wooecpay_Logistic_Home_Tcat', get_option('wooecpay_enabled_logistic_outside', []))) {
+ // 前台結帳頁欄位檢查 Hook
+ add_action('woocommerce_after_checkout_validation', array($this, 'wooecpay_check_logistic_home_tcat_fields'), 10, 2);
+ }
}
/**
@@ -42,64 +53,79 @@ public function load_logistic_logistic()
include WOOECPAY_PLUGIN_INCLUDE_DIR . '/services/logistic/ecpay-logistic-cvs-hilife.php';
include WOOECPAY_PLUGIN_INCLUDE_DIR . '/services/logistic/ecpay-logistic-cvs-family.php';
- if ( get_option('wooecpay_logistic_cvs_type') == 'C2C') {
+ if (get_option('wooecpay_logistic_cvs_type') == 'C2C') {
include WOOECPAY_PLUGIN_INCLUDE_DIR . '/services/logistic/ecpay-logistic-cvs-okmart.php';
}
-
+
include WOOECPAY_PLUGIN_INCLUDE_DIR . '/services/logistic/ecpay-logistic-home-tcat.php';
- // include WOOECPAY_PLUGIN_INCLUDE_DIR . '/services/logistic/ecpay-logistic-home-ecan.php';
include WOOECPAY_PLUGIN_INCLUDE_DIR . '/services/logistic/ecpay-logistic-home-post.php';
+
+ if (in_array('Wooecpay_Logistic_CVS_711', get_option('wooecpay_enabled_logistic_outside', []))) {
+ include WOOECPAY_PLUGIN_INCLUDE_DIR . '/services/logistic/ecpay-logistic-cvs-711-outside.php';
+ }
+ if (in_array('Wooecpay_Logistic_Home_Tcat', get_option('wooecpay_enabled_logistic_outside', []))) {
+ include WOOECPAY_PLUGIN_INCLUDE_DIR . '/services/logistic/ecpay-logistic-home-tcat-outside.php';
+ }
}
public function add_method($methods)
- {
+ {
$methods['Wooecpay_Logistic_CVS_711'] = 'Wooecpay_Logistic_CVS_711';
$methods['Wooecpay_Logistic_CVS_Hilife'] = 'Wooecpay_Logistic_CVS_Hilife';
$methods['Wooecpay_Logistic_CVS_Family'] = 'Wooecpay_Logistic_CVS_Family';
- if ( get_option('wooecpay_logistic_cvs_type') == 'C2C') {
+ if (get_option('wooecpay_logistic_cvs_type') == 'C2C') {
$methods['Wooecpay_Logistic_CVS_Okmart'] = 'Wooecpay_Logistic_CVS_Okmart';
}
$methods['Wooecpay_Logistic_Home_Tcat'] = 'Wooecpay_Logistic_Home_Tcat';
- // $methods['Wooecpay_Logistic_Home_Ecan'] = 'Wooecpay_Logistic_Home_Ecan';
$methods['Wooecpay_Logistic_Home_Post'] = 'Wooecpay_Logistic_Home_Post';
+ if (in_array('Wooecpay_Logistic_CVS_711', get_option('wooecpay_enabled_logistic_outside', []))) {
+ $methods['Wooecpay_Logistic_CVS_711_Outside'] = 'Wooecpay_Logistic_CVS_711_Outside';
+ }
+ if (in_array('Wooecpay_Logistic_Home_Tcat', get_option('wooecpay_enabled_logistic_outside', []))) {
+ $methods['Wooecpay_Logistic_Home_Tcat_Outside'] = 'Wooecpay_Logistic_Home_Tcat_Outside';
+ }
+
return $methods;
}
/**
* wc_get_chosen_shipping_method_ids
*/
- function get_chosen_shipping_method_ids() {
+ function get_chosen_shipping_method_ids()
+ {
$method_ids = array();
- $chosen_methods = is_null(WC()->session) ? [] : WC()->session->get( 'chosen_shipping_methods', array() );
- foreach ( $chosen_methods as $chosen_method ) {
- $chosen_method = explode( ':', $chosen_method );
- $method_ids[] = current( $chosen_method );
+ $chosen_methods = is_null(WC()->session) ? [] : WC()->session->get('chosen_shipping_methods', array());
+ foreach ($chosen_methods as $chosen_method) {
+ $chosen_method = explode(':', $chosen_method);
+ $method_ids[] = current($chosen_method);
}
return $method_ids;
}
- // 限制綠界物流僅能使用綠界金流
- function gateway_disable_for_shipping_rate( $available_gateways ) {
-
- if ( ! is_admin() ) {
+ /**
+ * 限制綠界物流僅能使用綠界金流
+ */
+ function gateway_disable_for_shipping_rate($available_gateways)
+ {
+ if (!is_admin()) {
$chosen_shipping_tmp = $this->get_chosen_shipping_method_ids();
- $chosen_shipping = $chosen_shipping_tmp[0] ;
+ $chosen_shipping = (empty($chosen_shipping_tmp)) ? '' : $chosen_shipping_tmp[0];
- if(!empty($chosen_shipping)){
+ if (!empty($chosen_shipping)) {
// 限制綠界物流僅能使用綠界金流
- if(
- strpos( $chosen_shipping, 'Wooecpay_Logistic_CVS' ) !== false ||
- strpos( $chosen_shipping, 'Wooecpay_Logistic_Home' ) !== false
- ){
+ if (
+ strpos($chosen_shipping, 'Wooecpay_Logistic_CVS') !== false ||
+ strpos($chosen_shipping, 'Wooecpay_Logistic_Home') !== false
+ ) {
- foreach($available_gateways as $key => $value){
+ foreach ($available_gateways as $key => $value) {
- if(
+ if (
$key == 'Wooecpay_Gateway_Credit' ||
$key == 'Wooecpay_Gateway_Credit_Installment' ||
$key == 'Wooecpay_Gateway_Webatm' ||
@@ -108,30 +134,51 @@ function gateway_disable_for_shipping_rate( $available_gateways ) {
$key == 'Wooecpay_Gateway_Barcode' ||
$key == 'Wooecpay_Gateway_Applepay' ||
$key == 'cod'
- ){
+ ) {
} else {
- unset( $available_gateways[$key] );
+ unset($available_gateways[$key]);
}
}
- }
+ }
// 限制貨到付款僅適用超商物流
- $chosen_methods = WC()->session->get( 'chosen_shipping_methods' );
+ $chosen_methods = WC()->session->get('chosen_shipping_methods');
$chosen_shipping = $chosen_methods[0];
-
- if ( isset( $available_gateways['cod'] ) && (
- 0 === strpos( $chosen_shipping, 'Wooecpay_Logistic_Home_Tcat' ) ||
- 0 === strpos( $chosen_shipping, 'Wooecpay_Logistic_Home_Post' )
- ) ){
- unset( $available_gateways['cod'] );
+
+ if (isset($available_gateways['cod']) && (
+ 0 === strpos($chosen_shipping, 'Wooecpay_Logistic_Home_Tcat') ||
+ 0 === strpos($chosen_shipping, 'Wooecpay_Logistic_Home_Tcat_Outside') ||
+ 0 === strpos($chosen_shipping, 'Wooecpay_Logistic_Home_Post')
+ )) {
+ unset($available_gateways['cod']);
}
- }
+ }
}
return $available_gateways;
}
+ /**
+ * 前台結帳頁欄位檢查 - 黑貓
+ */
+ public function wooecpay_check_logistic_home_tcat_fields($data, $errors)
+ {
+ // 取得當前選擇的運送方式
+ $chosen_shipping = $this->get_chosen_shipping_method_ids();
+ $chosen_shipping = (empty($chosen_shipping)) ? '' : $chosen_shipping[0];
+
+ // 當前選擇的運送方式是否為綠界宅配黑貓
+ if (in_array($chosen_shipping, ['Wooecpay_Logistic_Home_Tcat', 'Wooecpay_Logistic_Home_Tcat_Outside'])) {
+ // 比對運送方式與地址
+ $result = $this->logisticHelper->is_available_state_home_tcat($chosen_shipping, $data['shipping_state']);
+ if (!$result) {
+ // 比對失敗,顯示錯誤訊息
+ $errors->add('validation', __('The selected shipping method does not match the shipping address. Please choose again.', 'ecpay-ecommerce-for-woocommerce'));
+ }
+ }
+ }
+
/**
* 額外增加物流欄位
*/
@@ -149,12 +196,12 @@ public function wooecpay_show_logistic_fields($fields)
public function wooecpay_save_logistic_fields($order, $data)
{
-
- if(
+
+ if (
isset($data['billing_phone']) &&
isset($data['wooecpay_shipping_phone']) &&
(empty($data['wooecpay_shipping_phone']))
- ){
+ ) {
$order->update_meta_data('wooecpay_shipping_phone', $data['billing_phone']);
}
}
@@ -162,9 +209,9 @@ public function wooecpay_save_logistic_fields($order, $data)
/**
* 額外增加訂單重量欄位
*/
- public function save_weight_order($order_id)
+ public function save_weight_order($order_id)
{
$weight = WC()->cart->get_cart_contents_weight();
- update_post_meta( $order_id, '_cart_weight', $weight );
+ update_post_meta($order_id, '_cart_weight', $weight);
}
}
\ No newline at end of file
diff --git a/ecpay-ecommerce-for-woocommerce/includes/services/logistic/ecpay-logistic-cvs-711-outside.php b/ecpay-ecommerce-for-woocommerce/includes/services/logistic/ecpay-logistic-cvs-711-outside.php
new file mode 100644
index 0000000..def6af5
--- /dev/null
+++ b/ecpay-ecommerce-for-woocommerce/includes/services/logistic/ecpay-logistic-cvs-711-outside.php
@@ -0,0 +1,41 @@
+id = 'Wooecpay_Logistic_CVS_711_Outside'; // Id for your shipping method. Should be uunique.
+ $this->instance_id = absint($instance_id);
+ $this->method_title = __('Ecpay CVS 7-11 Outside', 'ecpay-ecommerce-for-woocommerce');
+ $this->method_description = ''; // Description shown in admin
+
+ $this->supports = [
+ 'shipping-zones',
+ 'instance-settings',
+ 'instance-settings-modal',
+ ];
+
+ // 載入欄位
+ $this->instance_form_fields = include WOOECPAY_PLUGIN_INCLUDE_DIR . '/config/logistic/settings-logistic-base.php';
+
+ parent::__construct();
+
+ }
+
+ public function is_available($package)
+ {
+ $is_available = true;
+
+ $total = WC()->cart->cart_contents_total ;
+
+ // 金額超過2萬元時不顯示綠界超商物流
+ if($total >= 20000){
+ $is_available = false ;
+ }
+
+ return apply_filters('woocommerce_shipping_' . $this->id . '_is_available', $is_available, $package, $this);
+ }
+}
\ No newline at end of file
diff --git a/ecpay-ecommerce-for-woocommerce/includes/services/logistic/ecpay-logistic-home-tcat-outside.php b/ecpay-ecommerce-for-woocommerce/includes/services/logistic/ecpay-logistic-home-tcat-outside.php
new file mode 100644
index 0000000..3a2ebf1
--- /dev/null
+++ b/ecpay-ecommerce-for-woocommerce/includes/services/logistic/ecpay-logistic-home-tcat-outside.php
@@ -0,0 +1,24 @@
+id = 'Wooecpay_Logistic_Home_Tcat_Outside'; // Id for your shipping method. Should be uunique.
+ $this->instance_id = absint($instance_id);
+ $this->method_title = __('Ecpay Home Tcat Outside', 'ecpay-ecommerce-for-woocommerce');
+ $this->method_description = ''; // Description shown in admin
+
+ $this->supports = [
+ 'shipping-zones',
+ 'instance-settings',
+ 'instance-settings-modal',
+ ];
+
+ // 載入欄位
+ $this->instance_form_fields = include WOOECPAY_PLUGIN_INCLUDE_DIR . '/config/logistic/settings-logistic-base.php';
+
+ parent::__construct();
+
+ }
+}
\ No newline at end of file
diff --git a/ecpay-ecommerce-for-woocommerce/includes/services/logistic/ecpay-logistic-response.php b/ecpay-ecommerce-for-woocommerce/includes/services/logistic/ecpay-logistic-response.php
index 53d9a34..579af9d 100644
--- a/ecpay-ecommerce-for-woocommerce/includes/services/logistic/ecpay-logistic-response.php
+++ b/ecpay-ecommerce-for-woocommerce/includes/services/logistic/ecpay-logistic-response.php
@@ -4,52 +4,74 @@
use Ecpay\Sdk\Factories\Factory;
use Ecpay\Sdk\Exceptions\RtnException;
use Ecpay\Sdk\Response\VerifiedArrayResponse;
-use Ecpay\Sdk\Services\UrlService;
+use Helpers\Logistic\Wooecpay_Logistic_Helper;
class Wooecpay_Logistic_Response
{
- public function __construct() {
-
+ protected $logisticHelper;
+
+ public function __construct()
+ {
add_action('woocommerce_api_wooecpay_logistic_map_callback', array($this, 'map_response')); // 前台選擇門市 Response
add_action('woocommerce_api_wooecpay_change_logistic_map_callback', array($this, 'change_map_response')); // 後台變更門市 Response
add_action('woocommerce_api_wooecpay_logistic_status_callback', array($this, 'logistic_status_response')); // 貨態回傳
+
+ // 載入物流共用
+ $this->logisticHelper = new Wooecpay_Logistic_Helper;
}
public function map_response()
{
- if(isset($_POST['MerchantTradeNo'])){
+ if (isset($_POST['MerchantTradeNo'])) {
- $order_id = $this->get_order_id($_POST) ;
+ $order_id = $this->get_order_id($_POST);
- if ($order = wc_get_order($order_id)){
+ if ($order = wc_get_order($order_id)) {
// 物流相關程序
// -----------------------------------------------------------------------------------------------
// 物流方式
- $shipping_method_id = $order->get_items('shipping') ;
- $shipping_method_id = reset($shipping_method_id);
- $shipping_method_id = $shipping_method_id->get_method_id() ;
+ $shipping_method_id = $order->get_items('shipping');
+ $shipping_method_id = reset($shipping_method_id);
+ $shipping_method_id = $shipping_method_id->get_method_id();
// 判斷是否為超商取貨
- if(
- $shipping_method_id == 'Wooecpay_Logistic_CVS_711' ||
- $shipping_method_id == 'Wooecpay_Logistic_CVS_Family' ||
- $shipping_method_id == 'Wooecpay_Logistic_CVS_Hilife' ||
- $shipping_method_id == 'Wooecpay_Logistic_CVS_Okmart'
- ){
+ if ($this->logisticHelper->is_ecpay_cvs_logistics($shipping_method_id)) {
+ // 是否啟用超商離島物流
+ if (in_array('Wooecpay_Logistic_CVS_711', get_option('wooecpay_enabled_logistic_outside', []))) {
+
+ // 門市檢查
+ $is_valid = $this->logisticHelper->check_cvs_is_valid($shipping_method_id, $_POST['CVSOutSide']);
+ if (!$is_valid) {
+ $confirm_msg = __('The selected store does not match the chosen shipping method (Outlying Island/Main Island). Please select a different store or cancel the transaction and place a new order.', 'ecpay-ecommerce-for-woocommerce');
+ $encryption_order_id = $this->logisticHelper->encrypt_order_id($order_id);
+ $url = WC()->api_request_url('wooecpay_logistic_redirect_map', true) . '&id=' . $encryption_order_id;
+
+ // 提示訊息
+ echo '';
+
+ exit;
+ }
+ }
// 取出商店代號
- $CVSStoreID = $order->get_meta('_ecpay_logistic_cvs_store_id') ;
+ $CVSStoreID = $order->get_meta('_ecpay_logistic_cvs_store_id');
// 不存在
- if(empty($CVSStoreID)){
+ if (empty($CVSStoreID)) {
$CVSStoreID = sanitize_text_field($_POST['CVSStoreID']);
$CVSStoreName = sanitize_text_field($_POST['CVSStoreName']);
$CVSAddress = sanitize_text_field($_POST['CVSAddress']);
$CVSTelephone = sanitize_text_field($_POST['CVSTelephone']);
-
+
// 驗證
if (mb_strlen( $CVSStoreName, "utf-8") > 10) {
$CVSStoreName = mb_substr($CVSStoreName, 0, 10, "utf-8");
@@ -71,10 +93,10 @@ public function map_response()
$order->set_shipping_postcode('');
$order->set_shipping_address_1($CVSAddress);
- $order->update_meta_data( '_ecpay_logistic_cvs_store_id', $CVSStoreID );
- $order->update_meta_data( '_ecpay_logistic_cvs_store_name', $CVSStoreName );
- $order->update_meta_data( '_ecpay_logistic_cvs_store_address', $CVSAddress );
- $order->update_meta_data( '_ecpay_logistic_cvs_store_telephone', $CVSTelephone );
+ $order->update_meta_data( '_ecpay_logistic_cvs_store_id', $CVSStoreID );
+ $order->update_meta_data( '_ecpay_logistic_cvs_store_name', $CVSStoreName );
+ $order->update_meta_data( '_ecpay_logistic_cvs_store_address', $CVSAddress );
+ $order->update_meta_data( '_ecpay_logistic_cvs_store_telephone', $CVSTelephone );
$order->add_order_note(sprintf(__('CVS store %1$s (%2$s)', 'ecpay-ecommerce-for-woocommerce'), $CVSStoreName, $CVSStoreID));
@@ -101,10 +123,10 @@ public function map_response()
$client_back_url = $order->get_checkout_order_received_url();
// 紀錄訂單其他資訊
- $order->update_meta_data( '_wooecpay_payment_order_prefix', get_option('wooecpay_payment_order_prefix') ); // 前綴
- $order->update_meta_data( '_wooecpay_payment_merchant_trade_no', $merchant_trade_no ); //MerchantTradeNo
- $order->update_meta_data( '_wooecpay_query_trade_tag', 0);
-
+ $order->update_meta_data('_wooecpay_payment_order_prefix', get_option('wooecpay_payment_order_prefix')); // 前綴
+ $order->update_meta_data('_wooecpay_payment_merchant_trade_no', $merchant_trade_no); // MerchantTradeNo
+ $order->update_meta_data('_wooecpay_query_trade_tag', 0);
+
$order->add_order_note(sprintf(__('Ecpay Payment Merchant Trade No %s', 'ecpay-ecommerce-for-woocommerce'), $merchant_trade_no));
$order->save();
@@ -115,7 +137,6 @@ public function map_response()
'hashKey' => $api_payment_info['hashKey'],
'hashIv' => $api_payment_info['hashIv'],
]);
-
$autoSubmitFormService = $factory->create('AutoSubmitFormWithCmvService');
@@ -135,40 +156,38 @@ public function map_response()
'NeedExtraPaidInfo' => 'Y',
];
- $input = $this->add_type_info($input, $order) ;
+ $input = $this->add_type_info($input, $order);
switch (get_locale()) {
case 'zh_HK':
case 'zh_TW':
- break;
+ break;
case 'ko_KR':
$input['Language'] = 'KOR';
- break;
+ break;
case 'ja':
$input['Language'] = 'JPN';
- break;
+ break;
case 'zh_CN':
$input['Language'] = 'CHI';
- break;
+ break;
case 'en_US':
case 'en_AU':
case 'en_CA':
case 'en_GB':
default:
$input['Language'] = 'ENG';
- break;
+ break;
}
$generateForm = $autoSubmitFormService->generate($input, $api_payment_info['action']);
- // $generateForm = str_replace('document.getElementById("ecpay-form").submit();', '', $generateForm) ;
- echo $generateForm ;
+ echo $generateForm;
exit;
} catch (RtnException $e) {
- echo wp_kses_post( '(' . $e->getCode() . ')' . $e->getMessage() ) . PHP_EOL;
+ echo wp_kses_post('(' . $e->getCode() . ')' . $e->getMessage()) . PHP_EOL;
}
-
WC()->cart->empty_cart();
}
}
@@ -176,85 +195,99 @@ public function map_response()
public function change_map_response()
{
- if(isset($_POST['MerchantTradeNo'])){
+ if (isset($_POST['MerchantTradeNo'])) {
- $order_id = $this->get_order_id($_POST) ;
+ $order_id = $this->get_order_id($_POST);
- if ($order = wc_get_order($order_id)){
+ if ($order = wc_get_order($order_id)) {
// 物流相關程序
// -----------------------------------------------------------------------------------------------
// 物流方式
- $shipping_method_id = $order->get_items('shipping') ;
- $shipping_method_id = reset($shipping_method_id);
- $shipping_method_id = $shipping_method_id->get_method_id() ;
+ $shipping_method_id = $order->get_items('shipping');
+ $shipping_method_id = reset($shipping_method_id);
+ $shipping_method_id = $shipping_method_id->get_method_id();
// 判斷是否為超商取貨
- if(
- $shipping_method_id == 'Wooecpay_Logistic_CVS_711' ||
- $shipping_method_id == 'Wooecpay_Logistic_CVS_Family' ||
- $shipping_method_id == 'Wooecpay_Logistic_CVS_Hilife' ||
- $shipping_method_id == 'Wooecpay_Logistic_CVS_Okmart'
- ){
-
- $CVSStoreID = sanitize_text_field($_POST['CVSStoreID']);
- $CVSStoreName = sanitize_text_field($_POST['CVSStoreName']);
- $CVSAddress = sanitize_text_field($_POST['CVSAddress']);
- $CVSTelephone = sanitize_text_field($_POST['CVSTelephone']);
-
- // 驗證
- if (mb_strlen( $CVSStoreName, "utf-8") > 10) {
- $CVSStoreName = mb_substr($CVSStoreName, 0, 10, "utf-8");
- }
- if (mb_strlen( $CVSAddress, "utf-8") > 60) {
- $CVSAddress = mb_substr($CVSAddress , 0, 60, "utf-8");
- }
- if (strlen($CVSTelephone) > 20) {
- $CVSTelephone = substr($CVSTelephone , 0, 20);
- }
- if (strlen($CVSStoreID) > 10) {
- $CVSStoreID = substr($CVSTelephone , 0, 10);
+ if ($this->logisticHelper->is_ecpay_cvs_logistics($shipping_method_id)) {
+ $is_valid = true;
+
+ // 是否啟用超商離島物流
+ if (in_array('Wooecpay_Logistic_CVS_711', get_option('wooecpay_enabled_logistic_outside', []))) {
+ // 門市檢查
+ $is_valid = $this->logisticHelper->check_cvs_is_valid($shipping_method_id, $_POST['CVSOutSide']);
}
- $order->update_meta_data( '_ecpay_logistic_cvs_store_id', $CVSStoreID );
- $order->update_meta_data( '_ecpay_logistic_cvs_store_name', $CVSStoreName );
- $order->update_meta_data( '_ecpay_logistic_cvs_store_address', $CVSAddress );
- $order->update_meta_data( '_ecpay_logistic_cvs_store_telephone', $CVSTelephone );
+ if ($is_valid) {
- $order->add_order_note(sprintf(__('Change store %1$s (%2$s)', 'ecpay-ecommerce-for-woocommerce'),$CVSStoreName,$CVSStoreID));
+ $CVSStoreID = sanitize_text_field($_POST['CVSStoreID']);
+ $CVSStoreName = sanitize_text_field($_POST['CVSStoreName']);
+ $CVSAddress = sanitize_text_field($_POST['CVSAddress']);
+ $CVSTelephone = sanitize_text_field($_POST['CVSTelephone']);
- $order->save();
- }
+ // 驗證
+ if (mb_strlen( $CVSStoreName, "utf-8") > 10) {
+ $CVSStoreName = mb_substr($CVSStoreName, 0, 10, "utf-8");
+ }
+ if (mb_strlen( $CVSAddress, "utf-8") > 60) {
+ $CVSAddress = mb_substr($CVSAddress , 0, 60, "utf-8");
+ }
+ if (strlen($CVSTelephone) > 20) {
+ $CVSTelephone = substr($CVSTelephone , 0, 20);
+ }
+ if (strlen($CVSStoreID) > 10) {
+ $CVSStoreID = substr($CVSTelephone , 0, 10);
+ }
+
+ $order->update_meta_data( '_ecpay_logistic_cvs_store_id', $CVSStoreID );
+ $order->update_meta_data( '_ecpay_logistic_cvs_store_name', $CVSStoreName );
+ $order->update_meta_data( '_ecpay_logistic_cvs_store_address', $CVSAddress );
+ $order->update_meta_data( '_ecpay_logistic_cvs_store_telephone', $CVSTelephone );
+
+ $order->add_order_note(sprintf(__('Change store %1$s (%2$s)', 'ecpay-ecommerce-for-woocommerce'),$CVSStoreName,$CVSStoreID));
+
+ $order->save();
- echo '';
- echo '變更後門市資訊:
';
- echo '';
- echo '';
- echo '';
- echo '超商店舖編號: | ';
- echo wp_kses_post(''. $CVSStoreID.' | ');
- echo '
';
- echo '';
- echo '超商店舖名稱: | ';
- echo wp_kses_post(''. $CVSStoreName.' | ');
- echo '
';
- echo '';
- echo '超商店舖地址: | ';
- echo wp_kses_post(''. $CVSAddress.' | ');
- echo '
';
- echo '';
- echo '
';
- echo '';
+ echo '';
+ echo '變更後門市資訊:
';
+ echo '';
+ echo '';
+ echo '';
+ echo '超商店舖編號: | ';
+ echo wp_kses_post(''. $CVSStoreID.' | ');
+ echo '
';
+ echo '';
+ echo '超商店舖名稱: | ';
+ echo wp_kses_post(''. $CVSStoreName.' | ');
+ echo '
';
+ echo '';
+ echo '超商店舖地址: | ';
+ echo wp_kses_post(''. $CVSAddress.' | ');
+ echo '
';
+ echo '';
+ echo '
';
+ echo '';
+ } else {
+ // 組合地圖FORM
+ $form_map = $this->logisticHelper->generate_ecpay_map_form($shipping_method_id, $order->get_id());
+ $form_map = str_replace('', '', $form_map);
+ $form_map = str_replace('', '', $form_map);
+ $form_map = str_replace('', '', $form_map);
+
+ echo '';
+ echo $form_map;
+ echo '選擇門市地點與運送方式不符(離島/本島),若要重選門市請點擊「變更門市」按鈕。
';
+ echo ' ';
+ }
+ }
}
}
-
exit;
}
public function logistic_status_response()
{
-
$api_logistic_info = $this->get_ecpay_logistic_api_info();
try {
@@ -265,28 +298,20 @@ public function logistic_status_response()
]);
$checkoutResponse = $factory->create(VerifiedArrayResponse::class);
- if(isset($_POST['MerchantTradeNo'])){
+ if (isset($_POST['MerchantTradeNo'])) {
- $order_id = $this->get_order_id($_POST) ;
+ $order_id = $this->get_order_id($_POST);
- if ($order = wc_get_order($order_id)){
+ if ($order = wc_get_order($order_id)) {
// 物流方式
- $shipping_method_id = $order->get_items('shipping') ;
- $shipping_method_id = reset($shipping_method_id);
- $shipping_method_id = $shipping_method_id->get_method_id() ;
+ $shipping_method_id = $order->get_items('shipping');
+ $shipping_method_id = reset($shipping_method_id);
+ $shipping_method_id = $shipping_method_id->get_method_id();
// 判斷是否為綠界物流
- if(
- $shipping_method_id == 'Wooecpay_Logistic_CVS_711' ||
- $shipping_method_id == 'Wooecpay_Logistic_CVS_Family' ||
- $shipping_method_id == 'Wooecpay_Logistic_CVS_Hilife' ||
- $shipping_method_id == 'Wooecpay_Logistic_CVS_Okmart' ||
- $shipping_method_id == 'Wooecpay_Logistic_Home_Tcat' ||
- $shipping_method_id == 'Wooecpay_Logistic_Home_Ecan' ||
- $shipping_method_id == 'Wooecpay_Logistic_Home_Post'
- ){
-
+ if ($this->logisticHelper->is_ecpay_logistics($shipping_method_id)) {
+
$RtnMsg = sanitize_text_field($_POST['RtnMsg']);
$RtnCode = sanitize_text_field($_POST['RtnCode']);
@@ -305,15 +330,14 @@ public function logistic_status_response()
exit;
}
-
- // payment
+ // payment
// ---------------------------------------------------
protected function get_item_name($order)
{
$item_name = '';
- if ( count($order->get_items()) ) {
+ if (count($order->get_items())) {
foreach ($order->get_items() as $item) {
$item_name .= str_replace('#', '', trim($item->get_name())) . '#';
}
@@ -329,7 +353,7 @@ protected function get_ecpay_payment_api_info()
'hashKey' => '',
'hashIv' => '',
'action' => '',
- ] ;
+ ];
if ('yes' === get_option('wooecpay_enabled_payment_stage', 'yes')) {
@@ -338,10 +362,10 @@ protected function get_ecpay_payment_api_info()
'hashKey' => 'pwFHCqoQZGmho4w6',
'hashIv' => 'EkRm7iFT261dpevs',
'action' => 'https://payment-stage.ecpay.com.tw/Cashier/AioCheckOut/V5',
- ] ;
+ ];
} else {
-
+
$merchant_id = get_option('wooecpay_payment_mid');
$hash_key = get_option('wooecpay_payment_hashkey');
$hash_iv = get_option('wooecpay_payment_hashiv');
@@ -351,7 +375,7 @@ protected function get_ecpay_payment_api_info()
'hashKey' => $hash_key,
'hashIv' => $hash_iv,
'action' => 'https://payment.ecpay.com.tw/Cashier/AioCheckOut/V5',
- ] ;
+ ];
}
return $api_payment_info;
@@ -359,82 +383,79 @@ protected function get_ecpay_payment_api_info()
protected function generate_trade_no($order_id, $order_prefix = '')
{
- $trade_no = $order_prefix . substr(str_pad($order_id, 8, '0', STR_PAD_LEFT), 0, 8) . 'SN' . substr(hash('sha256', (string) time()), -5) ;
+ $trade_no = $order_prefix . substr(str_pad($order_id, 8, '0', STR_PAD_LEFT), 0, 8) . 'SN' . substr(hash('sha256', (string) time()), -5);
return substr($trade_no, 0, 20);
}
protected function add_type_info($input, $order)
{
- $payment_type = $this->get_ChoosePayment($order->get_payment_method()) ;
- switch ($payment_type) {
+ $payment_type = $this->get_ChoosePayment($order->get_payment_method());
+ switch ($payment_type) {
case 'Credit':
- $number_of_periods = (int) $order->get_meta('_ecpay_payment_number_of_periods', true);
- if (in_array($number_of_periods, [3, 6, 12, 18, 24, 30])) {
+ $number_of_periods = (int) $order->get_meta('_ecpay_payment_number_of_periods', true);
+ if (in_array($number_of_periods, [3, 6, 12, 18, 24, 30])) {
- $input['CreditInstallment'] = ( $number_of_periods == 30 ) ? '30N' : $number_of_periods;
- $order->add_order_note(sprintf(__('Credit installment to %d', 'ecpay-ecommerce-for-woocommerce'),$number_of_periods));
+ $input['CreditInstallment'] = ( $number_of_periods == 30 ) ? '30N' : $number_of_periods;
+ $order->add_order_note(sprintf(__('Credit installment to %d', 'ecpay-ecommerce-for-woocommerce'),$number_of_periods));
- $order->save();
- }
+ $order->save();
+ }
- break;
+ break;
case 'ATM':
$input['ExpireDate'] = get_option('_wooecpay_payment_expire_date', 3);
- break;
+ break;
- case 'BARCODE':
+ case 'BARCODE':
$input['StoreExpireDate'] = get_option('_wooecpay_payment_expire_date', 3);
- break;
+ break;
case 'CVS':
$input['StoreExpireDate'] = get_option('_wooecpay_payment_expire_date', 86400);
- break;
+ break;
}
return $input;
}
-
protected function get_ChoosePayment($payment_method)
{
- $choose_payment = '' ;
+ $choose_payment = '';
switch ($payment_method) {
case 'Wooecpay_Gateway_Credit':
case 'Wooecpay_Gateway_Credit_Installment':
- $choose_payment = 'Credit' ;
- break;
-
+ $choose_payment = 'Credit';
+ break;
case 'Wooecpay_Gateway_Webatm':
- $choose_payment = 'WebATM' ;
- break;
+ $choose_payment = 'WebATM';
+ break;
case 'Wooecpay_Gateway_Atm':
- $choose_payment = 'ATM' ;
- break;
+ $choose_payment = 'ATM';
+ break;
case 'Wooecpay_Gateway_Cvs':
- $choose_payment = 'CVS' ;
- break;
+ $choose_payment = 'CVS';
+ break;
case 'Wooecpay_Gateway_Barcode':
- $choose_payment = 'BARCODE' ;
- break;
-
+ $choose_payment = 'BARCODE';
+ break;
case 'Wooecpay_Gateway_Applepay':
- $choose_payment = 'ApplePay' ;
- break;
+ $choose_payment = 'ApplePay';
+ break;
}
- return $choose_payment ;
+ return $choose_payment;
}
- // logistic
+ // logistic
// ---------------------------------------------------
protected function get_order_id($info)
{
- $order_prefix = get_option('wooecpay_logistic_order_prefix') ;
+ $order_prefix = get_option('wooecpay_logistic_order_prefix');
if (isset($info['MerchantTradeNo'])) {
@@ -455,31 +476,31 @@ protected function get_ecpay_logistic_api_info($action = '')
'hashKey' => '',
'hashIv' => '',
'action' => '',
- ] ;
+ ];
if ('yes' === get_option('wooecpay_enabled_logistic_stage', 'yes')) {
$wooecpay_logistic_cvs_type = get_option('wooecpay_logistic_cvs_type');
- if($wooecpay_logistic_cvs_type == 'C2C'){
+ if ($wooecpay_logistic_cvs_type == 'C2C') {
$api_info = [
'merchant_id' => '2000933',
'hashKey' => 'XBERn1YOvpM9nfZc',
'hashIv' => 'h1ONHk4P4yqbl5LK',
- ] ;
+ ];
- } else if($wooecpay_logistic_cvs_type == 'B2C'){
+ } else if ($wooecpay_logistic_cvs_type == 'B2C') {
$api_info = [
'merchant_id' => '2000132',
'hashKey' => '5294y06JbISpM5x9',
'hashIv' => 'v77hoKGq4kWxNNIS',
- ] ;
+ ];
}
} else {
-
+
$merchant_id = get_option('wooecpay_logistic_mid');
$hash_key = get_option('wooecpay_logistic_hashkey');
$hash_iv = get_option('wooecpay_logistic_hashiv');
@@ -488,39 +509,33 @@ protected function get_ecpay_logistic_api_info($action = '')
'merchant_id' => $merchant_id,
'hashKey' => $hash_key,
'hashIv' => $hash_iv,
- ] ;
+ ];
}
if ('yes' === get_option('wooecpay_enabled_payment_stage', 'yes')) {
switch ($action) {
-
case 'map':
- $api_info['action'] = 'https://logistics-stage.ecpay.com.tw/Express/map' ;
- break;
-
+ $api_info['action'] = 'https://logistics-stage.ecpay.com.tw/Express/map';
+ break;
case 'create':
- $api_info['action'] = 'https://logistics-stage.ecpay.com.tw/Express/Create' ;
- break;
-
+ $api_info['action'] = 'https://logistics-stage.ecpay.com.tw/Express/Create';
+ break;
default:
- break;
+ break;
}
} else {
switch ($action) {
-
case 'map':
- $api_info['action'] = 'https://logistics.ecpay.com.tw/Express/map' ;
- break;
-
+ $api_info['action'] = 'https://logistics.ecpay.com.tw/Express/map';
+ break;
case 'create':
- $api_info['action'] = 'https://logistics.ecpay.com.tw/Express/Create' ;
- break;
-
+ $api_info['action'] = 'https://logistics.ecpay.com.tw/Express/Create';
+ break;
default:
- break;
+ break;
}
}
diff --git a/ecpay-ecommerce-for-woocommerce/includes/services/payment/ecpay-gateway-base.php b/ecpay-ecommerce-for-woocommerce/includes/services/payment/ecpay-gateway-base.php
index 18f626a..48a7335 100644
--- a/ecpay-ecommerce-for-woocommerce/includes/services/payment/ecpay-gateway-base.php
+++ b/ecpay-ecommerce-for-woocommerce/includes/services/payment/ecpay-gateway-base.php
@@ -1,15 +1,21 @@
logisticHelper = new Wooecpay_Logistic_Helper;
+
if ($this->enabled) {
add_action('woocommerce_receipt_' . $this->id, array( $this, 'receipt_page' ));
+ add_action('woocommerce_api_wooecpay_logistic_redirect_map',array( $this, 'redirect_map'));
}
// 感謝頁
@@ -26,22 +32,17 @@ public function receipt_page($order_id)
// 物流方式
$shipping_method_id = $order->get_items('shipping') ;
- if(empty($shipping_method_id)){
+ if (empty($shipping_method_id)) {
$shippping_tag = false ;
} else {
- $shipping_method_id = reset($shipping_method_id);
+ $shipping_method_id = reset($shipping_method_id);
$shipping_method_id = $shipping_method_id->get_method_id() ;
$shippping_tag = true ;
}
- if(
- $shippping_tag && ($shipping_method_id == 'Wooecpay_Logistic_CVS_711' ||
- $shipping_method_id == 'Wooecpay_Logistic_CVS_Family' ||
- $shipping_method_id == 'Wooecpay_Logistic_CVS_Hilife' ||
- $shipping_method_id == 'Wooecpay_Logistic_CVS_Okmart')
- ){
+ if ($shippping_tag && $this->logisticHelper->is_ecpay_cvs_logistics($shipping_method_id)) {
// 執行地圖選擇
@@ -69,7 +70,7 @@ public function receipt_page($order_id)
];
$form_map = $autoSubmitFormService->generate($input, $api_logistic_info['action']);
-
+
echo $form_map ;
} catch (RtnException $e) {
@@ -81,7 +82,7 @@ public function receipt_page($order_id)
$api_payment_info = $this->get_ecpay_payment_api_info();
$merchant_trade_no = $this->generate_trade_no($order->get_id(), get_option('wooecpay_payment_order_prefix'));
-
+
// 綠界訂單顯示商品名稱判斷
if ('yes' === get_option('wooecpay_enabled_payment_disp_item_name', 'yes')) {
@@ -96,7 +97,7 @@ public function receipt_page($order_id)
// 紀錄訂單其他資訊
$order->update_meta_data( '_wooecpay_payment_order_prefix', get_option('wooecpay_payment_order_prefix') ); // 前綴
- $order->update_meta_data( '_wooecpay_payment_merchant_trade_no', $merchant_trade_no ); //MerchantTradeNo
+ $order->update_meta_data( '_wooecpay_payment_merchant_trade_no', $merchant_trade_no ); //MerchantTradeNo
$order->update_meta_data( '_wooecpay_query_trade_tag', 0);
$order->add_order_note(sprintf(__('Ecpay Payment Merchant Trade No %s', 'ecpay-ecommerce-for-woocommerce'), $merchant_trade_no));
@@ -162,15 +163,27 @@ public function receipt_page($order_id)
}
WC()->cart->empty_cart();
- }
+ }
+ }
+ }
+
+ public function redirect_map()
+ {
+ $id = str_replace(' ','+', $_GET['id']);
+ $order_id = $this->logisticHelper->decrypt_order_id($id);
+
+ if (wc_get_order($order_id)) {
+ $this->receipt_page($order_id);
}
+
+ exit;
}
- // payment
+ // payment
// ---------------------------------------------------
// 感謝頁面
- public function thankyou_page($order_id)
+ public function thankyou_page($order_id)
{
// var_dump($order->get_payment_method());
// var_dump($order->get_meta('wooecpay_payment_order_prefix'));
@@ -179,7 +192,7 @@ public function thankyou_page($order_id)
return;
}
- if (!$order = wc_get_order($order_id)) {
+ if (!$order = wc_get_order($order_id)) {
return;
}
@@ -194,7 +207,7 @@ public function thankyou_page($order_id)
case 'Wooecpay_Gateway_Barcode':
$template_file = 'payment/barcode.php';
- break;
+ break;
}
if (isset($template_file)) {
@@ -238,7 +251,7 @@ protected function get_ecpay_payment_api_info()
] ;
} else {
-
+
$merchant_id = get_option('wooecpay_payment_mid');
$hash_key = get_option('wooecpay_payment_hashkey');
$hash_iv = get_option('wooecpay_payment_hashiv');
@@ -262,7 +275,7 @@ protected function generate_trade_no($order_id, $order_prefix = '')
protected function add_type_info($input, $order)
{
- switch ($this->payment_type) {
+ switch ($this->payment_type) {
case 'Credit':
@@ -280,7 +293,7 @@ protected function add_type_info($input, $order)
case 'ATM':
$input['ExpireDate'] = $this->expire_date;
- $order->update_meta_data( '_wooecpay_payment_expire_date', $this->expire_date );
+ $order->update_meta_data( '_wooecpay_payment_expire_date', $this->expire_date );
$order->save();
break;
@@ -298,7 +311,7 @@ protected function add_type_info($input, $order)
return $input;
}
- // logistic
+ // logistic
// ---------------------------------------------------
protected function get_ecpay_logistic_api_info()
@@ -314,7 +327,7 @@ protected function get_ecpay_logistic_api_info()
$wooecpay_logistic_cvs_type = get_option('wooecpay_logistic_cvs_type');
- if($wooecpay_logistic_cvs_type == 'C2C'){
+ if ($wooecpay_logistic_cvs_type == 'C2C') {
$api_info = [
'merchant_id' => '2000933',
@@ -323,7 +336,7 @@ protected function get_ecpay_logistic_api_info()
'action' => 'https://logistics-stage.ecpay.com.tw/Express/map',
] ;
- } else if($wooecpay_logistic_cvs_type == 'B2C'){
+ } else if ($wooecpay_logistic_cvs_type == 'B2C') {
$api_info = [
'merchant_id' => '2000132',
@@ -334,7 +347,7 @@ protected function get_ecpay_logistic_api_info()
}
} else {
-
+
$merchant_id = get_option('wooecpay_logistic_mid');
$hash_key = get_option('wooecpay_logistic_hashkey');
$hash_iv = get_option('wooecpay_logistic_hashiv');
@@ -363,67 +376,69 @@ protected function get_logistics_sub_type($shipping_method_id)
$logisticsType = [
'type' => '',
'sub_type' => '',
- ] ;
+ ];
- switch ($shipping_method_id) {
+ switch ($shipping_method_id) {
case 'Wooecpay_Logistic_CVS_711':
+ case 'Wooecpay_Logistic_CVS_711_Outside':
- $logisticsType['type'] = 'CVS' ;
+ $logisticsType['type'] = 'CVS';
- if($wooecpay_logistic_cvs_type == 'C2C'){
- $logisticsType['sub_type'] = 'UNIMARTC2C' ;
- } else if($wooecpay_logistic_cvs_type == 'B2C'){
- $logisticsType['sub_type'] = 'UNIMART' ;
+ if ($wooecpay_logistic_cvs_type == 'C2C') {
+ $logisticsType['sub_type'] = 'UNIMARTC2C';
+ } else if ($wooecpay_logistic_cvs_type == 'B2C') {
+ $logisticsType['sub_type'] = 'UNIMART';
}
- break;
+ break;
case 'Wooecpay_Logistic_CVS_Family':
-
- $logisticsType['type'] = 'CVS' ;
- if($wooecpay_logistic_cvs_type == 'C2C'){
- $logisticsType['sub_type'] = 'FAMIC2C' ;
- } else if($wooecpay_logistic_cvs_type == 'B2C'){
- $logisticsType['sub_type'] = 'FAMI' ;
+ $logisticsType['type'] = 'CVS';
+
+ if ($wooecpay_logistic_cvs_type == 'C2C') {
+ $logisticsType['sub_type'] = 'FAMIC2C';
+ } else if ($wooecpay_logistic_cvs_type == 'B2C') {
+ $logisticsType['sub_type'] = 'FAMI';
}
- break;
+ break;
case 'Wooecpay_Logistic_CVS_Hilife':
- $logisticsType['type'] = 'CVS' ;
+ $logisticsType['type'] = 'CVS';
- if($wooecpay_logistic_cvs_type == 'C2C'){
- $logisticsType['sub_type'] = 'HILIFEC2C' ;
- } else if($wooecpay_logistic_cvs_type == 'B2C'){
- $logisticsType['sub_type'] = 'HILIFE' ;
+ if ($wooecpay_logistic_cvs_type == 'C2C') {
+ $logisticsType['sub_type'] = 'HILIFEC2C';
+ } else if ($wooecpay_logistic_cvs_type == 'B2C') {
+ $logisticsType['sub_type'] = 'HILIFE';
}
- break;
+ break;
case 'Wooecpay_Logistic_CVS_Okmart':
- $logisticsType['type'] = 'CVS' ;
+ $logisticsType['type'] = 'CVS';
- if($wooecpay_logistic_cvs_type == 'C2C'){
- $logisticsType['sub_type'] = 'OKMARTC2C' ;
+ if ($wooecpay_logistic_cvs_type == 'C2C') {
+ $logisticsType['sub_type'] = 'OKMARTC2C';
}
- break;
+ break;
case 'Wooecpay_Logistic_Home_Tcat':
- $logisticsType['type'] = 'HOME' ;
- $logisticsType['sub_type'] = 'TCAT' ;
- break;
+ case 'Wooecpay_Logistic_Home_Tcat_Outside':
+ $logisticsType['type'] = 'HOME';
+ $logisticsType['sub_type'] = 'TCAT';
+ break;
case 'Wooecpay_Logistic_Home_Ecan':
- $logisticsType['type'] = 'HOME' ;
- $logisticsType['sub_type'] = 'ECAN' ;
- break;
+ $logisticsType['type'] = 'HOME';
+ $logisticsType['sub_type'] = 'ECAN';
+ break;
case 'Wooecpay_Logistic_Home_Post':
- $logisticsType['type'] = 'HOME' ;
- $logisticsType['sub_type'] = 'POST' ;
- break;
+ $logisticsType['type'] = 'HOME';
+ $logisticsType['sub_type'] = 'POST';
+ break;
}
return $logisticsType;
diff --git a/ecpay-ecommerce-for-woocommerce/includes/services/payment/woocommerce-gateway-cod.php b/ecpay-ecommerce-for-woocommerce/includes/services/payment/woocommerce-gateway-cod.php
index d110d92..d374cf8 100644
--- a/ecpay-ecommerce-for-woocommerce/includes/services/payment/woocommerce-gateway-cod.php
+++ b/ecpay-ecommerce-for-woocommerce/includes/services/payment/woocommerce-gateway-cod.php
@@ -1,7 +1,6 @@
logisticHelper = new Wooecpay_Logistic_Helper;
-
+
// parent::__construct();
}
public function woocommerce_cod_pending_payment_order_status($order_status, $order) {
-
+
// 物流方式
$shipping_method_id = $order->get_items('shipping') ;
- $shipping_method_id = reset($shipping_method_id);
+ $shipping_method_id = reset($shipping_method_id);
$shipping_method_id = $shipping_method_id->get_method_id() ;
- if (
- $shipping_method_id == 'Wooecpay_Logistic_CVS_711' ||
- $shipping_method_id == 'Wooecpay_Logistic_CVS_Family' ||
- $shipping_method_id == 'Wooecpay_Logistic_CVS_Hilife' ||
- $shipping_method_id == 'Wooecpay_Logistic_CVS_Okmart'
- ) {
- $order_status = 'pending';
+ if ($this->logisticHelper->is_ecpay_cvs_logistics($shipping_method_id)) {
+ $order_status = 'pending';
}
return $order_status ;
@@ -48,7 +45,6 @@ public function woocommerce_cod_pending_payment_order_status($order_status, $ord
// 修改必填欄位判斷
public function cvs_info_process($fields)
{
-
$fields['shipping']['shipping_country']['required'] = false;
$fields['shipping']['shipping_address_1']['required'] = false;
$fields['shipping']['shipping_address_2']['required'] = false;
@@ -75,20 +71,16 @@ public function cvs_map($order_id)
} else {
- $shipping_method_id = reset($shipping_method_id);
+ $shipping_method_id = reset($shipping_method_id);
$shipping_method_id = $shipping_method_id->get_method_id() ;
$shippping_tag = true ;
}
if (
- $payment_method == 'cod' &&
- $shippping_tag &&
- ($shipping_method_id == 'Wooecpay_Logistic_CVS_711' ||
- $shipping_method_id == 'Wooecpay_Logistic_CVS_Family' ||
- $shipping_method_id == 'Wooecpay_Logistic_CVS_Hilife' ||
- $shipping_method_id == 'Wooecpay_Logistic_CVS_Okmart')
+ $payment_method == 'cod' &&
+ $shippping_tag &&
+ $this->logisticHelper->is_ecpay_cvs_logistics($shipping_method_id)
) {
-
// 取出商店代號
$CVSStoreID = $order->get_meta('_ecpay_logistic_cvs_store_id') ;
@@ -96,57 +88,80 @@ public function cvs_map($order_id)
// 不存在
if (empty($CVSStoreID)) {
-
-
// 判斷是否有回傳資訊
if (isset($_POST['CVSStoreID'])) {
- $CVSStoreID = sanitize_text_field($_POST['CVSStoreID']);
- $CVSStoreName = sanitize_text_field($_POST['CVSStoreName']);
- $CVSAddress = sanitize_text_field($_POST['CVSAddress']);
- $CVSTelephone = sanitize_text_field($_POST['CVSTelephone']);
-
- // 驗證
- if (mb_strlen( $CVSStoreName, "utf-8") > 10) {
- $CVSStoreName = mb_substr($CVSStoreName, 0, 10, "utf-8");
- }
- if (mb_strlen( $CVSAddress, "utf-8") > 60) {
- $CVSAddress = mb_substr($CVSAddress , 0, 60, "utf-8");
- }
- if (strlen($CVSTelephone) > 20) {
- $CVSTelephone = substr($CVSTelephone , 0, 20);
- }
- if (strlen($CVSStoreID) > 10) {
- $CVSStoreID = substr($CVSTelephone , 0, 10);
+ $is_valid = true;
+
+ // 是否啟用超商離島物流
+ if (in_array('Wooecpay_Logistic_CVS_711', get_option('wooecpay_enabled_logistic_outside', []))) {
+ // 門市檢查
+ $is_valid = $this->logisticHelper->check_cvs_is_valid($shipping_method_id, $_POST['CVSOutSide']);
}
- $order->set_shipping_company('');
- $order->set_shipping_address_2('');
- $order->set_shipping_city('');
- $order->set_shipping_state('');
- $order->set_shipping_postcode('');
- $order->set_shipping_address_1($_POST['CVSAddress']);
+ if ($is_valid) {
+ $CVSStoreID = sanitize_text_field($_POST['CVSStoreID']);
+ $CVSStoreName = sanitize_text_field($_POST['CVSStoreName']);
+ $CVSAddress = sanitize_text_field($_POST['CVSAddress']);
+ $CVSTelephone = sanitize_text_field($_POST['CVSTelephone']);
+
+ // 驗證
+ if (mb_strlen( $CVSStoreName, "utf-8") > 10) {
+ $CVSStoreName = mb_substr($CVSStoreName, 0, 10, "utf-8");
+ }
+ if (mb_strlen( $CVSAddress, "utf-8") > 60) {
+ $CVSAddress = mb_substr($CVSAddress , 0, 60, "utf-8");
+ }
+ if (strlen($CVSTelephone) > 20) {
+ $CVSTelephone = substr($CVSTelephone , 0, 20);
+ }
+ if (strlen($CVSStoreID) > 10) {
+ $CVSStoreID = substr($CVSTelephone , 0, 10);
+ }
+
+ $order->set_shipping_company('');
+ $order->set_shipping_address_2('');
+ $order->set_shipping_city('');
+ $order->set_shipping_state('');
+ $order->set_shipping_postcode('');
+ $order->set_shipping_address_1($_POST['CVSAddress']);
- $order->update_meta_data( '_ecpay_logistic_cvs_store_id', $CVSStoreID );
- $order->update_meta_data( '_ecpay_logistic_cvs_store_name', $CVSStoreName );
- $order->update_meta_data( '_ecpay_logistic_cvs_store_address', $CVSAddress );
- $order->update_meta_data( '_ecpay_logistic_cvs_store_telephone', $CVSTelephone );
+ $order->update_meta_data( '_ecpay_logistic_cvs_store_id', $CVSStoreID );
+ $order->update_meta_data( '_ecpay_logistic_cvs_store_name', $CVSStoreName );
+ $order->update_meta_data( '_ecpay_logistic_cvs_store_address', $CVSAddress );
+ $order->update_meta_data( '_ecpay_logistic_cvs_store_telephone', $CVSTelephone );
- $order->add_order_note(sprintf(__('Change store %1$s (%2$s)', 'ecpay-ecommerce-for-woocommerce'),$CVSStoreName,$CVSStoreID));
+ $order->add_order_note(sprintf(__('Change store %1$s (%2$s)', 'ecpay-ecommerce-for-woocommerce'),$CVSStoreName,$CVSStoreID));
- $order->save();
+ $order->save();
- $order->update_status('processing');
+ $order->update_status('processing');
- // 產生物流訂單
- if ('yes' === get_option('wooecpay_enable_logistic_auto', 'yes')) {
+ // 產生物流訂單
+ if ('yes' === get_option('wooecpay_enable_logistic_auto', 'yes')) {
- // 是否已經開立
- $wooecpay_logistic_AllPayLogisticsID = get_post_meta( $order->get_id(), '_wooecpay_logistic_AllPayLogisticsID', true );
+ // 是否已經開立
+ $wooecpay_logistic_AllPayLogisticsID = get_post_meta( $order->get_id(), '_wooecpay_logistic_AllPayLogisticsID', true );
- if (empty($wooecpay_logistic_AllPayLogisticsID)) {
- $this->logisticHelper->send_logistic_order_action($order_id, false);
+ if (empty($wooecpay_logistic_AllPayLogisticsID)) {
+ $this->logisticHelper->send_logistic_order_action($order_id, false);
+ }
}
+ } else {
+ // 重導地圖API
+ $confirm_msg = __('The selected store does not match the chosen shipping method (Outlying Island/Main Island). Please select a different store or cancel the transaction and place a new order.', 'ecpay-ecommerce-for-woocommerce');
+ $encryption_order_id = $this->logisticHelper->encrypt_order_id($order_id);
+ $redirect_cvs_map_url = WC()->api_request_url('wooecpay_logistic_redirect_cvs_map_cod', true) . '&id=' . $encryption_order_id;
+ $canceled_url = WC()->api_request_url('wooecpay_logistic_cancel_order_cod', true) . '&id=' . $encryption_order_id;
+
+ // 提示訊息
+ echo '';
}
} else {
@@ -178,11 +193,47 @@ public function cvs_map($order_id)
} catch (RtnException $e) {
// echo wp_kses_post( '(' . $e->getCode() . ')' . $e->getMessage() ) . PHP_EOL;
}
- }
+ }
}
}
}
+ // 取消訂單
+ public function cancel_order_cod()
+ {
+ // 解析訂單編號
+ $id = str_replace(' ', '+', $_GET['id']);
+ $order_id = $this->logisticHelper->decrypt_order_id($id);
+
+ if (!$order = wc_get_order($order_id)) {
+ return;
+ }
+
+ if ($order->get_status() !== 'failed') {
+ // 更新訂單狀態及備註
+ $order->update_status('failed');
+ // 提示文字
+ $order->add_order_note(__('The selected store does not match the chosen shipping method (Outlying Island/Main Island).', 'ecpay-ecommerce-for-woocommerce'));
+ }
+
+ // 錯誤提示畫面
+ $template_file = 'logistic/cvs_map_error.php';
+ wc_get_template($template_file, ['back_url' => home_url()], '', WOOECPAY_PLUGIN_INCLUDE_DIR . '/templates/');
+
+ exit;
+ }
+
+ // 重導電子地圖
+ public function redirect_cvs_map_cod()
+ {
+ $id = str_replace(' ', '+', $_GET['id']);
+ $order_id = $this->logisticHelper->decrypt_order_id($id);
+
+ do_action('woocommerce_ecpay_logistic_cvs_map_cod', $order_id);
+
+ exit;
+ }
+
// 感謝頁面(超商資訊)
public function thankyou_page($order_id)
{
@@ -190,7 +241,7 @@ public function thankyou_page($order_id)
return;
}
- if (!$order = wc_get_order($order_id)) {
+ if (!$order = wc_get_order($order_id)) {
return;
}
@@ -210,7 +261,7 @@ public function thankyou_page($order_id)
}
}
}
-
+
}
diff --git a/ecpay-ecommerce-for-woocommerce/includes/templates/logistic/cvs_map_error.php b/ecpay-ecommerce-for-woocommerce/includes/templates/logistic/cvs_map_error.php
new file mode 100644
index 0000000..84d6591
--- /dev/null
+++ b/ecpay-ecommerce-for-woocommerce/includes/templates/logistic/cvs_map_error.php
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 交易失敗,請重新購買
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 交易取消 !!
+
+
+
+
+ 選擇物流運費與超商門市地點不符,
+ 因此取消訂單,請回到商店後重新購買。
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ecpay-ecommerce-for-woocommerce/languages/ecpay-ecommerce-for-woocommerce-zh_TW.mo b/ecpay-ecommerce-for-woocommerce/languages/ecpay-ecommerce-for-woocommerce-zh_TW.mo
index e784c27..5f4991d 100644
Binary files a/ecpay-ecommerce-for-woocommerce/languages/ecpay-ecommerce-for-woocommerce-zh_TW.mo and b/ecpay-ecommerce-for-woocommerce/languages/ecpay-ecommerce-for-woocommerce-zh_TW.mo differ
diff --git a/ecpay-ecommerce-for-woocommerce/languages/ecpay-ecommerce-for-woocommerce-zh_TW.po b/ecpay-ecommerce-for-woocommerce/languages/ecpay-ecommerce-for-woocommerce-zh_TW.po
index f44eb53..8b2b67e 100644
--- a/ecpay-ecommerce-for-woocommerce/languages/ecpay-ecommerce-for-woocommerce-zh_TW.po
+++ b/ecpay-ecommerce-for-woocommerce/languages/ecpay-ecommerce-for-woocommerce-zh_TW.po
@@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ECPay Ecommerce for WooCommerce\n"
"POT-Creation-Date: 2023-05-25 09:52+0800\n"
-"PO-Revision-Date: 2023-05-25 10:26+0800\n"
+"PO-Revision-Date: 2023-10-31 09:49+0800\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: zh_TW\n"
@@ -532,6 +532,10 @@ msgstr "請確認輸入的手機條碼載具是否正確,或選擇其他載具
msgid "Ecpay CVS 7-11"
msgstr "綠界物流 超商取貨 7-ELEVEN"
+#: includes/services/logistic/ecpay-logistic-cvs-711-outside.php:12
+msgid "Ecpay CVS 7-11 Outside"
+msgstr "綠界物流 超商取貨 7-ELEVEN 離島"
+
#: includes/services/logistic/ecpay-logistic-cvs-family.php:9
msgid "Ecpay CVS Family"
msgstr "綠界物流 超商取貨 全家便利店"
@@ -556,6 +560,10 @@ msgstr "綠界物流 宅配 中華郵政"
msgid "Ecpay Home Tcat"
msgstr "綠界物流 宅配 黑貓"
+#: includes/services/logistic/ecpay-logistic-home-tcat-outside.php:9
+msgid "Ecpay Home Tcat Outside"
+msgstr "綠界物流 宅配 黑貓 離島"
+
#: includes/services/logistic/ecpay-logistic-response.php:79
#, php-format
msgid "CVS store %1$s (%2$s)"
@@ -729,5 +737,33 @@ msgstr "啟用綠界物流
若要使用超商貨到付款時,須啟用綠
msgid "When you disable the ECPay gateway method, the ECPay shipping method will be closed at the same time. Are you sure you want to disable the ECPay gateway method?"
msgstr "關閉綠界金流服務時,將同時關閉綠界物流服務。確定要關閉金流服務嗎?"
+#: admin/order/class-wooecpay-order.php:400
+msgid "The order update failed as the selected store does not match the chosen shipping method (Outlying Island/Main Island)."
+msgstr "訂單更新失敗,選擇門市地點與運送方式不符(離島/本島)。"
+
+#: admin/order/class-wooecpay-order.php:400
+msgid "Order Save Error"
+msgstr "訂單更新失敗"
+
+#: includes/services/logistic/class-wooecpay-logistic.php:177
+msgid "The selected shipping method does not match the shipping address. Please choose again."
+msgstr "選擇運送方式與宅配地點不符,請重新選擇。"
+
+#: includes/services/payment/woocommerce-gateway-cod.php:158
+msgid "The selected store does not match the chosen shipping method (Outlying Island/Main Island). Please select a different store or cancel the transaction and place a new order."
+msgstr "選擇門市地點與運送方式不符(離島/本島),請重新選擇門市或取消交易重新下單。"
+
+#: includes/services/payment/woocommerce-gateway-cod.php:215
+msgid "The selected store does not match the chosen shipping method (Outlying Island/Main Island)."
+msgstr "選擇門市地點與運送方式不符(離島/本島)。"
+
+#: includes/config/logistic/settings.php:96
+msgid "Notice:
1. The option will only appear in the 「Shipping Method」 after activation.
2. If 「Ecpay CVS 7-11」 outlying islands shipping is not enabled, there will be no distinction between outlying island and main island shipments; shipping settings will be shared.
3. If 「Ecpay CVS 7-11」 outlying islands shipping is enabled, after selecting a store, it will verify if the chosen store aligns with the selected shipping method.
4. If 「Ecpay Home Tcat」 outlying islands shipping is not enabled, there will be no distinction between outlying island and main island shipments; shipping settings will be shared.
5. If 「Ecpay Home Tcat」 outlying islands shipping is enabled, it will verify before checkout whether the shipping destination matches the selected shipping method."
+msgstr "離島物流注意事項:
1. 啟用後才會在「運送方式」出現選項
2. 若未啟用「綠界物流 超商取貨 7-ELEVEN」離島物流,則不分本島離島,共用物流設定
3. 若啟用「綠界物流 超商取貨 7-ELEVEN」離島物流,選擇門市後會檢查所選門市是否與所選物流方式相符
4. 若未啟用「綠界物流 宅配 黑貓」離島物流,則不分本島離島,共用物流設定
5. 若啟用「綠界物流 宅配 黑貓」離島物流,結帳前會檢查運送地點是否與所選物流方式相符"
+
+#: includes/config/logistic/settings.php:91
+msgid "Enable ECPay outlying islands shipping"
+msgstr "啟用離島物流"
+
#~ msgid "shipping fee"
#~ msgstr "物流費用"
diff --git a/ecpay-ecommerce-for-woocommerce/public/css/cvs_map_error/cvs_map_error.css b/ecpay-ecommerce-for-woocommerce/public/css/cvs_map_error/cvs_map_error.css
new file mode 100644
index 0000000..32c15ec
--- /dev/null
+++ b/ecpay-ecommerce-for-woocommerce/public/css/cvs_map_error/cvs_map_error.css
@@ -0,0 +1,154 @@
+@charset "UTF-8";
+@import url(page.css);
+/*--狀態--*/
+.ctp-status-wrap {
+ width: 100%;
+ max-width: 1360px;
+ min-height: 700px;
+ background: #FFF;
+ padding: 0px 30px 30px;
+ margin: 30px auto 0;
+ display: -webkit-box;
+ display: -ms-flexbox;
+ display: flex;
+ -webkit-box-align: start;
+ -ms-flex-align: start;
+ align-items: flex-start;
+ -webkit-box-pack: center;
+ -ms-flex-pack: center;
+ justify-content: center;
+}
+.ctp-status-wrap .csw-box {
+ width: 100%;
+ max-width: 360px;
+}
+.ctp-status-wrap .csb-ic {
+ width: 100%;
+ margin-left: auto;
+ margin-right: auto;
+ display: -webkit-box;
+ display: -ms-flexbox;
+ display: flex;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
+ -webkit-box-pack: center;
+ -ms-flex-pack: center;
+ justify-content: center;
+}
+.ctp-status-wrap .csb-ic.cai-success + .csb-title {
+ margin-top: -30px;
+}
+.ctp-status-wrap .csb-ic.cai-fail {
+ max-width: 300px;
+}
+.ctp-status-wrap .csb-ic.cai-fail + .csb-title {
+ margin-top: 0;
+}
+.ctp-status-wrap .csb-ic.cai-tbcomfirmed + .csb-title {
+ margin-top: 30px;
+}
+.ctp-status-wrap .csb-ic .cic-ani {
+ width: 100%;
+ display: block;
+}
+.ctp-status-wrap .csb-ic img {
+ max-width: 100%;
+}
+.ctp-status-wrap .csb-title {
+ font-size: 30px;
+ color: #3C4257;
+ line-height: 1.2;
+ margin-bottom: 30px;
+}
+.ctp-status-wrap .csb-title .cst-txt {
+ font-size: 16px;
+ line-height: 1.4;
+ margin-top: 5px;
+}
+.ctp-status-wrap .csb-info-box {
+ width: 100%;
+ padding: 30px 25px;
+ margin-bottom: 16px;
+ background: #F3F3F3;
+}
+.ctp-status-wrap .csb-info-box .cib-title {
+ font-size: 18px;
+ line-height: 1.4;
+ color: #3C4257;
+ margin-bottom: 30px;
+}
+.ctp-status-wrap .csb-info-box .cib-txt {
+ font-size: 18px;
+ line-height: 1.4;
+ color: #3C4257;
+ margin-top: 10px;
+}
+.ctp-status-wrap .csb-info-box .cib-list {
+ width: 100%;
+ font-size: 16px;
+ font-weight: bold;
+ line-height: 1.4;
+ color: #3C4257;
+}
+.ctp-status-wrap .csb-info-box .cib-list li {
+ margin-bottom: 10px;
+}
+.ctp-status-wrap .csb-info-box .cib-list li:last-child {
+ margin-bottom: 0;
+}
+.ctp-status-wrap .csb-btn-box {
+ width: 100%;
+}
+.ctp-status-wrap .csb-btn-box .btn {
+ width: 100%;
+ margin: 0;
+}
+@media (max-width: 768px) {
+ .ctp-status-wrap {
+ width: calc(100% - 30px);
+ min-height: 0;
+ margin: 0 auto;
+ padding: 0px 20px 30px;
+ }
+ .ctp-status-wrap .csb-ic.cai-tbcomfirmed {
+ padding-top: 30px;
+ }
+ .ctp-status-wrap .csb-ic.cai-tbcomfirmed + .csb-title {
+ margin-top: 30px;
+ }
+ .ctp-status-wrap .csb-title {
+ font-size: 30px;
+ margin-bottom: 20px;
+ }
+ .ctp-status-wrap .csb-title .cst-txt {
+ font-size: 15px;
+ }
+ .ctp-status-wrap .csb-info-box {
+ width: 100%;
+ padding: 20px 18px;
+ margin-bottom: 10px;
+ background: #F3F3F3;
+ }
+ .ctp-status-wrap .csb-info-box .cib-title {
+ font-size: 16px;
+ margin-bottom: 20px;
+ }
+ .ctp-status-wrap .csb-info-box .cib-txt {
+ font-size: 16px;
+ }
+ .ctp-status-wrap .csb-info-box .cib-list {
+ font-size: 14px;
+ }
+ .ctp-status-wrap .csb-info-box .cib-list li {
+ margin-bottom: 10px;
+ }
+ .ctp-status-wrap .csb-btn-box {
+ width: 100%;
+ }
+ .ctp-status-wrap .csb-btn-box .btn {
+ width: 100%;
+ }
+}
+
+/*----*/
\ No newline at end of file
diff --git a/ecpay-ecommerce-for-woocommerce/public/css/cvs_map_error/fonts.css b/ecpay-ecommerce-for-woocommerce/public/css/cvs_map_error/fonts.css
new file mode 100644
index 0000000..e4e410c
--- /dev/null
+++ b/ecpay-ecommerce-for-woocommerce/public/css/cvs_map_error/fonts.css
@@ -0,0 +1,503 @@
+@font-face {
+ font-family: 'icomoon';
+ src: url('../fonts/icomoon.eot?e932b5');
+ src: url('../fonts/icomoon.eot?e932b5#iefix') format('embedded-opentype'),
+ url('../fonts/icomoon.ttf?e932b5') format('truetype'),
+ url('../fonts/icomoon.woff?e932b5') format('woff'),
+ url('../fonts/icomoon.svg?e932b5#icomoon') format('svg');
+ font-weight: normal;
+ font-style: normal;
+}
+
+[class^="icon-"], [class*=" icon-"] {
+ /* use !important to prevent issues with browser extensions that change fonts */
+ font-family: 'icomoon' !important;
+ speak: none;
+ font-style: normal;
+ font-weight: normal;
+ font-variant: normal;
+ text-transform: none;
+ line-height: 1;
+
+ /* Better Font Rendering =========== */
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
+
+.icon-mail:before {
+ content: "\e91a";
+}
+.icon-menu1:before {
+ content: "\e93a";
+}
+.icon-minus1:before {
+ content: "\e93b";
+}
+.icon-minus2:before {
+ content: "\e93c";
+}
+.icon-msg:before {
+ content: "\e94c";
+}
+.icon-normal_temp:before {
+ content: "\e94d";
+}
+.icon-search:before {
+ content: "\e952";
+}
+.icon-swp-arrow-l:before {
+ content: "\e953";
+}
+.icon-swp-arrow-r:before {
+ content: "\e95b";
+}
+.icon-tel:before {
+ content: "\e95c";
+}
+.icon-totop:before {
+ content: "\e95d";
+}
+.icon-triangle_left:before {
+ content: "\e95e";
+}
+.icon-triangle_right:before {
+ content: "\e95f";
+}
+.icon-truck:before {
+ content: "\e960";
+}
+.icon-location:before {
+ content: "\e961";
+}
+.icon-close:before {
+ content: "\e962";
+}
+.icon-delete:before {
+ content: "\e963";
+}
+.icon-doc_write:before {
+ content: "\e964";
+}
+.icon-doclist:before {
+ content: "\e965";
+}
+.icon-fb:before {
+ content: "\e966";
+}
+.icon-finish:before {
+ content: "\e967";
+}
+.icon-freez_temp:before {
+ content: "\e968";
+}
+.icon-global:before {
+ content: "\e969";
+}
+.icon-ice_temp:before {
+ content: "\e96a";
+}
+.icon-ig:before {
+ content: "\e96c";
+}
+.icon-line1:before {
+ content: "\e96d";
+}
+.icon-cart1:before {
+ content: "\e96e";
+}
+.icon-add:before {
+ content: "\e96f";
+}
+.icon-add2:before {
+ content: "\e970";
+}
+.icon-arrow_down2:before {
+ content: "\e972";
+}
+.icon-arrrow_down:before {
+ content: "\e973";
+}
+.icon-arrrow_left:before {
+ content: "\e974";
+}
+.icon-attention:before {
+ content: "\e975";
+}
+.icon-icon_delete:before {
+ content: "\e939";
+}
+.icon-ic_order_list:before {
+ content: "\e934";
+}
+.icon-ic_donate_record:before {
+ content: "\e935";
+}
+.icon-ic_return_record:before {
+ content: "\e938";
+}
+.icon-ic_add_card:before {
+ content: "\e928";
+}
+.icon-ic_credit:before {
+ content: "\e929";
+}
+.icon-ic_daterange:before {
+ content: "\e92b";
+}
+.icon-ic_del:before {
+ content: "\e92f";
+}
+.icon-ic_edit:before {
+ content: "\e932";
+}
+.icon-ic_lock:before {
+ content: "\e933";
+}
+.icon-ic-record:before {
+ content: "\e927";
+}
+.icon-ic-gift:before {
+ content: "\e926";
+}
+.icon-ic-return:before {
+ content: "\e924";
+}
+.icon-ic-eticket:before {
+ content: "\e925";
+}
+.icon-ic-home:before {
+ content: "\e920";
+}
+.icon-ic-feedback:before {
+ content: "\e923";
+}
+.icon-ic-double-chose-off:before {
+ content: "\e91e";
+}
+.icon-shape:before {
+ content: "\e917";
+}
+.icon-ic-exprot:before {
+ content: "\e915";
+}
+.icon-ic-time:before {
+ content: "\e910";
+}
+.icon-ic-today:before {
+ content: "\e913";
+}
+.icon-cancel:before {
+ content: "\e909";
+}
+.icon-ic-add:before {
+ content: "\e90a";
+}
+.icon-ic-check:before {
+ content: "\e90d";
+}
+.icon-ic-search:before {
+ content: "\e90e";
+}
+.icon-ic_attent_og_svg:before {
+ content: "\e95a";
+}
+.icon-ic_airplane_svg:before {
+ content: "\e955";
+}
+.icon-ic_gobal_svg:before {
+ content: "\e956";
+}
+.icon-ic_line_svg:before {
+ content: "\e957";
+}
+.icon-ic_wechat_svg:before {
+ content: "\e958";
+}
+.icon-ic_arrow-01_svg:before {
+ content: "\e959";
+}
+.icon-ic_account2:before {
+ content: "\e954";
+}
+.icon-s_svg:before {
+ content: "\e951";
+}
+.icon-arrow-bg_svg:before {
+ content: "\e950";
+}
+.icon-ic_download_svg:before {
+ content: "\e94f";
+}
+.icon-ic_error_svg:before {
+ content: "\e94e";
+}
+.icon-ic_doing_svg:before {
+ content: "\e949";
+}
+.icon-ic_fail_svg:before {
+ content: "\e94a";
+}
+.icon-ic_fin_svg:before {
+ content: "\e94b";
+}
+.icon-ic_del-news_svg:before {
+ content: "\e948";
+}
+.icon-ic_left-page_svg:before {
+ content: "\e900";
+}
+.icon-ic_mobile_left_page_svg:before {
+ content: "\e901";
+}
+.icon-ic_top_svg:before {
+ content: "\e902";
+}
+.icon-arrow_b:before {
+ content: "\e903";
+}
+.icon-arrow_l:before {
+ content: "\e904";
+}
+.icon-arrow_r:before {
+ content: "\e905";
+}
+.icon-arrow_t:before {
+ content: "\e906";
+}
+.icon-line:before {
+ content: "\e907";
+}
+.icon-home3:before {
+ content: "\e908";
+}
+.icon-ic_bank:before {
+ content: "\e90b";
+}
+.icon-ic_barcode:before {
+ content: "\e90c";
+}
+.icon-ic_business:before {
+ content: "\e90f";
+}
+.icon-openid:before {
+ content: "\e911";
+}
+.icon-tools:before {
+ content: "\e912";
+}
+.icon-ic_creditcard:before {
+ content: "\e914";
+}
+.icon-ic_email:before {
+ content: "\e916";
+}
+.icon-diamond:before {
+ content: "\e918";
+}
+.icon-arrow_s_r:before {
+ content: "\e919";
+}
+.icon-arrow_s_b:before {
+ content: "\e91b";
+}
+.icon-timing:before {
+ content: "\e91c";
+}
+.icon-info:before {
+ content: "\e91d";
+}
+.icon-ic_helpcenter:before {
+ content: "\e91f";
+}
+.icon-ic_member:before {
+ content: "\e921";
+}
+.icon-ic_multimedia:before {
+ content: "\e922";
+}
+.icon-ic_phone:before {
+ content: "\e92a";
+}
+.icon-ic_qrcode:before {
+ content: "\e92c";
+}
+.icon-cp-filter:before {
+ content: "\e92d";
+}
+.icon-cp-option:before {
+ content: "\e92e";
+}
+.icon-cp-type:before {
+ content: "\e930";
+}
+.icon-cp-area:before {
+ content: "\e931";
+}
+.icon-common_connection:before {
+ content: "\e936";
+}
+.icon-ic_search:before {
+ content: "\e937";
+}
+.icon-cart:before {
+ content: "\e93d";
+}
+.icon-coin-dollar:before {
+ content: "\e93e";
+}
+.icon-ic_phone_download:before {
+ content: "\e93f";
+}
+.icon-ic_scanner:before {
+ content: "\e940";
+}
+.icon-ic_keyboard:before {
+ content: "\e941";
+}
+.icon-credit-card:before {
+ content: "\e942";
+}
+.icon-ic_safe:before {
+ content: "\e943";
+}
+.icon-ic_pw:before {
+ content: "\e944";
+}
+.icon-ic_acc:before {
+ content: "\e945";
+}
+.icon-phone-hang-up:before {
+ content: "\e946";
+}
+.icon-ic_reflash:before {
+ content: "\e947";
+}
+.icon-bubble:before {
+ content: "\e96b";
+}
+.icon-user:before {
+ content: "\e971";
+}
+.icon-spinner:before {
+ content: "\e97a";
+}
+.icon-enlarge2:before {
+ content: "\e98b";
+}
+.icon-shrink2:before {
+ content: "\e98c";
+}
+.icon-clipboard:before {
+ content: "\e9b8";
+}
+.icon-menu:before {
+ content: "\e9bd";
+}
+.icon-plus:before {
+ content: "\ea0a";
+}
+.icon-minus:before {
+ content: "\ea0b";
+}
+.icon-google:before {
+ content: "\ea88";
+}
+.icon-google2:before {
+ content: "\ea89";
+}
+.icon-google3:before {
+ content: "\ea8a";
+}
+.icon-google-drive:before {
+ content: "\ea8f";
+}
+.icon-facebook:before {
+ content: "\ea90";
+}
+.icon-facebook2:before {
+ content: "\ea91";
+}
+.icon-instagram:before {
+ content: "\ea92";
+}
+.icon-whatsapp:before {
+ content: "\ea93";
+}
+.icon-telegram:before {
+ content: "\ea95";
+}
+.icon-twitter:before {
+ content: "\ea96";
+}
+.icon-vine:before {
+ content: "\ea97";
+}
+.icon-vk:before {
+ content: "\ea98";
+}
+.icon-sina-weibo:before {
+ content: "\ea9a";
+}
+.icon-rss:before {
+ content: "\ea9b";
+}
+.icon-youtube:before {
+ content: "\ea9d";
+}
+.icon-vimeo:before {
+ content: "\eaa0";
+}
+.icon-flickr:before {
+ content: "\eaa3";
+}
+.icon-flickr2:before {
+ content: "\eaa4";
+}
+.icon-dropbox:before {
+ content: "\eaae";
+}
+.icon-onedrive:before {
+ content: "\eaaf";
+}
+.icon-github:before {
+ content: "\eab0";
+}
+.icon-tumblr:before {
+ content: "\eab9";
+}
+.icon-yahoo:before {
+ content: "\eabb";
+}
+.icon-appleinc:before {
+ content: "\eabe";
+}
+.icon-android:before {
+ content: "\eac0";
+}
+.icon-windows8:before {
+ content: "\eac2";
+}
+.icon-linkedin2:before {
+ content: "\eaca";
+}
+.icon-chrome:before {
+ content: "\ead9";
+}
+.icon-firefox:before {
+ content: "\eada";
+}
+.icon-IE:before {
+ content: "\eadb";
+}
+.icon-edge:before {
+ content: "\eadc";
+}
+.icon-safari:before {
+ content: "\eadd";
+}
+.icon-opera:before {
+ content: "\eade";
+}
+.icon-file-pdf:before {
+ content: "\eadf";
+}
\ No newline at end of file
diff --git a/ecpay-ecommerce-for-woocommerce/public/css/cvs_map_error/frame.css b/ecpay-ecommerce-for-woocommerce/public/css/cvs_map_error/frame.css
new file mode 100644
index 0000000..144ad48
--- /dev/null
+++ b/ecpay-ecommerce-for-woocommerce/public/css/cvs_map_error/frame.css
@@ -0,0 +1,361 @@
+@charset "UTF-8";
+@import url(fonts.css);
+html, body, div, span, object, iframe,
+h1, h2, h3, h4, h5, h6, p, blockquote, pre,
+abbr, address, cite, code,
+del, dfn, em, img, ins, kbd, q, samp,
+small, strong, sub, sup, var,
+b, i,
+dl, dt, dd, ol, ul, li,
+fieldset, form, label, legend,
+table, caption, tbody, tfoot, thead, tr, th, td,
+article, aside, canvas, details, figcaption, figure,
+footer, header, hgroup, menu, nav, section, summary,
+time, mark, audio, video {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ outline: 0;
+ font-size: 100%;
+ vertical-align: baseline;
+ background: transparent;
+}
+
+html, body {
+ height: 100%;
+ font-family: "Noto Sans TC", "微軟正黑體", Tahoma, "新細明體", "Arial Unicode MS", Arial, Helvetica, sans-serif;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
+
+html:lang(vi-vn) body {
+ font-family: Segoe UI, "Noto Sans TC", "微軟正黑體", Tahoma, "新細明體", "Arial Unicode MS", Arial, Helvetica, sans-serif;
+}
+
+* {
+ outline: none;
+ -webkit-box-sizing: border-box;
+ box-sizing: border-box;
+}
+
+body {
+ line-height: 1;
+ font-size: 62.5%; /* font-size 1em = 10px */
+}
+
+article, aside, details, figcaption, figure,
+footer, header, hgroup, menu, nav, section {
+ display: block;
+}
+
+ul, ol {
+ list-style: none;
+}
+
+blockquote, q {
+ quotes: none;
+}
+
+blockquote:before, blockquote:after,
+q:before, q:after {
+ content: "";
+ content: none;
+}
+
+a {
+ margin: 0;
+ padding: 0;
+ font-size: 100%;
+ vertical-align: baseline;
+ background: transparent;
+ text-decoration: none;
+}
+
+ins {
+ background-color: #ff9;
+ color: #000;
+ text-decoration: none;
+}
+
+mark {
+ background-color: #ff9;
+ color: #000;
+ font-style: italic;
+ font-weight: bold;
+}
+
+del {
+ text-decoration: line-through;
+}
+
+abbr[title], dfn[title] {
+ border-bottom: 1px dotted;
+ cursor: help;
+}
+
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+
+hr {
+ display: block;
+ height: 1px;
+ border: 0;
+ border-top: 1px solid #cccccc;
+ margin: 1em 0;
+ padding: 0;
+}
+
+input, select {
+ vertical-align: middle;
+}
+
+h1, h2, h3, h4, h5, h6 {
+ font-weight: normal;
+}
+
+::-webkit-search-cancel-button {
+ display: none;
+}
+
+.btn-box {
+ width: 100%;
+ position: relative;
+ text-align: center;
+}
+.btn-box.bbx-right {
+ width: auto;
+ float: right;
+}
+.btn-box.bbx-right .btn {
+ min-width: 80px;
+ margin-right: 0px;
+}
+.btn-box.bbx-left {
+ width: auto;
+ float: left;
+}
+.btn-box.bbx-left .btn {
+ min-width: 80px;
+ margin-left: 0px;
+}
+.btn-box .bb-icon {
+ margin-right: 3px;
+}
+
+.btn {
+ height: 45px;
+ padding: 0 10px;
+ margin: 0 7px;
+ text-align: center;
+ font-size: 16px;
+ color: #FFF;
+ background: #3C4257;
+ display: -webkit-inline-box;
+ display: -ms-inline-flexbox;
+ display: inline-flex;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
+ -webkit-box-pack: center;
+ -ms-flex-pack: center;
+ justify-content: center;
+ vertical-align: middle;
+ cursor: pointer;
+ -webkit-background-clip: padding-box;
+ -moz-background-clip: padding;
+ background-clip: padding-box;
+ border-radius: 6px;
+ -webkit-transition: 0.3s;
+ transition: 0.3s;
+}
+.btn.on-touch, .btn:active {
+ background: #1a1a1a;
+ text-decoration: none;
+}
+.btn.bd-rdi {
+ -webkit-background-clip: padding-box;
+ -moz-background-clip: padding;
+ background-clip: padding-box;
+ border-radius: 6px;
+}
+.btn.btn-min {
+ height: 28px;
+ line-height: 1;
+ padding: 0 12px;
+}
+.btn.btn-main {
+ color: #FFF;
+ background: #52BE70;
+}
+.btn.btn-main.on-touch, .btn.btn-main:active {
+ background: #77cc8f;
+}
+.btn.btn-main-border {
+ color: #52BE70;
+ background: #FFF;
+ border: 1px solid #52BE70;
+}
+.btn.btn-main-border.on-touch, .btn.btn-main-border:active {
+ color: #77cc8f;
+ border-color: #77cc8f;
+}
+.btn.btn-gray {
+ color: #FFF;
+ background: #7c7c7c;
+}
+.btn.btn-gray.on-touch, .btn.btn-gray:active {
+ background: #636363;
+}
+.btn.btn-dark {
+ color: #FFF;
+ background: #191F27;
+}
+.btn.btn-dark.on-touch, .btn.btn-dark:active {
+ background: #2d3846;
+}
+.btn.btn-blue-border {
+ color: #2c6189;
+ background: white;
+ border: 1px solid #2c6189;
+}
+.btn.btn-blue-border.on-touch, .btn.btn-blue-border:active {
+ color: #132a3c;
+ border-color: #132a3c;
+}
+.btn.btn-blue-border.disabled {
+ background: white;
+ border-color: #9E9E9E;
+}
+.btn.btn-blue-border.disabled.on-touch, .btn.btn-blue-border.disabled:active {
+ background: white;
+ border-color: #9E9E9E;
+}
+.btn.disabled {
+ color: #FFF;
+ background: #9E9E9E;
+ border: 1px solid #9E9E9E;
+ cursor: default;
+}
+.btn.disabled.on-touch, .btn.disabled:active {
+ background: #9E9E9E;
+}
+
+/*頂部選單 start
+-------------------------------------------------- */
+.site-header {
+ width: 100%;
+ min-width: 1360px;
+ height: 80px;
+ position: fixed;
+ background: white;
+ z-index: 1000;
+ -webkit-box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.1);
+ box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.1);
+}
+.site-header a {
+ -webkit-transition: 0.3s;
+ transition: 0.3s;
+}
+.site-header .sh-container, .site-header .logo, .site-header .global-nav-pc {
+ -webkit-transition: 0.4s;
+ transition: 0.4s;
+}
+.site-header .sh-container {
+ width: 1360px;
+ height: 100%;
+ margin: 0 auto;
+ position: relative;
+ display: -webkit-box;
+ display: -ms-flexbox;
+ display: flex;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
+ -webkit-box-pack: center;
+ -ms-flex-pack: center;
+ justify-content: center;
+}
+.site-header .sh-logo-box {
+ position: relative;
+ display: -webkit-box;
+ display: -ms-flexbox;
+ display: flex;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
+ -webkit-box-pack: center;
+ -ms-flex-pack: center;
+ justify-content: center;
+}
+.site-header .sh-logo-box .slb-logo {
+ height: 60px;
+ display: -webkit-box;
+ display: -ms-flexbox;
+ display: flex;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
+ -webkit-box-pack: center;
+ -ms-flex-pack: center;
+ justify-content: center;
+}
+.site-header .sh-logo-box .slb-logo img {
+ height: 100%;
+ display: block;
+}
+.site-header .sh-logo-box .slb-logo.on-touch {
+ text-decoration: none;
+}
+@media (max-width: 768px) {
+ .site-header {
+ height: 60px;
+ min-width: 0;
+ }
+ .site-header.sh-es {
+ min-width: 0;
+ }
+ .site-header.sh-es .sh-container {
+ width: 100%;
+ }
+ .site-header.sh-es .sh-logo-box .slb-logo {
+ width: auto;
+ height: 40px;
+ }
+ .site-header .sh-container {
+ width: 100%;
+ padding: 0 20px;
+ }
+ .site-header .sh-logo-box {
+ width: 100%;
+ -webkit-box-pack: center;
+ -ms-flex-pack: center;
+ justify-content: center;
+ }
+ .site-header .sh-logo-box .slb-logo {
+ height: 40px;
+ }
+}
+
+/*頂部選單 end -------------------------------------------------- */
+body {
+ -webkit-text-size-adjust: 100%;
+ background: #f8f8f8;
+ position: relative;
+ left: 0;
+ padding-top: constant(safe-area-inset-top);
+ padding-right: constant(safe-area-inset-right);
+ padding-bottom: constant(safe-area-inset-bottom);
+ padding-left: constant(safe-area-inset-left);
+ -webkit-transition: 0.3s;
+ transition: 0.3s;
+}
+
+.hl-txt {
+ color: #52BE70;
+}
+
+.none {
+ display: none;
+}
\ No newline at end of file
diff --git a/ecpay-ecommerce-for-woocommerce/public/css/cvs_map_error/page.css b/ecpay-ecommerce-for-woocommerce/public/css/cvs_map_error/page.css
new file mode 100644
index 0000000..de5598f
--- /dev/null
+++ b/ecpay-ecommerce-for-woocommerce/public/css/cvs_map_error/page.css
@@ -0,0 +1,701 @@
+@charset "UTF-8";
+@import url(frame.css);
+.scb-form dd, .sc-box, .site-content {
+ zoom: 1;
+}
+.scb-form dd:after, .sc-box:after, .site-content:after {
+ content: ".";
+ display: block;
+ clear: both;
+ height: 0;
+ overflow: hidden;
+ visibility: hidden;
+}
+
+body {
+ margin: 0;
+}
+
+.site-body {
+ width: 100%;
+ padding-top: 80px;
+ position: relative;
+}
+.site-body.sb-bg {
+ background: #f8f8f8;
+}
+@media (max-width: 768px) {
+ .site-body {
+ padding-top: 60px;
+ }
+}
+
+a {
+ color: #4a90e2;
+}
+a.on-touch {
+ text-decoration: underline;
+}
+
+.red {
+ color: #FF4646;
+}
+
+.site-content-wrapper {
+ width: 100%;
+ min-width: 0;
+ margin: 0px auto;
+ position: relative;
+ z-index: 11;
+}
+@media (max-width: 768px) {
+ .site-content-wrapper {
+ min-width: 0;
+ }
+}
+
+.site-content {
+ width: 100%;
+ margin: 0 auto;
+ padding-bottom: 70px;
+ position: relative;
+ -webkit-transition: 0.3s;
+ transition: 0.3s;
+}
+@media (max-width: 768px) {
+ .site-content {
+ width: 100%;
+ padding: 0;
+ }
+}
+
+.content-title {
+ width: 100%;
+ text-align: left;
+ font-size: 16px;
+ letter-spacing: 0.5px;
+ margin-bottom: 20px;
+ color: #2c6189;
+}
+.content-title.ct-inside {
+ padding: 0 30px;
+}
+.content-title + .ct-btn {
+ margin: -50px 0px 20px 0;
+ padding-right: 15px;
+ text-align: right;
+}
+.content-title .ct-tip {
+ font-size: 14px;
+ color: #829a9a;
+ line-height: 1.2;
+ margin-left: 15px;
+ display: inline-block;
+}
+
+.sc-title-box {
+ width: 100%;
+ text-align: left;
+ color: #2c6189;
+ font-size: 19px;
+}
+.sc-title-box .sc-title {
+ display: inline-block;
+ padding-bottom: 7px;
+ border-bottom: 3px solid #2c6189;
+}
+
+.sc-subtitle {
+ width: 1176px;
+ text-align: left;
+ color: #302e2d;
+ font-size: 15px;
+ font-weight: bold;
+ margin: 25px auto 15px;
+}
+.sc-subtitle + .sc-box {
+ margin-top: 0;
+}
+
+.content-des {
+ font-size: 17px;
+ color: #6e6c6e;
+ line-height: 1.7;
+ padding: 5px 0;
+}
+
+.content-list-box {
+ width: 100%;
+ margin: 20px auto 0;
+ color: #3b3f40;
+}
+.content-list-box .clb-title {
+ font-size: 14px;
+ line-height: 1.5;
+ margin-bottom: 5px;
+}
+.content-list-box.clb-mini {
+ max-width: 460px;
+}
+.content-list-box.clb-inside {
+ padding: 15px 15px;
+ background: #f6f6f6;
+ -webkit-background-clip: padding-box;
+ -moz-background-clip: padding;
+ background-clip: padding-box;
+ border-radius: 5px;
+}
+@media (max-width: 768px) {
+ .content-list-box {
+ padding: 0px 20px;
+ }
+}
+
+.content-list {
+ color: #3b3f40;
+ font-size: 14px;
+ line-height: 1.5;
+ padding-left: 19px;
+ list-style-type: disc;
+}
+.content-list li {
+ margin-bottom: 3px;
+}
+.content-list li:last-child {
+ margin-bottom: 0;
+}
+.content-list ol {
+ list-style-type: decimal;
+ list-style-position: inside;
+ padding-left: 22px;
+}
+.content-list.cl-style {
+ list-style-type: decimal;
+}
+
+.content-list2 {
+ color: #D1D6DC;
+ font-size: 15px;
+ line-height: 1.6;
+ padding-left: 19px;
+ list-style-type: decimal;
+}
+.content-list2 li {
+ margin-bottom: 5px;
+}
+.content-list2 li:last-child {
+ margin-bottom: 0;
+}
+
+/*--內容區塊--*/
+.sc-box {
+ width: 1176px;
+ height: auto;
+ position: relative;
+ font-size: 15px;
+ line-height: 1.4;
+ color: #6e6c6e;
+ padding: 15px 15px;
+ margin: 20px auto 0;
+ background: white;
+ -webkit-transition: 0.3s;
+ transition: 0.3s;
+}
+.sc-box * {
+ -webkit-transition: 0.3s;
+ transition: 0.3s;
+}
+.sc-box:first-child {
+ margin-top: 25px;
+}
+.sc-box .scb-title {
+ width: 100%;
+ text-align: center;
+ font-size: 22px;
+ color: #514f4e;
+ margin-bottom: 30px;
+}
+.sc-box .scb-subtitle {
+ width: 100%;
+ text-align: left;
+ font-size: 14px;
+ color: #5c7373;
+ margin-bottom: 5px;
+}
+.sc-box .scb-tip {
+ width: 100%;
+ padding: 8px 10px;
+ margin-top: 10px;
+ background: #ddeaeb;
+ display: -webkit-box;
+ display: -ms-flexbox;
+ display: flex;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
+ -webkit-box-pack: end;
+ -ms-flex-pack: end;
+ justify-content: flex-end;
+ color: #302e2d;
+ font-size: 14px;
+ line-height: 1.4;
+ -webkit-background-clip: padding-box;
+ -moz-background-clip: padding;
+ background-clip: padding-box;
+ border-radius: 5px;
+}
+
+.scb-list-box {
+ background: #f7fbfb;
+ padding: 15px 15px;
+}
+.scb-list-box .slb-title {
+ color: #6e6c6e;
+ font-size: 14px;
+ line-height: 1.5;
+ margin-bottom: 3px;
+}
+
+/*-- 表格 --*/
+.scb-table {
+ padding: 0 0;
+ position: relative;
+}
+.scb-table.stb-fixed {
+ margin-top: 25px;
+ position: fixed;
+ top: 64px;
+ left: calc(50% - 588px + 130px);
+}
+.scb-table.st-control .scb-table-header {
+ width: 1176px;
+}
+.scb-table.stb-oneline {
+ overflow-x: auto;
+ white-space: nowrap;
+ padding-top: 0;
+}
+.scb-table.stb-oneline .scb-table-body td, .scb-table.stb-oneline .scb-table-body th {
+ padding: 15px 15px;
+}
+.scb-table.stb-min {
+ width: 800px;
+ margin: 0 auto;
+}
+.scb-table + .scb-subtitle {
+ margin-top: 15px;
+}
+.scb-table .stb-multiline {
+ white-space: normal;
+}
+.scb-table .stb-line-r {
+ border-right: 1px solid #dbdbdb;
+}
+.scb-table .stb-line-l {
+ border-left: 1px solid #dbdbdb;
+}
+.scb-table .stb-center {
+ text-align: center;
+}
+.scb-table .stb-highlight {
+ background: #fff3f4;
+}
+.scb-table .stb-disable {
+ background: #efefef;
+}
+.scb-table .stb-sum {
+ color: #4a4a4a;
+}
+.scb-table .stb-sum td {
+ height: 40px;
+ background: #FFF;
+}
+.scb-table .stb-sum td:nth-child(1) {
+ text-align: left;
+ padding: 15px 15px;
+}
+.scb-table .stb-sum td.ssm-c {
+ text-align: center;
+}
+.scb-table .stb-sum td.ssm-r {
+ text-align: right;
+}
+.scb-table .stb-txt {
+ display: inline-block;
+ vertical-align: middle;
+}
+.scb-table .stb-list-box {
+ width: 100%;
+}
+.scb-table .stb-list-box li {
+ margin-bottom: 13px;
+}
+.scb-table .stb-list-box li:last-child {
+ margin-bottom: 0;
+}
+.scb-table .st-verified, .scb-table .st-success {
+ color: #37bc64;
+}
+.scb-table .st-unverified {
+ color: #4a4a4a;
+}
+.scb-table .st-verifying {
+ color: #4a90e2;
+}
+.scb-table .st-verify-fail, .scb-table .st-fail {
+ color: #f16161;
+}
+.scb-table .stb-btn-box.sbb-size .btn {
+ width: auto;
+ min-width: 134px;
+ height: 36px;
+ line-height: 36px;
+}
+.scb-table .stb-btn-box .btn {
+ min-width: 60px;
+ height: 45px;
+ line-height: 1.4;
+ font-size: 16px;
+ margin: 4px 6px;
+ text-decoration: none;
+ -webkit-background-clip: padding-box;
+ -moz-background-clip: padding;
+ background-clip: padding-box;
+ border-radius: 6px;
+}
+.scb-table .stb-btn-bottom {
+ width: 100%;
+ height: 60px;
+ padding: 10px 25px;
+ border-top: 1px solid #dbdbdb;
+}
+.scb-table .scb-check-all {
+ width: 100%;
+ height: 60px;
+ padding: 10px 25px;
+ margin-bottom: 65px;
+ border-bottom: 1px solid #dbdbdb;
+}
+.scb-table .scb-check-all .btn-box {
+ text-align: left;
+}
+.scb-table .scb-check-all .btn {
+ margin: 0;
+}
+
+/*-- 表單 --*/
+.scb-form {
+ width: 100%;
+}
+.scb-form dl {
+ width: 100%;
+ height: 100%;
+ padding: 20px 0px;
+ text-align: left;
+ display: -webkit-box;
+ display: -ms-flexbox;
+ display: flex;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
+ -webkit-box-pack: start;
+ -ms-flex-pack: start;
+ justify-content: flex-start;
+}
+.scb-form dt {
+ width: 180px;
+ font-size: 14px;
+ color: #514f4e;
+ margin-right: 20px;
+ text-align: left;
+ display: -webkit-box;
+ display: -ms-flexbox;
+ display: flex;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
+ -webkit-box-pack: start;
+ -ms-flex-pack: start;
+ justify-content: flex-start;
+}
+.scb-form dt .sf-title-tip {
+ font-size: 12px;
+ color: #777777;
+ margin-left: 5px;
+}
+.scb-form dt .sf-ic {
+ width: 30px;
+ margin-right: 8px;
+}
+.scb-form dt .sf-ic img {
+ width: 100%;
+}
+.scb-form dd {
+ width: calc(100% - 200px);
+ font-size: 14px;
+ position: relative;
+}
+.scb-form input {
+ width: 100%;
+ border: none;
+ color: #514f4e;
+ font-size: 14px;
+ padding-left: 0;
+}
+.scb-form textarea {
+ width: 100%;
+ min-height: 260px;
+}
+.scb-form textarea.txa-mini {
+ min-height: 110px;
+}
+.scb-form .def-select.dsele-mini2 {
+ width: 370px;
+}
+.scb-form .sf-txt-r {
+ float: right;
+ text-align: right;
+}
+.scb-form .sf-2sele .def-select {
+ width: 178px;
+ margin-right: 7px;
+ display: inline-block;
+}
+.scb-form .sf-2sele .def-select:last-child {
+ margin-right: 0;
+}
+.scb-form .sf-2inp {
+ height: 36px;
+}
+.scb-form .sf-2inp.s2i-2 .s2i-item:nth-child(1) {
+ width: 126px;
+}
+.scb-form .sf-2inp.s2i-2 .s2i-item:nth-child(2) {
+ width: 230px;
+}
+.scb-form .sf-2inp .s2i-item {
+ width: 178px;
+ margin-right: 7px;
+ display: inline-block;
+}
+.scb-form .sf-2inp .s2i-item:last-child {
+ margin-right: 0;
+}
+.scb-form .inp-required {
+ color: #F16161;
+ font-size: 14px;
+ margin-left: 2px;
+ vertical-align: top;
+}
+.scb-form .inp-txt {
+ display: inline-block;
+ vertical-align: middle;
+ margin-left: 15px;
+}
+.scb-form .sbf-date-box.sdb-disabled input {
+ background: #f4f4f4;
+}
+.scb-form .sbf-date-box.sdb-disabled ::-webkit-input-placeholder {
+ opacity: 0.7;
+}
+.scb-form .sbf-date-box.sdb-disabled ::-moz-placeholder {
+ opacity: 0.7;
+}
+.scb-form .sbf-date-box.sdb-disabled ::-ms-input-placeholder {
+ opacity: 0.7;
+}
+.scb-form .sbf-date-box.sdb-disabled .sdb-date:before, .scb-form .sbf-date-box.sdb-disabled .sdb-time:before {
+ color: #dbdbdb;
+}
+.scb-form .sbf-date-box .sdb-item, .scb-form .sbf-date-box .sdb-txt {
+ display: inline-block;
+ vertical-align: middle;
+}
+.scb-form .sbf-date-box .sdb-txt {
+ margin: 0 4px 0 5px;
+}
+.scb-form .sbf-date-box .sdb-item {
+ margin: 0 6px;
+ position: relative;
+}
+.scb-form .sbf-date-box .sdb-item:first-child {
+ margin-left: 0;
+}
+.scb-form .sbf-date-box .sdb-item:last-child {
+ margin-right: 0;
+}
+.scb-form .sbf-date-box .sdb-date input, .scb-form .sbf-date-box .sdb-time input {
+ padding-left: 50px;
+ color: #514f4e;
+ text-align: right;
+}
+.scb-form .sbf-date-box .sdb-date:before, .scb-form .sbf-date-box .sdb-time:before {
+ font-size: 18px;
+ display: block;
+ color: #2c893a;
+ position: absolute;
+ top: 11px;
+ left: 10px;
+ font-family: "icomoon" !important;
+ speak: none;
+ font-style: normal;
+ font-weight: normal;
+ font-variant: normal;
+ text-transform: none;
+ line-height: 1;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
+.scb-form .sbf-date-box .sdb-date input {
+ width: 164px;
+}
+.scb-form .sbf-date-box .sdb-date:before {
+ content: "\e913";
+}
+.scb-form .sbf-date-box .sdb-time input {
+ width: 128px;
+}
+.scb-form .sbf-date-box .sdb-time:before {
+ content: "\e910";
+}
+.scb-form .sf-radio-box {
+ margin-bottom: -15px;
+}
+.scb-form .sf-radio-box .def-radio {
+ margin: 0 5px 15px 0;
+ display: inline-block;
+}
+.scb-form .sf-radio-box .def-radio:last-child {
+ margin-bottom: 0;
+}
+.scb-form .sf-radio-box .def-radio .radio {
+ min-width: 180px;
+}
+.scb-form .sf-radio-box.srb-nomrg {
+ margin-bottom: 0;
+}
+.scb-form .sf-radio-box.srb-min {
+ width: 100%;
+ padding-top: 7px;
+ padding-bottom: 8px;
+}
+.scb-form .sf-radio-box.srb-min .def-radio {
+ padding-right: 50px;
+}
+.scb-form .sf-radio-box.srb-min .def-radio .radio {
+ min-width: 0px;
+}
+.scb-form .sf-radio-box.lad-radio {
+ width: 100%;
+ margin-top: 20px;
+}
+.scb-form .sf-radio-box.lad-radio .def-radio {
+ padding-right: 50px;
+}
+.scb-form .sf-radio-box.lad-radio .def-radio .radio {
+ min-width: 0px;
+}
+.scb-form .sf-check-box {
+ margin-bottom: -15px;
+}
+.scb-form .sf-check-box .def-check {
+ margin: 0 5px 15px 0;
+ display: inline-block;
+}
+.scb-form .sf-check-box .def-check .checkbox {
+ min-width: 180px;
+}
+.scb-form .sf-check-box .def-check + .dc-inp {
+ display: inline-block;
+ width: 400px;
+ vertical-align: -29px;
+}
+.scb-form .sf-inpbtn-box .sib-inp, .scb-form .sf-inpbtn-box .btn-box {
+ display: inline-block;
+ vertical-align: middle;
+}
+.scb-form .sf-inpbtn-box .sib-inp {
+ width: calc(100% - 145px);
+}
+.scb-form .sf-inpbtn-box .btn-box {
+ margin: 0 0 0 -5px;
+ width: auto;
+}
+.scb-form .sf-inpbtn-box .btn-box .btn {
+ width: 140px;
+ height: 36px;
+ line-height: 36px;
+ margin: 0;
+}
+.scb-form .sf-addr-block .def-select {
+ width: 165px;
+ margin-right: 15px;
+ display: inline-block;
+}
+.scb-form .sf-addr-block .def-select:last-child {
+ margin-right: 0;
+}
+.scb-form .sf-addr-block .sab-txt {
+ width: calc(100% - 368px);
+ display: inline-block;
+}
+.scb-form .sf-margin {
+ margin-top: 15px;
+}
+.scb-form .sf-btn {
+ margin-top: 15px;
+ text-align: right;
+}
+.scb-form .sf-btn .btn {
+ min-width: 140px;
+}
+.scb-form .sf-btn .btn:last-child {
+ margin-right: 0;
+}
+.scb-form .sf-upload-img {
+ margin-top: 5px;
+ width: 100%;
+}
+.scb-form .sf-upload-img img {
+ width: 100px;
+ display: inline-block;
+ margin-right: 5px;
+}
+.scb-form .sf-tip-box {
+ padding: 20px 50px 20px 140px;
+ font-size: 15px;
+ line-height: 1.5;
+ color: #697070;
+ text-align: left;
+ margin-top: 10px;
+ background: #f7fbfb;
+}
+.scb-form .sf-tip-box li {
+ margin-bottom: 7px;
+}
+.scb-form .sf-tip-box li:last-child {
+ margin-bottom: 0;
+}
+
+/*--狀態區塊--*/
+.scw-status {
+ width: 1360px;
+ margin: 20px auto 0;
+ display: -webkit-box;
+ display: -ms-flexbox;
+ display: flex;
+ -webkit-box-align: start;
+ -ms-flex-align: start;
+ align-items: flex-start;
+ -webkit-box-pack: justify;
+ -ms-flex-pack: justify;
+ justify-content: space-between;
+ position: relative;
+}
+@media (max-width: 768px) {
+ .scw-status {
+ width: 100%;
+ }
+}
+
+/*----*/
\ No newline at end of file
diff --git a/ecpay-ecommerce-for-woocommerce/public/images/cvs_map_error/Icon_refresh.svg b/ecpay-ecommerce-for-woocommerce/public/images/cvs_map_error/Icon_refresh.svg
new file mode 100644
index 0000000..4d96c4d
--- /dev/null
+++ b/ecpay-ecommerce-for-woocommerce/public/images/cvs_map_error/Icon_refresh.svg
@@ -0,0 +1,3 @@
+
diff --git a/ecpay-ecommerce-for-woocommerce/public/images/cvs_map_error/ecpay_logo.svg b/ecpay-ecommerce-for-woocommerce/public/images/cvs_map_error/ecpay_logo.svg
new file mode 100644
index 0000000..12da5f0
--- /dev/null
+++ b/ecpay-ecommerce-for-woocommerce/public/images/cvs_map_error/ecpay_logo.svg
@@ -0,0 +1,168 @@
+
+
+
+
diff --git a/ecpay-ecommerce-for-woocommerce/public/images/cvs_map_error/favicon.ico b/ecpay-ecommerce-for-woocommerce/public/images/cvs_map_error/favicon.ico
new file mode 100644
index 0000000..2dcff87
Binary files /dev/null and b/ecpay-ecommerce-for-woocommerce/public/images/cvs_map_error/favicon.ico differ
diff --git a/ecpay-ecommerce-for-woocommerce/public/images/cvs_map_error/ic-facebook.svg b/ecpay-ecommerce-for-woocommerce/public/images/cvs_map_error/ic-facebook.svg
new file mode 100644
index 0000000..28df7da
--- /dev/null
+++ b/ecpay-ecommerce-for-woocommerce/public/images/cvs_map_error/ic-facebook.svg
@@ -0,0 +1,6 @@
+
diff --git a/ecpay-ecommerce-for-woocommerce/public/images/cvs_map_error/ic-instagram.svg b/ecpay-ecommerce-for-woocommerce/public/images/cvs_map_error/ic-instagram.svg
new file mode 100644
index 0000000..40adbca
--- /dev/null
+++ b/ecpay-ecommerce-for-woocommerce/public/images/cvs_map_error/ic-instagram.svg
@@ -0,0 +1,20 @@
+
diff --git a/ecpay-ecommerce-for-woocommerce/public/images/cvs_map_error/ic-line.svg b/ecpay-ecommerce-for-woocommerce/public/images/cvs_map_error/ic-line.svg
new file mode 100644
index 0000000..905dac6
--- /dev/null
+++ b/ecpay-ecommerce-for-woocommerce/public/images/cvs_map_error/ic-line.svg
@@ -0,0 +1,7 @@
+
diff --git a/ecpay-ecommerce-for-woocommerce/public/images/cvs_map_error/ic-twitter.svg b/ecpay-ecommerce-for-woocommerce/public/images/cvs_map_error/ic-twitter.svg
new file mode 100644
index 0000000..983d369
--- /dev/null
+++ b/ecpay-ecommerce-for-woocommerce/public/images/cvs_map_error/ic-twitter.svg
@@ -0,0 +1,3 @@
+
diff --git a/ecpay-ecommerce-for-woocommerce/public/images/cvs_map_error/pay_fail.json b/ecpay-ecommerce-for-woocommerce/public/images/cvs_map_error/pay_fail.json
new file mode 100644
index 0000000..73c6c6a
--- /dev/null
+++ b/ecpay-ecommerce-for-woocommerce/public/images/cvs_map_error/pay_fail.json
@@ -0,0 +1 @@
+{"v":"5.5.9","fr":29.9700012207031,"ip":0,"op":67.0000027289659,"w":800,"h":800,"nm":"Wallet_Animation","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"cross/wallet-raw Outlines","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":25,"s":[0]},{"t":36.0000014663101,"s":[100]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[218,598,0],"ix":2},"a":{"a":0,"k":[17.5,17.5,0],"ix":1},"s":{"a":0,"k":[321.857,321.857,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.828,-0.828],[0,0],[0,0],[0.828,-0.828],[-0.829,-0.828],[0,0],[0,0],[-0.829,-0.828],[-0.829,0.829],[0,0],[0,0],[-0.829,0.829],[0.828,0.829],[0,0],[0,0],[0.828,0.829]],"o":[[0,0],[0,0],[-0.829,-0.828],[-0.829,0.829],[0,0],[0,0],[-0.829,0.829],[0.828,0.829],[0,0],[0,0],[0.828,0.829],[0.828,-0.828],[0,0],[0,0],[0.828,-0.828],[-0.829,-0.828]],"v":[[13.001,-16.001],[0.001,-3.001],[-12.999,-16.001],[-15.999,-16.001],[-15.999,-13.001],[-2.999,-0.001],[-15.999,12.999],[-15.999,15.999],[-12.999,15.999],[0.001,2.999],[13.001,15.999],[16.001,15.999],[16.001,12.999],[3.001,-0.001],[16.001,-13.001],[16.001,-16.001]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[17.079,17.079],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":300.00001221925,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"circle/wallet-raw Outlines 2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[214,594,0],"ix":2},"a":{"a":0,"k":[46.5,46.5,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":-1,"s":[209.297,209.297,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":6,"s":[294,294,100]},{"t":17.0000006924242,"s":[277,277,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-25.433,0],[0,-25.433],[25.433,0],[0,25.433]],"o":[[25.433,0],[0,25.433],[-25.433,0],[0,-25.433]],"v":[[0,-46.05],[46.05,0],[0,46.05],[-46.05,0]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":20,"s":[0.6184,0.9016,0.8544,1]},{"t":36.0000014663101,"s":[0.851,0.149,0,1]}],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[46.3,46.3],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":300.00001221925,"st":0,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"tag/wallet-raw Outlines","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[563,605,0],"ix":2},"a":{"a":0,"k":[22,6,0],"ix":1},"s":{"a":0,"k":[265.517,265.517,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-1.911,0],[0,0],[0,-1.91],[0,0],[1.911,0],[0,0],[0,1.911],[0,0]],"o":[[0,0],[1.911,0],[0,0],[0,1.911],[0,0],[-1.911,0],[0,0],[0,-1.91]],"v":[[-18.184,-5.685],[18.184,-5.685],[21.645,-2.226],[21.645,2.225],[18.184,5.685],[-18.184,5.685],[-21.645,2.225],[-21.645,-2.226]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.8642,0.9958,0.9739,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[21.895,5.935],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":300.00001221925,"st":0,"bm":0},{"ddd":0,"ind":7,"ty":4,"nm":"lock/wallet-raw Outlines","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[1]},{"t":6.00000024438501,"s":[-15]}],"ix":10},"p":{"a":0,"k":[699,474,0],"ix":2},"a":{"a":0,"k":[68.857,20.5,0],"ix":1},"s":{"a":0,"k":[265.517,265.517,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-7.451,0],[0,0],[0,-7.45],[7.45,0],[0,7.45]],"o":[[0,0],[7.45,0],[0,7.45],[-7.451,0],[0,-7.45]],"v":[[0.001,-13.49],[0.001,-13.49],[13.49,0],[0.001,13.49],[-13.49,0]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.652,0.868,0.832,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[23.7,20.21],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-11.024,0],[0,0],[0,-11.023],[0,0],[11.023,0],[0,0],[0,11.024],[0,0]],"o":[[0,0],[11.023,0],[0,0],[0,11.024],[0,0],[-11.024,0],[0,0],[0,-11.023]],"v":[[-23.71,-19.965],[23.71,-19.965],[43.67,-0.005],[43.67,0.005],[23.71,19.965],[-23.71,19.965],[-43.67,0.005],[-43.67,-0.005]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.8642,0.9958,0.9739,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[43.92,20.215],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 2","np":2,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":300.00001221925,"st":0,"bm":0},{"ddd":0,"ind":8,"ty":4,"nm":"walletmain/wallet-raw Outlines","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[327,526,0],"ix":2},"a":{"a":0,"k":[71.643,82.825,0],"ix":1},"s":{"a":0,"k":[265,265,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-2.944,0],[0,0],[0,-2.944],[0,0],[2.944,0],[0,0],[0,2.944],[0,0]],"o":[[0,0],[2.944,0],[0,0],[0,2.944],[0,0],[-2.944,0],[0,0],[0,-2.944]],"v":[[-90.74,-64.88],[90.74,-64.88],[96.07,-59.55],[96.07,59.55],[90.74,64.88],[-90.74,64.88],[-96.07,59.55],[-96.07,-59.55]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.652,0.868,0.832,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[96.32,65.13],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":300.00001221925,"st":0,"bm":0},{"ddd":0,"ind":9,"ty":4,"nm":"money2/wallet-raw Outlines","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":13,"s":[-10]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":18,"s":[3]},{"t":22.0000008960784,"s":[0]}],"ix":10},"p":{"a":0,"k":[597,323,0],"ix":2},"a":{"a":0,"k":[151.799,27.974,0],"ix":1},"s":{"a":0,"k":[265.517,265.517,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-74.715,-32.68],[80.847,-10.678],[74.715,32.68],[-80.847,10.678]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.7216,0.7984,0.7856,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0.5,"ix":5},"lc":1,"lj":1,"ml":10,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.8642,0.9958,0.9739,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[82.097,33.93],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":300.00001221925,"st":0,"bm":0},{"ddd":0,"ind":10,"ty":4,"nm":"money1/wallet-raw Outlines","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":11,"s":[-6]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":16,"s":[3]},{"t":20.0000008146167,"s":[0]}],"ix":10},"p":{"a":0,"k":[567,337,0],"ix":2},"a":{"a":0,"k":[151.552,23.721,0],"ix":1},"s":{"a":0,"k":[265.517,265.517,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-76.222,-28.99],[80.229,-14.615],[76.222,28.99],[-80.229,14.615]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.7216,0.7984,0.7856,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0.5,"ix":5},"lc":1,"lj":1,"ml":10,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.8642,0.9958,0.9739,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[81.479,30.241],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":300.00001221925,"st":0,"bm":0},{"ddd":0,"ind":11,"ty":4,"nm":"card-visa/wallet-raw Outlines","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":15,"s":[36]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":26,"s":[-8]},{"t":33.0000013441176,"s":[0]}],"ix":10},"p":{"a":0,"k":[298,398,0],"ix":2},"a":{"a":0,"k":[13.76,92.838,0],"ix":1},"s":{"a":0,"k":[265.517,265.517,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-0.413,0.482],[0,0],[-0.483,-0.413],[0,0],[0.413,-0.482],[0,0],[0.483,0.413],[0,0]],"o":[[0,0],[0.413,-0.482],[0,0],[0.482,0.413],[0,0],[-0.413,0.482],[0,0],[-0.482,-0.414]],"v":[[-7.646,2.958],[1.745,-8.011],[3.367,-8.136],[7.522,-4.579],[7.647,-2.957],[-1.746,8.012],[-3.367,8.137],[-7.521,4.579]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.8642,0.9958,0.9739,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[79.419,64.051],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-0.413,0.482],[0,0],[-0.483,-0.413],[0,0],[0.413,-0.482],[0,0],[0.483,0.413],[0,0]],"o":[[0,0],[0.413,-0.482],[0,0],[0.483,0.413],[0,0],[-0.413,0.483],[0,0],[-0.482,-0.413]],"v":[[-11.084,6.972],[5.182,-12.025],[6.804,-12.152],[10.958,-8.594],[11.084,-6.973],[-5.182,12.025],[-6.804,12.151],[-10.958,8.593]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.8642,0.9958,0.9739,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[97.592,42.828],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 2","np":2,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-48.444,43.065],[35.091,-54.499],[48.444,-43.066],[-35.09,54.499]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.0039,0.2588,0.2588,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[57.606,62.217],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 3","np":2,"cix":2,"bm":0,"ix":3,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-1.358,1.585],[0,0],[-1.586,-1.358],[0,0],[1.358,-1.586],[0,0],[1.586,1.357],[0,0]],"o":[[0,0],[1.359,-1.586],[0,0],[1.586,1.357],[0,0],[-1.358,1.586],[0,0],[-1.586,-1.357]],"v":[[-67.475,21.796],[11.142,-70.026],[16.472,-70.439],[67.062,-27.124],[67.475,-21.794],[-11.142,70.027],[-16.472,70.441],[-67.062,27.125]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0,0.7569,0.6353,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[69.083,72.048],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 4","np":2,"cix":2,"bm":0,"ix":4,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":300.00001221925,"st":0,"bm":0}],"markers":[]}
\ No newline at end of file
diff --git a/ecpay-ecommerce-for-woocommerce/public/images/cvs_map_error/pay_success.json b/ecpay-ecommerce-for-woocommerce/public/images/cvs_map_error/pay_success.json
new file mode 100644
index 0000000..7088646
--- /dev/null
+++ b/ecpay-ecommerce-for-woocommerce/public/images/cvs_map_error/pay_success.json
@@ -0,0 +1 @@
+{"v":"5.9.4","fr":30,"ip":0,"op":61,"w":500,"h":500,"nm":"Pay_Now","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Check","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[280.425,280.051,0],"ix":2,"l":2},"a":{"a":0,"k":[280.425,280.051,0],"ix":1,"l":2},"s":{"k":[{"s":[0,0,100],"t":6,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[7.678,7.678,100],"t":7,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[25.248,25.248,100],"t":8,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[48.393,48.393,100],"t":9,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[74.611,74.611,100],"t":10,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[100,100,100],"t":11,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[115.194,115.194,100],"t":12,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[123.915,123.915,100],"t":13,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[127.459,127.459,100],"t":14,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[127.19,127.19,100],"t":15,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[124.392,124.392,100],"t":16,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[120.167,120.167,100],"t":17,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[115.394,115.394,100],"t":18,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[110.711,110.711,100],"t":19,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[106.541,106.541,100],"t":20,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[103.116,103.116,100],"t":21,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[100.52,100.52,100],"t":22,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[98.73,98.73,100],"t":23,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[97.652,97.652,100],"t":24,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[97.156,97.156,100],"t":25,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[97.097,97.097,100],"t":26,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[97.337,97.337,100],"t":27,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[97.754,97.754,100],"t":28,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[98.25,98.25,100],"t":29,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[98.751,98.751,100],"t":30,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[99.207,99.207,100],"t":31,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[99.589,99.589,100],"t":32,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[99.885,99.885,100],"t":33,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[100.094,100.094,100],"t":34,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[100.225,100.225,100],"t":35,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[100.145,100.145,100],"t":41,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[100.053,100.053,100],"t":43,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}}],"l":2}},"ao":0,"ef":[{"ty":5,"nm":"Elastic Controller","np":5,"mn":"Pseudo/MDS Elastic Controller","ix":1,"en":1,"ef":[{"ty":0,"nm":"Amplitude","mn":"Pseudo/MDS Elastic Controller-0001","ix":1,"v":{"a":0,"k":20,"ix":1}},{"ty":0,"nm":"Frequency","mn":"Pseudo/MDS Elastic Controller-0002","ix":2,"v":{"a":0,"k":40,"ix":2}},{"ty":0,"nm":"Decay","mn":"Pseudo/MDS Elastic Controller-0003","ix":3,"v":{"a":0,"k":60,"ix":3}}]}],"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[-23.103,-1.615],[-6.831,14.657],[23.103,-14.657]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":10.216,"ix":5},"lc":1,"lj":1,"ml":10,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[281.295,280.051],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Check","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[95.392,95.392],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[0.117647066303,0.796078491211,0.482352971096,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[280.425,280.051],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Check Circle","np":2,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false}],"ip":6,"op":306,"st":6,"ct":1,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Phone","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[219.812,311.351,0],"ix":2,"l":2},"a":{"a":0,"k":[219.812,311.351,0],"ix":1,"l":2},"s":{"k":[{"s":[0,0,100],"t":4,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[7.678,7.678,100],"t":5,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[25.248,25.248,100],"t":6,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[48.393,48.393,100],"t":7,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[74.611,74.611,100],"t":8,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[100,100,100],"t":9,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[115.194,115.194,100],"t":10,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[123.915,123.915,100],"t":11,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[127.459,127.459,100],"t":12,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[127.19,127.19,100],"t":13,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[124.392,124.392,100],"t":14,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[120.167,120.167,100],"t":15,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[115.394,115.394,100],"t":16,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[110.711,110.711,100],"t":17,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[106.541,106.541,100],"t":18,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[103.116,103.116,100],"t":19,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[100.52,100.52,100],"t":20,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[98.73,98.73,100],"t":21,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[97.652,97.652,100],"t":22,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[97.156,97.156,100],"t":23,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[97.097,97.097,100],"t":24,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[97.337,97.337,100],"t":25,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[97.754,97.754,100],"t":26,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[98.25,98.25,100],"t":27,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[98.751,98.751,100],"t":28,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[99.207,99.207,100],"t":29,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[99.589,99.589,100],"t":30,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[99.885,99.885,100],"t":31,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[100.094,100.094,100],"t":32,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[100.225,100.225,100],"t":33,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[100.145,100.145,100],"t":39,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[100.053,100.053,100],"t":41,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}}],"l":2}},"ao":0,"ef":[{"ty":5,"nm":"Elastic Controller","np":5,"mn":"Pseudo/MDS Elastic Controller","ix":1,"en":1,"ef":[{"ty":0,"nm":"Amplitude","mn":"Pseudo/MDS Elastic Controller-0001","ix":1,"v":{"a":0,"k":20,"ix":1}},{"ty":0,"nm":"Frequency","mn":"Pseudo/MDS Elastic Controller-0002","ix":2,"v":{"a":0,"k":40,"ix":2}},{"ty":0,"nm":"Decay","mn":"Pseudo/MDS Elastic Controller-0003","ix":3,"v":{"a":0,"k":60,"ix":3}}]}],"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[4.982,0],[0,0],[0,4.982],[0,0],[-4.982,0],[0,0],[0,-4.982],[0,0]],"o":[[0,0],[-4.982,0],[0,0],[0,-4.982],[0,0],[4.982,0],[0,0],[0,4.982]],"v":[[32.713,58.129],[-32.713,58.129],[-41.734,49.108],[-41.734,-49.108],[-32.713,-58.129],[32.713,-58.129],[41.734,-49.108],[41.734,49.108]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.737254917622,0.501960813999,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[219.812,218.941],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[18.88,18.88],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[219.812,294.708],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 2","np":2,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[6.585,0],[0,0],[0,6.585],[0,0],[-6.585,0],[0,0],[0,-6.585],[0,0]],"o":[[0,0],[-6.585,0],[0,0],[0,-6.585],[0,0],[6.585,0],[0,0],[0,6.585]],"v":[[38.256,84.462],[-38.256,84.462],[-50.18,72.538],[-50.18,-72.538],[-38.256,-84.462],[38.256,-84.462],[50.18,-72.538],[50.18,72.538]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.600000023842,0.20000000298,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[219.812,226.89],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 3","np":2,"cix":2,"bm":0,"ix":3,"mn":"ADBE Vector Group","hd":false}],"ip":4,"op":304,"st":4,"ct":1,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"Rectangle","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[242.541,255.895,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"k":[{"s":[0,0,100],"t":2,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[7.678,7.678,100],"t":3,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[25.248,25.248,100],"t":4,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[48.393,48.393,100],"t":5,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[74.611,74.611,100],"t":6,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[100,100,100],"t":7,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[115.194,115.194,100],"t":8,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[123.915,123.915,100],"t":9,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[127.459,127.459,100],"t":10,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[127.19,127.19,100],"t":11,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[124.392,124.392,100],"t":12,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[120.167,120.167,100],"t":13,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[115.394,115.394,100],"t":14,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[110.711,110.711,100],"t":15,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[106.541,106.541,100],"t":16,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[103.116,103.116,100],"t":17,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[100.52,100.52,100],"t":18,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[98.73,98.73,100],"t":19,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[97.652,97.652,100],"t":20,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[97.156,97.156,100],"t":21,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[97.097,97.097,100],"t":22,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[97.337,97.337,100],"t":23,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[97.754,97.754,100],"t":24,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[98.25,98.25,100],"t":25,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[98.751,98.751,100],"t":26,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[99.207,99.207,100],"t":27,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[99.589,99.589,100],"t":28,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[99.885,99.885,100],"t":29,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[100.094,100.094,100],"t":30,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[100.225,100.225,100],"t":31,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[100.145,100.145,100],"t":37,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[100.053,100.053,100],"t":39,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}}],"l":2}},"ao":0,"ef":[{"ty":5,"nm":"Elastic Controller","np":5,"mn":"Pseudo/MDS Elastic Controller","ix":1,"en":1,"ef":[{"ty":0,"nm":"Amplitude","mn":"Pseudo/MDS Elastic Controller-0001","ix":1,"v":{"a":0,"k":20,"ix":1}},{"ty":0,"nm":"Frequency","mn":"Pseudo/MDS Elastic Controller-0002","ix":2,"v":{"a":0,"k":40,"ix":2}},{"ty":0,"nm":"Decay","mn":"Pseudo/MDS Elastic Controller-0003","ix":3,"v":{"a":0,"k":60,"ix":3}}]}],"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[17.434,0],[0,0],[0,-17.434],[0,0],[-17.434,0],[0,0],[0,17.434],[0,0]],"o":[[0,0],[-17.434,0],[0,0],[0,17.434],[0,0],[17.434,0],[0,0],[0,-17.434]],"v":[[68.84,-86.058],[-68.84,-86.058],[-100.407,-54.492],[-100.407,54.492],[-68.84,86.058],[68.84,86.058],[100.407,54.492],[100.407,-54.492]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.9607843137254902,0.6509803921568628,0.13725490196078433,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4.378,"ix":5},"lc":1,"lj":1,"ml":10,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":2,"op":302,"st":2,"ct":1,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"practical 5","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[0]},{"t":5,"s":[100]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"k":[{"s":[250,250,0],"t":0,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[238.578,252.9,0],"t":1,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[212.46,259.532,0],"t":2,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[178.048,268.269,0],"t":3,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[139.066,278.167,0],"t":4,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[101.317,287.752,0],"t":5,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[78.695,293.496,0],"t":6,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[65.709,296.793,0],"t":7,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[60.433,298.133,0],"t":8,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[60.833,298.031,0],"t":9,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[64.999,296.973,0],"t":10,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[71.289,295.376,0],"t":11,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[78.397,293.571,0],"t":12,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[85.368,291.801,0],"t":13,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[91.577,290.225,0],"t":14,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[96.677,288.93,0],"t":15,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[100.542,287.949,0],"t":16,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[103.208,287.272,0],"t":17,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[104.812,286.864,0],"t":18,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[105.551,286.677,0],"t":19,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[105.639,286.654,0],"t":20,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[105.282,286.745,0],"t":21,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[104.66,286.903,0],"t":22,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[103.922,287.09,0],"t":23,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[103.176,287.28,0],"t":24,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[102.497,287.452,0],"t":25,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[101.928,287.597,0],"t":26,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[101.488,287.708,0],"t":27,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[101.177,287.788,0],"t":28,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[100.981,287.837,0],"t":29,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[100.883,287.862,0],"t":30,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[100.946,287.846,0],"t":33,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[101.022,287.827,0],"t":34,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[101.102,287.807,0],"t":35,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[101.176,287.788,0],"t":36,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[101.239,287.772,0],"t":37,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[101.325,287.75,0],"t":39,"i":{"x":1,"y":1},"o":{"x":0,"y":0}}],"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"ef":[{"ty":5,"nm":"Elastic Controller","np":5,"mn":"Pseudo/MDS Elastic Controller","ix":1,"en":1,"ef":[{"ty":0,"nm":"Amplitude","mn":"Pseudo/MDS Elastic Controller-0001","ix":1,"v":{"a":0,"k":20,"ix":1}},{"ty":0,"nm":"Frequency","mn":"Pseudo/MDS Elastic Controller-0002","ix":2,"v":{"a":0,"k":40,"ix":2}},{"ty":0,"nm":"Decay","mn":"Pseudo/MDS Elastic Controller-0003","ix":3,"v":{"a":0,"k":60,"ix":3}}]}],"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[15.402,15.402],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[0.705882370472,0.909803926945,0.827450990677,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"practical","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":300,"st":0,"ct":1,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"practical 4","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":2,"s":[0]},{"t":7,"s":[100]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"k":[{"s":[250,250,0],"t":2,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[256.003,259.049,0],"t":3,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[269.725,279.736,0],"t":4,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[287.805,306.994,0],"t":5,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[308.287,337.872,0],"t":6,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[328.121,367.773,0],"t":7,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[340.008,385.692,0],"t":8,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[346.831,395.979,0],"t":9,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[349.603,400.158,0],"t":10,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[349.392,399.841,0],"t":11,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[347.203,396.541,0],"t":12,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[343.898,391.558,0],"t":13,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[340.164,385.928,0],"t":14,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[336.501,380.406,0],"t":15,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[333.239,375.488,0],"t":16,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[330.559,371.449,0],"t":17,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[328.528,368.387,0],"t":18,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[327.128,366.275,0],"t":19,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[326.285,365.004,0],"t":20,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[325.896,364.419,0],"t":21,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[326.038,364.633,0],"t":23,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[326.365,365.125,0],"t":24,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[326.753,365.71,0],"t":25,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[327.144,366.3,0],"t":26,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[327.501,366.838,0],"t":27,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[327.8,367.289,0],"t":28,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[328.031,367.637,0],"t":29,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[328.195,367.884,0],"t":30,"i":{"x":1,"y":1},"o":{"x":0,"y":0}}],"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"ef":[{"ty":5,"nm":"Elastic Controller","np":5,"mn":"Pseudo/MDS Elastic Controller","ix":1,"en":1,"ef":[{"ty":0,"nm":"Amplitude","mn":"Pseudo/MDS Elastic Controller-0001","ix":1,"v":{"a":0,"k":20,"ix":1}},{"ty":0,"nm":"Frequency","mn":"Pseudo/MDS Elastic Controller-0002","ix":2,"v":{"a":0,"k":40,"ix":2}},{"ty":0,"nm":"Decay","mn":"Pseudo/MDS Elastic Controller-0003","ix":3,"v":{"a":0,"k":60,"ix":3}}]}],"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[10.93,10.93],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[0.980392158031,0.866666674614,0.75686275959,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"practical","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":2,"op":302,"st":2,"ct":1,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"practical 3","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":4,"s":[0]},{"t":9,"s":[100]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"k":[{"s":[250,250,0],"t":4,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[260.895,247.156,0],"t":5,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[285.807,240.653,0],"t":6,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[318.632,232.084,0],"t":7,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[355.814,222.378,0],"t":8,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[391.822,212.979,0],"t":9,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[413.4,207.346,0],"t":10,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[425.787,204.112,0],"t":11,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[430.819,202.798,0],"t":12,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[430.438,202.898,0],"t":13,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[426.463,203.936,0],"t":14,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[420.464,205.502,0],"t":15,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[413.684,207.272,0],"t":16,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[407.034,209.007,0],"t":17,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[401.112,210.553,0],"t":18,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[396.248,211.823,0],"t":19,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[392.561,212.786,0],"t":20,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[390.018,213.449,0],"t":21,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[388.488,213.849,0],"t":22,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[387.783,214.033,0],"t":23,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[388.04,213.966,0],"t":25,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[388.633,213.811,0],"t":26,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[389.337,213.627,0],"t":27,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[390.048,213.441,0],"t":28,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[390.696,213.272,0],"t":29,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[391.238,213.131,0],"t":30,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[391.658,213.021,0],"t":31,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[391.955,212.944,0],"t":32,"i":{"x":1,"y":1},"o":{"x":0,"y":0}}],"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"ef":[{"ty":5,"nm":"Elastic Controller","np":5,"mn":"Pseudo/MDS Elastic Controller","ix":1,"en":1,"ef":[{"ty":0,"nm":"Amplitude","mn":"Pseudo/MDS Elastic Controller-0001","ix":1,"v":{"a":0,"k":20,"ix":1}},{"ty":0,"nm":"Frequency","mn":"Pseudo/MDS Elastic Controller-0002","ix":2,"v":{"a":0,"k":40,"ix":2}},{"ty":0,"nm":"Decay","mn":"Pseudo/MDS Elastic Controller-0003","ix":3,"v":{"a":0,"k":60,"ix":3}}]}],"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[27.823,27.823],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.600000023842,0.20000000298,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"practical","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":4,"op":304,"st":4,"ct":1,"bm":0},{"ddd":0,"ind":7,"ty":4,"nm":"practical 2","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":6,"s":[0]},{"t":11,"s":[100]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"k":[{"s":[250,250,0],"t":6,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[252.471,241.548,0],"t":7,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[258.121,222.221,0],"t":8,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[265.565,196.756,0],"t":9,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[273.998,167.909,0],"t":10,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[282.164,139.975,0],"t":11,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[287.058,123.235,0],"t":12,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[289.867,113.625,0],"t":13,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[291.009,109.721,0],"t":14,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[290.922,110.017,0],"t":15,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[290.021,113.1,0],"t":16,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[288.66,117.755,0],"t":17,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[287.122,123.014,0],"t":18,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[285.614,128.173,0],"t":19,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[284.271,132.768,0],"t":20,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[283.168,136.541,0],"t":21,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[282.332,139.402,0],"t":22,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[281.755,141.374,0],"t":23,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[281.408,142.562,0],"t":24,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[281.248,143.109,0],"t":25,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[281.229,143.174,0],"t":26,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[281.307,142.909,0],"t":27,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[281.441,142.449,0],"t":28,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[281.601,141.903,0],"t":29,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[281.762,141.351,0],"t":30,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[281.909,140.848,0],"t":31,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[282.032,140.428,0],"t":32,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[282.127,140.102,0],"t":33,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[282.195,139.871,0],"t":34,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[282.237,139.727,0],"t":35,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[282.211,139.816,0],"t":41,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[282.17,139.954,0],"t":44,"i":{"x":1,"y":1},"o":{"x":0,"y":0}}],"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"ef":[{"ty":5,"nm":"Elastic Controller","np":5,"mn":"Pseudo/MDS Elastic Controller","ix":1,"en":1,"ef":[{"ty":0,"nm":"Amplitude","mn":"Pseudo/MDS Elastic Controller-0001","ix":1,"v":{"a":0,"k":20,"ix":1}},{"ty":0,"nm":"Frequency","mn":"Pseudo/MDS Elastic Controller-0002","ix":2,"v":{"a":0,"k":40,"ix":2}},{"ty":0,"nm":"Decay","mn":"Pseudo/MDS Elastic Controller-0003","ix":3,"v":{"a":0,"k":60,"ix":3}}]}],"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[11.924,8.446],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[0.749019622803,0.858823537827,0.964705884457,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"practical","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":6,"op":306,"st":6,"ct":1,"bm":0},{"ddd":0,"ind":8,"ty":4,"nm":"practical","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":8,"s":[0]},{"t":13,"s":[100]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"k":[{"s":[250,250,0],"t":8,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[241.381,240.821,0],"t":9,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[221.68,219.837,0],"t":10,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[195.72,192.188,0],"t":11,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[166.312,160.866,0],"t":12,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[137.834,130.535,0],"t":13,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[120.768,112.358,0],"t":14,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[110.971,101.924,0],"t":15,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[106.991,97.685,0],"t":16,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[107.293,98.007,0],"t":17,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[110.436,101.355,0],"t":18,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[115.182,106.409,0],"t":19,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[120.544,112.119,0],"t":20,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[125.803,117.721,0],"t":21,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[130.487,122.709,0],"t":22,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[134.334,126.807,0],"t":23,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[137.25,129.913,0],"t":24,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[139.261,132.054,0],"t":25,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[140.471,133.344,0],"t":26,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[141.029,133.938,0],"t":27,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[141.095,134.008,0],"t":28,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[140.825,133.721,0],"t":29,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[140.356,133.222,0],"t":30,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[139.799,132.628,0],"t":31,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[139.237,132.029,0],"t":32,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[138.725,131.484,0],"t":33,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[138.295,131.027,0],"t":34,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[137.963,130.673,0],"t":35,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[137.728,130.423,0],"t":36,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[137.581,130.266,0],"t":37,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[137.672,130.362,0],"t":43,"i":{"x":1,"y":1},"o":{"x":0,"y":0}},{"s":[137.775,130.472,0],"t":45,"i":{"x":1,"y":1},"o":{"x":0,"y":0}}],"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"ef":[{"ty":5,"nm":"Elastic Controller","np":5,"mn":"Pseudo/MDS Elastic Controller","ix":1,"en":1,"ef":[{"ty":0,"nm":"Amplitude","mn":"Pseudo/MDS Elastic Controller-0001","ix":1,"v":{"a":0,"k":20,"ix":1}},{"ty":0,"nm":"Frequency","mn":"Pseudo/MDS Elastic Controller-0002","ix":2,"v":{"a":0,"k":40,"ix":2}},{"ty":0,"nm":"Decay","mn":"Pseudo/MDS Elastic Controller-0003","ix":3,"v":{"a":0,"k":60,"ix":3}}]}],"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[27.326,27.326],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[0.117647059262,0.796078443527,0.482352942228,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"practical","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":8,"op":308,"st":8,"ct":1,"bm":0},{"ddd":0,"ind":9,"ty":4,"nm":"Bg","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[251.762,247.806,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"k":[{"s":[0,0,100],"t":0,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[7.678,7.678,100],"t":1,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[25.248,25.248,100],"t":2,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[48.393,48.393,100],"t":3,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[74.611,74.611,100],"t":4,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[100,100,100],"t":5,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[115.194,115.194,100],"t":6,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[123.915,123.915,100],"t":7,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[127.459,127.459,100],"t":8,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[127.19,127.19,100],"t":9,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[124.392,124.392,100],"t":10,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[120.167,120.167,100],"t":11,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[115.394,115.394,100],"t":12,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[110.711,110.711,100],"t":13,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[106.541,106.541,100],"t":14,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[103.116,103.116,100],"t":15,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[100.52,100.52,100],"t":16,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[98.73,98.73,100],"t":17,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[97.652,97.652,100],"t":18,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[97.156,97.156,100],"t":19,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[97.097,97.097,100],"t":20,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[97.337,97.337,100],"t":21,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[97.754,97.754,100],"t":22,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[98.25,98.25,100],"t":23,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[98.751,98.751,100],"t":24,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[99.207,99.207,100],"t":25,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[99.589,99.589,100],"t":26,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[99.885,99.885,100],"t":27,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[100.094,100.094,100],"t":28,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[100.225,100.225,100],"t":29,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[100.145,100.145,100],"t":35,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}},{"s":[100.053,100.053,100],"t":37,"i":{"x":[1,1,1],"y":[1,1,1]},"o":{"x":[0,0,0],"y":[0,0,0]}}],"l":2}},"ao":0,"ef":[{"ty":5,"nm":"Elastic Controller","np":5,"mn":"Pseudo/MDS Elastic Controller","ix":1,"en":1,"ef":[{"ty":0,"nm":"Amplitude","mn":"Pseudo/MDS Elastic Controller-0001","ix":1,"v":{"a":0,"k":20,"ix":1}},{"ty":0,"nm":"Frequency","mn":"Pseudo/MDS Elastic Controller-0002","ix":2,"v":{"a":0,"k":40,"ix":2}},{"ty":0,"nm":"Decay","mn":"Pseudo/MDS Elastic Controller-0003","ix":3,"v":{"a":0,"k":60,"ix":3}}]}],"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-9.208,8.831],[-23.848,3.975],[-39.747,-26.332],[-7.452,-14.905],[30.307,-23.848],[62.104,15.402],[12.421,50.18]],"o":[[0,0],[23.848,-3.975],[39.747,26.332],[7.452,14.905],[-30.307,23.848],[-62.104,-15.402],[-12.421,-50.18]],"v":[[-104.222,-94.19],[-54.042,-126.484],[34.891,-98.661],[134.755,-8.734],[115.875,79.702],[-26.716,123.92],[-137.51,20.082]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.9137254901960784,0.9725490196078431,0.9019607843137255,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Bg","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":300,"st":0,"ct":1,"bm":0}],"markers":[]}
\ No newline at end of file
diff --git a/ecpay-ecommerce-for-woocommerce/public/js/cvs_map_error/app/actions.js b/ecpay-ecommerce-for-woocommerce/public/js/cvs_map_error/app/actions.js
new file mode 100644
index 0000000..3f47f3e
--- /dev/null
+++ b/ecpay-ecommerce-for-woocommerce/public/js/cvs_map_error/app/actions.js
@@ -0,0 +1,18 @@
+(function($){
+
+//手機觸控事件
+ var touchevent = function(){$(this).addClass('on-touch');};
+ var touchevent2 = function(){$(this).removeClass('on-touch');};
+ $(document)
+ .on(
+ 'touchstart mouseenter click',
+ 'a, div, button, .tabs > li, .lcl-box > dl, .mvc-list li',
+ touchevent
+ )
+ .on(
+ 'touchend mouseleave click',
+ 'a, div, button, .tabs > li, .lcl-box > dl, .mvc-list li',
+ touchevent2
+ );
+
+})(jQuery);
diff --git a/ecpay-ecommerce-for-woocommerce/public/js/cvs_map_error/libs/jquery.min.js b/ecpay-ecommerce-for-woocommerce/public/js/cvs_map_error/libs/jquery.min.js
new file mode 100644
index 0000000..200b54e
--- /dev/null
+++ b/ecpay-ecommerce-for-woocommerce/public/js/cvs_map_error/libs/jquery.min.js
@@ -0,0 +1,2 @@
+/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */
+!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,""],col:[2,""],tr:[2,""],td:[3,""],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 01?r[1]=1:r[1]<=0&&(r[1]=0),HSVtoRGB(r[0],r[1],r[2])}function addBrightnessToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[2]+=e,r[2]>1?r[2]=1:r[2]<0&&(r[2]=0),HSVtoRGB(r[0],r[1],r[2])}function addHueToRGB(t,e){var r=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return r[0]+=e/360,r[0]>1?r[0]-=1:r[0]<0&&(r[0]+=1),HSVtoRGB(r[0],r[1],r[2])}var rgbToHex=function(){var t,e,r=[];for(t=0;t<256;t+=1)e=t.toString(16),r[t]=1===e.length?"0"+e:e;return function(t,e,i){return t<0&&(t=0),e<0&&(e=0),i<0&&(i=0),"#"+r[t]+r[e]+r[i]}}(),setSubframeEnabled=function(t){subframeEnabled=!!t},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(t){expressionsPlugin=t},getExpressionsPlugin=function(){return expressionsPlugin},setDefaultCurveSegments=function(t){defaultCurveSegments=t},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(t){idPrefix$1=t},getIdPrefix=function(){return idPrefix$1};function createNS(t){return document.createElementNS(svgNS,t)}function _typeof$5(t){return _typeof$5="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$5(t)}var dataManager=function(){var t,e,r=1,i=[],s={onmessage:function(){},postMessage:function(e){t({data:e})}},a={postMessage:function(t){s.onmessage({data:t})}};function n(){e||(e=function(e){if(window.Worker&&window.Blob&&getWebWorker()){var r=new Blob(["var _workerSelf = self; self.onmessage = ",e.toString()],{type:"text/javascript"}),i=URL.createObjectURL(r);return new Worker(i)}return t=e,s}((function(t){if(a.dataManager||(a.dataManager=function(){function t(s,a){var n,o,h,l,p,m,c=s.length;for(o=0;o=0;e-=1)if("sh"===t[e].ty)if(t[e].ks.k.i)i(t[e].ks.k);else for(a=t[e].ks.k.length,s=0;sr[0]||!(r[0]>t[0])&&(t[1]>r[1]||!(r[1]>t[1])&&(t[2]>r[2]||!(r[2]>t[2])&&null))}var a,n=function(){var t=[4,4,14];function e(t){var e,r,i,s=t.length;for(e=0;e=0;r-=1)if("sh"===t[r].ty)if(t[r].ks.k.i)t[r].ks.k.c=t[r].closed;else for(s=t[r].ks.k.length,i=0;i500)&&(this._imageLoaded(),clearInterval(r)),e+=1}.bind(this),50)}function a(t){var e={assetData:t},r=i(t,this.assetsPath,this.path);return dataManager.loadData(r,function(t){e.img=t,this._footageLoaded()}.bind(this),function(){e.img={},this._footageLoaded()}.bind(this)),e}function n(){this._imageLoaded=e.bind(this),this._footageLoaded=r.bind(this),this.testImageLoaded=s.bind(this),this.createFootageData=a.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return n.prototype={loadAssets:function(t,e){var r;this.imagesLoadedCb=e;var i=t.length;for(r=0;rthis.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e,r,i=this.animationData.layers,s=i.length,a=t.layers,n=a.length;for(r=0;rthis.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!1!==this.isLoaded&&this.renderer)try{this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(t){this.triggerRenderFrameError(t)}},AnimationItem.prototype.play=function(t){t&&this.name!==t||!0===this.isPaused&&(this.isPaused=!1,this.trigger("_pause"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(t){t&&this.name!==t||!1===this.isPaused&&(this.isPaused=!0,this.trigger("_play"),this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(t){t&&this.name!==t||(!0===this.isPaused?this.play():this.pause())},AnimationItem.prototype.stop=function(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(t){for(var e,r=0;r=this.totalFrames-1&&this.frameModifier>0?this.loop&&this.playCount!==this.loop?e>=this.totalFrames?(this.playCount+=1,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e):this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(r=!0,e=this.totalFrames-1):e<0?this.checkSegments(e%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(r=!0,e=0):(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(e),r&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(t,e){this.playCount=0,t[1]0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=t[0]-t[1],this.timeCompleted=this.totalFrames,this.firstFrame=t[1],this.setCurrentRawFrameValue(this.totalFrames-.001-e)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this.timeCompleted=this.totalFrames,this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(t,e){var r=-1;this.isPaused&&(this.currentRawFrame+this.firstFramee&&(r=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,-1!==r&&this.goToAndStop(r,!0)},AnimationItem.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),"object"===_typeof$4(t[0])){var r,i=t.length;for(r=0;r=0;r-=1)e[r].animation.destroy(t)},t.freeze=function(){n=!0},t.unfreeze=function(){n=!1,d()},t.setVolume=function(t,r){var s;for(s=0;s=.001?function(t,e,r,i){for(var s=0;s<4;++s){var a=h(e,r,i);if(0===a)return e;e-=(o(e,r,i)-t)/a}return e}(t,l,e,i):0===p?l:function(t,e,r,i,s){var a,n,h=0;do{(a=o(n=e+(r-e)/2,i,s)-t)>0?r=n:e=n}while(Math.abs(a)>1e-7&&++h<10);return n}(t,a,a+r,e,i)}},t}(),pooling={double:function(t){return t.concat(createSizedArray(t.length))}},poolFactory=function(t,e,r){var i=0,s=t,a=createSizedArray(s);return{newElement:function(){return i?a[i-=1]:e()},release:function(t){i===s&&(a=pooling.double(a),s*=2),r&&r(t),a[i]=t,i+=1}}},bezierLengthPool=poolFactory(8,(function(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}})),segmentsLengthPool=poolFactory(8,(function(){return{lengths:[],totalLength:0}}),(function(t){var e,r=t.lengths.length;for(e=0;e-.001&&n<.001}var r=function(t,e,r,i){var s,a,n,o,h,l,p=getDefaultCurveSegments(),f=0,m=[],c=[],d=bezierLengthPool.newElement();for(n=r.length,s=0;sn?-1:1,l=!0;l;)if(i[a]<=n&&i[a+1]>n?(o=(n-i[a])/(i[a+1]-i[a]),l=!1):a+=h,a<0||a>=s-1){if(a===s-1)return r[a];l=!1}return r[a]+(r[a+1]-r[a])*o}var h=createTypedArray("float32",8);return{getSegmentsLength:function(t){var e,i=segmentsLengthPool.newElement(),s=t.c,a=t.v,n=t.o,o=t.i,h=t._length,l=i.lengths,p=0;for(e=0;e1&&(a=1);var p,f=o(a,l),m=o(n=n>1?1:n,l),c=e.length,d=1-f,u=1-m,y=d*d*d,g=f*d*d*3,v=f*f*d*3,b=f*f*f,P=d*d*u,E=f*d*u+d*f*u+d*d*m,x=f*f*u+d*f*m+f*d*m,S=f*f*m,_=d*u*u,C=f*u*u+d*m*u+d*u*m,A=f*m*u+d*m*m+f*u*m,T=f*m*m,k=u*u*u,D=m*u*u+u*m*u+u*u*m,M=m*m*u+u*m*m+m*u*m,F=m*m*m;for(p=0;pc?m>d?m-c-d:d-c-m:d>c?d-c-m:c-m-d)>-1e-4&&f<1e-4}}}var bez=bezFunction(),PropertyFactory=function(){var t=initialDefaultFrame,e=Math.abs;function r(t,e){var r,s=this.offsetTime;"multidimensional"===this.propType&&(r=createTypedArray("float32",this.pv.length));for(var a,n,o,h,l,p,f,m,c,d=e.lastIndex,u=d,y=this.keyframes.length-1,g=!0;g;){if(a=this.keyframes[u],n=this.keyframes[u+1],u===y-1&&t>=n.t-s){a.h&&(a=n),d=0;break}if(n.t-s>t){d=u;break}u=k||t=k?M.points.length-1:0;for(l=M.points[F].point.length,h=0;h=V&&I=k)r[0]=v[0],r[1]=v[1],r[2]=v[2];else if(t<=D)r[0]=a.s[0],r[1]=a.s[1],r[2]=a.s[2];else{var N=i(a.s),O=i(v);b=r,P=function(t,e,r){var i,s,a,n,o,h=[],l=t[0],p=t[1],f=t[2],m=t[3],c=e[0],d=e[1],u=e[2],y=e[3];return(s=l*c+p*d+f*u+m*y)<0&&(s=-s,c=-c,d=-d,u=-u,y=-y),1-s>1e-6?(i=Math.acos(s),a=Math.sin(i),n=Math.sin((1-r)*i)/a,o=Math.sin(r*i)/a):(n=1-r,o=r),h[0]=n*l+o*c,h[1]=n*p+o*d,h[2]=n*f+o*u,h[3]=n*m+o*y,h}(N,O,(t-D)/(k-D)),E=P[0],x=P[1],S=P[2],_=P[3],C=Math.atan2(2*x*_-2*E*S,1-2*x*x-2*S*S),A=Math.asin(2*E*x+2*S*_),T=Math.atan2(2*E*_-2*x*S,1-2*E*E-2*S*S),b[0]=C/degToRads,b[1]=A/degToRads,b[2]=T/degToRads}else for(u=0;u=k?p=1:t=i&&e>=i||this._caching.lastFrame=e&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var s=this.interpolateValue(e,this._caching);this.pv=s}return this._caching.lastFrame=e,this.pv}function a(t){var r;if("unidimensional"===this.propType)r=t*this.mult,e(this.v-r)>1e-5&&(this.v=r,this._mdf=!0);else for(var i=0,s=this.v.length;i1e-5&&(this.v[i]=r,this._mdf=!0),i+=1}function n(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t;this.lock=!0,this._mdf=this._isFirstFrame;var e=this.effectsSequence.length,r=this.kf?this.pv:this.data.k;for(t=0;t=this._maxLength&&this.doubleArrayLength(),r){case"v":a=this.v;break;case"i":a=this.i;break;case"o":a=this.o;break;default:a=[]}(!a[i]||a[i]&&!s)&&(a[i]=pointPool.newElement()),a[i][0]=t,a[i][1]=e},ShapePath.prototype.setTripleAt=function(t,e,r,i,s,a,n,o){this.setXYAt(t,e,"v",n,o),this.setXYAt(r,i,"o",n,o),this.setXYAt(s,a,"i",n,o)},ShapePath.prototype.reverse=function(){var t=new ShapePath;t.setPathData(this.c,this._length);var e=this.v,r=this.o,i=this.i,s=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],i[0][0],i[0][1],r[0][0],r[0][1],0,!1),s=1);var a,n=this._length-1,o=this._length;for(a=s;a=c[c.length-1].t-this.offsetTime)i=c[c.length-1].s?c[c.length-1].s[0]:c[c.length-2].e[0],a=!0;else{for(var d,u,y,g=m,v=c.length-1,b=!0;b&&(d=c[g],!((u=c[g+1]).t-this.offsetTime>t));)g=u.t-this.offsetTime)p=1;else if(ti&&e>i)||(this._caching.lastIndex=s0||t>-1e-6&&t<0?i(1e4*t)/1e4:t}function w(){var t=this.props;return"matrix("+F(t[0])+","+F(t[1])+","+F(t[4])+","+F(t[5])+","+F(t[12])+","+F(t[13])+")"}return function(){this.reset=s,this.rotate=a,this.rotateX=n,this.rotateY=o,this.rotateZ=h,this.skew=p,this.skewFromAxis=f,this.shear=l,this.scale=m,this.setTransform=c,this.translate=d,this.transform=u,this.applyToPoint=P,this.applyToX=E,this.applyToY=x,this.applyToZ=S,this.applyToPointArray=k,this.applyToTriplePoints=T,this.applyToPointStringified=D,this.toCSS=M,this.to2dCSS=w,this.clone=v,this.cloneFromProps=b,this.equals=g,this.inversePoints=A,this.inversePoint=C,this.getInverseMatrix=_,this._t=this.transform,this.isIdentity=y,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();function _typeof$3(t){return _typeof$3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$3(t)}var lottie={},standalone="__[STANDALONE]__",animationData="__[ANIMATIONDATA]__",renderer="";function setLocation(t){setLocationHref(t)}function searchAnimations(){!0===standalone?animationManager.searchAnimations(animationData,standalone,renderer):animationManager.searchAnimations()}function setSubframeRendering(t){setSubframeEnabled(t)}function setPrefix(t){setIdPrefix(t)}function loadAnimation(t){return!0===standalone&&(t.animationData=JSON.parse(animationData)),animationManager.loadAnimation(t)}function setQuality(t){if("string"==typeof t)switch(t){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10)}else!isNaN(t)&&t>1&&setDefaultCurveSegments(t);getDefaultCurveSegments()>=50?roundValues(!1):roundValues(!0)}function inBrowser(){return"undefined"!=typeof navigator}function installPlugin(t,e){"expressions"===t&&setExpressionsPlugin(e)}function getFactory(t){switch(t){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}function checkReady(){"complete"===document.readyState&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(t){for(var e=queryString.split("&"),r=0;r=1?a.push({s:t-1,e:e-1}):(a.push({s:t,e:1}),a.push({s:0,e:e-1}));var n,o,h=[],l=a.length;for(n=0;ni+r))p=o.s*s<=i?0:(o.s*s-i)/r,f=o.e*s>=i+r?1:(o.e*s-i)/r,h.push([p,f])}return h.length||h.push([0,0]),h},TrimModifier.prototype.releasePathsData=function(t){var e,r=t.length;for(e=0;e1?1+a:this.s.v<0?0+a:this.s.v+a)>(r=this.e.v>1?1+a:this.e.v<0?0+a:this.e.v+a)){var n=e;e=r,r=n}e=1e-4*Math.round(1e4*e),r=1e-4*Math.round(1e4*r),this.sValue=e,this.eValue=r}else e=this.sValue,r=this.eValue;var o,h,l,p,f,m=this.shapes.length,c=0;if(r===e)for(s=0;s=0;s-=1)if((d=this.shapes[s]).shape._mdf){for((u=d.localShapeCollection).releaseShapes(),2===this.m&&m>1?(g=this.calculateShapeEdges(e,r,d.totalShapeLength,P,c),P+=d.totalShapeLength):g=[[v,b]],h=g.length,o=0;o=1?y.push({s:d.totalShapeLength*(v-1),e:d.totalShapeLength*(b-1)}):(y.push({s:d.totalShapeLength*v,e:d.totalShapeLength}),y.push({s:0,e:d.totalShapeLength*(b-1)}));var E=this.addShapes(d,y[0]);if(y[0].s!==y[0].e){if(y.length>1)if(d.shape.paths.shapes[d.shape.paths._length-1].c){var x=E.pop();this.addPaths(E,u),E=this.addShapes(d,y[1],x)}else this.addPaths(E,u),E=this.addShapes(d,y[1]);this.addPaths(E,u)}}d.shape.paths=u}}},TrimModifier.prototype.addPaths=function(t,e){var r,i=t.length;for(r=0;re.e){r.c=!1;break}e.s<=d&&e.e>=d+n.addedLength?(this.addSegment(m[i].v[s-1],m[i].o[s-1],m[i].i[s],m[i].v[s],r,o,y),y=!1):(l=bez.getNewSegment(m[i].v[s-1],m[i].v[s],m[i].o[s-1],m[i].i[s],(e.s-d)/n.addedLength,(e.e-d)/n.addedLength,h[s-1]),this.addSegmentFromArray(l,r,o,y),y=!1,r.c=!1),d+=n.addedLength,o+=1}if(m[i].c&&h.length){if(n=h[s-1],d<=e.e){var g=h[s-1].addedLength;e.s<=d&&e.e>=d+g?(this.addSegment(m[i].v[s-1],m[i].o[s-1],m[i].i[0],m[i].v[0],r,o,y),y=!1):(l=bez.getNewSegment(m[i].v[s-1],m[i].v[0],m[i].o[s-1],m[i].i[0],(e.s-d)/g,(e.e-d)/g,h[s-1]),this.addSegmentFromArray(l,r,o,y),y=!1,r.c=!1)}else r.c=!1;d+=n.addedLength,o+=1}if(r._length&&(r.setXYAt(r.v[p][0],r.v[p][1],"i",p),r.setXYAt(r.v[r._length-1][0],r.v[r._length-1][1],"o",r._length-1)),d>e.e)break;i=this.p.keyframes[this.p.keyframes.length-1].t?(i=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/r,0),s=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/r,0)):(i=this.p.pv,s=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/r,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){i=[],s=[];var a=this.px,n=this.py;a._caching.lastFrame+a.offsetTime<=a.keyframes[0].t?(i[0]=a.getValueAtTime((a.keyframes[0].t+.01)/r,0),i[1]=n.getValueAtTime((n.keyframes[0].t+.01)/r,0),s[0]=a.getValueAtTime(a.keyframes[0].t/r,0),s[1]=n.getValueAtTime(n.keyframes[0].t/r,0)):a._caching.lastFrame+a.offsetTime>=a.keyframes[a.keyframes.length-1].t?(i[0]=a.getValueAtTime(a.keyframes[a.keyframes.length-1].t/r,0),i[1]=n.getValueAtTime(n.keyframes[n.keyframes.length-1].t/r,0),s[0]=a.getValueAtTime((a.keyframes[a.keyframes.length-1].t-.01)/r,0),s[1]=n.getValueAtTime((n.keyframes[n.keyframes.length-1].t-.01)/r,0)):(i=[a.pv,n.pv],s[0]=a.getValueAtTime((a._caching.lastFrame+a.offsetTime-.01)/r,a.offsetTime),s[1]=n.getValueAtTime((n._caching.lastFrame+n.offsetTime-.01)/r,n.offsetTime))}else i=s=t;this.v.rotate(-Math.atan2(i[1]-s[1],i[0]-s[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function(){if(!this.a.k&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}},autoOrient:function(){}},extendPrototype([DynamicPropertyContainer],e),e.prototype.addDynamicProperty=function(t){this._addDynamicProperty(t),this.elem.addDynamicProperty(t),this._isDirty=!0},e.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty,{getTransformProperty:function(t,r,i){return new e(t,r,i)}}}();function RepeaterModifier(){}function RoundCornersModifier(){}function getFontProperties(t){for(var e=t.fStyle?t.fStyle.split(" "):[],r="normal",i="normal",s=e.length,a=0;a0;)r-=1,this._elements.unshift(e[r]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(t){var e,r=t.length;for(e=0;e0?Math.floor(m):Math.ceil(m),u=this.pMatrix.props,y=this.rMatrix.props,g=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var v,b,P=0;if(m>0){for(;Pd;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),P-=1;c&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-c,!0),P-=c)}for(i=1===this.data.m?0:this._currentCopies-1,s=1===this.data.m?1:-1,a=this._currentCopies;a;){if(b=(r=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props).length,e[e.length-1].transform.mProps._mdf=!0,e[e.length-1].transform.op._mdf=!0,e[e.length-1].transform.op.v=1===this._currentCopies?this.so.v:this.so.v+(this.eo.v-this.so.v)*(i/(this._currentCopies-1)),0!==P){for((0!==i&&1===s||i!==this._currentCopies-1&&-1===s)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],y[9],y[10],y[11],y[12],y[13],y[14],y[15]),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),this.matrix.transform(u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],u[8],u[9],u[10],u[11],u[12],u[13],u[14],u[15]),v=0;v0&&(p=!1),p){var f=createTag("style");f.setAttribute("f-forigin",i[r].fOrigin),f.setAttribute("f-origin",i[r].origin),f.setAttribute("f-family",i[r].fFamily),f.type="text/css",f.innerText="@font-face {font-family: "+i[r].fFamily+"; font-style: normal; src: url('"+i[r].fPath+"');}",e.appendChild(f)}}else if("g"===i[r].fOrigin||1===i[r].origin){for(h=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),l=0;lt?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var t,e=this.renderableComponents.length;for(t=0;t0&&(this.maskElement.setAttribute("id",y),this.element.maskedElement.setAttribute(v,"url("+getLocationHref()+"#"+y+")"),a.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}FootageElement.prototype.prepareFrame=function(){},extendPrototype([RenderableElement,BaseElement,FrameElement],FootageElement),FootageElement.prototype.getBaseElement=function(){return null},FootageElement.prototype.renderFrame=function(){},FootageElement.prototype.destroy=function(){},FootageElement.prototype.initExpressions=function(){this.layerInterface=FootageInterface(this)},FootageElement.prototype.getFootageData=function(){return this.footageData},AudioElement.prototype.prepareFrame=function(t){if(this.prepareRenderableFrame(t,!0),this.prepareProperties(t,!0),this.tm._placeholder)this._currentTime=t/this.data.sr;else{var e=this.tm.v;this._currentTime=e}this._volume=this.lv.v[0];var r=this._volume*this._volumeMultiplier;this._previousVolume!==r&&(this._previousVolume=r,this.audio.volume(r))},extendPrototype([RenderableElement,BaseElement,FrameElement],AudioElement),AudioElement.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek())>.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(t){this.audio.rate(t)},AudioElement.prototype.volume=function(t){this._volumeMultiplier=t,this._previousVolume=t*this._volume,this.audio.volume(this._previousVolume)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){},BaseRenderer.prototype.checkLayers=function(t){var e,r,i=this.layers.length;for(this.completeLayers=!0,e=i-1;e>=0;e-=1)this.elements[e]||(r=this.layers[e]).ip-r.st<=t-this.layers[e].st&&r.op-r.st>t-this.layers[e].st&&this.buildItem(e),this.completeLayers=!!this.elements[e]&&this.completeLayers;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:default:return this.createNull(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 6:return this.createAudio(t);case 13:return this.createCamera(t);case 15:return this.createFootage(t)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(t){return new AudioElement(t,this.globalData,this)},BaseRenderer.prototype.createFootage=function(t){return new FootageElement(t,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t1&&(a+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),r.lastPath!==a){var n="";r.elem&&(e.c&&(n=t.inv?this.solidPath+a:a),r.elem.setAttribute("d",n)),r.lastPath=a}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=function(){var t={};return t.createFilter=function(t,e){var r=createNS("filter");r.setAttribute("id",t),!0!==e&&(r.setAttribute("filterUnits","objectBoundingBox"),r.setAttribute("x","0%"),r.setAttribute("y","0%"),r.setAttribute("width","100%"),r.setAttribute("height","100%"));return r},t.createAlphaToLuminanceFilter=function(){var t=createNS("feColorMatrix");return t.setAttribute("type","matrix"),t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("values","0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"),t},t}(),featureSupport=function(){var t={maskType:!0};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(t.maskType=!1),t}(),registeredEffects={},idPrefix="filter_result_";function SVGEffects(t){var e,r,i="SourceGraphic",s=t.data.ef?t.data.ef.length:0,a=createElementID(),n=filtersFactory.createFilter(a,!0),o=0;for(this.filters=[],e=0;e=0&&!this.shapeModifiers[t].processShapes(this._isFirstFrame);t-=1);}},searchProcessedElement:function(t){for(var e=this.processedElements,r=0,i=e.length;r.01)return!1;r+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var t=0,e=this.data.k.k.length;t0;)h=i.transformers[u].mProps._mdf||h,d-=1,u-=1;if(h)for(d=g-i.styles[p].lvl,u=i.transformers.length-1;d>0;)c=i.transformers[u].mProps.v.props,m.transform(c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],c[8],c[9],c[10],c[11],c[12],c[13],c[14],c[15]),d-=1,u-=1}else m=t;if(n=(f=i.sh.paths)._length,h){for(o="",a=0;a=1?v=.99:v<=-1&&(v=-.99);var b=o*v,P=Math.cos(g+e.a.v)*b+p[0],E=Math.sin(g+e.a.v)*b+p[1];h.setAttribute("fx",P),h.setAttribute("fy",E),l&&!e.g._collapsable&&(e.of.setAttribute("fx",P),e.of.setAttribute("fy",E))}}function h(t,e,r){var i=e.style,s=e.d;s&&(s._mdf||r)&&s.dashStr&&(i.pElem.setAttribute("stroke-dasharray",s.dashStr),i.pElem.setAttribute("stroke-dashoffset",s.dashoffset[0])),e.c&&(e.c._mdf||r)&&i.pElem.setAttribute("stroke","rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||r)&&i.pElem.setAttribute("stroke-opacity",e.o.v),(e.w._mdf||r)&&(i.pElem.setAttribute("stroke-width",e.w.v),i.msElem&&i.msElem.setAttribute("stroke-width",e.w.v))}return{createRenderFunction:function(t){switch(t.ty){case"fl":return a;case"gf":return o;case"gs":return n;case"st":return h;case"sh":case"el":case"rc":case"sr":return s;case"tr":return r;case"no":return i;default:return null}}}}();function SVGShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(t,e,r),this.prevViewData=[]}function LetterProps(t,e,r,i,s,a){this.o=t,this.sw=e,this.sc=r,this.fc=i,this.m=s,this.p=a,this._mdf={o:!0,sw:!!e,sc:!!r,fc:!!i,m:!0,p:!0}}function TextProperty(t,e){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,this.data=e,this.elem=t,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var t,e,r,i,s=this.shapes.length,a=this.stylesList.length,n=[],o=!1;for(r=0;r1&&o&&this.setShapesAsAnimated(n)}},SVGShapeElement.prototype.setShapesAsAnimated=function(t){var e,r=t.length;for(e=0;e=0;o-=1){if((m=this.searchProcessedElement(t[o]))?e[o]=r[m-1]:t[o]._render=n,"fl"===t[o].ty||"st"===t[o].ty||"gf"===t[o].ty||"gs"===t[o].ty||"no"===t[o].ty)m?e[o].style.closed=!1:e[o]=this.createStyleElement(t[o],s),t[o]._render&&e[o].style.pElem.parentNode!==i&&i.appendChild(e[o].style.pElem),u.push(e[o].style);else if("gr"===t[o].ty){if(m)for(l=e[o].it.length,h=0;h1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(t){this.effectsSequence.push(t),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(t){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||t){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var e=this.currentData,r=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{var i;this.lock=!0,this._mdf=!1;var s=this.effectsSequence.length,a=t||this.data.d.k[this.keysIndex].s;for(i=0;ie);)r+=1;return this.keysIndex!==r&&(this.keysIndex=r),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(t){for(var e,r,i=[],s=0,a=t.length,n=!1;s=55296&&e<=56319?(r=t.charCodeAt(s+1))>=56320&&r<=57343?(n||FontManager.isModifier(e,r)?(i[i.length-1]+=t.substr(s,2),n=!1):i.push(t.substr(s,2)),s+=1):i.push(t.charAt(s)):e>56319?(r=t.charCodeAt(s+1),FontManager.isZeroWidthJoiner(e,r)?(n=!0,i[i.length-1]+=t.substr(s,2),s+=1):i.push(t.charAt(s))):FontManager.isZeroWidthJoiner(e)?(i[i.length-1]+=t.charAt(s),n=!0):i.push(t.charAt(s)),s+=1;return i},TextProperty.prototype.completeTextData=function(t){t.__complete=!0;var e,r,i,s,a,n,o,h=this.elem.globalData.fontManager,l=this.data,p=[],f=0,m=l.m.g,c=0,d=0,u=0,y=[],g=0,v=0,b=h.getFontByName(t.f),P=0,E=getFontProperties(b);t.fWeight=E.weight,t.fStyle=E.style,t.finalSize=t.s,t.finalText=this.buildFinalText(t.t),r=t.finalText.length,t.finalLineHeight=t.lh;var x,S=t.tr/1e3*t.finalSize;if(t.sz)for(var _,C,A=!0,T=t.sz[0],k=t.sz[1];A;){_=0,g=0,r=(C=this.buildFinalText(t.t)).length,S=t.tr/1e3*t.finalSize;var D=-1;for(e=0;eT&&" "!==C[e]?(-1===D?r+=1:e=D,_+=t.finalLineHeight||1.2*t.finalSize,C.splice(e,D===e?1:0,"\r"),D=-1,g=0):(g+=P,g+=S);_+=b.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&k<_?(t.finalSize-=1,t.finalLineHeight=t.finalSize*t.lh/t.s):(t.finalText=C,r=t.finalText.length,A=!1)}g=-S,P=0;var M,F=0;for(e=0;ev?g:v,g=-2*S,s="",i=!0,u+=1):s=M,h.chars?(o=h.getCharData(M,b.fStyle,h.getFontByName(t.f).fFamily),P=i?0:o.w*t.finalSize/100):P=h.measureText(s,t.f,t.finalSize)," "===M?F+=P+S:(g+=P+S+F,F=0),p.push({l:P,an:P,add:c,n:i,anIndexes:[],val:s,line:u,animatorJustifyOffset:0}),2==m){if(c+=P,""===s||" "===s||e===r-1){for(""!==s&&" "!==s||(c-=P);d<=e;)p[d].an=c,p[d].ind=f,p[d].extra=P,d+=1;f+=1,c=0}}else if(3==m){if(c+=P,""===s||e===r-1){for(""===s&&(c-=P);d<=e;)p[d].an=c,p[d].ind=f,p[d].extra=P,d+=1;c=0,f+=1}}else p[f].ind=f,p[f].extra=0,f+=1;if(t.l=p,v=g>v?g:v,y.push(g),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=v,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=y;var w,I,V,B,R=l.a;n=R.length;var L=[];for(a=0;a0?s=this.ne.v/100:a=-this.ne.v/100,this.xe.v>0?n=1-this.xe.v/100:o=1+this.xe.v/100;var h=BezierFactory.getBezierEasing(s,a,n,o).get,l=0,p=this.finalS,f=this.finalE,m=this.data.sh;if(2===m)l=h(l=f===p?i>=f?1:0:t(0,e(.5/(f-p)+(i-p)/(f-p),1)));else if(3===m)l=h(l=f===p?i>=f?0:1:1-t(0,e(.5/(f-p)+(i-p)/(f-p),1)));else if(4===m)f===p?l=0:(l=t(0,e(.5/(f-p)+(i-p)/(f-p),1)))<.5?l*=2:l=1-2*(l-.5),l=h(l);else if(5===m){if(f===p)l=0;else{var c=f-p,d=-c/2+(i=e(t(0,i+.5-p),f-p)),u=c/2;l=Math.sqrt(1-d*d/(u*u))}l=h(l)}else 6===m?(f===p?l=0:(i=e(t(0,i+.5-p),f-p),l=(1+Math.cos(Math.PI+2*Math.PI*i/(f-p)))/2),l=h(l)):(i>=r(p)&&(l=t(0,e(i-p<0?e(f,1)-(p-i):f-i,1))),l=h(l));if(100!==this.sm.v){var y=.01*this.sm.v;0===y&&(y=1e-8);var g=.5-.5*y;l1&&(l=1)}return l*this.a.v},getValue:function(t){this.iterateDynamicProperties(),this._mdf=t||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,t&&2===this.data.r&&(this.e.v=this._currentTextLength);var e=2===this.data.r?1:100/this.data.totalChars,r=this.o.v/e,i=this.s.v/e+r,s=this.e.v/e+r;if(i>s){var a=i;i=s,s=a}this.finalS=i,this.finalE=s}},extendPrototype([DynamicPropertyContainer],i),{getTextSelectorProp:function(t,e,r){return new i(t,e,r)}}}();function TextAnimatorDataProperty(t,e,r){var i={propType:!1},s=PropertyFactory.getProp,a=e.a;this.a={r:a.r?s(t,a.r,0,degToRads,r):i,rx:a.rx?s(t,a.rx,0,degToRads,r):i,ry:a.ry?s(t,a.ry,0,degToRads,r):i,sk:a.sk?s(t,a.sk,0,degToRads,r):i,sa:a.sa?s(t,a.sa,0,degToRads,r):i,s:a.s?s(t,a.s,1,.01,r):i,a:a.a?s(t,a.a,1,0,r):i,o:a.o?s(t,a.o,0,.01,r):i,p:a.p?s(t,a.p,1,0,r):i,sw:a.sw?s(t,a.sw,0,0,r):i,sc:a.sc?s(t,a.sc,1,0,r):i,fc:a.fc?s(t,a.fc,1,0,r):i,fh:a.fh?s(t,a.fh,0,0,r):i,fs:a.fs?s(t,a.fs,0,.01,r):i,fb:a.fb?s(t,a.fb,0,.01,r):i,t:a.t?s(t,a.t,0,0,r):i},this.s=TextSelectorProp.getTextSelectorProp(t,e.s,r),this.s.t=e.s.t}function TextAnimatorProperty(t,e,r){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=t,this._renderType=e,this._elem=r,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(r)}function ITextElement(){}TextAnimatorProperty.prototype.searchProperties=function(){var t,e,r=this._textData.a.length,i=PropertyFactory.getProp;for(t=0;t=o+ot||!d?(v=(o+ot-l)/h.partialLength,G=c.point[0]+(h.point[0]-c.point[0])*v,z=c.point[1]+(h.point[1]-c.point[1])*v,_.translate(-E[0]*T[s].an*.005,-E[1]*B*.01),p=!1):d&&(l+=h.partialLength,(f+=1)>=d.length&&(f=0,u[m+=1]?d=u[m].points:P.v.c?(f=0,d=u[m=0].points):(l-=h.partialLength,d=null)),d&&(c=h,y=(h=d[f]).partialLength));L=T[s].an/2-T[s].add,_.translate(-L,0,0)}else L=T[s].an/2-T[s].add,_.translate(-L,0,0),_.translate(-E[0]*T[s].an*.005,-E[1]*B*.01,0);for(F=0;Ft?this.textSpans[t].span:createNS(h?"g":"text"),y<=t){if(n.setAttribute("stroke-linecap","butt"),n.setAttribute("stroke-linejoin","round"),n.setAttribute("stroke-miterlimit","4"),this.textSpans[t].span=n,h){var g=createNS("g");n.appendChild(g),this.textSpans[t].childSpan=g}this.textSpans[t].span=n,this.layerElement.appendChild(n)}n.style.display="inherit"}if(l.reset(),p&&(o[t].n&&(f=-d,m+=r.yOffset,m+=c?1:0,c=!1),this.applyTextPropertiesToMatrix(r,l,o[t].line,f,m),f+=o[t].l||0,f+=d),h){var v;if(1===(u=this.globalData.fontManager.getCharData(r.finalText[t],i.fStyle,this.globalData.fontManager.getFontByName(r.f).fFamily)).t)v=new SVGCompElement(u.data,this.globalData,this);else{var b=emptyShapeData;u.data&&u.data.shapes&&(b=this.buildShapeData(u.data,r.finalSize)),v=new SVGShapeElement(b,this.globalData,this)}if(this.textSpans[t].glyph){var P=this.textSpans[t].glyph;this.textSpans[t].childSpan.removeChild(P.layerElement),P.destroy()}this.textSpans[t].glyph=v,v._debug=!0,v.prepareFrame(0),v.renderFrame(),this.textSpans[t].childSpan.appendChild(v.layerElement),1===u.t&&this.textSpans[t].childSpan.setAttribute("transform","scale("+r.finalSize/100+","+r.finalSize/100+")")}else p&&n.setAttribute("transform","translate("+l.props[12]+","+l.props[13]+")"),n.textContent=o[t].val,n.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}p&&n&&n.setAttribute("d","")}else{var E=this.textContainer,x="start";switch(r.j){case 1:x="end";break;case 2:x="middle";break;default:x="start"}E.setAttribute("text-anchor",x),E.setAttribute("letter-spacing",d);var S=this.buildTextContents(r.finalText);for(e=S.length,m=r.ps?r.ps[1]+r.ascent:0,t=0;t=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(t-this.layers[e].st);if(this.globalData._mdf)for(e=0;e=0;r-=1)(this.completeLayers||this.elements[r])&&(this.elements[r].prepareFrame(this.renderedFrame-this.layers[r].st),this.elements[r]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;t=0;i-=1)r=t.transforms[i].transform.mProps.v.props,t.finalTransform.transform(r[0],r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15]);t._mdf=a},processSequences:function(t){var e,r=this.sequenceList.length;for(e=0;e=0;a-=1){if((h=this.searchProcessedElement(t[a]))?e[a]=r[h-1]:t[a]._shouldRender=i,"fl"===t[a].ty||"st"===t[a].ty||"gf"===t[a].ty||"gs"===t[a].ty)h?e[a].style.closed=!1:e[a]=this.createStyleElement(t[a],d),m.push(e[a].style);else if("gr"===t[a].ty){if(h)for(o=e[a].it.length,n=0;n=0;s-=1)"tr"===e[s].ty?(a=r[s].transform,this.renderShapeTransform(t,a)):"sh"===e[s].ty||"el"===e[s].ty||"rc"===e[s].ty||"sr"===e[s].ty?this.renderPath(e[s],r[s]):"fl"===e[s].ty?this.renderFill(e[s],r[s],a):"st"===e[s].ty?this.renderStroke(e[s],r[s],a):"gf"===e[s].ty||"gs"===e[s].ty?this.renderGradientFill(e[s],r[s],a):"gr"===e[s].ty?this.renderShape(a,e[s].it,r[s].it):e[s].ty;i&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(t,e){if(this._isFirstFrame||e._mdf||t.transforms._mdf){var r,i,s,a=t.trNodes,n=e.paths,o=n._length;a.length=0;var h=t.transforms.finalTransform;for(s=0;s=1?f=.99:f<=-1&&(f=-.99);var m=l*f,c=Math.cos(p+e.a.v)*m+o[0],d=Math.sin(p+e.a.v)*m+o[1];i=n.createRadialGradient(c,d,0,o[0],o[1],l)}var u=t.g.p,y=e.g.c,g=1;for(a=0;ao&&"xMidYMid slice"===h||nr&&"meet"===a||ir&&"slice"===a)?(t-this.transformCanvas.w*(e/this.transformCanvas.h))/2*this.renderConfig.dpr:"xMax"===o&&(ir&&"slice"===a)?(t-this.transformCanvas.w*(e/this.transformCanvas.h))*this.renderConfig.dpr:0,this.transformCanvas.ty="YMid"===h&&(i>r&&"meet"===a||ir&&"meet"===a||i=0;t-=1)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(t,e){if((this.renderedFrame!==t||!0!==this.renderConfig.clearCanvas||e)&&!this.destroyed&&-1!==t){var r;this.renderedFrame=t,this.globalData.frameNum=t-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||e,this.globalData.projectInterface.currentFrame=t;var i=this.layers.length;for(this.completeLayers||this.checkLayers(t),r=0;r=0;r-=1)(this.completeLayers||this.elements[r])&&this.elements[r].renderFrame();!0!==this.renderConfig.clearCanvas&&this.restore()}}},CanvasRendererBase.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!==this.layers[t].ty){var r=this.createItem(this.layers[t],this,this.globalData);e[t]=r,r.initExpressions()}},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){this.pendingElements.pop().checkParenting()}},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display="block"},extendPrototype([CanvasRendererBase,ICompElement,CVBaseElement],CVCompElement),CVCompElement.prototype.renderInnerContent=function(){var t,e=this.canvasContext;for(e.beginPath(),e.moveTo(0,0),e.lineTo(this.data.w,0),e.lineTo(this.data.w,this.data.h),e.lineTo(0,this.data.h),e.lineTo(0,0),e.clip(),t=this.layers.length-1;t>=0;t-=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},CVCompElement.prototype.destroy=function(){var t;for(t=this.layers.length-1;t>=0;t-=1)this.elements[t]&&this.elements[t].destroy();this.layers=null,this.elements=null},CVCompElement.prototype.createComp=function(t){return new CVCompElement(t,this.globalData,this)},extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(t){return new CVCompElement(t,this.globalData,this)},HBaseElement.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=createTag(this.data.tg||"div"),this.data.hasMask?(this.svgElement=createNS("svg"),this.layerElement=createNS("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,styleDiv(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new CVEffects(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0!==this.data.bm&&this.setBlendMode()},renderElement:function(){var t=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var e=this.finalTransform.mat.toCSS();t.transform=e,t.webkitTransform=e}this.finalTransform._opMdf&&(t.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData)},addEffects:function(){},setMatte:function(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=BaseRenderer.prototype.buildElementParenting,extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var t;this.data.hasMask?((t=createNS("rect")).setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):((t=createTag("div")).style.width=this.data.sw+"px",t.style.height=this.data.sh+"px",t.style.backgroundColor=this.data.sc),this.layerElement.appendChild(t)},extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var t;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),t=this.svgElement;else{t=createNS("svg");var e=this.comp.data?this.comp.data:this.globalData.compSize;t.setAttribute("width",e.w),t.setAttribute("height",e.h),t.appendChild(this.shapesContainer),this.layerElement.appendChild(t)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=t},HShapeElement.prototype.getTransformedPoint=function(t,e){var r,i=t.length;for(r=0;r0&&o<1&&f[m].push(this.calculateF(o,t,e,r,i,m)):(h=a*a-4*n*s)>=0&&((l=(-a+bmSqrt(h))/(2*s))>0&&l<1&&f[m].push(this.calculateF(l,t,e,r,i,m)),(p=(-a-bmSqrt(h))/(2*s))>0&&p<1&&f[m].push(this.calculateF(p,t,e,r,i,m))));this.shapeBoundingBox.left=bmMin.apply(null,f[0]),this.shapeBoundingBox.top=bmMin.apply(null,f[1]),this.shapeBoundingBox.right=bmMax.apply(null,f[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,f[1])},HShapeElement.prototype.calculateF=function(t,e,r,i,s,a){return bmPow(1-t,3)*e[a]+3*bmPow(1-t,2)*t*r[a]+3*(1-t)*bmPow(t,2)*i[a]+bmPow(t,3)*s[a]},HShapeElement.prototype.calculateBoundingBox=function(t,e){var r,i=t.length;for(r=0;rr&&(r=s)}r*=t.mult}else r=t.v*t.mult;e.x-=r,e.xMax+=r,e.y-=r,e.yMax+=r},HShapeElement.prototype.currentBoxContains=function(t){return this.currentBBox.x<=t.x&&this.currentBBox.y<=t.y&&this.currentBBox.width+this.currentBBox.x>=t.x+t.width&&this.currentBBox.height+this.currentBBox.y>=t.y+t.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var t=this.tempBoundingBox,e=999999;if(t.x=e,t.xMax=-e,t.y=e,t.yMax=-e,this.calculateBoundingBox(this.itemsData,t),t.width=t.xMax=0;t-=1){var i=this.hierarchy[t].finalTransform.mProp;this.mat.translate(-i.p.v[0],-i.p.v[1],i.p.v[2]),this.mat.rotateX(-i.or.v[0]).rotateY(-i.or.v[1]).rotateZ(i.or.v[2]),this.mat.rotateX(-i.rx.v).rotateY(-i.ry.v).rotateZ(i.rz.v),this.mat.scale(1/i.s.v[0],1/i.s.v[1],1/i.s.v[2]),this.mat.translate(i.a.v[0],i.a.v[1],i.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var s;s=this.p?[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var a=Math.sqrt(Math.pow(s[0],2)+Math.pow(s[1],2)+Math.pow(s[2],2)),n=[s[0]/a,s[1]/a,s[2]/a],o=Math.sqrt(n[2]*n[2]+n[0]*n[0]),h=Math.atan2(n[1],o),l=Math.atan2(n[0],-n[2]);this.mat.rotateY(l).rotateX(-h)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var p=!this._prevMat.equals(this.mat);if((p||this.pe._mdf)&&this.comp.threeDElements){var f,m,c;for(e=this.comp.threeDElements.length,t=0;t=t)return this.threeDElements[e].perspectiveElem;e+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(t,e){var r,i,s=createTag("div");styleDiv(s);var a=createTag("div");if(styleDiv(a),"3d"===e){(r=s.style).width=this.globalData.compSize.w+"px",r.height=this.globalData.compSize.h+"px";var n="50% 50%";r.webkitTransformOrigin=n,r.mozTransformOrigin=n,r.transformOrigin=n;var o="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";(i=a.style).transform=o,i.webkitTransform=o}s.appendChild(a);var h={container:a,perspectiveElem:s,startPos:t,endPos:t,type:e};return this.threeDElements.push(h),h},HybridRendererBase.prototype.build3dContainers=function(){var t,e,r=this.layers.length,i="";for(t=0;t=0;t-=1)this.resizerElem.appendChild(this.threeDElements[t].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(t,e){for(var r=0,i=this.threeDElements.length;rn?(t=s/this.globalData.compSize.w,e=s/this.globalData.compSize.w,r=0,i=(a-this.globalData.compSize.h*(s/this.globalData.compSize.w))/2):(t=a/this.globalData.compSize.h,e=a/this.globalData.compSize.h,r=(s-this.globalData.compSize.w*(a/this.globalData.compSize.h))/2,i=0);var o=this.resizerElem.style;o.webkitTransform="matrix3d("+t+",0,0,0,0,"+e+",0,0,0,0,1,0,"+r+","+i+",0,1)",o.transform=o.webkitTransform},HybridRendererBase.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRendererBase.prototype.hide=function(){this.resizerElem.style.display="none"},HybridRendererBase.prototype.show=function(){this.resizerElem.style.display="block"},HybridRendererBase.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var t,e=this.globalData.compSize.w,r=this.globalData.compSize.h,i=this.threeDElements.length;for(t=0;t=o;)t/=2,e/=2,r>>>=1;return(t+r)/e};return b.int32=function(){return 0|v.g(4)},b.quick=function(){return v.g(4)/4294967296},b.double=b,m(c(v.S),t),(d.pass||u||function(t,r,i,s){return s&&(s.S&&p(s,v),t.state=function(){return p(v,{})}),i?(e.random=t,r):t})(b,g,"global"in d?d.global:this==e,d.state)},m(e.random(),t)}function initialize$2(t){seedRandom([],t)}var propTypes={SHAPE:"shape"};function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null;function $bm_isInstanceOfArray(t){return t.constructor===Array||t.constructor===Float32Array}function isNumerable(t,e){return"number"===t||"boolean"===t||"string"===t||e instanceof Number}function $bm_neg(t){var e=_typeof(t);if("number"===e||"boolean"===e||t instanceof Number)return-t;if($bm_isInstanceOfArray(t)){var r,i=t.length,s=[];for(r=0;rr){var i=r;r=e,e=i}return Math.min(Math.max(t,e),r)}function radiansToDegrees(t){return t/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(t){return t*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(t,e){if("number"==typeof t||t instanceof Number)return e=e||0,Math.abs(t-e);var r;e||(e=helperLengthArray);var i=Math.min(t.length,e.length),s=0;for(r=0;r.5?l/(2-n-o):l/(n+o),n){case i:e=(s-a)/l+(s1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function hslToRgb(t){var e,r,i,s=t[0],a=t[1],n=t[2];if(0===a)e=n,i=n,r=n;else{var o=n<.5?n*(1+a):n+a-n*a,h=2*n-o;e=hue2rgb(h,o,s+1/3),r=hue2rgb(h,o,s),i=hue2rgb(h,o,s-1/3)}return[e,r,i,t[3]]}function linear(t,e,r,i,s){if(void 0!==i&&void 0!==s||(i=e,s=r,e=0,r=1),r=r)return s;var n,o=r===e?0:(t-e)/(r-e);if(!i.length)return i+(s-i)*o;var h=i.length,l=createTypedArray("float32",h);for(n=0;n1){for(i=0;i1?e=1:e<0&&(e=0);var n=t(e);if($bm_isInstanceOfArray(s)){var o,h=s.length,l=createTypedArray("float32",h);for(o=0;odata.k[e].t&&tdata.k[e+1].t-t?(r=e+2,i=data.k[e+1].t):(r=e+1,i=data.k[e].t);break}}-1===r&&(r=e+1,i=data.k[e].t)}else r=0,i=0;var a={};return a.index=r,a.time=i/elem.comp.globalData.frameRate,a}function key(t){var e,r,i;if(!data.k.length||"number"==typeof data.k[0])throw new Error("The property has no keyframe at index "+t);t-=1,e={time:data.k[t].t/elem.comp.globalData.frameRate,value:[]};var s=Object.prototype.hasOwnProperty.call(data.k[t],"s")?data.k[t].s:data.k[t-1].e;for(i=s.length,r=0;rl.length-1)&&(e=l.length-1),i=p-(s=l[l.length-1-e].t)),"pingpong"===t){if(Math.floor((h-s)/i)%2!=0)return this.getValueAtTime((i-(h-s)%i+s)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var f=this.getValueAtTime(s/this.comp.globalData.frameRate,0),m=this.getValueAtTime(p/this.comp.globalData.frameRate,0),c=this.getValueAtTime(((h-s)%i+s)/this.comp.globalData.frameRate,0),d=Math.floor((h-s)/i);if(this.pv.length){for(n=(o=new Array(f.length)).length,a=0;a=p)return this.pv;if(r?s=p+(i=e?Math.abs(this.elem.comp.globalData.frameRate*e):Math.max(0,this.elem.data.op-p)):((!e||e>l.length-1)&&(e=l.length-1),i=(s=l[e].t)-p),"pingpong"===t){if(Math.floor((p-h)/i)%2==0)return this.getValueAtTime(((p-h)%i+p)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var f=this.getValueAtTime(p/this.comp.globalData.frameRate,0),m=this.getValueAtTime(s/this.comp.globalData.frameRate,0),c=this.getValueAtTime((i-(p-h)%i+p)/this.comp.globalData.frameRate,0),d=Math.floor((p-h)/i)+1;if(this.pv.length){for(n=(o=new Array(f.length)).length,a=0;a1?(s+t-a)/(e-1):1,o=0,h=0;for(r=this.pv.length?createTypedArray("float32",this.pv.length):0;on){var p=o,f=r.c&&o===h-1?0:o+1,m=(n-l)/a[o].addedLength;i=bez.getPointInSegment(r.v[p],r.v[f],r.o[p],r.i[f],m,a[o]);break}l+=a[o].addedLength,o+=1}return i||(i=r.c?[r.v[0][0],r.v[0][1]]:[r.v[r._length-1][0],r.v[r._length-1][1]]),i},vectorOnPath:function(t,e,r){1==t?t=this.v.c:0==t&&(t=.999);var i=this.pointOnPath(t,e),s=this.pointOnPath(t+.001,e),a=s[0]-i[0],n=s[1]-i[1],o=Math.sqrt(Math.pow(a,2)+Math.pow(n,2));return 0===o?[0,0]:"tangent"===r?[a/o,n/o]:[-n/o,a/o]},tangentOnPath:function(t,e){return this.vectorOnPath(t,e,"tangent")},normalOnPath:function(t,e){return this.vectorOnPath(t,e,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([l],o),extendPrototype([l],h),h.prototype.getValueAtTime=function(t){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),t*=this.elem.globalData.frameRate,(t-=this.offsetTime)!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime=l?c<0?i:s:i+m*Math.pow((a-t)/c,1/r),p[f]=n,f+=1,o+=256/255;return p.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e,r=this.filterManager.effectElements;this.feFuncRComposed&&(t||r[3].p._mdf||r[4].p._mdf||r[5].p._mdf||r[6].p._mdf||r[7].p._mdf)&&(e=this.getTableValue(r[3].p.v,r[4].p.v,r[5].p.v,r[6].p.v,r[7].p.v),this.feFuncRComposed.setAttribute("tableValues",e),this.feFuncGComposed.setAttribute("tableValues",e),this.feFuncBComposed.setAttribute("tableValues",e)),this.feFuncR&&(t||r[10].p._mdf||r[11].p._mdf||r[12].p._mdf||r[13].p._mdf||r[14].p._mdf)&&(e=this.getTableValue(r[10].p.v,r[11].p.v,r[12].p.v,r[13].p.v,r[14].p.v),this.feFuncR.setAttribute("tableValues",e)),this.feFuncG&&(t||r[17].p._mdf||r[18].p._mdf||r[19].p._mdf||r[20].p._mdf||r[21].p._mdf)&&(e=this.getTableValue(r[17].p.v,r[18].p.v,r[19].p.v,r[20].p.v,r[21].p.v),this.feFuncG.setAttribute("tableValues",e)),this.feFuncB&&(t||r[24].p._mdf||r[25].p._mdf||r[26].p._mdf||r[27].p._mdf||r[28].p._mdf)&&(e=this.getTableValue(r[24].p.v,r[25].p.v,r[26].p.v,r[27].p.v,r[28].p.v),this.feFuncB.setAttribute("tableValues",e)),this.feFuncA&&(t||r[31].p._mdf||r[32].p._mdf||r[33].p._mdf||r[34].p._mdf||r[35].p._mdf)&&(e=this.getTableValue(r[31].p.v,r[32].p.v,r[33].p.v,r[34].p.v,r[35].p.v),this.feFuncA.setAttribute("tableValues",e))}},extendPrototype([SVGComposableEffect],SVGDropShadowEffect),SVGDropShadowEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){if((t||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),t||this.filterManager.effectElements[0].p._mdf){var e=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(255*e[0]),Math.round(255*e[1]),Math.round(255*e[2])))}if((t||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),t||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var r=this.filterManager.effectElements[3].p.v,i=(this.filterManager.effectElements[2].p.v-90)*degToRads,s=r*Math.cos(i),a=r*Math.sin(i);this.feOffset.setAttribute("dx",s),this.feOffset.setAttribute("dy",a)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(t,e,r){this.initialized=!1,this.filterManager=e,this.filterElem=t,this.elem=r,r.matteElement=createNS("g"),r.matteElement.appendChild(r.layerElement),r.matteElement.appendChild(r.transformedElement),r.baseElement=r.matteElement}function SVGGaussianBlurEffect(t,e,r,i){t.setAttribute("x","-100%"),t.setAttribute("y","-100%"),t.setAttribute("width","300%"),t.setAttribute("height","300%"),this.filterManager=e;var s=createNS("feGaussianBlur");s.setAttribute("result",i),t.appendChild(s),this.feGaussianBlur=s}return SVGMatte3Effect.prototype.findSymbol=function(t){for(var e=0,r=_svgMatteSymbols.length;e