{"version":3,"sources":["jsdelivr-header.js","/npm/bulib-wc@0.1.59/dist/search_redirector_override.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACMA,IAAI,oBAAsB,SAAS,GAEjC,OAAO,SADQ,iJACY,mBAAmB,EAChD,EAEA,GAAgC,cAA7B,OAAO,SAAS,SAAyB,CAC1C,IAAI,EAAsB,SAAS,cAAc,qBAC7C,EAAuB,SAAS,cAAc,6BAC9C,EAAsB,SAAS,cAAc,0CAEjD,EAAoB,iBAAiB,UAAW,IAC9C,IAAI,EAAS,EAAqB,MAC/B,EAAoB,aAAa,aAClC,oBAAoB,GACpB,EAAG,iBACL,GAEJ","file":"/npm/bulib-wc@0.1.59/dist/search_redirector_override.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/bulib-wc@0.1.59/dist/search_redirector_override.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/**\n * NOTE: this is a bit of a quick-fix solution to resolve a production issue WEB-194.\n * \n *  - the following hijacks the search form submission on the home page, preventing \n *    a call from being made to https://github.com/bu-ist/bu-library-theme/blob/master/search-redirector.php\n *    which, if allowed, results in 403 errors.\n *  - we know from a previous issue (WEB-83) that this is likely due to the 'Web Application Firewall' \n *    configurations by IS&T, but redressing the issue has not been quick, and we don't want/need the redirector\n *    going forward really, anyway \n *  - this patche should be replaced once the homepage is replaced by the '<bulib-search>' component.\n */\n\nlet doBULSCatalogSearch = function(query){\n  let base_url = \"https://buprimo.hosted.exlibrisgroup.com/primo-explore/search?tab=default_tab&search_scope=default_scope&vid=BU&lang=en_US&query=any,contains,\";\n  window.location = base_url+encodeURIComponent(query);\n}\n\nif(window.location.pathname === \"/library/\"){ \n  let bulibHomeSearchForm = document.querySelector(\"div#search > form\");\n  let searchQueryInputElem = document.querySelector(\"div#search > form input#q\");\n  let bulsOptionInputElem = document.querySelector(\"div#search > form input#search-catalog\");\n\n  bulibHomeSearchForm.addEventListener('submit', (ev) => {\n    let qValue = searchQueryInputElem.value;\n    if(bulsOptionInputElem.hasAttribute(\"checked\")){\n      doBULSCatalogSearch(qValue);\n      ev.preventDefault();\n    }\n  });\n};"]}