<?php
/**
 * Style loading functions
 *
 * @package Multi
 */

if ( ! defined( 'ABSPATH' ) ) {
	die;
}

/**
 * Enqueues styles
 */
function multimagazine_styles() {
	$debug_suffix = WP_DEBUG ? '?v=' . time() : '';

	/* Preloader style */
	multimagazine_preloader_css();

	/* Main styles */

	wp_register_style( 'multimagazine-css-vars', false, array(), 1 );
	wp_enqueue_style( 'multimagazine-css-vars' );

	$header_mobile_bp = get_theme_mod( 'multi_header_mobile_breakpoint', MULTIMAGAZINE_HEADER_MOBILE_BREAKPOINT );
	$header_media     = empty( $header_mobile_bp ) ? 'screen' : '(min-width: ' . $header_mobile_bp . 'px)';
	$icon_set         = get_theme_mod( 'multi_icon_set', MULTIMAGAZINE_ICON_SET );

	if ( get_theme_mod( 'multi_css_src', MULTIMAGAZINE_CSS_SRC ) === 'inline' ) {
		$css = '';
		if ( MULTIMAGAZINE_ICON_SET === $icon_set ) {
			$css .= multimagazine_get_css( 'fonts/' . $icon_set );
		}
		$css .= multimagazine_get_css( 'main' );

		$contents = multimagazine_get_css( 'header-desktop' );
		$css     .= '@media screen and ' . $header_media . '{' . $contents . '}';

		/* Standard menu */
		if ( get_theme_mod( 'multi_show_menus', MULTIMAGAZINE_SHOW_MENUS ) === 'show-menus' ) {
			$contents = multimagazine_get_css( 'standard-menu' );
			$css     .= '@media screen and ' . $header_media . '{' . $contents . '}';

			$menu_animation_follow = get_theme_mod( 'multi_header_follow_mouse_mode', MULTIMAGAZINE_HEADER_FOLLOW_MOUSE_MODE );
			if ( ! empty( $menu_animation_follow ) && 'off' !== $menu_animation_follow ) {
				$contents = multimagazine_get_css( 'magic-line' );
				$css     .= '@media screen and ' . $header_media . '{' . $contents . '}';
			}
		}

		/* Overlay menu */
		if ( get_theme_mod( 'multi_show_menus', MULTIMAGAZINE_SHOW_MENUS ) === 'overlay-menus' ) {
			$contents = multimagazine_get_css( 'overlay-menus' );
			$css     .= '@media ' . $header_media . '{' . $contents . '}';
		}

		/* Diagonal menu */
		if ( get_theme_mod( 'multi_show_menus', MULTIMAGAZINE_SHOW_MENUS ) === 'diagonal-menu' ) {
			$contents = multimagazine_get_css( 'diagonal-menu' );
			$css     .= '@media ' . $header_media . '{' . $contents . '}';
		}

		/* Single post header */
		if ( is_single() && ( get_theme_mod( 'multi_post_header', MULTIMAGAZINE_POST_HEADER ) || get_theme_mod( 'multi_post_header_mobile', MULTIMAGAZINE_POST_HEADER_MOBILE ) ) ) {
			$css .= multimagazine_get_css( 'single-post-header' );
		}

		/* Single post elements */
		if ( is_single() ) {
			$css .= multimagazine_get_css( 'single-post' );
		}

		/* Page-specific elements */
		if ( is_page() ) {
			$css .= multimagazine_get_css( 'page' );
		}

		/* Top bar */
		if ( get_theme_mod( 'multi_show_topbar', MULTIMAGAZINE_SHOW_TOPBAR ) ) {
			$css .= multimagazine_get_css( 'top-bar' );
		}

		/* Cursor style */
		if ( absint( get_theme_mod( 'multi_cursor', MULTIMAGAZINE_CURSOR ) ) !== 0 ) {
			$css .= multimagazine_get_css( 'cursor' );
		}

		if ( is_singular() || class_exists( 'MultiBuilder' ) || class_exists( 'WooCommerce' ) ) {
			$css .= multimagazine_get_css( 'glightbox.min' );
		}

		if ( multimagazine_slider_in_use() ) {
			$css .= multimagazine_get_css( 'sliders' );
		}

		if ( is_page() ) {
			if ( is_page_template( 'directory-2columns.php' ) || is_page_template( 'directory-3columns.php' ) ) {
				$css .= multimagazine_get_css( 'directory' );
			}
			if ( is_page_template( 'help-center.php' ) ) {
				$css .= multimagazine_get_css( 'help-center' );
			}
		}

		/* Post list */
		if ( is_home() || is_search() || is_archive() ) {
			if ( is_home() || is_archive() ) {
				$post_list_layout = get_theme_mod( 'multi_post_list_layout', MULTIMAGAZINE_POST_LIST_LAYOUT );
			} elseif ( is_search() ) {
				$post_list_layout = get_theme_mod( 'multi_search_results_layout', MULTIMAGAZINE_SEARCH_RESULTS_LAYOUT );
			}
			switch ( $post_list_layout ) {
				case 1:
					$style = 'full-width-image';
					break;
				case 2:
					$style = 'medium-image';
					break;
				case 3:
					$style = 'exposed-date';
					break;
				case 4:
				case 5:
					$style = 'columns';
					break;
				case 6:
				case 7:
				case 8:
					$style = 'masonry';
					break;
				case 9:
				case 10:
				case 11:
				case 13:
					$style = 'modern';
					break;
				case 14:
					$style = 'fresh';
					break;
				case 16:
					$style = 'trendy';
					break;
				default:
					$style = 'large-image';
			}
			$css .= multimagazine_get_css( 'post-lists/post-list-' . $style );
		}

		if ( class_exists( 'WooCommerce' ) ) {
			$product_item_layout = apply_filters( 'multimagazine_product_list_item_layout', 0 );

			$css .= multimagazine_get_css( 'woocommerce' );
			$css .= multimagazine_get_css( 'woocommerce-product' . $product_item_layout );

			if ( is_cart() ) {
				$css .= multimagazine_get_css( 'woocommerce-cart' );
			}
		}

		/* DiagnoSEO */
		if ( function_exists( 'diagnoseo_render_breadcrumbs' ) ) {
			$css .= multimagazine_get_css( 'diagnoseo' );
		}

		/* Admin bar influence on other elements */
		if ( is_admin_bar_showing() ) {
			$css .= multimagazine_get_css( 'admin-bar' );
		}

		if ( ! empty( $css ) ) {

			$find    = array( '../../fonts/' );
			$replace = array( MULTIMAGAZINE_THEME_URI . '/fonts/' );
			$css     = str_replace( $find, $replace, $css );

			$handle = 'multimagazine-layout';
			wp_register_style( $handle, false, array(), 1 );
			wp_enqueue_style( $handle );
			wp_add_inline_style( $handle, str_replace( '﻿', '', $css ) );
		}
	} else {
		if ( MULTIMAGAZINE_ICON_SET === $icon_set ) {
			wp_enqueue_style( 'multimagazine-icon-font', MULTIMAGAZINE_THEME_URI . '/css/fonts/' . $icon_set . '.css' . $debug_suffix, array(), 1, 'all' );
		}
		wp_enqueue_style( 'multimagazine-basic-style', MULTIMAGAZINE_THEME_URI . '/css/main.css' . $debug_suffix, array(), 1, 'screen' );
		wp_enqueue_style( 'multimagazine-header-desktop-style', MULTIMAGAZINE_THEME_URI . '/css/header-desktop.css' . $debug_suffix, array(), 1, $header_media );
		wp_enqueue_style( 'multimagazine-sliders', MULTIMAGAZINE_THEME_URI . '/css/sliders.css' . $debug_suffix, array(), 1, 'screen' );

		/* Standard menu */
		if ( get_theme_mod( 'multi_show_menus', MULTIMAGAZINE_SHOW_MENUS ) === 'show-menus' ) {
			wp_enqueue_style( 'multimagazine-standard-menu', MULTIMAGAZINE_THEME_URI . '/css/standard-menu.css' . $debug_suffix, array(), 1, $header_media );
			$menu_animation_follow = get_theme_mod( 'multi_header_follow_mouse_mode', MULTIMAGAZINE_HEADER_FOLLOW_MOUSE_MODE );
			if ( ! empty( $menu_animation_follow ) && 'off' !== $menu_animation_follow ) {
				wp_enqueue_style( 'multimagazine-magic-line', MULTIMAGAZINE_THEME_URI . '/css/magic-line.css' . $debug_suffix, array(), 1, $header_media );
			}
		}

		/* Overlay menu */
		if ( get_theme_mod( 'multi_show_menus', MULTIMAGAZINE_SHOW_MENUS ) === 'overlay-menus' ) {
			wp_enqueue_style( 'multimagazine-overlay-menu', MULTIMAGAZINE_THEME_URI . '/css/overlay-menu.css' . $debug_suffix, array(), 1, $header_media );
		}

		/* Diagonal menu */
		if ( get_theme_mod( 'multi_show_menus', MULTIMAGAZINE_SHOW_MENUS ) === 'diagonal-menu' ) {
			wp_enqueue_style( 'multimagazine-diagonal-menu', MULTIMAGAZINE_THEME_URI . '/css/diagonal-menu.css' . $debug_suffix, array(), 1, $header_media );
		}

		/* Single post header */
		if ( is_single() && ( get_theme_mod( 'multi_post_header', MULTIMAGAZINE_POST_HEADER ) || get_theme_mod( 'multi_post_header_mobile', MULTIMAGAZINE_POST_HEADER_MOBILE ) ) ) {
			wp_enqueue_style( 'multimagazine-single-post-header', MULTIMAGAZINE_THEME_URI . '/css/single-post-header.css' . $debug_suffix, array(), 1, 'screen' );
		}

		/* Single post */
		if ( is_single() ) {
			wp_enqueue_style( 'multimagazine-single-post', MULTIMAGAZINE_THEME_URI . '/css/single-post.css' . $debug_suffix, array(), 1, 'screen' );
		}

		/* Page */
		if ( is_page() ) {
			wp_enqueue_style( 'multimagazine-page', MULTIMAGAZINE_THEME_URI . '/css/page.css' . $debug_suffix, array(), 1, 'screen' );
		}

		/* Top bar */
		if ( get_theme_mod( 'multi_show_topbar', MULTIMAGAZINE_SHOW_TOPBAR ) ) {
			wp_enqueue_style( 'multimagazine-top-bar', MULTIMAGAZINE_THEME_URI . '/css/top-bar.css' . $debug_suffix, array(), 1, 'screen' );
		}

		/* Cursor style */
		if ( absint( get_theme_mod( 'multi_cursor', MULTIMAGAZINE_CURSOR ) ) !== 0 ) {
			wp_enqueue_style( 'multimagazine-cursor-style', MULTIMAGAZINE_THEME_URI . '/css/cursor.css' . $debug_suffix, array(), 1, '(min-width: 1140px)' );
		}

		/* Post list */
		if ( is_home() || is_search() || is_archive() ) {
			if ( is_home() || is_archive() ) {
				$post_list_layout = get_theme_mod( 'multi_post_list_layout', MULTIMAGAZINE_POST_LIST_LAYOUT );
			} elseif ( is_search() ) {
				$post_list_layout = get_theme_mod( 'multi_search_results_layout', MULTIMAGAZINE_SEARCH_RESULTS_LAYOUT );
			}
			switch ( $post_list_layout ) {
				case 1:
					$style = 'full-width-image';
					break;
				case 2:
					$style = 'medium-image';
					break;
				case 3:
					$style = 'exposed-date';
					break;
				case 4:
				case 5:
					$style = 'columns';
					break;
				case 6:
				case 7:
				case 8:
					$style = 'masonry';
					break;
				case 9:
				case 10:
				case 11:
				case 13:
					$style = 'modern';
					break;
				case 14:
					$style = 'fresh';
					break;
				case 16:
					$style = 'trendy';
					break;
				default:
					$style = 'large-image';
			}
			wp_enqueue_style( 'multimagazine-postlist', MULTIMAGAZINE_THEME_URI . '/css/post-lists/post-list-' . $style . '.css' . $debug_suffix, array(), 1 );
		}

		if ( is_singular() || class_exists( 'MultiBuilder' ) || class_exists( 'WooCommerce' ) ) {
			wp_enqueue_style( 'multimagazine-glightbox', MULTIMAGAZINE_THEME_URI . '/css/glightbox.min.css' . $debug_suffix, array(), 1 );
		}

		if ( is_page() ) {
			if ( is_page_template( 'directory-2columns.php' ) || is_page_template( 'directory-3columns.php' ) ) {
				wp_enqueue_style( 'multimagazine-template-directory', MULTIMAGAZINE_THEME_URI . '/css/directory.css' . $debug_suffix, array(), 1 );
			}
			if ( is_page_template( 'help-center.php' ) ) {
				wp_enqueue_style( 'multimagazine-help-center', MULTIMAGAZINE_THEME_URI . '/css/help-center.css' . $debug_suffix, array(), 1 );
			}
		}

		if ( multimagazine_slider_in_use() ) {
			wp_enqueue_style( 'multimagazine-slider', MULTIMAGAZINE_THEME_URI . '/css/sliders.css' . $debug_suffix, array(), 1 );
		}

		if ( class_exists( 'WooCommerce' ) ) {
			$product_item_layout = apply_filters( 'multimagazine_product_list_item_layout', 0 );
			wp_enqueue_style( 'multimagazine-woocommerce', MULTIMAGAZINE_THEME_URI . '/css/woocommerce.css' . $debug_suffix, array(), 1 );
			$product_item_layout_css = MULTIMAGAZINE_THEME_URI . '/css/woocommerce-product-' . esc_attr( $product_item_layout ) . '.css';
			$product_item_layout_css = apply_filters( 'multimagazine_product_list_item_layout_css', $product_item_layout_css );
			wp_enqueue_style( 'multimagazine-woocommerce-product-item', $product_item_layout_css . $debug_suffix, array(), 1 );

			if ( is_cart() ) {
				wp_enqueue_style( 'multimagazine-woocommerce-cart', MULTIMAGAZINE_THEME_URI . '/css/woocommerce-cart.css' . $debug_suffix, array(), 1 );
			}
		}

		/* DiagnoSEO */
		if ( class_exists( 'Diagnoseo_Scripts' ) ) {
			wp_enqueue_style( 'multimagazine-diagnoseo-support', MULTIMAGAZINE_THEME_URI . '/css/diagnoseo.css' . $debug_suffix, array(), 1 );
		}

		/* Admin bar influence on other elements */
		if ( is_admin_bar_showing() ) {
			wp_enqueue_style( 'multimagazine-admin-bar', MULTIMAGAZINE_THEME_URI . '/css/admin-bar.css' . $debug_suffix, array(), 1 );
		}
	}

	wp_register_style( 'multimagazine-custom-styles', false, array(), 1 );
	wp_enqueue_style( 'multimagazine-custom-styles' );
}

