1/** 2 * TourCardConstants - SVG Icons and Configuration Constants 3 * 4 * Centralizes all SVG icon definitions and tour card configuration 5 * Follows pattern established by Commission/ modules 6 * Part of the Tour Card Architecture refactor 7 * 8 * USAGE: 9 * - TourCardBuilders.js: Icon injection in HTML templates 10 * - widget.js: Legacy SvgIcons object replacement (backward compatible) 11 * 12 * MIGRATION FROM: 13 * - widget.js (lines 6-61) - Original SvgIcons object 14 * 15 * @class TourCardConstants 16 * @since 2026-01-12 17 */ 18 19/** 20 * SVG Icons Library for Tour Cards 21 * Contains inline SVG definitions for all tour card icons 22 * 23 * @constant {Object} SvgIcons 24 */ 25var SvgIcons = { 26 /** 27 * Location pin icon 28 * Used in tour location display 29 */ 30 location: `<svg width="16" height="19" viewBox="0 0 16 19" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7.66667 10.1667C9.04738 10.1667 10.1667 9.04738 10.1667 7.66667C10.1667 6.28595 9.04738 5.16667 7.66667 5.16667C6.28595 5.16667 5.16667 6.28595 5.16667 7.66667C5.16667 9.04738 6.28595 10.1667 7.66667 10.1667Z" stroke="#414651" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M7.66667 17.6667C11 14.3333 14.3333 11.3486 14.3333 7.66667C14.3333 3.98477 11.3486 1 7.66667 1C3.98477 1 1 3.98477 1 7.66667C1 11.3486 4.33333 14.3333 7.66667 17.6667Z" stroke="#414651" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg>`, 31 32 /** 33 * Clock/time icon 34 * Used in tour duration display 35 */ 36 clock: `<svg width="19" height="19" viewBox="0 0 19 19" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.33333 4.33333V9.33333L12.6667 11M17.6667 9.33333C17.6667 13.9357 13.9357 17.6667 9.33333 17.6667C4.73096 17.6667 1 13.9357 1 9.33333C1 4.73096 4.73096 1 9.33333 1C13.9357 1 17.6667 4.73096 17.6667 9.33333Z" stroke="#414651" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>`, 37 38 /** 39 * Activity/checkmark icon 40 * Used in tour activity tags 41 */ 42 activity: `<svg width="19" height="19" viewBox="0 0 19 19" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5.58333 9.33333L8.08333 11.8333L13.0833 6.83333M17.6667 9.33333C17.6667 13.9357 13.9357 17.6667 9.33333 17.6667C4.73096 17.6667 1 13.9357 1 9.33333C1 4.73096 4.73096 1 9.33333 1C13.9357 1 17.6667 4.73096 17.6667 9.33333Z" stroke="#414651" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>`, 43 44 /** 45 * Product type/people icon 46 * Used in tour type display 47 */ 48 productType: `<svg width="19" height="17" viewBox="0 0 19 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M17.6667 16V14.3333C17.6667 12.7801 16.6044 11.4751 15.1667 11.105M12.25 1.2423C13.4716 1.73679 14.3333 2.93443 14.3333 4.33333C14.3333 5.73224 13.4716 6.92988 12.25 7.42437M13.5 16C13.5 14.4469 13.5 13.6703 13.2463 13.0577C12.908 12.241 12.259 11.592 11.4423 11.2537C10.8297 11 10.0531 11 8.5 11H6C4.44686 11 3.67029 11 3.05772 11.2537C2.24096 11.592 1.59205 12.241 1.25373 13.0577C1 13.6703 1 14.4469 1 16M10.5833 4.33333C10.5833 6.17428 9.09095 7.66667 7.25 7.66667C5.40905 7.66667 3.91667 6.17428 3.91667 4.33333C3.91667 2.49238 5.40905 1 7.25 1C9.09095 1 10.5833 2.49238 10.5833 4.33333Z" stroke="#414651" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>`, 49 50 /** 51 * Full star icon for rating display 52 * Uses gradient fill for visual appeal 53 */ 54 fullStar: `<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="#F15C22" d="M12,0 L14.83,9.17 L24,9.17 L16.58,14.84 L19.42,24 L12,18.34 L4.58,24 L7.42,14.84 L0,9.17 L9.17,9.17 Z"/></svg>`, 55 56 /** 57 * Half star icon for rating display 58 * Uses gradient fill to show half-filled star 59 */ 60 halfStar: `<svg width="24" height="24" viewBox="-1 -1 26 26" xmlns="http://www.w3.org/2000/svg"><defs><clipPath id="half"><rect x="0" y="0" width="12" height="24"/></clipPath></defs><path fill="none" stroke="#F15C22" stroke-width="1" d="M12,0 L14.83,9.17 L24,9.17 L16.58,14.84 L19.42,24 L12,18.34 L4.58,24 L7.42,14.84 L0,9.17 L9.17,9.17 Z"/><path fill="#F15C22" stroke="#F15C22" stroke-width="1" clip-path="url(#half)" d="M12,0 L14.83,9.17 L24,9.17 L16.58,14.84 L19.42,24 L12,18.34 L4.58,24 L7.42,14.84 L0,9.17 L9.17,9.17 Z"/></svg>`, 61 62 /** 63 * Empty star icon for rating display 64 * Outlined star with no fill 65 */ 66 emptyStar: `<svg width="24" height="24" viewBox="-1 -1 26 26" xmlns="http://www.w3.org/2000/svg"><path fill="none" stroke="#F15C22" stroke-width="1" d="M12,0 L14.83,9.17 L24,9.17 L16.58,14.84 L19.42,24 L12,18.34 L4.58,24 L7.42,14.84 L0,9.17 L9.17,9.17 Z"/></svg>`, 67 68 /** 69 * Heart icon for favorite/wishlist button
70 * Used in tour card favorite functionality 71 */ 72 heartCard: '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" fill="#A4A7AE"><path d="M12.39 2.145a3.5 3.5 0 0 0-4.95 0L7 2.59l-.44-.445a3.5 3.5 0 1 0-4.95 4.95l.44.445L7 12.5l4.95-4.96.44-.445a3.5 3.5 0 0 0 0-4.95z"></path></svg>', 73 74 /** 75 * Shore excursion icon 76 * Used in tour card shore excursion icon display 77 */ 78 shoreEx: `<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M19.1667 16.6667C18.9457 16.6667 18.7337 16.7545 18.5774 16.9107C18.4211 17.067 18.3333 17.279 18.3333 17.5C18.3333 17.7867 17.765 18.3333 16.875 18.3333C16.625 18.3421 16.3762 18.2952 16.1465 18.1958C15.9169 18.0965 15.7123 17.9474 15.5475 17.7592C15.5801 17.706 15.6157 17.6548 15.6542 17.6058C17.0132 16.1806 17.9271 14.39 18.2842 12.4533C18.3899 11.8707 18.2853 11.2694 17.9891 10.7566C17.6928 10.2438 17.2242 9.85287 16.6667 9.65333V7.5C16.6667 6.61594 16.3155 5.7681 15.6904 5.14298C15.0652 4.51786 14.2174 4.16667 13.3333 4.16667V3.33333C13.3333 2.44928 12.9821 1.60143 12.357 0.976311C11.7319 0.35119 10.8841 0 10 0C9.11594 0 8.2681 0.35119 7.64298 0.976311C7.01786 1.60143 6.66667 2.44928 6.66667 3.33333V4.16667C5.78261 4.16667 4.93476 4.51786 4.30964 5.14298C3.68452 5.7681 3.33333 6.61594 3.33333 7.5V9.6425C2.76883 9.83749 2.29278 10.2281 1.99135 10.7437C1.68991 11.2593 1.58302 11.8658 1.69 12.4533C2.05596 14.3924 2.97883 16.1828 4.34583 17.6058C4.38582 17.6561 4.42283 17.7087 4.45667 17.7633C4.2917 17.9522 4.08634 18.1015 3.85581 18.2001C3.62529 18.2988 3.37551 18.3443 3.125 18.3333C2.2175 18.3333 1.66667 17.755 1.66667 17.5C1.66667 17.279 1.57887 17.067 1.42259 16.9107C1.26631 16.7545 1.05435 16.6667 0.833333 16.6667C0.61232 16.6667 0.400358 16.7545 0.244078 16.9107C0.0877974 17.067 0 17.279 0 17.5C0 18.855 1.43167 20 3.125 20C3.96765 20.0076 4.78492 19.7118 5.4275 19.1667C6.06842 19.7019 6.87631 19.9963 7.71134 19.9987C8.54637 20.0011 9.35597 19.7115 10 19.18C10.6464 19.711 11.4576 20.0001 12.2941 19.9977C13.1306 19.9953 13.9401 19.7014 14.5833 19.1667C15.2221 19.7089 16.0338 20.0045 16.8717 20C18.5683 20 20 18.855 20 17.5C20 17.279 19.9122 17.067 19.7559 16.9107C19.5996 16.7545 19.3877 16.6667 19.1667 16.6667ZM8.33333 3.33333C8.33333 2.89131 8.50893 2.46738 8.82149 2.15482C9.13405 1.84226 9.55797 1.66667 10 1.66667C10.442 1.66667 10.8659 1.84226 11.1785 2.15482C11.4911 2.46738 11.6667 2.89131 11.6667 3.33333V4.16667H8.33333V3.33333ZM6.66667 5.83333H13.3333C13.7754 5.83333 14.1993 6.00893 14.5118 6.32149C14.8244 6.63405 15 7.05797 15 7.5V9.1L10.79 7.71833C10.2782 7.54999 9.72596 7.54999 9.21417 7.71833L5 9.09417V7.5C5 7.05797 5.17559 6.63405 5.48816 6.32149C5.80072 6.00893 6.22464 5.83333 6.66667 5.83333ZM7.70833 18.3333C7.42981 18.3486 7.15208 18.2914 6.9022 18.1674C6.65233 18.0435 6.43883 17.8569 6.2825 17.6258C6.10892 17.2097 5.8704 16.8238 5.57583 16.4825C4.42701 15.2931 3.64801 13.7959 3.33333 12.1725C3.29486 11.9728 3.32939 11.7659 3.43065 11.5896C3.53191 11.4132 3.69315 11.2791 3.885 11.2117L9.16667 9.48583V17.5C9.16667 17.7867 8.59833 18.3333 7.70833 18.3333ZM12.2917 18.3333C11.3842 18.3333 10.8333 17.755 10.8333 17.5V9.48667L16.0875 11.2108C16.28 11.2781 16.4419 11.4123 16.5438 11.589C16.6457 11.7656 16.6807 11.973 16.6425 12.1733C16.3369 13.7946 15.5661 15.2918 14.4242 16.4825C14.1277 16.8243 13.889 17.2122 13.7175 17.6308C13.5611 17.8615 13.3475 18.0475 13.0975 18.1706C12.8475 18.2938 12.5698 18.3499 12.2917 18.3333Z" fill="#414651"/></svg>`, 79 80 /** 81 * Transportation icon 82 * Used in tour card transportation icon display 83 */ 84 transportation: `<svg width="17" height="19" viewBox="0 0 17 19" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5.58333 15.1667V17C5.58333 17.2334 5.58333 17.35 5.53792 17.4392C5.49797 17.5176 5.43423 17.5813 5.35583 17.6213C5.2667 17.6667 5.15002 17.6667 4.91667 17.6667H3.33333C3.09998 17.6667 2.9833 17.6667 2.89417 17.6213C2.81577 17.5813 2.75203 17.5176 2.71208 17.4392C2.66667 17.35 2.66667 17.2334 2.66667 17V15.1667M14.3333 15.1667V17C14.3333 17.2334 14.3333 17.35 14.2879
8417.4392C14.248 17.5176 14.1842 17.5813 14.1058 17.6213C14.0167 17.6667 13.9 17.6667 13.6667 17.6667H12.0833C11.85 17.6667 11.7333 17.6667 11.6442 17.6213C11.5658 17.5813 11.502 17.5176 11.4621 17.4392C11.4167 17.35 11.4167 17.2334 11.4167 17V15.1667M1 9.33333H16M1 3.91667H16M3.91667 12.25H5.16667M11.8333 12.25H13.0833M5 15.1667H12C13.4001 15.1667 14.1002 15.1667 14.635 14.8942C15.1054 14.6545 15.4878 14.272 15.7275 13.8016C16 13.2669 16 12.5668 16 11.1667V5C16 3.59987 16 2.8998 15.7275 2.36502C15.4878 1.89462 15.1054 1.51217 14.635 1.27248C14.1002 1 13.4001 1 12 1H5C3.59987 1 2.8998 1 2.36502 1.27248C1.89462 1.51217 1.51217 1.89462 1.27248 2.36502C1 2.8998 1 3.59987 1 5V11.1667C1 12.5668 1 13.2669 1.27248 13.8016C1.51217 14.272 1.89462 14.6545 2.36502 14.8942C2.8998 15.1667 3.59987 15.1667 5 15.1667Z" stroke="#414651" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>`, 85 86 /** 87 * Previous arrow icon 88 * Used in pagination navigation 89 */ 90 previousArrow: `<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.5 6.66671H0.833344M0.833344 6.66671L6.66668 12.5M0.833344 6.66671L6.66668 0.833374" stroke="#535862" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/></svg>`, 91 92 /** 93 * Next arrow icon 94 * Used in pagination navigation 95 */ 96 nextArrow: `<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0.833374 6.66671H12.5M12.5 6.66671L6.66671 0.833374M12.5 6.66671L6.66671 12.5" stroke="#535862" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/></svg> 97`, 98}; 99 100/** 101 * Tour Card Configuration Constants 102 * 103 * @constant {Object} TourCardConfig 104 */ 105var TourCardConfig = { 106 /** 107 * Maximum title length before using smaller font size 108 */ 109 TITLE_LONG_THRESHOLD: 50, 110 111 /** 112 * Maximum activities to display in tags 113 */ 114 MAX_ACTIVITIES_DISPLAY: 2, 115 116 /** 117 * Default image fallback URL 118 */ 119 DEFAULT_IMAGE: '/files/site-wide/default-act-sight-widget.jpg' 120}; 121 122/** 123 * Tour Card Utility Functions 124 * 125 * Provides security utilities for safe HTML rendering 126 * 127 * @constant {Object} TourCardUtils 128 * @since 2026-01-14 129 */ 130var TourCardUtils = { 131 /** 132 * Escape HTML special characters to prevent XSS 133 * @param {string} unsafe - Untrusted string 134 * @returns {string} Escaped string safe for HTML content 135 */ 136 escapeHtml: function(unsafe) { 137 if (unsafe == null) return ''; 138 return String(unsafe) 139 .replace(/&/g, '&') 140 .replace(/</g, '<') 141 .replace(/>/g, '>') 142 .replace(/"/g, '"') 143 .replace(/'/g, '''); 144 }, 145 146 /** 147 * Escape string for use in HTML attributes 148 * @param {string} unsafe - Untrusted string 149 * @returns {string} Escaped string safe for attributes 150 */ 151 escapeAttr: function(unsafe) { 152 if (unsafe == null) return ''; 153 return String(unsafe) 154 .replace(/&/g, '&') 155 .replace(/"/g, '"') 156 .replace(/'/g, ''') 157 .replace(/</g, '<') 158 .replace(/>/g, '>'); 159 } 160}; 161
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.