Add massive collection of CSS, JavaScript and theme assets that were previously excluded: **CSS Files (681 total):** - HVAC plugin-specific styles (hvac-*.css): 34 files including dashboard, certificates, registration, mobile nav, accessibility fixes, animations, and welcome popup - Theme framework files (Astra, builder systems, layouts): 200+ files - Plugin compatibility styles (WooCommerce, WPForms, Elementor, Contact Form 7): 150+ files - WordPress core and editor styles: 50+ files - Responsive and RTL language support: 200+ files **JavaScript Files (400+ total):** - HVAC plugin functionality (hvac-*.js): 27 files including menu systems, dashboard enhancements, profile sharing, mobile responsive features, accessibility, and animations - Framework and library files: jQuery plugins, GSAP, AOS, Swiper, Chart.js, Lottie, Isotope - Plugin compatibility scripts: WPForms, WooCommerce, Elementor, Contact Form 7, LifterLMS - WordPress core functionality: customizer, admin, block editor compatibility - Third-party integrations: Stripe, SMTP, analytics, search functionality **Assets:** - Certificate background images and logos - Comprehensive theme styling infrastructure - Mobile-responsive design systems - Cross-browser compatibility assets - Performance-optimized minified versions **Updated .gitignore:** - Fixed asset directory whitelisting patterns to properly include CSS/JS/images - Added proper directory structure recognition (!/assets/css/, !/assets/js/, etc.) - Maintains security by excluding sensitive files while including essential assets This commit provides the complete frontend infrastructure needed for: - Full theme functionality and styling - Plugin feature implementations - Mobile responsiveness and accessibility - Cross-browser compatibility - Performance optimization - Developer workflow support
1 line
No EOL
5.4 KiB
JavaScript
1 line
No EOL
5.4 KiB
JavaScript
"use strict";var WPFormsStripeElements=window.WPFormsStripeElements||function(n,t,o){const l={stripe:null,lockedPageToSwitch:0,init:function(){l.stripe=Stripe(wpforms_stripe.publishable_key,{locale:wpforms_stripe.data.element_locale}),o(n).on("wpformsReady",function(){o(".wpforms-stripe form").filter((e,t)=>"number"==typeof o(t).data("formid")).each(l.setupStripeForm)}),o(n).on("wpformsBeforePageChange",l.pageChange)},setupStripeForm:function(){var e=o(this);l.updateFormSubmitHandler(e),e.on("wpformsAjaxSubmitActionRequired",l.handleCardActionCallback),l.updateCardElementStylesModern(e)},setupCardElement:function(r,i){const s=r.find(".wpforms-stripe-credit-card-hidden-input");if(s&&0!==s.length){var t=s.data("stripe-element");if(!t){let e=wpforms_stripe.data.element_style;o.isEmptyObject(e)&&(e=l.getElementStyleDefault(s));var a={classes:wpforms_stripe.data.element_classes,hidePostalCode:!0,style:e};(t=l.stripe.elements().create("card",a)).mount(r.find(".wpforms-field-stripe-credit-card-cardnumber").get(0)),t.on("change",function(t){if(t.error){let e=t.error.message;"incomplete_number"!==t.error.code&&"invalid_number"!==t.error.code||(e=wpforms_settings.val_creditcard),l.displayStripeError(r,e)}else i.hideThese(i.errorsFor(s.get(0)))}),t.on("focus",function(){o(n).trigger("wpformsStripePaymentElementFocus",[r])}),s.data("stripe-element",t)}return t}},getElementStyleDefault:function(t){if(t&&0!==t.length){var r=t.css("color"),i=t.css("font-size"),i={base:{fontSize:i,color:r,"::placeholder":{color:r,fontSize:i}},invalid:{color:r}};let e=t.css("font-family");r=/[“”<>!@$%^&*=~`|{}[\]]/;return!r.test(e)&&-1===e.indexOf("MS Shell Dlg")||(e=o("p").css("font-family")),r.test(e)||(i.base.fontFamily=e,i.base["::placeholder"].fontFamily=e),i}},updateFormSubmitHandler:function(a){let e=a.validate(),n=e.settings.submitHandler,o=l.setupCardElement(a,e),d=a.find(".wpforms-field-stripe-credit-card-cardnumber");e.settings.submitHandler=function(){let e=a.validate().form(),t=d.hasClass(wpforms_stripe.data.element_classes.empty),r=d.data("required"),i=d.closest(".wpforms-field-stripe-credit-card").hasClass("wpforms-conditional-hide"),s=i?!1:r||!t&&!r;if(e&&s)a.find(".wpforms-submit").prop("disabled",!0),l.createPaymentMethod(a,o,r,n);else{if(e)return a.find(".wpforms-submit").prop("disabled",!1),n(a);a.find(".wpforms-submit").prop("disabled",!1),a.validate().cancelSubmit=!0}}},createPaymentMethod:function(t,e,r,i){l.stripe.createPaymentMethod("card",e,{billing_details:{name:t.find(".wpforms-field-stripe-credit-card-cardname").val()}}).then(function(e){e.error&&r?(t.find(".wpforms-submit").prop("disabled",!1),l.displayStripeError(t,e.error.message),t.validate().cancelSubmit=!0):(e.error||(t.find(".wpforms-stripe-payment-method-id").remove(),e.paymentMethod&&t.append('<input type="hidden" class="wpforms-stripe-payment-method-id" name="wpforms[payment_method_id]" value="'+e.paymentMethod.id+'">')),i(t))})},handleCardActionCallback:function(e,t){const r=o(this);t.success&&t.data.action_required&&l.stripe.handleCardPayment(t.data.payment_intent_client_secret,{payment_method:t.data.payment_method_id}).then(function(e){l.handleCardPaymentCallback(r,e)})},handleCardPaymentCallback:function(e,t){t.error?(l.formAjaxUnblock(e),e.find(".wpforms-field-stripe-credit-card-cardnumber").addClass(wpforms_stripe.data.element_classes.invalid),l.displayStripeError(e,t.error.message)):t.paymentIntent&&"succeeded"===t.paymentIntent.status?(e.find(".wpforms-stripe-payment-method-id").remove(),e.find(".wpforms-stripe-payment-intent-id").remove(),e.append('<input type="hidden" class="wpforms-stripe-payment-intent-id" name="wpforms[payment_intent_id]" value="'+t.paymentIntent.id+'">'),wpforms.formSubmitAjax(e)):l.formAjaxUnblock(e)},displayStripeError:function(e,t){var r=e.find(".wpforms-stripe-credit-card-hidden-input").attr("name"),i=e.find(".wpforms-field-stripe-credit-card-cardnumber"),s={};s[r]=t,wpforms.displayFormAjaxFieldErrors(e,s),!i.is(":visible")&&0<e.find(".wpforms-page-indicator-steps").length&&wpforms.setCurrentPage(e,{}),wpforms.scrollToError(i)},formAjaxUnblock:function(e){var t=e.closest(".wpforms-container"),r=e.find(".wpforms-submit-spinner"),e=e.find(".wpforms-submit"),i=e.data("submit-text");i&&e.text(i),e.prop("disabled",!1),t.css("opacity",""),r.hide()},pageChange:function(e,t,r,i){var s=r.find(".wpforms-field-stripe-credit-card-cardnumber"),a=s.hasClass(wpforms_stripe.data.element_classes.complete),n=s.hasClass(wpforms_stripe.data.element_classes.empty),o=s.hasClass(wpforms_stripe.data.element_classes.invalid);!s.is(":visible")||!s.data("required")&&n||l.lockedPageToSwitch&&l.lockedPageToSwitch!==t||"prev"===i||(a?s.find(".wpforms-error").remove():(l.lockedPageToSwitch=t,e.preventDefault(),o||l.displayStripeError(r,wpforms_stripe.i18n.empty_details)))},getCssPropertyValue(e,t){try{return e.css(t)}catch(e){return""}},updateCardElementStylesModern(e){t.WPForms&&WPForms.FrontendModern&&o.isEmptyObject(wpforms_stripe.data.element_style)&&e&&0!==e.length&&e.find(".wpforms-stripe-credit-card-hidden-input").each(function(){var e=o(this),t=e.data("stripe-element"),e={fontSize:l.getCssPropertyValue(e,"font-size"),colorText:l.getCssPropertyValue(e,"color")};t&&(e={base:{color:e.colorText,fontSize:e.fontSize,"::placeholder":{color:WPForms.FrontendModern.getColorWithOpacity(e.colorText,"0.5"),fontSize:e.fontSize}},invalid:{color:e.colorText}},t.update({style:e}))})}};return l}(document,window,jQuery);WPFormsStripeElements.init(); |