/**
 * Reads contents of a css file
 *
 * @param String $name Name of css file to read.
 */
function multimagazine_get_css( $name ) {
	$css  = '';
	$file = MULTIMAGAZINE_THEME_DIR . '/css/' . $name . '.css';
	if ( file_exists( $file ) ) {
		$css = multimagazine_remote_get( MULTIMAGAZINE_THEME_URI . '/css/' . $name . '.css' );
	} else {
		$css = apply_filters( 'multimagazine_get_css', $name, $css );
	}
	return $css;
}

/**
 * Adds styles in admin
 */
function multimagazine_add_admin_style() {
	$debug_suffix = WP_DEBUG ? '?v=' . time() : '';

	wp_enqueue_style( 'multimagazine-admin-css', MULTIMAGAZINE_THEME_URI . '/css/admin.css' . $debug_suffix, array(), 1 );
}

/**
 * Styles for block editor
 */
function multimagazine_block_editor_styles() {
	$debug_suffix = WP_DEBUG ? '?v=' . time() : '';

	wp_enqueue_style( 'multimagazine-basic-font', '//fonts.googleapis.com/css?family=Montserrat:700,600,400,300', array(), 1 );
	wp_register_style( 'multimagazine-css-vars', false, array(), 1 );
	wp_enqueue_style( 'multimagazine-css-vars' );
	wp_enqueue_style( 'multimagazine-editor-style', MULTIMAGAZINE_THEME_URI . '/css/editor.css' . $debug_suffix, array(), 1 );

	$google_fonts_url         = '//fonts.googleapis.com/css?family=';
	$primary_font             = get_theme_mod( 'multi_primary_font', false, array(), 1 );
	$primary_google_font      = '';
	$pri_subset_list          = '';
	$primary_font_weight_list = array(
		get_theme_mod( 'multi_primary_font_weight_300', MULTIMAGAZINE_PRIMARY_FONT_WEIGHT_300 ) ? 300 : '',
		get_theme_mod( 'multi_primary_font_weight_400', MULTIMAGAZINE_PRIMARY_FONT_WEIGHT_400 ) ? 400 : '',
		get_theme_mod( 'multi_primary_font_weight_600', MULTIMAGAZINE_PRIMARY_FONT_WEIGHT_600 ) ? 600 : '',
		get_theme_mod( 'multi_primary_font_weight_700', MULTIMAGAZINE_PRIMARY_FONT_WEIGHT_700 ) ? 700 : '',
	);
	$primary_font_weights     = implode( ',', $primary_font_weight_list );

	if ( 'google' === $primary_font ) {
		$primary_google_font = get_theme_mod( 'multi_primary_google_font', false );
		$pri_subsets         = array();
		if ( get_theme_mod( 'multi_primary_font_subset_latin' ) ) {
			$pri_subsets[] = 'latin,latin-ext';
		}
		if ( get_theme_mod( 'multi_primary_font_subset_greek' ) ) {
			$pri_subsets[] = 'greek,greek-ext';
		}
		if ( get_theme_mod( 'multi_primary_font_subset_vietnamese' ) ) {
			$pri_subsets[] = 'vietnamese';
		}
		if ( get_theme_mod( 'multi_primary_font_subset_cyrillic' ) ) {
			$pri_subsets[] = 'cyrillic,cyrillic-ext';
		}
		$pri_subset_list = '&subset=' . implode( ',', $pri_subsets );
	}

	$secondary_font             = get_theme_mod( 'multi_secondary_font', false );
	$secondary_google_font      = '';
	$sec_subset_list            = '';
	$secondary_font_weight_list = array(
		get_theme_mod( 'multi_secondary_font_weight_300', 0 ) ? 300 : '',
		get_theme_mod( 'multi_secondary_font_weight_400', 1 ) ? 400 : '',
		get_theme_mod( 'multi_secondary_font_weight_600', 0 ) ? 600 : '',
		get_theme_mod( 'multi_secondary_font_weight_700', 1 ) ? 700 : '',
	);
	$secondary_font_weights     = implode( ',', $secondary_font_weight_list );

	if ( 'google' === $secondary_font ) {
		$secondary_google_font = get_theme_mod( 'multi_secondary_google_font', false );
		$sec_subsets           = array();
		if ( get_theme_mod( 'multi_secondary_font_subset_latin' ) ) {
			$sec_subsets[] = 'latin,latin-ext';
		}
		if ( get_theme_mod( 'multi_secondary_font_subset_greek' ) ) {
			$sec_subsets[] = 'greek,greek-ext';
		}
		if ( get_theme_mod( 'multi_secondary_font_subset_vietnamese' ) ) {
			$sec_subsets[] = 'vietnamese';
		}
		if ( get_theme_mod( 'multi_secondary_font_subset_cyrillic' ) ) {
			$sec_subsets[] = 'cyrillic,cyrillic-ext';
		}
		$sec_subset_list = '&subset=' . implode( ',', $sec_subsets );
	}

	$both_fonts_google = 'google' === $primary_font && 'google' === $secondary_font;
	$same_fonts        = $primary_google_font === $secondary_google_font;
	$same_subsets      = $pri_subset_list === $sec_subset_list;

	if ( $both_fonts_google && $same_fonts && $same_subsets ) {
		$weights = implode( ',', array_unique( array_merge( $primary_font_weight_list, $secondary_font_weight_list ) ) );
		$primary = $google_fonts_url . $primary_google_font . ':' . $weights;
		wp_enqueue_style( 'multimagazine-primary-font', $primary . $pri_subset_list, array(), 1 );

	} elseif ( $both_fonts_google && $same_fonts && ! $same_subsets ) {
		$weights = implode( ',', array_unique( array_merge( $primary_font_weight_list, $secondary_font_weight_list ) ) );
		$url     = $google_fonts_url . $primary_google_font . ':' . $weights . $pri_subset_list . ',' . $sec_subset_list;
		wp_enqueue_style( 'multimagazine-primary-font', $url, array(), 1 );

	} elseif ( $both_fonts_google && ! $same_fonts ) {
		$pri = $primary_google_font . ':' . $primary_font_weights;
		$sec = $secondary_google_font . ':' . $secondary_font_weights;
		$url = $google_fonts_url . $pri . '|' . $sec . $pri_subset_list;
		wp_enqueue_style( 'multimagazine-custom-fonts', $url, array(), 1 );

	} else {
		if ( 'google' === $primary_font ) {
			$primary = $google_fonts_url . $primary_google_font . ':' . $primary_font_weights;
			wp_enqueue_style( 'multimagazine-primary-font', $primary . $pri_subset_list, array(), 1 );
		}
		if ( 'google' === $secondary_font ) {
			$secondary = $google_fonts_url . $secondary_google_font . ':' . $secondary_font_weights;
			wp_enqueue_style( 'multimagazine-secondary-font', $secondary . $sec_subset_list, array(), 1 );
		}
		wp_enqueue_style( 'multimagazine-basic-font', '//fonts.googleapis.com/css?family=Montserrat:700,400', array(), 1 );
	}
}

