{"version":3,"file":"../woocommerce-300.min.js","sources":["woocommerce-300.js"],"sourcesContent":["/**\n * WooCommerce Script\n * \n * Replaces the original WooCommerce `woocommerce.js`.\n */\n\n/* global Cookies */\njQuery( function( $ ) {\n\t// Orderby\n\t$( '.woocommerce-ordering' ).on( 'change', 'select.orderby', function() {\n\t\t$( this ).closest( 'form' ).trigger( 'submit' );\n\t});\n\n\t// Target quantity inputs on product pages\n\t$( 'input.qty:not(.product-quantity input.qty)' ).each( function() {\n\t\tvar min = parseFloat( $( this ).attr( 'min' ) );\n\n\t\tif ( min >= 0 && parseFloat( $( this ).val() ) < min ) {\n\t\t\t$( this ).val( min );\n\t\t}\n\t});\n\n\tvar noticeID = $( '.woocommerce-store-notice' ).data( 'noticeId' ) || '',\n\t\tcookieName = 'store_notice' + noticeID;\n\n\t// Check the value of that cookie and show/hide the notice accordingly\n\tif ( 'hidden' === Cookies.get( cookieName ) ) {\n\t\t$( '.woocommerce-store-notice' ).hide();\n\t} else {\n\t\t$( '.woocommerce-store-notice' ).show();\n\t}\n\n\t// Set a cookie and hide the store notice when the dismiss button is clicked\n\t$( '.woocommerce-store-notice__dismiss-link' ).on( 'click', function( event ) {\n\t\tCookies.set( cookieName, 'hidden', { path: '/' } );\n\t\t$( '.woocommerce-store-notice' ).hide();\n\t\tevent.preventDefault();\n\t});\n\n\t// CHANGE: Remove \"Make form field descriptions toggle on focus.\"\n\n\t$( '.woocommerce-input-wrapper' ).on( 'click', function( event ) {\n\t\tevent.stopPropagation();\n\t} );\n\n\t// CHANGE: Remove \"Make form field descriptions toggle on focus.\"\n\n\t// Common scroll to element code.\n\t$.scroll_to_notices = function( scrollElement ) {\n\t\tif ( scrollElement.length ) {\n\t\t\t$( 'html, body' ).animate( {\n\t\t\t\tscrollTop: ( scrollElement.offset().top - 100 )\n\t\t\t}, 1000 );\n\t\t}\n\t};\n\n\t// CHANGE: Extract password visibility icon code into a function.\n\tvar handlePasswordVisibility = function() {\n\t\t// Show password visibility hover icon on woocommerce forms\n\t\t$( '.woocommerce form .woocommerce-Input[type=\"password\"]' ).wrap( '' );\n\t\t// Add 'password-input' class to the password wrapper in checkout page.\n\t\t$( '.woocommerce form input' ).filter(':password').parent('span').addClass('password-input');\n\t\t$( '.password-input' ).append( '' );\n\n\t\t$( '.show-password-input' ).on( 'click',\n\t\t\tfunction() {\n\t\t\t\tif ( $( this ).hasClass( 'display-password' ) ) {\n\t\t\t\t\t$( this ).removeClass( 'display-password' );\n\t\t\t\t} else {\n\t\t\t\t\t$( this ).addClass( 'display-password' );\n\t\t\t\t}\n\t\t\t\tif ( $( this ).hasClass( 'display-password' ) ) {\n\t\t\t\t\t$( this ).siblings( ['input[type=\"password\"]'] ).prop( 'type', 'text' );\n\t\t\t\t} else {\n\t\t\t\t\t$( this ).siblings( 'input[type=\"text\"]' ).prop( 'type', 'password' );\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n\thandlePasswordVisibility();\n\t// CHANGE: END - Extract password visibility icon code into a function.\n\n\t// CHANGE: Also run password visibility icon code after replacing checkout fragments.\n\t$( document.body ).on( 'updated_checkout', handlePasswordVisibility );\n});\n"],"names":["jQuery","$","on","this","closest","trigger","each","min","parseFloat","attr","val","handlePasswordVisibility","wrap","filter","parent","addClass","append","hasClass","removeClass","siblings","prop","cookieName","data","Cookies","get","hide","show","event","set","path","preventDefault","stopPropagation","scroll_to_notices","scrollElement","length","animate","scrollTop","offset","top","document","body"],"mappings":"AAOAA,OAAQ,SAAUC,GAEjBA,EAAG,uBAAwB,EAAEC,GAAI,SAAU,iBAAkB,WAC5DD,EAAGE,IAAK,EAAEC,QAAS,MAAO,EAAEC,QAAS,QAAS,CAC/C,CAAC,EAGDJ,EAAG,4CAA6C,EAAEK,KAAM,WACvD,IAAIC,EAAMC,WAAYP,EAAGE,IAAK,EAAEM,KAAM,KAAM,CAAE,EAElC,GAAPF,GAAYC,WAAYP,EAAGE,IAAK,EAAEO,IAAI,CAAE,EAAIH,GAChDN,EAAGE,IAAK,E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