/**
 * Theme customizer preview scripts
 */
function multimagazine_add_customizer_refresh_script() {
	$debug_suffix = WP_DEBUG ? '?v=' . time() : '';
	wp_enqueue_script(
		'multimagazine-customizer-refresh',
		MULTIMAGAZINE_THEME_URI . '/js/theme-customizer.js' . $debug_suffix,
		array( 'jquery', 'customize-preview' ),
		1,
		true
	);
}

/**
 * Loads styles for preloader
 */
function multimagazine_preloader_css() {
	if ( ! get_theme_mod( 'multi_preloader', MULTIMAGAZINE_PRELOADER ) ) {
		return;
	}

	$preloader_animation          = get_theme_mod( 'multi_preloader_animation', MULTIMAGAZINE_PRELOADER_ANIMATION );
	$preloader_spinner            = absint( get_theme_mod( 'multi_preloader_spinner', MULTIMAGAZINE_PRELOADER_SPINNER ) );
	$preloader_bg_style_path      = MULTIMAGAZINE_THEME_DIR . '/css/preloader-' . $preloader_animation . '.css';
	$preloader_spinner_type       = get_theme_mod( 'multi_preloader_spinner_type', MULTIMAGAZINE_PRELOADER_SPINNER_TYPE );
	$preloader_spinner_style_path = '';
	if ( 'spinner' === $preloader_spinner_type ) {
		$preloader_spinner_style_path = MULTIMAGAZINE_THEME_DIR . '/css/preloader-spinner-' . $preloader_spinner . '.css';
	}
	$preloader_style = '';

	if ( file_exists( $preloader_bg_style_path ) ) {
		$preloader_style .= multimagazine_remote_get( MULTIMAGAZINE_THEME_URI . '/css/preloader-' . $preloader_animation . '.css?v=' . time() );
	}
	if ( ! empty( $preloader_spinner_style_path ) && file_exists( $preloader_spinner_style_path ) ) {
		$preloader_style .= multimagazine_remote_get( MULTIMAGAZINE_THEME_URI . '/css/preloader-spinner-' . $preloader_spinner . '.css?v=' . time() );
	}

	if ( ! empty( $preloader_style ) ) {
		$handle = 'multimagazine-preloader-style';
		wp_register_style( $handle, false, array(), 1 );
		wp_enqueue_style( $handle );
		wp_add_inline_style( $handle, $preloader_style );
	}
}

/**
 * Adds rel="preload" to styles in html to make them non-render-blocking
 *
 * @param String $html <link> element markup.
 * @param String $handle The style handle used in enqueuing function.
 * @param String $href Style file URL.
 * @param String $media The media attribute for the style.
 */
function multimagazine_make_styles_preloadable( $html, $handle, $href, $media ) {
	if ( is_admin() || get_theme_mod( 'multi_css_src', MULTIMAGAZINE_CSS_SRC ) === 'inline' || ! get_theme_mod( 'multi_defer_css', MULTIMAGAZINE_DEFER_CSS ) ) {
		return $html;
	}
	$html = '<link rel="stylesheet" onload="this.onload=null;this.setAttribute(\'media\', \'' . $media . '\')" id="' . $handle . '" href="' . $href . '" type="text/css" media="print">'; // phpcs:ignore

	return $html;
}
add_filter( 'style_loader_tag', 'multimagazine_make_styles_preloadable', 10, 4 );
